All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.app.297742cda878c845f95a.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
(()=>{(()=>{var _h={"xVpy+aBO":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`form:not(.form-inline) .twitter-typeahead {
  width: 100%;
}
.typeahead,
.tt-query,
.tt-hint {
  border: 2px solid #ccc;
  border-radius: 4px;
  outline: none;
}
.typeahead {
  background-color: #fff;
}
.typeahead:focus {
  border: 2px solid #0097cf;
}
.tt-query {
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
input[type="text"].tt-hint {
  color: #999;
}
.tt-menu {
  min-width: 160px;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  width: 100%;
}
.tt-dataset {
  margin-top: 10px;
}
.tt-suggestion {
  font-size: 1rem;
  /* theme.fonts.size.body */
  line-height: 20px;
  padding: 3px 20px;
  cursor: pointer;
}
.tt-suggestion:hover,
.tt-suggestion.tt-cursor {
  color: #ffffff;
  text-decoration: none;
  background-color: #0081c2;
  background-image: linear-gradient(to bottom, #0088cc, #0077b3);
  background-repeat: repeat-x;
  outline: 0;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}
.tt-suggestion p {
  margin: 0;
}
`,"",{version:3,sources:["webpack://./public/stylesheets/typeahead.less"],names:[],mappings:"AAAA;EACE,WAAA;AACF;AAEA;;;EAGE,sBAAA;EACA,kBAAA;EACA,aAAA;AAAF;AAGA;EACE,sBAAA;AADF;AAIA;EACE,yBAAA;AAFF;AAKA;EACE,gDAAA;AAHF;AAMA;EACE,WAAA;AAJF;AAOA;EACE,gBAAA;EACA,sBAAA;EACA,oCAAA;EACA,kBAAA;EACA,yCAAA;EACA,WAAA;AALF;AAQA;EACE,gBAAA;AANF;AASA;EACE,eAAA;EAPA,0BAA0B;EAQ1B,iBAAA;EACA,iBAAA;EACA,eAAA;AANF;AASA;;EAEE,cAAA;EACA,qBAAA;EACA,yBAAA;EACA,8DAAA;EACA,2BAAA;EACA,UAAA;EACA,sHAAA;AAPF;AAUA;EACE,SAAA;AARF",sourcesContent:[`form:not(.form-inline) .twitter-typeahead {
  width: 100%;
}

.typeahead,
.tt-query,
.tt-hint {
  border: 2px solid #ccc;
  border-radius: 4px;
  outline: none;
}

.typeahead {
  background-color: #fff;
}

.typeahead:focus {
  border: 2px solid #0097cf;
}

.tt-query {
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}

input[type="text"].tt-hint {
  color: #999
}

.tt-menu {
  min-width: 160px;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  box-shadow: 0 5px 10px rgba(0,0,0,.2);
  width: 100%;
}

.tt-dataset {
  margin-top: 10px;
}

.tt-suggestion {
  font-size: 1rem; /* theme.fonts.size.body */
  line-height: 20px;
  padding: 3px 20px;
  cursor: pointer;
}

.tt-suggestion:hover,
.tt-suggestion.tt-cursor {
  color: #ffffff;
  text-decoration: none;
  background-color: #0081c2;
  background-image: linear-gradient(to bottom, #0088cc, #0077b3);
  background-repeat: repeat-x;
  outline: 0;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}

.tt-suggestion p {
  margin: 0;
}
`],sourceRoot:""}]);const c=n},"3czfsiiO":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.QCm7R4MwlLoTDwu8SNZB {
    padding-left: 0;
    margin-bottom: 20px;
}

.QCm7R4MwlLoTDwu8SNZB .QCm7R4MwlLoTDwu8SNZB {
    margin-bottom: 0;
}
`,"",{version:3,sources:["webpack://./src/components/common/ExpandableList.css"],names:[],mappings:"AAAA;IACI,eAAe;IACf,mBAAmB;AACvB;;AAEA;IACI,gBAAgB;AACpB",sourcesContent:[`:local(.list) {
    padding-left: 0;
    margin-bottom: 20px;
}

:local(.list) :local(.list) {
    margin-bottom: 0;
}
`],sourceRoot:""}]),n.locals={list:"QCm7R4MwlLoTDwu8SNZB"};const c=n},QTOlkT3a:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.bLH1iAETwjYKFim2_xa9 {
    padding-left: 0;
    padding-right: 0;
}

.bLH1iAETwjYKFim2_xa9 .popover-content {
    min-width: 200px;
    padding: 0;
}

.bLH1iAETwjYKFim2_xa9 .list-group {
    margin-bottom: 0;
}

.bLH1iAETwjYKFim2_xa9 .list-group-item {
    border-right: 0;
    border-left: 0;
    padding: 6px 15px;
}

.bLH1iAETwjYKFim2_xa9 .list-group-item:first-child {
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

.bLH1iAETwjYKFim2_xa9 .list-group-item:last-child {
    border-bottom: 0;
}

.SOQRgrHWKOcqvbc6z1g7 {
    min-width: 200px;
    max-height: 340px; /* 10 items */
    overflow: auto;
}

.tfZVJT0QPa8mTaekvKgt {
    margin-bottom: 0 !important;
    padding: 5px;
}
`,"",{version:3,sources:["webpack://./src/components/common/SelectPopover.css"],names:[],mappings:"AAAA;IACI,eAAe;IACf,gBAAgB;AACpB;;AAEA;IACI,gBAAgB;IAChB,UAAU;AACd;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,eAAe;IACf,cAAc;IACd,iBAAiB;AACrB;;AAEA;IACI,0BAA0B;IAC1B,yBAAyB;AAC7B;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,gBAAgB;IAChB,iBAAiB,EAAE,aAAa;IAChC,cAAc;AAClB;;AAEA;IACI,2BAA2B;IAC3B,YAAY;AAChB",sourcesContent:[`:local(.customPopover) {
    padding-left: 0;
    padding-right: 0;
}

:local(.customPopover) .popover-content {
    min-width: 200px;
    padding: 0;
}

:local(.customPopover) .list-group {
    margin-bottom: 0;
}

:local(.customPopover) .list-group-item {
    border-right: 0;
    border-left: 0;
    padding: 6px 15px;
}

:local(.customPopover) .list-group-item:first-child {
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

:local(.customPopover) .list-group-item:last-child {
    border-bottom: 0;
}

:local(.scrollableList) {
    min-width: 200px;
    max-height: 340px; /* 10 items */
    overflow: auto;
}

:local(.dataFilterInput) {
    margin-bottom: 0 !important;
    padding: 5px;
}
`],sourceRoot:""}]),n.locals={customPopover:"bLH1iAETwjYKFim2_xa9",scrollableList:"SOQRgrHWKOcqvbc6z1g7",dataFilterInput:"tfZVJT0QPa8mTaekvKgt"};const c=n},VPjWgPqM:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.z6LAsSk67C9Z9TP6Sw_Z .panel-title {
    font-size: 1rem; /* theme.fonts.size.body */
}

.z6LAsSk67C9Z9TP6Sw_Z .panel-title > a {
    cursor: pointer;
    display: block;
}

.z6LAsSk67C9Z9TP6Sw_Z .panel-body {
    padding: 10px;
}

.z6LAsSk67C9Z9TP6Sw_Z ul {
    padding-left: 0;
}
`,"",{version:3,sources:["webpack://./src/components/event-definitions/common/HelpPanel.css"],names:[],mappings:"AAAA;IACI,eAAe,EAAE,0BAA0B;AAC/C;;AAEA;IACI,eAAe;IACf,cAAc;AAClB;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,eAAe;AACnB",sourcesContent:[`:local(.helpPanel) .panel-title {
    font-size: 1rem; /* theme.fonts.size.body */
}

:local(.helpPanel) .panel-title > a {
    cursor: pointer;
    display: block;
}

:local(.helpPanel) .panel-body {
    padding: 10px;
}

:local(.helpPanel) ul {
    padding-left: 0;
}
`],sourceRoot:""}]),n.locals={helpPanel:"z6LAsSk67C9Z9TP6Sw_Z"};const c=n},RnCvQHpm:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.Q3IGkFIUvJ2Wg6SvuD4K {
    margin-top: 10px;
    margin-bottom: 10px;
}

.IsgkvOxhQSEsv8gRjrL3 {
    table-layout: fixed;
}

.A9wyo101mpbrg9i57cBz.alert {
    margin-bottom: 10px;
}

.A9wyo101mpbrg9i57cBz h4 {
    font-size: 1.44rem; /* theme.fonts.size.body h4 */
    margin-bottom: 0.5em;
}

.A9wyo101mpbrg9i57cBz ul {
    list-style: disc;
    margin: 0.5em 0;
}
`,"",{version:3,sources:["webpack://./src/components/event-definitions/common/commonStyles.css"],names:[],mappings:"AAAA;IACI,gBAAgB;IAChB,mBAAmB;AACvB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,kBAAkB,EAAE,6BAA6B;IACjD,oBAAoB;AACxB;;AAEA;IACI,gBAAgB;IAChB,eAAe;AACnB",sourcesContent:[`:local(.title) {
    margin-top: 10px;
    margin-bottom: 10px;
}

:local(.fixedTable) {
    table-layout: fixed;
}

:local(.validationSummary).alert {
    margin-bottom: 10px;
}

:local(.validationSummary) h4 {
    font-size: 1.44rem; /* theme.fonts.size.body h4 */
    margin-bottom: 0.5em;
}

:local(.validationSummary) ul {
    list-style: disc;
    margin: 0.5em 0;
}
`],sourceRoot:""}]),n.locals={title:"Q3IGkFIUvJ2Wg6SvuD4K",fixedTable:"IsgkvOxhQSEsv8gRjrL3",validationSummary:"A9wyo101mpbrg9i57cBz"};const c=n},njMnXJuB:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.m1bai3Kt45u9j3MtW7hT {
    margin-bottom: 20px;
}

.EJT6DlEKjyYuxyouwsaR {
    table-layout: fixed;
}
`,"",{version:3,sources:["webpack://./src/components/event-definitions/event-definition-form/field-value-providers/CommonFieldValueProviderSummary.css"],names:[],mappings:"AAAA;IACI,mBAAmB;AACvB;;AAEA;IACI,mBAAmB;AACvB",sourcesContent:[`:local(.field) {
    margin-bottom: 20px;
}

:local(.fixedTable) {
    table-layout: fixed;
}
`],sourceRoot:""}]),n.locals={field:"m1bai3Kt45u9j3MtW7hT",fixedTable:"EJT6DlEKjyYuxyouwsaR"};const c=n},yqbobKTV:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.DqBObyDjYFhBwILgUW_Q .panel-body {
    padding: 20px 10px;
}

.DqBObyDjYFhBwILgUW_Q ul {
    padding-left: 1em;
}
`,"",{version:3,sources:["webpack://./src/components/event-definitions/event-definition-form/field-value-providers/TemplateFieldValueProviderPreview.css"],names:[],mappings:"AAAA;IACI,kBAAkB;AACtB;;AAEA;IACI,iBAAiB;AACrB",sourcesContent:[`:local(.templatePreview) .panel-body {
    padding: 20px 10px;
}

:local(.templatePreview) ul {
    padding-left: 1em;
}
`],sourceRoot:""}]),n.locals={templatePreview:"DqBObyDjYFhBwILgUW_Q"};const c=n},FvcXAh9q:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.Rm5RJaCv9xhyX2lY9jI3 {
    margin-top: 25px;
    height: 34px;
}
`,"",{version:3,sources:["webpack://./src/components/event-definitions/event-definition-types/AggregationConditionExpression.css"],names:[],mappings:"AAAA;IACI,gBAAgB;IAChB,YAAY;AAChB",sourcesContent:[`:local(.formControlNoLabel) {
    margin-top: 25px;
    height: 34px;
}
`],sourceRoot:""}]),n.locals={formControlNoLabel:"Rm5RJaCv9xhyX2lY9jI3"};const c=n},"0dxeJt3g":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.wp9nUw71uYu2kck_XycC span:not(:last-child)::after {
    content: ', ';
}
`,"",{version:3,sources:["webpack://./src/components/event-definitions/event-definition-types/FilterAggregationSummary.css"],names:[],mappings:"AAAA;IACI,aAAa;AACjB",sourcesContent:[`:local(.streamList) span:not(:last-child)::after {
    content: ', ';
}
`],sourceRoot:""}]),n.locals={streamList:"wp9nUw71uYu2kck_XycC"};const c=n},ld8xWljG:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.YV9VLhWAF0dOTkZvWqvg .panel-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px 10px;
}

.YV9VLhWAF0dOTkZvWqvg table {
    table-layout: fixed;
    word-wrap: break-word;
}
`,"",{version:3,sources:["webpack://./src/components/event-definitions/event-definition-types/FilterPreview.css"],names:[],mappings:"AAAA;IACI,iBAAiB;IACjB,gBAAgB;IAChB,kBAAkB;AACtB;;AAEA;IACI,mBAAmB;IACnB,qBAAqB;AACzB",sourcesContent:[`:local(.filterPreview) .panel-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px 10px;
}

:local(.filterPreview) table {
    table-layout: fixed;
    word-wrap: break-word;
}
`],sourceRoot:""}]),n.locals={filterPreview:"YV9VLhWAF0dOTkZvWqvg"};const c=n},ykMrd0fI:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.QOxROnWrKzReuEpPEJMw {
    table-layout: fixed;
    overflow-wrap: break-word;
}
`,"",{version:3,sources:["webpack://./src/components/event-notifications/event-notification-types/CommonNotificationSummary.css"],names:[],mappings:"AAAA;IACI,mBAAmB;IACnB,yBAAyB;AAC7B",sourcesContent:[`:local(.fixedTable) {
    table-layout: fixed;
    overflow-wrap: break-word;
}
`],sourceRoot:""}]),n.locals={fixedTable:"QOxROnWrKzReuEpPEJMw"};const c=n},nPNjzYdu:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.bN2Fa5FgSGHUh4zYUYzt {
    font-family: "Roboto Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 1rem; /* theme.fonts.size.body */
    overflow-wrap: break-word;
    white-space: pre-wrap;
}
`,"",{version:3,sources:["webpack://./src/components/event-notifications/event-notification-types/EmailNotificationSummary.css"],names:[],mappings:"AAAA;IACI,6EAA6E;IAC7E,eAAe,EAAE,0BAA0B;IAC3C,yBAAyB;IACzB,qBAAqB;AACzB",sourcesContent:[`:local(.bodyPreview) {
    font-family: "Roboto Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 1rem; /* theme.fonts.size.body */
    overflow-wrap: break-word;
    white-space: pre-wrap;
}
`],sourceRoot:""}]),n.locals={bodyPreview:"bN2Fa5FgSGHUh4zYUYzt"};const c=n},MgIGZ5Gi:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.rKKIeiSYDcRNaNEaL85y {
    margin-bottom: 15px;
    overflow-wrap: break-word;
}
`,"",{version:3,sources:["webpack://./src/components/event-notifications/event-notification-types/LegacyNotificationCommonStyles.css"],names:[],mappings:"AAAA;IACI,mBAAmB;IACnB,yBAAyB;AAC7B",sourcesContent:[`:local(.legacyNotificationAlert) {
    margin-bottom: 15px;
    overflow-wrap: break-word;
}
`],sourceRoot:""}]),n.locals={legacyNotificationAlert:"rKKIeiSYDcRNaNEaL85y"};const c=n},eCBhU9Q5:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`/*
 * Copyright (C) 2020 Graylog, Inc.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the Server Side Public License, version 1,
 * as published by MongoDB, Inc.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * Server Side Public License for more details.
 *
 * You should have received a copy of the Server Side Public License
 * along with this program. If not, see
 * .
 */
.EM8rNPeHI3I13MdYidzw {
    max-width: 500px;
    min-width: 350px;
}

/* styles for table columns */
.oNIxQlLcjvvFY27jyODI {
    width: 15%;
}
.jXZIhUCAUZtfWZKKiLy0 {
    max-width: 50%;
    width: 35%
}
.Ii_DwC6G4wRm7thBYSKE {
    width: 15%;
}
.q54g6XMj1D9X2J48jgrw {
    width: 15%;
}
.wFLgXxYT9cnZwrNRg6DJ {
    width: 15%;
}
.mk2GxDtbjbYu9RWQh_nL {
    min-width: 100px;
}

overviewTable {
    width: 100%;
    table-layout: fixed;
}
`,"",{version:3,sources:["webpack://./src/components/lookup-tables/Overview.css"],names:[],mappings:"AAAA;;;;;;;;;;;;;;;EAeE;AACF;IACI,gBAAgB;IAChB,gBAAgB;AACpB;;AAEA,6BAA6B;AAC7B;IACI,UAAU;AACd;AACA;IACI,cAAc;IACd;AACJ;AACA;IACI,UAAU;AACd;AACA;IACI,UAAU;AACd;AACA;IACI,UAAU;AACd;AACA;IACI,gBAAgB;AACpB;;AAEA;IACI,WAAW;IACX,mBAAmB;AACvB",sourcesContent:[`/*
 * Copyright (C) 2020 Graylog, Inc.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the Server Side Public License, version 1,
 * as published by MongoDB, Inc.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * Server Side Public License for more details.
 *
 * You should have received a copy of the Server Side Public License
 * along with this program. If not, see
 * .
 */
:local(.popoverWide) {
    max-width: 500px;
    min-width: 350px;
}

/* styles for table columns */
:local(.rowTitle) {
    width: 15%;
}
:local(.rowDescription) {
    max-width: 50%;
    width: 35%
}
:local(.rowName) {
    width: 15%;
}
:local(.rowCache) {
    width: 15%;
}
:local(.rowAdapter) {
    width: 15%;
}
:local(.rowActions) {
    min-width: 100px;
}

:local(overviewTable) {
    width: 100%;
    table-layout: fixed;
}
`],sourceRoot:""}]),n.locals={popoverWide:"EM8rNPeHI3I13MdYidzw",rowTitle:"oNIxQlLcjvvFY27jyODI",rowDescription:"jXZIhUCAUZtfWZKKiLy0",rowName:"Ii_DwC6G4wRm7thBYSKE",rowCache:"q54g6XMj1D9X2J48jgrw",rowAdapter:"wFLgXxYT9cnZwrNRg6DJ",rowActions:"mk2GxDtbjbYu9RWQh_nL"};const c=n},OXMg8s84:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`#toast-container .toast {
  display: grid;
  grid-template-columns: 8fr 0.5fr;
  grid-template-rows: repeat(2, 1fr);
  grid-column-gap: 0;
  grid-row-gap: 0;
}

#toast-container .toast-title {
  grid-area: 1 / 1 / 2 / 1;
}

#toast-container .toast-message {
  grid-area: 2 / 2 / 2 / 1;
}

#toast-container button.toast-close-button {
  font-size: 0.889rem; /* theme.fonts.size.small */
  grid-area: 1 / 2 / 3 / 3;
  height: 100%;
  top: 0;
  right: 0;
  font-weight: normal;
}

#toast-container button.toast-close-button:focus,
#toast-container button.toast-close-button:hover {
  color: #fff;
}
`,"",{version:3,sources:["webpack://./src/util/UserNotification.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,gCAAgC;EAChC,kCAAkC;EAClC,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,wBAAwB;AAC1B;;AAEA;EACE,wBAAwB;AAC1B;;AAEA;EACE,mBAAmB,EAAE,2BAA2B;EAChD,wBAAwB;EACxB,YAAY;EACZ,MAAM;EACN,QAAQ;EACR,mBAAmB;AACrB;;AAEA;;EAEE,WAAW;AACb",sourcesContent:[`#toast-container .toast {
  display: grid;
  grid-template-columns: 8fr 0.5fr;
  grid-template-rows: repeat(2, 1fr);
  grid-column-gap: 0;
  grid-row-gap: 0;
}

#toast-container .toast-title {
  grid-area: 1 / 1 / 2 / 1;
}

#toast-container .toast-message {
  grid-area: 2 / 2 / 2 / 1;
}

#toast-container button.toast-close-button {
  font-size: 0.889rem; /* theme.fonts.size.small */
  grid-area: 1 / 2 / 3 / 3;
  height: 100%;
  top: 0;
  right: 0;
  font-weight: normal;
}

#toast-container button.toast-close-button:focus,
#toast-container button.toast-close-button:hover {
  color: #fff;
}
`],sourceRoot:""}]),n.locals={};const c=n},"kK/tJf6e":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.jcr2Blo1owtKhor0NDK4 {
    display: inline;
}
`,"",{version:3,sources:["webpack://./src/views/components/common/EditableTitle.css"],names:[],mappings:"AAAA;IACI,eAAe;AACnB",sourcesContent:[`:local(.inlineForm) {
    display: inline;
}
`],sourceRoot:""}]),n.locals={inlineForm:"jcr2Blo1owtKhor0NDK4"};const c=n},"4Dfti3jc":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.Xs05u6g6T94RXQPWqmgX {
    height: 100%;
    /* The grid prop is a workaround to fix
     * horizontal scrolling for safari */
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
}

.tezUr3fyRnWnYXoSKy4b {
    overflow: auto;
    grid-row: 1;
    grid-column: 1;
}

@media print {
    table.messages {
        font-size: 1rem !important; /* theme.fonts.size.body */
        min-width: 50%;
        padding-left: 0;
    }

    table.messages th {
        font-weight: bold !important;
        font-size: inherit !important;
    }

    table.messages th,
    table.messages td {
        border: 1px #ccc solid !important;
        left: 0;
        padding: 5px;
        position: static;
    }
}
`,"",{version:3,sources:["webpack://./src/views/components/datatable/DataTable.css"],names:[],mappings:"AAAA;IACI,YAAY;IACZ;wCACoC;IACpC,aAAa;IACb,uBAAuB;IACvB,0BAA0B;AAC9B;;AAEA;IACI,cAAc;IACd,WAAW;IACX,cAAc;AAClB;;AAEA;IACI;QACI,0BAA0B,EAAE,0BAA0B;QACtD,cAAc;QACd,eAAe;IACnB;;IAEA;QACI,4BAA4B;QAC5B,6BAA6B;IACjC;;IAEA;;QAEI,iCAAiC;QACjC,OAAO;QACP,YAAY;QACZ,gBAAgB;IACpB;AACJ",sourcesContent:[`:local(.container) {
    height: 100%;
    /* The grid prop is a workaround to fix
     * horizontal scrolling for safari */
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
}

:local(.scrollContainer) {
    overflow: auto;
    grid-row: 1;
    grid-column: 1;
}

@media print {
    table.messages {
        font-size: 1rem !important; /* theme.fonts.size.body */
        min-width: 50%;
        padding-left: 0;
    }

    table.messages th {
        font-weight: bold !important;
        font-size: inherit !important;
    }

    table.messages th,
    table.messages td {
        border: 1px #ccc solid !important;
        left: 0;
        padding: 5px;
        position: static;
    }
}
`],sourceRoot:""}]),n.locals={container:"Xs05u6g6T94RXQPWqmgX",scrollContainer:"tezUr3fyRnWnYXoSKy4b"};const c=n},zUghPtuB:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.QSHpvNKPLbhcL9XmEhhU {
    display: flex;
    justify-content: space-between;
}

.j9AR9KIYOoQokjhQgKvg {
    margin-top: 5px;
    margin-bottom: 5px;
}

.OEtwRH8_D2wSh4zSe35P {
    margin-right: 5px;
    width: 100%;
}

.Ptn3S3n2DhOJZlpLxQ8U {
    font-size: 1rem; /* theme.fonts.size.body */
    padding-top: 0px;
    padding-right: 0px;
    float: right;
}

.mWIeXfwAHVUqyO9KpNv8 {
    font-size: 1rem; /* theme.fonts.size.body */
}

.i93VpIsNwxNSYHhnrhdm {
    display: inline-block;
    overflow: visible;
    width: 100%;
}

.Mt_DKChL9e_UySBfolGR {
    margin-top: 2em;
}
`,"",{version:3,sources:["webpack://./src/views/components/messagelist/decorators/decoratorStyles.css"],names:[],mappings:"AAAA;IACI,aAAa;IACb,8BAA8B;AAClC;;AAEA;IACI,eAAe;IACf,kBAAkB;AACtB;;AAEA;IACI,iBAAiB;IACjB,WAAW;AACf;;AAEA;IACI,eAAe,EAAE,0BAA0B;IAC3C,gBAAgB;IAChB,kBAAkB;IAClB,YAAY;AAChB;;AAEA;IACI,eAAe,EAAE,0BAA0B;AAC/C;;AAEA;IACI,qBAAqB;IACrB,iBAAiB;IACjB,WAAW;AACf;;AAEA;IACI,eAAe;AACnB",sourcesContent:[`:local(.decoratorBox) {
    display: flex;
    justify-content: space-between;
}

:local(.addDecoratorButtonContainer) {
    margin-top: 5px;
    margin-bottom: 5px;
}

:local(.addDecoratorSelect) {
    margin-right: 5px;
    width: 100%;
}

:local(.helpLink) {
    font-size: 1rem; /* theme.fonts.size.body */
    padding-top: 0px;
    padding-right: 0px;
    float: right;
}

:local(.helpPopover) {
    font-size: 1rem; /* theme.fonts.size.body */
}

:local(.decoratorListContainer) {
    display: inline-block;
    overflow: visible;
    width: 100%;
}

:local(.noDecoratorsAlert) {
    margin-top: 2em;
}
`],sourceRoot:""}]),n.locals={decoratorBox:"QSHpvNKPLbhcL9XmEhhU",addDecoratorButtonContainer:"j9AR9KIYOoQokjhQgKvg",addDecoratorSelect:"OEtwRH8_D2wSh4zSe35P",helpLink:"Ptn3S3n2DhOJZlpLxQ8U",helpPopover:"mWIeXfwAHVUqyO9KpNv8",decoratorListContainer:"i93VpIsNwxNSYHhnrhdm",noDecoratorsAlert:"Mt_DKChL9e_UySBfolGR"};const c=n},V7bsrEHK:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.FExXmIJ_52cj0vrHyaEp {
    margin: 5px;
}`,"",{version:3,sources:["webpack://./src/views/components/searchbar/saved-search/SavedSearchForm.css"],names:[],mappings:"AAAA;IACI,WAAW;AACf",sourcesContent:[`:local(.button) {
    margin: 5px;
}`],sourceRoot:""}]),n.locals={button:"FExXmIJ_52cj0vrHyaEp"};const c=n},d39qUqyh:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.FNITmrI44QcfwOlSnZnW {
    padding: 0;
    overflow-y: auto;
}

.uWCkwTOVkwo9YrCjUynr {
    font-size: 12px;
    display: table-row;
    white-space: nowrap;
}

.Zy3GorsX2QMvX8NgdDwv {
    display: flex;
}

.NIPxqjCGQchbRQbyrPIR {
    flex-grow: 1;
    margin-right: 5px;
}`,"",{version:3,sources:["webpack://./src/views/components/sidebar/fields/FieldTypeIcon.css"],names:[],mappings:"AAAA;IACI,UAAU;IACV,gBAAgB;AACpB;;AAEA;IACI,eAAe;IACf,kBAAkB;IAClB,mBAAmB;AACvB;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,YAAY;IACZ,iBAAiB;AACrB",sourcesContent:[`:local(.fieldList) {
    padding: 0;
    overflow-y: auto;
}

:local(.fieldListItem) {
    font-size: 12px;
    display: table-row;
    white-space: nowrap;
}

:local(.filterContainer) {
    display: flex;
}

:local(.filterInputContainer) {
    flex-grow: 1;
    margin-right: 5px;
}`],sourceRoot:""}]),n.locals={fieldList:"FNITmrI44QcfwOlSnZnW",fieldListItem:"uWCkwTOVkwo9YrCjUynr",filterContainer:"Zy3GorsX2QMvX8NgdDwv",filterInputContainer:"NIPxqjCGQchbRQbyrPIR"};const c=n},"H/VBAZHe":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.qWBqb_23sgqkD946642Z {
    position: absolute;
    z-index: 999; /* So it displays below bootstrap dropdowns */
}

.VEeyO9k8vNGGhxOuqVkQ .leaflet-control-container {
    display: none;
}

.leaflet-top, .leaflet-bottom {
    z-index: 999; /* So it displays below bootstrap dropdowns */
}

@media print {
    .KoTenzOWhTf1f7jkioVR {
        margin: 0 auto;
        page-break-inside: avoid;
    }

    /* Hide zoom controls */
    .leaflet-control-container {
        display: none;
    }
}`,"",{version:3,sources:["webpack://./src/views/components/visualizations/worldmap/MapVisualization.css"],names:[],mappings:"AAAA;IACI,kBAAkB;IAClB,YAAY,EAAE,6CAA6C;AAC/D;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,YAAY,EAAE,6CAA6C;AAC/D;;AAEA;IACI;QACI,cAAc;QACd,wBAAwB;IAC5B;;IAEA,uBAAuB;IACvB;QACI,aAAa;IACjB;AACJ",sourcesContent:[`:local(.overlay) {
    position: absolute;
    z-index: 999; /* So it displays below bootstrap dropdowns */
}

:local(.mapLocked) .leaflet-control-container {
    display: none;
}

.leaflet-top, .leaflet-bottom {
    z-index: 999; /* So it displays below bootstrap dropdowns */
}

@media print {
    :local(.map) {
        margin: 0 auto;
        page-break-inside: avoid;
    }

    /* Hide zoom controls */
    .leaflet-control-container {
        display: none;
    }
}`],sourceRoot:""}]),n.locals={overlay:"qWBqb_23sgqkD946642Z",mapLocked:"VEeyO9k8vNGGhxOuqVkQ",map:"KoTenzOWhTf1f7jkioVR"};const c=n},BcnLA9qD:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`.AGNNVtf0vXX5QH3GraEY {
    margin-right: 15px;
    margin: 3px 15px 0 0;
}
`,"",{version:3,sources:["webpack://./src/views/components/widgets/MessageWidgets.css"],names:[],mappings:"AAAA;IACI,kBAAkB;IAClB,oBAAoB;AACxB",sourcesContent:[`:local(.iconMargin) {
    margin-right: 15px;
    margin: 3px 15px 0 0;
}
`],sourceRoot:""}]),n.locals={iconMargin:"AGNNVtf0vXX5QH3GraEY"};const c=n},"xTTaAS+O":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`/* Restore bootstrap heading margins because our stylesheet is :shit: */
.Qgqa5YAOjl_LIS9aGdk3 h1, .Qgqa5YAOjl_LIS9aGdk3 h2, .Qgqa5YAOjl_LIS9aGdk3 h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.Qgqa5YAOjl_LIS9aGdk3 h4, .Qgqa5YAOjl_LIS9aGdk3 h5, .Qgqa5YAOjl_LIS9aGdk3 h6 {
    margin-top: 10px;
    margin-bottom: 10px;
}
`,"",{version:3,sources:["webpack://./src/views/pages/StyleFixups.css"],names:[],mappings:"AAAA,uEAAuE;AACvE;IACI,gBAAgB;IAChB,mBAAmB;AACvB;;AAEA;IACI,gBAAgB;IAChB,mBAAmB;AACvB",sourcesContent:[`/* Restore bootstrap heading margins because our stylesheet is :shit: */
:local(.bootstrapHeading) h1, :local(.bootstrapHeading) h2, :local(.bootstrapHeading) h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

:local(.bootstrapHeading) h4, :local(.bootstrapHeading) h5, :local(.bootstrapHeading) h6 {
    margin-top: 10px;
    margin-bottom: 10px;
}
`],sourceRoot:""}]),n.locals={bootstrapHeading:"Qgqa5YAOjl_LIS9aGdk3"};const c=n},lM0K4xME:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("pmX897Fv"),r=e.n(t),s=e("DjJvgDaP"),o=e.n(s),n=o()(r());n.push([x.id,`div.plotly-notifier {
    visibility: hidden;
}

.xK5gTnz6x6uLtuCzdS2T .popover-content {
    padding: 0;
}
`,"",{version:3,sources:["webpack://./src/views/components/visualizations/GenericPlot.lazy.css"],names:[],mappings:"AAAA;IACI,kBAAkB;AACtB;;AAEA;IACI,UAAU;AACd",sourcesContent:[`div.plotly-notifier {
    visibility: hidden;
}

:local(.customPopover) .popover-content {
    padding: 0;
}
`],sourceRoot:""}]),n.locals={customPopover:"xK5gTnz6x6uLtuCzdS2T"};const c=n},"62FDaRYn":(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("JnTtTRmZ"),r=e.n(t),s=e("IA3Ku5lS");const n=(0,s.rN)("Errors",()=>r().createActions(["report"]))},"CXRfb/v3":(x,y,e)=>{"use strict";e.d(y,{A:()=>h});var t=e("Z7aTuO5B"),r=e("hLK4KFKM"),s=e("VPaD/Np4"),o=e("0hhBr0/b"),n=e("VYzIwY9T");const g=(A,C,_)=>{const P=Object.fromEntries(A.map(I=>[I.key,I.reducer]));return(0,n.U1)({reducer:P,preloadedState:C,middleware:I=>I({serializableCheck:!1,immutableCheck:!1,thunk:{extraArgument:{searchExecutors:_}}})})};var d=e("Qv8wg03E");const p=()=>(0,t.useContext)(d.A),E=(A,C)=>{var _;return(0,t.useMemo)(()=>{var P,I,M;const O=(I=(P=C==null?void 0:C.search)==null?void 0:P.queries)!=null?I:s.Set();return A&&O.find(U=>U.id===A)!==void 0?A:(M=O.first())==null?void 0:M.id},[A,(_=C==null?void 0:C.search)==null?void 0:_.queries])},l=(A,C,_,P,I,M)=>(0,t.useMemo)(()=>({view:{view:C,isDirty:!1,isNew:_,activeQuery:P},searchExecution:{widgetsToSearch:void 0,executionState:I,isLoading:!1,result:M},...A?{undoRedo:A}:{}}),[I,_,C]),m=({initialQuery:A,children:C,isNew:_,view:P,executionState:I,undoRedoState:M,result:O})=>{const U=(0,o.A)("views.reducers"),W=E(A,P),K=l(M,P,_,W,I,O),j=p(),G=(0,t.useMemo)(()=>g(U,K,j),[K,U,j]);return t.createElement(r.Provider,{store:G},C)};m.defaultProps={undoRedoState:void 0,result:void 0};const h=m},kwpLVeht:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("L3UIULT/"),o=e("u2QUEJU3");const n=(0,r.default)(s.Alert)(({$bsStyle:f,theme:p})=>(0,r.css)`
  margin: ${p.spacings.md} 0;
  border: 1px solid ${p.colors.variant.lighter[f]};

  .mantine-Alert-message {
    color: ${p.colors.global.textDefault};
    font-size: ${p.fonts.size.body};
  }

  .mantine-Alert-title {
    font-size: ${p.fonts.size.body};
    color: ${p.colors.global.textDefault};
  }

  .mantine-Alert-closeButton {
    color: ${p.colors.global.textDefault};
  },
`),c=f=>{switch(f){case"warning":case"danger":return"error";case"success":return"check_circle";default:return"info"}},g=({children:f,bsStyle:p,title:E,style:l,className:m,onDismiss:h,noIcon:A})=>{const C=typeof h=="function",_=c(p);return t.createElement(n,{$bsStyle:p,className:m,color:p,style:l,onClose:h,title:E,icon:A?null:t.createElement(o.A,{name:_}),closeButtonLabel:C&&"Close alert",withCloseButton:C},f)};g.defaultProps={className:void 0,onDismiss:void 0,style:void 0,title:void 0,bsStyle:"default",noIcon:!1};const d=g},GwjzBeBD:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("L3UIULT/"),s=e("J6y4/h8P");const o=(0,s.default)(r.Badge)(({theme:g,color:d})=>(0,s.css)`
  color: ${g.colors.contrast[d]};
  text-transform: none;

  .mantine-Badge-label {
    font-size: ${g.fonts.size.small};
  }
`),n=t.forwardRef(({bsStyle:g,className:d,children:f,"data-testid":p,onClick:E,title:l},m)=>t.createElement(o,{color:g,className:d,title:l,"data-testid":p,ref:m,variant:"filled",onClick:E},f));n.defaultProps={bsStyle:"default",className:void 0,"data-testid":void 0,onClick:void 0,title:void 0};const c=n},PVMUg5WH:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("rp7UD7rK"),n=e("W1tzA0ec"),c=e("gqVHlIxA");const g=({showModal:f,title:p,children:E,cancelButtonDisabled:l,confirmButtonDisabled:m,confirmButtonText:h,onCancel:A,onConfirm:C,..._})=>t.createElement(c.A,{showModal:f,onHide:A,role:"alertdialog",..._},t.createElement(n.A.Header,{closeButton:!0},t.createElement(n.A.Title,null,p)),t.createElement(n.A.Body,null,E),t.createElement(n.A.Footer,null,t.createElement(o.A,{disabledCancel:l,disabledSubmit:m,onCancel:A,onSubmit:C,submitButtonText:h,submitButtonType:"button"})));g.propTypes={showModal:s().bool.isRequired,title:s().oneOfType([s().string,s().element]).isRequired,confirmButtonText:s().string,cancelButtonDisabled:s().bool,confirmButtonDisabled:s().bool,onCancel:s().func.isRequired,onConfirm:s().func.isRequired,children:s().oneOfType([s().string,s().element]).isRequired},g.defaultProps={confirmButtonText:"Confirm",cancelButtonDisabled:!1,confirmButtonDisabled:!1};const d=g},"gTexEe+8":(x,y,e)=>{"use strict";e.d(y,{A:()=>l});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("kqAR+wt5"),n=e.n(o),c=e("X6P4SH4J"),g=e.n(c),d=e("rp7UD7rK"),f=e("W1tzA0ec"),p=e("gqVHlIxA");const E=({backdrop:m,submitButtonDisabled:h,formProps:A,bsSize:C,show:_,submitButtonText:P,onSubmitForm:I,onCancel:M,title:O,children:U,modalTitle:W,...K})=>{const j=(0,s.useRef)(null),G=ne=>{const z=j.current,le=n()(z);if(typeof z.checkValidity=="function"&&!z.checkValidity()||typeof le.checkValidity=="function"&&!le.checkValidity()){ne.preventDefault();return}typeof I=="function"&&(ne.preventDefault(),I(ne))},k=s.createElement("div",{className:"container-fluid"},U),Q=(0,s.useMemo)(()=>g()(O)?O:W,[W,O]);return s.createElement(p.A,{bsSize:C,showModal:_,backdrop:m,onHide:M,title:Q,...K},s.createElement(f.A.Header,{closeButton:!0},s.createElement(f.A.Title,null,O)),s.createElement("form",{ref:j,onSubmit:G,...A,"data-testid":"modal-form"},s.createElement(f.A.Body,null,k),s.createElement(f.A.Footer,null,s.createElement(d.A,{disabledSubmit:h,onCancel:M,submitButtonText:P}))))};E.propTypes={backdrop:r().oneOf([!0,!1,"static"]),bsSize:r().oneOf(["lg","large","sm","small"]),title:r().oneOfType([r().string,r().node]).isRequired,children:r().oneOfType([r().arrayOf(r().element),r().element]).isRequired,onSubmitForm:r().func,onCancel:r().func.isRequired,formProps:r().object,submitButtonText:r().oneOfType([r().string,r().node]),submitButtonDisabled:r().bool,show:r().bool.isRequired},E.defaultProps={backdrop:void 0,formProps:{},submitButtonText:"Submit",submitButtonDisabled:!1,onSubmitForm:void 0,bsSize:void 0,modalTitle:void 0};const l=E},gqVHlIxA:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("W1tzA0ec");const n=({showModal:g,children:d,onHide:f,bsSize:p,backdrop:E,role:l,...m})=>s.createElement(o.A,{show:g,onHide:f,bsSize:p,backdrop:E,role:l,...m},d);n.propTypes={showModal:r().bool.isRequired,children:r().oneOfType([r().arrayOf(r().element),r().element]).isRequired,onHide:r().func.isRequired,bsSize:r().oneOf(["large","lg","small","sm"]),backdrop:r().oneOf(["static",!0,!1]),role:r().string},n.defaultProps={bsSize:void 0,backdrop:"static",role:"dialog",title:void 0};const c=n},"+Ej1FZHV":(x,y,e)=>{"use strict";e.d(y,{A:()=>l});var t=e("Z7aTuO5B"),r=e("L3UIULT/"),s=e("J6y4/h8P");const o=m=>{switch(m){case"xs":case"xsmall":return"xs";case"sm":case"small":return"sm";case"lg":case"large":return"lg";default:return"md"}},n=m=>m==="default"?"gray":m,c=m=>{switch(m){case"link":return{variant:"subtle"};default:return{}}},g=m=>{switch(m){case"xs":case"xsmall":return(0,s.css)`
        height: 21.4141px;
        padding: 1px 5px;
      `;case"sm":case"small":return(0,s.css)`
        height: 29.4141px;
        padding: 5px 10px;
      `;case"lg":case"large":return(0,s.css)`
        height: 43.1641px;
        padding: 10px 16px;
      `;case"medium":default:return(0,s.css)`
        height: 33.84px;
        padding: 6px 12px;
      `}},d=(m,h)=>{if(h==="link")return"";const A=m.disabled[h];return(0,s.css)`
    &:disabled,
    &[data-disabled] {
      pointer-events: all;
      color: ${A.color};
      background-color: ${A.background};
      opacity: 0.45;

      &:hover {
        color: ${A.color};
      }
    }
  `},f=(m,h)=>{switch(h){case"danger":case"info":case"success":case"primary":case"warning":return(0,s.css)`
        color: ${m.global.textDefault};

        &:hover {
        color: ${m.global.textDefault};
        }

        &:focus {
        color: ${m.global.textDefault};
        }
    `;default:return""}},p=(0,s.default)(r.Button)(({theme:m,$bsStyle:h,$bsSize:A,$active:C})=>{const _=h==="link"?m.colors.global.link:m.colors.button[h].color;return(0,s.css)`
    color: ${_};
    font-weight: 400;
    overflow: visible;

    ${d(m.colors,h)}
    ${g(A)}

    &:hover {
      color: ${_};
      text-decoration: none;
    }

    &:focus {
      color: ${_};
      text-decoration: none;
    }

    ${C&&f(m.colors,h)}

    .mantine-Button-label {
      gap: 0.25em;
      overflow: visible;
    }

    .mantine-Button-loader {
      visibility: hidden;
    }
  `}),E=t.forwardRef(({"aria-label":m,bsStyle:h,bsSize:A,className:C,"data-testid":_,id:P,onClick:I,disabled:M,href:O,title:U,form:W,target:K,type:j,rel:G,role:k,name:Q,tabIndex:ne,children:z,active:le},V)=>{const me=(0,s.useTheme)(),Pe=n(h),Ve=Pe==="link"?"transparent":me.colors.button[Pe].background,at={id:P,"aria-label":m,className:C,...c(Pe),$active:le,$bsStyle:Pe,$bsSize:A,variant:le?"outline":"filled",color:Ve,"data-testid":_,disabled:M,role:k,size:o(A),tabIndex:ne,title:U,type:j};return O?t.createElement(p,{component:"a",href:O,target:K,rel:G,onClick:I,...at},z):t.createElement(p,{ref:V,form:W,onClick:I,name:Q,...at},z)});E.defaultProps={active:void 0,"aria-label":void 0,bsStyle:"default",bsSize:void 0,className:void 0,"data-testid":void 0,disabled:!1,form:void 0,href:void 0,id:void 0,name:void 0,onClick:void 0,rel:void 0,role:void 0,tabIndex:void 0,target:void 0,title:void 0,type:void 0};const l=E},dekSN6Zc:(x,y,e)=>{"use strict";e.d(y,{A:()=>r});var t=e("L3UIULT/");const r=t.Button.Group},CrIFpfDF:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("dekSN6Zc");const o=(0,r.default)(s.A)`
  gap: 0.25em;
`,c=g=>t.createElement(o,{...g})},aas3RHN2:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("aKyEWaw1");const o=({onChange:n,...c})=>t.createElement(r.Checkbox,{onChange:n,...c})},wIOoweNb:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("J6y4/h8P"),r=e("aKyEWaw1");const o=(0,t.default)(r.ControlLabel)(({theme:n})=>(0,t.css)`
  color: ${n.colors.global.textDefault};
  font-weight: bold;
  margin-bottom: 5px;
  display: inline-block;
`)},P98ee3gW:(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("u2QUEJU3"),o=e("oNtoZaGG"),n=e("+Ej1FZHV");const c=(0,r.default)(s.A)`
  width: 10px;
  height: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
`,g=(p,E)=>`${E?"top":"bottom"}${p?"-end":""}`,d=({buttonTitle:p,children:E,closeOnItemClick:l,dropup:m,title:h,onMouseDown:A,onToggle:C,pullRight:_,noCaret:P,keepMounted:I,...M})=>t.createElement(o.A,{position:g(_,m),onChange:C,keepMounted:I,closeOnItemClick:l},t.createElement(o.A.Target,null,t.createElement(n.A,{onClick:A,"aria-label":p,...M,title:p},h,P?null:t.createElement(t.Fragment,null," ",t.createElement(c,{name:"arrow_drop_down"})))),t.createElement(o.A.Dropdown,null,E));d.defaultProps={closeOnItemClick:!0,buttonTitle:void 0,dropup:void 0,keepMounted:void 0,noCaret:void 0,onMouseDown:void 0,onToggle:void 0,pullRight:void 0,title:void 0};const f=d},"zlGg/X1Y":(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("aKyEWaw1"),r=e("J6y4/h8P"),s=e("CCNXj2ra");const o=(0,r.default)(t.FormControl)(({theme:c})=>(0,r.css)`
  &.form-control {
    border-radius: ${s.Jk};
  }

  &.form-control:not([type='range']) {
    color: ${c.colors.input.color};
    background-color: ${c.colors.input.background};
    border-color: ${c.colors.input.border};

    &::placeholder {
      color: ${c.colors.input.placeholder};
    }

    &:focus {
      border-color: ${c.colors.input.borderFocus};
      box-shadow: ${c.colors.input.boxShadow};
    }

    &[disabled],
    &[readonly],
    fieldset[disabled] & {
      background-color: ${c.colors.input.backgroundDisabled};
      color: ${c.colors.input.colorDisabled};
    }

    ~ .form-control-feedback.glyphicon {
      display: none;
    }
  }
`);o.Static=t.FormControl.Static,o.Feedback=t.FormControl.Feedback;const n=o},nV9jqFLy:(x,y,e)=>{"use strict";e.d(y,{A:()=>m});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("aKyEWaw1"),n=e("J6y4/h8P"),c=e("ww+BtWnX"),g=e.n(c),d=e("hhdCSTZj"),f=e("zlGg/X1Y"),p=e("f5/t4s9T");const E=(0,n.default)(o.FormGroup)(({theme:h,validationState:A})=>{const C=A==="error"?"danger":A;if(!C)return;const _=h.colors.variant.dark[C],P=h.colors.variant.light[C],I=h.colors.variant.lightest[C];return(0,n.css)`
    &.has-${A} {
      .help-block,
      .control-label,
      .radio,
      .checkbox,
      .radio-inline,
      .checkbox-inline,
      &.radio label,
      &.checkbox label,
      &.radio-inline label,
      &.checkbox-inline label {
        color: ${_};
      }

      ${f.A}, .${d.Z} {
        border-color: ${P};

        &:focus {
          border-color: ${g()(P).darken(.1)};
          box-shadow: inset 0 1px 1px rgb(0 0 0 / 7.5%), 0 0 6px ${g()(P).brighten(.2)};
        }
      }

      ${p.A} {
        color: ${_};
        background-color: ${I};
        border-color: ${P};
      }

      .form-control-feedback {
        color: ${_};
      }
    }
`}),l=(0,t.memo)(({children:h,validationState:A,...C})=>t.createElement(E,{validationState:A,...C},h));l.propTypes={children:s().node.isRequired,validationState:s().oneOf([null,"error","success","warning"])},l.defaultProps={validationState:null};const m=l},yDuYCNwc:(x,y,e)=>{"use strict";e.d(y,{A:()=>C});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("Kz+u8q89"),n=e("aas3RHN2"),c=e("0f9+EyYg"),g=e("wIOoweNb"),d=e("zlGg/X1Y"),f=e("nV9jqFLy"),p=e("f5/t4s9T"),E=e("8tm/+anU"),l=Object.defineProperty,m=(_,P,I)=>P in _?l(_,P,{enumerable:!0,configurable:!0,writable:!0,value:I}):_[P]=I,h=(_,P,I)=>(m(_,typeof P!="symbol"?P+"":P,I),I);class A extends s.Component{constructor(){super(...arguments),h(this,"getInputDOMNode",()=>this.input),h(this,"getValue",()=>{const{type:P}=this.props;if(!P)throw new Error("Cannot use getValue without specifying input type.");switch(P){case"checkbox":case"radio":return this.getInputDOMNode().checked;default:return this.getInputDOMNode().value}}),h(this,"getChecked",()=>this.getInputDOMNode().checked),h(this,"_renderFormControl",(P,I,M)=>s.createElement(d.A,{inputRef:O=>{this.input=O},componentClass:P,...I},M)),h(this,"_renderFormGroup",P=>{const{id:I,bsStyle:M,formGroupClassName:O,wrapperClassName:U,inputDescClassName:W,label:K,labelClassName:j,error:G,help:k,buttonAfter:Q,addonAfter:ne}=this.props;let z;return ne||Q?z=s.createElement(p.h,null,P,Q&&s.createElement(p.h.Button,null,Q),ne&&s.createElement(p.h.Addon,null,ne)):z=P,s.createElement(f.A,{controlId:I,validationState:G?"error":M,bsClass:O},K&&s.createElement(g.A,{className:j},K),s.createElement(E.A,{className:U},z,s.createElement(o.A,{error:G,help:k,className:W})))}),h(this,"_renderCheckboxGroup",P=>{const{id:I,buttonAfter:M,bsStyle:O,formGroupClassName:U,inputDescClassName:W,wrapperClassName:K,label:j,error:G,help:k}=this.props;return s.createElement(f.A,{controlId:I,validationState:G?"error":O,bsClass:U},s.createElement(E.A,{className:K},M?s.createElement(p.h,null,s.createElement(n.A,{inputRef:Q=>{this.input=Q},...P},j),M&&s.createElement(p.h.Button,null,M)):s.createElement(n.A,{inputRef:Q=>{this.input=Q},...P},j),s.createElement(o.A,{error:G,help:k,className:W})))}),h(this,"_renderRadioGroup",P=>{const{id:I,bsStyle:M,formGroupClassName:O,inputDescClassName:U,wrapperClassName:W,label:K,error:j,help:G}=this.props;return s.createElement(f.A,{controlId:I,validationState:j?"error":M,bsClass:O},s.createElement(E.A,{className:W},s.createElement(c.sx,{inputRef:k=>{this.input=k},...P},K),s.createElement(o.A,{error:j,help:G,className:U})))})}render(){const{id:P,type:I,children:M,label:O,name:U,bsStyle:W,formGroupClassName:K,wrapperClassName:j,labelClassName:G,inputDescClassName:k,error:Q,help:ne,addonAfter:z,buttonAfter:le,...V}=this.props;if(V.type=I,V.label=O,V.name=U||P,!I)return this._renderFormGroup(M);switch(I){case"text":case"password":case"email":case"number":case"file":case"tel":return this._renderFormGroup(this._renderFormControl("input",V));case"textarea":return this._renderFormGroup(this._renderFormControl("textarea",V));case"select":return this._renderFormGroup(this._renderFormControl("select",V,M));case"checkbox":return this._renderCheckboxGroup(V);case"radio":return this._renderRadioGroup(V);default:console.warn(`Unsupported input type ${I}`)}return null}}h(A,"propTypes",{id:r().string.isRequired,type:r().string,name:r().string,label:r().oneOfType([r().element,r().string]),labelClassName:r().string,bsStyle:r().oneOf(["success","warning","error"]),formGroupClassName:r().string,inputDescClassName:r().string,value:r().oneOfType([r().string,r().number]),placeholder:r().string,error:r().oneOfType([r().element,r().string]),help:r().oneOfType([r().element,r().string]),wrapperClassName:r().string,addonAfter:r().oneOfType([r().element,r().string]),buttonAfter:r().oneOfType([r().element,r().string]),children:r().oneOfType([r().array,r().element])}),h(A,"defaultProps",{type:void 0,label:"",labelClassName:void 0,name:void 0,formGroupClassName:void 0,inputDescClassName:void 0,bsStyle:null,value:void 0,placeholder:"",error:void 0,help:void 0,wrapperClassName:void 0,addonAfter:null,buttonAfter:null,children:null});const C=A},"f5/t4s9T":(x,y,e)=>{"use strict";e.d(y,{A:()=>f,h:()=>m});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("aKyEWaw1"),n=e("J6y4/h8P"),c=e("vAwPiEFV"),g=e.n(c);const d=({className:h,...A})=>t.createElement(o.InputGroup.Addon,{bsClass:h,...A}),f=(0,n.default)(d)(({theme:h})=>(0,n.css)`
  color: ${h.colors.input.color};
  background-color: ${h.colors.input.background};
  border-color: ${h.colors.input.border};
`),p=({bsClass:h,className:A,...C})=>t.createElement(f,{className:g()(h,A),...C}),E=({bsClass:h,className:A,...C})=>t.createElement(o.InputGroup.Button,{bsClass:g()(h,A),...C}),l=({bsClass:h,className:A,...C})=>t.createElement(o.InputGroup,{bsClass:g()(h,A),...C});l.Addon=p,l.Button=E,d.propTypes={className:s().string},d.defaultProps={className:void 0},l.propTypes={bsClass:s().string,className:s().string,children:s().node.isRequired},l.defaultProps={bsClass:"input-group",className:void 0},p.propTypes={bsClass:s().string,className:s().string,children:s().node.isRequired},p.defaultProps={bsClass:"input-group-addon",className:void 0},E.propTypes={bsClass:s().string,className:s().string,children:s().node.isRequired},E.defaultProps={bsClass:"input-group-btn",className:void 0};const m=l},"8tm/+anU":(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B");const o=({children:c,className:g})=>g?s.createElement("div",{className:g},c):s.createElement("span",null,c);o.propTypes={className:r().string,children:r().node.isRequired},o.defaultProps={className:void 0};const n=o},oNtoZaGG:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("L3UIULT/"),s=e("J6y4/h8P");const o=({children:f,closeOnItemClick:p,keepMounted:E,offset:l,onChange:m,onClose:h,opened:A,portalProps:C,position:_,shadow:P,width:I,withinPortal:M,zIndex:O})=>t.createElement(r.Menu,{closeOnItemClick:p,onClose:h,shadow:P,opened:A,onChange:m,portalProps:C,width:I,position:_,withinPortal:M,keepMounted:E,offset:l,zIndex:O},f),n=(0,s.default)(r.Menu.Item)(({theme:f})=>(0,s.css)`
  color: ${f.colors.global.textDefault};
  font-size: ${f.fonts.size.body};
  white-space: nowrap;
  
  &[data-hovered], &:focus {
    text-decoration: none;
    color: inherit;
    background-color: ${f.utils.colorLevel(f.colors.global.contentBackground,10)}
  }
`),c=(0,s.default)(r.Menu.Divider)(({theme:f})=>(0,s.css)`
  border-color: ${f.colors.variant.lighter.default};
`),g=(0,s.default)(r.Menu.Label)(({theme:f})=>(0,s.css)`
  font-size: ${f.fonts.size.navigation};
`);o.Target=r.Menu.Target,o.Dropdown=(0,s.default)(r.Menu.Dropdown)(({theme:f})=>(0,s.css)`
  && {
    background-color: ${f.colors.global.contentBackground};
    border: 1px solid ${f.colors.variant.lighter.default};
  }
`),o.Item=n,o.Divider=c,o.Label=g,o.defaultProps={closeOnItemClick:!0,keepMounted:void 0,offset:void 0,onChange:void 0,onClose:void 0,opened:void 0,portalProps:void 0,position:void 0,shadow:void 0,width:void 0,withinPortal:!1,zIndex:void 0};const d=o},cB7h3AEX:(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("1jSicls3"),o=e("u2QUEJU3"),n=e("oNtoZaGG");const c=(0,r.default)(n.A.Item)(({$variant:p,theme:E})=>(0,r.css)`
  ${p?`color: ${E.colors.variant.danger};`:""}
`),g=r.default.div`
  display: inline-flex;
  min-width: 20px;
  margin-right: 5px;
  justify-content: center;
  align-items: center;
`,d=({children:p,className:E,disabled:l,divider:m,eventKey:h,header:A,href:C,icon:_,id:P,onClick:I,onSelect:M,rel:O,target:U,title:W,"data-tab-id":K,component:j,variant:G,closeMenuOnClick:k})=>{const Q=I!=null?I:M,ne=(0,t.useCallback)(()=>Q==null?void 0:Q(h),[Q,h]);if(m)return t.createElement(n.A.Divider,{role:"separator",className:E,id:P});if(A)return t.createElement(n.A.Label,{role:"heading",className:E,id:P},p);const z={$variant:G,className:E,"data-tab-id":K,disabled:l,icon:_?t.createElement(g,null,t.createElement(o.A,{name:_})):null,id:P,onClick:ne,title:W,closeMenuOnClick:k};return C?t.createElement(c,{component:s.N_,to:C,rel:O,target:U,...z},p):t.createElement(c,{component:j,...z},p)};d.defaultProps={className:void 0,closeMenuOnClick:void 0,component:void 0,"data-tab-id":void 0,disabled:!1,divider:!1,eventKey:void 0,header:!1,href:void 0,icon:void 0,id:void 0,onClick:void 0,onSelect:void 0,rel:void 0,target:void 0,title:void 0,variant:void 0};const f=d},W1tzA0ec:(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("aKyEWaw1"),r=e("J6y4/h8P");const s=(0,r.css)`
  margin-top: 55px;

  .modal-content {
    background-color: ${({theme:p})=>p.colors.global.contentBackground};
    border-color: ${({theme:p})=>p.colors.variant.light.default};
    height: 100%;
  }
`,o=(0,r.css)`
  border-bottom-color: ${({theme:p})=>p.colors.variant.light.default};

  button.close {
    color: currentColor;
  }
`,n=(0,r.css)`
  font-size: ${({theme:p})=>p.fonts.size.h3};
`,c=(0,r.css)`
  border-top-color: ${({theme:p})=>p.colors.variant.light.default};
`,g=(0,r.css)`
  .form-group {
    margin-bottom: 5px;
  }
`,d=(0,r.default)(t.Modal)`
  .modal-backdrop {
    height: 100000%; /* yes, really. this fixes the backdrop being cut off when the page is scrolled. */
    z-index: 1030;
  }

  form {
    margin-bottom: 0;
  }

  .modal-dialog {
    ${s}
  }

  .modal-header {
    ${o}
  }

  .modal-footer {
    ${c}
  }

  .modal-title {
    ${n}
  }

  .modal-body {
    ${g}
  }
`;d.Dialog=(0,r.default)(t.Modal.Dialog)`
  ${s}
`,d.Header=(0,r.default)(t.Modal.Header)`
  ${o}
`,d.Title=(0,r.default)(t.Modal.Title)`
  ${n}
`,d.Body=(0,r.default)(t.Modal.Body)`
  ${g}
`,d.Footer=(0,r.default)(t.Modal.Footer)`
  ${c}
`;const f=d},S9hCvsKB:(x,y,e)=>{"use strict";e.d(y,{A:()=>_});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("aKyEWaw1"),c=e("RCNj0OY4");const g="Graylog Deprecation Notice:",f=P=>c.A.gl2DevMode()&&console.warn(g,P),p=(0,o.default)(n.Panel.Heading)(({theme:P})=>(0,o.css)`
  .panel-title {
    > a {
      color: ${P.colors.global.textDefault};
      display: block;
    }
  }
`),E=(0,o.default)(n.Panel.Footer)(({theme:P})=>(0,o.css)`
  background-color: ${P.colors.gray[90]};
  border-top-color: ${P.colors.gray[80]};
`),l=(0,o.css)(({bsStyle:P="default",theme:I})=>{const M=I.colors.variant.lighter[P],O=I.colors.variant.dark[P];return(0,o.css)`
    border-color: ${O};

    > ${p} {
      color: ${I.utils.readableColor(M)};
      background-color: ${M};
      border-color: ${O};

      + .panel-collapse > .panel-body {
        border-top-color: ${O};
      }

      .badge {
        color: ${M};
        background-color: ${I.colors.variant[P]};
      }
    }

    > ${E} {
      + .panel-collapse > .panel-body {
        border-bottom-color: ${O};
      }
    }
`}),m=(0,o.default)(n.Panel)(({theme:P})=>(0,o.css)`
  background-color: ${P.utils.colorLevel(P.colors.global.background,-4)};

  > ${p} {
    .panel-title,
    .panel-title h3 {
      font-size: ${P.fonts.size.large};
    }
  }

  .panel-group {
    > ${p} {
      + .panel-collapse > .panel-body,
      + .panel-collapse > .list-group {
        border-top-color: ${P.colors.gray[90]};
      }
    }

    > ${E} {
      + .panel-collapse .panel-body {
        border-bottom-color: ${P.colors.gray[90]};
      }
    }
  }

  ${l}
`),h=(0,o.css)(({bsStyle:P="default",theme:I})=>{const M=I.colors.variant.lightest[P],O=I.colors.variant.light[P];return(0,o.css)`
    /** NOTE: Deprecated & should be removed in 4.0 */
    border-color: ${O};
    background: ${I.colors.table.row.background};

    & > .panel-heading {
      color: ${I.utils.contrastingColor(M)};
      background-color: ${M};
      border-color: ${O};

      > .panel-title,
      > .panel-title > * {
        font-size: ${I.fonts.size.large};
      }

      + .panel-collapse > .panel-body {
        border-top-color: ${O};
      }

      .badge {
        color: ${M};
        background-color: ${I.colors.variant[P]};
      }
    }

    & > .panel-footer {
      + .panel-collapse > .panel-body {
        border-bottom-color: ${O};
      }
    }
`}),A=(0,o.default)(n.Panel)(({theme:P})=>(0,o.css)`
  /** NOTE: Deprecated & should be removed in 4.0 */
  background-color: ${P.utils.colorLevel(P.colors.global.background,-4)};

  .panel-footer {
    background-color: ${P.colors.gray[90]};
    border-top-color: ${P.colors.gray[80]};
  }

  .panel-group {
    .panel-heading {
      + .panel-collapse > .panel-body,
      + .panel-collapse > .list-group {
        border-top-color: ${P.colors.gray[90]};
      }
    }

    .panel-footer {
      + .panel-collapse .panel-body {
        border-bottom-color: ${P.colors.gray[90]};
      }
    }
  }

  ${h}
`),C=({title:P,children:I,collapsible:M,defaultExpanded:O,expanded:U,footer:W,header:K,onToggle:j,...G})=>{const[k,Q]=(0,t.useState)(null),ne=(0,t.useRef)(!1);(0,t.useEffect)(()=>{Q(V=>O&&U||!O&&U||O&&V===U)},[U,O]),(0,t.useEffect)(()=>{ne.current=!0},[]);const z=V=>{Q(V),j(V)},le=typeof I=="string"||Array.isArray(I)&&typeof I[0]=="string";return K||W||P||M||le?(ne.current||f("You have used a deprecated `Panel` prop, please check the documentation to use the latest `Panel`."),t.createElement(A,{expanded:k,onToggle:z,...G},(K||P)&&t.createElement(p,null,K,P&&t.createElement(n.Panel.Title,{toggle:M},P)),t.createElement(A.Body,{collapsible:M},I),W&&t.createElement(A.Footer,null,W))):t.createElement(m,{expanded:k,onToggle:z,defaultExpanded:O,...G},I)};C.propTypes={children:s().any.isRequired,collapsible:s().bool,defaultExpanded:s().bool,expanded:s().bool,onToggle:s().func,footer:s().string,header:s().oneOfType([s().string,s().node]),title:s().string},C.defaultProps={collapsible:!1,defaultExpanded:null,expanded:null,footer:void 0,header:void 0,onToggle:()=>{},title:void 0},C.Body=n.Panel.Body,C.Collapse=n.Panel.Collapse,C.Footer=E,C.Heading=p,C.Title=n.Panel.Title,C.Toggle=n.Panel.Toggle;const _=C},liHGlRT1:(x,y,e)=>{"use strict";e.d(y,{A:()=>n,w:()=>s});var t=e("aKyEWaw1"),r=e("J6y4/h8P");const s=(0,r.css)(({theme:c})=>(0,r.css)`
  background-color: ${c.colors.global.contentBackground};
  margin-bottom: ${c.spacings.xs};
  border-radius: 6px;
  box-shadow: rgb(0 0 0 / 4%) 0 3px 5px;
`),n=(0,r.default)(t.Row)`
  &.content {
    ${s}
  }
`},R4k1Ilh4:(x,y,e)=>{"use strict";e.d(y,{A:()=>c,s:()=>o});var t=e("aKyEWaw1"),r=e("J6y4/h8P");const s=(0,r.css)(({theme:g})=>{const{table:d}=g.colors;let f="";const p={active:{background:d.variant.active,hover:d.variantHover.active},success:{background:d.variant.success,hover:d.variantHover.success},info:{background:d.variant.info,hover:d.variantHover.info},warning:{background:d.variant.warning,hover:d.variantHover.warning},danger:{background:d.variant.danger,hover:d.variantHover.danger}};return Object.keys(p).forEach(E=>{const{background:l,hover:m}=p[E];f+=`
      &.table > thead > tr,
      &.table > tfoot > tr,
      &.table > tbody > tr {
        > td.${E},
        > th.${E},
        &.${E} > td,
        &.${E} > th {
          background-color: ${l};
        }
      }

      &.table-hover > tbody > tr {
        > td.${E}:hover,
        > th.${E}:hover,
        &.${E}:hover > td,
        &:hover > .${E},
        &.${E}:hover > th {
          background-color: ${m};
        }
      }
    `}),(0,r.css)`
    ${f}
`}),o=(0,r.css)(({theme:g})=>(0,r.css)`
  &.table {
    > thead > tr,
    > tbody > tr,
    > tfoot > tr {
      > th,
      > td {
        border-top-color: ${g.colors.table.row.border};
      }
    }

    > thead > tr > th {
      background: ${g.colors.table.head.background};
      white-space: nowrap;
      border-bottom-color: ${g.colors.table.row.border};
    }

    > tbody > tr {
      background-color: ${g.colors.global.contentBackground};
      transition: background-color 150ms ease-in-out;
    }

    > tbody + tbody {
      border-top-color: ${g.colors.table.row.border};
    }

    .table {
      background-color: ${g.colors.table.row.background};
    }
  }

  &.table-bordered {
    border-color: ${g.colors.table.row.border};

    > thead > tr,
    > tfoot > tr,
    > tbody > tr {
      > td,
      > th {
        border-color: ${g.colors.table.row.border};
      }
    }
  }

  &.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: ${g.colors.table.row.backgroundAlt};
  }

  &.table-hover > tbody > tr:hover {
    background-color: ${g.colors.table.row.backgroundHover};
  }

  ${s}
  
  @media print {
    &.table > thead > tr > th {
      white-space: break-spaces;
      word-break: break-all;
    }
  }
`),c=(0,r.default)(t.Table)`
  ${o}
`},"Fg5/d7Qn":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("aKyEWaw1"),r=e("J6y4/h8P");const o=(0,r.default)(t.Well)(({theme:n})=>(0,r.css)`
  background-color: ${n.colors.variant.lightest.default};
  border-color: ${n.colors.variant.light.default};
  color: ${n.colors.variant.darker.default};
`)},"0f9+EyYg":(x,y,e)=>{"use strict";e.d(y,{YZ:()=>t.PanelGroup,fv:()=>t.Col,ms:()=>t.Dropdown,sx:()=>t.Radio,tA:()=>t.Clearfix,xA:()=>t.Grid});var t=e("aKyEWaw1")},rIl5IEuP:(x,y,e)=>{"use strict";e.d(y,{Alert:()=>t.A,Badge:()=>r.A,BootstrapModalConfirm:()=>s.A,BootstrapModalForm:()=>o.A,BootstrapModalWrapper:()=>n.A,Button:()=>c.A,ButtonGroup:()=>g.A,ButtonToolbar:()=>d.A,Checkbox:()=>f.A,Clearfix:()=>po.tA,Col:()=>po.fv,ControlLabel:()=>p.A,Dropdown:()=>po.ms,DropdownButton:()=>E.A,FormControl:()=>l.A,FormGroup:()=>m.A,Grid:()=>po.xA,HelpBlock:()=>_,Input:()=>P.A,InputGroup:()=>I.h,InputWrapper:()=>M.A,Jumbotron:()=>K,KeyboardKey:()=>k,Label:()=>z,ListGroup:()=>Pe,ListGroupItem:()=>Ie,Menu:()=>Re.A,MenuItem:()=>ce.A,Modal:()=>Ee.A,Nav:()=>Oe,NavDropdown:()=>Je,NavItem:()=>Wt,Navbar:()=>ut,Panel:()=>ft.A,PanelGroup:()=>po.YZ,Radio:()=>po.sx,Row:()=>an.A,SegmentedControl:()=>rn,Tab:()=>An,Table:()=>qt.A,Tabs:()=>Be,Tooltip:()=>Zn,Well:()=>Vn.A});var t=e("kwpLVeht"),r=e("GwjzBeBD"),s=e("PVMUg5WH"),o=e("gTexEe+8"),n=e("gqVHlIxA"),c=e("+Ej1FZHV"),g=e("dekSN6Zc"),d=e("CrIFpfDF"),f=e("aas3RHN2"),p=e("wIOoweNb"),E=e("P98ee3gW"),l=e("zlGg/X1Y"),m=e("nV9jqFLy"),h=e("aKyEWaw1"),A=e("J6y4/h8P");const _=(0,A.default)(h.HelpBlock)(({theme:De})=>(0,A.css)`
  display: block;
  margin-top: 5px;
  margin-bottom: 10px;
  color: ${De.colors.gray[50]};
`);var P=e("yDuYCNwc"),I=e("f5/t4s9T"),M=e("8tm/+anU"),O=e("Z7aTuO5B");const U=(0,A.default)(h.Jumbotron)(({theme:De})=>(0,A.css)`
  color: ${De.colors.global.textDefault};
  background-color: ${De.colors.global.contentBackground};
  
  h2 {
    font-weight: bold;
  }

  p {
    margin-bottom: 9px;
    font-size: 20px;
    font-weight: normal;
  }
`),K=(0,O.forwardRef)((De,ln)=>O.createElement(U,{ref:ln,...De}));var j=e("L3UIULT/");const k=({children:De})=>O.createElement(j.Kbd,null,De),Q=(De,ln)=>{if(!ln)return"";const{color:bt,background:It}=De.colors.button[ln==="default"?"gray":ln];return(0,A.css)`
    background-color: ${It};
    color: ${bt};
    font-weight: normal;
`},z=(0,A.default)(h.Label)(({bsStyle:De,theme:ln})=>(0,A.css)`
  ${Q(ln,De)}
  padding: 0.3em 0.6em;
`);var le=e("ii0bleBb"),V=e.n(le);const me=({className:De,...ln})=>O.createElement(h.ListGroup,{bsClass:De,...ln});me.propTypes={className:V().string},me.defaultProps={className:void 0};const Pe=me,Ve=A.default.span(({theme:De})=>`
  display: block;
  border: 1px solid ${De.colors.variant.lighter.default};
  margin-bottom: -1px;

  &:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
  }

  &:last-child {
    margin-bottom: 0;
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
  }
`),at=(0,A.css)(({bsStyle:De,theme:ln})=>{if(!De)return;const bt=ln.colors.variant.lighter[De],It=ln.utils.readableColor(bt);return(0,A.css)`
    &.list-group-item-${De} {
      color: ${It};
      background-color: ${bt};

      a&,
      button& {
        color: ${It};

        .list-group-item-heading {
          color: inherit;
          font-weight: bold;
        }

        &:hover,
        &:focus {
          color: ${It};
          background-color: ${ln.colors.variant.light[De]};
        }

        &.active,
        &.active:hover,
        &.active:focus {
          color: ${ln.utils.readableColor(ln.colors.variant.light[De])};
          background-color: ${ln.colors.variant.light[De]};
          border-color: ${ln.colors.variant.light[De]};
        }
      }
    }
`}),ze=(0,A.default)(h.ListGroupItem)(({theme:De})=>(0,A.css)`
  background-color: ${De.colors.global.contentBackground};
  border: 0;
  padding: 5px 10px;

  .list-group-item-heading {
    font-size: ${De.fonts.size.h5};
  }

  .list-group-item-text {
    margin-bottom: 5px;
  }

  a&,
  button& {
    color: ${De.colors.global.textDefault};

    .list-group-item-heading {
      color: ${De.colors.variant.darkest.default};
    }

    &:hover:not(.disabled),
    &:focus:not(.disabled) {
      background-color: ${De.colors.variant.lightest.default};

      &.active {
        color: ${De.colors.variant.darkest.default};
        background-color: ${De.colors.variant.lightest.default};
        border-color: ${De.colors.variant.lightest.default};
      }

      .list-group-item-heading {
        color: ${De.utils.readableColor(De.colors.variant.lightest.default)};
      }
    }
  }

  &.disabled,
  &.disabled:hover,
  &.disabled:focus {
    color: ${De.colors.variant.default};
    background-color: ${De.colors.variant.lightest.default};

    .list-group-item-heading {
      color: inherit;
    }

    .list-group-item-text {
      color: ${De.colors.variant.default};
    }
  }

  &.active,
  &.active:hover,
  &.active:focus {
    color: ${De.colors.variant.darker.default};
    background-color: ${De.colors.variant.lightest.info};
    border-color: ${De.colors.variant.lightest.info};
    z-index: auto;

    .list-group-item-heading,
    .list-group-item-heading > small,
    .list-group-item-heading > .small {
      color: inherit;
    }

    .list-group-item-text {
      color: ${De.colors.variant.light.primary};
    }
  }

  ${at}
`),he=(0,O.forwardRef)(({containerProps:De,...ln},bt)=>O.createElement(Ve,{ref:bt,...De},O.createElement(ze,{...ln})));he.propTypes={containerProps:V().object},he.defaultProps={containerProps:{}};const Ie=he;var Re=e("oNtoZaGG"),ce=e("cB7h3AEX"),Ee=e("W1tzA0ec");const ae=(0,A.css)(({theme:De})=>(0,A.css)`
  .nav-tabs {
    border-bottom-color: ${De.colors.variant.default};

    > li {
      > a {
        transition: background-color 150ms ease-in-out;
        color: ${De.colors.global.textDefault};
        border-color: ${De.colors.variant.lighter.default} ${De.colors.variant.lighter.default} ${De.colors.variant.default};

        &:hover {
          background-color: ${De.colors.variant.lightest.default};
          color: ${De.colors.global.textDefault};
        }
      }

      &.active > a {
        &,
        &:hover,
        &:focus {
          color: ${De.colors.variant.darkest.default};
          background-color: ${De.colors.global.contentBackground};
          border-color: ${De.colors.variant.default};
          border-bottom-color: transparent;
        }
      }

      &.disabled > a {
        &,
        &:hover,
        &:focus {
          color: ${De.colors.gray[60]};
          background-color: ${De.colors.gray[100]};
          border-color: ${De.colors.gray[100]} ${De.colors.gray[100]} ${De.colors.variant.default};
          cursor: not-allowed;
        }
      }
    }
  }

  &.nav-justified {
    > .active > a {
      &,
      &:hover,
      &:focus {
        border-color: ${De.colors.variant.default};
      }
    }

    @media (min-width: ${De.breakpoints.min.sm}) {
      > li > a {
        border-bottom-color: ${De.colors.variant.default};
      }

      > .active > a,
      > .active > a:hover,
      > .active > a:focus {
        border-bottom-color: ${De.colors.gray[100]};
      }
    }
  }
`),Oe=(0,A.default)(h.Nav)(({theme:De})=>(0,A.css)`
  &.nav {
    > li {
      > a {
        transition: background-color 150ms ease-in-out;

        &:hover,
        &:focus {
          background-color: ${De.colors.variant.lightest.default};
        }
      }

      &.disabled > a {
        color: ${De.colors.variant.light.default};

        &:hover,
        &:focus {
          color: ${De.colors.variant.light.default};
        }
      }
    }

    .open > a {
      &,
      &:hover,
      &:focus {
        background-color: ${De.colors.variant.lightest.default};
        border-color: ${De.colors.variant.primary};
      }
    }

    &.nav-pills {
      > li {
        &.active > a {
          &,
          &:hover,
          &:focus {
            color: ${De.utils.contrastingColor(De.colors.global.link)};
            background-color: ${De.colors.global.link};
          }
        }
      }
    }
    
    &.nav-sm {
      > li > a {
        padding: 8px 12px;
        font-size: ${De.fonts.size.small};
      }
    };

    &.nav-xs {
      > li > a {
        padding: 2px 6px;
        font-size: ${De.fonts.size.small};
      }
    };

    &.nav-lg {
      > li > a {
        padding: 14px 18px;
        font-size: ${De.fonts.size.large};
      }
    };

    &${ae} /* This is a known non-issue that stylelint won't ignore but will hopefully be patched soon https://github.com/stylelint/stylelint/issues/4574 */
  }
`);var ve=e("CCNXj2ra"),_e=e("NV1/EHMi");const je=(0,A.css)(({theme:De})=>(0,A.css)`
  .dropdown-menu {
    background-color: ${De.colors.global.contentBackground};
    box-shadow: 0 3px 3px ${De.colors.global.navigationBoxShadow};
    
    .dropdown-header {
      padding: 3px 10px;
    }
    
    > li > a {
      padding: 3px 10px;
      display: flex;
      color: ${De.colors.global.textDefault};

      &:hover,
      &:focus {
        color: ${De.colors.variant.darker.default};
        background-color: ${De.colors.variant.lightest.default};
      }
    }

    > .active > a {
      color: ${De.colors.variant.darker.default};
      background-color: ${De.colors.variant.lightest.default};

      &:hover,
      &:focus {
        color: ${De.colors.variant.darkest.default};
        background-color: ${De.colors.variant.lighter.default};
      }
    }

    > .disabled > a {
      color: ${De.colors.variant.dark.default};
      background-color: ${De.colors.variant.lightest.default};

      &:hover,
      &:focus {
        color: ${De.colors.variant.dark.default};
        background-color: ${De.colors.variant.lightest.default};
      }
    }
  }
`);class Qe extends h.NavDropdown{isActive({props:ln},bt,It){return ln.active===!1?!1:ln.active||bt!=null&&ln.eventKey===bt||It&&ln.href===It?!0:ln.active}}const zt=(0,A.default)(Re.A.Dropdown)`
  z-index: 1032 !important;
`,xe=A.default.button(({theme:De,$active:ln})=>(0,A.css)`
  background: transparent;
  border: 0;
  padding: 0 15px;
  min-height: ${ve.mt};

  &:hover, &:focus {
    ${(0,_e.WS)(De)}
  }

  ${ln?(0,_e.at)(De):""}


  &:hover,
  &:focus {
    color: ${De.colors.variant.darker.default};
    background-color: transparent;
  }
`),Ue=A.default.span`
  display: inline-flex;
  align-items: center;
  min-height: ${ve.mt};
  padding: 0;

  @media (max-width: 991px) {
    width: 100%;
  }
`,ke=({title:De,inactiveTitle:ln,badge:bt,noCaret:It,children:En,hoverTitle:Xt})=>{const Ye=ln?ln!==De:void 0;return O.createElement(Re.A,null,O.createElement(Ue,null,O.createElement(Re.A.Target,null,O.createElement(xe,{$active:Ye,title:Xt},O.createElement(_e.Ay,null,bt?O.createElement(bt,{text:De}):De)," ",It?null:O.createElement("span",{className:"caret"})))),O.createElement(zt,null,En))};ke.propTypes={title:V().oneOfType([V().string,V().object]).isRequired,inactiveTitle:V().string,badge:V().func,hoverTitle:V().string},ke.defaultProps={inactiveTitle:void 0,badge:void 0,noCaret:!1,hoverTitle:void 0};const Se=(0,A.default)(Qe)`
  ${je}
`,Je=ke,nt=({children:De,...ln})=>O.createElement(h.NavItem,{...ln},O.createElement(_e.Ay,null,De));nt.displayName="NavItem";const Wt=nt;var Le=e("ww+BtWnX"),Fe=e.n(Le);const ut=(0,A.default)(h.Navbar)(({theme:De})=>(0,A.css)`
  position: relative;
  min-height: auto;
  background-color: ${De.colors.global.navigationBackground};
  border: 0;
  box-shadow: 0 3px 3px ${De.colors.global.navigationBoxShadow};
  margin-bottom: 0;

  .navbar-text {
    color: ${De.colors.global.textDefault};
  }

  @media (max-width: ${De.breakpoints.max.md}) {
    && .navbar-collapse {
      position: absolute;
      background-color: ${De.colors.global.navigationBackground};
      width: 100%;
    }
  }

  .navbar-nav {
    > li > a,
    > li > .btn-link {
      color: ${De.colors.global.textDefault};

      &:hover,
      &:focus {
        color: ${De.colors.variant.darker.default};
        background-color: transparent;
      }
    }

    > .active > a,
    > .active > .btn-link {
      color: ${De.colors.global.textDefault};
      background-color: transparent;
      
      &:hover,
      &:focus {
        color: ${De.colors.variant.darkest.default};
        background-color: transparent;
      }
    }

    > .disabled > a,
    > .disabled > .btn-link {
      &,
      &:hover,
      &:focus {
        color: ${De.colors.gray[70]};
        background-color: transparent;
      }
    }

    > .open > a,
    > .open > .btn-link {
      &,
      &:hover,
      &:focus {
        color: ${De.colors.variant.darkest.default};
        background-color: transparent;
      }
    }

    @media (max-width: ${De.breakpoints.max.md}) {
      padding-left: 50px;

      > li > a,
      > li > .btn-link {
        &:hover,
        &:focus {
          color: ${De.colors.variant.darker.default};
          background-color: transparent;
        }
      }

      .open .dropdown-menu {
        > li > a,
        > li > .btn-link {
          color: ${De.colors.variant.darkest.default};

          &:hover,
          &:focus {
            color: ${De.colors.variant.darker.default};
            background-color: ${De.colors.variant.lightest.default};
          }
        }

        > .active > a,
        > .active > .btn-link {
          color: ${De.colors.variant.darkest.default};
          background-color: ${De.colors.gray[90]};
          
          &:hover,
          &:focus {
            color: ${De.colors.variant.darkest.default};
            background-color: ${De.colors.gray[80]};
          }
        }

        > .disabled > a,
        > .disabled > .btn-link {
          &,
          &:hover,
          &:focus {
            color: ${De.colors.gray[70]};
            background-color: transparent;
          }
        }
      }
    }
  }

  .navbar-toggle {
    background-color: ${De.colors.global.navigationBackground};
    border-color: ${De.colors.variant.dark.default};
    transition: background-color 150ms ease-in-out,
      border-color 150ms ease-in-out;
    position: relative;

    &:not(.collapsed) {
      .icon-bar:nth-last-child(1),
      .icon-bar:nth-last-child(3) {
        transition: transform 150ms ease-in 150ms,
          top 150ms ease-in 0s;
      }

      .icon-bar:nth-last-child(1) {
        transform: rotate(-45deg) translate(4px, -4px);
      }

      .icon-bar:nth-last-child(3) {
        transform: rotate(45deg) translate(4px, 4px);
      }

      .icon-bar:nth-last-child(2) {
        transition: opacity 0s ease 150ms;
        opacity: 0;
      }
    }

    .icon-bar {
      background-color: ${De.colors.global.textDefault};
      transition: background-color 150ms ease-in-out,
        transform 150ms ease-in 0s,
        opacity 300ms ease-in 0s;
      transform: rotate(0deg);
      position: relative;
      opacity: 1;
    }

    &:hover,
    &:focus,
    &:not(.collapsed) {
      background-color: ${De.colors.variant.lighter.default};
      border-color: ${De.colors.variant.default};
      
      .icon-bar {
        background-color: ${De.colors.global.textDefault};
      }
    }
  }

  .navbar-collapse,
  .navbar-form {
    border-color: ${Fe()(De.colors.gray[90]).darken(.065)};
  }

  .navbar-link {
    color: ${De.colors.variant.default};

    &:hover {
      color: ${Fe()(De.colors.variant.default).darken(.25)};
    }
  }

  .btn-link {
    color: ${De.colors.variant.default};

    &:hover,
    &:focus {
      color: ${De.colors.variant.dark.default};
    }

    &[disabled],
    fieldset[disabled] & {
      &:hover,
      &:focus {
        color: ${De.colors.gray[80]};
      }
    }
  }

  .dropdown-header {
    margin-top: 4px;
    text-transform: uppercase;
    padding: 0 15px !important;
    font-weight: bold;
  }
`);var ft=e("S9hCvsKB");const Ot=(0,A.default)(h.Popover)(({theme:De})=>{const ln=De.colors.variant.light.default,bt=De.colors.variant.lightest.default,It=De.colors.global.contentBackground;return(0,A.css)`
    background-color: ${It};
    border-color: ${ln};
    padding: 0;

    .popover-title {
      background-color: ${bt};
      border-color: ${ln};
      color: ${De.colors.variant.darkest.default};
    }

    &.top {
      > .arrow {
        border-top-color: ${ln};

        &::after {
          border-top-color: ${bt};
        }
      }
    }

    &.right {
      > .arrow {
        border-right-color: ${ln};

        &::after {
          border-right-color: ${bt};
          z-index: 1;
        }
      }
    }

    &.bottom {
      > .arrow {
        border-bottom-color: ${ln};

        &::after {
          border-bottom-color: ${bt};
        }
      }
    }

    &.left {
      > .arrow {
        border-left-color: ${ln};

        &::after {
          border-left-color: ${bt};
        }
      }
    }
`}),Lt=null;var an=e("liHGlRT1");const Ft=({data:De,defaultValue:ln,disabled:bt,handleChange:It,value:En})=>{const Xt=(0,A.useTheme)();return O.createElement(j.SegmentedControl,{color:Xt.colors.variant.info,data:De,defaultValue:ln,disabled:bt,value:En,onChange:It,styles:{label:{marginBottom:0}}})};Ft.defaultProps={defaultValue:void 0,disabled:!1,handleChange:void 0,value:void 0};const rn=Ft;var $t=e("u2QUEJU3");const be=O.forwardRef(({children:De,disabled:ln,title:bt,open:It,onMenuChange:En,width:Xt,onClick:Ye,...At},Ct)=>O.createElement(Re.A,{opened:It,onChange:En,width:Xt},O.createElement(g.A,null,O.createElement(c.A,{...At,disabled:ln,onClick:Ye},bt),O.createElement(Re.A.Target,null,O.createElement(c.A,{ref:Ct,"aria-label":"More Actions",...At},O.createElement($t.A,{name:"arrow_drop_down"}))),O.createElement(Re.A.Dropdown,null,De))));be.defaultProps={disabled:!1,open:void 0,onMenuChange:void 0,width:void 0};const yn=null,An=(0,A.default)(h.Tab)(({theme:De})=>(0,A.css)`
  background-color: ${De.colors.global.contentBackground};
  border: 1px solid ${De.colors.variant.default};
  border-top: 0;
  border-radius: 0 0 4px 4px;
  padding: 9px;
`);var qt=e("R4k1Ilh4");const Be=(0,A.default)(h.Tabs)`
  ${ae}
`,bn=10,gn=(0,A.default)(h.Tooltip)(({theme:De})=>(0,A.css)`
  &.in {
    opacity: 1;
    filter: drop-shadow(0 0 3px ${De.colors.variant.lighter.default});
  }

  &.top {
    .tooltip-arrow {
      border-top-color: ${De.colors.global.contentBackground};
      border-width: ${bn}px ${bn}px 0;
      margin-left: -${bn}px;
      bottom: -${bn/2}px;
    }
  }
  
  &.right {
    .tooltip-arrow {
      border-right-color: ${De.colors.global.contentBackground};
      border-width: ${bn}px ${bn}px ${bn}px 0;
      margin-top: -${bn}px;
      left: -${bn/2}px;
    }
  }

  &.bottom {
    .tooltip-arrow {
      border-bottom-color: ${De.colors.global.contentBackground};
      border-width: 0 ${bn}px ${bn}px;
      margin-left: -${bn}px;
      top: -${bn/2}px;
    }
  }
  
  &.left {
    .tooltip-arrow {
      border-left-color: ${De.colors.global.contentBackground};
      border-width: ${bn}px 0 ${bn}px ${bn}px;
      margin-top: -${bn}px;
      right: -${bn/2}px;
    }
  }
  
  .tooltip-inner {
    color: ${De.colors.global.textDefault};
    background-color: ${De.colors.global.contentBackground};
    max-width: 300px;
    opacity: 1;

    .datapoint-info {
      text-align: left;

      .date {
        color: ${De.colors.variant.darkest.default};
      }
    }
  }
`),wn=({children:De,className:ln,id:bt,placement:It,positionTop:En,positionLeft:Xt,arrowOffsetTop:Ye,arrowOffsetLeft:At,show:Ct})=>O.createElement(gn,{className:`${ln} ${Ct?"in":""}`,id:bt,placement:It,positionTop:En,positionLeft:Xt,arrowOffsetTop:Ye,arrowOffsetLeft:At},De);wn.propTypes={className:V().string,children:V().node.isRequired,id:V().oneOfType([V().string,V().number]).isRequired,placement:V().oneOf(["top","right","bottom","left"]),positionTop:V().oneOfType([V().number,V().string]),positionLeft:V().oneOfType([V().number,V().string]),arrowOffsetTop:V().oneOfType([V().number,V().string]),arrowOffsetLeft:V().oneOfType([V().number,V().string]),show:V().bool},wn.defaultProps={className:"",placement:"right",positionTop:void 0,positionLeft:void 0,arrowOffsetTop:void 0,arrowOffsetLeft:void 0,show:!0};const Zn=wn;var Vn=e("Fg5/d7Qn"),po=e("0f9+EyYg")},dMf4yqaX:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("J6y4/h8P");const s=r.default.div`
  padding: 3px;
  height: 20px;
  width: 20px;
  vertical-align: sub;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  
  svg {
    width: 100%;
  }
`,o=g=>{switch(g){case"apple":return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:"24",height:"24",viewBox:"0 0 814 1000"},t.createElement("path",{fill:"currentColor",d:"M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z"}));case"freebsd":return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 64 64"},t.createElement("path",{fill:"currentColor",d:"M63.27 1.608c3.4 3.4-6.03 18.295-7.62 19.886s-5.6.126-9-3.266-4.856-7.4-3.266-9c1.6-1.633 16.495-11 19.886-7.62zM15.7 5.2C10.518 2.278 3.15-.987.806 1.357-1.58 3.743 1.8 11.28 4.783 16.47 7.42 11.823 11.188 7.972 15.7 5.2zm42.378 15.122c.46 1.633.377 2.972-.377 3.726-1.8 1.8-6.698-.126-11.094-4.312-.293-.293-.628-.544-.92-.88-1.6-1.6-2.847-3.266-3.6-4.856-1.55-2.763-1.926-5.2-.754-6.364.628-.628 1.633-.795 2.9-.586.795-.502 1.758-1.1 2.805-1.675C42.755 3.157 37.94 1.9 32.833 1.9c-16.997 0-30.77 13.774-30.77 30.77s13.774 30.77 30.77 30.77 30.77-13.774 30.77-30.77c0-5.484-1.423-10.634-3.977-15.113a27.18 27.18 0 0 1-1.549 2.763z"}));case"github":return t.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 98 96"},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"}));case"linux":return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.0",width:"24",height:"24",viewBox:"0 0 266 312"},t.createElement("path",{fill:"currentColor",d:"M128.6640625 79.2793c0 1-1 1-1 1h-1c-1 0-1-1-2-2 0 0-1-1-1-2s0-1 1-1l2 1c1 1 2 2 2 3m-18-10c0-5-2-8-5-8 0 0 0 1-1 1v2h3c0 2 1 3 1 5h2m35-5c2 0 3 2 4 5h2c-1-1-1-2-1-3s0-2-1-3-2-2-3-2c0 0-1 1-2 1 0 1 1 1 1 2m-30 16c-1 0-1 0-1-1s0-2 1-3c2 0 3-1 3-1 1 0 1 1 1 1 0 1-1 2-3 4h-1m-11-1c-4-2-5-5-5-10 0-3 0-5 2-7 1-2 3-3 5-3s3 1 5 3c1 3 2 6 2 9v2h1v-1c1 0 1-2 1-6 0-3 0-6-2-9s-4-5-8-5c-3 0-6 2-7 5-2 4-2.4 7-2.4 12 0 4 1.4 8 5.4 12 1-1 2-1 3-2m125 141c1 0 1-.4 1-1.3 0-2.2-1-4.8-4-7.7-3-3-8-4.9-14-5.7-1-.1-2-.1-2-.1-1-.2-1-.2-2-.2-1-.1-3-.3-4-.5 3-9.3 4-17.5 4-24.7 0-10-2-17-6-23s-8-9-13-10c-1 1-1 1-1 2 5 2 10 6 13 12 3 7 4 13 4 20 0 5.6-1 13.9-5 24.5-4 1.6-8 5.3-11 11.1 0 .9 0 1.4 1 1.4 0 0 1-.9 2-2.6 2-1.7 3-3.4 5-5.1 3-1.7 5-2.6 8-2.6 5 0 10 .7 13 2.1 4 1.3 6 2.7 7 4.3 1 1.5 2 2.9 3 4.2 0 1.3 1 1.9 1 1.9m-92-145c-1-1-1-3-1-5 0-4 0-6 2-9 2-2 4-3 6-3 3 0 5 2 7 4 1 3 2 5 2 8 0 5-2 8-6 9 0 0 1 1 2 1 2 0 3 1 5 2 1-6 2-10 2-15 0-6-1-10-3-13-3-3-6-4-10-4-3 0-6 1-9 3-2 3-3 5-3 8 0 5 1 9 3 13 1 0 2 1 3 1m12 16c-13 9-23 13-31 13-7 0-14-3-20-8 1 2 2 4 3 5l6 6c4 4 9 6 14 6 7 0 15-4 25-11l9-6c2-2 4-4 4-7 0-1 0-2-1-2-1-2-6-5-16-8-9-4-16-6-20-6-3 0-8 2-15 6-6 4-10 8-10 12 0 0 1 1 2 3 6 5 12 8 18 8 8 0 18-4 31-14v2c1 0 1 1 1 1m23 202c4 7.52 11 11.3 19 11.3 2 0 4-.3 6-.9 2-.4 4-1.1 5-1.9 1-.7 2-1.4 3-2.2 2-.7 2-1.2 3-1.7l17-14.7c4-3.19 8-5.98 13-8.4 4-2.4 8-4 10-4.9 3-.8 5-2 7-3.6 1-1.5 2-3.4 2-5.8 0-2.9-2-5.1-4-6.7s-4-2.7-6-3.4-4-2.3-7-5c-2-2.6-4-6.2-5-10.9l-1-5.8c-1-2.7-1-4.7-2-5.8 0-.3 0-.4-1-.4s-3 .9-4 2.6c-2 1.7-4 3.6-6 5.6-1 2-4 3.8-6 5.5-3 1.7-6 2.6-8 2.6-8 0-12-2.2-15-6.5-2-3.2-3-6.9-4-11.1-2-1.7-3-2.6-5-2.6-5 0-7 5.2-7 15.7v31.1c0 .9-1 2.9-1 6-1 3.1-1 6.62-1 10.6l-2 11.1v.17m-145-5.29c9.3 1.36 20 4.27 32.1 8.71 12.1 4.4 19.5 6.7 22.2 6.7 7 0 12.8-3.1 17.6-9.09 1-1.94 1-4.22 1-6.84 0-9.45-5.7-21.4-17.1-35.9l-6.8-9.1c-1.4-1.9-3.1-4.8-5.3-8.7-2.1-3.9-4-6.9-5.5-9-1.3-2.3-3.4-4.6-6.1-6.9-2.6-2.3-5.6-3.8-8.9-4.6-4.2.8-7.1 2.2-8.5 4.1s-2.2 4-2.4 6.2c-.3 2.1-.9 3.5-1.9 4.2-1 .6-2.7 1.1-5 1.6-.5 0-1.4 0-2.7.1h-2.7c-5.3 0-8.9.6-10.8 1.6-2.5 2.9-3.8 6.2-3.8 9.7 0 1.6.4 4.3 1.2 8.1.8 3.7 1.2 6.7 1.2 8.8 0 4.1-1.2 8.2-3.7 12.3-2.5 4.3-3.8 7.5-3.8 9.78 1 3.88 7.6 6.61 19.7 8.21m33.3-90.9c0-6.9 1.8-14.5 5.5-23.5 3.6-9 7.2-15 10.7-19-.2-1-.7-1-1.5-1l-1-1c-2.9 3-6.4 10-10.6 20-4.2 9-6.4 17.3-6.4 23.4 0 4.5 1.1 8.4 3.1 11.8 2.2 3.3 7.5 8.1 15.9 14.2l10.6 6.9c11.3 9.8 17.3 16.6 17.3 20.6 0 2.1-1 4.2-4 6.5-2 2.4-4.7 3.6-7 3.6-.2 0-.3.2-.3.7 0 .1 1 2.1 3.1 6 4.2 5.7 13.2 8.5 25.2 8.5 22 0 39-9 52-27 0-5 0-8.1-1-9.4v-3.7c0-6.5 1-11.4 3-14.6s4-4.7 7-4.7c2 0 4 .7 6 2.2 1-7.7 1-14.4 1-20.4 0-9.1 0-16.6-2-23.6-1-6-3-11-5-15l-6-9c-2-3-3-6-5-9-1-4-2-7-2-12-3-5-5-10-8-15-2-5-4-10-6-14l-9 7c-10 7-18 10-25 10-6 0-11-1-14-5l-6-5c0 3-1 7-3 11l-6.3 12c-2.8 7-4.3 11-4.6 14-.4 2-.7 4-.9 4l-7.5 15c-8.1 15-12.2 28.9-12.2 40.4 0 2.3.2 4.7.6 7.1-4.5-3.1-6.7-7.4-6.7-13m71.6 94.6c-13 0-23 1.76-30 5.25v-.3c-5 6-10.6 9.1-18.4 9.1-4.9 0-12.6-1.9-23-5.7-10.5-3.6-19.8-6.36-27.9-8.18-.8-.23-2.6-.57-5.5-1.03-2.8-.45-5.4-.91-7.7-1.37-2.1-.45-4.5-1.13-7.1-2.05-2.5-.79-4.5-1.82-6-3.07-1.38-1.26-2.06-2.68-2.06-4.27 0-1.6.34-3.31 1.02-5.13.64-1.1 1.34-2.2 2.04-3.2.7-1.1 1.3-2.1 1.7-3.1.6-.9 1-1.8 1.4-2.8.4-.9.8-1.8 1-2.9.2-1 .4-2 .4-3s-.4-4-1.2-9.3c-.8-5.2-1.2-8.5-1.2-9.9 0-4.4 1-7.9 3.2-10.4s4.3-3.8 6.5-3.8h11.5c.9 0 2.3-.5 4.4-1.7.7-1.6 1.3-2.9 1.7-4.1.5-1.2.7-2.1.9-2.5.2-.6.4-1.2.6-1.7.4-.7.9-1.5 1.6-2.3-.8-1-1.2-2.3-1.2-3.9 0-1.1 0-2.1.2-2.7 0-3.6 1.7-8.7 5.3-15.4l3.5-6.3c2.9-5.4 5.1-9.4 6.7-13.4 1.7-4 3.5-10 5.5-18 1.6-7 5.4-14 11.4-21l7.5-9c5.2-6 8.6-11 10.5-15s2.9-9 2.9-13c0-2-.5-8-1.6-18-1-10-1.5-20-1.5-29 0-7 .6-12 1.9-17s3.6-10 7-14c3-4 7-8 13-10s13-3 21-3c3 0 6 0 9 1 3 0 7 1 12 3 4 2 8 4 11 7 4 3 7 8 10 13 2 6 4 12 5 20 1 5 1 10 2 17 0 6 1 10 1 13 1 3 1 7 2 12 1 4 2 8 4 11 2 4 4 8 7 12 3 5 7 10 11 16 9 10 16 21 20 32 5 10 8 23 8 36.9 0 6.9-1 13.6-3 20.1 2 0 3 .8 4 2.2s2 4.4 3 9.1l1 7.4c1 2.2 2 4.3 5 6.1 2 1.8 4 3.3 7 4.5 2 1 5 2.4 7 4.2 2 2 3 4.1 3 6.3 0 3.4-1 5.9-3 7.7-2 2-4 3.4-7 4.3-2 1-6 3-12 5.82-5 2.96-10 6.55-15 10.8l-10 8.51c-4 3.9-8 6.7-11 8.4-3 1.8-7 2.7-11 2.7l-7-.8c-8-2.1-13-6.1-16-12.2-16-1.94-29-2.9-37-2.9"}));case"windows":return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"optimizeQuality",fillRule:"evenodd",clipRule:"evenodd",viewBox:"0 0 640 640"},t.createElement("path",{fill:"currentColor",d:"M.2 298.669L0 90.615l256.007-34.76v242.814H.201zM298.658 49.654L639.905-.012v298.681H298.657V49.654zM640 341.331l-.071 298.681L298.669 592V341.332h341.33zM255.983 586.543L.189 551.463v-210.18h255.794v245.26z"}));default:return null}},c=({name:g})=>{const d=o(g);return d?t.createElement(s,null,d):null}},TWZE6ai3:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("UbPXvcD1"),s=e("rIl5IEuP"),o=e("VVS+7KXv"),n=e("N1QxzyxS");const c=({children:f,value:p,timeout:E})=>{const[l,m]=(0,t.useState)(!1),{start:h}=(0,r.Z)(()=>m(!1),E),A=(0,t.useCallback)(()=>(0,o.A)(p).then(()=>{m(!0),h()}),[h,p]);return f({copied:l,copy:A})},g=({bsSize:f,bsStyle:p,buttonTitle:E,className:l,disabled:m,onSuccess:h,text:A,title:C})=>{const _=P=>t.createElement(s.Button,{bsSize:f,bsStyle:p,className:l,disabled:m,title:E,onClick:()=>{P(),h==null||h()}},C);return t.createElement(c,{value:A,timeout:2e3},({copied:P,copy:I})=>P?t.createElement(n.A,{label:"Copied!",withArrow:!0,position:"top",opened:!0},_(I)):_(I))};g.defaultProps={bsSize:void 0,bsStyle:void 0,buttonTitle:void 0,className:void 0,disabled:void 0,onSuccess:void 0};const d=g},"6nsVPoEI":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("KC5O6lbB");const n=({onChange:g,...d})=>{const f=(0,t.useCallback)((p,E)=>{g(p.hex,E)},[g]);return t.createElement(o.Lu,{...d,onChange:f})};n.propTypes={color:s().string,colors:s().array,height:s().number,width:s().number,onChange:s().func.isRequired},n.defaultProps={color:void 0,colors:void 0,height:310,width:250};const c=n},"/e3sftg8":(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("rIl5IEuP"),n=e("rp7UD7rK");const c=({show:d,title:f,children:p,onCancel:E,onConfirm:l,btnConfirmDisabled:m,btnConfirmText:h,hideCancelButton:A})=>{const C=A?l:E;return t.createElement(o.Modal,{show:d,onHide:C},t.createElement(o.Modal.Header,{closeButton:!0},t.createElement(o.Modal.Title,null,f)),t.createElement(o.Modal.Body,null,p),t.createElement(o.Modal.Footer,null,t.createElement(n.A,{onCancel:E,onSubmit:l,submitButtonType:"button",disabledSubmit:m,submitButtonText:h,displayCancel:A})))};c.propTypes={show:s().bool,hideCancelButton:s().bool,title:s().oneOfType([s().string,s().element]).isRequired,btnConfirmText:s().oneOfType([s().string,s().element]),btnConfirmDisabled:s().bool,onCancel:s().func,onConfirm:s().func.isRequired,children:s().oneOfType([s().string,s().element]).isRequired},c.defaultProps={btnConfirmText:"Confirm",btnConfirmDisabled:!1,show:!1,hideCancelButton:!1,onCancel:()=>{}};const g=c},t7jeigEY:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("ii0bleBb"),r=e.n(t),s=e("yAXMqwrl"),o=e("Z7aTuO5B"),n=e("RCNj0OY4");const c=(f,p,E)=>p.pathname!==f.pathname?!window.confirm(E):!1,g=({question:f})=>{const p=(0,o.useCallback)(E=>n.A.gl2DevMode()?null:(E.returnValue=f,f),[f]);return(0,o.useEffect)(()=>(window.addEventListener("beforeunload",p),()=>{window.removeEventListener("beforeunload",p)}),[p]),(0,s.useBlocker)(E=>!n.A.gl2DevMode()&&c(E.currentLocation,E.nextLocation,f)),null};g.propTypes={question:r().string},g.defaultProps={question:"Are you sure?"};const d=g},iDUHYfT2:(x,y,e)=>{"use strict";e.d(y,{A:()=>p});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("vAwPiEFV"),c=e.n(n),g=e("rIl5IEuP");const d=(0,o.default)(g.Row)(({theme:E})=>(0,o.css)`
  padding-bottom: 0;

  p {
    margin-top: 15px;
  }

  .actions-lg {
    float: right;
  }

  .actions-sm {
    padding-bottom: 15px;
  }

  .btn-lg {
    font-size: ${E.fonts.size.large};
  }
`),f=({children:E,className:l,...m})=>t.createElement(d,{className:c()("content-head",l),...m},E);f.propTypes={children:s().node.isRequired,className:s().string},f.defaultProps={className:void 0};const p=f},"9gxkERa8":(x,y,e)=>{"use strict";e.d(y,{A:()=>l});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("rIl5IEuP"),n=e("J6y4/h8P");const c=(0,n.default)(o.ListGroupItem)(({theme:m})=>(0,n.css)`
  background-color: ${m.colors.variant.lightest.default};
  font-size: ${m.fonts.size.body};
  color: ${m.utils.contrastingColor(m.colors.variant.lightest.default)};
  padding: 0 15px;

  .form-group {
    margin: 0;
  }
`),g=n.default.div`
  padding: 10px 0;
  min-height: 40px;
`,d=({children:m})=>{const A=typeof m=="string"?(C=>t.createElement(g,null,C))(m):m;return t.createElement(c,null,A)};d.propTypes={children:s().node},d.defaultProps={children:""};const f=d;var p=e("9tOV9VDw");const E=({children:m})=>{let h;return m.length===0?h=t.createElement(p.A,null,"No items to display"):h=m,t.createElement("div",null,t.createElement(o.ListGroup,null,h))};E.Header=f,E.Item=p.A,E.propTypes={children:s().node.isRequired};const l=E},"9tOV9VDw":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("rIl5IEuP");const n=({className:g,children:d})=>t.createElement(o.ListGroupItem,{className:g},d);n.propTypes={children:s().node.isRequired,className:s().string},n.defaultProps={className:void 0};const c=n},"Zzc2+UR0":(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("Z6NUVhuV");const c=o.default.div`
  .control-label {
    padding-top: 0;
  }
`,g=({children:f,displayKey:p,filterBy:E,filterKeys:l,filterSuggestions:m,id:h,label:A,onDataFiltered:C,rows:_})=>l.length!==0?t.createElement(c,{className:"row"},t.createElement("div",{className:"col-md-8"},t.createElement(n.A,{id:`${h}-data-filter`,label:A,data:_,displayKey:p,filterBy:E,filterSuggestions:m,searchInKeys:l,onDataFiltered:C})),f&&t.createElement("div",{className:"col-md-4"},f)):null;g.propTypes={children:s().node,displayKey:s().string,filterBy:s().string,filterKeys:s().array,filterSuggestions:s().array,id:s().string.isRequired,label:s().string,onDataFiltered:s().func.isRequired,rows:s().array.isRequired},g.defaultProps={children:void 0,displayKey:void 0,filterBy:void 0,filterKeys:void 0,filterSuggestions:void 0,label:void 0};const d=g},"uoAlNf/n":(x,y,e)=>{"use strict";e.d(y,{A:()=>U});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("+KM7MH1U"),n=e.n(o),c=e("J6y4/h8P"),g=e("R4k1Ilh4"),d=e("Zzc2+UR0"),f=Object.defineProperty,p=(W,K,j)=>K in W?f(W,K,{enumerable:!0,configurable:!0,writable:!0,value:j}):W[K]=j,E=(W,K,j)=>(p(W,typeof K!="symbol"?K+"":K,j),j);class l extends s.Component{render(){const{formatter:K,element:j,index:G}=this.props;return K(j,G)}}E(l,"propTypes",{element:r().any,formatter:r().func.isRequired,index:r().number}),E(l,"defaultProps",{element:void 0,index:void 0});const m=l;var h=e("G8YcST+s"),A=Object.defineProperty,C=(W,K,j)=>K in W?A(W,K,{enumerable:!0,configurable:!0,writable:!0,value:j}):W[K]=j,_=(W,K,j)=>(C(W,typeof K!="symbol"?K+"":K,j),j);const P=c.default.table`
  ${g.s}
`,I=({noDataText:W})=>typeof W=="string"?s.createElement(h.A,null,W):W;class M extends s.Component{constructor(K){super(K),_(this,"getFormattedHeaders",()=>{let G=0;const{headerCellFormatter:k,headers:Q}=this.props,ne=Q.map(z=>{const le=s.createElement(m,{key:`header-${G}`,element:z,index:G,formatter:k});return G+=1,le});return s.createElement("tr",null,ne)}),_(this,"getFormattedDataRows",()=>{let G=0;const{sortByKey:k,sortBy:Q,dataRowFormatter:ne,useNumericSort:z}=this.props;let le=this._getEffectiveRows();return k?le=le.sort((me,Pe)=>me[k].localeCompare(Pe[k],void 0,{numeric:z})):Q&&(le=le.sort((me,Pe)=>Q(me).localeCompare(Q(Pe),void 0,{numeric:z}))),le.map(me=>{const Pe=s.createElement(m,{key:`row-${G}`,element:me,index:G,formatter:ne});return G+=1,Pe})}),_(this,"filterDataRows",G=>{this.setState({filteredRows:G})}),_(this,"_getEffectiveRows",()=>{const{filteredRows:G}=this.state,{filterKeys:k,rows:Q}=this.props;return k.length===0?Q:G.filter(ne=>Q.some(z=>n()(z,ne)))});const{rows:j}=this.props;this.state={filteredRows:j}}render(){const{customFilter:K,filterKeys:j,id:G,filterLabel:k,filterBy:Q,displayKey:ne,filterSuggestions:z,children:le,noDataText:V,className:me,rowClassName:Pe,useResponsiveTable:Ve,rows:at}=this.props,ze=this._getEffectiveRows();let he;return at.length===0?he=s.createElement(I,{noDataText:V}):ze.length===0?he=s.createElement("p",null,"Filter does not match any data."):he=s.createElement(P,{className:`table ${me!=null?me:""}`},s.createElement("thead",null,this.getFormattedHeaders()),s.createElement("tbody",null,this.getFormattedDataRows())),s.createElement("div",null,K||s.createElement(d.A,{label:k,rows:at,id:G,displayKey:ne,filterBy:Q,filterSuggestions:z,filterKeys:j,onDataFiltered:this.filterDataRows},le),s.createElement("div",{className:`row ${Pe}`},s.createElement("div",{className:"col-md-12"},s.createElement("div",{id:G,className:`data-table ${Ve?"table-responsive":""}`},he))))}}_(M,"propTypes",{children:r().node,className:r().string,customFilter:r().node,rowClassName:r().string,displayKey:r().string,dataRowFormatter:r().func.isRequired,filterBy:r().string,filterLabel:r().string,filterKeys:r().array,filterSuggestions:r().array,headerCellFormatter:r().func,headers:r().array.isRequired,id:r().string.isRequired,noDataText:r().oneOfType([r().string,r().node]),rows:r().array.isRequired,sortByKey:r().string,sortBy:r().func,useResponsiveTable:r().bool,useNumericSort:r().bool}),_(M,"defaultProps",{customFilter:void 0,children:void 0,className:"",filterBy:"",filterSuggestions:[],filterKeys:[],filterLabel:"Filter",displayKey:"value",noDataText:"No data available.",rowClassName:"",useResponsiveTable:!0,headerCellFormatter:W=>s.createElement("th",null,W),sortByKey:void 0,sortBy:void 0,useNumericSort:!1});const U=M},rRqvmggl:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r);const o=({children:c,delay:g})=>{const[d,f]=(0,t.useState)(g<=0);return(0,t.useEffect)(()=>{if(g<=0)return()=>{};const p=window.setTimeout(()=>f(!0),g);return()=>clearTimeout(p)},[]),d?t.createElement(t.Fragment,null,c):null};o.propTypes={children:s().node.isRequired,delay:s().number.isRequired};const n=o},qQvt58D8:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r);const o=({children:c,title:g})=>{const d="Graylog";return(0,t.useEffect)(()=>(document.title=`${document.title} - ${g}`,()=>{document.title=d}),[g]),t.createElement(t.Fragment,null,c)};o.propTypes={title:s().string.isRequired,children:s().oneOfType([s().arrayOf(s().element),s().element]).isRequired};const n=o},IdpefXWm:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("a5C0HdYb");const s=({children:n,className:c,resizeDelay:g})=>{const d=(0,t.useRef)(null),f=(0,r.A)(d,g);return t.createElement("div",{ref:d,className:c},n(f))};s.defaultProps={className:void 0,resizeDelay:void 0};const o=s},Z2BtcgLJ:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("cB7h3AEX"),s=e("rIl5IEuP"),o=e("JNPySgKz");const c=({children:g})=>{const{selectedEntities:d,setSelectedEntities:f}=(0,o.A)(),p=(0,t.useCallback)(()=>f([]),[f]);return t.createElement(s.DropdownButton,{bsSize:"small",title:"Bulk actions",id:"bulk-actions-dropdown",disabled:!(d!=null&&d.length)},g,!!t.Children.count(g)&&t.createElement(r.A,{divider:!0}),t.createElement(r.A,{onClick:p},"Cancel selection"))}},HhRuy6uH:(x,y,e)=>{"use strict";e.d(y,{$N:()=>n,CU:()=>o,F9:()=>s,SD:()=>r,qE:()=>c,xb:()=>t});const t=5,r=20,s=150,o=1,n="More",c="More actions"},"Nm+SUS6U":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.ExpandedSectionsContext",()=>s)},"46ptGYIb":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.SelectEntitiesContext",()=>s)},JNPySgKz:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("46ptGYIb");const o=()=>{const n=(0,t.useContext)(r.A);if(!n)throw new Error("useSelectedEntities hook needs to be used inside BulkSelectContext.Provider");return n}},Dg3D5NJi:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("Diig6WAv");const o=({entityTableId:n,defaultSort:c,defaultPageSize:g,defaultDisplayedAttributes:d})=>{const{data:f={},isInitialLoading:p}=(0,r.A)(n);return(0,t.useMemo)(()=>{var E,l,m;return{layoutConfig:{pageSize:(E=f.perPage)!=null?E:g,sort:(l=f.sort)!=null?l:c,displayedAttributes:(m=f==null?void 0:f.displayedAttributes)!=null?m:d},isInitialLoading:p}},[d,g,c,p,f==null?void 0:f.displayedAttributes,f.perPage,f.sort])}},qO9czYNI:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("DUKaTDO2"),r=e("eFxcQyPT"),s=e("MdYBRjRJ"),o=e("jAGDuYSC"),n=e("Diig6WAv");const c=({displayedAttributes:f,sort:p,perPage:E})=>({displayed_attributes:f,sort:p?{order:p.direction,field:p.attributeId}:void 0,per_page:E}),d=f=>{const p=(0,t.useQueryClient)(),{data:E={}}=(0,n.A)(f),l=h=>(0,r.Ay)("POST",(0,s.H3)(`/entitylists/preferences/${f}`),c({...E,...h})),{mutate:m}=(0,t.useMutation)({mutationFn:l,onError:h=>{o.A.error(`Updating table layout preferences failed with error: ${h}`)},onMutate:h=>{p.setQueriesData(["table-layout",f],A=>({...A!=null?A:{},...h}))}});return{mutate:m}}},Diig6WAv:(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("DUKaTDO2"),r=e("eFxcQyPT"),s=e("MdYBRjRJ"),o=e("jAGDuYSC");const n={},c=({displayed_attributes:p,sort:E,per_page:l})=>({displayedAttributes:p,sort:E?{attributeId:E.field,direction:E.order}:void 0,perPage:l}),g=p=>(0,r.Ay)("GET",(0,s.H3)(`/entitylists/preferences/${p}`)).then(E=>c(E!=null?E:{})),f=p=>{const{data:E,isInitialLoading:l}=(0,t.useQuery)(["table-layout",p],()=>g(p),{onError:m=>{o.A.error(`Loading layout preferences for "${p}" overview failed with ${m}`)},keepPreviousData:!0,staleTime:36e5});return{data:E!=null?E:n,isInitialLoading:l}}},MZSqcZgA:(x,y,e)=>{"use strict";e.d(y,{A:()=>Xt});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("wXrUUKFq"),o=e.n(s),n=e("rIl5IEuP"),c=e("yGRmSjYM"),g=e("q2j1bVbz"),d=e("M04itGxI"),f=e("4E3oowBb"),p=e("cB7h3AEX");const E=(0,r.default)(n.DropdownButton)`
  ~ .dropdown-menu {
    min-width: auto;
    max-width: 180px;
  }
`,l=(0,r.default)(n.Checkbox)`
  &.checkbox {
    margin: 0 5px 0 0;

    label {
      display: flex;
      align-items: center;
      padding: 0;

      input {
        margin: 0;
        position: relative;
      }
    }
  }
`,m=r.default.div`
  display: flex;
`,h=(0,r.default)(d.A)`
  display: inline;
`,A=({allColumns:Ye,column:At,onClick:Ct,selectedColumns:Bt})=>{const Ze=Bt.includes(At.id),gt=()=>{const cn=Ye.reduce((un,_n)=>{const vn=At.id===_n.id;return vn&&!Ze||!vn&&Bt.includes(_n.id)?[...un,_n.id]:un},[]);Ct(cn)};return t.createElement(p.A,{onSelect:gt,title:`${Ze?"Hide":"Show"} ${At.title}`},t.createElement(m,null,t.createElement(l,{checked:Ze,onChange:gt}),t.createElement(h,null,At.title)))},_=({onChange:Ye,selectedColumns:At,allColumns:Ct})=>{const Bt=(0,t.useMemo)(()=>Ct.sort((Ze,gt)=>(0,f.j)(Ze.title,gt.title)),[Ct]);return t.createElement(E,{title:"Columns",bsSize:"small",pullRight:!0,"aria-label":"Configure visible columns",id:"columns-visibility-select",bsStyle:"default",closeOnItemClick:!1},Bt.map(Ze=>t.createElement(A,{column:Ze,onClick:Ye,key:Ze.id,allColumns:Ct,selectedColumns:At})))};var P=e("IOI9nV80");const M={types:{DATE:{renderCell:Ye=>t.createElement(P.Dc,{dateTime:Ye}),staticWidth:160},STRING:{renderCell:Ye=>t.createElement(d.A,null,Ye)}},attributes:{description:{width:2},summary:{width:1.5},owner:{staticWidth:120},favorite:{renderHeader:()=>"",staticWidth:30}}};var O=e("HhRuy6uH");const U=({tableWidth:Ye,actionsColWidth:At,bulkSelectColWidth:Ct,columnsIds:Bt,columnRenderersByAttribute:Ze})=>{const gt=Bt.reduce((cn,un)=>{var _n,vn;return cn+((vn=(_n=Ze[un])==null?void 0:_n.staticWidth)!=null?vn:0)},0);return Ye-Ct-At-gt},W=({assignableWidth:Ye,columnsIds:At,columnRenderersByAttribute:Ct})=>{const Bt=At.reduce((gt,cn)=>{var un;const{staticWidth:_n,width:vn=O.CU}=(un=Ct[cn])!=null?un:{};return _n?gt:gt+vn},0),Ze=Ye/Bt;return Object.fromEntries(At.map(gt=>{var cn;const{staticWidth:un,width:_n=O.CU,minWidth:vn=O.F9}=(cn=Ct[gt])!=null?cn:{},Ln=un!=null?un:Ze*_n;return[gt,!un&&Ln{const[gt,cn]=(0,t.useState)({});return(0,t.useLayoutEffect)(()=>{if(!Ze)return;const un=U({actionsColWidth:Ye,columnRenderersByAttribute:Ct,columnsIds:Bt,bulkSelectColWidth:At,tableWidth:Ze});cn(W({assignableWidth:un,columnsIds:Bt,columnRenderersByAttribute:Ct}))},[Ye,At,Ct,Bt,Ze]),gt};var G=e("a5C0HdYb"),k=e("Ofda/4py"),Q=e("Nm+SUS6U");const ne=r.default.tr(({theme:Ye})=>(0,r.css)`
  &&&& {
    background-color: ${Ye.colors.global.contentBackground};
  }
`),z=r.default.div`
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
`,le=(0,r.default)(n.ButtonToolbar)`
  display: flex;
  align-items: center;
`,V=(0,r.default)(k.A)`
  margin-left: 5px;
`,Pe=({expandedSectionsRenderer:Ye,entity:At})=>{const{expandedSections:Ct,toggleSection:Bt}=(0,t.useContext)(Q.A),Ze=Ct==null?void 0:Ct[At.id];return Ze!=null&&Ze.length?t.createElement(ne,null,t.createElement("td",{colSpan:1e3},Object.entries(Ye!=null?Ye:{}).map(([gt,cn])=>{var un;if(!Ze.includes(gt))return null;const _n=()=>Bt(At.id,gt),vn=(un=cn.actions)==null?void 0:un.call(cn,At);return t.createElement("div",{key:`${gt}-${At.id}`},t.createElement(z,null,t.createElement("h3",null,cn.title),t.createElement(le,null,vn,t.createElement(V,{name:"close",onClick:_n,title:"Hide section"}))),cn.content(At))}))):null};var Ve=e("87D/Fijl"),at=e.n(Ve),ze=e("46ptGYIb");const he=({children:Ye,initialSelection:At,onChangeSelection:Ct})=>{const[Bt,Ze]=(0,t.useState)(At),gt=(0,t.useCallback)(vn=>{const Ln=at()(vn)?vn(Bt):vn;Ze(Ln),Ct&&Ct(Ln)},[Ct,Bt]),cn=(0,t.useCallback)(vn=>gt(Ln=>Ln.filter(Xn=>Xn!==vn)),[gt]),un=(0,t.useCallback)(vn=>gt(Ln=>[...Ln,vn]),[gt]),_n=(0,t.useMemo)(()=>({setSelectedEntities:gt,selectedEntities:Bt,deselectEntity:cn,selectEntity:un}),[gt,Bt,cn,un]);return t.createElement(ze.A.Provider,{value:_n},Ye)};he.defaultProps={initialSelection:[]};const Ie=he;var Re=e("TJOheZRu"),ce=e("JNPySgKz");const Ee=r.default.div`
  display: flex;
  align-items: center;
`,oe=r.default.div`
  margin-left: 5px;
`,ye=({bulkActions:Ye})=>{const{selectedEntities:At}=(0,ce.A)();return t.createElement(Ee,null,Ye,!!At.length&&t.createElement(oe,null,At.length," ",Re.A.pluralize(At.length,"item","items")," selected"))};var Oe=e("yKXoRDZT");const ve=(0,r.default)(Oe.A)`
  display: inline-block;
  margin-left: 6px;
  padding: 0;
  cursor: pointer;
`,_e={ASC:"asc",DESC:"desc"},He={asc:"ascending",desc:"descending"},Qe=({onChange:Ye,activeSort:At,column:Ct})=>{const Bt=(At==null?void 0:At.attributeId)===Ct.id,Ze=!Bt||At.direction===_e.DESC?_e.ASC:_e.DESC,gt=`Sort ${Ct.title.toLowerCase()} ${He[Ze]}`,cn=()=>{Ye({attributeId:Ct.id,direction:Ze})};return t.createElement(ve,{activeDirection:Bt?At.direction:void 0,onChange:cn,title:gt,ascId:_e.ASC,descId:_e.DESC})};var zt=e("efAt+LzL"),xe=e.n(zt);const ke=(0,r.default)(n.Checkbox)`
  &.checkbox {
    margin: 0;
  
    label {
      display: flex;
      align-items: center;
      padding: 0;
      
      input {
        width: 14px;
        height: 14px;
        cursor: pointer;
        margin: 0;
        position: relative;
      }
    }
  }
`,Se=(Ye,At)=>{const Ct=(0,t.useRef)(),Bt=(0,t.useMemo)(()=>{const Ze=Ye.filter(({id:gt})=>At.includes(gt));return Ze.length===0?"UNCHECKED":Ze.length===Ye.length?"CHECKED":"PARTIAL"},[Ye,At]);return(0,t.useEffect)(()=>{if(Ct.current){if(Bt==="PARTIAL"){Ct.current.indeterminate=!0;return}Ct.current.indeterminate=!1}},[Bt]),{checkboxRef:Ct,checkboxStatus:Bt}},nt=({data:Ye})=>{const{selectedEntities:At,setSelectedEntities:Ct}=(0,ce.A)(),{checkboxRef:Bt,checkboxStatus:Ze}=Se(Ye,At),gt=`${Ze==="CHECKED"?"Deselect":"Select"} all visible entities`,cn=()=>{Ct(un=>{const _n=Ye.map(({id:vn})=>vn);return Ze==="CHECKED"?un.filter(vn=>!_n.includes(vn)):xe()([...un,..._n])})};return t.createElement(Le,{$width:O.SD},t.createElement(ke,{inputRef:un=>{Bt.current=un},onChange:cn,checked:Ze==="CHECKED",title:gt,disabled:!(Ye!=null&&Ye.length),"aria-label":gt}))},Wt=r.default.thead(({theme:Ye})=>(0,r.css)`
  background-color: ${Ye.colors.global.contentBackground};
`),Le=r.default.th(({$width:Ye,theme:At})=>(0,r.css)`
  width: ${Ye?`${Ye}px`:"auto"};
  background-color: ${At.colors.table.head.background};
`),Fe=({activeSort:Ye,column:At,columnRenderer:Ct,onSortChange:Bt,colWidth:Ze})=>{const gt=(0,t.useMemo)(()=>typeof(Ct==null?void 0:Ct.renderHeader)=="function"?Ct.renderHeader(At):At.title,[At,Ct]);return t.createElement(Le,{$width:Ze},gt,At.sortable&&t.createElement(Qe,{onChange:Bt,column:At,activeSort:Ye}))},qe=(0,r.default)(Le)(({$width:Ye})=>(0,r.css)`
  text-align: right;
  width: ${Ye?`${Ye}px`:"auto"};
`),ft=({actionsColWidth:Ye,activeSort:At,columns:Ct,columnsOrder:Bt,columnRenderersByAttribute:Ze,columnsWidths:gt,data:cn,displayActionsCol:un,displayBulkSelectCol:_n,onSortChange:vn})=>{const Ln=(0,t.useMemo)(()=>Ct.sort((Xn,no)=>Bt.indexOf(Xn.id)-Bt.indexOf(no.id)),[Ct,Bt]);return t.createElement(Wt,null,t.createElement("tr",null,_n&&t.createElement(nt,{data:cn}),Ln.map(Xn=>{const no=Ze[Xn.id];return t.createElement(Fe,{columnRenderer:no,column:Xn,colWidth:gt[Xn.id],onSortChange:vn,activeSort:At,key:Xn.title})}),un?t.createElement(qe,{$width:Ye},"Actions"):null))};var Ot=e("CrIFpfDF"),Lt=e("WoBpjwwo"),an=e.n(Lt);const Ft=r.default.td`
  word-break: break-word;
`,$t=({column:Ye,columnRenderer:At,entity:Ct,entityAttributesAreCamelCase:Bt})=>{const Ze=Bt?an()(Ye.id):Ye.id,gt=Ct[Ze],cn=typeof(At==null?void 0:At.renderCell)=="function"?At.renderCell(gt,Ct,Ye):gt;return t.createElement(Ft,null,cn)},be=r.default.td`
  float: right;
  text-align: right;

  .btn-toolbar {
    display: inline-flex;
  }
`,yn=r.default.div`
  display: inline-flex;
`,Kt=({columns:Ye,columnRenderersByAttribute:At,displaySelect:Ct,displayActions:Bt,entity:Ze,rowActions:gt,index:cn,actionsRef:un,entityAttributesAreCamelCase:_n,isEntitySelectable:vn})=>{const{selectedEntities:Ln,setSelectedEntities:Xn}=(0,ce.A)(),no=!!(Ln!=null&&Ln.includes(Ze.id)),Wo=(0,t.useCallback)(()=>{Xn(Mt=>Mt.includes(Ze.id)?Mt.filter(Rt=>Rt!==Ze.id):[...Mt,Ze.id])},[Ze.id,Xn]),Co=Bt?t.createElement(Ot.A,null,gt(Ze)):null,Fo=(0,t.useMemo)(()=>!(Ct&&vn(Ze)),[Ct,Ze,vn]),rt=`${no?"Deselect":"Select"} entity`;return t.createElement("tr",null,Ct&&t.createElement("td",{"aria-label":"Select cell"},t.createElement(ke,{onChange:Wo,title:rt,checked:no,disabled:Fo,"aria-label":rt})),Ye.map(Mt=>{const Rt=At[Mt.id];return t.createElement($t,{columnRenderer:Rt,entityAttributesAreCamelCase:_n,entity:Ze,column:Mt,key:`${Ze.id}-${Mt.id}`})}),Bt?t.createElement(be,null,cn===0?t.createElement(yn,{ref:un},Co):Co):null)};Kt.defaultProps={rowActions:void 0};const An=t.memo(Kt);var qt=e("ii0bleBb"),io=e.n(qt);const Be=({children:Ye})=>{const[At,Ct]=(0,t.useState)(),Bt=(0,t.useCallback)((gt,cn)=>Ct(un=>{var _n,vn;const Ln={...un!=null?un:{}};if((_n=Ln[gt])!=null&&_n.includes(cn)){const Xn=Ln[gt].filter(no=>no!==cn);return Xn.length===0?(delete Ln[gt],Ln):{...Ln,[gt]:Xn}}return{...Ln,[gt]:[...(vn=Ln[gt])!=null?vn:[],cn]}}),[]),Ze=(0,t.useMemo)(()=>({expandedSections:At,toggleSection:Bt}),[At,Bt]);return t.createElement(Q.A.Provider,{value:Ze},Ye)};Be.propTypes={children:io().node.isRequired};const bn=Be,gn=r.default.div`
  width: 100%;
  overflow-x: auto;
`,wn=(0,r.default)(n.Table)(({theme:Ye})=>(0,r.css)`
  table-layout: fixed;

  thead > tr > th,
  tbody > tr > td {
    padding: ${O.xb}px;
  }

  && {
    > tbody:nth-of-type(even) > tr {
      background-color: ${Ye.colors.table.row.backgroundAlt};
    }

    > tbody:nth-of-type(odd) > tr {
      background-color: ${Ye.colors.table.row.background};
    }
  }
`),Zn=r.default.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  min-height: 22px;
`,Vn=r.default.div`
  display: flex;
  align-items: center;
  gap: 5px;
`,po=(Ye,At)=>Ye.filter(({permissions:Ct,anyPermissions:Bt,hidden:Ze})=>Ze?!1:Ct!=null&&Ct.length?Bt?(0,c.h5)(At,Ct):(0,c.Nn)(At,Ct):!0),De=(Ye,At)=>At.map(Ct=>Ye.find(({id:Bt})=>Bt===Ct)).filter(Ct=>!!Ct),ln=({columns:Ye,columnRenderersByAttribute:At,displayBulkSelectCol:Ct,fixedActionsCellWidth:Bt})=>{var Ze,gt;const cn=(0,t.useRef)(null),un=(0,t.useRef)(),{width:_n}=(0,G.A)(cn),vn=(0,t.useMemo)(()=>Ye.map(({id:Wo})=>Wo),[Ye]),Ln=Bt!=null?Bt:(gt=(Ze=un.current)==null?void 0:Ze.offsetWidth)!=null?gt:0,Xn=Ln?Ln+O.xb*2:0,no=j({actionsColWidth:Xn,bulkSelectColWidth:Ct?O.SD:0,columnRenderersByAttribute:At,columnsIds:vn,tableWidth:_n});return{tableRef:cn,actionsRef:un,columnsWidths:no,actionsColWidth:Xn}},bt=(Ye,At)=>{const Ct=o()({},M,At);return Object.fromEntries(Ye.map(({id:Bt,type:Ze})=>{var gt,cn;const un=(gt=Ct.types)==null?void 0:gt[Ze],_n=(cn=Ct.attributes)==null?void 0:cn[Bt],vn=o()({},un,_n);return[Bt,vn]}))},It=({actionsCellWidth:Ye,activeSort:At,entityAttributesAreCamelCase:Ct,bulkSelection:{actions:Bt,onChangeSelection:Ze,initialSelection:gt,isEntitySelectable:cn},columnDefinitions:un,columnRenderers:_n,columnsOrder:vn,data:Ln,expandedSectionsRenderer:Xn,onColumnsChange:no,onPageSizeChange:Wo,onSortChange:Co,pageSize:Fo,rowActions:rt,visibleColumns:Mt})=>{const Rt=(0,g.A)(),fn=typeof rt=="function",Dn=!!Bt,kn=typeof Ze=="function"||Dn,ro=typeof Wo=="function",Gn=(0,t.useCallback)(Bn=>kn?typeof cn=="function"?cn(Bn):!0:!1,[kn,cn]),vo=(0,t.useMemo)(()=>po(un,Rt.permissions),[un,Rt.permissions]),yo=(0,t.useMemo)(()=>De(vo,Mt),[vo,Mt]),lo=(0,t.useMemo)(()=>bt(yo,_n),[yo,_n]),{tableRef:Jn,actionsRef:Yn,actionsColWidth:Gt,columnsWidths:tn}=ln({columns:yo,columnRenderersByAttribute:lo,displayBulkSelectCol:kn,fixedActionsCellWidth:Ye}),Qt=(0,t.useMemo)(()=>Ln.filter(Gn),[Ln,Gn]);return t.createElement(Ie,{initialSelection:gt,onChangeSelection:Ze},t.createElement(bn,null,t.createElement(Zn,null,t.createElement("div",null,Dn&&t.createElement(ye,{bulkActions:Bt})),t.createElement(Vn,null,"Show",t.createElement(n.ButtonGroup,null,ro&&t.createElement(P.t7,{pageSize:Fo,showLabel:!1,onChange:Wo}),t.createElement(_,{allColumns:vo,selectedColumns:Mt,onChange:no})))),t.createElement(gn,{id:"scroll-container",ref:Jn},t.createElement(wn,{striped:!0,condensed:!0,hover:!0},t.createElement(ft,{columns:yo,columnsOrder:vn,actionsColWidth:Gt,columnsWidths:tn,data:Qt,columnRenderersByAttribute:lo,onSortChange:Co,displayBulkSelectCol:kn,activeSort:At,displayActionsCol:fn}),Ln.map((Bn,co)=>t.createElement("tbody",{key:`table-row-${Bn.id}`,"data-testid":`table-row-${Bn.id}`},t.createElement(An,{entity:Bn,index:co,entityAttributesAreCamelCase:Ct,actionsRef:Yn,columnRenderersByAttribute:lo,rowActions:rt,displaySelect:kn,isEntitySelectable:Gn,displayActions:fn,columns:yo}),t.createElement(Pe,{key:`expanded-sections-${Bn.id}`,expandedSectionsRenderer:Xn,entity:Bn})))))))};It.defaultProps={actionsCellWidth:void 0,activeSort:void 0,columnRenderers:void 0,columnsOrder:[],expandedSectionsRenderer:void 0,onPageSizeChange:void 0,pageSize:void 0,rowActions:void 0,entityAttributesAreCamelCase:!0,bulkSelection:{}};const Xt=It},gn61rwrR:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("J6y4/h8P"),n=e("rIl5IEuP");const c=o.default.ul`
  padding: 0;
  margin: 0;
`,g=({bsNoItemsStyle:f,items:p,noItemsText:E})=>p.length===0?s.createElement(n.Alert,{bsStyle:f},E):s.createElement(c,null,p);g.defaultProps={bsNoItemsStyle:"info",noItemsText:"No items available"},g.propTypes={bsNoItemsStyle:r().oneOf(["info","success","warning"]),noItemsText:r().oneOfType([r().string,r().element]),items:r().array.isRequired};const d=g},KDUSw0C6:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("J6y4/h8P"),n=e("rIl5IEuP");const c=o.default.li(({theme:f})=>(0,o.css)`
  display: block;
  padding: 15px 0;

  h2 {
    font-family: ${f.fonts.family.body};
  }

  h2 .label {
    margin-left: 5px;
    line-height: 1;
    vertical-align: baseline;
  }

  .item-description {
    min-height: 17px;
    margin: 5px 0;
  }

  .item-actions > .btn,
  .item-actions > .btn-group,
  .item-actions > span > .btn {
    margin-left: 5px;
    margin-bottom: 5px;
  }

  &:not(:last-child) {
    border-bottom: 1px solid ${f.colors.gray[90]};
  }
`),g=({actions:f,contentRow:p,description:E,title:l,titleSuffix:m})=>{const h=m?s.createElement("small",null,m):null,A=s.createElement("div",{className:"item-actions text-right"},f);return s.createElement(c,null,s.createElement(n.Row,{className:"row-sm"},s.createElement(n.Col,{md:12},s.createElement("div",{className:"pull-right hidden-xs"},A),s.createElement("h2",null,l," ",h),E&&s.createElement("div",{className:"item-description"},s.createElement("span",null,E))),s.createElement(n.Col,{sm:12,lgHidden:!0,mdHidden:!0,smHidden:!0},A)),p&&s.createElement(n.Row,{className:"row-sm"},p))};g.propTypes={title:r().oneOfType([r().string,r().node]).isRequired,titleSuffix:r().any,description:r().any,actions:r().oneOfType([r().array,r().node]),contentRow:r().node},g.defaultProps={actions:void 0,contentRow:void 0,description:void 0,titleSuffix:void 0};const d=g},myNaa1PZ:(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("UiXZqrDE"),n=e("rIl5IEuP");const c=p=>({defaultChecked:p!=null?p:!1}),g=p=>({value:p!=null?p:""}),d=({name:p,type:E,help:l,validate:m,onChange:h,error:A,...C})=>{const{validateOnChange:_}=(0,o.useFormikContext)();return t.createElement(o.Field,{name:p,validate:m},({field:{value:P,onChange:I,onBlur:M},meta:{error:O,touched:U}})=>{const W=E==="checkbox"?c(P):g(P),j=(_?!!(O&&U):!!O)?O:A,G=k=>{typeof h=="function"&&h(k),I(k)};return t.createElement(n.Input,{...C,...W,onBlur:M,help:l,id:p,error:j,onChange:G,type:E})})};d.propTypes={autoComplete:s().string,bsSize:s().string,buttonAfter:s().oneOfType([s().string,s().element]),children:s().oneOfType([s().array,s().element]),disabled:s().bool,error:s().oneOfType([s().string,s().element]),formGroupClassName:s().string,help:s().oneOfType([s().string,s().element]),label:s().oneOfType([s().string,s().element]),labelClassName:s().string,max:s().number,min:s().number,maxLength:s().number,minLength:s().number,name:s().string.isRequired,onChange:s().func,placeholder:s().string,required:s().bool,type:s().string,validate:s().func,wrapperClassName:s().string,autoFocus:s().bool},d.defaultProps={autoComplete:void 0,bsSize:void 0,buttonAfter:void 0,children:null,disabled:!1,error:void 0,formGroupClassName:void 0,help:void 0,label:void 0,labelClassName:void 0,max:void 0,min:void 0,maxLength:void 0,minLength:void 0,onChange:void 0,placeholder:void 0,required:!1,type:"text",validate:()=>{},wrapperClassName:void 0,autoFocus:!1};const f=d},"6tmAsyUP":(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("IOI9nV80"),c=e("u2QUEJU3");const g=o.default.span(({theme:l})=>(0,o.css)`
  ul {
    padding-left: 0;
  }

  li {
    margin-bottom: 5px;

    &:last-child {
      margin-bottom: 0;
    }
  }

  h4 {
    font-size: ${l.fonts.size.large};
  }
`),d=(0,o.default)(c.A)(({theme:l,$type:m,$displayLeftMargin:h})=>(0,o.css)`
  display: inline-flex;
  color: ${m==="error"?l.colors.variant.danger:"inherit"};
  margin: 0;
  margin-left: ${h?"0.3em":0};
  pointer-events: auto !important;
`),f=l=>{switch(l){case"error":return"error";case"info":default:return"help"}},p=({children:l,className:m,displayLeftMargin:h,title:A,id:C,pullRight:_,placement:P,testId:I,type:M,iconSize:O,trigger:U})=>t.createElement(n.N,{trigger:U,placement:P,overlay:t.createElement(g,{id:C},l),title:A,testId:I},t.createElement(d,{className:`${m} ${_?"pull-right":""}`,name:f(M),type:"regular",$type:M,$displayLeftMargin:h,size:O}));p.propTypes={displayLeftMargin:s().bool,children:s().any.isRequired,className:s().string,id:s().string,placement:s().oneOf(["top","right","bottom","left"]),pullRight:s().bool,title:s().string,testId:s().string,trigger:s().arrayOf(s().oneOf(["click","focus","hover"]))||s().oneOf(["click","focus","hover"])},p.defaultProps={id:"help-popover",className:"",pullRight:!0,placement:"bottom",testId:void 0,title:void 0,type:"info",iconSize:void 0,trigger:["hover","focus"],displayLeftMargin:!1};const E=p},u2QUEJU3:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("J6y4/h8P");const s={xs:".938em",sm:"1.094em",lg:"1.438em",xl:"1.725em","2x":"2.30em","3x":"3.45em","4x":"4.60em","5x":"5.75em"},o=(0,r.keyframes)`
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(359deg);
  }
`,n=r.default.span(({$size:f,$spin:p,$rotation:E,$flip:l,$fill:m})=>{var h;return(0,r.css)`
  font-variation-settings: 'opsz' 48, 'wght' 700 ${m?", 'FILL' 1":""};
  font-size: ${(h=s[f])!=null?h:"1.15em"};
  transform: rotate(${E}deg) scaleY(${l==="horizontal"||l==="both"?-1:1}) scaleX(${l==="vertical"||l==="both"?-1:1});
  animation: ${p?(0,r.css)`${o} 2s infinite linear`:"none"};
  vertical-align: middle;
`}),c=({name:f,type:p,size:E,className:l,rotation:m,spin:h,flip:A,style:C,"data-testid":_,onClick:P,onMouseEnter:I,onMouseLeave:M,onFocus:O,tabIndex:U,title:W})=>t.createElement(n,{className:`material-symbols-rounded ${l!=null?l:""}`,"data-testid":_,onClick:P,style:C,title:W,onFocus:O,onMouseEnter:I,onMouseLeave:M,tabIndex:U,$rotation:m,$flip:A,$size:E,$fill:p==="solid",$spin:h},f);c.defaultProps={className:void 0,"data-testid":void 0,flip:void 0,rotation:0,size:void 0,spin:!1,style:void 0,type:"solid",onClick:void 0,onMouseEnter:void 0,onMouseLeave:void 0,onFocus:void 0,tabIndex:void 0,title:void 0};const d=c},"Ofda/4py":(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("u2QUEJU3");const c=o.default.button(({theme:p,disabled:E})=>(0,o.css)`
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 25px;
  width: 25px;
  border: 0;
  background-color: transparent;
  cursor: pointer;
  color: ${E?p.colors.gray[90]:p.colors.gray[60]};
  font-size: ${p.fonts.size.large};

  &:hover {
    background-color: ${p.colors.gray[80]};
  }

  &:active {
    background-color: ${p.colors.gray[70]};
  }
`),g=p=>{typeof p=="function"&&p()},d=t.forwardRef(({title:p,onClick:E,focusable:l,className:m,disabled:h,iconType:A,"data-testid":C,..._},P)=>t.createElement(c,{ref:P,tabIndex:l?0:-1,"data-testid":C,title:p,onClick:()=>g(E),className:m,type:"button",disabled:h},t.createElement(n.A,{type:A,..._})));d.propTypes={className:s().string,title:s().string,onClick:s().func,name:s().any},d.defaultProps={className:void 0,focusable:!0,onClick:void 0,title:void 0,name:void 0,disabled:!1,rotation:void 0,iconType:void 0,"data-testid":void 0};const f=d},rzOX6PZw:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("q2j1bVbz"),n=e("yGRmSjYM");const c=(f,p,E)=>p?(0,n.h5)(E.permissions,f):(0,n.Nn)(E.permissions,f),g=({children:f,permissions:p,anyPermissions:E,...l})=>{const m=(0,o.A)();return!p||p.length===0||m&&c(p,E,m)?t.createElement(t.Fragment,null,t.Children.map(f,h=>{if(t.isValidElement(h)){const A=h&&h.props?Object.keys(h.props):[],C=Object.entries(l).filter(_=>!A.includes(_[0])).reduce((_,[P,I])=>({..._,[P]:I}),{});return t.cloneElement(h,C)}return h})):null};g.propTypes={children:s().node.isRequired,permissions:s().oneOfType([s().string,s().arrayOf(s().string)]).isRequired,anyPermissions:s().bool},g.defaultProps={anyPermissions:!1};const d=g},"Kz+u8q89":(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("rIl5IEuP");const c=o.default.span(({theme:p})=>(0,o.css)`
  color: ${p.colors.variant.danger};
`),g=o.default.span(({theme:p,$hasError:E})=>(0,o.css)`
  color: ${E?p.colors.gray[50]:"inherit"};
`),d=({className:p,error:E,help:l})=>!l&&!E?null:t.createElement(n.HelpBlock,{className:`${p!=null?p:""} input-description`},E&&t.createElement(c,null,E),!!E&&!!l&&t.createElement("br",null),l&&t.createElement(g,{$hasError:!!E},l));d.propTypes={className:s().string,error:s().oneOfType([s().element,s().string]),help:s().oneOfType([s().element,s().string])},d.defaultProps={className:void 0,error:void 0,help:void 0};const f=d},hrjdtDAf:(x,y,e)=>{"use strict";e.d(y,{A:()=>W});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("tfZpVkE/"),n=e("J6y4/h8P"),c=e("Mx+G+HdB"),g=e.n(c),d=e("rIl5IEuP"),f=e("u2QUEJU3");const p={width:450,height:400},E=Math.ceil(window.innerWidth/2-p.width/2),l=Math.ceil(window.innerHeight/2-p.height/2),m=l<0?55:l,h={x:E,y:m},A=n.default.div`
  position: fixed;
  inset: 0;
  z-index: 1030;
  pointer-events: none;
`,C=(0,n.default)(o.p)(({theme:K})=>(0,n.css)`
  box-shadow: 0 0 9px ${K.colors.global.navigationBoxShadow},
    0 0 6px ${K.colors.global.navigationBoxShadow},
    0 0 3px ${K.colors.global.navigationBoxShadow};
  background-color: ${K.colors.global.contentBackground};
  border: 1px solid ${K.colors.variant.lightest.default};
  border-radius: 3px;
  flex-direction: column;
  display: flex !important;
  pointer-events: auto;
`),_=n.default.div`
  flex: 1;
  padding: 0 15px;
`,P=n.default.header(({theme:K})=>(0,n.css)`
  padding: 6px 12px 9px;
  display: flex;
  align-items: center;
  background-color: ${K.colors.variant.lightest.default};
  border-bottom: 1px solid ${K.colors.variant.lighter.default};
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  cursor: move;
`),I=n.default.h3(({theme:K})=>(0,n.css)`
  color: ${K.colors.global.textDefault};
  flex: 1;
`),M=(0,n.default)(f.A)(({theme:K})=>(0,n.css)`
  color: ${K.colors.variant.darker.default};
  margin-right: 9px;
`),O=(0,n.default)(d.Button)(({theme:K})=>(0,n.css)`
  && {
    color: ${K.colors.variant.light.default};
    
    &:hover {
      color: ${K.colors.variant.default};
    }
  }
`),U=({children:K,className:j,minHeight:G,minWidth:k,onClose:Q,onDrag:ne,onResize:z,position:le,size:V,title:me,wrapperClassName:Pe})=>{const Ve=(0,t.useRef)(null),[at,ze]=(0,t.useState)(null),[he,Ie]=(0,t.useState)(le),[Re,ce]=(0,t.useState)(V),Ee=(ye,{x:Oe,y:ve})=>{Ie({x:Oe,y:ve}),ne({x:Oe,y:ve})},oe=(ye,Oe,ve)=>{const _e={width:ve.style.width,height:ve.style.height};let He={...he};switch(Oe){case"left":case"topLeft":case"top":He={x:he.x-(parseFloat(ve.style.width)-parseFloat(Re.width)),y:he.y-(parseFloat(ve.style.height)-parseFloat(Re.height))};break;case"bottomLeft":He={x:he.x-(parseFloat(ve.style.width)-parseFloat(Re.width)),y:he.y};break;case"topRight":He={x:he.x,y:he.y-(parseFloat(ve.style.height)-parseFloat(Re.height))};break;default:break}ce(_e),z(_e),Ee(null,He)},ae=g()(()=>{const{x:ye,y:Oe}=he,{width:ve,height:_e}=Re,{innerWidth:He,innerHeight:je}=window,Qe={top:0,bottom:parseFloat(_e),left:0,right:parseFloat(ve)},zt=He-Qe.right,xe=je-Qe.bottom,Ue={x:Math.max(Math.min(zt,ye),Qe.left),y:Math.max(Math.min(xe,Oe),Qe.top)};Ee(null,Ue)},150);return(0,t.useEffect)(()=>{ze(Ve.current.classList[0])},[]),(0,t.useEffect)(()=>(window.addEventListener("resize",ae,!1),()=>{window.removeEventListener("resize",ae)}),[he,ae]),t.createElement(A,{className:Pe,role:"dialog"},t.createElement(C,{default:{...le,...V},minHeight:G,minWidth:k,maxHeight:window.innerHeight,maxWidth:window.innerWidth,dragHandleClassName:at,onDragStop:Ee,onResizeStop:oe,position:he,size:Re,className:j,bounds:"window"},t.createElement(P,{ref:Ve},t.createElement(I,null,t.createElement(M,{name:"drag_indicator"}),me),t.createElement(O,{bsStyle:"link",onClick:Q,bsSize:"small",title:"Close"},t.createElement(f.A,{name:"close",size:"lg"}))),t.createElement(_,null,K)))};U.propTypes={className:s().string,children:s().node.isRequired,minHeight:s().number,minWidth:s().number,onClose:s().func,onDrag:s().func,onResize:s().func,position:s().shape({x:s().number,y:s().number}),size:s().shape({height:s().oneOfType([s().string,s().number]),width:s().oneOfType([s().string,s().number])}),title:s().string,wrapperClassName:s().string},U.defaultProps={className:void 0,minHeight:p.height,minWidth:p.width,onClose:()=>{},onDrag:()=>{},onResize:()=>{},position:h,size:p,title:"",wrapperClassName:void 0};const W=U},"k7aCBAx/":(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("rIl5IEuP"),c=e("dsvqAVKU"),g=e("rRqvmggl");const d=o.default.div(({theme:l})=>(0,o.css)`
  background-color: ${l.colors.global.contentBackground};
  position: fixed;
  min-width: 200px;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 10px rgb(0 0 0 / 20%);
  z-index: 2000;
`),f=(0,o.default)(n.Alert)`
  margin: 0;
  height: 32px;
  padding: 5px 20px;
  text-align: center;
`,p=({text:l,longWaitText:m,longWaitTimeout:h})=>{const[A,C]=(0,t.useState)(l);return(0,t.useEffect)(()=>{const _=setTimeout(()=>{C(m)},h);return()=>clearTimeout(_)},[m,h]),t.createElement(g.A,{delay:500},t.createElement(d,null,t.createElement(f,{bsStyle:"info"},t.createElement(c.A,{delay:0,text:A}))))};p.propTypes={text:s().string,longWaitText:s().string,longWaitTimeout:s().number},p.defaultProps={text:"Loading...",longWaitText:"This is taking a bit longer, please hold on...",longWaitTimeout:2e4};const E=p},s14Hze4o:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("XtvWbNyo"),s=e("AbA4Yk3R"),o=e.n(s);const c=({text:g})=>{const d=(0,t.useMemo)(()=>o().sanitize((0,r.xI)(g!=null?g:"")),[g]);return t.createElement("div",{dangerouslySetInnerHTML:{__html:d}})}},rp7UD7rK:(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("+Ej1FZHV"),o=e("CrIFpfDF"),n=e("u2QUEJU3"),c=e("dsvqAVKU");const g=(0,r.default)(o.A)`
  display: flex;
  justify-content: flex-end;
  align-items: end;
  gap: 0.25em;
`,d=p=>{const{isAsyncSubmit:E,bsSize:l,className:m,displayCancel:h,disabledSubmit:A,formId:C,leftCol:_,onSubmit:P,submitButtonText:I,submitButtonType:M,submitIcon:O}=p,U=typeof I=="string"?I:void 0;return t.createElement(g,{className:m},_,h&&t.createElement(s.A,{type:"button",bsSize:l,onClick:p.onCancel,title:"Cancel","aria-label":"Cancel",disabled:p.disabledCancel||E&&p.isSubmitting},"Cancel"),t.createElement(s.A,{bsStyle:"success",bsSize:l,disabled:A||E&&p.isSubmitting,form:C,title:U,"aria-label":U,type:M,onClick:P},O&&!(E&&p.isSubmitting)&&t.createElement(t.Fragment,null,t.createElement(n.A,{name:O})," "),E&&p.isSubmitting?t.createElement(c.A,{text:p.submitLoadingText,delay:0}):I))};d.defaultProps={bsSize:void 0,className:void 0,disabledSubmit:!1,displayCancel:!0,isAsyncSubmit:!1,formId:void 0,isSubmitting:!1,leftCol:void 0,onSubmit:void 0,submitButtonType:"submit",submitIcon:void 0};const f=d},kTp6yg80:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("hhdCSTZj");class s extends t.Component{constructor(){super(...arguments),this._select=void 0,this.getValue=()=>this._select.getValue()}render(){return t.createElement(r.A,{ref:c=>{this._select=c},multi:!0,...this.props})}}s.propTypes=r.A.propTypes;const o=s},"NV1/EHMi":(x,y,e)=>{"use strict";e.d(y,{Ay:()=>p,WS:()=>c,at:()=>g,l_:()=>n});var t=e("Z7aTuO5B"),r=e("J6y4/h8P");const s="nav-item-state-indicator",o="::before",n=`.${s}${o}`,c=E=>(0,r.css)`
  ${n} {
    border-color: ${E.colors.gray[70]};
  }
`,g=E=>(0,r.css)`
  ${n} {
    border-color: ${E.colors.gray[50]};
  }
`,d=r.default.div`
  display: inline;
  position: relative;
  
  &${o} {
    content: ' ';
    position: absolute;
    border-bottom: 1px solid transparent;
    left: 0;
    width: 100%;
    bottom: -4px;
  }
`,p=({children:E})=>t.createElement(d,{className:s},E)},"G8YcST+s":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("rIl5IEuP");const n=({children:g})=>t.createElement(o.Alert,{className:"no-bm"},g);n.propTypes={children:s().oneOfType([s().node])},n.defaultProps={children:"No entities exist."};const c=n},F3uT4N0K:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("oNtoZaGG");const c=o.default.span(({$alwaysShowCaret:f})=>(0,o.css)`
  cursor: pointer;

  ${f?"":(0,o.css)`
    .caret {
      visibility: hidden;
    }

    &:hover .caret {
      visibility: visible;
    }
  `}
`),g=({alwaysShowCaret:f,children:p,closeOnSelect:E,dropdownZIndex:l,menuContainer:m,onToggle:h,placement:A,show:C,toggleChild:_})=>{const P=(0,t.useRef)();return t.createElement(n.A,{opened:C,withinPortal:!0,position:A,closeOnItemClick:E,onClose:h,portalProps:{target:m},zIndex:l},t.createElement(n.A.Target,null,t.createElement(c,{$alwaysShowCaret:f,onClick:h,ref:P,role:"presentation"},_)),t.createElement(n.A.Dropdown,null,p))};g.propTypes={alwaysShowCaret:s().bool,children:s().node.isRequired,closeOnSelect:s().bool,dropdownZIndex:s().number,menuContainer:s().object,onToggle:s().func.isRequired,placement:s().string,show:s().bool.isRequired,toggleChild:s().oneOfType([s().string,s().node])},g.defaultProps={alwaysShowCaret:!1,closeOnSelect:!0,dropdownZIndex:void 0,menuContainer:document.body,placement:"bottom",toggleChild:"Toggle"};const d=g},"GV8+GAwa":(x,y,e)=>{"use strict";e.d(y,{A:()=>p});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("eGqpLdeU"),o=e("6j4Sgo2g"),n=e("UHsBGUYG");const c=n.L,g=r.default.span`
  display: inline-flex;
`,d=r.default.div`
  display: inline-flex;
`,f=t.forwardRef(({children:E,disabled:l,placement:m,overlay:h,rootClose:A,trigger:C,testId:_,className:P,title:I,width:M},O)=>{var U,W,K;const[j,{close:G,open:k,toggle:Q}]=(0,s.j)(!1);(0,t.useImperativeHandle)(O,()=>({hide:G}),[G]),f.hide=G;const ne=(0,t.useRef)(),[z,le]=(0,t.useState)(null),[V,me]=(0,t.useState)(null);c(A?G:()=>{},null,[V,z]);const Pe=C==="hover"||((U=C==null?void 0:C.includes)==null?void 0:U.call(C,"hover")),Ve=C==="focus"||((W=C==null?void 0:C.includes)==null?void 0:W.call(C,"focus")),at=C==="click"||((K=C==null?void 0:C.includes)==null?void 0:K.call(C,"click"));return l?E:t.createElement(d,{ref:ne,"data-testid":_,className:P},t.createElement(o.A,{opened:j,withArrow:!0,width:M,position:m,withinPortal:!0},t.createElement(o.A.Target,null,t.createElement(g,{className:E.props.className,ref:me,role:"button",onClick:at?Q:void 0,onMouseEnter:Pe?k:void 0,onMouseLeave:Pe?G:void 0,onFocus:Ve?k:void 0,onBlur:Ve?k:void 0},E)),t.createElement(o.A.Dropdown,{title:I},t.createElement("div",{ref:le},h))))});f.defaultProps={disabled:!1,trigger:"click",rootClose:!1,testId:void 0,className:void 0,width:275,title:void 0};const p=f},"/W/x1zfW":(x,y,e)=>{"use strict";e.d(y,{A:()=>M});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("Dg7SLLbb"),n=e.n(o),c=e("J6y4/h8P"),g=e("rIl5IEuP"),d=e("IOI9nV80"),f=e("7dh0vSOR"),p=e("iDUHYfT2");const E=c.default.div`
  display: flex;
  gap: 3px;
  flex-direction: column;
`,l=c.default.div(({theme:O})=>(0,c.css)`
  display: flex;
  justify-content: space-between;
  gap: 5px;

  @media (max-width: ${O.breakpoints.max.md}) {
    flex-wrap: wrap;
  }
`),m=c.default.span(({theme:O})=>(0,c.css)`
  cursor: help;
  margin-left: 5px;
  font-size: ${O.fonts.size.body};
  line-height: 20px;
  vertical-align: text-top;
`),h=c.default.div(({$hasMultipleChildren:O})=>(0,c.css)`
  display: flex;
  gap: 10px;
  align-items: ${O?"center":"flex-start"};
`),A=c.default.div`
  display: flex !important;
  align-items: flex-end;
  
  .btn-toolbar {
    display: flex;
  }
`,C=c.default.p`
  &&&& {
    margin-top: 0;
  }
`,_={experimental:"This Graylog feature is new and should be considered experimental.",legacy:"This feature has been discontinued and will be removed in a future Graylog version."},P=({lifecycle:O,lifecycleMessage:U})=>{if(O===void 0)return null;const W=n()(O),K=O==="experimental"?_.experimental:_.legacy,j=t.createElement(g.Tooltip,{id:O},U||K);return t.createElement(m,null,t.createElement(d.N,{placement:"bottom",overlay:j},t.createElement(g.Label,{bsStyle:"primary"},W)))},I=({children:O,subpage:U,title:W,actions:K,topActions:j,lifecycle:G,lifecycleMessage:k,documentationLink:Q})=>{const ne=U?"":"content";return t.createElement(p.A,{className:ne},t.createElement(g.Col,{sm:12},t.createElement(E,null,t.createElement(l,null,t.createElement("h1",null,W," ",t.createElement("small",null,t.createElement(P,{lifecycle:G,lifecycleMessage:k}))),(Q||j)&&t.createElement(h,{$hasMultipleChildren:!!Q&&!!j},Q&&t.createElement(f.A,{text:Q.title,page:Q.path,displayIcon:!0}),j)),t.createElement(l,null,O&&t.createElement(C,{className:"description no-bm"},O),K&&t.createElement(A,null,K)))))};I.propTypes={title:s().node.isRequired,children:s().node,actions:s().node,lifecycle:s().oneOf(["experimental","legacy"]),lifecycleMessage:s().node,subpage:s().bool,documentationLink:s().object},I.defaultProps={children:[],lifecycle:void 0,lifecycleMessage:void 0,topActions:void 0,actions:void 0,subpage:!1,documentationLink:void 0};const M=I},FDzjarsJ:(x,y,e)=>{"use strict";e.d(y,{A:()=>p});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("rIl5IEuP"),c=e("rVdVsuGH");const g=(0,o.default)(n.DropdownButton)`
  ~ .dropdown-menu {
    min-width: auto;
  }
`,d=o.default.div`
  display: flex;
  align-items: center;
  gap: 3px;
`,f=({pageSizes:E,pageSize:l,onChange:m,className:h,showLabel:A})=>{const C=t.createElement(g,{className:h,id:"page-size-select",title:`${l} Rows`,"aria-label":"Configure page size",pullRight:!0,bsSize:"small",bsStyle:"default"},E.map(_=>t.createElement(n.MenuItem,{key:`option-${_}`,onSelect:()=>m(_)},_)));return A?t.createElement(d,{className:h},"Show",C):C};f.propTypes={className:s().string,onChange:s().func.isRequired,pageSize:s().number.isRequired,pageSizes:s().arrayOf(s().number),showLabel:s().bool},f.defaultProps={className:"",pageSizes:c.ZE,showLabel:!0};const p=f},"a/tXGb/M":(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("ii0bleBb"),o=e.n(s),n=e("Ofda/4py");const c=r.default.span(({theme:l})=>(0,r.css)`
  display: flex;
  padding: 10px;
  background-color: ${l.colors.table.row.background};

  &:nth-of-type(even) {
    background-color: ${l.colors.table.row.backgroundAlt};
  }
`),g=r.default.div`
  flex: 1;
  margin-right: 5px;
`,d=r.default.span`
  flex: 2;
`,f=(0,r.default)(n.A)`
  flex: 0;
`,p=({item:{name:l,description:m},onDeleteItem:h,item:A})=>{const C=typeof h=="function"?t.createElement(f,{onClick:()=>h(A),name:"close",title:`Remove ${l}`}):null;return t.createElement(c,null,t.createElement(g,null,l),t.createElement(d,null,m),C)};p.defaultProps={onDeleteItem:void 0},p.propTypes={onDeleteItem:o().func};const E=p},xfUIbHjs:(x,y,e)=>{"use strict";e.d(y,{A:()=>p,n:()=>d});var t=e("Z7aTuO5B"),r=e("IOI9nV80"),s=e("qfE6wAsD"),o=e("TMaijZ0a"),n=e("dsvqAVKU"),c=e("a/tXGb/M");const g=[5,10,30],d={page:s.n,perPage:g[0],query:""},f=({onLoad:E,overrideList:l,onDeleteItem:m,queryHelper:h,noDataText:A,resultsWrapperComponent:C,overrideItemComponent:_})=>{var P,I;const[M,O]=(0,t.useState)(),[U,W]=(0,t.useState)(d);if((0,t.useEffect)(()=>l&&O(l),[l]),(0,t.useEffect)(()=>{let G=!0;return E(U,G).then(k=>{G&&O(k)}),()=>{G=!1}},[U,E]),!M)return t.createElement(n.A,null);const K=t.createElement(r.EO,null,A);let j;return M.list&&M.list.size>=1&&(j=M.list.toArray().map(G=>_?t.createElement(_,{key:G.id,onDeleteItem:m,item:G}):t.createElement(c.A,{key:G.id,onDeleteItem:m,item:G}))),t.createElement(s.A,{onChange:(G,k)=>W({...U,page:G,perPage:k}),pageSize:U.perPage,totalItems:(I=(P=M==null?void 0:M.pagination)==null?void 0:P.total)!=null?I:0,pageSizes:g,activePage:U.page,useQueryParameter:!1},t.createElement(o.A,{onSearch:G=>W({...U,page:s.n,query:G}),label:"Filter",queryWidth:300,wrapperClass:"has-bm",placeholder:"Enter query to filter",queryHelpComponent:h}),t.createElement(C,{isEmptyResult:!j},j!=null?j:K))};f.defaultProps={onDeleteItem:void 0,overrideList:void 0,noDataText:"No items found to display.",queryHelper:void 0,resultsWrapperComponent:({children:E})=>t.createElement("div",null,E),overrideItemComponent:void 0};const p=f},qfE6wAsD:(x,y,e)=>{"use strict";e.d(y,{A:()=>E,n:()=>c});var t=e("Z7aTuO5B"),r=e("wfOnu0E0"),s=e("rVdVsuGH"),o=e("wl9DHqUO"),n=e("FDzjarsJ");const c=1,g=({children:l,className:m,currentPage:h,currentPageSize:A,hideFirstAndLastPageLinks:C,hidePreviousAndNextPageLinks:_,onChange:P,pageSizes:I,setPagination:M,showPageSizeSelect:O,totalItems:U})=>{const W=(0,t.useMemo)(()=>A>0?Math.ceil(U/A):0,[A,U]),K=(0,t.useCallback)(G=>{M({page:c,pageSize:G}),P&&P(c,G)},[P,M]),j=(0,t.useCallback)(G=>{M({page:G,pageSize:A}),P&&P(G,A)},[M,A,P]);return(0,t.useEffect)(()=>{W>0&&h>W&&j(W)},[h,W,j]),t.createElement(t.Fragment,null,O&&t.createElement(n.A,{pageSizes:I,pageSize:A,showLabel:!0,onChange:K,className:"pull-right"}),l,t.createElement(r.A,null,t.createElement("div",{className:`text-center pagination-wrapper ${m!=null?m:""}`},t.createElement(o.A,{totalPages:W,currentPage:h,hidePreviousAndNextPageLinks:_,hideFirstAndLastPageLinks:C,onChange:j}))))},d=({pageSizes:l,...m})=>{const{page:h,pageSize:A,setPagination:C}=(0,s.Ay)(l,m.pageSize,m.showPageSizeSelect);return t.createElement(g,{...m,currentPage:h,currentPageSize:A,setPagination:C,pageSizes:l})},f=({activePage:l,pageSize:m,...h})=>{const[A,C]=(0,t.useState)(Math.max(l,c)),[_,P]=(0,t.useState)(m);(0,t.useEffect)(()=>{l>0&&C(l)},[l]),(0,t.useEffect)(()=>{P(m)},[m]);const I=(0,t.useCallback)(({page:M,pageSize:O})=>{P(O),C(M)},[]);return t.createElement(g,{...h,currentPage:A,currentPageSize:_,setPagination:I})},p=({activePage:l,children:m,className:h,hideFirstAndLastPageLinks:A,hidePreviousAndNextPageLinks:C,onChange:_,pageSize:P,pageSizes:I,showPageSizeSelect:M,totalItems:O,useQueryParameter:U})=>U?t.createElement(d,{className:h,hideFirstAndLastPageLinks:A,hidePreviousAndNextPageLinks:C,onChange:_,pageSizes:I,pageSize:P,showPageSizeSelect:M,totalItems:O},m):t.createElement(f,{className:h,hideFirstAndLastPageLinks:A,hidePreviousAndNextPageLinks:C,onChange:_,pageSizes:I,pageSize:P,showPageSizeSelect:M,totalItems:O,activePage:l},m);p.defaultProps={activePage:1,className:void 0,hideFirstAndLastPageLinks:!1,hidePreviousAndNextPageLinks:!1,pageSizes:s.ZE,pageSize:s.ZE[0],showPageSizeSelect:!0,onChange:void 0,useQueryParameter:!0};const E=p},wl9DHqUO:(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("aKyEWaw1"),n=e("TvwLkrAx"),c=e("J6y4/h8P"),g=e("u2QUEJU3");const d=(0,c.default)(o.Pagination)(({theme:l})=>(0,c.css)`
  &.pagination {
    font-size: ${l.fonts.size.small};
    margin-top: 10px;
    margin-bottom: 0;

    > li {
      > a,
      > span {
        display: flex;
        align-items: center;
        justify-content: center;
        color: ${l.utils.contrastingColor(l.colors.global.contentBackground)};
        background-color: ${l.colors.global.contentBackground};
        border-color: ${l.colors.variant.light.default};
        border-radius: 0;
        height: 32px;

        &:hover,
        &:focus {
          color: ${l.utils.contrastingColor(l.colors.variant.lighter.default)};
          background-color: ${l.colors.variant.lighter.default};
          border-color: ${l.colors.variant.light.default};
        }
      }

      &.active > a,
      &.active > span {
        &,
        &:hover,
        &:focus {
          color: ${l.colors.pagination.active.color};
          background-color: ${l.colors.pagination.active.background};
          border-color: ${l.colors.pagination.active.border};
          z-index: 1;
        }
      }

      &.disabled {
        > a,
        > a:hover,
        > a:focus,
        > span,
        > span:hover,
        > span:focus {
          color: ${l.colors.variant.light.default};
          background-color: ${l.colors.global.contentBackground};
          border-color: ${l.colors.variant.lighter.default};
        }
      }
      
    }
  }
`),f=(0,n.uv)({WrapperComponent:d,itemTypeToComponent:{[n.w$.PAGE]:({value:l,isActive:m,onClick:h})=>{const A=m?"Active page":`Open page ${l}`;return t.createElement(o.Pagination.Item,{active:m,onClick:h,title:A,"aria-label":A},l)},[n.w$.ELLIPSIS]:({isActive:l,onClick:m})=>{const h="Open following page";return t.createElement(o.Pagination.Ellipsis,{disabled:l,onClick:m,title:h,"aria-label":h,className:"pagination-control"},t.createElement(g.A,{name:"more_horiz"}))},[n.w$.FIRST_PAGE_LINK]:({isActive:l,onClick:m})=>{const h="Open first page";return t.createElement(o.Pagination.First,{disabled:l,onClick:m,title:h,"aria-label":h,className:"pagination-control"},t.createElement(g.A,{name:"keyboard_double_arrow_left"}))},[n.w$.PREVIOUS_PAGE_LINK]:({isActive:l,onClick:m})=>{const h="Open previous page";return t.createElement(o.Pagination.Prev,{disabled:l,onClick:m,title:h,"aria-label":h,className:"pagination-control"},t.createElement(g.A,{name:"chevron_left"}))},[n.w$.NEXT_PAGE_LINK]:({isActive:l,onClick:m})=>{const h="Open next page";return t.createElement(o.Pagination.Next,{disabled:l,onClick:m,title:h,"aria-label":h,className:"pagination-control"},t.createElement(g.A,{name:"chevron_right"}))},[n.w$.LAST_PAGE_LINK]:({isActive:l,onClick:m})=>{const h="Open last page";return t.createElement(o.Pagination.Last,{disabled:l,onClick:m,title:h,"aria-label":h,className:"pagination-control"},t.createElement(g.A,{name:"keyboard_double_arrow_right"}))}}}),p=({currentPage:l,totalPages:m,boundaryPagesRange:h,siblingPagesRange:A,hideEllipsis:C,hidePreviousAndNextPageLinks:_,hideFirstAndLastPageLinks:P,disabled:I,onChange:M})=>m<=1?null:l>m?(console.warn("Graylog Pagination: `currentPage` prop should not be larger than `totalPages` prop."),null):t.createElement(f,{currentPage:l,totalPages:m,boundaryPagesRange:h,siblingPagesRange:A,hideEllipsis:C,hidePreviousAndNextPageLinks:_,hideFirstAndLastPageLinks:P,disabled:I,onChange:M,"data-testid":"graylog-pagination"});p.propTypes={currentPage:s().number.isRequired,totalPages:s().number.isRequired,boundaryPagesRange:s().number,siblingPagesRange:s().number,hideEllipsis:s().bool,hidePreviousAndNextPageLinks:s().bool,hideFirstAndLastPageLinks:s().bool,disabled:s().bool,onChange:s().func},p.defaultProps={boundaryPagesRange:1,siblingPagesRange:1,hideEllipsis:!1,hidePreviousAndNextPageLinks:!1,hideFirstAndLastPageLinks:!1,disabled:!1,onChange:()=>{}};const E=p},"q/xljWhq":(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("TJOheZRu"),n=Object.defineProperty,c=(p,E,l)=>E in p?n(p,E,{enumerable:!0,configurable:!0,writable:!0,value:l}):p[E]=l,g=(p,E,l)=>(c(p,typeof E!="symbol"?E+"":E,l),l);class d extends s.Component{render(){return s.createElement("span",null,o.A.pluralize(this.props.value,this.props.singular,this.props.plural))}}g(d,"propTypes",{singular:r().string.isRequired,plural:r().string.isRequired,value:r().oneOfType([r().number,r().string]).isRequired});const f=d},"6j4Sgo2g":(x,y,e)=>{"use strict";e.d(y,{A:()=>p});var t=e("Z7aTuO5B"),r=e("L3UIULT/"),s=e("J6y4/h8P");const o=E=>{const l=(0,s.useTheme)(),m=!E.position||E.position.startsWith("bottom")?l.colors.variant.lightest.default:l.colors.global.contentBackground,h=()=>({dropdown:{backgroundColor:l.colors.global.contentBackground,borderColor:l.colors.variant.light.default,padding:0},arrow:{borderColor:l.colors.variant.light.default,backgroundColor:m}});return t.createElement(r.Popover,{styles:h,zIndex:1060,...E})},n=s.default.div(({theme:E})=>(0,s.css)`
  padding: ${E.spacings.sm} ${E.spacings.md}
`),c=s.default.h4(({theme:E})=>(0,s.css)`
  background-color: ${E.colors.variant.lightest.default};
  color: ${E.colors.variant.darkest.default};
  padding: ${E.spacings.sm} ${E.spacings.md};
  font-size: ${E.fonts.size.body};
`),g=E=>`${E}-title`,d=(E,l,m)=>E||(l&&m?g(l):null),f=({title:E,children:l,...m})=>t.createElement(r.Popover.Dropdown,{"aria-labelledby":d(m["aria-labelledby"],m.id,E),...m},E&&t.createElement(c,{id:m.id?g(m.id):null},E),t.createElement(n,null,l));f.defaultProps={title:void 0},o.Target=r.Popover.Target,o.Dropdown=f;const p=o},e5reO9iR:(x,y,e)=>{"use strict";e.d(y,{A:()=>h,y:()=>l});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("ww+BtWnX"),c=e.n(n);const g={animated:!1,bsStyle:"info",label:void 0,striped:!1,value:0},d=A=>(0,o.css)`
  box-shadow: ${A} ${({theme:C})=>c()(C.colors.brand.secondary).alpha(.1).css()};
`,f=(0,o.keyframes)`
  from {
    background-position: 40px 0;
  }

  to {
    background-position: 0 0;
  }
`,p=(0,o.css)(({$bsStyle:A,theme:C})=>{if(A)return(0,o.css)`
    background-color: ${C.colors.variant[A]};
    color: ${C.utils.readableColor(C.colors.variant[A])};
`}),E=o.default.div(({theme:A})=>(0,o.css)`
  height: 20px;
  margin-bottom: 20px;
  overflow: hidden;
  background-color: ${A.colors.gray[90]};
  border-radius: 4px;
  ${d("inset 0 1px 2px")}
  display: flex;
  align-items: center;
`),l=o.default.div(({$animated:A,$striped:C,theme:_,value:P})=>{const I=c()(_.colors.global.contentBackground).alpha(.25).css();return(0,o.css)`
    height: 100%;
    font-size: ${_.fonts.size.small};
    text-align: center;
    ${d("inset 0 -1px 0")}
    transition: width 500ms ease-in-out;
    width: ${P}%;
    max-width: 100%;
    text-shadow: 0 1px 2px ${c()(_.colors.gray[10]).alpha(.4).css()}, 2px -1px 3px ${c()(_.colors.gray[100]).alpha(.5).css()};
    ${(A||C)&&(0,o.css)`
      background-image: linear-gradient(
        45deg,
        ${I} 25%,
        transparent 25%,
        transparent 50%,
        ${I} 50%,
        ${I} 75%,
        transparent 75%,
        transparent
      );
      background-size: 40px 40px;
`}
    ${A&&(0,o.css)`
      animation: ${f} 2s linear infinite;
`}
    ${p}
`}),m=({bars:A,className:C})=>t.createElement(E,{className:C},A.map((_,P)=>{const{label:I,animated:M,bsStyle:O,striped:U,value:W}={...g,..._};return t.createElement(l,{role:"progressbar","aria-valuenow":W,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":I,key:`bar-${P}`,$animated:M,$bsStyle:O,$striped:U,value:W},I)}));m.propTypes={bars:s().arrayOf(s().shape({animated:s().bool,bsStyle:s().string,label:s().string,striped:s().bool,value:s().number})),className:s().string},m.defaultProps={bars:[g],className:void 0};const h=m},fV39EiaT:(x,y,e)=>{"use strict";e.d(y,{A:()=>C});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("ii0bleBb"),o=e.n(s),n=e("0hhBr0/b"),c=e("kwpLVeht"),g=e("+Ej1FZHV"),d=e("RCNj0OY4");const f=r.default.div`
  display: flex;
  align-items: center;
`,p=r.default.p`
  flex: 1;
  margin: 0;
  font-weight: bold;
`,E=r.default.div(({$visible:_})=>(0,r.css)`
  white-space: pre-wrap;
  display: ${_?"block":"none"};
  padding-top: 12px;
`),l=(0,r.default)(c.A)`
  margin-bottom: 6px;
  padding-right: 9px;
`,m=r.default.div`
  width: 90%;
  margin: 0 auto 15px;
`,h={usePublicNotifications:()=>({notifications:void 0,dismissedNotifications:void 0,onDismissPublicNotification:void 0})},A=({readFromConfig:_})=>{var P;const I=(0,n.A)("customization.publicNotifications"),{usePublicNotifications:M}=((P=I[0])==null?void 0:P.hooks)||h,[O,U]=(0,t.useState)(void 0),{notifications:W,dismissedNotifications:K,onDismissPublicNotification:j}=M(),G=_?d.A.publicNotifications():W;if(!G&&!K&&!j)return null;const k=Object.keys(G).map(Q=>{if(K!=null&&K.has(Q))return null;const ne=()=>{U(O?void 0:Q)},z=G[Q],{variant:le,hiddenTitle:V,isActive:me,isDismissible:Pe,title:Ve,shortMessage:at,longMessage:ze}=z;if(!me)return null;const he=()=>j(Q);return t.createElement(l,{bsStyle:le,onDismiss:Pe?he:void 0,key:Ve,title:!V&&Ve},t.createElement(f,null,t.createElement(p,null,at),ze&&t.createElement(g.A,{bsStyle:"link",onClick:ne},"Read ",O===Q?"Less":"More")),ze&&t.createElement(E,{$visible:O===Q},ze))}).filter(Q=>Q);return k.length?t.createElement(m,null,k):null};A.propTypes={readFromConfig:o().bool},A.defaultProps={readFromConfig:!1};const C=A},rlwexfKi:(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("IOI9nV80"),o=e("rIl5IEuP");const n={id:l=>`Id of the ${l}, which is a unique reference.`,title:l=>`Title of the ${l}.`,name:l=>`Name of the ${l}.`,description:l=>`Short description of the ${l}.`,summary:l=>`Long summary of the ${l}.`},c=(0,r.default)(o.Button)`
  padding: 6px 8px;
`,g=(l,m)=>t.createElement("tr",{key:`row-field-${l}`},t.createElement("td",null,l),t.createElement("td",null,m)),d=t.createElement(t.Fragment,null,t.createElement("p",null,"Find entities with a description containing security:",t.createElement("br",null),t.createElement("code",null,"description:security"),t.createElement("br",null)),t.createElement("p",null,"Find a entities with the id 5f4dfb9c69be46153b9a9a7b:",t.createElement("br",null),t.createElement("code",null,"id:5f4dfb9c69be46153b9a9a7b"),t.createElement("br",null))),f=(l,m,h,A)=>t.createElement(t.Fragment,null,t.createElement("p",null,t.createElement("strong",null,"Available search fields")),t.createElement(o.Table,{condensed:!0},t.createElement("thead",null,t.createElement("tr",null,t.createElement("th",null,"Field"),t.createElement("th",null,"Description"))),t.createElement("tbody",null,l.map(C=>g(C,n[C](A))),Object.keys(m).map(C=>g(C,m[C])))),t.createElement("p",null,t.createElement("strong",null,"Examples")),h||d),p=({commonFields:l,fieldMap:m,example:h,entityName:A})=>t.createElement(s.N,{trigger:"click",rootClose:!0,placement:"right",overlay:f(l,m,h,A),title:"Search Syntax Help",width:500},t.createElement(c,{bsStyle:"link"},t.createElement(s.In,{name:"help"})));p.defaultProps={commonFields:["id","title","description"],fieldMap:{},example:void 0,entityName:"entity"};const E=p},g6WV7s1k:(x,y,e)=>{"use strict";e.d(y,{A:()=>O});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("V09ZIpgK"),c=e.n(n),g=e("F1COPdMR"),d=e("m4vN8cs/"),f=e("hKs41owK");const p=(0,n.WidthProvider)(n.Responsive),E=U=>{const{width:W}=U;return W?t.createElement(n.Responsive,{...U}):t.createElement(p,{...U})};E.propTypes={width:s().number},E.defaultProps={width:void 0};const l=(0,o.default)(E)(({theme:U})=>(0,o.css)`
  &.locked {
    .widget-drag-handle {
      display: none;
    }
  }

  &.unlocked {
    .react-draggable {
      cursor: move;
    }
  }

  .react-grid-item.react-grid-placeholder {
    background: ${U.colors.variant.info};
  }

  .actions {
    cursor: default;
  }
`),m=175,h=100,A={xxl:12,xl:10,lg:8,md:6,sm:4,xs:2},C={xxl:m*A.xxl,xl:m*A.xl,lg:m*A.lg,md:m*A.md,sm:m*A.sm,xs:m*A.xs},_=(U,W,K,j)=>{const G=`${j}`;return U||!W?`${G} locked`:K?G:`${G} unlocked`},P=(U,W)=>{if(typeof W!="function")return;const K=(0,f.YM)(U.filter(({i:j})=>!j.startsWith("gap")));return W(K)},I=U=>{const W=[];U.forEach((K,j)=>{K.i.startsWith("gap")&&W.push(j)}),W.reverse().forEach(K=>U.splice(K,1))},M=({children:U,className:W,columns:K,draggableHandle:j,isResizable:G,locked:k,measureBeforeMount:Q,onPositionsChange:ne,onSyncLayout:z,positions:le,rowHeight:V,width:me})=>{const Ve=(0,o.useTheme)().spacings.px.xs,at=(0,t.useCallback)(Re=>P(Re,ne),[ne]),ze=(0,t.useCallback)(Re=>P(Re,z),[z]),he=_(k,G,j,W),Ie=(0,t.useMemo)(()=>(0,f.cn)(le),[le]);return t.createElement(l,{className:he,width:me,breakpoints:C,cols:K,layouts:{xxl:Ie,xl:Ie,lg:Ie,md:Ie,sm:Ie,xs:Ie},rowHeight:V,containerPadding:[0,0],margin:[Ve,Ve],isResizable:!k&&G,isDraggable:!k,measureBeforeMount:Q,draggableCancel:".actions",onDragStart:I,onDragStop:at,onResizeStart:I,onResizeStop:at,onLayoutChange:ze,useCSSTransforms:!1,draggableHandle:k?"":j},U)};M.propTypes={children:s().node.isRequired,className:s().string,onPositionsChange:s().func.isRequired,positions:s().object.isRequired,locked:s().bool,isResizable:s().bool,rowHeight:s().number,columns:s().object,draggableHandle:s().string,measureBeforeMount:s().bool,width:s().number},M.defaultProps={className:void 0,columns:A,isResizable:!0,locked:!1,measureBeforeMount:!1,rowHeight:h,draggableHandle:void 0,width:void 0,onSyncLayout:void 0};const O=M},"7H4KJ6cl":(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("IZYxBTgT"),s=e("q/xljWhq");const n=({duration:c})=>{const g=(0,r.rm)(c),d=(0,r.TI)(c);return g<60?t.createElement("span",null,g," ",t.createElement(s.A,{singular:"second",plural:"seconds",value:g})):t.createElement("span",null,d," ",t.createElement(s.A,{singular:"minute",plural:"minutes",value:d}))}},"4IfE3Ihm":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("IZYxBTgT");const n=({dateTime:g})=>{const d=g!=null?g:new Date,f=(0,o._$)(d),p=(0,o.to)(d,"internal");return t.createElement("time",{dateTime:p,title:p},f)};n.propTypes={dateTime:s().oneOfType([s().string,s().object,s().number])},n.defaultProps={dateTime:void 0};const c=n},TMaijZ0a:(x,y,e)=>{"use strict";e.d(y,{A:()=>P});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("J6y4/h8P"),n=e("Mx+G+HdB"),c=e.n(n),g=e("dsvqAVKU"),d=e("Ofda/4py");const f=300,p=o.default.div(({$buttonLeftMargin:I})=>(0,o.css)`
  > :not(:last-child) {
    margin-right: ${I}px;
  }

  > * {
    display: inline-block;
    vertical-align: top;
    margin-bottom: 5px;
  }
`),E=o.default.div`
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 34px;
  padding-right: 3px;
`,l=o.default.div(({$topMargin:I})=>(0,o.css)`
  margin-top: ${I}px;
`),m=o.default.input(({$queryWidth:I,$feedbackContainerWidth:M})=>(0,o.css)`
  width: ${I}px;
  padding-right: ${M!=null?M:12}px;
`),h=o.default.label`
  margin-right: 5px;
`,A=o.default.div`
  display: inline-block;
  position: relative;
`,C=c()(({query:I,onSearch:M,useLoadingState:O,setLoadingState:U,resetLoadingState:W})=>{O?U().then(()=>{M(I,W)}):M(I)},f),_=({useLoadingState:I,queryHelpComponent:M,queryWidth:O,focusAfterMount:U,children:W,className:K,placeholder:j,buttonLeftMargin:G,label:k,onReset:Q,onSearch:ne,wrapperClass:z,topMargin:le,onQueryChange:V,query:me})=>{var Pe;const[Ve,at]=(0,s.useState)(me),[ze,he]=(0,s.useState)(!1),Ie=(0,s.useRef)(void 0);(0,s.useEffect)(()=>{at(me)},[me]);const Re=()=>new Promise(ae=>{I&&he(!0),ae()}),ce=()=>{I&&he(!1)},Ee=()=>{ce(),at(me),typeof V=="function"&&V(me),typeof Q=="function"&&Q()},oe=ae=>{ae.preventDefault(),ae.stopPropagation();const ye=ae.target.value;at(ye),typeof V=="function"&&V(ye),typeof ne=="function"&&C({query:ye,onSearch:ne,useLoadingState:I,setLoadingState:Re,resetLoadingState:ce})};return s.createElement(l,{className:`${z} ${K}`,$topMargin:le},s.createElement(p,{$buttonLeftMargin:G},s.createElement("div",{className:"form-group"},k&&s.createElement(h,{htmlFor:"common-search-form-query-input",className:"control-label"},k),s.createElement(A,{className:"input-container"},s.createElement(m,{id:"common-search-form-query-input",autoFocus:U,onChange:oe,value:Ve,placeholder:j,type:"text",$queryWidth:O,className:"query form-control",autoComplete:"off",spellCheck:"false",$feedbackContainerWidth:(Pe=Ie.current)==null?void 0:Pe.scrollWidth}),s.createElement(E,{ref:Ie},ze&&s.createElement(g.A,{text:""}),Ve&&typeof Q=="function"&&s.createElement(d.A,{name:"close",title:"Reset search",onClick:Ee}),M))),W))};_.propTypes={query:r().string,onQueryChange:r().func,onSearch:r().func,onReset:r().func,label:r().string,className:r().string,placeholder:r().string,wrapperClass:r().string,queryWidth:r().any,topMargin:r().number,buttonLeftMargin:r().number,useLoadingState:r().bool,queryHelpComponent:r().element,children:r().oneOfType([r().arrayOf(r().element),r().element]),focusAfterMount:r().bool},_.defaultProps={query:"",className:"",onQueryChange:void 0,onSearch:null,onReset:null,label:null,placeholder:"Enter search query...",wrapperClass:"search",queryWidth:400,topMargin:0,buttonLeftMargin:5,useLoadingState:!1,queryHelpComponent:null,children:null,focusAfterMount:!1};const P=_},QBkUz07U:(x,y,e)=>{"use strict";e.d(y,{$:()=>c,A:()=>f});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("dsvqAVKU"),o=e("rIl5IEuP");const n=r.default.div`
  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  *:not(:first-child) {
    margin-left: 10px;
  }
`,c=r.default.h2`
  margin-bottom: 5px;
  display: inline;
`,g=(0,r.default)(s.A)(({theme:p})=>(0,r.css)`
  margin-left: 10px;
  font-size: ${p.fonts.size.h3};
`),d=({children:p,title:E,showLoading:l=!1,headerActions:m,className:h})=>t.createElement(o.Row,{className:`content ${h}`},t.createElement(o.Col,{xs:12},t.createElement(n,null,t.createElement(c,null,E,l&&t.createElement(g,{text:"",delay:0})),m),p));d.defaultProps={className:"",showLoading:!1,headerActions:void 0};const f=d},"3yfJIRSb":(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("J6y4/h8P");const s=t.default.div(({$columns:o,theme:n})=>(0,t.css)`
  display: grid;
  grid-template-columns: ${o!=null?o:"1fr 1fr"};
  grid-column-gap: 40px;

  @media (max-width: ${n.breakpoints.max.md}) {
    grid-template-columns: 1fr;
  }
`)},"0nTDFiNq":(x,y,e)=>{"use strict";e.d(y,{Z:()=>k,A:()=>zt});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("sjyzE3AD"),n=e("xFid0hvv"),c=e("/Mx+Tiep"),g=e("+KM7MH1U"),d=e.n(g),f=e("J6y4/h8P"),p=e("tSKCR4ul"),E=e("8RmZXjGq"),l=e("a5C0HdYb");const m=1e3,h=300,A=f.default.div`
  flex: 1 1 auto;
  height: ${xe=>(xe==null?void 0:xe.height)||h}px;
`,C=({data:xe,index:Ue,setSize:ke,style:Se,containerWidth:Je})=>{const nt=(0,t.useRef)(null);return(0,t.useEffect)(()=>{ke(Ue,nt.current.getBoundingClientRect().height)},[ke,Ue,Je]),t.createElement("div",{ref:nt,"data-testid":"react-window-list-item",style:Se},xe[Ue])},_=({children:xe,listRef:Ue,...ke})=>{const Se=(0,t.useRef)(null),Je=(0,t.useRef)(null),nt=(0,t.useRef)({}),Wt=(0,l.A)(Se),{width:Le}=Wt,Fe=(0,t.useCallback)((ft,Ot)=>{var Lt;nt.current={...nt.current,[ft]:Ot},(Lt=(Ue||Je).current)==null||Lt.resetAfterIndex(ft)},[Ue]),qe=Object.entries(xe).reduce((ft,[Ot])=>nt.current[Ot]&&ftnt.current[ft]||36,[nt]);return t.createElement(A,{ref:Se,height:qe,"data-testid":"infinite-loader-container"},t.createElement(E._m,{ref:Ue||Je,height:qe||300,itemCount:xe.length,itemSize:ut,itemData:xe,width:Le,...ke},({data:ft,index:Ot,style:Lt})=>t.createElement(C,{data:ft,style:Lt,index:Ot,setSize:Fe,containerWidth:Le})))};_.defaultProps={listRef:void 0,onItemsRendered:void 0};const I=({children:xe,innerProps:Ue,...ke})=>!(xe!=null&&xe.length)||xe.lengtht.createElement(W,{key:"noOptions",className:"menu-notice menu-notice--no-options"},"No Options"),G=({children:xe,selectProps:{loadOptions:Ue,total:ke}})=>{const Se=xe!=null&&xe.length?xe:[K()];return t.createElement(U.A,{isItemLoaded:Je=>Jet.createElement(_,{listRef:nt,onItemsRendered:Je},Se))},k="common-select-control",Q=({children:xe,...Ue})=>t.createElement(o.c.MultiValueRemove,{...Ue},xe),ne=()=>null,z=xe=>{const{children:Ue=t.createElement(M.A,{name:"arrow_drop_down"}),getStyles:ke,innerProps:{ref:Se,...Je}}=xe;return t.createElement("div",{style:ke("dropdownIndicator",xe),ref:Se,...Je},Ue)},le=({children:xe,...Ue})=>t.createElement(o.c.Control,{...Ue,className:k},xe),V=xe=>Ue=>{const{data:ke,isSelected:Se}=Ue;return t.createElement(o.c.Option,{...Ue},xe(ke,Se))},me=xe=>Ue=>{const{data:ke}=Ue;return t.createElement(o.c.SingleValue,{...Ue},xe(ke))},Pe=xe=>Ue=>t.createElement(o.c.Input,{...Ue,...xe}),Ve=(xe,Ue)=>({...xe,padding:"0px",fontSize:"150%",marginRight:"1rem",transform:Ue.selectProps.menuIsOpen&&"rotate(180deg)"}),at=xe=>({...xe,padding:"5px"}),ze=({theme:xe})=>Ue=>({...Ue,border:`1px solid ${xe.colors.variant.lighter.info}`}),he=({theme:xe})=>Ue=>({...Ue,padding:"2px 5px",fontSize:xe.fonts.size.small}),Ie=({theme:xe})=>Ue=>({...Ue,borderLeft:`1px solid ${xe.colors.variant.lighter.info}`,paddingLeft:"5px",paddingRight:"5px",borderRadius:"0"}),Re={minHeight:"29px",height:"29px"},ce={minHeight:"34px"},Ee=xe=>({...xe,zIndex:5}),oe=xe=>({...xe,zIndex:"auto"}),ae=({theme:xe})=>Ue=>({...Ue,lineHeight:"28px",fontFamily:xe.fonts.family.body,fontSize:xe.fonts.size.body,fontWeight:400}),ye=({theme:xe})=>Ue=>({...Ue,color:xe.colors.input.placeholder,lineHeight:"28px",fontFamily:xe.fonts.family.body,fontSize:xe.fonts.size.body,fontWeight:400,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",maxWidth:"100%",paddingRight:"20px"}),Oe=({size:xe,theme:Ue})=>(ke,{isFocused:Se})=>{const Je=Se?1:ke.borderWidth,nt=Se?0:ke.outline,Wt=Se?Ue.colors.input.boxShadow:null;return{...ke,...xe==="small"?Re:ce,borderWidth:Je,boxShadow:Wt,outline:nt,borderRadius:O.Jk,alignItems:"center"}},ve=({size:xe})=>Ue=>({...Ue,padding:xe==="small"?"0 8px":"2px 10px"}),_e={DropdownIndicator:z,MultiValueRemove:Q,IndicatorSeparator:ne,Control:le},He=({size:xe,theme:Ue})=>({dropdownIndicator:Ve,clearIndicator:at,multiValue:ze({theme:Ue}),multiValueLabel:he({theme:Ue}),multiValueRemove:Ie({theme:Ue}),menu:Ee,menuPortal:oe,singleValue:ae({theme:Ue}),placeholder:ye({theme:Ue}),control:Oe({size:xe,theme:Ue}),valueContainer:ve({size:xe})}),je=(xe,Ue,ke,Se)=>{const Je={};return xe&&(Je.Input=Pe(xe)),Ue&&(Je.Option=V(Ue)),ke&&(Je.SingleValue=me(ke)),Je.MenuList=Se?G:I,Je};class Qe extends t.Component{constructor(Ue){super(Ue),this.getValue=()=>{const{value:Le}=this.state;return Le},this.clearValue=()=>{this.setState({value:void 0})},this._extractOptionValue=Le=>{const{multi:Fe,valueKey:qe,delimiter:ut}=this.props;return Le?Fe&&Array.isArray(Le)?Le.map(ft=>ft[qe]).join(ut):Le[qe||""]:""},this._onChange=Le=>{const Fe=this._extractOptionValue(Le);this.props.persistSelection&&this.setState({value:Fe});const{onChange:qe=()=>{}}=this.props;qe(Fe)},this._formatInputValue=Le=>{const{options:Fe,displayKey:qe,valueKey:ut,delimiter:ft,allowCreate:Ot,async:Lt}=this.props;return Le==null||typeof Le=="string"&&Le===""?[]:(Ot||Lt)&&typeof Le=="string"?Le.split(ft).map(an=>{const Ft={[ut]:an,[qe]:an};return Fe.find($t=>$t[ut]===an)||Ft}):(typeof Le=="string"?(Le!=null?Le:"").split(ft):[Le]).map(an=>{const Ft=Fe.find(rn=>rn[ut||""]===an);return Ft!=null?Ft:{[qe]:String(Le),[ut]:Le}})},this._selectTheme=Le=>{const{theme:Fe}=this.props;return{...Le,colors:{...Le.colors,primary:Fe.colors.input.borderFocus,primary75:Fe.colors.variant.light.default,primary50:Fe.colors.variant.lighter.default,primary25:Fe.colors.variant.lightest.default,danger:Fe.colors.variant.darker.info,dangerLight:Fe.colors.variant.lighter.info,neutral0:Fe.colors.input.background,neutral5:Fe.colors.input.backgroundDisabled,neutral10:Fe.colors.variant.lightest.info,neutral20:Fe.colors.input.border,neutral30:Fe.colors.gray[70],neutral40:Fe.colors.gray[60],neutral50:Fe.colors.gray[50],neutral60:Fe.colors.gray[40],neutral70:Fe.colors.gray[30],neutral80:Fe.colors.gray[20],neutral90:Fe.colors.gray[10]}}},this.createCustomFilter=Le=>{const{matchProp:Fe,ignoreAccents:qe}=this.props,ut={ignoreAccents:qe};return Fe==="any"?(0,n.c)(ut):(0,n.c)({...ut,stringify:Le})};const{inputProps:ke,optionRenderer:Se,value:Je,valueRenderer:nt,async:Wt}=Ue;this.state={customComponents:je(ke,Se,nt,Wt),value:Je}}UNSAFE_componentWillReceiveProps(Ue){const{inputProps:ke,optionRenderer:Se,value:Je,valueRenderer:nt,async:Wt}=this.props;Je!==Ue.value&&this.setState({value:Ue.value}),(!d()(ke,Ue.inputProps)||Se!==Ue.optionRenderer||nt!==Ue.valueRenderer)&&this.setState({customComponents:je(ke,Se,nt,Wt)})}render(){const{allowCreate:Ue=!1,displayKey:ke,components:Se,valueKey:Je,onReactSelectChange:nt,size:Wt,theme:Le}=this.props,{customComponents:Fe,value:qe}=this.state,ut=this._formatInputValue(qe),{multi:ft,disabled:Ot,clearable:Lt,inputProps:an,matchProp:Ft,optionRenderer:rn,valueRenderer:$t,menuPortalTarget:be,async:yn,total:Kt,onInputChange:An,loadOptions:qt,...io}=this.props,Be=Zn=>Zn[Ft],bn=this.createCustomFilter(Be),gn={..._e,...Se,...Fe},wn={...io,onChange:nt||this._onChange,onInputChange:An,async:yn,isMulti:ft,isDisabled:Ot,isClearable:Lt,loadOptions:qt,getOptionLabel:Zn=>Zn[ke]||Zn.label,getOptionValue:Zn=>Zn[Je],filterOption:bn,components:gn,menuPortalTarget:be,isOptionDisabled:Zn=>!!Zn.disabled,styles:He({size:Wt,theme:Le}),theme:this._selectTheme,total:Kt,value:ut};return Ue?t.createElement(p.A,{ref:io.forwardedRef,...wn}):t.createElement(c.Ay,{ref:io.forwardedRef,...wn})}}Qe.propTypes={allowCreate:s().bool,className:s().string,clearable:s().bool,components:s().objectOf(s().elementType),delimiter:s().string,disabled:s().bool,displayKey:s().string,id:s().string,inputId:s().string,ignoreAccents:s().bool,inputProps:s().object,matchProp:s().oneOf(["any","label","value"]),multi:s().bool,name:s().string,onBlur:s().func,onChange:s().func.isRequired,onInputChange:s().func,options:s().array.isRequired,optionRenderer:s().func,required:s().bool,size:s().oneOf(["normal","small"]),theme:s().object.isRequired,value:s().oneOfType([s().string,s().number,s().object,s().arrayOf(s().object)]),valueKey:s().string,valueRenderer:s().func,addLabelText:s().string,autoFocus:s().bool,onReactSelectChange:s().func,placeholder:s().string,persistSelection:s().bool,menuPlacement:s().oneOf(["top","bottom","auto"]),maxMenuHeight:s().number,async:s().bool,total:s().number,loadOptions:s().func},Qe.defaultProps={addLabelText:void 0,allowCreate:!1,autoFocus:!1,className:void 0,clearable:!0,components:null,delimiter:",",disabled:!1,displayKey:"label",persistSelection:!0,id:void 0,ignoreAccents:!0,inputId:void 0,onBlur:void 0,inputProps:void 0,matchProp:"any",multi:!1,menuIsOpen:void 0,name:void 0,openMenuOnFocus:void 0,onReactSelectChange:void 0,onMenuClose:void 0,optionRenderer:void 0,placeholder:void 0,required:!1,size:"normal",value:void 0,valueKey:"value",valueRenderer:void 0,menuPlacement:"auto",maxMenuHeight:300,async:!1,total:0,onInputChange:void 0,loadOptions:void 0,menuPortalTarget:void 0,forwardedRef:void 0};const zt=(0,f.withTheme)(Qe)},hhdCSTZj:(x,y,e)=>{"use strict";e.d(y,{A:()=>r,Z:()=>t.Z});var t=e("0nTDFiNq");const r=t.A},yKXoRDZT:(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("J6y4/h8P"),r=e("Z7aTuO5B"),s=e("u2QUEJU3");const o=t.default.button(({theme:d})=>(0,t.css)`
  border: 0;
  background: transparent;
  padding: 5px;
  cursor: pointer;
  position: relative;
  color: ${d.colors.gray[70]};
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;

  &.active {
    color: ${d.colors.gray[20]};
  }
`),n=t.default.span(({theme:d})=>(0,t.css)`
  position: absolute;
  top: 0;
  right: 0;
  font-size: ${d.fonts.size.small};
  font-weight: 600;
`),c=({activeDirection:d,onChange:f,title:p,order:E,ascId:l,descId:m,className:h})=>{const A=(0,r.useCallback)(()=>f(d),[d,f]),C=d===l&&d!==m,_=!!d;return r.createElement(o,{className:`${h} ${_?"active":""}`,title:p,type:"button","aria-label":p,onClick:A},r.createElement(s.A,{name:"sort","data-testid":"sort-icon-svg",flip:C?"horizontal":void 0,className:`sort-icon-${C?"asc":"desc"}`}),E&&r.createElement(n,null,E))};c.defaultProps={title:"Sort",order:void 0,ascId:"Ascending",descId:"Descending",className:""};const g=c},"K/dyB2Jn":(x,y,e)=>{"use strict";e.d(y,{default:()=>M});var t=e("Z7aTuO5B"),r=e("GWCZ8ww5"),s=e("ii0bleBb"),o=e.n(s),n=e("J6y4/h8P"),c=e("IOI9nV80"),g=e("rIl5IEuP");const d=(0,n.default)(g.ListGroupItem)(({$alignItemContent:O})=>(0,n.css)`
  display: flex;
  align-items: ${O};
`),f=n.default.div`
  margin-right: 5px;
`,p=(0,t.forwardRef)(({alignItemContent:O,item:U,index:W,className:K,customListItemRender:j,customContentRender:G,disableDragging:k,draggableProps:Q,dragHandleProps:ne},z)=>{const le=G?G({item:U,index:W}):U.title;return j?t.createElement(t.Fragment,null,j({className:K,disableDragging:k,draggableProps:Q,dragHandleProps:ne,index:W,item:U,ref:z})):t.createElement(d,{$alignItemContent:O,ref:z,className:K,containerProps:{...Q}},!k&&t.createElement(f,{...ne,"data-testid":`sortable-item-${U.id}`},t.createElement(c.In,{name:"drag_indicator"})),le)});p.defaultProps={alignItemContent:"flex-start",className:void 0,disableDragging:!1,customListItemRender:void 0,customContentRender:void 0};const E=p,l=(0,n.default)(E)(({$isDragging:O})=>(0,n.css)`
  box-shadow: ${O?"rgba(0, 0, 0, 0.24) 0px 3px 8px":"none"};
`),m=({alignItemContent:O,className:U,customContentRender:W,customListItemRender:K,disableDragging:j,displayOverlayInPortal:G,index:k,item:Q})=>t.createElement(r.sx,{draggableId:Q.id,index:k},({draggableProps:ne,dragHandleProps:z,innerRef:le},{isDragging:V})=>{const me=t.createElement(l,{alignItemContent:O,item:Q,index:k,className:U,ref:le,customContentRender:W,customListItemRender:K,disableDragging:j,displayOverlayInPortal:G,draggableProps:ne,dragHandleProps:z,$isDragging:V});return G&&V?t.createElement(c.ZL,null,me):me});m.defaultProps={alignItemContent:void 0,className:void 0,customContentRender:void 0,customListItemRender:void 0,disableDragging:!1};const h=m,A=({alignItemContent:O,customContentRender:U,customListItemRender:W,disableDragging:K,displayOverlayInPortal:j,items:G=[]})=>t.createElement(t.Fragment,null,G.map((k,Q)=>t.createElement(h,{alignItemContent:O,item:k,index:Q,key:k.id,customContentRender:U,customListItemRender:W,disableDragging:K,displayOverlayInPortal:j})));A.defaultProps={displayOverlayInPortal:!1,alignItemContent:void 0,disableDragging:!1,customContentRender:void 0,customListItemRender:void 0};const C=t.memo(A),_=(O,U,W)=>{const K=Array.from(O),[j]=K.splice(U,1);return K.splice(W,0,j),K},P=({alignItemContent:O,customContentRender:U,customListItemRender:W,disableDragging:K,displayOverlayInPortal:j,items:G,onMoveItem:k})=>{const Q=(0,t.useCallback)(ne=>{if(ne.destination&&ne.source.index!==ne.destination.index){const z=_(G,ne.source.index,ne.destination.index);k(z,ne.source.index,ne.destination.index)}},[G,k]);return t.createElement(r.JY,{onDragEnd:Q},t.createElement(r.gL,{droppableId:"droppable"},({droppableProps:ne,innerRef:z,placeholder:le})=>t.createElement("div",{...ne,ref:z},t.createElement(C,{alignItemContent:O,items:G,disableDragging:K,displayOverlayInPortal:j,customContentRender:U,customListItemRender:W}),le)))};P.propTypes={disableDragging:o().bool,items:o().arrayOf(o().object),onMoveItem:o().func.isRequired,customContentRender:o().func,customListItemRender:o().func},P.defaultProps={alignItemContent:void 0,items:[],disableDragging:!1,displayOverlayInPortal:!1,customContentRender:void 0,customListItemRender:void 0};const M=P},dsvqAVKU:(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("u2QUEJU3"),c=e("rRqvmggl");const g=(0,o.default)(n.A)(({$displayMargin:p})=>(0,o.css)`
  vertical-align: bottom;
  ${p?"margin-right: 6px;":""}
`),d=({name:p,text:E,delay:l,...m})=>t.createElement(c.A,{delay:l},t.createElement(g,{...m,name:p,$displayMargin:!!(E!=null&&E.trim()),spin:!0}),E);d.propTypes={delay:s().number,name:s().string,text:s().string},d.defaultProps={name:"progress_activity",text:"Loading...",delay:200};const f=d},M04itGxI:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("J6y4/h8P");const s=r.default.div`
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
`,o=({children:c,titleOverride:g,className:d})=>t.createElement(s,{title:g||c,className:d},c);o.defaultProps={className:void 0,titleOverride:void 0};const n=o},ATOIS62c:(x,y,e)=>{"use strict";e.d(y,{A:()=>G,z:()=>K});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("D4SbLiE/"),n=e.n(o),c=e("WgCNywL/"),g=e.n(c),d=e("+KM7MH1U"),f=e.n(d),p=e("w7+AQV2V"),E=e.n(p),l=e("/74ZcNtc"),m=e.n(l),h=e("9oVghaOd"),A=e.n(h),C=e("J6y4/h8P"),_=e("rIl5IEuP"),P=e("S6FuRS7B");const I=["NANOSECONDS","MICROSECONDS","MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS","MONTHS","YEARS"],M=["NANOSECONDS","MICROSECONDS","MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS"],O=r().oneOf(I),U=(0,C.default)(_.InputGroup)`
  display: flex;
`,W=(0,C.default)(_.InputGroup.Addon)`
  display: flex;
  justify-content: center;
  align-items: center;
`,K=(k,Q)=>{if(k===void 0)return{duration:1,unit:E()(Q)};const ne=A().duration(k),z=Q.find(V=>{const me=ne.as(V);return m()(me)&&me!==0})||E()(Q);return{duration:ne.as(z),unit:z}},G=n()({displayName:"TimeUnitInput",propTypes:{update:r().func.isRequired,label:r().string,help:r().string,required:r().bool,enabled:r().bool,defaultEnabled:r().bool,value:r().number,defaultValue:r().number,unit:O,units:r().arrayOf(O),labelClassName:r().string,wrapperClassName:r().string,hideCheckbox:r().bool,pullRight:r().bool,clearable:r().bool,name:r().string,unitName:r().string},getDefaultProps(){return{defaultValue:1,value:void 0,unit:"SECONDS",units:M,label:"",help:"",name:null,unitName:null,required:!1,enabled:void 0,defaultEnabled:!1,labelClassName:void 0,wrapperClassName:void 0,hideCheckbox:!1,pullRight:!1,clearable:!1}},getInitialState(){const{defaultEnabled:k,enabled:Q,units:ne}=this.props;return{enabled:g()(Q,k),unitOptions:this._getUnitOptions(ne)}},UNSAFE_componentWillReceiveProps(k){const{units:Q}=this.props;f()(Q,k.units)||this.setState({unitOptions:this._getUnitOptions(k.units)})},_getEffectiveValue(){const{defaultValue:k,value:Q,clearable:ne}=this.props;return ne?Q:g()(Q,k)},_getUnitOptions(k){return I.filter(Q=>k.includes(Q)).map(Q=>({value:Q,label:Q.toLowerCase()}))},_isChecked(){const{required:k,enabled:Q}=this.props;if(k)return k;const{enabled:ne}=this.state;return g()(Q,ne)},_propagateInput(k){const{update:Q,unit:ne}=this.props,le={...{value:this._getEffectiveValue(),unit:ne,checked:this._isChecked()},...k};Q(le.value,le.unit,le.checked)},_onToggleEnable(k){const Q=k.target.checked;this.setState({enabled:Q}),this._propagateInput({checked:Q})},_onUpdate(k){const{defaultValue:Q,clearable:ne}=this.props;let z;ne?z=P.yG(k.target):z=g()(P.yG(k.target),Q),this._propagateInput({value:z})},_onUnitSelect(k){this._propagateInput({unit:k})},render(){const{unitOptions:k}=this.state,{label:Q,wrapperClassName:ne,help:z,labelClassName:le,unit:V,required:me,hideCheckbox:Pe,pullRight:Ve}=this.props,at=k.map(he=>s.createElement(_.MenuItem,{key:he.value,onSelect:()=>this._onUnitSelect(he.value),active:V===he.value},he.label)),ze=s.createElement(W,null,s.createElement("input",{type:"checkbox",checked:this._isChecked(),onChange:this._onToggleEnable,title:"Toggle time"}));return s.createElement(_.FormGroup,null,Q&&s.createElement(_.ControlLabel,{className:le},Q),s.createElement(_.InputWrapper,{className:ne},s.createElement(U,null,!me&&!Pe&&ze,s.createElement(_.FormControl,{type:"number",name:this.props.name,disabled:!this._isChecked(),"aria-label":Q||"Time unit input",onChange:this._onUpdate,value:g()(this._getEffectiveValue(),"")}),s.createElement(_.DropdownButton,{componentClass:_.InputGroup.Button,id:"input-dropdown-addon",name:this.props.unitName,pullRight:Ve,title:k.filter(he=>he.value===V)[0].label,disabled:!this._isChecked()},at)),z&&s.createElement(_.HelpBlock,null,z)))}})},"Ex+j8X3w":(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("O/XpfGnR"),n=e("IZYxBTgT");const c=({dateTime:d,field:f,format:p,render:E,tz:l,className:m})=>{const{formatTime:h}=(0,o.A)();if(!d)return s.createElement(s.Fragment,null);const A=l?(0,n.to)(d,p,l):h(d,p),C=(0,n.to)(d,"internal");return s.createElement("time",{dateTime:C,title:C,className:m},s.createElement(E,{value:A,field:f}))};c.propTypes={dateTime:r().oneOfType([r().string,r().object,r().number]),format:r().string,field:r().string,tz:r().string,render:r().func},c.defaultProps={dateTime:void 0,field:void 0,format:"default",render:({value:d})=>d,tz:void 0,className:void 0};const g=c},N1QxzyxS:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("L3UIULT/"),s=e("J6y4/h8P");const n=c=>{const g=(0,s.useTheme)(),d=()=>({tooltip:{backgroundColor:g.colors.global.contentBackground,color:g.colors.global.textDefault,fontWeight:400,fontSize:g.fonts.size.root}});return t.createElement(r.Tooltip,{styles:d,...c})}},Z6NUVhuV:(x,y,e)=>{"use strict";e.d(y,{A:()=>h});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("VPaD/Np4"),n=e.n(o),c=e("+KM7MH1U"),g=e.n(c),d=e("rIl5IEuP"),f=e("YzrsREPQ"),p=Object.defineProperty,E=(A,C,_)=>C in A?p(A,C,{enumerable:!0,configurable:!0,writable:!0,value:_}):A[C]=_,l=(A,C,_)=>(E(A,typeof C!="symbol"?C+"":C,_),_);class m extends s.Component{constructor(C){super(C),l(this,"_onSearchTextChanged",P=>{P.preventDefault(),P.stopPropagation(),this.setState({filterText:this.typeAheadInput.getValue()},this.filterData)}),l(this,"_onFilterAdded",(P,I)=>{const{filters:M}=this.state,{displayKey:O}=this.props;this.setState({filters:M.add(I[O]),filterText:""},this.filterData),this.typeAheadInput.clear()}),l(this,"_onFilterRemoved",P=>{const{filters:I}=this.state;P.preventDefault(),this.setState({filters:I.delete(P.target.getAttribute("data-target"))},this.filterData)}),l(this,"_matchFilters",P=>{const{filters:I,filterByKey:M}=this.state,{filterSuggestionAccessor:O}=this.props;return I.every(U=>{let W=P[M];return O?W=W.map(K=>K[O].toLocaleLowerCase()):W=W.map(K=>K.toLocaleLowerCase()),W.indexOf(U.toLocaleLowerCase())!==-1},this)}),l(this,"_matchStringSearch",P=>{const{filterText:I}=this.state,{searchInKeys:M}=this.props;return M.some(O=>{const U=P[O],W=I;if(U===null)return!1;const K=(j,G)=>typeof j>"u"?!1:j.toLocaleLowerCase().indexOf(G.toLocaleLowerCase())!==-1;return typeof U=="object"?U.some(j=>K(j,W)):K(U,W)},this)}),l(this,"_resetFilters",()=>{this.typeAheadInput.clear(),this.setState({filterText:"",filters:n().OrderedSet()},this.filterData)}),l(this,"filterData",()=>{const{filterData:P,data:I,onDataFiltered:M}=this.props,{filterText:O}=this.state;if(typeof P=="function")return P(I);const U=I.filter(W=>this._matchFilters(W)&&this._matchStringSearch(W),this);return M(U,O),!0});const{filterBy:_}=this.props;this.state={filterText:"",filters:n().OrderedSet(),filterByKey:`${_}s`}}componentDidUpdate(C){const{data:_}=this.props;g()(C.data,_)||this.filterData()}render(){const{filters:C,filterText:_}=this.state,{id:P,label:I,displayKey:M,filterBy:O,filterSuggestionAccessor:U,filterSuggestions:W}=this.props,K=C.map(G=>s.createElement("li",{key:`li-${G}`},s.createElement("span",{className:"pill label label-default"},O,": ",G,s.createElement("button",{type:"button",className:"tag-remove","data-target":G,onClick:this._onFilterRemoved,"aria-label":`Remove filter ${G}`}))));let j;return U?j=W.map(G=>G[U].toLocaleLowerCase()):j=W.map(G=>G.toLocaleLowerCase()),j.filter(G=>!C.includes(G)),s.createElement("div",{className:"filter"},s.createElement("form",{className:"form-inline",onSubmit:this._onSearchTextChanged,style:{display:"inline-flex",alignItems:"flex-end"}},s.createElement(f.A,{id:P,ref:G=>{this.typeAheadInput=G},onSuggestionSelected:this._onFilterAdded,formGroupClassName:"",suggestionText:`Filter by ${O}: `,suggestions:j,label:I,displayKey:M}),s.createElement(d.Button,{type:"submit",style:{marginLeft:5}},"Filter"),s.createElement(d.Button,{type:"button",style:{marginLeft:5},onClick:this._resetFilters,disabled:C.count()===0&&_===""},"Reset")),s.createElement("ul",{className:"pill-list"},K))}}l(m,"propTypes",{id:r().string,data:r().array,displayKey:r().string,filterBy:r().string,filterData:r().func,filterSuggestionAccessor:r().string,filterSuggestions:r().array,label:r().string,onDataFiltered:r().func,searchInKeys:r().array}),l(m,"defaultProps",{id:"",data:[],displayKey:"",filterBy:"",filterData:void 0,filterSuggestionAccessor:"",filterSuggestions:[],label:"",onDataFiltered:void 0,searchInKeys:[]});const h=m},YzrsREPQ:(x,y,e)=>{"use strict";e.d(y,{A:()=>I});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("zKLlqmvB"),n=e("dAwvwWxL"),c=e.n(n),g=e("kqAR+wt5"),d=e.n(g),f=e("4ukn9ADr"),p=e.n(f),E=e("J6y4/h8P"),l=e("jsQWU+f2"),m=e("rIl5IEuP"),h=Object.defineProperty,A=(M,O,U)=>O in M?h(M,O,{enumerable:!0,configurable:!0,writable:!0,value:U}):M[O]=U,C=(M,O,U)=>(A(M,typeof O!="symbol"?O+"":O,U),U);const _=(0,E.default)(m.Input)`
  input&.tt-hint {
    background-color: transparent !important;
  }
`;class P extends s.Component{constructor(){super(...arguments),C(this,"getValue",()=>d()(this.fieldInput).typeahead("val")),C(this,"clear",()=>{d()(this.fieldInput).typeahead("val","")}),C(this,"_destroyTypeahead",()=>{d()(this.fieldInput).typeahead("destroy"),d()(this.fieldFormGroup).off("typeahead:select typeahead:autocomplete")}),C(this,"_updateTypeahead",({suggestions:O,displayKey:U,suggestionText:W,onTypeaheadLoaded:K,onSuggestionSelected:j})=>{this.fieldInput=this.fieldInputElem.getInputDOMNode(),this.fieldFormGroup=o.findDOMNode(this.fieldInputElem);const G=d()(this.fieldInput);G.typeahead({hint:!0,highlight:!0,minLength:1},{name:"dataset-name",displayKey:U,source:l.A.substringMatcher(O,U,6),templates:{suggestion:k=>W?`
${c()(W)} ${c()(k[U])}
`:`
${c()(k[U])}
`}}),typeof K=="function"&&(K(),G.typeahead("close")),d()(this.fieldFormGroup).on("typeahead:select typeahead:autocomplete",(k,Q)=>{j&&j(k,Q)})})}componentDidMount(){const{suggestions:O,displayKey:U,suggestionText:W,onTypeaheadLoaded:K,onSuggestionSelected:j}=this.props;this._updateTypeahead({suggestions:O,displayKey:U,suggestionText:W,onTypeaheadLoaded:K,onSuggestionSelected:j})}UNSAFE_componentWillReceiveProps(O){this._destroyTypeahead(),this._updateTypeahead(O)}componentWillUnmount(){this._destroyTypeahead()}render(){const{id:O,label:U,onKeyPress:W,formGroupClassName:K}=this.props;return s.createElement(_,{id:O,type:"text",ref:j=>{this.fieldInputElem=j},wrapperClassName:"typeahead-wrapper",formGroupClassName:K,label:U,onKeyPress:W})}}C(P,"propTypes",{id:r().string.isRequired,label:r().string.isRequired,onKeyPress:r().func,displayKey:r().string,formGroupClassName:r().string,suggestions:r().array,suggestionText:r().string,onTypeaheadLoaded:r().func,onSuggestionSelected:r().func}),C(P,"defaultProps",{displayKey:"suggestion",formGroupClassName:void 0,onKeyPress:()=>{},onTypeaheadLoaded:()=>{},onSuggestionSelected:()=>{},suggestions:[],suggestionText:void 0});const I=P},"1e+nFvZs":(x,y,e)=>{"use strict";e.d(y,{A:()=>C});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("alU4HbhK"),n=e.n(o),c=e("J6y4/h8P"),g=e("rIl5IEuP"),d=e("u2QUEJU3");const f=(0,c.default)(g.Col)(({theme:_})=>(0,c.css)` border-right: ${_.colors.gray[80]} solid 1px; `),p=(0,c.default)(g.Col)` margin-bottom: 15px; `,E=(0,c.default)(g.Nav)(({$style:_,theme:P})=>(0,c.css)` ${_==="stepper"?` &.nav { counter-reset: line-number; > li { counter-increment: line-number; > a { position: relative; display: flex; padding: 10px 0px; justify-content: center; align-items: center; &:hover, &:focus { background-color: initial; } > div { flex-shrink: 0; } &::before { display: flex; justify-content: center; align-items: center; flex-grow: 0; flex-shrink: 0; background-color: ${P.colors.global.contentBackground}; border-color: ${P.colors.variant.lighter.default}; margin-right: 10px; content: counter(line-number); width: 35px; height: 35px; border-radius: 50%; border: 2px solid; z-index: 2; } &::after { display: flex; justify-content: center; align-items: center; background-color: ${P.colors.global.contentBackground}; border-color: ${P.colors.variant.lighter.default}; margin-right: 10px; content: ' '; border: 1px solid ${P.colors.input.border}; width: 100%; flex-shrink: 1; flex-grow: 0; align-self: center; margin: 0 16px; } &:hover::after { background-color: ${P.colors.variant.lightest.default}; } } &:last-child > a { justify-content: flex-start; &::after { display:none; } } &.disabled > a { color: ${P.colors.variant.light.default}; &:hover, &:focus { color: ${P.colors.variant.light.default}; } } } .open > a { &, &:hover, &:focus { background-color: inital; border-color: ${P.colors.variant.primary}; } } &.nav-justified { > li { > a { text-align: left; } } } &.nav-pills { > li { > a { color: initial; &:hover { color: ${P.colors.global.link}; } } &.active > a { &, &:hover, &:focus { color: ${P.colors.global.link}; background-color: initial; } } } } } `:`&.nav { > li { border: 1px solid ${P.colors.variant.lighter.default}; border-left: 0; &:first-child { border-left: 1px solid ${P.colors.variant.lighter.default}; border-radius: 4px 0 0 4px; > a { border-radius: 4px 0 0 4px; } } &:last-child { border-radius: 0 4px 4px 0; > a { border-radius: 0 4px 4px 0; } } &:not(:last-child) > a { &::after { transition: background-color 150ms ease-in-out; background-color: ${P.colors.global.contentBackground}; border-color: ${P.colors.variant.lighter.default}; border-style: solid; border-width: 0 1px 1px 0; content: ''; display: block; height: 15px; position: absolute; right: -1px; top: 50%; transform: translateY(-50%) translateX(50%) rotate(-45deg); width: 15px; z-index: 2; } &:hover::after { background-color: ${P.colors.variant.lightest.default}; } } &.active a { &, &:hover, &::after, &:hover::after { background-color: ${P.colors.global.link}; } } > a { border-radius: 0; } } } @media (max-width: ${P.breakpoints.max.md}) { &.nav { > li { border-right: 0; border-left: 0; &:last-child a, &:first-child a { border-radius: 0; } &:not(:last-child) { border-bottom: 0; } &:not(:last-child) > a { &::after { bottom: 0; left: 50%; top: auto; width: 10px; height: 10px; transform: translateY(50%) translateX(-50%) rotate(45deg); } } } &.nav-justified > li > a { margin-bottom: 0; } } }`} `),l=(0,c.default)(g.ButtonToolbar)` padding: 7px; `,m=(_,P)=>_==null?!1:n()(P,{key:_}),h=(_,P)=>{_!=null&&(m(_,P)||console.warn(`activeStep ${_} is not a key in any element of the 'steps' prop!`))};class A extends t.Component{constructor(P){super(P),this._getSelectedStep=()=>{const{activeStep:I,steps:M}=this.props,{selectedStep:O}=this.state;return m(I,M)?I:O},this._wizardChanged=I=>{const{activeStep:M,onStepChange:O}=this.props;O(I),M||this.setState({selectedStep:I})},this._disableButton=I=>{const{steps:M}=this.props,O=this._getSelectedStep(),U=M.length,W=I==="next"?U-1:0,K=M.findIndex(k=>k.key===this._getSelectedStep()),j=I==="next"?K+1:K-1,G=M[j];return M[W].key===O||(G==null?void 0:G.disabled)},this._onNext=()=>{const{steps:I}=this.props;this._wizardChanged(I[this._getSelectedIndex()+1].key)},this._onPrevious=()=>{const{steps:I}=this.props;this._wizardChanged(I[this._getSelectedIndex()-1].key)},this._getSelectedIndex=()=>{const{steps:I}=this.props,M=this._getSelectedStep();return I.map(O=>O.key).indexOf(M)},this._renderVerticalStepNav=()=>{const{justified:I,steps:M,hidePreviousNextButtons:O,style:U}=this.props,W=this._getSelectedStep();return t.createElement(f,{md:2},t.createElement(E,{stacked:!0,bsStyle:"pills",$style:U,activeKey:W,onSelect:this._wizardChanged,justified:I},M.map(K=>t.createElement(g.NavItem,{key:K.key,eventKey:K.key,disabled:K.disabled},K.title))),!O&&t.createElement(t.Fragment,null,t.createElement("br",null),t.createElement(g.Row,null,t.createElement(g.Col,{xs:6},t.createElement(g.Button,{onClick:this._onPrevious,bsSize:"small",bsStyle:"info",disabled:this._disableButton("previous")},"Previous")),t.createElement(g.Col,{className:"text-right",xs:6},t.createElement(g.Button,{onClick:this._onNext,bsSize:"small",bsStyle:"info",disabled:this._disableButton("next")},"Next")))))},this._renderHorizontalStepNav=()=>{const I=this._getSelectedStep(),{justified:M,steps:O,hidePreviousNextButtons:U,style:W}=this.props;return t.createElement(p,{sm:12},!U&&t.createElement("div",{className:"pull-right"},t.createElement(l,null,t.createElement(g.Button,{onClick:this._onPrevious,"aria-label":"Previous",bsSize:"xsmall",bsStyle:"info",disabled:this._disableButton("previous")},t.createElement(d.A,{name:"arrow_left"})),t.createElement(g.Button,{onClick:this._onNext,"aria-label":"Next",bsSize:"xsmall",bsStyle:"info",disabled:this._disableButton("next")},t.createElement(d.A,{name:"arrow_right"})))),t.createElement(E,{bsStyle:"pills",activeKey:I,$style:W,onSelect:this._wizardChanged,justified:M},O.map(K=>t.createElement(g.NavItem,{key:K.key,eventKey:K.key,disabled:K.disabled},K.title))))},h(P.activeStep,P.steps),this.state={selectedStep:P.steps[0].key}}componentDidUpdate(){const{activeStep:P,steps:I}=this.props;h(P,I)}render(){const{steps:P,horizontal:I,containerClassName:M,children:O}=this.props;let U;O?U=7:U=I?12:10;const W=I?5:3;return t.createElement(g.Row,{className:M},I?this._renderHorizontalStepNav():this._renderVerticalStepNav(),t.createElement(g.Col,{md:U},P[this._getSelectedIndex()].component),O&&t.createElement(g.Col,{md:W},O))}}A.propTypes={steps:s().arrayOf(s().object).isRequired,activeStep:s().oneOfType([s().string,s().number]),onStepChange:s().func,children:s().element,horizontal:s().bool,justified:s().bool,containerClassName:s().string,hidePreviousNextButtons:s().bool,style:s().oneOf(["stepper",void 0])},A.defaultProps={children:void 0,activeStep:void 0,onStepChange:()=>{},horizontal:!1,justified:!1,containerClassName:"content",hidePreviousNextButtons:!1,style:void 0};const C=A},UEhMhaHZ:(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("z6FdWyn/");const o=r.default.div(({$size:p,$gap:E,theme:l})=>(0,r.css)` flex: 0 0 ${p!=null?p:"24%"}; min-width: 0; min-height: 100px; margin-right: ${E!=null?E:l.spacings.sm}; position: relative; `),n=({children:p,size:E,gap:l})=>t.createElement(o,{$size:E,$gap:l},p);n.defaultProps={children:void 0,size:void 0,gap:void 0};const c=n,g=r.default.div` &.carousel { overflow: hidden; .carousel-container { backface-visibility: hidden; display: flex; flex-direction: row; height: auto; } } `,d=({children:p})=>{const[E]=(0,s.A)({containScroll:"trimSnaps"});return t.createElement(g,{className:"carousel",ref:E},t.createElement("div",{className:"carousel-container"},p))};d.Slide=c;const f=d},IOI9nV80:(x,y,e)=>{"use strict";e.d(y,{nD:()=>f,As:()=>C,rK:()=>k.A,Ye:()=>G,FN:()=>le.A,ov:()=>z,bL:()=>V.A,$I:()=>at,TM:()=>ze.A,Oj:()=>he.A,iq:()=>Re.A,nB:()=>ce.A,xz:()=>Oe,bQ:()=>ve.A,lr:()=>xe,Qc:()=>Ue.A,bj:()=>ft,un:()=>Ot.A,$R:()=>rn,Uk:()=>gn,UA:()=>Ie.A,b2:()=>wn.A,z5:()=>Zn.A,$p:()=>ln,hG:()=>Wo,m1:()=>vo,Gr:()=>Yn,yr:()=>tn,Rq:()=>co,hP:()=>Ds,o$:()=>xo,jF:()=>$n.A,Zf:()=>Ts.A,Sr:()=>et,In:()=>qt.A,K0:()=>Et.A,Wj:()=>wt.A,QW:()=>Ut.A,xB:()=>dt,Bt:()=>Fn,qc:()=>Wn,gw:()=>Ao,tF:()=>Us,z9:()=>ds,Gk:()=>na,VX:()=>$e,oz:()=>Xe.A,D2:()=>xt,E6:()=>Nt.A,KF:()=>Ht.A,mK:()=>Kn,WE:()=>$t.A,EO:()=>yn,N:()=>Un.A,J5:()=>Ge,zY:()=>mt.A,t7:()=>Dt.A,Md:()=>Is.A,OW:()=>Jt.A,dK:()=>us.A,Fb:()=>as.A,ZL:()=>Ra,z2:()=>pr.A,xf:()=>Ta.A,WY:()=>Er,sR:()=>Ms.A,sb:()=>zs,QP:()=>Xr,B9:()=>fr.A,l6:()=>Hs.A,kA:()=>Wr,PB:()=>yr,wD:()=>Fr,yc:()=>Yr.A,bH:()=>xa.default,Qb:()=>Cc,y$:()=>Ro.A,tJ:()=>Ja.A,f6:()=>Kr,gM:()=>_r.A,Dc:()=>vc.A,o4:()=>xs,lM:()=>Tl,m_:()=>ai.A,ci:()=>ws,Ns:()=>Ua,sQ:()=>_l.A});var t=e("8jTixuP6"),r=e("Z7aTuO5B"),s=e("ii0bleBb"),o=e.n(s),n=e("J6y4/h8P"),c=e("0f9+EyYg");const g=(0,n.default)(c.YZ)` margin-bottom: 0; `,d=({activeKey:te,children:q,id:ie,onSelect:tt,...ct})=>{const _t=te==null?void 0:te.replace(/[^0-9a-zA-Z-]/g,"-").toLowerCase(),Cn=(0,r.useCallback)(Io=>tt(Io),[tt]);return r.createElement(g,{...ct,activeKey:_t,id:ie,onSelect:Cn,accordion:!0},q)};d.propTypes={activeKey:o().string,children:o().node.isRequired,id:o().string.isRequired,onSelect:o().func},d.defaultProps={activeKey:void 0,defaultActiveKey:void 0,onSelect:()=>{}};const f=d;var p=e("S9hCvsKB");const E=(0,n.default)(p.A)` border: 0; border-radius: 0; box-shadow: none; `,l=(0,n.default)(p.A.Heading)(({theme:te})=>(0,n.css)` && { padding: 0; border-radius: 0; background-color: ${te.colors.variant.lightest.default}; } `),m=(0,n.default)(p.A.Title)(({theme:te})=>(0,n.css)` font-size: ${te.fonts.size.small}; color: ${te.colors.global.link}; > a { padding: 3px 9px; display: block; } `),h=(0,n.default)(p.A.Body)(({theme:te})=>(0,n.css)` ${E} > ${l} + .panel-collapse > & { background-color: ${te.colors.global.contentBackground}; border-top-color: ${te.colors.variant.lighter.default}; border-bottom-width: 0; color: ${te.colors.variant.darkest.default}; } `),A=({children:te,name:q,id:ie,...tt})=>{const ct=ie!=null?ie:q.replace(/[^0-9a-zA-Z]/g,"-").toLowerCase();return r.createElement(E,{...tt,id:ie,eventKey:ct},r.createElement(l,null,r.createElement(m,{toggle:!0},q)),r.createElement(p.A.Collapse,null,r.createElement(h,null,te)))};A.propTypes={name:o().node.isRequired,id:o().string,children:o().node.isRequired},A.defaultProps={id:void 0};const C=A;var _=e("L3UIULT/");const P=null;var I=e("UiXZqrDE");const M=n.default.label` font-weight: bold; margin-bottom: 5px; display: inline-block; font-size: 14px; background: none; `,O=n.default.span` color: ${te=>te.theme.colors.gray[50]}; `,U=({fieldName:te,label:q,clearable:ie,required:tt,helpText:ct,options:_t})=>r.createElement(I.Field,{name:te,help:ct},({field:{name:Cn,value:Io,onChange:wo}})=>r.createElement(r.Fragment,null,r.createElement(M,null,q),r.createElement(Hs.A,{id:te,name:Cn,clearable:ie,required:tt,allowCreate:!0,onChange:Oo=>wo({target:{value:Oo,name:Cn}}),options:_t,value:Io}),ct&&r.createElement("span",{className:"help-block"},r.createElement(O,null,ct))));U.defaultProps={clearable:!1,required:!1,helpText:"",options:[]};const W=null;var K=e("IZYxBTgT");const j=({dateTime:te,format:q})=>{const ie=te!=null?te:new Date,tt=(0,K.to)(ie,"internal"),ct=(0,K.dP)(ie,q);return r.createElement("time",{dateTime:tt,title:tt},ct)};j.propTypes={dateTime:o().oneOfType([o().string,o().object,o().number]),format:o().string},j.defaultProps={format:"default",dateTime:void 0};const G=j;var k=e("dMf4yqaX");const Q=n.default.div(({$fullHeight:te})=>` display: flex; height: ${te?"100%":"auto"}; justify-content: center; align-items: center; `),ne=({children:te,fullHeight:q})=>r.createElement(Q,{$fullHeight:q},te);ne.defaultProps={fullHeight:!0};const z=ne;var le=e("UEhMhaHZ"),V=e("TWZE6ai3"),me=e("6nsVPoEI"),Pe=e("6j4Sgo2g");const Ve=({id:te,placement:q,title:ie,triggerNode:tt,onChange:ct,..._t})=>{const[Cn,Io]=(0,r.useState)(!1),wo=(0,r.useRef)(),Oo=(0,r.useCallback)(()=>{Io(!Cn)},[Cn]),Ho=(0,r.useCallback)(()=>Io(!1),[]),ns=(0,r.useCallback)((zo,ps)=>{ct(zo,ps,Oo)},[Oo,ct]);return r.createElement(Pe.A,{id:te,opened:Cn,position:q,onClose:Ho},r.createElement(Pe.A.Target,null,(0,r.cloneElement)(tt,{onClick:Oo,ref:wo})),r.createElement(Pe.A.Dropdown,{title:ie},r.createElement(me.A,{onChange:ns,..._t})))};Ve.propTypes={id:o().string.isRequired,placement:o().oneOf(["top","right","bottom","left"]),title:o().string,triggerNode:o().node.isRequired,onChange:o().func.isRequired},Ve.defaultProps={placement:"bottom",title:"Pick a color",colors:void 0};const at=Ve;var ze=e("/e3sftg8"),he=e("t7jeigEY"),Ie=e("MZSqcZgA"),Re=e("iDUHYfT2"),ce=e("9gxkERa8");const Ee=r.forwardRef(({formatSelection:te,children:q,className:ie},tt)=>{const ct=_t=>{const Cn=te(document.getSelection());_t.clipboardData.setData("text/plain",Cn),_t.preventDefault()};return r.createElement("div",{className:ie,ref:tt,onCopy:ct},q)});Ee.defaultProps={className:void 0};const oe=null;var ae=e("GwjzBeBD");const ye=(0,r.forwardRef)(({children:te,onClick:q,className:ie,title:tt},ct)=>r.createElement(ae.A,{bsStyle:"info",className:ie,onClick:q,ref:ct,title:tt},te));ye.defaultProps={onClick:void 0,className:"",title:void 0};const Oe=ye;var ve=e("uoAlNf/n"),_e=e("awUYZK9l"),He=e("OeoQZrS6");const je=(0,n.default)(_e.Ay)(({theme:te})=>(0,n.css)` width: 100%; .DayPicker-Day { min-width: 34px; max-width: 34px; min-height: 34px; max-height: 34px; &--selected:not(.DayPicker-Day--disabled, .DayPicker-Day--outside) { background-color: ${te.colors.variant.lighter.primary}; color: ${te.colors.variant.darkest.primary}; } &--today { color: ${te.colors.variant.info}; } &:focus { outline-color: ${te.colors.variant.primary}; } } &:not(.DayPicker--interactionDisabled) .DayPicker-Day:not(.DayPicker-Day--disabled, .DayPicker-Day--selected, .DayPicker-Day--outside) { &:focus { outline-color: ${te.colors.variant.primary}; } &:hover { background-color: ${te.colors.variant.lightest.primary}; color: ${te.colors.variant.darker.primary}; } } `),Qe=te=>(0,r.useMemo)(()=>{if(!te||(0,K.vd)((0,K.$4)(te,["date"])))return te},[te]),zt=({date:te,fromDate:q,onChange:ie,showOutsideDays:tt})=>{const ct=Qe(te),_t=(0,r.useMemo)(()=>({selected:Cn=>ct?ct===(0,K.to)(Cn,"date"):!1,disabled:{before:new Date(q)}}),[q,ct]);return r.createElement(je,{initialMonth:ct?(0,K.$4)(ct).toDate():void 0,onDayClick:ie,modifiers:_t,showOutsideDays:tt})};zt.propTypes={date:o().oneOfType([o().object,o().string]),onChange:o().func.isRequired,fromDate:o().instanceOf(Date),showOutsideDays:o().bool},zt.defaultProps={date:void 0,fromDate:void 0,showOutsideDays:!1};const xe=zt;var Ue=e("qQvt58D8");const ke=n.default.ul.attrs(()=>({className:"dropdown-menu"}))(({$show:te,theme:q,$zIndex:ie,$minWidth:tt})=>(0,n.css)` display: ${te?"block":"none"}; color: ${q.colors.variant.dark.default}; background-color: ${q.colors.variant.lightest.default}; box-shadow: 0 3px 3px ${q.colors.global.navigationBoxShadow}; z-index: ${ie}; min-width: ${tt?`${tt}px`:"max-content"}; .dropdown-header { color: ${q.colors.variant.dark.default}; padding: 3px 10px; } > li { > a { padding: 3px 10px; color: ${q.colors.variant.darker.default}; display: flex; align-items: center; &:hover { color: ${q.colors.variant.darkest.default}; background-color: ${q.colors.variant.lighter.default}; } } &.disabled { > a { color: ${q.colors.variant.light.default}; } } } `);function Se(te,q,ie){var tt,ct;return(tt=te.props)!=null&&tt.onSelect?{onSelect:(_t,Cn)=>{te.props.onSelect(),ie(Cn)}}:(ct=te.props)!=null&&ct.children?{children:Je(te.props.children,q+1,ie)}:{}}function Je(te,q,ie){return q>2?te:r.Children.map(te,ct=>ct!=null&&ct.props?r.cloneElement(ct,{...ct.props,...Se(ct,q+1,ie)}):ct)}const nt=({show:te,children:q,zIndex:ie,onMenuItemSelect:tt,minWidth:ct,..._t})=>{const Cn=Je(q,0,tt);return r.createElement(ke,{..._t,$show:te,$zIndex:ie,$minWidth:ct},Cn)};nt.propTypes={children:o().node.isRequired,zIndex:o().number,show:o().bool,minWidth:o().number},nt.defaultProps={show:!1,zIndex:1050,minWidth:void 0,onMenuItemSelect:()=>{}};const Wt=null;var Le=e("rIl5IEuP");const Fe=n.default.span(({theme:te})=>(0,n.css)` display: block; content: ' '; float: right; width: 0; height: 0; border-color: transparent; border-style: solid; border-width: 5px 0 5px 5px; border-left-color: ${te.colors.gray[80]}; margin-top: 5px; margin-right: -10px; `),qe=(0,n.default)(Le.Dropdown)(({$left:te,theme:q})=>(0,n.css)` position: relative; display: flex; gap: 5px; > a { color: ${q.colors.global.textDefault}; } > .dropdown-menu { top: 0; left: ${te?"auto":"100%"}; right: ${te?"98%":"auto"}; margin-top: -6px; margin-left: ${te?"10px":"-1px"}; border-radius: ${te?"6px 0 6px 6px":"0 6px 6px 6px"}; background-color: ${q.colors.global.contentBackground}; } &:hover > .dropdown-menu { display: block; } `),ut=({children:te,left:q,title:ie})=>r.createElement(Le.MenuItem,null,r.createElement(qe,{$left:q,as:"div"},ie," ",r.createElement(Fe,null),r.createElement(Le.Dropdown.Menu,null,te)));ut.propTypes={children:o().node.isRequired,left:o().bool,title:o().string},ut.defaultProps={left:!1,title:void 0};const ft=ut;var Ot=e("IdpefXWm");const Lt=n.default.div` display: flex; flex-direction: column; align-items: center; p { text-align: center; } `,an=n.default.h2` margin-top: 5px; margin-bottom: 10px; text-align: center; `,Ft=({children:te,title:q})=>r.createElement(Lt,null,r.createElement(an,null,q),te);Ft.propTypes={title:o().oneOfType([o().string,o().node]),children:o().node.isRequired},Ft.defaultProps={title:"Looks like there is nothing here, yet!"};const rn=Ft;var $t=e("G8YcST+s");const be=({children:te,className:q})=>r.createElement(Le.Alert,{className:`${q!=null?q:""} no-bm`},te||"No data available.");be.defaultProps={className:void 0};const yn=be;var Kt=e("E+CaPsQD"),An=e("7dh0vSOR"),qt=e("u2QUEJU3");const io=(0,n.default)(p.A.Title)` display: flex; align-items: center; `,Be=(0,n.default)(qt.A)` margin-right: 5px; margin-top: -1px; `,bn=({featureName:te,wrapperClassName:q})=>r.createElement(p.A,{bsStyle:"info",className:q},r.createElement(p.A.Heading,null,r.createElement(io,null,r.createElement(Be,{name:"enterprise"}),"Enterprise Feature")),r.createElement(p.A.Body,null,"To use the ",r.createElement("b",null,te)," functionality you need the ",r.createElement("a",{href:"https://www.graylog.org/products/enterprise",rel:"noopener noreferrer",target:"_blank"},"Graylog Enterprise license")," and the ",r.createElement(An.A,{page:Kt.A.PAGES.ENTERPRISE_SETUP,text:"Graylog Enterprise plugin"}),"."));bn.propTypes={featureName:o().string.isRequired,wrapperClassName:o().string},bn.defaultProps={wrapperClassName:"no-bm"};const gn=bn;var wn=e("gn61rwrR"),Zn=e("KDUSw0C6");const Vn=(0,n.default)(Le.Row)` margin-bottom: 0 !important; `,po=n.default.div(({margin:te})=>` margin-top: ${te}px; margin-bottom: ${te}px; `),De=({children:te,onClose:q,bsStyle:ie="warning",marginTopBottom:tt=15,runtimeError:ct})=>{const _t=ct?"danger":ie;return te?r.createElement(po,{margin:tt},r.createElement(Le.Alert,{bsStyle:_t},r.createElement(Vn,null,r.createElement(Le.Col,{md:11},ct&&r.createElement("h4",null,"Runtime Error"),te),r.createElement(Le.Col,{md:1},r.createElement(Le.Button,{bsSize:"xsmall",bsStyle:_t,className:"pull-right",onClick:()=>q(void 0)},r.createElement(qt.A,{name:"close"})))))):null};De.propTypes={bsStyle:o().string,runtimeError:o().bool,marginTopBottom:o().number,children:o().oneOfType([o().arrayOf(o().element),o().element,o().string]),onClose:o().func},De.defaultProps={bsStyle:"warning",runtimeError:!1,marginTopBottom:15,children:null,onClose:()=>{}};const ln=De;var bt=e("dFpwyWHg"),It=e.n(bt),En=e("C2ikvoS0"),Xt=e.n(En),Ye=e("1IntWRSu"),At=e.n(Ye),Ct=e("8nGWeFnd"),Bt=e.n(Ct),Ze=e("TeAcaicX"),gt=e.n(Ze),cn=e("eE3+5goe"),un=e.n(cn),_n=e("3czfsiiO"),vn={};vn.styleTagTransform=un(),vn.setAttributes=Bt(),vn.insert=At().bind(null,"head"),vn.domAPI=Xt(),vn.insertStyleElement=gt();var Ln=It()(_n.A,vn);const Xn=_n.A&&_n.A.locals?_n.A.locals:void 0,no=({children:te,className:q})=>r.createElement("ul",{className:q?`${Xn.list} ${q}`:Xn.list},te);no.defaultProps={className:""},no.propTypes={className:o().string};const Wo=no,Co=n.default.li(({$padded:te})=>(0,n.css)` padding: ${te?"10px 5px":""}; `),Fo=n.default.div(({theme:te})=>(0,n.css)` display: flex; font-size: ${te.fonts.size.body}; line-height: 20px; label { min-height: 20px; margin-bottom: 2px; margin-right: 5px; * { cursor: pointer; } } `),rt=n.default.div` display: inline-block; width: 20px; margin-right: 5px; `,Mt=n.default.div(({theme:te})=>(0,n.css)` cursor: pointer; font-size: ${te.fonts.size.large}; line-height: 20px; width: 1em; height: 1em; vertical-align: text-top; &:hover { color: ${te.colors.variant.primary}; opacity: 1; } `),Rt=n.default.span(({theme:te})=>(0,n.css)` font-size: ${te.fonts.size.large}; `),fn=n.default.button` display: flex; border: 0; padding: 0; text-align: left; background: transparent; `,Dn=n.default.span(({theme:te})=>(0,n.css)` font-size: ${te.fonts.size.body}; margin-left: 0.5em; color: ${te.colors.gray[70]}; `),kn=n.default.div(({theme:te})=>(0,n.css)` border-left: 1px ${te.colors.gray[90]} solid; margin-left: 35px; margin-top: 10px; padding-left: 5px; `),ro=te=>{const{expanded:q,indetermined:ie,stayExpanded:tt,padded:ct,..._t}=te;return _t};class Gn extends r.Component{constructor(q){super(q),this._toggleExpand=()=>{const{stayExpanded:ie}=this.props,{expanded:tt}=this.state;ie?this.setState({expanded:!0}):this.setState({expanded:!tt})},this._clickOnHeader=()=>{this._checkbox&&this._checkbox.click()},this.state={expanded:q.expanded}}componentDidMount(){const{indetermined:q}=this.props;q&&this._checkbox&&(this._checkbox.indeterminate=q)}componentDidUpdate(q){const{expanded:ie,indetermined:tt}=this.props;q.expanded!==ie&&this._toggleExpand(),this._checkbox&&(this._checkbox.indeterminate=tt)}render(){const{expanded:q}=this.state,{padded:ie}=this.props,{checked:tt,expandable:ct,selectable:_t,header:Cn,subheader:Io,children:wo,...Oo}=this.props,Ho=_t?r.createElement(fn,{type:"button",tabIndex:0,onClick:this._clickOnHeader},Cn):Cn,ns=ro(Oo);return r.createElement(Co,{$padded:ie},r.createElement(Fo,null,_t&&r.createElement(Le.Checkbox,{inputRef:zo=>{this._checkbox=zo},inline:!0,title:"Select item",checked:tt,...ns}),ct&&r.createElement(rt,{role:"button",tabIndex:0,onClick:this._toggleExpand,title:`${q?"Shrink":"Expand"} list item`},r.createElement(Mt,null,r.createElement(qt.A,{name:q?"expand_circle_up":"expand_circle_down"}))),r.createElement(Rt,{className:"header"},Ho,Io&&r.createElement(Dn,null,Io))),r.createElement(kn,null,q&&wo))}}Gn.propTypes={checked:o().bool,indetermined:o().bool,selectable:o().bool,expandable:o().bool,expanded:o().bool,stayExpanded:o().bool,header:o().oneOfType([o().string,o().element]).isRequired,subheader:o().oneOfType([o().string,o().element]),children:o().oneOfType([o().element,o().arrayOf(o().element)]),padded:o().bool,readOnly:o().bool,onChange:o().func},Gn.defaultProps={checked:!1,indetermined:!1,expandable:!0,expanded:!1,selectable:!0,children:[],subheader:void 0,stayExpanded:!1,padded:!0,readOnly:!1,onChange:()=>{}};const vo=Gn;var yo=e("sWSSTOXR"),lo=e.n(yo);const Jn=({children:te,className:q,href:ie,iconName:tt,target:ct})=>{const _t=r.createElement("span",null,te,"\xA0",r.createElement(qt.A,{name:tt}));return lo()(ie)===""?_t:r.createElement("a",{href:ie,target:ct,className:q,rel:"noopener noreferrer"},_t)};Jn.defaultProps={href:"",target:"_blank",iconName:"open_in_new",className:""},Jn.propTypes={href:o().string,children:o().node.isRequired,target:o().string,iconName:o().string,className:o().string};const Yn=Jn,Gt=({iconName:te,children:q,...ie})=>r.createElement(Le.Button,{...ie},r.createElement(Yn,{iconName:te},q));Gt.propTypes={href:o().string.isRequired,children:o().node.isRequired,bsStyle:o().string,bsSize:o().string,target:o().string,iconName:o().string,className:o().string,disabled:o().bool},Gt.defaultProps={bsStyle:"default",bsSize:void 0,target:"_blank",iconName:"open_in_new",className:"",disabled:!1};const tn=Gt;var Qt=e("liHGlRT1");const co=n.default.div` ${Qt.w} padding: 9px; margin-left: -15px; margin-right: -15px; `;var $n=e("myNaa1PZ");const To=({labelClassName:te,wrapperClassName:q,label:ie,name:tt,onChange:ct,..._t})=>r.createElement($n.A,{..._t,label:ie,id:tt,onChange:ct,name:tt,labelClassName:te,wrapperClassName:q});To.defaultProps={autoComplete:void 0,bsSize:void 0,buttonAfter:void 0,children:null,disabled:!1,onChange:void 0,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",formGroupClassName:void 0,type:void 0,error:void 0,placeholder:void 0,help:void 0,min:void 0,max:void 0,minLength:void 0,maxLength:void 0,required:!1,validate:()=>{},rows:void 0,autoFocus:!1};const xo=To;var Ps=e("CrIFpfDF"),bo=e("+Ej1FZHV"),Ro=e("dsvqAVKU");const No=(0,n.default)(qt.A)` margin-right: 0.2em; `,fs=te=>{const{bsSize:q,className:ie,centerCol:tt,displayCancel:ct,disabledSubmit:_t,formId:Cn,isAsyncSubmit:Io,onSubmit:wo,submitButtonText:Oo,submitButtonType:Ho,submitIcon:ns}=te;return r.createElement(Ps.A,{className:ie},r.createElement(bo.A,{bsStyle:"success",bsSize:q,disabled:_t||Io&&te.isSubmitting,form:Cn,title:Oo,"aria-label":Oo,type:Ho,onClick:wo},ns&&!(Io&&te.isSubmitting)&&r.createElement(No,{name:ns}),Io&&te.isSubmitting?r.createElement(Ro.A,{text:te.submitLoadingText,delay:0}):Oo),tt,ct===!0&&r.createElement(bo.A,{type:"button",bsSize:q,onClick:te.onCancel,title:"Cancel","aria-label":"Cancel",disabled:te.disabledCancel||Io&&te.isSubmitting},"Cancel"))};fs.defaultProps={bsSize:void 0,centerCol:void 0,className:void 0,disabledSubmit:!1,displayCancel:!0,formId:void 0,isAsyncSubmit:!1,onSubmit:void 0,submitButtonType:"submit",submitIcon:void 0};const Ds=fs;var Os=e("Q1zRxDOP"),hs=e("q2j1bVbz");const Cs=({children:te,id:q,type:ie,hideChildren:tt})=>{const ct=(0,hs.A)(),Cn=`entity:own:${(0,Os.i)(ie,q)}`,Io="*";if(ct){const{grnPermissions:wo=[],permissions:Oo}=ct,Ho=Oo.includes(Io);if(wo.includes(Cn)||Ho)return!tt&&typeof te=="function"?r.createElement(r.Fragment,null,te({disabled:!1})," "):r.createElement(r.Fragment,null,"children")}return!tt&&typeof te=="function"?r.createElement(r.Fragment,null,te({disabled:!0})," "):null};Cs.propTypes={children:o().oneOfType([o().node,o().func]).isRequired,id:o().string,type:o().string.isRequired,hideChildren:o().bool},Cs.defaultProps={hideChildren:!1,id:void 0};const $s=Cs;var Ts=e("6tmAsyUP"),re=e("HvPssUok");class we extends r.Component{constructor(q){super(q),this._onUpdate=()=>{let ie=this.isoDuration.getValue().toUpperCase();ie.startsWith("P")||(ie=`P${ie}`),this.setState({duration:ie}),re.di(ie,this.props.validator)&&this.props.update(ie)},this.state={duration:this.props.duration}}render(){return r.createElement(Le.Input,{id:this.props.id,type:"text",ref:q=>{this.isoDuration=q},label:this.props.label,onChange:this._onUpdate,value:this.state.duration,help:this.props.help,addonAfter:re.oz(this.state.duration,this.props.validator,this.props.errorText),bsStyle:re.Q4(this.state.duration,this.props.validator),autoFocus:this.props.autoFocus,required:this.props.required,disabled:this.props.disabled})}}we.propTypes={id:o().string.isRequired,duration:o().string.isRequired,update:o().func.isRequired,label:o().string,help:o().string,validator:o().func,errorText:o().string,autoFocus:o().bool,required:o().bool,disabled:o().bool},we.defaultProps={label:"Duration",help:"as ISO8601 Duration",validator:()=>!0,errorText:"invalid",autoFocus:!1,required:!1,disabled:!1};const et=we;var Et=e("Ofda/4py"),wt=e("rzOX6PZw"),Ut=e("Kz+u8q89");const Pn=n.default.span(({theme:te})=>` color: ${te.colors.gray[60]}; font-weight: normal; `),Fn=()=>r.createElement(Pn,null,"(Opt.)");var jn=e("tSKCR4ul"),go=e("CCNXj2ra");const Lo=te=>{const q=(0,n.useTheme)(),ie={...q,colors:{...q.colors,primary:q.colors.input.borderFocus,primary75:q.colors.variant.light.default,primary50:q.colors.variant.lighter.default,primary25:q.colors.variant.lightest.default,danger:q.colors.variant.darker.info,dangerLight:q.colors.variant.lighter.info,neutral0:q.colors.input.background,neutral5:q.colors.input.backgroundDisabled,neutral10:q.colors.variant.lightest.info,neutral20:q.colors.input.border,neutral30:q.colors.gray[70],neutral40:q.colors.gray[60],neutral50:q.colors.gray[50],neutral60:q.colors.gray[40],neutral70:q.colors.gray[30],neutral80:q.colors.gray[20],neutral90:q.colors.gray[10]}};return{inputListTheme:ie,styles:ct=>({valueContainer:_t=>({..._t,padding:te==="small"?"0 8px":"2px 12px"}),control:(_t,{isFocused:Cn})=>({..._t,borderWidth:Cn?1:_t.borderWidth,outline:Cn?0:_t.outline,boxShadow:Cn?ie.colors.input.boxShadow:null,...te==="small"?{minHeight:29,height:29}:{minHeight:34},borderRadius:go.Jk,alignItems:"center",borderColor:ct?_t.borderColor:ie.colors.brand.primary}),placeHolder:_t=>({..._t,color:ie.colors.input.placeholder,lineHeight:"28px",fontFamily:ie.fonts.family.body,fontSize:ie.fonts.size.body,fontWeight:400,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",maxWidth:"100%",paddingRight:"20px"}),multiValue:_t=>({..._t,border:`1px solid ${ie.colors.variant.lighter.info}`}),multiValueLabel:_t=>({..._t,color:ct?_t.color:ie.colors.brand.primary,padding:"2px 5px",fontSize:ie.fonts.size.small}),multiValueRemove:_t=>({..._t,borderLeft:`1px solid ${ie.colors.variant.lighter.info}`,paddingLeft:"5px",paddingRight:"5px",borderRadius:"0"})})}};class Mn extends Event{set target(q){this._target=q}get target(){return this._target}set currentTarget(q){this._target=q}get currentTarget(){return this._target}preventDefault(){super.preventDefault(),this._defaultPrevented=!0}isDefaultPrevented(){return this._defaultPrevented}stopPropagation(){super.stopPropagation(),this._propagationStopped=!0}isPropagationStopped(){return this._propagationStopped}persist(){this._persisted=!0}}const On=te=>({label:te,value:te}),ko=({name:te,values:q,onChange:ie,label:tt,size:ct,bsStyle:_t,error:Cn,help:Io,...wo})=>{const{inputListTheme:Oo,styles:Ho}=Lo(ct),ns=r.useRef(null),[zo,ps]=r.useState(""),[ma,Fs]=r.useState(q.map(rs=>On(rs)));r.useLayoutEffect(()=>Fs(q.map(rs=>On(rs))),[q]);const Ks=rs=>{const gs=rs.map(Y=>Y.value),Zo=new Mn("change");ns.current.value=gs,ns.current.name=te,Zo.target=ns.current,ie(Zo)},Vs=rs=>{if(zo&&(rs.key==="Enter"||rs.key==="Tab")){const gs=[...ma,On(zo)];Fs(gs),Ks(gs),ps(""),rs.preventDefault()}},Aa=rs=>{Fs(rs),Ks(rs)};return r.createElement(Le.FormGroup,{controlId:wo.id?wo.id:te,validationState:Cn?"error":_t},tt&&r.createElement(Le.ControlLabel,null,tt),r.createElement(jn.A,{ref:ns,components:{DropdownIndicator:null},inputValue:zo,isMulti:!0,menuIsOpen:!1,onChange:Aa,onInputChange:rs=>ps(rs),onKeyDown:Vs,value:ma,styles:Ho(!Cn),theme:rs=>({...rs,...Oo}),...wo}),r.createElement(Ut.A,{error:Cn,help:Io}))};ko.defaultProps={label:null,size:"normal",bsStyle:null,error:null,help:null};const dt=ko;var ht=e("hrjdtDAf"),Pt=Object.defineProperty,dn=(te,q,ie)=>q in te?Pt(te,q,{enumerable:!0,configurable:!0,writable:!0,value:ie}):te[q]=ie,jt=(te,q,ie)=>(dn(te,typeof q!="symbol"?q+"":q,ie),ie);const nn=[{value:"STRING",label:"string"},{value:"NUMBER",label:"number"},{value:"OBJECT",label:"object"},{value:"ARRAY",label:"array"},{value:"BOOLEAN",label:"boolean"},{value:"NULL",label:"null"}];class Rn extends r.Component{constructor(q){super(q),jt(this,"_computeInitialState",()=>({value:this.props.value,valueType:this.props.valueType})),jt(this,"_propagateState",()=>{this.props.update(this.state.value,this.state.valueType)}),jt(this,"_onUpdate",ie=>{const{value:tt}=ie.target;this.setState({value:tt},this._propagateState)}),jt(this,"_onValueTypeSelect",ie=>{this.setState({valueType:ie},this._propagateState)}),this.state=this._computeInitialState()}UNSAFE_componentWillReceiveProps(){this.setState(this._computeInitialState())}render(){const q=nn.filter(ie=>this.props.allowedTypes.indexOf(ie.value)>-1).map(ie=>r.createElement(Le.MenuItem,{key:ie.value,onSelect:()=>this._onValueTypeSelect(ie.value)},ie.label));return r.createElement(Le.FormGroup,{validationState:this.props.validationState},this.props.label&&r.createElement(Le.ControlLabel,{className:this.props.labelClassName},this.props.label),r.createElement(Le.InputWrapper,{className:this.props.wrapperClassName},r.createElement(Le.InputGroup,null,r.createElement(Le.FormControl,{type:"text",onChange:this._onUpdate,onBlur:this.props.onBlur,value:this.state.value,required:this.props.required}),r.createElement(Le.DropdownButton,{componentClass:Le.InputGroup.Button,id:"input-dropdown-addon",bsStyle:this.props.validationState==="error"?"danger":"default",title:nn.filter(ie=>ie.value===this.props.valueType)[0].label},q)),this.props.help&&r.createElement(Le.HelpBlock,null,this.props.help)))}}Rn.propTypes={update:o().func.isRequired,onBlur:o().func,label:o().string,help:o().oneOfType([o().string,o().object]),required:o().bool,validationState:o().string,value:o().string,valueType:o().oneOf(nn.map(te=>te.value)),allowedTypes:(te,q,ie)=>{const tt=nn.map(_t=>_t.value),ct=[];return te[q]instanceof Array?(te[q].forEach(_t=>{tt.indexOf(_t)<0&&ct.push(_t)}),ct.length>0?new Error(`Invalid prop ${q} supplied to ${ie}. Expected array of ${tt} but got invalid ${ct}`):null):new Error(`Invalid prop ${q} supplied to ${ie}. Expected an array but got ${te[q]}`)},labelClassName:o().string,wrapperClassName:o().string},Rn.defaultProps={value:"",valueType:"STRING",allowedTypes:nn.map(te=>te.value),label:"",help:"",required:!1,validationState:null,labelClassName:void 0,wrapperClassName:void 0,onBlur:void 0};const Wn=Rn;var xn=e("D/X+X5ed");const So=({shortcut:te})=>((0,xn.Ay)(te),null),zn=({children:te,shortcuts:q})=>r.createElement(r.Fragment,null,q.map(ie=>r.createElement(So,{key:`${ie.scope}.${ie.actionKey}`,shortcut:ie})),te);zn.defaultProps={children:null};const Ao=zn;var Jo=e("QdZ7Yq43"),Ko=Object.defineProperty,fo=(te,q,ie)=>q in te?Ko(te,q,{enumerable:!0,configurable:!0,writable:!0,value:ie}):te[q]=ie,$o=(te,q,ie)=>(fo(te,typeof q!="symbol"?q+"":q,ie),ie);const es=n.default.div` .form-group { margin-left: 0; margin-right: 0; } `;class vs extends r.Component{constructor(q){super(q),$o(this,"_onPairsChange",ie=>{this.props.onChange&&this.props.onChange(ie)}),$o(this,"_bindValue",ie=>{const tt={};tt[ie.target.name]=ie.target.value,this.setState(tt)}),$o(this,"_addRow",()=>{const ie=Jo.A.clone(this.props.pairs);ie[this.state.newKey]=this.state.newValue,this._onPairsChange(ie),this.setState({newKey:"",newValue:""})}),$o(this,"_deleteRow",ie=>()=>{if(window.confirm(`Are you sure you want to delete property '${ie}'?`)){const tt=Jo.A.clone(this.props.pairs);delete tt[ie],this._onPairsChange(tt)}}),$o(this,"_formattedHeaders",ie=>r.createElement("tr",null,ie.map((tt,ct)=>{const _t={};if(ct===ie.length-1){if(!this.props.editable)return null;_t.width=75}return r.createElement("th",{key:tt,style:_t},tt)}))),$o(this,"_formattedRows",ie=>Object.keys(ie).sort().map(tt=>{let ct;if(this.props.editable){const _t=[];_t.push(r.createElement(Le.Button,{key:`delete-${tt}`,bsStyle:"danger",bsSize:this.props.actionsSize,onClick:this._deleteRow(tt)},"Delete")),ct=r.createElement("td",null,_t)}return r.createElement("tr",{key:tt},r.createElement("td",null,tt),r.createElement("td",null,ie[tt]),ct)})),$o(this,"_newRow",()=>{if(!this.props.editable)return null;const ie=!this.state.newKey||!this.state.newValue;return r.createElement("tr",null,r.createElement("td",null,r.createElement(es,null,r.createElement(Le.Input,{type:"text",name:"newKey",id:"newKey","data-testid":"newKey",bsSize:"small",placeholder:this.props.headers[0],value:this.state.newKey,onChange:this._bindValue}))),r.createElement("td",null,r.createElement(es,null,r.createElement(Le.Input,{type:"text",name:"newValue",id:"newValue","data-testid":"newValue",bsSize:"small",placeholder:this.props.headers[1],value:this.state.newValue,onChange:this._bindValue}))),r.createElement("td",null,r.createElement(Le.Button,{bsStyle:"success",bsSize:"small",onClick:this._addRow,disabled:ie},"Add")))}),this.state={newKey:"",newValue:""}}render(){return r.createElement("div",{className:"key-value-table-component"},r.createElement("div",{className:`table-responsive ${this.props.containerClassName}`},r.createElement(Le.Table,{className:`table table-striped ${this.props.className}`},r.createElement("thead",null,this._formattedHeaders(this.props.headers)),r.createElement("tbody",null,this._formattedRows(this.props.pairs),this._newRow()))))}}$o(vs,"propTypes",{pairs:o().object.isRequired,headers:o().array,editable:o().bool,onChange:o().func,className:o().string,containerClassName:o().string,actionsSize:o().oneOf(["large","medium","small","xsmall"])}),vs.defaultProps={headers:["Name","Value","Actions"],editable:!1,actionsSize:"xsmall",className:"",containerClassName:"",onChange:()=>{}};const Us=vs;var ga=e("yAXMqwrl");const ts=({to:te,target:q,onClick:ie,...tt})=>{const ct=(0,ga.useNavigate)(),_t=(0,r.useCallback)(Cn=>{q==="_self"?ct(te):window.open(te,q),ie&&ie(Cn)},[q,ie,ct,te]);return r.createElement(Le.Button,{onClick:_t,...tt})};ts.defaultProps={target:"_self"};const ds=ts;var ys=e("ty2gyrHp"),Ns=e("d4kzUuQm"),qs=e("RCNj0OY4"),_o=e("8wYeYPUw"),Gs=e("Vg8s2y9S"),ea=e("8fnsnG21"),js=Object.defineProperty,ta=(te,q,ie)=>q in te?js(te,q,{enumerable:!0,configurable:!0,writable:!0,value:ie}):te[q]=ie,cs=(te,q,ie)=>(ta(te,typeof q!="symbol"?q+"":q,ie),ie);class Rs extends r.PureComponent{render(){const{nodes:q}=this.props;if(!q)return r.createElement(Ro.A,null);const ie=q[this.props.nodeId];if(ie){const tt=ie.is_leader?"star":"fork_right",ct=ie.is_leader?"leader-node":"",_t=ie.is_leader?"This is the leader node in the cluster":"",Cn=r.createElement(r.Fragment,null,r.createElement(qt.A,{name:tt,className:ct,title:_t})," ",ie.short_node_id,r.createElement(_o.A,null," / ",ie.hostname));return qs.A.isCloud()?Cn:r.createElement(ys.N,{to:Ns.Ay.SYSTEM.NODES.SHOW(this.props.nodeId)},Cn)}return r.createElement("i",null,"Unknown Node")}}cs(Rs,"propTypes",{nodeId:o().string.isRequired,nodes:o().object}),Rs.defaultProps={nodes:void 0};const na=(0,ea.A)(Rs,{nodeStore:Gs.j},({nodeStore:te,...q})=>({...q,nodes:te.nodes})),Ea=n.default.div` text-overflow: ellipsis; white-space: nowrap; overflow: hidden; `,Ga=({count:te,listing:q})=>React.createElement(Ea,{title:String(q)},React.createElement(CountBadge,null,te)," ",q),mr=null;var ja=e("k7aCBAx/"),Hs=e("hhdCSTZj"),Ca=e("9xj2LQzD");const ks=te=>{const q=Object.values(te).filter(ie=>ie.language_tag!=="und").map(ie=>({value:ie.language_tag,label:ie.display_name})).sort((ie,tt)=>{const ct=ie.label.toUpperCase(),_t=tt.label.toUpperCase();return ct<_t?-1:ct>_t?1:0});return[{value:"und",label:"Default locale"}].concat(q)},pe=te=>r.createElement("span",{key:te.value,title:"{option.value} [{option.value}]"},te.label," [",te.value,"]"),$e=te=>{const{locales:q}=(0,ea.P)(Ca.z);if(!q)return r.createElement(Ro.A,null);const ie=ks(q);return r.createElement(Hs.A,{...te,placeholder:"Pick a locale",options:ie,optionRenderer:pe})};var Xe=e("s14Hze4o");const xt=n.default.dl(({theme:te})=>(0,n.css)` margin-top: 10px; margin-bottom: 0; dt { font-weight: bold; margin-left: 1px; } dd { margin-bottom: 5px; padding-bottom: 5px; margin-left: 1px; /* Ensures that italic text is not cut */ &.stream-list ul { list-style-type: disc; padding-left: 25px; li { margin-top: 3px; } } div.message-field-actions { padding-left: 10px; position: relative; top: -10px; } } &.message-details-fields { overflow: hidden; } &.message-details-fields span:not(:last-child) dd { border-bottom: 1px solid ${te.colors.gray[90]}; } &.message-details-fields dd { white-space: pre-wrap; } &.message-details-fields .field-value { font-family: ${te.fonts.family.monospace}; } &.message-details-fields dd.message-field .field-value { max-height: 500px; overflow: auto; } `);var Nt=e("rp7UD7rK"),Ht=e("kTp6yg80");const Zt=({children:te})=>{const{handleSubmit:q,handleReset:ie}=(0,I.useFormikContext)(),tt=(0,r.useCallback)(_t=>{_t.preventDefault(),_t.stopPropagation(),q(_t)},[q]),ct=(0,r.useCallback)(_t=>{_t.preventDefault(),_t.stopPropagation(),ie(_t)},[ie]);return r.createElement("form",{onSubmitCapture:tt,onResetCapture:ct},te)};Zt.defaultProps={onReset:void 0};const Kn=Zt;var Un=e("GV8+GAwa"),ue=e("m5sCWlWB");const Te=({errors:te})=>{const q=te?te.map(tt=>r.createElement("li",{key:`key-${tt.toString()}`},tt.toString())):[],ie=r.createElement("p",null,"We had trouble fetching some data required to build this page, so here is a picture instead.");return r.createElement(ue.A,{title:"Error getting data",description:ie,displayPageLayout:!1},r.createElement("ul",null,q,r.createElement("li",null,"Check your Graylog logs for more information.")))};Te.propTypes={errors:o().array.isRequired};const Ge=Te;var mt=e("/W/x1zfW"),Dt=e("FDzjarsJ"),Jt=e("qfE6wAsD"),mn=e("Zzc2+UR0");const oo=({setFilteredRows:te,resetPagination:q,rows:ie,...tt})=>{const ct=(_t,Cn)=>{te(Cn&&Cn!==""?_t:ie),q()};return r.createElement(mn.A,{...tt,rows:ie,onDataFiltered:ct})};oo.defaultProps={id:void 0,filterKeys:void 0,displayKey:void 0,filterBy:void 0,filterLabel:void 0};const Qo=oo,Po={page:1,perPage:10,query:""},Do=(te,q,ie)=>{const tt=q*(ie-1),ct=tt+q;return te.slice(tt,ct)},_s=({rows:te=[],pagination:q,filterKeys:ie,filterLabel:tt,displayKey:ct,filterBy:_t,id:Cn,...Io})=>{const[{perPage:wo,page:Oo},Ho]=(0,r.useState)(q),[ns,zo]=(0,r.useState)(te),ps=Do(ns,wo,Oo);(0,r.useEffect)(()=>{zo(te),Ho(q)},[te,q]);const ma=(Ks,Vs)=>{Ho({page:Ks,perPage:Vs})},Fs=()=>{Ho({perPage:wo,page:q.page})};return r.createElement(Jt.A,{totalItems:ns.length,pageSize:wo,activePage:Oo,onChange:ma,showPageSizeSelect:!0,useQueryParameter:!1},r.createElement(ve.A,{...Io,id:Cn,customFilter:r.createElement(Qo,{id:Cn,filterKeys:ie,setFilteredRows:zo,rows:te,resetPagination:Fs,displayKey:ct,filterBy:_t,filterLabel:tt}),rows:ps}))};_s.defaultProps={className:void 0,displayKey:void 0,filterBy:void 0,filterKeys:void 0,filterLabel:"Filter",headerCellFormatter:void 0,noDataText:void 0,pagination:Po,rowClassName:void 0,useResponsiveTable:!1},_s.propTypes={pagination:o().object};const oa=null,jo=null;var Is=e("xfUIbHjs"),us=e("wl9DHqUO"),as=e("q/xljWhq"),pr=e("e5reO9iR"),sa=e("zKLlqmvB");const aa=({children:te,container:q})=>r.createElement(r.Fragment,null,(0,sa.createPortal)(te,q));aa.defaultProps={container:document.body};const Ra=aa;var Ta=e("rlwexfKi"),ul=e("g6WV7s1k");const ra=(0,n.default)(Le.Row)` &:not(:last-child) { margin-bottom: 7px; } `,bs=(0,n.default)(Le.Col)(({theme:te})=>(0,n.css)` font-weight: bold; @media (min-width: ${te.breakpoints.min.md}) { text-align: right; } `),fa=(0,n.default)(qt.A)(({theme:te,value:q})=>(0,n.css)` color: ${q?te.colors.variant.success:te.colors.variant.danger}; `),Ur=({value:te})=>r.createElement(r.Fragment,null,r.createElement(fa,{name:te?"check_circle":"cancel",value:te})," ",te?"yes":"no"),la=te=>typeof te=="boolean"?r.createElement(Ur,{value:te}):te||"-",gr=({label:te,value:q,help:ie,className:tt})=>r.createElement(ra,{className:tt},r.createElement(bs,{sm:3},te),r.createElement(Le.Col,{sm:9,className:"read-only-value-col"},la(q),ie&&r.createElement(Le.HelpBlock,null,ie)));gr.defaultProps={help:void 0,className:void 0};const Er=gr;var Ms=e("4IfE3Ihm"),Ha=Object.defineProperty,Nr=(te,q,ie)=>q in te?Ha(te,q,{enumerable:!0,configurable:!0,writable:!0,value:ie}):te[q]=ie,za=(te,q,ie)=>(Nr(te,typeof q!="symbol"?q+"":q,ie),ie);const dl=n.default.button(({theme:te})=>(0,n.css)` opacity: 0.3; background-color: ${te.colors.variant.primary}; width: 40px; height: 40px; position: fixed; bottom: 60px; right: 20px; border-radius: 5px; border: none; &:hover { opacity: 1; } &.middle { right: 35%; } `),ml=(0,n.default)(qt.A)(({theme:te})=>(0,n.css)` color: ${te.utils.readableColor(te.colors.variant.primary)}; position: absolute; top: 50%; left: 50%; margin-top: -9px; margin-left: -5px; `);class Va extends r.Component{constructor(){super(),za(this,"showButton",()=>{this.setState({hideButton:window.scrollY===0})}),za(this,"scrollStep",()=>{const{intervalId:q}=this.state,{scrollSteps:ie}=this.props;window.pageYOffset===0&&clearInterval(q),window.scroll(0,window.pageYOffset-ie)}),za(this,"scrollToTop",()=>{const{delay:q}=this.props,ie=setInterval(this.scrollStep.bind(this),q);this.setState({intervalId:ie})}),this.state={intervalId:0,hideButton:!0}}componentDidMount(){window.addEventListener("scroll",this.showButton)}componentWillUnmount(){window.removeEventListener("scroll",this.showButton)}render(){const{position:q}=this.props,{hideButton:ie}=this.state;return ie?r.createElement("span",null):r.createElement(dl,{title:"Back to top",type:"button",className:q,onClick:this.scrollToTop},r.createElement(ml,{name:"expand_less"}))}}za(Va,"propTypes",{delay:o().number,scrollSteps:o().number,position:o().string}),za(Va,"defaultProps",{delay:5,scrollSteps:50,position:""});const zs=Va;var fr=e("TMaijZ0a"),gc=e("u1Q00LVl"),pl=e.n(gc),gl=e("+KM7MH1U"),El=e.n(gl),ti=e("LLTH+mT+"),fl=e.n(ti),hr=e("pVin5tMh"),ha=e.n(hr),Ia=e("QTOlkT3a"),va={};va.styleTagTransform=un(),va.setAttributes=Bt(),va.insert=At().bind(null,"head"),va.domAPI=Xt(),va.insertStyleElement=gt();var Ec=It()(Ia.A,va);const ka=Ia.A&&Ia.A.locals?Ia.A.locals:void 0;var wr=Object.defineProperty,ni=(te,q,ie)=>q in te?wr(te,q,{enumerable:!0,configurable:!0,writable:!0,value:ie}):te[q]=ie,Yo=(te,q,ie)=>(ni(te,typeof q!="symbol"?q+"":q,ie),ie);class Qa extends r.Component{constructor(q){super(q),Yo(this,"handleSelectionChange",ie=>{const{onItemSelect:tt}=this.props;this.setState({selectedItems:ie}),tt(ie,()=>this.overlay.hide())}),Yo(this,"clearItemSelection",()=>{this.handleSelectionChange([])}),Yo(this,"handleItemSelection",ie=>()=>{const{multiple:tt}=this.props,{selectedItems:ct}=this.state;let _t;tt?_t=ct.includes(ie)?fl()(ct,ie):pl()(ct,ie):_t=[ie],this.handleSelectionChange(_t)}),Yo(this,"filterData",(ie,tt)=>{const ct=tt.filter(_t=>_t.match(new RegExp(ie,"i")));this.setState({filterText:ie,filteredItems:ct})}),Yo(this,"handleFilterChange",ie=>tt=>{const ct=tt.target.value.trim();this.filterData(ct,ie)}),Yo(this,"renderDataFilter",ie=>{const{filterPlaceholder:tt}=this.props,{filterText:ct}=this.state;return r.createElement(Le.FormGroup,{controlId:"dataFilterInput",className:ka.dataFilterInput},r.createElement(Le.FormControl,{type:"text",placeholder:tt,value:ct,onChange:this.handleFilterChange(ie)}))}),Yo(this,"renderClearSelectionItem",()=>{const{clearSelectionText:ie}=this.props;return r.createElement(Le.ListGroupItem,{onClick:this.clearItemSelection},r.createElement(qt.A,{name:"close",className:"text-danger"})," ",ie)}),this.state={filterText:"",filteredItems:q.items,selectedItems:q.selectedItems}}UNSAFE_componentWillReceiveProps(q){const{items:ie,selectedItems:tt}=this.props,{filterText:ct}=this.state;El()(tt,q.selectedItems)||this.setState({selectedItems:q.selectedItems}),ie!==q.items&&this.filterData(ct,q.items)}render(){const{displayDataFilter:q,itemFormatter:ie,items:tt,placement:ct,triggerAction:_t,triggerNode:Cn,disabled:Io,title:wo}=this.props,{filteredItems:Oo,selectedItems:Ho}=this.state,ns=r.createElement(r.Fragment,null,q&&this.renderDataFilter(tt),Ho.length>0&&this.renderClearSelectionItem(),r.createElement(ha(),{className:ka.scrollableList},r.createElement(Le.ListGroup,null,Oo.map(zo=>r.createElement(Le.ListGroupItem,{key:zo,onClick:Io?()=>{}:this.handleItemSelection(zo),active:Ho.includes(zo),disabled:Io},ie(zo))))));return r.createElement(Un.A,{ref:zo=>{this.overlay=zo},trigger:_t,placement:ct,overlay:ns,title:wo,rootClose:!0},Cn)}}Yo(Qa,"propTypes",{id:o().string.isRequired,placement:o().oneOf(["top","right","bottom","left"]),title:o().string.isRequired,triggerNode:o().node.isRequired,triggerAction:o().oneOf(["click","hover","focus"]),items:o().arrayOf(o().string),itemFormatter:o().func,multiple:o().bool,selectedItems:o().arrayOf(o().string),onItemSelect:o().func.isRequired,displayDataFilter:o().bool,filterPlaceholder:o().string,clearSelectionText:o().string,disabled:o().bool}),Yo(Qa,"defaultProps",{placement:"bottom",triggerAction:"click",items:[],itemFormatter:te=>te,multiple:!1,selectedItems:[],displayDataFilter:!0,filterPlaceholder:"Type to filter",clearSelectionText:"Clear selection",disabled:!1});const Wr=Qa;var fc=Object.defineProperty,oi=(te,q,ie)=>q in te?fc(te,q,{enumerable:!0,configurable:!0,writable:!0,value:ie}):te[q]=ie,Ya=(te,q,ie)=>(oi(te,typeof q!="symbol"?q+"":q,ie),ie);const vr=(0,n.default)(Le.ListGroupItem)` display: flex; justify-content: space-between; `;class Ma extends r.Component{constructor(){super(...arguments),Ya(this,"_getOptionId",q=>typeof q=="string"?q:q[this.props.idKey]),Ya(this,"_getOptionDisplayValue",q=>typeof q=="string"?q:q[this.props.displayKey]),Ya(this,"_onAddOption",q=>{if(q==="")return;const ie=this.props.selectedOptions.slice();this.props.selectedOptionsType==="string"?ie.push(q):ie.push(this.props.options.filter(tt=>this._getOptionId(tt)===q)[0]),typeof this.props.onChange=="function"&&this.props.onChange(ie)}),Ya(this,"_onRemoveOption",q=>()=>{const ie=this.props.selectedOptions.filter((tt,ct)=>ct!==q);typeof this.props.onChange=="function"&&this.props.onChange(ie)})}UNSAFE_componentWillReceiveProps(q){this.props.selectedOptions!==q.selectedOptions&&this.select.clearValue()}render(){const q=this.props.selectedOptions.map((ie,tt)=>r.createElement(vr,{key:`${this._getOptionId(ie)}-${tt}`},r.createElement("div",null,this._getOptionDisplayValue(ie)),r.createElement(Le.Button,{bsStyle:"danger",bsSize:"xsmall",onClick:this._onRemoveOption(tt)},"Remove")));return r.createElement("div",null,r.createElement(Hs.A,{ref:ie=>{this.select=ie},autoFocus:this.props.autoFocus,options:this.props.options,onChange:this._onAddOption,clearable:!1}),q.length>0&&r.createElement(Le.ListGroup,{style:{marginTop:10}},q))}}Ya(Ma,"propTypes",{options:o().array,selectedOptionsType:o().oneOf(["string","object"]),selectedOptions:o().arrayOf(o().oneOfType([o().string,o().object])),displayKey:o().string,idKey:o().string,onChange:o().func,autoFocus:o().bool}),Ya(Ma,"defaultProps",{autoFocus:void 0,displayKey:"label",idKey:"value",onChange:void 0,options:void 0,selectedOptions:void 0,selectedOptionsType:"string"});const yr=Ma,Qs=({type:te,description:q})=>{const ie=tt=>tt.replaceAll("_"," ");return r.createElement(Ts.A,{title:"Sharing not possible",pullRight:!1},q||`Only owners of this ${ie(te)} are allowed to share it.`)};Qs.defaultProps={description:void 0};const Xa=Qs,hl=({bsStyle:te,bsSize:q,entityId:ie,entityType:tt,onClick:ct,disabledInfo:_t})=>r.createElement($s,{id:ie,type:tt},({disabled:Cn})=>r.createElement(bo.A,{bsStyle:te,bsSize:q,onClick:ct,disabled:!!_t||Cn,title:"Share"},r.createElement(qt.A,{name:"person_add"})," Share ",(!!_t||Cn)&&r.createElement(Xa,{type:tt,description:_t})));hl.defaultProps={bsStyle:"default",disabledInfo:void 0,bsSize:void 0};const Fr=hl;var xa=e("K/dyB2Jn"),Ja=e("M04itGxI"),si=e("D4SbLiE/"),hc=e.n(si);const Kr=hc()({displayName:"TimeUnit",propTypes:{value:o().number.isRequired,unit:o().oneOf(["NANOSECONDS","MICROSECONDS","MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS"]).isRequired,zeroIsNever:o().bool},getDefaultProps(){return{zeroIsNever:!0}},UNITS:{NANOSECONDS:"nanoseconds",MICROSECONDS:"microseconds",MILLISECONDS:"milliseconds",SECONDS:"seconds",MINUTES:"minutes",HOURS:"hours",DAYS:"days"},render(){return this.props.value===0&&this.props.zeroIsNever?r.createElement("span",null,"Never"):r.createElement("span",null,this.props.value,"\xA0",this.UNITS[this.props.unit])}});var _r=e("ATOIS62c"),vc=e("Ex+j8X3w"),$r=e("ASBo/Til"),yc=e.n($r),La=e("efAt+LzL"),Gr=e.n(La),vl=Object.defineProperty,yl=(te,q,ie)=>q in te?vl(te,q,{enumerable:!0,configurable:!0,writable:!0,value:ie}):te[q]=ie,Ba=(te,q,ie)=>(yl(te,typeof q!="symbol"?q+"":q,ie),ie);class Cr extends r.Component{constructor(){super(...arguments),Ba(this,"_UNCLASSIFIED_AREA","Unclassified"),Ba(this,"getValue",()=>this.timezone.getValue()),Ba(this,"_formatTimezones",()=>{const q={};yc().tz.names().forEach(tt=>{const ct=tt.split("/"),_t=ct.length>1?ct[0]:this._UNCLASSIFIED_AREA,Cn=ct.length>1?ct[1]:ct[0];q[_t]||(q[_t]=[]),q[_t].push(Cn)});const ie=[];return Object.keys(q).sort().forEach(tt=>{ie.push({label:tt,disabled:!0,value:tt});const _t=Gr()(q[tt]).sort().map(Cn=>({value:tt===this._UNCLASSIFIED_AREA?Cn:`${tt}/${Cn}`,label:Cn.replace("_"," ")}));ie.push(..._t)}),ie}),Ba(this,"_renderOption",q=>q.disabled?r.createElement("span",{key:q.value,title:q.value},q.label):r.createElement("span",{key:q.value,title:q.value},"\xA0 ",q.label))}render(){const q=this._formatTimezones(),{onChange:ie,...tt}=this.props;return r.createElement(Hs.A,{ref:ct=>{this.timezone=ct},...tt,inputId:"timezone-select",onChange:ie,placeholder:"Pick a time zone",options:q,optionRenderer:this._renderOption})}}Ba(Cr,"propTypes",{onChange:o().func}),Ba(Cr,"defaultProps",{onChange:()=>{}});const xs=Cr;var ai=e("N1QxzyxS"),Al=e("Z6NUVhuV"),jr=e("VPaD/Np4"),Ss=e.n(jr),ri=e("kqAR+wt5"),Hr=e.n(ri),Ac=e("4ukn9ADr"),li=e("jsQWU+f2"),ia=e("U1Iufsob"),ms=e("MdYBRjRJ"),ii=e("eFxcQyPT"),ca=Object.defineProperty,Za=(te,q,ie)=>q in te?ca(te,q,{enumerable:!0,configurable:!0,writable:!0,value:ie}):te[q]=ie,As=(te,q,ie)=>(Za(te,typeof q!="symbol"?q+"":q,ie),ie);class Tr extends r.Component{constructor(){super(...arguments),As(this,"_getFilteredProps",()=>{let q=Ss().fromJS(this.props);return["valueLink","onChange"].forEach(ie=>{q.has(ie)&&(q=q.delete(ie))}),q.toJS()})}componentDidMount(){if(this.fieldInput){const{autoFocus:q,valueLink:ie,onChange:tt}=this.props,ct=Hr()(this.fieldInput.getInputDOMNode());(0,ii.Ay)("GET",(0,ms.H3)(ia.A.SystemApiController.fields().url)).then(Cn=>{ct.typeahead({hint:!0,highlight:!0,minLength:1},{name:"fields",displayKey:"value",source:li.A.substringMatcher(Cn.fields,"value",6)}),q&&(ct.focus(),ct.typeahead("close"))});const _t=sa.findDOMNode(this.fieldInput);Hr()(_t).on("typeahead:change typeahead:selected",Cn=>{tt&&tt(Cn),ie&&ie.requestChange(Cn.target.value)})}}componentWillUnmount(){if(this.fieldInput){Hr()(this.fieldInput.getInputDOMNode()).typeahead("destroy");const ie=sa.findDOMNode(this.fieldInput);Hr()(ie).off("typeahead:change typeahead:selected")}}render(){const{id:q,label:ie,valueLink:tt,error:ct,onBlur:_t}=this.props;return r.createElement(Le.Input,{id:q,ref:Cn=>{this.fieldInput=Cn},label:ie,onBlur:_t,error:ct,wrapperClassName:"typeahead-wrapper",defaultValue:tt?tt.value:null,...this._getFilteredProps()})}}As(Tr,"propTypes",{id:o().string.isRequired,valueLink:o().object,label:o().string,autoFocus:o().bool,onChange:o().func,onBlur:o().func,error:o().string}),As(Tr,"defaultProps",{valueLink:void 0,autoFocus:!1,label:void 0,onChange:()=>{},onBlur:()=>{},error:void 0});const ws=Tr;var _c=e("YzrsREPQ"),Ys=e("gTexEe+8"),ci=e("nQTsOTNU"),Ws=e("ibdPvtmL"),ui=e("yGRmSjYM"),ua=e("iltCXley"),br=e("8OvTct/Z"),da=e("v4GbOr/o");const zr="org.graylog2.system.urlwhitelist.UrlWhitelist",ya=({newUrlEntry:te,urlType:q,onUpdate:ie})=>{const tt=(0,r.useRef)(),[ct,_t]=(0,r.useState)({entries:[],disabled:!1}),[Cn,Io]=(0,r.useState)(!1),[wo,Oo]=(0,r.useState)(),[Ho,ns]=(0,r.useState)(!1),{configuration:zo}=(0,ea.P)(Ws.H),ps=zo[zr],ma=(0,hs.A)(),Fs=(0,br.A)();(0,r.useEffect)(()=>{(0,ui.Nn)(ma.permissions,["urlwhitelist:read"])&&Ws.t.listWhiteListConfig(zr)},[ma]);const Ks=(0,r.useCallback)(Zo=>{const Y=(0,ua.A)(),Na={entries:[...Zo.entries,{id:Y,title:"",value:te,type:q!=null?q:"literal"}],disabled:Zo.disabled};Oo(Y),_t(Na)},[te,q]);(0,r.useEffect)(()=>{const{entries:Zo}=ct;ps&&(Zo.length===0||tt.current!==te)&&Ks(ps),tt.current=te},[Ks,ps,ct,te,q]);const Vs=()=>{ns(!0)},Aa=()=>{ns(!1),Ks(ps)},rs=(Zo,Y)=>{_t(Zo),Io(Y)},gs=Zo=>{Zo&&(Zo.preventDefault(),Zo.stopPropagation()),Fs(da.g.URLWHITELIST_CONFIGURATION_UPDATED,{app_section:"urlwhitelist",app_action_value:"configuration-update"}),Cn&&Ws.t.updateWhitelist(zr,ct).then(()=>{ie(),Aa()})};if(ps){const{entries:Zo,disabled:Y}=ct;return r.createElement(r.Fragment,null,r.createElement(wt.A,{permissions:"urlwhitelist:write"},r.createElement(Le.Button,{bsStyle:"info",bsSize:"xs",onClick:Vs},"Add to URL Whitelist")),r.createElement(Ys.A,{show:Ho,bsSize:"lg",title:"Update Whitelist Configuration",onCancel:Aa,onSubmitForm:gs,submitButtonDisabled:!Cn,submitButtonText:"Update configuration"},r.createElement("h3",null,"Whitelist URLs"),r.createElement(ci.A,{key:wo,urls:Zo,disabled:Y,onUpdate:rs,newEntryId:wo})))}return null};ya.propTypes={newUrlEntry:o().string,onUpdate:o().func,urlType:o().oneOf(["regex","literal"])},ya.defaultProps={newUrlEntry:"",onUpdate:()=>{},urlType:void 0};const Vr=ya;var qa=e("yTnlRDNA"),kr=e("S6FuRS7B");const Qr=({label:te,onChange:q,validationMessage:ie,validationState:tt,url:ct,onValidationChange:_t,labelClassName:Cn,wrapperClassName:Io,urlType:wo,autofocus:Oo})=>{const[Ho,ns]=(0,r.useState)(!1),[zo,ps]=(0,r.useState)(tt),[ma,Fs]=(0,r.useState)(ie),Ks=(_a,ba)=>ba&&ba==="regex"&&(0,ms.Gz)(_a)?qa.A.urlWhiteListGenerateRegex(_a,"${key}"):_a,[Vs,Aa]=(0,r.useState)(ct),rs=()=>zo==="error"&&(0,ms.Gz)(ct),gs=(0,r.useRef)(),Zo=(0,r.useCallback)(()=>{ct&&qa.A.urlWhiteListCheck(ct).then(ba=>{if(!ba.is_whitelisted&&tt===null){ps("error"),_t("error");const er=(0,ms.Gz)(ct)?`URL ${ct} is not whitelisted`:`URL ${ct} is not a valid URL.`;Fs(er)}else Fs(ie),ps(tt),_t(tt);ns(ba.is_whitelisted)})},[ct,ie,tt,_t]),Y=()=>{(0,kr.fD)(gs.current.getInputDOMNode()),Zo()};(0,r.useEffect)(()=>{const _a=()=>{if(ct){const er=Ks(ct,wo);typeof er=="object"?er.then(di=>{Aa(di.regex)}):Aa(ct)}},ba=setTimeout(()=>_a(),250);return()=>clearTimeout(ba)},[ct,wo]),(0,r.useEffect)(()=>{const _a=setTimeout(()=>Zo(),250);return()=>clearTimeout(_a)},[ct,tt,Zo]);const Na=rs()&&!Ho?r.createElement(Vr,{newUrlEntry:Vs,onUpdate:Y,urlType:wo}):"",Pl=r.createElement(r.Fragment,null,tt===null?ma:ie," ",Na),Jr=zo===""?null:zo;return r.createElement(Le.Input,{type:"text",id:"url",name:"url",label:te,ref:gs,autoFocus:Oo,required:!0,onChange:q,help:Pl,bsStyle:Jr,value:ct,labelClassName:Cn,wrapperClassName:Io})};Qr.propTypes={autofocus:o().bool,label:o().string.isRequired,onChange:o().func.isRequired,validationState:o().string,validationMessage:o().oneOfType([o().object,o().string]),url:o().string,onValidationChange:o().func,labelClassName:o().string,wrapperClassName:o().string,urlType:o().oneOf(["regex","literal"])},Qr.defaultProps={autofocus:!0,url:"",validationState:"",validationMessage:"",labelClassName:"",wrapperClassName:"",urlType:"literal",onValidationChange:()=>{}};const Ua=Qr;var _l=e("1e+nFvZs"),Yr=e("yKXoRDZT");const Tl=n.default.label(({theme:te})=>(0,n.css)` display: flex; align-items: center; margin: 0; input { border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; white-space: nowrap; &:checked + .slider { background-color: ${te.colors.variant.dark.default}; &::before { transform: translate(16px, -50%); } } &:disabled + .slider { opacity: 0.5; cursor: not-allowed; &::before { background-color: ${te.colors.variant.light.default}; } } } .slider { box-sizing: border-box; margin: 0 9px; width: 36px; height: 22px; border-radius: 30px; background-color: ${te.colors.gray[80]}; box-shadow: inset 0 1px 3px 0 rgb(0 0 0 / 20%); display: inline-block; position: relative; cursor: pointer; &::before { transition: transform 75ms ease-in-out; content: ''; display: block; width: 18px; height: 18px; background-color: ${te.colors.brand.secondary}; box-shadow: 0 2px 3px 0 rgb(0 0 0 / 25%), 0 2px 8px 0 rgb(32 37 50 / 16%); position: absolute; border-radius: 100%; top: 11px; transform: translate(2px, -50%); } } `);var bl=e("i3pQAyXy"),Sr=e("0hhBr0/b"),Pr=e("OsdZaKdz");function Sl({filters:te,onChange:q,hideFiltersPreview:ie}){var tt;const _t=((tt=(0,Sr.A)("eventDefinitions.components.searchForm"))!=null?tt:[]).map(Oo=>Oo()).filter(Oo=>!!Oo);r.useEffect(()=>ie(!_t.length),[]);const Cn=r.useMemo(()=>({searchFilters:(0,jr.OrderedMap)(te.map(Ho=>[Ho.id||(0,bl.A)(),{frontendId:Ho.id||(0,bl.A)(),...Ho}]))}),[te]);if(!_t.length)return r.createElement(Pr.h,{onHide:()=>ie(!0),pluggableControls:_t});const Io=_t[0].component,wo=({searchFilters:Oo})=>{const Ho=Oo.map(({frontendId:ns,...zo})=>zo);q(Ho)};return r.createElement(I.Formik,{onSubmit:wo,initialValues:Cn},r.createElement(Io,null))}Sl.defaultProps={hideFiltersPreview:()=>{}};const Xr=Sl,Cc=(0,t.A)(()=>Promise.all([e.e("bb8c8232-8179"),e.e("bb8c8232-5002"),e.e("bb8c8232-8194")]).then(e.bind(e,"DWNbF6Hg")))},ty2gyrHp:(x,y,e)=>{"use strict";e.d(y,{N:()=>s.N_,m:()=>f});var t=e("Z7aTuO5B"),r=e("yAXMqwrl"),s=e("1jSicls3");const o=["Button","NavItem"],n=p=>String(p).split(/[?#]/)[0],c=(p,E,l,m,h)=>{const A=n(E),C=h?p.startsWith(A):A===p;return o.includes(m)&&C?`active ${l!=null?l:""}`:l},g=p=>p.button===0,d=p=>!!(p.metaKey||p.altKey||p.ctrlKey||p.shiftKey),f=({children:p,onClick:E,to:l,relativeActive:m,...h})=>{const{pathname:A}=(0,r.useLocation)(),{props:{onClick:C,className:_,disabled:P},type:{displayName:I}}=t.Children.only(p),M=typeof l=="object"&&"pathname"in l?l.pathname:l,O=(0,t.useMemo)(()=>c(A,M,_,I,m),[A,M,_,I,m]),U=(0,s.Gy)(M),W=(0,t.useCallback)(K=>{!g(K)||d(K)||P||(K.preventDefault(),K.stopPropagation(),C&&C(),E&&E(),P||U(K))},[P,C,E,U]);return t.cloneElement(t.Children.only(p),{...h,className:O,onClick:W,disabled:!!P,href:P?void 0:M})};f.defaultProps={relativeActive:!1}},XyJ0Mvpg:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("rVdVsuGH");const o=(n,c)=>function(d){const f=(0,r.Ay)(c==null?void 0:c.pageSizes);return t.createElement(n,{...d,paginationQueryParameter:f})}},"+qc3iAHh":(x,y,e)=>{"use strict";e.d(y,{$f:()=>g,lD:()=>E,rP:()=>m,Xz:()=>P,i2:()=>W,DB:()=>k,Xy:()=>z,oz:()=>me,A_:()=>Ve,Lg:()=>ze});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("S6FuRS7B"),n=e("rIl5IEuP");const c=({autoFocus:he,field:Ie,onChange:Re,title:ce,typeName:Ee,value:oe})=>{const ae=ye=>{const Oe=(0,o.yG)(ye.target);Re(ce,Oe)};return t.createElement(n.Input,{id:`${Ee}-${ce}`,name:`configuration[${ce}]`,type:"checkbox",label:Ie.human_name,checked:oe,help:Ie.description,onChange:ae,autoFocus:he})};c.propTypes={autoFocus:s().bool,field:s().object.isRequired,onChange:s().func.isRequired,title:s().string.isRequired,typeName:s().string.isRequired,value:s().bool},c.defaultProps={autoFocus:!1,value:!1};const g=c;var d=e("gTexEe+8");const f=["text","inline_binary"],p=(0,t.forwardRef)(({cancelAction:he,configFields:Ie,children:Re,titleHelpText:ce,includeTitleField:Ee,submitAction:oe,title:ae,titleValue:ye,typeName:Oe,values:ve,wrapperComponent:_e,submitButtonText:He},je)=>{const[Qe,zt]=(0,t.useState)(!1),[xe,Ue]=(0,t.useState)(void 0),[ke,Se]=(0,t.useState)(void 0),[Je,nt]=(0,t.useState)({});(0,t.useEffect)(()=>{const yn={};Ie&&Object.keys(Ie).forEach(Kt=>{yn[Kt]=Ie[Kt].default_value}),Se({...yn,...ve}),nt({})},[Qe,Ie,ve]),(0,t.useEffect)(()=>{Ue(ye)},[ye,Qe]);const Wt=()=>{const yn={type:Oe,configuration:{}};return Ee&&(yn.title=xe),Object.keys(Ie).forEach(Kt=>{yn.configuration[Kt]=ke[Kt]===void 0?null:ke[Kt]}),yn},Le=(yn,Kt)=>{const qt=Ie[yn.name].position||100,io=Ie[Kt.name].position||100;let Be=qt-io;if(!Be){const bn=gn=>gn?1:0;Be=bn(Ie[yn.name].is_optional)-bn(Ie[Kt.name].is_optional)}return Be||(Be=yn.pos-Kt.pos),Be},Fe=yn=>f.includes(yn.type)?yn.is_encrypted:!1,qe=yn=>{const Kt=Object.entries(yn.configuration).map(([An,qt])=>{const io=Ie[An],Be=Je[An];return Fe(io)&&!(Be!=null&&Be.dirty)&&qt&&qt.is_set!==void 0?[An,{keep_value:!0}]:[An,qt]});return{...yn,configuration:Object.fromEntries(Kt)}},ut=()=>{zt(!1),he&&he()},ft=()=>{const yn=Wt();oe(qe(yn)),zt(!1)};(0,t.useImperativeHandle)(je,()=>({open(){zt(!0)},getValue(){return Wt()}}));const Ot=(yn,Kt)=>{Ue(Kt)},Lt=(yn,Kt,An=!0)=>{Se({...ke,[yn]:Kt}),nt({...Je,[yn]:{dirty:An}})},an=(yn,Kt,An)=>{var qt;if(!ke)return null;const io=ke[Kt];return t.createElement(m,{key:Kt,typeName:Oe,configField:yn,configKey:Kt,configValue:io,autoFocus:An,dirty:(qt=Je[Kt])==null?void 0:qt.dirty,onChange:Lt})};let Ft=!0,rn;Ee&&(rn=t.createElement(ze,{key:`${Oe}-title`,typeName:Oe,value:xe,onChange:Ot,helpText:ce}),Ft=!1);const be=Object.keys(Ie).map((yn,Kt)=>({name:yn,pos:Kt})).sort(Le).map(yn=>{const Kt=an(Ie[yn.name],yn.name,Ft);return Ft&&(Ft=!1),Kt});return t.createElement(_e,{show:Qe,title:ae,onCancel:ut,onSubmitForm:ft,submitButtonText:He},t.createElement("fieldset",null,t.createElement("input",{type:"hidden",name:"type",value:Oe}),Re,rn,be))});p.propTypes={cancelAction:s().func,configFields:s().object,children:s().node,titleHelpText:s().string,includeTitleField:s().bool,submitAction:s().func.isRequired,title:s().node,titleValue:s().string,typeName:s().string,values:s().object,wrapperComponent:s().elementType,submitButtonText:s().string.isRequired},p.defaultProps={cancelAction:()=>{},configFields:{},children:null,titleHelpText:"",title:null,includeTitleField:!0,titleValue:"",typeName:void 0,values:{},wrapperComponent:d.A};const E=p,l=({typeName:he,configField:Ie,configKey:Re,configValue:ce,dirty:Ee,autoFocus:oe,onChange:ae})=>{const ye=`${he}-${Re}`;switch(Ie.type){case"text":return t.createElement(Ve,{key:ye,typeName:he,title:Re,field:Ie,value:ce,dirty:Ee,onChange:ae,autoFocus:oe});case"number":return t.createElement(me,{key:ye,typeName:he,title:Re,field:Ie,value:ce,onChange:ae,autoFocus:oe});case"boolean":return t.createElement(g,{key:ye,typeName:he,title:Re,field:Ie,value:ce,onChange:ae,autoFocus:oe});case"dropdown":return t.createElement(W,{key:ye,typeName:he,title:Re,field:Ie,value:ce,onChange:ae,autoFocus:oe,addPlaceholder:!0});case"list":return t.createElement(z,{key:ye,typeName:he,title:Re,field:Ie,value:ce,onChange:ae,autoFocus:oe});case"inline_binary":return Ie.is_encrypted?t.createElement(k,{key:ye,typeName:he,title:Re,field:Ie,value:ce,dirty:Ee,onChange:ae,autoFocus:oe}):null;default:return null}};l.propTypes={typeName:s().string.isRequired,configField:s().object.isRequired,configKey:s().string.isRequired,configValue:s().any,autoFocus:s().bool,onChange:s().func.isRequired,dirty:s().bool},l.defaultProps={configValue:void 0,autoFocus:!1,dirty:!1};const m=l;var h=Object.defineProperty,A=(he,Ie,Re)=>Ie in he?h(he,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Re}):he[Ie]=Re,C=(he,Ie,Re)=>(A(he,typeof Ie!="symbol"?Ie+"":Ie,Re),Re);class _ extends t.Component{constructor(){super(...arguments),C(this,"PASSWORD_PLACEHOLDER","********"),C(this,"_formatRegularField",(Ie,Re)=>{const{id:ce}=this.props;let Ee;return Ie==null||Ie===""||Array.isArray(Ie)&&Ie.length===0?Ee=t.createElement("i",null,""):Ee=Array.isArray(Ie)?Ie.join(", "):String(Ie),t.createElement("li",{key:`${ce}-${Re}`},t.createElement("div",{className:"key"},Re,":")," ",t.createElement("div",{className:"value"},Ee))}),C(this,"_formatEncryptedField",(Ie,Re)=>{const{id:ce}=this.props;let Ee;return Ie.is_set?Ee=this.PASSWORD_PLACEHOLDER:Ee=t.createElement("i",null,""),t.createElement("li",{key:`${ce}-${Re}`},t.createElement("div",{className:"key"},Re,":")," ",t.createElement("div",{className:"value"},Ee))}),C(this,"_formatPasswordField",(Ie,Re)=>{const{id:ce}=this.props;return t.createElement("li",{key:`${ce}-${Re}`},t.createElement("div",{className:"key"},Re,":"),t.createElement("div",{className:"value"},this.PASSWORD_PLACEHOLDER))}),C(this,"_formatConfiguration",(Ie,Re,ce)=>{if(!Re)return"";const Ee=Object.keys(Re).sort().map(oe=>{const ae=Re[oe],ye=ce&&ce.requested_configuration?ce.requested_configuration[oe]:void 0;return ye&&(ye.attributes.indexOf("is_password")>-1||ye.attributes.indexOf("is_sensitive")>-1)?this._formatPasswordField(ae,oe):ye&&ye.is_encrypted?this._formatEncryptedField(ae,oe):this._formatRegularField(ae,oe)});return Ee.length<1&&Ee.push(t.createElement("li",{key:"placeholder"},"-- no configuration --")),t.createElement("ul",null,Ee)})}render(){const{id:Ie,configuration:Re,typeDefinition:ce}=this.props;return t.createElement(n.Well,{bsSize:"small",className:"configuration-well react-configuration-well"},this._formatConfiguration(Ie,Re,ce))}}C(_,"propTypes",{id:s().string.isRequired,configuration:s().any,typeDefinition:s().object}),C(_,"defaultProps",{configuration:void 0,typeDefinition:{}});const P=_,I=(he,Ie)=>he.find(Re=>Re.toLowerCase()===Ie.toLowerCase())!==void 0,M=he=>he.is_optional&&he.type!=="boolean"?t.createElement("span",{className:"configuration-field-optional"},"(optional)"):null,O={hasAttribute:I,optionalMarker:M},U=({autoFocus:he,field:Ie,onChange:Re,title:ce,typeName:Ee,value:oe,addPlaceholder:ae})=>{const ye=(He,je,Qe=!1)=>t.createElement("option",{key:`${Ee}-${ce}-${He}`,value:He,id:He,disabled:Qe},je),Oe=He=>{Re(ce,He.target.value)},ve=Object.entries(Ie.additional_info.values).map(([He,je])=>ye(He,je));ae&&ve.unshift(ye("",`Select ${Ie.human_name||ce}`,!0));const _e=t.createElement(t.Fragment,null,Ie.human_name," ",M(Ie));return t.createElement(n.Input,{id:`${Ee}-${ce}`,name:`configuration[${ce}]`,label:_e,type:"select",value:oe,help:Ie.description,onChange:Oe,autoFocus:he,required:!Ie.is_optional},ve)};U.propTypes={autoFocus:s().bool,field:s().object.isRequired,onChange:s().func.isRequired,title:s().string.isRequired,typeName:s().string.isRequired,value:s().string,addPlaceholder:s().bool},U.defaultProps={autoFocus:!1,addPlaceholder:!1,value:""};const W=U;var K=e("J6y4/h8P");const j=K.default.span` vertical-align: middle; `,G=({field:he,title:Ie,typeName:Re,dirty:ce,onChange:Ee,value:oe,autoFocus:ae})=>{const[ye,Oe]=(0,t.useState)(void 0),[ve,_e]=(0,t.useState)(!1),He=oe.is_set,je=!he.is_optional,Qe=!ce&&He,zt=`${Re}-${Ie}`,xe=t.createElement(t.Fragment,null,he.human_name," ",M(he)),Ue=(ut,ft)=>{const Ot=ut.result;if(Ot&&typeof Ot=="string"){const Lt=Ot.replace(/^data:[\s\S]+\/[\s\S]+;base64,/,"");Oe(ft.name),he.is_encrypted?Ee(Ie,{set_value:Lt}):Ee(Ie,Lt)}},ke=()=>{_e(!0),Ee(Ie,{delete_value:!0})},Se=()=>{_e(!1),Oe(void 0),Ee(Ie,{is_set:!0},!1)},Je=()=>He?t.createElement(n.Button,{type:"button",onClick:ke},"Reset"):null,nt=()=>ve?t.createElement(n.Button,{type:"button",onClick:Se},"Undo Reset"):null,Wt=()=>ye?t.createElement(n.Button,{type:"button",onClick:()=>{Oe(void 0),Ee(Ie,"")}},"Remove"):null,Le=ut=>{const ft=new FileReader;ft.onloadend=Ot=>Ue(ft,ut),ut&&ft.readAsDataURL(ut)};return Qe?t.createElement(n.Input,{id:zt,type:"password",name:`configuration[${Ie}]`,label:xe,required:je,readOnly:!0,help:he.description,value:"encrypted value",buttonAfter:Je(),autoFocus:ae}):ye?t.createElement(n.Input,{id:zt,name:`configuration[${Ie}]`,label:xe,required:je,help:he.description,autoFocus:ae,buttonAfter:t.createElement(t.Fragment,null,Wt(),nt())},t.createElement(j,null,ye)):t.createElement(n.Input,{id:zt,type:"file",name:`configuration[${Ie}]`,label:xe,required:je,help:he.description,buttonAfter:nt(),onChange:ut=>Le(ut.target.files[0]),autoFocus:ae})};G.propTypes={autoFocus:s().bool,dirty:s().bool,field:s().object.isRequired,onChange:s().func.isRequired,title:s().string.isRequired,typeName:s().string.isRequired,value:s().object},G.defaultProps={autoFocus:!1,dirty:!1,value:{}};const k=G;var Q=e("IOI9nV80");const ne=({autoFocus:he,field:Ie,onChange:Re,title:ce,typeName:Ee,value:oe})=>{var ae;const ye=zt=>{const xe=zt===""?[]:zt.split(",");Re(ce,xe)},Oe=!Ie.is_optional,ve=Ie.attributes.includes("allow_create"),_e=((ae=Ie.additional_info)==null?void 0:ae.values)||{},He=Object.entries(_e).map(([zt,xe])=>({value:xe,label:zt})),je=t.createElement(t.Fragment,null,Ie.human_name," ",M(Ie)),Qe=Array.isArray(oe)?oe.join(","):oe;return t.createElement(n.Input,{id:`${Ee}-${ce}`,label:je,help:Ie.description},t.createElement(Q.KF,{inputId:`${Ee}-${ce}`,name:`configuration[${ce}]`,required:Oe,autoFocus:he,className:"list-field-select",options:He,value:Qe,placeholder:`${ve?"Add":"Select"} ${Ie.human_name}`,onChange:ye,allowCreate:ve}))};ne.propTypes={autoFocus:s().bool,field:s().object.isRequired,onChange:s().func.isRequired,title:s().string.isRequired,typeName:s().string.isRequired,value:s().oneOfType([s().array,s().string])},ne.defaultProps={autoFocus:!1,value:void 0};const z=ne;var le=e("yDuYCNwc");const V=({autoFocus:he,field:Ie,onChange:Re,title:ce,typeName:Ee,value:oe})=>{const ae=()=>({min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER}),ye=Qe=>{const{min:zt,max:xe}=ae();switch(Qe.toUpperCase()){case"ONLY_NEGATIVE":return{min:zt,max:-1};case"ONLY_POSITIVE":return{min:0,max:xe};case"IS_PORT_NUMBER":return{min:0,max:65535};default:return{min:zt,max:xe}}},Oe=()=>{const Qe=Ie.attributes.map(ye);return Qe.length>0?Qe[0]:ae()},ve=({target:Qe})=>{const zt=(0,o.yG)(Qe);Re(ce,zt)},_e=!Ie.is_optional,He=Oe(),je=t.createElement(t.Fragment,null,Ie.human_name," ",M(Ie));return t.createElement(le.A,{id:`${Ee}-${ce}`,label:je,type:"number",name:`configuration[${ce}]`,required:_e,onChange:ve,value:oe||0,help:Ie.description,...He,autoFocus:he})};V.propTypes={autoFocus:s().bool,field:s().object.isRequired,onChange:s().func.isRequired,title:s().string.isRequired,typeName:s().string.isRequired,value:s().number},V.defaultProps={autoFocus:!1,value:0};const me=V,Pe=({field:he,title:Ie,typeName:Re,dirty:ce,onChange:Ee,value:oe,autoFocus:ae})=>{const ye=!he.is_optional,Oe=he.is_encrypted&&!ce&&typeof oe!="string"&&oe.is_set,ve=!I(he.attributes,"textarea")&&(I(he.attributes,"is_password")||Oe)?"password":"text",_e=`${Re}-${Ie}`,[He,je]=(0,t.useState)(!1),Qe=t.createElement(t.Fragment,null,he.human_name," ",M(he)),zt=()=>Oe?"encrypted placeholder":typeof oe=="string"?oe:oe&&oe.set_value?oe.set_value:"",xe=({target:Je})=>{const nt=(0,o.yG)(Je);he.is_encrypted?Ee(Ie,{set_value:nt}):Ee(Ie,nt)},Ue=()=>{je(!0),Ee(Ie,{delete_value:!0})},ke=()=>{je(!1),Ee(Ie,{is_set:!0},!1)},Se=()=>He?t.createElement(n.Button,{type:"button",onClick:ke},"Undo Reset"):Oe?t.createElement(n.Button,{type:"button",onClick:Ue},"Reset"):null;return I(he.attributes,"textarea")?t.createElement(n.Input,{id:_e,type:"textarea",rows:10,label:Qe,name:`configuration[${Ie}]`,required:ye,help:he.description,value:zt(),onChange:xe,autoFocus:ae}):t.createElement(n.Input,{id:_e,type:ve,name:`configuration[${Ie}]`,label:Qe,required:ye,help:he.description,value:zt(),readOnly:Oe,onChange:xe,buttonAfter:Se(),autoFocus:ae})};Pe.propTypes={autoFocus:s().bool,dirty:s().bool,field:s().object.isRequired,onChange:s().func.isRequired,title:s().string.isRequired,typeName:s().string.isRequired,value:s().oneOfType([s().string,s().object])},Pe.defaultProps={autoFocus:!1,dirty:!1,value:""};const Ve=Pe,at=({typeName:he,helpText:Ie,value:Re,onChange:ce})=>{const Ee={is_optional:!1,attributes:[],human_name:"Title",description:Ie,is_encrypted:!1,additional_info:{},default_value:"",position:0,type:"text"};return t.createElement(Ve,{key:`${he}-title`,typeName:he,title:"title",field:Ee,value:Re,onChange:ce,autoFocus:!0})};at.propTypes={helpText:s().string,onChange:s().func,typeName:s().string.isRequired,value:s().string},at.defaultProps={helpText:"",onChange:()=>{},value:""};const ze=at},"i+sOEQiN":(x,y,e)=>{"use strict";e.d(y,{H:()=>t});var t=(s=>(s.SEARCHES_CLUSTER_CONFIG="org.graylog2.indexer.searches.SearchesClusterConfig",s.MESSAGE_PROCESSORS_CONFIG="org.graylog2.messageprocessors.MessageProcessorsConfig",s.SIDECAR_CONFIG="org.graylog.plugins.sidecar.system.SidecarConfiguration",s.EVENTS_CONFIG="org.graylog.events.configuration.EventsConfiguration",s.INDEX_SETS_DEFAULTS_CONFIG="org.graylog2.configuration.IndexSetsDefaultConfiguration",s.URL_WHITELIST_CONFIG="org.graylog2.system.urlwhitelist.UrlWhitelist",s.PERMISSIONS_CONFIG="org.graylog2.users.UserAndTeamsConfig",s.USER_CONFIG="org.graylog2.users.UserConfiguration",s.CERTIFICATE_RENEWAL_POLICY_CONFIG="org.graylog2.plugin.certificates.RenewalPolicy",s))(t||{}),r=null},nQTsOTNU:(x,y,e)=>{"use strict";e.d(y,{A:()=>W});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("IW7priiX"),n=e.n(o),c=e("Mx+G+HdB"),g=e.n(c),d=e("Pd5CUaTj"),f=e.n(d),p=e("J6y4/h8P"),E=e("yDuYCNwc"),l=e("hhdCSTZj"),m=e("u2QUEJU3"),h=e("rIl5IEuP"),A=e("S6FuRS7B"),C=e("yTnlRDNA"),_=e("MdYBRjRJ"),P=e("iltCXley");const I=(0,p.default)(h.Table)` margin-top: 10px; `,M=async(K,j,G)=>{const k={title:{valid:!1},value:{valid:!1}};k.title=j.title.trim().length<=0?{valid:!1}:{valid:!0};let Q={valid:!1};return j.type==="literal"?Q=(0,_.Gz)(j.value)?{valid:!0}:{valid:!1}:j.type==="regex"&&j.value.trim().length>0&&(Q=(await C.A.testRegexValidity(j.value)).is_valid?{valid:!0}:{valid:!1}),k.value=Q,typeof G=="function"&&G(K,j,k),k},O=g()(M,200),U=({urls:K,onUpdate:j,disabled:G,newEntryId:k})=>{const Q="literal",ne="regex",z=[{value:Q,label:"Exact match"},{value:ne,label:"Regex"}];let le={};const[V,me]=(0,t.useState)({entries:K,disabled:G}),[Pe,Ve]=(0,t.useState)({errors:[]}),at=(0,t.useRef)(!1),ze=ve=>{ve.preventDefault(),me({...V,entries:[...V.entries,{id:(0,P.A)(),title:"",value:"",type:Q}]})},he=(ve,_e)=>{ve.preventDefault();let He=n()(V);const je=n()(Pe);je.errors[_e]=null,Ve(je),He.entries.splice(_e,1),me(He)},Ie=(0,t.useCallback)(()=>{let ve=!0;return Pe.errors.length>0&&Pe.errors.find(_e=>(_e&&_e.title&&_e.title.valid)===!1||_e&&_e.value&&_e.value.valid===!1)&&(ve=!1),ve},[Pe]),Re=(ve,_e)=>{const He=n()(V);He.entries[ve]=_e,me(He)},ce=(ve,_e,He)=>{Ve(je=>{const Qe=n()(je);return Qe.errors[ve]=He,Qe}),Re(ve,_e)},Ee=async(ve,_e,He)=>{const je={...V.entries[_e],[ve]:He};await O(_e,je,ce)},oe=(ve,_e)=>{Ee(ve.target.name,_e,(0,A.yG)(ve.target))},ae=(ve,_e)=>{Ee("type",ve,_e)},ye=ve=>ve===ne?"Not a valid Java regular expression":"Not a valid URL",Oe=()=>V.entries.map((ve,_e)=>t.createElement("tr",{key:ve.id},t.createElement("td",{style:{verticalAlign:"middle",textAlign:"center"}},_e+1),t.createElement("td",null,t.createElement(E.A,{type:"text",id:`title-input${_e}`,ref:He=>{le[`title${_e}`]=He},help:Pe.errors[_e]&&Pe.errors[_e].title&&!Pe.errors[_e].title.valid?"Required field":null,name:"title",bsStyle:Pe.errors[_e]&&Pe.errors[_e].title&&!Pe.errors[_e].title.valid?"error":null,onChange:He=>oe(He,_e),defaultValue:ve.title,required:!0})),t.createElement("td",null,t.createElement(E.A,{type:"text",id:`value-input${_e}`,ref:He=>{le[`value${_e}`]=He},help:Pe.errors[_e]&&Pe.errors[_e].value&&!Pe.errors[_e].value.valid?ye(ve.type):null,name:"value",bsStyle:Pe.errors[_e]&&Pe.errors[_e].value&&!Pe.errors[_e].value.valid?"error":null,onChange:He=>oe(He,_e),defaultValue:ve.value,required:!0})),t.createElement("td",null,t.createElement(E.A,{id:`url-input-type-${_e}`,required:!0,autoFocus:!0},t.createElement(l.A,{clearable:!1,options:z,matchProp:"label",placeholder:"Select url type",onChange:He=>ae(_e,He),value:ve.type}))),t.createElement("td",null,t.createElement(h.Button,{onClick:He=>he(He,_e)},t.createElement(m.A,{name:"delete"}),t.createElement("span",{className:"sr-only"},"Delete entry")))));return(0,t.useEffect)(()=>{const ve=async()=>{const He=V.entries.findIndex(zt=>zt.id===k);if(He<0)return!1;const je=V.entries[He],Qe=await M(He,je,ce);return f()(Qe,"valid").some(zt=>!!zt)};(async He=>{const je=He&&k?await ve():Ie();j(V,je)})(!at.current),at.current||(at.current=!0)},[V]),t.createElement(t.Fragment,null,t.createElement(E.A,{type:"checkbox",id:"whitelist-disabled",label:"Disable Whitelist",checked:V.disabled,onChange:()=>me({...V,disabled:!V.disabled}),help:"Disable the whitelist functionality. Warning: Disabling this option will allow users to enter any URL in Graylog entities, which may pose a security risk."}),t.createElement(h.Button,{bsSize:"sm",onClick:ve=>ze(ve)},"Add Url"),t.createElement(I,{striped:!0,bordered:!0},t.createElement("thead",null,t.createElement("tr",null,t.createElement("th",null,"#"),t.createElement("th",null,"Title"),t.createElement("th",null,"URL"),t.createElement("th",null,"Type"),t.createElement("th",null,"Actions"))),t.createElement("tbody",null,Oe())),t.createElement(h.Button,{bsSize:"sm",onClick:ve=>ze(ve)},"Add Url"))};U.propTypes={urls:s().array,disabled:s().bool,onUpdate:s().func,newEntryId:s().string},U.defaultProps={urls:[],disabled:!1,onUpdate:()=>{},newEntryId:void 0};const W=U},m5sCWlWB:(x,y,e)=>{"use strict";e.d(y,{A:()=>M});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P");const n=e.p+"a991861284654f43baeb.jpg";var c=e("0eB11aFj"),g=e("qQvt58D8"),d=e("ww+BtWnX"),f=e.n(d),p=e("rIl5IEuP");const E=o.default.h1(({theme:O})=>(0,o.css)` font-size: ${O.fonts.size.extraLarge}; margin-bottom: 15px; `),l=(0,o.default)(p.Row)` height: 82vh; `,m=(0,o.default)(p.Jumbotron)(({theme:O})=>(0,o.css)` background-color: ${f()(O.colors.global.contentBackground).alpha(.8).css()}; text-align: center; `),h=({children:O,title:U})=>t.createElement(l,null,t.createElement(p.Col,{mdOffset:2,md:8},t.createElement(m,null,t.createElement(E,null,U),O)));h.propTypes={children:s().node.isRequired,title:s().string.isRequired};const A=h,C=()=>(0,o.css)` body { background: url(${({backgroundImage:O})=>O}) no-repeat center center fixed; background-size: cover; } `,_=o.default.div(({theme:O})=>(0,o.css)` margin-left: auto; margin-right: auto; text-align: left; dt { font-size: ${O.fonts.size.body}; font-weight: normal; overflow: auto; } p { font-size: inherit; } `),P=(0,o.createGlobalStyle)` ${C()} `,I=({children:O,title:U,description:W,backgroundImage:K,displayPageLayout:j})=>{const G=j?c.A:t.Fragment;return t.createElement(g.A,{title:U},t.createElement(G,null,t.createElement(P,{backgroundImage:K}),t.createElement(A,{title:U},W,O&&t.createElement(_,null,O))))};I.propTypes={children:s().node,description:s().node.isRequired,displayPageLayout:s().bool,title:s().string.isRequired,backgroundImage:s().string},I.defaultProps={children:void 0,displayPageLayout:!0,backgroundImage:n};const M=I},xnXzNzZh:(x,y,e)=>{"use strict";e.d(y,{g:()=>j,A:()=>G});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("rIl5IEuP"),c=e("IOI9nV80"),g=e("dFpwyWHg"),d=e.n(g),f=e("C2ikvoS0"),p=e.n(f),E=e("1IntWRSu"),l=e.n(E),m=e("8nGWeFnd"),h=e.n(m),A=e("TeAcaicX"),C=e.n(A),_=e("eE3+5goe"),P=e.n(_),I=e("VPjWgPqM"),M={};M.styleTagTransform=P(),M.setAttributes=h(),M.insert=l().bind(null,"head"),M.domAPI=p(),M.insertStyleElement=C();var O=d()(I.A,M);const U=I.A&&I.A.locals?I.A.locals:void 0,W=(0,o.default)(c.In)` margin-right: 9px; `,K=({condition:k,wrapper:Q,children:ne})=>k?Q(ne):ne,j=({bsStyle:k,children:Q,className:ne,collapsible:z,header:le,title:V,defaultExpanded:me})=>{const Pe=t.createElement("h3",null,t.createElement(W,{name:"info"}),V);return t.createElement(n.Panel,{defaultExpanded:me,className:`${U.helpPanel} ${ne}`,bsStyle:k},t.createElement(n.Panel.Heading,null,t.createElement(n.Panel.Title,{toggle:z},le||Pe)),t.createElement(K,{condition:z,wrapper:Ve=>t.createElement(n.Panel.Collapse,null,Ve)},t.createElement(n.Panel.Body,null,Q)))};j.propTypes={bsStyle:s().oneOf(["success","warning","danger","info","default","primary"]),children:s().node,className:s().string,collapsible:s().bool,header:s().node,title:s().string,defaultExpanded:s().bool},j.defaultProps={bsStyle:"info",children:void 0,className:"",collapsible:!1,header:void 0,title:"",defaultExpanded:!1};const G=j},"Z/o2hWBZ":(x,y,e)=>{"use strict";e.d(y,{SY:()=>Le,Ay:()=>ft});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("WoBpjwwo"),n=e.n(o),c=e("IW7priiX"),g=e.n(c),d=e("Mx+G+HdB"),f=e.n(d),p=e("WgCNywL/"),E=e.n(p),l=e("/yh+QgO6"),m=e.n(l),h=e("oc9db6Tt"),A=e.n(h),C=e("wXrUUKFq"),_=e.n(C),P=e("euujeYld"),I=e.n(P),M=e("ZoCQyFC1"),O=e.n(M),U=e("yA/mTvIZ"),W=e.n(U),K=e("9oVghaOd"),j=e.n(K),G=e("VPaD/Np4"),k=e("MdYBRjRJ"),Q=e("yGRmSjYM"),ne=e("S6FuRS7B"),z=e("1/PeS1Oa"),le=e("KhLmrWKP"),V=e("8fnsnG21"),me=e("7GNmVOX8"),Pe=e("IOI9nV80"),Ve=e("CHWvwBKE"),at=e("/coHI+Jz"),ze=e("ATOIS62c"),he=e("rIl5IEuP"),Ie=e("4IfE3Ihm"),Re=e("fBC5XqGO"),ce=e("xPjmrmtt"),Ee=e("YR1bCTOi"),oe=e("iltCXley"),ae=e("EapCXqJr"),ye=e("0t7Ye+61"),Oe=e("v4GbOr/o"),ve=e("8OvTct/Z"),_e=e("O/XpfGnR"),He=e("+c0Nkc8d"),je=e("J6y4/h8P"),Qe=e("hhdCSTZj"),zt=e("dsvqAVKU");const xe=(0,je.default)("code")` margin: 0 0.25em; white-space: nowrap; `,Ue=({validationState:Ot,onChange:Lt,lookupTables:an,identifier:Ft,parameter:rn,defaultExpandHelp:$t})=>{var be,yn,Kt,An,qt;const{lookupTable:io,key:Be,defaultValue:bn,name:gn}=rn,wn=`$${gn}$`,Zn=De=>ln=>{Lt(De,ln)},Vn=De=>({target:{value:ln}})=>Zn(De)(ln);if(!an)return t.createElement(zt.A,{text:"Loading lookup tables"});const po=an.sort((De,ln)=>(0,z.m)(De.title,ln.title)).map(De=>({label:De.title,value:De.name}));return t.createElement(t.Fragment,null,t.createElement(he.Input,{id:`lookup-table-parameter-table-${Ft}`,name:"query-param-table-name",label:"Lookup Table",bsStyle:(be=Ot==null?void 0:Ot.lookupTable)==null?void 0:be[0],error:(yn=Ot==null?void 0:Ot.lookupTable)==null?void 0:yn[1],help:"Select the lookup table Graylog should use to get the values."},t.createElement(Qe.A,{placeholder:"Select lookup table",inputProps:{"aria-label":"Select lookup table"},onChange:Zn("lookupTable"),options:po,value:io,autoFocus:!0,clearable:!1,required:!0})),t.createElement(he.Input,{type:"text",id:`lookup-table-parameter-key-${Ft}`,label:"Lookup Table Key",name:"key",defaultValue:Be,onChange:Vn("key"),bsStyle:(Kt=Ot==null?void 0:Ot.key)==null?void 0:Kt[0],help:"Select the lookup table key",error:((An=Ot==null?void 0:Ot.key)==null?void 0:An[0])==="error"?(qt=Ot==null?void 0:Ot.key)==null?void 0:qt[1]:void 0,spellCheck:!1,required:!0}),t.createElement(he.Input,{id:`lookup-table-parameter-default-value-${Ft}`,type:"text",name:"defaultValue",label:"Default Value",help:"Select a default value in case the lookup result is empty",defaultValue:bn,spellCheck:!1,onChange:Vn("defaultValue")}),t.createElement(he.Panel,{id:"lookup-table-parameter-help",defaultExpanded:$t},t.createElement(he.Panel.Heading,null,t.createElement(he.Panel.Title,{toggle:!0},"How to use lookup table parameters")),t.createElement(he.Panel.Collapse,null,t.createElement(he.Panel.Body,null,t.createElement("h5",null,"General Usage"),t.createElement("p",null,"After declaring it, the parameter",t.createElement(xe,null,wn),"in your query, will be replaced with the list of results from the lookup table. The list of results will be presented in the form of a Lucene BooleanQuery. E.g.:",t.createElement(xe,null,'("foo" OR "bar" OR "baz")')),t.createElement("h5",null,"Behaviour on empty lookup result list"),t.createElement("p",null,"The event definition query is only executed if a value for the parameter is present. If the lookup result is empty, the execution will be skipped and treated as if the ",t.createElement("i",null,"Search Query")," found no messages. If an execution is desired a ",t.createElement("i",null,"Default Value")," that yields the desired search result needs to be provided. For example, (depending on the use case) a wildcard like",t.createElement(xe,null,"*"),"can be a meaningful Default Value."),t.createElement("h5",null,"Limitations"),t.createElement("p",null,"Please note that maximum number of supported results is 1024. If the lookup table returns more results, the query is not executed.")))))};Ue.defaultProps={parameter:{},validationState:{},defaultExpandHelp:!0};const ke=Ue;class Se extends t.Component{constructor(Lt){super(Lt),this.openModal=()=>{this.setState({showModal:!0})},this._cleanState=()=>{const{queryParameter:Ft}=this.props;this.setState({queryParameter:Ft,showModal:!1})},this._saved=()=>{const{queryParameter:Ft}=this.state;this._validate(Ft)&&(this.propagateChanges(),this._cleanState())},this.propagateChanges=()=>{const{queryParameters:Ft,onChange:rn,queryParameter:$t}=this.props,{queryParameter:be}=this.state,yn=[...Ft],Kt=Ft.findIndex(An=>An.name===$t.name);if(Kt<0)throw new Error(`Query parameter "${be.name}" not found`);yn[Kt]=be.toJSON(),rn(yn)},this.handleParameterChange=(Ft,rn)=>{const{queryParameter:$t}=this.state,be=$t.toBuilder()[Ft](rn).build();this.setState({queryParameter:be})},this._validate=Ft=>{const rn={};return Ft.lookupTable||(rn.lookupTable="Cannot be empty"),Ft.key||(rn.key="Cannot be empty"),this.setState({validation:rn}),A()(rn)};const{queryParameter:an}=this.props;this.state={showModal:!1,queryParameter:an,validation:{}}}render(){const{lookupTables:Lt,embryonic:an}=this.props,{queryParameter:Ft,validation:rn,showModal:$t}=this.state,be={lookupTable:rn.lookupTable?["error",rn.lookupTable]:void 0,key:rn.key?["error",rn.key]:void 0};return t.createElement(t.Fragment,null,t.createElement(he.Button,{bsSize:"small",bsStyle:an?"primary":"info",onClick:()=>this.openModal()},Ft.name,an&&": undeclared"),t.createElement(he.BootstrapModalForm,{show:$t,title:`Declare Query Parameter "${Ft.name}" from Lookup Table`,"data-telemetry-title":"Declare Query Parameter from Lookup Table",onSubmitForm:this._saved,onCancel:this._cleanState,submitButtonText:"Save"},t.createElement(ke,{validationState:be,identifier:Ft.name,parameter:Ft,onChange:this.handleParameterChange,lookupTables:Lt})))}}Se.propTypes={queryParameters:s().array.isRequired,queryParameter:s().object.isRequired,lookupTables:s().array.isRequired,onChange:s().func.isRequired,embryonic:s().bool.isRequired};const Je=Se;var nt=e("9O66OgQd");const Wt="pluggableSearchBarControlsAreHidden",Le=["HOURS","MINUTES","SECONDS"],Fe=["lookuptables:read"],qe=Ot=>({name:Ot,embryonic:!0,type:"lut-parameter-v1",data_type:"any",title:"new title"}),ut=({currentUser:Ot,eventDefinition:Lt,onChange:an,streams:Ft,validation:rn})=>{const{execute_every_ms:$t,search_within_ms:be}=Lt.config,[yn,Kt]=(0,t.useState)(Lt.config),An=(0,ze.z)(be,Le),qt=(0,ze.z)($t,Le),{userTimezone:io}=(0,_e.A)(),{setFieldWarning:Be,warnings:bn}=(0,t.useContext)(le.A),gn=bn==null?void 0:bn.queryString,wn=(0,He.q)(gn),{tables:Zn}=(0,V.P)(ce.h),{pathname:Vn}=(0,ye.A)(),po=(0,ve.A)(),De=(0,oe.A)(),ln=(0,oe.A)(),[bt,It]=(0,t.useState)({}),[En,Xt]=(0,t.useState)(!1),[Ye,At]=(0,t.useState)(An.unit),[Ct,Bt]=(0,t.useState)(qt.unit),[Ze,gt]=(0,t.useState)(An.duration),[cn,un]=(0,t.useState)(qt.duration),_n=(0,t.useCallback)(()=>(0,Q.Nn)(Ot.permissions,Fe),[Ot.permissions]),vn=(0,t.useCallback)((Gt,tn,Qt,Bn)=>{const co={timeRange:Qt,queryString:Gt,streams:tn};(0,Ee.A)(co,Bn).then($n=>{($n==null?void 0:$n.status)==="WARNING"||($n==null?void 0:$n.status)==="ERROR"?Be("queryString",$n):Be("queryString",void 0)})},[Be]),Ln=Gt=>({type:"relative",from:Gt/1e3});(0,t.useEffect)(()=>{_n()&&ce.B.searchPaginated(1,0,void 0,!1)},[_n]),(0,t.useEffect)(()=>{vn(Lt.config.query,Lt.config.streams,Ln(Lt.config.search_within_ms),io)},[Lt.config.query,Lt.config.streams,Lt.config.search_within_ms,Be,io,vn]);const Xn=(Gt,tn)=>{const Qt=g()(Lt.config);return Qt[Gt]=tn,Kt(Qt),Qt},no=Gt=>{an("config",Gt)},Wo=I()(Gt=>Gt.map(tn=>Ft.find(Qt=>Qt.id===tn)||tn).map(tn=>{const Qt=typeof tn=="object"?tn:{title:tn,id:tn};return{label:Qt.title,value:Qt.id}}).sort((tn,Qt)=>(0,z.m)(tn.label,Qt.label)),Gt=>Gt.join("-")),Co=(Gt,tn)=>{const Qt=(tn==null?void 0:tn.query_parameters)||[],Bn=[],co={};Qt.forEach(To=>{Gt.has(To.name)?Bn.push(To):co[To.name]=To});const $n=[];Gt.forEach(To=>{Bn.find(xo=>xo.name===To)||(bt[To]?$n.push(bt[To]):$n.push(qe(To)))}),It(_()(bt,co)),an("config",{...tn,query_parameters:Bn.concat($n)})},Fo=(Gt,tn,Qt=(0,G.OrderedMap)())=>{if(!_n())return;const co=Ve.Ay.builder().id(De).query({type:"elasticsearch",query_string:Gt}).timerange({type:"relative",range:1e3}).filters(Qt.toList()).searchTypes([{id:ln,type:"messages",limit:10,offset:0,filter:void 0,filters:void 0,name:void 0,query:void 0,timerange:void 0,streams:void 0,sort:[],decorators:[]}]).build(),$n=at.A.create().toBuilder().queries([co]).build();(0,ae.A)($n).then(To=>{Co(To.undeclared,tn)})},rt=f()(Fo,250),Mt=(Gt,tn)=>{Gt==="_is_scheduled"&&po(Oe.g.EVENTDEFINITION_CONDITION.FILTER_EXECUTED_AUTOMATICALLY_TOGGLED,{app_pathname:(0,k.i)(Vn),app_section:"event-definition-condition",app_action_value:"enable-checkbox",is_scheduled:tn._is_scheduled}),no(tn)},Rt=Gt=>{const{name:tn}=Gt.target,Qt=ne.yG(Gt.target),Bn=Xn(tn,Qt);Mt(tn,Bn),rt(Qt,Bn)},fn=Gt=>{const{query:tn}=Lt.config,Qt=Xn("filters",Gt.toArray());no(Qt),rt(tn,Qt)},Dn=Gt=>{const{name:tn}=Gt.target,Qt=ne.yG(Gt.target),Bn=Xn(tn,Qt);Mt(tn,Bn)},kn=Gt=>{me.A.set(Wt,Gt),Xt(Gt)},ro=Gt=>{po(Oe.g.EVENTDEFINITION_CONDITION.FILTER_STREAM_SELECTED,{app_pathname:(0,k.i)(Vn),app_section:"event-definition-condition",app_action_value:"stream-select"}),no(Xn("streams",Gt))},Gn=Gt=>(tn,Qt)=>{Gt==="search_within_ms"&&Qt!==Ye?po(Oe.g.EVENTDEFINITION_CONDITION.FILTER_SEARCH_WITHIN_THE_LAST_UNIT_CHANGED,{app_pathname:(0,k.i)(Vn),app_section:"event-definition-condition",app_action_value:"searchWithinMsUnit-select",new_unit:Qt}):Gt==="execute_every_ms"&&Qt!==Ct&&po(Oe.g.EVENTDEFINITION_CONDITION.FILTER_EXECUTE_SEARCH_EVERY_UNIT_CHANGED,{app_pathname:(0,k.i)(Vn),app_section:"event-definition-condition",app_action_value:"executeEveryMsUnit-select",new_unit:Qt});const Bn=j().duration(O()([tn,1]),Qt).asMilliseconds();if(no(Xn(Gt,Bn)),n()(Gt)==="searchWithinMs"){gt(tn),At(Qt);return}un(tn),Bt(Qt)},vo=()=>{var Gt;const tn=((Gt=Lt==null?void 0:Lt.config)==null?void 0:Gt.query_parameters)||[],Qt=$n=>{const To={...Lt.config,query_parameters:$n||[]};return an("config",To)};if(!_n())return t.createElement(he.Alert,{bsStyle:"info"},"This account lacks permission to declare Query Parameters from Lookup Tables.");const Bn=tn.map($n=>t.createElement(Je,{key:$n.name,queryParameter:Re.A.fromJSON($n),embryonic:!!$n.embryonic,queryParameters:tn,lookupTables:Object.values(Zn||{}),onChange:Qt}));if(A()(Bn))return null;const co=!A()(tn.filter($n=>$n.embryonic));return t.createElement(he.FormGroup,{validationState:rn.errors.query_parameters?"error":null},t.createElement(he.ControlLabel,null,"Query Parameters"),t.createElement(he.Alert,{bsStyle:co?"danger":"info"},t.createElement(he.ButtonToolbar,null,Bn)),co&&t.createElement(he.HelpBlock,null,rn.errors.query_parameters?m()(rn,"errors.query_parameters[0]"):"Please declare missing query parameters by clicking on the buttons above."))},yo=()=>{const Gt=wn.map(tn=>tn.end).sort((tn,Qt)=>Qt-tn)[0];return t.createElement(Ie.A,{dateTime:Gt})},lo=Lt._scope==="ILLUMINATE",Jn=W()(Ft.map(Gt=>Gt.id),E()(Lt.config.streams,[])),Yn=Wo(Jn);return t.createElement("fieldset",null,t.createElement("h2",{className:nt.A.title},"Filter"),t.createElement("p",null,"Add information to filter the log messages that are relevant for this Event Definition."),lo||t.createElement(he.Input,{id:"filter-query",name:"query",label:"Search Query",type:"text",help:t.createElement("span",null,"Search query that Messages should match. You can use the same syntax as in the Search page, including declaring Query Parameters from Lookup Tables by using the ",t.createElement("code",null,"$newParameter$")," syntax."),value:E()(yn.query,""),onChange:Rt}),lo||vo(),!En&&t.createElement(he.FormGroup,{controlId:"search-filters"},t.createElement(he.ControlLabel,null,"Search Filters ",t.createElement("small",{className:"text-muted"},"(Optional)")),t.createElement("div",{style:{margin:"16px 0"}},t.createElement(Pe.QP,{filters:Lt.config.filters,onChange:fn,hideFiltersPreview:kn}))),lo||t.createElement(t.Fragment,null,t.createElement(he.FormGroup,{controlId:"filter-streams"},t.createElement(he.ControlLabel,null,"Streams ",t.createElement("small",{className:"text-muted"},"(Optional)")),t.createElement(Pe.KF,{id:"filter-streams",matchProp:"label",onChange:Gt=>ro(Gt===""?[]:Gt.split(",")),options:Yn,value:E()(Lt.config.streams,[]).join(",")}),t.createElement(he.HelpBlock,null,"Select streams the search should include. Searches in all streams if empty.")),(0,He.E)(wn)&&t.createElement(he.Alert,{bsStyle:"danger",title:"Warm Tier Warning"},"The selected time range will include data stored in the Warm Tier. Events that must frequently retrieve data from the Warm Tier may cause performance problems. A value for ",t.createElement("strong",null,"Search within the last")," exceeding the following duration will fall into the Warm Tier: ",yo(),"."),t.createElement(he.FormGroup,{controlId:"search-within",validationState:rn.errors.search_within_ms?"error":null},t.createElement(Pe.gM,{label:"Search within the last",update:Gn("search_within_ms"),value:Ze,unit:Ye,units:Le,clearable:!0,required:!0}),rn.errors.search_within_ms&&t.createElement(he.HelpBlock,null,m()(rn,"errors.search_within_ms[0]"))),t.createElement(he.FormGroup,{controlId:"execute-every",validationState:rn.errors.execute_every_ms?"error":null},t.createElement(Pe.gM,{label:"Execute search every",update:Gn("execute_every_ms"),value:cn,unit:Ct,units:Le,clearable:!0,required:!0}),rn.errors.execute_every_ms&&t.createElement(he.HelpBlock,null,m()(rn,"errors.execute_every_ms[0]"))),t.createElement(he.Input,{id:"schedule-checkbox",type:"checkbox",name:"_is_scheduled",label:"Enable",help:"Should this event definition be executed automatically?",checked:E()(Lt.config._is_scheduled,!0),onChange:Dn})))},ft=ut;ut.propTypes={eventDefinition:s().object.isRequired,validation:s().object.isRequired,streams:s().array.isRequired,onChange:s().func.isRequired,currentUser:s().object.isRequired}},jhzeTBRS:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("DUKaTDO2"),r=e("jAGDuYSC"),s=e("cd5HAK44");const n=(c,{enabled:g}={enabled:!0})=>{const{data:d,refetch:f,isInitialLoading:p}=(0,t.useQuery)(["eventDefinition","overview",c],()=>s.o.searchPaginated(c.page,c.pageSize,c.query,{sort:c==null?void 0:c.sort.attributeId,order:c==null?void 0:c.sort.direction}),{onError:E=>{r.A.error(`Loading Event Definitions failed with status: ${E}`,"Could not load Event definition")},keepPreviousData:!0,enabled:g});return{data:d,refetch:f,isInitialLoading:p}}},dlIR0k67:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("d4kzUuQm"),s=e("hfAjrXHN"),o=e("6dLKCZdN");const n=({isEvent:g,id:d})=>{const{definitionId:f}=(0,o.A)(),p=g?r.Ay.ALERTS.replay_search(d):r.Ay.ALERTS.DEFINITIONS.replay_search(d||f);return t.createElement(s.d,{searchLink:p},"Replay search")};n.defaultProps={id:void 0,isEvent:!1};const c=n},LgqVPv05:(x,y,e)=>{"use strict";e.d(y,{A:()=>I});var t=e("Z7aTuO5B"),r=e("oc9db6Tt"),s=e.n(r),o=e("0hhBr0/b"),n=e("rIl5IEuP"),c=e("IOI9nV80");const d=({fields:M})=>{const O=Object.keys(M);return t.createElement("ul",null,O.map(U=>t.createElement("li",{key:U},t.createElement("b",null,U)," ",M[U])))};var f=e("q2j1bVbz"),p=e("yGRmSjYM"),E=e("ty2gyrHp"),l=e("d4kzUuQm");const h=({event:M,eventDefinitionContext:O})=>{const U=(0,f.A)();return O?(0,p.Nn)(U.permissions,`eventdefinitions:edit:${O.id}`)?t.createElement(E.N,{to:l.Ay.ALERTS.DEFINITIONS.edit(O.id)},O.title):t.createElement(t.Fragment,null,O.title):t.createElement("em",null,M.event_definition_id)};var A=e("dlIR0k67"),C=e("w4l/b+9L");const _=M=>(0,o.A)("views.components.eventActions").filter(U=>U.useCondition?!!U.useCondition():!0).map(({component:U,key:W})=>t.createElement(U,{key:W,eventId:M})),I=({event:M,eventDefinitionContext:O})=>{const U=(0,o.A)("eventDefinitionTypes"),W=_(M.id),K=(0,t.useMemo)(()=>M.event_definition_type===void 0?null:U.find(j=>j.type===M.event_definition_type),[M,U]);return t.createElement(n.Row,null,t.createElement(n.Col,{md:6},t.createElement("dl",null,t.createElement("dt",null,"ID"),t.createElement("dd",null,M.id),t.createElement("dt",null,"Priority"),t.createElement("dd",null,t.createElement(C.A,{priority:M.priority})),t.createElement("dt",null,"Timestamp"),t.createElement("dd",null," ",t.createElement(c.Dc,{dateTime:M.timestamp})),t.createElement("dt",null,"Event Definition"),t.createElement("dd",null,t.createElement(h,{event:M,eventDefinitionContext:O}),"\u2003 (",K&&K.displayName||M.event_definition_type,")"),M.replay_info&&t.createElement(t.Fragment,null,t.createElement("dt",null,"Actions"),t.createElement("dd",null,t.createElement(A.A,{id:M.id,isEvent:!0})),W))),t.createElement(n.Col,{md:6},t.createElement("dl",null,M.timerange_start&&M.timerange_end&&t.createElement(t.Fragment,null,t.createElement("dt",null,"Aggregation time range"),t.createElement("dd",null,t.createElement(c.Dc,{dateTime:M.timerange_start}),"\u2002\u2014\u2002",t.createElement(c.Dc,{dateTime:M.timerange_end}))),t.createElement("dt",null,"Event Key"),t.createElement("dd",null,M.key||"No Key set for this Event."),t.createElement("dt",null,"Additional Fields"),s()(M.fields)?t.createElement("dd",null,"No additional Fields added to this Event."):t.createElement(d,{fields:M.fields}),t.createElement("dt",null,"Group-By Fields"),s()(M.group_by_fields)?t.createElement("dd",null,"No group-by fields on this Event."):t.createElement(d,{fields:M.group_by_fields}))))}},BGrPYJnO:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("rIl5IEuP");const o=({isAlert:n})=>n?t.createElement(r.Label,{bsStyle:"warning"},"Alert"):t.createElement(r.Label,{bsStyle:"info"},"Event")},"w4l/b+9L":(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("UMMlOSMl"),s=e("TJOheZRu");const n=({priority:c})=>t.createElement(t.Fragment,null,s.A.capitalizeFirstLetter(r.A.properties[c].name))},aoXgygHD:(x,y,e)=>{"use strict";e.d(y,{A:()=>P});var t=e("Z7aTuO5B"),r=e("8u9vblRK"),s=e.n(r),o=e("dLGFg9GJ"),n=e.n(o),c=e("J6y4/h8P"),g=e("rIl5IEuP");const d=()=>navigator.userAgent.indexOf("Mac OS X")!==-1;var f=e("QBkUz07U");const p=c.default.div` display: flex; flex-direction: column; `,E=c.default.div` display: flex; gap: 5px; justify-content: space-between; &:not(:last-child) { margin-bottom: 3px; } `,l=c.default.div` display: inline-flex; gap: 5px; justify-content: right; height: fit-content; `,m=c.default.div` display: flex; align-items: center; `,h=(I,M)=>({mod:M?"\u2318":"Ctrl"})[I]||I,A=({keys:I,splitKey:M,combinationKey:O,isMacOS:U})=>{const W=s()(I)?I:[I],K=n()(W.map(j=>j.split(M)));return t.createElement(t.Fragment,null,K.map((j,G)=>{const k=j.split(O),Q=G===K.length-1;return t.createElement(t.Fragment,{key:j},k.map((ne,z)=>{const le=z===k.length-1;return t.createElement(t.Fragment,{key:ne},t.createElement(g.KeyboardKey,null,h(ne,U)),!le&&t.createElement(m,null,O))}),!Q&&t.createElement(m,null,"or"))}))},C=({description:I,keys:M,combinationKey:O,splitKey:U,isMacOS:W})=>t.createElement(E,null,I,t.createElement(l,null,t.createElement(A,{keys:M,combinationKey:O,splitKey:U,isMacOS:W}))),P=({title:I,description:M,sectionActions:O})=>{const U=d();return t.createElement(f.A,{title:I},t.createElement("p",{className:"description"},M),t.createElement(p,null,O.map(({keyDescription:W,keys:K,combinationKey:j,splitKey:G,reactKey:k})=>t.createElement(C,{description:W,keys:K,combinationKey:j,splitKey:G,isMacOS:U,key:k}))))}},"0eB11aFj":(x,y,e)=>{"use strict";e.d(y,{A:()=>M});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("yAXMqwrl"),c=e("l4nHKZ4j"),g=e("rIl5IEuP"),d=e("QL8i6bcz"),f=e("kbGtT3aS"),p=e("8fnsnG21"),E=e("9xj2LQzD");const l=({system:O})=>{const[U,W]=(0,t.useState)();return(0,t.useEffect)(()=>{let K=!0;return E.z.jvm().then(j=>{K&&W(j)}),()=>{K=!1}},[]),O&&U?t.createElement(t.Fragment,null,"Graylog ",O.version," on ",O.hostname," (",U.info,")"):t.createElement(t.Fragment,null,"Graylog ",(0,f.MM)())};l.propTypes={system:s().shape({version:s().string,hostname:s().string})},l.defaultProps={system:void 0};const m=(0,p.A)(l,{system:E.z},({system:{system:O}={system:void 0}})=>({system:O})),h=o.default.footer(({theme:O})=>(0,o.css)` text-align: center; font-size: ${O.fonts.size.small}; color: ${O.colors.gray[70]}; height: 20px; /* This combination of padding and box-sizing is required to fix a firefox flexbox bug */ box-sizing: content-box; padding-bottom: ${O.spacings.sm}; @media print { display: none; } `),A=()=>{const O=d.d.exports("pageFooter");if(O.length===1){const U=O[0].component;return t.createElement(h,null,t.createElement(U,null))}return t.createElement(h,null,t.createElement(m,null))};A.propTypes={};const C=A,_=o.default.div(({theme:O})=>` display: flex; flex-direction: column; overflow: auto; height: 100%; width: 100%; /* Bottom gap is defined by the footer */ padding: ${O.spacings.sm} ${O.spacings.sm} 0 ${O.spacings.sm}; `),P=(0,o.default)(g.Grid)` width: 100%; flex: 1; margin-bottom: 10px; `,I=({children:O,className:U,FooterComponent:W,NotificationsComponent:K})=>t.createElement(_,{className:U},t.createElement(K,null,t.createElement(P,{fluid:!0,className:"page-content-grid"},O||t.createElement(n.Outlet,null)),t.createElement(W,null)));I.propTypes={children:s().node,className:s().string},I.defaultProps={children:void 0,className:void 0,FooterComponent:C,NotificationsComponent:c.A};const M=I},"32EwkrXd":(x,y,e)=>{"use strict";e.d(y,{A:()=>U});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("ii0bleBb"),o=e.n(s);const n=r.default.div(({theme:W})=>(0,r.css)` background-color: ${W.colors.global.contentBackground}; display: flex; justify-content: center; align-items: center; width: 33%; padding: 30px; max-width: 440px; min-width: 330px; `),c=r.default.div` width: 100%; `,g=({children:W})=>t.createElement(n,{className:"container"},t.createElement(c,null,W));g.propTypes={children:o().node.isRequired};const d=g;var f=e("fV39EiaT");const p=e.p+"3d9f364211a95b400b29.svg";var E=e("BAvuEjdP");const l=r.default.div` display: block; height: 5rem; width: auto; margin: auto; margin-bottom: 1.5rem; svg { width: 100%; height: 75px; } `,m=r.default.div` position: relative; height: 100vh; width: 100%; `,h=r.default.div` z-index: -1; display: flex; flex-direction: column; position: absolute; vertical-align: middle; justify-content: center; height: 100%; width: 100%; padding: 0 30px; background-image: url(${p}); background-position: center; background-size: cover; `,A=r.default.div` position: absolute; top: 0; margin-top: 5px; width: 100%; `,C=r.default.div` display: flex; flex: 1 1 0%; flex-direction: row; min-width: 100%; min-height: 100%; `,_=r.default.div` vertical-align: middle; justify-content: center; place-self: center center; height: auto; `,P=r.default.strong(({theme:W})=>(0,r.css)` display: block; font-size: ${W.fonts.size.extraLarge}; font-weight: 800; margin-top: 1.5rem; margin-bottom: 1.5rem; `),I=r.default.h1(({theme:W})=>(0,r.css)` color: #fcfcfc; text-transform: uppercase; font-size: ${W.fonts.size.huge}; line-height: 1; font-weight: 600; `),M=r.default.span(({theme:W})=>(0,r.css)` color: ${W.colors.brand.primary}; `),U=({children:W})=>t.createElement(C,null,t.createElement(d,null,t.createElement(P,null,"Welcome to Graylog"),W),t.createElement(m,null,t.createElement(A,null,t.createElement(f.A,{readFromConfig:!0})),t.createElement(h,null,t.createElement(_,null,t.createElement(l,null,t.createElement(E.g,{color:"#ffffff"})),t.createElement(I,null,"Data. Insights. ",t.createElement(M,null,"Answers."))))))},iDhuQQu3:(x,y,e)=>{"use strict";e.d(y,{l2:()=>et,HX:()=>Lo,H_:()=>Fn,vu:()=>On,Ln:()=>dn,pU:()=>Ts,wb:()=>Us,UZ:()=>na,I2:()=>ea,OJ:()=>Ga,oV:()=>ja,gu:()=>fo,Kr:()=>ks,Hf:()=>co,WY:()=>Yn,hP:()=>Mt,gN:()=>no,z7:()=>_n});var t=e("QL8i6bcz"),r=e("ii0bleBb"),s=e.n(r),o=e("Z7aTuO5B"),n=e("RCNj0OY4"),c=e("QdZ7Yq43"),g=e("rIl5IEuP"),d=e("IOI9nV80");const f=({config:pe,updateConfig:Ae,handleFormEvent:$e,validationState:Xe,validationMessage:St})=>{const xt=n.A.isCloud(),Nt={IPINFO_STANDARD_LOCATION:"/etc/graylog/server/standard_location.mmdb",IPINFO_ASN:"/etc/graylog/server/asn.mmdb"},Ht=[{label:"IPinfo location database",value:"IPINFO_STANDARD_LOCATION"},{label:"IPinfo ASN database",value:"IPINFO_ASN"}];let Zt=[{label:"ASN database",value:"MAXMIND_ASN"},{label:"City database",value:"MAXMIND_CITY"},{label:"Country database",value:"MAXMIND_COUNTRY"}];xt?Zt=Ht:Zt=Zt.concat(Ht);const Kn=(Te,Ge,mt,Dt)=>{const Jt=c.A.clone(pe);Jt[Dt]=mt?Te:0,Jt[`${Dt}_unit`]=Ge,Ae(Jt)},Un=(Te,Ge,mt)=>{Kn(Te,Ge,mt,"check_interval")},ue=Te=>{const Ge=c.A.clone(pe);xt&&(Ge.path=Nt[Te]),Ge.database_type=Te,Ae(Ge)};return o.createElement("fieldset",null,!xt&&o.createElement(g.Input,{type:"text",id:"path",name:"path",label:"File path",autoFocus:!0,required:!0,onChange:$e,help:St("path","The path to the database file."),bsStyle:Xe("path"),value:pe.path,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{id:"database-type-select",label:"Database type",required:!0,autoFocus:!0,help:"Select the type of the database file",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},o.createElement(d.l6,{placeholder:"Select the type of database file",clearable:!1,options:Zt,matchProp:"label",onChange:ue,value:pe.database_type})),o.createElement(d.gM,{label:"Refresh file",help:"If enabled, the database file is checked for modifications and refreshed when it changed on disk.",update:Un,value:pe.check_interval,unit:pe.check_interval_unit||"MINUTES",defaultEnabled:pe.check_interval>0,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}))};f.propTypes={config:s().object.isRequired,updateConfig:s().func.isRequired,handleFormEvent:s().func.isRequired,validationState:s().func.isRequired,validationMessage:s().func.isRequired};const p=f;var E=Object.defineProperty,l=(pe,Ae,$e)=>Ae in pe?E(pe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:$e}):pe[Ae]=$e,m=(pe,Ae,$e)=>(l(pe,typeof Ae!="symbol"?Ae+"":Ae,$e),$e);class h extends o.Component{render(){const{config:Ae}=this.props.dataAdapter,$e={MAXMIND_ASN:"ASN database",MAXMIND_CITY:"City database",MAXMIND_COUNTRY:"Country database",IPINFO_STANDARD_LOCATION:"IPinfo location database",IPINFO_ASN:"IPinfo ASN database"};return o.createElement("dl",null,o.createElement("dt",null,"Database file path"),o.createElement("dd",null,Ae.path),o.createElement("dt",null,"Database type"),o.createElement("dd",null,$e[Ae.database_type]),o.createElement("dt",null,"Check interval"),o.createElement("dd",null,o.createElement(d.f6,{value:Ae.check_interval,unit:Ae.check_interval_unit})))}}m(h,"propTypes",{dataAdapter:s().object.isRequired});const A=h;class C extends o.Component{render(){return o.createElement("div",null,o.createElement("p",null,"The GeoIP data adapter supports reading MaxMind's GeoIP2 databases."),o.createElement(g.Alert,{style:{marginBottom:10},bsStyle:"info",title:"Limitations"},o.createElement("p",null,"Currently the ASN, city and country databases are supported."),o.createElement("p",null,"For support of additional database types, please visit our support channels.")),o.createElement("hr",null),o.createElement("h3",{style:{marginBottom:10}},"ASN database fields"),o.createElement("pre",null,`{ "as_number": 15169, "as_organization": "Google LLC" }`),o.createElement("h3",{style:{marginBottom:10}},"Country database fields"),o.createElement("pre",null,`{ "continent": { "code": "NA", "geoname_id": 6255149, "names": { "en": "North America" } }, "country": { "geoname_id": 6252001, "iso_code": "US", "names": { "en": "United States" } }, "registered_country": { "geoname_id": 6252001, "iso_code": "US", "names": { } }, "represented_country": { "geoname_id": null, "iso_code": "US", "names": { } }, "traits": { "ip_address": "8.8.8.8", "is_anonymous_proxy": false, "is_legitimate_proxy": false, "is_satellite_provider": false, "isp": null, "organization": null, } }`),o.createElement("h3",{style:{marginBottom:10}},"City database fields"),o.createElement("p",null,"In addition to the fields provided by the country database, the city database also includes the following fields:"),o.createElement("pre",null,`{ "city": { "geoname_id": 5375480, "names": { "en": "Mountain View" } }, "location": { "accuracy_radius": 1000, "average_income": null, "latitude": 37.386, "longitude": -122.0838, "metro_code": 807, "population_density": null, "time_zone": "America/Los_Angeles" }, "postal": { "code": "94035" }, "subdivisions": [ { "geoname_id": 5332921, "iso_code": "CA", "names": { "en": "California" } } ], }`),o.createElement("p",null,"For a complete documentation of the fields, please see MaxMind's ",o.createElement("a",{href:"http://maxmind.github.io/GeoIP2-java/",target:"_blank",rel:"noopener noreferrer"},"developer documentation")))}}const _=C;t.d.register(new t.b({},{lookupTableAdapters:[{type:"maxmind_geoip",displayName:"Geo IP - MaxMind\u2122 or IPinfo Databases",formComponent:p,summaryComponent:A,documentationComponent:_}]}));const I=({config:pe,handleFormEvent:Ae,validationState:$e,validationMessage:Xe})=>o.createElement("fieldset",null,o.createElement(g.Input,{type:"text",id:"path",name:"path",label:"File path",autoFocus:!0,required:!0,onChange:Ae,help:Xe("path","The path to the CSV file."),bsStyle:$e("path"),value:pe.path,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"number",id:"check_interval",name:"check_interval",label:"Check interval",required:!0,onChange:Ae,help:"The interval to check if the CSV file needs a reload. (in seconds)",value:pe.check_interval,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"separator",name:"separator",label:"Separator",required:!0,onChange:Ae,help:"The delimiter to use for separating entries.",value:pe.separator,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"quotechar",name:"quotechar",label:"Quote character",required:!0,onChange:Ae,help:"The character to use for quoted elements.",value:pe.quotechar,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"key_column",name:"key_column",label:"Key column",required:!0,onChange:Ae,help:"The column name that should be used for the key lookup.",value:pe.key_column,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"value_column",name:"value_column",label:"Value column",required:!0,onChange:Ae,help:"The column name that should be used as the value for a key.",value:pe.value_column,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"checkbox",id:"case_insensitive_lookup",name:"case_insensitive_lookup",label:"Allow case-insensitive lookups",checked:pe.case_insensitive_lookup,onChange:Ae,help:"Enable if the key lookup should be case-insensitive.",wrapperClassName:"col-md-offset-3 col-md-9"}),o.createElement(g.Input,{type:"checkbox",id:"cidr_lookup",name:"cidr_lookup",label:"CIDR lookup",checked:pe.cidr_lookup,onChange:Ae,help:"Enable if the keys in the lookup table are in CIDR notation and lookups will be done with IPs",wrapperClassName:"col-md-offset-3 col-md-9"})),O=({dataAdapter:pe})=>{const{config:Ae}=pe;return o.createElement("dl",null,o.createElement("dt",null,"File path"),o.createElement("dd",null,Ae.path),o.createElement("dt",null,"Separator"),o.createElement("dd",null,o.createElement("code",null,Ae.separator)),o.createElement("dt",null,"Quote character"),o.createElement("dd",null,o.createElement("code",null,Ae.quotechar)),o.createElement("dt",null,"Key column"),o.createElement("dd",null,Ae.key_column),o.createElement("dt",null,"Value column"),o.createElement("dd",null,Ae.value_column),o.createElement("dt",null,"Check interval"),o.createElement("dd",null,Ae.check_interval," seconds"),o.createElement("dt",null,"Case-insensitive lookup"),o.createElement("dd",null,Ae.case_insensitive_lookup?"yes":"no"),o.createElement("dt",null,"CIDR lookup"),o.createElement("dd",null,Ae.cidr_lookup?"yes":"no"))},W=()=>o.createElement("div",null,o.createElement("p",null,"The CSV data adapter can read key value pairs from a CSV file."),o.createElement("p",null,"Please make sure your CSV file is formatted according to your configuration settings."),o.createElement(g.Alert,{style:{marginBottom:10},bsStyle:"info",title:"CSV file requirements"},o.createElement("ul",{className:"no-padding"},o.createElement("li",null,"The first line in the CSV file needs to be a list of field/column names"),o.createElement("li",null,"The file uses ",o.createElement("strong",null,"utf-8")," encoding"),o.createElement("li",null,"The file is readable by ",o.createElement("strong",null,"every")," Graylog server node"))),o.createElement("hr",null),o.createElement("h3",{style:{marginBottom:10}},"Example 1"),o.createElement("h5",{style:{marginBottom:10}},"Configuration"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Separator: ",o.createElement("code",null,","),o.createElement("br",null),"Quote character: ",o.createElement("code",null,'"'),o.createElement("br",null),"Key column: ",o.createElement("code",null,"ipaddr"),o.createElement("br",null),"Value column: ",o.createElement("code",null,"hostname")),o.createElement("h5",{style:{marginBottom:10}},"CSV File"),o.createElement("pre",null,`"ipaddr","hostname" "127.0.0.1","localhost" "10.0.0.1","server1" "10.0.0.2","server2"`),o.createElement("h3",{style:{marginBottom:10}},"Example 2"),o.createElement("h5",{style:{marginBottom:10}},"Configuration"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Separator: ",o.createElement("code",null,";"),o.createElement("br",null),"Quote character: ",o.createElement("code",null,"'"),o.createElement("br",null),"Key column: ",o.createElement("code",null,"ipaddr"),o.createElement("br",null),"Value column: ",o.createElement("code",null,"hostname")),o.createElement("h5",{style:{marginBottom:10}},"CSV File"),o.createElement("pre",null,`'ipaddr';'lladdr';'hostname' '127.0.0.1';'e4:b2:11:d1:38:14';'localhost' '10.0.0.1';'e4:b2:12:d1:48:28';'server1' '10.0.0.2';'e4:b2:11:d1:58:34';'server2'`),o.createElement("h3",{style:{marginBottom:10}},"CIDR Lookups"),o.createElement("p",{style:{marginBottom:10,padding:0}},"If this data adapter will be used to lookup IP address keys against CIDR addresses",o.createElement("br",null),"then it should be marked as a CIDR lookup. For example:",o.createElement("br",null)),o.createElement("h5",{style:{marginBottom:10}},"Configuration"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Separator: ",o.createElement("code",null,","),o.createElement("br",null),"Quote character: ",o.createElement("code",null,'"'),o.createElement("br",null),"Key column: ",o.createElement("code",null,"cidr"),o.createElement("br",null),"Value column: ",o.createElement("code",null,"subnet"),o.createElement("br",null),"CIDR lookup: ",o.createElement("code",null,"true")),o.createElement("h5",{style:{marginBottom:10}},"CSV File"),o.createElement("pre",null,`"cidr","subnet" "192.168.100.0/24","Finance Department subnet" "192.168.101.0/24","IT Department subnet" "192.168.102.0/24","HR Department subnet"`),o.createElement("p",null,"Given this CSV file and configuration looking up the key 192.168.101.64 would return 'IT Department subnet'."));var K=Object.defineProperty,j=(pe,Ae,$e)=>Ae in pe?K(pe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:$e}):pe[Ae]=$e,G=(pe,Ae,$e)=>(j(pe,typeof Ae!="symbol"?Ae+"":Ae,$e),$e);class k extends o.Component{constructor(){super(...arguments),G(this,"_onLookupTypeSelect",Ae=>{const{config:$e,updateConfig:Xe}=this.props,St=c.A.clone($e);St.lookup_type=Ae,Xe(St)}),G(this,"updateCacheTTLOverride",(Ae,$e,Xe)=>{this._updateCacheTTLOverride(Ae,$e,Xe,"cache_ttl_override")}),G(this,"_updateCacheTTLOverride",(Ae,$e,Xe,St)=>{const{config:xt,updateConfig:Nt}=this.props,Ht=c.A.clone(xt);Xe&&Ae?(Ht[St]=Xe&&Ae?Ae:null,Ht[`${St}_enabled`]=Xe):(Ht[St]=null,Ht[`${St}_enabled`]=!1),Ht[`${St}_unit`]=Xe?$e:null,Nt(Ht)})}render(){const{config:Ae,handleFormEvent:$e,validationMessage:Xe,validationState:St}=this.props,xt=[{label:"Resolve hostname to IPv4 address (A)",value:"A"},{label:"Resolve hostname to IPv6 address (AAAA)",value:"AAAA"},{label:"Resolve hostname to IPv4 and IPv6 addresses (A and AAAA)",value:"A_AAAA"},{label:"Reverse lookup (PTR)",value:"PTR"},{label:"Text lookup (TXT)",value:"TXT"}];return o.createElement("fieldset",null,o.createElement(g.Input,{label:"DNS Lookup Type",id:"lookup-type",required:!0,autoFocus:!0,help:"Select the type of DNS lookup to perform.",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},o.createElement(d.l6,{placeholder:"Select the type of DNS lookup",clearable:!1,options:xt,matchProp:"label",onChange:this._onLookupTypeSelect,value:Ae.lookup_type})),o.createElement(g.Input,{type:"text",id:"server_ips",name:"server_ips",label:"DNS Server IP Address",onChange:$e,help:Xe("server_ips","An optional comma-separated list of DNS server IP addresses."),bsStyle:St("server_ips"),value:Ae.server_ips,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"number",id:"request_timeout",name:"request_timeout",label:"DNS Request Timeout",required:!0,onChange:$e,help:Xe("request_timeout","DNS request timeout in milliseconds."),bsStyle:St("request_timeout"),value:Ae.request_timeout,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(d.gM,{label:"Cache TTL Override",help:"If enabled, the cache TTL will be overridden with the specified value.",update:this.updateCacheTTLOverride,value:Ae.cache_ttl_override,unit:Ae.cache_ttl_override_unit||"MINUTES",units:["MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS"],enabled:Ae.cache_ttl_override_enabled,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}))}}G(k,"propTypes",{config:s().shape({request_timeout:s().number.isRequired,server_ips:s().string}).isRequired,updateConfig:s().func.isRequired,handleFormEvent:s().func.isRequired,validationMessage:s().func.isRequired,validationState:s().func.isRequired});const Q=k,ne=({dataAdapter:pe})=>{const{config:Ae}=pe,$e={A:"Resolve hostname to IPv4 address (A)",AAAA:"Resolve hostname to IPv6 address (AAAA)",A_AAAA:"Resolve hostname to IPv4 and IPv6 address (A and AAAA)",PTR:"Reverse lookup (PTR)",TXT:"Text lookup (TXT)"};return o.createElement("dl",null,o.createElement("dt",null,"DNS Lookup Type"),o.createElement("dd",null,$e[Ae.lookup_type]),o.createElement("dt",null,"DNS Server IP Address"),o.createElement("dd",null,Ae.server_ips||"n/a"),o.createElement("dt",null,"DNS Request Timeout"),o.createElement("dd",null,Ae.request_timeout," ms"),o.createElement("dt",null,"Cache TTL Override"),o.createElement("dd",null,Ae.cache_ttl_override_enabled?o.createElement(d.f6,{value:Ae.cache_ttl_override,unit:Ae.cache_ttl_override_unit}):"n/a"))};ne.propTypes={dataAdapter:s().shape({config:s().shape({lookup_type:s().string.isRequired,request_timeout:s().number.isRequired})}).isRequired};const z=ne;var le=e("J6y4/h8P");const V=le.default.pre(({theme:pe})=>(0,le.css)` font-size: ${pe.fonts.size.small}; `),Pe=()=>{const pe={marginBottom:10};return o.createElement("div",null,o.createElement("h3",{style:pe},"Configuration"),o.createElement("h5",{style:pe},"DNS Lookup Type"),o.createElement("p",{style:pe},o.createElement("strong",null,"Resolve hostname to IPv4 address (A)"),": Returns both a ",o.createElement("code",null,"single_value")," containing one of the IPv4 addresses that the hostname resolves to, and a ",o.createElement("code",null,"multi_value")," containing all IPv4 addresses that the hostname resolves to. Input for this type must be a pure domain name (eg. ",o.createElement("code",null,"api.graylog.com"),")."),o.createElement(V,null,`{ "single_value": "34.239.63.98", "multi_value": { "results": [ { "ip_address": "34.239.63.98", "dns_ttl": 60 }, { "ip_address": "34.238.48.57", "dns_ttl": 60 } ] }, "ttl": 60000 }`),o.createElement("p",{style:pe},o.createElement("strong",null,"Resolve hostname to IPv6 address (AAAA)"),": Returns both a ",o.createElement("code",null,"single_value")," containing one of the IPv6 addresses that the hostname resolves to, and a ",o.createElement("code",null,"multi_value")," containing all IPv6 addresses that the hostname resolves to. Input for this type must be a pure domain name (eg. ",o.createElement("code",null,"api.graylog.com"),")."),o.createElement(V,null,`{ "single_value": "2307:f8b0:3000:800:0:0:0:200e", "multi_value": { "results": [ { "ip_address": "2307:f8b0:3000:800:0:0:0:200e", "dns_ttl": 77 } ] }, "ttl": 77000 }`),o.createElement("p",{style:pe},o.createElement("strong",null,"Resolve hostname to IPv4 and IPv6 address (A and AAAA)"),": Returns both a ",o.createElement("code",null,"single_value")," containing one of the IPv4 or IPv6 addresses that the hostname resolves to (will return IPv4 if available), and a ",o.createElement("code",null,"multi_value")," containing all IPv4 and IPv6 addresses that the hostname resolves to. Input for this type must be a pure domain name (eg. ",o.createElement("code",null,"api.graylog.com"),")."),o.createElement(V,null,`{ "single_value": "144.222.6.132", "multi_value": { "results": [ { "ip_address": "144.222.6.132", "dns_ttl": 32, "ip_version": "IPv4" }, { "ip_address": "1207:f8b1:6003:b01:0:0:0:8a", "dns_ttl": 299, "ip_version": "IPv6" } ] }, "ttl": 32000 }`),o.createElement("p",{style:pe},o.createElement("strong",null,"Reverse lookup (PTR)"),": Returns a ",o.createElement("code",null,"single_value")," containing the PTR value if defined for the IP address. The ",o.createElement("code",null,"domain")," field displays the domain name (with no subdomains). The ",o.createElement("code",null,"full_domain")," field displays the full un-trimmed host name/PTR value. The input for this type must be a pure IPv4 or IPv6 address (eg. ",o.createElement("code",null,"10.0.0.1")," or ",o.createElement("code",null,"2622:f3b0:4000:812::200c"),")."),o.createElement(V,null,`{ "single_value": "c-45-216-65-41.hd1.fl.someisp.co.uk", "multi_value": { "domain": "someisp.co.uk", "full_domain": "c-45-216-65-41.hd1.fl.someisp.co.uk", "dns_ttl": "300", }, "ttl": 300000 }`),o.createElement("p",{style:pe},o.createElement("strong",null,"Text lookup (TXT)"),": Returns a ",o.createElement("code",null,"multi_value")," with all TXT records defined for the hostname. Input for this type must be a pure domain name (eg. ",o.createElement("code",null,"api.graylog.com"),")."),o.createElement(V,null,`{ "single_value": null, "multi_value": { "results": [ { "value": "Some text value that lives in a TXT DNS", "dns_ttl": 300 }, { "value": "v=spf1 include:some-email-domain.org ~all.", "dns_ttl": 200 } ] }, "ttl": 200000 }`),o.createElement("h5",{style:pe},"DNS Server IP Addresses"),o.createElement("p",{style:pe},"A comma-separated list of DNS server IP addresses and optional ports to use (eg. ",o.createElement("code",null,"192.168.1.1:5353, 192.168.1.244"),"). Leave this blank to use the DNS server defined for your local system. All requests use port 53 unless otherwise specified."),o.createElement("h5",{style:pe},"DNS Request Timeout"),o.createElement("p",{style:pe},"The DNS request timeout in milliseconds."),o.createElement("h5",{style:pe},"Cache TTL Override"),o.createElement("p",{style:pe},"If enabled, the TTL for this adapter's cache will be overridden with the specified value."))},Ve=({handleFormEvent:pe,validationState:Ae,validationMessage:$e,config:Xe})=>o.createElement("fieldset",null,o.createElement(d.Ns,{label:"File URL",onChange:pe,validationMessage:$e("url","The URL of the DSV file."),validationState:Ae("url"),url:Xe.url,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"number",id:"refresh_interval",name:"refresh_interval",label:"Refresh interval",required:!0,onChange:pe,help:"The interval to check if the DSV file needs a reload. (in seconds)",value:Xe.refresh_interval,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"separator",name:"separator",label:"Separator",required:!0,onChange:pe,help:"The delimiter to use for separating columns of entries.",value:Xe.separator,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"line_separator",name:"line_separator",label:"Line Separator",required:!0,onChange:pe,help:"The delimiter to use for separating lines.",value:Xe.line_separator,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"quotechar",name:"quotechar",label:"Quote character",required:!0,onChange:pe,help:"The character to use for quoted elements.",value:Xe.quotechar,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"ignorechar",name:"ignorechar",label:"Ignore characters",required:!0,onChange:pe,help:"Ignore lines starting with these characters.",value:Xe.ignorechar,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"key_column",name:"key_column",label:"Key column",required:!0,onChange:pe,help:"The column number that should be used for the key lookup.",value:Xe.key_column,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"value_column",name:"value_column",label:"Value column",required:!0,onChange:pe,help:"The column number that should be used as the value for a key.",value:Xe.value_column,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"checkbox",id:"case_insensitive_lookup",name:"case_insensitive_lookup",label:"Allow case-insensitive lookups",checked:Xe.case_insensitive_lookup,onChange:pe,help:"Enable if the key lookup should be case-insensitive.",wrapperClassName:"col-md-offset-3 col-md-9"}),o.createElement(g.Input,{type:"checkbox",id:"check_presence_only",name:"check_presence_only",label:"Check Presence Only",checked:Xe.check_presence_only,onChange:pe,help:"Only check if key is present in table, returns boolean instead of value.",wrapperClassName:"col-md-offset-3 col-md-9"}));Ve.propTypes={config:s().object.isRequired,handleFormEvent:s().func.isRequired,validationState:s().func.isRequired,validationMessage:s().func.isRequired};const at=Ve,he=({dataAdapter:pe})=>{const{config:Ae}=pe;return o.createElement("dl",null,o.createElement("dt",null,"File URL"),o.createElement("dd",null,Ae.url),o.createElement("dt",null,"Separator"),o.createElement("dd",null,o.createElement("code",null,Ae.separator)),o.createElement("dt",null,"Line Separator"),o.createElement("dd",null,o.createElement("code",null,Ae.line_separator)),o.createElement("dt",null,"Quote character"),o.createElement("dd",null,o.createElement("code",null,Ae.quotechar)),o.createElement("dt",null,"Ignore lines starting with"),o.createElement("dd",null,o.createElement("code",null,Ae.ignorechar)),o.createElement("dt",null,"Key column"),o.createElement("dd",null,Ae.key_column),o.createElement("dt",null,"Value column"),o.createElement("dd",null,Ae.value_column),o.createElement("dt",null,"Check interval"),o.createElement("dd",null,Ae.check_interval," seconds"),o.createElement("dt",null,"Case-insensitive lookup"),o.createElement("dd",null,Ae.case_insensitive_lookup?"yes":"no"))},Re=()=>o.createElement("div",null,o.createElement("p",null,"The DSV data adapter can read key value pairs (or check for the presence of a key) from a DSV file."),o.createElement("p",null,"Please make sure your DSV file is formatted according to your configuration settings."),o.createElement(g.Alert,{style:{marginBottom:10},bsStyle:"info",title:"CSV file requirements"},o.createElement("ul",{className:"no-padding"},o.createElement("li",null,"The file uses ",o.createElement("strong",null,"utf-8")," encoding"),o.createElement("li",null,"The file is accessible using the same URL by ",o.createElement("strong",null,"every")," Graylog server node"))),o.createElement("hr",null),o.createElement("h3",{style:{marginBottom:10}},"Example 1"),o.createElement("h5",{style:{marginBottom:10}},"Configuration"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Separator: ",o.createElement("code",null,","),o.createElement("br",null),"Quote character: ",o.createElement("code",null,'"'),o.createElement("br",null)),o.createElement("h5",{style:{marginBottom:10}},"DSV File"),o.createElement("pre",null,`"127.0.0.1","localhost" "10.0.0.1","server1" "10.0.0.2","server2"`),o.createElement("h3",{style:{marginBottom:10}},"Example 2"),o.createElement("h5",{style:{marginBottom:10}},"Configuration"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Separator: ",o.createElement("code",null,";"),o.createElement("br",null),"Quote character: ",o.createElement("code",null,"'"),o.createElement("br",null)),o.createElement("h5",{style:{marginBottom:10}},"DSV File"),o.createElement("pre",null,`'127.0.0.1';'e4:b2:11:d1:38:14' '10.0.0.1';'e4:b2:12:d1:48:28' '10.0.0.2';'e4:b2:11:d1:58:34'`));class ce extends o.Component{constructor(){super(...arguments),this.onHTTPHeaderUpdate=Ae=>{const{config:$e,updateConfig:Xe}=this.props,St=c.A.clone($e);St.headers=Ae,Xe(St)}}render(){const{config:Ae,handleFormEvent:$e,validationMessage:Xe,validationState:St}=this.props;return o.createElement("fieldset",null,o.createElement(d.Ns,{label:"Lookup URL",onChange:$e,validationMessage:Xe("url","The URL for the lookup. (this is a template - see documentation)"),validationState:St("url"),url:Ae.url,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",urlType:"regex"}),o.createElement(g.Input,{type:"text",id:"single_value_jsonpath",name:"single_value_jsonpath",label:"Single value JSONPath",required:!0,onChange:$e,help:Xe("single_value_jsonpath","The JSONPath string to get the single value from the response."),bsStyle:St("single_value_jsonpath"),value:Ae.single_value_jsonpath,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"multi_value_jsonpath",name:"multi_value_jsonpath",label:"Multi value JSONPath",onChange:$e,help:Xe("multi_value_jsonpath","The JSONPath string to get the multi value from the response. Needs to return a list or map. (optional)"),bsStyle:St("multi_value_jsonpath"),value:Ae.multi_value_jsonpath,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"user_agent",name:"user_agent",label:"HTTP User-Agent",required:!0,onChange:$e,help:"The User-Agent header to use for the HTTP request.",value:Ae.user_agent,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{id:"http_headers",label:"HTTP Headers",help:"The custom HTTP headers to use for the HTTP request. Multiple values must be comma-separated.",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},o.createElement(d.tF,{pairs:Ae.headers||{},editable:!0,onChange:this.onHTTPHeaderUpdate})))}}ce.propTypes={config:s().object.isRequired,updateConfig:s().func.isRequired,handleFormEvent:s().func.isRequired,validationState:s().func.isRequired,validationMessage:s().func.isRequired};const Ee=ce,oe=({dataAdapter:pe})=>{const{config:Ae}=pe;return o.createElement("dl",null,o.createElement("dt",null,"Lookup URL"),o.createElement("dd",null,Ae.url),o.createElement("dt",null,"Single value JSONPath"),o.createElement("dd",null,o.createElement("code",null,Ae.single_value_jsonpath)),o.createElement("dt",null,"Multi value JSONPath"),o.createElement("dd",null,o.createElement("code",null,Ae.multi_value_jsonpath)),o.createElement("dt",null,"HTTP User-Agent"),o.createElement("dd",null,Ae.user_agent),o.createElement("dt",null,"HTTP Headers"),o.createElement("dd",null,o.createElement(d.tF,{pairs:Ae.headers||{}})))};oe.propTypes={dataAdapter:s().object.isRequired};const ae=oe,Oe=()=>o.createElement("div",null,o.createElement("p",null,"The HTTPJSONPath data adapter executes ",o.createElement("em",null,"HTTP GET")," requests to lookup a key and parses the result based on configured JSONPath expressions."),o.createElement(g.Alert,{style:{marginBottom:10},bsStyle:"info"},"Every lookup table result has two values. A ",o.createElement("em",null,"single value")," and a ",o.createElement("em",null,"multi value"),". The single value will be used when the lookup result is expected to be a string, number or boolean. The multi value will be used when the lookup result is expected to be a map or list."),o.createElement("h3",{style:{marginBottom:10}},"Configuration"),o.createElement("h5",{style:{marginBottom:10}},"Lookup URL"),o.createElement("p",{style:{marginBottom:10,padding:0}},"The URL that will be used for the HTTP request. To use the ",o.createElement("em",null,"lookup key")," in the URL, the",o.createElement("code",null,"${key}"),"value can be used. This variable will be replaced by the actual key that is passed to a lookup function. ",o.createElement("br",null),"(example: ",o.createElement("code",null,"https://example.com/api/lookup?key=${key}"),")"),o.createElement("h5",{style:{marginBottom:10}},"Single value JSONPath"),o.createElement("p",{style:{marginBottom:10,padding:0}},"This JSONPath expression will be used to parse the ",o.createElement("em",null,"single value")," of the lookup result. (example: ",o.createElement("code",null,"$.user.full_name"),")"),o.createElement("h5",{style:{marginBottom:10}},"Multi value JSONPath"),o.createElement("p",{style:{marginBottom:10,padding:0}},"This JSONPath expression will be used to parse the ",o.createElement("em",null,"multi value")," of the lookup result. (example: ",o.createElement("code",null,"$.users[*]"),") The multi value JSONPath setting is ",o.createElement("em",null,"optional"),". Without it, the single value is also present in the multi value result."),o.createElement("h5",{style:{marginBottom:10}},"HTTP User-Agent"),o.createElement("p",{style:{marginBottom:10,padding:0}},"This is the ",o.createElement("em",null,"User-Agent")," header that will be used for the HTTP requests. You should include some contact details so owners of the services you query know whom to contact if issues arise. (like excessive API requests from your Graylog cluster)"),o.createElement("hr",null),o.createElement("h3",{style:{marginBottom:10}},"Example"),o.createElement("p",null,"This shows an example configuration and the values that will be returned from a lookup.",o.createElement("br",null),"The configured URL is ",o.createElement("strong",null,"https://example.com/api/users/${key}")," and the ",o.createElement("code",null,"${key}"),"gets replaced by ",o.createElement("strong",null,"jane")," during the lookup request."),o.createElement("p",null,"This is the resulting JSON document:"),o.createElement("pre",null,`{ "user": { "login": "jane", "full_name": "Jane Doe", "roles": ["admin", "developer"], "contact": { "email": "[email protected]", "cellphone": "+49123456789" } } }`),o.createElement(g.Row,null,o.createElement(g.Col,{md:4},o.createElement("h5",{style:{marginBottom:10}},"Configuration"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Single value JSONPath: ",o.createElement("code",null,"$.user.full_name"),o.createElement("br",null),"Multi value JSONPath: ",o.createElement("em",null,"empty"),o.createElement("br",null))),o.createElement(g.Col,{md:8},o.createElement("h5",{style:{marginBottom:10}},"Result"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Single value: ",o.createElement("code",null,"Jane Doe"),o.createElement("br",null),"Multi value:"),o.createElement("pre",null,'{"value": "Jane Doe"}'))),o.createElement(g.Row,null,o.createElement(g.Col,{md:4},o.createElement("h5",{style:{marginBottom:10}},"Configuration"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Single value JSONPath: ",o.createElement("code",null,"$.user.full_name"),o.createElement("br",null),"Multi value JSONPath: ",o.createElement("code",null,"$.user"),o.createElement("br",null))),o.createElement(g.Col,{md:8},o.createElement("h5",{style:{marginBottom:10}},"Result"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Single value: ",o.createElement("code",null,"Jane Doe"),o.createElement("br",null),"Multi value:"),o.createElement("pre",null,`{ "login": "jane", "full_name": "Jane Doe", "roles": ["admin", "developer"], "contact": { "email": "[email protected]", "cellphone": "+49123456789" } }`))),o.createElement(g.Row,null,o.createElement(g.Col,{md:4},o.createElement("h5",{style:{marginBottom:10}},"Configuration"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Single value JSONPath: ",o.createElement("code",null,"$.user.contact.email"),o.createElement("br",null),"Multi value JSONPath: ",o.createElement("code",null,"$.user.roles[*]"),o.createElement("br",null))),o.createElement(g.Col,{md:8},o.createElement("h5",{style:{marginBottom:10}},"Result"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Single value: ",o.createElement("code",null,"[email protected]"),o.createElement("br",null),"Multi value:"),o.createElement("pre",null,`{ "value": ["admin", "developer"] }`))),o.createElement(g.Row,null,o.createElement(g.Col,{md:4},o.createElement("h5",{style:{marginBottom:10}},"Configuration"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Single value JSONPath: ",o.createElement("code",null,"$.user.full_name"),o.createElement("br",null),"Multi value JSONPath: ",o.createElement("code",null,"$.user.contact"),o.createElement("br",null))),o.createElement(g.Col,{md:8},o.createElement("h5",{style:{marginBottom:10}},"Result"),o.createElement("p",{style:{marginBottom:10,padding:0}},"Single value: ",o.createElement("code",null,"Jane Doe"),o.createElement("br",null),"Multi value:"),o.createElement("pre",null,`{ "email": "[email protected]", "cellphone": "+49123456789" }`))),o.createElement("h5",{style:{marginBottom:10}},"Pipeline Rule"),o.createElement("p",null,"This is an example pipeline rule that uses the example data from our last configuration example."),o.createElement("pre",null,`rule "lookup user" when has_field("user_login") then // Get the user login from the message let userLogin = to_string($message.user_login); // Lookup the single value, in our case the full name, in the user-api lookup table let userName = lookup_value("user-api", userLogin); // Set the field "user_name" in the message set_field("user_name", userName) // Lookup the multi value in the user-api lookup table let userData = lookup("user-api", userLogin); // Set the email and cellphone as fields in the message set_field("user_email", userData["email"]); set_field("user_cellphone", userData["cellphone"]); end`));t.d.register(new t.b({},{lookupTableAdapters:[{type:"csvfile",displayName:"CSV File",formComponent:I,summaryComponent:O,documentationComponent:W},{type:"dnslookup",displayName:"DNS Lookup",formComponent:Q,summaryComponent:z,documentationComponent:Pe},{type:"dsvhttp",displayName:"DSV File from HTTP",formComponent:at,summaryComponent:he,documentationComponent:Re},{type:"httpjsonpath",displayName:"HTTP JSONPath",formComponent:Ee,summaryComponent:ae,documentationComponent:Oe}]}));const ve=()=>null,_e=o.forwardRef(ve),je=()=>o.createElement("p",null,"This cache has no configuration.");var Qe=e("UiXZqrDE"),zt=e("S6FuRS7B");const xe=({config:pe},Ae)=>{var $e;const{values:Xe,setValues:St,errors:xt}=(0,Qe.useFormikContext)(),[Nt,Ht]=o.useState({...pe});o.useEffect(()=>Ht({...pe}),[pe]);const Zt=()=>{const ue={};return Xe.config.max_size||(ue.max_size="Required"),Xe.config.max_size<0&&(ue.max_size="Must be 0 or a positive number"),ue};o.useImperativeHandle(Ae,()=>({validate:()=>Zt()}));const Kn=ue=>{const Te=(0,zt.yG)(ue.target),Ge={...Xe.config,ignore_null:Te};Ht(Ge),St({...Xe,config:Ge})},Un=ue=>(Te,Ge,mt)=>{const Dt={...Nt},Jt={...Xe.config};Dt[ue]=mt?Te:0,Dt[`${ue}_unit`]=Ge,Jt[ue]=mt?Te:0,Jt[`${ue}_unit`]=Ge,Ht(Dt),St({...Xe,config:Jt})};return o.createElement("fieldset",{ref:Ae},o.createElement(d.o$,{type:"text",name:"config.max_size",label:"* Maximum entries",required:!0,help:($e=xt.config)!=null&&$e.max_size?null:"The limit of the number of entries the cache keeps in memory.",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(d.gM,{label:"Expire after access",help:"If enabled, entries are removed from the cache after the specified time from when they were last used.",update:Un("expire_after_access"),name:"config.expire_after_access",unitName:"config.expire_after_access_unit",value:Nt.expire_after_access,unit:Nt.expire_after_access_unit||"SECONDS",defaultEnabled:pe.expire_after_access>0,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(d.gM,{label:"Expire after write",help:"If enabled, entries are removed from the cache after the specified time from when they were first used.",update:Un("expire_after_write"),name:"config.expire_after_write",unitName:"config.expire_after_write_unit",value:Nt.expire_after_write,unit:Nt.expire_after_write_unit||"SECONDS",defaultEnabled:pe.expire_after_write>0,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"checkbox",id:"ignore_null",name:"ignore_null",label:"Ignore empty results",checked:Nt.ignore_null,onChange:Kn,help:"When enabled, empty lookup results will be ignored and not cached.",wrapperClassName:"col-md-offset-3 col-md-9"}),o.createElement(d.gM,{label:"TTL for empty results",help:"Empty results are removed from the cache after the specified time.",update:Un("ttl_empty"),name:"config.ttl_empty",unitName:"config.ttl_empty_unit",value:Nt.ttl_empty,unit:Nt.ttl_empty_unit||"SECONDS",enabled:!Nt.ignore_null,hideCheckbox:!0,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}))},Ue=o.forwardRef(xe),ke=le.default.div` display: inline-block; margin: 16px 0; `,Se=le.default.div` display: flex; flex-direction: row; align-items: center; justify-content: flex-start; `,Je=le.default.span` font-weight: bold; min-width: 180px; `,nt=le.default.span` padding: 6px 10px; width: 100%; min-width: 130px; `,Le=({cache:pe})=>o.createElement(ke,null,o.createElement(Se,null,o.createElement(Je,null,"Maximum entries:"),o.createElement(nt,{style:{borderBottom:"1px solid #eee"}},pe.config.max_size)),o.createElement(Se,null,o.createElement(Je,null,"Expire after access:"),o.createElement(nt,{style:{borderBottom:"1px solid #eee"}},o.createElement(d.f6,{value:pe.config.expire_after_access,unit:pe.config.expire_after_access_unit}))),o.createElement(Se,null,o.createElement(Je,null,"Expire after write:"),o.createElement(nt,null,o.createElement(d.f6,{value:pe.config.expire_after_write,unit:pe.config.expire_after_write_unit}))),o.createElement(Se,null,o.createElement(Je,null,"TTL for empty results:"),o.createElement(nt,null,o.createElement(d.f6,{value:pe.config.ttl_empty||0,unit:pe.config.ttl_empty_unit||"SECONDS"})))),qe=()=>o.createElement("div",null,o.createElement("p",null,"The in-memory cache maintains recently used values from data adapters."),o.createElement("p",null,"Please make sure your Graylog servers have enough heap to accomodate the cached entries and monitor the cache efficiency."),o.createElement(g.Alert,{style:{marginBottom:10},bsStyle:"info",title:"Implementation details"},o.createElement("p",null,"The cache is local to each Graylog server, they do not share the entries."),o.createElement("p",null,"For example, if you have two servers, they will maintain a completely independent cache from each other.")),o.createElement("hr",null),o.createElement("h3",{style:{marginBottom:10}},"Cache size"),o.createElement("p",null,"Every cache has a maximum number of entries, unbounded caches are not supported."),o.createElement("h3",{style:{marginBottom:10}},"Time-based expiration"),o.createElement("h5",{style:{marginBottom:10}},"Expire after access"),o.createElement("p",{style:{marginBottom:10,padding:0}},"The cache will remove entries after a fixed time since they have been used the last time.",o.createElement("br",null),"This results in the cache behaving as a space limited least recently used cache."),o.createElement("h5",{style:{marginBottom:10}},"Expire after write"),o.createElement("p",{style:{marginBottom:10,padding:0}},"The cache will remove entries after a fixed time since they have been entered into the cache.",o.createElement("br",null),"This results in entries that are never older than the given time, which can be important for regularly changing data, such as configuration state of external systems."));t.d.register(new t.b({},{lookupTableCaches:[{type:"none",displayName:"Do not cache values",formComponent:_e,summaryComponent:je,documentationComponent:null},{type:"guava_cache",displayName:"Node-local, in-memory cache",formComponent:Ue,summaryComponent:Le,documentationComponent:qe}]}));var ut=e("ty2gyrHp"),ft=e("d4kzUuQm"),Ot=e("xPjmrmtt"),Lt=e("leXY1Rul"),an=e("/7OuCFNo"),Ft=e("8OvTct/Z"),rn=e("v4GbOr/o");const $t=(0,le.default)(g.ButtonToolbar)` display: flex; flex-direction: row; align-items: center; justify-content: flex-start; `,be=({table:pe,cache:Ae,dataAdapter:$e,errors:Xe})=>{const St=(0,an.A)(),xt=(0,Ft.A)(),{loadingScopePermissions:Nt,scopePermissions:Ht}=(0,Lt.A)(pe),Zt=o.useCallback(()=>{xt(rn.g.LUT.DELETED,{app_pathname:"lut",app_section:"lut"}),window.confirm(`Are you sure you want to delete lookup table "${pe.title}"?`)&&Ot.B.delete(pe.id).then(()=>{Ot.B.reloadPage()})},[pe.id,pe.title,xt]),Kn=o.useCallback(()=>{St.push(ft.Ay.SYSTEM.LOOKUPTABLES.edit(pe.name))},[St,pe.name]);return o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",null,Xe.table&&o.createElement(ks,{placement:"right",errorText:Xe.table,title:"Lookup Table problem"}),o.createElement(ut.N,{to:ft.Ay.SYSTEM.LOOKUPTABLES.show(pe.name)},pe.title)),o.createElement("td",null,pe.description),o.createElement("td",null,pe.name),o.createElement("td",null,Xe.cache&&o.createElement(ks,{placement:"bottom",errorText:Xe.cache,title:"Cache problem"}),o.createElement(ut.N,{to:ft.Ay.SYSTEM.LOOKUPTABLES.CACHES.show(Ae.name)},Ae.title)),o.createElement("td",null,Xe.dataAdapter&&o.createElement(ks,{placement:"bottom",errorText:Xe.dataAdapter,title:"Data adapter problem"}),o.createElement(ut.N,{to:ft.Ay.SYSTEM.LOOKUPTABLES.DATA_ADAPTERS.show($e.name)},$e.title)),o.createElement("td",null,Nt?o.createElement(d.y$,null):Ht.is_mutable&&o.createElement($t,null,o.createElement(g.Button,{bsSize:"xsmall",onClick:Kn,role:"button",name:"edit_square"},"Edit"),o.createElement(g.Button,{bsSize:"xsmall",bsStyle:"danger",onClick:Zt,role:"button",name:"delete"},"Delete")))))};be.defaultProps={errors:{table:null,cache:null,dataAdapter:null}};const yn=be;var Kt=e("XyJ0Mvpg"),An=e("rlwexfKi"),qt=e("dFpwyWHg"),io=e.n(qt),Be=e("C2ikvoS0"),bn=e.n(Be),gn=e("1IntWRSu"),wn=e.n(gn),Zn=e("8nGWeFnd"),Vn=e.n(Zn),po=e("TeAcaicX"),De=e.n(po),ln=e("eE3+5goe"),bt=e.n(ln),It=e("eCBhU9Q5"),En={};En.styleTagTransform=bt(),En.setAttributes=Vn(),En.insert=wn().bind(null,"head"),En.domAPI=bn(),En.insertStyleElement=De();var Xt=io()(It.A,En);const Ye=It.A&&It.A.locals?It.A.locals:void 0,At=le.default.div` overflow-x: auto; `,Ct=o.createElement("p",null,"Searching without a field name matches against the ",o.createElement("code",null,"title")," field:",o.createElement("br",null),o.createElement("kbd",null,"geoip")," ",o.createElement("br",null),"is the same as",o.createElement("br",null),o.createElement("kbd",null,"title:geoip")),Bt=o.createElement(An.A,{entityName:"lookup table",commonFields:["id","title","name","description"],example:Ct}),Ze=({table:pe,caches:Ae,dataAdapters:$e,errorStates:Xe})=>{const St=(Kn,Un)=>{const ue={title:"none"};return Un&&Un[Kn]||ue},xt=()=>{if(Xe.dataAdapters&&$e){const Kn=$e[pe.data_adapter_id];return Kn?Xe.dataAdapters[Kn.name]:null}return null},Nt=St(pe.cache_id,Ae),Ht=St(pe.data_adapter_id,$e),Zt={table:Xe.tables[pe.name],cache:null,dataAdapter:xt()};return o.createElement(yn,{table:pe,cache:Nt,dataAdapter:Ht,errors:Zt})},gt=({query:pe})=>o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{colSpan:6},pe?o.createElement(d.EO,null,'No tables found with title "',pe,'"'):o.createElement(d.WE,null,"There are no data adapters to list")))),cn=({tables:pe,caches:Ae,dataAdapters:$e,query:Xe,errorStates:St})=>pe.length>0?o.createElement(o.Fragment,null,pe.map(xt=>o.createElement(Ze,{key:`table-item-${xt.id}`,table:xt,caches:Ae,dataAdapters:$e,errorStates:St}))):o.createElement(gt,{query:Xe}),un=({tables:pe,caches:Ae,dataAdapters:$e,pagination:Xe,errorStates:St,paginationQueryParameter:xt})=>{const[Nt,Ht]=o.useState(!1),[Zt,Kn]=o.useState({currentPage:xt.page||1,currentPageSize:xt.pageSize||10,currentQuery:Xe.query?decodeURI(Xe.query):"",resetPage:xt.resetPage,setPagination:xt.setPagination});o.useEffect(()=>{const{currentPage:Ge,currentPageSize:mt,currentQuery:Dt}=Zt;Ot.B.searchPaginated(Ge,mt,Dt).then(()=>Ht(!1))},[Zt]);const Un=o.useCallback((Ge,mt)=>{Kn({...Zt,currentPage:Ge,currentPageSize:mt})},[Zt]),ue=o.useCallback(Ge=>{Zt.resetPage(),Zt.setPagination({page:1,pageSize:Zt.currentPageSize}),Kn({...Zt,currentPage:1,currentQuery:Ge})},[Zt]),Te=o.useCallback(()=>{Zt.resetPage(),Zt.setPagination({page:1,pageSize:Zt.currentPageSize}),Kn({...Zt,currentPage:1,currentQuery:""})},[Zt]);return o.createElement(g.Row,{className:"content"},o.createElement(g.Col,{md:12},o.createElement("h2",{style:{marginBottom:16}},"Configured lookup tables ",o.createElement("small",null,Xe.total," total")),o.createElement(d.OW,{activePage:Zt.currentPage,pageSize:Zt.currentPageSize,onChange:Un,totalItems:Xe.total},o.createElement(d.B9,{onSearch:ue,onReset:Te,queryHelpComponent:Bt}),o.createElement(At,null,o.createElement(g.Table,{condensed:!0,hover:!0,className:Ye.overviewTable},o.createElement("thead",null,o.createElement("tr",null,o.createElement("th",{className:Ye.rowTitle},"Title"),o.createElement("th",{className:Ye.rowDescription},"Description"),o.createElement("th",{className:Ye.rowName},"Name"),o.createElement("th",{className:Ye.rowCache},"Cache"),o.createElement("th",{className:Ye.rowAdapter},"Data Adapter"),o.createElement("th",{className:Ye.rowActions},"Actions"))),Nt?o.createElement(d.y$,{text:"Loading data adapters"}):o.createElement(cn,{tables:pe,caches:Ae,dataAdapters:$e,query:Zt.currentQuery,errorStates:St}))))))},_n=(0,Kt.A)(un);var vn=e("yAXMqwrl");const Ln={value:"",valid:!1},no=({table:pe,cache:Ae,dataAdapter:$e})=>{const Xe=(0,vn.useNavigate)(),{loadingScopePermissions:St,scopePermissions:xt}=(0,Lt.A)(pe),[Nt,Ht]=o.useState(Ln),[Zt,Kn]=o.useState(Ln),[Un,ue]=o.useState(null),Te=mn=>()=>{Xe(ft.Ay.SYSTEM.LOOKUPTABLES.edit(mn))},Ge=mn=>{const oo=mn.target.name==="purgekey"?{...Nt}:{...Zt};switch(oo.valid=mn.target.value&&mn.target.value.replace(/\s/g,"").length>0,oo.value=mn.target.value,mn.target.name){case"purgekey":Ht(oo);break;case"lookupkey":Kn(oo),ue(null);break;default:break}},mt=mn=>{mn.preventDefault(),Nt.valid&&Ot.B.purgeKey(pe,Nt.value).then(()=>{Ht(Ln)})},Dt=mn=>{mn.preventDefault(),Ot.B.purgeAll(pe)},Jt=mn=>{mn.preventDefault(),Zt.valid&&Ot.B.lookup(pe.name,Zt.value).then(oo=>{ue(JSON.stringify(oo,null,2)),Kn(Ln)})};return o.createElement(g.Row,{className:"content"},o.createElement(g.Col,{md:6},o.createElement("h2",null,pe.title),o.createElement("p",null,pe.description),o.createElement("dl",null,o.createElement("dt",null,"Data adapter"),o.createElement("dd",null,o.createElement(ut.N,{to:ft.Ay.SYSTEM.LOOKUPTABLES.DATA_ADAPTERS.show($e.name)},$e.title)),o.createElement("dt",null,"Cache"),o.createElement("dd",null,o.createElement(ut.N,{to:ft.Ay.SYSTEM.LOOKUPTABLES.CACHES.show(Ae.name)},Ae.title))),!St&&(xt==null?void 0:xt.is_mutable)&&o.createElement(g.Button,{bsStyle:"success",onClick:Te(pe.name),role:"button",name:"edit_square"},"Edit"),(pe.default_single_value||pe.default_multi_value)&&o.createElement("dl",null,o.createElement("dt",null,"Default single value"),o.createElement("dd",null,o.createElement("code",null,pe.default_single_value)," ","(",pe.default_single_value_type.toLowerCase(),")"),o.createElement("dt",null,"Default multi value"),o.createElement("dd",null,o.createElement("code",null,pe.default_multi_value)," ","(",pe.default_multi_value_type.toLowerCase(),")")),o.createElement("hr",null),o.createElement("h2",null,"Purge Cache"),o.createElement("p",null,"You can purge the complete cache for this lookup table or only the cache entry for a single key."),o.createElement("form",{onSubmit:mt},o.createElement("fieldset",null,o.createElement(g.Input,{type:"text",id:"purge-key",name:"purgekey",placeholder:"Insert key which should be purged",label:"Key",onChange:Ge,help:"Key to purge from cache",required:!0,value:Nt.value}),o.createElement(g.ButtonToolbar,null,o.createElement(g.Button,{type:"submit",bsStyle:"success",disabled:!Nt.valid},"Purge key"),o.createElement(g.Button,{type:"button",bsStyle:"info",onClick:Dt},"Purge all"))))),o.createElement(g.Col,{md:6},o.createElement("h2",null,"Test lookup"),o.createElement("p",null,"You can manually query the lookup table using this form. The data will be cached as configured by Graylog."),o.createElement("form",{onSubmit:Jt},o.createElement("fieldset",null,o.createElement(g.Input,{type:"text",id:"key",name:"lookupkey",placeholder:"Insert key that should be looked up",label:"Key",required:!0,onChange:Ge,help:"Key to look up a value for.",value:Zt.value}),o.createElement(g.Button,{type:"submit",name:"lookupbutton",bsStyle:"success",disabled:!Zt.valid},"Look up"))),Un&&o.createElement("div",{style:{marginTop:"16px"}},o.createElement("h4",null,"Lookup result"),o.createElement("pre",null,Un))))};var Wo=e("RjO1iR6D"),Co=e.n(Wo);const Fo={id:void 0,title:"",description:"",name:"",cache_id:void 0,data_adapter_id:void 0,enable_single_value:!1,default_single_value:"",default_single_value_type:"NULL",enable_multi_value:!1,default_multi_value:"",default_multi_value_type:"NULL",content_pack:null},rt=({saved:pe,create:Ae,table:$e})=>{const{loadingScopePermissions:Xe,scopePermissions:St}=(0,Lt.A)($e),xt=(0,an.A)(),Nt=(0,Ft.A)(),Ht=Te=>{const Ge={};return["title","name","cache_id","data_adapter_id","cache_id","default_single_value","default_multi_value"].forEach(Dt=>{if(!Te[Dt]){if(Dt==="default_single_value"&&!Te.enable_single_value||Dt==="default_multi_value"&&!Te.enable_multi_value)return;Ge[Dt]="Required"}}),Ge},Zt=Te=>{Nt(rn.g.LUT[Ae?"CREATED":"UPDATED"],{app_pathname:"lut",app_section:"lut"});let Ge;const mt=Co()(Te,["enable_single_value","enable_multi_value"]);return Ae?Ge=Ot.B.create(mt):Ge=Ot.B.update(mt),Ge.then(()=>{pe()})},Kn={...Fo,...$e,enable_single_value:$e.default_single_value!=="",enable_multi_value:$e.default_multi_value!==""},Un=()=>xt.push(ft.Ay.SYSTEM.LOOKUPTABLES.OVERVIEW),ue=!Ae&&!Xe&&(St==null?void 0:St.is_mutable);return o.createElement(Qe.Formik,{initialValues:Kn,validate:Ht,enableReinitialize:!0,onSubmit:async(Te,Ge)=>{const mt=await Ge.validateForm();return Object.keys(mt).length===0?Zt(Te):Promise.resolve()}},({values:Te,errors:Ge,touched:mt,setFieldValue:Dt,setFieldTouched:Jt,setValues:mn,isSubmitting:oo})=>o.createElement(Qe.Form,{className:"form form-horizontal"},o.createElement("fieldset",null,o.createElement(d.o$,{type:"text",name:"title",label:"Title",help:mt.title&&Ge.title?void 0:"A short title for this lookup table.",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(d.o$,{type:"text",name:"description",label:"Description",help:"Description of the lookup table.",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(d.o$,{type:"text",name:"name",label:"Name",help:mt.name&&Ge.name?void 0:"The name that is being used to refer to this lookup table. Must be unique.",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{id:"enable_single_value",name:"enable_single_value",type:"checkbox",label:"Enable single default value",help:"Enable if the lookup table should provide a default for the single value.",wrapperClassName:"col-md-offset-3 col-md-9",checked:Te.enable_single_value,onChange:()=>{Dt("enable_single_value",!Te.enable_single_value),Te.enable_single_value&&(Dt("default_single_value",""),Dt("default_single_value_type","NULL"))}}),Te.enable_single_value&&o.createElement(d.qc,{label:"Default single value",help:mt.default_single_value&&Ge.default_single_value||"The single value that is being used as lookup result if the data adapter or cache does not find a value.",validationState:mt.default_single_value&&Ge.default_single_value?"error":void 0,onBlur:()=>Jt("default_single_value",!0),update:(Qo,Po)=>{mn({...Te,default_single_value:Qo,default_single_value_type:Po})},value:Te.default_single_value,valueType:Te.default_single_value_type||"NULL",allowedTypes:["STRING","NUMBER","BOOLEAN","NULL"],labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{id:"enable_multi_value",name:"enable_multi_value",type:"checkbox",label:"Enable multi default value",help:"Enable if the lookup table should provide a default for the multi value.",wrapperClassName:"col-md-offset-3 col-md-9",checked:Te.enable_multi_value,onChange:()=>{Dt("enable_multi_value",!Te.enable_multi_value),Te.enable_multi_value&&(Dt("default_multi_value",""),Dt("default_multi_value_type","NULL"))}}),Te.enable_multi_value&&o.createElement(d.qc,{label:"Default multi value",help:mt.default_multi_value&&Ge.default_multi_value||"The multi value that is being used as lookup result if the data adapter or cache does not find a value.",validationState:mt.default_multi_value&&Ge.default_multi_value?"error":void 0,onBlur:()=>Jt("default_multi_value",!0),update:(Qo,Po)=>{mn({...Te,default_multi_value:Qo,default_multi_value_type:Po})},value:Te.default_multi_value,valueType:Te.default_multi_value_type||"NULL",allowedTypes:["OBJECT","NULL"],labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"})),o.createElement(ja,null,o.createElement(Ga,null)),o.createElement(dn,null,o.createElement(On,null)),o.createElement("fieldset",null,o.createElement(g.Row,null,o.createElement(g.Col,{mdOffset:3,md:9},Ae&&o.createElement(d.hP,{submitButtonText:"Create lookup table",submitLoadingText:"Creating lookup table...",isSubmitting:oo,isAsyncSubmit:!0,onCancel:Un}),ue&&o.createElement(d.hP,{submitButtonText:"Update lookup table",submitLoadingText:"Updating lookup table...",isSubmitting:oo,isAsyncSubmit:!0,onCancel:Un}))))))};rt.propTypes={saved:s().func.isRequired,create:s().bool,table:s().object},rt.defaultProps={create:!0,table:Fo};const Mt=rt;var Rt=e("euujeYld"),fn=e.n(Rt),Dn=e("9kZNWwre"),kn=e("1/PeS1Oa"),ro=e("8fnsnG21"),Gn=e("yGRmSjYM"),vo=e("q2j1bVbz"),yo=e("nxMFMmDQ");const lo=["lookuptables:read"],Jn=({onTableNameChange:pe,onKeyChange:Ae,selectedTableName:$e,selectedKeyName:Xe,nameValidation:St,keyValidation:xt,lookupTableNameLabel:Nt="",lookupTableKeyLabel:Ht="",customKeyField:Zt})=>{const{data:Kn}=(0,Dn.A)([],yo.iC),Un=(0,ro.P)(Ot.h),ue=(0,vo.A)();if(o.useEffect(()=>{(0,Gn.Nn)(ue.permissions,lo)&&Ot.B.searchPaginated(1,0,void 0,!1)},[ue.permissions]),!(0,Gn.Nn)(ue.permissions,lo))return o.createElement(g.Row,null,o.createElement(g.Col,{md:6,lg:5},o.createElement("p",null,"No Lookup Tables found.")));const Te=fn()(Dt=>Dt.sort((Jt,mn)=>(0,kn.m)(Jt.name,mn.name)).map(Jt=>({label:`${Jt.name} \u2013 ${Jt.value.type.type}`,value:Jt.name})),Dt=>Dt.map(Jt=>Jt.name).join("-")),Ge=Dt=>Dt.sort((Jt,mn)=>(0,kn.m)(Jt.title,mn.title)).map(Jt=>({label:Jt.title,value:Jt.name}));return!Kn||!Un.tables?o.createElement(d.y$,{text:"Loading Field Provider information..."}):o.createElement(g.Row,{className:"row-sm"},o.createElement(g.Col,{md:6},o.createElement(g.FormGroup,{controlId:"lookup-provider-table",validationState:St?"error":null},o.createElement(g.ControlLabel,null,Nt||"Select Lookup Table"),o.createElement(d.l6,{name:"event-field-table-name",placeholder:"Select Lookup Table",onChange:pe,options:Ge(Un.tables),value:$e,matchProp:"label",required:!0}),o.createElement(g.HelpBlock,null,St||"Select the Lookup Table Graylog should use to get the value."))),Zt?o.createElement(g.Col,{md:6},Zt):o.createElement(g.Col,{md:6},o.createElement(g.FormGroup,{controlId:"lookup-provider-table",validationState:xt?"error":null},o.createElement(g.ControlLabel,null,Ht||"Lookup Table Key Field"),o.createElement(d.l6,{name:"lookup-provider-key",placeholder:"Select Field",onChange:Ae,options:Te(Kn),value:Xe,matchProp:"label",allowCreate:!0,required:!0}),o.createElement(g.HelpBlock,null,xt||"Message Field name whose value will be used as Lookup Table Key."))))};Jn.defaultProps={lookupTableNameLabel:void 0,lookupTableKeyLabel:void 0,customKeyField:null};const Yn=Jn;var Gt=Object.defineProperty,tn=(pe,Ae,$e)=>Ae in pe?Gt(pe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:$e}):pe[Ae]=$e,Qt=(pe,Ae,$e)=>(tn(pe,typeof Ae!="symbol"?Ae+"":Ae,$e),$e);class Bn extends o.Component{constructor(){super(...arguments),Qt(this,"state",{table:void 0})}render(){return o.createElement("div",null,o.createElement(g.Row,{className:"content"},o.createElement(g.Col,{lg:8},o.createElement(Mt,{saved:this.props.saved,create:!0,validate:this.props.validate,validationErrors:this.props.validationErrors}))))}}Qt(Bn,"propTypes",{saved:s().func.isRequired,validate:s().func,validationErrors:s().object}),Qt(Bn,"defaultProps",{validate:null,validationErrors:{}});const co=Bn;var $n=e("nKnTKuph"),To=e("zkmy/ViL"),xo=e("s67As4Iu"),Ps=e("CrIFpfDF");const bo=(0,le.default)(Ps.A)` display: flex; flex-direction: row; align-items: center; justify-content: flex-start; `,No=({cache:pe})=>{const Ae=(0,an.A)(),{loadingScopePermissions:$e,scopePermissions:Xe}=(0,Lt.A)(pe),St=(0,Ft.A)(),xt={requests:`org.graylog2.lookup.caches.${pe.id}.requests`,hits:`org.graylog2.lookup.caches.${pe.id}.hits`,misses:`org.graylog2.lookup.caches.${pe.id}.misses`},Nt={count:`org.graylog2.lookup.caches.${pe.id}.entries`},Ht=ue=>{const Te=Object.keys(ue).reduce((Ge,mt)=>Ge+(Number.isNaN(ue[mt].count.metric.value)?0:ue[mt].count.metric.value),0);return Te<0?"N/A":To.A.formatNumber(Te)},Zt=ue=>{const Te=Object.keys(ue).reduce((Jt,mn)=>Jt+(Number.isNaN(ue[mn].hits.metric.rate.total)?0:ue[mn].hits.metric.rate.total),0),Ge=Object.keys(ue).reduce((Jt,mn)=>Jt+(Number.isNaN(ue[mn].misses.metric.rate.total)?0:ue[mn].misses.metric.rate.total),0),mt=Te+Ge;if(mt<1)return"N/A";const Dt=Te*100/mt;return`${To.A.formatNumber(Dt)}%`},Kn=o.useCallback(()=>{Ae.push(ft.Ay.SYSTEM.LOOKUPTABLES.CACHES.edit(pe.name))},[Ae,pe.name]),Un=o.useCallback(()=>{window.confirm(`Are you sure you want to delete cache "${pe.title}"?`)&&xo.Z.delete(pe.id).then(()=>{St(rn.g.LUT.CACHE_DELETED,{app_pathname:"lut",app_section:"lut_cache"}),xo.Z.reloadPage()})},[pe.title,pe.id,St]);return o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",null,o.createElement(ut.N,{to:ft.Ay.SYSTEM.LOOKUPTABLES.CACHES.show(pe.name)},pe.title)),o.createElement("td",null,pe.description),o.createElement("td",null,pe.name),o.createElement("td",null,o.createElement($n.jA,{map:Nt,computeValue:Ht})),o.createElement("td",null,o.createElement($n.jA,{map:xt,computeValue:Zt})),o.createElement("td",null,o.createElement($n.my,{name:`org.graylog2.lookup.caches.${pe.id}.requests`},o.createElement($n.nf,{suffix:"lookups/s"}))),o.createElement("td",null,$e?o.createElement(d.y$,null):Xe.is_mutable&&o.createElement(bo,null,o.createElement(g.Button,{bsSize:"xsmall",onClick:Kn,role:"button",name:"edit_square"},"Edit"),o.createElement(g.Button,{bsSize:"xsmall",bsStyle:"danger",onClick:Un,role:"button",name:"delete"},"Delete")))))},fs=le.default.div` overflow-x: auto; `,Ds=o.createElement(o.Fragment,null,o.createElement("p",null,"Find caches by parts of their names:",o.createElement("br",null),o.createElement("kbd",null,"name:guava"),o.createElement("br",null),o.createElement("kbd",null,"name:gua")),o.createElement("p",null,"Searching without a field name matches against the ",o.createElement("code",null,"title")," field:",o.createElement("br",null),o.createElement("kbd",null,"guava")," ",o.createElement("br",null),"is the same as",o.createElement("br",null),o.createElement("kbd",null,"title:guava"))),Os=({query:pe})=>o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{colSpan:7},pe?o.createElement(d.EO,null,'No caches found with title "',pe,'"'):o.createElement(d.WE,null,"There are no caches to list")))),hs=({caches:pe,query:Ae})=>pe.length>0?o.createElement(o.Fragment,null,pe.map($e=>o.createElement(No,{key:`cache-item-${$e.id}`,cache:$e}))):o.createElement(Os,{query:Ae}),Cs=o.createElement(An.A,{entityName:"cache",example:Ds,commonFields:["id","title","name","description"]}),$s=({caches:pe,pagination:Ae,paginationQueryParameter:$e})=>{const[Xe,St]=o.useState(!1),[xt,Nt]=o.useState({currentPage:$e.page||1,currentPageSize:$e.pageSize||10,currentQuery:Ae.query?decodeURI(Ae.query):"",resetPage:$e.resetPage,setPagination:$e.setPagination});o.useEffect(()=>{const{currentPage:Un,currentPageSize:ue,currentQuery:Te}=xt;xo.Z.searchPaginated(Un,ue,Te).then(()=>St(!1))},[xt]);const Ht=o.useCallback((Un,ue)=>{Nt({...xt,currentPage:Un,currentPageSize:ue})},[xt]),Zt=o.useCallback(Un=>{xt.resetPage(),xt.setPagination({page:1,pageSize:xt.currentPageSize}),Nt({...xt,currentPage:1,currentQuery:Un})},[xt]),Kn=o.useCallback(()=>{xt.resetPage(),xt.setPagination({page:1,pageSize:xt.currentPageSize}),Nt({...xt,currentPage:1,currentQuery:""})},[xt]);return o.createElement(g.Row,{className:"content"},o.createElement(g.Col,{md:12},o.createElement("h2",{style:{marginBottom:16}},"Configured lookup Caches ",o.createElement("small",null,Ae.total," total")),o.createElement(d.OW,{activePage:xt.currentPage,pageSize:xt.currentPageSize,onChange:Ht,totalItems:Ae.total},o.createElement(d.B9,{onSearch:Zt,onReset:Kn,queryHelpComponent:Cs}),o.createElement(fs,null,o.createElement(g.Table,{condensed:!0,hover:!0,className:Ye.overviewTable},o.createElement("thead",null,o.createElement("tr",null,o.createElement("th",{className:Ye.rowTitle},"Title"),o.createElement("th",{className:Ye.rowDescription},"Description"),o.createElement("th",{className:Ye.rowName},"Name"),o.createElement("th",null,"Entries"),o.createElement("th",null,"Hit rate"),o.createElement("th",null,"Throughput"),o.createElement("th",{className:Ye.rowActions},"Actions"))),Xe?o.createElement(d.y$,{text:"Loading data adapters"}):o.createElement(hs,{caches:pe,query:xt.currentQuery}))))))},Ts=(0,Kt.A)($s);var re=e("0hhBr0/b");const et=({cache:pe})=>{const Ae=(0,vn.useNavigate)(),{loadingScopePermissions:$e,scopePermissions:Xe}=(0,Lt.A)(pe),St=(0,re.A)("lookupTableCaches").find(Nt=>{var Ht;return Nt.type===((Ht=pe.config)==null?void 0:Ht.type)});if(!St)return o.createElement("p",null,"Unknown cache type ",pe.config.type,". Is the plugin missing?");const xt=Nt=>()=>{Ae(ft.Ay.SYSTEM.LOOKUPTABLES.CACHES.edit(Nt))};return o.createElement(g.Row,{className:"content"},o.createElement(g.Col,{md:12},o.createElement("h2",null,pe.title," ",o.createElement("small",null,"(",St.displayName,")")),o.createElement(ke,null,o.createElement(Se,null,o.createElement(Je,null,"Description:"),o.createElement(nt,null,pe.description||o.createElement("em",null,"No description.")))),o.createElement("h4",null,"Configuration"),o.createElement("div",null,o.createElement(St.summaryComponent,{cache:pe})),!$e&&(Xe==null?void 0:Xe.is_mutable)&&o.createElement(g.Button,{bsStyle:"success",onClick:xt(pe.name),role:"button",name:"edit_square"},"Edit")))};var Et=e("oc9db6Tt"),wt=e.n(Et);const Ut=({title:pe,typeName:Ae,create:$e})=>{const Xe=$e?"h3":"h2";return o.createElement(Xe,{style:{marginBottom:"12px"}},pe," ",o.createElement("small",null,"(",Ae,")"))},Pn={id:void 0,title:"",description:"",name:"",config:{}},qn=({type:pe,saved:Ae,title:$e,create:Xe,cache:St,validate:xt,validationErrors:Nt})=>{const Ht=o.useRef(null),[Zt,Kn]=o.useState(Xe),{loadingScopePermissions:Un,scopePermissions:ue}=(0,Lt.A)(St),Te=(0,Ft.A)(),Ge=o.useMemo(()=>t.d.exports("lookupTableCaches").find(jo=>jo.type===pe),[pe]),mt=o.useMemo(()=>Ge.displayName||pe,[Ge,pe]),Dt=o.useMemo(()=>Ge.documentationComponent,[Ge]),Jt=o.useMemo(()=>Ge?o.createElement(Ge.formComponent,{config:St.config,ref:Ht}):null,[Ge,St.config]),mn=jo=>jo.trim().replace(/\W+/g,"-").toLocaleLowerCase(),oo=(jo,Is)=>us=>{if(!Zt)return;const as=mn(us.target.value);Is({...jo,title:us.target.value,name:as})},Qo=jo=>{var Is;const us={};if(jo.title||(us.title="Required"),jo.name?xt(jo):us.name="Required",jo.config.type!=="none"){const as=((Is=Ht.current)==null?void 0:Is.validate())||{};wt()(as)||(us.config=as)}return us},Po=jo=>(Xe?xo.Z.create(jo):xo.Z.update(jo)).then(()=>{var us;Te(rn.g.LUT[Xe?"CACHE_CREATED":"CACHE_UPDATED"],{app_pathname:"lut",app_section:"lut_cache",event_details:{type:(us=jo==null?void 0:jo.config)==null?void 0:us.type}}),Ae()}),Do=(0,an.A)(),_s=()=>Do.push(ft.Ay.SYSTEM.LOOKUPTABLES.CACHES.OVERVIEW),oa=!Xe&&!Un&&(ue==null?void 0:ue.is_mutable);return o.createElement(o.Fragment,null,o.createElement(Ut,{title:$e,typeName:mt,create:Xe}),o.createElement(g.Row,null,o.createElement(g.Col,{lg:6,style:{marginTop:10}},o.createElement(Qe.Formik,{initialValues:{...Pn,...St},validate:Qo,validateOnBlur:!0,validateOnChange:!1,validateOnMount:!Xe,onSubmit:Po,enableReinitialize:!0},({errors:jo,values:Is,setValues:us,isSubmitting:as})=>o.createElement(Qe.Form,{className:"form form-horizontal"},o.createElement("fieldset",null,o.createElement(d.o$,{type:"text",name:"title",label:"* Title",required:!0,help:jo.title?null:"A short title for this cache.",onChange:oo(Is,us),autoFocus:!0,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(d.o$,{type:"text",name:"description",label:"Description",help:"Cache description.",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(d.o$,{type:"text",name:"name",label:"* Name",required:!0,error:Nt.name?Nt.name[0]:null,onChange:()=>Kn(!1),help:jo.name||Nt.name?null:"The name that is being used to refer to this cache. Must be unique.",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"})),Jt,o.createElement("fieldset",null,o.createElement(g.Row,null,o.createElement(g.Col,{mdOffset:3,sm:12},Xe&&o.createElement(d.hP,{submitButtonText:"Create cache",submitLoadingText:"Creating cache...",isSubmitting:as,isAsyncSubmit:!0,onCancel:_s}),oa&&o.createElement(d.hP,{submitButtonText:"Update cache",submitLoadingText:"Updating cache...",isAsyncSubmit:!0,isSubmitting:as,onCancel:_s}))))))),o.createElement(g.Col,{lg:6,style:{marginTop:10}},Dt?o.createElement(Dt,null):null)))};qn.defaultProps={create:!0,cache:Pn,validate:null,validationErrors:{}};const Fn=qn;var jn=e("4E3oowBb");const go={id:null,title:"",name:"",description:"",config:{type:"none"}},Lo=({saved:pe,types:Ae,validate:$e,validationErrors:Xe})=>{const[St,xt]=o.useState(null),Nt=(0,re.A)("lookupTableCaches"),Ht=o.useMemo(()=>Nt.reduce((ue,Te)=>(ue[Te.type]=Te,ue),{}),[Nt]),Zt=o.useMemo(()=>Object.values(Ae).map(ue=>({value:ue.type,label:Ht[ue.type].displayName})).sort((ue,Te)=>(0,jn.j)(ue.label.toLowerCase(),Te.label.toLowerCase())),[Ae,Ht]),Kn=o.useMemo(()=>{var ue;return St?{...go,config:{...(ue=Ae[St])==null?void 0:ue.default_config}}:null},[St,Ae]),Un=ue=>{xt(ue)};return o.createElement(o.Fragment,null,o.createElement(g.Row,{className:"content"},o.createElement(g.Col,{lg:6,className:"form form-horizontal"},o.createElement(g.Input,{id:"cache-type-select",label:"Cache Type",required:!0,autoFocus:!0,help:"The type of cache to configure.",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},o.createElement(d.l6,{placeholder:"Select Cache Type",clearable:!1,options:Zt,matchProp:"label",onChange:Un,value:St})))),Kn&&o.createElement(g.Row,{className:"content"},o.createElement(g.Col,{lg:12},o.createElement(Fn,{cache:Kn,type:St,title:"Configure Cache",create:!0,saved:pe,validationErrors:Xe,validate:$e}))))},Mn=({caches:pe})=>{const[,{value:Ae,touched:$e,error:Xe},{setTouched:St,setValue:xt}]=(0,Qe.useField)("cache_id"),Nt=pe.map(Zt=>({value:Zt.id,label:`${Zt.title} (${Zt.name})`})).sort((Zt,Kn)=>(0,jn.j)(Zt.label.toLowerCase(),Kn.label.toLowerCase())),Ht=$e?Xe:"";return o.createElement("fieldset",null,o.createElement(g.Input,{id:"cache-select",label:"Cache",required:!0,autoFocus:!0,bsStyle:Ht?"error":void 0,help:Ht||"Select an existing cache",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},o.createElement(d.l6,{placeholder:"Select a cache",clearable:!1,options:Nt,matchProp:"label",onBlur:()=>St(!0),onChange:xt,value:Ae})))};Mn.propTypes={caches:s().array},Mn.defaultProps={caches:[]};const On=Mn;var ko=e("D4SbLiE/"),Ke=e.n(ko),dt=e("JnTtTRmZ"),ht=e.n(dt);const dn=Ke()({displayName:"CachesContainer",propTypes:{children:s().oneOfType([s().arrayOf(s().node),s().node])},mixins:[ht().connect(xo.R)],getDefaultProps(){return{children:null}},componentDidMount(){xo.Z.searchPaginated(1,1e4,null)},render(){if(!this.state.caches)return o.createElement(d.y$,null);const pe=o.Children.map(this.props.children,Ae=>o.cloneElement(Ae,{caches:this.state.caches,pagination:this.state.pagination}));return o.createElement("div",null,pe)}});var jt=e("xg2EYAWP");const nn=(0,le.default)(g.ButtonToolbar)` display: flex; flex-direction: row; align-items: center; justify-content: flex-start; `,Wn=({adapter:pe,error:Ae=null})=>{const $e=(0,an.A)(),{loadingScopePermissions:Xe,scopePermissions:St}=(0,Lt.A)(pe),xt=(0,Ft.A)(),{name:Nt,title:Ht,description:Zt,id:Kn}=pe,Un=o.useCallback(()=>{$e.push(ft.Ay.SYSTEM.LOOKUPTABLES.DATA_ADAPTERS.edit(Nt))},[$e,Nt]),ue=o.useCallback(()=>{xt(rn.g.LUT.DATA_ADAPTER_DELETED,{app_pathname:"lut",app_section:"lut_data_adapter"}),window.confirm(`Are you sure you want to delete data adapter "${Ht}"?`)&&jt.G.delete(pe.id).then(()=>{jt.G.reloadPage()})},[Ht,pe.id,xt]);return o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",null,Ae&&o.createElement(ks,{errorText:Ae,title:"Lookup table problem",placement:"right"}),o.createElement(ut.N,{to:ft.Ay.SYSTEM.LOOKUPTABLES.DATA_ADAPTERS.show(Nt)},Ht)),o.createElement("td",null,Zt),o.createElement("td",null,Nt),o.createElement("td",null,o.createElement($n.my,{name:`org.graylog2.lookup.adapters.${Kn}.requests`},o.createElement($n.nf,{suffix:"lookups/s"}))),o.createElement("td",null,Xe?o.createElement(d.y$,null):St.is_mutable&&o.createElement(nn,null,o.createElement(g.Button,{bsSize:"xsmall",onClick:Un,role:"button",name:"edit_square"},"Edit"),o.createElement(g.Button,{bsSize:"xsmall",bsStyle:"danger",onClick:ue,role:"button",name:"delete"},"Delete")))))},xn=le.default.div` overflow-x: auto; `,So=o.createElement(o.Fragment,null,o.createElement("p",null,"Find data adapters by parts of their names:",o.createElement("br",null),o.createElement("kbd",null,"name:geoip"),o.createElement("br",null),o.createElement("kbd",null,"name:geo")),o.createElement("p",null,"Searching without a field name matches against the ",o.createElement("code",null,"title")," field:",o.createElement("br",null),o.createElement("kbd",null,"geoip")," ",o.createElement("br",null),"is the same as",o.createElement("br",null),o.createElement("kbd",null,"title:geoip"))),zn=o.createElement(An.A,{entityName:"data adapter",commonFields:["id","title","name","description"],example:So}),Ao=({query:pe})=>o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{colSpan:5},pe?o.createElement(d.EO,null,'No data adapters found with title "',pe,'"'):o.createElement(d.WE,null,"There are no data adapters to list")))),Jo=({dataAdapters:pe,query:Ae,errors:$e})=>pe.length>0?o.createElement(o.Fragment,null,pe.map(Xe=>o.createElement(Wn,{key:Xe.id,adapter:Xe,error:$e[Xe.name]}))):o.createElement(Ao,{query:Ae}),Ko=({dataAdapters:pe,pagination:Ae,errorStates:$e,paginationQueryParameter:Xe})=>{const[St,xt]=o.useState(!1),[Nt,Ht]=o.useState({currentPage:Xe.page||1,currentPageSize:Xe.pageSize||10,currentQuery:Ae.query?decodeURI(Ae.query):"",resetPage:Xe.resetPage,setPagination:Xe.setPagination});o.useEffect(()=>{const{currentPage:ue,currentPageSize:Te,currentQuery:Ge}=Nt;jt.G.searchPaginated(ue,Te,Ge).then(()=>xt(!1))},[Nt]);const Zt=o.useCallback((ue,Te)=>{Ht({...Nt,currentPage:ue,currentPageSize:Te})},[Nt]),Kn=o.useCallback(ue=>{Nt.resetPage(),Nt.setPagination({page:1,pageSize:Nt.currentPageSize}),Ht({...Nt,currentPage:1,currentQuery:ue})},[Nt]),Un=o.useCallback(()=>{Nt.resetPage(),Nt.setPagination({page:1,pageSize:Nt.currentPageSize}),Ht({...Nt,currentPage:1,currentQuery:""})},[Nt]);return o.createElement(g.Row,{className:"content"},o.createElement(g.Col,{md:12},o.createElement("h2",{style:{marginBottom:16}},"Configured lookup Data Adapters ",o.createElement("small",null,Ae.total," total")),o.createElement(d.OW,{activePage:Nt.currentPage,pageSize:Nt.currentPageSize,onChange:Zt,totalItems:Ae.total},o.createElement(d.B9,{onSearch:Kn,onReset:Un,queryHelpComponent:zn}),o.createElement(xn,null,o.createElement(g.Table,{condensed:!0,hover:!0,className:Ye.overviewTable},o.createElement("thead",null,o.createElement("tr",null,o.createElement("th",{className:Ye.rowTitle},"Title"),o.createElement("th",{className:Ye.rowDescription},"Description"),o.createElement("th",{className:Ye.rowName},"Name"),o.createElement("th",null,"Throughput"),o.createElement("th",{className:Ye.rowActions},"Actions"))),St?o.createElement(d.y$,{text:"Loading data adapters"}):o.createElement(Jo,{dataAdapters:pe,query:Nt.currentQuery,errors:$e.dataAdapters}))))))},fo=(0,Kt.A)(Ko),es=le.default.div` dl { margin-top: 10px; dt { float: left; clear: left; } dd { margin-left: 185px; word-wrap: break-word; &:not(:last-child) { border-bottom: 1px solid #ececec; margin-bottom: 5px; padding-bottom: 5px; } } } `,Us=({dataAdapter:pe})=>{const[Ae,$e]=o.useState(""),[Xe,St]=o.useState(null),{loadingScopePermissions:xt,scopePermissions:Nt}=(0,Lt.A)(pe),Ht=mt=>{$e((0,zt.yG)(mt.target))},Zt=mt=>{mt.preventDefault(),jt.G.lookup(pe.name,Ae).then(Dt=>{St(Dt)})},Kn=(0,re.A)("lookupTableAdapters").find(mt=>{var Dt;return mt.type===((Dt=pe.config)==null?void 0:Dt.type)});if(!Kn)return o.createElement("p",null,"Unknown data adapter type ",pe.config.type,". Is the plugin missing?");const{title:Un,description:ue,name:Te}=pe,Ge=Kn.summaryComponent;return o.createElement(g.Row,{className:"content"},o.createElement(g.Col,{md:6},o.createElement("h2",null,Un," ",o.createElement("small",null,"(",Kn.displayName,")")),o.createElement(es,null,o.createElement("dl",null,o.createElement("dt",null,"Description"),o.createElement("dd",null,ue||o.createElement("em",null,"No description.")))),o.createElement("h4",null,"Configuration"),o.createElement(es,null,o.createElement(Ge,{dataAdapter:pe})),!xt&&(Nt==null?void 0:Nt.is_mutable)&&o.createElement(ut.m,{to:ft.Ay.SYSTEM.LOOKUPTABLES.DATA_ADAPTERS.edit(Te)},o.createElement(g.Button,{bsStyle:"success",role:"button",name:"edit_square"},"Edit"))),o.createElement(g.Col,{md:6},o.createElement("h3",null,"Test lookup"),o.createElement("p",null,"You can manually trigger the data adapter using this form. The data will be not cached."),o.createElement("form",{onSubmit:Zt},o.createElement("fieldset",null,o.createElement(g.Input,{type:"text",id:"key",name:"key",label:"Key",required:!0,onChange:Ht,help:"Key to look up a value for.",value:Ae}),o.createElement(g.Button,{type:"submit",bsStyle:"success"},"Look up"))),Xe&&o.createElement("div",null,o.createElement("h4",null,"Lookup result"),o.createElement("pre",null,JSON.stringify(Xe,null,2)))))};var ga=e("+KM7MH1U"),ts=e.n(ga),ds=e("N6x7vnl1"),ys=e("BqxuktKK"),Ns=Object.defineProperty,qs=(pe,Ae,$e)=>Ae in pe?Ns(pe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:$e}):pe[Ae]=$e,_o=(pe,Ae,$e)=>(qs(pe,typeof Ae!="symbol"?Ae+"":Ae,$e),$e);class Gs extends o.Component{constructor(Ae){super(Ae),_o(this,"validationCheckTimer"),_o(this,"_input"),_o(this,"updateState",$e=>{this.setState(this._initialState($e))}),_o(this,"_initialState",$e=>{const Xe=c.A.clone($e),{create:St}=this.props;return{generateAdapterName:St,isFormDisabled:!1,dataAdapter:{id:Xe.id,title:Xe.title,description:Xe.description,name:Xe.name,custom_error_ttl_enabled:Xe.custom_error_ttl_enabled,custom_error_ttl:Xe.custom_error_ttl,custom_error_ttl_unit:Xe.custom_error_ttl_unit,config:Xe.config}}}),_o(this,"_clearTimer",()=>{this.validationCheckTimer!==void 0&&(clearTimeout(this.validationCheckTimer),this.validationCheckTimer=void 0)}),_o(this,"_setIsFormDisabled",$e=>{this.setState({isFormDisabled:$e})}),_o(this,"_validate",$e=>{const{validate:Xe}=this.props;this._clearTimer(),Xe&&(this.validationCheckTimer=setTimeout(()=>Xe($e),500))}),_o(this,"_onChange",$e=>{const{dataAdapter:Xe}=this.state,St=c.A.clone(Xe);St[$e.target.name]=(0,zt.yG)($e.target);let{generateAdapterName:xt}=this.state;xt&&$e.target.name==="title"&&(St.name=this._sanitizeTitle(St.title)),$e.target.name==="name"&&(xt=!1),this._validate(St),this.setState({dataAdapter:St,generateAdapterName:xt})}),_o(this,"_onConfigChange",$e=>{const{dataAdapter:Xe}=this.state,St=c.A.clone(Xe);St.config[$e.target.name]=(0,zt.yG)($e.target),this._validate(St),this.setState({dataAdapter:St})}),_o(this,"_updateConfig",$e=>{const{dataAdapter:Xe}=this.state,St=c.A.clone(Xe);St.config=$e,this._validate(St),this.setState({dataAdapter:St})}),_o(this,"updateCustomErrorTTL",($e,Xe,St)=>{this._updateCustomErrorTTL($e,Xe,St,"custom_error_ttl")}),_o(this,"_updateCustomErrorTTL",($e,Xe,St,xt)=>{const{dataAdapter:Nt}=this.state,Ht=c.A.clone(Nt);St&&$e?(Ht[xt]=St&&$e?$e:null,Ht[`${xt}_enabled`]=St):(Ht[xt]=null,Ht[`${xt}_enabled`]=!1),Ht[`${xt}_unit`]=St?Xe:null,this._validate(Ht),this.setState({dataAdapter:Ht})}),_o(this,"_save",$e=>{var Xe;$e&&$e.preventDefault();const{dataAdapter:St}=this.state,{create:xt,saved:Nt,sendTelemetry:Ht}=this.props;Ht(rn.g.LUT[xt?"DATA_ADAPTER_CREATED":"DATA_ADAPTER_UPDATED"],{app_pathname:"lut",app_section:"lut_data_adapter",event_details:{type:(Xe=St==null?void 0:St.config)==null?void 0:Xe.type}});let Zt;xt?Zt=jt.G.create(St):Zt=jt.G.update(St),Zt.then(()=>{Nt()})}),_o(this,"_sanitizeTitle",$e=>$e.trim().replace(/\W+/g,"-").toLocaleLowerCase()),_o(this,"_validationState",$e=>{const{validationErrors:Xe}=this.props;return Xe[$e]?"error":null}),_o(this,"_validationMessage",($e,Xe)=>{const{validationErrors:St}=this.props;return St[$e]?o.createElement("div",null,o.createElement("span",null,Xe),"\xA0",o.createElement("span",null,o.createElement("b",null,St[$e][0]))):o.createElement("span",null,Xe)}),_o(this,"_renderTitle",($e,Xe,St)=>{const xt=St?"h3":"h2";return o.createElement(xt,null,$e," ",o.createElement("small",null,"(",Xe,")"))}),this.state=this._initialState(Ae.dataAdapter)}componentDidMount(){this._input.getInputDOMNode().focus();const{create:Ae,dataAdapter:$e}=this.props;Ae||this._validate($e)}componentDidUpdate(Ae){const{type:$e}=this.props;Ae.type!==$e&&this._input.getInputDOMNode().focus();const{dataAdapter:Xe}=this.props;ts()(Xe,Ae.dataAdapter)||this.updateState(Xe)}componentWillUnmount(){this._clearTimer()}render(){const{dataAdapter:Ae,isFormDisabled:$e}=this.state,{create:Xe,type:St,title:xt,history:Nt}=this.props,Zt=t.d.exports("lookupTableAdapters").filter(Dt=>Dt.type===St),Kn=()=>Nt.push(ft.Ay.SYSTEM.LOOKUPTABLES.DATA_ADAPTERS.OVERVIEW);let Un=null,ue=null,Te=Ae.config.type;if(Zt&&Zt.length>0){const Dt=Zt[0];Te=Dt.displayName,Un=o.createElement(Dt.formComponent,{config:Ae.config,handleFormEvent:this._onConfigChange,updateConfig:this._updateConfig,validationMessage:this._validationMessage,validationState:this._validationState,setDisableFormSubmission:this._setIsFormDisabled}),Dt.documentationComponent&&(ue=o.createElement(Dt.documentationComponent,{dataAdapterId:Ae.id}))}let Ge=null,mt=8;return ue&&(mt=6,Ge=o.createElement(g.Col,{lg:mt},ue)),o.createElement(o.Fragment,null,o.createElement("p",null,this._renderTitle(xt,Te,Xe)),o.createElement(g.Row,null,o.createElement(g.Col,{lg:mt},o.createElement("form",{className:"form form-horizontal",onSubmit:this._save},o.createElement("fieldset",null,o.createElement(g.Input,{type:"text",id:"title",name:"title",label:"Title",autoFocus:!0,required:!0,onChange:this._onChange,help:"A short title for this data adapter.",value:Ae.title,labelClassName:"col-sm-3",ref:Dt=>{this._input=Dt},wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"description",name:"description",label:"Description",onChange:this._onChange,help:"Data adapter description.",value:Ae.description,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),o.createElement(g.Input,{type:"text",id:"name",name:"name",label:"Name",required:!0,onChange:this._onChange,help:this._validationMessage("name","The name that is being used to refer to this data adapter. Must be unique."),value:Ae.name,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",bsStyle:this._validationState("name")}),o.createElement(d.gM,{label:"Custom Error TTL",help:"Define a custom TTL for caching erroneous results. Otherwise the default of 5 seconds is used",update:this.updateCustomErrorTTL,value:Ae.custom_error_ttl,unit:Ae.custom_error_ttl_unit||"MINUTES",units:["MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS"],enabled:Ae.custom_error_ttl_enabled,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"})),Un,o.createElement("fieldset",null,o.createElement(g.Row,null,o.createElement(g.Col,{mdOffset:3,md:9},o.createElement(d.hP,{submitButtonText:Xe?"Create adapter":"Update adapter",disabledSubmit:$e,onCancel:Kn})))))),Ge))}}_o(Gs,"propTypes",{type:s().string.isRequired,title:s().string.isRequired,saved:s().func.isRequired,create:s().bool,dataAdapter:s().object,validate:s().func,validationErrors:s().object,sendTelemetry:s().func,history:s().object.isRequired}),_o(Gs,"defaultProps",{create:!0,dataAdapter:{id:void 0,title:"",description:"",name:"",custom_error_ttl_enabled:!1,custom_error_ttl:null,custom_error_ttl_unit:null,config:{}},validate:null,validationErrors:{},sendTelemetry:()=>{}});const ea=(0,ys.A)((0,ds.A)(Gs));var js=Object.defineProperty,ta=(pe,Ae,$e)=>Ae in pe?js(pe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:$e}):pe[Ae]=$e,cs=(pe,Ae,$e)=>(ta(pe,typeof Ae!="symbol"?Ae+"":Ae,$e),$e);class Rs extends o.Component{constructor(Ae){super(Ae),cs(this,"_onTypeSelect",$e=>{const{types:Xe}=this.props;this.setState({type:$e,dataAdapter:{id:null,title:"",name:"",description:"",config:c.A.clone(Xe[$e].default_config)}})}),this.state={dataAdapter:void 0,type:void 0}}render(){const{types:Ae,validate:$e,validationErrors:Xe,saved:St}=this.props,{type:xt,dataAdapter:Nt}=this.state,Ht={};t.d.exports("lookupTableAdapters").forEach(Kn=>{Ht[Kn.type]=Kn});const Zt=Object.keys(Ae).map(Kn=>{const Un=Ae[Kn];return Ht[Un.type]===void 0?(console.error(`Plugin component for data adapter type ${Un.type} is missing - invalid or missing plugin?`),{value:Un.type,disabled:!0,label:`${Un.type} - missing or invalid plugin`}):{value:Un.type,label:Ht[Un.type].displayName}}).sort((Kn,Un)=>(0,jn.j)(Kn.label.toLowerCase(),Un.label.toLowerCase()));return o.createElement("div",null,o.createElement(g.Row,{className:"content"},o.createElement(g.Col,{lg:8},o.createElement("form",{className:"form form-horizontal",onSubmit:()=>{}},o.createElement(g.Input,{id:"data-adapter-type-select",label:"Data Adapter Type",required:!0,autoFocus:!0,help:"The type of data adapter to configure.",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},o.createElement(d.l6,{placeholder:"Select Data Adapter Type",clearable:!1,options:Zt,matchProp:"label",onChange:this._onTypeSelect,value:null}))))),Nt&&o.createElement(g.Row,{className:"content"},o.createElement(g.Col,{lg:12},o.createElement(ea,{dataAdapter:Nt,type:xt,create:!0,title:"Configure Adapter",validate:$e,validationErrors:Xe,saved:St}))))}}cs(Rs,"propTypes",{saved:s().func.isRequired,types:s().object.isRequired,validate:s().func,validationErrors:s().object}),cs(Rs,"defaultProps",{validate:null,validationErrors:{}});const na=Rs,Ea=({dataAdapters:pe})=>{const[,{value:Ae,touched:$e,error:Xe},{setTouched:St,setValue:xt}]=(0,Qe.useField)("data_adapter_id"),Nt=pe.map(Zt=>({value:Zt.id,label:`${Zt.title} (${Zt.name})`})).sort((Zt,Kn)=>(0,jn.j)(Zt.label.toLowerCase(),Kn.label.toLowerCase())),Ht=$e?Xe:"";return o.createElement("fieldset",null,o.createElement(g.Input,{id:"data-adapter-select",label:"Data Adapter",required:!0,autoFocus:!0,bsStyle:Ht?"error":void 0,help:Ht||"Select an existing data adapter",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},o.createElement(d.l6,{placeholder:"Select a data adapter",clearable:!1,options:Nt,matchProp:"label",onBlur:()=>St(!0),onChange:xt,value:Ae})))};Ea.propTypes={dataAdapters:s().array},Ea.defaultProps={dataAdapters:[]};const Ga=Ea,ja=Ke()({displayName:"DataAdaptersContainer",propTypes:{children:s().oneOfType([s().arrayOf(s().node),s().node])},mixins:[ht().connect(jt.U)],getDefaultProps(){return{children:null}},componentDidMount(){jt.G.searchPaginated(1,1e4,null)},render(){if(!this.state.dataAdapters)return o.createElement(d.y$,null);const pe=o.Children.map(this.props.children,Ae=>o.cloneElement(Ae,{dataAdapters:this.state.dataAdapters,pagination:this.state.pagination}));return o.createElement("div",null,pe)}}),Hs=le.default.span` margin-right: 5px; `,ks=({errorText:pe,title:Ae="Error",placement:$e="bottom"})=>o.createElement(d.N,{trigger:["hover","focus"],placement:$e,overlay:pe,title:Ae,width:400},o.createElement(Hs,null,o.createElement(d.In,{name:"warning",className:"text-danger"})))},nKnTKuph:(x,y,e)=>{"use strict";e.d(y,{nf:()=>E,JW:()=>_,my:()=>U,Xx:()=>Ie,pG:()=>Oe,Qs:()=>He,jA:()=>ke});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("9pdI12pI"),n=e.n(o),c=e("5NVsf39r"),g=Object.defineProperty,d=(Se,Je,nt)=>Je in Se?g(Se,Je,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Se[Je]=nt,f=(Se,Je,nt)=>(d(Se,typeof Je!="symbol"?Je+"":Je,nt),nt);class p extends s.Component{constructor(){super(...arguments),f(this,"state",{prevMetric:null,prevTs:null,nowTs:c.A.nowInSeconds()}),f(this,"_checkPrevMetric",()=>this.state.prevMetric&&this.state.prevMetric.count!==void 0&&this.state.prevTs),f(this,"_placeholder",()=>this.props.hideOnZero?null:s.createElement("span",null,this._prefix(),"Calculating...")),f(this,"_prefix",()=>this.props.prefix?`${this.props.prefix} `:null),f(this,"_suffix",()=>this.props.suffix?` ${this.props.suffix}`:null)}UNSAFE_componentWillReceiveProps(){this.setState({prevMetric:this.props.metric,prevTs:this.state.nowTs,nowTs:c.A.nowInSeconds()})}render(){if(!(this.props.metric&&this.props.metric.count!==void 0)){if(this.props.hideOnMissing)return null;if(!this._checkPrevMetric())return this._placeholder()}const{count:Je}=this.props.metric;let nt=null;if(this._checkPrevMetric()){const Wt=(Je-this.state.prevMetric.count)/(this.state.nowTs-this.state.prevTs);nt=s.createElement("span",{key:"rate",className:"number-format"},this._prefix(),n()(Wt).format("0,0"),this._suffix())}else return this._placeholder();return this.props.hideOnMissing&&!nt?null:s.createElement("span",null,nt,this.props.showTotal&&s.createElement("span",{key:"absolute",className:"number-format"}," (",n()(Je).format("0")," total)"))}}f(p,"propTypes",{metric:r().object,showTotal:r().bool,prefix:r().string,suffix:r().string,hideOnZero:r().bool,hideOnMissing:r().bool}),f(p,"defaultProps",{showTotal:!1,prefix:null,suffix:"per second",hideOnZero:!1,hideOnMissing:!1});const E=p;var l=e("IOI9nV80");const m={timer:"schedule",histogram:"signal_cellular_alt",meter:"play_circle",gauge:"speed",counter:"circle",unknown:"help"},h=Se=>{var Je;return(Je=m[Se])!=null?Je:m.unknown},A=(Se,Je)=>{const Wt=Se.split(Je).slice(1).join(Je);return s.createElement("span",null,s.createElement("span",{className:"prefix"},Je),Wt)},C=({metric:Se,namespace:Je,nodeId:nt})=>{const[Wt,Le]=(0,s.useState)(!1),Fe=(0,s.useCallback)(ut=>{ut.preventDefault(),Le(ft=>!ft)},[]),qe=Wt?s.createElement(Ie,{nodeId:nt,metric:Se}):null;return s.createElement("span",null,s.createElement("div",{className:"name"},s.createElement(l.In,{name:h(Se.type)})," ",s.createElement("a",{className:"open",href:"#",onClick:Fe},A(Se.full_name,Je))),qe)};C.propTypes={metric:r().object.isRequired,namespace:r().string.isRequired,nodeId:r().string.isRequired};const _=C;var P=e("8fnsnG21"),I=e("5qbhaJ1A"),M=e("woUyHGxd");class O extends s.Component{componentDidMount(){const{name:Je}=this.props;M.p.addGlobal(Je)}shouldComponentUpdate(Je){const{metricsUpdatedAt:nt}=this.props;return nt!==null&&Je.metricsUpdatedAt?Je.metricsUpdatedAt>nt:!0}componentWillUnmount(){const{name:Je}=this.props;M.p.removeGlobal(Je)}render(){const{children:Je,metrics:nt,name:Wt,zeroOnMissing:Le}=this.props;if(!nt)return s.createElement("span",null,"Loading...");let Fe=Object.keys(nt).map(qe=>I.A.getValuesForNode(nt[qe],{throughput:Wt})).reduce((qe,ut)=>({throughput:(qe.throughput||0)+(ut.throughput||0)}),{});return Le&&(!Fe||!Fe.throughput)&&(Fe={throughput:0}),s.createElement("div",null,s.Children.map(Je,qe=>s.cloneElement(qe,{metric:{full_name:Wt,count:Fe.throughput}})))}}O.propTypes={metricsUpdatedAt:r().number,name:r().string.isRequired,zeroOnMissing:r().bool},O.defaultProps={metricsUpdatedAt:c.A.nowInSeconds(),zeroOnMissing:!0};const U=(0,P.A)(O,{metricsStore:M.$},({metricsStore:Se,...Je})=>({...Je,metrics:Se.metrics,metricsUpdatedAt:Se.metricsUpdatedAt}));var W=e("13uboeDm"),K=e.n(W),j=e("J6y4/h8P");const G=({metric:{metric:Se}})=>s.createElement("dl",{className:"metric-def metric-counter"},s.createElement("dt",null,"Value:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.count).format("0,0"))));G.propTypes={metric:r().object.isRequired};const k=G,Q=({metric:{metric:Se}})=>s.createElement("dl",{className:"metric-def metric-gauge"},s.createElement("dt",null,"Value:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.value).format("0,0"))));Q.propTypes={metric:r().object.isRequired};const ne=Q,z=({metric:{metric:Se}})=>s.createElement("dl",{className:"metric-def metric-histogram"},s.createElement("dt",null,"95th percentile:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.time["95th_percentile"]).format("0,0.[00]"))),s.createElement("dt",null,"98th percentile:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.time["98th_percentile"]).format("0,0.[00]"))),s.createElement("dt",null,"99th percentile:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.time["99th_percentile"]).format("0,0.[00]"))),s.createElement("dt",null,"Standard deviation:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.time.std_dev).format("0,0.[00]"))),s.createElement("dt",null,"Mean:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.time.mean).format("0,0.[00]"))),s.createElement("dt",null,"Minimum:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.time.min).format("0,0.[00]"))),s.createElement("dt",null,"Maximum:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.time.max).format("0,0.[00]"))),s.createElement("dt",null,"Count:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.count).format("0,0"))));z.propTypes={metric:r().object.isRequired};const le=z,V=({metric:{metric:Se}})=>s.createElement("dl",{className:"metric-def metric-meter"},s.createElement("dt",null,"Total:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.rate.total).format("0,0"))," events"),s.createElement("dt",null,"Mean:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.rate.mean).format("0,0.[00]"))," ",Se.rate_unit),s.createElement("dt",null,"1 minute avg:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.rate.one_minute).format("0,0.[00]"))," ",Se.rate_unit),s.createElement("dt",null,"5 minute avg:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.rate.five_minute).format("0,0.[00]"))," ",Se.rate_unit),s.createElement("dt",null,"15 minute avg:"),s.createElement("dd",null,s.createElement("span",{className:"number-format"},n()(Se.rate.fifteen_minute).format("0,0.[00]"))," ",Se.rate_unit));V.propTypes={metric:r().object.isRequired};const me=V,Pe=({metric:{metric:{time:Se}}})=>s.createElement("dl",{className:"metric-def metric-timer"},s.createElement("dt",null,"95th percentile:"),s.createElement("dd",null,s.createElement("span",null,n()(Se["95th_percentile"]).format("0,0.[00]")),"\u03BCs"),s.createElement("dt",null,"98th percentile:"),s.createElement("dd",null,s.createElement("span",null,n()(Se["98th_percentile"]).format("0,0.[00]")),"\u03BCs"),s.createElement("dt",null,"99th percentile:"),s.createElement("dd",null,s.createElement("span",null,n()(Se["99th_percentile"]).format("0,0.[00]")),"\u03BCs"),s.createElement("dt",null,"Standard deviation:"),s.createElement("dd",null,s.createElement("span",null,n()(Se.std_dev).format("0,0.[00]")),"\u03BCs"),s.createElement("dt",null,"Mean:"),s.createElement("dd",null,s.createElement("span",null,n()(Se.mean).format("0,0.[00]")),"\u03BCs"),s.createElement("dt",null,"Minimum:"),s.createElement("dd",null,s.createElement("span",null,n()(Se.min).format("0,0.[00]")),"\u03BCs"),s.createElement("dt",null,"Maximum:"),s.createElement("dd",null,s.createElement("span",null,n()(Se.max).format("0,0.[00]")),"\u03BCs"));Pe.propTypes={metric:r().object.isRequired};const Ve=Pe,at=({metric:Se})=>{switch(Se.type){case"counter":return s.createElement(k,{metric:Se});case"gauge":return s.createElement(ne,{metric:Se});case"histogram":return s.createElement(le,{metric:Se});case"meter":return s.createElement(me,{metric:Se});case"timer":return s.createElement(Ve,{metric:Se});default:return s.createElement("i",null,"Invalid metric type: ",Se)}},ze=j.default.div` dl { > dt { float: left; } &.metric-timer > dd { margin-left: 145px; } &.metric-meter > dd { margin-left: 115px; } &.metric-gauge > dd { margin-left: 90px; } &.metric-counter > dd { margin-left: 90px; } &.metric-histogram > dd { margin-left: 145px; } } `,he=({nodeId:Se,metric:Je,metric:{full_name:nt}})=>{var Wt,Le;const Fe=(0,P.P)(M.$,ft=>ft.metrics);(0,s.useEffect)(()=>(M.p.add(Se,nt),()=>{M.p.remove(Se,nt)}),[nt,Se]);const qe=(Le=(Wt=Fe==null?void 0:Fe[Se])==null?void 0:Wt[nt])!=null?Le:Je,ut=K()(qe.type);return s.createElement("div",{className:"metric"},s.createElement("h3",null,ut),s.createElement(ze,null,s.createElement(at,{metric:qe})))};he.propTypes={metric:r().object.isRequired,nodeId:r().string.isRequired};const Ie=he;var Re=e("rIl5IEuP"),ce=e("TMaijZ0a");const Ee=j.default.div(({theme:Se})=>` height: 20px; margin-bottom: 5px; color: ${Se.colors.variant.dark.danger}; `),oe=(Se,Je)=>{try{const nt=new RegExp(Se,"i");return Je.filter(Wt=>String(Wt.full_name).match(nt))}catch{return[]}},ae=j.default.div` padding-top: 10px; width: 100%; `;class ye extends s.Component{constructor(Je){super(Je),this.onFilterChange=nt=>{this.setState({filter:nt})},this.state={filter:Je.filter}}UNSAFE_componentWillReceiveProps(Je){Je.filter!==this.props.filter&&this.setState({filter:Je.filter})}render(){const{filter:Je}=this.state,{names:nt,error:Wt}=this.props;if(!nt)return s.createElement(Re.Row,{className:"content"},s.createElement(Re.Col,{md:12},s.createElement(Re.Alert,{bsStyle:"danger"},Wt?s.createElement("span",null,"Could not fetch metrics from node: server returned ",s.createElement("em",null,Wt.responseMessage||"")," ","with a ",Wt.status," status code."):s.createElement("span",null,"There was a problem fetching node metrics.")," ","Graylog will keep trying to get them in the background.")));const Le=oe(Je,nt);return s.createElement(Re.Row,{className:"content"},s.createElement(Re.Col,{md:12},s.createElement(Ee,{className:"text-warning"},Wt&&s.createElement(s.Fragment,null,s.createElement(l.In,{name:"warning"}),"\xA0 Could not fetch metrics from node: server returned ",s.createElement("em",null,Wt.responseMessage||"")," ","with a ",Wt.status," status code. Displaying last metrics available.")),s.createElement(ce.A,{query:Je,onSearch:this.onFilterChange,queryWidth:300,placeholder:"Type a metric name to filter\u2026"},s.createElement(ae,null,s.createElement(He,{names:Le,namespace:this.props.namespace,nodeId:this.props.nodeId})))))}}ye.propTypes={names:r().arrayOf(r().object),namespace:r().string.isRequired,nodeId:r().string.isRequired,filter:r().string,error:r().shape({responseMessage:r().string,status:r().number})},ye.defaultProps={names:void 0,filter:"",error:void 0};const Oe=ye,ve=j.default.ul(({theme:Se})=>(0,j.css)` padding: 0; li { margin-bottom: 5px; .prefix { color: ${Se.colors.gray[70]}; } .name { font-size: ${Se.fonts.size.body}; font-family: ${Se.fonts.family.monospace}; word-break: break-all; .open:hover { text-decoration: none; } } .metric { margin-left: 10px; padding: 10px; h3 { margin-bottom: 5px; } } } dl { margin-top: 0; margin-bottom: 0; } `);class _e extends s.Component{constructor(){super(...arguments),this._formatMetric=Je=>{const{namespace:nt,nodeId:Wt}=this.props;return s.createElement("li",{key:`li-${Je.full_name}`},s.createElement(_,{key:Je.full_name,metric:Je,namespace:nt,nodeId:Wt}))}}render(){const{names:Je}=this.props,nt=Je.sort((Wt,Le)=>Wt.full_name.localeCompare(Le.full_name)).map(Wt=>this._formatMetric(Wt));return s.createElement(ve,null,nt.length>0?nt:s.createElement("li",null,"No metrics match the given filter. Please ensure you use a valid regular expression"))}}_e.propTypes={names:r().arrayOf(r().object).isRequired,namespace:r().string.isRequired,nodeId:r().string.isRequired};const He=_e;var je=e("D4SbLiE/"),Qe=e.n(je),zt=e("JnTtTRmZ"),xe=e.n(zt);const ke=Qe()({displayName:"MetricsMapper",propTypes:{map:r().object.isRequired,computeValue:r().func.isRequired},mixins:[xe().connect(M.$)],getDefaultProps(){return{}},getInitialState(){return{}},UNSAFE_componentWillMount(){Object.keys(this.props.map).forEach(Se=>M.p.addGlobal(this.props.map[Se]))},shouldComponentUpdate(Se,Je){return this.state.metricsUpdatedAt&&Je.metricsUpdatedAt?Je.metricsUpdatedAt>this.state.metricsUpdatedAt:!0},componentWillUnmount(){Object.keys(this.props.map).forEach(Se=>M.p.removeGlobal(this.props.map[Se]))},render(){if(!this.state.metrics)return null;const Se={};Object.keys(this.state.metrics).forEach(nt=>{Object.keys(this.props.map).forEach(Wt=>{const Le=this.props.map[Wt];this.state.metrics[nt][Le]&&(Se[nt]||(Se[nt]={}),Se[nt][Wt]=this.state.metrics[nt][Le])})});const Je=this.props.computeValue(Se);return s.createElement("span",null,Je)}})},"kyFu+5jg":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("QL8i6bcz");const o=()=>{const n=r.d.exports("globalNotifications").map(c=>{if(!c.component)return console.error('Missing "component" for globalNotification plugin:',c),null;const g=c.component;return c.key||console.warn('Missing "key" for globalNotification plugin:',c),t.createElement(g,{key:c.key})}).filter(c=>!!c);return t.createElement(t.Fragment,null,n)}},l4nHKZ4j:(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("fV39EiaT"),n=e("kyFu+5jg");const c=({children:d})=>t.createElement(t.Fragment,null,t.createElement(n.A,null),t.createElement(o.A,null),d);c.propTypes={children:s().oneOfType([s().arrayOf(s().element),s().element]).isRequired};const g=c},HqzDVmZB:(x,y,e)=>{"use strict";e.d(y,{A:()=>ln});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("PfG+ecgN"),n=e.n(o),c=e("5W3DTPWj"),g=e("Q1zRxDOP"),d=e("8fnsnG21"),f=e("IOI9nV80"),p=e("IQSYq7+p"),E=e("PVMUg5WH"),l=e("8OvTct/Z"),m=e("v4GbOr/o"),h=e("J6y4/h8P"),A=e("UiXZqrDE"),C=e("rIl5IEuP");const _=h.default.div` display: flex; > div:first-child > div { border-top-right-radius: 0; border-bottom-right-radius: 0; } > div:last-child > div { border-top-left-radius: 0; border-bottom-left-radius: 0; } > div:not(:first-child) > div { border-left: 0; } > div:not(:first-child, :last-child) > div { border-radius: 0; } `,P=({children:bt,className:It})=>t.createElement(_,{className:It},bt);P.defaultProps={className:void 0};const I=P,M=h.default.div(({theme:bt})=>(0,h.css)` display: inline-flex; align-items: center; justify-content: center; height: 30px; width: 30px; border-radius: 50%; background-color: ${bt.colors.gray[80]}; `),O=bt=>{switch(bt){case"global":return"apartment";case"team":return"group";case"error":return"error";case"user":default:return"person"}},W=({type:bt,...It})=>t.createElement(M,{...It},t.createElement(f.In,{name:O(bt)})),K=bt=>bt.map(It=>({label:It.title,value:It.id})).toJS(),j=({capabilities:bt,onChange:It,title:En,...Xt})=>{const Ye=K(bt),At=(0,t.useCallback)((Ct,Bt,Ze)=>{Ze({target:{value:Bt,name:Ct}}),typeof It=="function"&&It(Bt)},[It]);return t.createElement(A.Field,{name:"capabilityId"},({field:{name:Ct,value:Bt,onChange:Ze}})=>t.createElement(f.l6,{...Xt,clearable:!1,inputProps:{"aria-label":En},onChange:gt=>At(Ct,gt,Ze),options:Ye,placeholder:En,value:Bt}))};j.defaultProps={onChange:void 0,title:"Select a capability"};const G=j,k=h.default.div` display: flex; `,Q=h.default.div(({theme:bt})=>(0,h.css)` width: 100%; margin-top: 3px; color: ${bt.colors.variant.danger}; > * { margin-right: 5px; &:last-child { margin-right: 0; } } `),ne=(0,h.default)(f.l6)` flex: 1; `,z=h.default.div` display: flex; align-items: center; `,le=(0,h.default)(W)` margin-right: 5px; `,V=(0,h.default)(I)` flex: 1; > div:last-child { flex: 0.5; } `,me=(0,h.default)(C.Button)` margin-left: 15px; `,Pe=bt=>bt.map(It=>({label:It.title,value:It.id,granteeType:It.type})).toJS(),Ve=bt=>{var It;const En="Viewer";return(It=bt.find(Xt=>Xt.title===En))==null?void 0:It.id},at=bt=>It=>It?void 0:`The ${bt} is required`,ze=({label:bt,granteeType:It})=>t.createElement(z,null,t.createElement(le,{type:It}),bt),he=({availableGrantees:bt,availableCapabilities:It,className:En,onSubmit:Xt,formRef:Ye})=>{const At=Pe(bt),Ct=Ve(It),Bt=(Ze,gt)=>{Xt(Ze).then(()=>{gt()})};return t.createElement("div",{className:En},t.createElement(A.Formik,{onSubmit:(Ze,{resetForm:gt})=>Bt(Ze,gt),innerRef:Ye,initialValues:{granteeId:void 0,capabilityId:Ct}},({isSubmitting:Ze,isValid:gt,errors:cn})=>t.createElement(A.Form,null,t.createElement(k,null,t.createElement(V,null,t.createElement(A.Field,{name:"granteeId",validate:at("grantee")},({field:{name:un,value:_n,onChange:vn}})=>t.createElement(ne,{inputProps:{"aria-label":"Search for users and teams"},onChange:Ln=>vn({target:{value:Ln,name:un}}),optionRenderer:ze,options:At,placeholder:"Search for users and teams",value:_n})),t.createElement(G,{capabilities:It})),t.createElement(me,{bsStyle:"success",disabled:Ze||!gt,title:"Add Collaborator",type:"submit"},"Add Collaborator")),cn&&t.createElement(Q,null,Object.entries(cn).map(([un,_n])=>t.createElement("span",{key:un},String(_n),"."))))))};he.defaultProps={className:void 0,formRef:void 0};const Ie=he;var Re=e("rVdVsuGH");const ce=(bt,It)=>{switch(It){case"new":return bt.colors.variant.lighter.success;case"changed":return bt.colors.variant.lighter.warning;default:return"transparent"}},Ee=h.default.li(({theme:bt,$currentState:It})=>(0,h.css)` display: flex; align-items: center; width: 100%; padding: 5px; border-left: 5px solid ${ce(bt,It)}; `),oe=h.default.div` display: flex; align-items: center; flex: 1; overflow: hidden; margin-right: 10px; `,ae=h.default.div` flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; `,ye=(0,h.default)(G)` flex: 0.5; `,Oe=(0,h.default)(W)` margin-right: 5px; `,ve=h.default.div` display: flex; align-items: center; justify-content: center; width: 25px; margin-left: 10px; `,He=({availableCapabilities:bt,currentGranteeState:It,grantee:{id:En,capabilityId:Xt,type:Ye,title:At},onDelete:Ct,onCapabilityChange:Bt})=>{const[Ze,gt]=(0,t.useState)(!1),cn=()=>{gt(!0),Ct(En).then(()=>gt(!1))};return t.createElement(A.Formik,{initialValues:{capabilityId:Xt},onSubmit:()=>{}},t.createElement(A.Form,null,t.createElement(Ee,{$currentState:It},t.createElement(oe,{title:At},t.createElement(Oe,{type:Ye}),t.createElement(ae,null,At)),t.createElement(ye,{onChange:un=>Bt({granteeId:En,capabilityId:un}),capabilities:bt,title:`Change the capability for ${At}`}),t.createElement(ve,null,Ze?t.createElement(f.y$,{text:""}):t.createElement(f.K0,{name:"delete",onClick:cn,title:`Remove sharing for ${At}`})))))},je=h.default.div` display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; `,Qe=h.default.div(({theme:bt})=>` >:nth-child(even) { background: ${bt.colors.table.row.backgroundAlt}; }; >:nth-child(odd) { background: ${bt.colors.table.row.background}; }; `),zt=h.default.ul` display: flex; justify-content: center; .pagination { margin: 10px 0; } `,xe=(0,h.default)(f.dK)` margin-top: 10px; margin-bottom: 0; `,Ue=(0,h.default)(f.t7)(({theme:bt})=>(0,h.css)` label { font-weight: normal; font-size: ${bt.fonts.size.body}; } `),ke=(bt,It,En)=>{const Xt=It*(En-1),Ye=Xt+It;return bt.slice(Xt,Ye)},Se=({activeShares:bt,onDelete:It,onCapabilityChange:En,entityType:Xt,entityTypeTitle:Ye,availableCapabilities:At,selectedGrantees:Ct,className:Bt,title:Ze})=>{const gt=Re.ZE[0],[cn,un]=(0,t.useState)(gt),[_n,vn]=(0,t.useState)(1),Ln=ke(Ct,cn,_n),Xn=Ct.size,no=Math.ceil(Xn/cn),Wo=Xn>gt;return t.createElement("div",{className:Bt},t.createElement(je,null,t.createElement("h5",null,Ze),Wo&&t.createElement(Ue,{onChange:Co=>un(Co),pageSize:cn})),Ln.size>0?t.createElement(Qe,null,Ln.map(Co=>{const Fo=Co.currentState(bt);return t.createElement(He,{availableCapabilities:At,currentGranteeState:Fo,grantee:Co,key:Co.id,onDelete:It,onCapabilityChange:En})}).toArray()):t.createElement(C.Alert,null,"This ",Ye||Xt," has no collaborators."),t.createElement(zt,null,t.createElement(xe,{totalPages:no,currentPage:_n,onChange:vn})))};Se.defaultProps={className:void 0,entityTypeTitle:void 0};const Je=Se;var nt=e("TJOheZRu");const Wt=(0,h.default)(C.Alert)` margin-top: 20px; max-height: 240px; overflow: auto; `,Le=h.default.ul` list-style: initial; padding-left: 20px; ul { list-style: circle; } `,Fe=nt.A.capitalizeFirstLetter,ut=({missingDependencies:bt,availableGrantees:It})=>t.createElement(Wt,{bsStyle:"danger",title:"There are missing dependencies for the current set of collaborators"},t.createElement(Le,null,bt.entrySeq().map(([En,Xt])=>{const Ye=It.find(At=>At.id===En);return Ye&&t.createElement("li",{key:Ye.id},Fe(Ye.type)," ",t.createElement("i",null,Ye.title)," needs access to",Xt.map(At=>t.createElement(Le,{key:At.id},t.createElement("li",null,Fe(At.type),": ",t.createElement("i",null,At.title),t.createElement("br",null),"Owners: ",At.owners.map((Ct,Bt)=>t.createElement("span",{key:Ct.id},Fe(Ct.type)," ",t.createElement("i",null,Ct.title),Bt!==At.owners.size-1&&", "))))))}).toArray()));var ft=e("13uboeDm"),Ot=e.n(ft);const Lt=(0,h.default)(C.Alert)` margin-top: 20px; max-height: 240px; overflow: auto; `,an=h.default.ul` list-style: initial; padding-left: 20px; ul { list-style: circle; } `,rn=({validationResult:bt,availableGrantees:It})=>{const En=bt.errorContext.selectedGranteeCapabilities.map(Xt=>It.find(Ye=>Ye.id===Xt));return t.createElement(Lt,{bsStyle:"danger"},t.createElement(an,null,t.createElement("li",null,"Removing the following owners will leave the entity ownerless: ",t.createElement("br",null),En.map((Xt,Ye)=>t.createElement("span",{key:Xt==null?void 0:Xt.id},Ot()(Xt==null?void 0:Xt.type)," ",t.createElement("i",null,Xt==null?void 0:Xt.title),Ye!==En.size-1&&", ")).toArray())))};var $t=e("tz1fbBRX");const be=(0,h.default)(C.Alert)` display: flex; margin-top: 20px; `,yn=h.default.div` height: 34px; display: flex; align-items: center; `,Kt=h.default.div` margin-left: 10px; flex: 1; `,An=(0,h.default)(C.FormControl)(({theme:bt})=>(0,h.css)` &[readonly] { background-color: ${bt.colors.input.background}; } `),qt=(0,h.default)(C.InputGroup.Addon)` padding: 0; `,io=(0,h.default)(f.bL)` border-radius: 0; border: 0; `,bn=({entityGRN:bt})=>{const It=(0,$t.A)(bt),En=`${window.location.origin.toString()}${It}`;return t.createElement(be,null,t.createElement(yn,null,t.createElement("b",null,"Sharable URL:")),t.createElement(Kt,null,t.createElement(C.FormGroup,null,t.createElement(C.InputGroup,null,t.createElement(An,{type:"text",value:En,readOnly:!0}),t.createElement(qt,null,t.createElement(io,{text:En,buttonTitle:"Copy parameter to clipboard",title:t.createElement(f.In,{name:"content_copy"})})))),t.createElement("div",null,"You or anyone authorized to view can access this link.")))},gn=h.default.div` margin-bottom: 25px; &:last-child { margin-bottom: 0; } `,wn=h.default.h5` margin-bottom: 10px; `,Zn=(bt,It)=>{const En=It.entrySeq().map(([Xt])=>Xt);return bt.filter(Xt=>!En.includes(Xt.id))},Vn=({entityShareState:{activeShares:bt,availableGrantees:It,availableCapabilities:En,missingDependencies:Xt,selectedGranteeCapabilities:Ye,selectedGrantees:At,validationResults:Ct},description:Bt,entityGRN:Ze,entityType:gt,entityTitle:cn,setDisableSubmit:un,granteesSelectFormRef:_n,showShareableEntityURL:vn,entityTypeTitle:Ln})=>{const Xn=Zn(It,Ye);(0,t.useEffect)(()=>{un(Ct==null?void 0:Ct.failed)},[Ct,un]);const no=({granteeId:Co,capabilityId:Fo})=>{const rt=Ye.merge({[Co]:Fo});un(!0);const Mt={selected_grantee_capabilities:rt};return c.A.prepare(gt,cn,Ze,Mt)},Wo=Co=>{const Fo=Ye.remove(Co);un(!0);const rt={selected_grantee_capabilities:Fo};return c.A.prepare(gt,cn,Ze,rt)};return t.createElement(t.Fragment,null,t.createElement(gn,null,t.createElement(wn,null,"Add collaborator"),t.createElement("p",null,Bt),t.createElement(Ie,{availableGrantees:Xn,availableCapabilities:En,onSubmit:no,formRef:_n})),t.createElement(gn,null,t.createElement(Je,{activeShares:bt,availableCapabilities:En,entityType:gt,entityTypeTitle:Ln,onDelete:Wo,onCapabilityChange:no,selectedGrantees:At,title:"Current collaborators"})),(Ct==null?void 0:Ct.failed)&&t.createElement(gn,null,t.createElement(rn,{validationResult:Ct,availableGrantees:It})),(Xt==null?void 0:Xt.size)>0&&t.createElement(gn,null,t.createElement(ut,{missingDependencies:Xt,availableGrantees:It})),vn&&t.createElement(gn,null,t.createElement(bn,{entityGRN:Ze})))};Vn.propTypes={description:s().string.isRequired,entityGRN:s().string.isRequired,entityShareState:s().object.isRequired,setDisableSubmit:s().func.isRequired,showShareableEntityURL:s().bool,entityTypeTitle:s().string},Vn.defaultProps={showShareableEntityURL:!0,entityTypeTitle:void 0};const po=Vn,De=({description:bt,entityId:It,entityType:En,entityTitle:Xt,entityTypeTitle:Ye,onClose:At,showShareableEntityURL:Ct})=>{var Bt;const{state:Ze}=(0,d.P)(p._3),[gt,cn]=(0,t.useState)((Bt=Ze==null?void 0:Ze.validationResults)==null?void 0:Bt.failed),un=(0,g.i)(En,It),_n=(0,t.useRef)(),vn=(0,l.A)();(0,t.useEffect)(()=>{c.A.prepare(En,Xt,un)},[En,Xt,un]);const Ln=()=>{var Xn,no,Wo;cn(!0);const Co=(no=(Xn=_n.current)==null?void 0:Xn.values)==null?void 0:no.granteeId,Fo={selected_grantee_capabilities:Ze.selectedGranteeCapabilities};if(Co){const rt=Ze==null?void 0:Ze.availableGrantees.find(Mt=>Mt.id===Co);if(!window.confirm(`${rt.title?`"${rt.title}"`:"An entity (name not found)"} got selected but was never added as a collaborator. Do you want to continue anyway?`)){cn(!1);return}}vn((Wo=m.g.ENTITYSHARE)==null?void 0:Wo[`ENTITY_${n()(En)}_SHARED`],{app_pathname:En}),c.A.update(En,Xt,un,Fo).then(()=>{cn(!0),At()})};return t.createElement(E.A,{confirmButtonDisabled:gt,confirmButtonText:"Update sharing",onConfirm:Ln,onCancel:At,showModal:!0,title:t.createElement(t.Fragment,null,"Sharing ",Ye!=null?Ye:En,": ",t.createElement("i",null,Xt))},Ze&&Ze.entity===un?t.createElement(po,{description:bt,entityGRN:un,entityType:En,entityTypeTitle:Ye,entityTitle:Xt,entityShareState:Ze,granteesSelectFormRef:_n,setDisableSubmit:cn,showShareableEntityURL:Ct}):t.createElement(f.y$,null))};De.propTypes={description:s().string.isRequired,entityId:s().string.isRequired,entityTitle:s().string.isRequired,entityType:s().string.isRequired,entityTypeTitle:s().string,onClose:s().func.isRequired,showShareableEntityURL:s().bool},De.defaultProps={entityTypeTitle:void 0,showShareableEntityURL:!0};const ln=De},BAvuEjdP:(x,y,e)=>{"use strict";e.d(y,{A:()=>c,g:()=>s});var t=e("Z7aTuO5B"),r=e("J6y4/h8P");const s=({color:g})=>t.createElement("svg",{width:"90",height:"27",viewBox:"0 0 90 27",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"logoTitleId"},t.createElement("title",{id:"logoTitleId"},"Graylog Logo"),t.createElement("path",{d:"M4.58121 13.452C4.58121 17.0932 6.92009 19.9371 10.6145 19.9371C12.661 19.9371 14.362 19.0334 15.2125 17.5185V20.1231C15.2125 22.5949 13.6178 24.1896 11.1726 24.1896C8.99319 24.1896 7.55796 23.0733 7.23902 21.1597H4.74068C5.21908 24.4554 7.63768 26.4487 11.1726 26.4487C15.1593 26.4487 17.6843 23.8441 17.6843 19.751V7.28589H15.4517L15.2656 9.49187C14.4417 7.8706 12.8204 6.9138 10.7208 6.9138C6.94666 6.9138 4.58121 9.78423 4.58121 13.452ZM7.07955 13.3989C7.07955 11.0068 8.56792 9.0932 11.0663 9.0932C13.6178 9.0932 15.1062 10.9005 15.1062 13.3989C15.1062 15.9504 13.5646 17.7577 11.0397 17.7577C8.59451 17.7577 7.07955 15.8441 7.07955 13.3989Z",fill:g}),t.createElement("path",{d:"M27.4027 7.17957C26.8977 7.07325 26.5256 7.0201 26.0738 7.0201C24.2931 7.0201 22.9908 7.92377 22.4592 9.27924L22.2997 7.31245H19.9608V20.2826H22.4592V13.3989C22.4592 10.9005 23.921 9.46531 26.2864 9.46531H27.4027V7.17957Z",fill:g}),t.createElement("path",{d:"M32.2177 20.6015C34.3174 20.6015 36.0981 19.6713 36.7625 18.1829L37.0284 20.2826H39.1545V12.1231C39.1545 8.6148 36.9753 6.9138 33.7592 6.9138C30.4104 6.9138 28.1778 8.69452 28.1778 11.4055H30.3572C30.3572 9.83739 31.5533 8.90716 33.653 8.90716C35.4071 8.90716 36.7094 9.67791 36.7094 11.8573V12.2294L32.6164 12.5484C29.5599 12.7876 27.7792 14.2759 27.7792 16.668C27.7792 19.0334 29.427 20.6015 32.2177 20.6015ZM32.9354 18.6613C31.314 18.6613 30.3041 17.9703 30.3041 16.5882C30.3041 15.3125 31.2078 14.462 33.4136 14.2494L36.736 13.9836V14.6746C36.736 17.1198 35.3009 18.6613 32.9354 18.6613Z",fill:g}),t.createElement("path",{d:"M39.7706 26.1032C40.435 26.2627 41.1263 26.369 41.9501 26.369C43.9436 26.369 45.2459 25.4388 46.1228 23.2062L52.2625 7.28589H49.6842L45.8306 17.7577L42.0563 7.28589H39.4253L44.6612 20.9736L44.2093 22.2228C43.598 23.8707 42.6411 24.0567 41.4451 24.0567H39.7706V26.1032Z",fill:g}),t.createElement("path",{d:"M56.2826 20.2826V0.721085H53.7843V20.2826H56.2826Z",fill:g}),t.createElement("path",{d:"M72.0767 13.452C72.0767 17.0932 74.4156 19.9371 78.1101 19.9371C80.1565 19.9371 81.8575 19.0334 82.7082 17.5185V20.1231C82.7082 22.5949 81.1134 24.1896 78.6683 24.1896C76.4888 24.1896 75.0535 23.0733 74.7347 21.1597H72.2361C72.7146 24.4554 75.1332 26.4487 78.6683 26.4487C82.6548 26.4487 85.1799 23.8441 85.1799 19.751V7.28589H82.9473L82.7613 9.49187C81.9372 7.8706 80.3159 6.9138 78.2164 6.9138C74.4422 6.9138 72.0767 9.78423 72.0767 13.452ZM74.5753 13.3989C74.5753 11.0068 76.0635 9.0932 78.5618 9.0932C81.1134 9.0932 82.6017 10.9005 82.6017 13.3989C82.6017 15.9504 81.0603 17.7577 78.5352 17.7577C76.0901 17.7577 74.5753 15.8441 74.5753 13.3989Z",fill:g}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M64.5 18.0217C66.9191 18.0217 68.8804 16.0605 68.8804 13.6413C68.8804 11.2221 66.9191 9.26087 64.5 9.26087C62.0809 9.26087 60.1196 11.2221 60.1196 13.6413C60.1196 16.0605 62.0809 18.0217 64.5 18.0217ZM64.5 20.2826C68.168 20.2826 71.1413 17.3092 71.1413 13.6413C71.1413 9.97341 68.168 7 64.5 7C60.832 7 57.8587 9.97341 57.8587 13.6413C57.8587 17.3092 60.832 20.2826 64.5 20.2826Z",fill:g}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M64.8595 10.6898C64.8934 10.5641 65.0649 10.5474 65.1226 10.6641L66.3454 13.1387C66.3692 13.1869 66.4184 13.2174 66.4721 13.2174H67.4674C67.7014 13.2174 67.8913 13.4072 67.8913 13.6413C67.8913 13.8754 67.7014 14.0652 67.4674 14.0652H65.9453C65.8916 14.0652 65.8424 14.0347 65.8187 13.9865L65.1899 12.7143L64.1405 16.5928C64.1066 16.7185 63.9351 16.7352 63.8774 16.6185L62.6546 14.1439C62.6308 14.0957 62.5817 14.0652 62.528 14.0652H61.5326C61.2986 14.0652 61.1087 13.8754 61.1087 13.6413C61.1087 13.4072 61.2986 13.2174 61.5326 13.2174H63.0547C63.1084 13.2174 63.1576 13.2479 63.1814 13.2961L63.8102 14.5683L64.8595 10.6898Z",fill:g})),o=r.default.div` display: inline-flex; `,n=({className:g})=>{const d=(0,r.useTheme)();return t.createElement(o,{className:`${g}`},t.createElement(s,{color:d.colors.brand.logo}))};n.defaultProps={className:""};const c=n},"/Wq35DRR":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.PerspectivesContext",()=>s)},jD0e6MXE:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("/Wq35DRR");const o=()=>{const n=(0,t.useContext)(r.A);if(!n)throw new Error("useActivePerspective hook needs to be used inside PerspectivesContext.Provider");return{activePerspective:n.activePerspective,setActivePerspective:n.setActivePerspective}}},Y2DdPzXi:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("J6y4/h8P");const s=r.default.h3(({theme:c})=>(0,r.css)` a { color: ${c.colors.global.textDefault}; } .label { font-size: ${c.fonts.size.tiny}; line-height: 200%; margin-left: 5px; vertical-align: bottom; } `),n=c=>t.createElement(s,{...c})},E9JT2cEW:(x,y,e)=>{"use strict";e.d(y,{A:()=>I});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("9oVghaOd"),n=e.n(o),c=e("4E3oowBb"),g=e("rIl5IEuP"),d=e("4zkAw1kt"),f=e("/8lbhT5j"),p=e("v4GbOr/o"),E=e("8OvTct/Z"),l=e("MdYBRjRJ"),m=e("0t7Ye+61");const h=({surrounding_timerange_options:M={}})=>Object.fromEntries(Object.entries(M).map(([O,U])=>[n().duration(O).asSeconds(),U])),A=(M,O)=>{const{surrounding_filter_fields:U=[]}=O;return Object.fromEntries(U.map(W=>[W,M[W]]))},C=(M,O,U,W,K)=>f.A.builder().timerange({type:"absolute",from:O,to:U}).streams(K).filterFields(W).highlightedMessage(M).build().toURL(),_=(M,O,U,W,K,j)=>{const G=n()(O).subtract(Number(M),"seconds").toISOString(),k=n()(O).add(Number(M),"seconds").toISOString(),Q=A(W,K);return C(U,G,k,Q,j)},P=({searchConfig:M,timestamp:O,id:U,messageFields:W})=>{const{streams:K}=(0,t.useContext)(d.A),j=h(M),G=(0,m.A)(),k=(0,E.A)(),Q=z=>{k(p.g.SEARCH_MESSAGE_TABLE_SHOW_SURROUNDING_MESSAGE,{app_pathname:(0,l.i)(G.pathname),app_section:"search-message-table",app_action_value:"seach-message-table-show-surrounding",event_details:{range:z}})},ne=Object.keys(j).sort((z,le)=>(0,c.j)(z,le)).map(z=>t.createElement(g.MenuItem,{key:z,onClick:()=>Q(z),href:_(z,O,U,W,M,K),target:"_blank",rel:"noopener noreferrer"},j[z]));return t.createElement(g.DropdownButton,{title:"Show surrounding messages",bsSize:"small",id:"surrounding-search-dropdown"},ne)};P.propTypes={id:s().string.isRequired,timestamp:s().string.isRequired,searchConfig:s().object.isRequired,messageFields:s().object.isRequired};const I=P},"3IogPG7u":(x,y,e)=>{"use strict";e.d(y,{A:()=>He,L:()=>ve});var t=e("d4kzUuQm"),r=e("Z7aTuO5B"),s=e("0hhBr0/b"),o=e("yAXMqwrl"),n=e("J6y4/h8P"),c=e("rIl5IEuP"),g=e("IOI9nV80");const d=200;function f(je){return je?"20px":`${d+10}px`}const p=n.default.button(({$navIsOpen:je})=>(0,n.css)` position: absolute; left: ${f(je)}; bottom: 20px; z-index: 11; transition: all 0.33s ease-in-out; border-radius: 50%; display: inline-flex; justify-content: center; align-items: center; height: 3rem; width: 3rem; border: 0; background-color: transparent; cursor: pointer; outline: none; color: ${({theme:Qe})=>Qe.colors.gray[60]}; font-size: ${({theme:Qe})=>Qe.fonts.size.extraLarge}; padding: 0.5rem; &:hover { background-color: ${({theme:Qe})=>Qe.colors.gray[80]}; } &:active { background-color: ${({theme:Qe})=>Qe.colors.gray[70]}; } `),E=n.default.div(({$isOpen:je,theme:Qe})=>(0,n.css)` background-color: ${Qe.colors.global.background}; border-right: 1px solid ${Qe.colors.global.contentBackground}; height: 100%; width: ${d}px; transition: all 0.33s ease-in-out; position: absolute; left: ${je?"0px":`-${d}px`}; z-index: 11; ul { list-style: none; margin: 0; padding: 0; } `),m=({children:je,isOpen:Qe,toggleIsOpen:zt})=>r.createElement(E,{$isOpen:Qe},r.createElement("ul",null,je),r.createElement(p,{$navIsOpen:Qe,onClick:zt},r.createElement(g.In,{name:Qe?"chevron_left":"crop_square"}))),A=n.default.div(({$sideNavIsOpen:je,$isSecurityPerspective:Qe,theme:zt})=>(0,n.css)` display: flex; flex-direction: column; padding-left: ${je?`${d}px`:"0px"}; padding-top: ${Qe?"0px":"15px"}; transition: all 0.33s ease-in-out; position: relative; width: 100%; height: 100%; overflow-y: auto; z-index: 10; top: 0; background: ${zt.colors.global.background}; `),_=n.default.div` display: flex; flex-direction: column; height: 100%; position: relative; `;var P=e("1jSicls3"),I=e("u2QUEJU3");const M=(0,n.default)(P.k2)(({theme:je})=>(0,n.css)` display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 0.6rem; transition: all 0.33s ease-in-out; padding: 5px 7px; margin: 16px 10px; border-radius: 5px; color: ${je.colors.gray[30]}; & > svg { width: 20px; } &:hover { background: ${je.colors.global.contentBackground}; text-decoration: none; color: ${je.colors.global.textDefault}; } &.active { background: ${je.colors.global.contentBackground}; color: ${je.colors.brand.primary}; } `),O=({children:je,linkTarget:Qe,linkEnd:zt,iconName:xe})=>r.createElement("li",null,r.createElement(M,{to:Qe,end:zt},r.createElement(I.A,{name:xe,size:"xs"}),je));O.defaultProps={linkEnd:!1};const U=O,W=(0,n.default)(c.Alert)` padding: ${({theme:je})=>je.spacings.lg}; margin: ${({theme:je})=>je.spacings.md}; margin-top: 0; `,K=n.default.div` display: flex; flex-direction: row; align-items: center; justify-content: space-between; `,j=n.default.div` display: flex; flex-direction: row; align-items: baseline; gap: ${({theme:je})=>je.spacings.md}; `,G=n.default.h1` font-weight: bold; color: ${({theme:je})=>je.colors.variant.danger}; `,k=n.default.div` display: flex; flex-direction: column; gap: ${({theme:je})=>je.spacings.md}; width: ${({$width:je})=>je||"auto"}; align-items: ${({$align:je})=>je||"flex-start"}; `,Q=n.default.div` display: flex; flex-direction: row; ${({$justify:je})=>je?(0,n.css)`justify-content: ${je};`:(0,n.css)`gap: ${({theme:Qe})=>Qe.spacings.md};`} width: ${({$fullWidth:je})=>je?"100%":"auto"}; `,ne=(0,n.default)(g.In)` color: ${({theme:je})=>je.colors.brand.primary}; `,z=["Anomaly Detection AI","Cloud Option","Achiving","Audit Logs for Graylog Cloud","Dynamic Lookup Tables","Advanced Alerting With Scripting","Compliance Reporting","Correlation & Aggregation Events","Threat Intel Integrations"],le=["Incident Investigation Workspaces","Pre-build Security Parser & Dashboards","Sigma Rules","Parameterized Dashboarding","Input & Output Integrations","Threat Management","Search Workflow, Temlplates & Filters","Integrated Search & Alerting","SOAR Integrations"],V=[{path:t.Ay.SECURITY.OVERVIEW,iconName:"ballot",end:!0,title:"Overview"},{path:t.Ay.SECURITY.USER_ACTIVITY,iconName:"person",end:!1,title:"User Activity"},{path:t.Ay.SECURITY.HOST_ACTIVITY,iconName:"tv",end:!1,title:"Host Activity"},{path:t.Ay.SECURITY.NETWORK_ACTIVITY,iconName:"wifi",end:!1,title:"Network Activity"},{path:t.Ay.SECURITY.ANOMALIES,iconName:"zoom_in",end:!1,title:"Anomalies"}],Pe=({children:je})=>{const[Qe,zt]=(0,r.useState)(!0),[xe,Ue]=(0,r.useState)(!0);return r.createElement(r.Fragment,null,r.createElement(_,null,r.createElement(m,{isOpen:Qe,toggleIsOpen:()=>zt(ke=>!ke)},V.map(ke=>r.createElement(U,{key:ke.title,iconName:ke.iconName,linkTarget:ke.path,linkEnd:ke.end},ke.title))),r.createElement(A,{$sideNavIsOpen:Qe},r.createElement(W,{bsStyle:"info",noIcon:!0},r.createElement(K,null,r.createElement(j,null,r.createElement(G,null,"Security Demo"),r.createElement("span",null,"For more information and booking a full demo of the product visit Graylog website.")),r.createElement(c.Button,{bsStyle:"primary",role:"link",target:"_blank",href:"https://graylog.org/products/security"},"Graylog Security ",r.createElement(g.In,{name:"open_in_new"})))),je)),xe&&r.createElement(g.TM,{show:!0,title:"Security Demo",onConfirm:()=>Ue(!1),btnConfirmText:"Close"},r.createElement(k,null,r.createElement("h2",{className:"text-danger"},"OVERVIEW"),r.createElement("p",null,"Graylog Security is designed to revolutionize cybersecurity for IT teams, offering the combined capabilities of SIEM, Security Analytics, Incident Investigation, and Anomaly Detection. By using our platform, you can work more efficiently, tackling critical tasks quicker, and mitigating risk caused by malicious actors and credential-based attacks."),r.createElement(Q,{$justify:"space-between",$fullWidth:!0},r.createElement(k,null,z.map(ke=>r.createElement(Q,{key:ke},r.createElement(ne,{name:"check"}),r.createElement("span",null,ke)))),r.createElement(k,null,le.map(ke=>r.createElement(Q,{key:ke},r.createElement(ne,{name:"check"}),r.createElement("span",null,ke))))))))};var Ve=e("8jTixuP6");const at=(0,Ve.A)(()=>Promise.all([e.e("bb8c8232-3142"),e.e("bb8c8232-3803")]).then(e.bind(e,"NrDFOwc8"))),ze=(0,Ve.A)(()=>Promise.all([e.e("bb8c8232-3142"),e.e("bb8c8232-1774")]).then(e.bind(e,"/dGFSS79"))),he=(0,Ve.A)(()=>Promise.all([e.e("bb8c8232-3142"),e.e("bb8c8232-9808")]).then(e.bind(e,"HwHMJAKj"))),Ie=(0,Ve.A)(()=>Promise.all([e.e("bb8c8232-3142"),e.e("bb8c8232-6563")]).then(e.bind(e,"w+wjXEd6"))),Re=(0,Ve.A)(()=>Promise.all([e.e("bb8c8232-3142"),e.e("bb8c8232-4868")]).then(e.bind(e,"YkjNA19l"))),ce=[{path:t.Ay.SECURITY.OVERVIEW,element:r.createElement(at,null)},{path:t.Ay.SECURITY.USER_ACTIVITY,element:r.createElement(ze,null)},{path:t.Ay.SECURITY.HOST_ACTIVITY,element:r.createElement(he,null)},{path:t.Ay.SECURITY.NETWORK_ACTIVITY,element:r.createElement(Ie,null)},{path:t.Ay.SECURITY.ANOMALIES,element:r.createElement(Re,null)}].map(je=>({...je,path:je.path.slice(t.vY.length)})),oe=()=>r.createElement(Pe,null,r.createElement(o.Routes,null,ce.map(({path:je,element:Qe})=>r.createElement(o.Route,{key:je,path:je,element:Qe})))),ye=()=>{const je=(0,s.A)("securityPage");return je!=null&&je.length?r.createElement(r.Fragment,null,je.map((Qe,zt)=>r.createElement(Qe,{key:zt}))):r.createElement(oe,null)},Oe=[{path:`${t.vY}/*`,component:ye,parentComponent:({children:je})=>je}],ve={description:t.o5,children:[{path:t.Ay.SECURITY.OVERVIEW,description:"Overview"},{path:t.Ay.SECURITY.USER_ACTIVITY,description:"User Activity"},{path:t.Ay.SECURITY.HOST_ACTIVITY,description:"Host Activity"},{path:t.Ay.SECURITY.NETWORK_ACTIVITY,description:"Network Activity"},{path:t.Ay.SECURITY.ANOMALIES,description:"Anomalies"}]},He={routes:Oe}},"1LOzeRr1":(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("rIl5IEuP");const c=o.default.span(({$size:f,theme:p})=>{const{body:E,small:l,tiny:m}=p.fonts.size,h=f==="small"?l:E;return(0,o.css)` vertical-align: middle; font-size: ${f==="xsmall"?m:h}; `}),g=({color:f,size:p,text:E})=>{const l=(0,o.useTheme)(),m=l.utils.colorLevel(f,5),h=l.utils.contrastingColor(f);return t.createElement(c,{$size:p,className:"color-label-wrapper"},t.createElement(n.Label,{style:{backgroundColor:f,border:`1px solid ${m}`,color:h,overflow:"hidden",textOverflow:"ellipsis",maxWidth:"128px",marginRight:"4px",marginBottom:"4px"}},E))};g.propTypes={color:s().string.isRequired,text:s().oneOfType([s().string,s().element]),size:s().oneOf(["normal","small","xsmall"])},g.defaultProps={text:t.createElement("span",null,"\u2003"),size:"normal"};const d=g},Wh5iba66:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("ty2gyrHp"),s=e("d4kzUuQm");const n=({stream:c})=>{const g=s.Ay.stream_search(c.id);return t.createElement(r.N,{to:g},c.title)}},yzCFXWYn:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("DUKaTDO2"),r=e("jAGDuYSC"),s=e("eFxcQyPT"),o=e("MdYBRjRJ"),n=e("U1Iufsob");const c=f=>{const{url:p}=n.A.StreamsApiController.get(f);return(0,s.Ay)("GET",(0,o.H3)(p))},d=(f,{enabled:p}={enabled:!0})=>{const{data:E,refetch:l,isFetching:m,isError:h}=(0,t.useQuery)(["streams",f],()=>c(f),{onError:A=>{r.A.error(`Loading stream failed with status: ${A}`,"Could not load Stream")},keepPreviousData:!0,enabled:p});return{data:E,refetch:l,isFetching:m,isError:h}}},"7dh0vSOR":(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("E+CaPsQD"),o=e("u2QUEJU3");const n=r.default.a` display: inline-flex; align-items: center; &:hover, &:focus { text-decoration: none; .documentation-link-text { text-decoration: underline; } } `,c=(0,r.default)(o.A)` margin-left: 5px; `,g=({page:f,title:p="",text:E,displayIcon:l})=>t.createElement(n,{href:s.A.toString(f),title:p,target:"_blank"},t.createElement("span",{className:"documentation-link-text"},E),l&&t.createElement(c,{name:"lightbulb_circle",type:"regular",size:"lg"}));g.defaultProps={title:"",displayIcon:!1};const d=g},"zeW/qtng":(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("IOI9nV80"),o=e("7dh0vSOR"),n=e("E+CaPsQD");const c=r.default.ul` margin: 0; padding: 0; margin-top: 5px; `,g=()=>t.createElement("div",{className:"support-sources"},t.createElement("h2",null,"Need help?"),t.createElement("p",null,"Do not hesitate to consult the Graylog community if your questions are not answered in the"," ",t.createElement(o.A,{page:n.A.PAGES.WELCOME,text:"documentation"}),"."),t.createElement(c,null,t.createElement("li",null,t.createElement(s.In,{name:"group"}),"\xA0",t.createElement("a",{href:"https://www.graylog.org/community-support/",target:"_blank",rel:"noopener noreferrer"},"Community support")),t.createElement("li",null,t.createElement(s.In,{name:"bug_report"}),"\xA0\xA0",t.createElement("a",{href:"https://github.com/Graylog2/graylog2-server/issues",target:"_blank",rel:"noopener noreferrer"},"Issue tracker")),t.createElement("li",null,t.createElement(s.In,{name:"favorite"}),"\xA0",t.createElement("a",{href:"https://www.graylog.org/professional-support",target:"_blank",rel:"noopener noreferrer"},"Professional support"))));g.propTypes={};const d=g},fVisTAey:(x,y,e)=>{"use strict";e.d(y,{$:()=>c.A});var t=e("Z7aTuO5B"),r=e("rIl5IEuP"),s=e("zeW/qtng");const o=()=>React.createElement(Row,{className:"content"},React.createElement(Col,{md:12},React.createElement(SupportSources,null))),n=null;var c=e("7dh0vSOR")},fGU5yqDp:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.CurrentUserContext",()=>s)},KhLmrWKP:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.FormWarningsContext",()=>s)},D2221jVL:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B");const s=()=>{const g=(0,t.useRef)(!1);return(0,t.useEffect)(()=>(g.current=!0,()=>{g.current=!1}),[]),g};var o=e("KhLmrWKP");const c=({children:g})=>{const d=s(),[f,p]=(0,t.useState)({}),E=(0,t.useCallback)((m,h)=>{d.current===!0&&p(A=>({...A,[m]:h}))},[d]),l=(0,t.useMemo)(()=>({warnings:f,setFieldWarning:E}),[E,f]);return t.createElement(o.A.Provider,{value:l},g)}},k5v4N6a1:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.HotkeysContext",()=>s)},F5HruJCi:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.InputsContext",()=>s)},"+44s4X7G":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.NodesContext",()=>s)},gvNRgdyu:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.StreamsContext",()=>s)},nrvTDoPl:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.UserDateTimeContext",()=>s)},lN93Sbbu:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s={enableSmartSearch:!0,updateUnfocussed:!1,searchSidebarIsPinned:!1,dashboardSidebarIsPinned:!1},o=t.createContext(s),n=(0,r.Gr)("contexts.UserPreferencesContext",()=>o)},"UeAH/0t7":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.WindowDimensionsContext",()=>s)},TkfAb49d:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("Mx+G+HdB"),s=e.n(r),o=e("UeAH/0t7");const n=()=>{const{innerWidth:f,innerHeight:p}=window;return{width:f,height:p}},c=()=>{const[f,p]=(0,t.useState)(n());return(0,t.useEffect)(()=>{const E=s()(()=>p(n()),200);return window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)}}),f},d=({children:f})=>{const p=c();return t.createElement(o.A.Provider,{value:p},f)}},lDGobrly:(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("jAGDuYSC"),r=e("9tc+dS6Z"),s=e("62FDaRYn");const o=(d,...f)=>{const{message:p,title:E}=d(...f);t.A.success(p,E||"Success")},n=(d,f,...p)=>{var E,l;let m=String(f);((f==null?void 0:f.status)===400||(f==null?void 0:f.status)===500)&&((l=(E=f==null?void 0:f.additional)==null?void 0:E.body)!=null&&l.message)&&(m=`${f.additional.body.message} - ${f.message}`);const{message:h,title:A}=d(m,...p);t.A.error(h,A||"Error")},g=({action:d,success:f,error:p,notFoundRedirect:E})=>(...l)=>d(...l).then(m=>(f&&o(f,...l),m)).catch(m=>{throw E&&(m==null?void 0:m.status)===404?(s.A.report((0,r.e2)(m)),m):(n(p,m,...l),m)})},"5W3DTPWj":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("IQSYq7+p"),r=e("lDGobrly");const s=(0,r.A)({action:t.Et.prepare,error:(g,d,f)=>({message:`Preparing shares for ${f} "${d}" failed with status: ${g}`})}),o=(0,r.A)({action:t.Et.update,error:(g,d,f)=>({message:`Updating shares for ${f} "${d}" failed with status: ${g}`}),success:(g,d)=>({message:`Shares for ${d} "${g}" updated successfully`})}),n=(0,r.A)({action:t.Et.loadUserSharesPaginated,error:(g,d)=>({message:`Loading entities which got shared for user with id "${d}" failed with status: ${g}`})}),c={prepare:s,update:o,loadUserSharesPaginated:n}},"92lPlKXC":(x,y,e)=>{"use strict";e.d(y,{A:()=>A});var t=e("cSDA0Pof"),r=e("lDGobrly");const s=(0,r.A)({action:t.M.create,success:C=>({message:`User "${C==null?void 0:C.first_name} ${C==null?void 0:C.last_name}" was created successfully`}),error:(C,_)=>({message:`Creating user "${_==null?void 0:_.first_name} ${_==null?void 0:_.last_name}" failed with status: ${C}`})}),o=(0,r.A)({action:t.M.load,error:(C,_)=>({message:`Loading user with id "${_}" failed with status: ${C}`}),notFoundRedirect:!0}),n=(0,r.A)({action:t.M.loadByUsername,error:(C,_)=>({message:`Loading user with username "${_}" failed with status: ${C}`}),notFoundRedirect:!0}),c=(0,r.A)({action:t.M.update,success:(C,_,P)=>({message:`User "${P}" was updated successfully`}),error:(C,_,P,I)=>({message:`Updating user "${I}" failed with status: ${C}`})}),g=(0,r.A)({action:t.M.delete,success:(C,_)=>({message:`User "${_}" was deleted successfully`}),error:(C,_,P)=>({message:`Deleting user "${P}" failed with status: ${C}`})}),d=(0,r.A)({action:t.M.changePassword,success:()=>({message:"Password was changed successfully "}),error:(C,_)=>({message:`Changing password for user with id "${_}" failed with status: ${C}`})}),f=(0,r.A)({action:t.M.createToken,success:(C,_)=>({message:`Token "${_}" created successfully`}),error:(C,_,P)=>({message:`Creating token "${P}" for user with id "${_}" failed with status: ${C}`})}),p=(0,r.A)({action:t.M.loadTokens,error:(C,_)=>({message:`Loading tokens for user with id "${_}" failed with status: ${C}`})}),E=(0,r.A)({action:t.M.deleteToken,success:(C,_,P)=>({message:`Token "${P}" deleted successfully`}),error:(C,_,P,I)=>({message:`Deleting token "${I}" for user with id "${_}" failed with status: ${C}`})}),l=(0,r.A)({action:t.M.loadUsers,error:C=>({message:`Loading users failed with status: ${C}`})}),m=(0,r.A)({action:t.M.loadUsersPaginated,error:C=>({message:`Loading users failed with status: ${C}`})}),h=(0,r.A)({action:t.M.setStatus,success:(C,_)=>({message:`User "${C}" was set to ${_}`}),error:(C,_,P)=>({message:`Updating user ("${_}") to ${P} failed with status: ${C}`})}),A={create:s,load:o,loadByUsername:n,update:c,delete:g,changePassword:d,createToken:f,loadTokens:p,deleteToken:E,loadUsers:l,loadUsersPaginated:m,setStatus:h}},z6QEDyg6:(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("Z7aTuO5B"),r=e("DUKaTDO2"),s=e("0t7Ye+61"),o=e("d4kzUuQm"),n=e("6dLKCZdN");const g=()=>{const{pathname:d}=(0,s.A)(),{alertId:f,definitionId:p}=(0,n.A)(),E=(0,r.useQueryClient)(),l=E.getQueryData(["event-by-id",f]),m=E.getQueryData(["event-definition-by-id",p||(l==null?void 0:l.event_definition_id)]),h=m==null?void 0:m.eventDefinition,A=m==null?void 0:m.aggregations;return(0,t.useMemo)(()=>({alertId:f,definitionId:h==null?void 0:h.id,definitionTitle:h==null?void 0:h.title,isAlert:d===o.Ay.ALERTS.replay_search(f)&&l&&(l==null?void 0:l.alert),isEvent:!!f&&d===o.Ay.ALERTS.replay_search(f)&&l&&!(l!=null&&l.alert),isEventDefinition:!!p&&d===o.Ay.ALERTS.DEFINITIONS.replay_search(p)&&!!h,eventData:l,eventDefinition:h,aggregations:A}),[f,h,d,l,p,A])}},q2j1bVbz:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("fGU5yqDp");const o=()=>{const n=(0,t.useContext)(r.A);if(!n)throw new Error("useCurrentUser hook needs to be used inside CurrentUserContext.Provider");return n}},a5C0HdYb:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("vlOILx1C"),s=e("Mx+G+HdB"),o=e.n(s);const c=(g,d=200)=>{const[f,p]=(0,t.useState)({width:0,height:0}),E=o()(l=>p(l),d);return(0,t.useLayoutEffect)(()=>{if(g&&"current"in g&&g.current){const{width:l,height:m}=g.current.getBoundingClientRect();p({width:l,height:m})}},[g]),(0,r.A)(g,({contentRect:{width:l,height:m}})=>{E({width:l,height:m})}),f}},"0k5v4UPt":(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("DUKaTDO2"),r=e("jAGDuYSC"),s=e("eFxcQyPT"),o=e("MdYBRjRJ");const n=f=>(0,o.H3)(`/events/${f}`),c=f=>(0,s.Ay)("GET",n(f)).then(p=>p.event),d=(f,{onErrorHandler:p}={})=>{const{data:E,refetch:l,isLoading:m,isFetched:h}=(0,t.useQuery)(["event-by-id",f],()=>c(f),{onError:A=>{p&&p(A),r.A.error(`Loading event or alert failed with status: ${A}`,"Could not load event or alert")},keepPreviousData:!0,enabled:!!f});return{data:E,refetch:l,isLoading:m,isFetched:h}}},zJE5UjMB:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("RCNj0OY4");const s=o=>t.A.isFeatureEnabled(o)},"D/X+X5ed":(x,y,e)=>{"use strict";e.d(y,{Ay:()=>h,ZC:()=>f,gU:()=>p});var t=e("J6SvWOit"),r=e("Z7aTuO5B"),s=e("/MzrwdNa"),o=e("zJE5UjMB"),n=e("8OvTct/Z"),c=e("0t7Ye+61"),g=e("MdYBRjRJ"),d=e("v4GbOr/o");const f=",",p="+",E={preventDefault:!0,enabled:!0,enableOnContentEditable:!1,combinationKey:p,splitKey:f,keyup:void 0,keydown:!0,description:void 0,document:void 0,ignoreModifiers:!1,displayInOverview:void 0},l=(A,C,_)=>{if(!A[_])throw Error(`Scope "${_}" does not exist in hotkeys collection.`);if(!A[_].actions[C])throw Error(`Action "${C}" does not exist in hotkeys collection of "${_}" scope.`)},h=({actionKey:A,callback:C,scope:_,options:P,dependencies:I,telemetryAppPathname:M})=>{var O,U,W;if(!(0,o.A)("frontend_hotkeys"))return null;const j=(0,c.A)(),G=(0,n.A)(),{hotKeysCollections:k,addActiveHotkey:Q,removeActiveHotkey:ne}=(0,s.A)();l(k,A,_);const z=(0,r.useMemo)(()=>({...E,...P,scopes:_}),[P,_]),le=(0,r.useCallback)((V,me)=>{var Pe,Ve,at;G(d.g.SHORTCUT_TYPED,{app_pathname:M!=null?M:(0,g.i)(j.pathname),event_details:{actionKey:A,scope:_,keys:(at=(Ve=(Pe=k==null?void 0:k[_])==null?void 0:Pe.actions)==null?void 0:Ve[A])==null?void 0:at.keys}}),C(V,me)},[A,C,k,j.pathname,_,G,M]);return(0,r.useEffect)(()=>(Q({scope:_,actionKey:A,options:{scope:_,enabled:z.enabled,displayInOverview:z.displayInOverview,combinationKey:z.combinationKey,splitKey:z.splitKey}}),()=>ne({scope:_,actionKey:A})),[A,Q,_,ne,z.combinationKey,z.enabled,z.displayInOverview,z.splitKey]),(0,t.vC)((W=(U=(O=k==null?void 0:k[_])==null?void 0:O.actions)==null?void 0:U[A])==null?void 0:W.keys,le,z,I)}},"/MzrwdNa":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("k5v4N6a1");const o=()=>(0,t.useContext)(r.A)},"2ufZf/Iw":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("F5HruJCi");const o=()=>(0,t.useContext)(r.A)},"64CQykkG":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("+44s4X7G");const o=()=>(0,t.useContext)(r.A)},rVdVsuGH:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>p,ZE:()=>d});var t=e("oCSEoDew"),r=e.n(t),s=e("yAXMqwrl"),o=e("Z7aTuO5B"),n=e("0t7Ye+61"),c=e("brbjQOmY");const g=1,d=[10,20,50,100],p=(E=d,l=d[0],m=!0)=>{const{page:h,pageSize:A}=(0,c.A)(),C=(0,s.useNavigate)(),{search:_,pathname:P}=(0,n.A)(),I=P+_,M=Number(h),O=Number.isInteger(M)&&M>0?M:g,U=Number(A),K=m&&Number.isInteger(U)&&E!=null&&E.includes(U)?U:l,j=(0,o.useCallback)(({page:k=O,pageSize:Q=K})=>{const ne=new(r())(I).setSearch({page:k,pageSize:m?String(Q):void 0});C(ne.toString())},[C,O,K,I,m]),G=(0,o.useCallback)(()=>{j({page:g})},[j]);return{page:O,resetPage:G,pageSize:K,setPagination:j}}},"0hhBr0/b":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("QL8i6bcz");const o=n=>(0,t.useMemo)(()=>r.d.exports(n),[n])},leXY1Rul:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("DUKaTDO2"),r=e("eFxcQyPT"),s=e("MdYBRjRJ"),o=e("U1Iufsob"),n=e("jAGDuYSC");function c(){return(0,r.Ay)("GET",(0,s.H3)(o.A.EntityScopeController.getScope().url))}const d=f=>{var p;const{data:E,isLoading:l,error:m}=(0,t.useQuery)(["scope-permissions"],c,{onError:()=>n.A.error(m.message),retry:1,cacheTime:108e5,staleTime:108e5}),h=((p=f==null?void 0:f._scope)==null?void 0:p.toUpperCase())||"DEFAULT",A=l?{is_mutable:!1}:E.entity_scopes[h];return{loadingScopePermissions:l,scopePermissions:A}}},"d4iC/0eA":(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("8fnsnG21"),s=e("PYFLluwn");const n=()=>{const{searchesClusterConfig:c}=(0,r.P)(s.o);return(0,t.useEffect)(()=>{s.K.refresh()},[]),{config:c,refresh:s.K.refresh}}},"O/XpfGnR":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("nrvTDoPl");const o=()=>{const n=(0,t.useContext)(r.A);if(!n)throw new Error("useUserDateTime hook needs to be used inside UserDateTimeContext.Provider");return n}},IhaIlPK3:(x,y,e)=>{"use strict";var t=e("oCSEoDew"),r=e.n(t),s=e("RCNj0OY4");const o=s.A.gl2DevMode()?"/":"/assets/";e.p=r().joinPaths(s.A.gl2AppPathPrefix(),o).path()||o;var n=e("Z7aTuO5B"),c=e("iOQmVXNl"),g=e("JnTtTRmZ"),d=e.n(g),f=e("QL8i6bcz"),p=e("8jTixuP6"),E=e("ii0bleBb"),l=e.n(E),m=e("J6y4/h8P"),h=e("+Ej1FZHV"),A=e("W1tzA0ec"),C=e("Fg5/d7Qn"),_=e("u2QUEJU3"),P=e("qQvt58D8"),I=e("MdYBRjRJ"),M=e("32EwkrXd");const O=(0,m.default)(_.A)` margin-left: 6px; `,U=({server:i})=>{const[a,u]=(0,n.useState)(!1),T=()=>u(!a),R=()=>{if(!a)return null;const F=n.createElement("div",null,n.createElement("hr",null),n.createElement("p",null,"There is no information available."));if(!(i!=null&&i.error))return F;const{error:$}=i,X=[];if($.message&&X.push(n.createElement("dt",{key:"error-title"},"Error message"),n.createElement("dd",{key:"error-desc"},$.message)),$.originalError){const{originalError:se}=$;X.push(n.createElement("dt",{key:"status-original-request-title"},"Original Request"),n.createElement("dd",{key:"status-original-request-content"},String(se.method)," ",String(se.url))),X.push(n.createElement("dt",{key:"status-code-title"},"Status code"),n.createElement("dd",{key:"status-code-desc"},String(se.status))),typeof se.toString=="function"&&X.push(n.createElement("dt",{key:"full-error-title"},"Full error message"),n.createElement("dd",{key:"full-error-desc"},se.toString()))}return X.length===0?F:n.createElement("div",null,n.createElement("hr",{style:{marginTop:10,marginBottom:10}}),n.createElement("p",null,"This is the last response we received from the server:"),n.createElement(C.A,{bsSize:"small",style:{whiteSpace:"pre-line"}},n.createElement("dl",{style:{marginBottom:0}},X)))};return n.createElement(P.A,{title:"Server unavailable"},n.createElement(M.A,null,n.createElement(A.A,{show:!0,onHide:()=>{}},n.createElement(A.A.Header,null,n.createElement(A.A.Title,null,n.createElement(_.A,{name:"warning"})," ","Server currently unavailable")),n.createElement(A.A.Body,null,n.createElement("div",null,n.createElement("p",null,"We are experiencing problems connecting to the Graylog server running on ",n.createElement("i",null,(0,I.H3)("")),". Please verify that the server is healthy and working correctly."),n.createElement("p",null,"You will be automatically redirected to the previous page once we can connect to the server."),n.createElement("p",null,"Do you need a hand?"," ",n.createElement("a",{href:"https://www.graylog.org/community-support",rel:"noopener noreferrer",target:"_blank"},"We can help you"),"."),n.createElement("div",null,n.createElement(h.A,{bsStyle:"primary",tabIndex:0,onClick:T,bsSize:"sm"},a?"Less details":"More details",n.createElement(O,{name:a?"expand_less":"expand_more"})),R()))))))};U.propTypes={server:l().object},U.defaultProps={server:void 0};const W=U;var K=e("8fnsnG21"),j=e("OZCvPLBd"),G=e("LO+0FfLw"),k=e("J1ga+jW6"),Q=e("rjGM+nrz"),ne=e("pc+thvZE"),z=e("hGbrjJvL"),le=e("Ds5vWZ1u");const V=(0,p.A)(()=>e.e("bb8c8232-3883").then(e.bind(e,"G/46AKiQ"))),me=(0,p.A)(()=>e.e("bb8c8232-8052").then(e.bind(e,"on2+SG6N"))),Pe=(0,p.A)(()=>e.e("bb8c8232-689").then(e.bind(e,"uJvOUXGX"))),Ve=2e4,at=({children:i})=>n.createElement(z.A,{userIsLoggedIn:!1},n.createElement(le.A,null),i),he=()=>{const i=(0,K.P)(k.y,T=>T==null?void 0:T.currentUser),a=(0,K.P)(Q.K,T=>T==null?void 0:T.server),u=(0,K.P)(ne.SessionStore,T=>{var R;return(R=T==null?void 0:T.username)!=null?R:""});return(0,n.useEffect)(()=>{const T=setInterval(Q.K.ping,Ve);return()=>clearInterval(T)},[]),a.up===!1?n.createElement(at,null,n.createElement(W,{server:a})):u?i?n.createElement(Pe,null):n.createElement(at,null,n.createElement(me,{text:"We are preparing Graylog for you..."})):n.createElement(at,null,n.createElement(V,null))};var Ie=e("U1Iufsob"),Re=e("jAGDuYSC"),ce=e("eFxcQyPT"),Ee=e("IA3Ku5lS");const ae=(0,Ee.rN)("customization.actions",()=>g.createActions({update:{asyncResult:!0},get:{asyncResult:!0}})),ye=Ie.A.ClusterConfigResource.config().url,ve=(0,Ee.Bv)("customization.store",()=>d().createStore({listenables:[ae],customization:{},getInitialState(){return{customization:this.customization}},get(i){const a=(0,ce.Ay)("GET",this._url(`/${i}`));a.then(u=>(this.customization={...this.customization,[i]:u},this.propagateChanges(),u)),ae.get.promise(a)},update(i,a){const u=(0,ce.Ay)("PUT",this._url(`/${i}`),a);u.then(T=>(this.customization={...this.customization,[i]:T},this.propagateChanges(),T),T=>{Re.A.error(`Update failed: ${T}`,`Could not update customization: ${i}`)}),ae.update.promise(u)},propagateChanges(){this.trigger(this.getState())},getState(){return{customization:this.customization}},_url(i){return(0,I.H3)(ye+i)}})),_e={},He=n.createContext(_e),je=(0,Ee.Gr)("contexts.CustomizationContext",()=>He),Qe=({children:i})=>{const a=(0,K.P)(ve,u=>u.customization);return a?n.createElement(je.Provider,{value:a},i):i};Qe.propTypes={children:l().node.isRequired};const zt=Qe;var xe=e("/yh+QgO6"),Ue=e.n(xe),ke=e("d4kzUuQm"),Se=e("/XAQvyuM"),Je=e("PPrdvEmz"),nt=e.n(Je),Wt=e("Q29gfrW7"),Le=e.n(Wt),Fe=e("VPaD/Np4"),qe=e.n(Fe);const ut={convert(i){const a=qe().Map().withMutations(u=>{nt()(i.messages,T=>{Le()(T.message,(R,B)=>{u.mergeWith((F,$)=>F+$,qe().Map([[B,1]]))})})});return{id:i.id,effectiveTimerange:i.effective_timerange,type:i.type,messages:i.messages,total:i.total_results,fields:a}}};var ft=e("9oVghaOd"),Ot=e.n(ft),Lt=e("3+X6e5zE");const an=i=>Ot().unix(i).format("YYYY-MM-DD HH:mm:ss"),Ft=i=>{const a=qe().OrderedMap(i);return[{type:"bar",x:a.keySeq().map(an).toArray(),y:a.valueSeq().toArray(),name:"took_ms"}]};function rn({data:i}){return n.createElement(Lt.A,{data:Ft(i.results),style:{position:"absolute"},layout:{margin:{t:10,pad:10}},config:{displayModeBar:!1}})}rn.propTypes={data:l().shape({config:l().shape({timerange:l().object.isRequired}).isRequired,interval:l().string.isRequired,timerange:l().object.isRequired,results:l().object.isRequired}).isRequired};var $t=e("nxMFMmDQ"),be=e("IOI9nV80"),yn=e("0+7ljD5O"),Kt=e("jlRcBdjT"),An=e("PmoDOvRy"),qt=e("Xt0X5Kl4"),io=e("hOf/Kwna"),Be=e("7VrSCphN"),bn=e("Wk8izdHL");const gn=(i,a)=>`Sort ${i} ${a.direction}`,wn=(i,a,u,T,R)=>{const B=[new bn.A(bn.A.PIVOT_TYPE,u,i)];R(!0),T(B).then(()=>{R(!1)})},Zn=(i,a)=>i.sort&&i.sort.length>0&&i.sort[0].field===a,Vn={tooltip:i=>gn(i,Be.A.Descending),handleSortChange:i=>i(Be.A.Descending)},po={tooltip:i=>gn(i,Be.A.Ascending),handleSortChange:i=>i(Be.A.Ascending)},De={tooltip:i=>gn(i,An.He),handleSortChange:i=>i(An.He)},ln=(i,a)=>{switch(Zn(i,a)?i.sort[0].direction.direction:null){case Be.A.Ascending.direction:return Vn;case Be.A.Descending.direction:return po;default:return De}},bt=({fieldName:i,config:a,onSortChange:u,setLoadingState:T})=>{const R=X=>wn(X,a,i,u,T),B=Zn(a,i)?a.sort[0].direction.direction:null,{tooltip:F,handleSortChange:$}=ln(a,i);return n.createElement(be.yc,{activeDirection:B,onChange:()=>$(R),title:F(i)})};bt.propTypes={config:qt.A.instanceOf(An.Ay).isRequired,fieldName:l().string.isRequired,onSortChange:l().func.isRequired,setLoadingState:l().func.isRequired};const It=bt;var En=e("SnOQy/BL"),Xt=e("y2LHvPyS"),Ye=e("0hhBr0/b");const Ct=({children:i})=>{const a=(0,Ye.A)("views.components.widgets.messageTable.contextProviders");return!a||(a==null?void 0:a.length)===0?i:a.reduce((u,T)=>n.createElement(Xt.tH,{FallbackComponent:()=>u},n.createElement(T,null,u)),i)};var Bt=e("/LHc6A/9"),Ze=e("jcqbe10s"),gt=e("GFJVQ2dX");const cn=m.default.table(({theme:i})=>(0,m.css)` position: relative; font-size: ${i.fonts.size.small}; margin: 0; border-collapse: collapse; width: 100%; word-break: break-all; > tbody > tr > td { border-color: ${i.colors.table.row.border}; } @media print { font-size: ${i.fonts.size.body}; padding-left: 0; min-width: 50%; th { font-weight: bold !important; font-size: inherit !important; white-space: break-spaces !important; word-break: break-all !important; } th, td { border: 1px ${i.colors.gray[80]} solid !important; left: 0; padding: 5px !important; position: static; } } `),un=m.default.div(({theme:i})=>(0,m.css)` display: flex; flex-direction: column; overflow: auto; /* Fixes overflow of children with position: fixed */ clip-path: inset(0 0 0 0); @media screen and (max-width: ${i.breakpoints.max.md}) { &.table-responsive { overflow-y: auto; } } `),_n=(i,a)=>(a&&a.find(u=>u.name===i)||{type:Kt.Ay.Unknown}).type,vn=i=>i.map(a=>({fields:a.message,formatted_fields:yn.A.filterFields(a.message),id:a.message._id,index:a.index,highlight_ranges:a.highlight_ranges,decoration_stats:a.decoration_stats})),Ln=(i,a,u,T)=>{let R;a.contains(i)?R=a.delete(i):(R=a.add(i),T()),u(R)},Xn=({fields:i,activeQueryId:a,messages:u,config:T,onSortChange:R,setLoadingState:B,scrollContainerRef:F})=>{const{stopAutoRefresh:$}=(0,Bt.A)(),[X,se]=(0,n.useState)(Fe.Set()),de=(0,n.useMemo)(()=>vn(u),[u]),ge=(0,n.useMemo)(()=>{var We;return Fe.OrderedSet((We=T==null?void 0:T.fields)!=null?We:[])},[T==null?void 0:T.fields]),fe=(0,n.useCallback)(We=>Ln(We,X,se,$),[X,$]);return n.createElement(Ct,null,n.createElement(un,{className:"table-responsive",id:"sticky-augmentations-container",ref:F},n.createElement(cn,{className:"table table-condensed"},n.createElement(Ze.nd,null,n.createElement("tr",null,ge.toSeq().map(We=>{const lt=_n(We,i),it=lt.isCompound();return n.createElement(Ze.M_,{key:We,$isNumeric:lt.isNumeric()},n.createElement(En.A,{type:lt,name:We,queryId:a},We),n.createElement(gt.A.Consumer,null,yt=>yt&&!it&&n.createElement(It,{fieldName:We,onSortChange:R,setLoadingState:B,config:T})))}).toArray())),de.map(We=>{const lt=`${We.index}-${We.id}`;return n.createElement(io.Ok,{fields:i,key:lt,message:We,config:T,showMessageRow:T==null?void 0:T.showMessageRow,selectedFields:ge,expanded:X.contains(lt),toggleDetail:fe,expandAllRenderAsync:!1})}))))};Xn.propTypes={activeQueryId:l().string.isRequired,config:qt.A.instanceOf(An.Ay).isRequired,fields:qt.A.FieldListType.isRequired,messages:l().arrayOf(l().object).isRequired,onSortChange:l().func.isRequired,setLoadingState:l().func.isRequired};const no=n.memo(Xn);var Wo=e("9FNnmA1r"),Co=e("TkfAb49d"),Fo=e("yEuO7gC5"),rt=e("N3RHy9gr"),Mt=e("kmCB/Byf"),Rt=e("NS75yjmB"),fn=e("YcvsU7cw");const Dn=(0,Mt.Mz)(Rt.or,i=>i==null?void 0:i.searchTypes),ro=()=>(0,fn.A)(Dn);var Gn=e("orDZ6Vj2"),vo=e("LqPK8SLb"),yo=e("oMyijaIY"),lo=e("KAQaaMh7"),Jn=e("YX1HQgTG");const Gt=(i,a)=>(u,T,{searchExecutors:R})=>{const B=T(),F=(0,lo.kK)(B),$=F==null?void 0:F.query,X=(0,lo.I0)(B),se=(0,Rt.sf)(B),de=Object.keys(i),ge=new vo.A(a,$,de,i),fe=new yo.Ay(X,ge),We=lt=>{const{result:it,widgetMapping:yt}=lt,Tt=it.getSearchTypesFromResponse(de),{result:Yt}=(0,lo.CY)(T());return{result:Yt.updateSearchTypes(Tt),widgetMapping:yt}};return u((0,Jn.b4)(se,[],fe,{...R,resultMapper:We}))};var tn=e("cFn5u42x"),Qt=e("pLyxMSSz");const Bn=m.default.div` display: flex; flex-direction: column; height: 100%; overflow: hidden; .pagination { margin-bottom: 0; } `,co=(i,a)=>{const u=(0,n.useCallback)(()=>{a!==1&&i({currentPage:1,pageErrors:[]})},[a,i]);(0,tn.A)(u)},$n=i=>{const a=(0,n.useRef)();return(0,n.useEffect)(()=>{a.current&&(a.current.scrollTop=0)},[i,a]),a},To=()=>{const i=(0,n.useContext)(Qt.A);(0,n.useEffect)(()=>{Fo.j.list().then(()=>i&&i())},[i])},xo=({config:i,data:{id:a,messages:u,total:T},fields:R,onConfigChange:B,pageSize:F,setLoadingState:$})=>{const[{currentPage:X,pageErrors:se},de]=(0,n.useState)({pageErrors:[],currentPage:1}),{stopAutoRefresh:ge}=(0,Bt.A)(),fe=(0,rt.A)(),We=ro(),lt=$n(X),it=(0,Gn.A)();co(de,X),To();const yt=(0,n.useCallback)(Yt=>{const{effectiveTimerange:hn}=We[a],In={[a]:{limit:F,offset:F*(Yt-1)}};ge(),$(!0),it(Gt(In,hn)).then(Qn=>{const{result:to}=Qn.payload;$(!1),de({pageErrors:to.errors,currentPage:Yt})})},[it,F,a,We,$,ge]),Tt=(0,n.useCallback)(Yt=>{const hn=i.toBuilder().sort(Yt).build();return B(hn)},[i,B]);return n.createElement(Co.A,null,n.createElement(Bn,null,n.createElement(be.OW,{onChange:yt,activePage:Number(X),showPageSizeSelect:!1,totalItems:T,pageSize:F,useQueryParameter:!1},se!=null&&se.length?n.createElement(Wo.A,{errors:se}):n.createElement(no,{activeQueryId:fe,config:i,scrollContainerRef:lt,fields:R,onSortChange:Tt,setLoadingState:$,messages:u}))))};xo.propTypes={onConfigChange:l().func,pageSize:l().number},xo.defaultProps={onConfigChange:()=>Promise.resolve(),pageSize:$t.B2.DEFAULT_LIMIT};const Ps=xo;var bo=e("FYGzXHJc"),Ro=e("d2pcYUML"),No=e("l8tl93Rz");const fs=({field:i,contexts:{widget:a}})=>u=>{const T=[].concat(a.config.fields,[i]),R=a.config.toBuilder().fields(T).build();return u((0,No.Ox)(a.id,R))},Ds=({contexts:{widget:i},field:a})=>Ro.A.isMessagesWidget(i)&&i.config?!(i.config.fields||[]).includes(a):!1,Os=({contexts:{widget:i}})=>!i;fs.isEnabled=Ds,fs.isHidden=Os;const hs=fs,$s=({field:i})=>async(a,u)=>{const R=(0,Rt.u3)(u()).map(B=>{if(B.type.toUpperCase()===Ro.A.type.toUpperCase()){const F=[].concat(B.config.fields,[i]),$=B.config.toBuilder().fields(F).build();return B.toBuilder().config($).build()}return B}).toList();return a((0,No.Ru)(R))};var Ts=e("L2qXWCIB"),re=e("64Qr82UM"),we=e("ugp+BYjv"),et=e("/QVctsfe"),Et=e("fCul1Qwh"),wt=e("7J1sc9Ol");const Pn=(i,a)=>{let u=i;const{filter:T,query:R,streams:B,timerange:F}=a;return T&&(u=u.filter(T)),R&&(u=u.query(R)),B&&(u=u.streams(B)),F&&(u=u.timerange(F)),u},Fn=({field:i,type:a,contexts:{widget:u=re.A.empty()}})=>T=>{const R=et.A.builder().newId().config(Et.A.builder().rowPivots([(0,we.A)(i,a)]).series([wt.Ay.forFunction("count()"),wt.Ay.forFunction("percentage()")]).visualization(Ze.Ay.type).build()),B=Pn(R,u).build();return T((0,No.QD)(B))},go=({field:i,contexts:{widget:a=re.A.empty()}})=>u=>{const T=(0,wt.Tn)(i)?wt.Ay.forFunction(i):wt.Ay.forFunction(`avg(${i})`),R=Et.A.builder().rowPivots([(0,we.A)($t.WK,Kt.yw.DATE())]).series([T]).visualization("line").rollup(!0).build(),B=et.A.builder().newId().config(R),F=Pn(B,a).build();return u((0,No.QD)(F))};var Eo=e("sG4r5TYi"),Lo=e("o+5fKqZg"),Mn=e("Lc2t2FX7");const On=l().arrayOf(l().shape({label:l().string.isRequired,value:l().string.isRequired})),ko=qt.A.instanceOf(Lo.Ay),Ke=l().arrayOf(ko),dt=qt.A.instanceOf(wt.Ay),ht=l().arrayOf(dt),Pt=l().arrayOf(l().string),dn=l().string,jt=qt.A.instanceOf(Mn.A),nn=qt.A.instanceOf(Et.A),Rn=l().objectOf(l().arrayOf(l().object)),Wn=["linear","logarithmic"],xn="linear",So="group";class zn extends Mn.A{constructor(a,u){super(),this._value={barmode:a,axisType:u}}get barmode(){return this._value.barmode}get axisType(){return this._value.axisType}get opacity(){return this.barmode==="overlay"?.75:1}toBuilder(){const{barmode:a,axisType:u}=this._value;return new Ao({barmode:a,axisType:u})}static create(a,u=xn){return new zn(a,u)}static empty(){return zn.create(So)}toJSON(){const{barmode:a,axisType:u}=this._value;return{barmode:a,axis_type:u}}static fromJSON(a,u){const{barmode:T,axis_type:R}=u;return zn.create(T,R)}}class Ao{constructor(a){this.value=Object.freeze({...a})}barmode(a){return new Ao({...this.value,barmode:a})}axisType(a){return new Ao({...this.value,axisType:a})}build(){const{barmode:a,axisType:u}=this.value;return new zn(a,u)}}var Jo=e("Jy5RbH6g"),Ko=e.n(Jo),fo=e("cIqNHR1g"),$o=e.n(fo),es=e("+KM7MH1U"),vs=e.n(es),Us=e("XA6XhKoX"),ga=e.n(Us),ts=e("IZYxBTgT");const ds=(i,a,u)=>{if(a.length===0)return i;const T=i.slice();return a.forEach(R=>{if(T[R]){const B=T[R];T[R]=(0,ts.vd)(B)?u(T[R],"internal"):B}}),T},ys=(i,a)=>i.map((u,T)=>({value:u,idx:T})).filter(({value:u})=>a(u)).map(({idx:u})=>u),Ns=(i,a,u)=>(T=[])=>{const R=ys(i,F=>F.type==="time"),B=ys(a,F=>F.type==="time");return R.length===0&&B.length===0?T:T.map(F=>{if(F.source!=="leaf")return F;const $={...F};return $.key=ds(F.key,R,u),B.length>0&&($.values=F.values.map(X=>{if(X.source!=="col-leaf")return X;const se={...X};return se.key=ds(X.key,B,u),se})),$})},qs="\u2E31",_o="-",Gs=i=>i.join(qs),ea=({type:i,name:a,labels:u,values:T,originalName:R})=>({type:i,name:a,x:u,y:T,originalName:R}),js=(i,a=({source:u})=>u.endsWith("leaf"))=>Ko()(i.map(u=>u.values.filter(T=>a(T)).map(T=>[u.key,T]))),ta=({valuesBySeries:i={},xLabels:a=[]})=>Object.keys(i).map(u=>[u,a,i[u],[]]),cs=i=>i.source==="leaf",Rs=i=>i.filter(cs),na=i=>i.map(({key:a})=>a),Ea=(i=Gs,a=void 0)=>u=>{const T=Rs(u),R=na(T),B=js(T,a),F={};return B.forEach(([$,X])=>{const se=i(X.key),de=R.findIndex(ge=>vs()(ge,$));X.value!==null&&X.value!==void 0&&ga()(F,[se,de],X.value)}),{valuesBySeries:F,xLabels:R}},Ga=(i,a=ea,u=void 0,T=R=>R)=>{const R=u.columnPivots.flatMap(B=>B.fields);return B=>{const F=B.map(([$,X,se,de])=>({type:i,name:$.split(qs).map((ge,fe)=>R[fe]?T(ge,R[fe]):ge).join(_o),labels:X.map(ge=>ge.join(qs)),values:se,data:de,originalName:$}));return F.map(($,X)=>a({...$,idx:X,total:F.length,config:u}))}},mr=()=>i=>i.map(([a,u,T,R])=>{const B=Array.from(T).reduce((X,se,de)=>se==null?[...X,de]:X,[]),F=u.filter((X,se)=>!B.includes(se)),$=T.filter((X,se)=>!B.includes(se));return[a,F,$,R]}),ja=i=>i.length>1?i.slice(0,-1).join(qs):i[0],Hs=(i,{chartType:a,widgetConfig:u,generator:T=ea,seriesFormatter:R=ta,leafValueMatcher:B,formatTime:F,mapKeys:$})=>{const{rowPivots:X,columnPivots:se,series:de}=u;return $o()([Ns(X,se,F),Ea(de.length===1?ja:void 0,B),R,mr(),Ga(a,T,u,$)])(i)};var Ca=e("O/XpfGnR"),ks=e("gvNRgdyu"),pe=e("hC1XaH+L"),Ae=e("2ufZf/Iw"),$e=e("64CQykkG");const Xe=i=>`${i.short_node_id} / ${i.hostname}`,xt=()=>{const i=(0,n.useContext)(ks.A),a=(0,n.useMemo)(()=>{var $;return Object.fromEntries(($=i==null?void 0:i.map(X=>[X.id,X]))!=null?$:[])},[i]),u=(0,$e.A)(),T=(0,Ae.A)(),R=(0,n.useContext)(pe.A),B=(0,rt.A)(),F=(0,n.useMemo)(()=>{var $;return($=R==null?void 0:R.queryFields)==null?void 0:$.get(B)},[B,R==null?void 0:R.queryFields]);return(0,n.useCallback)(($,X)=>{var se,de,ge,fe,We;const lt=F==null?void 0:F.find(it=>it.name===X);switch((se=lt==null?void 0:lt.type)==null?void 0:se.type){case"node":return u!=null&&u[$]?Xe(u[$]):$;case"input":return(ge=(de=T==null?void 0:T[$])==null?void 0:de.title)!=null?ge:$;case"streams":return(We=(fe=a==null?void 0:a[$])==null?void 0:fe.title)!=null?We:$;default:return $}},[F,T,u,a])},Ht=(i,a)=>{const{formatTime:u}=(0,Ca.A)(),T=xt();return(0,n.useMemo)(()=>Hs(i,{formatTime:u,mapKeys:T,...a}),[a,u,T,i])};var Zt=e("b2fGY8bZ");const Un=(i,a)=>{const{formatTime:u}=(0,Ca.A)(),T=(0,n.useCallback)(R=>u(R,"internal"),[u]);return i.eventAnnotation&&a?Zt.Ay.toVisualizationData(a,T):{eventChartData:void 0,shapes:void 0}};var ue=e("QfIEhzaE"),Te=e.n(ue),Ge=e("6nsVPoEI"),mt=e("UPOvISKg"),Dt=e("G0W2UiZR"),Jt=e("6j4Sgo2g"),mn=e("e50u4lQu"),oo=e("m/3sLmyX");const Qo=m.default.div(({color:i})=>(0,m.css)` cursor: pointer; background-color: ${i} !important; /* Needed for report generation */ -webkit-print-color-adjust: exact !important; /* Needed for report generation */ width: 12px; height: 12px; `),Po=m.default.div` display: grid; grid-template: 4fr auto / 1fr; grid-template-areas: '.' '.'; height: 100%; `,Do=m.default.div` padding: 5px; max-height: 100px; overflow: auto; `,_s=m.default.div` display: table; width: 100%; `,oa=m.default.div` display: table-row; `,jo=m.default.div` padding: 4px; display: table-cell; `,Is=m.default.div` display: flex; align-items: center; `,us=m.default.div` margin-left: 8px; line-height: 1; `,as=i=>i.map(({name:a,originalName:u})=>u!=null?u:a),pr=(i,a)=>i.length{var a,u;return(u=(a=i==null?void 0:i.columnPivots)==null?void 0:a.flatMap(T=>T.fields))!=null?u:[]},aa=({value:i,fieldTypes:a,colors:u,activeQuery:T,labelFields:R,mapKeys:B,setColor:F})=>{const[$,X]=(0,n.useState)(!1),se=i.split($t.vo).map((lt,it)=>{var yt,Tt,Yt,hn;const In=R[it],Qn=(hn=(Yt=(Tt=(yt=a==null?void 0:a.queryFields)==null?void 0:yt.get(T))==null?void 0:Tt.find(to=>to.name===In))==null?void 0:Yt.type)!=null?hn:Kt.Ay.Unknown;return{label:lt,field:In,type:Qn}}),de=i===Zt.Nc?Zt.XU:void 0,ge=se.map(({label:lt,field:it,type:yt})=>it?n.createElement(mt.A,{key:`${it}:${lt}`,type:yt,value:lt,field:it}):lt),fe=Object.values(se).map(({label:lt,field:it})=>B(lt,it)).join($t.p8),We=(0,n.useCallback)((lt,it)=>{F(lt,it),X(!1)},[F]);return n.createElement(jo,{key:i},n.createElement(Is,null,n.createElement(Jt.A,{position:"top",withArrow:!0,opened:$},n.createElement(Jt.A.Target,null,n.createElement(Qo,{"aria-label":"Color Hint",onClick:()=>X(lt=>!lt),color:u.get(i,de)})),n.createElement(Jt.A.Dropdown,{title:`Configuration for ${fe}`},n.createElement(Ge.A,{color:u.get(i,de),colors:mn.T,onChange:lt=>We(i,lt)}))),n.createElement(us,null,ge)))},Ra=({children:i,config:a,chartData:u,labelMapper:T=as,labelFields:R=sa,neverHide:B})=>{const{columnPivots:F,series:$}=a,X=T(u),{colors:se,setColor:de}=(0,n.useContext)(Dt.A),{focusedWidget:ge}=(0,n.useContext)(oo.A),fe=(0,n.useContext)(pe.A),We=(0,rt.A)(),lt=xt(),it=(0,n.useMemo)(()=>R(a),[a,R]);if(!B&&(!ge||!ge.editing)&&$.length<=1&&F.length<=0)return n.createElement(n.Fragment,null,i);const yt=X.sort(pr).map(Yt=>n.createElement(aa,{key:Yt,colors:se,value:Yt,labelFields:it,setColor:de,mapKeys:lt,fieldTypes:fe,activeQuery:We})),Tt=Te()(yt,5).map((Yt,hn)=>n.createElement(oa,{key:hn},Yt));return n.createElement(Po,null,i,n.createElement(Do,null,n.createElement(_s,null,Tt)))};Ra.defaultProps={labelFields:sa,labelMapper:as,neverHide:!1};const Ta=Ra;var ul=e("vT7mdtQI"),ra=e("9RXNqxkm"),bs=e("UmnljV2q"),fa=e("rNH0cW39");const la=(i,a,u)=>(T,R)=>{const B=(0,Rt.Hz)(R()),F=(0,Rt.o$)(R()),$={type:"absolute",from:(0,ts.to)((0,ts.Uv)(i,u),"internal"),to:(0,ts.to)((0,ts.Uv)(a,u),"internal")};return F===bs.A.Type.Dashboard?T((0,Jn.OB)($)).then(()=>T((0,Jn.g7)())):T((0,fa.H_)(B,$)),!1},gr=i=>i<150?-.6:i<400?-.2:-.14,Er=i=>{switch(i){case"linear":return"linear";case"logarithmic":return"log";default:return(0,ul.A)(i,"Unable to parse axis type: ")}},Ms=(i,a)=>{var u;return{line:{color:a.get((u=i.originalName)!=null?u:i.name)}}},Ha=({axisType:i,config:a,chartData:u,effectiveTimerange:T,setChartColor:R,height:B,plotLayout:F={},onZoom:$})=>{const{formatTime:X,userTimezone:se}=(0,Ca.A)(),ge={yaxis:{fixedrange:!0,rangemode:"tozero",tickformat:",~r",type:Er(i)},hovermode:"x"};B&&(ge.legend={y:gr(B)});const fe={...ge,...F},We=(0,Gn.A)(),lt=(0,n.useCallback)(a.isTimeline?(it,yt)=>$?$(it,yt,se):We(la(it,yt,se)):()=>!0,[a.isTimeline,$]);if(a.isTimeline&&T){const it=X(T.from,"internal"),yt=X(T.to,"internal");fe.xaxis={range:[it,yt],type:"date"}}else fe.xaxis={fixedrange:!0,type:a.sort.length>0?"category":void 0};return n.createElement(Ta,{config:a,chartData:u},n.createElement(ra.A,{chartData:u,layout:fe,onZoom:lt,setChartColor:R}))};Ha.propTypes={axisType:l().oneOf(Wn),chartData:l().array.isRequired,config:qt.A.instanceOf(Et.A).isRequired,effectiveTimerange:l().exact({type:l().string.isRequired,from:l().string.isRequired,to:l().string.isRequired}),plotLayout:l().object,setChartColor:l().func,onZoom:l().func},Ha.defaultProps={axisType:xn,plotLayout:{},setChartColor:Ms,effectiveTimerange:void 0,onZoom:void 0,height:void 0};const Nr=Ha,za=(i,a)=>{var u;return{marker:{color:a.get((u=i.originalName)!=null?u:i.name)}}},dl=(i,a,u,T)=>a.rowPivots.length!==1||a.rowPivots[0].type!==Lo.rd?i:i.map(F=>{var $;if((($=F==null?void 0:F.x)==null?void 0:$.length)===1){const se=(new Date(T)-new Date(u))*.03;return{...F,width:[Math.max(30,se)]}}return F}),ml=(0,Eo.$j)(({config:i,data:a,effectiveTimerange:u,height:T})=>{var R,B;const F=(R=i.visualizationConfig)!=null?R:zn.empty(),$={};F&&F.barmode&&($.barmode=F==null?void 0:F.barmode);const X=(B=F==null?void 0:F.opacity)!=null?B:1,se=xt(),de=(0,n.useMemo)(()=>{var hn,In;return(In=(hn=i==null?void 0:i.rowPivots)==null?void 0:hn.flatMap(Qn=>Qn.fields))!=null?In:[]},[i==null?void 0:i.rowPivots]),ge=(0,n.useCallback)(hn=>hn.map(In=>In.split($t.vo).map((Qn,to)=>se(Qn,de[to])).join($t.p8)),[se,de]),fe=(0,n.useCallback)(({type:hn,name:In,labels:Qn,values:to,originalName:Vo})=>({type:hn,name:In,x:ge(Qn),y:to,opacity:X,originalName:Vo}),[ge,X]),We=(0,n.useMemo)(()=>(0,Eo.rg)(a),[a]),lt=Ht(We,{widgetConfig:i,chartType:"bar",generator:fe}),{eventChartData:it,shapes:yt}=Un(i,a.events),Tt=it?[...lt,it]:lt,Yt=yt?{...$,shapes:yt}:$;return n.createElement(Nr,{config:i,axisType:F.axisType,chartData:dl(Tt,i,u==null?void 0:u.from,u==null?void 0:u.to),effectiveTimerange:u,setChartColor:za,height:T,plotLayout:Yt})},"bar");ml.propTypes={config:nn.isRequired,data:Rn.isRequired,height:l().number};const Va=ml;class zs extends Mn.A{constructor(a,u=xn){super(),this._value={interpolation:a,axisType:u}}get interpolation(){return this._value.interpolation}get axisType(){return this._value.axisType}toBuilder(){return new fr(Fe.Map(this._value))}static create(a,u=xn){return new zs(a,u)}static empty(){return new zs($t.p3,xn)}toJSON(){const{interpolation:a,axisType:u}=this._value;return{interpolation:a,axis_type:u}}static fromJSON(a,u){var T,R;return zs.create((T=u==null?void 0:u.interpolation)!=null?T:$t.p3,(R=u==null?void 0:u.axis_type)!=null?R:xn)}}class fr{constructor(a=Fe.Map()){this.value=a}interpolation(a){return new fr(this.value.set("interpolation",a))}axisType(a){return new fr(this.value.set("axisType",a))}build(){const{interpolation:a,axisType:u}=this.value.toObject();return new zs(a,u)}}const pl=i=>{switch(i){case"step-after":return"hv";default:return i}},gl=(0,Eo.$j)(({config:i,data:a,effectiveTimerange:u,height:T})=>{var R;const B=(R=i.visualizationConfig)!=null?R:zs.empty(),{interpolation:F="linear",axisType:$=xn}=B,X=xt(),se=(0,n.useMemo)(()=>{var Yt,hn;return(hn=(Yt=i==null?void 0:i.rowPivots)==null?void 0:Yt.flatMap(In=>In.fields))!=null?hn:[]},[i==null?void 0:i.rowPivots]),de=(0,n.useCallback)(Yt=>Yt.map(hn=>hn.split($t.vo).map((In,Qn)=>X(In,se[Qn])).join($t.p8)),[X,se]),ge=(0,n.useCallback)(({type:Yt,name:hn,labels:In,values:Qn,originalName:to})=>({type:Yt,name:hn,x:de(In),y:Qn,originalName:to,line:{shape:pl(F)}}),[de,F]),fe=(0,n.useMemo)(()=>(0,Eo.rg)(a),[a]),We=Ht(fe,{widgetConfig:i,chartType:"scatter",generator:ge}),{eventChartData:lt,shapes:it}=Un(i,a.events),yt=lt?[...We,lt]:We,Tt=it?{shapes:it}:{};return n.createElement(Nr,{config:i,plotLayout:Tt,axisType:$,effectiveTimerange:u,height:T,chartData:yt})},"line");gl.propTypes={config:nn.isRequired,data:Rn.isRequired,height:l().number};const El=gl;var ti=e("T6QWz2T7"),fl=e("y5LMk7Rh"),hr=e("BQipOvpT");class ha extends Mn.A{constructor(a,u){super(),this._value={trend:a,trendPreference:u}}get trend(){return this._value.trend}get trendPreference(){return this._value.trendPreference}toBuilder(){return new Ia(Fe.Map(this._value))}static create(a=!1,u="NEUTRAL"){return new ha(a,u)}static empty(){return ha.create(!1,"NEUTRAL")}toJSON(){const{trend:a,trendPreference:u}=this._value;return{trend:a,trend_preference:u}}equalsForSearch(a){return a&&"trend"in a&&a.trend===this.trend}static fromJSON(a,u){const{trend:T,trend_preference:R}=u;return ha.create(T,R)}}class Ia{constructor(a=Fe.Map()){this.value=a}trend(a){return new Ia(this.value.set("trend",a))}trendPreference(a){return new Ia(this.value.set("trendPreference",a))}build(){const{trend:a,trendPreference:u}=this.value.toObject();return new ha(a,u)}}var va=e("IdpefXWm"),Ec=e("9pdI12pI"),ka=e.n(Ec);const wr=(i,a="neutral")=>({good:i.colors.variant.success,bad:i.colors.variant.danger,neutral:i.colors.global.contentBackground})[a],ni=m.default.div(({theme:i,trend:a})=>{const u=wr(i,a);return(0,m.css)` text-align: right; ${a&&(0,m.css)` background-color: ${u} !important; /* Needed for report generation */ color: ${i.utils.contrastingColor(u)} !important /* Needed for report generation */; color-adjust: exact !important; /* Needed for report generation */ `} `}),Yo=m.default.div(({theme:i,trend:a})=>{const u=wr(i,a);return(0,m.css)` margin: 5px; color: ${i.utils.contrastingColor(u)} !important /* Needed for report generation */; font-family: ${i.fonts.family.body}; color-adjust: exact !important; /* Needed for report generation */`}),Qa=(0,m.default)(_.A)(({theme:i,trend:a})=>{const u=wr(i,a);return(0,m.css)` path { fill: ${i.utils.contrastingColor(u)}; }`}),Wr=(i,a)=>{switch(a){case"LOWER":return i>0?"bad":"good";case"HIGHER":return i>0?"good":"bad";case"NEUTRAL":default:return"neutral"}},fc=i=>i===0?"arrow_circle_right":i>0?"arrow_circle_up":"arrow_circle_down",oi=(i,a)=>{if(typeof i=="number"&&typeof a=="number"){const u=i-a,T=u/a;return[u,T]}return[NaN,NaN]},vr=n.forwardRef(({current:i,previous:a,trendPreference:u},T)=>{const[R,B]=oi(i,a),F=Wr(R,u),$=fc(R),X=Number.isFinite(R)?ka()(R).format("+0,0[.]0[000]"):"--",se=Number.isFinite(B)?ka()(B).format("+0[.]0[0]%"):"--";return n.createElement(ni,{trend:F,"data-testid":"trend-background"},n.createElement(Yo,{trend:F,ref:T},n.createElement(Qa,{name:$,trend:F,"data-testid":"trend-icon"})," ",n.createElement("span",{"data-testid":"trend-value",title:`Previous value: ${a}`},X," / ",se)))}),Ma=.05,yr=.8,Qs=m.default.div` height: 100%; width: 100%; font-size: ${i=>(0,m.css)`${i.fontSize}px`}; ${i=>i.$center?(0,m.css)` display: flex; justify-content: center; align-items: center; `:""} `,Xa=(i,a,u)=>{const T=i.offsetWidth,R=i.offsetHeight,B=a*yr/T,F=u*yr/R;return Math.min(B,F)},hl=i=>i!==0&&Number.isFinite(i),Fr=(i,a,u,T)=>{const[R,B]=(0,n.useState)(20);return(0,n.useEffect)(()=>{var F;const $=i?{current:{children:[i]}}:a,X=(F=$==null?void 0:$.current)==null?void 0:F.children;if(!X||X.length<=0)return;const se=X[0],de=Xa(se,T,u);if(Math.abs(1-de)<=Ma)return;const ge=Math.floor(R*de);ge!==R&&hl(ge)&&B(ge)},[i,a,R,u,T]),R},xa=({children:i,target:a,height:u,width:T,center:R})=>{const B=(0,n.useRef)(),F=Fr(a,B,u,T),$=B;return n.createElement(Qs,{$center:R,fontSize:F,ref:$},i)};xa.defaultProps={target:null,center:!1};const Ja=xa,si=m.default.div` display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr auto; grid-gap: 0; height: 100%; width: 100%; `,hc=m.default.div` display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr; grid-gap: 0; height: 100%; width: 100%; `,Ar=(0,m.default)(va.A)` height: 100%; width: 100%; padding-bottom: 10px; `,Kr=(0,m.default)(va.A)` height: 100%; width: 100%; `,_r=i=>{if(!i||!i[0])return{value:void 0,field:void 0};const a=i[0];if(a.source==="leaf"){const u=a.values.find(T=>T.source==="row-leaf");if(u&&u.source==="row-leaf")return{value:u.value,field:u.key[0]}}return{value:void 0,field:void 0}},vc=i=>{const{series:a=[]}=i;return a.length===0?void 0:a[0].function},$r=({config:i,fields:a,data:u})=>{var T;const R=(0,n.useRef)(),B=(0,n.useContext)(Qt.A),F=(T=i.visualizationConfig)!=null?T:ha.create(),$=vc(i);(0,n.useEffect)(B,[B]);const X=(0,Eo.rg)(u),se=u.trend,{value:de}=_r(X),{value:ge}=_r(se||[]);if(!$||de!==0&&!de)return n.createElement(n.Fragment,null,"N/A");const fe=F.trend?si:hc;return n.createElement(fe,null,n.createElement(Ar,{resizeDelay:20},({height:We,width:lt})=>n.createElement(Ja,{height:We,width:lt,center:!0},n.createElement(hr.A,{field:$,value:de},n.createElement(mt.A,{field:$,type:(0,ti.A)($,a),value:de,render:fl.A})))),F.trend&&n.createElement(Kr,null,({height:We,width:lt})=>n.createElement(Ja,{height:We,width:lt,target:R},n.createElement(vr,{ref:R,current:de,previous:ge,trendPreference:F.trendPreference}))))},La=(0,Eo.$j)($r,"numeric");var Gr=e("C+aLQzYd"),vl=e.n(Gr),yl=e("aG6epsDL"),Ba=e.n(yl),Cr=e("oc9db6Tt"),xs=e.n(Cr),ai=e("dcKvY45t"),Al=e("Kw0W+Qo6"),jr=e("qihsatSm"),Ss=e("I0Ijpclp"),ri=e("ss9BCvNi"),Hr=e("ww+BtWnX"),Ac=e.n(Hr),li=e("yZFI2u4Q");class ia{constructor(a,u){this._value={center:a,zoom:u}}get center(){return this._value.center}get zoom(){return this._value.zoom}toBuilder(){const{center:a,zoom:u}=this._value;return new ms(Fe.Map({center:a,zoom:u}))}static create(a,u){return new ia(a,u)}toJSON(){const{center:a,zoom:u}=this._value;return{center_x:a[0],center_y:a[1],zoom:u}}static fromJSON(a){const{center_x:u,center_y:T,zoom:R}=a;return ia.create([u,T],R)}}class ms{constructor(a=Fe.Map()){this.value=a}center(a){return new ms(this.value.set("center",a))}zoom(a){return new ms(this.value.set("zoom",a))}build(){const{center:a,zoom:u}=this.value.toObject();return new ia(a,u)}}var ii=e("dFpwyWHg"),ca=e.n(ii),Za=e("C2ikvoS0"),As=e.n(Za),Tr=e("1IntWRSu"),ws=e.n(Tr),_c=e("8nGWeFnd"),Ys=e.n(_c),ci=e("TeAcaicX"),Ws=e.n(ci),ui=e("eE3+5goe"),ua=e.n(ui),br=e("H/VBAZHe"),da={};da.styleTagTransform=ua(),da.setAttributes=Ys(),da.insert=ws().bind(null,"head"),da.domAPI=As(),da.insertStyleElement=Ws();var zr=ca()(br.A,da);const ya=br.A&&br.A.locals?br.A.locals:void 0,Vr={center:[0,0],zoom:1},qa=(i,a,u,T,R)=>{const B=(T-u)/a;return(i{const se=i.split(",").map(fe=>Number(fe)).filter(fe=>!isNaN(fe));if(se.length!==2)return null;const de=qa(a,R,u,T,B),ge=Ko()(Object.entries(X).map(([fe,We])=>[n.createElement("dt",{key:`dt-${fe}-${We}`},fe),n.createElement("dd",{key:`dd-${fe}-${We}`},We)]));return n.createElement(ai.p,{key:`${$}-${i}`,center:se,radius:de,color:F.hex(),fillColor:F.hex(),weight:2,opacity:.8},n.createElement(Al.z,null,n.createElement("dl",null,n.createElement("dt",null,"Name"),n.createElement("dd",null,$),ge,n.createElement("dt",null,"Coordinates:"),n.createElement("dd",null,i),a&&n.createElement(n.Fragment,null,n.createElement("dt",null,"Value:"),n.createElement("dd",null,a)))))},Qr=({onViewportChanged:i})=>{const a=(0,jr.ko)(),u=()=>{const{lat:T,lng:R}=a.getCenter();return i(ia.create([T,R],a.getZoom()))};return(0,jr.Po)({dragend:u,zoomend:u}),null};class Ua extends n.Component{constructor(){super(...arguments),this._isMapReady=!1,this._areTilesReady=!1,this._handleRenderComplete=()=>{if(this._areTilesReady&&this._isMapReady){const{onRenderComplete:a}=this.props;a()}},this._handleMapReady=()=>{this._isMapReady=!0,this._handleRenderComplete()},this._handleTilesReady=()=>{this._areTilesReady=!0,this._handleRenderComplete()}}componentDidMount(){li.A.use()}componentWillUnmount(){li.A.unuse()}render(){const{data:a,id:u,height:T,width:R,url:B,attribution:F,locked:$,viewport:X,onChange:se,markerRadiusSize:de,markerRadiusIncrementSize:ge}=this.props,fe=a.length,We=Ac().scale("Spectral"),lt=a.flatMap(({keys:it,name:yt,values:Tt},Yt)=>{const hn=Object.values(Tt),In=Math.min(...hn),Qn=Math.max(...hn),to=We(Yt*(1/fe));return Object.entries(Tt).map(([Vo,Mo],is)=>n.createElement(kr,{key:`${yt}-${Vo}-${Mo}`,coordinates:Vo,value:Mo,min:In,max:Qn,radiusSize:de,increment:ge,color:to,name:yt,keys:it[is]}))});return n.createElement(gt.A.Consumer,null,it=>n.createElement("div",{className:$?ya.mapLocked:"",style:{position:"relative",zIndex:0}},$&&n.createElement("div",{className:ya.overlay,style:{height:T,width:R}}),n.createElement(Ss.W,{center:X.center,boundsOptions:{maxZoom:19,animate:it},zoom:X.zoom,className:ya.map,fadeAnimation:it,key:`visualization-${u}-${R}-${T}`,id:`visualization-${u}`,markerZoomAnimation:it,scrollWheelZoom:!0,style:{height:T,width:R},whenReady:this._handleMapReady,zoomAnimation:it},n.createElement(Qr,{onViewportChanged:se}),n.createElement(ri.e,{url:B,attribution:F,eventHandlers:{load:this._handleTilesReady}}),lt)))}}Ua.propTypes={id:l().string.isRequired,data:l().arrayOf(l().object),height:l().number.isRequired,width:l().number.isRequired,url:l().string,attribution:l().string,onRenderComplete:l().func,onChange:l().func.isRequired,locked:l().bool,markerRadiusSize:l().number,markerRadiusIncrementSize:l().number,viewport:l().shape({center:l().arrayOf(l().number),zoom:l().number})},Ua.defaultProps={data:{},url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'© OpenStreetMap contributors',onRenderComplete:()=>{},locked:!1,viewport:Vr,markerRadiusSize:10,markerRadiusIncrementSize:10};const _l=Ua,Yr=([i,a,u])=>({name:i,x:a,y:u}),Cl=i=>i[i.length-1],Tl=i=>{const a=Rs(i),u=na(a);return xs()(u)?{}:{valuesBySeries:{"No metric defined":u.map(()=>null)},xLabels:u}},bl=i=>{const a=i.flatMap(u=>u.fields);return u=>u.map(({name:T,x:R,y:B})=>{const F=R.map(se=>Object.fromEntries(se.slice(0,-1).map((de,ge)=>[a[ge],de]))),$=R.map(Cl),X=vl()(Ba()($,B).filter(([se,de])=>de!==void 0));return{keys:F,name:T,values:X}})},Sr=(0,Eo.$j)(({config:i,data:a,editing:u,onChange:T,width:R,...B})=>{const{rowPivots:F}=i,$=(0,n.useContext)(Qt.A),X=!xs()(i.series),se=X?void 0:1,de=X?Ea():Tl,{formatTime:ge}=(0,Ca.A)(),fe=$o()([Ns(i.rowPivots,i.columnPivots,ge),de,ta,Tt=>Tt.map(Yr),bl(F)]),We=(0,Eo.rg)(a),lt=fe(We),it=Ue()(i,"visualizationConfig.viewport"),yt=Tt=>{u&&T({zoom:Tt.zoom,centerX:Tt.center[0],centerY:Tt.center[1]})};return n.createElement(_l,{...B,data:lt,id:"world-map",viewport:it,width:R,onRenderComplete:$,markerRadiusSize:se,onChange:yt})},"map");Sr.propTypes={config:nn.isRequired,data:Rn.isRequired,onChange:l().func.isRequired,width:l().number.isRequired};const Pr=Sr;var Sl=e("EAGCr4ZJ"),Xr=e.n(Sl),Cc=e("wXrUUKFq"),te=e.n(Cc),q=e("y9+BLtuu"),ie=e.n(q),tt=e("alU4HbhK"),ct=e.n(tt),_t=e("hD3VAVgz");const Cn=(i,a,u)=>{const T=i.series.map(B=>B.function),R=a.map(B=>T.length>1?T.find(F=>B.endsWith(F)):T.toString());return u.map(()=>R)},Io=(i,a,u)=>({type:T,name:R,labels:B,values:F,data:$,config:X})=>{const se=X.rowPivots.flatMap(Qn=>Qn.fields),de=X.columnPivots.flatMap(Qn=>Qn.fields),ge=se.join("-"),fe=de.join("-"),We=Cn(X,F,B),lt=`${ge}: %{y}
${fe}: %{x}
%{text}: %{customdata}`,{colorScale:it,reverseScale:yt,zMin:Tt,zMax:Yt}=i,hn=B.map(Qn=>a(Qn,se[0])),In=F.map(Qn=>a(Qn,de[0]));return{type:T,name:R,x:In,y:hn,z:$,text:We,customdata:$,hovertemplate:lt,colorscale:it,reversescale:yt,zmin:Tt,zmax:Yt,originalName:R,colorbar:{tickfont:{color:u.colors.global.textDefault}}}},wo=(i,a,u="None")=>i.map(T=>{const R=ie()(Array(a.length),u);return te()(R,T)}),Oo=(i=[])=>i[0]?i[0].map((a,u)=>i.map(T=>T[u])):i,Ho=i=>i.reduce((a,u)=>u.reduce((T,R)=>T>R?R:T,a),(i[0]||[])[0]),ns=i=>({valuesBySeries:a,xLabels:u})=>{var T;const R=Xr()(a),B=i.useSmallestAsDefault?Ho(R):(T=i.defaultValue)!=null?T:"None",F=Oo(wo(R,u,B)),$=Object.keys(a);return[["Heatmap Chart",u,$,F]]},zo=i=>{const a={type:void 0,fixedrange:!0};return i&&(a.type="category"),a},ps=i=>{const a=ct()(i,T=>!xs()(T.z)),u=zo(a);return{yaxis:u,xaxis:u,margin:{b:40}}},ma=({source:i})=>i.endsWith("leaf")&&i!=="row-leaf",Fs=(0,Eo.$j)(({config:i,data:a})=>{var u;const T=(0,m.useTheme)(),R=(u=i.visualizationConfig)!=null?u:_t.Ay.empty(),B=(0,Eo.rg)(a),F=xt(),$=Ht(B,{widgetConfig:i,chartType:"heatmap",generator:Io(R,F,T),seriesFormatter:ns(R),leafValueMatcher:ma}),X=ps($);return n.createElement(ra.A,{chartData:$,layout:X})},"heatmap");Fs.propTypes={config:nn.isRequired,data:Rn.isRequired};const Ks=Fs;var Vs=e("7GNmVOX8"),Aa=e("mTnbNx1k"),rs=e("FfX57J1C");class gs extends Mn.A{constructor(a,u=xn){super(),this._value={interpolation:a,axisType:u}}get interpolation(){return this._value.interpolation}get axisType(){return this._value.axisType}toBuilder(){return new Zo(Fe.Map(this._value))}static create(a,u=xn){return new gs(a,u)}static empty(){return gs.create($t.p3)}toJSON(){const{interpolation:a,axisType:u}=this._value;return{interpolation:a,axis_type:u}}static fromJSON(a,u){var T,R;return gs.create((T=u==null?void 0:u.interpolation)!=null?T:$t.p3,(R=u==null?void 0:u.axis_type)!=null?R:xn)}}class Zo{constructor(a=Fe.Map()){this.value=a}interpolation(a){return new Zo(this.value.set("interpolation",a))}build(){const{interpolation:a,axisType:u}=this.value.toObject();return new gs(a,u)}}var Y=e("rIl5IEuP"),Na=e("dsvqAVKU");const Pl="pinned-field-charts",Jr="pinned-field-charts-migrated",_a=m.default.div` margin-top: 10px; `,ba=i=>{switch(i){case"total":return"sum";case"mean":return"avg";case"cardinality":return"card";default:return i}},er=(i,a)=>`${ba(i)}(${a})`,di=i=>{switch(i){case"scatterplot":return"scatter";case"line":case"area":case"bar":return i;default:throw new Error(`Unsupported visualization ${i}`)}},Ju=i=>{switch(i){case"quarter":return{unit:"months",value:3};default:return{unit:`${i}s`,value:1}}},Zu=i=>{switch(i){case"basis":case"bundle":case"cardinal":case"monotone":return"spline";case"linear":case"step-after":return i;default:throw new Error(`Unsupported interpolation ${i}`)}},Tc=(i,a)=>{const u=Zu(i);switch(a){case"line":return zs.create(u);case"area":return gs.create(u);default:return}},qu=(i,a)=>{const u={...i};return Object.keys(u).forEach(T=>{const R=u[T];u[T]=R.toBuilder().row(R.row+a).build()}),u},Bp=i=>async(a,u)=>{const{defaultHeight:T}=(0,Aa._Q)(et.A.type),R=(0,Rt.td)(u()),B=(0,Rt.Hz)(u()),F={},$=i.map((ge,fe)=>{const{field:We}=ge,lt=new wt.Ay(er(ge.valuetype,We)),it={interval:{type:"timeunit",...Ju(ge.interval)}},yt=Lo.Ay.create([$t.WK],"time",it),Tt=di(ge.renderer),Yt=Tc(ge.interpolation,Tt),hn=Et.A.builder().visualization(Tt).visualizationConfig(Yt).series([lt]).rowPivots([yt]).build(),In=et.A.builder().newId().timerange(void 0).config(hn).build(),Qn=T*fe+1;return F[In.id]=new rs.A(1,Qn,T,1/0),In}),X=i.length*T,se=qu(R.widgetPositions,X);return{newViewState:R.toBuilder().widgets(Fe.List([...R.widgets,...$])).widgetPositions({...se,...F}).build(),currentQueryId:B}},ed=async(i,a,u,T)=>{u(!0);const{newViewState:R,currentQueryId:B}=await i(Bp(a));await i((0,fa.YS)(B,R)),await i((0,Jn.g7)()),Vs.A.set(Jr,"finished"),u(!1),T(!0)},Up=i=>{Vs.A.set(Jr,"discarded"),i(!0)},td=()=>{const[i,a]=(0,n.useState)(!1),[u,T]=(0,n.useState)(!!Vs.A.get(Jr)),R=Xr()(Vs.A.get(Pl)),B=R.length,F=(0,Gn.A)(),$=(0,n.useCallback)(()=>ed(F,R,a,T),[F,R]);return u||xs()(R)?null:n.createElement(Y.Row,null,n.createElement(Y.Col,null,n.createElement(Y.Alert,{bsStyle:"warning",title:"Migrate existing search page charts"},n.createElement("br",null),"We found ",B," chart(s), created for an older version of the search. Do you want to migrate these chart(s) for the current search?",n.createElement("br",null),"When you have run the migration and want to keep the newly created charts, you will have to save the current search as a new dashboard. Otherwise the charts will get lost, when leaving the search page.",n.createElement("br",null),n.createElement(_a,null,n.createElement(Y.Button,{bsStyle:"primary",onClick:$,disabled:i,className:"save-button-margin"},"Migrate ",i&&n.createElement(Na.A,{text:""})),n.createElement(Y.Button,{onClick:()=>Up(T),disabled:i},"Discard charts")))))};var nd=e("xsbnunTq"),Dr=e("iltCXley");const bc=i=>{switch(i){case"seconds":return"s";case"minutes":return"m";case"hours":return"h";case"days":return"d";case"weeks":return"w";case"months":return"M";default:throw new Error(`Invalid time unit: ${i}`)}},Sc=i=>{const{type:a,fields:u,config:T}=i,R={...T};switch(a){case"time":if(T.interval.type==="timeunit"){const{interval:B}=T,{unit:F,value:$}=B;R.interval={type:"timeunit",timeunit:`${$}${bc(F)}`}}break;default:}return{type:a,fields:u,...R}},mi=(i,a,{rollupForBackendQuery:u,rowPivots:T,columnPivots:R,series:B,sort:F})=>({id:i,name:a,type:"pivot",config:{id:"vals",rollup:u,row_groups:T.map(Sc),column_groups:R.map(Sc),series:B.map($=>({id:$.effectiveName,...(0,wt.Pd)($.function)})),sort:F}}),od=({config:i})=>{const a=mi((0,Dr.A)(),"chart",i),u=Dl.create([a]);if(i.visualization==="numeric"&&i.visualizationConfig&&i.visualizationConfig.trend){const T={...mi((0,Dr.A)(),"trend",i),timerange:{type:"offset",source:"search_type",id:a.id}};u.add(T)}if(i.eventAnnotation){const T={id:(0,Dr.A)(),name:"events",type:"events"};u.add(T)}return u.build()};class Dl{constructor(a){this.value=Fe.Set.of(...a)}add(a){return this.value=this.value.add(a),this}build(){return this.value.toArray()}static create(a=[]){return new Dl(a)}}const sd={convert(i){return i}},wp=i=>i.map(a=>[a.name||a.id,a]).reduce((a,[u,T])=>({...a,[u]:T}),{});var Zr=e("i0LZga0C"),Pc=e("A2mY8G47");const ad=["count","sum","avg","min","max","stddev","variance","card","percentile"],Wp=["count","card"],rd=({field:i,type:a,contexts:{widget:u=re.A.empty()}})=>(T,R)=>{const B=(0,Rt.Hz)(R()),F=(a&&a.isNumeric()?ad:Wp).map(de=>de==="percentile"?`${de}(${i},95)`:`${de}(${i})`).map(wt.Ay.forFunction),$=Et.A.builder().series(F).visualization("table").rollup(!0).build(),X=et.A.builder().newId().config($),se=Pn(X,u).build();return T((0,No.QD)(se)).then(()=>T((0,Pc.D)(B,Zr.A.Widget,se.id,`Field Statistics for ${i}`)))};var Ls=e("I4XORk+Y");const ld=(i,a,u)=>{const T=u===$t.gx?`_exists_:${a}`:`NOT ${a}:${(0,Ls.ih)(u)}`;return(0,Ls.$A)(i,T)},qr=({queryId:i,field:a,value:u})=>(T,R)=>{const B=(0,Rt.SL)(i)(R()),F=ld(B,a,u);return T((0,fa.Ze)(i,F))};var Sa=e("4E3oowBb"),tr=e("hhdCSTZj");const id=(i,a)=>i.find(u=>u.label===a),$p=(i,a)=>i.find(u=>u.value===a),Dc=(i,a)=>{var u;return i&&i.length>0&&((u=id(a,i[0].field))==null?void 0:u.value)},cd=i=>i.sort((a,u)=>(0,Sa.j)(a.name,u.name)).map((a,u)=>({label:a.name,value:u})).toArray(),Oc=(i,a,u)=>{const T=$p(i,u);if(!T)return;const R=new bn.A(bn.A.PIVOT_TYPE,T.label,Be.A.Ascending);return a([R])},Rc=({fields:i,onChange:a,sort:u})=>{const T=(0,n.useMemo)(()=>cd(i),[i]);return n.createElement(tr.A,{placeholder:"None: click to add fields",onChange:R=>Oc(T,a,R),options:T,clearable:!1,"aria-label":"Select field for sorting",value:Dc(u,T)})};Rc.propTypes={onChange:l().func.isRequired,fields:qt.A.FieldListType.isRequired,sort:l().array.isRequired};const Ic=Rc,pi=({direction:i,disabled:a,onChange:u})=>n.createElement(tr.A,{disabled:a,clearable:!1,options:[{label:"Ascending",value:"Ascending"},{label:"Descending",value:"Descending"}],onChange:T=>u(Be.A.fromString(T)),placeholder:a?"No sorting selected":"Click to select direction",value:i!=null?i:null});pi.propTypes={direction:l().string,disabled:l().bool,onChange:l().func},pi.defaultProps={direction:void 0,disabled:!1,onChange:()=>{}};const Gp=pi,ud=m.default.div(({theme:i})=>(0,m.css)` background-color: ${i.colors.variant.lightest.default}; border: 1px solid ${i.colors.variant.lighter.default}; padding: 10px; margin: 5px; border-radius: 6px; .description { padding-bottom: 5px; text-transform: uppercase; } `),Mc=({description:i,children:a})=>n.createElement(ud,null,n.createElement("div",{className:"description"},i),a);Mc.propTypes={children:l().node.isRequired,description:l().string.isRequired};const wa=Mc;var xc=e("pa3lbc7X"),Ol=e("H1J/o4st"),gi=e("0l+/Cv54"),Lc=e("B6AO2vlN"),dd=e("mSSPPdLK");class Ei extends n.Component{constructor(){super(...arguments),this._formatDecorator=a=>{const{decorators:u,decoratorTypes:T,onChange:R}=this.props,B=T[a.type]||{requested_configuration:{},name:`Unknown type: ${a.type}`},F=X=>R(u.filter(se=>se.id!==X)),$=(X,se)=>R(u.map(de=>de.id===X?se:de));return{id:a.id,title:n.createElement(gi.A,{key:`decorator-${a.id}`,decorator:a,decoratorTypes:T,onDelete:F,onUpdate:$,typeDefinition:B})}},this._updateOrder=a=>{const{decorators:u,onChange:T}=this.props;a.forEach((R,B)=>{const F=u.find($=>$.id===R.id);F.order=B}),T(u)}}componentDidMount(){xc.A.available()}render(){const{decoratorTypes:a,onChange:u,decorators:T}=this.props;if(!a)return n.createElement(be.y$,null);const R=T.sort((X,se)=>X.order-se.order),B=R.length>0?R[R.length-1].order+1:0,F=R.map(this._formatDecorator),$=X=>u([...T,X]);return n.createElement("div",null,n.createElement(Ol.A,{decoratorTypes:a,nextOrder:B,onCreate:$}),n.createElement("div",{className:dd.A.decoratorListContainer},n.createElement(Lc.A,{decorators:F,onReorder:this._updateOrder})))}}Ei.propTypes={decorators:l().array.isRequired,decoratorTypes:l().object.isRequired,onChange:l().func.isRequired};const Bc=(0,K.A)(Ei,{decoratorStore:xc.i},({decoratorStore:{types:i={}}={}})=>({decoratorTypes:i}));var fi=e("ocYLQ/BD"),Rl=e("i/Bor0y0"),Uc=e("GrokUsBg");const Nc=(0,m.default)(Y.Row)` height: 100%; padding-bottom: 15px; flex: 1; `,hi=(0,m.default)(Y.Col)` height: 100%; `,md=(0,m.default)(Y.Checkbox)` label { display: flex; justify-content: space-between; } `,jp=(i,a,u)=>{const T=a.toBuilder().fields(i).build();return u(T)},pd=(i,a,u)=>{const T=a.toBuilder().sort(i).build();return u(T)},vi=(i,a,u)=>{const T=a.toBuilder().sort(a.sort.map(R=>R.toBuilder().direction(i).build())).build();return u(T)},wc=({children:i,config:a,fields:u,onChange:T,onCancel:R,onSubmit:B})=>{const{sort:F}=a,[$]=(F||[]).map(ge=>ge.direction),X=ge=>T(a.toBuilder().decorators(ge).build()),de=(0,Ye.A)("views.components.widgets.messageTable.previewOptions").sort((ge,fe)=>(0,Sa.j)(ge.sort,fe.sort));return n.createElement(Nc,null,n.createElement(hi,{md:3},n.createElement(Rl.A,{actions:n.createElement(fi.A,{onCancel:R,onSubmit:B}),alignActionsAtBottom:!0},n.createElement(wa,{description:"Fields"},n.createElement(Uc.A,{onChange:ge=>jp(ge,a,T),menuPortalTarget:document.body,selectedFields:a.fields})),n.createElement(wa,{description:"Message Preview"},de.map(ge=>n.createElement(md,{key:ge.title,checked:ge.isChecked(a),onChange:()=>ge.onChange(a,T),disabled:ge.isDisabled(a)},ge.title,ge.help&&n.createElement(be.Zf,{title:ge.title},ge.help)))),n.createElement(wa,{description:"Sorting"},n.createElement(Ic,{fields:u,sort:F,onChange:ge=>pd(ge,a,T)})),n.createElement(wa,{description:"Direction"},n.createElement(Gp,{disabled:!F||F.length===0,direction:$&&$.direction,onChange:ge=>vi(ge,a,T)})),n.createElement(wa,{description:"Decorators"},n.createElement(Bc,{decorators:a.decorators,onChange:X})))),n.createElement(hi,{md:9},i))};wc.propTypes={children:qt.A.OneOrMoreChildren.isRequired,config:l().object.isRequired,fields:qt.A.FieldListType.isRequired,onChange:l().func.isRequired};const Hp=wc,gd=(0,p.A)(()=>e.e("bb8c8232-6203").then(e.bind(e,"oUJj821/"))),Wc=(0,p.A)(()=>e.e("bb8c8232-4890").then(e.bind(e,"hP+nVj7o"))),Ed=(0,p.A)(()=>e.e("bb8c8232-3006").then(e.bind(e,"21eHsCFI"))),fd=(0,p.A)(()=>e.e("bb8c8232-4324").then(e.bind(e,"9/bZdhqf"))),Il=(0,p.A)(()=>e.e("bb8c8232-2882").then(e.bind(e,"r4MY1c4i"))),yi=(0,p.A)(()=>e.e("bb8c8232-2882").then(e.bind(e,"zWgILaST"))),Ai=(0,p.A)(()=>e.e("bb8c8232-2882").then(e.bind(e,"cXPoJEmv")));var hd=e("WyXFCd64");const vd=()=>{const i=wt.Ay.forFunction("count()").toBuilder().config(new hd.A("Message Count")).build();return et.A.builder().newId().config(Et.A.builder().series([i]).visualization(La.type).build()).build()},Ml=()=>i=>i((0,No.QD)(vd())),xl=()=>Ro.A.builder().newId().config(An.Ay.builder().fields($t.mP).showMessageRow(!0).showSummary(!0).build()).build(),Kc=()=>i=>i((0,No.QD)(xl())),_i=({field:i,contexts:{widget:a}})=>u=>{const T=a.config.fields.filter(B=>B!==i),R=a.config.toBuilder().fields(T).build();return u((0,No.Ox)(a.id,R))},yd=({contexts:{widget:i},field:a})=>Ro.A.isMessagesWidget(i)&&i.config?(i.config.fields||[]).includes(a):!1,Ad=({contexts:{widget:i}})=>!i;_i.isEnabled=yd,_i.isHidden=Ad;const Ci=_i,_d=({field:i})=>(a,u)=>{const R=(0,Rt.u3)(u()).map(B=>{if(B.type.toUpperCase()===Ro.A.type.toUpperCase()){const F=B.config.fields.filter(X=>X!==i),$=B.config.toBuilder().fields(F).build();return B.toBuilder().config($).build()}return B}).toList();return a((0,No.Ru)(R))},Xs=({view:i})=>et.A.builder().newId().timerange(i.type===bs.A.Type.Dashboard?$t.Zl:void 0).config(Et.A.builder().rowPivots([]).series([]).visualization(Ze.Ay.type).build()).build(),nr=()=>(i,a)=>{const u=(0,Rt.sf)(a());return i((0,No.QD)(Xs({view:u})))};var Ll=e("gSdhV+tG"),Ti=e("xS8q27Jr");const Cd=({label:i})=>n.createElement("strong",null,i),Td=()=>Ti.A.EXTRACTOR_TYPES.map(i=>({label:Ti.A.getReadableExtractorTypeName(i),value:i}));class $c extends n.Component{constructor(a){super(a),this.extractorRoutes={},this._onSubmit=()=>{const{onClose:u}=this.props;u();const{selectedExtractor:T}=this.state;if(T){const R=this.extractorRoutes[T];window.open(R,"_blank").focus()}},this._onChange=u=>{this.setState({selectedExtractor:u})},this.state={selectedExtractor:void 0}}componentDidMount(){const{message:a}=this.context,{gl2_source_node:u,gl2_source_input:T}=a.fields,{field:R}=this.props;this.extractorRoutes=Ti.A.getNewExtractorRoutes(u,T,R,a.index,a.id)}render(){const{selectedExtractor:a}=this.state;return n.createElement(Y.BootstrapModalForm,{title:"Select extractor type",submitButtonDisabled:!a,show:!0,onCancel:this.props.onClose,onSubmitForm:this._onSubmit},n.createElement(tr.A,{placeholder:"Select extractor type",optionRenderer:Cd,clearable:!0,onChange:this._onChange,options:Td()}))}}$c.propTypes={onClose:l().func.isRequired},$c.contextType=Ll.y;const bd=$c;class or extends Mn.A{constructor(a){super(),this._value={viewport:a}}get viewport(){return this._value.viewport}toBuilder(){const{viewport:a}=this._value;return new el(Fe.Map({viewport:a}))}static create(a){return new or(a)}toJSON(){const{viewport:a}=this._value;return{viewport:a}}static fromJSON(a,u){const{viewport:T}=u;return or.builder().viewport(ia.fromJSON(T)).build()}static builder(){return new el}}class el{constructor(a=Fe.Map()){this.value=a}viewport(a){return new el(this.value.set("viewport",a))}build(){const{viewport:a}=this.value.toObject();return new or(a)}}var Bl=e("CHWvwBKE");const Gc=i=>i.map(a=>Object.entries(a).map(([u,T])=>u==="_exists_"?T:u)).reduce((a,u)=>[...a,...u],[]).reduce((a,u)=>a.includes(u)?a:[...a,u],[]),Pa=({contexts:{valuePath:i,widget:a}})=>(u,T)=>{const R=(0,Rt.Hz)(T()),B=Object.fromEntries(i.flatMap(Object.entries)),F=a&&a.query?a.query.query_string:"",$=Object.entries(B).map(([We,lt])=>lt===$t.gx?`NOT _exists_:${We}`:`${We}:${(0,Ls.ih)(String(lt))}`).reduce((We,lt)=>(0,Ls.$A)(We,lt),""),X=(0,Ls.$A)(F,$),se=Gc(i),de=new Set([...$t.mP,...se]),ge=Pn(Ro.A.builder(),a).query((0,Bl.P$)(X)).newId().config(An.Ay.builder().fields([...de]).showMessageRow(!0).build()).build(),fe=`Messages for ${$}`;return u((0,No.QD)(ge)).then(()=>u((0,Pc.D)(R,Zr.A.Widget,ge.id,fe)))};Pa.isEnabled=({contexts:{valuePath:i,widget:a}})=>i!==void 0&&a!==void 0;const jc=Pa;var Sd=e("gofDlXL2"),Pd=e("dogTzS57");const Hc=({field:i,value:a})=>u=>a===void 0?Promise.reject(new Error("Unable to add highlighting for missing value.")):u((0,Sd.n)(i,a)),zp=({field:i,value:a},u)=>(0,Pd.W)(u()).find(({field:R,value:B})=>i===R&&a===B)===void 0;Hc.isEnabled=zp;const zc=Hc,Ul=i=>i.slice(0,-1),Vc=i=>!!(i&&i.type==="term"),Nl=i=>(i==null?void 0:i.type)==="string",Dd=i=>(i==null?void 0:i.type)==="text",kc=i=>(i==null?void 0:i.type)==="constant.numeric",bi=i=>(i==null?void 0:i.type)==="keyword",Si=i=>(i==null?void 0:i.type)==="keyword.operator",wl=i=>bi(i)&&i.value===`${Qc.name}:`,Or=i=>!!(bi(i)&&(i!=null&&i.value.endsWith(":"))),Rr=i=>Dd(i)&&(i==null?void 0:i.value)===" ",Wl=i=>(i==null?void 0:i.type)==="paren.lparen",Od=i=>(i==null?void 0:i.type)==="paren.rparen",Rd=(i,a)=>{var u;if(!(i!=null&&i.length))return null;const T=i[a],R=(u=i[a-1])!=null?u:null;if((R==null?void 0:R.type)==="keyword"&&(R!=null&&R.value.endsWith(":"))&&Wl(T))return Ul(R.value);let B=null,F=0,$=0;for(let X=0;X{const{name:T,type:R}=i;return{name:T,value:`${T}${u?"":":"}`,score:a,meta:R.type}},Qc={name:"_exists_",type:{type:"operator"}},Vp=i=>a=>{const u=a.name.indexOf(i);return u<0?0:u===0?2:1},Id=({tokens:i,currentTokenIdx:a,prefix:u})=>{var T;const R=i[a],B=(T=i[a-1])!=null?T:null;if(Or(R)&&u)return!0;if(Vc(R)){if(Or(B)&&!wl(B)||Rd(i,a))return!1;if(!B||Rr(B)||wl(B))return!0}return!1};class Di{constructor(a=[Qc]){this.getCompletions=({tokens:u,currentTokenIdx:T,prevToken:R,prefix:B,fieldTypes:F})=>{if(!Id({tokens:u,currentTokenIdx:T,prefix:B}))return[];const X=Vp(B),{all:se,query:de}=F,ge=Fe.List(Object.values(de)),fe=wl(R),We=Object.values(se).filter(Tt=>!de[Tt.name]),it=(fe?[...ge.toArray()]:[...this.staticSuggestions,...ge.toArray()]).filter(Tt=>X(Tt)>0).map(Tt=>Pi(Tt,10+X(Tt),fe)),yt=We.filter(Tt=>X(Tt)>0).map(Tt=>Pi(Tt,1+X(Tt),fe)).map(Tt=>({...Tt,meta:`${Tt.meta} (not in streams)`}));return[...it,...yt]},this.staticSuggestions=a}}const Yc=Di;var kp=e("xAuw/bbM"),Md=e("QV1daZoe"),Oi=e("PwTFiGSp");const Xc=50,Qp=i=>i.replace(/^"(.*(?="$))"$/,"$1"),Jc=(i,a)=>{const u=i==null?void 0:i.trim();switch(a){case"constant.numeric":return Number(u);case"string":return Qp(u);case"keyword.operator":return"";case"paren.lparen":return"";default:return u}},xd=(i,a,u)=>{const T=u?i:(0,Ls.ih)(i);return T.startsWith(String(a))?T:`${i} \u2B62 ${a}`},Zc=({tokens:i,currentToken:a,prevToken:u,currentTokenIdx:T})=>{var R;const B=(R=i[T+1])!=null?R:null;if(Or(a)&&(!B||Rr(B)))return{fieldName:Ul(a.value),input:"",isQuoted:!1};if((Vc(a)||Nl(a)||Si(a)||kc(a))&&Or(u))return{fieldName:Ul(u.value),input:Jc(a.value,a.type),isQuoted:Nl(a)};const F=Rd(i,T);return F&&!(Rr(a)&&(Vc(u)||kc(u)))?{fieldName:F,input:Jc(a.value,a.type),isQuoted:!1}:{}},qc=i=>{var a;return(a=i==null?void 0:i.type.isEnumerable())!=null?a:!1},tl=(i,a,u,T,R)=>({name:i,value:T?i:(0,Ls.ih)(i),score:a,caption:xd(i,u,T),meta:R?`${R}: ${a} hits`:`${a} hits`});class Ld{constructor(){this.shouldFetchCompletions=(a,u)=>{if(!a)return!1;const T=u==null?void 0:u.query[a];if(!T||!qc(T)){const R=u==null?void 0:u.all[a];return qc(R)}return!0},this.getCompletions=({tokens:a,currentToken:u,currentTokenIdx:T,prevToken:R,timeRange:B,streams:F,fieldTypes:$,userTimezone:X})=>{const{fieldName:se,input:de,isQuoted:ge}=Zc({tokens:a,currentToken:u,currentTokenIdx:T,prevToken:R});if(!se)return[];if(!this.shouldFetchCompletions(se,$))return[];if(this.alreadyFetchedAllSuggestions(de,se,F,B)){const We=this.filterExistingSuggestions(de,ge);if(We.length>0)return We}const fe=!B||(0,Oi.EZ)(B)?void 0:(0,Md.So)(B,X);return kp.Cf.suggestFieldValue({field:se,input:de,timerange:fe,streams:F,size:Xc}).then(({suggestions:We,sum_other_docs_count:lt})=>We?(this.previousSuggestions={furtherSuggestionsCount:lt,streams:F,timeRange:B,fieldName:se,input:de,suggestions:We},We.map(({value:it,occurrence:yt,title:Tt})=>tl(it,yt,de,ge,Tt))):[])},this.identifierRegexps=[/[a-zA-Z_0-9$\\/\-\u00A2-\u2000\u2070-\uFFFF]/]}alreadyFetchedAllSuggestions(a,u,T,R){if(!this.previousSuggestions)return!1;const{fieldName:B,streams:F,timeRange:$,furtherSuggestionsCount:X,input:se}=this.previousSuggestions;return String(a).startsWith(String(se))&&B===u&&vs()(F,T)&&vs()($,R)&&!X}filterExistingSuggestions(a,u){return this.previousSuggestions?this.previousSuggestions.suggestions.filter(({value:T})=>(u?T:(0,Ls.ih)(T)).startsWith(String(a))).map(({value:T,occurrence:R,title:B})=>tl(T,R,a,u,B)):[]}}const Bd=Ld;var Ud=e("sWSSTOXR"),Nd=e.n(Ud);const wd=[{name:"AND",value:"AND ",score:10,meta:"operator"},{name:"OR",value:"OR ",score:10,meta:"operator"}],eu=[{name:"NOT",value:"NOT ",score:10,meta:"operator"}],tu=i=>a=>a.name.indexOf(i)>=0,Yp=(i,a)=>i.slice(0,a).reverse().find(u=>u.type!=="text"||Nd()(u.value)!=="");class Wd{constructor(){this.getCompletions=({currentToken:a,prevToken:u,prefix:T,tokens:R,currentTokenIdx:B})=>{if(bi(a)||Nl(a)||!(R!=null&&R.length)||!T||Si(u)&&u.value==="NOT")return[];const F=Yp(R,B);if(!F||F&&F.type==="keyword.operator"){const $=tu(T);return eu.filter($)}if(u&&(Nl(u)||Dd(u))){const $=tu(T);return[...wd,...eu].filter($)}return[]}}}const Fd=Wd;var Kd=e("13uboeDm"),nu=e.n(Kd),Ri=e("xTTaAS+O"),Ir={};Ir.styleTagTransform=ua(),Ir.setAttributes=Ys(),Ir.insert=ws().bind(null,"head"),Ir.domAPI=As(),Ir.insertStyleElement=Ws();var Xp=ca()(Ri.A,Ir);const $d=Ri.A&&Ri.A.locals?Ri.A.locals:void 0;var ou=e("/7OuCFNo");const su=({view:i,missingRequirements:a})=>{var u;const T=(0,ou.A)();return n.createElement(Y.Row,{className:"content"},n.createElement(Y.Col,{md:6,mdOffset:3,className:$d.bootstrapHeading},n.createElement("h1",null,nu()(i.type),": ",n.createElement("em",null,i.title)),n.createElement("p",null,"Unfortunately executing this ",(u=i.type)==null?void 0:u.toLowerCase()," is not possible. It uses the following capabilities which are not available:"),n.createElement("ul",null,Object.entries(a).map(([R,B])=>n.createElement("li",{key:R},n.createElement("strong",null,R)," - included in",n.createElement("a",{href:B.url,target:"_blank",rel:"noopener noreferrer"},B.name))))),n.createElement(Y.Col,{md:1,mdOffset:8},n.createElement(Y.Button,{bsStyle:"success",onClick:()=>T.goBack()},"Back")))};su.propTypes={view:E.instanceOf(bs.A).isRequired,missingRequirements:E.objectOf(E.shape({name:E.string,url:E.string})).isRequired};const Gd=su,jd=(i,a)=>Object.entries(i).filter(([u])=>!a.includes(u)).reduce((u,[T,R])=>({...u,[T]:R}),{}),Hd=async({view:i,executionState:a})=>{const u=f.d.exports("views.requires.provided"),T=jd(i.requires,u);if(Object.keys(T).length>0)throw()=>n.createElement(Gd,{view:i,missingRequirements:T});return[i,a]};var Ii=e("2eB4xxdN"),zd=e("pzHcYe8v"),sr=e("n6M7NB8F");const Vd=m.default.div` padding-left: 20px; `,qp=()=>{const i=(0,sr.A)(),a=(0,rt.A)();if(!i||!a)return n.createElement(Na.A,null);const u=(0,zd.A)(i,a);return n.createElement(Vd,null,n.createElement("h1",null,i.title),n.createElement("h2",null,u))},au=({interval:i,tabs:a})=>{const u=(0,sr.A)(),T=(0,rt.A)(),R=(0,Gn.A)();return(0,n.useEffect)(()=>{const B=setInterval(()=>{if(!u||!T)return;const F=a||u.search.queries.toIndexedSeq().map((ge,fe)=>fe).toJS(),$=u.search.queries.toIndexedSeq().findIndex(ge=>ge.id===T),X=F.indexOf($),se=F[(X+1)%F.length],de=u.search.queries.toIndexedSeq().get(se).id;de!==T&&R((0,fa.Z1)(de))},i*1e3);return()=>clearInterval(B)},[i,u,T,a,R]),null};au.defaultProps={tabs:void 0};const Mi=au;var eg=e("brbjQOmY"),kd=e("r4MY1c4i");const Qd=({tabs:i,interval:a,refresh:u})=>({tabs:i!==void 0?i.split(",").map(T=>Number.parseInt(T,10)):void 0,interval:a!==void 0?Math.max(Number.parseInt(a,10),1):30,refresh:u!==void 0?Math.max(Number.parseInt(u,10),1):10}),xi=m.default.div` height: 100%; display: flex; flex-direction: column; padding: 10px; `,Yd=({refreshInterval:i})=>{const{startAutoRefresh:a,stopAutoRefresh:u}=(0,Bt.A)();return(0,n.useEffect)(()=>(a(i*1e3),()=>{u()}),[i,a,u]),null},Xd=()=>{const i=(0,eg.A)(),a=Qd(i);return n.createElement(gt.A.Provider,{value:!1},n.createElement(xi,null,n.createElement(kd.default,null,n.createElement(Yd,{refreshInterval:a.refresh}),n.createElement(Mi,{interval:a.interval,tabs:a.tabs}),n.createElement(qp,null))))};var ru=e("fBC5XqGO");const lu=(0,Eo.$j)(({config:i,data:a,effectiveTimerange:u,height:T})=>{const R=i.visualizationConfig||gs.empty(),{interpolation:B="linear"}=R,F=xt(),$=(0,n.useMemo)(()=>{var yt,Tt;return(Tt=(yt=i==null?void 0:i.rowPivots)==null?void 0:yt.flatMap(Yt=>Yt.fields))!=null?Tt:[]},[i==null?void 0:i.rowPivots]),X=(0,n.useCallback)(yt=>yt.map(Tt=>Tt.split($t.vo).map((Yt,hn)=>F(Yt,$[hn])).join($t.p8)),[F,$]),se=(0,n.useCallback)(({type:yt,name:Tt,labels:Yt,values:hn,originalName:In})=>({type:yt,name:Tt,x:X(Yt),y:hn,fill:"tozeroy",line:{shape:pl(B)},originalName:In}),[X,B]),de=(0,n.useMemo)(()=>(0,Eo.rg)(a),[a]),ge=Ht(de,{widgetConfig:i,chartType:"scatter",generator:se}),{eventChartData:fe,shapes:We}=Un(i,a.events),lt=fe?[...ge,fe]:ge,it=We?{shapes:We}:{};return n.createElement(Nr,{config:i,axisType:R.axisType,plotLayout:it,effectiveTimerange:u,height:T,chartData:lt})},"area");lu.propTypes={config:nn.isRequired,data:Rn.isRequired,height:l().number};const Li=lu,iu=(i,a)=>{var u;return((u=i.metrics)==null?void 0:u.length)>=a},Jd=(i,a)=>{var u,T;return((T=(u=i.groupBy)==null?void 0:u.groupings)==null?void 0:T.length)>=a},nl=i=>a=>iu(a,1)?{}:{type:`${i} requires at least one metric`},cu=nl("Area chart"),Fl={type:Li.type,displayName:"Area Chart",component:Li,config:{createConfig:()=>({interpolation:$t.p3,axisType:xn}),fromConfig:i=>({interpolation:i==null?void 0:i.interpolation,axisType:i==null?void 0:i.axisType}),toConfig:i=>gs.create(i.interpolation,i.axisType),fields:[{name:"interpolation",title:"Interpolation",type:"select",options:$t.KJ,required:!0},{name:"axisType",title:"Axis Type",type:"select",options:Wn,required:!0}]},capabilities:["event-annotations"],validate:cu},uu=nl("Bar chart"),qd={type:Va.type,displayName:"Bar Chart",component:Va,config:{createConfig:()=>({barmode:So,axisType:xn}),fromConfig:i=>{var a,u;return{barmode:(a=i==null?void 0:i.barmode)!=null?a:So,axisType:(u=i==null?void 0:i.axisType)!=null?u:xn}},toConfig:i=>zn.create(i.barmode,i.axisType),fields:[{name:"barmode",title:"Mode",type:"select",options:[["Group","group"],["Stack","stack"],["Relative","relative"],["Overlay","overlay"]],required:!0,helpComponent:()=>{const i={group:{label:"Group",help:"Every series is represented by its own bar in the chart."},stack:{label:"Stack",help:"All series are stacked upon each other resulting in one bar."},relative:{label:"Relative",help:"All series are stacked upon each other resulting in one chart. But negative series are placed below zero."},overlay:{label:"Overlay",help:"All series are placed as bars upon each other. To be able to see the bars the opacity is reduced to 75%. It is recommended to use this option with not more than 3 series."}};return n.createElement("ul",null,Object.values(i).map(({label:a,help:u})=>n.createElement("li",{key:a},n.createElement("h4",null,a),u)))}},{name:"axisType",title:"Axis Type",type:"select",options:Wn,required:!0}]},capabilities:["event-annotations"],validate:uu},em=i=>{const a=[];if(!Jd(i,2))a.push("Heatmap requires at least two groupings.");else{const u=i.groupBy.groupings.map(T=>T.direction);(!u.includes("row")||!u.includes("column"))&&a.push("Groupings must include row and column groupings.")}return iu(i,1)||a.push("At least one metric must be configured."),a.length>0?{type:a.join(" ")}:{}},nm={type:Ks.type,displayName:"Heatmap",component:Ks,config:{fromConfig:({autoScale:i,colorScale:a,reverseScale:u,defaultValue:T,useSmallestAsDefault:R,zMax:B,zMin:F}=_t.Ay.empty())=>({autoScale:i,colorScale:a,reverseScale:u,defaultValue:T,useSmallestAsDefault:R,zMax:B,zMin:F}),toConfig:({autoScale:i=!1,colorScale:a,reverseScale:u=!1,useSmallestAsDefault:T,zMax:R,zMin:B,defaultValue:F})=>{const[$,X]=i?[void 0,void 0]:[B,R];return _t.Ay.create(a,u,i,$,X,T,F)},createConfig:()=>({colorScale:"Viridis",autoScale:!0}),fields:[{name:"colorScale",title:"Color Scale",required:!0,type:"select",options:[..._t.hx].sort(Sa.j)},{name:"reverseScale",type:"boolean",title:"Reverse Scale"},{name:"autoScale",type:"boolean",title:"Auto Scale"},{name:"zMin",type:"numeric",title:"Min",required:!0,isShown:i=>!(i!=null&&i.autoScale)},{name:"zMax",type:"numeric",title:"Max",required:!0,isShown:i=>!(i!=null&&i.autoScale)},{name:"useSmallestAsDefault",type:"boolean",title:"Use smallest as default"},{name:"defaultValue",type:"numeric",title:"Default Value",isShown:i=>!(i!=null&&i.useSmallestAsDefault),required:!1}]},validate:em},om=nl("Line chart"),sm={type:El.type,displayName:"Line Chart",component:El,config:{createConfig:()=>({interpolation:$t.p3,axisType:xn}),fromConfig:i=>{var a,u;return{interpolation:(a=i==null?void 0:i.interpolation)!=null?a:$t.p3,axisType:(u=i==null?void 0:i.axisType)!=null?u:xn}},toConfig:i=>zs.create(i.interpolation,i.axisType),fields:[{name:"interpolation",title:"Interpolation",type:"select",options:$t.KJ,required:!0},{name:"axisType",title:"Axis Type",type:"select",options:Wn,required:!0}]},capabilities:["event-annotations"],validate:om},du={type:La.type,displayName:"Single Number",component:La,config:{fromConfig:i=>({trend:i==null?void 0:i.trend,trend_preference:i==null?void 0:i.trendPreference}),toConfig:({trend:i=!1,trend_preference:a})=>ha.create(i,a),fields:[{name:"trend",title:"Trend",type:"boolean",description:"Show trend information for this number.",helpComponent:()=>n.createElement(n.Fragment,null,n.createElement("p",null,"If the user enables trending, a separate box is shown below the current value, indicating the direction of the change by an icon as well as the absolute and the relative differences between the current value and the previous one."),n.createElement("p",null,"The previous value is calculated by performing two searches in the background, which are completely identical besides the timerange. The timerange of the first search is identical to the one configured for this query/this widget, the second one is the same timerange, but with an offset of the timerange length shifted to the past."))},{name:"trend_preference",title:"Trend Preference",type:"select",options:[["Lower","LOWER"],["Neutral","NEUTRAL"],["Higher","HIGHER"]],required:!0,isShown:i=>(i==null?void 0:i.trend)===!0}]}},Kl=4,am=(i,a)=>{const u=Math.ceil(a/Kl),T=Math.floor(i/Kl),R=1/u,B=R*.1;return[R*T+B,R*(T+1)-B]},ag=(i,a)=>{const u=i%Kl,T=1/Math.min(a,Kl),R=T*.1;return[T*u+R,T*(u+1)-R]},Bi=i=>({type:a,name:u,labels:T,values:R,idx:B,total:F,originalName:$,config:X})=>{var se,de;const ge=(de=(se=X==null?void 0:X.rowPivots)==null?void 0:se.flatMap(fe=>fe.fields))!=null?de:[];return{type:a,name:u,hole:.4,labels:T.map(fe=>fe.split($t.vo).map((We,lt)=>i(We,ge[lt])).join($t.p8)),originalLabels:T,values:R,domain:{x:ag(B,F),y:am(B,F)},originalName:$}},rm=(i,a)=>({marker:{colors:i.originalLabels.map(T=>a.get(T))}}),lm=i=>[...new Set(i.flatMap(({labels:a,originalLabels:u})=>u!=null?u:a))],im=i=>{var a;return(a=i==null?void 0:i.rowPivots)==null?void 0:a.flatMap(u=>u.fields)},$l=(0,Eo.$j)(({config:i,data:a})=>{const u=(0,n.useMemo)(()=>(0,Eo.rg)(a),[a]),T=xt(),R=Ht(u,{widgetConfig:i,chartType:"pie",generator:Bi(T)});return n.createElement(Ta,{config:i,chartData:R,labelMapper:lm,labelFields:im,neverHide:!0},n.createElement(ra.A,{chartData:R,setChartColor:rm}))},"pie");$l.propTypes={config:nn.isRequired,data:Rn.isRequired},$l.displayName="PieVisualization";const mu=$l,rg=nl("Pie chart"),ig={type:mu.type,displayName:"Pie Chart",component:mu,validate:rg};class ar extends Mn.A{constructor(a=xn){super(),this._value={axisType:a}}get axisType(){return this._value.axisType}toBuilder(){return new Ui(Fe.Map(this._value))}static create(a){return new ar(a)}static empty(){return new ar(xn)}toJSON(){const{axisType:a}=this._value;return{axis_type:a}}static fromJSON(a,u){var T;return ar.create((T=u==null?void 0:u.axis_type)!=null?T:xn)}}class Ui{constructor(a=Fe.Map()){this.value=a}axisType(a){return new Ui(this.value.set("axisType",a))}build(){const{interpolation:a,axisType:u}=this.value.toObject();return new zs(a,u)}}const cg=i=>({type:a,name:u,labels:T,values:R,originalName:B})=>({type:a,name:u,x:i(T),y:R,mode:"markers",originalName:B}),S=(0,Eo.$j)(({config:i,data:a,effectiveTimerange:u,height:T})=>{var R;const B=(R=i.visualizationConfig)!=null?R:ar.empty(),F=xt(),$=(0,n.useMemo)(()=>{var it,yt;return(yt=(it=i==null?void 0:i.rowPivots)==null?void 0:it.flatMap(Tt=>Tt.fields))!=null?yt:[]},[i==null?void 0:i.rowPivots]),X=(0,n.useCallback)(it=>it.map(yt=>yt.split($t.vo).map((Tt,Yt)=>F(Tt,$[Yt])).join($t.p8)),[F,$]),se=(0,n.useMemo)(()=>(0,Eo.rg)(a),[a]),de=Ht(se,{widgetConfig:i,chartType:"scatter",generator:cg(X)}),{eventChartData:ge,shapes:fe}=Un(i,a.events),We=ge?[...de,ge]:de,lt=fe?{shapes:fe}:{};return n.createElement(Nr,{config:i,axisType:B.axisType,chartData:We,plotLayout:lt,height:T,effectiveTimerange:u})},"scatter");S.propTypes={config:nn.isRequired,data:Rn.isRequired,height:l().number};const J=S,vt=nl("Scatter plot"),pn={type:J.type,displayName:"Scatter Plot",component:J,config:{createConfig:()=>({axisType:xn}),fromConfig:i=>{var a;return{axisType:(a=i==null?void 0:i.axisType)!=null?a:xn}},toConfig:i=>ar.create(i.axisType),fields:[{name:"axisType",title:"Axis Type",type:"select",options:Wn,required:!0}]},capabilities:["event-annotations"],validate:vt},eo={zoom:1,centerX:0,centerY:0},Js={type:Pr.type,displayName:"World Map",component:Pr,config:{createConfig:()=>eo,fromConfig:i=>i?{zoom:i.viewport.zoom,centerX:i.viewport.center[0],centerY:i.viewport.center[1]}:eo,toConfig:i=>or.create(ia.create([i.centerX,i.centerY],i.zoom)),fields:[{name:"zoom",title:"Zoom",type:"numeric",required:!0},{name:"centerX",title:"Latitude",type:"numeric",required:!0,step:"any"},{name:"centerY",title:"Longitude",type:"numeric",required:!0,step:"any"}]}},pu=[Fl,qd,Ze.NJ,nm,sm,du,ig,pn,Js];var cm=e("QBkrNAIi");function ug(i,a){return i.filter(u=>!a.includes(u.type))}function dg(i,a){return s.A.isCloud()?ug(i,a):i}const cA=null;var gu=e("VVS+7KXv");const um=({value:i})=>(0,gu.A)(i),dm=({field:i})=>(0,gu.A)(i);var pg=e("I5+gQ/47"),jl=e("ty2gyrHp"),gg=e("B6TE4HBJ"),Eg=e("tt0llszK"),fg=e("uEPrrliZ"),Eu=e("YwMFjcSm"),hg=e("z6QEDyg6"),vg=e("Gkq4qIYY"),yg=e("Q1zRxDOP");const Ag=()=>{var i,a;const u=(0,fn.A)(Rt.or);if(xs()(u))return n.createElement("i",null,"No query executed yet.");const T=(u==null?void 0:u.searchTypes)&&((a=(i=Object.values(u==null?void 0:u.searchTypes))==null?void 0:i.find(R=>R.total))==null?void 0:a.total);return n.createElement("i",null,"Query executed in"," ",ka()(u==null?void 0:u.duration).format("0,0"),"ms at ",n.createElement(be.Dc,{dateTime:u==null?void 0:u.timestamp})," ","Total results: ",ka()(T).format("0,0"))},fu={[bs.A.Type.Dashboard]:({id:i,title:a})=>[{link:ke.Ay.DASHBOARDS,label:"Dashboards"},{label:a||i,dataTestId:"view-title"}],[bs.A.Type.Search]:({id:i,title:a})=>[{link:ke.Ay.SEARCH,label:"Search"},{label:a||i,dataTestId:"view-title"}],alert:({id:i})=>[{link:ke.Ay.ALERTS.LIST,label:"Alerts & Events"},{label:i,dataTestId:"alert-id-title"}],eventDefinition:({id:i,title:a})=>[{link:ke.Ay.ALERTS.DEFINITIONS.LIST,label:"Event definitions"},{link:ke.Ay.ALERTS.DEFINITIONS.show(i),label:a||i,dataTestId:"event-definition-title"}]},Dh=m.default.div(({theme:i})=>(0,m.css)` display: flex; flex-wrap: nowrap; align-items: center; margin-bottom: ${i.spacings.xs}; gap: 4px; `),_g=m.default.div` margin-left: auto; `,mm=m.default.div(({theme:i})=>(0,m.css)` color: ${i.colors.gray[60]}; font-size: ${i.fonts.size.tiny}; cursor: pointer; `),pm=m.default.span` display: flex; gap: 4px; align-items: center; & ${mm} { display: none; } &:hover ${mm} { display: block; } `,Ni=(0,m.default)(be.In)` font-size: 0.5rem; `,Wa=({label:i,link:a,dataTestId:u})=>a?n.createElement(jl.N,{target:"_blank",to:a,"data-testid":u},i):n.createElement("span",{"data-testid":u},i);Wa.defaultProps={dataTestId:void 0};const gm=()=>{var i;const a=(0,sr.A)(),u=(0,vg.A)(),T=(a==null?void 0:a.id)&&(a==null?void 0:a.title)&&!u,[R,B]=(0,n.useState)(!1),F=(0,n.useCallback)(()=>B(In=>!In),[B]),{alertId:$,definitionId:X,definitionTitle:se,isAlert:de,isEventDefinition:ge,isEvent:fe}=(0,hg.A)(),We=(0,Gn.A)(),lt=(0,n.useCallback)(async In=>{await We((0,Eg.A)(In)),await We((0,fa.vl)(In))},[We]),it=(i=a==null?void 0:a.type)==null?void 0:i.toLocaleLowerCase(),yt=(0,fg.A)(),Tt=(0,n.useCallback)(In=>We((0,fa.vl)(a.toBuilder().favorite(In).build())),[We,a]),Yt=(0,n.useMemo)(()=>de||fe?fu.alert({id:$}):ge?fu.eventDefinition({id:X,title:se}):fu[a.type]({id:a.id,title:yt}),[$,X,se,de,fe,ge,a,yt]),hn=a.type==="SEARCH";return n.createElement(Y.Row,null,n.createElement(Dh,null,Yt.map(({label:In,link:Qn,dataTestId:to},Vo)=>{const Mo=Vo===Yt.length-1;return n.createElement(pm,{key:`${In}_${Qn}`},n.createElement(Wa,{link:Qn,label:In,dataTestId:to}),!Mo&&n.createElement(Ni,{name:"chevron_right"}),T&&Mo&&n.createElement(n.Fragment,null,n.createElement(Eu.A,{isFavorite:a.favorite,grn:(0,yg.i)(a.type,a.id),onChange:Tt}),n.createElement(mm,{onClick:F,role:"button",title:`Edit ${it} ${a.title} metadata`,tabIndex:0},n.createElement(be.In,{name:"edit_square"}))))}),R&&n.createElement(gg.A,{show:!0,view:a,title:`Editing saved ${it}`,onClose:F,onSave:lt,submitButtonText:`Save ${it}`}),hn&&n.createElement(_g,null,n.createElement(Ag,null))))};var Em=e("iyGdd7jp"),fm=e("PLPb65Bv");const vu=[{key:"view",reducer:fa.AC},{key:"searchExecution",reducer:Jn.t$},{key:"searchMetadata",reducer:Em.o},{key:"undoRedo",reducer:fm.$V}];var yu=e("7FTHePOw"),rr=e.n(yu),Tg=e("LF8A/8I5"),ol=e.n(Tg),bg=e("RjO1iR6D"),Au=e.n(bg);const lr={Checked:"Checked",Empty:"Empty",Indeterminate:"Indeterminate"},hm=({groupLabel:i,checked:a,onChange:u,labels:T})=>{const R=(0,n.useMemo)(()=>Object.values(a).every($=>$)?lr.Checked:Object.values(a).some($=>$)?lr.Indeterminate:lr.Empty,[a]),B=(0,n.useCallback)(()=>{switch(R){case lr.Checked:return u(rr()(a,()=>!1));case lr.Empty:return u(rr()(a,()=>!0));case lr.Indeterminate:return u(rr()(a,()=>!0));default:return u(rr()(a,()=>!1))}},[a,u,R]),F=(0,n.useCallback)(($,X)=>{u({...a,[$]:!a[$]})},[a,u]);return n.createElement(be.m1,{header:i,expanded:!0,padded:!1,checked:R===lr.Checked,indetermined:R===lr.Indeterminate,onChange:B},n.createElement(be.hG,null,Object.entries(a).map(([$,X])=>n.createElement(be.m1,{expandable:!1,header:T[$],padded:!1,key:$,checked:X,onChange:se=>F($,se)}))))},Sg={rowValuePath:"Query from table row",columnValuePath:"Query from table column",columnGroupBy:"Group by column values",rowGroupBy:"Group by row values",aggCondition:"Condition",queryWithReplacedParams:"Query from search",searchFilterQuery:"Query from search filters",streams:"Streams",searchWithinMs:"Search within ms",lutParameters:"Lookup-table parameters",searchFromValue:"Query from value"},Hl=["columnGroupBy","rowGroupBy","aggCondition"],wi=["rowValuePath","columnValuePath","queryWithReplacedParams","searchFilterQuery","searchFromValue"],_u={EXACT:{label:"Exactly this value",description:"Strategy includes all search queries, filters, etc which relate to current search view"},ROW:{label:"Any in row",description:"Strategy includes row pivots"},COL:{label:"Any in column",description:"Strategy includes column pivots"},ALL:{label:"Any in widget",description:"Strategy includes all row and column pivot values, related to selected value"},CUSTOM:{label:"Custom",description:"You can select any search part"}},Pg=m.default.div` display: flex; gap: 5px; align-items: baseline; `,Ih=({strategy:i,onChange:a,strategyAvailabilities:u})=>{const{description:T}=_u[i];return n.createElement(n.Fragment,null,n.createElement("b",null,"Strategy by:"),n.createElement(Pg,null,Object.entries(_u).map(([R,{label:B}])=>u[R]?n.createElement(Y.Radio,{id:R,key:R,name:"strategy",value:R,checked:R===i,onChange:a},B):null)),n.createElement("p",null,n.createElement("b",null,"Description: "),n.createElement("i",null,T)))},Dg=i=>(0,Ls.nu)(i.filter(a=>!!a)),Og=({mappedData:i,checked:a})=>(0,n.useMemo)(()=>{const{queryWithReplacedParams:u,searchFilterQuery:T,searchFromValue:R,columnValuePath:B,rowValuePath:F,lutParameters:$,searchWithinMs:X,streams:se,aggValue:de,aggFunction:ge,aggField:fe,columnGroupBy:We,rowGroupBy:lt}=i,it=Object.entries({queryWithReplacedParams:u,searchFilterQuery:T,searchFromValue:R,columnValuePath:B,rowValuePath:F}).filter(([Yt])=>a[Yt]).map(([Yt,hn])=>hn),yt=()=>{const Yt={};return a.aggCondition&&(Yt.agg_field=fe,Yt.agg_value=de,Yt.agg_function=ge),a.columnGroupBy&&(Yt.group_by=We),a.rowGroupBy&&(Yt.group_by=(lt||[]).concat(Yt.group_by||[])),Yt},Tt=()=>{const Yt={};return a.lutParameters&&$&&$.length&&(Yt.loc_query_parameters=$),a.searchWithinMs&&X&&(Yt.search_within_ms=X),a.streams&&se&&se.length&&(Yt.streams=se),Yt};return{type:"aggregation-v1",query:Dg(it),...yt(),...Tt()}},[a,i]);var Rg=e("sFVNMWbF"),Ig=e.n(Rg);const Mg={strategy:"EXACT",checked:{},showDetails:!1},Cu=(i,a)=>{const u={...i};return Object.entries(a).forEach(([T,R])=>{Ig()(i,T)&&(u[T]=R)}),u},xg=(i,a)=>{const{type:u,payload:T,possibleKeys:R}=a;switch(u){case"SET_ALL_STRATEGY":return{strategy:"ALL",showDetails:i.showDetails,checked:Cu(R,{searchFilterQuery:!1,queryWithReplacedParams:!1})};case"SET_EXACT_STRATEGY":return{strategy:"EXACT",showDetails:i.showDetails,checked:R};case"SET_ROW_STRATEGY":return{strategy:"ROW",showDetails:i.showDetails,checked:Cu(R,{columnValuePath:!1,columnGroupBy:!1})};case"SET_COL_STRATEGY":return{strategy:"COL",showDetails:i.showDetails,checked:Cu(R,{rowValuePath:!1,rowGroupBy:!1})};case"SET_CUSTOM_STRATEGY":return{strategy:"CUSTOM",showDetails:!0,checked:i.checked};case"UPDATE_CHECKED_ITEMS":return{strategy:"CUSTOM",showDetails:i.showDetails,checked:Cu(i.checked,T)};case"TOGGLE_SHOW_DETAILS":return{strategy:i.strategy,showDetails:!i.showDetails,checked:i.checked};default:return i}},Lg=i=>{const[a,u]=(0,n.useReducer)(xg,Mg),T=(0,n.useCallback)(({type:R,payload:B})=>{const F=rr()(i,$=>!!$);u({type:R,payload:B,possibleKeys:F})},[i]);return(0,n.useEffect)(()=>{T({type:"SET_EXACT_STRATEGY"})},[T]),(0,n.useMemo)(()=>[a,T],[a,T])},Bg=m.default.div` margin-top: 10px; `,vm=({itemKey:i,value:a})=>n.createElement("span",null,n.createElement("i",null,`${Sg[i]}: `),n.createElement("b",null,a)),Bh=({modalData:i,mappedData:a,show:u,onClose:T})=>{var R,B;const[{strategy:F,checked:$,showDetails:X},se]=Lg(i),de=Og({mappedData:a,checked:$}),ge=(0,n.useMemo)(()=>`cedfv-${(0,Dr.A)()}`,[]),fe=`${ke.Ay.ALERTS.DEFINITIONS.CREATE}?step=condition&session-id=${ge}`,We=(0,n.useCallback)(Mo=>{se({type:"UPDATE_CHECKED_ITEMS",payload:Mo})},[se]),lt=(0,n.useCallback)(Mo=>{se({type:`SET_${Mo.target.value}_STRATEGY`})},[se]),it=(0,n.useCallback)(()=>{se({type:"TOGGLE_SHOW_DETAILS"})},[se]),yt=(0,n.useMemo)(()=>ol()($,Hl),[$]),Tt=(0,n.useMemo)(()=>ol()($,wi),[$]),Yt=(0,n.useMemo)(()=>Au()($,[...wi,...Hl]),[$]),hn=(0,n.useMemo)(()=>rr()(ol()(i,Hl),(Mo,is)=>n.createElement(vm,{itemKey:is,value:Mo})),[i]),In=(0,n.useMemo)(()=>rr()(ol()(i,wi),(Mo,is)=>n.createElement(vm,{itemKey:is,value:Mo})),[i]),Qn=(0,n.useMemo)(()=>rr()(Au()(i,[...Hl,...wi]),(Mo,is)=>n.createElement(vm,{itemKey:is,value:Mo})),[i]),to=(0,n.useMemo)(()=>{var Mo,is;return{ALL:!0,ROW:!!((Mo=a==null?void 0:a.rowValuePath)!=null&&Mo.length),COL:!!((is=a==null?void 0:a.columnValuePath)!=null&&is.length),CUSTOM:!0,EXACT:!0}},[(R=a==null?void 0:a.columnValuePath)==null?void 0:R.length,(B=a==null?void 0:a.rowValuePath)==null?void 0:B.length]),Vo=(0,n.useCallback)(()=>{Vs.A.set(ge,de),T()},[ge,de,T]);return n.createElement(Y.Modal,{onHide:T,show:u},n.createElement(Y.Modal.Header,{closeButton:!0},n.createElement(Y.Modal.Title,null,"Configure new event definition")),n.createElement(Y.Modal.Body,null,n.createElement(Ih,{strategyAvailabilities:to,strategy:F,onChange:lt}),n.createElement(Y.Button,{bsStyle:"link",className:"btn-text",bsSize:"xsmall",onClick:it},n.createElement(be.In,{name:`arrow_${X?"drop_down":"right"}`}),"\xA0",X?"Hide strategy details":"Show strategy details"),X&&n.createElement(Bg,null,n.createElement(be.hG,null,!xs()(yt)&&n.createElement(hm,{onChange:We,groupLabel:"Aggregation",checked:yt,labels:hn}),!xs()(Tt)&&n.createElement(hm,{onChange:We,groupLabel:"Search query",checked:Tt,labels:In}),Object.entries(Yt).map(([Mo,is])=>n.createElement(be.m1,{key:Mo,checked:is,onChange:()=>We({[Mo]:!is}),header:Qn[Mo],padded:!1,expandable:!1}))))),n.createElement(Y.Modal.Footer,null,n.createElement(be.z9,{bsStyle:"primary",onClick:Vo,to:fe,target:"_blank"},"Continue configuration")))};var Tu=e("pp5t3b0P"),Ug=e.n(Tu),Ng=e("8u9vblRK"),wg=e.n(Ng),Wg=e("P5NcJT2c"),Fg=e.n(Wg),Kg=e("uzwJl55m");const Uh=i=>i?i.get("filters").filter(a=>a.get("type")==="stream").map(a=>a.get("id")).toArray():[],bu=i=>(0,Ls.nu)(i.filter(a=>Object.keys(a)[0]!=="_exists_").map(a=>{const[u,T]=Object.entries(a)[0];return`${u}:${(0,Ls.ih)(T)}`}),{withBrackets:!1}),Wi=i=>new Set(i.flatMap(({fields:a})=>a)),Fi=({flattenPivots:i,valuePath:a})=>{if(!a)return[];const u=a.reduce((T,R)=>{const B=Object.keys(R)[0];return!T.has(B)&&i.has(B)&&T.set(B,R),T},new Map([]));return Array.from(u.values())},Su=({widget:i,value:a,field:u,valuePath:T})=>{const R=i.config.series.find(it=>it.function===u),{field:B,function:F}=(0,Kg.O)([R])[0],{rowPivots:$,columnPivots:X}=i.config,se=Wi($),de=Wi(X),ge=Fi({flattenPivots:se,valuePath:T}),fe=Fi({flattenPivots:de,valuePath:T}),We=bu(ge),lt=bu(fe);return{aggField:B,aggFunction:F,aggValue:a,rowGroupBy:Array.from(se),columnGroupBy:Array.from(de),rowValuePath:We,columnValuePath:lt}},$g=({widget:i,value:a,field:u,valuePath:T})=>{const{rowPivots:R}=i.config,B=Wi(R),F=Fi({flattenPivots:B,valuePath:T}),$=bu(F);return{searchFromValue:`${u}:${(0,Ls.ih)(a)}`,rowValuePath:$}},Gg=({value:i,field:a})=>({searchFromValue:`${a}:${(0,Ls.ih)(i)}`}),jg=({value:i,field:a})=>({searchFromValue:`${a}:${(0,Ls.ih)(i)}`}),Fa=({widget:i,field:a})=>{if(i.type==="AGGREGATION")return!!i.config.series.find(T=>T.function===a)?Su:$g;if(i.type==="logs")return jg;if(i.type==="messages")return Gg;throw new Error("This widget type has incorrect type or no handler")},Hg=i=>i.reduce((a,u)=>{if(u.type==="lut-parameter-v1"){const T=u.toJSON();a.push(T)}return a},[]),Nh=({parameters:i,parameterBindings:a})=>i.reduce((u,T)=>{var R;if(T.type!=="lut-parameter-v1"){const B=T.toJSON(),{name:F}=B,$=(R=a==null?void 0:a.get(F))==null?void 0:R.value;u[F]=$!=null?$:B==null?void 0:B.default_value}return u},{}),ym=(i=qe().List([]))=>(0,Ls.nu)(i.filter(a=>a.queryString&&!a.disabled).map(a=>`${a.negation?"NOT":""}(${a.queryString})`).toArray(),{withBrackets:!1}),zg=({query:i,restParameterValues:a})=>{let u=i;return Object.entries(a).forEach(([T,R])=>{u=u.replace(`$${T}$`,`${R}`)}),u},wh=({contexts:i,field:a,queryId:u,value:T})=>(0,n.useMemo)(()=>{const R=Fa({widget:i.widget,field:a}),B=i.view.search.queries.find(yt=>yt.id===u),{parameters:F,parameterBindings:$}=i,X=B.timerange.type==="relative"?B.timerange.from*1e3:void 0,se=Hg(F),de=Nh({parameters:F,parameterBindings:$}),ge=ym(B.filters),fe=zg({query:B.query.query_string,restParameterValues:de}),We=Uh(B.filter),{...lt}=R({valuePath:i.valuePath,widget:i.widget,value:T,field:a}),it={searchWithinMs:X,lutParameters:se,searchFilterQuery:ge,queryWithReplacedParams:fe,streams:We,...lt};return Ug()(it,yt=>wg()(yt)?!!yt.length:Fg()(yt)?!0:!!(yt!=null&&yt.trim()))},[i,a,u,T]);var Am=e("Cd4wX32x");const _m=i=>{const a=(0,K.P)(Am.h,({streams:u})=>u.reduce((T,R)=>(T[R.id]={id:R.id,title:R.title},T),{}));return(0,n.useMemo)(()=>{const{aggField:u="",aggFunction:T="",aggValue:R="",columnGroupBy:B,rowGroupBy:F,streams:$,lutParameters:X,...se}=i,de={...se};return T&&(de.aggCondition=`${T}(${u}): ${R}`),$!=null&&$.length&&(de.streams=$.map(ge=>a[ge].title).join(", ")),Object.entries({columnGroupBy:B,rowGroupBy:F}).forEach(([ge,fe])=>{fe&&(de[ge]=fe.join(", "))}),X&&(de.lutParameters=X.map(ge=>ge.name).join(", ")),de},[i,a])},Qg=({value:i,field:a,queryId:u,onClose:T})=>{const R=(0,n.useContext)(Ll.y),B=wh({contexts:R,field:a,queryId:u,value:i}),F=_m(B),[$,X]=(0,n.useState)(!0),se=(0,n.useCallback)(()=>{X(!1),T()},[T]);return $?n.createElement(Bh,{modalData:F,mappedData:B,onClose:se,show:$}):null};var Wh=e("zQXwj91r"),Yg=e("6oM+slHS"),Xg=e("A1XxupLI");const Tm=({streams:i})=>i.map(a=>({indexSet:a.index_set_id,id:a.id})),bm=()=>{const i=(0,Xg.A)(),a=(0,K.P)(Am.h,Tm);return(0,n.useMemo)(()=>{const u=new Set(i),T=u.size>0?({id:R})=>u.has(R):()=>!0;return a.filter(T).map(({indexSet:R})=>R)},[a,i])};var ir=e("yGRmSjYM");const Ki=({field:i,onClose:a})=>{const[u,T]=(0,n.useState)(!0),R=(0,n.useCallback)(()=>{T(!1),a()},[a]),B=bm();return u?n.createElement(Wh.A,{initialSelectedIndexSets:B,onClose:R,initialData:{fieldName:i},show:!0}):null},zl=i=>(0,ir.Nn)(i==null?void 0:i.permissions,"typemappings:edit"),Sm=({field:i,type:a,contexts:u})=>{const{currentUser:T}=u;return!(0,wt.Tn)(i)&&!a.isDecorated()&&!(0,Yg.A)(i)&&zl(T)},Zg=()=>!s.A.isFeatureEnabled("field_types_management"),qg=({contexts:i})=>{const{currentUser:a}=i;return zl(a),zl(a)?null:{title:"No permission",description:"You don't have permission to do that action"}},Pu=Ki;var Pm=e("uDndTqtw");class $i{constructor(a,u){this._value={field:a,direction:u}}get field(){return this._value.field}get direction(){return this._value.direction}toJSON(){const{field:a,direction:u}=this._value;return{field:a,direction:u}}static fromJSON(a){const{field:u,direction:T}=a;return new sl().field(u).direction(Be.A.fromJSON(T)).build()}toBuilder(){const{field:a,direction:u}=this._value;return new sl(Fe.Map({field:a,direction:u}))}}class sl{constructor(a=Fe.Map()){this.value=a}field(a){return new sl(this.value.set("field",a))}direction(a){return new sl(this.value.set("direction",a))}build(){const{field:a,direction:u}=this.value.toObject();return new $i(a,u)}}const Mr="List",Du="Number",Gi=class mc extends Pm.A{constructor(a,u,T,R){super(),this._value={fields:a,filters:u,sort:T,mode:R}}get fields(){return this._value.fields}get filters(){return this._value.filters}get sort(){return this._value.sort}get mode(){return this._value.mode}toBuilder(){return new xr(Fe.Map(this._value))}toJSON(){const{fields:a=Fe.OrderedSet(),filters:u=Fe.OrderedSet(),sort:T,mode:R}=this._value;return{fields:a.toArray(),filters:u.toArray(),sort:T.toJSON(),mode:R}}static builder(){return new xr().fields(Fe.OrderedSet()).filters(Fe.OrderedSet())}static fromJSON(a){const{fields:u,filters:T,sort:R,mode:B}=a;return new mc(Fe.OrderedSet(u),Fe.OrderedSet(T),$i.fromJSON(R),B)}static createDefault(){return new mc(mc.defaultFields,Fe.OrderedSet(),mc.defaultSort,mc.defaultMode)}};Gi.defaultFields=Fe.OrderedSet(["message","event_definition_id","alert","timestamp"]),Gi.defaultSort=new $i("timestamp",Be.A.Descending),Gi.defaultMode=Mr;let al=Gi;class xr{constructor(a=Fe.Map()){this.value=a}fields(a){return new xr(this.value.set("fields",a))}filters(a){return new xr(this.value.set("filters",a))}sort(a){return new xr(this.value.set("sort",a))}mode(a){return new xr(this.value.set("mode",a))}build(){const{fields:a,filters:u,sort:T,mode:R}=this.value.toObject();return new al(a,u,T,R)}}var Fh=e("SwOo9/Yp"),Dm=e("zAtQmw72");const Om=class Vu extends re.A{constructor(a,u,T,R,B,F,$){super(a,Vu.type,u,T,R,B,F,$)}static fromJSON(a){const{id:u,config:T,filter:R,timerange:B,query:F,streams:$,filters:X}=a;return new Vu(u,al.fromJSON(T),R,B,F,$,X)}equals(a){return a instanceof Vu?["id","config","filter","timerange","query","streams","filters"].every(u=>(0,Fh.A)(this._value[u],a[u])):!1}equalsForSearch(a){return a instanceof Vu?["id","config","filter","timerange","query","streams","filters"].every(u=>(0,Dm.A)(this._value[u],a[u])):!1}toBuilder(){const{id:a,config:u,filter:T,timerange:R,query:B,streams:F,filters:$}=this._value;return new Rm((0,Fe.Map)({id:a,config:u,filter:T,timerange:R,query:B,streams:F,filters:$}))}static builder(){return new Rm}};Om.type="events",Om.defaultTitle="Untitled Events Overview";let rl=Om;class Rm extends re.A.Builder{build(){const{id:a,config:u,filter:T,timerange:R,query:B,streams:F,filters:$}=this.value.toObject();return new rl(a,u,T,R,B,F,$)}}const eE=()=>rl.builder().newId().config(al.createDefault()).build(),tE=()=>async i=>i((0,No.QD)(eE()));class Vl{constructor(a,u){this._value={field:a,direction:u}}toJSON(){const{field:a,direction:u}=this._value;return{field:a,direction:u===Be.A.Ascending?"ASC":"DESC"}}static fromJSON({field:a,direction:u}){const T=Be.A.fromJSON(u==="ASC"?"Ascending":"Descending");return new Vl(a,T)}}const ji=({config:{filters:i,sort:a}})=>[{sort:new Vl(a.field,a.direction),type:rl.type,attributes:i,page:1,per_page:10}];var Da=e("UiXZqrDE");const nE=m.default.div` display: flex; .radio { padding-top: 6px; } div:first-child { margin-right: 5px; } `,oE=({name:i,onChange:a,options:u})=>n.createElement(Da.Field,{name:i},({field:{value:T,onChange:R,onBlur:B},meta:{error:F}})=>{const $=X=>{a(X.target.value),R(X)};return n.createElement(Y.Input,{id:"widget-type-configuration",label:"Type",error:F,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},n.createElement(nE,null,u.map(({value:X,label:se})=>n.createElement(Y.Input,{checked:T===X,key:X,formGroupClassName:"",id:i,label:se,onBlur:B,onChange:$,type:"radio",value:X}))))}),Ou=({ariaLabel:i,autoFocus:a,allowCreate:u,className:T,clearable:R,columns:B,columnTitle:F,id:$,excludedColumns:X,menuPortalTarget:se,name:de,onChange:ge,onMenuClose:fe,openMenuOnFocus:We,persistSelection:lt,placeholder:it,selectRef:yt,value:Tt})=>{const Yt=(0,n.useMemo)(()=>B.filter(hn=>!X.includes(hn)).map(hn=>({value:hn,label:F(hn)})).sort(({label:hn},{label:In})=>(0,Sa.j)(hn,In)),[F,B,X]);return n.createElement(tr.A,{options:Yt,inputId:`select-${$}`,forwardedRef:yt,allowCreate:u,className:T,onMenuClose:fe,openMenuOnFocus:We,persistSelection:lt,clearable:R,placeholder:it,name:de,size:"small",value:Tt,"aria-label":i,autoFocus:a,menuPortalTarget:se,onChange:ge})};Ou.defaultProps={allowCreate:!1,ariaLabel:void 0,autoFocus:void 0,className:void 0,clearable:!1,excludedColumns:[],onMenuClose:void 0,openMenuOnFocus:void 0,persistSelection:void 0,placeholder:void 0,selectRef:void 0,menuPortalTarget:void 0};const sE=Ou,aE=m.default.div` display: flex; gap: 5px; `,Gh=(0,m.default)(be.In)(({theme:i})=>(0,m.css)` color: ${i.colors.variant.warning}; `),Ru=()=>n.createElement(aE,null,"Unknown",n.createElement(be.N,{overlay:"This attribute is currently not available, because it requires a valid license.",placement:"bottom"},n.createElement(Gh,{name:"error"}))),Im=m.default.div` display: flex; justify-content: space-between; align-items: center; margin-top: 3px; `,rE=m.default.div` flex: 1; `,lE=m.default.div` display: flex; align-items: center; justify-content: center; min-height: 25px; margin-right: 5px; `,iE=(0,n.forwardRef)(({className:i,dragHandleProps:a,draggableProps:u,item:T,onRemove:R,testIdPrefix:B},F)=>n.createElement(Im,{className:i,ref:F,...u!=null?u:{}},n.createElement(lE,{...a,"data-testid":`${B}-drag-handle`},n.createElement(be.In,{name:"drag_indicator"})),n.createElement(rE,null,T.title==="unknown"?n.createElement(Ru,null):T.title),n.createElement("div",null,n.createElement(be.K0,{name:"delete",title:`Remove ${T.title} column`,onClick:R})))),Mm=({testPrefix:i,selectedColumns:a,onChange:u,displayOverlayInPortal:T,columnTitle:R})=>{const B=(0,n.useMemo)(()=>a==null?void 0:a.map(de=>({id:de,title:R(de)})),[R,a]),F=(0,n.useCallback)((de,ge)=>{const fe=[...a];fe[de]=ge,u(fe)},[u,a]),$=(0,n.useCallback)(de=>{const ge=a.filter(fe=>fe!==de);u(ge)},[u,a]),X=(0,n.useCallback)(({item:de,index:ge,dragHandleProps:fe,draggableProps:We,className:lt,ref:it})=>n.createElement(iE,{onChange:yt=>F(ge,yt),onRemove:()=>$(de.id),selectedColumns:a!=null?a:[],item:de,testIdPrefix:`${i}-column-${ge}`,dragHandleProps:fe,draggableProps:We,className:lt,ref:it}),[a,i,F,$]),se=(0,n.useCallback)(de=>{u(de.map(({id:ge})=>ge))},[u]);return a!=null&&a.length?n.createElement(be.bH,{items:B,onMoveItem:se,customListItemRender:X,displayOverlayInPortal:T}):null};Mm.defaultProps={displayOverlayInPortal:!1,testPrefix:void 0};const cE=Mm,xm=({columnTitle:i,columns:a,createSelectPlaceholder:u,displaySortableListOverlayInPortal:T,menuPortalTarget:R,name:B,testPrefix:F})=>n.createElement(Da.Field,{name:B},({field:{value:$,onChange:X}})=>n.createElement(n.Fragment,null,n.createElement(cE,{testPrefix:F,selectedColumns:$.toArray(),columnTitle:i,displayOverlayInPortal:T,onChange:se=>X({target:{value:Fe.OrderedSet(se),name:B}})}),n.createElement(sE,{id:"column-create-select",columnTitle:i,columns:a,onChange:se=>X({target:{value:Fe.OrderedSet([...$.toArray(),se]),name:B}}),clearable:!1,persistSelection:!1,name:"column-create-select",value:void 0,menuPortalTarget:R,excludedColumns:$,placeholder:u,ariaLabel:u})));xm.defaultProps={createSelectPlaceholder:"Add a column",displaySortableListOverlayInPortal:!1,menuPortalTarget:void 0,testPrefix:""};const Hh=xm,uE=m.default.div` display: flex; flex-direction: column; `,Lm=({name:i,directions:a,columns:u,columnTitle:T,directionTitle:R})=>{const{values:B}=(0,Da.useFormikContext)(),F=(0,n.useMemo)(()=>u.map(se=>({value:se,label:T(se)})).sort(({label:se},{label:de})=>(0,Sa.j)(se,de)),[T,u]),$=(0,n.useMemo)(()=>a.map(se=>({value:se,label:R(se)})).sort(({label:se},{label:de})=>(0,Sa.j)(se,de)),[R,a]),X=B[i].field&&!u.includes(B[i].field);return n.createElement(uE,null,n.createElement(Da.Field,{name:`${i}.field`},({field:{value:se,onChange:de,name:ge}})=>n.createElement(Y.Input,{id:"sort-configuration-column",label:"Column",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},n.createElement(be.l6,{id:"sort-configuration-column-select",placeholder:"Select a column",options:F,matchProp:"label",menuPortalTarget:document.body,clearable:!1,size:"small",onChange:fe=>de({target:{value:fe,name:ge}}),value:X?"Unknown":se}))),n.createElement(Da.Field,{name:`${i}.direction`},({field:{value:se,onChange:de,name:ge}})=>n.createElement(Y.Input,{id:"sort-configuration-direction",label:"Direction",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},n.createElement(be.l6,{id:"sort-configuration-direction-select",placeholder:"Select a direction",options:$,menuPortalTarget:document.body,matchProp:"label",clearable:!1,size:"small",onChange:fe=>de({target:{value:fe,name:ge}}),value:se}))))};Lm.defaultProps={columnTitle:i=>i,directionTitle:i=>i};const dE=Lm,Bm="Configure a new filter",mE=m.default.div` display: flex; flex-direction: column; `,pE=m.default.button` visibility: hidden; height: 0; padding: 0; border: 0; `,gE=({filterComponents:i,columnTitle:a,onCreate:u,selectedFilters:T})=>{var R,B,F,$;const X=(0,n.useRef)(null),[se,de]=(0,n.useState)(!1),[ge,fe]=(0,n.useState)(null),[We,lt]=n.useState(),it=ge?i.find(({attribute:to})=>to===ge):void 0,yt=ge?(R=T.find(({field:to})=>to===ge))==null?void 0:R.value:[],Tt=(0,n.useMemo)(()=>i.map(to=>({value:to.attribute,label:a(to.attribute),disabled:!to.allowMultipleValues&&!!T.find(({field:Vo})=>Vo===to.attribute)})).sort(({label:to},{label:Vo})=>(0,Sa.j)(to,Vo)),[a,i,T]),Yt=to=>{fe(to),de(!0)},hn=(to,Vo)=>{Vo&&u(to,Vo),de(!1),fe(null),lt(null)},In=()=>{hn(ge,We)},Qn=(to,Vo=!0)=>{var Mo,is;const Mp=(is=(Mo=it==null?void 0:it.valueForConfig)==null?void 0:Mo.call(it,to))!=null?is:to;Vo?hn(ge,Mp):lt(Mp)};return n.createElement(mE,{ref:X},n.createElement(be.l6,{id:"filter-select",placeholder:Bm,"aria-label":Bm,options:Tt,matchProp:"label",menuPortalTarget:document.body,clearable:!1,size:"small",onChange:to=>Yt(to),value:ge}),n.createElement(Y.Menu,{position:"bottom-start",withinPortal:!0,onClose:In,opened:se,width:(B=X==null?void 0:X.current)==null?void 0:B.offsetWidth},n.createElement(Y.Menu.Target,null,n.createElement(pE,{type:"button"})),n.createElement(Y.Menu.Dropdown,null,it==null?void 0:it.configuration(yt!=null?yt:[],($=(F=it==null?void 0:it.valueFromConfig)==null?void 0:F.call(it,We))!=null?$:We,Qn))))},kh=({filterComponent:i,column:a,value:u,columnTitle:T,onEdit:R,selectedValues:B,containerWidth:F,onDelete:$})=>{var X,se;const[de,ge]=(0,n.useState)(!1),[fe,We]=n.useState(u),lt=Tt=>{Tt?R(Tt):$(),We(null),ge(!1)},it=(Tt,Yt=!0)=>{var hn,In;const Qn=(In=(hn=i==null?void 0:i.valueForConfig)==null?void 0:hn.call(i,Tt))!=null?In:Tt;We(Qn),Yt&<(Qn)},yt=()=>{ge(!1),i.submitChangesOnClose&<(fe)};return i?n.createElement(Y.Menu,{position:"bottom-end",withinPortal:!0,opened:de,width:F,offset:{alignmentAxis:-25},onClose:yt},n.createElement(Y.Menu.Target,null,n.createElement(be.K0,{name:"edit",title:`Edit ${T(a)} filter`,onClick:()=>ge(!0)})),n.createElement(Y.Menu.Dropdown,null,i.configuration(B,(se=(X=i.valueFromConfig)==null?void 0:X.call(i,fe))!=null?se:fe,it))):null},EE=m.default.div` display: flex; flex-direction: column; width: 100%; `,fE=m.default.div` display: flex; flex-direction: column; width: 100%; `,Um=m.default.div` display: flex; justify-content: space-between; `,hE=m.default.div` padding-top: 5px; `,vE=m.default.div` margin-top: 2px; `,yE=({selectedFilters:i,columnTitle:a,filterComponents:u,onDelete:T,onEdit:R})=>{const B=(0,n.useRef)(null);return n.createElement(EE,{ref:B},i.toArray().map(({field:F,value:$},X)=>{const se=a(F),de=u.find(({attribute:ge})=>ge===F);return n.createElement(fE,{key:F},n.createElement(Y.Input,{id:`${F}-filter-configuration`,label:se==="unknown"?n.createElement(Ru,null):se,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},$.map((ge,fe)=>{var We,lt,it;const yt=Tt=>{R(X,fe,Tt)};return n.createElement(Um,{key:ge},n.createElement(hE,null,de?(lt=(We=de.renderValue)==null?void 0:We.call(de,ge))!=null?lt:ge:""),n.createElement(vE,null,de&&n.createElement(kh,{filterComponent:de,onEdit:yt,onDelete:()=>T(X,ge),selectedValues:$,columnTitle:a,containerWidth:(it=B.current)==null?void 0:it.offsetWidth,column:F,value:ge}),n.createElement(be.K0,{name:"delete",onClick:()=>T(X,ge),title:`Delete ${se} filter`})))})))}))},AE=({filterComponents:i,columnTitle:a,name:u})=>n.createElement("div",null,n.createElement(Da.Field,{name:u},({field:{value:T,onChange:R}})=>{const B=se=>R({target:{value:se,name:u}}),F=(se,de)=>{const ge=T.toList(),fe=T.toList().findIndex(({field:We})=>We===se);if(fe>=0){const lt={...ge.get(fe)};if(!lt.value.includes(de))return lt.value=[...lt.value,de],B(ge.set(fe,lt).toOrderedSet())}return B(ge.push({field:se,value:[de]}).toOrderedSet())},$=(se,de)=>{const ge=T.toList(),fe=ge.get(se);if(fe.value.length===1)return B(ge.delete(se).toOrderedSet());const We={...fe,value:fe.value.filter(lt=>lt!==de)};return B(ge.set(se,We).toOrderedSet())},X=(se,de,ge)=>{const fe=T.toList(),We={...fe.get(se)},lt=[...We.value];lt[de]=ge,We.value=lt,B(fe.set(se,We).toOrderedSet())};return n.createElement(n.Fragment,null,n.createElement(yE,{selectedFilters:T,columnTitle:a,onDelete:$,onEdit:X,filterComponents:i}),n.createElement(gE,{selectedFilters:T,filterComponents:i,columnTitle:a,onCreate:F}))})),Iu=()=>(0,Ye.A)("views.components.widgets.events.attributes").filter(({useCondition:a})=>typeof a=="function"?a():!0),Nm={INITIAL_PAGE:1,PER_PAGE:10},CE=[Be.A.Ascending.direction,Be.A.Descending.direction],TE=[{label:"List",value:Mr},{label:"Count",value:Du}],bE=(0,m.default)(Da.Form)` display: flex; width: 100%; `,Qh=m.default.div` height: 100%; .form-group { margin: 0 0 3px; &:last-child { margin: 0; } .control-label { padding-left: 0; padding-right: 0; padding-top: 5px; font-weight: normal; text-align: left; hyphens: auto; } } div[class^="col-"] { padding-right: 0; padding-left: 0; } `,SE=(0,m.default)(Y.Row)` height: 100%; padding-bottom: 15px; flex: 1; `,PE=(0,m.default)(Y.Col)` height: 100%; `,DE=()=>{const{values:i,submitForm:a}=(0,Da.useFormikContext)();return(0,n.useEffect)(()=>{a()},[i,a]),n.createElement(n.Fragment,null)},Yh=({children:i,onCancel:a,config:u,onChange:T,onSubmit:R})=>{const B=(0,Ye.A)("views.components.widgets.events.filterComponents"),F=Iu(),$=(0,n.useMemo)(()=>({mode:u.mode,filters:u.filters,fields:u.fields,sort:{field:u.sort.field,direction:u.sort.direction.direction}}),[u.fields,u.filters,u.sort.direction,u.sort.field,u.mode]),X=({sort:fe,mode:We,filters:lt,fields:it})=>{const yt=u.sort.toBuilder().field(fe.field).direction(Be.A.fromJSON(fe.direction)).build();T(u.toBuilder().mode(We).filters(lt).fields(it).sort(yt).build())},se=F.map(({attribute:fe})=>fe),de=F.filter(({sortable:fe})=>fe).map(({attribute:fe})=>fe),ge=(0,n.useCallback)(fe=>{var We,lt;return(lt=(We=F.find(({attribute:it})=>fe===it))==null?void 0:We.title)!=null?lt:"unknown"},[F]);return n.createElement(Da.Formik,{initialValues:$,enableReinitialize:!0,validateOnChange:!0,validateOnMount:!0,onSubmit:X},({setValues:fe,values:We})=>{const lt=it=>{if(it!==We.mode){const yt={field:al.defaultSort.field,direction:al.defaultSort.direction.direction};it===Du&&fe({...We,fields:qe().OrderedSet(),sort:yt}),it===Mr&&fe({...We,fields:al.defaultFields,sort:yt})}};return n.createElement(bE,{className:"form form-horizontal"},n.createElement(DE,null),n.createElement(SE,null,n.createElement(PE,{md:4,lg:3},n.createElement(Qh,null,n.createElement(Rl.A,{actions:n.createElement(fi.A,{onCancel:a,onSubmit:R}),alignActionsAtBottom:!0},n.createElement(wa,{description:"Visualization"},n.createElement(oE,{name:"mode",onChange:lt,options:TE})),We.mode===Mr&&n.createElement(wa,{description:"Columns"},n.createElement(Hh,{columns:se,createSelectPlaceholder:"Select a new column",name:"fields",menuPortalTarget:document.body,columnTitle:ge})),n.createElement(wa,{description:"Filter"},n.createElement(AE,{columnTitle:ge,name:"filters",filterComponents:B})),We.mode===Mr&&n.createElement(wa,{description:"Sorting"},n.createElement(dE,{columns:de,name:"sort",columnTitle:ge,directions:CE}))))),n.createElement(PE,{md:8,lg:9},i)))})};var Mu=e("DUKaTDO2"),RE=e("ysvTSBlf");const IE=async i=>(0,ce.Ay)("GET",(0,I.H3)(`/events/definitions/${i}`)),wm=(i,a=!0)=>{const{data:u,isFetching:T}=(0,Mu.useQuery)({queryKey:["get-event-definition-details",i],queryFn:()=>IE(i),onError:R=>{RE.A.error(`Loading archives failed with status: ${R}`)},retry:0,keepPreviousData:!0,enabled:!!i&&a});return{data:u,isFetching:T}};var Hi=e("q2j1bVbz");const Wm=({eventDefinitionId:i,displayAsLink:a})=>{var u;const T=(0,Hi.A)(),R=(0,ir.Nn)(T.permissions,`eventdefinitions:read:${i}`),{data:B,isFetching:F}=wm(i,R),$=(u=B==null?void 0:B.title)!=null?u:i;return F?n.createElement(be.y$,null):!a||!R?n.createElement(n.Fragment,null,$):B?n.createElement(jl.N,{to:ke.Ay.ALERTS.DEFINITIONS.show(B.id),target:"_blank"},$):null};Wm.defaultProps={displayAsLink:!0};const Fm=Wm;var ME=e("BGrPYJnO"),xu=e("w4l/b+9L");const xE=[{attribute:"timestamp",displayValue:i=>n.createElement(be.Dc,{dateTime:i}),sortable:!0,title:"Created At"},{attribute:"alert",displayValue:i=>n.createElement(ME.A,{isAlert:i}),sortable:!0,title:"Type"},{attribute:"event_definition_id",displayValue:i=>n.createElement(Fm,{eventDefinitionId:i}),sortable:!0,title:"Event Definition"},{attribute:"priority",displayValue:i=>n.createElement(xu.A,{priority:i}),sortable:!0,title:"Priority"},{attribute:"key",title:"Key"},{attribute:"message",title:"Description"}];var Lu=e("+c0Nkc8d"),zi=e("5YmxItcn");const Zh=({warmTierIndices:i})=>{if(!(0,Lu.E)(i))return null;const a=R=>`${(0,ts.to)(new Date(R),"default")}`,T=i.map(R=>{const B=a(R.begin),F=a(R.end);return`${B} to ${F}`}).join(", ");return n.createElement("span",null,"The selected time range includes data stored in the Warm Tier, which can be slow to retrieve.",T.length>0&&` The following interval falls within the Warm Tier: ${T}.`)},LE=({validationState:i})=>{const a=(0,Lu.q)(i);return(0,Lu.E)(a)?n.createElement(zi.uc,null,n.createElement("span",null,n.createElement("b",null,"Warm Tier Search"),": ",n.createElement(Zh,{warmTierIndices:a}))):null};var Bu=e("BcOICGB7"),BE=e("yM9BwDic");const $m=class ku extends Bu.A{constructor(a,u,T,R,B,F,$){super(ku.type,a,u,T,R,B,F,$)}static create(a,u,T,R,B,F,$){return new ku(a,u,T,R,B,F,$)}toBuilder(){const{type:a,name:u,title:T,description:R,dataType:B,defaultValue:F,optional:$,binding:X}=this._value;return new pa(Fe.Map({type:a,name:u,title:T,description:R,dataType:B,defaultValue:F,optional:$,binding:X}))}toJSON(){const{type:a,name:u,title:T,description:R,dataType:B,defaultValue:F,optional:$,binding:X}=this._value;return{type:a,name:u,title:T,description:R,data_type:B,default_value:F,optional:$,binding:X?X.toJSON():void 0}}static fromJSON(a){const{name:u,title:T,description:R,data_type:B,default_value:F,optional:$,binding:X}=a;return new ku(u,T,R,B,F,$,BE.A.fromJSON(X))}static builder(){return new pa().type(ku.type).optional(!1).dataType("any").binding(BE.A.empty())}};$m.type="value-parameter-v1";let Vi=$m;class pa{constructor(a=Fe.Map()){this.value=a}type(a){return new pa(this.value.set("type",a))}name(a){return new pa(this.value.set("name",a))}title(a){return new pa(this.value.set("title",a))}description(a){return new pa(this.value.set("description",a))}dataType(a){return new pa(this.value.set("dataType",a))}defaultValue(a){return new pa(this.value.set("defaultValue",a))}optional(a){return new pa(this.value.set("optional",a))}binding(a){return new pa(this.value.set("binding",a))}build(){const{name:a,title:u,description:T,dataType:R,defaultValue:B,optional:F,binding:$}=this.value.toObject();return new Vi(a,u,T,R,B,F,$)}}Vi.Builder=pa;class ki{constructor(a,u){this._value={field:a,direction:u}}toJSON(){const{field:a,direction:u}=this._value;return{field:a,order:u===Be.A.Ascending?"ASC":"DESC"}}static fromJSON({field:a,order:u}){const T=Be.A.fromJSON(u==="ASC"?"Ascending":"Descending");return new ki(a,T)}}const ev=i=>{const{config:{decorators:a,sort:u}}=i;return[{type:"messages",decorators:a,sort:u.map(T=>new ki(T.field,T.direction))}]};var UE=e("TWZE6ai3");const NE=m.default.div` height: 100%; display: flex; justify-content: center; align-items: center; `,wE=m.default.div` margin: 3px 15px 0 0; `,tv=m.default.div` max-width: 700px; `,Ql=m.default.div` margin-bottom: 5px; &:last-child { margin-bottom: 0; } `,WE=m.default.ol` padding: 0; list-style: decimal inside none; `,Uu=({config:i,type:a})=>n.createElement(NE,null,n.createElement(wE,null,n.createElement(be.In,{name:"help",size:"3x"})),n.createElement(tv,null,n.createElement(Ql,null,n.createElement("strong",null,"Unknown Widget: ",a)),n.createElement(Ql,null,"Unfortunately we are not able to render this widget, because we do not know how to handle widgets of type ",n.createElement("strong",null,a),". This might be caused by one of these situations:"),n.createElement(Ql,null,n.createElement(WE,null,n.createElement("li",null,"You created this widget using a plugin that is now missing."),n.createElement("li",null,"This widget was part of a legacy dashboard and created by a plugin that is not available anymore."))),n.createElement(Ql,null,"What can you do about it? You can load the plugin again, contact the original plugin author for a plugin that works with Graylog 3.2+, or remove the widget if you do not need it anymore."),n.createElement(Ql,null,"Either way, you can copy the widget\u2019s config to the clipboard: ",n.createElement(UE.A,{title:n.createElement(be.In,{name:"content_copy",size:"sm"}),text:JSON.stringify(i,null,2),bsSize:"xsmall"}))));var Nu=e("yAXMqwrl");const Gm=()=>{const i=(0,ou.A)(),{streamId:a}=(0,Nu.useParams)();return(0,n.useEffect)(()=>{a?i.push(ke.Ay.stream_search(a)):i.push(ke.Ay.SEARCH)},[i,a]),null};var Qi=e("wfOnu0E0"),FE=e("0k5v4UPt"),Yi=e("LgqVPv05");const KE=i=>(0,Ye.A)("views.components.widgets.events.detailsComponent").filter(u=>u.useCondition?!!u.useCondition():!0).map(({component:u,key:T})=>n.createElement(u,{key:T,eventId:i})),ov=({eventId:i})=>{const{data:a,isLoading:u}=(0,FE.A)(i),T=(0,Hi.A)(),R=(0,ir.Nn)(T.permissions,`eventdefinitions:read:${a==null?void 0:a.event_definition_id}`),{data:B,isFetching:F}=wm(a==null?void 0:a.event_definition_id,R);return F||u?n.createElement(be.y$,null):n.createElement(Yi.A,{event:a,eventDefinitionContext:B})},$E=({eventId:i})=>{const a=KE(i);return a!=null&&a.length?n.createElement(n.Fragment,null,a):n.createElement(ov,{eventId:i})},GE=i=>{const a=(0,n.useRef)({}),T=(0,Ye.A)("views.components.widgets.events.actions").filter(F=>F.useCondition?!!F.useCondition():!0),R=T.map(({component:F,key:$})=>n.createElement(F,{key:`event-action-${$}`,eventId:i,modalRef:()=>a.current[$]})),B=T.filter(({modal:F})=>!!F).map(({modal:F,key:$})=>n.createElement(F,{key:`event-action-modal-${$}`,eventId:i,ref:X=>{a.current[$]=X}}));return{actions:R,actionModals:B}},jm=({eventId:i,hasReplayInfo:a,eventDefinitionId:u})=>{const T=(0,Hi.A)(),[R,B]=(0,n.useState)(!1),F=()=>B(de=>!de),{actions:$,actionModals:X}=GE(i),se=[a&&(0,ir.Nn)(T.permissions,`eventdefinitions:read:${u}`)?n.createElement(Y.MenuItem,{href:ke.Ay.ALERTS.replay_search(i),target:"_blank",key:"replay-search"},"Replay search"):null,$.length?$:null].filter(Boolean);return n.createElement(n.Fragment,null,n.createElement(Y.ButtonToolbar,null,n.createElement(be.K0,{name:"open_in_full",title:"View event details",onClick:F}),!!se.length&&n.createElement(Y.Menu,{position:"bottom-end"},n.createElement(Y.Menu.Target,null,n.createElement(be.K0,{name:"more_vert",title:"Toggle event actions"})),n.createElement(Y.Menu.Dropdown,null,se))),R&&n.createElement(Y.Modal,{show:R,bsSize:"large",onHide:F},n.createElement(Y.Modal.Header,{closeButton:!0},n.createElement(Y.Modal.Title,null,"Event details")),n.createElement(Y.Modal.Body,null,n.createElement($E,{eventId:i})),n.createElement(Y.Modal.Footer,null,n.createElement(be.E6,{displayCancel:!1,onSubmit:F,submitButtonType:"button",submitButtonText:"Close"}))),X)},Hm=m.default.td(({theme:i})=>(0,m.css)` && { border-color: ${i.colors.table.row.border}; } `),HE=({event:i,fields:a})=>{const u=Iu();return n.createElement("tr",{key:i.id},a.toArray().map(T=>{const R=i[T],B=F=>{var $,X,se;return(se=(X=($=u.find(({attribute:de})=>de===T))==null?void 0:$.displayValue)==null?void 0:X.call($,F))!=null?se:F};return n.createElement(Hm,{key:T},B(R))}),n.createElement(Qi.A,null,n.createElement(Hm,null,n.createElement(jm,{eventId:i.id,eventDefinitionId:i.event_definition_id,hasReplayInfo:!!i.replay_info}))))},Xi=(i,a)=>`Sort ${i} ${a.direction}`,zE=(i,a,u,T)=>{T(!0),u(a,i).then(()=>{T(!1)})},VE={tooltip:i=>Xi(i,Be.A.Descending),handleSortChange:i=>i(Be.A.Descending,!0)},rv={tooltip:i=>Xi(i,Be.A.Ascending),handleSortChange:i=>i(Be.A.Ascending,!0)},kE={tooltip:i=>Xi(i,Be.A.Ascending),handleSortChange:i=>i(Be.A.Ascending,!0)},QE=i=>{switch(i==null?void 0:i.direction){case Be.A.Ascending.direction:return VE;case Be.A.Descending.direction:return rv;default:return kE}},YE=({attribute:i,attributeTitle:a,onSortChange:u,setLoadingState:T,activeDirection:R,activeAttribute:B})=>{const F=B===i?R:void 0,{tooltip:$,handleSortChange:X}=QE(R),se=ge=>zE(ge,i,u,T),de=$(a);return n.createElement(be.yc,{onChange:()=>X(se),activeDirection:F==null?void 0:F.direction,title:de})},zm=m.default.div` overflow: auto; `,XE=(0,m.default)(Ze.M_)` && { min-width: auto; width: 35px; } `,cv=({events:i,config:a,onSortChange:u,setLoadingState:T})=>{const R=Iu(),B=(0,n.useCallback)((F,$)=>u(new $i(F,$)),[u]);return n.createElement(zm,null,n.createElement("table",{className:"table table-condensed"},n.createElement(Ze.nd,null,n.createElement("tr",null,a.fields.toArray().map(F=>{var $;const X=R.find(({attribute:se})=>F===se);return n.createElement(Ze.M_,{key:F},($=X==null?void 0:X.title)!=null?$:n.createElement(Ru,null),(X==null?void 0:X.sortable)&&n.createElement(YE,{onSortChange:B,attribute:F,attributeTitle:X.title,activeAttribute:a.sort.field,activeDirection:a.sort.direction,setLoadingState:T}))}),n.createElement(Qi.A,null,n.createElement(XE,null)))),n.createElement("tbody",null,i==null?void 0:i.map(F=>n.createElement(HE,{key:F.id,event:F,fields:a.fields})))))},JE=m.default.div` display: flex; flex-direction: column; justify-content: space-between; overflow: auto; height: 100%; `,ZE=(i,a)=>{const u=(0,n.useCallback)(()=>{a!==1&&i({currentPage:1,pageErrors:[]})},[a,i]);(0,tn.A)(u)},uv=(i,a,u)=>{const T=(0,Gn.A)(),{stopAutoRefresh:R}=(0,Bt.A)();return(0,n.useCallback)(B=>{const F={[i]:{page:B,per_page:Nm.PER_PAGE}};return R(),a(!0),T(Gt(F)).then($=>{const{result:X}=$.payload;a(!1),u({pageErrors:X.errors,currentPage:B})})},[T,i,a,u,R])},qE=({data:i,config:a,onConfigChange:u,setLoadingState:T})=>{var R;const[{currentPage:B,pageErrors:F},$]=(0,n.useState)({pageErrors:[],currentPage:Nm.INITIAL_PAGE});ZE($,B);const X=uv(i.id,T,$),se=(0,n.useCallback)(de=>{const ge=a.toBuilder().sort(de).build();return u(ge)},[a,u]);return n.createElement(JE,null,n.createElement(be.OW,{onChange:X,useQueryParameter:!1,activePage:B,pageSize:Nm.PER_PAGE,showPageSizeSelect:!1,totalItems:(R=i.totalResults)!=null?R:0},F!=null&&F.length?n.createElement(Wo.A,{errors:F}):n.createElement(cv,{config:a,setLoadingState:T,onSortChange:se,events:i.events})))},Vm=(0,m.default)(be.un)` height: 100%; width: 100%; padding-bottom: 10px; `,ef=({data:i})=>n.createElement(Vm,{resizeDelay:20},({height:a,width:u})=>n.createElement(Ja,{height:a,width:u,center:!0},n.createElement("div",null,i.totalResults))),tf=i=>{var a;const{config:u}=i;return u.mode===Mr?n.createElement(qE,{...i}):u.mode===Du?n.createElement(ef,{...i}):n.createElement("div",null,"Unknown widget visualization type ",(a=u.mode)!=null?a:"undefined")};var km=e("jhzeTBRS");const nf=({value:i,onSelect:a,selectedValues:u})=>{const{data:T,isInitialLoading:R}=(0,km.A)({query:"",page:1,pageSize:1e5,sort:{attributeId:"title",direction:"asc"}}),B=T==null?void 0:T.elements.map(({title:F,id:$})=>({label:F,value:$,disabled:u.includes($)}));return R?n.createElement(be.y$,null):n.createElement(be.l6,{placeholder:"Select event definition",clearable:!1,menuIsOpen:!0,options:B,onChange:a,value:i})},Qm=({onSelect:i,selectedValues:a})=>{const u=a.includes("true"),T=a.includes("false");return n.createElement(Y.ListGroup,{className:"no-bm"},n.createElement(Y.ListGroupItem,{onClick:()=>!u&&i("true"),disabled:u},"Alert"),n.createElement(Y.ListGroupItem,{onClick:()=>!T&&i("false"),disabled:T},"Event"))};var of=e("UMMlOSMl");const sf=({onSelect:i,selectedValues:a})=>n.createElement(Y.ListGroup,{className:"no-bm"},Object.keys(of.A.properties).map(u=>{const T=a.includes(u);return n.createElement(Y.ListGroupItem,{onClick:()=>!T&&i(u),disabled:T,key:u},n.createElement(xu.A,{priority:Number(u)}))})),af=[{configuration:(i,a,u)=>n.createElement(nf,{value:a,onSelect:T=>u(T),selectedValues:i}),attribute:"event_definition_id",renderValue:i=>n.createElement(Fm,{eventDefinitionId:i,displayAsLink:!1}),allowMultipleValues:!0},{attribute:"alert",configuration:(i,a,u)=>n.createElement(Qm,{onSelect:u,selectedValues:i}),renderValue:i=>i==="true"?"Alert":"Event"},{attribute:"priority",configuration:(i,a,u)=>n.createElement(sf,{onSelect:u,selectedValues:i}),renderValue:i=>n.createElement(xu.A,{priority:i})}];re.A.registerSubtype(et.A.type,et.A),re.A.registerSubtype(Ro.A.type,Ro.A),re.A.registerSubtype(rl.type,rl),Mn.A.registerSubtype(Pr.type,or),Mn.A.registerSubtype(Va.type,zn),Mn.A.registerSubtype(La.type,ha),Mn.A.registerSubtype(El.type,zs),Mn.A.registerSubtype(Li.type,gs),Mn.A.registerSubtype(Ks.type,_t.Ay),Mn.A.registerSubtype(Ze.Ay.type,pg.A),Mn.A.registerSubtype(J.type,ar),Bu.A.registerSubtype(Vi.type,Vi),Bu.A.registerSubtype(ru.A.type,ru.A);const Ym=(i,a=[])=>a.includes(i),lf={pages:{search:{component:Wc}},routes:[{path:$t.JD,component:fd,parentComponent:Se.A},{path:$t.ZM,component:Xd,parentComponent:null},{path:$t.JF,component:gd},{path:$t.iT,component:Il,parentComponent:Se.A},{path:$t.sm,component:Gm,parentComponent:null},{path:$t.rw,component:Il,parentComponent:Se.A},{path:`${ke.Ay.unqualified.stream_search(":streamId")}/new`,component:Gm,parentComponent:null},{path:ke.Ay.unqualified.stream_search(":streamId"),component:Ed,parentComponent:Se.A},{path:$t.pZ,component:Wc,parentComponent:Se.A},{path:$t.nH,component:Il,parentComponent:Se.A},{path:ke.Ay.ALERTS.replay_search(":alertId"),component:yi,parentComponent:Se.A},{path:ke.Ay.ALERTS.DEFINITIONS.replay_search(":definitionId"),component:Ai,parentComponent:Se.A}],enterpriseWidgets:[{type:"MESSAGES",displayName:"Message List",defaultHeight:5,reportStyle:()=>({width:800}),defaultWidth:6,visualizationComponent:Ps,editComponent:Hp,hasEditSubmitButton:!0,needsControlledHeight:()=>!1,searchResultTransformer:i=>i[0],searchTypes:ev,titleGenerator:()=>Ro.A.defaultTitle},{type:"AGGREGATION",displayName:"Results",defaultHeight:4,defaultWidth:4,reportStyle:()=>({width:600}),visualizationComponent:Eo.Ay,editComponent:cm._,hasEditSubmitButton:!0,needsControlledHeight:i=>{const a=Ue()(i,"config.visualization");return![Ze.Ay.type].find(T=>T===a)},searchResultTransformer:wp,searchTypes:od,titleGenerator:i=>i.config.rowPivots.length>0?`Aggregating ${i.config.series.map(a=>a.effectiveName).join(", ")} by ${i.config.rowPivots.flatMap(({fields:a})=>a).join(", ")}`:i.config.series.length>0?`Aggregating ${i.config.series.map(a=>a.effectiveName).join(", ")}`:et.A.defaultTitle},{type:"EVENTS",displayName:"Events",defaultHeight:4,defaultWidth:6,hasEditSubmitButton:!0,visualizationComponent:tf,editComponent:Yh,searchTypes:ji,titleGenerator:()=>rl.defaultTitle,needsControlledHeight:()=>!1,searchResultTransformer:i=>i==null?void 0:i[0]},{type:"default",visualizationComponent:Uu,needsControlledHeight:()=>!0,editComponent:Uu,searchTypes:()=>[]}],searchTypes:[{type:"messages",handler:ut,defaults:{limit:150,offset:0}},{type:"pivot",handler:sd,defaults:{}},{type:"events",handler:Zt.Ay,defaults:{}}],fieldActions:[{type:"chart",title:"Chart",thunk:go,isEnabled:({type:i})=>i.isNumeric(),resetFocus:!0},{type:"aggregate",title:"Show top values",thunk:Fn,isEnabled:({field:i,type:a,contexts:{analysisDisabledFields:u}})=>!(0,wt.Tn)(i)&&a.isEnumerable()&&!a.isDecorated()&&!Ym(i,u),resetFocus:!0},{type:"statistics",title:"Statistics",isEnabled:({field:i,type:a,contexts:{analysisDisabledFields:u}})=>!(0,wt.Tn)(i)&&!a.isDecorated()&&!Ym(i,u),thunk:rd,resetFocus:!1},{type:"add-to-table",title:"Add to table",thunk:hs,isEnabled:hs.isEnabled,isHidden:hs.isHidden,resetFocus:!1},{type:"remove-from-table",title:"Remove from table",thunk:Ci,isEnabled:Ci.isEnabled,isHidden:Ci.isHidden,resetFocus:!1},{type:"add-to-all-tables",title:"Add to all tables",thunk:$s,isEnabled:({field:i,type:a})=>!(0,wt.Tn)(i)&&!a.isDecorated(),resetFocus:!1},{type:"remove-from-all-tables",title:"Remove from all tables",thunk:_d,isEnabled:({field:i,type:a})=>!(0,wt.Tn)(i)&&!a.isDecorated(),resetFocus:!1},{type:"copy-field-to-clipboard",title:"Copy field name to clipboard",handler:dm,isEnabled:()=>!0,resetFocus:!1},{type:"change-field-type",title:"Change field type",isEnabled:Sm,isHidden:Zg,resetFocus:!1,component:Pu,help:qg}],valueActions:dg([{type:"exclude",title:"Exclude from results",thunk:qr,isEnabled:({field:i,type:a})=>!(0,wt.Tn)(i)&&!a.isDecorated(),resetFocus:!1},{type:"add-to-query",title:"Add to query",thunk:Ts.A,isEnabled:({field:i,type:a})=>!(0,wt.Tn)(i)&&!a.isDecorated(),resetFocus:!1},{type:"show-bucket",title:"Show documents for value",thunk:jc,isEnabled:jc.isEnabled,resetFocus:!0},{type:"create-extractor",title:"Create extractor",isEnabled:({type:i,contexts:a})=>!!a.message&&!i.isDecorated()&&!!a.isLocalNode,component:bd,resetFocus:!1},{type:"highlight-value",title:"Highlight this value",thunk:zc,isEnabled:zc.isEnabled,resetFocus:!1},{type:"copy-value-to-clipboard",title:"Copy value to clipboard",handler:um,isEnabled:()=>!0,resetFocus:!1},{type:"create-event-definition-from-value",title:"Create event definition",isEnabled:()=>!0,resetFocus:!1,component:Qg}],["create-extractor"]),visualizationTypes:pu,widgetCreators:[{title:"Message Count",func:vd,icon:()=>n.createElement(_.A,{name:"tag"})},{title:"Message Table",func:xl,icon:()=>n.createElement(_.A,{name:"list"})},{title:"Custom Aggregation",func:Xs,icon:()=>n.createElement(_.A,{name:"monitoring"})},{title:"Events Overview",func:eE,icon:()=>n.createElement(_.A,{name:"report",type:"regular"})}],creators:[{type:"preset",title:"Message Count",func:Ml},{type:"preset",title:"Message Table",func:Kc},{type:"generic",title:"Aggregation",func:nr},{type:"events",title:"Events Overview",func:tE}],"views.completers":[new Yc,new Bd,new Fd],"views.hooks.loadingView":[Hd,Ii.A],"views.elements.header":[()=>n.createElement(nd.A,null,n.createElement(td,null)),gm],"views.export.formats":[{type:"csv",displayName:()=>"Comma-Separated Values (CSV)",mimeType:"text/csv",fileExtension:"csv"}],"views.components.widgets.messageTable.previewOptions":[{title:"Show message in new row",isChecked:i=>i.showMessageRow,isDisabled:()=>!1,onChange:(i,a)=>{const u=!i.showMessageRow,T=u?i.showSummary:!1,R=i.toBuilder().showMessageRow(u).showSummary(T).build();return a(R)},sort:1}],"views.components.widgets.events.filterComponents":af,"views.components.widgets.events.attributes":xE,"views.reducers":vu,"views.elements.validationErrorExplanation":[LE]};var Xm=e("D4SbLiE/"),cf=e.n(Xm),Yl=e("QdZ7Yq43"),uf=e("BqxuktKK"),Jm=e("v4GbOr/o");const Zm=cf()({displayName:"ThreatIntelPluginConfig",propTypes:{config:l().object,updateConfig:l().func.isRequired,sendTelemetry:l().func.isRequired},getDefaultProps(){return{config:{tor_enabled:!1,spamhaus_enabled:!1,abusech_ransom_enabled:!1}}},getInitialState(){const{config:i}=this.props;return{config:Yl.A.clone(i),threatintelConfigModal:!1}},UNSAFE_componentWillReceiveProps(i){this.setState({config:Yl.A.clone(i.config)})},_updateConfigField(i,a){const{config:u}=this.state,T=Yl.A.clone(u);T[i]=a,this.setState({config:T})},_onCheckboxClick(i,a){return()=>{this._updateConfigField(i,this[a].getChecked())}},_onSelect(i){return a=>{this._updateConfigField(i,a)}},_onUpdate(i){return a=>{this._updateConfigField(i,a.target.value)}},_openModal(){this.setState({threatintelConfigModal:!0})},_closeModal(){this.setState({threatintelConfigModal:!1})},_resetConfig(){this.setState(this.getInitialState())},_saveConfig(){const{updateConfig:i,sendTelemetry:a}=this.props;a(Jm.g.CONFIGURATIONS.THREATINTEL_CONFIGURATION_UPDATED,{app_pathname:"configurations",app_section:"threat-intel"}),i(this.state.config).then(()=>{this._closeModal()})},render(){return n.createElement("div",null,n.createElement("h3",null,"Threat Intelligence Lookup Configuration"),n.createElement("p",null,"Configuration for threat intelligence lookup plugin."),n.createElement("dl",{className:"deflist"},n.createElement("dt",null,"Tor exit nodes:"),n.createElement("dd",null,this.state.config.tor_enabled===!0?"Enabled":"Disabled"),n.createElement("dt",null,"Spamhaus:"),n.createElement("dd",null,this.state.config.spamhaus_enabled===!0?"Enabled":"Disabled")),n.createElement(be.Wj,{permissions:"clusterconfigentry:edit"},n.createElement(Y.Button,{bsStyle:"info",bsSize:"xs",onClick:this._openModal},"Edit configuration")),n.createElement(Y.BootstrapModalForm,{show:this.state.threatintelConfigModal,title:"Update Threat Intelligence plugin Configuration",onSubmitForm:this._saveConfig,onCancel:this._resetConfig,submitButtonText:"Update configuration"},n.createElement("fieldset",null,n.createElement(Y.Input,{type:"checkbox",id:"tor-checkbox",ref:i=>{this.torEnabled=i},label:"Allow Tor exit node lookups?",help:"Enable to include Tor exit node lookup in global pipeline function, disabling also stops refreshing the data.",name:"tor_enabled",checked:this.state.config.tor_enabled,onChange:this._onCheckboxClick("tor_enabled","torEnabled")}),n.createElement(Y.Input,{type:"checkbox",id:"spamhaus-checkbox",ref:i=>{this.spamhausEnabled=i},label:"Allow Spamhaus DROP/EDROP lookups?",help:"Enable to include Spamhaus lookup in global pipeline function, disabling also stops refreshing the data.",name:"tor_enabled",checked:this.state.config.spamhaus_enabled,onChange:this._onCheckboxClick("spamhaus_enabled","spamhausEnabled")}))))}}),yv=(0,uf.A)(Zm),df=()=>n.createElement("div",null),qm=({handleFormEvent:i,validationState:a,validationMessage:u,config:T})=>n.createElement("fieldset",null);qm.propTypes={config:l().shape({}).isRequired,handleFormEvent:l().func.isRequired,validationMessage:l().func.isRequired,validationState:l().func.isRequired};const _v=qm,mf=()=>n.createElement("dl",null,n.createElement("i",null,"No configuration required.")),ep=()=>n.createElement("div",null),pf=()=>n.createElement("fieldset",null),Pv=()=>n.createElement("i",null,"No configuration necessary"),gf=()=>{const i={marginBottom:10};return n.createElement("div",null,n.createElement("p",{style:i},"The whois IP lookup data adapter can request network ownership information for an IP address."),n.createElement("h3",{style:i},"Configuration"),n.createElement("h5",{style:i},"Connect timeout"),n.createElement("p",{style:i},"The connection timeout for the socket to the whois server in milliseconds. If you set this to a high value, it can affect your processing performance."),n.createElement("h5",{style:i},"Read timeout"),n.createElement("p",{style:i},"The connection read timeout for the socket to the whois server in milliseconds. If you set this to a high value, it can affect your processing performance."))};var tp=Object.defineProperty,Ef=(i,a,u)=>a in i?tp(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,wu=(i,a,u)=>(Ef(i,typeof a!="symbol"?a+"":a,u),u);class ff extends n.Component{render(){const{config:a}=this.props;return n.createElement("fieldset",null,n.createElement(Y.Input,{type:"number",id:"connect_timeout",name:"connect_timeout",label:"Connect timeout",required:!0,onChange:this.props.handleFormEvent,help:this.props.validationMessage("connect_timeout","WHOIS connection timeout in milliseconds."),bsStyle:this.props.validationState("connect_timeout"),value:a.connect_timeout,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),n.createElement(Y.Input,{type:"number",id:"read_timeout",name:"read_timeout",label:"Read timeout",required:!0,onChange:this.props.handleFormEvent,help:this.props.validationMessage("read_timeout","WHOIS connection read timeout in milliseconds."),bsStyle:this.props.validationState("read_timeout"),value:a.read_timeout,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}))}}wu(ff,"propTypes",{config:l().shape({connect_timeout:l().number.isRequired,read_timeout:l().number.isRequired}).isRequired,handleFormEvent:l().func.isRequired,validationMessage:l().func.isRequired,validationState:l().func.isRequired});const hf=ff,np=({dataAdapter:i})=>{const{config:a}=i;return n.createElement("dl",null,n.createElement("dt",null,"Connect timeout"),n.createElement("dd",null,a.connect_timeout," ms"),n.createElement("dt",null,"Read timeout"),n.createElement("dd",null,a.read_timeout," ms"))};np.propTypes={dataAdapter:l().shape({config:l().shape({connect_timeout:l().number.isRequired,read_timeout:l().number.isRequired})}).isRequired};const Ov=np,vf=()=>n.createElement("div",null,n.createElement(Y.Alert,{style:{marginBottom:10},bsStyle:"warning",title:"Deprecation Warning"},n.createElement("p",null,"The abuse.ch Ransomware Tracker was shut down on 2019-12-08. This Data Adapter should not be used.")));var yf=Object.defineProperty,Af=(i,a,u)=>a in i?yf(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,Wu=(i,a,u)=>(Af(i,typeof a!="symbol"?a+"":a,u),u);class op extends n.Component{constructor(){super(...arguments),Wu(this,"_update",(a,u,T,R)=>{const B=Yl.A.clone(this.props.config);B[R]=T?a:0,B[`${R}_unit`]=u,this.props.updateConfig(B)}),Wu(this,"updateRefreshInterval",(a,u,T)=>{this._update(a,u,T,"refresh_interval")}),Wu(this,"_onBlocklistTypeSelect",a=>{const u=Yl.A.clone(this.props.config);u.blocklist_type=a,this.props.updateConfig(u)})}render(){const{config:a}=this.props,u=[{label:"Domain blocklist",value:"DOMAINS"},{label:"URL blocklist",value:"URLS"},{label:"IP blocklist",value:"IPS"}];return n.createElement("fieldset",null,n.createElement(Y.Input,{label:"Blocklist type",id:"blocklist-type-selector",required:!0,autoFocus:!0,help:"Select the type of the abuse.ch ransomware blocklist",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},n.createElement(be.l6,{placeholder:"Select the type of blocklist",clearable:!1,options:u,matchProp:"label",onChange:this._onBlocklistTypeSelect,value:a.blocklist_type})),n.createElement(be.gM,{label:"Refresh blocklist",help:"If enabled, the abuse.ch ransomware blocklist is refreshed when it changed.",update:this.updateRefreshInterval,value:a.refresh_interval,unit:a.refresh_interval_unit||"MINUTES",defaultEnabled:a.refresh_interval>0,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}))}}Wu(op,"propTypes",{config:l().object.isRequired,updateConfig:l().func.isRequired,handleFormEvent:l().func.isRequired,validationState:l().func.isRequired,validationMessage:l().func.isRequired});const _f=op;var sp=Object.defineProperty,Cf=(i,a,u)=>a in i?sp(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,v=(i,a,u)=>(Cf(i,typeof a!="symbol"?a+"":a,u),u);class b extends n.Component{render(){const{config:a}=this.props.dataAdapter,u={DOMAINS:"Domain blocklist",URLS:"URL blocklist",IPS:"IP blocklist"};return n.createElement("div",null,n.createElement("dl",null,n.createElement("dt",null,"Blocklist type"),n.createElement("dd",null,u[a.blocklist_type]),n.createElement("dt",null,"Update interval"),n.createElement("dd",null,n.createElement(be.f6,{value:a.refresh_interval,unit:a.refresh_interval_unit}))),n.createElement(Y.Alert,{style:{marginBottom:10},bsStyle:"warning",title:"Deprecation Warning"},n.createElement("p",null,"The abuse.ch Ransomware Tracker was shut down on 2019-12-08. This Data Adapter should not be used.")))}}v(b,"propTypes",{dataAdapter:l().object.isRequired});const D=b;class L extends n.Component{render(){const a={marginBottom:10};return n.createElement("div",null,n.createElement("p",{style:a},"The AlienVault OTX data adapter uses the ",n.createElement(be.Gr,{href:"https://otx.alienvault.com/api"},"OTX API")," to lookup indicators for the given key."),n.createElement("h3",{style:a},"Configuration"),n.createElement("h5",{style:a},"Indicator"),n.createElement("p",{style:a},"The OTX API offers several different indicators of compromise (IOCs). You have to select which indicator should be used for this data adapter."),n.createElement("p",{style:a},"The ",n.createElement("code",null,"IP Auto-Detect")," indicator is not an official one. We added that to make it possible to auto-detect the IP address type to allow using the same data adapter for IP v4 and v6 addresses."),n.createElement("h5",{style:a},"OTX API Key"),n.createElement("p",{style:a},"The OTX API key is used to authenticate API requests. Requests also work if you don't enter an API key, but you will most probably get a smaller request limit. ",n.createElement("strong",null,"If you use this data adapter for production traffic, please register for an OTX account and get an API key.")),n.createElement("h5",{style:a},"OTX API URL"),n.createElement("p",{style:a},"HTTP URL of the OTX API server. The default setting of ",n.createElement("code",null,"https://otx.alienvault.com")," should not be changed except if you want to run some tests with a custom server."),n.createElement("h5",{style:a},"HTTP User-Agent"),n.createElement("p",{style:a},"This will set the ",n.createElement("code",null,"User-Agent")," HTTP header for OTX API requests. You can modify this to include your contact details so the OTX API operators can contact you if there are problems with your API requests."),n.createElement("h5",{style:a},"HTTP Connection Timeout"),n.createElement("p",{style:a},"The HTTP connection timeout in milliseconds for the OTX API request. If you set this to a high value and the OTX API connection is slow, processing performance can be affected."),n.createElement("h5",{style:a},"HTTP Write Timeout"),n.createElement("p",{style:a},"The HTTP write timeout in milliseconds for the OTX API request. If you set this to a high value and the OTX API connection is slow, processing performance can be affected."),n.createElement("h5",{style:a},"HTTP Read Timeout"),n.createElement("p",{style:a},"The HTTP read timeout in milliseconds for the OTX API request. If you set this to a high value and the OTX API connection is slow, processing performance can be affected."))}}const N=L;var w=e("nHcjWeCO"),H=e.n(w),Z=Object.defineProperty,ee=(i,a,u)=>a in i?Z(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,Ce=(i,a,u)=>(ee(i,typeof a!="symbol"?a+"":a,u),u);const Me=[{label:"IP Auto-Detect",value:"IPAutoDetect"},{label:"IP v4",value:"IPv4"},{label:"IP v6",value:"IPv6"},{label:"Domain",value:"domain"},{label:"Hostname",value:"hostname"},{label:"File",value:"file"},{label:"URL",value:"url"},{label:"CVE",value:"cve"},{label:"NIDS",value:"nids"},{label:"Correlation-Rule",value:"correlation-rule"}];class Ne extends n.Component{constructor(){super(...arguments),Ce(this,"handleSelect",a=>u=>{const T=H().cloneDeep(this.props.config);T[a]=u,this.props.updateConfig(T)})}render(){const{config:a}=this.props;return n.createElement("fieldset",null,n.createElement(Y.Input,{id:"indicator",label:"Indicator",required:!0,onChange:this.props.handleFormEvent,help:this.props.validationMessage("indicator","The OTX indicator type that should be used for lookups."),bsStyle:this.props.validationState("indicator"),labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},n.createElement(be.l6,{placeholder:"Select indicator",clearable:!1,options:Me,matchProp:"label",onChange:this.handleSelect("indicator"),value:a.indicator})),n.createElement(Y.Input,{type:"text",id:"api_key",name:"api_key",label:"OTX API Key",onChange:this.props.handleFormEvent,help:this.props.validationMessage("api_key","Your OTX API key."),bsStyle:this.props.validationState("api_key"),value:a.api_key,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),n.createElement(Y.Input,{type:"text",id:"api_url",name:"api_url",label:"OTX API URL",onChange:this.props.handleFormEvent,help:this.props.validationMessage("api_url","URL of the OTX API server."),bsStyle:this.props.validationState("api_url"),value:a.api_url,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),n.createElement(Y.Input,{type:"text",id:"http_user_agent",name:"http_user_agent",label:"HTTP User-Agent",required:!0,onChange:this.props.handleFormEvent,help:this.props.validationMessage("http_user_agent","The User-Agent header that should be used for the HTTP request."),bsStyle:this.props.validationState("http_user_agent"),value:a.http_user_agent,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),n.createElement(Y.Input,{type:"number",id:"http_connect_timeout",name:"http_connect_timeout",label:"HTTP Connect Timeout",required:!0,onChange:this.props.handleFormEvent,help:this.props.validationMessage("http_connect_timeout","HTTP connection timeout in milliseconds."),bsStyle:this.props.validationState("http_connect_timeout"),value:a.http_connect_timeout,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),n.createElement(Y.Input,{type:"number",id:"http_write_timeout",name:"http_write_timeout",label:"HTTP Write Timeout",required:!0,onChange:this.props.handleFormEvent,help:this.props.validationMessage("http_write_timeout","HTTP write timeout in milliseconds."),bsStyle:this.props.validationState("http_write_timeout"),value:a.http_write_timeout,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),n.createElement(Y.Input,{type:"number",id:"http_read_timeout",name:"http_read_timeout",label:"HTTP Read Timeout",required:!0,onChange:this.props.handleFormEvent,help:this.props.validationMessage("http_read_timeout","HTTP read timeout in milliseconds."),bsStyle:this.props.validationState("http_read_timeout"),value:a.http_read_timeout,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}))}}Ce(Ne,"propTypes",{config:l().shape({indicator:l().string.isRequired,api_key:l().string,api_url:l().string.isRequired,http_user_agent:l().string.isRequired,http_connect_timeout:l().number.isRequired,http_write_timeout:l().number.isRequired,http_read_timeout:l().number.isRequired}).isRequired,updateConfig:l().func.isRequired,handleFormEvent:l().func.isRequired,validationState:l().func.isRequired,validationMessage:l().func.isRequired});const ot=Ne;var st=Object.defineProperty,pt=(i,a,u)=>a in i?st(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,Vt=(i,a,u)=>(pt(i,typeof a!="symbol"?a+"":a,u),u);class kt extends n.Component{render(){const{config:a}=this.props.dataAdapter;return n.createElement("dl",null,n.createElement("dt",null,"Indicator"),n.createElement("dd",null,a.indicator),n.createElement("dt",null,"OTX API Key"),n.createElement("dd",null,a.api_key||"n/a"),n.createElement("dt",null,"OTX API URL"),n.createElement("dd",null,a.api_url),n.createElement("dt",null,"HTTP User-Agent"),n.createElement("dd",null,a.http_user_agent),n.createElement("dt",null,"HTTP Connect Timeout"),n.createElement("dd",null,a.http_connect_timeout," ms"),n.createElement("dt",null,"HTTP Write Timeout"),n.createElement("dd",null,a.http_write_timeout," ms"),n.createElement("dt",null,"HTTP Read Timeout"),n.createElement("dd",null,a.http_read_timeout," ms"))}}Vt(kt,"propTypes",{dataAdapter:l().shape({config:l().shape({indicator:l().string.isRequired,api_key:l().string,api_url:l().string.isRequired,http_user_agent:l().string.isRequired,http_connect_timeout:l().number.isRequired,http_write_timeout:l().number.isRequired,http_read_timeout:l().number.isRequired})})});const Sn={systemConfigurations:[{component:yv,displayName:"Threat Intelligence Lookup",configType:"org.graylog.plugins.threatintel.ThreatIntelPluginConfiguration"}],lookupTableAdapters:[{type:"spamhaus-edrop",displayName:"Spamhaus (E)DROP",formComponent:_v,summaryComponent:mf,documentationComponent:df},{type:"torexitnode",displayName:"Tor Exit Node",formComponent:pf,summaryComponent:Pv,documentationComponent:ep},{type:"whois",displayName:"Whois for IPs",formComponent:hf,summaryComponent:Ov,documentationComponent:gf},{type:"abuse-ch-ransom",displayName:"[Deprecated] Ransomware blocklists from abuse.ch",formComponent:_f,summaryComponent:D,documentationComponent:vf},{type:"otx-api",displayName:"Alienvault OTX API",formComponent:ot,summaryComponent:kt,documentationComponent:N}]};var Nn=e("ibdPvtmL"),sn=e("S6FuRS7B");const ho="org.graylog.aws",so=`${ho}.config.AWSPluginConfiguration`,uo=`/plugins/${ho}/config`,mo=i=>Au()(i,["secret_key","secret_key_salt"]),Go=i=>{const a=I.Ay.qualifyUrl(uo);return(0,ce.Ay)("PUT",a,i)},Bo=({config:i})=>{const[a,u]=(0,n.useState)(mo(i)),[T,R]=(0,n.useState)(!1),B=(fe,We)=>{u({...a,[fe]:We})},F=()=>{u({...a,secret_key:""})},$=fe=>We=>{typeof We=="object"?B(fe,(0,sn.yG)(We.target)):B(fe,We)},X=()=>{R(!0)},se=()=>{R(!1)},de=()=>{u(mo(i)),se()},ge=()=>{Go(a).then(()=>{Nn.t.list(so),se()},fe=>{Re.A.error(`AWS plugin configuration failed with status: ${fe}`,"Could not save AWS plugin configuration.")})};return n.createElement("div",null,n.createElement("h3",null,"AWS Plugin Configuration"),n.createElement("p",null,"Base configuration for all plugins the AWS module is providing. Note that some parameters will be stored in MongoDB without encryption. Graylog users with required permissions will be able to read them in the configuration dialog on this page."),n.createElement("dl",{className:"deflist"},n.createElement("dt",null,"Instance detail lookups:"),n.createElement("dd",null,i.lookups_enabled===!0?"Enabled":"Disabled"),n.createElement("dt",null,"Connect through proxy:"),n.createElement("dd",null,i.proxy_enabled===!0?"Enabled":"Disabled"),n.createElement("dt",null,"Lookup regions:"),n.createElement("dd",null,i.lookup_regions?i.lookup_regions:"[not set]"),n.createElement("dt",null,"Access Key:"),n.createElement("dd",null,i.access_key?i.access_key:"[not set]"),n.createElement("dt",null,"Secret Key:"),n.createElement("dd",null,i.secret_key?"***********":"[not set]")),n.createElement(be.Wj,{permissions:"clusterconfigentry:edit"},n.createElement(Y.Button,{bsStyle:"info",bsSize:"xs",onClick:X},"Edit configuration")),n.createElement(Y.BootstrapModalForm,{show:T,title:"Update AWS Plugin Configuration",onSubmitForm:ge,onCancel:de,submitButtonText:"Update configuration"},n.createElement("fieldset",null,n.createElement(Y.Input,{id:"aws-lookups-enabled",type:"checkbox",label:"Run AWS instance detail lookups for IP addresses?",help:n.createElement("span",null,"When enabled, a message processor will try to identify IP addresses of your AWS entities (like EC2, ELB, RDS, ...) and add additional information abut the service or instance behind it. It can take up to a minute for a change of this to take effect."),name:"lookups_enabled",checked:a.lookups_enabled,onChange:$("lookups_enabled")}),n.createElement(Y.Input,{id:"aws-access-key",type:"text",label:"AWS Access Key",help:n.createElement("span",null,"Note that this will only be used in encrypted connections but stored in plaintext. Please consult the documentation for suggested rights to assign to the underlying IAM user."),name:"access_key",value:a.access_key,onChange:$("access_key")}),n.createElement(Y.Input,{id:"aws-secret-key",type:"password",label:"AWS Secret Key",help:n.createElement("span",null,"Note that this will only be used in encrypted connections and will be stored encrypted (using the system secret). Please consult the documentation for suggested rights to assign to the underlying IAM user."),name:"secret_key",value:a.secret_key!==void 0?a.secret_key:i.secret_key,onFocus:F,onChange:$("secret_key")}),n.createElement(Y.Input,{id:"aws-lookup-regions",type:"text",label:"Lookup regions",help:n.createElement("span",null,"The AWS instance lookup message processor keeps a table of instances for fast address translation. Define the AWS regions you want to include in the tables. This should be all regions you run AWS services in. Remember that your IAM user needs permission for these regions or you will see warnings in your graylog-server log files."),name:"lookup_regions",value:a.lookup_regions,onChange:$("lookup_regions")}),n.createElement(Y.Input,{id:"aws-proxy-enabled",type:"checkbox",label:"Use HTTP proxy?",help:n.createElement("span",null,"When enabled, we'll access the AWS APIs through the HTTP proxy configured (",n.createElement("code",null,"http_proxy_uri"),") in your Graylog configuration file.",n.createElement("br",null),n.createElement("em",null,"Important:")," You have to restart all AWS inputs for this configuration to take effect."),name:"proxy_enabled",checked:a.proxy_enabled,onChange:$("proxy_enabled")}))))};Bo.propTypes={config:l().shape({lookups_enabled:l().bool,lookup_regions:l().string,access_key:l().string,secret_key:l().string,proxy_enabled:l().bool})},Bo.defaultProps={config:{lookups_enabled:!1,lookup_regions:"us-east-1,us-west-1,us-west-2,eu-west-1,eu-central-1",access_key:"",secret_key:"",proxy_enabled:!1}};const qo=Bo,Xo=s.A.isCloud()?{}:{systemConfigurations:[{component:qo,displayName:"Aws",configType:so}]},os={INTEGRATIONS:{AWS:{CLOUDWATCH:{index:"/integrations/aws/cloudwatch"}}}},Uo={INTEGRATIONS:{AWS:{PERMISSIONS:"/plugins/org.graylog.integrations/aws/permissions",REGIONS:"/plugins/org.graylog.integrations/aws/regions",CLOUDWATCH:{GROUPS:"/plugins/org.graylog.integrations/aws/cloudwatch/log_groups"},KINESIS:{HEALTH_CHECK:"/plugins/org.graylog.integrations/aws/kinesis/health_check",STREAMS:"/plugins/org.graylog.integrations/aws/kinesis/streams",SAVE:"/plugins/org.graylog.integrations/aws/inputs"},KINESIS_AUTO_SETUP:{CREATE_STREAM:"/plugins/org.graylog.integrations/aws/kinesis/auto_setup/create_stream",CREATE_SUBSCRIPTION_POLICY:"/plugins/org.graylog.integrations/aws/kinesis/auto_setup/create_subscription_policy",CREATE_SUBSCRIPTION:"/plugins/org.graylog.integrations/aws/kinesis/auto_setup/create_subscription"}}}},cr={INTEGRATIONS:{AWS:{AWS_KINESIS_CLOUDWATCH_INPUTS:"aws-kinesiscloudwatch-input"}}},Ka=os,ur=({url:i})=>{const a=(0,Nu.useNavigate)();return(0,n.useEffect)(()=>{a(i)},[i,a]),null};ur.propTypes={url:l().string},ur.defaultProps={url:Ka.INTEGRATIONS.AWS.CLOUDWATCH.index};const Fu=ur;var Xl=e("/W/x1zfW");const Ji=(0,n.createContext)(),ap=({children:i})=>{const[a,u]=(0,n.useState)(n.createElement(n.Fragment,null)),T=()=>{u(n.createElement(n.Fragment,null))};return n.createElement(Ji.Provider,{value:{sidebar:a,clearSidebar:T,setSidebar:u}},i)};ap.propTypes={children:l().any.isRequired};const Zs=(0,n.createContext)(),ls=({initialFormData:i,children:a})=>{const[u,T]=(0,n.useState)(i),R=(F,$)=>{T({...u,[F]:{...u[F],...$,dirty:!0}})},B=F=>{Object.keys(u).find($=>$===F)&&(delete u[F],T(u))};return n.createElement(Zs.Provider,{value:{formData:u,setFormData:R,clearField:B}},a)};ls.propTypes={children:l().any.isRequired,initialFormData:l().object},ls.defaultProps={initialFormData:{}};const Zi=null,Ku=(0,n.createContext)(),ll=({children:i})=>{const[a,u]=(0,n.useState)("authorize"),[T,R]=(0,n.useState)(["authorize"]),[B,F]=(0,n.useState)([]),$=se=>!T||T.length===0?!0:!T.includes(se),X=se=>{R([...T,se])};return n.createElement(Ku.Provider,{value:{availableSteps:B,currentStep:a,enabledSteps:T,isDisabledStep:$,setAvailableStep:F,setCurrentStep:u,setEnabledStep:X}},i)};ll.propTypes={children:l().any.isRequired};const Jl=(0,n.createContext)(),Iv=({children:i})=>{const[a,u]=(0,n.useState)([]),[T,R]=(0,n.useState)([]),[B,F]=(0,n.useState)([]),[$,X]=(0,n.useState)(null),se=lt=>u(lt.regions),de=lt=>{const it=lt.log_groups.map(yt=>({value:yt,label:yt}));F(it)},ge=lt=>{const it=lt.streams.map(yt=>({value:yt,label:yt}));R(it)},fe=lt=>{X({message:JSON.stringify(lt.message_fields,null,2),type:lt.input_type,additional:lt.explanation})},We=()=>{X(null)};return n.createElement(Jl.Provider,{value:{availableStreams:T,setStreams:ge,availableRegions:a,setRegions:se,logData:$,setLogData:fe,clearLogData:We,availableGroups:B,setGroups:de}},i)};Iv.propTypes={children:l().any.isRequired};const Tf=(0,n.createContext)(),Mv=({children:i})=>{const[a,u]=(0,n.useState)(!1),[T,R]=(0,n.useState)(!1);return n.createElement(Tf.Provider,{value:{isAdvancedOptionsVisible:a,isAWSCustomEndpointsVisible:T,setAdvancedOptionsVisibility:u,setAWSCustomEndpointsVisibility:R}},i)};Mv.propTypes={children:l().any.isRequired};const bf=[{value:"KINESIS_CLOUDWATCH_FLOW_LOGS",label:"Kinesis CloudWatch Flow Logs"},{value:"KINESIS_CLOUDWATCH_RAW",label:"Kinesis CloudWatch Raw"},{value:"KINESIS_RAW",label:"Kinesis Raw"}],Sf="KINESIS_CLOUDWATCH_FLOW_LOGS",$a={automatic:"Automatic",keysecret:"Key & Secret"},pA=(i,a)=>{const{awsAuthenticationType:u,awsCloudWatchAssumeARN:T,awsCloudWatchAwsKey:R,awsCloudWatchAwsSecret:B,awsEndpointCloudWatch:F,awsEndpointIAM:$,awsEndpointDynamoDB:X,awsEndpointKinesis:se,key:de,secret:ge}=i;return{...(u==null?void 0:u.value)===$a.keysecret?{aws_access_key_id:R==null?void 0:R.value,aws_secret_access_key:B==null?void 0:B.value}:{aws_access_key_id:de,aws_secret_access_key:ge},assume_role_arn:T==null?void 0:T.value,cloudwatch_endpoint:F==null?void 0:F.value,dynamodb_endpoint:X==null?void 0:X.value,iam_endpoint:$==null?void 0:$.value,kinesis_endpoint:se==null?void 0:se.value,...a}},gA=({awsAuthenticationType:i,awsCloudWatchAddFlowLogPrefix:a={value:void 0},awsCloudWatchAssumeARN:u={value:void 0},awsCloudWatchAwsKey:T={value:void 0},awsCloudWatchAwsRegion:R,awsCloudWatchBatchSize:B,awsEndpointCloudWatch:F={value:void 0},awsCloudWatchKinesisInputType:$={value:Sf},awsCloudWatchKinesisStream:X,awsCloudWatchName:se,awsCloudWatchThrottleEnabled:de={value:void 0},awsEndpointDynamoDB:ge={value:void 0},awsEndpointIAM:fe={value:void 0},awsEndpointKinesis:We={value:void 0},awsCloudWatchAwsSecret:lt,key:it,secret:yt})=>({type:"org.graylog.integrations.aws.inputs.AWSInput",title:se.value,configuration:{...(i==null?void 0:i.value)===$a.keysecret?{aws_access_key:T==null?void 0:T.value,aws_secret_key:lt==null?void 0:lt.value}:{aws_access_key:it,aws_secret_key:yt},aws_message_type:$.value,throttling_allowed:!!de.value,aws_flow_log_prefix:!!a.value,aws_region:R.value,aws_assume_role_arn:u==null?void 0:u.value,cloudwatch_endpoint:F==null?void 0:F.value,dynamodb_endpoint:ge==null?void 0:ge.value,iam_endpoint:fe==null?void 0:fe.value,kinesis_endpoint:We==null?void 0:We.value,kinesis_stream_name:X.value,kinesis_record_batch_size:Number(B.value||B.defaultValue)}});var EA=e("t7jeigEY"),fA=e("1e+nFvZs");const rp={checkInputValidity:(i,a)=>{const{validity:u}=i,T=u.valid,R=i.getAttribute("title");if(T)return;const B=u.valueMissing,F=u.typeMismatch,$=u.patternMismatch,X=u.tooLong||u.rangeOverflow,se=u.rangeUnderflow,de=u.stepMismatch,fe=[{invalid:B,message:R||"A value is required."},{invalid:F,message:R||"Please verify that your input is the expected type (ie: email address)."},{invalid:$,message:R||"This input does not match the expected value."},{invalid:X,message:R||"Your input is too long."},{invalid:se,message:R||"Your input is too short."},{invalid:de,message:R||"Unexpected value."}].find(We=>We.invalid);return a||fe.message},isFormValid:(i,a)=>!!i.find(u=>!a[u]||!a[u].value||a[u].error)},hA=({label:i,error:a})=>a?n.createElement(yA,null,i,n.createElement(vA,null,n.createElement(_.A,{name:"warning"})," ",a)):i,Pf=({className:i,help:a,onChange:u,id:T,label:R,fieldData:B,type:F,...$})=>{const{dirty:X,error:se,value:de}=B,ge=fe=>{if(X){const We=rp.checkInputValidity(fe.target);u(fe,{error:We})}};return n.createElement(Y.Input,{...$,id:T,type:F,onChange:u,onBlur:ge,className:i,bsStyle:se&&X&&"error"||void 0,defaultValue:F!=="select"&&de||void 0,value:F==="select"&&de||void 0,label:n.createElement(hA,{label:R,error:se}),help:a})};Pf.propTypes={className:l().string,fieldData:l().shape({error:l().string,dirty:l().bool,value:l().string}),help:l().string,label:l().oneOfType([l().string,l().node]).isRequired,id:l().string.isRequired,onChange:l().func,required:l().bool,type:l().string.isRequired},Pf.defaultProps={className:void 0,onChange:()=>{},required:!1,help:"",fieldData:{dirty:!1,error:void 0,value:void 0}};const vA=m.default.span` display: block; font-weight: normal; padding-left: 15px; font-size: 0.85em; `,yA=m.default.span` display: flex; align-items: center; `,Oa=Pf,Df=({fullMessage:i,niceMessage:a})=>{const[u,T]=(0,n.useState)(!1),R=n.createElement(n.Fragment,null,n.createElement(AA,null),n.createElement(_A,null,a||i),a&&n.createElement(CA,{onClick:()=>T(!u),expanded:u},"More Info ",n.createElement(TA,{name:"chevron_right"})));return a?n.createElement(Y.Panel,{header:R,bsStyle:"danger",collapsible:!0,expanded:u},n.createElement("strong",null,"Additional Information: "),i):n.createElement(Y.Panel,{header:R,bsStyle:"danger"})};Df.propTypes={fullMessage:l().string.isRequired,niceMessage:l().oneOfType([l().string,l().node])},Df.defaultProps={niceMessage:null};const Of=({buttonContent:i,children:a,className:u,disabled:T,description:R,error:B,loading:F,onSubmit:$,title:X})=>{const se=(0,n.useRef)(),[de,ge]=(0,n.useState)(T),fe=We=>(We.preventDefault(),!1);return(0,n.useEffect)(()=>{ge(F||T)},[F,T]),n.createElement("form",{onSubmit:fe,autoComplete:"off",noValidate:!0,className:u,ref:se},X&&(typeof X=="string"?n.createElement("h2",null,X):X),R&&(typeof R=="string"?n.createElement("p",null,R):R),B&&B.full_message&&n.createElement(Df,{fullMessage:B.full_message,niceMessage:B.nice_message}),a,n.createElement(Y.Button,{type:"button",onClick:de?null:$,bsStyle:"primary",disabled:de},F?"Loading...":i))};Of.propTypes={buttonContent:l().oneOfType([l().string,l().node]),children:l().any.isRequired,disabled:l().bool,error:l().shape({full_message:l().string.isRequired,nice_message:l().oneOfType([l().string,l().node])}),description:l().oneOfType([l().string,l().node]),loading:l().bool,onSubmit:l().func,title:l().oneOfType([l().string,l().node]),className:l().string},Of.defaultProps={buttonContent:"Submit",disabled:!1,error:null,description:null,loading:!1,onSubmit:()=>{},title:null,className:void 0};const AA=(0,m.createGlobalStyle)` /* NOTE: This is to remove Bootstrap styles from the anchor element I can't override in Panel.Header */ form { .panel.panel-danger { .panel-heading > a { font-size: 14px; text-decoration: none; color: #ad0707; &:hover { text-decoration: none; } } } } `,_A=m.default.span` display: block; `,CA=m.default.button` border: 0; background: none; color: #1f1f1f; font-size: 11px; text-transform: uppercase; margin: 12px 0 0; padding: 0; `,TA=(0,m.default)(_.A)` transform: rotate(${i=>i.expanded?"90deg":"0deg"}); transition: 150ms transform ease-in-out; `,qi=Of;function Rf({value:i,label:a}){return n.createElement("option",{value:i,key:i},a)}const lp=(i=[],a="Choose One",u=!1)=>u?Rf({value:"",label:"Loading..."}):n.createElement(n.Fragment,null,n.createElement("option",{value:""},a),i.map(T=>Rf({value:T.value,label:T.label})));Rf.propTypes={value:l().string.isRequired,label:l().string.isRequired};const CT=null,bA=i=>i.additional&&i.additional.body&&i.additional.body.message||i.message,dr=(i,a=()=>{},u="GET",T={})=>{const{formData:R}=(0,n.useContext)(Zs),[B,F]=(0,n.useState)(i),[$,X]=(0,n.useState)(!1),[se,de]=(0,n.useState)(null),[ge,fe]=(0,n.useState)(null),We=B?(0,I.H3)(B):null;return(0,n.useEffect)(()=>{let lt=!!We;return(async()=>{let yt=Promise.resolve();return lt&&!ge&&(X(!0),u==="GET"?yt=(0,ce.Ay)(u,We):yt=(0,ce.Ay)(u,We,pA(R,T)),yt.then(Tt=>{de(null),fe(Tt),a(Tt)}).catch(Tt=>{fe(null),de(bA(Tt))}).finally(()=>{X(!1)})),yt})(),()=>{lt=!1}},[We]),[{loading:$,error:se,data:ge},F]},If=({className:i,label:a,...u})=>{const[T,R]=(0,n.useState)(!0),B=n.createElement(SA,null,a,n.createElement(PA,{onClick:()=>R(!T),ariaDescription:`Toggle ${a} field input`},n.createElement(be.In,{name:T?"visibility_off":"visibility"})));return n.createElement(Oa,{...u,type:T?"password":"text",label:B,formGroupClassName:i})};If.propTypes={label:l().oneOfType([l().string,l().node]).isRequired,className:l().string},If.defaultProps={className:void 0};const SA=m.default.span` display: flex; align-items: center; `,PA=m.default.button` border: 0; background: none; padding: 0; margin: 0 0 0 12px; `,DA=If,Mf=({onChange:i,awsKey:a,awsSecret:u})=>n.createElement(n.Fragment,null,n.createElement(Oa,{id:"awsCloudWatchAwsKey",type:"text",label:"AWS Access Key",placeholder:"AK****************",onChange:i,fieldData:a,autoComplete:"off",maxLength:"512",help:'Your AWS Key should be a 20-character long, alphanumeric string that starts with the letters "AK".',required:!0}),n.createElement(OA,{id:"awsCloudWatchAwsSecret",label:"AWS Secret Key",placeholder:"***********",onChange:i,fieldData:u,autoComplete:"off",maxLength:"512",help:"Your AWS Secret is usually a 40-character long, base-64 encoded string.",required:!0})),OA=(0,m.default)(DA)` margin-bottom: 0; `;Mf.propTypes={onChange:l().func.isRequired,awsKey:l().object,awsSecret:l().object},Mf.defaultProps={awsKey:void 0,awsSecret:void 0};const xv=Mf,Lv=m.default.p` font-weight: bold; font-size: 1.2em; margin: 0 0 12px; `,Bv=m.default.p` font-style: italic; margin: 3px 0 0; `,RA=(0,m.default)(Y.Table)` margin: 0; `,IA=()=>n.createElement(RA,{condensed:!0},n.createElement("thead",null,n.createElement("tr",null,n.createElement("td",{colSpan:"2"},n.createElement(Lv,null,"Automatic authentication will attempt each of the following in the listed order.")))),n.createElement("tbody",null,n.createElement("tr",null,n.createElement("th",null,"Environment variables"),n.createElement("td",null,n.createElement("code",null,"AWS_ACCESS_KEY_ID")," and ",n.createElement("code",null,"AWS_SECRET_ACCESS_KEY"))),n.createElement("tr",null,n.createElement("th",null,"Java system properties"),n.createElement("td",null,n.createElement("code",null,"aws.accessKeyId")," and ",n.createElement("code",null,"aws.secretKey"))),n.createElement("tr",null,n.createElement("th",null,"Default credential profiles file"),n.createElement("td",null,"Typically located at ",n.createElement("code",null,"~/.aws/credentials"))),n.createElement("tr",null,n.createElement("th",null,"Amazon ECS container credentials"),n.createElement("td",null,"Loaded from the Amazon ECS if the environment variable ",n.createElement("code",null,"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI")," is set")),n.createElement("tr",null,n.createElement("th",null,"Instance profile credentials"),n.createElement("td",null,"Used on EC2 instances, and delivered through the Amazon EC2 metadata service"))),n.createElement("tfoot",null,n.createElement("tr",null,n.createElement("td",{colSpan:"2"},n.createElement(Bv,null,"For more information, check out the ",n.createElement("a",{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html",target:"_blank",rel:"noopener noreferrer"},"AWS Credential Configuration Documentation ",n.createElement(be.In,{name:"open_in_new"}))))))),xf=({awsARN:i,onChange:a})=>n.createElement(Y.Input,{id:"awsCloudWatchAssumeARN",type:"text",value:i.value,onChange:a,label:"AWS Assume Role (ARN)",help:"Amazon Resource Name with required cross account permission",placeholder:"arn:aws:sts::123456789012:assumed-role/some-role",maxLength:"2048"});xf.propTypes={awsARN:l().shape({value:l().string}),onChange:l().func.isRequired},xf.defaultProps={awsARN:{value:""}};const MA=xf,xA=m.default.div(({theme:i})=>(0,m.css)` margin: 0 0 21px 9px; padding: 3px 0 3px 21px; border-left: 3px solid ${i.colors.gray[80]}; `),Uv=({onChange:i})=>{const{clearField:a,formData:u}=(0,n.useContext)(Zs),{awsAuthenticationType:T,awsCloudWatchAwsSecret:R,awsCloudWatchAwsKey:B,awsCloudWatchAssumeARN:F}=u;let $;s.A.isCloud()?$=$a.keysecret:$=T?T.value:$a.automatic;const[X,se]=(0,n.useState)($);(0,n.useEffect)(()=>{i({target:{name:"awsAuthenticationType",value:$}})},[]);const de=fe=>X===fe,ge=fe=>{se(fe.target.value),i({target:{name:"awsAuthenticationType",value:fe.target.value}}),de($a.automatic)&&(a("awsCloudWatchAwsKey"),a("awsCloudWatchAwsSecret"))};return n.createElement(n.Fragment,null,s.A.isCloud()?n.createElement(xv,{awsKey:B,awsSecret:R,onChange:i}):n.createElement(n.Fragment,null,n.createElement(Y.Input,{type:"select",name:"awsAuthType",id:"awsAuthType",onChange:ge,label:"AWS Authentication Type",defaultValue:X},Object.keys($a).map(fe=>n.createElement("option",{value:$a[fe],key:`option-${fe}`},$a[fe]))),n.createElement(xA,null,de($a.automatic)&&n.createElement(IA,null),de($a.keysecret)&&n.createElement(xv,{awsKey:B,awsSecret:R,onChange:i}))),n.createElement(MA,{awsARN:F,onChange:i}))};Uv.propTypes={onChange:l().func.isRequired};const LA=Uv,Lf=({children:i,className:a,onToggle:u,title:T,visible:R})=>{const[B,F]=(0,n.useState)(R),$=()=>{F(!B),u(!B)};return n.createElement("div",{className:a},n.createElement(UA,{bsStyle:"link",bsSize:"xsmall",onClick:$,type:"button"},T," ",n.createElement(be.In,{name:B?"expand_more":"chevron_right"})),n.createElement(BA,{visible:B},i))};Lf.propTypes={children:l().any.isRequired,title:l().string.isRequired,onToggle:l().func,visible:l().bool,className:l().string},Lf.defaultProps={onToggle:()=>{},visible:!1,className:void 0};const BA=m.default.div` display: ${i=>i.visible?"block":"none"}; padding: 0 100px 0 25px; `,UA=(0,m.default)(Y.Button)` border: 0; display: block; font-size: 14px; &:hover { text-decoration: underline; } `,Bf=Lf,ip="https://(.*)",cp="Domain should begin with 'https://'",up="https://vpce-1234.service.region.vpce.amazonaws.com",NA=(0,m.default)(Bf)` margin: 0 0 35px; `,wA=(0,m.default)(Lv)` margin: 12px 0 0; `,WA=(0,m.default)(Bv)` margin: 0 0 12px; `,Nv=({onChange:i})=>{const{formData:a}=(0,n.useContext)(Zs),{isAWSCustomEndpointsVisible:u,setAWSCustomEndpointsVisibility:T}=(0,n.useContext)(Tf),{awsEndpointCloudWatch:R,awsEndpointDynamoDB:B,awsEndpointIAM:F,awsEndpointKinesis:$}=a,X=se=>{T(se)};return n.createElement(NA,{title:"Optional AWS VPC Endpoints",visible:u,onToggle:X},n.createElement(wA,null,"Overrides the default AWS API endpoint URL that Graylog communicates with."),n.createElement(WA,null,"Only specify these if you are using ",n.createElement(be.Gr,{href:"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html"},"VPC Endpoints")," for AWS services."),n.createElement(Oa,{id:"awsEndpointCloudWatch",type:"text",fieldData:R,onChange:i,label:"CloudWatch API Endpoint Override",placeholder:up,pattern:ip,title:cp}),n.createElement(Oa,{id:"awsEndpointIAM",type:"text",fieldData:F,onChange:i,label:"IAM API Endpoint Override",placeholder:up,pattern:ip,title:cp}),n.createElement(Oa,{id:"awsEndpointDynamoDB",type:"text",fieldData:B,onChange:i,label:"DynamoDB API Endpoint Override",placeholder:up,pattern:ip,title:cp}),n.createElement(Oa,{id:"awsEndpointKinesis",type:"text",fieldData:$,onChange:i,label:"Kinesis API Endpoint Override",placeholder:up,pattern:ip,title:cp}))};Nv.propTypes={onChange:l().func.isRequired};const FA=Nv,Uf=({onChange:i,onSubmit:a,sidebarComponent:u})=>{const{formData:T}=(0,n.useContext)(Zs),{clearSidebar:R,setSidebar:B}=(0,n.useContext)(Ji),{availableRegions:F,setRegions:$,setStreams:X}=(0,n.useContext)(Jl),[se,de]=(0,n.useState)(null),[ge]=dr(Uo.INTEGRATIONS.AWS.REGIONS,$,"GET"),[fe,We]=dr(null,Tt=>{X(Tt),a()},"POST",{region:T.awsCloudWatchAwsRegion?T.awsCloudWatchAwsRegion.value:""});(0,n.useEffect)(()=>{if(We(null),ge.error)de({full_message:ge.error});else if(fe.error){const Tt=/security token/g,Yt=/signing method/g,hn=/No Kinesis streams/g;fe.error.match(Tt)?de({full_message:fe.error,nice_message:'Invalid AWS Key, check out your AWS account for the 20-character long, alphanumeric string that usually starts with the letters "AK"'}):fe.error.match(Yt)?de({full_message:fe.error,nice_message:"Invalid AWS Secret, it is usually a 40-character long, base-64 encoded string, but you only get to view it once when you create the Key"}):fe.error.match(hn)?(X({streams:[]}),a()):de({full_message:fe.error})}return()=>{de(null)}},[ge.error,fe.error]);const lt=()=>{We(Uo.INTEGRATIONS.AWS.KINESIS.STREAMS)};(0,n.useEffect)(()=>(u&&B(u),()=>{R()}),[]);const it=T.awsAuthenticationType&&T.awsAuthenticationType.value,yt=rp.isFormValid(["awsCloudWatchName","awsCloudWatchAwsRegion",...it!==$a.automatic?["awsCloudWatchAwsKey","awsCloudWatchAwsSecret"]:[]],T);return n.createElement(qi,{onSubmit:lt,buttonContent:"Authorize & Choose Stream",loading:ge.loading||fe.loading,disabled:yt,error:se,title:"Create Input & Authorize AWS",description:"This integration allows Graylog to read messages directly from a Kinesis stream. CloudWatch messages can optionally be forwarded to Kinesis via CloudWatch subscriptions and then read by Graylog."},n.createElement(wv,{id:"name",type:"text"}),n.createElement(wv,{id:"password",type:"password"}),n.createElement(Oa,{id:"awsCloudWatchName",type:"text",fieldData:T.awsCloudWatchName,onChange:i,placeholder:"Graylog Input Name",label:"Graylog Input Name",autoComplete:"off",required:!0}),n.createElement(LA,{onChange:i}),n.createElement(Oa,{id:"awsCloudWatchAwsRegion",type:"select",fieldData:T.awsCloudWatchAwsRegion,onChange:i,label:"AWS Region",help:"The AWS Region your service is running in.",disabled:ge.loading,required:!0},lp(F,"Choose AWS Region",ge.loading)),n.createElement(FA,{onChange:i}))};Uf.propTypes={onSubmit:l().func.isRequired,onChange:l().func.isRequired,sidebarComponent:l().node},Uf.defaultProps={sidebarComponent:null};const wv=m.default.input` position: fixed; top: -500vh; left: -500vw; `,KA=Uf;var Wv=e("7dh0vSOR");const Fv=({onChange:i})=>{const{formData:a}=(0,n.useContext)(Zs),{isAdvancedOptionsVisible:u,setAdvancedOptionsVisibility:T}=(0,n.useContext)(Tf),{awsCloudWatchBatchSize:R,awsCloudWatchThrottleEnabled:B,awsCloudWatchAddFlowLogPrefix:F}=a,$=X=>{T(X)};return n.createElement($A,{title:"Advanced Options",visible:u,onToggle:$},n.createElement(Y.Input,{id:"awsCloudWatchThrottleEnabled",type:"checkbox",value:"enable-throttling",defaultChecked:B&&B.value,onChange:i,label:"Enable Throttling",help:"If enabled, no new messages will be read from this input until Graylog catches up with its message load. This is typically useful for inputs reading from files or message queue systems like AMQP or Kafka. If you regularly poll an external system, e.g. via HTTP, you normally want to leave this disabled."}),n.createElement(Y.Input,{id:"awsCloudWatchAddFlowLogPrefix",type:"checkbox",value:"enable-logprefix",defaultChecked:F&&F.value,onChange:i,label:"Add Flow Log field name prefix",help:'Add field with the Flow Log prefix e. g. "src_addr" -> "flow_log_src_addr".'}),n.createElement(Y.Input,{id:"awsCloudWatchBatchSize",type:"number",value:R.value||R.defaultValue,onChange:i,label:"Kinesis Record batch size",help:"The number of Kinesis records to fetch at a time. Each record may be up to 1MB in size. The AWS default is 10,000. Enter a smaller value to process smaller chunks at a time."}))};Fv.propTypes={onChange:l().func.isRequired};const $A=(0,m.default)(Bf)` margin: 0 0 35px; `,GA=Fv,Nf=({onChange:i,onSubmit:a,toggleSetup:u})=>{const{formData:T}=(0,n.useContext)(Zs),[R,B]=(0,n.useState)(null),{availableStreams:F,setLogData:$}=(0,n.useContext)(Jl),{clearSidebar:X,setSidebar:se}=(0,n.useContext)(Ji),[de,ge]=dr(null,We=>{$(We),a()},"POST",{region:T.awsCloudWatchAwsRegion.value,stream_name:T.awsCloudWatchKinesisStream?T.awsCloudWatchKinesisStream.value:""});(0,n.useEffect)(()=>{se(n.createElement(Y.Panel,{bsStyle:"info",header:n.createElement("span",null,"Don't see the stream you need?")},n.createElement(jA,null,n.createElement("p",null,"At least one Kinesis stream must exist in the specified region in order to continue with the setup. The log stream must contain at least a few log messages."),n.createElement("p",null,"Graylog also supports the ability to create a Kinesis stream for you and subscribe it to a CloudWatch log group of your choice. Please be aware that this option will create additional resources in your AWS environment that will incur billing charges.")),n.createElement(Y.Button,{onClick:()=>{X(),u()},type:"button"},"Setup Kinesis Automatically")))},[]),(0,n.useEffect)(()=>{de.error&&(ge(null),B({full_message:de.error,nice_message:n.createElement("span",null,"We were unable to find any logs in this Kinesis stream. Please select a different Kinesis stream.")}))},[de.error]);const fe=()=>{ge(Uo.INTEGRATIONS.AWS.KINESIS.HEALTH_CHECK)};return n.createElement(n.Fragment,null,n.createElement(HA,{show:de.loading,backdrop:"static",keyboard:!1,bsSize:"small"},n.createElement(zA,null,n.createElement(VA,null),n.createElement(kA,null,"This request may take a few moments."))),n.createElement(qi,{onSubmit:fe,buttonContent:"Verify Stream & Format",loading:de.loading,error:R,disabled:rp.isFormValid(["awsCloudWatchKinesisStream"],T),title:"Select Kinesis Stream",description:n.createElement(n.Fragment,null,n.createElement("p",null,"Below is a list of all Kinesis streams found within the specified AWS account."),n.createElement("p",null,"Please select the stream you would like to read messages from, or follow the\xA0",n.createElement(Wv.A,{page:cr.INTEGRATIONS.AWS.AWS_KINESIS_CLOUDWATCH_INPUTS,text:"AWS Kinesis/CloudWatch Input "}),"documentation for more details on this set up."))},n.createElement(Oa,{id:"awsCloudWatchKinesisStream",type:"select",fieldData:T.awsCloudWatchKinesisStream,onChange:i,label:"Select Stream",required:!0},lp(F,"Select Kinesis Stream")),n.createElement(GA,{onChange:i})))};Nf.propTypes={onSubmit:l().func.isRequired,onChange:l().func.isRequired,toggleSetup:l().func},Nf.defaultProps={toggleSetup:()=>{}};const jA=m.default.div` margin-bottom: 9px; `,HA=(0,m.default)(Y.Modal)` > .modal-dialog { width: 400px; margin-left: auto; margin-right: auto; } `,zA=(0,m.default)(Y.Modal.Body)` text-align: center; `,VA=(0,m.default)(Na.A)` font-size: 48px; color: #702785; `,kA=m.default.p` font-size: 16px; font-weight: bold; padding-top: 15px; color: #a6afbd; `,QA=Nf,Kv=({groupName:i,streamName:a})=>n.createElement(n.Fragment,null,n.createElement("p",null,"This auto setup will create the following AWS resources. Click below to acknowledge that you understand that these resources will be created and that you are solely responsible for any associated AWS fees incurred from them. Note that all resources must be manually deleted by you if they are not needed."),n.createElement("ol",null,n.createElement("li",null,"Create a Kinesis stream with ",n.createElement("strong",null,"1")," shard."),n.createElement("li",null,"Create an IAM Role and Policy to allow the specified CloudWatch group ",n.createElement("strong",null,i)," to publish log messages to the Kinesis stream ",n.createElement("strong",null,a)),n.createElement("li",null,"Create a CloudWatch Subscription, which publishes log messages to the Kinesis stream.")));Kv.propTypes={groupName:l().string.isRequired,streamName:l().string.isRequired};const YA=Kv,$v=({label:i,progress:a})=>{const{data:u,error:T,loading:R}=a,F=R?`Creating ${i}`:!u&&!R&&!T&&"Waiting...",$=u?u.result:F,X=T||$;return n.createElement(XA,null,n.createElement(JA,null,!u&&!R&&!T&&n.createElement(_.A,{name:"hourglass_bottom",size:"2x",style:{color:"#dce1e5"}}),R&&n.createElement(Na.A,{name:"spinner",size:"2x",style:{color:"#0063be"}}),u&&n.createElement(_.A,{name:"check",size:"2x",style:{color:"#00ae42"}}),T&&n.createElement(_.A,{name:"times",size:"2x",style:{color:"#ad0707"}})),n.createElement(ZA,null,n.createElement(qA,null,"Create ",i),n.createElement(e_,null,X)))};$v.propTypes={progress:l().shape({data:l().object,error:l().object,loading:l().bool}).isRequired,label:l().string.isRequired};const XA=m.default.li` display: flex; margin: 0 0 12px; `,JA=m.default.div` min-width: 36px; `,ZA=m.default.div` flex-grow: 1; `,qA=m.default.span` font-size: 18px; `,e_=m.default.p` margin: 3px 0 0; `,wf=$v,Gv=({onSuccess:i,onError:a})=>{const{formData:u}=(0,n.useContext)(Zs),[T,R]=(0,n.useState)(null),[B,F]=(0,n.useState)(null),[$,X]=dr(null,()=>{i()},"POST",{region:u.awsCloudWatchAwsRegion.value,log_group_name:u.awsCloudWatchAwsGroupName.value,filter_name:"filter-name",filter_pattern:"",destination_stream_arn:T,role_arn:B}),[se,de]=dr(null,We=>{F(We.role_arn),X(Uo.INTEGRATIONS.AWS.KINESIS_AUTO_SETUP.CREATE_SUBSCRIPTION)},"POST",{region:u.awsCloudWatchAwsRegion.value,stream_name:u.awsCloudWatchKinesisStream.value,stream_arn:T}),[ge,fe]=dr(null,We=>{R(We.stream_arn),de(Uo.INTEGRATIONS.AWS.KINESIS_AUTO_SETUP.CREATE_SUBSCRIPTION_POLICY)},"POST",{region:u.awsCloudWatchAwsRegion.value,stream_name:u.awsCloudWatchKinesisStream.value});return(0,n.useEffect)(()=>{fe(Uo.INTEGRATIONS.AWS.KINESIS_AUTO_SETUP.CREATE_STREAM)},[]),(0,n.useEffect)(()=>{(ge.error||se.error||$.error)&&a()},[ge.error,se.error,$.error]),n.createElement(t_,null,n.createElement(wf,{label:"Kinesis Stream",progress:ge}),n.createElement(wf,{label:"Subscription Policy",progress:se}),n.createElement(wf,{label:"Subscription",progress:$}))};Gv.propTypes={onSuccess:l().func.isRequired,onError:l().func.isRequired};const t_=m.default.ul` list-style: none; margin: 0; padding: 0; `,n_=Gv,jv=({onSubmit:i,onCancel:a,groupName:u,streamName:T})=>{const[R,B]=(0,n.useState)(!1),[F,$]=(0,n.useState)(!1),[X,se]=(0,n.useState)(!1),ge=F?"Continue Setup":!X&&!F?"Creating...":"Close",fe=()=>{$(!0),se(!1)},We=()=>{$(!1),se(!0)};return n.createElement(Y.Modal,{show:!0},n.createElement(Y.Modal.Header,null,n.createElement(Y.Modal.Title,null,R?"Executing Auto-Setup":"Kinesis Auto Setup Agreement")),n.createElement(Y.Modal.Body,null,R?n.createElement(n_,{onSuccess:fe,onError:We}):n.createElement(YA,{groupName:u,streamName:T}),R&&F&&n.createElement(Y.Alert,{key:"delayedLogs",variant:"warning"},"It may take up to ten minutes for the first messages to arrive in the Kinesis stream. The Kinesis Health Check in the following step will not complete successfully until messages are present in the stream. Please see the official ",n.createElement("a",{href:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Subscriptions.html",target:"_blank",rel:"noopener noreferrer"},"CloudWatch Subscriptions")," documentation for more information.")),n.createElement(Y.Modal.Footer,null,R?n.createElement(Y.Button,{bsStyle:"success",onClick:F?i:a,type:"button",disabled:!X&&!F},ge):n.createElement(n.Fragment,null,n.createElement(Y.Button,{onClick:a,type:"button"},"Cancel"),n.createElement(Y.Button,{onClick:()=>B(!0),type:"button",bsStyle:"success"},"I Agree! Create these AWS resources now."))))};jv.propTypes={onSubmit:l().func.isRequired,onCancel:l().func.isRequired,groupName:l().string.isRequired,streamName:l().string.isRequired};const o_=jv,Wf=({onChange:i,onSubmit:a,toggleSetup:u})=>{const{availableGroups:T,setGroups:R,clearLogData:B}=(0,n.useContext)(Jl),{formData:F}=(0,n.useContext)(Zs),[$,X]=(0,n.useState)(null),[se,de]=(0,n.useState)(!1),[ge,fe]=(0,n.useState)(!1),[We,lt]=(0,n.useState)(!1),[it,yt]=dr(Uo.INTEGRATIONS.AWS.CLOUDWATCH.GROUPS,In=>{R(In)},"POST",{region:F.awsCloudWatchAwsRegion.value});(0,n.useEffect)(()=>{if(it.error){yt(null);const In=/No CloudWatch log groups/g;it.error.match(In)?(X({full_message:it.error,nice_message:n.createElement("span",null,"We're unable to find any groups in your chosen region. Please try selecting a different region.")}),fe(!0)):X({full_message:it.error})}return()=>{R({log_groups:[]})}},[it.error]);const Tt=()=>{B(),a()},Yt=()=>{de(!0),lt(!0)},hn=()=>{de(!1),lt(!1)};return n.createElement(qi,{onSubmit:Yt,buttonContent:"Begin Automated Setup",disabled:rp.isFormValid(["awsCloudWatchKinesisStream","awsCloudWatchAwsGroupName"],F)||se,loading:it.loading,error:$,title:"Set Up Kinesis Automatically",description:""},n.createElement("p",null,"Complete the fields below and Graylog will perform the automated Kinesis setup, which performs the following operations within your AWS account. See ",n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html"},"Using CloudWatch Logs Subscription Filters")," in the AWS documentation for more information."),n.createElement("ol",null,n.createElement("li",null,"Create a new Kinesis stream with the specified name."),n.createElement("li",null,"Create the IAM role/policy needed to subscribe the Kinesis stream to the CloudWatch Log Group."),n.createElement("li",null,"Subscribe the new Kinesis stream to the Log Group.")),n.createElement(Oa,{id:"awsCloudWatchKinesisStream",type:"text",label:"Kinesis Stream Name",placeholder:"Stream Name",onChange:i,fieldData:F.awsCloudWatchKinesisStream,disabled:se,pattern:"[a-zA-Z0-9_.-]{1,128}$",help:"1-128 alphanumeric characters and special characters underscore (_), period (.), and hyphen (-).",required:!0}),n.createElement(Oa,{id:"awsCloudWatchAwsGroupName",type:"select",fieldData:F.awsCloudWatchAwsGroupName,onChange:i,label:"CloudWatch Group Name",required:!0,disabled:it.loading||ge||se},lp(T,"Choose CloudWatch Group",it.loading)),u&&n.createElement(s_,{onClick:u,type:"button",disabled:se},"Back to stream Selection"),We&&n.createElement(o_,{onSubmit:Tt,onCancel:hn,groupName:F.awsCloudWatchAwsGroupName.value,streamName:F.awsCloudWatchKinesisStream.value}))};Wf.propTypes={onSubmit:l().func.isRequired,onChange:l().func.isRequired,toggleSetup:l().func},Wf.defaultProps={toggleSetup:null};const s_=(0,m.default)(Y.Button)` margin-right: 9px; `,a_=Wf,Ff=({hasStreams:i,...a})=>{const[u,T]=(0,n.useState)(i);return n.createElement(n.Fragment,null,u?n.createElement(QA,{...a,toggleSetup:()=>T(!1)}):n.createElement(a_,{...a,toggleSetup:i?()=>T(!0):null}))};Ff.propTypes={hasStreams:l().bool,onChange:l().func.isRequired,onSubmit:l().func.isRequired},Ff.defaultProps={hasStreams:!1};const r_=Ff,Hv=({onChange:i,onSubmit:a})=>{const{formData:u}=(0,n.useContext)(Zs);return n.createElement(Bf,{title:"Skip Health Check"},n.createElement(l_,{onSubmit:a,buttonContent:"Confirm",title:"Choose Log Type & Skip Health Check",disabled:!(u.awsCloudWatchKinesisInputType&&u.awsCloudWatchKinesisInputType.value),description:n.createElement("p",null,"If you're sure of the data contained within your new ",n.createElement("strong",null,u.awsCloudWatchKinesisStream.value)," stream, then choose your option below to skip our automated check.")},n.createElement(Oa,{id:"awsCloudWatchKinesisInputType",type:"select",fieldData:u.awsCloudWatchKinesisInputType,onChange:i,label:"Choose AWS Input Type",required:!0},lp(bf,"Choose Log Type"))))};Hv.propTypes={onSubmit:l().func.isRequired,onChange:l().func.isRequired};const l_=(0,m.default)(qi)` padding-top: 25px; `,i_=Hv;function Kf({callback:i,className:a,timeInSeconds:u,paused:T}){let R=u,B;const F=(0,ft.duration)(u,"seconds").format("mm:ss"),[$,X]=(0,n.useState)(F),se=()=>{B=setInterval(()=>{R-=1;const de=(0,ft.duration)(R,"seconds").format("mm:ss",{trim:!1});R<0?(R=u,X(F),clearInterval(B),i()):X(de)},1e3)};return(0,n.useEffect)(()=>(T?clearInterval(B):se(),()=>{clearInterval(B)}),[T]),n.createElement("span",{className:a},$)}Kf.propTypes={timeInSeconds:l().number.isRequired,callback:l().func,className:l().string,paused:l().bool},Kf.defaultProps={callback:()=>{},className:"",paused:!1};const c_=Kf,zv=({onChange:i,onSubmit:a})=>{const{logData:u,setLogData:T}=(0,n.useContext)(Jl),{formData:R}=(0,n.useContext)(Zs),[B,F]=(0,n.useState)(!1),[$,X]=dr(null,Tt=>{T(Tt),i({target:{name:"awsCloudWatchKinesisInputType",value:Tt.type}})},"POST",{region:R.awsCloudWatchAwsRegion.value,stream_name:R.awsCloudWatchKinesisStream.value}),se=()=>{F(!0),X(Uo.INTEGRATIONS.AWS.KINESIS.HEALTH_CHECK)};if((0,n.useEffect)(()=>{u||se()},[]),(0,n.useEffect)(()=>{!$.loading&&!$.data&&(F(!1),X(null))},[$.loading]),!u)return n.createElement(Y.Panel,{bsStyle:"warning",header:n.createElement(Vv,null,n.createElement(_.A,{name:"warning",size:"2x"}),n.createElement("span",null,"We haven't received a response back from Amazon yet."))},n.createElement("p",null,"Hang out for a few moments while we keep checking your AWS stream for logs. Amazon's servers parse logs every 10 minutes, so grab a cup of coffee because this may take some time!"),n.createElement(u_,null,n.createElement("strong",null,"Checking again in: ",n.createElement(c_,{timeInSeconds:120,callback:se,paused:B})),n.createElement(Y.Button,{type:"button",bsStyle:"success",bsSize:"sm",onClick:se,disabled:$.loading},$.loading?"Checking...":"Check Now")),n.createElement("p",null,n.createElement("em",null,"Do not refresh your browser, we are continually checking for your logs and this page will automatically refresh when your logs are available.")),n.createElement("div",null,n.createElement(i_,{onSubmit:a,onChange:i})));const de=u.type===Sf,ge=de?"check_circle":"warning",fe=de?"Awesome!":"Drats!",We=de?"success":"warning",lt=bf.find(Tt=>Tt.value===u.type).label,it=de?`a ${lt}`:"an unknown",yt=()=>{a(),i({target:{name:"awsCloudWatchKinesisInputType",value:u.type}})};return n.createElement(qi,{onSubmit:yt,buttonContent:"Review & Finalize",disabled:!1,title:"Create Kinesis Stream",description:n.createElement("p",null,"We are going to attempt to parse a single log to help you out! If we are unable to, or you would like it parsed differently, head on over to ",n.createElement("a",{href:"/system/pipelines"},"Pipeline Rules")," to set up your own parser!")},n.createElement(Y.Panel,{bsStyle:We,header:n.createElement(Vv,null,n.createElement(_.A,{name:ge,size:"2x"}),n.createElement("span",null,fe," looks like ",n.createElement("em",null,it)," message type."))},de?"Take a look at what we have parsed so far and you can create Pipeline Rules to handle even more!":"Not to worry, Graylog can still read in these log messages. We have parsed what we could and you can build Pipeline Rules to do the rest!"),n.createElement(Y.Input,{id:"awsCloudWatchLog",type:"textarea",label:"Formatted Log Message",value:u.message,rows:10,disabled:!0}))};zv.propTypes={onSubmit:l().func.isRequired,onChange:l().func.isRequired};const Vv=m.default.span` display: flex; align-items: center; > span { margin-left: 6px; } `,u_=m.default.p` display: flex; align-items: center; > strong { margin-right: 9px; } `,d_=zv,kv=({value:i})=>n.createElement(n.Fragment,null,i," ",n.createElement("small",null,"(default)"));kv.propTypes={value:l().string.isRequired};const $f=({onSubmit:i,onEditClick:a,externalInputSubmit:u})=>{const[T,R]=(0,n.useState)(null),{formData:B}=(0,n.useContext)(Zs),{logData:F}=(0,n.useContext)(Jl),{awsAuthenticationType:$,awsCloudWatchAddFlowLogPrefix:X={value:void 0},awsCloudWatchAssumeARN:se={value:void 0},awsCloudWatchAwsKey:de={value:void 0},awsCloudWatchAwsRegion:ge,awsCloudWatchBatchSize:fe,awsEndpointCloudWatch:We={value:void 0},awsCloudWatchKinesisInputType:lt={value:Sf},awsCloudWatchKinesisStream:it,awsCloudWatchName:yt,awsCloudWatchThrottleEnabled:Tt={value:void 0},awsEndpointDynamoDB:Yt={value:void 0},awsEndpointIAM:hn={value:void 0},awsEndpointKinesis:In={value:void 0}}=B,Qn=!!Tt.value,to=!!X.value,[Vo,Mo]=dr(null,()=>{i()},"POST",{name:yt.value,region:ge.value,aws_input_type:lt.value,stream_name:it.value,batch_size:Number(fe.value||fe.defaultValue),enable_throttling:Qn,add_flow_log_prefix:to});(0,n.useEffect)(()=>{Vo.error&&R({full_message:Vo.error,nice_message:n.createElement("span",null,"We were unable to save your Input, please try again in a few moments.")})},[Vo.error]);const is=()=>{if(u){i(B);return}Mo(Uo.INTEGRATIONS.AWS.KINESIS.SAVE)};return n.createElement(qi,{onSubmit:is,buttonContent:"Complete CloudWatch Setup",loading:Vo.loading,error:T,title:"Final Review",description:"Check out everything below to make sure it's correct, then click the button below to complete your CloudWatch setup!"},n.createElement(m_,null,n.createElement(Gf,null,"Setting up CloudWatch ",n.createElement("small",null,n.createElement(Qv,{onClick:a("authorize")},"Edit"))),n.createElement(jf,null,n.createElement("li",null,n.createElement("strong",null,"Name"),n.createElement("span",null,yt.value)),n.createElement("li",null,n.createElement("strong",null,"Authorization Type"),n.createElement("span",null,$.value)),de.value&&n.createElement("li",null,n.createElement("strong",null,"AWS Key"),n.createElement("span",null,de.value)),se.value&&n.createElement("li",null,n.createElement("strong",null,"AWS Assumed ARN Role"),n.createElement("span",null,se.value)),We.value&&n.createElement("li",null,n.createElement("strong",null,"CloudWatch VPC Endpoint"),n.createElement("span",null,We.value)),Yt.value&&n.createElement("li",null,n.createElement("strong",null,"DynamoDB VPC Endpoint"),n.createElement("span",null,Yt.value)),hn.value&&n.createElement("li",null,n.createElement("strong",null,"IAM VPC Endpoint"),n.createElement("span",null,hn.value)),In.value&&n.createElement("li",null,n.createElement("strong",null,"Kinesis VPC Endpoint"),n.createElement("span",null,In.value)),n.createElement("li",null,n.createElement("strong",null,"AWS Region"),n.createElement("span",null,ge.value))),n.createElement(Gf,null,"Setting up Kinesis ",n.createElement("small",null,n.createElement(Qv,{onClick:a("kinesis-setup")},"Edit"))),n.createElement(jf,null,n.createElement("li",null,n.createElement("strong",null,"Stream"),n.createElement("span",null,it.value)),n.createElement("li",null,n.createElement("strong",null,"Global Input"),n.createElement("span",null,n.createElement(be.In,{name:"done"}))),n.createElement("li",null,n.createElement("strong",null,"Record Batch Size"),n.createElement("span",null,fe.value?fe.value:n.createElement(kv,{value:fe.defaultValue}))),n.createElement("li",null,n.createElement("strong",null,"Enable Throttling"),n.createElement("span",null,n.createElement(be.In,{name:Qn?"check_circle":"cancel"}))),n.createElement("li",null,n.createElement("strong",null,"Add Flow Log prefix to field names"),n.createElement("span",null,n.createElement(be.In,{name:to?"check_circle":"cancel"})))),n.createElement(Gf,null,"Formatting"),n.createElement(jf,null,n.createElement("li",null,n.createElement("strong",null,"Log Type"),n.createElement("span",null,bf.find(Mp=>Mp.value===lt.value).label))),n.createElement("p",null,"If you need your logs parsed differently check out our ",n.createElement(jl.N,{to:ke.Ay.SYSTEM.PIPELINES.RULES},"Pipeline Rule")," for additional details and instructions."),n.createElement(Y.Input,{id:"awsCloudWatchLog",type:"textarea",label:"",value:F&&F.message||"We haven't received a response back from Amazon yet.",rows:10,disabled:!0})))};$f.propTypes={onSubmit:l().func.isRequired,onEditClick:l().func.isRequired,externalInputSubmit:l().bool},$f.defaultProps={externalInputSubmit:!1};const m_=m.default.div` border: 1px solid #a6afbd; margin: 25px 0; padding: 15px; border-radius: 4px; `,Gf=m.default.h3` margin: 0 0 10px; `,jf=m.default.ul` list-style: none; margin: 0 0 25px 10px; padding: 0; li { padding: 5px; &:nth-of-type(odd) { background-color: rgb(220 225 229 / 40%); } } strong::after { content: ':'; margin-right: 5px; } `,Qv=m.default.a` font-size: 12px; margin-left: 5px; font-style: italic; cursor: pointer; &::before { content: '('; } &::after { content: ')'; } `,p_=$f;function Hf({title:i,note:a,policy:u}){const[T,R]=(0,n.useState)(!1),B=()=>{R(!T)};return n.createElement("div",null,n.createElement(E_,{onClick:B},n.createElement(f_,null,n.createElement(y_,null,T?"Hide":"Show"," ",i),n.createElement(A_,null,a)),n.createElement(h_,{$opened:T},n.createElement(_.A,{name:"arrow_right_alt",size:"2x"}))),n.createElement(v_,{opened:T},JSON.stringify(u,null,2)))}Hf.propTypes={title:l().string.isRequired,note:l().string.isRequired,policy:l().object.isRequired};function g_(){const[i]=dr(Uo.INTEGRATIONS.AWS.PERMISSIONS);return n.createElement(Y.Panel,{bsStyle:"info",header:n.createElement("span",null,"AWS Policy Permissions")},n.createElement("p",null,"Please verify that you have granted your AWS IAM user sufficient permissions. You can use the following policies for reference."),!i.loading&&i.data&&n.createElement(n.Fragment,null,n.createElement(Hf,{title:"Recommended Policy",note:"To be able to use all available functionality for Kinesis setup.",policy:JSON.parse(i.data.setup_policy)}),n.createElement(Hf,{title:"Least Privilege Policy",note:"Doesn't include Kinesis auto-subscription controls.",policy:JSON.parse(i.data.auto_setup_policy)})))}const E_=m.default.header` display: flex; align-items: center; cursor: pointer; `,f_=m.default.div` flex-grow: 1; `,h_=m.default.span` transform: rotate(${i=>i.opened?"90deg":"0deg"}); transition: transform 150ms ease-in-out; `,v_=m.default.pre` overflow: hidden; max-height: ${i=>i.opened?"1000px":"0"}; opacity: ${i=>i.opened?"1":"0"}; transition: max-height 150ms ease-in-out, opacity 150ms ease-in-out, margin 150ms ease-in-out, padding 150ms ease-in-out; margin-bottom: ${i=>i.opened?"12px":"0"}; padding: ${i=>i.opened?"9.5px":"0"}; `,y_=m.default.h4` font-weight: bold; `,A_=m.default.p` font-style: italic; `,zf=({externalInputSubmit:i,onSubmit:a})=>{const{availableSteps:u,currentStep:T,isDisabledStep:R,setAvailableStep:B,setCurrentStep:F,setEnabledStep:$}=(0,n.useContext)(Ku),{setFormData:X}=(0,n.useContext)(Zs),{availableStreams:se}=(0,n.useContext)(Jl),{sidebar:de,clearSidebar:ge}=(0,n.useContext)(Ji),[fe,We]=(0,n.useState)(!1),[lt,it]=(0,n.useState)(!1),yt=(0,Nu.useNavigate)(),Tt=hn=>{F(hn)},Yt=(0,n.useMemo)(()=>{const hn=to=>()=>{F(to)},In=({target:to},Vo)=>{const Mo=to.name||to.id;let is=(0,sn.yG)(to);typeof is=="string"&&(is=is.trim()),fe||We(!0),X(Mo,{...Vo,value:is})},Qn=to=>{ge();const Vo=u.indexOf(T)+1;if(u[Vo]){const Mo=u[Vo];F(Mo),$(Mo)}else it(!0),i?a(to):yt(ke.Ay.SYSTEM.INPUTS)};return[{key:"authorize",title:"AWS Kinesis Authorize",component:n.createElement(KA,{onSubmit:Qn,onChange:In,sidebarComponent:n.createElement(g_,null)}),disabled:R("authorize")},{key:"kinesis-setup",title:"AWS Kinesis Setup",component:n.createElement(r_,{onSubmit:Qn,onChange:In,hasStreams:se.length>0}),disabled:R("kinesis-setup")},{key:"health-check",title:"AWS CloudWatch Health Check",component:n.createElement(d_,{onSubmit:Qn,onChange:In}),disabled:R("health-check")},{key:"review",title:"AWS Kinesis Review",component:n.createElement(p_,{onSubmit:Qn,onEditClick:hn,externalInputSubmit:i}),disabled:R("review")}]},[R,se.length,i,F,fe,X,ge,u,T,$,a,yt]);return(0,n.useEffect)(()=>{u.length===0&&B(Yt.map(hn=>hn.key))},[u,B,Yt]),n.createElement(n.Fragment,null,fe&&!lt&&n.createElement(EA.A,{question:"Are you sure? Your new Input will not be created."}),n.createElement(fA.A,{steps:Yt,activeStep:T,onStepChange:Tt,horizontal:!0,justified:!0,hidePreviousNextButtons:!0},de))};zf.propTypes={externalInputSubmit:l().bool,onSubmit:l().func},zf.defaultProps={externalInputSubmit:!1,onSubmit:void 0};const __=zf,C_={awsCloudWatchBatchSize:{defaultValue:"10000"},awsCloudWatchThrottleEnabled:{value:!0},awsCloudWatchAddFlowLogPrefix:{value:!0}},Vf=({onSubmit:i})=>{const a=u=>{i&&i(gA(u))};return n.createElement(Iv,null,n.createElement(ll,null,n.createElement(ls,{initialFormData:C_},n.createElement(ap,null,n.createElement(Mv,null,n.createElement(__,{onSubmit:a,externalInputSubmit:typeof i=="function"}))))))};Vf.propTypes={onSubmit:l().func},Vf.defaultProps={onSubmit:void 0};const Yv=Vf,Xv=()=>n.createElement(n.Fragment,null,n.createElement(Xl.A,{title:"AWS Integrations"},n.createElement("span",null,"This feature retrieves log messages from various AWS sources.")),n.createElement(Yv,null));Xv.propTypes={};const T_=Xv,Jv=({notification:i})=>{var a,u,T,R,B;return n.createElement(n.Fragment,null,n.createElement(be.WY,{label:"Routing Key",value:(a=i.config)==null?void 0:a.routing_key}),n.createElement(be.WY,{label:"Custom Incident",value:(u=i.config)==null?void 0:u.custom_incident}),n.createElement(be.WY,{label:"Key Prefix",value:(T=i.config)==null?void 0:T.key_prefix}),n.createElement(be.WY,{label:"Client Name",value:(R=i.config)==null?void 0:R.client_name}),n.createElement(be.WY,{label:"Client URL",value:(B=i.config)==null?void 0:B.client_url}))};Jv.propTypes={notification:l().shape({config:l().shape({routing_key:l().string,custom_incident:l().bool,key_prefix:l().string,client_name:l().string,client_url:l().string}).isRequired}).isRequired};const b_=Jv;var S_=e("IW7priiX"),Es=e.n(S_),P_=Object.defineProperty,D_=(i,a,u)=>a in i?P_(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,dp=(i,a,u)=>(D_(i,typeof a!="symbol"?a+"":a,u),u);class kf extends n.Component{constructor(){super(...arguments),dp(this,"propagateChange",(a,u)=>{const{config:T,onChange:R}=this.props,B=Es()(T);B[a]=u,R(B)}),dp(this,"handleChange",a=>{const{name:u}=a.target;this.propagateChange(u,(0,sn.yG)(a.target))})}render(){const{config:a,validation:u}=this.props;return n.createElement(n.Fragment,null,n.createElement(Y.Input,{id:"pagerduty-notification-v2-routing_key",name:"routing_key",label:"Routing Key",type:"text",bsStyle:u.errors.routing_key?"error":null,help:Ue()(u,"errors.routing_key[0]","The Pager Duty integration Routing Key."),value:a.routing_key,onChange:this.handleChange,required:!0}),n.createElement(Y.Input,{id:"pagerduty-notification-v2-custom_incident",name:"custom_incident",label:"Use Custom Incident Key",type:"checkbox",bsStyle:u.errors.custom_incident?"error":null,help:Ue()(u,"errors.custom_incident[0]","Generate a custom incident key based on the Stream and the Alert Condition."),value:a.custom_incident,checked:a.custom_incident,onChange:this.handleChange}),n.createElement(Y.Input,{id:"pagerduty-notification-v2-key_prefix",name:"key_prefix",label:"Incident Key Prefix",type:"text",bsStyle:u.errors.key_prefix?"error":null,help:Ue()(u,"errors.key_prefix[0]","Incident key prefix that identifies the incident."),value:a.key_prefix,onChange:this.handleChange,required:!0}),n.createElement(Y.Input,{id:"pagerduty-notification-v2-client_name",name:"client_name",label:"Client Name",type:"text",bsStyle:u.errors.client_name?"error":null,help:Ue()(u,"errors.client_name[0]","The name of the Graylog system that is triggering the PagerDuty event."),value:a.client_name,onChange:this.handleChange,required:!0}),n.createElement(Y.Input,{id:"pagerduty-notification-v2-client_url",name:"client_url",label:"Client URL",type:"text",bsStyle:u.errors.client_url?"error":null,help:Ue()(u,"errors.client_url[0]","The URL of the Graylog system that is triggering the PagerDuty event."),value:a.client_url,onChange:this.handleChange,required:!0}))}}dp(kf,"propTypes",{config:l().shape({client_name:l().string,client_url:l().string,custom_incident:l().bool,key_prefix:l().string,routing_key:l().string}).isRequired,validation:l().shape({failed:l().bool.isRequired,errors:l().shape({client_name:l().arrayOf(l().string),client_url:l().arrayOf(l().string),custom_incident:l().arrayOf(l().string),key_prefix:l().arrayOf(l().string),routing_key:l().arrayOf(l().string)}),error_context:l().object}).isRequired,onChange:l().func.isRequired}),dp(kf,"defaultConfig",{client_name:"Graylog",client_url:"",custom_incident:!0,key_prefix:"Graylog",routing_key:""});const Zv=kf;var mp=e("ykMrd0fI"),ec={};ec.styleTagTransform=ua(),ec.setAttributes=Ys(),ec.insert=ws().bind(null,"head"),ec.domAPI=As(),ec.insertStyleElement=Ws();var PT=ca()(mp.A,ec);const O_=mp.A&&mp.A.locals?mp.A.locals:void 0;var R_=Object.defineProperty,I_=(i,a,u)=>a in i?R_(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,Qf=(i,a,u)=>(I_(i,typeof a!="symbol"?a+"":a,u),u);class qv extends n.Component{constructor(){super(...arguments),Qf(this,"state",{displayDetails:!1}),Qf(this,"toggleDisplayDetails",()=>{const{displayDetails:a}=this.state;this.setState({displayDetails:!a})})}render(){const{type:a,notification:u,definitionNotification:T,children:R}=this.props,{displayDetails:B}=this.state;return n.createElement(n.Fragment,null,n.createElement("h4",null,u.title||T.notification_id),n.createElement("dl",null,n.createElement("dd",null,a),n.createElement("dd",null,n.createElement(Y.Button,{bsStyle:"link",className:"btn-text",bsSize:"xsmall",onClick:this.toggleDisplayDetails},n.createElement(be.In,{name:`arrow_${B?"drop_down":"right"}`}),"\xA0",B?"Less details":"More details"),B&&n.createElement(Y.Table,{condensed:!0,hover:!0,className:O_.fixedTable},n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",null,"Description"),n.createElement("td",null,u.description||"No description given")),R)))))}}Qf(qv,"propTypes",{type:l().string.isRequired,notification:l().object.isRequired,definitionNotification:l().object.isRequired,children:l().element.isRequired});const Zl=qv;function ey({notification:i,...a}){var u,T,R,B,F;return n.createElement(Zl,{...a,notification:i},n.createElement("tr",null,n.createElement("td",null,"Routing Key"),n.createElement("td",null,n.createElement("code",null,(u=i==null?void 0:i.config)==null?void 0:u.routing_key))),n.createElement("tr",null,n.createElement("td",null,"Use Custom Incident Key"),n.createElement("td",null,n.createElement("code",null,(T=i==null?void 0:i.config)!=null&&T.custom_incident?"Yes":"No"))),n.createElement("tr",null,n.createElement("td",null,"Incident Key Prefix"),n.createElement("td",null,n.createElement("code",null,(R=i==null?void 0:i.config)==null?void 0:R.key_prefix))),n.createElement("tr",null,n.createElement("td",null,"Client Name"),n.createElement("td",null,n.createElement("code",null,(B=i==null?void 0:i.config)==null?void 0:B.client_name))),n.createElement("tr",null,n.createElement("td",null,"Client URL"),n.createElement("td",null,n.createElement("code",null,(F=i==null?void 0:i.config)==null?void 0:F.client_url))))}ey.propTypes={type:l().string.isRequired,notification:l().shape({config:l().shape({routing_key:l().string,custom_incident:l().bool,key_prefix:l().string,client_name:l().string,client_url:l().string}).isRequired}).isRequired,definitionNotification:l().shape.isRequired};const M_=ey,x_=(0,m.default)(Y.Well)(({theme:i})=>(0,m.css)` margin-bottom: 5px; font-family: ${i.fonts.family.monospace}; font-size: ${i.fonts.size.body}; white-space: pre-wrap; word-wrap: break-word; `),L_=({notification:i})=>n.createElement(n.Fragment,null,n.createElement(be.WY,{label:"Webhook URL",value:i.config.webhook_url}),n.createElement(be.WY,{label:"Channel",value:i.config.channel}),n.createElement(be.WY,{label:"Custom Message Template ",value:n.createElement(x_,{bsSize:"small"},i.config.custom_message||n.createElement("em",null,"Empty body"))}),n.createElement(be.WY,{label:"Message Backlog Limit",value:i.config.backlog_size}),n.createElement(be.WY,{label:"User Name",value:i.config.user_name}),n.createElement(be.WY,{label:"Include Title",value:i.config.include_title}),n.createElement(be.WY,{label:"Notify Channel",value:i.config.notify_channel}),n.createElement(be.WY,{label:"Link Names",value:i.config.link_names}),n.createElement(be.WY,{label:"Icon URL",value:i.config.icon_url}),n.createElement(be.WY,{label:"Icon Emoji",value:i.config.icon_emoji}),n.createElement(be.WY,{label:"Time Zone",value:i.config.time_zone}));var B_=e("WoBpjwwo"),ty=e.n(B_),ny=e("1LOzeRr1");class oy extends n.Component{constructor(a){super(a),this.handleBacklogSizeChange=T=>{const{name:R}=T.target,B=(0,sn.yG)(T.target);this.setState({[ty()(R)]:B}),this.propagateChange(R,(0,sn.yG)(T.target))},this.toggleBacklogSize=()=>{const{isBacklogSizeEnabled:T,backlogSize:R}=this.state;this.setState({isBacklogSizeEnabled:!T}),this.propagateChange("backlog_size",T?0:R)},this.propagateChange=(T,R)=>{const{config:B,onChange:F}=this.props,$=Es()(B);$[T]=R,F($)},this.handleColorChange=(T,R,B)=>{B(),this.propagateChange("color",T)},this.handleChange=T=>{const{name:R}=T.target;this.propagateChange(R,(0,sn.yG)(T.target))},this.handleTimeZoneChange=T=>{this.propagateChange("time_zone",T)};const u=a.config.backlog_size;this.state={isBacklogSizeEnabled:u>0,backlogSize:u}}render(){const{config:a,validation:u}=this.props,{isBacklogSizeEnabled:T,backlogSize:R}=this.state,B=n.createElement("p",null,"Custom message to be appended below the alert title. See ",n.createElement(Wv.A,{text:"docs",page:"alerts#notifications"})," for more details.");return n.createElement(n.Fragment,null,n.createElement(Y.FormGroup,{controlId:"color"},n.createElement(Y.ControlLabel,null,"Configuration color"),n.createElement("div",null,n.createElement(ny.A,{color:a.color}),n.createElement("div",{style:{display:"inline-block",marginLeft:15}},n.createElement(be.$I,{id:"color",color:a.color||"#f06292",placement:"right",triggerNode:n.createElement(Y.Button,{bsSize:"xsmall"},"Change color"),onChange:this.handleColorChange}))),n.createElement(Y.HelpBlock,null,"Choose a color to use for this configuration.")),n.createElement(Y.Input,{id:"notification-webhookUrl",name:"webhook_url",label:"Webhook URL",type:"text",bsStyle:u.errors.webhook_url?"error":null,help:Ue()(u,"errors.webhook_url[0]",'Slack "Incoming Webhook" URL'),value:a.webhook_url||"",onChange:this.handleChange,required:!0}),n.createElement(Y.Input,{id:"notification-channel",name:"channel",label:"Channel",type:"text",bsStyle:u.errors.channel?"error":null,help:Ue()(u,"errors.channel[0]","Name of Slack #channel or @user for a direct message"),value:a.channel||"",onChange:this.handleChange,required:!0}),n.createElement(Y.Input,{id:"notification-customMessage",name:"custom_message",label:"Custom Message (optional)",type:"textarea",bsStyle:u.errors.custom_message?"error":null,help:Ue()(u,"errors.custom_message[0]",B),value:a.custom_message||"",onChange:this.handleChange}),n.createElement(Y.Input,{id:"notification-time-zone",help:"Time zone used for timestamps in the notification body.",label:"Time zone for date/time values"},n.createElement(be.o4,{className:"timezone-select",name:"time_zone",value:a.time_zone,onChange:this.handleTimeZoneChange,clearable:!1})),n.createElement(Y.FormGroup,null,n.createElement(Y.ControlLabel,null,"Message Backlog Limit (optional)"),n.createElement(Y.InputGroup,null,n.createElement(Y.InputGroup.Addon,null,n.createElement("input",{id:"toggle_backlog_size",type:"checkbox",checked:T,onChange:this.toggleBacklogSize})),n.createElement(Y.FormControl,{type:"number",id:"backlog_size",name:"backlog_size",onChange:this.handleBacklogSizeChange,value:R,min:"0",disabled:!T})),n.createElement(Y.HelpBlock,null,"Limit the number of backlog messages sent as part of the Slack notification. If set to 0, no limit will be enforced.")),n.createElement(Y.Input,{id:"notification-userName",name:"user_name",label:"User Name (optional)",type:"text",bsStyle:u.errors.user_name?"error":null,help:Ue()(u,"errors.user_name[0]","User name of the sender in Slack"),value:a.user_name||"",onChange:this.handleChange}),n.createElement(Y.Row,null,n.createElement(Y.Col,{md:4},n.createElement(Y.Input,{id:"include_title",name:"include_title",label:"Include Title",bsStyle:u.errors.include_title?"error":null,help:Ue()(u,"errors.include_title[0]","Include the event definition title and description in the notification"),type:"checkbox",checked:a.include_title,onChange:this.handleChange})),n.createElement(Y.Col,{md:4},n.createElement(Y.Input,{id:"notification-notifyChannel",name:"notify_channel",label:"Notify Channel",type:"checkbox",bsStyle:u.errors.notify_channel?"error":null,help:Ue()(u,"errors.notify_channel[0]","Notify all users in channel by adding @channel to the message"),checked:a.notify_channel||"",onChange:this.handleChange})),n.createElement(Y.Col,{md:4},n.createElement(Y.Input,{id:"notification-notifyHere",name:"notify_here",label:"Notify Here",type:"checkbox",bsStyle:u.errors.notify_here?"error":null,help:Ue()(u,"errors.notify_here[0]","Notify active users in channel by adding @here to the message"),checked:a.notify_here||"",onChange:this.handleChange}))),n.createElement(Y.Input,{id:"notification-linkNames",name:"link_names",label:"Link Names",type:"checkbox",bsStyle:u.errors.link_names?"error":null,help:Ue()(u,"errors.link_names[0]","Find and link channel names and user names"),checked:a.link_names||"",onChange:this.handleChange}),n.createElement(Y.Input,{id:"notification-iconUrl",name:"icon_url",label:"Icon URL (optional)",type:"text",bsStyle:u.errors.icon_url?"error":null,help:Ue()(u,"errors.icon_url[0]","Image to use as the icon for this message"),value:a.icon_url||"",onChange:this.handleChange}),n.createElement(Y.Input,{id:"notification-iconEmoji",name:"icon_emoji",label:"Icon Emoji (optional)",type:"text",bsStyle:u.errors.icon_emoji?"error":null,help:Ue()(u,"errors.icon_emoji[0]","Emoji to use as the icon for this message (overrides Icon URL)"),value:a.icon_emoji||"",onChange:this.handleChange}))}}oy.defaultConfig={color:"#FF0000",webhook_url:"",channel:"#channel",custom_message:"--- [Event Definition] ---------------------------\nTitle: ${event_definition_title}\nType: ${event_definition_type}\n--- [Event] --------------------------------------\nAlert Replay: ${http_external_uri}alerts/${event.id}/replay-search\nTimestamp: ${event.timestamp}\nMessage: ${event.message}\nSource: ${event.source}\nKey: ${event.key}\nPriority: ${event.priority}\nAlert: ${event.alert}\nTimestamp Processing: ${event.timestamp}\nTimerange Start: ${event.timerange_start}\nTimerange End: ${event.timerange_end}\nEvent Fields:\n${foreach event.fields field}\n${field.key}: ${field.value}\n${end}\n${if backlog}\n--- [Backlog] ------------------------------------\nLast messages accounting for this alert:\n${foreach backlog message}\n${message.timestamp} :: ${message.source} :: ${message.message}\n${message.message}\n${end}${end}\n",user_name:"Graylog",notify_channel:!1,link_names:!1,icon_url:"",icon_emoji:"",backlog_size:0,time_zone:"UTC"};const sy=oy;function ay({notification:i,...a}){var u;return n.createElement(Zl,{...a,notification:i},n.createElement("tr",null,n.createElement("td",null,"Color"),n.createElement("td",null,(u=i==null?void 0:i.config)==null?void 0:u.color)),n.createElement("tr",null,n.createElement("td",null,"Webhook URL"),n.createElement("td",null,i.config.webhook_url)),n.createElement("tr",null,n.createElement("td",null,"Channel"),n.createElement("td",null,i.config.channel)),n.createElement("tr",null,n.createElement("td",null,"Include Title"),n.createElement("td",null,i.config.include_title)),n.createElement("tr",null,n.createElement("td",null,"Custom Message"),n.createElement("td",null,i.config.custom_message)),n.createElement("tr",null,n.createElement("td",null,"Time Zone"),n.createElement("td",null,i.config.time_zone)),n.createElement("tr",null,n.createElement("td",null,"Message Backlog Limit"),n.createElement("td",null,i.config.backlog_size)),n.createElement("tr",null,n.createElement("td",null,"User Name"),n.createElement("td",null,i.config.user_name)),n.createElement("tr",null,n.createElement("td",null,"Notify Channel"),n.createElement("td",null,i.config.notify_channel?"Yes":"No")),n.createElement("tr",null,n.createElement("td",null,"Link Names"),n.createElement("td",null,i.config.link_names?"Yes":"No")),n.createElement("tr",null,n.createElement("td",null,"Icon URL"),n.createElement("td",null,i.config.icon_url)),n.createElement("tr",null,n.createElement("td",null,"Icon Emoji"),n.createElement("td",null,i.config.icon_emoji)))}ay.defaultProps={notification:{}};const U_=ay,N_=(0,m.default)(Y.Well)(({theme:i})=>(0,m.css)` margin-bottom: 5px; font-family: ${i.fonts.family.monospace}; font-size: ${i.fonts.size.body}; white-space: pre-wrap; word-wrap: break-word; `),w_=({notification:i})=>n.createElement(n.Fragment,null,n.createElement(be.WY,{label:"Webhook URL",value:i.config.webhook_url}),n.createElement(be.WY,{label:"Custom Message Template ",value:n.createElement(N_,{bsSize:"small"},i.config.custom_message||n.createElement("em",null,"Empty body"))}),n.createElement(be.WY,{label:"Message Backlog Limit",value:i.config.backlog_size}),n.createElement(be.WY,{label:"Icon URL",value:i.config.icon_url}),n.createElement(be.WY,{label:"Time Zone",value:i.config.time_zone}));class ry extends n.Component{constructor(a){super(a),this.handleBacklogSizeChange=T=>{const{name:R}=T.target,B=(0,sn.yG)(T.target);this.setState({[ty()(R)]:B}),this.propagateChange(R,(0,sn.yG)(T.target))},this.toggleBacklogSize=()=>{const{isBacklogSizeEnabled:T,backlogSize:R}=this.state;this.setState({isBacklogSizeEnabled:!T}),this.propagateChange("backlog_size",T?0:R)},this.propagateChange=(T,R)=>{const{config:B,onChange:F}=this.props,$=Es()(B);$[T]=R,F($)},this.handleColorChange=(T,R,B)=>{B(),this.propagateChange("color",T)},this.handleTimeZoneChange=T=>{this.propagateChange("time_zone",T)},this.handleChange=T=>{const{name:R}=T.target;this.propagateChange(R,(0,sn.yG)(T.target))};const u=a.config.backlog_size;this.state={isBacklogSizeEnabled:u>0,backlogSize:u}}render(){const{config:a,validation:u}=this.props,{isBacklogSizeEnabled:T,backlogSize:R}=this.state,F=n.createElement("p",null,"Custom message to be appended below the alert title. See ",n.createElement("a",{href:"https://docs.graylog.org/docs/alerts#notifications",rel:"noopener noreferrer",target:"_blank"},"docs "),"for more details.");return n.createElement(n.Fragment,null,n.createElement(Y.FormGroup,{controlId:"color"},n.createElement(Y.ControlLabel,null,"Configuration color"),n.createElement("div",null,n.createElement(ny.A,{color:a.color}),n.createElement("div",{style:{display:"inline-block",marginLeft:15}},n.createElement(be.$I,{id:"color",color:a.color||"#f06292",placement:"right",triggerNode:n.createElement(Y.Button,{bsSize:"xsmall"},"Change color"),onChange:this.handleColorChange}))),n.createElement(Y.HelpBlock,null,"Choose a color to use for this configuration.")),n.createElement(Y.Input,{id:"notification-webhookUrl",name:"webhook_url",label:"Webhook URL",type:"text",bsStyle:u.errors.webhook_url?"error":null,help:Ue()(u,"errors.webhook_url[0]",'Teams "Incoming Webhook" URL'),value:a.webhook_url||"",onChange:this.handleChange,required:!0}),n.createElement(Y.Input,{id:"notification-customMessage",name:"custom_message",label:"Custom Message (optional)",type:"textarea",bsStyle:u.errors.custom_message?"error":null,help:Ue()(u,"errors.custom_message[0]",F),value:a.custom_message||"",onChange:this.handleChange}),n.createElement(Y.FormGroup,null,n.createElement(Y.Input,{id:"notification-time-zone",help:"Time zone used for timestamps in the notification body.",label:"Time zone for date/time values"},n.createElement(be.o4,{className:"timezone-select",name:"time_zone",value:a.time_zone,onChange:this.handleTimeZoneChange,clearable:!1})),n.createElement(Y.ControlLabel,null,"Message Backlog Limit (optional)"),n.createElement(Y.InputGroup,null,n.createElement(Y.InputGroup.Addon,null,n.createElement("input",{id:"toggle_backlog_size",type:"checkbox",checked:T,onChange:this.toggleBacklogSize})),n.createElement(Y.FormControl,{type:"number",id:"backlog_size",name:"backlog_size",onChange:this.handleBacklogSizeChange,value:R,min:"0",disabled:!T})),n.createElement(Y.HelpBlock,null,"Limit the number of backlog messages sent as part of the Microsoft Teams notification. If set to 0, no limit will be enforced.")),n.createElement(Y.Input,{id:"notification-iconUrl",name:"icon_url",label:"Icon URL (optional)",type:"text",bsStyle:u.errors.icon_url?"error":null,help:Ue()(u,"errors.icon_url[0]","Image to use as the icon for this message"),value:a.icon_url||"",onChange:this.handleChange}))}}ry.defaultConfig={color:"#FF0000",webhook_url:"",custom_message:`--- [Event Definition] ---
Title:\${event_definition_title}
Type:\${event_definition_type}
--- [Event] ---
Alert Replay:\${http_external_uri}alerts/\${event.id}/replay-search
Timestamp:\${event.timestamp}
Message:\${event.message}
Source:\${event.source}
Key:\${event.key}
Priority:\${event.priority}
Alert:\${event.alert}
Timestamp Processing:\${event.timestamp}
Timerange Start:\${event.timerange_start}
Timerange End:\${event.timerange_end}
Event Fields:
\${foreach event.fields field} \${end}
\${field.key}:\${field.value}
\${if backlog} --- [Backlog] --- \${foreach backlog message}

\${message.timestamp} :: \${message.source} :: \${message.message}

\${end}\${end}`,icon_url:"",backlog_size:0,time_zone:"UTC"};const ly=ry;function iy({notification:i,...a}){var u;return n.createElement(Zl,{...a,notification:i},n.createElement("tr",null,n.createElement("td",null,"Color"),n.createElement("td",null,(u=i==null?void 0:i.config)==null?void 0:u.color)),n.createElement("tr",null,n.createElement("td",null,"Webhook URL"),n.createElement("td",null,i.config.webhook_url)),n.createElement("tr",null,n.createElement("td",null,"Custom Message"),n.createElement("td",null,i.config.custom_message)),n.createElement("tr",null,n.createElement("td",null,"Time Zone"),n.createElement("td",null,i.config.time_zone)),n.createElement("tr",null,n.createElement("td",null,"Message Backlog Limit"),n.createElement("td",null,i.config.backlog_size)),n.createElement("tr",null,n.createElement("td",null,"Icon URL"),n.createElement("td",null,i.config.icon_url)))}iy.defaultProps={notification:{}};const W_=iy,cy=({config:i,updateConfig:a,validationMessage:u,validationState:T})=>{var R,B,F;const $=(0,n.useRef)(!((R=i.api_token)!=null&&R.is_set)),[X,se]=(0,n.useState)(((B=i.api_token)==null?void 0:B.is_set)===!0),de=(0,n.useCallback)(We=>{a({...i,api_token:We})},[a,i]);(0,n.useEffect)(()=>{var We;((We=i.api_token)==null?void 0:We.is_set)!==void 0&&de({keep_value:!0})},[de,i.api_token]);const ge=({target:We})=>{const lt=We.value;let it={set_value:lt};lt===""&&(it={delete_value:!0}),de(it)},fe=()=>{if(X){de({delete_value:!0}),se(!1);return}de({keep_value:!0}),se(!0)};return n.createElement("fieldset",null,X?n.createElement(Y.Input,{id:"api_token",label:"User Password",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},n.createElement(Y.Button,{onClick:fe},"Reset token")):n.createElement(Y.Input,{type:"password",id:"api_token",name:"api_token",label:"API Token",buttonAfter:$.current?void 0:n.createElement(Y.Button,{type:"button",onClick:fe},"Undo Reset"),onChange:ge,help:u("api_token","The API Token."),bsStyle:T("api_token"),value:((F=i.api_token)==null?void 0:F.set_value)||"",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",required:!0}))};cy.propTypes={config:l().shape({api_token:l().object.isRequired}).isRequired,updateConfig:l().func.isRequired,handleFormEvent:l().func.isRequired,validationState:l().func.isRequired,validationMessage:l().func.isRequired};const uy=cy;var F_=Object.defineProperty,K_=(i,a,u)=>a in i?F_(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,$_=(i,a,u)=>(K_(i,typeof a!="symbol"?a+"":a,u),u);class dy extends n.Component{render(){return n.createElement("div",null,n.createElement("dl",null,n.createElement("dt",null,"API Token"),n.createElement("dd",null,"******")),n.createElement(Y.Alert,{style:{marginBottom:10},bsStyle:"danger",title:"Deprecation Warning"},n.createElement("p",null,"The GreyNoise Community IP Lookup Data Adapter is no longer supported. This Data Adapter should not be used.")))}}$_(dy,"propTypes",{dataAdapter:l().shape({config:l().shape({}).isRequired,updateConfig:l().func.isRequired,handleFormEvent:l().func.isRequired,validationState:l().func.isRequired,validationMessage:l().func.isRequired})});const my=dy;class G_ extends n.Component{render(){const a={marginBottom:10};return n.createElement("div",null,n.createElement("p",{style:a},"The GreyNoise Quick IP Lookup data adapter uses the ",n.createElement(be.Gr,{href:"https://developer.greynoise.io/"},"Greynoise API")," to lookup indicators for the given key and returns the values for the IP Quick Context endpoint. See ",n.createElement(be.Gr,{href:"https://developer.greynoise.io/reference/ip-lookup-1#quickcheck-1"},"IP Quick Context")))}}const j_=G_;class H_ extends n.Component{render(){return n.createElement("div",null,n.createElement(Y.Alert,{style:{marginBottom:10},bsStyle:"warning",title:"Deprecation Warning"},n.createElement("p",null,"The GreyNoise Community IP Lookup Data Adapter is no longer supported. This Data Adapter should not be used.")))}}const z_=H_,V_={routes:[{path:Ka.INTEGRATIONS.AWS.CLOUDWATCH.index,component:T_}],inputConfiguration:[{type:"org.graylog.integrations.aws.inputs.AWSInput",component:Fu,embeddedComponent:Yv}],eventNotificationTypes:[{type:"pagerduty-notification-v2",displayName:"PagerDuty Notification [Official]",formComponent:Zv,summaryComponent:M_,detailsComponent:b_,defaultConfig:Zv.defaultConfig},{type:"slack-notification-v1",displayName:"Slack Notification",formComponent:sy,summaryComponent:U_,detailsComponent:L_,defaultConfig:sy.defaultConfig},{type:"teams-notification-v1",displayName:"Microsoft Teams Notification",formComponent:ly,summaryComponent:W_,detailsComponent:w_,defaultConfig:ly.defaultConfig}],lookupTableAdapters:[{type:"GreyNoise",displayName:"GreyNoise Quick IP Lookup",formComponent:uy,summaryComponent:my,documentationComponent:j_},{type:"GreyNoise Community IP Lookup",displayName:"[Deprecated] GreyNoise Community IP Lookup",formComponent:uy,summaryComponent:my,documentationComponent:z_}]};var k_=e("D2221jVL"),Yf=e("Z/o2hWBZ"),Q_=e("Mx+G+HdB"),Xf=e.n(Q_),py=e("/coHI+Jz"),Y_=e("u1Q00LVl"),X_=e.n(Y_),J_=e("53I4yQGE");const tc=(0,Ee.rN)("core.FilterPreview",()=>d().createActions({create:{asyncResult:!0},execute:{asyncResult:!0},search:{asyncResult:!0}})),Z_=i=>new Promise(a=>{setTimeout(a,i)}),q_=(0,Ee.Bv)("core.FilterPreview",()=>d().createStore({listenables:[tc],sourceUrl:"/views/search",searchJob:void 0,result:void 0,getInitialState(){return this.getState()},propagateChanges(){this.trigger(this.getState())},getState(){return{searchJob:this.searchJob,result:this.result}},resourceUrl({segments:i=[],query:a={}}){const u=new(r())(this.sourceUrl),T=X_()(u.segment(),i);return u.segmentCoded(T),u.query(a),I.H3(u.resource())},create(i){const a=i.toBuilder().newId().build(),u=(0,ce.Ay)("POST",this.resourceUrl({}),JSON.stringify(a));u.then(T=>(this.searchJob=py.A.fromJSON(T),this.result=void 0,this.propagateChanges(),T)),tc.create.promise(u)},trackJobStatus(i,a){return new Promise(u=>{i&&i.execution.done?u(new J_.A(i)):u(Z_(250).then(()=>this.jobStatus(i.id)).then(T=>this.trackJobStatus(T,a)))})},run(i,a){return(0,ce.Ay)("POST",this.resourceUrl({segments:[i.id,"execute"]}),JSON.stringify(a))},jobStatus(i){return(0,ce.Ay)("GET",this.resourceUrl({segments:["status",i]}))},trackJob(i,a){return this.run(i,a).then(u=>this.trackJobStatus(u,i))},execute(i){if(this.executePromise&&this.executePromise.cancel(),this.searchJob)return this.executePromise=this.trackJob(this.searchJob,i).then(a=>(this.result=a,this.executePromise=void 0,this.propagateChanges(),a),()=>Re.A.error("Could not execute search")),tc.execute.promise(this.executePromise),this.executePromise;throw new Error("Unable to execute search if no search was created before!")},search(i,a){tc.create(i).then(()=>tc.execute(a))}}));var eC=e("xnXzNzZh"),pp=e("ld8xWljG"),nc={};nc.styleTagTransform=ua(),nc.setAttributes=Ys(),nc.insert=ws().bind(null,"head"),nc.domAPI=As(),nc.insertStyleElement=Ws();var IT=ca()(pp.A,nc);const tC=pp.A&&pp.A.locals?pp.A.locals:void 0;var nC=Object.defineProperty,oC=(i,a,u)=>a in i?nC(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,gp=(i,a,u)=>(oC(i,typeof a!="symbol"?a+"":a,u),u);class Jf extends n.Component{constructor(){super(...arguments),gp(this,"renderMessages",a=>a.map(({index:u,message:T})=>n.createElement("tr",{key:`${u}-${T._id}`},n.createElement("td",null,T.timestamp),n.createElement("td",null,T.message)))),gp(this,"renderSearchResult",(a={})=>!a.messages||a.messages.length===0?n.createElement("p",null,"Could not find any messages with the current search criteria."):n.createElement(Y.Table,{striped:!0,condensed:!0,bordered:!0},n.createElement("thead",null,n.createElement("tr",null,n.createElement("th",null,"Timestamp"),n.createElement("th",null,"Message"))),n.createElement("tbody",null,this.renderMessages(a.messages))))}render(){const{isFetchingData:a,searchResult:u,errors:T,displayPreview:R}=this.props,B=a?n.createElement(be.y$,{text:"Loading filter preview..."}):this.renderSearchResult(u);return n.createElement(n.Fragment,null,n.createElement(eC.A,{collapsible:!0,defaultExpanded:!R,title:"How many Events will Filter & Aggregation create?"},n.createElement("p",null,"The Filter & Aggregation Condition will generate different number of Events, depending on how it is configured:"),n.createElement("ul",null,n.createElement("li",null,n.createElement("b",null,"Filter:"),"\u2003One Event per message matching the filter"),n.createElement("li",null,n.createElement("b",null,"Aggregation without groups:"),"\u2003One Event every time the aggregation result satisfies the condition"),n.createElement("li",null,n.createElement("b",null,"Aggregation with groups:"),"\u2003One Event per group whose aggregation result satisfies the condition"))),R&&n.createElement(Y.Panel,{className:tC.filterPreview,bsStyle:"default"},n.createElement(Y.Panel.Heading,null,n.createElement(Y.Panel.Title,null,"Filter Preview")),n.createElement(Y.Panel.Body,null,T.length>0?n.createElement("p",{className:"text-danger"},T[0].description):B)))}}gp(Jf,"propTypes",{searchResult:l().object,errors:l().array,isFetchingData:l().bool,displayPreview:l().bool}),gp(Jf,"defaultProps",{searchResult:{},errors:[],isFetchingData:!1,displayPreview:!1});const sC=Jf;var aC=Object.defineProperty,rC=(i,a,u)=>a in i?aC(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,gy=(i,a,u)=>(rC(i,typeof a!="symbol"?a+"":a,u),u);const Ey=(i,a)=>{var u;return!((u=a==null?void 0:a.streams)==null?void 0:u.some(R=>!(0,ir.Nn)(i.permissions,`streams:read:${R}`)))};class fy extends n.Component{constructor(a){super(a),gy(this,"fetchSearch",Xf()(u=>{var T,R;const{currentUser:B}=this.props;if(!Ey(B,u))return;const{queryId:F,searchTypeId:$}=this.state,X=((T=u==null?void 0:u.streams)==null?void 0:T.map(fe=>({type:"stream",id:fe})))||[],de=Bl.Ay.builder().id(F).query({type:"elasticsearch",query_string:(u==null?void 0:u.query)||"*"}).timerange({type:"relative",range:((u==null?void 0:u.search_within_ms)||0)/1e3}).filter(X.length===0?null:{type:"or",filters:X}).filters(u.filters).searchTypes([{id:$,type:"messages",limit:10,offset:0}]).build(),ge=py.A.create().toBuilder().parameters(((R=u==null?void 0:u.query_parameters)==null?void 0:R.filter(fe=>!fe.embryonic))||[]).queries([de]).build();tc.search(ge)},250)),this.state={queryId:(0,Dr.A)(),searchTypeId:(0,Dr.A)()}}componentDidMount(){const{eventDefinition:a}=this.props;this.fetchSearch(a.config)}componentDidUpdate(a){const{eventDefinition:u}=this.props,{query:T,query_parameters:R,streams:B,search_within_ms:F}=a.eventDefinition.config,{query:$,query_parameters:X,streams:se,search_within_ms:de}=u.config;($!==T||X!==R||!vs()(se,B)||de!==F)&&this.fetchSearch(u.config)}render(){const{eventDefinition:a,filterPreview:u,currentUser:T}=this.props,{queryId:R,searchTypeId:B}=this.state,F=!u.result||!u.result.forId(R);let $,X;return F||($=u.result.forId(R).searchTypes[B],X=u.result.errors),n.createElement(sC,{eventDefinition:a,isFetchingData:F,displayPreview:Ey(T,a.config),searchResult:$,errors:X})}}gy(fy,"propTypes",{eventDefinition:l().object.isRequired,filterPreview:l().object.isRequired,currentUser:l().object.isRequired});const lC=(0,K.A)(fy,{filterPreview:q_,currentUser:k.y},({currentUser:i,...a})=>({...a,currentUser:i.currentUser}));var iC=e("WgCNywL/"),cC=e.n(iC),uC=e("9kZNWwre"),dC=e("8OvTct/Z"),mC=e("0t7Ye+61");const Ep=()=>({expr:void 0,left:{expr:"number-ref",ref:void 0},right:{expr:"number",value:0}}),hy=({operator:i="&&",left:a=Ep(),right:u=Ep()})=>({expr:i,left:a,right:u}),pC=({operator:i="&&",child:a=Ep()})=>({expr:"group",operator:i,child:a}),fp=(i,a)=>{const u={...a};return(a.expr==="&&"||a.expr==="||")&&(u.expr=i,u.left=fp(i,u.left),u.right=fp(i,u.right)),u};var gC=e("yA/mTvIZ"),Zf=e.n(gC);const hp=(i,a=[])=>i.message?Zf()(a,[i.message]):i.left?Zf()(a,hp(i.left),hp(i.right)):i.child?Zf()(a,hp(i.child)):a,vp=(i,a,u={})=>{switch(i.expr){case"number":return Number.isFinite(i.value)?{}:{message:"Threshold must be a valid number"};case"number-ref":const T={message:"Function must be set"};if(!i.ref)return T;const R=a.find(B=>B.id===i.ref);return(R==null?void 0:R.type)==="percentage"&&(R==null?void 0:R.strategy)==="SUM"&&!(R!=null&&R.field)?{message:"Field must be set"}:!(R!=null&&R.field)&&((R==null?void 0:R.type)==="avg"||(R==null?void 0:R.type)==="card"||(R==null?void 0:R.type)==="latest"||(R==null?void 0:R.type)==="max"||(R==null?void 0:R.type)==="min"||(R==null?void 0:R.type)==="percentile"||(R==null?void 0:R.type)==="stddev"||(R==null?void 0:R.type)==="sum"||(R==null?void 0:R.type)==="sumofsquares"||(R==null?void 0:R.type)==="variance")?{message:"Field must be set"}:R!=null&&R.type?{}:T;case"&&":case"||":case"<":case"<=":case">":case">=":case"==":return{left:vp(i.left,a,u),right:vp(i.right,a,u)};case"group":return{child:vp(i.child,a,u)};default:return{message:"Condition must be set"}}},vy=(i,a)=>{const u={};return i?(u.validationTree=vp(i,a),u.errors=hp(u.validationTree),u.isValid=u.errors.length===0,u):(u.isValid=!0,u)},oc=l().shape({expr:l().string,left:l().object,right:l().object}),EC=l().shape({expr:l().string,value:l().oneOfType([l().number,l().string])}),fC=l().shape({expr:l().string,ref:l().string}),qf=({expression:i,onChange:a,renderLabel:u,validation:T})=>{const R=B=>{const F=Es()(i);F.value=B.target.value===""?"":sn.yG(B.target),a({conditions:F})};return n.createElement(Y.Col,{md:3},n.createElement(Y.Input,{id:"aggregation-threshold",name:"threshold",label:u?"Threshold":"",type:"number",value:Ue()(i,"value"),bsStyle:T.message?"error":null,help:T.message,onChange:R}))};qf.propTypes={expression:EC.isRequired,onChange:l().func.isRequired,renderLabel:l().bool.isRequired,validation:l().object},qf.defaultProps={validation:{}};const hC=qf,vC=i=>i.sort(Sa.j).map(a=>({label:`${a.toLowerCase()}()`,value:a})),yC=i=>{var a;return`${i.type}-${(a=i.field)!=null?a:""}`},eh=({aggregationFunctions:i,formattedFields:a,eventDefinition:u,expression:T,onChange:R,renderLabel:B,validation:F})=>{var $,X;const se=(0,n.useCallback)(Tt=>{var Yt,hn;return(hn=(Yt=u==null?void 0:u.config)==null?void 0:Yt.series)==null?void 0:hn.find(In=>In.id===Tt)},[($=u==null?void 0:u.config)==null?void 0:$.series]),de=(0,n.useCallback)(()=>({id:T.ref}),[T.ref]),ge=(0,n.useCallback)(Tt=>se(Tt)||de(),[de,se]),fe=(0,n.useCallback)((Tt,Yt)=>{var hn;const In=Es()((hn=u==null?void 0:u.config)==null?void 0:hn.series),Qn=Es()(ge(T.ref));Yt!==void 0&&(Qn[Tt]=Yt),Tt==="type"&&Yt!=="percentage"&&delete Qn.strategy,Tt==="type"&&Yt!=="percentage"&&delete Qn.percentile;const to=yC(Qn);Qn.id=to;const Vo=In.findIndex(is=>is.id===Qn.id);Vo>=0?In[Vo]=Qn:In.push(Qn);const Mo=Es()(T);Mo.ref=to,R({series:In,conditions:Mo})},[(X=u==null?void 0:u.config)==null?void 0:X.series,T,ge,R]),We=(0,n.useCallback)(Tt=>{fe("type",Tt)},[fe]),lt=(0,n.useCallback)(Tt=>{fe("field",Tt)},[fe]),it=se(T.ref)||{},yt=["percentage","percentile"].includes(it.type)?3:2;return n.createElement(Y.Col,{md:6},n.createElement(Y.FormGroup,{controlId:"aggregation-function",validationState:F.message?"error":null},B&&n.createElement(Y.ControlLabel,null,"If"),n.createElement(Y.Row,{className:"row-sm"},n.createElement(Y.Col,{md:12/yt},n.createElement(be.l6,{className:"aggregation-function",matchProp:"label",placeholder:"Select Function",onChange:We,options:vC(i),clearable:!1,value:it.type})),it.type==="percentage"&&n.createElement(Y.Col,{md:12/yt},n.createElement(be.l6,{className:"aggregation-function-strategy",matchProp:"label",placeholder:"Select Strategy (Optional)",onChange:Tt=>fe("strategy",Tt),options:$t.gC,value:it.strategy})),n.createElement(Y.Col,{md:12/yt},n.createElement(be.l6,{className:"aggregation-function-field",ignoreAccents:!1,matchProp:"label",placeholder:"Select Field (Optional)",onChange:lt,options:a,value:it.field,allowCreate:!0})),it.type==="percentile"&&n.createElement(Y.Col,{md:12/yt},n.createElement(be.l6,{className:"aggregation-function-percentile",placeholder:"Select Percentile",onChange:Tt=>fe("percentile",Tt),options:$t.Iv,value:it.percentile}))),F.message&&n.createElement(Y.HelpBlock,null,F.message)))};eh.propTypes={aggregationFunctions:l().array.isRequired,eventDefinition:l().object.isRequired,expression:fC.isRequired,formattedFields:l().array.isRequired,onChange:l().func.isRequired,renderLabel:l().bool.isRequired,validation:l().object},eh.defaultProps={validation:{}};const AC=eh,_C=m.default.div(({theme:i})=>(0,m.css)` margin-bottom: 15px; font-size: ${i.fonts.size.body}; `),CC=(0,m.default)(({isFirstElement:i,...a})=>n.createElement(Y.FormGroup,{...a}))` width: 100px; margin-left: ${i=>i.isFirstElement?"":"1em"}; margin-right: 1em; `,th=({initialText:i,operator:a,onOperatorChange:u})=>n.createElement(Y.Col,{md:12},n.createElement(_C,{className:"form-inline"},i&&n.createElement(Y.FormGroup,null,n.createElement(Y.FormControl.Static,null,i," ")),n.createElement(CC,{isFirstElement:!i},n.createElement(be.l6,{className:"boolean-operator",matchProp:"label","aria-label":"Boolean Operator",size:"small",onChange:u,options:[{label:"all",value:"&&"},{label:"any",value:"||"}],value:a,clearable:!1})),n.createElement(Y.FormGroup,null,n.createElement(Y.FormControl.Static,null," of the following rules:"))));th.propTypes={initialText:l().string,operator:l().string.isRequired,onOperatorChange:l().func.isRequired},th.defaultProps={initialText:""};const yy=th,nh=i=>{const{expression:a,level:u,onChildChange:T,validation:R}=i;return n.createElement(n.Fragment,null,n.createElement(ac,{...i,expression:a.left,validation:R.left,parent:a,onChange:T("left"),level:u+1}),n.createElement(Y.Clearfix,null),n.createElement(ac,{...i,expression:a.right,validation:R.right,parent:a,onChange:T("right"),level:u+1,renderLabel:!1}))};nh.propTypes={expression:oc.isRequired,parent:oc,level:l().number.isRequired,onChange:l().func.isRequired,onChildChange:l().func.isRequired,validation:l().object},nh.defaultProps={parent:void 0,validation:{}};const TC=nh,oh=i=>{const{expression:a,level:u,onChildChange:T,onChange:R,renderLabel:B,validation:F}=i,$=X=>{const se=Es()(a);se.expr=X,R({conditions:se})};return n.createElement(Y.Col,{md:10},n.createElement(Y.Row,{className:"row-sm"},n.createElement(ac,{...i,expression:a.left,validation:F.left,parent:a,onChange:T("left"),level:u+1}),n.createElement(Y.Col,{md:3},n.createElement(Y.FormGroup,{controlId:"aggregation-condition",validationState:F.message?"error":null},B&&n.createElement(Y.ControlLabel,null,"Is"),n.createElement(be.l6,{id:"aggregation-condition",matchProp:"label",placeholder:"Select Condition",onChange:$,options:[{label:"<",value:"<"},{label:"<=",value:"<="},{label:">",value:">"},{label:">=",value:">="},{label:"=",value:"=="}],value:a.expr,clearable:!1}),F.message&&n.createElement(Y.HelpBlock,null,F.message))),n.createElement(ac,{...i,expression:a.right,validation:F.right,parent:a,onChange:T("right"),level:u+1})))};oh.propTypes={expression:oc.isRequired,level:l().number.isRequired,onChange:l().func.isRequired,onChildChange:l().func.isRequired,renderLabel:l().bool.isRequired,validation:l().object},oh.defaultProps={validation:{}};const bC=oh,SC=m.default.div` padding-left: 40px; `,sh=i=>{const{expression:a,level:u,onChange:T,onChildChange:R,validation:B}=i,F=$=>{const X=Es()(a);X.operator=$,X.child=fp($,X.child),T({conditions:X})};return n.createElement(n.Fragment,null,n.createElement(yy,{operator:a.operator,onOperatorChange:F}),n.createElement(Y.Clearfix,null),n.createElement(SC,null,n.createElement(ac,{...i,expression:a.child,validation:B.child,parent:a,onChange:R("child"),level:u+1})))};sh.propTypes={expression:oc.isRequired,level:l().number.isRequired,onChange:l().func.isRequired,onChildChange:l().func.isRequired,validation:l().object},sh.defaultProps={validation:{}};const PC=sh;var yp=e("FvcXAh9q"),sc={};sc.styleTagTransform=ua(),sc.setAttributes=Ys(),sc.insert=ws().bind(null,"head"),sc.domAPI=As(),sc.insertStyleElement=Ws();var xT=ca()(yp.A,sc);const DC=yp.A&&yp.A.locals?yp.A.locals:void 0;var OC=Object.defineProperty,RC=(i,a,u)=>a in i?OC(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,Lr=(i,a,u)=>(RC(i,typeof a!="symbol"?a+"":a,u),u);class ah extends n.Component{constructor(a){super(a),Lr(this,"getEffectiveGlobalGroupOperator",()=>{const{globalGroupOperator:u}=this.state;if(u)return u;const{expression:T}=this.props;return T.expr==="&&"||T.expr==="||"?T.expr:"&&"}),Lr(this,"getBooleanOperator",(u,T)=>{if(!u)return T;const R=u.expr==="group"?"operator":"expr";return Ue()(u,R,T)==="&&"?"&&":"||"}),Lr(this,"handleAddExpression",()=>{const{expression:u,onChange:T,parent:R}=this.props,B=this.getEffectiveGlobalGroupOperator(),F=this.getBooleanOperator(R,B),$=hy({operator:F,left:u});T({conditions:$})}),Lr(this,"handleAddGroup",()=>{const{expression:u,onChange:T,parent:R}=this.props,B=this.getEffectiveGlobalGroupOperator(),F=this.getBooleanOperator(R,B),X=pC({operator:F==="&&"?"||":"&&"}),se=hy({operator:F,left:u,right:X});T({conditions:se})}),Lr(this,"handleDeleteExpression",()=>{const{onChange:u}=this.props;u({conditions:null})}),Lr(this,"handleChildChange",u=>T=>{const{expression:R,onChange:B}=this.props;if(!Object.keys(T).includes("conditions")){B(T);return}const F=T.conditions;let $;if(F===null)u==="child"?$=null:$=R[u==="left"?"right":"left"];else if(u==="child"&&F.expr==="group")$=F;else{const X=Es()(R);X[u]=F,$=X}B({...T,conditions:$})}),Lr(this,"handleOperatorChange",u=>{const{expression:T,onChange:R}=this.props;this.setState({globalGroupOperator:u});const B=fp(u,T);R({conditions:B})}),this.state={globalGroupOperator:void 0}}render(){const{expression:a,parent:u,renderLabel:T}=this.props;let R;switch(a.expr){case"number-ref":R=n.createElement(AC,{...this.props,parent:u});break;case"number":R=n.createElement(hC,{...this.props,parent:u});break;case"group":R=n.createElement(PC,{...this.props,onChildChange:this.handleChildChange,parent:u});break;case"&&":case"||":R=n.createElement(TC,{...this.props,onChildChange:this.handleChildChange,parent:u});break;case"<":case"<=":case">":case">=":case"==":default:R=n.createElement(n.Fragment,null,n.createElement(bC,{...this.props,onChildChange:this.handleChildChange,parent:u}),n.createElement(Y.Col,{md:2},n.createElement(Y.FormGroup,null,n.createElement("div",{className:T?DC.formControlNoLabel:void 0},n.createElement(Y.ButtonToolbar,null,n.createElement(Y.Button,{bsSize:"sm",onClick:this.handleDeleteExpression,title:"Delete Expression"},n.createElement(be.In,{name:"remove"})),n.createElement(Y.Button,{bsSize:"sm",onClick:this.handleAddExpression,title:"Add Expression"},n.createElement(be.In,{name:"add"})),n.createElement(Y.Button,{bsSize:"sm",onClick:this.handleAddGroup},"Add Group"))))))}return!u&&a.expr!=="group"?n.createElement(n.Fragment,null,n.createElement(yy,{initialText:"Messages must meet",operator:this.getEffectiveGlobalGroupOperator(),onOperatorChange:this.handleOperatorChange}),n.createElement(Y.Clearfix,null),R):R}}Lr(ah,"propTypes",{eventDefinition:l().object.isRequired,validation:l().object,formattedFields:l().array.isRequired,aggregationFunctions:l().array.isRequired,onChange:l().func.isRequired,expression:oc.isRequired,parent:oc,level:l().number,renderLabel:l().bool}),Lr(ah,"defaultProps",{level:0,parent:void 0,renderLabel:!0,validation:{}});const ac=ah,il=({expression:i,series:a})=>{if(!i)return"No condition configured";switch(i.expr){case"number":return i.value;case"number-ref":const u=a.find(T=>T.id===i.ref);return u&&u.type?n.createElement("var",null,u.type,"(",u.strategy?`${u.strategy}, `:null,u.field,u.percentile?`, ${u.percentile}`:null,")"):n.createElement("span",null,"No series selected");case"&&":case"||":return n.createElement(n.Fragment,null,n.createElement(il,{expression:i.left,series:a})," ",n.createElement("strong",{className:"text-info"},i.expr==="&&"?"AND":"OR")," ",n.createElement(il,{expression:i.right,series:a}));case"group":return n.createElement("span",null,"[",n.createElement(il,{expression:i.child,series:a}),"]");case"<":case"<=":case">":case">=":case"==":return n.createElement(n.Fragment,null,n.createElement(il,{expression:i.left,series:a})," ",n.createElement("strong",{className:"text-primary"},i.expr," "),n.createElement(il,{expression:i.right,series:a}));default:return"No condition configured"}};il.propTypes={expression:l().object,series:l().array.isRequired},il.defaultProps={expression:null};const Ay=({conditions:i,series:a})=>n.createElement(il,{expression:i==null?void 0:i.expression,series:a});Ay.propTypes={conditions:l().object.isRequired,series:l().array.isRequired};const _y=Ay,IC=(0,m.default)(Y.Panel)` margin-top: 10px; `,MC=(0,m.default)(Y.Button)` margin-left: 15px; vertical-align: baseline; `,rh=i=>{const{conditions:a,series:u,expressionValidation:T,showInlineValidation:R,toggleShowValidation:B}=i;return n.createElement("div",null,n.createElement(IC,{header:"Condition summary"},T.isValid?n.createElement("p",{className:"text-success"},n.createElement(be.In,{name:"check_box"}),"\xA0Condition is valid"):n.createElement("p",{className:"text-danger"},n.createElement(be.In,{name:"warning"}),"\xA0Condition is not valid",n.createElement(MC,{bsSize:"xsmall",onClick:B},R?"Hide errors":"Show errors")),n.createElement("b",null,"Preview:")," ",n.createElement(_y,{series:u,conditions:a})))};rh.propTypes={conditions:l().object.isRequired,series:l().array.isRequired,expressionValidation:l().object,showInlineValidation:l().bool,toggleShowValidation:l().func.isRequired},rh.defaultProps={expressionValidation:{isValid:!0},showInlineValidation:!1};const xC=rh;var Cy=e("9O66OgQd"),LC=Object.defineProperty,BC=(i,a,u)=>a in i?LC(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,lh=(i,a,u)=>(BC(i,typeof a!="symbol"?a+"":a,u),u);const UC=Ep(),Ap=(i,a=[])=>(i.expr==="number-ref"&&a.push(i.ref),i.left&&i.right?Ap(i.left).concat(Ap(i.right)):i.child?Ap(i.child):a),NC=(0,m.default)(Y.Alert)` margin-bottom: 10px !important; `;class Ty extends n.Component{constructor(a){super(a),lh(this,"toggleShowInlineValidation",()=>{const{showInlineValidation:u}=this.state;this.setState({showInlineValidation:!u})}),lh(this,"handleChange",u=>{var T,R;const{eventDefinition:B,onChange:F}=this.props;if(!Object.keys(u).includes("conditions")){F(u);return}const $=u.conditions;let X;if($){const se=Ap($);X=((R=u.series||((T=B==null?void 0:B.config)==null?void 0:T.series))==null?void 0:R.filter(de=>se.includes(de.id)))||[]}else X=[];F({...u,conditions:{expression:$},series:X})}),this.state={showInlineValidation:!1}}render(){var a,u,T,R,B;const{showInlineValidation:F}=this.state,{eventDefinition:$,validation:X}=this.props,se=((u=(a=$==null?void 0:$.config)==null?void 0:a.conditions)==null?void 0:u.expression)||UC,de=vy(se,((T=$==null?void 0:$.config)==null?void 0:T.series)||[]);return n.createElement(n.Fragment,null,n.createElement("h3",{className:Cy.A.title},"Create Events for Definition"),X.errors.conditions&&n.createElement(NC,{bsStyle:"danger",title:"Errors found"},n.createElement("p",null,Ue()(X,"errors.conditions[0]"))),n.createElement(Y.Row,null,n.createElement(ac,{expression:se,...this.props,validation:F?de.validationTree:{},onChange:this.handleChange})),n.createElement(xC,{conditions:((R=$==null?void 0:$.config)==null?void 0:R.conditions)||{},series:((B=$==null?void 0:$.config)==null?void 0:B.series)||[],expressionValidation:de,showInlineValidation:F,toggleShowValidation:this.toggleShowInlineValidation}))}}lh(Ty,"propTypes",{eventDefinition:l().object.isRequired,validation:l().object.isRequired,formattedFields:l().array.isRequired,aggregationFunctions:l().array.isRequired,onChange:l().func.isRequired});const wC=Ty,by=({aggregationFunctions:i,eventDefinition:a,validation:u,onChange:T})=>{var R,B;const{data:F}=(0,uC.A)((B=(R=a==null?void 0:a.config)==null?void 0:R.streams)!=null?B:[],$t.iC),$=(0,n.useMemo)(()=>(F!=null?F:[]).sort((fe,We)=>(0,Sa.j)(fe.name,We.name)).map(fe=>({label:`${fe.name} \u2013 ${fe.value.type.type}`,value:fe.name})),[F]),{pathname:X}=(0,mC.A)(),se=(0,dC.A)(),de=(0,n.useCallback)(fe=>{const We={...a.config,...fe};T("config",We)},[a.config,T]),ge=(0,n.useCallback)(fe=>{const We=fe===""?[]:fe.split(",");se(Jm.g.EVENTDEFINITION_CONDITION.AGGREGATION_GROUP_BY_FIELD_SELECTED,{app_pathname:(0,I.i)(X),app_section:"event-definition-condition",app_action_value:"group-by-field-select",selection_count:We.length}),de({group_by:We})},[X,de,se]);return n.createElement("fieldset",null,n.createElement("h2",{className:Cy.A.title},"Aggregation"),n.createElement("p",null,"Summarize log messages matching the Filter defined above by using a function. You can optionally group the Filter results by identical field values."),n.createElement(Y.Row,null,n.createElement(Y.Col,{lg:7},n.createElement(Y.FormGroup,{controlId:"group-by"},n.createElement(Y.ControlLabel,null,"Group by Field(s) ",n.createElement("small",{className:"text-muted"},"(Optional)")),n.createElement(be.KF,{id:"group-by",matchProp:"label",onChange:ge,options:$,ignoreAccents:!1,value:cC()(a.config.group_by,[]).join(","),allowCreate:!0}),n.createElement(Y.HelpBlock,null,"Select Fields that Graylog should use to group Filter results when they have identical values."," ",n.createElement("b",null,"Example:"),n.createElement("br",null),"Assuming you created a Filter with all failed log-in attempts in your network, Graylog could alert you when there are more than 5 failed log-in attempts overall. Now, add ",n.createElement("code",null,"username")," as Group by Field and Graylog will alert you ",n.createElement("em",null,"for each ",n.createElement("code",null,"username"))," with more than 5 failed log-in attempts.")))),n.createElement("hr",null),n.createElement(wC,{eventDefinition:a,validation:u,formattedFields:$,aggregationFunctions:i,onChange:de}))};by.propTypes={eventDefinition:l().object.isRequired,validation:l().object.isRequired,aggregationFunctions:l().array.isRequired,onChange:l().func.isRequired};const WC=by;var FC=Object.defineProperty,KC=(i,a,u)=>a in i?FC(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,$u=(i,a,u)=>(KC(i,typeof a!="symbol"?a+"":a,u),u);const Br={AGGREGATION:0,FILTER:1},$C={query:"",query_parameters:[],streams:[],filters:[],search_within_ms:5*60*1e3,execute_every_ms:5*60*1e3,_is_scheduled:!0,event_limit:100},ih={group_by:[],series:[],conditions:{}};class ch extends n.Component{constructor(a){super(a),$u(this,"handleConfigChange",$=>{const X=Es()(this.props.eventDefinition.config);X[$.target.name]=sn.yG($.target),this.propagateConfigChange(X)}),$u(this,"propagateConfigChange",$=>{this.props.onChange("config",$)}),$u(this,"handleTypeChange",$=>{const X={},se=Number(sn.yG($.target));if(X[$.target.name]=se,se===Br.FILTER){const{eventDefinition:de}=this.props,ge={};Object.keys(ih).forEach(We=>{ge[We]=de.config[We]}),X.existingAggregationConfig=ge;const fe={...de.config,...ih};this.propagateConfigChange(fe)}else{const{existingAggregationConfig:de}=this.state;if(de){const{eventDefinition:ge}=this.props,fe={...ge.config,...de};this.propagateConfigChange(fe),X.existingAggregationConfig=void 0}}this.setState(X)});const{group_by:u,series:T,conditions:R}=a.eventDefinition.config,B=Ue()(R,"expression",{}),F=xs()(u)&&xs()(T)&&xs()(B)?Br.FILTER:Br.AGGREGATION;this.state={conditionType:F}}render(){const{conditionType:a}=this.state,{entityTypes:u,eventDefinition:T,streams:R,validation:B,currentUser:F}=this.props,$=T._scope==="ILLUMINATE";return n.createElement(n.Fragment,null,n.createElement(Y.Row,null,n.createElement(Y.Col,{md:7,lg:6},n.createElement(Yf.Ay,{eventDefinition:T,validation:B,streams:R.filter(X=>X.is_editable),currentUser:F,onChange:this.props.onChange}),$||n.createElement(Y.FormGroup,null,n.createElement(Y.ControlLabel,null,"Create Events for Definition if..."),n.createElement(Y.Radio,{id:"filter-type",name:"conditionType",value:Br.FILTER,checked:a===Br.FILTER,onChange:this.handleTypeChange},"Filter has results"),n.createElement(Y.Radio,{id:"aggregation-type",name:"conditionType",value:Br.AGGREGATION,checked:a===Br.AGGREGATION,onChange:this.handleTypeChange},"Aggregation of results reaches a threshold")),a===Br.FILTER&&!$&&n.createElement(Y.Row,null,n.createElement(Y.Col,{md:12},n.createElement(Y.Input,{id:"event-limit",name:"event_limit",label:"Event Limit",type:"number",bsStyle:B.errors.event_limit?"error":null,help:Ue()(B,"errors.event_limit","Maximum number of events to be created."),value:T.config.event_limit,onChange:this.handleConfigChange,required:!0})))),n.createElement(Y.Col,{md:5,lgOffset:1},n.createElement(lC,{eventDefinition:T}))),a===Br.AGGREGATION&&!$&&n.createElement(Y.Row,null,n.createElement(Y.Col,{md:12},n.createElement(WC,{eventDefinition:T,validation:B,aggregationFunctions:u.aggregation_functions,onChange:this.props.onChange}))))}}$u(ch,"propTypes",{eventDefinition:l().object.isRequired,validation:l().object.isRequired,entityTypes:l().object.isRequired,streams:l().array.isRequired,onChange:l().func.isRequired,currentUser:l().object.isRequired}),$u(ch,"defaultConfig",{...$C,...ih});const Sy=ch;var GC=e("pUKP3+Pg");function Py(i,a=[]){const u=i.displayName||i.name||"Component";class T extends n.Component{constructor(B){super(B),this.state={streams:void 0}}componentDidMount(){GC.hZ.load(B=>{let F=B.filter($=>$.is_editable);a.length!==0&&(F=B.filter($=>!a.includes($.id))),this.setState({streams:F})})}render(){const{streams:B}=this.state;return B?n.createElement(i,{streams:B,...this.props}):n.createElement(be.y$,{text:"Loading Streams Information..."})}}return T.displayName=`withStreams(${u})`,T}const Dy=i=>n.createElement(k_.A,null,n.createElement(Sy,{...i}));Dy.propTypes={action:l().oneOf(["create","edit"]).isRequired,validation:l().object.isRequired,eventDefinition:l().object.isRequired,onChange:l().func.isRequired,currentUser:l().object.isRequired};const jC=Py(Dy);var HC=e("Dg7SLLbb"),zC=e.n(HC),Oy=e("ATOIS62c"),VC=e("1/PeS1Oa"),_p=e("0dxeJt3g"),rc={};rc.styleTagTransform=ua(),rc.setAttributes=Ys(),rc.insert=ws().bind(null,"head"),rc.domAPI=As(),rc.insertStyleElement=Ws();var LT=ca()(_p.A,rc);const kC=_p.A&&_p.A.locals?_p.A.locals:void 0;var QC=e("dlIR0k67"),YC=Object.defineProperty,XC=(i,a,u)=>a in i?YC(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,uh=(i,a,u)=>(XC(i,typeof a!="symbol"?a+"":a,u),u);const JC=i=>typeof i=="string"?n.createElement("span",{key:i},n.createElement("em",null,i)):n.createElement("span",{key:i.id},n.createElement(jl.N,{to:ke.Ay.stream_search(i.id)},i.title)),ZC=i=>{const{group_by:a,series:u,conditions:T}=i;return xs()(a)&&(!T||xs()(T)||T.expression===null)&&xs()(u)?"filter":"aggregation"},qC=i=>{if(i.some(a=>a.embryonic)){const a=i.filter(u=>u.embryonic).map(u=>u.name).join(", ");return n.createElement(Y.Alert,{bsStyle:"danger"},"There are undeclared query parameters: ",a)}return n.createElement("dd",null,i.map(a=>a.name).join(", "))};class Ry extends n.Component{constructor(){super(...arguments),uh(this,"renderStreams",(a,u)=>{const{streams:T}=this.props;if((!a||a.length===0)&&u.length<=0)return"No Streams selected, searches in all Streams";const R=u.length>0?n.createElement(Y.Alert,{bsStyle:"warning"},"Missing Stream Permissions for:",n.createElement("br",null),u.join(", ")):null,B=a.map(F=>T.find($=>$.id===F)||F).sort((F,$)=>(0,VC.m)(F.title||F,$.title||$)).map(JC);return n.createElement(n.Fragment,null,R,B)}),uh(this,"renderSearchFilters",()=>{const{filters:a}=this.props.config;return!a||a.length===0?n.createElement("dd",null,"No filters configured"):n.createElement("dd",null,a.map(u=>n.createElement("div",{key:u.id},u.title?`${u.title} -> `:null,n.createElement("code",null,u.queryString))))})}render(){const{config:a,currentUser:u}=this.props,{query:T,query_parameters:R,streams:B,search_within_ms:F,execute_every_ms:$,_is_scheduled:X,event_limit:se,group_by:de,series:ge,conditions:fe}=a,We=ZC(a),lt=(0,Oy.z)(F,Yf.SY),it=(0,Oy.z)($,Yf.SY),yt=B==null?void 0:B.filter(hn=>(0,ir.Nn)(u.permissions,`streams:read:${hn}`)),Tt=B==null?void 0:B.filter(hn=>!yt.includes(hn)),Yt=vy(fe.expression,ge);return n.createElement("dl",null,n.createElement("dt",null,"Type"),n.createElement("dd",null,zC()(We)),n.createElement("dt",null,"Search Query"),n.createElement("dd",null,T||"*"),R.length>0&&qC(R),n.createElement("dt",null,"Search Filters"),this.renderSearchFilters(),n.createElement("dt",null,"Streams"),n.createElement("dd",{className:kC.streamList},this.renderStreams(yt,Tt)),n.createElement("dt",null,"Search within"),n.createElement("dd",null,lt.duration," ",lt.unit.toLowerCase()),n.createElement("dt",null,"Execute search every"),n.createElement("dd",null,it.duration," ",it.unit.toLowerCase()),n.createElement("dt",null,"Enable scheduling"),n.createElement("dd",null,X?"yes":"no"),We==="filter"&&n.createElement(n.Fragment,null,n.createElement("dt",null,"Event limit"),n.createElement("dd",null,se)),We==="aggregation"&&n.createElement(n.Fragment,null,n.createElement("dt",null,"Group by Field(s)"),n.createElement("dd",null,de&&de.length>0?de.join(", "):"No Group by configured"),n.createElement("dt",null,"Create Events if"),n.createElement("dd",null,Yt.isValid?n.createElement(_y,{series:ge,conditions:fe}):n.createElement(Y.Alert,{bsSize:"small",bsStyle:"danger"},"Condition is not valid: ",Yt.errors.join(", ")))),n.createElement("dt",null,"Actions"),n.createElement("dd",null,n.createElement(QC.A,null)))}}uh(Ry,"propTypes",{config:l().object.isRequired,currentUser:l().object.isRequired,streams:l().array.isRequired});const e0=Py(Ry),t0={eventDefinitionTypes:[{type:"aggregation-v1",displayName:"Filter & Aggregation",sortOrder:0,description:"Create Events from log messages by filtering them and (optionally) aggregating their results to match a given condition. These Events can be used as input for a Correlation Rule.",formComponent:jC,summaryComponent:e0,defaultConfig:Sy.defaultConfig}]};var Cp=e("iDhuQQu3"),n0=e("92lPlKXC");const Iy=i=>{const a=(0,n.useRef)();return n.createElement(tr.A,{ref:a,async:!0,...i})};Iy.propTypes=tr.A.propTypes;const o0=Iy,My={page:1,perPage:50,query:"",total:0},s0=i=>i.map(a=>({label:`${a.username} (${a.fullName})`,value:a.username})),xy=({value:i,onChange:a})=>{const u=(0,Hi.A)(),[T,R]=(0,n.useState)(),[B,F]=(0,n.useState)(!1),[$,X]=(0,n.useState)(!1),se=(0,n.useCallback)((it=My)=>{if((0,ir.Nn)(u.permissions,"users:list"))return F(!0),n0.A.loadUsersPaginated(it).then(yt=>(F(!1),yt))},[u.permissions]),de=(it,yt="")=>{se({...it,page:it.page+1,query:yt}).then(Tt=>{R(Yt=>{const hn=Yt.list.concat(Tt.list),In={...Yt.pagination,...Tt.pagination};return{...Yt,list:hn,pagination:In}})})},ge=Xf()(()=>{const{pagination:it,pagination:{total:yt},list:Tt}=T;yt>Tt.count()&&de(it)},400);(0,n.useEffect)(()=>{T||se().then(R)},[]);const fe=Xf()((it,yt)=>{yt.action==="input-change"?(X(!0),se({...My,query:it}).then(Tt=>{X(!0),R(Tt)})):yt.action==="menu-close"&&se().then(R)},400);if(!T)return n.createElement("p",null,n.createElement(be.y$,{text:"Loading User select..."}));const{list:We,pagination:{total:lt}}=T;return n.createElement(o0,{id:"user-select-list",value:i,placeholder:"Select user(s)...",options:s0(We.toArray()),onInputChange:fe,loadOptions:B||$?()=>{}:ge,multi:!0,total:lt,onChange:a})};xy.propTypes={};const a0=xy;var r0=e("8wYeYPUw"),l0=Object.defineProperty,i0=(i,a,u)=>a in i?l0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,Bs=(i,a,u)=>(i0(i,typeof a!="symbol"?a+"":a,u),u);const c0=`--- [Event Definition] --------------------------- Title: \${event_definition_title} Description: \${event_definition_description} Type: \${event_definition_type} --- [Event] -------------------------------------- Alert Replay: \${http_external_uri}alerts/\${event.id}/replay-search Timestamp: \${event.timestamp} Message: \${event.message} Source: \${event.source} Key: \${event.key} Priority: \${event.priority} Alert: \${event.alert} Timestamp Processing: \${event.timestamp} Timerange Start: \${event.timerange_start} Timerange End: \${event.timerange_end} Fields: \${foreach event.fields field} \${field.key}: \${field.value} \${end} \${if backlog} --- [Backlog] ------------------------------------ Last messages accounting for this alert: \${foreach backlog message} \${message} \${end} \${end} `,u0=`
Event Definition
Title\${event_definition_title}
Description\${event_definition_description}
Type\${event_definition_type}

Event
Alert Replay\${http_external_uri}alerts/\${event.id}/replay-search
Timestamp\${event.timestamp}
Message\${event.message}
Source\${event.source}
Key\${event.key}
Priority\${event.priority}
Alert\${event.alert}
Timestamp Processing\${event.timestamp}
Timerange Start\${event.timerange_start}
Timerange End\${event.timerange_end}
Source Streams\${event.source_streams}
Fields
    \${foreach event.fields field}
  • \${field.key}:\${field.value}
  • \${end}
    \${if backlog}
    \${foreach backlog message} \${end}
    Backlog (Last messages accounting for this alert)
    \${message}
    \${end} `;class dh extends n.Component{constructor(){super(...arguments),Bs(this,"propagateChange",(a,u)=>{const{config:T,onChange:R}=this.props,B=Es()(T);B[a]=u,R(B)}),Bs(this,"handleChange",a=>{const{name:u}=a.target;this.propagateChange(u,(0,sn.yG)(a.target))}),Bs(this,"handleSelectChange",(a,u)=>{this.propagateChange(a,u)}),Bs(this,"handleTimeZoneChange",a=>{this.propagateChange("time_zone",a)}),Bs(this,"handleUseRecipientLookupChange",a=>{const{config:u,onChange:T}=this.props,R=Es()(u),B=(0,sn.yG)(a.target);R.lookup_recipient_emails=B,B?R.email_recipients=[]:(R.recipients_lut_name=null,R.recipients_lut_key=null),T(R)}),Bs(this,"handleUseReplyToLookupChange",a=>{const{config:u,onChange:T}=this.props,R=Es()(u),B=(0,sn.yG)(a.target);R.lookup_reply_to_email=B,B?R.reply_to="":(R.reply_to_lut_name=null,R.reply_to_lut_key=null),T(R)}),Bs(this,"handleUseSenderLookupChange",a=>{const{config:u,onChange:T}=this.props,R=Es()(u),B=(0,sn.yG)(a.target);R.lookup_sender_email=B,B?R.sender="":(R.sender_lut_name=null,R.sender_lut_key=null),T(R)}),Bs(this,"handleBodyTemplateChange",a=>{this.propagateChange("body_template",a)}),Bs(this,"handleHtmlBodyTemplateChange",a=>{this.propagateChange("html_body_template",a)}),Bs(this,"handleRecipientsChange",a=>u=>this.propagateChange(a,u===""?[]:u.split(","))),Bs(this,"emailRecipientsFormGroup",()=>{const{config:a,validation:u}=this.props;return n.createElement(Y.FormGroup,{controlId:"notification-email-recipients",validationState:u.errors.recipients?"error":null},n.createElement(Y.ControlLabel,null,"Email recipient(s) ",n.createElement("small",{className:"text-muted"},"(Optional)")),n.createElement(be.KF,{id:"notification-email-recipients",value:Array.isArray(a.email_recipients)?a.email_recipients.join(","):"",addLabelText:'Add email "{label}"?',placeholder:"Type email address",options:[],onChange:this.handleRecipientsChange("email_recipients"),allowCreate:!0}),n.createElement(Y.HelpBlock,null,Ue()(u,"errors.recipients[0]","Add email addresses that will receive this Notification.")))}),Bs(this,"emailLookupFormGroup",()=>{const{config:a,validation:u}=this.props,R=n.createElement(Y.Input,{id:"recipients-table-key",name:"recipients_lut_key",label:"Recipients Lookup Table Key",type:"text",placeholder:"${event.group_by_fields.group_by_field}",bsStyle:u.errors.recipients_lut_key?"error":null,help:Ue()(u,"errors.recipients_lut_key[0]","Event Field name whose value will be used as Lookup Table Key."),value:a.recipients_lut_key||"",onChange:this.handleChange,required:!0});return n.createElement(Cp.WY,{onTableNameChange:B=>this.handleSelectChange("recipients_lut_name",B),onKeyChange:B=>this.handleSelectChange("recipients_lut_key",B),selectedTableName:a.recipients_lut_name||"",selectedKeyName:a.recipients_lut_key||"",nameValidation:u.errors.recipients_lut_name,keyValidation:u.errors.recipients_lut_key,lookupTableNameLabel:"Recipients Lookup Table Name",customKeyField:R})}),Bs(this,"senderInput",()=>{const{config:a,validation:u}=this.props;return n.createElement(Y.Input,{id:"notification-sender",name:"sender",label:n.createElement(Y.ControlLabel,null,"Sender ",n.createElement("small",{className:"text-muted"},"(Optional)")),type:"text",bsStyle:u.errors.sender?"error":null,help:Ue()(u,"errors.sender[0]","The email address that should be used as the notification sender. Leave it empty to use the default sender address."),value:a.sender||"",onChange:this.handleChange})}),Bs(this,"senderLookupFormGroup",()=>{const{config:a,validation:u}=this.props,R=n.createElement(Y.Input,{id:"sender-lookup-table-key",name:"sender_lut_key",label:"Sender Lookup Table Key",type:"text",placeholder:"${event.group_by_fields.group_by_field}",bsStyle:u.errors.sender_lut_key?"error":null,help:Ue()(u,"errors.sender_lut_key[0]","Event Field name whose value will be used as Lookup Table Key."),value:a.sender_lut_key||"",onChange:this.handleChange,required:!0});return n.createElement(Cp.WY,{onTableNameChange:B=>this.handleSelectChange("sender_lut_name",B),onKeyChange:B=>this.handleSelectChange("sender_lut_key",B),selectedTableName:a.sender_lut_name||"",selectedKeyName:a.sender_lut_key||"",nameValidation:u.errors.sender_lut_name,keyValidation:u.errors.sender_lut_key,lookupTableNameLabel:"Sender Lookup Table Name",customKeyField:R})}),Bs(this,"replyToInput",()=>{const{config:a,validation:u}=this.props;return n.createElement(Y.Input,{id:"notification-replyto",name:"reply_to",label:"Reply-To (Optional)",type:"text",bsStyle:u.errors.replyto?"error":null,help:Ue()(u,"errors.reply_to[0]","The email address that recipients should use for replies."),value:a.reply_to||"",onChange:this.handleChange})}),Bs(this,"replyToLookupFormGroup",()=>{const{config:a,validation:u}=this.props,R=n.createElement(Y.Input,{id:"reply-to-lookup-table-key",name:"reply_to_lut_key",label:"Reply To Lookup Table Key",type:"text",placeholder:"${event.group_by_fields.group_by_field}",bsStyle:u.errors.reply_to_lut_key?"error":null,help:Ue()(u,"errors.reply_to_lut_key[0]","Event Field name whose value will be used as Lookup Table Key."),value:a.reply_to_lut_key||"",onChange:this.handleChange,required:!0});return n.createElement(Cp.WY,{onTableNameChange:B=>this.handleSelectChange("reply_to_lut_name",B),onKeyChange:B=>this.handleSelectChange("reply_to_lut_key",B),selectedTableName:a.reply_to_lut_name||"",selectedKeyName:a.reply_to_lut_key||"",nameValidation:u.errors.reply_to_lut_name,keyValidation:u.errors.reply_to_lut_key,lookupTableNameLabel:"Reply To Lookup Table Name",customKeyField:R})})}render(){const{config:a,validation:u}=this.props;return n.createElement(n.Fragment,null,n.createElement(Y.Input,{id:"notification-subject",name:"subject",label:"Subject",type:"text",bsStyle:u.errors.subject?"error":null,help:Ue()(u,"errors.subject[0]","The subject that should be used for the email notification."),value:a.subject||"",onChange:this.handleChange,required:!0}),a.lookup_reply_to_email?this.replyToLookupFormGroup():this.replyToInput(),n.createElement(Y.FormGroup,null,n.createElement(Y.Input,{type:"checkbox",id:"lookup_reply_to_email",name:"lookup_reply_to_email",label:"Use lookup table for Reply To email",onChange:this.handleUseReplyToLookupChange,checked:a.lookup_reply_to_email})),n.createElement(r0.A,null,a.lookup_sender_email?this.senderLookupFormGroup():this.senderInput(),n.createElement(Y.FormGroup,null,n.createElement(Y.Input,{type:"checkbox",id:"lookup_sender_email",name:"lookup_sender_email",label:"Use lookup table for Sender email",onChange:this.handleUseSenderLookupChange,checked:a.lookup_sender_email}))),n.createElement(be.Wj,{permissions:"users:list"},n.createElement(Y.FormGroup,{controlId:"notification-user-recipients",validationState:u.errors.recipients?"error":null},n.createElement(Y.ControlLabel,null,"User recipient(s) ",n.createElement("small",{className:"text-muted"},"(Optional)")),n.createElement(a0,{id:"notification-user-recipients",value:Array.isArray(a.user_recipients)?a.user_recipients.join(","):"",onChange:this.handleRecipientsChange("user_recipients")}),n.createElement(Y.HelpBlock,null,Ue()(u,"errors.recipients[0]","Select Graylog users that will receive this Notification.")))),a.lookup_recipient_emails?this.emailLookupFormGroup():this.emailRecipientsFormGroup(),n.createElement(Y.FormGroup,null,n.createElement(Y.Input,{type:"checkbox",id:"lookup_recipient_emails",name:"lookup_recipient_emails",label:"Use lookup table for Email Recipients",onChange:this.handleUseRecipientLookupChange,checked:a.lookup_recipient_emails})),n.createElement(Y.Input,{id:"notification-time-zone",help:"Time zone used for timestamps in the email body.",label:n.createElement(n.Fragment,null,"Time zone for date/time values ",n.createElement("small",{className:"text-muted"},"(Optional)"))},n.createElement(be.o4,{className:"timezone-select",name:"time_zone",value:a.time_zone,onChange:this.handleTimeZoneChange})),n.createElement(Y.FormGroup,{controlId:"notification-body-template",validationState:u.errors.body?"error":null},n.createElement(Y.ControlLabel,null,"Body Template"),n.createElement(be.Qb,{id:"notification-body-template",mode:"text",theme:"light",value:a.body_template||"",onChange:this.handleBodyTemplateChange}),n.createElement(Y.HelpBlock,null,Ue()(u,"errors.body[0]","The template that will be used to generate the email body."))),n.createElement(Y.FormGroup,{controlId:"notification-body-template",validationState:u.errors.body?"error":null},n.createElement(Y.ControlLabel,null,"HTML Body Template"),n.createElement(be.Qb,{id:"notification-html-body-template",mode:"text",theme:"light",value:a.html_body_template||"",onChange:this.handleHtmlBodyTemplateChange}),n.createElement(Y.HelpBlock,null,Ue()(u,"errors.body[0]","The template that will be used to generate the email HTML body."))))}}Bs(dh,"propTypes",{config:l().object.isRequired,validation:l().object.isRequired,onChange:l().func.isRequired}),Bs(dh,"defaultConfig",{sender:"",subject:"Graylog event notification: ${event_definition_title}",reply_to:"",body_template:c0,html_body_template:u0,user_recipients:[],email_recipients:[],time_zone:"UTC",lookup_recipient_emails:!1,recipients_lut_name:null,recipients_lut_key:null,lookup_sender_email:!1,sender_lut_name:null,sender_lut_key:null,lookup_reply_to_email:!1,reply_to_lut_name:null,reply_to_lut_key:null});const Ly=dh,By=i=>n.createElement(Ly,{...i});By.propTypes={config:l().object.isRequired,validation:l().object.isRequired,onChange:l().func.isRequired};const d0=By;var Tp=e("nPNjzYdu"),lc={};lc.styleTagTransform=ua(),lc.setAttributes=Ys(),lc.insert=ws().bind(null,"head"),lc.domAPI=As(),lc.insertStyleElement=Ws();var BT=ca()(Tp.A,lc);const ql=Tp.A&&Tp.A.locals?Tp.A.locals:void 0,mh=({notification:i,...a})=>n.createElement(Zl,{notification:i,...a},n.createElement(n.Fragment,null,n.createElement("tr",null,n.createElement("td",null,"Use Lookup Table for Sender"),n.createElement("td",null,i.config.lookup_sender_email?"Yes":"No")),i.config.lookup_sender_email?n.createElement(n.Fragment,null,n.createElement("tr",null,n.createElement("td",null,"Sender Email Lookup Table Name"),n.createElement("td",null,i.config.sender_lut_name)),n.createElement("tr",null,n.createElement("td",null,"Sender Email Lookup Table Key"),n.createElement("td",null,i.config.sender_lut_key))):n.createElement("tr",null,n.createElement("td",null,"Sender"),n.createElement("td",null,i.config.sender)),n.createElement("tr",null,n.createElement("td",null,"Subject"),n.createElement("td",null,i.config.subject)),n.createElement("tr",null,n.createElement("td",null,"Use Lookup Table for Reply-To"),n.createElement("td",null,i.config.lookup_reply_to_email?"Yes":"No")),i.config.lookup_reply_to_email?n.createElement(n.Fragment,null,n.createElement("tr",null,n.createElement("td",null,"Reply-To Email Lookup Table Name"),n.createElement("td",null,i.config.reply_to_lut_name)),n.createElement("tr",null,n.createElement("td",null,"Reply-To Email Lookup Table Key"),n.createElement("td",null,i.config.reply_to_lut_key))):n.createElement("tr",null,n.createElement("td",null,"Reply-To"),n.createElement("td",null,i.config.reply_to)),n.createElement("tr",null,n.createElement("td",null,"User Recipients"),n.createElement("td",null,i.config.user_recipients.join(", ")||"No users will receive this notification.")),n.createElement("tr",null,n.createElement("td",null,"Use Lookup Table for Email Recipients"),n.createElement("td",null,i.config.lookup_recipient_emails?"Yes":"No")),i.config.lookup_recipient_emails?n.createElement(n.Fragment,null,n.createElement("tr",null,n.createElement("td",null,"Email Recipients Lookup Table Name"),n.createElement("td",null,i.config.recipients_lut_name)),n.createElement("tr",null,n.createElement("td",null,"Email Recipients Lookup Table Key"),n.createElement("td",null,i.config.recipients_lut_key))):n.createElement("tr",null,n.createElement("td",null,"Email Recipients"),n.createElement("td",null,i.config.email_recipients.join(", ")||"No email addresses are configured to receive this notification.")),n.createElement("tr",null,n.createElement("td",null,"Email Body"),n.createElement("td",null,n.createElement(Y.Well,{bsSize:"small",className:ql.bodyPreview},i.config.body_template||n.createElement("em",null,"Empty body")))),n.createElement("tr",null,n.createElement("td",null,"Email HTML Body"),n.createElement("td",null,n.createElement(Y.Well,{bsSize:"small",className:ql.bodyPreview},i.config.html_body_template||n.createElement("em",null,"Empty HTML body"))))));mh.propTypes={type:l().string.isRequired,notification:l().object,definitionNotification:l().object.isRequired},mh.defaultProps={notification:{}};const m0=mh;var p0=Object.defineProperty,g0=(i,a,u)=>a in i?p0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,cl=(i,a,u)=>(g0(i,typeof a!="symbol"?a+"":a,u),u);const Uy=(0,m.default)(Y.Button)` clear: both; display: block; margin-bottom: 15px; `;class bp extends n.Component{constructor(){super(),cl(this,"propagateChange",(a,u)=>{const{config:T,onChange:R}=this.props,B=Es()(T);B[a]=u,R(B)}),cl(this,"handleChange",a=>{const{name:u}=a.target,T=sn.yG(a.target);this.propagateChange(u,T)}),cl(this,"handleSecretInputChange",a=>{const{name:u}=a.target,T=sn.yG(a.target),R=T.length===0?{delete_value:!0}:{set_value:T};this.setState({[u]:T}),this.propagateChange(u,R)}),cl(this,"onValidationChange",a=>{const{setIsSubmitEnabled:u}=this.props;u(a!=="error")}),cl(this,"resetSecret",a=>{const{reset:u}=this.state;u[a]=!0,this.setState({reset:u}),this.propagateChange(a,{delete_value:!0}),this.setState({[a]:""})}),cl(this,"undoResetSecret",a=>{const{reset:u}=this.state;u[a]=!1,this.setState({reset:u}),this.propagateChange(a,{keep_value:!0}),this.setState({[a]:"******"})}),this.state={api_secret:"",basic_auth:"",reset:{api_secret:!1,basic_auth:!1}}}componentDidMount(){var a,u;const{config:T,onChange:R}=this.props,B=Es()(T);B.basic_auth=(a=T.basic_auth)!=null&&a.is_set?{keep_value:!0}:null,B.api_secret=(u=T.api_secret)!=null&&u.is_set?{keep_value:!0}:null,R(B),this.setState({basic_auth:T.basic_auth.is_set?"******":""}),this.setState({api_secret:T.api_secret.is_set?"******":""})}render(){const{config:a,validation:u}=this.props,{api_secret:T,basic_auth:R}=a,{reset:B}=this.state;return n.createElement(n.Fragment,null,n.createElement(be.Ns,{label:"URL",onChange:this.handleChange,validationState:u.errors.url?"error":null,validationMessage:Ue()(u,"errors.url[0]","The URL to POST to when an Event occurs."),onValidationChange:this.onValidationChange,url:a.url,autofocus:!1}),n.createElement(Y.Checkbox,{id:"skip_tls_verification",name:"skip_tls_verification",onChange:this.handleChange,checked:a.skip_tls_verification},"Skip TLS verification"),n.createElement(Y.Row,null,n.createElement(Y.Col,{md:12},R!=null&&R.keep_value?n.createElement(n.Fragment,null,n.createElement(Y.ControlLabel,null,"Basic authentication"),n.createElement(Uy,{bsStyle:"default",type:"button",onClick:()=>{this.resetSecret("basic_auth")}},"Reset Secret")):n.createElement(Y.Input,{id:"basicAuth",label:n.createElement("span",null,"Basic authentication ",n.createElement("small",{className:"text-muted"},"(Optional)")),name:"basic_auth",type:"password",onChange:this.handleSecretInputChange,value:this.state.basic_auth||"",help:"The Basic authentication string needs to follow this format: ':'.",buttonAfter:B.basic_auth?n.createElement(Y.Button,{type:"button",onClick:()=>{this.undoResetSecret("basic_auth")}},"Undo Reset"):void 0}))),n.createElement(Y.Row,null,n.createElement(Y.Col,{md:12},n.createElement(Y.Input,{id:"api_key",name:"api_key",label:n.createElement("span",null,"API Key ",n.createElement("small",{className:"text-muted"},"(Optional)")),type:"text",onChange:this.handleChange,bsStyle:u.errors.api_key?"error":null,help:Ue()(u,"errors.api_key[0]","If an API secret is set, an API key must also be set."),value:a.api_key}))),n.createElement(Y.Row,null,n.createElement(Y.Col,{md:12},T!=null&&T.keep_value?n.createElement(n.Fragment,null,n.createElement(Y.ControlLabel,null,"API Secret"),n.createElement(Uy,{bsStyle:"default",type:"button",onClick:()=>{this.resetSecret("api_secret")}},"Reset Secret")):n.createElement(Y.Input,{id:"apiSecret",label:n.createElement("span",null,"API Secret ",n.createElement("small",{className:"text-muted"},"(Optional)")),name:"api_secret",type:"password",onChange:this.handleSecretInputChange,bsStyle:u.errors.api_secret?"error":null,help:Ue()(u,"errors.api_secret[0]","If an API key is set, an API secret must also be set."),value:this.state.api_secret||"",buttonAfter:B.api_secret?n.createElement(Y.Button,{type:"button",onClick:()=>{this.undoResetSecret("api_secret")}},"Undo Reset"):void 0}),n.createElement(Y.Checkbox,{id:"api_key_as_header",name:"api_key_as_header",onChange:this.handleChange,checked:a.api_key_as_header},"Send API Key/Secret as Header"))))}}cl(bp,"propTypes",{config:l().object.isRequired,validation:l().object.isRequired,onChange:l().func.isRequired,setIsSubmitEnabled:l().func}),cl(bp,"defaultConfig",{url:"",api_key_as_header:!1,api_key:"",api_secret:{keep_value:!0},basic_auth:{keep_value:!0},skip_tls_verification:!1}),bp.defaultProps={setIsSubmitEnabled:()=>{}};const Ny=bp;var E0=Object.defineProperty,f0=(i,a,u)=>a in i?E0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,wy=(i,a,u)=>(f0(i,typeof a!="symbol"?a+"":a,u),u);class ph extends n.Component{render(){const{notification:a}=this.props;return n.createElement(Zl,{...this.props},n.createElement(n.Fragment,null,n.createElement("tr",null,n.createElement("td",null,"URL"),n.createElement("td",null,n.createElement("code",null,a.config.url)))))}}wy(ph,"propTypes",{type:l().string.isRequired,notification:l().object,definitionNotification:l().object.isRequired}),wy(ph,"defaultProps",{notification:{}});const h0=ph;var v0=e("+qc3iAHh"),Sp=e("MgIGZ5Gi"),ic={};ic.styleTagTransform=ua(),ic.setAttributes=Ys(),ic.insert=ws().bind(null,"head"),ic.domAPI=As(),ic.insertStyleElement=Ws();var UT=ca()(Sp.A,ic);const Pp=Sp.A&&Sp.A.locals?Sp.A.locals:void 0;var y0=Object.defineProperty,A0=(i,a,u)=>a in i?y0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,ei=(i,a,u)=>(A0(i,typeof a!="symbol"?a+"":a,u),u);const _0=i=>Object.keys(i).map(a=>({label:`Legacy ${i[a].name}`,value:a}));class gh extends n.Component{constructor(){super(...arguments),ei(this,"propagateMultiChange",a=>{const{config:u,onChange:T}=this.props,R={...u,...a};T(R)}),ei(this,"propagateChange",(a,u)=>{const{config:T}=this.props,R={...T.configuration,[a]:u};this.propagateMultiChange({configuration:R})}),ei(this,"getDefaultConfiguration",a=>{const{legacyTypes:u}=this.props,{configuration:T}=u[a],R={};return Object.keys(T).forEach(B=>{R[B]=T[B].default_value}),R}),ei(this,"handleSelectNotificationChange",a=>{this.propagateMultiChange({callback_type:a,configuration:this.getDefaultConfiguration(a)})}),ei(this,"handleFormFieldChange",(a,u)=>{this.propagateChange(a,u)})}renderNotificationForm(a,u){const{configuration:T}=u,R=Object.keys(T).map(B=>{const F=T[B],$=a.configuration[B];return n.createElement(v0.rP,{key:B,typeName:a.callback_type,configField:F,configKey:B,configValue:$,onChange:this.handleFormFieldChange})});return n.createElement("fieldset",null,R)}render(){const{config:a,legacyTypes:u,validation:T}=this.props,R=a.callback_type,B=u[R];let F;return B?F=this.renderNotificationForm(a,B):R&&(F=n.createElement(Y.Alert,{bsStyle:"danger",className:Pp.legacyNotificationAlert},"Unknown legacy alarm callback type: ",n.createElement("strong",null,R)," Please make sure the plugin is installed.")),n.createElement(n.Fragment,null,n.createElement("fieldset",null,n.createElement(Y.FormGroup,{controlId:"notification-legacy-select",validationState:T.errors.callback_type?"error":null},n.createElement(Y.ControlLabel,null,"Choose Legacy Notification"),n.createElement(be.l6,{id:"notification-legacy-select",matchProp:"label",placeholder:"Select Legacy Notification",onChange:this.handleSelectNotificationChange,options:_0(u),value:R}),n.createElement(Y.HelpBlock,null,Ue()(T,"errors.callback_type[0]","Select a Legacy Notification to use on this Event Definition.")))),n.createElement(Y.Alert,{bsStyle:"danger",className:Pp.legacyNotificationAlert},"Legacy alarm callbacks are deprecated and will be removed with the next major release. Please switch to the new notification types as soon as possible!"),F)}}ei(gh,"propTypes",{config:l().object.isRequired,validation:l().object.isRequired,onChange:l().func.isRequired,legacyTypes:l().object.isRequired}),ei(gh,"defaultConfig",{callback_type:"",configuration:{}});const Wy=gh;var Gu=e("J7MaobQD"),C0=Object.defineProperty,T0=(i,a,u)=>a in i?C0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,b0=(i,a,u)=>(T0(i,typeof a!="symbol"?a+"":a,u),u);class Fy extends n.Component{componentDidMount(){const{notifications:a}=this.props;a.allLegacyTypes||Gu.M.listAllLegacyTypes()}render(){const{notifications:a}=this.props,{allLegacyTypes:u}=a;return u?n.createElement(Wy,{...this.props,legacyTypes:u}):n.createElement("p",null,n.createElement(be.y$,{text:"Loading legacy notification information..."}))}}b0(Fy,"propTypes",{config:l().object.isRequired,validation:l().object.isRequired,onChange:l().func.isRequired,notifications:l().object.isRequired});const S0=(0,K.A)(Fy,{notifications:Gu.c});var P0=Object.defineProperty,D0=(i,a,u)=>a in i?P0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,O0=(i,a,u)=>(D0(i,typeof a!="symbol"?a+"":a,u),u);class Ky extends n.Component{render(){const{notification:a,legacyTypes:u}=this.props,T=a.config.configuration,R=a.config.callback_type,B=u[R];let F;if(B){const $=B.configuration;F=Object.entries($).map(([X,se])=>n.createElement("tr",{key:X},n.createElement("td",null,se.human_name),n.createElement("td",null,T[X])))}else F=n.createElement("tr",{className:"danger"},n.createElement("td",null,"Type"),n.createElement("td",null,"Unknown legacy alarm callback type: ",n.createElement("code",null,R),". Please make sure the plugin is installed."));return n.createElement(n.Fragment,null,!B&&n.createElement(Y.Alert,{bsStyle:"danger",className:Pp.legacyNotificationAlert},"Error in ",a.title||"Legacy Alarm Callback",": Unknown type ",n.createElement("code",null,R),", please ensure the plugin is installed."),n.createElement(Zl,{...this.props},n.createElement(n.Fragment,null,F)))}}O0(Ky,"propTypes",{type:l().string.isRequired,notification:l().object.isRequired,definitionNotification:l().object.isRequired,legacyTypes:l().object.isRequired});const R0=Ky;var I0=Object.defineProperty,M0=(i,a,u)=>a in i?I0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,$y=(i,a,u)=>(M0(i,typeof a!="symbol"?a+"":a,u),u);class Eh extends n.Component{componentDidMount(){Gu.M.listAllLegacyTypes()}render(){const{notifications:a}=this.props,{allLegacyTypes:u}=a;return u?n.createElement(R0,{...this.props,legacyTypes:u}):n.createElement("p",null,n.createElement(be.y$,{text:"Loading legacy notification information..."}))}}$y(Eh,"propTypes",{type:l().string.isRequired,notification:l().object,notifications:l().object.isRequired,definitionNotification:l().object.isRequired}),$y(Eh,"defaultProps",{notification:{}});const x0=(0,K.A)(Eh,{notifications:Gu.c}),L0=({type:i,notification:a,definitionNotification:u})=>n.createElement(Zl,{type:i,notification:a,definitionNotification:u},n.createElement("tr",null,n.createElement("td",null,"URL"),n.createElement("td",null,n.createElement("code",null,a.config.url))),n.createElement("tr",null,n.createElement("td",null,"Method"),n.createElement("td",null,n.createElement("code",null,a.config.method))),a.config.content_type&&n.createElement("tr",null,n.createElement("td",null,"Content Type"),n.createElement("td",null,n.createElement("code",null,a.config.content_type))),a.config.headers&&n.createElement("tr",null,n.createElement("td",null,"Headers"),n.createElement("td",null,n.createElement("code",null,a.config.headers))),a.config.body_template&&n.createElement("tr",null,n.createElement("td",null,"Body Template"),n.createElement("td",null,n.createElement(Y.Well,{bsSize:"small",className:ql.bodyPreview},a.config.body_template)))),fh='{\n "event_definition_id": "${event_definition_id}",\n "event_definition_type": "${event_definition_type}",\n "event_title": "${event_definition_title}",\n "event_definition_description": "${event_definition_description}",\n "job_definition_id": "${job_definition_id}",\n "event_id": "${event.id}",\n "event_origin_context": "${event.origin_context}",\n "event_timestamp_processing": "${event.timestamp_processing}",\n "event_timerange_start": "${event.timerange_start}",\n "event_timerange_end": "${event.timerange_end}",\n "event_streams": "${event.streams}",\n "event_source_streams": "${event.source_streams}",\n "event_alert": "${event.alert}",\n "event_message": "${event.message}",\n "event_source": "${event.source}",\n "event_key": "${event.key}",\n "event_priority": "${event.priority}"${if backlog},\n "backlog": [\n ${foreach backlog message}\n { "id": "${message.id}",\n "message": "${message.message}"}${if ! last_message},${end}${end}\n ]${end}\n}',Gy="event_definition_id=${event_definition_id}&event_definition_type=${event_definition_type}&event_title=${event_definition_title}&event_definition_description=${event_definition_description}&job_definition_id=${job_definition_id}&event_id=${event.id}&event_origin_context=${event.origin_context}&event_timestamp_processing=${event.timestamp_processing}&event_timerange_start=${event.timerange_start}&event_timerange_end=${event.timerange_end}&event_streams=${event.streams}&event_source_streams=${event.source_streams}&event_alert=${event.alert}&event_message=${event.message}&event_source=${event.source}&event_key=${event.key}&event_priority=${event.priority}",jy="event_definition_id=${event_definition_id}\nevent_definition_type=${event_definition_type}\nevent_title=${event_definition_title}\nevent_definition_description=${event_definition_description}\njob_definition_id=${job_definition_id}\nevent_id=${event.id}\nevent_origin_context=${event.origin_context}\nevent_timestamp_processing=${event.timestamp_processing}\nevent_timerange_start=${event.timerange_start}\nevent_timerange_end=${event.timerange_end}\nevent_streams=${event.streams}\nevent_source_streams=${event.source_streams}\nevent_alert=${event.alert}\nevent_message=${event.message}\nevent_source=${event.source}\nevent_key=${event.key}\nevent_priority=${event.priority}\n${if backlog}backlog={backlog}${end}",Hy=(0,m.default)(Y.Button)` clear: both; display: block; margin-bottom: 15px; `,B0=(i,a)=>a===""?!0:i==="JSON"?a===fh:i==="FORM_DATA"?a===Gy:a===jy;class zy extends n.Component{constructor(a){super(a),this.propagateChange=(u,T)=>{const{config:R,onChange:B}=this.props,F=Es()(R);F[u]=T,B(F)},this.handleChange=u=>{const{name:T}=u.target,R=sn.yG(u.target);this.propagateChange(T,R)},this.handleUrlChange=u=>{const T=u.target;this.propagateChange("url",T.value)},this.handleTimeZoneChange=u=>{this.propagateChange("time_zone",u)},this.handleJsonBodyTemplateChange=u=>{this.propagateChange("body_template",u)},this.handleMethodChange=u=>{const{config:T,onChange:R}=this.props,B=Es()(T);B.method=u,u==="GET"?(B.body_template=null,B.content_type=null):T.method==="GET"&&(B.content_type="JSON",B.body_template=""),R(B)},this.handleContentTypeChange=u=>{const{config:T,onChange:R}=this.props,B=Es()(T);B.content_type=u,B0(T.content_type,T.body_template)&&(u==="JSON"?B.body_template=fh:u==="FORM_DATA"?B.body_template=Gy:B.body_template=jy),R(B)},this.handleSecretInputChange=u=>{const{name:T}=u.target,R=sn.yG(u.target),B=R.length===0?{delete_value:!0}:{set_value:R};this.setState({[T]:R}),this.propagateChange(T,B)},this.onValidationChange=u=>{const{setIsSubmitEnabled:T}=this.props;T(u!=="error")},this.resetSecret=u=>{const{reset:T}=this.state;T[u]=!0,this.setState({reset:T}),this.propagateChange(u,{delete_value:!0}),this.setState({[u]:""})},this.undoResetSecret=u=>{const{reset:T}=this.state;T[u]=!1,this.setState({reset:T}),this.propagateChange(u,{keep_value:!0}),this.setState({[u]:"******"})},this.state={api_secret:"",basic_auth:"",reset:{api_secret:!1,basic_auth:!1}}}componentDidMount(){var a,u;const{config:T,onChange:R}=this.props,B=Es()(T);B.basic_auth=(a=T.basic_auth)!=null&&a.is_set?{keep_value:!0}:null,B.api_secret=(u=T.api_secret)!=null&&u.is_set?{keep_value:!0}:null,R(B),this.setState({basic_auth:T.basic_auth.is_set?"******":""}),this.setState({api_secret:T.api_secret.is_set?"******":""})}render(){const{config:a,validation:u}=this.props,{api_secret:T,basic_auth:R}=a,{reset:B}=this.state,F=[{value:"POST",label:"POST"},{value:"GET",label:"GET"},{value:"PUT",label:"PUT"}],$=[{value:"JSON",label:"application/json"},{value:"FORM_DATA",label:"application/x-www-form-urlencoded"},{value:"PLAIN_TEXT",label:"text/plain"}],se=n.createElement("p",null,"Custom POST/PUT body. See ",n.createElement("a",{href:"https://docs.graylog.org/docs/alerts#notifications",rel:"noopener noreferrer",target:"_blank"},"docs "),"for more details. An empty POST/PUT body will send the full event details.");return n.createElement(n.Fragment,null,n.createElement(be.Ns,{label:"URL",onChange:this.handleUrlChange,validationState:u.errors.url?"error":null,validationMessage:Ue()(u,"errors.url[0]","The URL to POST to when an Event occurs"),onValidationChange:this.onValidationChange,url:a.url,autofocus:!1}),n.createElement(Y.Checkbox,{id:"skip_tls_verification",name:"skip_tls_verification",onChange:this.handleChange,checked:a.skip_tls_verification},"Skip TLS verification"),n.createElement(Y.Row,null,n.createElement(Y.Col,{md:12},R!=null&&R.keep_value?n.createElement(n.Fragment,null,n.createElement(Y.ControlLabel,null,"Basic authentication"),n.createElement(Hy,{bsStyle:"default",type:"button",onClick:()=>{this.resetSecret("basic_auth")}},"Reset Secret")):n.createElement(Y.Input,{id:"basicAuth",label:n.createElement("span",null,"Basic authentication ",n.createElement("small",{className:"text-muted"},"(Optional)")),name:"basic_auth",type:"password",onChange:this.handleSecretInputChange,value:this.state.basic_auth||"",help:"The Basic authentication string needs to follow this format: ':'",buttonAfter:B.basic_auth?n.createElement(Y.Button,{type:"button",onClick:()=>{this.undoResetSecret("basic_auth")}},"Undo Reset"):void 0}))),n.createElement(Y.Row,null,n.createElement(Y.Col,{md:6},n.createElement(Y.Input,{id:"api_key",name:"api_key",label:n.createElement("span",null,"API Key ",n.createElement("small",{className:"text-muted"},"(Optional)")),type:"text",onChange:this.handleChange,bsStyle:u.errors.api_key?"error":null,help:Ue()(u,"errors.api_key[0]","Must be set if an API secret is set"),value:a.api_key}),n.createElement(Y.Checkbox,{id:"api_key_as_header",name:"api_key_as_header",onChange:this.handleChange,checked:a.api_key_as_header},"Send API Key/Secret as Header")),n.createElement(Y.Col,{md:6},T!=null&&T.keep_value?n.createElement(n.Fragment,null,n.createElement(Y.ControlLabel,null,"API Secret"),n.createElement(Hy,{bsStyle:"default",type:"button",onClick:()=>{this.resetSecret("api_secret")}},"Reset Secret")):n.createElement(Y.Input,{id:"apiSecret",label:n.createElement("span",null,"API Secret ",n.createElement("small",{className:"text-muted"},"(Optional)")),name:"api_secret",type:"password",onChange:this.handleSecretInputChange,bsStyle:u.errors.api_secret?"error":null,help:Ue()(u,"errors.api_secret[0]","Must be set if an API key is set"),value:this.state.api_secret||"",buttonAfter:B.api_secret?n.createElement(Y.Button,{type:"button",onClick:()=>{this.undoResetSecret("api_secret")}},"Undo Reset"):void 0}))),n.createElement(Y.Row,null,n.createElement(Y.Col,{md:12},n.createElement(Y.Input,{id:"headers",name:"headers",label:n.createElement("span",null,"Headers ",n.createElement("small",{className:"text-muted"},"(Optional)")),type:"text",onChange:this.handleChange,bsStyle:u.errors.headers?"error":null,help:Ue()(u,"errors.headers[0]","Semicolon delimited list of HTTP headers to add to the notification"),value:a.headers}))),n.createElement(Y.Row,null,n.createElement(Y.Col,{md:4},n.createElement(Y.Input,{help:"HTTP method used for the notification",id:"notification-method",label:"HTTP Method"},n.createElement(be.l6,{id:"method",name:"method",clearable:!1,options:F,matchProp:"label",onChange:this.handleMethodChange,value:a.method}))),n.createElement(Y.Col,{md:4},n.createElement(Y.Input,{help:"HTTP content type used for POST/PUT notifications",id:"notification-content-type",label:"Content Type"},n.createElement(be.l6,{id:"content-type",name:"content-type",options:$,matchProp:"label",disabled:a.method==="GET",onChange:this.handleContentTypeChange,clearable:!1,value:a.content_type}))),n.createElement(Y.Col,{md:4},n.createElement(Y.Input,{id:"notification-time-zone",help:"Time zone used for timestamps in the notification body",label:n.createElement(n.Fragment,null,"Time zone for date/time values")},n.createElement(be.o4,{className:"timezone-select",name:"time_zone",disabled:a.method==="GET",value:a.time_zone,clearable:!1,onChange:this.handleTimeZoneChange})))),n.createElement(Y.Row,null,n.createElement(Y.Col,{md:12},a.method!=="GET"&&n.createElement(Y.FormGroup,{controlId:"notification-body-template",validationState:u.errors.body_template?"error":null},n.createElement(Y.ControlLabel,null,"Body Template"),n.createElement(be.Qb,{id:"notification-body-template",mode:"text",theme:"light",value:a.body_template||"",wrapEnabled:!0,onChange:this.handleJsonBodyTemplateChange}),n.createElement(Y.HelpBlock,null,Ue()(u,"errors.body_template[0]",se))))))}}zy.defaultConfig={url:"",api_key_as_header:!1,api_key:"",api_secret:{keep_value:!0},basic_auth:{keep_value:!0},skip_tls_verification:!1,method:"POST",time_zone:"UTC",body_template:fh,content_type:"JSON",headers:""};const Vy=zy,ky=({notification:i})=>{const a=n.createElement(be.WY,{label:"Email Recipients",value:i.config.email_recipients.join(", ")||"No email addresses are configured to receive this notification."}),u=n.createElement(n.Fragment,null,n.createElement(be.WY,{label:"Email Recipients Lookup Table Name",value:i.config.recipients_lut_name}),n.createElement(be.WY,{label:"Email Recipients Lookup Table Key",value:i.config.recipients_lut_key})),T=n.createElement(be.WY,{label:"Sender",value:i.config.sender}),R=n.createElement(n.Fragment,null,n.createElement(be.WY,{label:"Sender Lookup Table Name",value:i.config.sender_lut_name}),n.createElement(be.WY,{label:"Sender Lookup Table Key",value:i.config.sender_lut_key})),B=n.createElement(be.WY,{label:"Reply-To",value:i.config.reply_to}),F=n.createElement(n.Fragment,null,n.createElement(be.WY,{label:"Reply-To Lookup Table Name",value:i.config.reply_to_lut_name}),n.createElement(be.WY,{label:"Reply-To Lookup Table Key",value:i.config.reply_to_lut_key}));return n.createElement(n.Fragment,null,n.createElement(be.WY,{label:"Use Lookup Table for Sender",value:i.config.lookup_sender_email?"Yes":"No"}),i.config.lookup_sender_email?R:T,n.createElement(be.WY,{label:"Subject",value:i.config.subject}),n.createElement(be.WY,{label:"Use Lookup Table for Reply-To",value:i.config.lookup_reply_to_email?"Yes":"No"}),i.config.lookup_reply_to_email?F:B,n.createElement(be.WY,{label:"User Recipients",value:i.config.user_recipients.join(", ")||"No users will receive this notification."}),n.createElement(be.WY,{label:"Use Lookup Table for Email Recipients",value:i.config.lookup_recipient_emails?"Yes":"No"}),i.config.lookup_recipient_emails?u:a,n.createElement(be.WY,{label:"Time Zone",value:i.config.time_zone}),n.createElement(be.WY,{label:"Email Body",value:n.createElement(Y.Well,{bsSize:"small",className:ql.bodyPreview},i.config.body_template||n.createElement("em",null,"Empty body"))}),n.createElement(be.WY,{label:"Email HTML Body",value:n.createElement(Y.Well,{bsSize:"small",className:ql.bodyPreview},i.config.html_body_template||n.createElement("em",null,"Empty body"))}))};ky.propTypes={notification:l().object.isRequired};const U0=ky,Qy=({notification:i})=>{var a,u;const T=(a=i.config.api_secret)==null?void 0:a.is_set,R=i.config.api_key_as_header?"Header":"Query Parameter";return n.createElement(n.Fragment,null,n.createElement(be.WY,{label:"URL",value:i.config.url}),n.createElement(be.WY,{label:"Basic Authentication",value:(u=i.config.basic_auth)!=null&&u.is_set?"******":null}),n.createElement(be.WY,{label:"API Key/Secret Sent As",value:T?R:null}),n.createElement(be.WY,{label:"API Key",value:i.config.api_key}),n.createElement(be.WY,{label:"API Secret",value:T?"******":null}))};Qy.propTypes={notification:l().object.isRequired};const N0=Qy,Yy=({notification:i})=>{const[a,u]=(0,n.useState)(),T=i.config.configuration,R=i.config.callback_type,B=a==null?void 0:a[R];return(0,n.useEffect)(()=>{Gu.M.listAllLegacyTypes().then(F=>u(F.types))},[]),a?n.createElement(n.Fragment,null,!B&&n.createElement(Y.Alert,{bsStyle:"danger",className:Pp.legacyNotificationAlert},"Error in ",i.title||"Legacy Alarm Callback",": Unknown type ",n.createElement("code",null,R),", please ensure the plugin is installed."),B&&Object.entries(B.configuration).map(([F,$])=>F==="body"||F==="script_args"?n.createElement(be.WY,{label:$.human_name,value:n.createElement(Y.Well,{bsSize:"small",className:ql.bodyPreview},T[F]||n.createElement("em",null,"Empty body"))}):n.createElement(be.WY,{label:$.human_name,value:T[F]}))):n.createElement("p",null,n.createElement(be.y$,{text:"Loading legacy notification information..."}))};Yy.propTypes={notification:l().object.isRequired};const w0=Yy,W0=({notification:i})=>{var a,u;const T=(a=i.config.api_secret)==null?void 0:a.is_set,R=i.config.api_key_as_header?"Header":"Query Parameter";return n.createElement(n.Fragment,null,n.createElement(be.WY,{label:"URL",value:i.config.url}),n.createElement(be.WY,{label:"Basic Authentication",value:(u=i.config.basic_auth)!=null&&u.is_set?"******":null}),n.createElement(be.WY,{label:"API Key/Secret Sent As",value:T?R:null}),n.createElement(be.WY,{label:"API Key",value:i.config.api_key}),n.createElement(be.WY,{label:"API Secret",value:T?"******":null}),n.createElement(be.WY,{label:"Method",value:i.config.method}),i.config.time_zone&&n.createElement(be.WY,{label:"Time Zone",value:i.config.time_zone}),i.config.content_type&&n.createElement(be.WY,{label:"Content Type",value:i.config.content_type}),i.config.headers&&n.createElement(be.WY,{label:"Headers",value:i.config.headers}),i.config.body_template&&n.createElement(be.WY,{label:"Body Template",value:n.createElement(Y.Well,{bsSize:"small",className:ql.bodyPreview},i.config.body_template)}))},F0={eventNotificationTypes:[{type:"email-notification-v1",displayName:"Email Notification",formComponent:d0,summaryComponent:m0,detailsComponent:U0,defaultConfig:Ly.defaultConfig},{type:"http-notification-v1",displayName:"HTTP Notification",formComponent:Ny,summaryComponent:h0,detailsComponent:N0,defaultConfig:Ny.defaultConfig},{type:"http-notification-v2",displayName:"Custom HTTP Notification",formComponent:Vy,summaryComponent:L0,detailsComponent:W0,defaultConfig:Vy.defaultConfig},{type:"legacy-alarm-callback-notification-v1",displayName:"Legacy Alarm Callbacks",formComponent:S0,summaryComponent:x0,detailsComponent:w0,defaultConfig:Wy.defaultConfig}]};var Dp=e("yqbobKTV"),cc={};cc.styleTagTransform=ua(),cc.setAttributes=Ys(),cc.insert=ws().bind(null,"head"),cc.domAPI=As(),cc.insertStyleElement=Ws();var WT=ca()(Dp.A,cc);const K0=Dp.A&&Dp.A.locals?Dp.A.locals:void 0;var $0=Object.defineProperty,G0=(i,a,u)=>a in i?$0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,j0=(i,a,u)=>(G0(i,typeof a!="symbol"?a+"":a,u),u);class Xy extends n.Component{render(){return n.createElement(Y.Panel,{className:K0.templatePreview,header:n.createElement("h3",null,"Available Fields in Template")},n.createElement("p",null,"Graylog lets you enrich generated Events with dynamic values. You can access Fields from the Event context"," ","with ",n.createElement("code",null,"${source.}"),".",n.createElement("br",null),"Available Fields in the Template depend on the condition that created the Event:"),n.createElement("ul",null,n.createElement("li",null,n.createElement("b",null,"Filter:")," All Fields in the original log message"),n.createElement("li",null,n.createElement("b",null,"Aggregation:")," Fields set in Group By with their original names"),n.createElement("li",null,n.createElement("b",null,"Correlation:")," All Fields in the last matched and non-negated Event")))}}j0(Xy,"propTypes",{});const H0=Xy;var z0=Object.defineProperty,V0=(i,a,u)=>a in i?z0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,ju=(i,a,u)=>(V0(i,typeof a!="symbol"?a+"":a,u),u);const Hu=class vh extends n.Component{constructor(){super(...arguments),ju(this,"handleChange",a=>{const{config:u,onChange:T}=this.props,{name:R}=a.target,B=sn.yG(a.target),F=Es()(u.providers),$=F.find(X=>X.type===vh.type);$[R]=B,T({...u,providers:F})})}render(){const{config:a,validation:u}=this.props,T=a.providers.find(B=>B.type===vh.type),R=n.createElement("span",null,"Type a literal text to set to this Field or use"," ",n.createElement(be.Gr,{href:"https://cdn.rawgit.com/DJCordhose/jmte/master/doc/index.html"},"JMTE syntax")," ","to add a dynamic Value.");return n.createElement(Y.Row,{className:"row-sm"},n.createElement(Y.Col,{md:7,lg:6},n.createElement(Y.Input,{id:"template-provider-template",name:"template",type:"text",label:"Template",onChange:this.handleChange,value:T.template||"",bsStyle:u.errors.template?"error":null,help:u.errors.template||R}),n.createElement(Y.FormGroup,null,n.createElement(Y.Checkbox,{id:"lookup-message-require-values",name:"require_values",checked:T.require_values,onChange:this.handleChange},"Require all template values to be set"),n.createElement(Y.HelpBlock,null,"Check this option to validate that all variables used in the Template have values."))),n.createElement(Y.Col,{md:5,lgOffset:1},n.createElement(H0,null)))}};ju(Hu,"propTypes",{config:l().object.isRequired,validation:l().object.isRequired,onChange:l().func.isRequired}),ju(Hu,"type","template-v1"),ju(Hu,"defaultConfig",{template:""}),ju(Hu,"requiredFields",["template"]);const Op=Hu;var Rp=e("njMnXJuB"),uc={};uc.styleTagTransform=ua(),uc.setAttributes=Ys(),uc.insert=ws().bind(null,"head"),uc.domAPI=As(),uc.insertStyleElement=Ws();var KT=ca()(Rp.A,uc);const Jy=Rp.A&&Rp.A.locals?Rp.A.locals:void 0;var k0=Object.defineProperty,Q0=(i,a,u)=>a in i?k0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,hh=(i,a,u)=>(Q0(i,typeof a!="symbol"?a+"":a,u),u);class Zy extends n.Component{constructor(){super(...arguments),hh(this,"state",{displayDetails:!1}),hh(this,"toggleDisplayDetails",()=>{const{displayDetails:a}=this.state;this.setState({displayDetails:!a})})}render(){const{fieldName:a,config:u,keys:T,children:R}=this.props,{displayDetails:B}=this.state;return n.createElement("dl",{className:Jy.field},n.createElement("dt",null,a),n.createElement("dd",null,n.createElement(Y.Button,{bsStyle:"link",className:"btn-text",bsSize:"xsmall",onClick:this.toggleDisplayDetails},n.createElement(be.In,{name:`arrow_${B?"drop_down":"right"}`}),"\xA0",B?"Less details":"More details"),B&&n.createElement(Y.Table,{condensed:!0,hover:!0,className:Jy.fixedTable},n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",null,"Is Key?"),n.createElement("td",null,T.includes(a)?"Yes":"No")),n.createElement("tr",null,n.createElement("td",null,"Data Type"),n.createElement("td",null,u.data_type)),R))))}}hh(Zy,"propTypes",{fieldName:l().string.isRequired,config:l().object.isRequired,keys:l().array.isRequired,children:l().element.isRequired});const qy=Zy;var Y0=Object.defineProperty,X0=(i,a,u)=>a in i?Y0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,J0=(i,a,u)=>(X0(i,typeof a!="symbol"?a+"":a,u),u);class eA extends n.Component{render(){const{config:a}=this.props;return n.createElement(qy,{...this.props},n.createElement(n.Fragment,null,n.createElement("tr",null,n.createElement("td",null,"Value source"),n.createElement("td",null,"Template")),n.createElement("tr",null,n.createElement("td",null,"Template"),n.createElement("td",null,a.providers[0].template)),n.createElement("tr",null,n.createElement("td",null,"Validate that all Template values are set"),n.createElement("td",null,a.providers[0].require_values?"Yes":"No"))))}}J0(eA,"propTypes",{fieldName:l().string.isRequired,config:l().object.isRequired,keys:l().array.isRequired});const Z0=eA;var q0=Object.defineProperty,eT=(i,a,u)=>a in i?q0(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,dc=(i,a,u)=>(eT(i,typeof a!="symbol"?a+"":a,u),u);const zu=class yh extends n.Component{constructor(){super(...arguments),dc(this,"propagateChanges",(a,u)=>{const{config:T,onChange:R}=this.props,B=Es()(T.providers),F=B.find($=>$.type===yh.type);F[a]=u,R({...T,providers:B})}),dc(this,"handleSelectChange",a=>u=>{this.propagateChanges(a,u)})}render(){const{config:a,validation:u}=this.props,T=a.providers.find(R=>R.type===yh.type);return n.createElement(Cp.WY,{onTableNameChange:this.handleSelectChange("table_name"),onKeyChange:this.handleSelectChange("key_field"),selectedTableName:T.table_name,selectedKeyName:T.key_field,nameValidation:u.errors.table_name,keyValidation:u.errors.key_field})}};dc(zu,"propTypes",{config:l().object.isRequired,validation:l().object.isRequired,onChange:l().func.isRequired}),dc(zu,"type","lookup-v1"),dc(zu,"defaultConfig",{table_name:"",key_field:""}),dc(zu,"requiredFields",["table_name","key_field"]);const Ip=zu,tA=({...i})=>n.createElement(Ip,{...i});tA.propTypes={config:l().object.isRequired,validation:l().object.isRequired,currentUser:l().object.isRequired,onChange:l().func.isRequired};const tT=tA;var nT=Object.defineProperty,oT=(i,a,u)=>a in i?nT(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u,sT=(i,a,u)=>(oT(i,typeof a!="symbol"?a+"":a,u),u);class nA extends n.Component{render(){const{config:a}=this.props,u=a.providers[0];return n.createElement(qy,{...this.props},n.createElement(be.Wj,{permissions:"lookuptables:read"},n.createElement(n.Fragment,null,n.createElement("tr",null,n.createElement("td",null,"Value source"),n.createElement("td",null,"Lookup Table")),n.createElement("tr",null,n.createElement("td",null,"Lookup Table"),n.createElement("td",null,u.table_name)),n.createElement("tr",null,n.createElement("td",null,"Lookup Table Key Field"),n.createElement("td",null,u.key_field)))))}}sT(nA,"propTypes",{fieldName:l().string.isRequired,config:l().object.isRequired,keys:l().array.isRequired});const aT=nA,rT={fieldValueProviders:[{type:Op.type,displayName:"Template",formComponent:Op,summaryComponent:Z0,defaultConfig:Op.defaultConfig,requiredFields:Op.requiredFields},{type:Ip.type,displayName:"Lookup Table",formComponent:tT,summaryComponent:aT,defaultConfig:Ip.defaultConfig,requiredFields:Ip.requiredFields}]};var lT=e("pcmOAiUc"),oA=e("+jOfIC1E"),iT=e("2dBXfbRP"),sA=e("2aaiYHqX");const cT=()=>{const{host:i,api_key:a}=s.A.telemetry()||{};return{host:i,key:a}},uT=(i,a)=>(oA.Ay.init(i,{autocapture:!1,api_host:a,capture_pageview:!1,capture_pageleave:!1}),oA.Ay),dT=({children:i})=>{const a=(0,K.P)(sA.m,B=>B.telemetrySetting),{host:u,key:T}=cT(),{currentUser:R}=(0,K.P)(k.y);return(0,n.useEffect)(()=>{R&&sA.g.get()},[R]),!(a!=null&&a.telemetry_enabled)||!u||!T?i:n.createElement(iT.so,{client:uT(T,u)},i)},mT={defaultOptions:{queries:{refetchOnWindowFocus:!1,networkMode:"always"}}},pT=({children:i})=>{const a=(0,n.useMemo)(()=>new Mu.QueryClient(mT),[]);return n.createElement(Mu.QueryClientProvider,{client:a},i)};var gT=e("BAvuEjdP");const ET={perspectives:[{id:"default",title:"General",welcomeRoute:ke.Ay.WELCOME,brandComponent:gT.A}]},aA=(i,a)=>i.filter(u=>!a.includes(u.path)),fT=(i,a)=>s.A.isCloud()?aA(i,a):i,hT=aA,vT={navigation:[{path:ke.Ay.unqualified.SEARCH,description:"Search"},{path:ke.Ay.unqualified.STREAMS,description:"Streams"},{path:ke.Ay.unqualified.ALERTS.LIST,description:"Alerts"},{path:ke.Ay.unqualified.DASHBOARDS,description:"Dashboards"},{description:"System",position:"last",children:fT(hT([{path:ke.Ay.unqualified.SYSTEM.OVERVIEW,description:"Overview"},{path:ke.Ay.unqualified.SYSTEM.CONFIGURATIONS,description:"Configurations",permissions:["clusterconfigentry:read"]},{path:ke.Ay.unqualified.SYSTEM.NODES.LIST,description:"Nodes"},{path:ke.Ay.unqualified.SYSTEM.DATANODES.LIST,description:"Data Nodes"},{path:ke.Ay.unqualified.SYSTEM.INPUTS,description:"Inputs",permissions:["inputs:read"]},{path:ke.Ay.unqualified.SYSTEM.OUTPUTS,description:"Outputs",permissions:["outputs:read"]},{path:ke.Ay.unqualified.SYSTEM.INDICES.LIST,description:"Indices",permissions:["indices:read"]},{path:ke.Ay.unqualified.SYSTEM.LOGGING,description:"Logging",permissions:["loggers:read"]},{path:ke.Ay.unqualified.SYSTEM.USERS.OVERVIEW,description:"Users and Teams",permissions:["users:list"]},{path:ke.Ay.unqualified.SYSTEM.AUTHZROLES.OVERVIEW,description:"Roles",permissions:["roles:read"]},{path:ke.Ay.unqualified.SYSTEM.AUTHENTICATION.BACKENDS.ACTIVE,description:"Authentication",permissions:["authentication:edit"]},{path:ke.Ay.unqualified.SYSTEM.CONTENTPACKS.LIST,description:"Content Packs",permissions:["contentpack:read"]},{path:ke.Ay.unqualified.SYSTEM.GROKPATTERNS,description:"Grok Patterns",permissions:["grok_pattern:read"]},{path:ke.Ay.unqualified.SYSTEM.LOOKUPTABLES.OVERVIEW,description:"Lookup Tables",permissions:["lookuptables:read"]},{path:ke.Ay.unqualified.SYSTEM.PIPELINES.OVERVIEW,description:"Pipelines",permissions:["pipeline:read","pipeline_connection:read"]},{path:ke.Ay.unqualified.SYSTEM.SIDECARS.OVERVIEW,description:"Sidecars",permissions:["sidecars:read"]}],s.A.isCloud()&&!s.A.isFeatureEnabled("cloud_inputs")?[ke.Ay.unqualified.SYSTEM.INPUTS]:[]),[ke.Ay.unqualified.SYSTEM.NODES.LIST,ke.Ay.unqualified.SYSTEM.DATANODES.LIST,ke.Ay.unqualified.SYSTEM.OUTPUTS,ke.Ay.unqualified.SYSTEM.LOGGING,ke.Ay.unqualified.SYSTEM.AUTHENTICATION.BACKENDS.ACTIVE])}]};var yT=e("3IogPG7u"),kT=e("r9b5ADx1"),QT=e("zKRkcYP2");d().setPromiseFactory(i=>lT.A.of(new Promise(i))),f.d.register(new f.b({},lf)),f.d.register(new f.b({},Sn)),f.d.register(new f.b({},Xo)),f.d.register(new f.b({},V_)),f.d.register(new f.b({},t0)),f.d.register(new f.b({},F0)),f.d.register(new f.b({},rT)),f.d.register(new f.b({},ET)),f.d.register(new f.b({},vT)),f.d.register(new f.b({},yT.A));const AT=document.querySelector("div#app-root");(0,c.H)(AT).render(n.createElement(zt,null,n.createElement(dT,null,n.createElement(pT,null,n.createElement(he,null)))))},"4E3oowBb":(x,y,e)=>{"use strict";e.d(y,{j:()=>r});const r=((s={})=>new Intl.Collator(void 0,s).compare)()},UMMlOSMl:(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const r={LOW:1,NORMAL:2,HIGH:3,properties:{1:{name:"low"},2:{name:"normal"},3:{name:"high"}}}},vT7mdtQI:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});const t=o=>JSON.stringify(o,null,2),s=(o,n)=>{throw new Error(`${n}: ${t(o)}`)}},"9tc+dS6Z":(x,y,e)=>{"use strict";e.d(y,{Is:()=>t,KU:()=>r,VN:()=>s,W2:()=>o,e2:()=>c,fE:()=>f,oe:()=>n});const t="ReactError",r="NotFoundError",s="UnauthorizedError",o="StreamPermissionError",n=(p,E)=>({error:p,info:E,type:t}),c=p=>({error:p,type:r}),g=p=>({error:p,type:s}),d=p=>({error:p,type:o}),f=p=>{var E,l;switch(p.status){case 403:return((l=(E=p==null?void 0:p.additional)==null?void 0:E.body)==null?void 0:l.type)==="MissingStreamPermission"?d(p):g(p);case 404:return c(p);default:throw Error(`Provided FetchError is not a valid ReportedError because status code ${p.status} is not supported`)}}},iltCXley:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("i3pQAyXy");const s=()=>(0,t.A)()},"7GNmVOX8":(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const t={set(s,o,n=window.localStorage){n.setItem(s,JSON.stringify(o))},get(s,o=window.localStorage){const n=o.getItem(s);if(n!=null)try{return JSON.parse(n)}catch{return n}},delete(s,o=window.localStorage){o.removeItem(s)},sessionSet(s,o){return t.set(s,o,window.sessionStorage)},sessionGet(s){return t.get(s,window.sessionStorage)},sessionDelete(s){return t.delete(s,window.sessionStorage)}},r=t},"0+7ljD5O":(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("InkdxEOv");const s={filterFields(o){const n={};return Object.keys(o).forEach(c=>{(0,t.A)(c)||(n[c]=o[c])}),n}}},"5qbhaJ1A":(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const r={getValuesForNode(s,o){if(s==null||Object.keys(s).length===0)return{};const n={};return Object.keys(o).forEach(c=>{const g=o[c],d=s[g];d&&(d.type==="gauge"?n[c]=d.metric.value:d.type==="counter"?n[c]=d.metric.count:d.type==="meter"||d.type==="timer"?n[c]=d.metric.rate.total:n[c]=null)}),n}}},Q1zRxDOP:(x,y,e)=>{"use strict";e.d(y,{U:()=>s,i:()=>r});const t=o=>o===""?void 0:o,r=(o,n)=>`grn::::${o}:${n}`,s=o=>{const n=o.split(":"),[c,g,d,f,p,E]=n.map(t);return{resourceNameType:c,cluster:g,tenant:d,scope:f,type:p,id:E}}},CIb2ALfk:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("VPaD/Np4"),r=e.n(t);class s{constructor(c,g,d){this._value={id:c,title:g,type:d}}get id(){return this._value.id}get title(){return this._value.title}get type(){return this._value.type}toBuilder(){const{id:c,title:g,type:d}=this._value;return new o(t.Map({id:c,title:g,type:d}))}toJSON(){const{id:c,title:g,type:d}=this._value;return{id:c,title:g,type:d}}static fromJSON(c){const{id:g,title:d,type:f}=c;return s.builder().id(g).title(d).type(f).build()}static builder(){return new o}}class o{constructor(c=t.Map()){this.value=c}id(c){return new o(this.value.set("id",c))}title(c){return new o(this.value.set("title",c))}type(c){return new o(this.value.set("type",c))}build(){const{id:c,title:g,type:d}=this.value.toObject();return new s(c,g,d)}}},EregcbZy:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("VPaD/Np4"),r=e.n(t),s=e("CIb2ALfk");class o{constructor(g,d,f,p){this._value={id:g,owners:d,title:f,type:p}}get id(){return this._value.id}get owners(){return this._value.owners}get title(){return this._value.title}get type(){return this._value.type}toBuilder(){const{id:g,owners:d,title:f}=this._value;return new n(t.Map({id:g,owners:d,title:f}))}toJSON(){const{id:g,owners:d,title:f,type:p}=this._value;return{id:g,owners:d,title:f,type:p}}static fromJSON(g){const{id:d,owners:f,title:p,type:E}=g,l=t.fromJS(f.map(m=>s.A.fromJSON(m)));return o.builder().id(d).owners(l).title(p).type(E).build()}static builder(){return new n}}class n{constructor(g=t.Map()){this.value=g}id(g){return new n(this.value.set("id",g))}owners(g){return new n(this.value.set("owners",g))}title(g){return new n(this.value.set("title",g))}type(g){return new n(this.value.set("type",g))}build(){const{id:g,owners:d,title:f,type:p}=this.value.toObject();return new o(g,d,f,p)}}},pcmOAiUc:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});const s=class Qu{constructor(n,c=!1){this._promise=n,this._isCanceled=c}then(n,c){return new Qu(this._promise.then(n,c),this._isCanceled)}catch(n){return new Qu(this._promise.catch(n),this._isCanceled)}finally(n){return new Qu(this._promise.finally(n),this._isCanceled)}static of(n){return new Qu(n)}cancel(){return this._isCanceled=!0,this}isCancelled(){return this._isCanceled}}},eFxcQyPT:(x,y,e)=>{"use strict";e.d(y,{M$:()=>P,Ay:()=>M,t2:()=>j,Rv:()=>O,Ur:()=>K,G$:()=>U,gB:()=>W});var t=e("euujeYld"),r=e.n(t),s=e("X6P4SH4J"),o=e.n(s);class n extends Error{constructor(k,Q,ne){var z,le;super(k),this.name="FetchError";const V=o()(ne)?ne:(z=ne==null?void 0:ne.message)!=null?z:"Not available";this.message=`There was an error fetching a resource: ${k}. Additional information: ${V}`,this.responseMessage=(le=ne==null?void 0:ne.message)!=null?le:void 0,this.additional={body:ne,status:Q,res:{text:o()(ne)&&ne}},this.status=Q}}var c=e("62FDaRYn"),g=e("9tc+dS6Z"),d=e("pcmOAiUc"),f=e("rjGM+nrz");const p=r()(()=>e("pc+thvZE")),E=()=>{f.G.reportSuccess()},l=G=>c.A.report((0,g.fE)(G)),m=G=>G&&G!==""?G:void 0,h=async(G,k=l)=>{var Q,ne;const z=(Q=G.headers)==null?void 0:Q.get("Content-Type"),le=await(z!=null&&z.startsWith("application/json")?G.json().then(Ve=>Ve):(ne=G==null?void 0:G.text)==null?void 0:ne.call(G)),{SessionStore:V,SessionActions:me}=p(),Pe=new n(G.statusText,G.status,m(le));throw V.isLoggedIn()&&G.status===401&&me.logout(),V.isLoggedIn()&&G.status===403&&k(Pe),G&&!G.status&&f.G.reportError(Pe),Pe},A=G=>G&&typeof G!="string"?JSON.stringify(G):G,C=G=>{if(G.ok){const{status:k}=G,Q=Number.parseInt(G.headers.get("Content-Length"),10),ne=k===204||Q===0;return E(),ne?null:G.json()}throw G},_=G=>{if(G.ok)return E(),G.text();throw G};class P{constructor(k,Q){this.options={},this.method=k,this.url=Q.replace(/([^:])\/\//,"$1/"),this.options={"X-Requested-With":"XMLHttpRequest","X-Requested-By":"XMLHttpRequest"},this.responseHandler=ne=>ne,this.errorHandler=void 0}setHeader(k,Q){return this.options={...this.options,[k]:Q},this}json(k){return this.body={body:A(k),mimeType:"application/json"},this.accept="application/json",this.responseHandler=C,this.errorHandler=Q=>h(Q),this}formData(k,Q="application/json"){return this.body={body:k},this.accept=Q,this.responseHandler=C,this.errorHandler=ne=>h(ne),this}file(k,Q){return this.body={body:A(k),mimeType:"application/json"},this.accept=Q,this.responseHandler=ne=>{if(ne.ok)return E(),ne.text();throw ne},this.errorHandler=ne=>h(ne),this}plaintext(k){return this.body={body:k,mimeType:"text/plain"},this.accept="application/json",this.responseHandler=C,this.errorHandler=Q=>h(Q),this}streamingplaintext(k){return this.body={body:k,mimeType:"text/plain"},this.accept="text/plain",this.responseHandler=_,this.errorHandler=Q=>h(Q),this}ignoreUnauthorized(){return this.errorHandler=k=>h(k,()=>{}),this}noSessionExtension(){return this.options={...this.options,"X-Graylog-No-Session-Extension":"true"},this}build(){const k=this.body&&this.body.mimeType?{...this.options,"Content-Type":this.body.mimeType}:this.options;return this.accept&&(k.Accept=this.accept),d.A.of(window.fetch(this.url,{method:this.method,headers:k,body:this.body?this.body.body:void 0})).then(this.responseHandler,this.errorHandler).catch(this.errorHandler)}}function I(G){const{SessionStore:k,SessionActions:Q}=p();return k.isLoggedIn()?G:()=>d.A.of(new Promise((ne,z)=>{Q.login.completed.listen(()=>{G().then(ne,z)})}))}function M(G,k,Q,ne=!0){const z=()=>new P(G,k).json(Q).build();return ne?I(z)():z()}function O(G,k,Q=!0){const ne=()=>new P("POST",G).formData(k).build();return Q?I(ne)():ne()}function U(G,k,Q){return I(()=>new P(G,k).plaintext(Q).build())()}function W(G,k,Q){return I(()=>new P(G,k).streamingplaintext(Q).build())()}function K(G,k,Q){return I(()=>new P(G,k).noSessionExtension().json(Q).build())()}function j(G,k,Q,ne="text/csv"){return I(()=>new P(G,k).file(Q,ne).build())()}},"jsQWU+f2":(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("kqAR+wt5"),r=e.n(t);let s=!1;const n={init(){s||(r()("#scroll-to-search-hint, #scroll-to-search-hint i").on("click",()=>{r()("html, body").animate({scrollTop:0},"fast")}),s=!0)},escape(c){return c.replace(/(&&|\|\||[:\\\/\+\-!\(\)\{\}\[\]\^"~*\?])/g,"\\$&")},_query(){return r()("#universalsearch-query")},setQuery(c){const g=this._query();g.val(c),g.effect("bounce"),this.scrollToSearchbarHint()},getQuery(){return this._query().val()},submit(){r()("#universalsearch form").submit()},createSourceQuery(c){return`source:${this.escape(c)}`},queryContainsSegment(c){return this.getQuery().split(" ").some(f=>f===c)},addSegment(c,g){let d=this.getQuery();if(this.queryContainsSegment(c))return;d==="*"&&(d="");let f="";typeof g<"u"&&d!==""&&(f=`${d} ${g} `),f+=c,this.setQuery(f)},andOperator(){return"AND"},orOperator(){return"OR"},notOperator(){return"NOT"},scrollToSearchbarHint(){r()(document).scrollTop()>50&&r()("#scroll-to-search-hint").fadeIn("fast").delay(1500).fadeOut("fast")},substringMatcher(c,g,d){return function(p,E){const l=[];c.forEach(m=>{if(l.length{if(l.length{"use strict";e.d(y,{Bv:()=>s,Gr:()=>t,rN:()=>r});const t=(o,n)=>(window.singletons[o]||(window.singletons[o]=n()),window.singletons[o]),r=(o,n)=>t(`${o}Actions`,n),s=(o,n)=>t(`${o}Store`,n);typeof window.singletons>"u"&&(window.singletons={})},"v4GbOr/o":(x,y,e)=>{"use strict";e.d(y,{g:()=>t});const t={SEARCH_TIMERANGE_PRESET_SELECTED:"Search TimeRange Preset Selected",SEARCH_TIMERANGE_PICKER_TOGGLED:"Search TimeRange Picker Toggled",SEARCH_TIMERANGE_PICKER_UPDATED:"Search TimeRange Picker Updated",SEARCH_TIMERANGE_PICKER_CANCELED:"Search TimeRange Picker Canceled",SEARCH_TIMERANGE_PICKER_TAB_SELECTED:"Search TimeRange Picker Tab Selected",SEARCH_STREAM_INPUT_CHANGED:"Search Stream Input Changed",SEARCH_REFRESH_CONTROL_PRESET_SELECTED:"Search Refresh Control Preset Selected",SEARCH_REFRESH_CONTROL_TOGGLED:"Search Refresh Control Toggled",SEARCH_BUTTON_CLICKED:"Search Button Clicked",SEARCH_FILTER_CREATE_CLICKED:"Search Filter Create Clicked",SEARCH_FILTER_CREATED:"Search Filter Created",SEARCH_FILTER_UPDATED:"Search Filter Updated",SEARCH_FILTER_DELETED:"Search Filter Deleted",SEARCH_FILTER_LOAD_CLICKED:"Search Filter Load Clicked",SEARCH_FILTER_LOADED:"Search Filter Loaded",SEARCH_FILTER_ITEM_MENU_TOGGLED:"Search Filter Item Menu Toggled",SEARCH_FILTER_ITEM_DISABLED_TOGGLED:"Search Filter Item Disabled Toggled",SEARCH_FILTER_ITEM_SHARE_CLICKED:"Search Filter Item Share Clicked",SEARCH_FILTER_ITEM_EDIT_CLICKED:"Search Filter Item Edit Clicked",SEARCH_FILTER_ITEM_COPIED:"Search Filter Item Copied",SEARCH_FILTER_ITEM_REMOVED:"Search Filter Item Removed",SEARCH_FILTER_ITEM_REFERENCE_REPLACED:"Search Filter Item Reference Replaced",SEARCH_FILTER_ITEM_NEGATION_TOGGLED:"Search Filter Item Negation Toggled",SEARCH_WIDGET_EXPORT_DOWNLOADED:"Search Widget Export Downloaded",SEARCH_TIMERANGE_PRESET_ADD_QUICK_ACCESS:"Search TimeRange Preset Add Quick Access",SEARCH_WIDGET_ACTION:{FOCUSED:"Search Widget Focused",DELETED:"Search Widget Deleted",MOVE:"Search Widget Moved",DUPLICATE:"Search Widget Duplicate",COPY_TO_DASHBOARD:"Search Widget Copy To Dashboard Clicked",CREATE_NEW_DASHBOARD:"Search Widget Create New Dashboard Clicked",SEARCH_WIDGET_HORIZONTAL_STRETCH:"Search Widget Horizontal Width Toggled",SEARCH_WIDGET_EXTRA_ACTION:"Search Widget Extra Action Clicked",WIDGET_EDIT_TOGGLED:"Search Widget Edit Toggled",WIDGET_EDIT_CANCEL_CLICKED:"Search Widget Edit Cancel Clicked",WIDGET_CONFIG_UPDATED:"Search Widget Config Updated"},SEARCH_WIDGET_CREATE:{AGGREGATION:"Search Widget Aggregation Created",MESSAGE_COUNT:"Search Widget Message Count Created",MESSAGE_TABLE:"Search Widget Message Table Created",LOG_VIEW:"Search Widget Log View Created"},SEARCH_FIELD_VALUE_ACTION:{CHART:"Search Field Action Chart Clicked",STATISTICS:"Search Field Action Statistics Clicked",SHOW_TOP_VALUES:"Search Field Action Show Top Values Clicked",ADD_TO_TABLE:"Search Field Action Add To Table Clicked",REMOVE_FROM_TABLE:"Search Field Action Remove From Table Clicked",ADD_TO_ALL_TABLES:"Search Field Action Add To All Tables Clicked",COPY_FIELD_NAME_TO_CLIPBOARD:"Search Field Action Copy Field Name To Clipboard Clicked",REMOVE_FROM_ALL_TABLES:"Search Field Action Remove From All Tables Clicked",EXCLUDE_FROM_RESULTS:"Search Value Action Exclude From Results Clicked",ADD_TO_QUERY:"Search Value Action Add To Query Clicked",SHOW_DOCUMENT_FOR_VALUE:"Search Value Action Show Document For Value Clicked",CREATE_EXTRACTOR:"Search Value Action Create Extractor Clicked",HIGHLIGHT_THIS_VALUE:"Search Value Action Highlight This Value Clicked",COPY_VALUE_TO_CLIPBOARD:"Search Value Action Copy Value To Clipboard Clicked",CREATE_EVENT_DEFINITION:"Search Value Action Create Event Definition Clicked",INSERT_INTO_DASHBOARD_SEARCH:"Search Value Action Insert Into Dashboard/Search Clicked",CHANGE_FIELD_TYPE_OPENED:"Search Field Action Change Field Type Opened",CHANGE_FIELD_TYPE_CLOSED:"Search Field Action Change Field Type Closed",CHANGE_FIELD_TYPE_CHANGED:"Search Field Action Change Field Type Changed",REMOVE_CUSTOM_FIELD_TYPE_OPENED:"Search Field Action Removed Custom Field Type Opened",REMOVE_CUSTOM_FIELD_TYPE_CLOSED:"Search Field Action Removed Custom Field Type Closed",REMOVE_CUSTOM_FIELD_TYPE_REMOVED:"Search Field Action Removed Custom Field Type Removed"},DASHBOARD_FULL_SCREEN_MODE_STARTED:"Dashboard Fullscreen Mode Started",SEARCH_MESSAGE_TABLE_SHOW_SURROUNDING_MESSAGE:"Search Message Table Show Surrounding Message Clicked ",SEARCH_MESSAGE_TABLE_TEST_AGAINST_STREAM:"Search Message Table Test Against Stream Clicked ",SEARCH_MESSAGE_TABLE_DETAILS_TOGGLED:"Widget Message Table Details Toggled",SEARCH_SIDEBAR_TOGGLE:"Search Sidebar Toggled",SEARCH_SIDEBAR_HIGHLIGHT_CREATED:"Search Sidebar Highlight Created",SEARCH_SIDEBAR_HIGHLIGHT_UPDATED:"Search Sidebar Highlight Updated",SEARCH_SIDEBAR_HIGHLIGHT_DELETED:"Search Sidebar Highlight Deleted",SEARCH_SIDEBAR_REDO:"Search Sidebar Redo",SEARCH_SIDEBAR_UNDO:"Search Sidebar Undo",DASHBOARD_ACTION:{DASHBOARD_NEW_SAVED:"Dashboard New Saved",DASHBOARD_SAVED:"Dashboard Saved",DASHBOARD_UPDATED:"Dashboard Updated",DASHBOARD_CREATE_CLICKED:"Dashboard Create Clicked",DASHBOARD_CREATE_PAGE:"Dashboard Create Page Clicked",DASHBOARD_PAGE_CONFIGURATION:"Dashboard Page Configuration Clicked",DASHBOARD_PAGE_CONFIGURATION_UPDATED:"Dashboard Page Configuration Updated",DASHBOARD_PAGE_CONFIGURATION_CANCELED:"Dashboard Page Configuration Update Cancel",DASHBOARD_PAGE_CONFIGURATION_SORTING_UPDATED:"Dashboard Page Configuration Sorting Updated",DASHBOARD_PAGE_CONFIGURATION_PAGE_REMOVED:"Dashboard Page Configuration Page Remove"},EVENTDEFINITION_LIST:{COLUMNS_CHANGED:"EventDefinition List Columns Changed",SORT_CHANGED:"EventDefinition List Sort Changed",PAGE_SIZE_CHANGED:"EventDefinition List Page Size Changed",BULK_ACTION_DELETE_CLICKED:"EventDefinition List Bulk Delete Clicked",BULK_ACTION_ENABLE_CLICKED:"EventDefinition List Bulk Enable Clicked",BULK_ACTION_DISABLE_CLICKED:"EventDefinition List Bulk Disable Clicked",ROW_ACTION_DELETE_CLICKED:"EventDefinition List Row Delete Clicked",ROW_ACTION_ENABLE_CLICKED:"EventDefinition List Row Enable Clicked",ROW_ACTION_DISABLE_CLICKED:"EventDefinition List Row Disable Clicked",ROW_ACTION_COPY_CLICKED:"EventDefinition List Row Copy Clicked",ROW_ACTION_SHARE_CLICKED:"EventDefinition List Row Share Clicked"},EVENTDEFINITION_CREATE_BUTTON_CLICKED:"EventDefinition Create Button Clicked",EVENTDEFINITION_DUPLICATED:"EventDefinition Duplicated",EVENTDEFINITION_NEXT_CLICKED:"EventDefinition Next Clicked",EVENTDEFINITION_PREVIOUS_CLICKED:"EventDefinition Previous Clicked",EVENTDEFINITION_DETAILS:{STEP_CLICKED:"EventDefinition Details Step Clicked",PRIORITY_CHANGED:"EventDefinition Details Priority Changed"},EVENTDEFINITION_CONDITION:{STEP_CLICKED:"EventDefinition Condition Step Clicked",TYPE_SELECTED:"EventDefinition Condition Type Selected",FILTER_STREAM_SELECTED:"EventDefinition Condition Filter Stream Selected",FILTER_SEARCH_WITHIN_THE_LAST_UNIT_CHANGED:"EventDefinition Condition Filter Search Within The Last Unit Changed",FILTER_EXECUTE_SEARCH_EVERY_UNIT_CHANGED:"EventDefinition Condition Filter Execute Search Every Unit Changed",FILTER_EXECUTED_AUTOMATICALLY_TOGGLED:"EventDefinition Condition Filter Executed Automatically Toggled",FILTER_EVENT_LIMIT_CHANGED:"EventDefinition Condition Filter Event Limit Changed",AGGREGATION_TOGGLED:"EventDefinition Aggregation Toggled",AGGREGATION_GROUP_BY_FIELD_SELECTED:"EventDefinition Aggregation Group By Field Selected",CORRELATION_WITHIN_THE_LAST_UNIT_CHANGED:"EventDefinition Condition Correlation Within The Last Unit Changed",CORRELATION_EXECUTE_EVERY_UNIT_CHANGED:"EventDefinition Condition Correlation Execute Every Unit Changed",CORRELATION_EXECUTED_AUTOMATICALLY_TOGGLED:"EventDefinition Condition Correlation Executed Automatically Toggled",CORRELATION_EVENT_SELECTED:"EventDefinition Condition Correlation Event Selected",CORRELATION_ADD_EVENT_CLICKED:"EventDefinition Condition Correlation Add Event Clicked",CORRELATION_REMOVE_EVENT_CLICKED:"EventDefinition Condition Correlation Remove Event Clicked",CORRELATION_OCCURRENCE_TIME_CHANGED:"EventDefinition Condition Correlation Occurrence Time Changed",CORRELATION_NO_OCCURRENCE_FOLLOWED_BY_EVENT_SELECTED:"EventDefinition Condition Correlation No Occurrence Followed By Event Selected",CORRELATION_NO_OCCURRENCE_IN_THE_NEXT_SELECTED:"EventDefinition Condition Correlation No Occurrence In The Next Selected",CORRELATION_NO_OCCURRENCE_IN_THE_NEXT_UNIT_CHANGED:"EventDefinition Condition Correlation No Occurrence In The Next Unit Changed"},EVENTDEFINITION_FIELDS:{STEP_CLICKED:"EventDefinition Fields Step Clicked",ADD_CUSTOM_FIELD_CLICKED:"EventDefinition Fields Add Custom Field Clicked",AS_EVENT_KEY_TOGGLED:"EventDefinition Fields As Event Key Toggled",SET_VALUE_FROM_TEMPLATE_SELECTED:"EventDefinition Fields Set Value From Template Selected",SET_VALUE_FROM_LOOKUP_TABLE_SELECTED:"EventDefinition Fields Set Value From Lookup Table Selected",DONE_CLICKED:"EventDefinition Fields Done Clicked",CANCEL_CLICKED:"EventDefinition Fields Cancel Clicked"},EVENTDEFINITION_NOTIFICATIONS:{STEP_CLICKED:"EventDefinition Notifications Step Clicked",ADD_CLICKED:"EventDefinition Notifications Add Clicked",MANAGE_LINK_CLICKED:"EventDefinition Notifications Manage Link Clicked",NOTIFICATION_SELECTED:"EventDefinition Notifications Notification Selected",CREATE_NEW_CLICKED:"EventDefinition Notifications Create New Clicked",NOTIFICATION_TYPE_SELECTED:"EventDefinition Notifications Notification Type Selected",DONE_CLICKED:"EventDefinition Notifications Done Clicked",CANCEL_CLICKED:"EventDefinition Notifications Cancel Clicked"},EVENTDEFINITION_SUMMARY:{STEP_CLICKED:"EventDefinition Summary Step Clicked",CANCEL_CLICKED:"EventDefinition Summary Cancel Clicked",CREATE_CLICKED:"EventDefinition Summary Create Clicked",UPDATE_CLICKED:"EventDefinition Summary Update Clicked"},NOTIFICATIONS:{CREATE_CLICKED:"Notifications Create Clicked",EDIT_CLICKED:"Notifications Edit Clicked",EXECUTE_TEST_CLICKED:"Notifications Execute Test Clicked",BULK_ACTION_DELETE_CLICKED:"Notifications Bulk Delete Clicked",ROW_ACTION_DELETE_CLICKED:"Notifications Row Delete Clicked",ROW_ACTION_TEST_CLICKED:"Notifications Row Test Clicked"},CONTENTSTREAM:{PREV_ARROW_CLICKED:"Content Stream Left Arrow Clicked",NEXT_ARROW_CLICKED:"Content Stream Right Arrow Clicked",READ_MORE_CLICKED:"Content Stream Read More Clicked",ARTICLE_CLICKED:"Content Stream Article Clicked",RELESE_ARTICLE_CLICKED:"Content Stream Release Article Clicked",NEWS_OPT_IN_TOGGLED:"Content Stream News Opt-In Clicked",RELEASE_OPT_IN_TOGGLED:"Content Stream Release Opt-In Clicked"},STREAMS:{CREATE_FORM_MODAL_OPENED:"Stream Create Form Modal Opened",NEW_STREAM_CREATED:"Stream New Stream Created",STREAM_ITEM_UPDATED:"Stream Item Updated",STREAM_ITEM_STATUS_TOGGLED:"Stream Item Status Toggled",STREAM_ITEM_SHARE_MODAL_OPENED:"Stream Item Share Modal Opened",STREAM_ITEM_UPDATE_MODAL_OPENED:"Stream Item Update Modal Opened",STREAM_ITEM_CLONED:"Stream Item Cloned",STREAM_ITEM_RULE_SAVED:"Stream Item Rule SAVED",STREAM_ITEM_DELETED:"Stream Item Deleted"},ENTITYSHARE:{ENTITY_STREAM_SHARED:"Entity Share: Entity Stream Shared",ENTITY_SEARCH_SHARED:"Entity Share: Entity Search Shared",ENTITY_SEARCH_FILTER_SHARED:"Entity Share: Entity Filter Shared",ENTITY_EVENT_DEFINITION_SHARED:"Entity Share: Event Definition Shared",ENTITY_NOTIFICATION_SHARED:"Entity Share: Notification Shared",ENTITY_DASHBOARD_SHARED:"Entity Share: Dashboard Shared"},PIPELINE_RULE_BUILDER:{CREATE_RULE_CLICKED:"Pipeline Create Rule Clicked",RUN_RULE_SIMULATION_CLICKED:"Pipeline Run Rule Simulation Clicked",RESET_RULE_SIMULATION_CLICKED:"Pipeline Reset Rule Simulation Clicked",USE_SOURCE_CODE_EDITOR_CLICKED:"Pipeline RuleBuilder Use Source Code Editor Clicked",SWITCH_TO_SOURCE_CODE_EDITOR_CONFIRM_CLICKED:"Pipeline RuleBuilder Switch to Source Code Editor Confirm Clicked",SWITCH_TO_SOURCE_CODE_EDITOR_CANCEL_CLICKED:"Pipeline RuleBuilder Switch to Source Code Editor Cancel Clicked",CREATE_NEW_RULE_FROM_CODE_CLICKED:"Pipeline RuleBuilder Create New Rule From Code Clicked",COPY_CODE_AND_CLOSE_CLICKED:"Pipeline RuleBuilder Code Copy & Close Clicked",NEW_CONDITION_SELECTED:"Pipeline RuleBuilder New Condition Selected",NEW_ACTION_SELECTED:"Pipeline RuleBuilder New Action Selected",ADD_CONDITION_CLICKED:"Pipeline RuleBuilder Add Condition Clicked",ADD_ACTION_CLICKED:"Pipeline RuleBuilder Add Action Clicked",UPDATE_CONDITION_CLICKED:"Pipeline RuleBuilder Update Condition Clicked",UPDATE_ACTION_CLICKED:"Pipeline RuleBuilder Update Action Clicked",CANCEL_CLICKED:"Pipeline RuleBuilder Cancel Clicked",ADD_RULE_CLICKED:"Pipeline RuleBuilder Add Rule Clicked",CONVERT_TO_SOURCE_CODE_CLICKED:"Pipeline RuleBuilder Convert to Source Code Clicked",OPERATOR_AND_CLICKED:"Pipeline RuleBuilder Operator AND Clicked",OPERATOR_OR_CLICKED:"Pipeline RuleBuilder Operator OR Clicked",UPDATE_RULE_CLICKED:"Pipeline RuleBuilder Update Rule Clicked",UPDATE_RULE_AND_CLOSE_CLICKED:"Pipeline RuleBuilder Update Rule And Close Clicked",NEGATE_CONDITION_CLICKED:"Pipeline RuleBuilder Negate Condition Clicked",DUPLICATE_ACTION_CLICKED:"Pipeline RuleBuilder Duplicate Action Clicked",INSERT_ABOVE_ACTION_CLICKED:"Pipeline RuleBuilder Insert Above Action Clicked",INSERT_BELOW_ACTION_CLICKED:"Pipeline RuleBuilder Insert Below Action Clicked",DELETE_CONDITION_CLICKED:"Pipeline RuleBuilder Delete Condition Clicked",DELETE_ACTION_CLICKED:"Pipeline RuleBuilder Delete Action Clicked",EDIT_CONDITION_CLICKED:"Pipeline RuleBuilder Edit Condition Clicked",EDIT_ACTION_CLICKED:"Pipeline RuleBuilder Edit Action Clicked"},ILLUMINATE:{BUNDLE_UPLOADED:"Illuminate Bundle Uploaded",BUNDLE_DOWNLOADED_AND_INSTALLED:"Illuminate Bundle Downloaded and Installed",PACK_ENABLE_MODAL_TOGGLED:"Illuminate Pack Enable Modal Toggled",PACK_DISABLE_MODAL_TOGGLED:"Illuminate Pack Modal Toggled",PACKS_BULK_UPDATED:"Illuminate Packs Bulk Updated",PACKS_OVERRIDE_FORM_OPENED:"Illuminate Packs Override Form Opened",PACKS_OVERRIDE_SAVED:"Illuminate Packs Override Saved"},SECURITY_APP:{ASSET_DELETED:"Security Asset Deleted",ASSET_SOURCE_DELETED:"Security Asset Source Deleted",ASSET_CONFIG_REPRIORITIZED:"Security Asset Config Reprioritized",ASSET_CONFIG_CATEGORY_ADDED:"Security Asset Config Category Added",ASSET_CONFIG_CATEGORY_UPDATED:"Security Asset Config Category Updated",ASSET_CONFIG_CATEGORY_DELETED:"Security Asset Config Category Deleted",ASSET_CONFIG_PRIORITY_ADDED:"Security Asset Config Priority Added",ASSET_CONFIG_PRIORITY_UPDATED:"Security Asset Config Priority Updated",ASSET_CONFIG_PRIORITY_DELETED:"Security Asset Config Priority Deleted",INVESTIGATION_UPDATED:"Security Investigation Update",INVESTIGATION_ARCHIVED:"Security Investigation Archived",INVESTIGATION_EDITED:"Security Investigation Updated",INVESTIGATION_RESTORED:"Security Investigation Restored",INVESTIGATION_DELETED:"Security Investigation Deleted",INVESTIGATION_PRIORITY_ADDED:"Security Investigation Priority Added",INVESTIGATION_PRIORITY_UPDATED:"Security Investigation Priority Updated",INVESTIGATION_PRIORITY_DELETED:"Security Investigation Priority Deleted",INVESTIGATION_PRIORITY_REPRIORITIZED:"Security Investigation Priority Reprioritized",INVESTIGATION_PRIORITY_DEFAULT_SET:"Security Investigation Priority Default Set",INVESTIGATION_PRIORITY_DEFAULT_REMOVED:"Security Investigation Priority Default Removed",INVESTIGATION_STATUS_ADDED:"Security Investigation Status Added",INVESTIGATION_STATUS_UPDATED:"Security Investigation Status Updated",INVESTIGATION_STATUS_DELETED:"Security Investigation Status Deleted",INVESTIGATION_STATUS_REPRIORITIZED:"Security Investigation Status Reprioritized",INVESTIGATION_STATUS_DEFAULT_SET:"Security Investigation Status Default Set",INVESTIGATION_STATUS_DEFAULT_REMOVED:"Security Investigation Status Default Removed",INVESTIGATION_DETAILS_UPDATED:"Security Investigation Details Updated",INVESTIGATION_DRAWER_OPENED:"Security Investigation Drawer Opened",INVESTIGATION_DRAWER_CLOSED:"Security Investigation Drawer Closed",INVESTIGATION_DRAWER_COLLAPSE_TOGGLED:"Security Investigation Drawer Collapse Toggled",INVESTIGATION_NOTE_ADDED:"Security Investigation Note Added",INVESTIGATION_NOTE_SAVED:"Security Investigation Note Saved",INVESTIGATION_NOTE_EDIT:"Security Investigation Note Updated",INVESTIGATION_NOTE_DELETED:"Security Investigation Note Deleted",SIGMA_IMPORT_RULES_OPENED:"Security Sigma Rules Import Opened",SIGMA_IMPORT_RULES_IMPORTED:"Security Sigma Rules Imported",SIGMA_RULE_UPDATED:"Security Sigma Rules Update",SIGMA_RULE_CREATED:"Security Sigma Rules Created",ANOMALY_DETECTION_SAVED:"Security Anomaly Detection Saved",ANOMALY_DETECTION_DELETED:"Security Anomaly Detection Deleted"},FORWARDER:{INPUTPROFILE_FORWARDER_ASSIGNED:"Forwarder Input Profile Forwarder Assigned",FORWARDER_WIZARD_WELCOME_STEP_OPENED:"Forwarder Wizard Welcome Step Opened",FORWARDER_WIZARD_SELECT_FORWARDER_STEP_OPENED:"Forwarder Wizard Select Forwarder Step Opened",FORWARDER_WIZARD_CONFIGURE_FORWARDER_STEP_OPENED:"Forwarder Wizard Configure Forwarder Step Opened",FORWARDER_WIZARD_INPUTS_STEP_OPENED:"Forwarder Wizard Forwarder Inputs Step Opened",FORWARDER_WIZARD_SUMMARY_STEP_OPENED:"Forwarder Wizard Forwarder Summary Step Opened",FORWARDER_WIZARD_CONFIGURE_FORWARDER_SELECTED:"Forwarder Wizard Configure Forwarder Selected",FORWARDER_WIZARD_CONFIGURE_FORWARDER_SAVED:"Forwarder Wizard Configure Forwarder Saved",FORWARDER_WIZARD_INPUT_PROFILE_SELECTED:"Forwarder Wizard Input Profile Selected",FORWARDER_WIZARD_INPUT_PROFILE_SAVED:"Forwarder Wizard Input Profile Saved",FORWARDER_INPUT_PROFILE_CREATED:"Forwarder Input Profile Created",FORWARDER_CREATED:"Forwarder Created",FORWARDER_UPDATED:"Forwarder Updated",FORWARDER_DELETED:"Forwarder Created",FORWARDER_CONFIGURATION_REMOVED:"Forwarder Configuration Removed",FORWARDER_INPUT_PROFILE_UPDATED:"Forwarder Input Profile Updated",FORWARDER_INPUT_PROFILE_FORWARDER_ASSIGNED:"Forwarder Input Profile Forwarder Assigned",FORWARDER_INPUT_PROFILE_CREATE_CANCELED:"Forwarder Input Profile Create Canceled",FORWARDER_INPUT_PROFILE_INPUT_CREATED:"Forwarder Input Profile Input Created",FORWARDER_INPUT_PROFILE_INPUT_UPDATED:"Forwarder Input Profile Input Updated",FORWARDER_INPUT_PROFILE_INPUT_DELETED:"Forwarder Input Profile Input Deleted",FORWARDER_WIZARD_SETUP_CANCELED:"Forwarder Wizard Setup Canceled"},ARCHIVE:{DELETED:"Archive Deleted",RESTORED:"Archive Restored",CREATED:"Archive Created",ITEM_DETAILS_TOGGLED:"Archive Item Details Opened",BACKEND_CONFIGURATION_UPDATED:"Archive Backend Configuration Updated",BACKEND_CONFIGURATION_CREATED:"Archive Backend Configuration Created",BACKEND_CONFIGURATION_DELETED:"Archive Backend Configuration Deleted",CONFIGURATION_UPDATED:"Archive Configuration Update"},LICENSE:{VALIDATED:"License Validated",SAVED:"License Saved",DELETED:"License Deleted"},REPORT:{CONFIGURED:"Report Configured",DELETED:"Report Deleted",SENT:"Report Sent",CREATED:"Report Created",UPDATED:"Report Updated"},CUSTOMIZATION:{NOTIFICATION_CREATED:"Customization Notification Created",NOTIFICATION_DELETED:"Customization Notification Deleted",NOTIFICATION_BULK_DELETED:"Customization Notification Bulk Deleted",THEME_REVERTED:"Customization Theme Reverted",THEME_RESETED:"Customization Theme Reseted",HEADER_BADGE_UPDATED:"Customization Header Badge Updated"},TRAFFIC_VIOLATION_CONFIGURATION_SAVED:"Traffic Violation Configuration Saved",FAILURE_PROCESSING_CONFIGURATION_SAVED:"Failure Processing Configuration Saved",SHORTCUT_TYPED:"Shortcut Typed",CONFIGURATIONS:{INDEX_SETS_UPDATED:"Configurations Index Sets Defaults Updated",THREATINTEL_CONFIGURATION_UPDATED:"Configurations Threat Intel Configuration Updated",PERMISSIONS_UPDATED:"Configurations Permissions Updated",SEARCHES_UPDATED:"Configurations Searches Updated",URL_WHITE_LIST_UPDATED:"Configurations Url White List Updated",USER_UPDATED:"Configurations User Updated",CERTIFICATE_RENEWAL_UPDATED:"Configurations Certificate Renewal Updated",CERTIFICATE_RENEWAL_POLICY_UPDATED:"Configurations Certificate Renewal Policy Updated",DECORATORS_UPDATED:"Configurations Decorators Updated",GEOLOCATION_CONFIGURATION_UPDATED:"Configurations Geolocation Configuration Updated"},INPUTS:{INPUT_SELECTED:"Inputs Input Selected",INPUT_CREATED:"Inputs Input Created",FIND_MORE_CLICKED:"Inputs Find More Inputs Clicked",INPUT_DELETED:"Inputs Input Deleted",INPUT_EDIT_CLICKED:"Inputs Input Edit Clicked",INPUT_UPDATED:"Inputs Input Updated",SHOW_RECEIVED_MESSAGES_CLICKED:"Inputs Show Received Messages Clicked",MANAGE_EXTRACTORS_CLICKED:"Inputs Manage Extractors Clicked",SHOW_METRICS_CLICKED:"Inputs Show Metrics Clicked",INPUT_START_CLICKED:"Inputs Input Start Clicked",INPUT_STOP_CLICKED:"Inputs Input Stop Clicked"},OUTPUTS:{OUTPUT_CREATED:"Outputs Output Created",OUTPUT_ASSIGNED:"Outputs Output Assigned",OUTPUT_GLOBALLY_REMOVED:"Outputs Output Globally Removed",OUTPUT_FROM_STREAM_REMOVED:"Outputs Output From Stream Removed",OUTPUT_UPDATED:"Outputs Output Updated"},INDICES:{INDEX_SET_DEFAULT_SET:"Indices Index Set Default Set",INDEX_SET_DELETED:"Indices Index Set Deleted",INDEX_SET_CREATED:"Indices Index Set Created",INDEX_SET_UPDATED:"Indices Index Set Updated"},LOGGING:{LOG_LEVEL_EDITED:"Logging Log Level Edited",SHOW_LOG_LEVEL_METRICS_TOGGLED:"Logging Show Log Level Metrics Toggled"},LUT:{DELETED:"LUT Deleted",CREATED:"LUT Created",UPDATED:"LUT Updated",CACHE_TYPE_CHANGED:"LUT Cache Type Changed",CACHE_DELETED:"LUT Cache Deleted",CACHE_CREATED:"LUT Cache Created",CACHE_UPDATED:"LUT Cache Updated",DATA_ADAPTER_DELETED:"LUT Data Adapter Deleted",DATA_ADAPTER_CREATED:"LUT Data Adapter Created",DATA_ADAPTER_UPDATED:"LUT Data Adapter Updated"},USERS:{USER_CREATED:"Users User Created",USER_DISABLED:"Users User Disabled",USER_ENABLED:"Users User Enabled",USER_DELETED:"Users User Deleted"},GROK_PATTERN:{CREATED:"Grok Pattern Created",UPDATED:"Grok Pattern Updated",DELETED:"Grok Pattern Deleted",TESTED:"Grok Pattern Tested",IMPORTED:"Grok Pattern Imported"},ROLES:{USER_ASSIGNED:"Roles User Assigned",USER_UNASSIGNED:"Roles User Unassigned"},AUTHENTICATION:{CONFIG_UPDATED:"Authentication Config Updated",SERVICE_CREATED:"Authentication Service Created",SERVICE_SELECTED:"Authentication Service Selected",DIRECTORY_SERVER_CONFIG_SAVE_CLICKED:"Authentication Directory Server Config Save Clicked",DIRECTORY_USER_SYNC_SAVE_CLICKED:"Authentication Directory User Sync Save Clicked",DIRECTORY_GROUP_SYNC_SAVE_CLICKED:"Authentication Directory Group Sync Save Clicked",DIRECTORY_NEXT_USER_SYNC_CLICKED:"Authentication Directory Next User Sync Clicked",DIRECTORY_NEXT_GROUP_SYNC_CLICKED:"Authentication Directory Next Group Sync Clicked",OIDC_SERVER_CONFIG_SAVE_CLICKED:"Authentication OIDC Server Config Save Clicked",OIDC_NEXT_GROUP_SYNC_CLICKED:"Authentication OIDC Next Group Sync Clicked",OIDC_PREVIOUS_SERVER_CONFIG_CLICKED:"Authentication OIDC Previous Server Config Clicked",OIDC_GROUP_SYNC_SAVE_CLICKED:"Authentication OIDC Group Sync Save Clicked"},SIDECARS:{CONFIGURATION_CREATED:"Sidecar Configuration Created",CONFIGURATION_UPDATED:"Sidecar Configuration Updated",CONFIGURATION_CLONED:"Sidecar Configuration Cloned",CONFIGURATION_DELETED:"Sidecar Configuration Deleted",CONFIGURATION_ASSIGNED:"Sidecar Configuration Assigned",PROCESS_ACTION_SET:"Sidecar Process Action Set",LOG_COLLECTOR_CLONED:"Sidecar Log Collector Cloned",LOG_COLLECTOR_CREATED:"Sidecar Log Collector Created",LOG_COLLECTOR_SERVICE_TYPE_CHANGED:"Sidecar Log Collector Service Type Changed",LOG_COLLECTOR_NODE_OPERATING_SYSTEM_CHANGED:"Sidecar Log Collector Node Operating System Changed",LOG_COLLECTOR_UPDATED:"Sidecar Log Collector Updated",LOG_COLLECTOR_DELETED:"Sidecar Log Collector Deleted"},SYSTEM_OVERVIEW_OUTGOING_TRAFFIC_DAYS_CHANGED:"System Overview Outgoing Traffic Days Changed",URLWHITELIST_CONFIGURATION_UPDATED:"Urlwhitelist Configuration Updated",CONTENT_PACK:{INSTALLED:"Content Pack Installed",DOWNLOADED:"Content Pack Downloaded",ALL_VERSIONS_DELETED:"Content Pack All Versions Deleted"},TEAM:{CREATED:"Team Created",ASSIGNED:"Team Assigned",UNASSIGNED:"Team Unassigned",DELETED:"Team Deleted"},INDEX_SET_FIELD_TYPE_PROFILE:{NEW_OPENED:"Index Set Field Type Profile Creating New Opened",NEW_CANCELED:"Index Set Field Type Profile Creating New Canceled",CREATED:"Index Set Field Type Profile Created",EDIT_OPENED:"Index Set Field Type Profile Edit Opened",EDIT_CANCELED:"Index Set Field Type Profile Edit Canceled",EDIT:"Index Set Field Type Profile Edited",CHANGE_FOR_INDEX_OPENED:"Index Set Field Type Profile Change For Index Opened",CHANGE_FOR_INDEX_CANCELED:"Index Set Field Type Profile Change For Index Canceled",CHANGE_FOR_INDEX_CHANGED:"Index Set Field Type Profile Change For Index Changed",CHANGE_FOR_INDEX_REMOVED:"Index Set Field Type Profile Change For Index Removed",CREATE_PROFILE_FROM_SELECTED_RAN:"Index Set Field Type Profile Create From Selected Ran"}}},"Crt2wUQ/":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext({sendTelemetry:()=>{}}),o=(0,r.Gr)("contexts.TelemetryContext",()=>s)},"8OvTct/Z":(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("Z7aTuO5B"),r=e("Crt2wUQ/"),s=e("yAXMqwrl"),o=e("IA3Ku5lS");const n=()=>{const f=(0,s.useLocation)(),p=(0,t.useContext)(s.UNSAFE_DataRouterContext);return(0,t.useMemo)(()=>{var E;if((E=p==null?void 0:p.router)!=null&&E.routes){const{router:{routes:l}}=p,m=(0,s.matchRoutes)(l,f.pathname),{route:h}=m.at(-1);return h.path}},[f.pathname,p])},c=(0,o.Gr)("hooks.useRoutePattern",()=>n),d=()=>{const{sendTelemetry:f}=(0,t.useContext)(r.A),p=c();return(0,t.useCallback)((E,l)=>f(E,{app_path_pattern:p,...l}),[f,p])}},BqxuktKK:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("8OvTct/Z");const o=n=>function(g){const d=(0,r.A)();return t.createElement(n,{...g,sendTelemetry:d})}},"vMorKP/N":(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("VPaD/Np4"),r=e.n(t);class s{constructor(c,g,d,f,p,E,l,m,h,A,C,_,P,I,M,O,U,W,K,j,G){this._value={id:c,username:g,fullName:d,firstName:f,lastName:p,email:E,permissions:l,timezone:m,preferences:h,roles:A,readOnly:C,external:_,sessionTimeoutMs:P,startpage:I,sessionActive:M,clientAddress:O,lastActivity:U,accountStatus:W,grnPermissions:j,serviceAccount:K,authServiceEnabled:G}}get id(){return this._value.id}get username(){return this._value.username}get fullName(){return this._value.fullName}get firstName(){return this._value.firstName}get lastName(){return this._value.lastName}get email(){return this._value.email}get grnPermissions(){return this._value.grnPermissions}get permissions(){return this._value.permissions}get timezone(){return this._value.timezone}get preferences(){return this._value.preferences}get roles(){return this._value.roles}get readOnly(){return this._value.readOnly}get external(){return this._value.external}get accountStatus(){return this._value.accountStatus}get serviceAccount(){return this._value.serviceAccount}get sessionTimeoutMs(){return this._value.sessionTimeoutMs}get sessionTimeout(){if(!this.sessionTimeoutMs)return;const c=24*60*60*1e3,g=60*60*1e3,d=60*1e3,f=1e3,E=(m=>m===0?[f,"Seconds"]:m%c===0?[c,"Days"]:m%g===0?[g,"Hours"]:m%d===0?[d,"Minutes"]:[f,"Seconds"])(this.sessionTimeoutMs);return{value:Math.floor(this.sessionTimeoutMs/E[0]),unitMS:E[0],unitString:E[1]}}get startpage(){return this._value.startpage}get sessionActive(){return this._value.sessionActive}get clientAddress(){return this._value.clientAddress}get lastActivity(){return this._value.lastActivity}get authServiceEnabled(){return this._value.authServiceEnabled}toBuilder(){const{id:c,username:g,fullName:d,firstName:f,lastName:p,email:E,permissions:l,grnPermissions:m,timezone:h,preferences:A,roles:C,readOnly:_,external:P,sessionTimeoutMs:I,startpage:M,sessionActive:O,clientAddress:U,lastActivity:W,accountStatus:K,serviceAccount:j,authServiceEnabled:G}=this._value;return new o(t.Map({id:c,username:g,fullName:d,firstName:f,lastName:p,email:E,permissions:l,timezone:h,grnPermissions:m,preferences:A,roles:C,readOnly:_,external:P,sessionTimeoutMs:I,startpage:M,sessionActive:O,clientAddress:U,lastActivity:W,accountStatus:K,serviceAccount:j,authServiceEnabled:G}))}static create(c,g,d,f,p,E,l,m,h,A,C,_,P,I,M,O,U,W,K,j,G){return new s(c,g,d,f,p,E,l,m,h,A,C,_,P,I,M,O,U,W,K,j,G)}static empty(){return s.create("","","","",t.List(),"",{},t.Set(),!1,!1,-1,void 0,!1,"","","enabled")}toJSON(){const{id:c,username:g,fullName:d,firstName:f,lastName:p,email:E,grnPermissions:l,permissions:m,timezone:h,preferences:A,roles:C,readOnly:_,external:P,sessionTimeoutMs:I,startpage:M,sessionActive:O,clientAddress:U,lastActivity:W,accountStatus:K,serviceAccount:j,authServiceEnabled:G}=this._value;return{id:c,username:g,full_name:d,first_name:f,last_name:p,email:E,grn_permissions:l?l.toJS():[],permissions:m?m.toArray():[],timezone:h,preferences:A,roles:C?C.toArray():[],read_only:_,external:P,session_timeout_ms:I,startpage:M,session_active:O,client_address:U,last_activity:W,account_status:K,service_account:j,auth_service_enabled:G}}static fromJSON(c){const{id:g,username:d,full_name:f,first_name:p,last_name:E,email:l,grn_permissions:m,permissions:h,timezone:A,preferences:C,roles:_,read_only:P,external:I,session_timeout_ms:M,startpage:O,session_active:U,client_address:W,last_activity:K,account_status:j,service_account:G,auth_service_enabled:k}=c;return s.create(g,d,f,p,E,l,t.List(h),A,C,t.Set(_),P,I,M,O,U,W,K,j,G,t.List(m),k)}static builder(){return new o}}class o{constructor(c=t.Map()){this.value=c}id(c){return new o(this.value.set("id",c))}username(c){return new o(this.value.set("username",c))}fullName(c){return new o(this.value.set("fullName",c))}firstName(c){return new o(this.value.set("firstName",c))}lastName(c){return new o(this.value.set("lastName",c))}email(c){return new o(this.value.set("email",c))}grnPermissions(c){return new o(this.value.set("grnPermissions",c))}permissions(c){return new o(this.value.set("permissions",c))}timezone(c){return new o(this.value.set("timezone",c))}preferences(c){return new o(this.value.set("preferences",c))}roles(c){return new o(this.value.set("roles",c))}readOnly(c){return new o(this.value.set("readOnly",c))}external(c){return new o(this.value.set("external",c))}sessionTimeoutMs(c){return new o(this.value.set("sessionTimeoutMs",c))}startpage(c){return new o(this.value.set("startpage",c))}sessionActive(c){return new o(this.value.set("sessionActive",c))}clientAddress(c){return new o(this.value.set("clientAddress",c))}lastActivity(c){return new o(this.value.set("lastActivity",c))}accountStatus(c){return new o(this.value.set("accountStatus",c))}serviceAccount(c){return new o(this.value.set("serviceAccount",c))}authServiceEnabled(c){return new o(this.value.set("authServiceEnabled",c))}build(){const{id:c,username:g,fullName:d,firstName:f,lastName:p,email:E,permissions:l,timezone:m,preferences:h,roles:A,readOnly:C,external:_,sessionTimeoutMs:P,startpage:I,sessionActive:M,clientAddress:O,lastActivity:U,accountStatus:W,serviceAccount:K,grnPermissions:j,authServiceEnabled:G}=this.value.toObject();return new s(c,g,d,f,p,E,l,m,h,A,C,_,P,I,M,O,U,W,K,j,G)}}},"nmSm+aR9":(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("VPaD/Np4"),r=e.n(t);class s{constructor(c,g,d,f,p,E,l,m,h,A,C,_,P,I,M){this._value={id:c,username:g,fullName:d,email:f,roles:p,readOnly:E,external:l,sessionActive:m,clientAddress:h,lastActivity:A,enabled:C,authServiceId:_,authServiceUid:P,authServiceEnabled:I,accountStatus:M}}get id(){return this._value.id}get username(){return this._value.username}get name(){return this._value.username}get fullName(){return this._value.fullName}get description(){return this._value.fullName}get email(){return this._value.email}get roles(){return this._value.roles}get readOnly(){return this._value.readOnly}get external(){return this._value.external}get sessionActive(){return this._value.sessionActive}get clientAddress(){return this._value.clientAddress}get lastActivity(){return this._value.lastActivity}get enabled(){return this._value.enabled}get authServiceId(){return this._value.authServiceId}get authServiceUid(){return this._value.authServiceUid}get authServiceEnabled(){return this._value.authServiceEnabled}get accountStatus(){return this._value.accountStatus}toBuilder(){const{id:c,username:g,fullName:d,email:f,roles:p,readOnly:E,external:l,sessionActive:m,clientAddress:h,lastActivity:A,enabled:C,authServiceId:_,authServiceUid:P,authServiceEnabled:I,accountStatus:M}=this._value;return new o(t.Map({id:c,username:g,fullName:d,email:f,roles:p,readOnly:E,external:l,sessionActive:m,clientAddress:h,lastActivity:A,enabled:C,authServiceId:_,authServiceUid:P,authServiceEnabled:I,accountStatus:M}))}static create(c,g,d,f,p,E,l,m,h,A,C,_,P,I,M){return new s(c,g,d,f,p,E,l,m,h,A,C,_,P,I,M)}toJSON(){const{id:c,username:g,fullName:d,email:f,roles:p,readOnly:E,external:l,sessionActive:m,clientAddress:h,lastActivity:A,enabled:C,authServiceId:_,authServiceUid:P,authServiceEnabled:I,accountStatus:M}=this._value;return{id:c,username:g,full_name:d,email:f,roles:p.toArray(),read_only:E,external_user:l,session_active:m,client_address:h,last_activity:A,enabled:C,auth_service_id:_,auth_service_uid:P,auth_service_enabled:I,account_status:M}}static fromJSON(c){const{id:g,username:d,full_name:f,email:p,roles:E,read_only:l,external_user:m,session_active:h,client_address:A,last_activity:C,enabled:_,auth_service_id:P,auth_service_uid:I,auth_service_enabled:M,account_status:O}=c;return s.create(g,d,f,p,t.Set(E),l!=null?l:!1,m!=null?m:!1,h!=null?h:!1,A,C,_,P,I,M,O)}static builder(){return new o}}class o{constructor(c=t.Map()){this.value=c}id(c){return new o(this.value.set("id",c))}username(c){return new o(this.value.set("username",c))}fullName(c){return new o(this.value.set("fullName",c))}email(c){return new o(this.value.set("email",c))}roles(c){return new o(this.value.set("roles",c))}readOnly(c){return new o(this.value.set("readOnly",c))}external(c){return new o(this.value.set("external",c))}sessionActive(c){return new o(this.value.set("sessionActive",c))}clientAddress(c){return new o(this.value.set("clientAddress",c))}lastActivity(c){return new o(this.value.set("lastActivity",c))}enabled(c){return new o(this.value.set("enabled",c))}authServiceId(c){return new o(this.value.set("authServiceId",c))}authServiceUid(c){return new o(this.value.set("authServiceUid",c))}authServiceEnabled(c){return new o(this.value.set("authServiceEnabled",c))}accountStatus(c){return new o(this.value.set("accountStatus",c))}build(){const{id:c,username:g,fullName:d,email:f,roles:p,readOnly:E,external:l,sessionActive:m,clientAddress:h,lastActivity:A,enabled:C,authServiceId:_,authServiceUid:P,authServiceEnabled:I,accountStatus:M}=this.value.toObject();return new s(c,g,d,f,p,E,l,m,h,A,C,_,P,I,M)}}},sIZ0mQDD:(x,y,e)=>{"use strict";e.r(y),e.d(y,{default:()=>c});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("m5sCWlWB");const n=({displayPageLayout:g})=>{const d=t.createElement(t.Fragment,null,t.createElement("p",null,"The party gorilla was just here, but had another party to rock."),t.createElement("p",null,"Oh, party gorilla! How we miss you! Will we ever see you again?"));return t.createElement(o.A,{title:"Page not found",description:d,displayPageLayout:g})};n.propTypes={displayPageLayout:s().bool},n.defaultProps={displayPageLayout:!0};const c=n},"6vcCRWgg":(x,y,e)=>{"use strict";e.d(y,{A:()=>h});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("RCNj0OY4"),c=e("IOI9nV80"),g=e("rIl5IEuP"),d=e("m5sCWlWB"),f=e("zeW/qtng"),p=e("TWZE6ai3");const E=o.default.div` font-weight: normal; `,l=t.createElement(t.Fragment,null,t.createElement("p",null,"It seems like the page you navigated to contained an error."),t.createElement("p",null,"You can use the navigation to reach other parts of the product, refresh the page or submit an error report.")),m=({error:A,componentStack:C})=>{const[_,P]=(0,t.useState)(n.A.gl2DevMode()),I=` Stack Trace: ${A.stack} Component Stack: ${C}`,M=(0,t.useCallback)(O=>{O.preventDefault(),P(U=>!U)},[]);return t.createElement(d.A,{title:"Something went wrong.",description:l},t.createElement("div",{className:"content",style:{padding:"2em"}},t.createElement(f.A,null)),t.createElement("dl",null,t.createElement("dt",null,"Error:",t.createElement(E,{className:"pull-right"},t.createElement(g.Button,{bsStyle:"link",tabIndex:0,onClick:M},_?"Show less":"Show more"))),t.createElement("dt",null,t.createElement("pre",{className:"content",id:"render-error"},t.createElement("div",{className:"pull-right"},t.createElement(p.A,{title:t.createElement(c.In,{name:"content_copy"}),bsSize:"sm",text:`${A.message} ${I}`,buttonTitle:"Copy error details to clipboard"})),A.message,_&&I))))};m.propTypes={error:s().shape({message:s().string.isRequired,stack:s().string}).isRequired,componentStack:s().string.isRequired};const h=m},CYFwYmkW:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("knkDHhNA");const n=({error:g,missingStreamIds:d=[]})=>{var f,p;const E=t.createElement(t.Fragment,null,t.createElement("p",null,"This resource includes streams you do not have permissions for."),t.createElement("p",null,"Please contact your administrator and provide the error details which include a list of streams you need access to.")),l=d.length>0?d:(p=(f=g==null?void 0:g.additional)==null?void 0:f.body)==null?void 0:p.streams,m=(l==null?void 0:l.length)>0?`You need permissions for streams with the id: ${l.join(", ")}.`:void 0;return t.createElement(o.A,{error:g,description:E,title:"Missing Stream Permissions",errorDetails:m})};n.propTypes={error:s().shape({message:s().string.isRequired,additional:s().shape({body:s().shape({streams:s().arrayOf(s().string)})})}).isRequired,missingStreamIds:s().arrayOf(s().string)},n.defaultProps={missingStreamIds:[]};const c=n},knkDHhNA:(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("IOI9nV80"),n=e("m5sCWlWB"),c=e("HCsT5Gmk");const g=(p,E,l)=>{const m=`${E} ${l}`;return p?`${p} ${m}`:m},d=({error:p,errorDetails:E,title:l,description:m,location:{pathname:h}})=>{var A;const C=(A=p==null?void 0:p.message)!=null?A:JSON.stringify(p),_=`The permissions check for the following request failed, while trying to access ${h}.`,P=t.createElement(t.Fragment,null,t.createElement("p",null,"You do not have the required permissions to view this resource."),t.createElement("p",null,"Please contact your administrator and provide the error details.")),I=g(E,_,C);return t.createElement(n.A,{title:l,description:m!=null?m:P},t.createElement("dl",null,t.createElement("dd",null,t.createElement("pre",{className:"content"},t.createElement("div",{className:"pull-right"},t.createElement(o.bL,{title:t.createElement(o.In,{name:"content_copy"}),bsSize:"sm",text:I,buttonTitle:"Copy error details to clipboard"})),E&&t.createElement("p",null,E),t.createElement("p",null,_),t.createElement("p",null,C)))))};d.propTypes={description:s().element,errorDetails:s().string,title:s().string},d.defaultProps={description:void 0,errorDetails:void 0,title:"Missing Permissions"};const f=(0,c.A)(d)},ysvTSBlf:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("2YuXt4hr");const s={error(o,n="Error"){t.$e.show({message:o,title:n,autoClose:1e4,color:"red"})},warning(o,n="Attention"){t.$e.show({message:o,title:n})},success(o,n="Success"){t.$e.show({message:o,title:n,color:"green"})}}},U1Iufsob:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("pjsNBHWI"),r=e.n(t);const o={AlarmCallbacksApiController:{available:()=>({url:"/alerts/callbacks/types"}),create:n=>({url:`/streams/${n}/alarmcallbacks`}),delete:(n,c)=>({url:`/streams/${n}/alarmcallbacks/${c}`}),listAll:()=>({url:"/alerts/callbacks"}),list:n=>({url:`/streams/${n}/alarmcallbacks`}),testAlert:n=>({url:`/alerts/callbacks/${n}/test`}),update:(n,c)=>({url:`/streams/${n}/alarmcallbacks/${c}`})},AlarmCallbackHistoryApiController:{list:(n,c)=>({url:`/streams/${n}/alerts/${c}/history`})},AuthenticationController:{create:()=>({url:"/system/authentication/services/backends"}),delete:n=>({url:`/system/authentication/services/backends/${n}`}),disableUser:n=>({url:`/system/authentication/users/${n}/disable`}),enableUser:n=>({url:`/system/authentication/users/${n}/enable`}),load:n=>({url:`/system/authentication/services/backends/${n}`}),loadActive:()=>({url:"/system/authentication/services/active-backend"}),loadUsersPaginated:n=>({url:`/system/authentication/services/backends/${n}/users`}),loadActiveBackendType:()=>({url:"/system/authentication/services/backends/active-backend/type"}),servicesPaginated:()=>({url:"/system/authentication/services/backends"}),testConnection:()=>({url:"/system/authentication/services/test/backend/connection"}),testLogin:()=>({url:"/system/authentication/services/test/backend/login"}),update:n=>({url:`/system/authentication/services/backends/${n}`}),updateConfiguration:()=>({url:"/system/authentication/services/configuration"})},AuthzRolesController:{load:n=>({url:`/authz/roles/${n}`}),delete:n=>({url:`/authz/roles/${n}`}),list:()=>({url:"/authz/roles"}),removeMember:(n,c)=>({url:`/authz/roles/${n}/assignee/${c}`}),addMembers:n=>({url:`/authz/roles/${n}/assignees`}),loadRolesForUser:n=>({url:`/authz/roles/user/${n}`}),loadUsersForRole:n=>({url:`/authz/roles/${n}/assignees`})},CatalogsController:{showEntityIndex:()=>({url:"/system/catalog"}),queryEntities:()=>({url:"/system/catalog"})},CodecTypesController:{list:()=>({url:"/system/codecs/types/all"})},ContentPacksController:{list:()=>({url:"/system/content_packs/latest"}),get:n=>({url:`/system/content_packs/${n}`}),getRev:(n,c)=>({url:`/system/content_packs/${n}/${c}`}),downloadRev:(n,c)=>({url:`/system/content_packs/${n}/${c}/download`}),create:()=>({url:"/system/content_packs"}),delete:n=>({url:`/system/content_packs/${n}`}),deleteRev:(n,c)=>({url:`/system/content_packs/${n}/${c}`}),install:(n,c)=>({url:`/system/content_packs/${n}/${c}/installations`}),installList:n=>({url:`/system/content_packs/${n}/installations`}),uninstall:(n,c)=>({url:`/system/content_packs/${n}/installations/${c}`}),uninstallDetails:(n,c)=>({url:`/system/content_packs/${n}/installations/${c}/uninstall_details`})},CountsApiController:{total:()=>({url:"/count/total"}),indexSetTotal:n=>({url:`/count/${n}/total`})},ClusterApiResource:{list:()=>({url:"/system/cluster/nodes"}),node:()=>({url:"/system/cluster/node"}),elasticsearchStats:()=>({url:"/system/cluster/stats/elasticsearch"})},ClusterConfigResource:{config:()=>({url:"/system/cluster_config"})},GrokPatternsController:{test:()=>({url:"/system/grok/test"}),paginated:()=>({url:"/system/grok/paginated"})},DashboardsApiController:{create:()=>({url:"/dashboards"}),index:()=>({url:"/dashboards"}),get:n=>({url:`/dashboards/${n}`}),delete:n=>({url:`/dashboards/${n}`}),update:n=>({url:`/dashboards/${n}`}),addWidget:n=>({url:`/dashboards/${n}/widgets`}),removeWidget:(n,c)=>({url:`/dashboards/${n}/widgets/${c}`}),widget:(n,c)=>({url:`/dashboards/${n}/widgets/${c}`}),updateWidget:(n,c)=>({url:`/dashboards/${n}/widgets/${c}`}),widgetValue:(n,c)=>({url:`/dashboards/${n}/widgets/${c}/value`}),updatePositions:n=>({url:`/dashboards/${n}/positions`})},DecoratorsResource:{available:()=>({url:"/search/decorators/available"}),create:()=>({url:"/search/decorators"}),get:()=>({url:"/search/decorators"}),remove:n=>({url:`/search/decorators/${n}`}),update:n=>({url:`/search/decorators/${n}`})},DeflectorApiController:{cycle:n=>({url:`/cluster/deflector/${n}/cycle`}),list:n=>({url:`/system/deflector/${n}`})},EntityScopeController:{getScope:()=>({url:"/entity_scopes"})},EntityShareController:{prepare:n=>({url:`/authz/shares/entities/${n}/prepare`}),update:n=>({url:`/authz/shares/entities/${n}`}),userSharesPaginated:n=>({url:`/authz/shares/user/${n}`}),entityScopes:()=>({url:"/entity_scopes"})},EventDefinitionsApiController:{list:()=>({url:"/events/definitions"}),paginated:()=>({url:"/events/definitions/paginated"}),get:n=>({url:`/events/definitions/${n}`}),create:()=>({url:"/events/definitions"}),bulkDelete:()=>({url:"/events/definitions/bulk_delete"}),bulkSchedule:()=>({url:"/events/definitions/bulk_schedule"}),bulkUnschedule:()=>({url:"/events/definitions/bulk_unschedule"}),update:n=>({url:`/events/definitions/${n}`}),delete:n=>({url:`/events/definitions/${n}`})},EventNotificationsApiController:{list:()=>({url:"/events/notifications"}),paginated:()=>({url:"/events/notifications/paginated"}),get:n=>({url:`/events/notifications/${n}`}),create:()=>({url:"/events/notifications"}),bulkDelete:()=>({url:"/events/notifications/bulk_delete"}),bulkSchedule:()=>({url:"/events/notifications/bulk_schedule"}),bulkUnschedule:()=>({url:"/events/notifications/bulk_unschedule"}),update:n=>({url:`/events/notifications/${n}`}),delete:n=>({url:`/events/notifications/${n}`})},HTTPHeaderAuthConfigController:{load:()=>({url:"/system/authentication/http-header-auth-config"}),update:()=>({url:"/system/authentication/http-header-auth-config"})},IndexerClusterApiController:{health:()=>({url:"/system/indexer/cluster/health"}),name:()=>({url:"/system/indexer/cluster/name"})},IndexerFailuresApiController:{count:n=>({url:`/system/indexer/failures/count?since=${n}`}),list:(n,c)=>({url:`/system/indexer/failures?limit=${n}&offset=${c}`})},IndexerOverviewApiResource:{list:n=>({url:`/system/indexer/overview/${n}`})},IndexRangesApiController:{list:()=>({url:"/system/indices/ranges"}),rebuild:n=>({url:`/system/indices/ranges/index_set/${n}/rebuild`}),rebuildSingle:n=>({url:`/system/indices/ranges/${n}/rebuild`})},IndexSetsApiController:{list:n=>({url:`/system/indices/index_sets?stats=${n}`}),listPaginated:(n,c,g)=>({url:`/system/indices/index_sets?skip=${n}&limit=${c}&stats=${g}`}),get:n=>({url:`/system/indices/index_sets/${n}`}),create:()=>({url:"/system/indices/index_sets"}),delete:(n,c)=>({url:`/system/indices/index_sets/${n}?delete_indices=${c}`}),searchPaginated:(n,c,g,d)=>({url:`/system/indices/index_sets/search?searchTitle=${n}&skip=${c}&limit=${g}&stats=${d}`}),setDefault:n=>({url:`/system/indices/index_sets/${n}/default`}),stats:()=>({url:"/system/indices/index_sets/stats"})},IndicesApiController:{close:n=>({url:`/system/indexer/indices/${n}/close`}),delete:n=>({url:`/system/indexer/indices/${n}`}),list:n=>({url:`/system/indexer/indices/${n}/list`}),listAll:()=>({url:"/system/indexer/indices"}),listClosed:n=>({url:`/system/indexer/indices/${n}/closed`}),multiple:()=>({url:"/system/indexer/indices/multiple"}),reopen:n=>({url:`/system/indexer/indices/${n}/reopen`})},InputsApiController:{list:()=>({url:"/system/inputs"}),get:n=>({url:`/system/inputs/${n}`}),globalRecentMessage:n=>({url:`/${n}`})},InputStatesController:{start:n=>({url:`/system/inputstates/${n}`}),stop:n=>({url:`/system/inputstates/${n}`})},ClusterInputStatesController:{list:()=>({url:"/cluster/inputstates"}),start:n=>({url:`/cluster/inputstates/${n}`}),stop:n=>({url:`/cluster/inputstates/${n}`})},ClusterLoggersResource:{loggers:()=>({url:"/cluster/system/loggers"}),subsystems:()=>({url:"/cluster/system/loggers/subsystems"}),setSubsystemLoggerLevel:(n,c,g)=>({url:`/cluster/system/loggers/${n}/subsystems/${c}/level/${g}`})},ClusterSupportBundleController:{delete:n=>({url:`/cluster/debug/support/bundle/${n}`}),download:n=>({url:`/cluster/debug/support/bundle/download/${n}`}),list:()=>({url:"/cluster/debug/support/bundle/list"}),create:()=>({url:"/cluster/debug/support/bundle/build"})},MessageFieldsApiController:{list:()=>({url:"/system/fields"}),types:()=>({url:"views/fields"})},MetricsApiController:{multiple:()=>({url:"/system/metrics/multiple"}),byNamespace:n=>({url:`/system/metrics/namespace/${n}`})},ClusterMetricsApiController:{multiple:n=>({url:`/cluster/${n}/metrics/multiple`}),multipleAllNodes:()=>({url:"/cluster/metrics/multiple"}),byNamespace:(n,c)=>({url:`/cluster/${n}/metrics/namespace/${c}`})},NotificationsApiController:{delete:n=>({url:`/system/notifications/${n}`}),deleteWithKey:(n,c)=>({url:`/system/notifications/${n}/${c}`}),list:()=>({url:"/system/notifications"}),getHtmlMessage:n=>({url:`/system/notification/message/html/${n.toLocaleUpperCase()}`}),getHtmlMessageWithKey:(n,c)=>({url:`/system/notification/message/html/${n.toLocaleUpperCase()}/${c}`})},OutputsApiController:{index:()=>({url:"/system/outputs"}),create:()=>({url:"/system/outputs"}),delete:n=>({url:`/system/outputs/${n}`}),update:n=>({url:`/system/outputs/${n}`}),availableType:n=>({url:`/system/outputs/available/${n}`}),availableTypes:()=>({url:"/system/outputs/available"})},RolesApiController:{listRoles:()=>({url:"/roles"}),createRole:()=>({url:"/roles"}),updateRole:n=>({url:`/roles/${n}`}),deleteRole:n=>({url:`/roles/${n}`}),loadMembers:n=>({url:`/roles/${n}/members`})},SavedSearchesApiController:{create:()=>({url:"/search/saved"}),delete:n=>({url:`/search/saved/${n}`}),update:n=>({url:`/search/saved/${n}`})},SessionsApiController:{validate:()=>({url:"/system/sessions"})},StreamsApiController:{index:()=>({url:"/streams"}),paginated:()=>({url:"/streams/paginated"}),get:n=>({url:`/streams/${n}`}),bulk_delete:()=>({url:"/streams/bulk_delete"}),bulk_resume:()=>({url:"/streams/bulk_resume"}),bulk_pause:()=>({url:"/streams/bulk_pause"}),create:()=>({url:"/streams"}),update:n=>({url:`/streams/${n}`}),cloneStream:n=>({url:`/streams/${n}/clone`}),delete:n=>({url:`/streams/${n}`}),pause:n=>({url:`/streams/${n}/pause`}),resume:n=>({url:`/streams/${n}/resume`}),testMatch:n=>({url:`/streams/${n}/testMatch`})},StreamOutputsApiController:{add:n=>({url:`/streams/${n}/outputs`}),index:n=>({url:`/streams/${n}/outputs`}),delete:(n,c)=>({url:`/streams/${n}/outputs/${c}`})},StreamRulesApiController:{delete:(n,c)=>({url:`/streams/${n}/rules/${c}`}),update:(n,c)=>({url:`/streams/${n}/rules/${c}`}),create:n=>({url:`/streams/${n}/rules`})},SystemApiController:{info:()=>({url:"/system"}),jvm:()=>({url:"/system/jvm"}),fields:()=>({url:"/system/fields"}),locales:()=>({url:"/system/locales"})},SystemJobsApiController:{list:()=>({url:"/cluster/jobs"}),getJob:n=>({url:`/cluster/jobs/${n}`}),acknowledgeJob:n=>({url:`/system/jobs/acknowledge/${n}`}),cancelJob:n=>({url:`/cluster/jobs/${n}`})},SystemMessagesApiController:{all:n=>({url:`/system/messages?page=${n}`})},SystemSearchVersionApiController:{satisfiesVersion:(n,c)=>({url:`/system/searchVersion/satisfiesVersion/${n}${c?`?version=${c}`:""}`})},ToolsApiController:{grokTest:()=>({url:"/tools/grok_tester"}),jsonTest:()=>({url:"/tools/json_tester"}),naturalDateTest:(n,c)=>({url:`/tools/natural_date_tester?string=${n}&timezone=${c}`}),regexTest:()=>({url:"/tools/regex_tester"}),regexValidate:n=>({url:`/tools/regex_tester/validate?regex=${n}`}),regexReplaceTest:()=>({url:"/tools/regex_replace_tester"}),splitAndIndexTest:()=>({url:"/tools/split_and_index_tester"}),substringTest:()=>({url:"/tools/substring_tester"}),containsStringTest:()=>({url:"/tools/contains_string_tester"}),lookupTableTest:()=>({url:"/tools/lookup_table_tester"}),urlWhitelistCheck:()=>({url:"/system/urlwhitelist/check"}),urlWhitelistGenerateRegex:()=>({url:"/system/urlwhitelist/generate_regex"})},TelemetryApiController:{info:()=>({url:"/telemetry"}),setting:()=>({url:"/telemetry/user/settings"})},UniversalSearchApiController:{_streamFilter(n){return n?{filter:`streams:${n}`}:{}},_buildBaseQueryString(n,c,g){const d={},f=this._streamFilter(g);return d.query=n,Object.keys(c).forEach(p=>{d[p]=c[p]}),Object.keys(f).forEach(p=>{d[p]=f[p]}),d},_buildUrl(n,c){return`${n}?${r().stringify(c)}`},search(n,c,g,d,f,p,E,l,m){const h=`/search/universal/${n}`,A=this._buildBaseQueryString(c,g,d);return f&&(A.limit=f),p&&(A.offset=p),E&&l&&(A.sort=`${E}:${l}`),m!==void 0&&(A.decorate=m),{url:this._buildUrl(h,A)}},export(n,c,g,d,f,p,E){const l=`/search/universal/${n}/export`,m=this._buildBaseQueryString(c,g,d);return f&&(m.limit=f),p&&(m.offset=p),E&&(m.fields=E.join(",")),{url:this._buildUrl(l,m)}}},UsersApiController:{changePassword:n=>({url:`/users/${n}/password`}),create:()=>({url:"/users"}),list:()=>({url:"/users"}),paginated:()=>({url:"/users/paginated"}),load:n=>({url:`/users/id/${n}`}),loadByUsername:n=>({url:`/users/${n}`}),delete:n=>({url:`/users/id/${n}`}),update:n=>({url:`/users/${n}`}),create_token:(n,c)=>({url:`/users/${n}/tokens/${c}`}),delete_token:(n,c)=>({url:`/users/${n}/tokens/${c}`}),list_tokens:n=>({url:`/users/${n}/tokens`}),setStatus:(n,c)=>({url:`/users/${n}/status/${c}`})},DashboardsController:{show:n=>({url:`/dashboards/${n}`})},ExtractorsController:{create:n=>({url:`/system/inputs/${n}/extractors`}),delete:(n,c)=>({url:`/system/inputs/${n}/extractors/${c}`}),order:n=>({url:`/system/inputs/${n}/extractors/order`}),update:(n,c)=>({url:`/system/inputs/${n}/extractors/${c}`})},MessagesController:{analyze:(n,c)=>({url:`/messages/${n}/analyze?string=${c}`}),parse:()=>({url:"/messages/parse"}),single:(n,c)=>({url:`/messages/${n}/${c}`}),exportSearch:n=>({url:`/views/search/messages/${n}`}),exportSearchType:(n,c)=>({url:`/views/search/messages/${n}/${c}`}),jobResults:(n,c)=>({url:`/views/search/messages/job/${n}/${c}`})},ExportJobsController:{exportSearch:n=>({url:`/views/export/${n}`}),exportSearchType:(n,c)=>({url:`/views/export/${n}/${c}`})},MapDataController:{search:()=>({url:"/search/mapdata"})},PipelinesController:{list:()=>({url:"/system/pipelines/pipeline"}),paginatedList:()=>({url:"/system/pipelines/pipeline/paginated"}),create:()=>({url:"/system/pipelines/pipeline"}),get:n=>({url:`/system/pipelines/pipeline/${n}`}),update:n=>({url:`/system/pipelines/pipeline/${n}`}),delete:n=>({url:`/system/pipelines/pipeline/${n}`}),parse:()=>({url:"/system/pipelines/pipeline/parse"})},RulesController:{list:()=>({url:"/system/pipelines/rule"}),paginatedList:()=>({url:"/system/pipelines/rule/paginated"}),create:()=>({url:"/system/pipelines/rule"}),get:n=>({url:`/system/pipelines/rule/${n}`}),update:n=>({url:`/system/pipelines/rule/${n}`}),delete:n=>({url:`/system/pipelines/rule/${n}`}),multiple:()=>({url:"/system/pipelines/rule/multiple"}),functions:()=>({url:"/system/pipelines/rule/functions"}),parse:()=>({url:"/system/pipelines/rule/parse"}),simulate:()=>({url:"/system/pipelines/rule/simulate"}),metricsConfig:()=>({url:"/system/pipelines/rule/config/metrics"})},RuleBuilderController:{create:()=>({url:"/system/pipelines/rulebuilder"}),update:n=>({url:`/system/pipelines/rulebuilder/${n}`}),validate:()=>({url:"/system/pipelines/rulebuilder/validate"}),simulate:()=>({url:"/system/pipelines/rulebuilder/simulate"}),listConditionsDict:()=>({url:"/system/pipelines/rulebuilder/conditions"}),listActionsDict:()=>({url:"/system/pipelines/rulebuilder/actions"})},ConnectionsController:{list:()=>({url:"/system/pipelines/connections"}),to_stream:()=>({url:"/system/pipelines/connections/to_stream"}),to_pipeline:()=>({url:"/system/pipelines/connections/to_pipeline"})},SimulatorController:{simulate:()=>({url:"/system/pipelines/simulate"})},ping:()=>({url:"/"})}},"/XAQvyuM":(x,y,e)=>{"use strict";e.d(y,{A:()=>Un});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("ww+BtWnX"),o=e.n(s),n=e("yAXMqwrl"),c=e("QvoWw71B"),g=e("ZaccISJq"),d=e("ii0bleBb"),f=e.n(d),p=e("7GNmVOX8"),E=e("D/X+X5ed");const l=(0,t.createContext)(void 0),m=({children:ue,loginName:Te})=>{const Ge=`gl-scratchpad-${Te}`,mt=p.A.get(Ge)||{},[Dt,Jt]=(0,t.useState)(mt.opened||!1),mn=(0,t.useMemo)(()=>({isScratchpadVisible:Dt,localStorageItem:Ge,setScratchpadVisibility:Po=>{const Do=p.A.get(Ge);p.A.set(Ge,{...Do,opened:Po}),Jt(Po)},toggleScratchpadVisibility:()=>{const Po=p.A.get(Ge);p.A.set(Ge,{...Po,opened:!Dt}),Jt(!Dt)}}),[Dt,Ge]);return(0,E.Ay)({actionKey:"show-scratchpad-modal",callback:()=>{Jt(!0)},scope:"general"}),t.createElement(l.Provider,{value:mn},ue)};m.propTypes={children:f().node.isRequired,loginName:f().string.isRequired};var h=e("IOI9nV80"),A=e("Mx+G+HdB"),C=e.n(A),_=e("rIl5IEuP"),P=e("hrjdtDAf"),I=e("u2QUEJU3"),M=e("VVS+7KXv");const O="",U="scratchpad-text-content",W="Cleared.",K="Copied!",j="Auto saved.",G="",k=r.default.div` display: flex; flex-direction: column; height: 100%; `,Q=r.default.textarea(({$copied:ue,theme:Te})=>(0,r.css)` width: 100%; padding: 3px; resize: none; flex: 1; margin: 15px 0 7px; border: 1px solid ${ue?Te.colors.variant.success:Te.colors.variant.lighter.default}; box-shadow: inset 1px 1px 1px rgb(0 0 0 / 7.5%)${ue&&`, 0 0 8px ${o()(Te.colors.variant.success).alpha(.4).css()}`}; transition: border 150ms ease-in-out, box-shadow 150ms ease-in-out; font-family: ${Te.fonts.family.monospace}; font-size: ${Te.fonts.size.body}; &:focus { border-color: ${Te.colors.variant.light.info}; outline: none; } `),ne=(0,r.default)(_.Alert)` && { padding: 6px 12px; margin: 6px 0 0; display: flex; align-items: center; } `,z=r.default.em` margin-left: 6px; flex: 1; `,le=r.default.footer(({theme:ue})=>(0,r.css)` display: flex; align-items: center; padding: 7px 0 9px; border-top: 1px solid ${ue.colors.gray[80]}; `),V=r.default.span(({theme:ue,$visible:Te})=>(0,r.css)` flex: 1; color: ${ue.colors.variant.success}; font-style: italic; opacity: ${Te?"1":"0"}; transition: opacity 150ms ease-in-out; `),Pe=()=>{const ue=(0,t.useRef)(),Te=(0,t.useRef)(),{setScratchpadVisibility:Ge,localStorageItem:mt}=(0,t.useContext)(l),Dt=p.A.get(mt)||{},[Jt,mn]=(0,t.useState)(Dt.securityConfirmed||!1),[oo,Qo]=(0,t.useState)(Dt.value||O),[Po,Do]=(0,t.useState)(Dt.size||void 0),[_s,oa]=(0,t.useState)(Dt.position||void 0),[jo,Is]=(0,t.useState)(G),[us,as]=(0,t.useState)(!1),[pr,sa]=(0,t.useState)(!1),aa=Ms=>{const Ha=p.A.get(mt);p.A.set(mt,{...Ha,...Ms})},Ra=()=>{Te.current&&clearTimeout(Te.current),Te.current=setTimeout(()=>{as(!1)},1e3)},Ta=Ms=>{Is(Ms),as(!0),Ra()},ul=C()(()=>{const{value:Ms}=ue.current;Qo(Ms),Ta(j),aa({value:Ms})},500),ra=Ms=>{oa(Ms),aa({position:Ms})},bs=Ms=>{Do(Ms),aa({size:Ms})},fa=()=>{mn(!0),aa({securityConfirmed:!0})},Ur=()=>{sa(!0)},la=()=>{sa(!1)},gr=()=>{Qo(O),aa({value:O}),la(),Ta(W)};(0,t.useEffect)(()=>{ue.current&&(ue.current.focus(),ue.current.value=oo)},[oo]),(0,E.Ay)({actionKey:"clear",scope:"scratchpad",callback:Ur,options:{enableOnFormTags:!0,preventDefault:!0}});const Er=()=>{(0,M.A)(oo).then(()=>Ta(K))};return(0,E.Ay)({actionKey:"copy",scope:"scratchpad",callback:Er,options:{enableOnFormTags:!0}}),t.createElement(P.A,{title:"Scratchpad",onClose:()=>Ge(!1),onDrag:ra,onResize:bs,size:Po,position:_s},t.createElement(k,null,!Jt&&t.createElement(ne,{bsStyle:"warning"},t.createElement(z,null,"We recommend you do ",t.createElement("strong",null,"not")," store any sensitive information, such as passwords, in this area."),t.createElement(_.Button,{bsStyle:"link",bsSize:"sm",onClick:fa},"Got It!")),t.createElement(Q,{ref:ue,onChange:ul,id:U,$copied:jo===K,spellCheck:!1}),t.createElement(le,null,t.createElement(h.N,{placement:"right",trigger:["hover","focus"],overlay:t.createElement(t.Fragment,null,"You can use this space to store personal notes and other information while interacting with Graylog, without leaving your browser window. For example, store timestamps, user IDs, or IP addresses you need in various investigations.")},t.createElement(_.Button,{bsStyle:"link"},t.createElement(I.A,{name:"help"}))),t.createElement(V,{$visible:us},t.createElement(I.A,{name:jo===K?"content_copy":"save",type:"regular"})," ",jo),t.createElement(_.ButtonGroup,null,t.createElement(_.Button,{id:"scratchpad-actions",onClick:Er,title:"Copy"},t.createElement(I.A,{name:"content_copy"})),t.createElement(_.Button,{onClick:Ur,title:"Clear"},t.createElement(I.A,{name:"delete"}))))),t.createElement(_.BootstrapModalConfirm,{showModal:pr,title:"Are you sure?",onConfirm:gr,onCancel:la},"This will clear out your Scratchpad content, do you wish to proceed?"))},at=()=>{const{isScratchpadVisible:ue}=(0,t.useContext)(l);return ue?t.createElement(Pe,null):null};var ze=e("fGU5yqDp"),he=e("0t7Ye+61"),Ie=e("ty2gyrHp"),Re=e("RCNj0OY4"),ce=e("8fnsnG21"),Ee=e("zkmy/ViL"),oe=e("JnTtTRmZ"),ae=e.n(oe),ye=e("IA3Ku5lS"),Oe=e("woUyHGxd");const ve=(0,ye.Bv)("core.GlobalThroughput",()=>ae().createStore({listenables:[],throughput:{input:0,output:0,loading:!1},metrics:{input:"org.graylog2.throughput.input.1-sec-rate",output:"org.graylog2.throughput.output.1-sec-rate",loading:!0},init(){Oe.p.addGlobal(this.metrics.input),Oe.p.addGlobal(this.metrics.output),this.listenTo(Oe.$,this.updateMetrics),setInterval(Oe.p.list,this.INTERVAL)},getInitialState(){return{throughput:this.throughput}},INTERVAL:2e3,updateMetrics(ue){if(!ue.metrics)return;const Te=Object.keys(ue.metrics).map(mt=>{var Dt,Jt,mn;return(mn=(Jt=(Dt=ue.metrics[mt][this.metrics.input])==null?void 0:Dt.metric)==null?void 0:Jt.value)!=null?mn:0}).reduce((mt,Dt)=>mt+Dt,0),Ge=Object.keys(ue.metrics).map(mt=>{var Dt,Jt,mn;return(mn=(Jt=(Dt=ue.metrics[mt][this.metrics.output])==null?void 0:Dt.metric)==null?void 0:Jt.value)!=null?mn:0}).reduce((mt,Dt)=>mt+Dt,0);this.throughput={input:Te,output:Ge,loading:!1},this.trigger({throughput:this.throughput})}})),_e=(0,r.default)(_.NavItem)` > a { @media (width <= 991px) { height: auto; display: block; } } `,He=r.default.strong` display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; grid-gap: 0; height: 30px; @media (width <= 991px) { height: auto; display: block; &::before { content: attr(aria-label); font-weight: normal; } span, &::after { display: none; } } `,je=r.default.span(({$dataIn:ue,theme:Te})=>(0,r.css)` font-size: ${Te.fonts.size.small}; line-height: 1; grid-area: ${ue?"1 / 1 / 2 / 2":"2 / 1 / 3 / 2"}; display: grid; grid-template-columns: 1fr 1.75em; grid-template-rows: 1fr 1px; grid-gap: 0 3px; color: ${Te.colors.global.textDefault}; > span { grid-area: 1 / 1 / 2 / 2; text-align: right; padding-left: 3px; } > i { font-weight: normal; grid-area: 1 / 2 / 2 / 3; } &::after { ${ue&&(0,r.css)` content: ' '; min-height: 1px; background-color: ${Te.colors.variant.light.default}; display: block; grid-area: 2 / 1 / 3 / 3; `} } `),zt=ue=>{const{throughput:Te}=(0,ce.P)(ve);let Ge=t.createElement(h.y$,{text:""});if(!Te.loading){const mt=Ee.A.formatNumber(Te.input),Dt=Ee.A.formatNumber(Te.output);Ge=t.createElement(He,{"aria-label":`Throughput: In ${mt} / Out ${Dt} msg/s`},t.createElement(je,{$dataIn:!0},t.createElement("span",null,mt)," ",t.createElement("i",null,"in")),t.createElement(je,null,t.createElement("span",null,Dt)," ",t.createElement("i",null,"out")))}return t.createElement(_e,{...ue},Ge)};var xe=e("d4kzUuQm"),Ue=e("oNtoZaGG"),ke=e("/Wq35DRR");const Je=()=>{const ue=(0,t.useContext)(ke.A);if(!ue)throw new Error("usePerspectives hook needs to be used inside PerspectivesContext.Provider");return ue.availablePerspectives};var nt=e("jD0e6MXE"),Wt=e("/7OuCFNo"),Le=e("CCNXj2ra");const Fe=r.default.div` display: flex; align-items: center; `,qe=(0,r.default)(Ie.N)` display: inline-flex; align-items: center; min-height: ${Le.mt}; `,ut=({children:ue,className:Te})=>{const{activePerspective:Ge}=(0,nt.A)(),mt=Ge==null?void 0:Ge.brandComponent;return mt?t.createElement(Fe,{className:Te},t.createElement(qe,{to:Ge.welcomeRoute},t.createElement(mt,null)),ue):null};ut.defaultProps={className:""};const ft=ut,Ot="navbar-brand",Lt=r.default.span` display: flex; flex-direction: row; align-content: center; align-items: center; padding-right: 0; `,an=r.default.span(({theme:ue})=>(0,r.css)` font-size: ${ue.fonts.size.large}; display: flex; flex-direction: row; align-content: center; align-items: center; `),Ft=r.default.button` background: transparent; border: 0; `,rn=(0,r.default)(Ue.A.Dropdown)` z-index: 1032 !important; `,$t=(0,r.default)(I.A)(({theme:ue})=>(0,r.css)` color: ${ue.colors.global.textDefault}; `),be=()=>{const{setActivePerspective:ue}=(0,nt.A)(),Te=Je(),Ge=(0,Wt.A)(),mt=(0,t.useCallback)(Dt=>()=>{const{welcomeRoute:Jt}=Te.find(({id:mn})=>mn===Dt);Ge.push(Jt),ue(Dt)},[Ge,Te,ue]);return t.createElement(Lt,{className:Ot},t.createElement(Ue.A,{shadow:"md",withinPortal:!0},t.createElement(ft,null,t.createElement(Ue.A.Target,null,t.createElement(Ft,{type:"button",title:"Change UI perspective"},t.createElement($t,{name:"arrow_drop_down"})))),t.createElement(rn,null,Te.map(({title:Dt,id:Jt})=>t.createElement(Ue.A.Item,{key:Jt,onClick:mt(Jt)},t.createElement(an,null,Dt))))))},Kt=()=>Je().length===1?t.createElement(ft,{className:"navbar-brand"}):t.createElement(be,null);var An=e("0hhBr0/b"),qt=e("yGRmSjYM");const Be=(ue,Te)=>ue.filter(({perspective:Ge})=>Te==="default"?!Ge||Ge==="default":Te===Ge);var bn=e("q2j1bVbz"),gn=e("MdYBRjRJ");const Zn=(ue,Te,Ge=void 0)=>Ge?ue===(0,gn.XV)(Te):ue.indexOf((0,gn.XV)(Te))===0;var Vn=e("3IogPG7u");const po=(0,r.default)(Ue.A.Item)(({theme:ue})=>(0,r.css)` font-family: ${ue.fonts.family.navigation}; font-size: ${ue.fonts.size.navigation}; &:hover, &:focus { color: inherit; text-decoration: none; } `),De=({description:ue,path:Te,topLevel:Ge,...mt})=>t.createElement(Ie.m,{key:Te,to:Te,relativeActive:!0,...mt},Ge?t.createElement(_.NavItem,null,ue):t.createElement(po,{component:"a"},ue));De.propTypes={description:f().oneOfType([f().string,f().object]).isRequired,path:f().string.isRequired,topLevel:f().bool},De.defaultProps={topLevel:!1};const ln=De,bt="last",It=ue=>ue?Re.A.isFeatureEnabled(ue):!0,En=({navigationItem:{description:ue,path:Te,permissions:Ge,requiredFeatureFlag:mt,BadgeComponent:Dt},topLevel:Jt})=>{const mn=(0,bn.A)();return Ge&&!(0,qt.Nn)(mn.permissions,Ge)||!It(mt)?null:t.createElement(ln,{key:ue,description:Dt?t.createElement(Dt,{text:ue}):ue,path:(0,gn.XV)(Te),topLevel:Jt})};En.defaultProps={topLevel:!1};const Xt=({navigationItem:{children:ue,description:Te,BadgeComponent:Ge,requiredFeatureFlag:mt},pathname:Dt})=>{const Jt=(0,bn.A)();if(!It(mt))return null;const mn=ue.filter(({path:Do,end:_s})=>Do&&Zn(Dt,Do,_s)),oo=mn.length>0?`${Te} / ${mn[0].description}`:Te;if(!ue.some(Do=>(0,qt.Nn)(Jt.permissions,Do.permissions)&&It(Do.requiredFeatureFlag)))return null;const Po=ue.some(Do=>(0,qt.Nn)(Jt.permissions,Do.permissions)&&(Do==null?void 0:Do.BadgeComponent));return t.createElement(_.NavDropdown,{key:oo,title:oo,badge:Po?Ge:null,inactiveTitle:Te},ue.map(Do=>t.createElement(En,{navigationItem:Do,key:Do.description})))},Ye=(ue,Te)=>Te.children?ue.findIndex(({description:Ge,children:mt})=>Te.description===Ge&&mt):-1,At=ue=>ue.reduce((Te,Ge)=>{const mt=Ye(Te,Ge);if(mt>=0){const Dt=Te[mt],Jt={...Ge,...Dt,children:[...Dt.children,...Ge.children]},mn=[...Te];return mn[mt]=Jt,mn}return[...Te,Ge]},[]),Ct=(ue,Te)=>ue!=null&&ue.length?!!ue.find(Ge=>{var mt;return((mt=Ge.description)==null?void 0:mt.toLowerCase())===Te.toLowerCase()}):!1,Bt=ue=>ue.sort((Te,Ge)=>Te.position===bt?1:Ge.position===bt?-1:0),Ze=()=>{const{permissions:ue}=(0,bn.A)(),{activePerspective:Te}=(0,nt.A)(),Ge=(0,An.A)("navigation");return(0,t.useMemo)(()=>{const mt=At(Ge),Dt=!Ct(mt,xe.p8),Jt=!Ct(mt,xe.o5),mn=(0,qt.Nn)(ue,["licenseinfos:read"]);Dt&&mn&&mt.push({path:xe.Ay.SYSTEM.ENTERPRISE,description:xe.p8}),Jt&&mn&&mt.push(Vn.L);const oo=Be(mt,Te==null?void 0:Te.id);return Bt(oo)},[Te,Ge,ue])},cn=({pathname:ue})=>{const Te=Ze();return t.createElement(_.Nav,{className:"navbar-main"},Te.map(Ge=>Ge.children?t.createElement(Xt,{navigationItem:Ge,pathname:ue,key:Ge.description}):t.createElement(En,{navigationItem:Ge,key:Ge.description,topLevel:!0})))};var un=e("pc+thvZE");const _n=()=>un.SessionActions.logout().then(()=>un.SessionActions.validate),vn=ue=>()=>Promise.allSettled(ue.map(async Te=>{try{await Te()}catch(Ge){console.error("Error in logout hook: ",Ge)}})),Xn=()=>{const ue=(0,Wt.A)(),Te=(0,An.A)("hooks.logout"),Ge=(0,t.useMemo)(()=>vn(Te),[Te]);return(0,t.useCallback)(()=>Ge().then(_n).then(()=>ue.push(xe.Ay.STARTPAGE)),[ue,Ge])};var no=e("D+lRrw/6"),Wo=e.n(no);const Co=r.default.div` display: flex; align-items: center; `,Fo=(0,r.default)(h.In)(({theme:ue,$currentMode:Te})=>(0,r.css)` opacity: ${Te?"1":"0.5"}; color: ${Te?ue.colors.brand.primary:ue.colors.variant.darkest.default}; `),Mt=()=>{const ue=(0,r.useTheme)(),Te=ue.mode,[Ge,mt]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Ge&&mt(!1)},[Ge,ue]);const Dt=oo=>{const{checked:Qo}=oo.target;oo.persist(),mt(!0);const Po=Qo?Le.xP:Le.zF;Wo()(()=>ue.changeMode(Po))},Jt=Te===Le.xP&&Ge,mn=Te===Le.zF&&Ge;return t.createElement(Co,null,t.createElement(Fo,{name:Jt?"progress_activity":"light_mode",spin:Jt,$currentMode:Te===Le.zF}),t.createElement(h.lM,null,t.createElement("input",{value:Le.xP,type:"checkbox",onChange:Dt,checked:Te===Le.xP,disabled:Jt||mn}),t.createElement("span",{className:"slider"})),t.createElement(Fo,{name:mn?"progress_activity":"dark_mode",spin:mn,$currentMode:Te===Le.xP}))},Rt=r.default.span` text-transform: uppercase; font-weight: 700; `,Dn=()=>{const{fullName:ue,readOnly:Te,id:Ge}=(0,bn.A)(),mt=Te?xe.Ay.SYSTEM.USERS.show(Ge):xe.Ay.SYSTEM.USERS.edit(Ge),Dt=Te?"Show profile":"Edit profile",Jt=Xn();return t.createElement(_.NavDropdown,{title:t.createElement(h.In,{name:"person",size:"lg"}),hoverTitle:`User Menu for ${ue}`,noCaret:!0},t.createElement(Ue.A.Label,null,t.createElement(Rt,null,ue)),t.createElement(Ue.A.Divider,null),t.createElement(Ue.A.Label,null,t.createElement(Mt,null)),t.createElement(Ue.A.Divider,null),t.createElement(Ie.m,{to:mt},t.createElement(Ue.A.Item,null,Dt)),t.createElement(Ue.A.Item,{onClick:Jt,leftSection:t.createElement(h.In,{name:"logout"})},"Log out"))};var kn=e("E+CaPsQD"),ro=e("/MzrwdNa");const Gn=({href:ue,children:Te})=>t.createElement(Ue.A.Item,{component:"a",href:ue,target:"_blank",leftSection:t.createElement(h.In,{name:"open_in_new"})},Te),yo=()=>{const{setShowHotkeysModal:ue}=(0,ro.A)();return t.createElement(_.NavDropdown,{title:t.createElement(h.In,{name:"help",size:"lg"}),hoverTitle:"Help",noCaret:!0},t.createElement(Gn,{href:kn.A.versionedDocsHomePage()},"Documentation"),t.createElement(Ue.A.Item,{onClick:()=>ue(!0)},"Keyboard Shortcuts"),Re.A.isCloud()&&t.createElement(Gn,{href:xe.Ay.global_api_browser()},"Cluster Global API browser"))};var lo=e("bpbGjAaT"),Jn=e("NV1/EHMi");const Yn=(0,r.default)(_.NavItem)` .navbar-default .navbar-nav > & > a { &:hover, &:focus { background: transparent; } } ${Jn.l_} { display: none; } `,Gt=({active:ue,className:Te,children:Ge,...mt})=>t.createElement(Yn,{className:Te,...mt},Ge);Gt.propTypes={active:f().any,children:f().oneOfType([f().array,f().element,f().string]).isRequired,className:f().string},Gt.defaultProps={active:void 0,className:void 0};const tn=Gt,Qt=(0,r.default)(_.Nav)` > li > a { min-height: ${Le.mt}; display: inline-flex; align-items: center; justify-content: center; padding: 12px; } `,Bn=(0,r.default)(tn)` a:hover { border: 0; text-decoration: none; } `,co=3e3,To=()=>{const ue=(0,ce.P)(lo.G,Te=>Te==null?void 0:Te.total);return(0,t.useEffect)(()=>{const Te=setInterval(lo.Q.list,co);return()=>{clearInterval(Te)}},[]),ue?t.createElement(Qt,{navbar:!0},t.createElement(Ie.m,{to:xe.Ay.SYSTEM.OVERVIEW},t.createElement(Bn,null,t.createElement(_.Badge,{bsStyle:"danger","data-testid":"notification-badge",title:"Notifications"},ue)))):null},xo=({smallScreen:ue})=>{const Te=ue?"small-scrn-badge":"";return Re.A.gl2DevMode()?t.createElement(_.Badge,{className:`${Te} dev-badge`,bsStyle:"danger"},Re.A.isCloud()?"\u26C8":""," DEV"):null};xo.propTypes={smallScreen:f().bool},xo.defaultProps={smallScreen:!1};const Ps=xo,bo=(0,r.default)(_.Button)(({theme:ue})=>(0,r.css)` padding: 0 15px; background: none; border: 0; min-height: ${Le.mt}; color: ${ue.colors.global.textDefault}; &:hover, &:focus { ${(0,Jn.WS)(ue)} background: transparent; color: ${ue.colors.variant.darker.default}; } `),No=()=>{const{toggleScratchpadVisibility:ue}=(0,t.useContext)(l);return t.createElement("li",{role:"presentation"},t.createElement(bo,{bsStyle:"link",type:"button","aria-label":"Scratchpad",id:"scratchpad-toggle",onClick:ue},t.createElement(Jn.Ay,null,t.createElement(h.In,{name:"edit_square",size:"lg",title:"Scratchpad"}))))},Ds=(0,r.default)(_.Navbar)(({theme:ue})=>(0,r.css)` .dev-badge-wrap > a { cursor: default; } &.navbar-default { .navbar-nav > li > a { padding: 0 15px; height: ${Le.mt}; display: inline-flex; align-items: center; } .navbar-nav > li { > a { font-family: ${ue.fonts.family.navigation}; font-size: ${ue.fonts.size.navigation}; &:hover, &:focus { ${(0,Jn.WS)(ue)} } } &.active { > a { ${(0,Jn.at)(ue)} &:hover, &:focus { ${(0,Jn.at)(ue)} } } } } } .dropdown-menu li { &:not(.dropdown-header) { font-family: ${ue.fonts.family.navigation}; font-size: ${ue.fonts.size.navigation}; } a { padding: 6px 20px; } } @media (width <= 991px) { .small-scrn-badge { float: right; margin: 15px 15px 0; } .header-meta-nav { border-top: 1px solid ${ue.colors.gray[50]}; padding-top: 7.5px; #scratchpad-toggle { padding: 10px 15px; display: block; width: 100%; text-align: left; &:hover { text-decoration: none; } } #scratchpad-toggle, .dropdown-toggle, #welcome-nav-link { font-size: ${ue.fonts.size.body}; font-family: ${ue.fonts.family.body}; padding: 0 15px; height: ${Le.mt}; display: inline-flex; align-items: center; &::before { content: attr(aria-label); } [class*='fa-'] { display: none; } } } .dev-badge-wrap { display: none !important; } } @media (width >= 768px) { .navbar-toggle { display: block; } .navbar-collapse { width: auto; border-top: 1px solid transparent; box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%); &.collapse { height: auto !important; padding-bottom: 0; } &.in { overflow-y: auto; } } .navbar-fixed-top .navbar-collapse, .navbar-static-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { padding-right: 15px; padding-left: 15px; } .navbar-header { float: none; } .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: -15px; } } @media (width >= 991px) { .header-meta-nav { display: flex; align-items: center; .dropdown-toggle { padding: 12px !important; min-height: ${Le.mt}; display: inline-flex; align-items: center; justify-content: center; } } .navbar-toggle { display: none; } .navbar-collapse { width: auto; border-top: 0; box-shadow: none; &.collapse { display: block !important; height: auto !important; padding-bottom: 0; overflow: visible !important; } &.in { overflow-y: visible; } } .navbar-fixed-top .navbar-collapse, .navbar-static-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { padding-right: 0; padding-left: 0; } .navbar-header { float: left; } .small-scrn-badge { display: none; } .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: 0; margin-left: 0; } } `),Os=t.memo(({pathname:ue})=>{const Te=(0,An.A)("navigationItems");return t.createElement(Ds,{fluid:!0,fixedTop:!0,collapseOnSelect:!0},t.createElement(_.Navbar.Header,null,t.createElement(_.Navbar.Brand,null,t.createElement(Kt,null)),t.createElement(_.Navbar.Toggle,null),t.createElement(Ps,{smallScreen:!0}),Te.map(({key:Ge,component:mt})=>t.createElement(mt,{key:Ge,smallScreen:!0}))),t.createElement(_.Navbar.Collapse,null,t.createElement(cn,{pathname:ue}),t.createElement(To,null),t.createElement(_.Nav,{pullRight:!0,className:"header-meta-nav"},Re.A.isCloud()?t.createElement(zt,{disabled:!0}):t.createElement(Ie.m,{to:xe.Ay.SYSTEM.NODES.LIST},t.createElement(zt,null)),t.createElement(tn,{className:"dev-badge-wrap"},t.createElement(Ps,null),Te.map(({key:Ge,component:mt})=>t.createElement(mt,{key:Ge}))),t.createElement(No,null),t.createElement(yo,null),t.createElement(Ie.m,{relativeActive:!0,to:xe.Ay.WELCOME},t.createElement(_.NavItem,{id:"welcome-nav-link"},t.createElement(h.In,{size:"lg",title:"Welcome",name:"home"}))),t.createElement(Dn,null))))}),Cs=()=>{const{pathname:ue}=(0,he.A)();return t.createElement(Os,{pathname:ue})};var $s=e("m5sCWlWB"),Ts=e("62FDaRYn"),re=e("9tc+dS6Z"),we=e("6vcCRWgg"),et=e("sIZ0mQDD"),Et=e("knkDHhNA"),wt=e("CYFwYmkW");const Ut=({reportedError:ue})=>t.createElement($s.A,{title:"Something went wrong",description:t.createElement("p",null,"An unknown error has occurred. Please have a look at the following message and the graylog server log for more information.")},t.createElement("pre",null,JSON.stringify(ue))),Pn=({reportedError:ue})=>{switch(ue.type){case re.Is:return t.createElement(we.A,{error:ue.error,componentStack:ue.info.componentStack});case re.KU:return t.createElement(et.default,null);case re.VN:return t.createElement(Et.A,{error:ue.error});case re.W2:return t.createElement(wt.A,{error:ue.error});default:return t.createElement(Ut,{reportedError:ue})}},Fn=({children:ue})=>{const[Te,Ge]=(0,t.useState)(),mt=Jt=>Ge(Jt);(0,t.useEffect)(()=>{const Jt=Ts.A.report.listen(mt);return()=>{Jt()}},[]);const Dt=(0,he.A)();return(0,t.useEffect)(()=>{Te&&Ge(null)},[Dt]),Te?t.createElement(Pn,{reportedError:Te}):t.createElement(t.Fragment,null,ue)};class jn extends t.Component{componentDidCatch(Te,Ge){Ts.A.report((0,re.oe)(Te,Ge))}render(){const{children:Te}=this.props;return Te}}jn.propTypes={children:f().node},jn.defaultProps={children:null};const go=jn;var Eo=e("dFpwyWHg"),Lo=e.n(Eo),Mn=e("C2ikvoS0"),On=e.n(Mn),ko=e("1IntWRSu"),Ke=e.n(ko),dt=e("8nGWeFnd"),ht=e.n(dt),Pt=e("TeAcaicX"),dn=e.n(Pt),jt=e("eE3+5goe"),nn=e.n(jt),Rn=e("xVpy+aBO"),Wn={};Wn.styleTagTransform=nn(),Wn.setAttributes=ht(),Wn.insert=Ke().bind(null,"head"),Wn.domAPI=On(),Wn.insertStyleElement=dn();var xn=Lo()(Rn.A,Wn);const So=Rn.A&&Rn.A.locals?Rn.A.locals:void 0;var zn=e("8OvTct/Z");const Jo=()=>{const ue=(0,he.A)(),Te=(0,zn.A)();return(0,t.useEffect)(()=>{ue.pathname&&Te("$pageview",{app_pathname:(0,gn.i)(ue.pathname)})},[ue.pathname,Te]),null};var Ko=e("J6SvWOit"),fo=e("VPaD/Np4"),$o=e.n(fo),es=e("k5v4N6a1"),vs=e("zJE5UjMB");const Us={undo:{keys:"mod+shift+z",description:"Undo last action"},redo:{keys:"mod+shift+y",description:"Redo last action"}},ga={general:{title:"General",description:"General keyboard shortcuts",actions:{"show-hotkeys-modal":{keys:"shift+?",displayKeys:"?",description:"Show available keyboard shorts"},"submit-form":{keys:"enter",description:"Submit form"},"close-modal":{keys:"esc",description:"Close modal"},"show-scratchpad-modal":{keys:"mod+/",description:"Show scratchpad"}}},search:{title:"Search",description:"Keyboard shortcuts for search page",actions:{...Us,save:{keys:"mod+s",description:"Save search"},"save-as":{keys:"mod+shift+s",description:"Save search as"}}},dashboard:{title:"Dashboard",description:"Keyboard shortcuts for dashboard page",actions:{...Us,save:{keys:"mod+s",description:"Save dashboard"},"save-as":{keys:"mod+shift+s",description:"Save dashboard as"}}},"query-input":{title:"Query Input",description:"Keyboard shortcuts for query input in search bar, available when input is focussed.",actions:{"submit-search":{keys:"return",description:"Execute the search"},"insert-newline":{keys:"shift+return",description:"Create a new line"},"create-search-filter":{keys:"alt+return",description:"Create search filter based on current query"},"show-suggestions":{keys:"alt+space",description:"Show suggestions, displays query history when input is empty"},"show-history":{keys:"alt+shift+h",description:"View your search query history"}}},scratchpad:{title:"Scratchpad",description:"Scratchpad shortcuts",actions:{clear:{keys:["mod+backspace","mod+del"],description:"Clear scratchpad"},copy:{keys:"shift+mod+c",description:"Copy scratchpad"}}}},ts=({children:ue})=>{const[Te,Ge]=(0,t.useState)($o().Map()),{enabledScopes:mt}=(0,Ko.wc)(),[Dt,Jt]=(0,t.useState)(!1),mn=(0,t.useCallback)(({scope:Po,actionKey:Do,options:_s})=>{Ge(oa=>oa.set(`${Po}.${Do}`,{options:_s}))},[]),oo=(0,t.useCallback)(({scope:Po,actionKey:Do})=>{Ge(_s=>_s.delete(`${Po}.${Do}`))},[]),Qo=(0,t.useMemo)(()=>({enabledScopes:mt,hotKeysCollections:ga,activeHotkeys:Te,addActiveHotkey:mn,removeActiveHotkey:oo,showHotkeysModal:Dt,setShowHotkeysModal:Jt}),[Te,mn,mt,oo,Dt]);return t.createElement(es.A.Provider,{value:Qo},ue)},ys=({children:ue})=>(0,vs.A)("frontend_hotkeys")?t.createElement(Ko.Hb,null,t.createElement(ts,null,ue)):ue;var Ns=e("LF8A/8I5"),qs=e.n(Ns),_o=e("8u9vblRK"),Gs=e.n(_o),ea=e("3yfJIRSb"),js=e("aoXgygHD");const ta=r.default.div` padding: 20px; `,cs=r.default.div` display: flex; justify-content: space-between; align-items: center; `,Rs=({collection:ue,scope:Te})=>{const{activeHotkeys:Ge}=(0,ro.A)(),{title:mt,description:Dt,actions:Jt}=ue,mn=(0,t.useMemo)(()=>Object.entries(Jt).filter(([oo])=>{const Qo=`${Te}.${oo}`;return Ge.has(Qo)&&Ge.get(Qo).options.displayInOverview!==!1}).map(([oo,{description:Qo,keys:Po,displayKeys:Do}])=>{var _s,oa,jo,Is,us,as;const pr=!!((oa=(_s=Ge.get(`${Te}.${oo}`))==null?void 0:_s.options)!=null&&oa.enabled),sa=(Is=(jo=Ge.get(`${Te}.${oo}`))==null?void 0:jo.options)==null?void 0:Is.splitKey,aa=(as=(us=Ge.get(`${Te}.${oo}`))==null?void 0:us.options)==null?void 0:as.combinationKey,Ra=Gs()(Po)?Po.join(","):Po;return{isEnabled:pr,splitKey:sa,combinationKey:aa,reactKey:Ra,keyDescription:Qo,keys:Do!=null?Do:Po}}),[Jt,Ge,Te]);return mn.length?t.createElement(js.A,{sectionActions:mn,description:Dt,title:mt}):null},na=()=>{const{hotKeysCollections:ue,enabledScopes:Te}=(0,ro.A)(),mt=Te.length===1&&Te[0]==="*"?ue:qs()(ue,Te);return Object.entries(mt)},Ga=({onToggle:ue})=>{const Te=na();return t.createElement(_.Modal,{onHide:ue,show:!0,title:"Keyboard shortcuts",bsSize:"large"},t.createElement(_.Modal.Header,{closeButton:!0},t.createElement(_.Modal.Title,null,"Keyboard shortcuts")),t.createElement(_.Modal.Body,null,t.createElement(ta,null,t.createElement(ea.A,null,Te.map(([Ge,mt])=>t.createElement(Rs,{scope:Ge,collection:mt,key:Ge}))))),t.createElement(_.Modal.Footer,null,t.createElement(cs,null,t.createElement(Ie.N,{to:xe.Ay.KEYBOARD_SHORTCUTS,target:"_blank"},"View all keyboard shortcuts"),t.createElement(_.Button,{onClick:()=>ue()},"Close"))))},ja=()=>{const{showHotkeysModal:ue,setShowHotkeysModal:Te}=(0,ro.A)(),Ge=(0,t.useCallback)(()=>Te(mt=>!mt),[Te]);return(0,E.Ay)({actionKey:"show-hotkeys-modal",callback:()=>Te(!0),scope:"general"}),ue?t.createElement(Ga,{onToggle:()=>Ge()}):null};var Hs=e("J1ga+jW6"),Ca=e("lN93Sbbu"),ks=e("CXwqYNRt");const pe="default",Ae=(ue,Te)=>ue.find(({id:Ge})=>Ge===Te),$e=ue=>{const{userIsReadOnly:Te,username:Ge}=(0,ce.P)(Hs.y,mn=>{var oo,Qo,Po;return{username:(oo=mn.currentUser)==null?void 0:oo.username,userIsReadOnly:(Po=(Qo=mn.currentUser)==null?void 0:Qo.read_only)!=null?Po:!0}}),mt=(0,t.useContext)(Ca.A),Dt=Te?p.A.get(ue):mt[ue],Jt=(0,t.useCallback)(mn=>{if(Te)return p.A.set(ue,mn),Promise.resolve();const oo={...mt,[ue]:mn};return ks.W.saveUserPreferences(Ge,oo)},[ue,Te,mt,Ge]);return(0,t.useMemo)(()=>[Dt,Jt],[Jt,Dt])},Xe=ue=>{const[Te,Ge]=$e("perspective"),[mt,Dt]=(0,t.useState)(Ae(ue,Te)?Te:pe),Jt=(0,t.useCallback)(mn=>(Dt(mn),Ge(mn)),[Ge]);return{activePerspective:Ae(ue,mt),setActivePerspective:Jt}},xt=({children:ue})=>{const Ge=(0,An.A)("perspectives").filter(mn=>mn.useCondition?!!mn.useCondition():!0),{activePerspective:mt,setActivePerspective:Dt}=Xe(Ge),Jt=(0,t.useMemo)(()=>({activePerspective:mt,availablePerspectives:Ge,setActivePerspective:Dt}),[mt,Ge,Dt]);return t.createElement(ke.A.Provider,{value:Jt},ue)},Nt=r.default.div` display: flex; flex-direction: column; height: 100%; `,Ht=r.default.div` height: 100%; overflow: auto; flex: 1; `,Zt=r.default.div(({theme:ue})=>(0,r.css)` position: fixed; left: 50%; margin-left: -125px; top: 50px; /* stylelint-disable function-no-unknown */ color: ${ue.utils.readableColor(o()(ue.colors.brand.tertiary).alpha(.8).css())}; font-size: 80px; padding: 25px; z-index: 2000; width: 200px; text-align: center; cursor: pointer; border-radius: 10px; display: none; background: ${o()(ue.colors.brand.tertiary).alpha(.8).css()}; `),Un=()=>t.createElement(g.QueryParamProvider,{adapter:c.S},t.createElement(ze.A.Consumer,null,ue=>ue?t.createElement(xt,null,t.createElement(ys,null,t.createElement(m,{loginName:ue.username},t.createElement(Jo,null),t.createElement(t.Fragment,null,t.createElement(Nt,null,t.createElement(Cs,null),t.createElement(Zt,{id:"scroll-to-hint"},t.createElement(h.In,{name:"arrow_upward"})),t.createElement(at,null),t.createElement(Fn,null,t.createElement(go,null,t.createElement(Ht,null,t.createElement(n.Outlet,null))))),t.createElement(ja,null))))):t.createElement(h.y$,null)))},d4kzUuQm:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>M,o5:()=>P,p8:()=>_,vY:()=>c});var t=e("QL8i6bcz"),r=e("oCSEoDew"),s=e.n(r),o=e("RCNj0OY4"),n=e("nxMFMmDQ");const c="/security",g={STARTPAGE:"/",NOTFOUND:"/notfound",SEARCH:"/search",STREAMS:"/streams",ALERTS:{LIST:"/alerts",replay_search:O=>`/alerts/${O}/replay-search`,DEFINITIONS:{LIST:"/alerts/definitions",CREATE:"/alerts/definitions/new",edit:O=>`/alerts/definitions/${O}/edit`,show:O=>`/alerts/definitions/${O}`,replay_search:O=>`/alerts/definitions/${O}/replay-search`},NOTIFICATIONS:{LIST:"/alerts/notifications",CREATE:"/alerts/notifications/new",edit:O=>`/alerts/notifications/${O}/edit`,show:O=>`/alerts/notifications/${O}`}},SECURITY:{OVERVIEW:`${c}/overview`,USER_ACTIVITY:`${c}/user-activity`,HOST_ACTIVITY:`${c}/host-activity`,NETWORK_ACTIVITY:`${c}/network-activity`,ANOMALIES:`${c}/anomalies`,ACTIVITY:`${c}/activity`},SOURCES:"/sources",DASHBOARDS:"/dashboards",WELCOME:"/welcome",GLOBAL_API_BROWSER_URL:"/api/api-browser/global/index.html",SYSTEM:{CONFIGURATIONS:"/system/configurations",configurationsSection:(O,U)=>`/system/configurations/${O}${U?`/${U}`:""}`,CONTENTPACKS:{LIST:"/system/contentpacks",EXPORT:"/system/contentpacks/export",CREATE:"/system/contentpacks/create",edit:(O,U)=>`/system/contentpacks/${O}/${U}/edit`,show:O=>`/system/contentpacks/${O}`},GROKPATTERNS:"/system/grokpatterns",INDICES:{LIST:"/system/indices",FAILURES:"/system/indices/failures",FIELD_TYPE_PROFILES:{OVERVIEW:"/system/indices/field-type-profiles",edit:O=>`/system/indices/field-type-profiles/${O}`,CREATE:"/system/indices/field-type-profiles/create"}},INDEX_SETS:{CONFIGURATION:(O,U)=>U?`/system/index_sets/${O}/configuration?from=${U}`:`/system/index_sets/${O}/configuration`,SHOW:O=>`/system/index_sets/${O}`,FIELD_TYPES:O=>`/system/index_sets/${O}/field-types`,CREATE:"/system/index_sets/create"},INPUTS:"/system/inputs",LOGGING:"/system/logging",METRICS:O=>`/system/metrics/node/${O}`,NODES:{LIST:"/system/nodes",SHOW:O=>`/system/nodes/${O}`},DATANODES:{LIST:"/system/datanodes",SHOW:O=>`/system/datanodes/${O}`,CLUSTER:"/system/datanodes/cluster",CONFIGURATION:"/system/datanodes/configuration",MIGRATION:"/system/datanodes/migration"},THREADDUMP:O=>`/system/threaddump/${O}`,OUTPUTS:"/system/outputs",OVERVIEW:"/system/overview",PROCESSBUFFERDUMP:O=>`/system/processbufferdump/${O}`,SYSTEMLOGS:O=>`/system/logs/recent/${O}`,AUTHENTICATION:{BACKENDS:{OVERVIEW:"/system/authentication/services",ACTIVE:"/system/authentication/services/active",CREATE:"/system/authentication/services/create",createBackend:O=>`/system/authentication/services/create/${O}`,show:O=>`/system/authentication/services/${O}`,edit:(O,U)=>{const W=`/system/authentication/services/edit/${O}`;return U?`${W}?initialStepKey=${U}`:W}},AUTHENTICATORS:{SHOW:"/system/authentication/authenticator",EDIT:"/system/authentication/authenticator/edit"}},USERS:{CREATE:"/system/users/new",edit:O=>`/system/users/edit/${O}`,TOKENS:{edit:O=>`/system/users/tokens/${O}`},OVERVIEW:"/system/users",show:O=>`/system/users/${O}`},AUTHZROLES:{OVERVIEW:"/system/roles",show:O=>`/system/roles/${O}`,edit:O=>`/system/roles/edit/${O}`},LOOKUPTABLES:{OVERVIEW:"/system/lookuptables",CREATE:"/system/lookuptables/create",show:O=>`/system/lookuptables/table/${O}`,edit:O=>`/system/lookuptables/table/${O}/edit`,CACHES:{OVERVIEW:"/system/lookuptables/caches",CREATE:"/system/lookuptables/caches/create",show:O=>`/system/lookuptables/caches/${O}`,edit:O=>`/system/lookuptables/caches/${O}/edit`},DATA_ADAPTERS:{OVERVIEW:"/system/lookuptables/data_adapters",CREATE:"/system/lookuptables/data_adapters/create",show:O=>`/system/lookuptables/data_adapter/${O}`,edit:O=>`/system/lookuptables/data_adapter/${O}/edit`}},PIPELINES:{OVERVIEW:"/system/pipelines",PIPELINE:O=>`/system/pipelines/${O}`,RULES:"/system/pipelines/rules",RULE:O=>`/system/pipelines/rules/${O}`,SIMULATOR:"/system/pipelines/simulate"},ENTERPRISE:"/system/enterprise",SIDECARS:{OVERVIEW:"/system/sidecars",STATUS:O=>`/system/sidecars/${O}/status`,ADMINISTRATION:"/system/sidecars/administration",CONFIGURATION:"/system/sidecars/configuration",FAILURE_TRACKING:"/system/sidecars/failuretracking",NEW_CONFIGURATION:"/system/sidecars/configuration/new",EDIT_CONFIGURATION:O=>`/system/sidecars/configuration/edit/${O}`,NEW_COLLECTOR:"/system/sidecars/collector/new",EDIT_COLLECTOR:O=>`/system/sidecars/collector/edit/${O}`}},VIEWS:{LIST:n.Gv,VIEWID:O=>`${n.Gv}/${O}`},EXTENDEDSEARCH:n.pZ,KEYBOARD_SHORTCUTS:"/keyboard-shortcuts",search_with_query:(O,U,W,K)=>{const j=new(s())(g.SEARCH),G={q:O};if(U&&W)switch(G.rangetype=U,U){case"relative":G.relative=W.relative;break;case"absolute":G.from=W.from,G.to=W.to;break;case"keyword":G.keyword=W.keyword;break;default:throw new Error(`Invalid range type: ${U}.`)}return K&&(G.streams=K.join(",")),j.query(G),j.resource()},_common_search_url:(O,U,W,K)=>{const j=new(s())(O),G={q:U,interval:K};return W&&Object.keys(W).forEach(k=>{G[k]=W[k]}),j.setQuery(G),j.resource()},search:(O,U,W)=>g._common_search_url(g.SEARCH,O,U,W),message_show:(O,U)=>`/messages/${O}/${U}`,stream_edit:O=>`/streams/${O}/edit`,stream_edit_example:(O,U,W)=>`${g.stream_edit(O)}?index=${U}&message_id=${W}`,stream_outputs:O=>`/streams/${O}/outputs`,stream_search:(O,U,W,K)=>g._common_search_url(`${g.STREAMS}/${O}/search`,U,W,K),stream_alerts:O=>`/alerts/?stream_id=${O}`,legacy_stream_search:O=>`/streams/${O}/messages`,dashboard_show:O=>`/dashboards/${O}`,show_saved_search:O=>`/search/${O}`,node:O=>`/system/nodes/${O}`,node_inputs:O=>`${g.SYSTEM.INPUTS}/${O}`,global_input_extractors:O=>`/system/inputs/${O}/extractors`,local_input_extractors:(O,U)=>`/system/inputs/${O}/${U}/extractors`,export_extractors:(O,U)=>`${g.local_input_extractors(O,U)}/export`,import_extractors:(O,U)=>`${g.local_input_extractors(O,U)}/import`,new_extractor:(O,U,W,K,j,G)=>{const k=new(s())(`/system/inputs/${O}/${U}/extractors/new`),Q={extractor_type:W,field:K,example_index:j,example_id:G};return k.search(Q),k.resource()},edit_extractor:(O,U,W)=>`/system/inputs/${O}/${U}/extractors/${W}/edit`,edit_input_extractor:(O,U,W)=>`/system/inputs/${O}/${U}/extractors/${W}/edit`,filtered_metrics:(O,U)=>`${g.SYSTEM.METRICS(O)}?filter=${U}`,global_api_browser:()=>g.GLOBAL_API_BROWSER_URL},d=(O,U)=>{const W=new(s())(O);return W.directory(`${U}/${W.directory()}`).normalizePath().resource()},f=O=>typeof O=="string",p=O=>typeof O=="function",E=(O,U)=>U==="/"?O:Object.fromEntries(Object.entries(O).map(([W,K])=>f(K)?[W,d(K,U)]:p(K)?[W,(...j)=>{const G=K(...j);return d(G,U)}]:[W,E(K,U)])),l=O=>{const U=AppConfig.gl2AppPathPrefix();return!U||U===""||U==="/"?O:d(O,U)},m=o.A.gl2AppPathPrefix()?E(g,o.A.gl2AppPathPrefix()):g,h=g,A=(O,U=!0)=>{const W={};t.d.exports("routes").forEach(j=>{const G=new(s())(j.path),k=G.segment(),Q=k.map(z=>z.replace(":","")).join("_").toUpperCase(),ne=k.filter(z=>z.startsWith(":"));if(ne.length>0){W[Q]=(...z)=>(ne.forEach((le,V)=>{const me=String(z[V]);G.segment(k.indexOf(le),me)}),G.pathname());return}W[Q]=j.path});const K=(o.A.gl2AppPathPrefix()?E(W,o.A.gl2AppPathPrefix()):W)[O];if(!K&&U)throw new Error(`Could not find plugin route '${O}'.`);return K},C=O=>A(O,!1),_="Enterprise",P="Security",M=Object.assign(m,{pluginRoute:A,getPluginRoute:C,unqualified:h})},tz1fbBRX:(x,y,e)=>{"use strict";e.d(y,{A:()=>p});var t=e("Q1zRxDOP"),r=e("d4kzUuQm"),s=e("vT7mdtQI"),o=e("0hhBr0/b");const n=(E,l,m)=>{for(let h=0;h{const m=(0,o.A)("entityRoutes");return m!=null&&m.length?n(m,E,l):null},d=(E,l)=>{var m,h;const A=c(E,l);if(A)return A;switch(l==null?void 0:l.toLowerCase()){case"user":return r.Ay.SYSTEM.USERS.show(E);case"team":return r.Ay.getPluginRoute("SYSTEM_TEAMS_TEAMID")(E);case"dashboard":return r.Ay.dashboard_show(E);case"event_definition":return r.Ay.ALERTS.DEFINITIONS.show(E);case"notification":return r.Ay.ALERTS.NOTIFICATIONS.show(E);case"search":return r.Ay.getPluginRoute("SEARCH_VIEWID")(E);case"stream":return r.Ay.stream_search(E);case"search_filter":return(m=r.Ay.getPluginRoute("MY-FILTERS_DETAILS_FILTERID"))==null?void 0:m(E);case"report":return(h=r.Ay.getPluginRoute("REPORTS_REPORTID_CONFIGURATION"))==null?void 0:h(E);case"role":return r.Ay.SYSTEM.AUTHZROLES.show(E);case"output":return r.Ay.SYSTEM.OUTPUTS;default:return(0,s.A)(l!=null?l:"(undefined)","Can't find route for type")}},p=E=>{const{id:l,type:m}=(0,t.U)(E);return d(l,m)}},"8jTixuP6":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("y2LHvPyS");const s=({error:g})=>((0,t.useEffect)(()=>{console.error(g)},[g]),t.createElement("div",null,"Loading component failed: ",g.message)),o=t.createElement(t.Fragment,null),c=g=>{const d=t.lazy(g);return t.forwardRef((f,p)=>t.createElement(r.tH,{FallbackComponent:s},t.createElement(t.Suspense,{fallback:o},t.createElement(d,{...f,ref:p}))))}},"/7OuCFNo":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("yAXMqwrl");const o=()=>{const n=(0,r.useNavigate)();return(0,t.useMemo)(()=>({goBack:()=>n(-1),push:c=>n(c),pushWithState:(c,g)=>n(c,{state:g}),replace:c=>n(c,{replace:!0})}),[n])}},"0t7Ye+61":(x,y,e)=>{"use strict";e.d(y,{A:()=>r});var t=e("yAXMqwrl");const r=t.useLocation},"6dLKCZdN":(x,y,e)=>{"use strict";e.d(y,{A:()=>r});var t=e("yAXMqwrl");const r=t.useParams},brbjQOmY:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("pjsNBHWI"),s=e.n(r),o=e("0t7Ye+61");const c=()=>{const{search:g}=(0,o.A)();return(0,t.useMemo)(()=>s().parse(g,{ignoreQueryPrefix:!0}),[g])}},N6x7vnl1:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("/7OuCFNo");const o=n=>c=>{const g=(0,r.A)();return t.createElement(n,{...c,history:g})}},HCsT5Gmk:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("0t7Ye+61"),s=e("brbjQOmY");const n=c=>g=>{const d=(0,r.A)(),f=(0,s.A)(),p=(0,t.useMemo)(()=>({...d,query:f}),[d,f]);return t.createElement(c,{...g,location:p})}},ibdPvtmL:(x,y,e)=>{"use strict";e.d(y,{H:()=>p,t:()=>d});var t=e("JnTtTRmZ"),r=e.n(t),s=e("MdYBRjRJ"),o=e("eFxcQyPT"),n=e("U1Iufsob"),c=e("jAGDuYSC"),g=e("IA3Ku5lS");const d=(0,g.rN)("core.Configuration",()=>r().createActions({list:{asyncResult:!0},listSearchesClusterConfig:{asyncResult:!0},listMessageProcessorsConfig:{asyncResult:!0},listEventsClusterConfig:{asyncResult:!0},listIndexSetsDefaultsClusterConfig:{asyncResult:!0},listWhiteListConfig:{asyncResult:!0},listPermissionsConfig:{asyncResult:!0},listUserConfig:{asyncResult:!0},update:{asyncResult:!0},updateWhitelist:{asyncResult:!0},updateIndexSetDefaults:{asyncResult:!0},updateMessageProcessorsConfig:{asyncResult:!0}})),f=n.A.ClusterConfigResource.config().url,p=(0,g.Bv)("core.Configuration",()=>r().createStore({listenables:[d],configuration:{},searchesClusterConfig:{},eventsClusterConfig:{},indexSetsDefaultConfig:{},getInitialState(){return this.getState()},getState(){return{configuration:this.configuration,searchesClusterConfig:this.searchesClusterConfig,eventsClusterConfig:this.eventsClusterConfig,indexSetsDefaultConfig:this.indexSetsDefaultConfig}},propagateChanges(){this.trigger(this.getState())},_url(E){return(0,s.H3)(f+E)},list(E){const l=(0,o.Ay)("GET",this._url(`/${E}`));l.then(m=>(this.configuration={...this.configuration,[E]:m},this.propagateChanges(),m)),d.list.promise(l)},listSearchesClusterConfig(){const E=(0,o.Ay)("GET",this._url("/org.graylog2.indexer.searches.SearchesClusterConfig")).then(l=>(this.searchesClusterConfig=l,this.propagateChanges(),l));d.listSearchesClusterConfig.promise(E)},listMessageProcessorsConfig(E){const l=(0,o.Ay)("GET",(0,s.H3)("/system/messageprocessors/config")).then(m=>(this.configuration={...this.configuration,[E]:m},this.propagateChanges(),m));d.listMessageProcessorsConfig.promise(l)},listWhiteListConfig(E){const l=(0,o.Ay)("GET",(0,s.H3)("/system/urlwhitelist")).then(m=>(this.configuration={...this.configuration,[E]:m},this.propagateChanges(),m));d.listWhiteListConfig.promise(l)},listPermissionsConfig(E){const l=(0,o.Ay)("GET",this._url(`/${E}`)).then(m=>(this.configuration={...this.configuration,[E]:m||{allow_sharing_with_everyone:!0,allow_sharing_with_users:!0}},this.propagateChanges(),m));d.listPermissionsConfig.promise(l)},listUserConfig(E){const l=(0,o.Ay)("GET",this._url(`/${E}`)).then(m=>(this.configuration={...this.configuration,[E]:m||{enable_global_session_timeout:!1,global_session_timeout_interval:"PT1H"}},this.propagateChanges(),m));d.listUserConfig.promise(l)},listEventsClusterConfig(){const E=(0,o.Ay)("GET",this._url("/org.graylog.events.configuration.EventsConfiguration")).then(l=>(this.eventsClusterConfig=l,this.propagateChanges(),l));d.listEventsClusterConfig.promise(E)},listIndexSetsDefaultsClusterConfig(){const E=(0,o.Ay)("GET",this._url("/org.graylog2.configuration.IndexSetsDefaultConfiguration")).then(l=>(this.indexSetsDefaultConfig=l,this.propagateChanges(),l));d.listIndexSetsDefaultsClusterConfig.promise(E)},updateIndexSetDefaults(E,l){const m=(0,o.Ay)("PUT",(0,s.H3)("/system/indices/index_set_defaults"),l);m.then(()=>(this.configuration={...this.configuration,[E]:l},this.propagateChanges(),c.A.success("Index defaults configuration updated successfully"),l),h=>{c.A.error(h.additional.body.message,"Index defaults configuration update failed")}),d.updateIndexSetDefaults.promise(m)},update(E,l){const m=(0,o.Ay)("PUT",this._url(`/${E}`),l);m.then(h=>(this.configuration={...this.configuration,[E]:h},this.propagateChanges(),c.A.success("Configuration updated successfully"),h),h=>{c.A.error(`Search config update failed: ${h}`,`Could not update search config: ${E}`)}),d.update.promise(m)},updateWhitelist(E,l){const m=(0,o.Ay)("PUT",(0,s.H3)("/system/urlwhitelist"),l);m.then(()=>(this.configuration={...this.configuration,[E]:l},this.propagateChanges(),c.A.success("Url Whitelist Configuration updated successfully"),l),h=>{c.A.error(`Url Whitelist config update failed: ${h}`,`Could not update Url Whitelist: ${E}`)}),d.updateWhitelist.promise(m)},updateMessageProcessorsConfig(E,l){const m=(0,o.Ay)("PUT",(0,s.H3)("/system/messageprocessors/config"),l);m.then(h=>(this.configuration={...this.configuration,[E]:h},this.propagateChanges(),c.A.success("Configuration updated successfully"),h),h=>{c.A.error(`Message processors config update failed: ${h}`,`Could not update config: ${E}`)}),d.updateMessageProcessorsConfig.promise(m)}}))},"8fnsnG21":(x,y,e)=>{"use strict";e.d(y,{A:()=>d,P:()=>c});var t=e("Z7aTuO5B"),r=e("87D/Fijl"),s=e.n(r),o=e("SwOo9/Yp");const n=f=>f;function c(f,p=n){const[E,l]=(0,t.useState)(()=>f.getInitialState()),m=(0,t.useRef)(E),h=(0,t.useMemo)(()=>p(E),[p,E]);return(0,t.useEffect)(()=>{const A=f.listen(C=>{(0,o.A)(C,m.current)||(l(C),m.current=C)});return l(f.getInitialState()),A},[f]),h}function g(f,p,E=l=>l){const l=f.displayName||f.name||"Unknown/Anonymous";class m extends t.Component{constructor(A){super(A),this._genProps=_=>{const P={};return Object.keys(p).forEach(I=>{P[I]=_[I]}),E(P)};const C=Object.keys(p).map(_=>{const P=p[_];if(P===void 0||!s()(P.getInitialState))return console.error(`Error: The store passed for the \`${_}\` property is not defined or invalid. Check the connect()-call wrapping your \`${l}\` component.`),[_,void 0];const I=P.getInitialState();return[_,I]}).reduce((_,[P,I])=>({..._,[P]:I}),{});this.state={...this.state,...C}}componentDidMount(){this.unsubscribes=Object.keys(p).map(A=>{const C=p[A];return C===void 0||!s()(C.listen)?(console.error(`Error: The store passed for the \`${A}\` property is not defined or invalid. Check the connect()-call wrapping your \`${l}\` component.`),()=>{}):C.listen(_=>this.setState(P=>({...P,[A]:_})))})}shouldComponentUpdate(A,C){const _=this._genProps(this.state),P=this._genProps(C);return!((0,o.A)(_,P)&&(0,o.A)(this.props,A))}componentWillUnmount(){this.unsubscribes.forEach(A=>A())}render(){const A=this._genProps(this.state),{ref:C,..._}=this.props;return t.createElement(f,{...A,..._})}}return m.displayName=`ConnectStoresWrapper[${l}] stores=${Object.keys(p).join(",")}`,m}const d=g},pa3lbc7X:(x,y,e)=>{"use strict";e.d(y,{A:()=>g,i:()=>d});var t=e("JnTtTRmZ"),r=e.n(t),s=e("MdYBRjRJ"),o=e("U1Iufsob"),n=e("eFxcQyPT"),c=e("IA3Ku5lS");const g=(0,c.rN)("core.Decorators",()=>r().createActions({available:{asyncResult:!0},create:{asyncResult:!0},list:{asyncResult:!0},remove:{asyncResult:!0},update:{asyncResult:!0}})),d=(0,c.Bv)("core.Decorators",()=>r().createStore({listenables:[g],state:{},getInitialState(){return this.state},init(){g.available(),g.list()},list(){const f=s.H3(o.A.DecoratorsResource.get().url),p=(0,n.Ay)("GET",f);return p.then(E=>{this.trigger({decorators:E}),this.state.decorators=E}),g.list.promise(p),p},available(){const f=s.H3(o.A.DecoratorsResource.available().url),p=(0,n.Ay)("GET",f);return p.then(E=>{this.trigger({types:E}),this.state.types=E}),g.available.promise(p),p},create(f){const p=s.H3(o.A.DecoratorsResource.create().url),E=(0,n.Ay)("POST",p,f);return g.create.promise(E),E},createCompleted(){g.list()},remove(f){const p=s.H3(o.A.DecoratorsResource.remove(f).url),E=(0,n.Ay)("DELETE",p);return g.remove.promise(E),E},removeCompleted(){g.list()},update(f,p){const E=s.H3(o.A.DecoratorsResource.update(f).url),l=(0,n.Ay)("PUT",E,p);return g.update.promise(l),l},updateCompleted(){g.list()}}))},cd5HAK44:(x,y,e)=>{"use strict";e.d(y,{a:()=>M,o:()=>O});var t=e("JnTtTRmZ"),r=e.n(t),s=e("oCSEoDew"),o=e.n(s),n=e("IW7priiX"),c=e.n(n),g=e("u1Q00LVl"),d=e.n(g),f=e("WgCNywL/"),p=e.n(f),E=e("LF8A/8I5"),l=e.n(E),m=e("RjO1iR6D"),h=e.n(m),A=e("MdYBRjRJ"),C=e("gyRmhZSW"),_=e("jAGDuYSC"),P=e("eFxcQyPT"),I=e("IA3Ku5lS");const M=(0,I.rN)("core.EventDefinitions",()=>r().createActions({listAll:{asyncResult:!0},listPaginated:{asyncResult:!0},searchPaginated:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},copy:{asyncResult:!0},update:{asyncResult:!0},delete:{asyncResult:!0},enable:{asyncResult:!0},disable:{asyncResult:!0},clearNotificationQueue:{asyncResult:!0}})),O=(0,I.Bv)("core.EventDefinitions",()=>r().createStore({listenables:[M],sourceUrl:"/events/definitions",all:void 0,eventDefinitions:void 0,context:void 0,query:void 0,pagination:{count:void 0,page:void 0,pageSize:void 0,total:void 0,grandTotal:void 0},getInitialState(){return this.getState()},propagateChanges(){this.trigger(this.getState())},getState(){return{all:this.all,eventDefinitions:this.eventDefinitions,context:this.context,query:this.query,pagination:this.pagination}},eventDefinitionsUrl({segments:U=[],query:W={}}){const K=new(o())(this.sourceUrl),j=d()(K.segment(),U);return K.segmentCoded(j),K.query(W),A.H3(K.resource())},refresh(){this.all&&this.listAll(),this.pagination.page&&this.listPaginated({query:this.query,page:this.pagination.page,pageSize:this.pagination.pageSize})},listAll(){const U=(0,P.Ay)("GET",this.eventDefinitionsUrl({query:{per_page:0}}));U.then(W=>(this.all=W.event_definitions,this.context=W.context,this.propagateChanges(),W)),M.listAll.promise(U)},listPaginated({query:U="",page:W=1,pageSize:K=10}){const j=(0,P.Ay)("GET",this.eventDefinitionsUrl({query:{query:U,page:W,per_page:K}}));j.then(G=>(this.eventDefinitions=G.event_definitions,this.context=G.context,this.query=G.query,this.pagination={count:G.count,page:G.page,pageSize:G.per_page,total:G.total,grandTotal:G.grand_total},this.propagateChanges(),G)).catch(G=>{_.A.error(`Fetching event definitions failed with status: ${G}`,"Could not retrieve event definitions")}),M.listPaginated.promise(j)},searchPaginated(U,W,K,j){const G=(0,C.A)(`${this.sourceUrl}/paginated`,U,W,K,j),k=(0,P.Ay)("GET",A.H3(G)).then(Q=>{const{elements:ne,query:z,attributes:le,pagination:{count:V,total:me,page:Pe,per_page:Ve}}=Q;return{elements:ne,attributes:le,pagination:{count:V,total:me,page:Pe,perPage:Ve,query:z}}});return M.searchPaginated.promise(k),k},get(U){const W=(0,P.Ay)("GET",this.eventDefinitionsUrl({segments:[U,"with-context"]}));W.catch(K=>{K.status===404&&_.A.error(`Unable to find Event Definition with id <${U}>, please ensure it wasn't deleted.`,"Could not retrieve Event Definition")}),M.get.promise(W)},setAlertFlag(U){const W=U.notifications.length>0;return{...U,alert:W}},extractSchedulerInfo(U){const W=c()(U),{_is_scheduled:K}=l()(W.config,["_is_scheduled"]);return W.config=h()(W.config,["_is_scheduled"]),{eventDefinition:W,isScheduled:p()(K,!0)}},create(U){const{eventDefinition:W,isScheduled:K}=this.extractSchedulerInfo(U),j=(0,P.Ay)("POST",this.eventDefinitionsUrl({query:{schedule:K}}),this.setAlertFlag(W));j.then(G=>(_.A.success("Event Definition created successfully",`Event Definition "${W.title}" was created successfully.`),this.refresh(),G),G=>{(G.status!==400||!G.additional.body||!G.additional.body.failed)&&_.A.error(`Creating Event Definition "${W.title}" failed with status: ${G}`,"Could not save Event Definition")}),M.create.promise(j)},copy(U){const W=(0,P.Ay)("POST",this.eventDefinitionsUrl({segments:[U.id,"duplicate"]}));W.then(K=>(_.A.success("Event Definition duplicated successfully",`Event Definition "${K.title}" was created successfully.`),this.refresh(),K),K=>{(K.status!==400||!K.additional.body||!K.additional.body.failed)&&_.A.error(`Duplicating Event Definition "${U.title}" failed with status: ${K}`,"Could not duplicate Event Definition")}),M.copy.promise(W)},update(U,W){const{eventDefinition:K,isScheduled:j}=this.extractSchedulerInfo(W),G=(0,P.Ay)("PUT",this.eventDefinitionsUrl({segments:[U],query:{schedule:j}}),this.setAlertFlag(K));G.then(k=>(_.A.success("Event Definition updated successfully",`Event Definition "${K.title}" was updated successfully.`),this.refresh(),k),k=>{(k.status!==400||!k.additional.body||!k.additional.body.failed)&&_.A.error(`Updating Event Definition "${K.title}" failed with status: ${k}`,"Could not update Event Definition")}),M.update.promise(G)},delete(U){const W=(0,P.Ay)("DELETE",this.eventDefinitionsUrl({segments:[U.id]}));M.delete.promise(W)},enable(U){const W=(0,P.Ay)("PUT",this.eventDefinitionsUrl({segments:[U.id,"schedule"]}));W.then(K=>(_.A.success("Event Definition successfully enabled",`Event Definition "${U.title}" was successfully enabled.`),this.refresh(),K),K=>{(K.status!==400||!K.additional.body||!K.additional.body.failed)&&_.A.error(`Enabling Event Definition "${U.title}" failed with status: ${K}`,"Could not enable Event Definition")}),M.enable.promise(W)},disable(U){const W=(0,P.Ay)("PUT",this.eventDefinitionsUrl({segments:[U.id,"unschedule"]}));W.then(K=>(_.A.success("Event Definition successfully disabled",`Event Definition "${U.title}" was successfully disabled.`),this.refresh(),K),K=>{(K.status!==400||!K.additional.body||!K.additional.body.failed)&&_.A.error(`Disabling Event Definition "${U.title}" failed with status: ${K}`,"Could not disable Event Definition")}),M.disable.promise(W)},clearNotificationQueue(U){const W=(0,P.Ay)("PUT",this.eventDefinitionsUrl({segments:[U.id,"clear-notification-queue"]}));W.then(K=>(_.A.success("Queued notifications cleared.","Queued notifications were successfully cleared."),this.refresh(),K),K=>{(K.status!==400||!K.additional.body||!K.additional.body.failed)&&_.A.error(`Clearing queued notifications failed with status: ${K}`,"Could not clear queued notifications")}),M.clearNotificationQueue.promise(W)}}))},J7MaobQD:(x,y,e)=>{"use strict";e.d(y,{M:()=>l,c:()=>m});var t=e("JnTtTRmZ"),r=e.n(t),s=e("oCSEoDew"),o=e.n(s),n=e("u1Q00LVl"),c=e.n(n),g=e("MdYBRjRJ"),d=e("jAGDuYSC"),f=e("eFxcQyPT"),p=e("IA3Ku5lS"),E=e("gyRmhZSW");const l=(0,p.rN)("core.EventNotifications",()=>r().createActions({listAll:{asyncResult:!0},listAllLegacyTypes:{asyncResult:!0},listPaginated:{asyncResult:!0},searchPaginated:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},update:{asyncResult:!0},delete:{asyncResult:!0},test:{asyncResult:!0},testPersisted:{asyncResult:!0}})),m=(0,p.Bv)("core.EventNotifications",()=>r().createStore({listenables:[l],sourceUrl:"/events/notifications",all:void 0,allLegacyTypes:void 0,notifications:void 0,query:void 0,pagination:{count:void 0,page:void 0,pageSize:void 0,total:void 0,grandTotal:void 0},getInitialState(){return this.getState()},propagateChanges(){this.trigger(this.getState())},getState(){return{all:this.all,allLegacyTypes:this.allLegacyTypes,notifications:this.notifications,query:this.query,pagination:this.pagination}},eventNotificationsUrl({segments:h=[],query:A={}}){const C=new(o())(this.sourceUrl),_=c()(C.segment(),h);return C.segmentCoded(_),C.query(A),g.H3(C.resource())},refresh(){this.all&&this.listAll(),this.pagination.page&&this.listPaginated({query:this.query,page:this.pagination.page,pageSize:this.pagination.pageSize})},listAll(){const h=(0,f.Ay)("GET",this.eventNotificationsUrl({query:{per_page:0}}));h.then(A=>(this.all=A.notifications,this.propagateChanges(),A)),l.listAll.promise(h)},listPaginated({query:h="",page:A=1,pageSize:C=10}){const _=(0,f.Ay)("GET",this.eventNotificationsUrl({query:{query:h,page:A,per_page:C}}));_.then(P=>(this.notifications=P.notifications,this.query=P.query,this.pagination={count:P.count,page:P.page,pageSize:P.per_page,total:P.total,grandTotal:P.grand_total},this.propagateChanges(),P)),l.listPaginated.promise(_)},searchPaginated(h,A,C,_){const P=(0,E.A)(`${this.sourceUrl}/paginated`,h,A,C,_),I=(0,f.Ay)("GET",g.H3(P)).then(M=>{const{elements:O,query:U,attributes:W,pagination:{count:K,total:j,page:G,per_page:k}}=M;return{elements:O,attributes:W,pagination:{count:K,total:j,page:G,perPage:k,query:U}}});return l.searchPaginated.promise(I),I},get(h){const A=(0,f.Ay)("GET",this.eventNotificationsUrl({segments:[h]}));A.catch(C=>{C.status===404&&d.A.error(`Unable to find Event Notification with id <${h}>, please ensure it wasn't deleted.`,"Could not retrieve Event Notification")}),l.get.promise(A)},create(h){const A=(0,f.Ay)("POST",this.eventNotificationsUrl({}),h);A.then(C=>(d.A.success("Notification created successfully",`Notification "${h.title}" was created successfully.`),this.refresh(),C),C=>{(C.status!==400||!C.additional.body||!C.additional.body.failed)&&d.A.error(`Creating Notification "${h.title}" failed with status: ${C}`,"Could not save Notification")}),l.create.promise(A)},update(h,A){const C=(0,f.Ay)("PUT",this.eventNotificationsUrl({segments:[h]}),A);C.then(_=>(d.A.success("Notification updated successfully",`Notification "${A.title}" was updated successfully.`),this.refresh(),_),_=>{(_.status!==400||!_.additional.body||!_.additional.body.failed)&&d.A.error(`Updating Notification "${A.title}" failed with status: ${_}`,"Could not update Notification")}),l.update.promise(C)},delete(h){const A=(0,f.Ay)("DELETE",this.eventNotificationsUrl({segments:[h.id]}));A.then(()=>{d.A.success("Notification deleted successfully",`Notification "${h.title}" was deleted successfully.`),this.refresh()},C=>{d.A.error(`Deleting Notification "${h.title}" failed with status: ${C}`,"Could not delete Notification")}),l.delete.promise(A)},test(h){const A=(0,f.Ay)("POST",this.eventNotificationsUrl({segments:["test"]}),h);l.test.promise(A)},testPersisted(h){const A=(0,f.Ay)("POST",this.eventNotificationsUrl({segments:[h.id,"test"]}));l.testPersisted.promise(A)},listAllLegacyTypes(){const h=(0,f.Ay)("GET",this.eventNotificationsUrl({segments:["legacy","types"]}));h.then(A=>(this.allLegacyTypes=A.types,this.propagateChanges(),A)),l.listAllLegacyTypes.promise(h)}}))},"0j5jZleo":(x,y,e)=>{"use strict";e.d(y,{B:()=>g});var t=e("JnTtTRmZ"),r=e.n(t),s=e("jAGDuYSC"),o=e("MdYBRjRJ"),n=e("eFxcQyPT"),c=e("IA3Ku5lS");const g=(0,c.Bv)("core.InputStaticFields",()=>r().createStore({listenables:[],sourceUrl:d=>`/system/inputs/${d}/staticfields`,create(d,f,p){const E=o.H3(this.sourceUrl(d.id)),l=(0,n.Ay)("POST",E,{key:f,value:p});return l.then(m=>(this.trigger({}),s.A.success(`Static field '${f}' added to '${d.title}' successfully`),m),m=>{s.A.error(`Adding static field to input failed with: ${m}`,`Could not add static field to input '${d.title}'`)}),l},destroy(d,f){const p=o.H3(`${this.sourceUrl(d.id)}/${f}`),E=(0,n.Ay)("DELETE",p);return E.then(l=>(this.trigger({}),s.A.success(`Static field '${f}' removed from '${d.title}' successfully`),l),l=>{s.A.error(`Removing static field from input failed with: ${l}`,`Could not remove static field '${f} from input '${d.title}'`)}),E}}))},yEuO7gC5:(x,y,e)=>{"use strict";e.d(y,{C:()=>f,j:()=>d});var t=e("JnTtTRmZ"),r=e.n(t),s=e("MdYBRjRJ"),o=e("eFxcQyPT"),n=e("jAGDuYSC"),c=e("IA3Ku5lS"),g=e("0j5jZleo");const d=(0,c.rN)("core.Inputs",()=>r().createActions({list:{asyncResult:!0},get:{asyncResult:!0},getOptional:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},update:{asyncResult:!0}})),f=(0,c.Bv)("core.Inputs",()=>r().createStore({listenables:[d],sourceUrl:"/system/inputs",inputs:void 0,input:void 0,init(){this.trigger(this._state()),this.listenTo(g.B,this.list)},getInitialState(){return this._state()},_state(){return{inputs:this.inputs,input:this.input}},list(){const p=(0,o.Ay)("GET",s.H3(this.sourceUrl));p.then(E=>(this.inputs=E.inputs,this.trigger(this._state()),this.inputs),E=>{n.A.error(`Fetching Inputs failed with status: ${E}`,"Could not retrieve Inputs")}),d.list.promise(p)},get(p){return this.getOptional(p,!0)},getOptional(p,E){const l=(0,o.Ay)("GET",s.H3(`${this.sourceUrl}/${p}`));l.then(m=>(this.input=m,this.trigger(this._state()),this.input),m=>{E?n.A.error(`Fetching input ${p} failed with status: ${m}`,"Could not retrieve input"):this.trigger(this._state())}),d.get.promise(l)},create(p){const E=(0,o.Ay)("POST",s.H3(this.sourceUrl),p);E.then(()=>{n.A.success(`Input '${p.title}' launched successfully`),d.list()},l=>{n.A.error(`Launching input '${p.title}' failed with status: ${l}`,"Could not launch input")}),d.create.promise(E)},delete(p){const E=p.id,l=p.title,m=(0,o.Ay)("DELETE",s.H3(`${this.sourceUrl}/${E}`));m.then(()=>{n.A.success(`Input '${l}' deleted successfully`),d.list()},h=>{n.A.error(`Deleting input '${l}' failed with status: ${h}`,"Could not delete input")}),d.delete.promise(m)},update(p,E){const l=(0,o.Ay)("PUT",s.H3(`${this.sourceUrl}/${p}`),E);l.then(()=>{n.A.success(`Input '${E.title}' updated successfully`),d.list()},m=>{n.A.error(`Updating input '${E.title}' failed with status: ${m}`,"Could not update input")}),d.update.promise(l)}}));f.inputsAsMap=p=>{const E={};return p.forEach(l=>{E[l.id]=l}),E}},"SwOo9/Yp":(x,y,e)=>{"use strict";e.d(y,{A:()=>m});var t=e("1twFHSbl"),r=e.n(t),s=e("87D/Fijl"),o=e.n(s),n=e("Z7aTuO5B"),c=e("7KtBiBAd"),g=e.n(c);const d=(h,A)=>h&&h[A]&&o()(h[A]),f=h=>d(h,"equals"),p=h=>d(h,"toJS"),E=(h,A)=>{if(p(h)&&p(A))return r()(h.toJS(),A.toJS(),E);if(f(h))return h.equals(A);if((0,n.isValidElement)(h)||(0,n.isValidElement)(A))return g()(h,A)},m=(h,A)=>r()(h,A,E)},s67As4Iu:(x,y,e)=>{"use strict";e.d(y,{R:()=>d,Z:()=>g});var t=e("JnTtTRmZ"),r=e.n(t),s=e("jAGDuYSC"),o=e("MdYBRjRJ"),n=e("eFxcQyPT"),c=e("IA3Ku5lS");const g=(0,c.rN)("core.LookupTableCaches",()=>r().createActions({searchPaginated:{asyncResult:!0},reloadPage:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},update:{asyncResult:!0},getTypes:{asyncResult:!0},validate:{asyncResult:!0}})),d=(0,c.Bv)("core.LookupTableCaches",()=>r().createStore({listenables:[g],cache:null,caches:null,types:null,pagination:{page:1,per_page:10,total:0,count:0,query:null},validationErrors:{},getInitialState(){return this.getState()},getState(){return{cache:this.cache,caches:this.caches,types:this.types,pagination:this.pagination,validationErrors:this.validationErrors}},propagateChanges(){this.trigger(this.getState())},reloadPage(){const f=this.searchPaginated(this.pagination.page,this.pagination.per_page,this.pagination.query);return g.reloadPage.promise(f),f},searchPaginated(f,p,E){let l;E?l=this._url(`caches?page=${f}&per_page=${p}&query=${encodeURIComponent(E)}`):l=this._url(`caches?page=${f}&per_page=${p}`);const m=(0,n.Ay)("GET",l);return m.then(h=>{this.pagination={count:h.count,total:h.total,page:h.page,per_page:h.per_page,query:h.query},this.caches=h.caches,this.propagateChanges()},this._errorHandler("Fetching lookup table caches failed","Could not retrieve the lookup caches")),g.searchPaginated.promise(m),m},get(f){const p=this._url(`caches/${f}`),E=(0,n.Ay)("GET",p);return E.then(l=>{this.cache=l,this.propagateChanges()},this._errorHandler(`Fetching lookup table cache ${f} failed`,"Could not retrieve lookup table cache")),g.get.promise(E),E},create(f){const p=this._url("caches"),E=(0,n.Ay)("POST",p,f);return E.then(l=>{this.cache=l,this.propagateChanges()},this._errorHandler("Creating lookup table cache failed",`Could not create lookup table cache "${f.name}"`)),g.create.promise(E),E},update(f){const p=this._url(`caches/${f.id}`),E=(0,n.Ay)("PUT",p,f);return E.then(l=>{this.cache=l,this.propagateChanges()},this._errorHandler("Updating lookup table cache failed",`Could not update lookup table cache "${f.name}"`)),g.update.promise(E),E},getTypes(){const f=this._url("types/caches"),p=(0,n.Ay)("GET",f);return p.then(E=>{this.types=E,this.propagateChanges()},this._errorHandler("Fetching available types failed","Could not fetch the available lookup table cache types")),g.getTypes.promise(p),p},delete(f){const p=this._url(`caches/${f}`),E=(0,n.Ay)("DELETE",p);return E.catch(this._errorHandler("Deleting lookup table cache failed",`Could not delete lookup table cache "${f}"`)),g.delete.promise(E),E},validate(f){const p=this._url("caches/validate"),E=(0,n.Ay)("POST",p,f);return E.then(l=>{this.validationErrors=l.errors,this.propagateChanges()},this._errorHandler("Lookup table cache validation failed",`Could not validate lookup table cache "${f.name}"`)),g.validate.promise(E),E},_errorHandler(f,p,E){return l=>{let m;try{m=l.additional.body.message}catch{m=l.message}s.A.error(`${f}: ${m}`,p),E&&E(l)}},_url(f){return o.H3(`/system/lookup/${f}`)}}))},xg2EYAWP:(x,y,e)=>{"use strict";e.d(y,{G:()=>g,U:()=>d});var t=e("JnTtTRmZ"),r=e.n(t),s=e("jAGDuYSC"),o=e("MdYBRjRJ"),n=e("eFxcQyPT"),c=e("IA3Ku5lS");const g=(0,c.rN)("core.LookupTableDataAdapters",()=>r().createActions({searchPaginated:{asyncResult:!0},reloadPage:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},update:{asyncResult:!0},getTypes:{asyncResult:!0},lookup:{asyncResult:!0},validate:{asyncResult:!0}})),d=(0,c.Bv)("core.LookupTableDataAdapters",()=>r().createStore({listenables:[g],dataAdapter:null,dataAdapters:void 0,types:null,pagination:{page:1,per_page:10,total:0,count:0,query:null},lookupResult:null,validationErrors:{},getInitialState(){return this.getState()},getState(){return{dataAdapter:this.dataAdapter,dataAdapters:this.dataAdapters,lookupResult:this.lookupResult,types:this.types,pagination:this.pagination,validationErrors:this.validationErrors}},propagateChanges(){this.trigger(this.getState())},reloadPage(){const f=this.searchPaginated(this.pagination.page,this.pagination.per_page,this.pagination.query);return g.reloadPage.promise(f),f},searchPaginated(f,p,E){let l;E?l=this._url(`adapters?page=${f}&per_page=${p}&query=${encodeURIComponent(E)}`):l=this._url(`adapters?page=${f}&per_page=${p}`);const m=(0,n.Ay)("GET",l);return m.then(h=>{this.pagination={count:h.count,total:h.total,page:h.page,per_page:h.per_page,query:h.query},this.dataAdapters=h.data_adapters,this.propagateChanges()},this._errorHandler("Fetching lookup table data adapters failed","Could not retrieve the lookup dataAdapters")),g.searchPaginated.promise(m),m},get(f){const p=this._url(`adapters/${f}`),E=(0,n.Ay)("GET",p);return E.then(l=>{this.dataAdapter=l,this.propagateChanges()},this._errorHandler(`Fetching lookup table data adapter ${f} failed`,"Could not retrieve lookup table data adapter")),g.get.promise(E),E},create(f){const p=this._url("adapters"),E=(0,n.Ay)("POST",p,f);return E.then(l=>{this.dataAdapter=l,this.propagateChanges()},this._errorHandler("Creating lookup table data adapter failed",`Could not create lookup table data adapter "${f.name}"`)),g.create.promise(E),E},update(f){const p=this._url(`adapters/${f.id}`),E=(0,n.Ay)("PUT",p,f);return E.then(l=>{this.dataAdapter=l,this.propagateChanges()},this._errorHandler("Updating lookup table data adapter failed",`Could not update lookup table data adapter "${f.name}"`)),g.update.promise(E),E},getTypes(){const f=this._url("types/adapters"),p=(0,n.Ay)("GET",f);return p.then(E=>{this.types=E,this.propagateChanges()},this._errorHandler("Fetching available types failed","Could not fetch the available lookup table data adapter types")),g.getTypes.promise(p),p},delete(f){const p=this._url(`adapters/${f}`),E=(0,n.Ay)("DELETE",p);return E.catch(this._errorHandler("Deleting lookup table data adapter failed",`Could not delete lookup table data adapter "${f}"`)),g.delete.promise(E),E},lookup(f,p){const E=(0,n.Ay)("GET",this._url(`adapters/${f}/query?key=${encodeURIComponent(p)}`));return E.then(l=>{this.lookupResult=l,this.propagateChanges()},this._errorHandler("Lookup failed",`Could not lookup value for key "${p}" in lookup table data adapter "${f}"`)),g.lookup.promise(E),E},validate(f){const p=this._url("adapters/validate"),E=(0,n.Ay)("POST",p,f);return E.then(l=>{this.validationErrors=l.errors,this.propagateChanges()},this._errorHandler("Lookup table data adapter validation failed",`Could not validate lookup table data adapter "${f.name}"`)),g.validate.promise(E),E},_errorHandler(f,p,E){return l=>{let m;try{m=l.additional.body.message}catch{m=l.message}s.A.error(`${f}: ${m}`,p),E&&E(l)}},_url(f){return o.H3(`/system/lookup/${f}`)}}))},xPjmrmtt:(x,y,e)=>{"use strict";e.d(y,{B:()=>d,h:()=>f});var t=e("JnTtTRmZ"),r=e.n(t),s=e("jAGDuYSC"),o=e("gyRmhZSW"),n=e("MdYBRjRJ"),c=e("eFxcQyPT"),g=e("IA3Ku5lS");const d=(0,g.rN)("core.LookupTables",()=>r().createActions({searchPaginated:{asyncResult:!0},reloadPage:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},update:{asyncResult:!0},getErrors:{asyncResult:!0},lookup:{asyncResult:!0},purgeKey:{asyncResult:!0},purgeAll:{asyncResult:!0},validate:{asyncResult:!0}})),f=(0,g.Bv)("core.LookupTables",()=>r().createStore({listenables:[d],pagination:{page:1,per_page:10,total:0,count:0,query:null},errorStates:{tables:{},caches:{},dataAdapters:{}},table:null,cache:null,dataAdapter:null,tables:null,caches:null,dataAdapters:null,lookupResult:null,validationErrors:{},getInitialState(){return this.getState()},getState(){return{errorStates:this.errorStates,table:this.table,cache:this.cache,dataAdapter:this.dataAdapter,tables:this.tables,caches:this.caches,dataAdapters:this.dataAdapters,lookupResult:this.lookupResult,validationErrors:this.validationErrors,pagination:this.pagination}},propagateChanges(){this.trigger(this.getState())},reloadPage(){const p=this.searchPaginated(this.pagination.page,this.pagination.per_page,this.pagination.query);return d.reloadPage.promise(p),p},searchPaginated(p,E,l=null,m=!0){const h=this._url((0,o.A)("tables",p,E,l,{resolve:m})),A=(0,c.Ay)("GET",h);return A.then(C=>{this.pagination={count:C.count,total:C.total,page:C.page,per_page:C.per_page,query:C.query},this.tables=C.lookup_tables,this.caches=C.caches,this.dataAdapters=C.data_adapters,this.propagateChanges()},this._errorHandler("Fetching lookup tables failed","Could not retrieve the lookup tables")),d.searchPaginated.promise(A),A},get(p){const E=this._url(`tables/${p}?resolve=true`),l=(0,c.Ay)("GET",E);return l.then(m=>{const h=m.lookup_tables[0];this.table=h,this.cache=m.caches[h.cache_id],this.dataAdapter=m.data_adapters[h.data_adapter_id],this.propagateChanges()},this._errorHandler(`Fetching lookup table ${p} failed`,"Could not retrieve lookup table")),d.get.promise(l),l},create(p){const E=this._url("tables"),l=(0,c.Ay)("POST",E,p);return l.catch(this._errorHandler("Creating lookup table failed",`Could not create lookup table "${p.name}"`)),d.create.promise(l),l},update(p){const E=this._url(`tables/${p.id}`),l=(0,c.Ay)("PUT",E,p);return l.catch(this._errorHandler("Updating lookup table failed",`Could not update lookup table "${p.name}"`)),d.update.promise(l),l},delete(p){const E=this._url(`tables/${p}`),l=(0,c.Ay)("DELETE",E);return l.catch(this._errorHandler("Deleting lookup table failed",`Could not delete lookup table "${p}"`)),d.delete.promise(l),l},getErrors(p,E,l){const m={};p&&(m.tables=p),E&&(m.caches=E),l&&(m.data_adapters=l);const h=(0,c.Ay)("POST",this._url("errorstates"),m);return h.then(A=>{this.errorStates={tables:A.tables||{},caches:A.caches||{},dataAdapters:A.data_adapters||{}},this.propagateChanges()},this._errorHandler("Fetching lookup table error state failed.","Could not error states")),d.getErrors.promise(h),h},lookup(p,E){const l=(0,c.Ay)("GET",this._url(`tables/${p}/query?key=${encodeURIComponent(E)}`));return l.then(m=>{this.lookupResult=m,this.propagateChanges()},this._errorHandler("Lookup failed",`Could not lookup value for key "${E}" in lookup table "${p}"`)),d.lookup.promise(l),l},purgeKey(p,E){const l=(0,c.Ay)("POST",this._urlClusterWise(`tables/${p.id}/purge?key=${encodeURIComponent(E)}`));return l.then(()=>{s.A.success(`Purging cache key "${E}" for lookup table "${p.name}"`,"Success!")},this._errorHandler(`Could not purge cache for key "${E}" in lookup table "${p.name}"`,"Failed!")),d.purgeKey.promise(l),l},purgeAll(p){const E=(0,c.Ay)("POST",this._urlClusterWise(`tables/${p.id}/purge`));return E.then(()=>{s.A.success(`Purging cache for lookup table "${p.name}"`,"Success!")},this._errorHandler(`Could not purge cache for lookup table "${p.name}"`,"Failed!")),d.purgeAll.promise(E),E},validate(p){const E=this._url("tables/validate"),l=(0,c.Ay)("POST",E,p);return l.then(m=>{this.validationErrors=m.errors,this.propagateChanges()},this._errorHandler("Lookup table validation failed",`Could not validate lookup table "${p.name}"`)),d.validate.promise(l),l},_errorHandler(p,E,l){return m=>{try{if(m.additional.body[0].message_template)return}catch{}let h;try{h=m.additional.body.message}catch{h=m.message}s.A.error(`${p}: ${h}`,E),l&&l(m)}},_url(p){return(0,n.H3)(`/system/lookup/${p}`)},_urlClusterWise(p){return(0,n.H3)(`/cluster/system/lookup/${p}`)}}))},woUyHGxd:(x,y,e)=>{"use strict";e.d(y,{$:()=>E,p:()=>p});var t=e("JnTtTRmZ"),r=e.n(t),s=e("MdYBRjRJ"),o=e("U1Iufsob"),n=e("eFxcQyPT"),c=e("5NVsf39r"),g=e("IA3Ku5lS"),d=e("Vg8s2y9S"),f=e("pc+thvZE");const p=(0,g.rN)("core.Metrics",()=>r().createActions({add:{asyncResult:!0},addGlobal:{asyncResult:!0},clear:{asyncResult:!0},filter:{asyncResult:!0},list:{asyncResult:!0},names:{asyncResult:!0},remove:{asyncResult:!0},removeGlobal:{asyncResult:!0}})),E=(0,g.Bv)("core.Metrics",()=>r().createStore({listenables:[p,f.SessionActions],namespace:"org",registrations:{},globalRegistrations:{},promises:{},init(){this.listenTo(d.j,this.updateNodes)},getInitialState(){return{metricsNames:this.metricsNames,metrics:this.metrics}},updateNodes(l){this.nodes=l.nodes},_allResults(l){const m=[];let h=Promise.resolve(null);return l.forEach(A=>{h=h.then(()=>A).then(C=>m.push(C),C=>m.push(C))}),h.then(()=>m)},_metricsToFetch(l,m){const h={};return Object.keys(l).filter(A=>Object.keys(l[A]).length>0).forEach(A=>{Object.keys(l[A]).filter(C=>l[A][C]>0).forEach(C=>{h[C]=1})}),Object.keys(m).filter(A=>m[A]>0).forEach(A=>{h[A]=1}),h},_buildMetricsFromResponse(l){const m={};return Object.keys(l).forEach(h=>{const A={};l[h]&&(l[h].metrics.forEach(C=>{A[C.full_name]=C}),m[h]=A)}),m},list(){if(!f.SessionStore.isLoggedIn())return null;const l=this._metricsToFetch(this.registrations,this.globalRegistrations),m=s.H3(o.A.ClusterMetricsApiController.multipleAllNodes().url);if(!this.promises.list){const h=(0,n.Ur)("POST",m,{metrics:Object.keys(l)}).finally(()=>delete this.promises.list);h.then(A=>(this.metrics=this._buildMetricsFromResponse(A),this.trigger({metrics:this.metrics,metricsUpdatedAt:c.A.nowInSeconds()}),this.metrics)),this.promises.list=h}return p.list.promise(this.promises.list),this.promises.list},names(){if(!this.nodes){console.warn("Node list not yet available, not fetching metrics.");return}const l=this._allResults(Object.keys(this.nodes).map(m=>{const h=s.H3(o.A.ClusterMetricsApiController.byNamespace(m,this.namespace).url);return(0,n.Ay)("GET",h).then(A=>({nodeId:m,names:A.metrics}),A=>({nodeId:m,names:this.metricsNames[m],error:A}))})).then(m=>{const h={},A={};return m.forEach(C=>{C.nodeId&&(h[C.nodeId]=C.names,A[C.nodeId]=C.error)}),this.trigger({metricsNames:h,metricsErrors:A}),this.metricsNames=h,h});p.names.promise(l)},add(l,m){this.registrations[l]||(this.registrations[l]={}),this.registrations[l][m]=this.registrations[l][m]?this.registrations[l][m]+1:1},addGlobal(l){this.globalRegistrations[l]?this.globalRegistrations[l]+=1:this.globalRegistrations[l]=1},remove(l,m){this.registrations[l]&&(this.registrations[l][m]=this.registrations[l][m]>0?this.registrations[l][m]-1:0,this.registrations[l][m]===0&&delete this.registrations[l][m])},removeGlobal(l){this.globalRegistrations[l]&&(this.globalRegistrations[l]=this.globalRegistrations[l]>0?this.globalRegistrations[l]-1:0,this.globalRegistrations[l]===0&&delete this.globalRegistrations[l])}}))},Vg8s2y9S:(x,y,e)=>{"use strict";e.d(y,{P:()=>d,j:()=>f});var t=e("JnTtTRmZ"),r=e.n(t),s=e("MdYBRjRJ"),o=e("eFxcQyPT"),n=e("U1Iufsob"),c=e("IA3Ku5lS"),g=e("pc+thvZE");const d=(0,c.rN)("core.Nodes",()=>r().createActions({list:{asyncResult:!0}})),f=(0,c.Bv)("core.Nodes",()=>r().createStore({listenables:[d],nodes:void 0,clusterId:void 0,nodeCount:0,INTERVAL:5e3,promises:{},init(){this.nodes===void 0&&(this._triggerList(),setInterval(this._triggerList,this.INTERVAL))},_triggerList(){g.SessionStore.isLoggedIn()&&d.list()},getInitialState(){return this.getNodesInfo()},getNodesInfo(){return{nodes:this.nodes,clusterId:this.clusterId,nodeCount:this.nodeCount}},list(){const p=this.promises.list||(0,o.Ur)("GET",(0,s.H3)(n.A.ClusterApiResource.list().url)).then(E=>(this.nodes={},E.nodes&&(this.nodes=E.nodes.map(l=>[l.node_id,l]).reduce((l,[m,h])=>({...l,[m]:h}),{}),this.clusterId=this._clusterId(),this.nodeCount=this._nodeCount(),this._propagateState()),E)).finally(()=>delete this.promises.list);this.promises.list=p,d.list.promise(p)},getNode(p){var E;return(E=this.nodes)==null?void 0:E[p]},_clusterId(){const p=Object.keys(this.nodes).map(E=>this.nodes[E]).find(E=>E.cluster_id);return p?p.cluster_id.toUpperCase():void 0},_nodeCount(){return Object.keys(this.nodes).length},_propagateState(){this.trigger(this.getNodesInfo())}}))},bpbGjAaT:(x,y,e)=>{"use strict";e.d(y,{G:()=>d,Q:()=>g});var t=e("JnTtTRmZ"),r=e.n(t),s=e("MdYBRjRJ"),o=e("U1Iufsob"),n=e("eFxcQyPT"),c=e("IA3Ku5lS");const g=(0,c.rN)("core.Notifications",()=>r().createActions({delete:{asyncResult:!0},list:{asyncResult:!0},getHtmlMessage:{asyncResult:!0}})),d=(0,c.Bv)("core.Notifications",()=>r().createStore({listenables:[g],notifications:void 0,total:void 0,message:{},promises:{},init(){this.list()},getInitialState(){return{notifications:this.notifications,total:this.total,messages:this.messages}},propagateChanges(){this.trigger({notifications:this.notifications,total:this.total,messages:this.messages})},list(){const f=s.H3(o.A.NotificationsApiController.list().url),p=this.promises.list||(0,n.Ur)("GET",f).finally(()=>delete this.promises.list);this.promises.list=p,g.list.promise(p)},listCompleted(f){this.notifications=f.notifications,this.total=f.total,this.propagateChanges()},delete(f,p){let E;p?E=s.H3(o.A.NotificationsApiController.deleteWithKey(f,p).url):E=s.H3(o.A.NotificationsApiController.delete(f).url);const l=(0,n.Ay)("DELETE",E);g.delete.promise(l)},deleteCompleted(){this.list(),this.propagateChanges()},getHtmlMessage(f,p,E={values:{}}){let l;p?l=s.H3(o.A.NotificationsApiController.getHtmlMessageWithKey(f,p).url):l=s.H3(o.A.NotificationsApiController.getHtmlMessage(f).url);const m=(0,n.Ay)("POST",l,E);m.then(h=>{this.messages={...this.messages,[`${f}-${p}`]:h},this.propagateChanges()}),g.getHtmlMessage.promise(m)}}))},"IQSYq7+p":(x,y,e)=>{"use strict";e.d(y,{Et:()=>U,_3:()=>k});var t=e("JnTtTRmZ"),r=e.n(t),s=e("VPaD/Np4"),o=e("EregcbZy"),n=e("U1Iufsob"),c=e("eFxcQyPT"),g=e("4E3oowBb");class d{constructor(z,le){this._value={id:z,title:le}}get id(){return this._value.id}get title(){return this._value.title}toBuilder(){const{id:z,title:le}=this._value;return new f(s.Map({id:z,title:le}))}toJSON(){const{id:z,title:le}=this._value;return{id:z,title:le}}static fromJSON(z){const{id:le,title:V}=z;return d.builder().id(le).title(V).build()}static builder(){return new f}}class f{constructor(z=s.Map()){this.value=z}id(z){return new f(this.value.set("id",z))}title(z){return new f(this.value.set("title",z))}build(){const{id:z,title:le}=this.value.toObject();return new d(z,le)}}var p=e("CIb2ALfk");class E{constructor(z,le,V){this._value={grant:z,grantee:le,capability:V}}get grant(){return this._value.grant}get grantee(){return this._value.grantee}get capability(){return this._value.capability}toBuilder(){const{grant:z,grantee:le,capability:V}=this._value;return new l(s.Map({grant:z,grantee:le,capability:V}))}toJSON(){const{grant:z,grantee:le,capability:V}=this._value;return{grant:z,grantee:le,capability:V}}static fromJSON(z){const{grant:le,grantee:V,capability:me}=z;return E.builder().grant(le).grantee(V).capability(me).build()}static builder(){return new l}}class l{constructor(z=s.Map()){this.value=z}grant(z){return new l(this.value.set("grant",z))}grantee(z){return new l(this.value.set("grantee",z))}capability(z){return new l(this.value.set("capability",z))}build(){const{grant:z,grantee:le,capability:V}=this.value.toObject();return new E(z,le,V)}}class m{constructor(z,le,V,me){this._value={id:z,title:le,type:V,capabilityId:me}}get id(){return this._value.id}get title(){return this._value.title}get type(){return this._value.type}get capabilityId(){return this._value.capabilityId}currentState(z){const{capabilityId:le,id:V}=this._value,me=z.find(Pe=>Pe.grantee===V);return me?me.capability!==le?"changed":"unchanged":"new"}static create(z,le,V,me){return new m(z,le,V,me)}}class h{constructor(z,le,V){this._value={errors:z,errorContext:le,failed:V}}get errors(){return this._value.errors}get errorContext(){return this._value.errorContext}get failed(){return this._value.failed}toBuilder(){const{errors:z,errorContext:le,failed:V}=this._value;return new A(s.Map({errors:z,errorContext:le,failed:V}))}static create(z,le,V){return new h(z,le,V)}static createSuccess(){return h.create({selectedGranteeCapabilities:s.List()},{selectedGranteeCapabilities:s.List()},!1)}toJSON(){const{errors:z,errorContext:le,failed:V}=this._value;return{errors:{selected_grantee_capabilities:z.selectedGranteeCapabilities},error_context:{selected_grantee_capabilities:le.selectedGranteeCapabilities},failed:V}}static fromJSON(z){if(!z)return h.createSuccess();const{errors:le,error_context:V,failed:me}=z,Pe={selectedGranteeCapabilities:s.List(le.selected_grantee_capabilities)},Ve={selectedGranteeCapabilities:s.List(V.selected_grantee_capabilities)};return h.create(Pe,Ve,me)}static builder(){return new A}}class A{constructor(z=s.Map()){this.value=z}errors(z){return new A(this.value.set("errors",z))}errorContext(z){return new A(this.value.set("errorContext",z))}failed(z){return new A(this.value.set("failed",z))}build(){const{errors:z,errorContext:le,failed:V}=this.value.toObject();return new h(z,le,V)}}const C=ne=>{let z=s.Map();return Object.keys(ne).forEach(le=>{const V=ne[le];z=z.set(le,V.map(me=>o.A.fromJSON(me)))}),z},_=(ne,z)=>{const le=ne.filter(me=>!z||z.findIndex(Pe=>Pe.grantee===me.id)>=0).sort((me,Pe)=>(0,g.j)(me.title,Pe.title)).groupBy(me=>me.type),V=ne.filter(me=>z&&z.findIndex(Pe=>Pe.grantee===me.id)===-1).reverse();return s.List().concat(V,le.get("error"),le.get("global"),le.get("team"),le.get("user")).filter(me=>!!me).toList()};class P{constructor(z,le,V,me,Pe,Ve,at){this._value={entity:z,availableGrantees:_(le),availableCapabilities:V,activeShares:me,selectedGranteeCapabilities:Pe,missingDependencies:Ve,validationResults:at}}get entity(){return this._value.entity}get availableGrantees(){return this._value.availableGrantees}get availableCapabilities(){return this._value.availableCapabilities}get activeShares(){return this._value.activeShares}get selectedGranteeCapabilities(){return this._value.selectedGranteeCapabilities}get missingDependencies(){return this._value.missingDependencies}get validationResults(){return this._value.validationResults}get selectedGrantees(){const z=V=>this._value.availableGrantees.find(me=>me.id===V),le=this._value.selectedGranteeCapabilities.entrySeq().map(([V,me])=>{const Pe=z(V);return Pe?m.create(Pe.id,Pe.title,Pe.type,me):m.create(V,`not found ${V} (error)`,"error",me)}).toList();return _(le,this._value.activeShares)}toBuilder(){const{entity:z,availableGrantees:le,availableCapabilities:V,activeShares:me,selectedGranteeCapabilities:Pe,missingDependencies:Ve,validationResults:at}=this._value;return new I(s.Map({entity:z,availableGrantees:le,availableCapabilities:V,activeShares:me,selectedGranteeCapabilities:Pe,missingDependencies:Ve,validationResults:at}))}toJSON(){const{entity:z,availableGrantees:le=s.List(),availableCapabilities:V=s.List(),activeShares:me=s.List(),selectedGranteeCapabilities:Pe=s.Map(),missingDependencies:Ve=s.Map(),validationResults:at}=this._value;return{entity:z,available_grantees:le.toJS(),available_capabilities:V.toJS(),active_shares:me.toJS(),selected_grantee_capabilities:Pe.toJS(),missing_permissions_on_dependencies:Ve.toJS(),validation_result:at}}static fromJSON(z){const{entity:le,available_grantees:V,available_capabilities:me,active_shares:Pe,selected_grantee_capabilities:Ve,missing_permissions_on_dependencies:at,validation_result:ze}=z,he=s.fromJS(V.map(ae=>p.A.fromJSON(ae))),Ie=s.fromJS(me.map(ae=>d.fromJSON(ae))),Re=s.fromJS(Pe.map(ae=>E.fromJSON(ae))),ce=s.fromJS(Ve),Ee=C(at),oe=h.fromJSON(ze);return new P(le,he,Ie,Re,ce,Ee,oe)}static builder(){return new I}}class I{constructor(z=s.Map()){this.value=z}entity(z){return new I(this.value.set("entity",z))}availableGrantees(z){return new I(this.value.set("availableGrantees",z))}availableCapabilities(z){return new I(this.value.set("availableCapabilities",z))}activeShares(z){return new I(this.value.set("activeShares",z))}selectedGranteeCapabilities(z){return new I(this.value.set("selectedGranteeCapabilities",z))}missingDependencies(z){return new I(this.value.set("missingDependencies",z))}validationResults(z){return new I(this.value.set("validationResults",z))}build(){const{entity:z,availableGrantees:le,availableCapabilities:V,activeShares:me,selectedGranteeCapabilities:Pe,missingDependencies:Ve,validationResults:at}=this.value.toObject();return new P(z,le,V,me,Pe,Ve,at)}}var M=e("IA3Ku5lS");const U=(0,M.rN)("permissions.EntityShare",()=>r().createActions({prepare:{asyncResult:!0},update:{asyncResult:!0},loadUserSharesPaginated:{asyncResult:!0}}));var W=e("MdYBRjRJ"),K=e("gyRmhZSW");const j={},G=({additional_queries:ne,context:z,count:le,entities:V,page:me,per_page:Pe,query:Ve,total:at})=>({list:s.List(V.map(ze=>o.A.fromJSON(ze))),context:{granteeCapabilities:z.grantee_capabilities},pagination:{additionalQueries:ne,page:me,perPage:Pe,query:Ve,count:le,total:at}}),k=(0,M.Bv)("permissions.EntityShare",()=>r().createStore({listenables:[U],state:void 0,getInitialState(){return this._state()},prepare(ne,z,le,V=j){const me=(0,W.H3)(n.A.EntityShareController.prepare(le).url),Pe=(0,c.Ay)("POST",me,JSON.stringify(V)).then(this._handleResponse);return U.prepare.promise(Pe),Pe},update(ne,z,le,V){const me=(0,W.H3)(n.A.EntityShareController.update(le).url),Pe=(0,c.Ay)("POST",me,JSON.stringify(V)).then(this._handleResponse);return U.update.promise(Pe),Pe},loadUserSharesPaginated(ne,{page:z,perPage:le,query:V,additionalQueries:me}){const Pe=(0,K.A)(n.A.EntityShareController.userSharesPaginated(ne).url,z,le,V,me),Ve=(0,c.Ay)("GET",(0,W.H3)(Pe)).then(G);return U.loadUserSharesPaginated.promise(Ve),Ve},_handleResponse(ne){const z=P.fromJSON(ne);return this.state=z,this._trigger(),this.state},_state(){return{state:this.state}},_trigger(){this.trigger(this._state())}})),Q=null},"rjGM+nrz":(x,y,e)=>{"use strict";e.d(y,{G:()=>c,K:()=>d});var t=e("JnTtTRmZ"),r=e.n(t),s=e("MdYBRjRJ"),o=e("U1Iufsob"),n=e("IA3Ku5lS");const c=(0,n.rN)("core.ServerAvailability",()=>r().createActions(["reportError","reportSuccess"])),g=f=>window.fetch(f,{method:"GET",headers:{Accept:"application/json","X-Graylog-No-Session-Extension":"true"}}),d=(0,n.Bv)("core.ServerAvailability",()=>r().createStore({listenables:[c],server:{up:!0},init(){this.ping()},getInitialState(){return{server:this.server}},ping(){return g(s.H3(o.A.ping().url)).then(()=>c.reportSuccess(),f=>c.reportError(f))},reportError(f){this.server.up&&(this.server={up:!1,error:f},this.trigger({server:this.server}))},reportSuccess(){this.server.up||(this.server={up:!0},this.trigger({server:this.server}))}}))},"pc+thvZE":(x,y,e)=>{"use strict";e.r(y),e.d(y,{SessionActions:()=>d,SessionStore:()=>f});var t=e("JnTtTRmZ"),r=e.n(t),s=e("7GNmVOX8"),o=e("MdYBRjRJ"),n=e("U1Iufsob"),c=e("eFxcQyPT"),g=e("IA3Ku5lS");const d=(0,g.rN)("core.Session",()=>r().createActions({login:{asyncResult:!0},logout:{asyncResult:!0},validate:{asyncResult:!0}})),f=(0,g.Bv)("core.Session",()=>r().createStore({listenables:[d],sourceUrl:"/system/sessions",username:void 0,validatingSession:!1,init(){this.validate()},getInitialState(){return this.getSessionInfo()},login(p,E,l){const h=new c.M$("POST",(0,o.H3)(this.sourceUrl)).json({username:p,password:E,host:l}).build().then(A=>({username:A==null?void 0:A.username}));d.login.promise(h)},logout(){const p=new c.M$("DELETE",(0,o.H3)(`${this.sourceUrl}/`)).build().then(E=>{(E.ok||E.status===401)&&this._removeSession()},this._removeSession);d.logout.promise(p)},validate(){const p=s.A.get("username");this.validatingSession=!0,this._propagateState();const E=this._validateSession().then(l=>{var m;return l.is_valid?d.login.completed({username:(m=l.username)!=null?m:p}):(p&&this._removeSession(),l)}).finally(()=>{this.validatingSession=!1,this._propagateState()});d.validate.promise(E)},_validateSession(){return new c.M$("GET",(0,o.H3)(n.A.SessionsApiController.validate().url)).json().build()},_removeSession(){s.A.delete("username"),this.username=void 0,this._propagateState()},_propagateState(){this.trigger(this.getSessionInfo())},loginCompleted(p){const{username:E}=p;s.A.set("username",E),this.username=E,this._propagateState()},isLoggedIn(){return!!this.username},getSessionInfo(){return{username:this.username,validatingSession:this.validatingSession}}}))},"pUKP3+Pg":(x,y,e)=>{"use strict";e.d(y,{t0:()=>l,hZ:()=>h,Ay:()=>A});var t=e("JnTtTRmZ"),r=e.n(t),s=e("XYSsaeV4"),o=e.n(s),n=e("eFxcQyPT"),c=e("U1Iufsob"),g=e("MdYBRjRJ"),d=e("jAGDuYSC"),f=e("gyRmhZSW"),p=e("IA3Ku5lS");const l=(0,p.rN)("Streams",()=>r().createActions({searchPaginated:{asyncResult:!0},listStreams:{asyncResult:!0},load:{asyncResult:!0},get:{asyncResult:!0},remove:{asyncResult:!0},pause:{asyncResult:!0},resume:{asyncResult:!0},cloneStream:{asyncResult:!0},update:{asyncResult:!0},save:{asyncResult:!0},removeOutput:{asyncResult:!0},addOutput:{asyncResult:!0},testMatch:{asyncResult:!0}}));var m=e("J1ga+jW6");const h=(0,p.Bv)("Streams",()=>r().createStore({listenables:[l],callbacks:[],searchPaginated(C,_,P,I){const M=(0,f.A)(c.A.StreamsApiController.paginated().url,C,_,P,I),O=(0,n.Ay)("GET",(0,g.H3)(M)).then(U=>{const{elements:W,query:K,attributes:j,pagination:{count:G,total:k,page:Q,per_page:ne}}=U;return{elements:W,attributes:j,pagination:{count:G,total:k,page:Q,perPage:ne,query:K}}});return l.searchPaginated.promise(O),O},listStreams(){const _=(0,n.Ay)("GET",(0,g.H3)("/streams")).then(P=>P.streams).catch(P=>{d.A.error(`Loading streams failed with status: ${P}`,"Could not load streams")});return l.listStreams.promise(_),_},load(C){this.listStreams().then(_=>{C(_)})},remove(C){const _=(0,g.H3)(c.A.StreamsApiController.delete(C).url),P=(0,n.Ay)("DELETE",_).then(()=>m.y.reload().then(this._emitChange.bind(this)));return l.remove.promise(P),P},pause(C,_){const P=O=>{d.A.error(`Pausing Stream failed with status: ${O}`,"Could not pause Stream")},I=(0,g.H3)(c.A.StreamsApiController.pause(C).url),M=(0,n.Ay)("POST",I).then(_,P).then(O=>(this._emitChange(),O));return l.pause.promise(M),M},resume(C,_){const P=O=>{d.A.error(`Resuming Stream failed with status: ${O}`,"Could not resume Stream")},I=(0,g.H3)(c.A.StreamsApiController.resume(C).url),M=(0,n.Ay)("POST",I).then(_,P).then(O=>(this._emitChange(),O));return l.resume.promise(M),M},save(C,_){const P=O=>{d.A.error(`Saving Stream failed with status: ${O}`,"Could not save Stream")},I=(0,g.H3)(c.A.StreamsApiController.create().url),M=(0,n.Ay)("POST",I,C).then(_,P).then(()=>m.y.reload().then(this._emitChange.bind(this)));return l.save.promise(M),M},update(C,_,P){const I=U=>{d.A.error(`Updating Stream failed with status: ${U}`,"Could not update Stream")},M=(0,g.H3)(c.A.StreamsApiController.update(C).url),O=(0,n.Ay)("PUT",M,_).then(P,I).then(this._emitChange.bind(this));return l.update.promise(O),O},cloneStream(C,_,P){const I=U=>{d.A.error(`Cloning Stream failed with status: ${U}`,"Could not clone Stream")},M=(0,g.H3)(c.A.StreamsApiController.cloneStream(C).url),O=(0,n.Ay)("POST",M,_).then(P,I).then(()=>m.y.reload().then(this._emitChange.bind(this)));return l.cloneStream.promise(O),O},removeOutput(C,_,P){const I=(0,g.H3)(c.A.StreamOutputsApiController.delete(C,_).url),M=(0,n.Ay)("DELETE",I).then(P,O=>{d.A.error(`Removing output from stream failed with status: ${O}`,"Could not remove output from stream")}).then(this._emitChange.bind(this));return l.removeOutput.promise(M),M},addOutput(C,_,P){const I=(0,g.H3)(c.A.StreamOutputsApiController.add(C).url),M=(0,n.Ay)("POST",I,{outputs:[_]}).then(P,O=>{d.A.error(`Adding output to stream failed with status: ${O}`,"Could not add output to stream")}).then(this._emitChange.bind(this));return l.addOutput.promise(M),M},testMatch(C,_,P){const I=(0,g.H3)(c.A.StreamsApiController.testMatch(C).url),M=(0,n.Ay)("POST",I,_).then(P,O=>{d.A.error(`Testing stream rules of stream failed with status: ${O.message}`,"Could not test stream rules of stream")});return l.testMatch.promise(M),M},onChange(C){this.callbacks.push(C)},_emitChange(){this.callbacks.forEach(C=>C())},unregister(C){o()(this.callbacks,C)}})),A=h},"9xj2LQzD":(x,y,e)=>{"use strict";e.d(y,{z:()=>g});var t=e("JnTtTRmZ"),r=e.n(t),s=e("MdYBRjRJ"),o=e("U1Iufsob"),n=e("eFxcQyPT"),c=e("IA3Ku5lS");const g=(0,c.Bv)("core.System",()=>r().createStore({system:void 0,locales:void 0,init(){this.info().then(d=>{this.trigger({system:d}),this.system=d}),this.systemLocales().then(d=>{this.trigger({locales:d}),this.locales=d.locales})},getInitialState(){return{system:this.system,locales:this.locales}},info(){const d=s.H3(o.A.SystemApiController.info().url);return(0,n.Ay)("GET",d)},jvm(){const d=s.H3(o.A.SystemApiController.jvm().url);return(0,n.Ay)("GET",d)},systemLocales(){const d=s.H3(o.A.SystemApiController.locales().url);return(0,n.Ay)("GET",d)},elasticsearchVersion(){const d=s.H3(o.A.ClusterApiResource.elasticsearchStats().url);return new Promise((p,E)=>{(0,n.Ay)("GET",d).then(l=>{const m=l.cluster_version.split(".");p({major:m[0],minor:m[1],patch:m[2]})}).catch(E)})}}))},"2aaiYHqX":(x,y,e)=>{"use strict";e.d(y,{g:()=>f,m:()=>p});var t=e("JnTtTRmZ"),r=e.n(t),s=e("IA3Ku5lS"),o=e("MdYBRjRJ"),n=e("U1Iufsob"),c=e("eFxcQyPT"),g=e("jAGDuYSC");const d=n.A.TelemetryApiController.setting().url,f=(0,s.rN)("telemetry.settings.actions",()=>r().createActions({update:{asyncResult:!0},get:{asyncResult:!0}})),p=(0,s.Bv)("telemetry.settings.store",()=>r().createStore({listenables:[f],telemetrySetting:void 0,getInitialState(){return{telemetrySetting:this.telemetrySetting}},init(){this.get()},get(){const E=(0,c.Ay)("GET",this._url());E.then(l=>(this.telemetrySetting=l,this.propagateChanges(),l)),f.get.promise(E)},update(E){const l=(0,c.Ay)("PUT",this._url(),E);l.then(m=>(this.telemetrySetting=m,this.propagateChanges(),m),m=>{g.A.error(`Update failed: ${m}`,"Could not update telemetry settings.")}),f.update.promise(l)},propagateChanges(){this.trigger(this.getState())},getState(){return{telemetrySetting:this.telemetrySetting}},_url(){return(0,o.H3)(d)}}))},yTnlRDNA:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("oCSEoDew"),r=e.n(t),s=e("eFxcQyPT"),o=e("U1Iufsob"),n=e("MdYBRjRJ"),c=e("jAGDuYSC");const d={testNaturalDate(f,p){const{url:E}=o.A.ToolsApiController.naturalDateTest(encodeURIComponent(f),encodeURIComponent(p)),l=(0,s.Ay)("GET",(0,n.H3)(E));return l.catch(m=>{m.additional.status!==422&&c.A.error(`Loading keyword preview failed with status: ${m}`,"Could not load keyword preview")}),l},testGrok(f,p,E){const{url:l}=o.A.ToolsApiController.grokTest(),m=(0,s.Ay)("POST",(0,n.H3)(l),{pattern:f,string:E,named_captures_only:p});return m.catch(h=>{c.A.error(`Details: ${h}`,"We were not able to run the grok extraction. Please check your parameters.")}),m},testJSON(f,p,E,l,m,h,A,C){const{url:_}=o.A.ToolsApiController.jsonTest(),P={flatten:f,list_separator:p,key_separator:E,kv_separator:l,replace_key_whitespace:m,key_whitespace_replacement:h,key_prefix:A,string:C},I=(0,s.Ay)("POST",(0,n.H3)(_),P);return I.catch(M=>{c.A.error(`Details: ${M}`,"We were not able to run the JSON extraction. Please check your parameters.")}),I},testRegexValidity(f){const p=r().encode(f),{url:E}=o.A.ToolsApiController.regexValidate(p),l=(0,s.Ay)("GET",(0,n.H3)(E));return l.catch(m=>{c.A.error(`Details: ${m}`,"Could not validate regular expression. Make sure that it is valid.")}),l},urlWhiteListCheck(f){const{url:p}=o.A.ToolsApiController.urlWhitelistCheck(),E=(0,s.Ay)("POST",(0,n.H3)(p),{url:f});return E.catch(l=>{c.A.error(`Details: ${l}`,"Could not verify if the url is in the whitelist.")}),E},urlWhiteListGenerateRegex(f,p){const{url:E}=o.A.ToolsApiController.urlWhitelistGenerateRegex(),l=(0,s.Ay)("POST",(0,n.H3)(E),{url_template:f,placeholder:p});return l.catch(m=>{c.A.error(`Details: ${m}`,"Could not generate regex.")}),l},testRegex(f,p){const{url:E}=o.A.ToolsApiController.regexTest(),l=(0,s.Ay)("POST",(0,n.H3)(E),{regex:f,string:p});return l.catch(m=>{c.A.error(`Details: ${m}`,"Could not try regular expression. Make sure that it is valid.")}),l},testRegexReplace(f,p,E,l){const{url:m}=o.A.ToolsApiController.regexReplaceTest(),h={regex:f,replacement:p,replace_all:E,string:l},A=(0,s.Ay)("POST",(0,n.H3)(m),h);return A.catch(C=>{c.A.error(`Details: ${C}`,"Could not try regular expression. Make sure that it is valid.")}),A},testSplitAndIndex(f,p,E){const{url:l}=o.A.ToolsApiController.splitAndIndexTest(),m={split_by:f,index:p,string:E},h=(0,s.Ay)("POST",(0,n.H3)(l),m);return h.catch(A=>{c.A.error(`Details: ${A}`,"We were not able to run the split and index extraction. Please check your parameters.")}),h},testSubstring(f,p,E){const{url:l}=o.A.ToolsApiController.substringTest(),m={start:f,end:p,string:E},h=(0,s.Ay)("POST",(0,n.H3)(l),m);return h.catch(A=>{c.A.error(`Details: ${A}`,"We were not able to run the substring extraction. Please check index boundaries.")}),h},testContainsString(f,p){const{url:E}=o.A.ToolsApiController.containsStringTest(),l=(0,s.Ay)("POST",(0,n.H3)(E),{search_string:f,string:p});return l.catch(m=>{c.A.error(`Details: ${m}`,"Could not check if field contains the string")}),l},testLookupTable(f,p){const{url:E}=o.A.ToolsApiController.lookupTableTest(),l=(0,s.Ay)("POST",(0,n.H3)(E),{lookup_table_name:f,string:p});return l.catch(m=>{c.A.error(`Details: ${m}`,"Could not check if lookup table translates the string")}),l}}},orDZ6Vj2:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("hLK4KFKM");const s=t.useDispatch},YcvsU7cw:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("hLK4KFKM");const s=o=>(0,t.useSelector)(o)},"J1ga+jW6":(x,y,e)=>{"use strict";e.d(y,{y:()=>p});var t=e("JnTtTRmZ"),r=e.n(t),s=e("MdYBRjRJ"),o=e("eFxcQyPT"),n=e("U1Iufsob"),c=e("IA3Ku5lS"),g=e("CXwqYNRt"),d=e("pc+thvZE"),f=e("YTcgvcFD");const p=(0,c.Bv)("core.CurrentUser",()=>r().createStore({listenables:[d.SessionActions],currentUser:void 0,init(){this.listenTo(d.SessionStore,this.sessionUpdate,this.sessionUpdate),this.listenTo(f.j,this.reload,this.reload),g.S.saveUserPreferences.completed.listen(this.reload)},getInitialState(){return{currentUser:this.currentUser}},get(){return this.currentUser},sessionUpdate(E){if(E.username){const{username:l}=E;this.update(l)}else this.currentUser=void 0,this.trigger({currentUser:this.currentUser})},reload(){return this.currentUser!==void 0?this.update(this.currentUser.username):Promise.resolve()},update(E){return(0,o.Ay)("GET",(0,s.H3)(n.A.UsersApiController.loadByUsername(encodeURIComponent(E)).url)).then(l=>(this.currentUser=l,this.trigger({currentUser:this.currentUser}),l))}}))},CXwqYNRt:(x,y,e)=>{"use strict";e.d(y,{S:()=>g,W:()=>f});var t=e("JnTtTRmZ"),r=e.n(t),s=e("eFxcQyPT"),o=e("MdYBRjRJ"),n=e("jAGDuYSC"),c=e("IA3Ku5lS");const g=(0,c.rN)("core.Preferences",()=>r().createActions({loadUserPreferences:{asyncResult:!0},saveUserPreferences:{asyncResult:!0}})),d=p=>{const E={};return Object.entries(p).forEach(([l,m])=>{m==="true"?E[l]=!0:m==="false"?E[l]=!1:E[l]=m}),E},f=(0,c.Bv)("core.Preferences",()=>r().createStore({listenables:[g],URL:(0,o.H3)("/users/"),saveUserPreferences(p,E,l=()=>{},m=!0){const h=d(E),A=`${this.URL+encodeURIComponent(p)}/preferences`,C=(0,s.Ay)("PUT",A,{preferences:h}).then(()=>{m&&n.A.success("User preferences successfully saved"),l(E)},_=>{n.A.error(`Saving of preferences for "${p}" failed with status: ${_}`,"Could not save user preferences")});return g.saveUserPreferences.promise(C),C}}))},YTcgvcFD:(x,y,e)=>{"use strict";e.d(y,{j:()=>d});var t=e("JnTtTRmZ"),r=e.n(t),s=e("U1Iufsob"),o=e("jAGDuYSC"),n=e("MdYBRjRJ"),c=e("eFxcQyPT"),g=e("IA3Ku5lS");const d=(0,g.Bv)("core.Startpage",()=>r().createStore({listenables:[],set(f,p,E){const l=(0,n.H3)(s.A.UsersApiController.update(f).url),m={};return p&&E&&(m.type=p,m.id=E),(0,c.Ay)("PUT",l,{startpage:m}).then(h=>(this.trigger(),o.A.success("Your start page was changed successfully"),h),h=>o.A.error(`Changing your start page failed with error: ${h}`,"Could not change your start page"))}}))},cSDA0Pof:(x,y,e)=>{"use strict";e.d(y,{M:()=>A});var t=e("JnTtTRmZ"),r=e.n(t),s=e("VPaD/Np4"),o=e.n(s),n=e("oCSEoDew"),c=e.n(n),g=e("nmSm+aR9"),d=e("eFxcQyPT"),f=e("U1Iufsob"),p=e("IA3Ku5lS"),E=e("MdYBRjRJ"),l=e("gyRmhZSW"),m=e("vMorKP/N");const h=({url:_="",query:P={}})=>{const I=new(c())(_);return I.query(P),(0,E.H3)(I.resource())},A=(0,p.rN)("core.Users",()=>r().createActions({create:{asyncResult:!0},load:{asyncResult:!0},loadByUsername:{asyncResult:!0},update:{asyncResult:!0},delete:{asyncResult:!0},changePassword:{asyncResult:!0},createToken:{asyncResult:!0},loadTokens:{asyncResult:!0},deleteToken:{asyncResult:!0},loadUsersPaginated:{asyncResult:!0},loadUsers:{asyncResult:!0},setStatus:{asyncResult:!0}})),C=(0,p.Bv)("core.Users",()=>r().createStore({listenables:[A],create(_){const P=(0,E.H3)(f.A.UsersApiController.create().url),I=(0,d.Ay)("POST",P,_);return A.create.promise(I),I},load(_){const P=(0,E.H3)(f.A.UsersApiController.load(encodeURIComponent(_)).url),I=(0,d.Ay)("GET",P).then(m.A.fromJSON);return A.load.promise(I),I},loadByUsername(_){const P=(0,E.H3)(f.A.UsersApiController.loadByUsername(encodeURIComponent(_)).url),I=(0,d.Ay)("GET",P).then(m.A.fromJSON);return A.loadByUsername.promise(I),I},update(_,P){const I=(0,E.H3)(f.A.UsersApiController.update(encodeURIComponent(_)).url),M=(0,d.Ay)("PUT",I,P);return A.update.promise(M),M},delete(_){const P=(0,E.H3)(f.A.UsersApiController.delete(encodeURIComponent(_)).url),I=(0,d.Ay)("DELETE",P);return A.delete.promise(I),I},changePassword(_,P){const I=(0,E.H3)(f.A.UsersApiController.changePassword(encodeURIComponent(_)).url),M=(0,d.Ay)("PUT",I,P);return A.changePassword.promise(M),M},createToken(_,P){const I=(0,E.H3)(f.A.UsersApiController.create_token(encodeURIComponent(_),encodeURIComponent(P)).url),M=(0,d.Ay)("POST",I);return A.createToken.promise(M),M},loadTokens(_){const P=(0,E.H3)(f.A.UsersApiController.list_tokens(encodeURIComponent(_)).url),I=(0,d.Ay)("GET",P).then(M=>M.tokens);return A.loadTokens.promise(I),I},deleteToken(_,P){const I=(0,E.H3)(f.A.UsersApiController.delete_token(encodeURIComponent(_),encodeURIComponent(P)).url),M=(0,d.Ay)("DELETE",I);return A.deleteToken.promise(M),M},loadUsers(_={}){const P=h({url:f.A.UsersApiController.list().url,query:_}),I=(0,d.Ay)("GET",P).then(({users:M})=>s.List(M.map(O=>g.A.fromJSON(O))));return A.loadUsers.promise(I),I},loadUsersPaginated({page:_,perPage:P,query:I}){const M=(0,l.A)(f.A.UsersApiController.paginated().url,_,P,I),O=(0,d.Ay)("GET",(0,E.H3)(M)).then(U=>({adminUser:U.context.admin_user?g.A.fromJSON(U.context.admin_user):void 0,list:s.List(U.users.map(W=>g.A.fromJSON(W))),pagination:{page:U.page,perPage:U.per_page,query:U.query,count:U.count,total:U.total}}));return A.loadUsersPaginated.promise(O),O},setStatus(_,P){const I=(0,E.H3)(f.A.UsersApiController.setStatus(_,P).url),M=(0,d.Ay)("PUT",I);return A.setStatus.promise(M),M}}))},Ds5vWZ1u:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("J6y4/h8P"),r=e("liHGlRT1");const o=(0,t.createGlobalStyle)(({theme:n})=>(0,t.css)` #editor { height: 256px; } html { font-size: ${n.fonts.size.root} !important; /* override Bootstrap default */ } body { background-color: ${n.colors.global.background}; color: ${n.colors.global.textDefault}; font-family: ${n.fonts.family.body}; font-size: ${n.fonts.size.body}; line-height: 1.25; height: 100vh; } #app-root { height: 100%; } ul { list-style-type: none; margin: 0; } ul.no-padding { padding: 0; } hr { border-top: 1px solid ${n.colors.global.background}; } h1, h2 { font-family: ${n.fonts.family.navigation}; } h1, h2, h3, h4, h5, h6 { font-weight: normal; padding: 0; margin: 0; color: ${n.colors.global.textDefault}; } h1 { font-size: ${n.fonts.size.h1}; } h2 { font-size: ${n.fonts.size.h2}; } h3 { font-size: ${n.fonts.size.h3}; } h4 { font-size: ${n.fonts.size.h4}; } h5 { font-size: ${n.fonts.size.h5}; } h6 { font-size: ${n.fonts.size.h6}; font-weight: bold; } a { color: ${n.colors.global.link}; } a:hover, a:focus { color: ${n.colors.global.linkHover}; } /* Remove boostrap outline */ a:active, select:active, input[type='file']:active, input[type='radio']:active, input[type='checkbox']:active, .btn:active { outline: none; outline-offset: 0; } input.form-control, select.form-control, textarea, textarea.form-control { color: ${n.colors.input.color}; background-color: ${n.colors.input.background}; border-color: ${n.colors.input.border}; border-radius: 0; font-family: ${n.fonts.family.body}; &::placeholder { color: ${n.colors.input.placeholder}; } &:focus { border-color: ${n.colors.input.borderFocus}; box-shadow: ${n.colors.input.boxShadow}; } &[disabled], &[readonly], fieldset[disabled] & { background-color: ${n.colors.input.backgroundDisabled}; color: ${n.colors.input.colorDisabled}; } } textarea { max-width: 100%; } legend small { color: ${n.colors.gray[60]}; margin-left: 5px; } small { font-size: ${n.fonts.size.small}; } .input-group-addon.input-group-separator { border-right-width: 0; border-left-width: 0; } .content { padding-top: 15px; padding-bottom: 15px; ${r.w} p.description { margin-top: 3px; color: ${n.colors.gray[50]}; } } .notifications-none { margin-top: 10px; } .no-bm { margin-bottom: 0; } .has-bm { margin-bottom: 10px; } .modal form { margin-bottom: 0; } .alert-bar { margin: 10px -20px 0; } .xtrc-converter-subfields { margin-left: 20px; } .u-light { border-bottom: 1px dotted ${n.colors.gray[70]}; margin-bottom: 5px; padding-bottom: 5px; } .input-docs { margin-left: 3px; } .input-docs:hover { text-decoration: none; } .timerange-selector select { margin-bottom: 0; } .leader-node { color: ${n.colors.variant.dark.warning}; } .loglevel-metrics-row { margin-top: 2px; margin-left: 10px; } .loglevel-metrics dl { margin-bottom: 5px; margin-top: 5px; } .loglevel-metrics dt { float: left; margin-right: 5px; } .subsystems { margin-top: 10px; margin-left: 10px; } .sources.overlay { background-color: ${n.colors.gray[60]}; height: 200px; line-height: 200px; opacity: 0.2; position: absolute; text-align: center; font-size: 50px; } .metrics-filter { margin-bottom: 15px !important; } dl.metric-timer dd { margin-left: 145px; } td.centered { text-align: center; } td.limited { max-width: 180px; overflow: hidden; text-overflow: ellipsis; } .configuration-field-optional { margin-left: 5px; font-size: ${n.fonts.size.small}; } .index-description { margin-bottom: 7px; } .index-description .index-info { margin-top: 5px; } .index-description .index-info dl { margin-top: 5px; } .index-details { margin-left: 5px; } .index-label { vertical-align: text-top; } .index-label .label { margin-right: 5px; } .index-more-actions { font-size: 90%; margin-left: 5px; } .shard-meters { margin-top: 10px; } .shard-meters dl { margin-bottom: 0; margin-top: 0; } .shard-meters dl dt { float: left; } .shard-meters dl dd { margin-left: 65px; } .shards { margin: 0; padding: 0; margin-top: 5px; } dl.system-journal { margin-top: 5px; margin-bottom: 0; } .system-journal dt { float: left; } .system-journal dd { margin-left: 120px; } dl.system-dl { margin: 0; } .system-dl dt { float: left; clear: left; } .system-dl dd { margin-left: 180px; } .no-widgets { margin-top: 15px; } table .dc-table-column { word-break: break-all; } .sources th { background-color: ${n.colors.gray[20]}; color: ${n.utils.readableColor(n.colors.gray[20])}; font-weight: normal; } .sources .dc-table-column._3 { padding-right: 0; text-align: right; } .parse-error { background-color: ${n.colors.variant.light.danger}; color: ${n.utils.contrastingColor(n.colors.variant.light.danger)}; padding-left: 2px; padding-right: 2px; } .add-alert-type { margin-bottom: 0; } .alerts { margin-top: 15px; } .alerts tbody { border: none; } .alerts th { background-color: ${n.colors.gray[10]}; color: ${n.colors.global.textAlt}; font-weight: normal; } .alerts th a { display: block; } .alerts th a:focus { color: ${n.colors.global.textAlt}; } .result-highlight-colored { background-color: ${n.colors.variant.warning}; } .annotation .content { margin-bottom: 10px; cursor: auto !important; } .scrollable-table { width: 100%; overflow: auto; } .well.configuration-well { margin-top: 5px; margin-bottom: 0; padding: 9px; font-family: ${n.fonts.family.monospace}; word-wrap: break-word; } .well.configuration-well > ul { padding: 0; margin: 0; } .well.react-configuration-well { white-space: pre-line; } .well.configuration-well .configuration-section { margin-bottom: 10px; } .well.configuration-well li:not(:last-child) { margin-bottom: 5px; } .well.configuration-well .key { display: inline; } .alert-callback .well.configuration-well .key { display: inline-block; min-width: 140px; vertical-align: top; } .well.configuration-well .value { display: inline; } .alert-callback .well.configuration-well .value { display: inline-block; } .form-inline label { margin-right: 10px; } .form-horizontal .help-block.help-standalone { line-height: 20px; margin-top: 7px; } .form-horizontal.pull-left label.control-label { width: auto; } .form-horizontal.pull-left div.controls { display: inline-block; float: right; margin-left: 20px; } .form-horizontal .input-description { margin-bottom: 0 !important; } form.extractor-form .control-group label { display: inline-block; } .configuration-bundles input[type='file'] { line-height: inherit !important; } table th.actions, table td.actions { width: 110px; } .btn-text { font-family: ${n.fonts.family.body}; font-size: ${n.fonts.size.small}; padding: 0; vertical-align: baseline; } .message-loader-form input { margin-right: 5px; } table.indexer-failures { margin-top: 10px; } div.row-sm { margin-bottom: 5px; } .table-sm { margin-bottom: 0; } .graylog-input-metrics { margin-top: 5px; } .filter .form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } div.alert-callback hr { margin-top: 10px; margin-bottom: 10px; } div.alert-callbacks { margin-top: 10px; } .alarm-callbacks { padding: 0; } .alarm-callbacks li:not(:last-child) { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid ${n.colors.gray[90]}; } .threaddump { font-size: ${n.fonts.size.small}; } h2.extractor-title { margin-bottom: 2px; } .stream-loader { margin-top: 5px; } .form-inline .typeahead-wrapper { display: inline-block; vertical-align: middle; width: auto; } .typeahead-wrapper .tt-menu { background-color: ${n.colors.global.contentBackground}; box-shadow: 0 3px 3px ${n.colors.global.navigationBoxShadow}; color: ${n.colors.global.textDefault}; .tt-suggestion:hover, .tt-suggestion.tt-cursor { color: ${n.colors.variant.darkest.info}; background-color: ${n.colors.variant.lighter.info}; background-image: none; } } .form-group-inline { display: inline-block; margin: 0; } .form-control-feedback { line-height: inherit; display: flex; align-items: center; justify-content: center; } ul.tag-list, ul.pill-list { display: inline-block; list-style: none; padding: 0; position: relative; } ul.pill-list { margin-left: 10px; vertical-align: middle; } ul.tag-list > li, ul.pill-list > li { display: inline-block; vertical-align: middle; } .tags-input ul.tag-list > li { padding-top: 10px; padding-bottom: 5px; } .tag, .pill { font-size: ${n.fonts.size.body}; margin-right: 5px; } .pill { color: ${n.colors.global.textDefault}; background-color: ${n.colors.gray[90]}; padding: 6px 12px; } .tag-remove, .pill-remove { color: ${n.colors.global.textDefault}; cursor: pointer; margin-left: 5px; } .tag-remove::before, .pill-remove::before { content: '×'; } .save-button-margin { margin-right: 5px; } .form-control.message-id-input { width: 300px; } /* additional styles for 'StyledAceEditor' */ .ace_editor.ace_autocomplete { margin-top: 6px; background-color: ${n.colors.input.background}; color: ${n.colors.input.color}; } .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: ${n.colors.variant.lighter.info}; color: ${n.colors.input.colorDisabled}; } .ace_editor.ace_autocomplete .ace_text-layer .ace_completion-highlight { color: ${n.colors.variant.info}; } code { color: ${n.colors.variant.darker.danger}; background-color: ${n.colors.variant.lightest.danger}; } pre { color: ${n.colors.variant.darker.default}; background-color: ${n.colors.variant.lightest.default}; border-color: ${n.colors.variant.lighter.default}; } input[type='range'], input[type='range']:focus { box-shadow: none; height: auto; } `)},hGbrjJvL:(x,y,e)=>{"use strict";e.d(y,{A:()=>le});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("Uzk4A5PI"),c=e.n(n),g=e("sylc7v7C"),d=e.n(g),f=e("L3UIULT/"),p=e("0hhBr0/b"),E=e("IA3Ku5lS");const l=t.createContext(void 0),m=(0,E.Gr)("contexts.ColorSchemeContext",()=>l);var h=e("CCNXj2ra"),A=e("8fnsnG21"),C=e("7GNmVOX8"),_=e("J1ga+jW6"),P=e("CXwqYNRt"),I=e("lN93Sbbu"),M=e("lFNn3iUc");const U=()=>{if(!window.matchMedia)return null;const V=window.matchMedia("(prefers-color-scheme: light)"),me=window.matchMedia("(prefers-color-scheme: dark)"),Pe=me.matches?M.COLOR_SCHEME_DARK:M.COLOR_SCHEME_LIGHT,[Ve,at]=(0,t.useState)(Pe);return(0,t.useEffect)(()=>{if(window.matchMedia){const ze=Ie=>{Ie.matches&&at(M.COLOR_SCHEME_LIGHT)},he=Ie=>{Ie.matches&&at(M.COLOR_SCHEME_DARK)};return V.addListener(ze),me.addListener(he),()=>{V.removeListener(ze),me.removeListener(he)}}return null},[]),Ve},W=V=>V===h.pR?h.zF:V===h.lO?h.xP:V,K=({userPreferencesThemeMode:V,browserThemePreference:me,initialThemeModeOverride:Pe,userIsLoggedIn:Ve})=>{var at;if(Pe)return Pe;if(!Ve)return h.gA;const ze=V!=null?V:W(C.A.get(h.vM));return(at=ze!=null?ze:me)!=null?at:h.gA},G=(V,me)=>{const Pe=U(),{userIsReadOnly:Ve,username:at}=(0,A.P)(_.y,ce=>{var Ee,oe,ae;return{username:(Ee=ce.currentUser)==null?void 0:Ee.username,userIsReadOnly:(ae=(oe=ce.currentUser)==null?void 0:oe.read_only)!=null?ae:!0}}),ze=(0,t.useContext)(I.A),[he,Ie]=(0,t.useState)(()=>K({userPreferencesThemeMode:ze[h.vM],browserThemePreference:Pe,initialThemeModeOverride:V,userIsLoggedIn:me})),Re=(0,t.useCallback)(ce=>{if(Ie(ce),me&&(C.A.set(h.vM,ce),!Ve)){const Ee={...ze,[h.vM]:ce};P.W.saveUserPreferences(at,Ee)}},[me,Ve,ze,at]);return[he,Re]};var k=e("WHv50DnD");const Q=(V,me)=>(0,t.useMemo)(()=>({...c()(me),changeMode:V,mantine:me}),[V,me]),ne=(V,me)=>{var Pe;const{data:Ve}=(Pe=me==null?void 0:me())!=null?Pe:{};return(0,t.useMemo)(()=>d()({colorScheme:V,customColors:Ve==null?void 0:Ve[V]}),[V,Ve])},z=({children:V,initialThemeModeOverride:me,userIsLoggedIn:Pe})=>{var Ve;const[at,ze]=G(me,Pe),he=(0,p.A)("customization.theme.customizer"),Ie=(Ve=he==null?void 0:he[0])==null?void 0:Ve.hooks.useCustomThemeColors,Re=ne(at,Ie),ce=Q(ze,Re);return t.createElement(m.Provider,{value:at},t.createElement(f.MantineProvider,{theme:Re,forceColorScheme:at},t.createElement(o.ThemeProvider,{theme:ce},V)))};z.propTypes={children:s().node.isRequired,initialThemeModeOverride:s().oneOf(h.nk)},z.defaultProps={initialThemeModeOverride:void 0};const le=z},CCNXj2ra:(x,y,e)=>{"use strict";e.d(y,{Jk:()=>E,ZO:()=>n,gA:()=>d,lO:()=>g,mt:()=>l,nk:()=>p,pR:()=>c,vM:()=>o,xP:()=>t.COLOR_SCHEME_DARK,zF:()=>t.COLOR_SCHEME_LIGHT});var t=e("lFNn3iUc"),r=e.n(t);const s=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,o="themeMode",n=16,c="teint",g="noir",d=s?t.COLOR_SCHEME_DARK:t.COLOR_SCHEME_LIGHT,f=null,p=[t.COLOR_SCHEME_LIGHT,t.COLOR_SCHEME_DARK],E=0,l="50px"},RCNj0OY4:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("VPaD/Np4"),r=e.n(t);const s=()=>window.appConfig||{},c={contentStream(){var g;return(g=s())==null?void 0:g.contentStream},features:t.Map(s().featureFlags).filter(g=>g.trim().toLowerCase()==="on").keySeq().toList().filter(g=>typeof g=="string"),gl2ServerUrl(){return s().gl2ServerUrl},gl2AppPathPrefix(){return s().gl2AppPathPrefix},gl2DevMode(){return typeof DEVELOPMENT<"u"&&DEVELOPMENT},isFeatureEnabled(g){return this.features&&this.features.map(d=>d.trim().toLowerCase()).includes(g.toLowerCase())},rootTimeZone(){return s().rootTimeZone},isCloud(){return typeof IS_CLOUD<"u"?IS_CLOUD:s().isCloud},customThemeColors(){var g,d,f;return(f=(d=(g=s())==null?void 0:g.pluginUISettings)==null?void 0:d["org.graylog.plugins.customization.theme"])!=null?f:{}},telemetry(){var g;return(g=s())==null?void 0:g.telemetry},publicNotifications(){var g,d,f;return(f=(d=(g=s())==null?void 0:g.pluginUISettings)==null?void 0:d["org.graylog.plugins.customization.notifications"])!=null?f:{}},pluginUISettings(g){var d,f,p;return(p=(f=(d=s())==null?void 0:d.pluginUISettings)==null?void 0:f[g])!=null?p:{}}}},IZYxBTgT:(x,y,e)=>{"use strict";e.d(y,{$4:()=>g,C7:()=>f,TI:()=>C,Uv:()=>h,_$:()=>l,dP:()=>E,rm:()=>A,to:()=>p,vd:()=>m,wT:()=>s});var t=e("ASBo/Til"),r=e.n(t);const s={default:"YYYY-MM-DD HH:mm:ss",complete:"YYYY-MM-DD HH:mm:ss.SSS",withTz:"YYYY-MM-DD HH:mm:ss Z",readable:"dddd D MMMM YYYY, HH:mm ZZ",shortReadable:"MMM D, YYYY",internal:"YYYY-MM-DDTHH:mm:ss.SSSZ",internalIndexer:"YYYY-MM-DDTHH:mm:ss.SSS[Z]",date:"YYYY-MM-DD",hourAndMinute:"HH:mm"},o="UTC",n=(_,P,I)=>{if(!_.isValid()){let M=`Date time ${P} is not valid.`;I&&(M=`${M} ${I}`),console.error(M)}return _},c=_=>_==null?void 0:_.map(P=>{const I=s[P];if(!I)throw new Error(`Provided date time format "${P}" is not supported.`);return I}),g=(_,P,I=o)=>{const M=c(P),O=r().utc(_,M,!0).tz(I),U=P!=null&&P.length?`Expected formats: ${M.join(", ")}.`:void 0;return n(O,_,U)},d=(_,P=o)=>g(_,["internal"],P),f=()=>r().tz.guess(),p=(_,P="default",I=o)=>g(_,void 0,I).format(s[P]),E=(_,P="default")=>p(_,P,f()),l=_=>{const P=g(_);return n(P,_).fromNow()},m=_=>r()(_,Object.values(s),!0).isValid(),h=(_,P)=>{if(!P)throw new Error("It is required to define the time zone of the date time provided for internalUTCTime.");return r().tz(_,P)},A=_=>r().duration(_).asSeconds(),C=_=>r().duration(_).asMinutes()},"E+CaPsQD":(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const r={PAGES:{ALERTS:"alerts",AUDIT_LOG:"auditlog",AUTHENTICATORS:"permission-management#authentication",CHANGELOG:"changelog",CLUSTER_STATUS_EXPLAINED:"elasticsearch#cluster-status-explained",COLLECTOR:"sidecar",COLLECTOR_SIDECAR:"sidecar",COLLECTOR_STATUS:"sidecar#sidecar-status",CONFIGURING_ES:"elasticsearch",DASHBOARDS:"dashboards",DECORATORS:"decorators",ENTERPRISE_SETUP:"setup",ES_CLUSTER_STATUS_RED:"elasticsearch#cluster-status-explained",ES_CLUSTER_UNAVAILABLE:"elasticsearch#configuration",ES_OPEN_FILE_LIMITS:"elasticsearch#configuration",EXTRACTORS:"extractors",GRAYLOG_DATA_NODE:"graylog-data-node",INDEXER_FAILURES:"indexer-failures",INDEX_MODEL:"index-model",LICENSE:"license",LOAD_BALANCERS:"load-balancers",LOOKUPTABLES:"lookuptables",OPERATIONS_CHANGELOG:"changelog-graylog",OPEN_SEARCH_SETUP:"open-search-setup",PAGE_FLEXIBLE_DATE_CONVERTER:"extractors#normalization",PAGE_STANDARD_DATE_CONVERTER:"extractors#normalization",PERMISSIONS:"permission-management",PIPELINE_FUNCTIONS:"functions",PIPELINE_RULES:"rules",PIPELINES:"pipelines",REPORTING:"reporting",ROLLING_ES_UPGRADE:"rolling-es-upgrade",SEARCH_QUERY_ERRORS:{UNKNOWN_FIELD:"query-language#unknown-field",QUERY_PARSING_ERROR:"query-language#parse-exception",INVALID_OPERATOR:"query-language#invalid-operator",UNDECLARED_PARAMETER:"query-language#undeclared-parameter"},SEARCH_QUERY_LANGUAGE:"query-language",STREAMS:"streams",STREAM_PROCESSING_RUNTIME_LIMITS:"streams#stream-processing-runtime-limits",TIME_FRAME_SELECTOR:"time-frame-selector",UPGRADE_GUIDE:"upgrading-graylog",USERS_ROLES:"permission-management",WELCOME:""},DOCS_URL:"https://docs.graylog.org/docs",toString(s){const o=this.DOCS_URL;return s===""?o:`${o}/${s}`},versionedDocsHomePage(){return this.toString("")}}},xS8q27Jr:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("d4kzUuQm");const r=Object.freeze({COPY_INPUT:"copy_input",GROK:"grok",JSON:"json",REGEX:"regex",REGEX_REPLACE:"regex_replace",SPLIT_AND_INDEX:"split_and_index",SUBSTRING:"substring",LOOKUP_TABLE:"lookup_table"}),o={ConverterTypes:Object.freeze({NUMERIC:"numeric",DATE:"date",HASH:"hash",SPLIT_AND_COUNT:"split_and_count",IP_ANONYMIZER:"ip_anonymizer",SYSLOG_PRI_LEVEL:"syslog_pri_level",SYSLOG_PRI_FACILITY:"syslog_pri_facility",TOKENIZER:"tokenizer",CSV:"csv",LOWERCASE:"lowercase",UPPERCASE:"uppercase",FLEXDATE:"flexdate",LOOKUP_TABLE:"lookup_table"}),ExtractorTypes:r,EXTRACTOR_TYPES:Object.keys(r).map(n=>n.toLocaleLowerCase()),getNewExtractorRoutes(n,c,g,d,f){const p={};return this.EXTRACTOR_TYPES.forEach(E=>{p[E]=t.Ay.new_extractor(n,c,E,g,d,f)}),p},getReadableExtractorTypeName(n){switch(n){case r.COPY_INPUT:return"Copy input";case r.GROK:return"Grok pattern";case r.JSON:return"JSON";case r.REGEX:return"Regular expression";case r.REGEX_REPLACE:return"Replace with regular expression";case r.SPLIT_AND_INDEX:return"Split & Index";case r.SUBSTRING:return"Substring";case r.LOOKUP_TABLE:return"Lookup Table";default:return n}},getReadableConverterTypeName(n){switch(n){case this.ConverterTypes.NUMERIC:return"Numeric";case this.ConverterTypes.DATE:return"Date";case this.ConverterTypes.FLEXDATE:return"Flexible Date";case this.ConverterTypes.HASH:return"Hash";case this.ConverterTypes.LOWERCASE:return"Lowercase";case this.ConverterTypes.UPPERCASE:return"Uppercase";case this.ConverterTypes.TOKENIZER:return"Key = Value Pairs To Fields";case this.ConverterTypes.CSV:return"CSV To Fields";case this.ConverterTypes.SPLIT_AND_COUNT:return"Split & Count";case this.ConverterTypes.IP_ANONYMIZER:return"Anonymize IPv4 Addresses";case this.ConverterTypes.SYSLOG_PRI_LEVEL:return"Syslog Level From PRI";case this.ConverterTypes.SYSLOG_PRI_FACILITY:return"Syslog Facility From PRI";case this.ConverterTypes.LOOKUP_TABLE:return"Lookup Table";default:return n}},getEffectiveConfiguration(n,c){const g={};for(const d in n)n.hasOwnProperty(d)&&(g[d]=n[d]);for(const d in c)c.hasOwnProperty(d)&&(g[d]=c[d]);return g}}},S6FuRS7B:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>f,qR:()=>c,yG:()=>o,fD:()=>n,jr:()=>d});var t=e("zkmy/ViL");const s=p=>{const E={bubbles:!0,cancelable:!0};if(typeof Event=="function")return new Event(p,E);const l=document.createEvent("Event");return l.initEvent(p,E.bubbles,E.cancelable),l},o=p=>{switch(p.type){case"radio":return p.value==="true"||p.value==="false"?p.value==="true":p.value;case"checkbox":return p.checked;case"number":return p.value===""||!t.A.isNumber(p.value)?void 0:Number(p.value);default:return p.value}},n=p=>{const E=p._valueTracker,l=s("change");l.simulated=!0,E&&E.setValue(""),p.dispatchEvent(l)},c=(p={})=>Object.keys(p).length>0,g=(p,E,l)=>{switch(E){case"required":if(!p||(p==null?void 0:p.size)===0)return"Field is required.";break;case"min":if(pNumber(l))return`Must be smaller than ${l}.`;break;default:return}},d=(p={})=>E=>{let l;return Object.entries(p).some(([m,h])=>{const A=g(E,m,h);return A?(l=A,!0):!1}),l},f={getValueFromInput:o,triggerInput:n,formHasErrors:c,validateField:d}},HvPssUok:(x,y,e)=>{"use strict";e.d(y,{Q4:()=>c,a3:()=>g,di:()=>n,oz:()=>d});var t=e("9oVghaOd"),r=e.n(t),s=e("gtXNkEXl"),o=e.n(s);const n=(f,p)=>p(r().duration(f).asMilliseconds(),f),c=(f,p,E="error")=>n(f,p)?null:E,g=(f,p,E="error")=>n(f,p)?r().duration(f).format():E,d=(f,p,E="error")=>n(f,p)?r().duration(f).humanize():E},"zkmy/ViL":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("9pdI12pI"),r=e.n(t);const o={JAVA_INTEGER_MIN_VALUE:2**31*-1,JAVA_INTEGER_MAX_VALUE:2**31-1,normalizeNumber(n){switch(n){case"NaN":return NaN;case"Infinity":return Number.MAX_VALUE;case"-Infinity":return Number.MIN_VALUE;default:return n}},normalizeGraphNumber(n){switch(n){case"NaN":case"Infinity":case"-Infinity":return 0;default:return n}},formatNumber(n){try{return r()(this.normalizeNumber(n)).format("0,0.[00]")}catch{return n}},formatPercentage(n){try{return r()(this.normalizeNumber(n)).format("0.00%")}catch{return n}},formatBytes(n){r().zeroFormat("0B");let c;try{c=r()(this.normalizeNumber(n)).format("0.0ib")}catch{c=n}return r().zeroFormat(null),c},isNumber(n){return n!==""&&!Number.isNaN(Number(n))}}},QdZ7Yq43:(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const r={clone(s){return JSON.parse(JSON.stringify(s))},isEmpty(s){const o=Object.keys(s);return o&&o.length===0},trimObjectFields(s,o){const n={...s};return o.length>0&&o.forEach(c=>{c in s&&typeof s[c]=="string"&&(n[c]=s[c].trim())}),n}}},gyRmhZSW:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("oCSEoDew"),r=e.n(t);const s=(o,n,c,g,d={})=>{let f=new(r())(o).addSearch("page",n).addSearch("per_page",c);return d&&Object.keys(d).forEach(p=>{const E=d[p],l=m=>typeof m.toString=="function"?m.toString():m;if(E!==void 0){if(Array.isArray(E)){E.forEach(m=>{f=f.addSearch(p,l(m))});return}f=f.addSearch(p,l(E))}}),g&&f.addSearch("query",encodeURIComponent(g)),f.toString()}},yGRmSjYM:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>c,Nn:()=>s,h5:()=>o});const t=g=>g.indexOf("*")>-1,r=(g,d)=>{if(g.indexOf(d)>-1||g.indexOf("*")>-1)return!0;const f=d.split(":");if(f.length>=2){const p=f[0],E=`${f[0]}:${f[1]}`;return g.indexOf(p)>-1||g.indexOf(`${p}:*`)>-1||g.indexOf(E)>-1||g.indexOf(`${E}:*`)>-1}return g.indexOf(`${d}:*`)>-1},s=(g,d)=>!d||d.length===0?!0:g?t(g)?!0:typeof d=="object"?d.every(f=>r(g,f)):r(g,d):!1,o=(g,d)=>!d||d.length===0?!0:g?t(g)?!0:d.some(f=>r(g,f)):!1,c={isPermitted:s,isAnyPermitted:o}},"1/PeS1Oa":(x,y,e)=>{"use strict";e.d(y,{V:()=>o,m:()=>n});var t=e("9oVghaOd"),r=e.n(t),s=e("4E3oowBb");function o(c,g,d="asc"){const f=r()(c),p=r()(g);return d==="asc"?f.isBefore(p)?-1:p.isBefore(f)?1:0:p.isBefore(f)?-1:f.isBefore(p)?1:0}function n(c,g,d="asc"){return d==="asc"?(0,s.j)(c.toLowerCase(),g.toLowerCase()):(0,s.j)(g.toLowerCase(),c.toLowerCase())}},TJOheZRu:(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const t={tempDocument:document.createElement("textarea"),capitalizeFirstLetter(s){return s.charAt(0).toUpperCase()+s.slice(1)},escapeHTML(s){return this.tempDocument.textContent=s,this.tempDocument.innerHTML},unescapeHTML(s){return this.tempDocument.innerHTML=s,this.tempDocument.textContent},pluralize(s,o,n){return s===1||s==="1"?o:n},stringify(s){return(typeof s=="object"?JSON.stringify(s):String(s))||""},replaceSpaces(s,o="-"){return s.replace(/\s/g,o)},toTitleCase(s,o=" "){return s.toLowerCase().split(o).map(n=>`${n.charAt(0).toUpperCase()}${n.slice(1)}`).join(" ")},truncateWithEllipses(s="",o=10,n="..."){return s.length>o?`${s.substring(0,o)}${n}`:s},getRecursiveChildText(s){if(typeof s=="string")return s;const{children:o}=(s==null?void 0:s.props)||{};if(Array.isArray(s)){const n=[];return s.forEach(c=>{typeof c=="object"?n.push(t.getRecursiveChildText(c)):typeof c=="string"&&n.push(c)}),n.join(" ")}return typeof o=="object"?t.getRecursiveChildText(o):typeof o=="string"?o:""}},r=t},"5NVsf39r":(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const r={nowInSeconds(){return Math.floor(Date.now()/1e3)}}},MdYBRjRJ:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>f,Gz:()=>_,H3:()=>h,Tp:()=>C,XV:()=>p,i:()=>m,uH:()=>P});var t=e("pjsNBHWI"),r=e.n(t),s=e("oCSEoDew"),o=e.n(s),n=e("RCNj0OY4");const c=["http:","https:"],g=I=>{const M=new(o())(I);if(!M.hostname()||!M.scheme()){const O=new(o())(window.location);return M.absoluteTo(O).toString()}return I},d={qualifyUrl(I){var M;if(new(o())(I).is("absolute"))return I;const U=g((M=n.A.gl2ServerUrl())!=null?M:"");return new(o())(U+I).normalizePathname().toString()},appPrefixed(I){return d.concatURLPath(n.A.gl2AppPathPrefix(),I)},getParsedSearch(I){let M={},O=I.search;return O&&O.indexOf("?")===0&&O.length>1&&(O=O.substr(1,O.length-1),M=r().parse(O)),M},getParsedHash(I){let M={},{hash:O}=I;return O&&O.indexOf("#")===0&&O.length>1&&(O=O.substr(1,O.length-1),M=r().parse(O)),M},replaceHashParam(I,M){const O=this.getParsedHash(window.location);O[I]=M,window.location.replace(`#${r().stringify(O)}`)},concatURLPath(...I){const M=Array(I.length);for(let U=0;U{"use strict";e.d(y,{A:()=>O});var t=e("ieFRrI0A"),r=e.n(t),s=e("dFpwyWHg"),o=e.n(s),n=e("C2ikvoS0"),c=e.n(n),g=e("1IntWRSu"),d=e.n(g),f=e("8nGWeFnd"),p=e.n(f),E=e("TeAcaicX"),l=e.n(E),m=e("eE3+5goe"),h=e.n(m),A=e("OXMg8s84"),C={};C.styleTagTransform=h(),C.setAttributes=p(),C.insert=d().bind(null,"head"),C.domAPI=c(),C.insertStyleElement=l();var _=o()(A.A,C);const P=A.A&&A.A.locals?A.A.locals:void 0,I={debug:!1,positionClass:"toast-bottom-full-width",onclick:null,showDuration:300,hideDuration:1e3,timeOut:7e3,extendedTimeOut:1e3,escapeHtml:!0,closeButton:!0,closeHtml:"",progressBar:!0,preventDuplicates:!0},O={error(U,W){r().error(U,W||"Error",{...I,timeOut:1e4})},warning(U,W){r().warning(U,W||"Attention",I)},success(U,W){r().success(U,W||"Information",I)}}},kbGtT3aS:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>g,MM:()=>n});const t={rE:"6.0.5"},r=/(?\d+)\.(?\d+)\.(?\d+)(-(?[\w.\d]+))?(\+(?\w+))?/,s=t.rE,o=(d=s)=>{const f=r.exec(d);if(!f||!f.groups){console.error("Failed to parse version",d);return}const p=f.groups;return{major:p==null?void 0:p.major,minor:p==null?void 0:p.minor,patch:p==null?void 0:p.patch,preRelease:p==null?void 0:p.preRelease,buildMetadata:p==null?void 0:p.buildMetadata}},n=()=>s,g={parseVersion:o,getMajorAndMinorVersion:()=>{const d=o();if(!d)return n();const{major:f,minor:p}=d;return`${f}.${p}`},getFullVersion:n}},"8wYeYPUw":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("RCNj0OY4");const o=({children:n,...c})=>r.A.isCloud()?t.createElement(t.Fragment,null):t.Children.map(n,g=>t.isValidElement(g)?t.cloneElement(g,c):g)},"VVS+7KXv":(x,y,e)=>{"use strict";e.d(y,{A:()=>s});const t=o=>{const n=c=>{c.clipboardData.setData("text/plain",o),c.preventDefault()};return document.addEventListener("copy",n),document.execCommand("copy"),document.removeEventListener("copy",n),Promise.resolve()},s=o=>navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(o):t(o)},nxMFMmDQ:(x,y,e)=>{"use strict";e.d(y,{B2:()=>P,Dm:()=>Ee,GY:()=>M,Gv:()=>V,Hf:()=>O,IV:()=>W,Iv:()=>Q,JD:()=>he,JF:()=>ze,JW:()=>m,KJ:()=>k,KL:()=>oe,PP:()=>K,R$:()=>C,TW:()=>o,WK:()=>n,X1:()=>j,Y_:()=>p,ZM:()=>Ie,Zl:()=>U,Zv:()=>c,bU:()=>h,bz:()=>le,dj:()=>E,gC:()=>ne,gx:()=>l,iC:()=>_,iT:()=>Re,mP:()=>A,nH:()=>me,p3:()=>G,p8:()=>ye,pJ:()=>z,pZ:()=>ce,rw:()=>at,sm:()=>Ve,vo:()=>ae,zA:()=>g,zD:()=>I});var t=e("ww+BtWnX"),r=e.n(t),s=e("NhiTWmq4");const o="full_message",n="timestamp",c="message",g="source",d="streams",f="gl2_second_sort_field",p=["_id","_ttl","_source","_all","_index","_type","_score","gl2_accounted_message_size","gl2_processing_error","gl2_processing_duration_ms","gl2_processing_timestamp","gl2_receive_timestamp","gl2_remote_hostname","gl2_remote_ip","gl2_remote_port","gl2_source_collector","gl2_source_collector_input","gl2_source_input","gl2_source_node","gl2_message_id",d,"gl2_source_radio","gl2_source_radio_input"],E=[o,c,n,g,f],l="(Empty Value)",m=15,h={type:"auto",scaling:1},A=[n,g],C=0,_={type:"relative",range:C},P={DEFAULT_LIMIT:150},I="relative",M=300,O=M-60,U={type:I,from:M},W={},K=s.QU.create("#ffec3d"),j=r().scale(["lightyellow","lightgreen","lightblue","red"]).mode("lch").colors(40),G="linear",k=["linear","step-after","spline"],Q=[25,50,75,90,95,99].map(Oe=>({label:Oe,value:Oe})),ne=[{label:"Document Count",value:"COUNT"},{label:"Field Sum",value:"SUM"}],z={seconds:"Seconds",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Weeks",months:"Months"},le=[{type:"seconds",label:"Seconds"},{type:"minutes",label:"Minutes"},{type:"hours",label:"Hours"},{type:"days",label:"Days"}],V="/views",me=`${V}/:viewId`,Pe="/search",Ve=`${Pe}/new`,at=`${Pe}/:viewId`,ze="/dashboards",he=`${ze}/new`,Ie=`${ze}/tv/:viewId`,Re=`${ze}/:viewId`,ce="/extendedsearch",Ee=[{type:"relative",name:"Relative"},{type:"absolute",name:"Absolute"},{type:"keyword",name:"Keyword"}],oe=28,ae="\u2E31",ye="-"},baf4E2h0:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("JnTtTRmZ"),r=e.n(t),s=e("IA3Ku5lS");const n=(0,s.rN)("views.QueryValidation",()=>r().createActions({displayValidationErrors:{asyncResult:!1}}))},Xt0X5Kl4:(x,y,e)=>{"use strict";e.d(y,{A:()=>U});var t=e("ii0bleBb"),r=e.n(t),s=e("GaFHk8Qk"),o=e.n(s),n=e("/yh+QgO6"),c=e.n(n),g=e("jlRcBdjT"),d=e("8Crd7QGv"),f=e("UmnljV2q");const p=r().oneOf(["relative","absolute","keyword"]),E=r().instanceOf(g.Ay),l=r().instanceOf(d.A),m=o().listOf(l),h=r().exact({activeQuery:r().string.isRequired,view:r().instanceOf(f.A).isRequired,dirty:r().bool.isRequired,isNew:r().bool.isRequired}),A=r().exact({index:r().string.isRequired,message:r().exact({_id:r().string.isRequired}).isRequired}),C=r().exact({id:r().string.isRequired,index:r().string.isRequired,fields:r().object.isRequired,formatted_fields:r().object,highlight_ranges:r().object,decoration_stats:r().exact({added_fields:r().object,changed_fields:r().object,removed_fields:r().object})}),_=r().oneOfType([r().element,r().string]),P=r().oneOfType([_,r().arrayOf(_)]),I=W=>{let K=W;const j=[];for(;K;)try{const G=Object.getPrototypeOf(K);j.push(G),K=G}catch{K=void 0}return j},M=(W,K=!1)=>{const j=c()(W,"name");return(G,k,Q)=>{const ne=G[k];if(!ne)return K?new Error(`Invalid prop ${k} supplied to ${Q}: expected to be instance of ${j} but found ${ne} instead`):void 0;const z=c()(I(ne)[0],["constructor","name"]);if(!I(ne).map(V=>c()(V,["constructor","name"])).filter(V=>V!==void 0).includes(j))return new Error(`Invalid prop ${k} supplied to ${Q}: ${z} expected to be instance of ${j}`)}},O=W=>Object.assign(M(W,!1),{isRequired:M(W,!0)}),U={...r(),BackendMessage:A,Message:C,CurrentView:h,FieldListType:m,FieldType:E,OneOrMoreChildren:P,TimeRangeType:p,instanceOf:O,ValidElements:_}},Tqc935YZ:(x,y,e)=>{"use strict";e.d(y,{A:()=>n,e:()=>s});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s={isLoading:!1,externalValueActions:[],isError:!1},o=t.createContext(s),n=(0,r.Gr)("contexts.ExternalValueActionsContext",()=>o)},YwMFjcSm:(x,y,e)=>{"use strict";e.d(y,{A:()=>A});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("IOI9nV80"),o=e("DUKaTDO2"),n=e("eFxcQyPT"),c=e("MdYBRjRJ"),g=e("jAGDuYSC");const d="/favorites",f=async C=>{const _=`${d}/${C}`;return(0,n.Ay)("PUT",(0,c.H3)(_))},p=C=>{const _=`${d}/${C}`;return(0,n.Ay)("DELETE",(0,c.H3)(_))},l=()=>{const C=(0,o.useMutation)(f,{onError:P=>{g.A.error(`Adding item to favorites failed with status: ${P}`,"Could not add item to favorites")}}),_=(0,o.useMutation)(p,{onError:P=>{g.A.error(`Deleting item from favorites failed with status: ${P}`,"Could not delete item from favorites")}});return{putItem:C.mutateAsync,deleteItem:_.mutateAsync}},m=(0,r.default)(s.In)(({theme:C,$isFavorite:_})=>(0,r.css)` color: ${_?C.colors.variant.info:void 0}; cursor: pointer; `),h=({isFavorite:C,grn:_,onChange:P,className:I})=>{const{putItem:M,deleteItem:O}=l(),U=(0,t.useCallback)(()=>{C?O(_).then(()=>P(!1)):M(_).then(()=>P(!0))},[C,O,_,P,M]),W=C?"Remove from favorites":"Add to favorites";return t.createElement(m,{className:I,onClick:U,title:W,$isFavorite:C,name:"star",type:C?"solid":"regular"})};h.defaultProps={className:void 0};const A=h},"SnOQy/BL":(x,y,e)=>{"use strict";e.d(y,{A:()=>m});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("Xt0X5Kl4"),n=e("J6y4/h8P"),c=e("gSdhV+tG"),g=e("gIAgj/hR");const d=n.default.span.attrs({className:"field-element"})(({$active:h,$disabled:A,theme:C})=>(0,n.css)` color: ${h?C.colors.variant.info:"currentColor"}; opacity: ${A?"0.3":"1"}; `),p=({children:h,disabled:A,element:C,menuContainer:_,name:P,type:I,queryId:M})=>{const O=(0,t.useContext)(c.y),U=({active:K})=>t.createElement(d,{$active:K,$disabled:A},C),W={queryId:M,field:P,type:I,contexts:O};return t.createElement(g.A,{element:U,handlerArgs:W,menuContainer:_,type:"field"},h)};var E=e("GFJVQ2dX");const l=({children:h,disabled:A=!1,menuContainer:C,name:_,queryId:P,type:I})=>t.createElement(E.A.Consumer,null,M=>M?t.createElement(p,{element:h||_,disabled:!M||A,menuContainer:C,name:_,type:I,queryId:P},_," = ",I.type):t.createElement("span",null,h));l.propTypes={children:s().node,disabled:s().bool,name:s().string.isRequired,menuContainer:s().object,queryId:s().string,type:o.A.FieldType.isRequired},l.defaultProps={children:null,disabled:!1,menuContainer:document.body,queryId:void 0};const m=l},tITy3x4L:(x,y,e)=>{"use strict";e.d(y,{A:()=>I});var t=e("9oVghaOd"),r=e.n(t),s=e("sWSSTOXR"),o=e.n(s),n=e("PwTFiGSp"),c=e("IZYxBTgT"),g=e("eZ5nxjAy"),d=e("yTnlRDNA");const f="Format must be: YYYY-MM-DD [HH:mm:ss[.SSS]].",p="Range is outside limit duration.",E="Date is outside limit duration.",l='The "Until" date must come after the "From" date.',m=(M,O,U)=>{if(O===0)return!1;const W=U((0,c.$4)(new Date).subtract(Number(O),"seconds"),"complete");return r()(M).isBefore(W)},h=(M,O,U)=>{let W={};return(0,c.vd)(M.from)||(W={...W,from:f}),(0,c.vd)(M.to)||(W={...W,to:f}),M.from>=M.to&&(W={...W,to:l}),m(M.from,O,U)&&(W={...W,from:E}),W},A=(M,O)=>{let U={};return O>0&&((M.from>O||!M.from)&&(U={...U,from:p}),M.to>O&&(U={...U,to:p})),M.from===null&&(U={...U,from:"Cannot be empty."}),M.from&&M.to===null&&(U={...U,to:"Cannot be empty."}),M.from&&M.from<=M.to&&(U={...U,to:l}),U},C=(0,g.A)(d.A.testNaturalDate,350),_=async(M,O,U,W,K)=>{let j={};if(o()(M.keyword)==="")return j={keyword:"Keyword must not be empty!"},j;if(K){const G=await C(M.keyword,W).catch(()=>{});if(!G)return j={keyword:"Unable to parse keyword"},j;if(m(U(G.from,"complete"),O,U))return j={keyword:p},j}return j},I=(M,O,U,W,K=!0)=>(0,n.u4)(M)?_(M,O,U,W,K):(0,n._b)(M)?A(M,O):(0,n.wb)(M)?h(M,O,U):{}},rKq6XZKM:(x,y,e)=>{"use strict";e.d(y,{Z:()=>s});var t=e("nxMFMmDQ"),r=e("PwTFiGSp");const s=(o,n)=>{const{type:c}=o;switch(o.type){case"absolute":return{type:o.type,from:n(o.from,"complete"),to:n(o.to,"complete")};case"relative":if((0,r.r1)(o))return o.range===t.R$?{type:o.type,range:o.range}:{type:o.type,from:o.range};if((0,r._b)(o))return"to"in o?{type:o.type,from:o.from,to:o.to}:{type:o.type,from:o.from};throw new Error("Invalid relative time range");case"keyword":return o;default:throw new Error(`Invalid time range type: ${c}`)}}},"/zlmJemQ":(x,y,e)=>{"use strict";e.d(y,{A:()=>Ee});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("X6P4SH4J"),n=e.n(o),c=e("sWSSTOXR"),g=e.n(c),d=e("axYmp8ly"),f=e.n(d),p=e("Ex+j8X3w"),E=e("jlRcBdjT"),l=e("DUKaTDO2"),m=e("2ufZf/Iw"),h=e("0hhBr0/b");const A=(oe,ae)=>{var ye;const{fetchForwarderInput:Oe}=(ye=(0,h.A)("forwarder")[0])!=null?ye:{},{data:ve,isError:_e,isLoading:He}=(0,l.useQuery)(["forwarder","input",oe],()=>Oe(oe),{enabled:Oe&&ae});return He||_e?void 0:ve},_=({value:oe})=>{var ae,ye,Oe;const ve=(0,m.A)(),_e=A(oe,ve&&!ve[oe]),He=(Oe=(ye=(ae=ve[oe])==null?void 0:ae.title)!=null?ye:_e==null?void 0:_e.title)!=null?Oe:oe;return t.createElement("span",{title:oe},He)};var P=e("64CQykkG");const I=(oe,ae)=>{var ye;const{fetchForwarderNode:Oe}=(ye=(0,h.A)("forwarder")[0])!=null?ye:{},{data:ve,isError:_e,isLoading:He}=(0,l.useQuery)(["forwarder","node",oe],()=>Oe(oe),{enabled:Oe&&ae});return He||_e?void 0:ve},O=({value:oe})=>{var ae;const ye=(0,P.A)(),Oe=ye==null?void 0:ye[oe],ve=I(oe,ye&&!Oe),_e=(ae=Oe?`${Oe.short_node_id} / ${Oe.hostname}`:ve==null?void 0:ve.title)!=null?ae:oe;return t.createElement("span",{title:oe},_e)};var U=e("J6y4/h8P"),W=e("gvNRgdyu");const K=U.default.span` span:not(:last-child)::after { content: ', '; } `,G=({value:oe})=>{const ae=(0,t.useContext)(W.A),ye=(0,t.useMemo)(()=>{var ve;return Object.fromEntries((ve=ae.map(_e=>[_e.id,_e]))!=null?ve:[])},[ae]),Oe=(0,t.useCallback)(ve=>{var _e,He;return t.createElement("span",{title:ve},(He=(_e=ye[ve])==null?void 0:_e.title)!=null?He:ve)},[ye]);return Array.isArray(oe)?t.createElement(K,null,oe.map(Oe)):Oe(oe)};var k=e("9pdI12pI"),Q=e.n(k);const ne=U.default.span` float: right; `,le=({value:oe})=>{const ae=(0,t.useMemo)(()=>Q()(oe).format("0.00%"),[oe]);return t.createElement(ne,{title:String(oe)},ae)},V=U.default.i` color: darkgray; `,Pe=()=>t.createElement(V,null,"");var Ve=e("Xt0X5Kl4");const at=(oe,ae,ye,Oe,ve)=>{const _e=n()(ae)?ae:JSON.stringify(ae),He=Oe;return g()(_e)===""?t.createElement(Pe,null):t.createElement(He,{field:oe,value:ye?f()(_e):_e,type:ve})},he=({field:oe,value:ae,truncate:ye,render:Oe,type:ve})=>{if(ae&&ae.href&&ae.type){const _e=at(oe,ae.href,ye,Oe,ve);return t.createElement("a",{href:ae.href,target:"_blank",rel:"noreferrer"},_e)}return at(oe,ae,ye,Oe,ve)},Ie=(oe,ae,ye,Oe,ve)=>{const _e=n()(ae)?ae:JSON.stringify(ae),He=Oe;return g()(_e)===""?t.createElement(Pe,null):t.createElement(He,{field:oe,value:ye?f()(_e):_e,type:ve})},Re=({value:oe})=>oe,ce=({field:oe,value:ae,render:ye=Re,type:Oe=E.Ay.Unknown,truncate:ve=!1})=>{const _e=ye;if(ae===void 0)return null;if(Oe.isDecorated())return t.createElement(he,{value:ae,field:oe,render:ye,type:Oe,truncate:ve});switch(Oe.type){case"date":return t.createElement(p.A,{dateTime:ae,render:ye,field:oe,format:"complete"});case"boolean":return t.createElement(_e,{value:String(ae),field:oe});case"input":return t.createElement(_,{value:String(ae)});case"node":return t.createElement(O,{value:String(ae)});case"streams":return t.createElement(G,{value:ae});case"percentage":return t.createElement(le,{value:ae});default:return Ie(oe,ae,ve,ye,Oe)}};ce.propTypes={truncate:s().bool,type:Ve.A.FieldType,value:s().any},ce.defaultProps={truncate:!1,render:Re,type:void 0,value:void 0};const Ee=ce},UPOvISKg:(x,y,e)=>{"use strict";e.d(y,{A:()=>P});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("jlRcBdjT"),o=e("N3RHy9gr"),n=e("ii0bleBb"),c=e.n(n),g=e("gIAgj/hR"),d=e("gSdhV+tG"),f=e("Xt0X5Kl4");const p=({children:I,element:M,field:O,menuContainer:U,queryId:W,type:K,value:j})=>{const G=(0,t.useContext)(d.y),k=(0,t.useMemo)(()=>({queryId:W,field:O,type:K,value:j,contexts:G}),[G,O,W,K,j]),Q=()=>M;return t.createElement(g.A,{element:Q,handlerArgs:k,menuContainer:U,type:"value"},I)};p.propTypes={children:c().node.isRequired,element:c().node.isRequired,field:c().string.isRequired,menuContainer:c().object,queryId:c().string.isRequired,type:f.A.FieldType,value:c().oneOfType([c().node,c().object]).isRequired},p.defaultProps={menuContainer:document.body,type:s.Ay.Unknown};const E=p;var l=e("/zlmJemQ"),m=e("GFJVQ2dX");const h=r.default.span` white-space: nowrap; `,A=({value:I})=>I,C=({field:I,value:M,render:O,type:U})=>{const W=(0,o.A)(),K=(0,t.useMemo)(()=>O!=null?O:k=>k.value,[O]),j=(0,t.useCallback)(({value:k})=>t.createElement(K,{field:I,value:k}),[K,I]),G=t.createElement(l.A,{field:I,value:M,type:U,render:j});return t.createElement(E,{element:G,field:I,queryId:W,type:U,value:M},t.createElement(h,{"data-testid":"value-actions-title"},I," = ",t.createElement(l.A,{field:I,value:M,type:U,truncate:!0})))};C.defaultProps={render:A};const _=({field:I,value:M,render:O=A,type:U=s.Ay.Unknown})=>t.createElement(m.A.Consumer,null,W=>W?t.createElement(C,{field:I,value:M,render:O,type:U}):t.createElement("span",null,t.createElement(l.A,{field:I,value:M,render:O,type:U})));_.defaultProps={render:A};const P=_},SqY3hYJN:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("TJOheZRu");const s=({type:o,capitalize:n=!1})=>{if(!o)return"";const c=o.toLowerCase();return n?t.A.capitalizeFirstLetter(c):c}},"gIAgj/hR":(x,y,e)=>{"use strict";e.d(y,{A:()=>Ie});var t=e("Z7aTuO5B"),r=e("F3uT4N0K"),s=e("J6y4/h8P"),o=e("0hhBr0/b"),n=e("rIl5IEuP"),c=e("PfG+ecgN"),g=e.n(c),d=e("u2QUEJU3"),f=e("m/3sLmyX"),p=e("iltCXley");function E(Re){return"linkTarget"in Re}function l(Re,ce,Ee){if("handler"in ce)return ce.handler;if("thunk"in ce)return async oe=>Re(ce.thunk(oe));if(ce.component){const oe=ce.component;return({queryId:ae,field:ye,value:Oe,type:ve})=>{const _e=(0,p.A)(),He=()=>Ee(({[_e]:Qe,...zt})=>zt),je=t.createElement(oe,{key:ce.title,onClose:He,queryId:ae,field:ye,value:Oe,type:ve});return Ee(Qe=>({[_e]:je,...Qe})),Promise.resolve()}}throw new Error(`Invalid binding for action: ${String(ce)} - has neither 'handler' nor 'component'.`)}var m=e("6tmAsyUP"),h=e("orDZ6Vj2"),A=e("8OvTct/Z"),C=e("v4GbOr/o"),_=e("MdYBRjRJ"),P=e("0t7Ye+61");const I=(0,s.default)(n.MenuItem)` && > a { display: flex; justify-content: space-between; align-items: center; } `,M=(0,s.default)(d.A)(({theme:Re})=>` margin-left: ${Re.spacings.xxs}; `),O=(0,s.default)(Re=>t.createElement(m.A,{...Re}))` margin-left: 5px; `,U=({action:Re,handlerArgs:ce})=>{if(Re.help){const Ee=Re.help(ce);if(Ee){const{title:oe,description:ae}=Ee;return t.createElement(t.Fragment,null,Re.title,t.createElement(O,{title:oe,testId:"menu-item-help"},ae))}}return t.createElement(t.Fragment,null,Re.title)},W=({action:Re,disabled:ce,field:Ee,handlerArgs:oe,onMenuToggle:ae,type:ye})=>{const{unsetWidgetFocusing:Oe}=(0,t.useContext)(f.A),ve={href:Re.linkTarget(oe),target:"_blank",rel:"noopener noreferrer"},_e=(0,t.useCallback)(()=>{const{resetFocus:He=!1}=Re;He&&Oe(),ae()},[Re,ae,Oe]);return t.createElement(I,{disabled:ce,eventKey:{action:ye,field:Ee},onSelect:_e,...ve},t.createElement(U,{action:Re,handlerArgs:oe}),t.createElement(M,{name:"open_in_new"}))},K=({disabled:Re,action:ce,handlerArgs:Ee,setOverflowingComponents:oe,overflowingComponents:ae,type:ye,onMenuToggle:Oe})=>{const{unsetWidgetFocusing:ve}=(0,t.useContext)(f.A),_e=(0,h.A)(),He=(0,P.A)(),je=(0,A.A)(),Qe=(0,t.useCallback)(ke=>{oe(ke(ae))},[ae,oe]),zt=(0,t.useMemo)(()=>l(_e,ce,Qe),[ce,_e,Qe]),xe=(0,t.useCallback)(()=>{const{resetFocus:ke=!1,title:Se}=ce;je(C.g.SEARCH_FIELD_VALUE_ACTION[g()(Se).replace(/\s|\//g,"_")],{app_pathname:(0,_.i)(He.pathname),app_section:"search-field-value",event_details:{}}),ke&&ve(),Oe(),zt(Ee)},[ce,zt,Ee,He.pathname,Oe,je,ve]),{field:Ue}=Ee;return t.createElement(I,{disabled:Re,eventKey:{action:ye,field:Ue},onSelect:xe},t.createElement(U,{action:ce,handlerArgs:Ee}))},G=({action:Re,handlerArgs:ce,setOverflowingComponents:Ee,overflowingComponents:oe,type:ae,onMenuToggle:ye})=>{const{isEnabled:Oe=()=>!0}=Re,_e=(0,h.A)()((je,Qe)=>!Oe(ce,Qe)),{field:He}=ce;return E(Re)?t.createElement(W,{action:Re,disabled:_e,field:He,handlerArgs:ce,onMenuToggle:ye,type:ae}):t.createElement(K,{action:Re,disabled:_e,field:He,handlerArgs:ce,onMenuToggle:ye,overflowingComponents:oe,setOverflowingComponents:Ee,type:ae})};var k=e("IOI9nV80"),Q=e("Tqc935YZ");const z=()=>(0,t.useContext)(Q.A),le=s.default.span` padding-left: 10px; padding-right: 10px; padding-bottom: 5px; margin-bottom: 5px; font-weight: 600; `,V=s.default.li` margin-bottom: 10px; list-style: none; `,me=(Re,ce,Ee=[])=>Ee.filter(oe=>{const{isHidden:ae=()=>!1}=oe;return Re((ye,Oe)=>!ae(ce,Oe))}),Pe=(Re,ce)=>{const Ee=(0,o.A)("valueActions"),oe=(0,o.A)("fieldActions"),ae=(0,h.A)();return Re==="value"?me(ae,ce,Ee):Re==="field"?me(ae,ce,oe):[]},Ve=(Re,ce)=>{const{isLoading:Ee,isError:oe,externalValueActions:ae}=z(),ye=(0,h.A)();if(Re!=="value")return{isLoading:Ee,isError:oe,externalValueActions:[]};const Oe=me(ye,ce,ae);return{isLoading:Ee,isError:oe,externalActions:Oe}},ze=({children:Re,type:ce,handlerArgs:Ee,setOverflowingComponents:oe,overflowingComponents:ae,onMenuToggle:ye})=>{const Oe=Pe(ce,Ee),{externalActions:ve,isLoading:_e}=Ve(ce,Ee);return t.createElement(t.Fragment,null,t.createElement(V,null,t.createElement(le,null,Re)),t.createElement(n.MenuItem,{divider:!0}),t.createElement(n.MenuItem,{header:!0},"Actions"),Oe.map(He=>t.createElement(G,{action:He,key:`${ce}-action-${He.type}`,handlerArgs:Ee,setOverflowingComponents:oe,overflowingComponents:ae,type:ce,onMenuToggle:ye})),_e&&t.createElement(t.Fragment,null,t.createElement(n.MenuItem,{divider:!0}),t.createElement(n.MenuItem,{disabled:!0},t.createElement(k.y$,{text:"Loading"}))),!_e&&ve&&ve.length!==0&&t.createElement(t.Fragment,null,t.createElement(n.MenuItem,{divider:!0}),ve.map(He=>t.createElement(G,{action:He,key:`${ce}-action-${He.type}`,handlerArgs:Ee,setOverflowingComponents:oe,overflowingComponents:ae,type:ce,onMenuToggle:ye}))))},Ie=({type:Re,handlerArgs:ce,menuContainer:Ee,element:oe,children:ae})=>{const[ye,Oe]=(0,t.useState)(!1),[ve,_e]=(0,t.useState)({}),He=(0,t.useCallback)(()=>Oe(!ye),[ye]),je=Object.values(ve),Qe=t.createElement(t.Fragment,null,t.createElement(oe,{active:ye}),t.createElement("span",{className:"caret"}));return t.createElement(t.Fragment,null,t.createElement(r.A,{show:ye,toggleChild:Qe,placement:"right",onToggle:He,menuContainer:Ee,dropdownZIndex:1031},t.createElement(ze,{handlerArgs:ce,type:Re,setOverflowingComponents:_e,onMenuToggle:He,overflowingComponents:ve},ae)),je)}},sG4r5TYi:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>K,$j:()=>M,rg:()=>I});var t=e("Z7aTuO5B"),r=e("QL8i6bcz"),s=e("TNM0kxJ5"),o=e("J6y4/h8P"),n=e("rIl5IEuP"),c=e("pLyxMSSz"),g=e("ocYLQ/BD"),d=e("W7wTd14e"),f=e("GFJVQ2dX");const p=o.default.div` display: flex; flex-direction: column; align-items: center; justify-content: center; height: inherit; `,E=o.default.h2(({theme:j})=>(0,o.css)` margin-bottom: ${j.spacings.sm}; `),m=({toggleEdit:j,editing:G=!1})=>{const k=(0,t.useContext)(c.A);(0,t.useEffect)(()=>{k&&k()},[k]);const Q=(0,t.useContext)(f.A),ne=G?t.createElement("p",null,"You are now editing the widget.",t.createElement("br",null),"To see results, add at least one metric. You can group data by adding rows/columns.",t.createElement("br",null),'You can preview widget search results by clicking on "',d.Z,'".',t.createElement("br",null),'To finish, click "',g.O,'" to save, "Cancel" to abandon changes.'):t.createElement("p",null,"Please ",Q?t.createElement(n.Button,{bsStyle:"info",onClick:j},"Edit"):"edit"," the widget to see results here.");return t.createElement(p,null,t.createElement("div",null,t.createElement(E,null,"Empty Aggregation"),ne))};var h=e("a5C0HdYb");const A=o.default.div` height: 100%; width: 100%; overflow: hidden; grid-row: 2; grid-column: 1; `,_=({children:j})=>{const G=(0,t.useRef)(null),{width:k,height:Q}=(0,h.A)(G);return t.createElement(A,{ref:G},j({height:Q,width:k}))},P="table",I=j=>{var G;return(G=j.chart)!=null?G:j[Object.keys(j).filter(k=>k!=="events")[0]]},M=(j,G)=>Object.assign(j,{type:G}),O=j=>{const k=r.d.exports("visualizationTypes").filter(Q=>Q.type===j)[0];if(!k)throw new Error(`Unable to find visualization component for type: ${j}`);return k.component},U=j=>j.type==="events"?j.events:j.rows,K=({config:j,data:G,editing:k=!1,fields:Q,toggleEdit:ne,setLoadingState:z})=>{const le=(0,t.useContext)(s.A);if(!j||j.isEmpty)return t.createElement(m,{toggleEdit:ne,editing:k});const V=O(j.visualization||P),{effective_timerange:me}=G.chart||Object.values(G)[0]||{},Pe=Object.fromEntries(Object.entries(G).map(Ve=>Ve).map(([Ve,at])=>[Ve,U(at)]));return t.createElement(_,null,({height:Ve,width:at})=>t.createElement(V,{config:j,data:Pe,setLoadingState:z,effectiveTimerange:me,editing:k,fields:Q,height:Ve,width:at,toggleEdit:ne,onChange:le}))}},vVgHnCl1:(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("IOI9nV80");const o=r.default.div(({theme:p})=>(0,r.css)` display: flex; padding: 6px 5px 3px 7px; margin-bottom: 5px; border-radius: 3px; border: 1px solid ${p.colors.variant.lighter.default}; background-color: ${p.colors.variant.lightest.default}; `),n=r.default.div` display: flex; flex-direction: column; min-width: 25px; margin-left: 5px; `,c=r.default.div` flex: 1; // The min-width is required to avoid an overflow problem with the parent component. min-width: 0; `,g=r.default.div` display: flex; align-items: center; justify-content: center; min-height: 25px; `,d=(0,t.forwardRef)(({children:p,onRemove:E,testIdPrefix:l,dragHandleProps:m,className:h,draggableProps:A,elementTitle:C},_)=>t.createElement(o,{className:h,ref:_,...A!=null?A:{}},t.createElement(c,null,p),t.createElement(n,null,m&&t.createElement(g,{...m,"data-testid":`${l}-drag-handle`},t.createElement(s.In,{name:"drag_indicator"})),E&&t.createElement(s.K0,{onClick:E,name:"delete",title:`Remove ${C}`}))));d.defaultProps={className:void 0,draggableProps:void 0,dragHandleProps:void 0,onRemove:void 0,testIdPrefix:"configuration"};const f=d},W7wTd14e:(x,y,e)=>{"use strict";e.d(y,{Z:()=>p,A:()=>C});var t=e("Z7aTuO5B"),r=e("UiXZqrDE"),s=e("J6y4/h8P"),o=e("+Ej1FZHV"),n=e("IOI9nV80"),c=e("rIl5IEuP");const d=({aggregationElements:_,onSelect:P,formValues:I})=>{const M=_.filter(({allowCreate:O})=>O(I)).map(({key:O,title:U})=>t.createElement(c.MenuItem,{key:`element-select-${O}`,onSelect:()=>P(O)},U));return t.createElement(c.DropdownButton,{id:"add-aggregation-element",title:"Add",buttonTitle:"Add an element"},M)};var f=e("DAqOYyf8");const p="Update preview",E=Object.fromEntries(f.A.map(_=>[_.key,_])),l=(0,s.default)(c.ButtonToolbar)` justify-content: space-between; margin-bottom: 10px; `,m=(_,P,I)=>{var M;const O=E[_];O!=null&&O.onCreate?I(O.onCreate(P)):I({...P,[_]:[...(M=P[_])!=null?M:[],{}]})},h=s.default.div` margin-left: 5px; `,C=()=>{const{dirty:_,isSubmitting:P,isValid:I,values:M,setValues:O}=(0,r.useFormikContext)();return t.createElement(l,null,t.createElement(h,{"data-testid":"add-element-section",className:"pull-left"},t.createElement(d,{onSelect:U=>m(U,M,O),aggregationElements:f.A,formValues:M})),t.createElement(o.A,{bsStyle:"info",className:"pull-right",type:"submit",disabled:!I||P||!_},P?t.createElement(n.y$,{text:"Updating preview...",delay:0}):p))}},AKYezHev:(x,y,e)=>{"use strict";e.d(y,{A:()=>A});var t=e("Z7aTuO5B"),r=e("VPaD/Np4"),s=e.n(r),o=e("J6y4/h8P"),n=e("4E3oowBb"),c=e("hC1XaH+L"),g=e("hhdCSTZj"),d=e("i3LesQt8"),f=e("N3RHy9gr");const p=o.default.span` display: inline-flex; gap: 2px; align-items: center; `,E=({label:C},{label:_})=>(0,n.j)(C,_),l=o.default.span(({theme:C})=>(0,o.css)` color: ${C.colors.gray[70]}; `),m=({label:C,qualified:_,type:P})=>{const I=t.createElement(p,null,P&&t.createElement(t.Fragment,null,t.createElement(d.A,{type:P})," "),C);return _?t.createElement("span",null,I):t.createElement(l,null,I)};m.defaultProps={type:void 0};const h=({ariaLabel:C,autoFocus:_,allowCreate:P,className:I,clearable:M,excludedFields:O,id:U,isFieldQualified:W,menuPortalTarget:K,name:j,onChange:G,onMenuClose:k,openMenuOnFocus:Q,persistSelection:ne,placeholder:z,selectRef:le,size:V,value:me})=>{const Pe=(0,f.A)(),Ve=(0,t.useContext)(c.A),at=(0,t.useMemo)(()=>Ve.queryFields.get(Pe,r.List()).filter(ze=>!O.includes(ze.name)).map(ze=>({label:ze.name,value:ze.name,type:ze.type,qualified:W(ze)})).toArray().sort(E),[Pe,O,Ve.queryFields,W]);return t.createElement(g.A,{options:at,inputId:`select-${U}`,forwardedRef:le,allowCreate:P,className:I,onMenuClose:k,openMenuOnFocus:Q,persistSelection:ne,clearable:M,placeholder:z,name:j,value:me,"aria-label":C,optionRenderer:m,size:V,autoFocus:_,menuPortalTarget:K,onChange:G})};h.defaultProps={allowCreate:!1,ariaLabel:void 0,autoFocus:void 0,className:void 0,clearable:!1,isFieldQualified:()=>!0,excludedFields:[],onMenuClose:void 0,openMenuOnFocus:void 0,persistSelection:void 0,placeholder:void 0,selectRef:void 0,size:"small",menuPortalTarget:void 0};const A=h},TNM0kxJ5:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("Z7aTuO5B");const s=t.createContext(()=>{})},DAqOYyf8:(x,y,e)=>{"use strict";e.d(y,{A:()=>Ts});var t=e("oc9db6Tt"),r=e.n(t),s=e("o+5fKqZg"),o=e("iltCXley");const c=re=>{if(re===void 0||typeof re=="number")return re;const we=Number.parseInt(re,10);return Number.isNaN(we)?void 0:we};var g=e("nxMFMmDQ"),d=e("Z7aTuO5B"),f=e("UiXZqrDE"),p=e("J6y4/h8P"),E=e("X6P4SH4J"),l=e.n(E),m=e("IOI9nV80"),h=e("rIl5IEuP"),A=e("ii0bleBb"),C=e.n(A);const _=p.default.div(({theme:re})=>(0,p.css)` width: 100%; margin-top: 3px; color: ${re.colors.variant.danger}; > * { margin-right: 5px; &:last-child { margin-right: 0; } } `),P=({errors:re})=>r()(re)||Object.values(re).every(we=>!we)?null:d.createElement(_,null,Object.entries(re).map(([we,et])=>d.createElement("span",{key:we},String(et),".")));P.propTypes={errors:C().object},P.defaultProps={errors:{}};const I=P,M=p.default.div` display: flex; div:first-child { margin-right: 5px; } `,U=({groupingIndex:re})=>d.createElement(f.Field,{name:`groupBy.groupings.${re}.direction`},({field:{name:we,value:et,onChange:Et,onBlur:wt},meta:{error:Ut}})=>d.createElement(h.Input,{id:"group-by-direction",label:"Direction",error:Ut,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},d.createElement(M,null,d.createElement(h.Input,{checked:et==="row",formGroupClassName:"",id:we,label:"Row",onBlur:wt,onChange:Et,type:"radio",value:"row"}),d.createElement(h.Input,{checked:et==="column",formGroupClassName:"",id:we,label:"Column",onBlur:wt,onChange:Et,type:"radio",value:"column"}))));var W=e("GrokUsBg"),K=e("hC1XaH+L"),j=e("yDuYCNwc"),G=e("N3RHy9gr");const k=re=>{var we;return(we=re.fields)!=null&&we.length?re.type===s.rd?"Add another date field":"Add another field":"Add a field"},ne=({groupingIndex:re})=>{var we,et,Et,wt;const Ut=(0,d.useContext)(K.A),{setFieldValue:Pn,values:qn,errors:Fn}=(0,f.useFormikContext)(),jn=qn.groupBy.groupings[re],go=(0,G.A)(),Eo=k(jn),Lo=On=>{Je({fieldTypes:Ut,activeQueryId:go,groupingIndex:re,grouping:jn,newFields:On,setFieldValue:Pn})},Mn=(0,d.useCallback)(On=>{var ko;if(!((ko=jn.fields)!=null&&ko.length))return!0;const Ke=On.type.type==="date"?s.rd:s.FF;return jn.type===Ke},[(we=jn.fields)==null?void 0:we.length,jn.type]);return d.createElement(j.A,{id:"group-by-field-select",label:"Fields",labelClassName:"col-sm-3",error:(wt=(Et=(et=Fn==null?void 0:Fn.groupBy)==null?void 0:et.groupings)==null?void 0:Et[re])==null?void 0:wt.fields,wrapperClassName:"col-sm-9"},d.createElement(W.A,{onChange:Lo,selectedFields:jn.fields,menuPortalTarget:document.body,createSelectPlaceholder:Eo,isFieldQualified:Mn,testPrefix:`grouping-${re}`}))};var z=e("P98ee3gW");const le=p.default.div` display: flex; align-items: center; `,V=p.default.div` min-width: 30px; margin-left: 5px; text-align: right; `,me=p.default.div` margin-bottom: 5px; `,Pe=p.default.div` display: flex; align-items: center; `,Ve=(0,p.default)(m.Zf)` margin-left: 5px; `,at=()=>d.createElement(Pe,null,"Auto",d.createElement(Ve,{title:"Interval Types"},d.createElement("ul",null,d.createElement("li",null,d.createElement("h4",null,"Auto bucket size"),"For example, 1.5x. A smaller granularity leads to ",d.createElement("strong",null,"less"),"; conversely, a larger one shows ",d.createElement("strong",null,"more")," values."),d.createElement("li",null,d.createElement("h4",null,"Fixed bucket size"),"For example, 2 minutes. The time defines the size of the buckets for this timestamp type.")))),ze=(re,we,et)=>{et(we==="auto"?{target:{name:re,value:{type:"timeunit",value:1,unit:"minutes"}}}:{target:{name:re,value:{type:"auto",scaling:1}}})},he=(0,p.default)(h.FormControl)` padding: 0; border: 0; `,Re=({index:re})=>d.createElement(f.Field,{name:`groupBy.groupings.${re}.interval`},({field:{name:we,value:et,onChange:Et},meta:{error:wt}})=>d.createElement(h.Input,{id:"group-by-interval",label:"Interval",error:wt,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},d.createElement(me,null,d.createElement(h.Checkbox,{onChange:()=>ze(we,et.type,Et),checked:et.type==="auto"},d.createElement(at,null))),et.type==="auto"&&d.createElement(le,null,d.createElement(m.In,{name:"zoom_out",size:"lg",style:{paddingRight:"0.5rem"}}),d.createElement(he,{type:"range",min:.5,max:10,step:.5,value:et.scaling?1/et.scaling:1,onChange:Ut=>Et({target:{name:we,value:{...et,scaling:1/parseFloat(Ut.target.value)}}})}),d.createElement(m.In,{name:"zoom_in",size:"lg",style:{paddingLeft:"0.5rem"}}),d.createElement(V,null,et.scaling?1/et.scaling:1,"x")),et.type!=="auto"&&d.createElement(h.InputGroup,null,d.createElement(h.FormControl,{type:"number",value:et.value,step:"1",min:"1",onChange:Ut=>Et({target:{name:we,value:{...et,value:Ut.target.value}}})}),d.createElement(h.InputGroup.Button,null,d.createElement(z.A,{title:g.pJ[et.unit]||""},Object.keys(g.pJ).map(Ut=>d.createElement(h.MenuItem,{key:Ut,onSelect:()=>Et({target:{name:we,value:{...et,unit:Ut}}})},g.pJ[Ut]))))))),ce=p.default.div``,Ee=(0,p.default)(re=>d.createElement(m.Zf,{...re}))` margin-left: 5px; `,oe=(0,p.default)(h.Checkbox)` &.checkbox { padding-top: 0; } `,ae=p.default.div` display: flex; align-items: center; `,ye=({index:re})=>d.createElement(f.Field,{name:`groupBy.groupings.${re}.skipEmptyValues`},({field:{name:we,value:et,onChange:Et}})=>d.createElement(oe,{onChange:()=>Et({target:{name:we,value:!et}}),checked:et!=null?et:!1},d.createElement(ae,null,"Skip Empty Values",d.createElement(Ee,{title:"Skip Empty Values"},"When this is enabled, messages which do not contain the configured fields will be skipped.",d.createElement("p",null),'Otherwise an "(Empty Value)" bucket will be created.')))),ve=d.memo(({index:re})=>{const{values:{groupBy:we}}=(0,f.useFormikContext)(),et=we.groupings[re].type;return d.createElement(ce,{"data-testid":`grouping-${re}`},d.createElement(U,{groupingIndex:re}),d.createElement(ne,{groupingIndex:re}),et===s.rd&&d.createElement(Re,{index:re}),et===s.FF&&d.createElement(d.Fragment,null,d.createElement(m.o$,{label:"Limit",name:`groupBy.groupings.${re}.limit`,type:"number",bsSize:"small"}),d.createElement(ye,{index:re})))});var _e=e("vVgHnCl1");const He=(0,p.default)(h.Checkbox)` &.checkbox { padding-top: 0; } `,je=p.default.div` display: flex; align-items: center; `,Qe=(0,p.default)(re=>d.createElement(m.Zf,{...re}))` margin-left: 5px; `,zt=p.default.hr(({theme:re})=>(0,p.css)` border-style: dashed; border-color: ${re.colors.variant.lighter.default}; margin-top: 5px; margin-bottom: 5px; `),Ue=()=>{var re,we;const{values:{groupBy:et},values:Et,errors:wt,setValues:Ut,setFieldValue:Pn}=(0,f.useFormikContext)(),qn=!((re=et==null?void 0:et.groupings)!=null&&re.find(({direction:Lo})=>Lo==="column")),Fn=(0,d.useCallback)(Lo=>()=>{Ut(Kt.onRemove(Lo,Et))},[Ut,Et]),jn=((we=et==null?void 0:et.groupings)!=null?we:[]).length===0,go=(0,d.useCallback)(({item:Lo,index:Mn,dragHandleProps:On,draggableProps:ko,className:Ke,ref:dt})=>d.createElement(_e.A,{key:`grouping-${Lo.id}`,dragHandleProps:On,draggableProps:ko,className:Ke,testIdPrefix:`grouping-${Mn}`,onRemove:Fn(Mn),elementTitle:Kt.title,ref:dt},d.createElement(ve,{index:Mn})),[Fn]),Eo=l()(wt==null?void 0:wt.groupBy);return d.createElement(d.Fragment,null,d.createElement(f.FieldArray,{name:"groupBy.groupings",validateOnChange:!1,render:()=>d.createElement(m.bH,{items:et==null?void 0:et.groupings,onMoveItem:Lo=>Pn("groupBy.groupings",Lo),customListItemRender:go})}),!jn&&d.createElement(d.Fragment,null,d.createElement(zt,null),d.createElement(_e.A,{elementTitle:"Settings"},d.createElement(f.Field,{name:"groupBy.columnRollup"},({field:{name:Lo,onChange:Mn,value:On}})=>d.createElement(He,{onChange:()=>Mn({target:{name:Lo,value:!(et!=null&&et.columnRollup)}}),checked:On!=null?On:!1,disabled:qn},d.createElement(je,null,"Rollup Columns",d.createElement(Qe,{title:"Rollup Columns"},"When rollup is enabled, an additional trace totalling individual subtraces will be included.")))))),Eo&&d.createElement(I,{errors:{groupBy:wt==null?void 0:wt.groupBy}}))},ke=re=>{const we={...re,type:s.FF,limit:g.JW};return"interval"in we&&delete we.interval,we},Se=re=>{const we={...re,type:s.rd,interval:g.bU};return"limit"in we&&delete we.limit,we},Je=({fieldTypes:re,activeQueryId:we,groupingIndex:et,grouping:Et,newFields:wt,setFieldValue:Ut})=>{const Pn=jn=>Ut(`groupBy.groupings.${et}`,jn);if(!wt.length){Pn({...ke(Et),fields:[]});return}const Fn=re.queryFields.get(we,re.all).some(({name:jn,type:go})=>wt.includes(jn)&&go.type!=="date")?s.FF:s.rd;if(Et.type===Fn){Pn({...Et,fields:wt});return}Et.type!==Fn&&(Fn===s.FF&&Pn({...ke(Et),fields:wt}),Fn===s.rd&&Pn({...Se(Et),fields:wt}))},nt=re=>{var we;const et={};return(we=re.fields)!=null&&we.length||(et.fields="Field is required."),re.interval.type==="auto"&&(re.interval.scaling||(et.interval="Scaling is required."),re.interval.scaling&&(re.interval.scaling<=0||re.interval.scaling>=10)&&(et.interval="Must be greater than 0 and smaller or equals 10.")),re.interval.type==="timeunit"&&(re.interval.value||(et.interval="Value is required."),re.interval.value&&re.interval.value<=0&&(et.interval="Must be greater than 0.")),et},Wt=re=>{var we;const et={};return(we=re.fields)!=null&&we.length||(et.fields="Field is required."),c(re.limit)===void 0&&(et.limit="Limit is required."),re.limit<=0&&(et.limit="Must be greater than 0."),et},Le=re=>re.filter(we=>Object.keys(we).length>0).length>0,Fe=re=>"interval"in re?nt(re):Wt(re),qe=({values:re})=>{var we,et,Et;return((we=re==null?void 0:re.visualization)==null?void 0:we.type)==="numeric"&&((Et=(et=re==null?void 0:re.groupBy)==null?void 0:et.groupings)==null?void 0:Et.length)>0?{groupBy:"Single Number widget does not support Group By"}:{}},ut=re=>{const we={};if(!re.groupBy)return we;const{groupings:et}=re.groupBy,Et=et.map(Fe),wt=qe({values:re});return Le([wt])?wt:Le(Et)?{groupBy:{groupings:Et}}:we},ft=re=>({...re,id:(0,o.A)()}),Ot=(re,we)=>{const{fields:et,config:Et}=re,{interval:wt}=Et;return ft({direction:we,fields:et,type:s.rd,interval:wt})},Lt=(re,we)=>{const{fields:et,config:Et}=re,{limit:wt,skip_empty_values:Ut}=Et;return ft({direction:we,fields:et,type:s.FF,limit:wt,skipEmptyValues:Ut})},an=(re,we)=>{if(re.type===s.rd)return Ot(re,we);if(re.type===s.FF)return Lt(re,we);throw new Error(`Widget has not supported pivot type "${re.type}"`)},Ft=re=>{const we=re.rowPivots.map(Et=>an(Et,"row")),et=re.columnPivots.map(Et=>an(Et,"column"));return[...we,...et]},rn=re=>{const we="interval"in re?{interval:re.interval}:{limit:c(re.limit),skip_empty_values:re.skipEmptyValues};return s.Ay.create(re.fields,re.type,we)},$t=(re,we)=>{const et=re.groupings.filter(Ut=>Ut.direction==="row").map(rn),Et=re.groupings.filter(Ut=>Ut.direction==="column").map(rn),{columnRollup:wt}=re;return we.rowPivots(et).columnPivots(Et).rollup(wt)},be=()=>ft({direction:"row",fields:[],type:s.FF,limit:g.JW}),Kt={sectionTitle:"Group By",title:"Grouping",key:"groupBy",order:1,allowCreate:re=>re.visualization.type!=="numeric",onCreate:re=>{var we,et;return{...re,groupBy:{columnRollup:re.groupBy?re.groupBy.columnRollup:!1,groupings:[...(et=(we=re.groupBy)==null?void 0:we.groupings)!=null?et:[],be()]}}},onRemove:(re,we)=>{var et,Et;const wt={...we},Ut=(et=we.groupBy)==null?void 0:et.groupings.filter((Pn,qn)=>re!==qn);return{...wt,groupBy:{columnRollup:(Et=wt.groupBy.columnRollup)!=null?Et:!1,groupings:Ut}}},fromConfig:re=>{const we=Ft(re);if(!r()(we))return{groupBy:{columnRollup:re.rollup,groupings:we}}},toConfig:(re,we)=>$t(re.groupBy,we),component:Ue,validate:ut,isEmpty:re=>{var we;return((we=re==null?void 0:re.groupings)!=null?we:[]).length===0}},An=Kt;var qt=e("uzwJl55m");const io=qt.A;var Be=e("7VrSCphN"),bn=e("Wk8izdHL"),gn=e("hhdCSTZj");const wn=[{label:"Ascending",value:"Ascending"},{label:"Descending",value:"Descending"}],Zn=re=>{var we;const et=`${re.function}(${(we=re.field)!=null?we:""})`;return{label:re.name||et,field:et}},Vn=re=>re.fields,De=d.memo(({index:re})=>{var we,et;const{values:Et,setFieldValue:wt}=(0,f.useFormikContext)(),{metrics:Ut=[],groupBy:{groupings:Pn=[]}={}}=Et,qn=(et=(we=Et==null?void 0:Et.sort)==null?void 0:we.filter((ht,Pt)=>re!==Pt))!=null?et:[],Fn=qn.find(ht=>ht.type==="metric"),jn=qn.find(ht=>ht.type==="groupBy"),go=jn?[]:Ut.filter(ht=>ht.function!=="latest").map(Zn).map(({field:ht,label:Pt})=>({type:"metric",field:ht,label:Pt})),Eo=jn||Fn?[]:Pn.filter(ht=>ht.direction==="row").flatMap(Vn).map(ht=>({type:"groupBy",field:ht,label:ht})),Lo=[...go,...Eo],Mn=Lo.map((ht,Pt)=>({label:ht.label,value:Pt})),On=Et.sort[re],ko=Lo.findIndex(ht=>ht.type===On.type&&ht.field===On.field),Ke=ko>-1?ko:void 0,dt=Ke===void 0&&"field"in On;return d.createElement("div",{"data-testid":`sort-element-${re}`},d.createElement(f.Field,{name:`sort.${re}.field`},({field:{name:ht,onChange:Pt},meta:{error:dn}})=>d.createElement(h.Input,{id:"field-select",label:"Field",error:dn,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},d.createElement(gn.A,{options:dt?[{label:On.field,value:0}]:Mn,disabled:dt,allowCreate:dt,clearable:!1,name:ht,value:dt?0:Ke,placeholder:"Specify field/metric to be sorted on","aria-label":"Select field for sorting",size:"small",menuPortalTarget:document.body,onChange:jt=>{const nn=Lo[jt];wt(`sort.${re}.type`,nn.type),Pt({target:{name:ht,value:nn.field}})}}))),d.createElement(f.Field,{name:`sort.${re}.direction`},({field:{name:ht,value:Pt,onChange:dn},meta:{error:jt}})=>d.createElement(h.Input,{id:"direction-select",label:"Direction",error:jt,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},d.createElement(gn.A,{options:wn,disabled:dt,clearable:!1,name:ht,"aria-label":"Select direction for sorting",value:Pt,size:"small",menuPortalTarget:document.body,onChange:nn=>{dn({target:{name:ht,value:nn}})}}))))}),bt=()=>{const{values:{sort:re},setFieldValue:we,setValues:et,values:Et}=(0,f.useFormikContext)(),wt=(0,d.useCallback)(Ut=>()=>{et(Bt.onRemove(Ut,Et))},[et,Et]);return d.createElement(f.FieldArray,{name:"sort",validateOnChange:!1,render:()=>d.createElement(m.bH,{items:re,onMoveItem:Ut=>we("sort",Ut),customListItemRender:({item:Ut,index:Pn,dragHandleProps:qn,draggableProps:Fn,className:jn,ref:go})=>d.createElement(_e.A,{key:`sort-${Ut.id}`,dragHandleProps:qn,draggableProps:Fn,className:jn,testIdPrefix:`sort-${Pn}`,onRemove:wt(Pn),elementTitle:Bt.title,ref:go},d.createElement(De,{index:Pn}))})})},It=re=>re.filter(we=>Object.keys(we).length>0).length>0,En=re=>{const we={};if(!re.sort)return we;const et=re.sort.map(Et=>{var wt;const Ut={};(!Et.field||Et.field==="")&&(Ut.field="Field is required."),Et.direction||(Ut.direction="Direction is required.");const Pn=!!((wt=re.groupBy)!=null&&wt.groupings.find(Fn=>Fn.direction==="row"&&Fn.type==="time")),qn=re.visualization&&re.visualization.type!=="table";return Pn&&qn&&(Ut.field="Sort on non data table with time based row grouping does not work."),Ut});return It(et)?{sort:et}:{}},Xt=(re={})=>({...re,id:(0,o.A)()}),Ye=re=>{switch(re){case"pivot":return"groupBy";case"series":return"metric";default:throw new Error(`Invalid sort type: ${re}`)}},At=re=>{switch(re){case"groupBy":return"pivot";case"metric":return"series";default:throw new Error(`Invalid sort type: ${re}`)}},Bt={title:"Sort",key:"sort",order:3,allowCreate:()=>!0,onCreate:re=>({...re,sort:[...re.sort,Xt({})]}),component:bt,fromConfig:re=>({sort:re.sort.map(we=>{var et;return Xt({type:Ye(we.type),field:we.field,direction:(et=we.direction)==null?void 0:et.direction})})}),toConfig:(re,we)=>we.sort(re.sort.map(et=>new bn.A(At(et.type),et.field,Be.A.fromString(et.direction)))),onRemove:(re,we)=>({...we,sort:we.sort.filter((et,Et)=>re!==Et)}),validate:En,isEmpty:re=>(re!=null?re:[]).length===0},Ze=Bt;var gt=e("QL8i6bcz"),cn=e("87D/Fijl"),un=e.n(cn),_n=e("0hhBr0/b"),vn=e("4E3oowBb");const Ln=(0,p.default)(f.Field)` &&[type='checkbox'] { margin-top: 8px; } `,no=({field:re,name:we,error:et,title:Et})=>d.createElement(d.Fragment,null,d.createElement(h.Input,{id:`${we}-input`,label:Et,error:et,labelClassName:"col-sm-11",wrapperClassName:"col-sm-1"},d.createElement(Ln,{type:"checkbox",className:"pull-right","aria-label":re.title,name:we})),d.createElement(h.HelpBlock,null,re.description)),Wo=(re,we)=>({target:{name:re,value:we}}),Fo=({onChange:re,value:we,error:et,name:Et,title:wt,field:Ut})=>{const Pn=(0,d.useCallback)(qn=>{re(Wo(qn.target.name,Number.parseFloat(qn.target.value)))},[re]);return d.createElement(h.Input,{id:`${Et}-input`,bsSize:"small",type:"number",name:Et,onChange:Pn,value:we!=null?we:"",label:wt,error:et,placeholder:Ut.description,step:Ut.step,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"})},rt=re=>re.map(we=>{if(typeof we=="string")return{label:we,value:we};const[et,Et]=we;return{label:et,value:Et}}),Mt=(re,we)=>({target:{name:re,value:we}}),fn=({name:re,field:we,title:et,error:Et,value:wt,onChange:Ut})=>{if(we.type!=="select")throw new Error("Invalid field type passed!");return d.createElement(h.Input,{id:`${re}-select`,label:et,error:Et,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},d.createElement(gn.A,{options:rt(we.options),"aria-label":`Select ${we.title}`,clearable:!we.required,name:re,value:wt,size:"small",menuPortalTarget:document.body,onChange:Pn=>Ut(Mt(re,Pn))}))},Dn=re=>{const we=new Set;return[re.map(Et=>{if(typeof Et=="string")return we.add(Et),{key:Et,value:Et};const[wt,Ut]=Et;return we.add(Ut),{key:wt,value:Ut}}),we]},kn=(re,we)=>({target:{name:re,value:we}}),Gn=({name:re,field:we,title:et,error:Et,value:wt,onChange:Ut,values:Pn})=>{if(we.type!=="multi-select")throw new Error("Invalid field type passed!");const[qn,Fn]=(0,d.useMemo)(()=>un()(we.options)?Dn(we.options({formValues:Pn})):Dn(we.options),[Pn,we]),jn=(0,d.useCallback)(Eo=>Ut(kn(re,Eo===""?[]:Eo.split(","))),[re,Ut]),go=(0,d.useMemo)(()=>wt.join(","),[wt]);return(0,d.useEffect)(()=>{const Eo=wt.filter(Lo=>Fn.has(Lo)).join(",");go!==Eo&&jn(Eo)},[Fn,wt,jn,go]),d.createElement(h.Input,{id:`${re}-select`,label:et,error:Et,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},d.createElement(gn.A,{options:qn,name:re,value:go,multi:!0,menuPortalTarget:document.body,onChange:jn,inputProps:{"aria-label":`Select ${we.title}`},displayKey:"key",inputId:"multi-select-visualization"}))},vo=p.default.div` display: flex; align-items: center; `,yo=(0,p.default)(re=>d.createElement(m.Zf,{...re}))` margin-left: 5px; `,lo=re=>{switch(re){case"select":return fn;case"boolean":return no;case"numeric":return Fo;case"multi-select":return Gn;default:throw new Error(`Invalid configuration field type: ${re}`)}},Jn=re=>{const{helpComponent:we}=re;return we?d.createElement(vo,null,re.title,d.createElement(yo,{title:`Help for ${re.title}`,placement:"top"},d.createElement(we,null))):re.title},Gt=({name:re,fields:we=[]})=>{const{values:et}=(0,f.useFormikContext)(),Et=(0,f.getIn)(et,re);return d.createElement(d.Fragment,null,we.filter(wt=>wt.isShown?wt.isShown(Et):!0).map(wt=>{const Ut=lo(wt.type),Pn=Jn(wt);return d.createElement(f.Field,{key:`${re}.${wt.name}`,name:`${re}.${wt.name}`},({field:{name:qn,value:Fn,onChange:jn},meta:{error:go}})=>d.createElement(Ut,{key:`${re}.${wt.name}`,name:qn,value:Fn,values:et,onChange:jn,error:go,field:wt,title:Pn}))}))},tn=(0,p.default)(h.Checkbox)` input[type='checkbox'] { margin-right: 0; right: 0; } `,Qt=re=>{var we,et;if(!((we=re.groupBy)!=null&&we.groupings)||re.groupBy.groupings.length===0)return!1;const Et=re.groupBy.groupings.find(wt=>wt.direction==="row");return(Et==null?void 0:Et.type)===s.rd&&((et=Et==null?void 0:Et.fields)==null?void 0:et[0])===g.WK},co=()=>{var re,we,et;const Et=(0,_n.A)("visualizationTypes"),wt=(0,d.useCallback)(Mn=>Et.find(On=>On.type===Mn),[Et]),Ut=(0,d.useMemo)(()=>Et.sort((Mn,On)=>(0,vn.j)(Mn.displayName,On.displayName)).map(({displayName:Mn,type:On})=>({label:Mn,value:On})),[Et]),{values:Pn,setFieldValue:qn}=(0,f.useFormikContext)(),Fn=wt(Pn.visualization.type),jn=(0,d.useCallback)(Mn=>{var On,ko;const dt=(ko=(On=wt(Mn).config)==null?void 0:On.createConfig)!=null?ko:()=>({});qn("visualization",{type:Mn,config:dt()},!0)},[wt,qn]),go=Qt(Pn),Eo=(we=(re=Fn.capabilities)==null?void 0:re.includes("event-annotations"))!=null?we:!1,Lo=(0,d.useMemo)(()=>{var Mn;const On=(Mn=Fn.config)==null?void 0:Mn.fields;return un()(On)?On({formValues:Pn}):On!=null?On:[]},[(et=Fn.config)==null?void 0:et.fields,Pn]);return d.createElement(_e.A,{elementTitle:Cs.title},d.createElement(f.Field,{name:"visualization.type"},({field:{name:Mn,value:On},meta:{error:ko}})=>d.createElement(h.Input,{id:"visualization-type-select",label:"Type",error:ko,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},d.createElement(gn.A,{options:Ut,"aria-label":"Select visualization type",clearable:!1,name:Mn,value:On,menuPortalTarget:document.body,onChange:Ke=>{Ke!==On&&jn(Ke)},size:"small"}))),go&&Eo&&d.createElement(f.Field,{name:"visualization.eventAnnotation"},({field:{name:Mn,value:On=!1},meta:{error:ko}})=>d.createElement(h.Input,{id:`${Mn}-input`,label:"Show Event annotations",error:ko,labelClassName:"col-sm-11",wrapperClassName:"col-sm-1"},d.createElement(tn,{id:`${Mn}-input`,name:Mn,onChange:()=>qn(Mn,!On),checked:On,className:"pull-right"}))),d.createElement(Gt,{name:"visualization.config",fields:Lo}))},$n=re=>{const we=gt.d.exports("visualizationTypes").find(({type:et})=>et===re);if(!we)throw new Error(`Invalid visualization type: ${re}`);return we},To=()=>{},xo=(re,we)=>{const{config:{toConfig:et=To}={}}=$n(re);return et(we)},Ps=()=>({}),bo=(re,we)=>{const{config:{fromConfig:et=Ps}={}}=$n(re);return et(we)},Ro=re=>{var we;return{visualization:{type:re.visualization,config:bo(re.visualization,re.visualizationConfig),eventAnnotation:(we=re.eventAnnotation)!=null?we:!1}}},No=(re,we)=>we.visualization(re.visualization.type).visualizationConfig(xo(re.visualization.type,re.visualization.config)).eventAnnotation(re.visualization.eventAnnotation),fs=re=>Object.values(re).filter(we=>we!==void 0).length>0,Ds=(re,we)=>{const{fields:et=[]}=re.config;return et.filter(Et=>"required"in Et&&Et.required).filter(Et=>!Et.isShown||Et.isShown(we)).filter(({name:Et})=>we[Et]===void 0||we[Et]==="").map(({name:Et,title:wt})=>({[Et]:`${wt} is required.`})).reduce((Et,wt)=>({...Et,...wt}),{})},Cs={title:"Visualization",key:"visualization",order:4,allowCreate:re=>r()(re.visualization),component:co,fromConfig:Ro,toConfig:No,validate:re=>{var we,et;const{visualization:{type:Et,config:wt}}=re;if(!Et)return{"visualization.type":"Type is required."};const Ut=$n(Et),Pn=(et=(we=Ut.validate)==null?void 0:we.call(Ut,re))!=null?et:{},qn=Ut.config?Ds(Ut,wt):{};return fs(qn)||fs(Pn)?{visualization:{...Pn,config:qn}}:{}},isEmpty:()=>!1},Ts=[An,io,Ze,Cs]},QBkrNAIi:(x,y,e)=>{"use strict";e.d(y,{_:()=>Ee,r:()=>d});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("fCul1Qwh"),o=e("UiXZqrDE"),n=e("6KiaUlHf"),c=e("0IW4P5Zs");const d=({formKey:oe,disableSubmission:ae})=>{const{setDisabled:ye}=(0,t.useContext)(c.A);return(0,t.useEffect)(()=>ye(oe,ae),[oe,ae,ye]),null},f=(0,r.default)(o.Form)` display: flex; width: 100%; `,p=(oe,ae)=>{const{bindApplyElementConfigurationChanges:ye}=(0,t.useContext)(n.A);(0,t.useEffect)(()=>{ye(()=>{if(oe.current){const{dirty:Oe,values:ve,isValid:_e}=oe.current;if(Oe&&_e)return he(ve,ae)}})},[oe,ye,ae])},l=({children:oe,onSubmit:ae,initialValues:ye,validate:Oe,config:ve})=>{const _e=(0,t.useRef)(null);return p(_e,ve),t.createElement(o.Formik,{initialValues:ye,validate:Oe,enableReinitialize:!0,innerRef:_e,validateOnChange:!0,validateOnMount:!0,onSubmit:ae},(...He)=>t.createElement(f,{className:"form form-horizontal"},t.createElement(d,{formKey:"widget-config",disableSubmission:!He[0].isValid||He[0].isValidating||He[0].isSubmitting}),typeof oe=="function"?oe(...He):oe))};var m=e("i/Bor0y0"),h=e("ocYLQ/BD"),A=e("Ofda/4py");const C=r.default.div(({theme:oe})=>(0,r.css)` border-radius: 6px; margin-bottom: 6px; &:last-child { margin-bottom: 0; } div[class^='col-'] { padding-right: 0; padding-left: 0; } input { font-size: ${oe.fonts.size.body}; } .form-group { margin: 0 0 3px; } .control-label { padding-left: 0; padding-right: 5px; padding-top: 5px; font-weight: normal; text-align: left; hyphens: auto; } .help-block { margin: 0; hyphens: auto; } .checkbox { min-height: auto; } `),_=r.default.div(({theme:oe,$isEmpty:ae})=>(0,r.css)` display: flex; justify-content: space-between; align-items: center; margin-bottom: 1px; min-height: 26px; font-weight: bold; background-color: ${oe.colors.global.contentBackground}; position: sticky; top: 0; z-index: 1; &::before { content: ' '; top: 50%; width: 100%; border-bottom: 1px solid ${ae?oe.colors.gray[70]:oe.utils.contrastingColor(oe.colors.global.contentBackground,"AA")}; position: absolute; } `),P=r.default.div(({theme:oe,$isEmpty:ae})=>(0,r.css)` background-color: ${oe.colors.global.contentBackground}; color: ${ae?oe.colors.gray[70]:oe.colors.global.textDefault}; z-index: 1; padding-right: 8px; `),I=r.default.div(({theme:oe})=>(0,r.css)` background-color: ${oe.colors.global.contentBackground}; z-index: 1; padding-left: 5px; `),M=(0,r.default)(A.A)(({theme:oe})=>` color: ${oe.colors.global.textDefault}; `),O=({allowCreate:oe,children:ae,elementTitle:ye,isEmpty:Oe,onCreate:ve,sectionTitle:_e})=>{const He=_e!=null?_e:ye;return t.createElement(C,{"data-testid":`${He}-section`},t.createElement(_,{$isEmpty:Oe},t.createElement(P,{$isEmpty:Oe},He),t.createElement(I,null,oe&&t.createElement(M,{title:`Add a ${ye}`,name:"add",onClick:ve}))),t.createElement("div",null,ae))};O.defaultProps={sectionTitle:void 0,isEmpty:!1};const U=O;var W=e("W7wTd14e");const K=r.default.div` position: relative; height: 100%; `,j=(oe,ae)=>Object.keys(ae).map(ye=>[ye,oe[ae[ye].key]]).sort(([ye],[Oe])=>ae[ye].order-ae[Oe].order),k=({aggregationElementsByKey:oe,config:ae,onConfigChange:ye,onCreate:Oe,onSubmit:ve,onCancel:_e})=>{const{values:He,setValues:je}=(0,o.useFormikContext)();return t.createElement(K,null,t.createElement(m.A,{actions:t.createElement(t.Fragment,null,t.createElement(W.A,null),t.createElement(h.A,{onCancel:_e,onSubmit:ve}))},t.createElement("div",null,j(He,oe).map(([Qe,zt])=>{const xe=oe[Qe];if(!xe)throw new Error(`Aggregation element with key ${Qe} is missing but configured for this widget.`);const{component:Ue,isEmpty:ke}=xe,Se=ke(zt);return t.createElement(U,{allowCreate:xe.allowCreate(He),isEmpty:Se,onCreate:()=>Oe(xe.key,He,je),elementTitle:xe.title,sectionTitle:xe.sectionTitle,key:xe.key},t.createElement(Ue,{config:ae,onConfigChange:ye}))}))))};var Q=e("DAqOYyf8"),ne=e("TNM0kxJ5");const z=r.default.div` height: 100%; flex: 3; `,V=({children:oe})=>{const{setFieldValue:ae,values:ye}=(0,o.useFormikContext)(),Oe=(0,t.useCallback)(ve=>{ae("visualization",{...ye.visualization,config:{...ye.visualization.config,...ve}})},[ye.visualization,ae]);return t.createElement(z,null,t.createElement(ne.A.Provider,{value:Oe},oe))},me=Object.fromEntries(Q.A.map(oe=>[oe.key,oe])),Pe=oe=>Q.A.reduce((ae,ye)=>({...ae,...ye.fromConfig?ye.fromConfig(oe):{}}),{}),Ve=r.default.div` height: 100%; min-width: 315px; max-width: 500px; flex: 1.2; padding-right: 15px; `,at=r.default.div` height: 100%; margin-bottom: 10px; &:last-child { margin-bottom: 0; } `,ze=(oe,ae,ye)=>{var Oe;const ve=me[oe];ve!=null&&ve.onCreate?ye(ve.onCreate(ae)):ye({...ae,[oe]:[...(Oe=ae[oe])!=null?Oe:[],{}]})},he=(oe,ae=s.A.builder().build())=>{const ye=Object.fromEntries(Q.A.map(({key:ve,toConfig:_e})=>[ve,_e]));return Object.keys(oe).map(ve=>{var _e;const He=(_e=ye[ve])!=null?_e:(je,Qe)=>Qe;if(!He)throw new Error(`Aggregation element with key ${ve} is missing toConfig.`);return He}).reduce((ve,_e)=>_e(oe,ve),ae.toBuilder()).build()},Ie=(oe,ae,ye)=>{const Oe=he(oe,ye);return ae(Oe)},Re=oe=>Q.A.map(Oe=>{var ve;return(ve=Oe.validate)!=null?ve:()=>({})}).map(Oe=>Oe(oe)).reduce((Oe,ve)=>({...Oe,...ve}),{}),Ee=({onChange:oe,config:ae,children:ye,onSubmit:Oe,onCancel:ve})=>{const _e=Pe(ae);return t.createElement(l,{onSubmit:He=>Ie(He,oe,ae),initialValues:_e,config:ae,validate:Re},t.createElement(t.Fragment,null,t.createElement(Ve,null,t.createElement(at,{"data-testid":"configure-elements-section"},t.createElement(k,{aggregationElementsByKey:me,config:ae,onCreate:ze,onSubmit:Oe,onCancel:ve,onConfigChange:oe}))),t.createElement(V,null,ye)))}},uzwJl55m:(x,y,e)=>{"use strict";e.d(y,{A:()=>at,O:()=>Pe});var t=e("7J1sc9Ol"),r=e("WyXFCd64"),s=e("Z7aTuO5B"),o=e("UiXZqrDE"),n=e("J6y4/h8P"),c=e("VPaD/Np4"),g=e("4E3oowBb"),d=e("rIl5IEuP"),f=e("hhdCSTZj"),p=e("IOI9nV80"),E=e("jlRcBdjT"),l=e("DUKaTDO2"),m=e("MdYBRjRJ"),h=e("eFxcQyPT");const A=m.H3("/views/functions"),C=()=>(0,h.Ay)("GET",A),P=()=>(0,l.useQuery)(["aggregationFunctions"],C);var I=e("nxMFMmDQ"),M=e("AKYezHev");const O=n.default.div``,U=({label:ze},{label:he})=>(0,g.j)(ze,he),W=(ze,he)=>{var Ie,Re;const ce=(Re=(Ie=ze==null?void 0:ze.type)==null?void 0:Ie.properties)!=null?Re:c.Set();return he.map(Ee=>ce.contains(Ee)).find(Ee=>Ee===!1)===void 0},j=({index:ze})=>{const he=(0,s.useRef)(null),{data:Ie,isLoading:Re}=P(),ce=(0,s.useMemo)(()=>Re?[]:Object.values(Ie).map(({type:Se,description:Je})=>({label:Je,value:Se})).sort(U),[Ie,Re]),{values:{metrics:Ee},errors:{metrics:oe},setFieldValue:ae}=(0,o.useFormikContext)(),ye=Ee[ze],Oe=ye.function,ve=Oe!=="percentage",_e=!["count","percentage"].includes(Oe),He=Oe==="percentile",je=Oe==="percentage",Qe=je&&ye.strategy==="SUM"||!["card","count","latest","percentage"].includes(Oe),zt=(0,s.useCallback)(Se=>Qe?W(Se,[E.OA.Numeric]):!0,[Qe]),[xe,Ue]=(0,s.useState)(!1),ke=(0,s.useCallback)(Se=>{ae(`metrics.${ze}.function`,Se),Ue(!0)},[ae,ze]);return(0,s.useEffect)(()=>{(0,o.getIn)(oe==null?void 0:oe[ze],"field")&&xe&&he.current.focus()},[xe,oe,ze,he]),s.createElement(O,{"data-testid":`metric-${ze}`},s.createElement(o.Field,{name:`metrics.${ze}.function`},({field:{name:Se,value:Je},meta:{error:nt}})=>s.createElement(d.Input,{id:"metric-function-select",label:"Function",error:nt,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},s.createElement(f.A,{options:ce,clearable:!1,name:Se,value:Je,"aria-label":"Select a function",size:"small",menuPortalTarget:document.body,onChange:ke}))),ve&&s.createElement(o.Field,{name:`metrics.${ze}.field`},({field:{name:Se,value:Je,onChange:nt},meta:{error:Wt}})=>s.createElement(d.Input,{id:"metric-field",label:"Field",error:Wt,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},s.createElement(M.A,{id:"metric-field-select",selectRef:he,menuPortalTarget:document.body,onChange:Le=>nt({target:{name:Se,value:Le}}),clearable:!_e,isFieldQualified:zt,name:Se,value:Je,ariaLabel:"Select a field"}))),He&&s.createElement(o.Field,{name:`metrics.${ze}.percentile`},({field:{name:Se,value:Je,onChange:nt},meta:{error:Wt}})=>s.createElement(d.Input,{id:"metric-percentile-select",label:"Percentile",error:Wt,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},s.createElement(f.A,{options:I.Iv,clearable:!1,name:Se,value:Je,"aria-label":"Select percentile",size:"small",menuPortalTarget:document.body,onChange:Le=>nt({target:{name:Se,value:Le}})}))),je&&s.createElement(s.Fragment,null,s.createElement(o.Field,{name:`metrics.${ze}.strategy`},({field:{name:Se,value:Je,onChange:nt},meta:{error:Wt}})=>s.createElement(d.Input,{id:"metric-percentage-strategy-select",label:"Strategy",error:Wt,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},s.createElement(f.A,{options:I.gC,clearable:!1,name:Se,value:Je!=null?Je:"COUNT","aria-label":"Select strategy",size:"small",menuPortalTarget:document.body,onChange:Le=>nt({target:{name:Se,value:Le}})}))),s.createElement(o.Field,{name:`metrics.${ze}.field`},({field:{name:Se,value:Je,onChange:nt},meta:{error:Wt}})=>s.createElement(d.Input,{id:"metric-field",label:"Field",error:Wt,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},s.createElement(M.A,{id:"metric-field-select",selectRef:he,onChange:Le=>nt({target:{name:Se,value:Le}}),clearable:!_e,isFieldQualified:zt,name:Se,value:Je,menuPortalTarget:document.body,ariaLabel:"Select a field"})))),s.createElement(p.jF,{id:"name",label:s.createElement(s.Fragment,null,"Name ",s.createElement(p.Bt,null)),bsSize:"small",placeholder:"Specify display name",name:`metrics.${ze}.name`,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}))};var G=e("vVgHnCl1");const Q=()=>{const{values:{metrics:ze},setValues:he,values:Ie}=(0,o.useFormikContext)(),Re=(0,s.useCallback)(ce=>()=>{he(at.onRemove(ce,Ie))},[he,Ie]);return s.createElement(o.FieldArray,{name:"metrics",validateOnChange:!1,render:()=>s.createElement(s.Fragment,null,ze.map((ce,Ee)=>s.createElement(G.A,{key:`metrics-${Ee}`,onRemove:Re(Ee),elementTitle:at.title},s.createElement(j,{index:Ee}))))})},ne=ze=>ze.filter(he=>Object.keys(he).length>0).length>0,z=ze=>{const he={};if(!ze.metrics)return he;const Ie=ze.metrics.map(Re=>{const ce={};return Re.function||(ce.function="Function is required."),Re.function!=="count"&&(Re.function!=="percentage"||Re.strategy==="SUM")&&!Re.field&&(ce.field=`Field is required for function ${Re.function}.`),Re.function==="percentile"&&!Re.percentile&&(ce.percentile="Percentile is required."),Re.name&&ze.metrics.filter(({name:oe})=>oe===Re.name).length>1&&(ce.name="Name must be unique."),ce});return ne(Ie)?{metrics:Ie}:{}},le=ze=>{switch(ze.function){case"percentage":return ze.strategy;case"percentile":return ze.percentile;default:return}},V=ze=>(ze==null?void 0:ze.trim())===""?void 0:ze,me=ze=>ze.map(he=>t.Ay.create(he.function,V(he.field),le(he)).toBuilder().config(r.A.empty().toBuilder().name(he.name).build()).build()),Pe=ze=>ze.map(he=>{var Ie,Re;const{type:ce,field:Ee,percentile:oe,strategy:ae}=(Ie=(0,t.Pd)(he.function))!=null?Ie:{},ye={function:ce,field:Ee,name:(Re=he.config)==null?void 0:Re.name};if(oe){const Oe=Number.parseFloat(oe);return{...ye,percentile:Oe}}return ae?{...ye,strategy:ae}:ye}),at={sectionTitle:"Metrics",title:"Metric",key:"metrics",order:2,allowCreate:()=>!0,fromConfig:ze=>({metrics:Pe(ze.series)}),toConfig:(ze,he)=>he.series(me(ze.metrics)),onRemove:(ze,he)=>({...he,metrics:he.metrics.filter((Ie,Re)=>ze!==Re)}),component:Q,validate:z,isEmpty:ze=>(ze!=null?ze:[]).length===0}},"5s1wXXQQ":(x,y,e)=>{"use strict";e.d(y,{A:()=>W});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("dFpwyWHg"),c=e.n(n),g=e("C2ikvoS0"),d=e.n(g),f=e("1IntWRSu"),p=e.n(f),E=e("8nGWeFnd"),l=e.n(E),m=e("TeAcaicX"),h=e.n(m),A=e("eE3+5goe"),C=e.n(A),_=e("kK/tJf6e"),P={};P.styleTagTransform=C(),P.setAttributes=l(),P.insert=p().bind(null,"head"),P.domAPI=d(),P.insertStyleElement=h();var I=c()(_.A,P);const M=_.A&&_.A.locals?_.A.locals:void 0,O=o.default.span(({theme:K})=>(0,o.css)` border: 1px solid ${K.colors.global.contentBackground}; font-size: ${K.fonts.size.large}; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; `),U=o.default.input(({theme:K})=>(0,o.css)` border: 1px solid ${K.colors.input.border}; background-color: ${K.colors.input.background}; color: ${K.colors.input.color}; border-radius: 4px; padding: 2px 3px; font-size: ${K.fonts.size.large}; &:focus { border-color: ${K.colors.input.borderFocus}; outline: none; } `);class W extends t.Component{constructor(j){super(j),this._toggleEditing=()=>{const{disabled:k}=this.props;k||this.setState(Q=>({editing:!Q.editing}))},this._onBlur=()=>{this._toggleEditing(),this._submitValue()},this._onChange=k=>{k.preventDefault(),this.setState({value:k.target.value})},this._submitValue=()=>{const{value:k}=this.state,{onChange:Q,value:ne}=this.props;k!==""?Q(k):this.setState({value:ne})},this._onSubmit=k=>{k.preventDefault(),k.stopPropagation(),this._toggleEditing(),this._submitValue()};const{value:G}=j;this.state={editing:!1,value:G}}render(){const{editing:j,value:G}=this.state;return j?t.createElement("span",null,t.createElement("form",{onSubmit:this._onSubmit,className:M.inlineForm},t.createElement(U,{autoFocus:!0,type:"text",value:G,onBlur:this._onBlur,title:"Edit title",onChange:this._onChange}))):t.createElement(O,{onDoubleClick:this._toggleEditing,title:`${G} - Double click the title to edit it.`},G)}}W.propTypes={disabled:s().bool,onChange:s().func,value:s().string.isRequired},W.defaultProps={disabled:!1,onChange:()=>{}}},d3qTYP78:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(null),o=(0,r.Gr)("contexts.AutoRefreshContext",()=>s)},"0IW4P5Zs":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext({disabled:!1,setDisabled:()=>{}}),o=(0,r.Gr)("contexts.DisableSubmissionState",()=>s)},"4zkAw1kt":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("CHWvwBKE"),s=e("nxMFMmDQ");const o={query:(0,r.P$)(""),streams:[],timerange:s.Zl},c=t.createContext(o)},"hC1XaH+L":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.FieldTypesContext",()=>s)},"5CYElDLi":(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("Z7aTuO5B");const s=t.createContext(void 0)},RTnJ3JrH:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(void 0),o=(0,r.Gr)("contexts.HighlightingRules",()=>s)},GFJVQ2dX:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(!0),o=(0,r.Gr)("views.components.contexts.InteractiveContext",()=>s)},Qv8wg03E:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("2NTfO+Rh"),s=e("EapCXqJr");const o={resultMapper:g=>g,execute:r.A,parse:s.A},c=t.createContext(o)},"DjctQb+S":(x,y,e)=>{"use strict";e.d(y,{Ay:()=>g,GI:()=>s,Ke:()=>n});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s={save:{isShown:!1},saveAs:{isShown:!0},share:{isShown:!1},actionsDropdown:{isShown:!1}},o={save:{isShown:!1},saveAs:{isShown:!1},share:{isShown:!1},actionsDropdown:{isShown:!1}},n={sidebar:{isShown:!0},viewActions:{save:{isShown:!0},saveAs:{isShown:!0},share:{isShown:!0},actionsDropdown:{isShown:!0}}},c=t.createContext(n),g=(0,r.Gr)("contexts.SearchPageLayout",()=>c)},GPuPro0F:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s={showDropdownButton:!0,showPresetsButton:!0,showAddToQuickListButton:!0,ignoreLimitDurationInTimeRangeDropdown:!1},o=t.createContext(s),n=(0,r.Gr)("views.components.contexts.TimeRangeInputSettingsContext",()=>o)},"S/tO1idZ":(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("Z7aTuO5B");const s=t.createContext(void 0)},"6KiaUlHf":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext({applyAllWidgetChanges:()=>Promise.resolve(),bindApplyElementConfigurationChanges:()=>{},bindApplySearchControlsChanges:()=>{}}),o=(0,r.Gr)("contexts.WidgetEditApplyAllChangesContext",()=>s)},"m/3sLmyX":(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s={focusedWidget:void 0,setWidgetFocusing:()=>{},setWidgetEditing:()=>{},unsetWidgetFocusing:()=>{},unsetWidgetEditing:()=>{}},o=t.createContext(s),n=(0,r.Gr)("contexts.WidgetFocus",()=>o)},B6TE4HBJ:(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("S6FuRS7B"),n=e("gTexEe+8"),c=e("yDuYCNwc"),g=e("qZ8Wpsbl");const d=({onClose:p,onSave:E,show:l,view:m,title:h,submitButtonText:A})=>{const[C,_]=(0,t.useState)(m),P=(0,g.A)(),I=O=>{const{name:U}=O.target;let W=o.yG(O.target);const K=W.trim();switch(K===""&&(W=K),U){case"title":_(j=>j.toBuilder().title(W).build());break;case"summary":_(j=>j.toBuilder().summary(W).build());break;case"description":_(j=>j.toBuilder().description(W).build());break;default:}},M=O=>{O.stopPropagation(),E(C),p()};return t.createElement(n.A,{show:l,title:h,"data-telemetry-title":"Dashboard Properties",onCancel:p,onSubmitForm:M,submitButtonText:A,bsSize:"large"},t.createElement(t.Fragment,null,t.createElement(c.A,{id:"title",type:"text",name:"title",label:"Title",help:"The title of the dashboard.",required:!0,onChange:I,value:C.title}),t.createElement(c.A,{id:"summary",type:"text",name:"summary",label:"Summary",help:"A helpful summary of the dashboard.",onChange:I,value:C.summary}),t.createElement(c.A,{id:"description",type:"textarea",name:"description",label:"Description",help:"A longer, helpful description of the dashboard and its functionality.",onChange:I,value:C.description}),P==null?void 0:P.map(({component:O,id:U})=>O&&t.createElement(O,{key:U}))))};d.propTypes={onClose:s().func.isRequired,onSave:s().func.isRequired,show:s().bool.isRequired,submitButtonText:s().string.isRequired,title:s().string.isRequired,view:s().object.isRequired};const f=d},wfOnu0E0:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("GFJVQ2dX");const o=({children:n})=>t.createElement(r.A.Consumer,null,c=>c?n:null)},"+gqrR506":(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("DUKaTDO2"),r=e("jAGDuYSC"),s=e("UmnljV2q"),o=e("eFxcQyPT"),n=e("MdYBRjRJ"),c=e("gyRmhZSW");const g={pagination:{total:0},list:[],attributes:[]},d=(0,n.H3)("/dashboards"),f=l=>{const m=(0,c.A)(d,l.page,l.pageSize,l.query,{sort:l.sort.attributeId,order:l.sort.direction});return(0,o.Ay)("GET",(0,n.H3)(m)).then(({elements:h,total:A,count:C,page:_,per_page:P,attributes:I})=>({list:h.map(M=>s.A.fromJSON(M)),pagination:{total:A,count:C,page:_,perPage:P},attributes:I}))},E=(l,{enabled:m}={enabled:!0})=>{const{data:h,refetch:A,isInitialLoading:C}=(0,t.useQuery)(["dashboards","overview",l],()=>f(l),{onError:_=>{r.A.error(`Loading dashboards failed with status: ${_}`,"Could not load dashboards")},keepPreviousData:!0,enabled:m});return{data:h!=null?h:g,refetch:A,isInitialLoading:C}}},jcqbe10s:(x,y,e)=>{"use strict";e.d(y,{Dw:()=>V,nd:()=>W,M_:()=>Ft,NJ:()=>Co,Ay:()=>Fo});var t=e("Z7aTuO5B"),r=e("VPaD/Np4"),s=e.n(r),o=e("Jy5RbH6g"),n=e.n(o),c=e("+KM7MH1U"),g=e.n(c),d=e("c20giJr8"),f=e.n(d),p=e("UiXZqrDE"),E=e("J6y4/h8P"),l=e("OP/RNgvV"),m=e.n(l);const A=(rt,Mt,Rt)=>{if(!Rt)return[];const fn=[];return Rt.forEach(Dn=>{const{values:kn}=Dn,ro={};Dn.key.forEach((Gn,vo)=>{ro[rt[vo]]=Gn}),kn.forEach(({key:Gn,value:vo})=>{const yo=n()(Gn.map((lo,Jn)=>Jn(0,E.css)` background-color: ${rt.colors.global.contentBackground}; height: ${O.KL}px; color: ${rt.colors.global.textDefault}; position: sticky; top: 0; z-index: 1; `);var K=e("/yh+QgO6"),j=e.n(K),G=e("UPOvISKg"),k=e("gSdhV+tG"),Q=e("7J1sc9Ol"),ne=e("T6QWz2T7"),z=e("N3RHy9gr");const V=E.default.td(({$isNumeric:rt,theme:Mt})=>(0,E.css)` ${rt?`font-family: ${Mt.fonts.family.monospace};`:""} ${rt?"text-align: right":""} `);var me=e("BQipOvpT"),Pe=e("y5LMk7Rh");const Ve=(rt,Mt,Rt,fn)=>({field:rt,value:Mt,path:Rt,source:fn}),at=rt=>rt.flatMap(Mt=>Object.entries(Mt)).map(([Mt,Rt])=>`${Mt}:${Rt}`).join("-"),ze=({field:rt,value:Mt,type:Rt,valuePath:fn,source:Dn})=>{const kn=(0,t.useMemo)(()=>({valuePath:fn}),[fn]);return t.createElement(V,{$isNumeric:Rt.isNumeric(),"data-testid":`value-cell-${at(fn)}-${rt}`},t.createElement(k.V.Provider,{value:kn},t.createElement(me.A,{field:Dn!=null?Dn:rt,value:Mt},Mt!=null?t.createElement(G.A,{field:Dn!=null?Dn:rt,type:Rt,value:Mt,render:Pe.A}):null)))},he=(rt,Mt)=>{const Rt=(0,Q.Pd)(rt);return Rt&&Rt.field?[...Mt,{_exists_:Rt.field}]:Mt},Ie=(rt,Mt=[])=>{const Rt=Mt.find(fn=>fn.effectiveName===rt);return Rt?Rt.function:rt},ce=({columnPivots:rt,fields:Mt,series:Rt,columnPivotValues:fn,valuePath:Dn,item:kn,types:ro})=>{const Gn="message-group",vo=(0,z.A)(),yo=Mt.toArray().map(({field:Yn,source:Gt},tn)=>Ve(Yn,kn[Yn],he(Yn,Dn).slice(0,tn+1),Gt)),lo=fn.flatMap(Yn=>{const Gt=Yn.flatMap((Qt,Bn)=>[rt[Bn],Qt]),tn=[...Dn];for(let Qt=0;Qt{const co=[].concat(Gt,[Qt]),$n=j()(kn,co);return Ve(Qt,$n,he(Bn,tn),Bn)})}),Jn=n()([yo,lo]);return t.createElement("tr",{className:`fields-row ${Gn}`},Jn.map(({field:Yn,value:Gt,path:tn,source:Qt},Bn)=>{const co=`${vo}-${Yn}=${Gt}-${Bn}`;return t.createElement(ze,{key:co,field:Yn,value:Gt,type:(0,ne.A)(Ie(Yn,Rt),ro),valuePath:tn.slice(),source:Qt})}))};var Ee=e("ii0bleBb"),oe=e.n(Ee),ae=e("rIl5IEuP");const ye=E.default.div` width: 100%; `,Oe=(0,E.default)(ae.Table)(({theme:rt,$stickyHeader:Mt})=>(0,E.css)` position: relative; font-size: ${rt.fonts.size.small}; margin: 0; border-collapse: collapse; width: 100%; word-break: break-all; thead { ${Mt?`position: sticky; top: 0; z-index: 2`:""} } td, th { position: relative; } > tbody td { background-color: ${rt.colors.global.contentBackground}; color: ${rt.utils.contrastingColor(rt.colors.global.contentBackground)}; } &.table-striped > tbody > tr:nth-of-type(odd) > td { background-color: ${rt.colors.global.contentBackground}; } &.table-striped > tbody > tr:nth-of-type(even) > td { background-color: ${rt.colors.table.row.background}; } tr { border: 0 !important; } tr.message-group { border-top: 0; } tbody.message-group-toggled { border-left: 7px solid ${rt.colors.variant.light.info}; } tbody.message-highlight { border-left: 7px solid ${rt.colors.variant.light.success}; } tr.fields-row { cursor: pointer; td { min-width: 50px; padding-top: 10px; } } tr.message-row td { border-top: 0; padding-top: 0; padding-bottom: 5px; font-family: ${rt.fonts.family.monospace}; color: ${rt.colors.variant.dark.info}; } tr.message-row { margin-bottom: 5px; cursor: pointer; } tr.message-detail-row { display: none; } tr.message-detail-row td { padding-top: 5px; border-top: 0; } tr.message-detail-row .row { margin-right: 0; } tr.message-detail-row div[class*='col-'] { padding-right: 0; } th i.sort-order-desc { position: relative; top: -1px; } th i.sort-order-item { margin-right: 2px; color: ${rt.colors.gray[10]}; visibility: hidden; } th i.sort-order-active, th:hover i.sort-order-item { color: ${rt.colors.global.textAlt}; } `),ve=({children:rt,condensed:Mt,striped:Rt,bordered:fn,stickyHeader:Dn})=>t.createElement(ye,null,t.createElement(Oe,{condensed:Mt,striped:Rt,bordered:fn,$stickyHeader:Dn},rt));ve.propTypes={children:oe().node.isRequired,condensed:oe().bool,striped:oe().bool,bordered:oe().bool,stickyHeader:oe().bool},ve.defaultProps={condensed:!0,striped:!1,bordered:!1,stickyHeader:!1};const _e=ve,He=(rt,Mt)=>{const Rt={};return rt.map(fn=>{const Dn={...fn},kn=Object.entries(Dn);return kn.forEach(([ro,Gn],vo)=>{Mt.includes(ro)&&(Rt[ro]===Gn?delete Dn[ro]:(kn.slice(vo+1).forEach(yo=>delete Rt[yo[0]]),Rt[ro]=Gn))}),Dn})};var je=e("w7+AQV2V"),Qe=e.n(je),zt=e("SnOQy/BL"),xe=e("Wk8izdHL"),Ue=e("IOI9nV80"),ke=e("GFJVQ2dX"),Se=e("7VrSCphN"),Je=e("Xt0X5Kl4");const nt=(rt,Mt)=>Mt?`Sort ${rt} ${Mt.direction}`:`Remove ${rt} sort`,Wt=(rt,Mt,Rt,fn,Dn,kn,ro)=>{let Gn;ro?Gn=Mt.set(Rt,new xe.A(kn,Rt,rt)):Gn=Mt.delete(Rt),Dn(!0),fn(Gn.toList().toArray()).then(()=>{Dn(!1)})},Le=(rt,Mt)=>rt.get(Mt),Fe={tooltip:rt=>nt(rt,Se.A.Descending),handleSortChange:rt=>rt(Se.A.Descending,!0)},qe={tooltip:rt=>nt(rt,null),handleSortChange:rt=>rt(Se.A.Descending,!1)},ut={tooltip:rt=>nt(rt,Se.A.Ascending),handleSortChange:rt=>rt(Se.A.Ascending,!0)},ft=rt=>{switch(rt){case Se.A.Ascending.direction:return Fe;case Se.A.Descending.direction:return qe;default:return ut}},Ot=({fieldName:rt,type:Mt,sortConfigMap:Rt,onSortChange:fn,setLoadingState:Dn})=>{var kn,ro;const Gn=(Gt,tn)=>Wt(Gt,Rt,rt,fn,Dn,Mt,tn),vo=(ro=(kn=Le(Rt,rt))==null?void 0:kn.direction)==null?void 0:ro.direction,{tooltip:yo,handleSortChange:lo}=ft(vo),Jn=(0,t.useMemo)(()=>Rt.size<2?void 0:Rt.keySeq().findIndex(tn=>tn===rt)+1||void 0,[rt,Rt]),Yn=yo(rt);return t.createElement(Ue.yc,{onChange:()=>lo(Gn),activeDirection:vo,title:Yn,order:Jn})};Ot.propTypes={sortConfigMap:Je.A.instanceOf(r.OrderedMap).isRequired,fieldName:oe().string.isRequired,onSortChange:oe().func.isRequired,setLoadingState:oe().func.isRequired};const Lt=Ot,Ft=E.default.th(({$isNumeric:rt,$borderedHeader:Mt,theme:Rt})=>(0,E.css)` && { background-color: ${Rt.colors.table.head.background}; min-width: 50px; border: ${Mt?`1px solid ${Rt.colors.table.row.border}`:"0"}; padding: 0 5px; vertical-align: middle; white-space: nowrap; font-weight: normal; font-size: ${Rt.fonts.size.small}; ${rt?"text-align: right":""} } `),rn=(0,E.default)(Ft)` text-align: center; `,$t=E.default.button(({theme:rt})=>(0,E.css)` display: inline-flex; border: 0; background: transparent; padding: 5px; cursor: pointer; position: relative; color: ${rt.colors.gray[70]}; vertical-align: middle; &.active { color: ${rt.colors.gray[20]}; } `),be=({activeQuery:rt,borderedHeader:Mt,fields:Rt,field:fn,prefix:Dn="",span:kn=1,title:ro=fn,onSortChange:Gn,sortConfigMap:vo,sortable:yo,sortType:lo,onSetColumnsWidth:Jn,isPinned:Yn,showPinIcon:Gt=!1,togglePin:tn,setLoadingState:Qt})=>{var Bn;const co=(0,ne.A)(fn,Rt),$n=(0,t.useRef)(null);(0,t.useLayoutEffect)(()=>{var xo;Jn&&((xo=$n==null?void 0:$n.current)!=null&&xo.offsetWidth)&&Jn({field:`${Dn}${fn}`,offsetWidth:$n.current.offsetWidth})},[Jn,fn,Dn,(Bn=$n==null?void 0:$n.current)==null?void 0:Bn.offsetWidth]);const To=(0,t.useCallback)(()=>{tn(`${Dn}${fn}`)},[tn,Dn,fn]);return t.createElement(Ft,{ref:$n,key:`${Dn}${fn}`,colSpan:kn,$isNumeric:co.isNumeric(),$borderedHeader:Mt},t.createElement(zt.A,{name:fn,queryId:rt,type:co},ro),Gt&&t.createElement($t,{"data-testid":`pin-${Dn}${fn}`,type:"button",onClick:To,className:Yn?"active":""},t.createElement(Ue.In,{name:"push_pin"})),yo&&lo&&t.createElement(Lt,{fieldName:fn,onSortChange:Gn,setLoadingState:Qt,sortConfigMap:vo,type:lo}))};be.defaultProps={prefix:void 0,span:void 0,title:void 0,sortType:void 0,onSetColumnsWidth:void 0,isPinned:void 0,showPinIcon:void 0};const yn=({field:rt,value:Mt,span:Rt=1,prefix:fn="",type:Dn,borderedHeader:kn})=>t.createElement(rn,{key:`${fn}${rt}-${Mt}`,colSpan:Rt,$borderedHeader:kn},t.createElement(G.A,{field:rt,value:Mt,type:Dn}));yn.defaultProps={span:1,prefix:""};const Kt=({span:rt})=>t.createElement("th",{"aria-label":"spacer",colSpan:rt}),An=({fields:rt,pivots:Mt,values:Rt,series:fn,offset:Dn=1,borderedHeader:kn})=>{const ro=Mt.map((Gn,vo)=>{const lo=Rt.map(Yn=>({path:Yn.slice(0,vo).join("-"),key:Yn[vo]||"",count:1})).reduce((Yn,Gt)=>{const tn=j()(Qe()(Yn),"key"),Qt=j()(Qe()(Yn),"path");if(tn===Gt.key&&g()(Qt,Gt.path)){const Bn=Qe()(Yn),co=Yn.slice(0,-1),$n={...Bn,count:Bn.count+1};return[].concat(co,[$n])}return[].concat(Yn,[Gt])},[]),Jn=(0,ne.A)(Gn,rt);return t.createElement("tr",{key:`header-table-row-${Gn}`},Dn>0&&t.createElement(Kt,{span:Dn}),lo.map(Yn=>t.createElement(yn,{key:`header-field-value-${Yn.path}-${Yn.key}`,borderedHeader:kn,field:Gn,value:Yn.key,span:Yn.count*fn.length,prefix:Yn.path,type:Jn})))});return t.createElement(t.Fragment,null,ro)};An.defaultProps={offset:1};const qt=({borderedHeader:rt,columnPivots:Mt,fields:Rt,rowPivots:fn,series:Dn,rollup:kn,actualColumnPivotFields:ro,onSortChange:Gn,sortConfigMap:vo,onSetColumnsWidth:yo,pinnedColumns:lo,togglePin:Jn,setLoadingState:Yn})=>{const Gt=(0,z.A)(),tn=fn.flatMap(bo=>bo.fields),Qt=Mt.flatMap(bo=>bo.fields),Bn=(0,t.useContext)(ke.A),co=({field:bo,prefix:Ro="",span:No=1,title:fs=bo,sortable:Ds=!1,sortType:Os=void 0,showPinIcon:hs=!1})=>t.createElement(be,{activeQuery:Gt,borderedHeader:rt,key:`${Ro}${bo}`,fields:Rt,field:bo,prefix:Ro,span:No,title:fs,onSortChange:Gn,sortConfigMap:vo,sortable:Ds,sortType:Os,onSetColumnsWidth:yo,isPinned:lo.has(`${Ro}${bo}`),showPinIcon:hs,togglePin:Jn,setLoadingState:Yn}),$n=tn.map(bo=>co({field:bo,sortable:Bn,sortType:xe.A.PIVOT_TYPE,showPinIcon:Bn})),To=Dn.map(bo=>co({field:bo.function,prefix:"",span:1,title:bo.effectiveName,sortable:Bn,sortType:xe.A.SERIES_TYPE,showPinIcon:!1})),xo=n()(ro.map(bo=>Dn.map(Ro=>co({field:Ro.function,prefix:bo.join("-"),span:1,title:Ro.effectiveName,sortable:!1,showPinIcon:!1})))),Ps=kn?tn.length+Dn.length:tn.length;return t.createElement(t.Fragment,null,t.createElement(An,{borderedHeader:rt,fields:Rt,pivots:Qt,values:ro,series:Dn,offset:Ps}),t.createElement("tr",{className:"pivot-header-row"},$n,kn&&To,xo))};qt.defaultProps={pinnedColumns:s().Set()};const io=qt;var Be=e("dFpwyWHg"),bn=e.n(Be),gn=e("C2ikvoS0"),wn=e.n(gn),Zn=e("1IntWRSu"),Vn=e.n(Zn),po=e("8nGWeFnd"),De=e.n(po),ln=e("TeAcaicX"),bt=e.n(ln),It=e("eE3+5goe"),En=e.n(It),Xt=e("4Dfti3jc"),Ye={};Ye.styleTagTransform=En(),Ye.setAttributes=De(),Ye.insert=Vn().bind(null,"head"),Ye.domAPI=wn(),Ye.insertStyleElement=bt();var At=bn()(Xt.A,Ye);const Ct=Xt.A&&Xt.A.locals?Xt.A.locals:void 0;var Bt=e("pLyxMSSz"),Ze=e("sG4r5TYi");const gt=(rt,Mt)=>Mt.map(({index:Rt,leftMargin:fn})=>` ${rt}:nth-child(${Rt+1}) { position: sticky!important; left: ${fn}px; z-index: 1; } `).concat(" ; "),cn=(0,E.default)(W)(({$stickyLeftMarginsByColumnIndex:rt,theme:Mt})=>(0,E.css)` background-color: ${Mt.colors.global.contentBackground}; & tr.pivot-header-row { & ${gt("th",rt)} } `),un=E.default.tbody(({$stickyLeftMarginsByColumnIndex:rt})=>(0,E.css)` & tr { & ${gt("td",rt)} } `),_n=(rt,Mt)=>{if(rt===void 0)return Mt===void 0?0:-1;if(rt.length>Mt.length)return 1;if(rt.length(0,C.j)(fn,Mt[Dn])!==0);return Rt===-1?0:(0,C.j)(rt[Rt],Mt[Rt])},vn=rt=>{const Mt=f()(n()(rt.filter(({source:Rt})=>Rt==="leaf"||Rt==="non-leaf").map(({values:Rt})=>Rt)).filter(({rollup:Rt})=>!Rt).map(({key:Rt})=>Rt.slice(0,-1)),g());return r.List(Mt).sort(_n).toArray()},Ln=({bordered:rt,borderedHeader:Mt,condensed:Rt,config:fn,data:Dn,editing:kn,fields:ro,setLoadingState:Gn,stickyHeader:vo,striped:yo})=>{var lo,Jn,Yn;const Gt=(0,t.useContext)(p.FormikContext),tn=(0,t.useContext)(Bt.A),Qt=(0,t.useContext)(_.A);(0,t.useEffect)(tn,[tn]);const[Bn,co]=(0,t.useState)({}),$n=(0,I.A)(),To=(0,t.useCallback)(({field:Ut,offsetWidth:Pn})=>{co(qn=>{const Fn={...qn};return Fn[Ut]=Pn,Fn})},[co]),xo=(0,t.useCallback)(Ut=>{const Pn=Gt==null?void 0:Gt.dirty,qn=()=>$n((0,M.Ox)(Qt.id,fn.toBuilder().sort(Ut).build()));return!kn||kn&&!Pn||window.confirm("You have unsaved changes in configuration form. This action will rollback them")?qn():Promise.reject()},[Gt==null?void 0:Gt.dirty,kn,$n,Qt==null?void 0:Qt.id,fn]),Ps=(0,t.useCallback)(Ut=>{const Pn=Gt==null?void 0:Gt.dirty,qn=()=>{var Fn,jn;const go=(Fn=Qt.config.visualizationConfig)!=null?Fn:P.A.create([]).toBuilder().build(),Eo=(jn=go==null?void 0:go.pinnedColumns)!=null&&jn.has(Ut)?go.pinnedColumns.delete(Ut):go.pinnedColumns.add(Ut);return $n((0,M.Ox)(Qt.id,Qt.config.toBuilder().visualizationConfig(go.toBuilder().pinnedColumns(Eo.toJS()).build()).build()))};return!kn||kn&&!Pn||window.confirm("You have unsaved changes in configuration form. This action will rollback them")?qn():Promise.reject()},[Gt==null?void 0:Gt.dirty,kn,Qt==null?void 0:Qt.config,Qt==null?void 0:Qt.id,$n]),{columnPivots:bo,rowPivots:Ro,series:No,rollupForBackendQuery:fs}=fn,Ds=(lo=(0,Ze.rg)(Dn))!=null?lo:[],Os=Ro.flatMap(Ut=>Ut.fields),hs=bo.flatMap(Ut=>Ut.fields),Cs=fs?No:[],$s=r.OrderedSet(Os.map(Ut=>({field:Ut,source:Ut}))).merge(Cs.map(Ut=>({field:Ut.effectiveName,source:Ut.function}))),Ts=A(Os.slice(),hs.slice(),Ds.filter(Ut=>Ut.source==="leaf")),re=vn(Ds),we=(0,t.useMemo)(()=>{var Ut,Pn;return((Pn=(Ut=Qt==null?void 0:Qt.config)==null?void 0:Ut.visualizationConfig)==null?void 0:Pn.pinnedColumns)||r.Set()},[(Yn=(Jn=Qt==null?void 0:Qt.config)==null?void 0:Jn.visualizationConfig)==null?void 0:Yn.pinnedColumns]),et=(0,t.useMemo)(()=>{let Ut=0;const Pn=[];return Ro.flatMap(Fn=>{var jn;return(jn=Fn.fields)!=null?jn:[]}).forEach((Fn,jn)=>{if(we.has(Fn)){const go=Fn;Pn.push({index:jn,column:go,leftMargin:Ut}),Ut+=Bn[Fn]}}),No.forEach((Fn,jn)=>{if(we.has(Fn.function)){const go=Fn.function;Pn.push({index:jn+Ro.length,column:go,leftMargin:Ut}),Ut+=Bn[Fn.function]}}),Pn},[Bn,Ro,we,No]),Et=He(Ts,Os).map((Ut,Pn)=>{const qn=Os.map(jn=>({[jn]:Ts[Pn][jn]})),Fn=`datatableentry-${Pn}`;return t.createElement(ce,{key:Fn,fields:$s,item:Ut,valuePath:qn,columnPivots:hs,columnPivotValues:re,types:ro,series:No})}),wt=(0,t.useMemo)(()=>r.OrderedMap(fn.sort.map(Ut=>[Ut.field,Ut])),[fn]);return t.createElement("div",{className:Ct.container},t.createElement("div",{className:Ct.scrollContainer},t.createElement(_e,{striped:yo,bordered:rt,stickyHeader:vo,condensed:Rt},t.createElement(cn,{$stickyLeftMarginsByColumnIndex:et},t.createElement(io,{actualColumnPivotFields:re,borderedHeader:Mt,columnPivots:bo,fields:ro,rollup:fs,rowPivots:Ro,series:No,onSortChange:xo,sortConfigMap:wt,onSetColumnsWidth:To,setLoadingState:Gn,pinnedColumns:we,togglePin:Ps})),t.createElement(un,{$stickyLeftMarginsByColumnIndex:et},Et))))};Ln.defaultProps={condensed:!0,striped:!0,bordered:!1,stickyHeader:!0,borderedHeader:!0};const no=(0,Ze.$j)(Ln,"table"),Co={type:no.type,displayName:"Data Table",component:no,config:{createConfig:()=>({pinnedColumns:[]}),fromConfig:rt=>{var Mt;return{pinnedColumns:(Mt=rt==null?void 0:rt.pinnedColumns.toJS())!=null?Mt:[]}},toConfig:rt=>P.A.create(rt.pinnedColumns),fields:[{name:"pinnedColumns",title:"Pinned Columns",type:"multi-select",options:({formValues:rt})=>{var Mt,Rt;return(Rt=(Mt=rt==null?void 0:rt.groupBy)==null?void 0:Mt.groupings.filter(fn=>(fn==null?void 0:fn.direction)==="row"&&(fn==null?void 0:fn.fields)).flatMap(fn=>fn.fields))!=null?Rt:[]},required:!1}]}},Fo=no},qhwXAFlw:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("13uboeDm"),r=e.n(t),s=e("mTnbNx1k");const o=({type:g})=>`Untitled ${g.replace("_"," ").split(" ").map(r()).join(" ")}`,c=g=>((0,s._Q)(g.type).titleGenerator||o)(g)},BQipOvpT:(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("RTnJ3JrH"),n=e("J6y4/h8P");const c=n.default.span(({theme:l,$color:m})=>(0,n.css)` background-color: ${m}; color: ${l.utils.contrastingColor(m)}; width: fit-content; `),d=({children:l,color:m})=>t.createElement(c,{$color:m},l),f=({fieldName:l,fieldValue:m,highlightingRules:h=[]})=>h.filter(A=>A.field===l).find(A=>A.conditionFunc(m,A.value)),p=({children:l,field:m,value:h})=>{const A=(0,t.useContext)(o.A),C=(0,t.useMemo)(()=>f({fieldName:m,fieldValue:h,highlightingRules:A}),[m,h,A]);return C?t.createElement(d,{color:C.color.colorFor(h)},l):l};p.propTypes={children:s().element,field:s().string.isRequired,value:s().any},p.defaultProps={children:void 0,value:void 0};const E=p},fh5GG281:(x,y,e)=>{"use strict";e.d(y,{A:()=>Wt});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("VPaD/Np4"),n=e.n(o),c=e("GaFHk8Qk"),g=e.n(c),d=e("J6y4/h8P"),f=e("gSdhV+tG"),p=e("ty2gyrHp"),E=e("rIl5IEuP"),l=e("Wh5iba66"),m=e("hOf/Kwna"),h=e("Y2DdPzXi"),A=e("IOI9nV80"),C=e("d4kzUuQm"),_=e("Xt0X5Kl4"),P=e("8fnsnG21"),I=e("PYFLluwn"),M=e("Vg8s2y9S");const O=d.default.span` word-break: break-word; `,U=({nodeId:Le})=>{const Fe=(0,P.P)(M.j,qe=>{var ut;return(ut=qe==null?void 0:qe.nodes)==null?void 0:ut[Le]});if(Fe){const qe=C.Ay.node(Le);return s.createElement(p.N,{to:qe},s.createElement(A.In,{name:"lan"}),"\xA0",s.createElement(O,null,Fe.short_node_id),"\xA0/\xA0",s.createElement(O,null,Fe.hostname))}return s.createElement(O,null,"stopped node")};U.propTypes={nodeId:r().string.isRequired};const W=U;var K=e("0hhBr0/b");const j=(Le,Fe)=>{const qe=Le.get(Fe);return qe?s.createElement("span",{style:{wordBreak:"break-word"}},qe.title):"deleted input"},k=({isLocalNode:Le,inputs:Fe,sourceInputId:qe,sourceNodeId:ut})=>{var ft;const Ot=(0,K.A)("forwarder"),Lt=(ft=Ot==null?void 0:Ot[0])==null?void 0:ft.ForwarderReceivedBy;return ut?Le===void 0?s.createElement(A.y$,null):Le===!1?s.createElement(Lt,{inputId:qe,forwarderNodeId:ut}):s.createElement("div",null,s.createElement("dt",null,"Received by"),s.createElement("dd",null,s.createElement("em",null,j(Fe,qe))," ","on ",s.createElement(W,{nodeId:ut}))):null};var Q=e("N3RHy9gr"),ne=e("L2qXWCIB"),z=e("orDZ6Vj2");const le=(Le,Fe,qe,ut)=>Le((0,ne.A)({queryId:Fe,field:"associated_assets",value:qe,type:ut})),me=({associated_assets:Le,fieldType:Fe})=>{const qe=(0,K.A)("views.components.assetInformationActions"),ut=(0,Q.A)(),ft=(0,z.A)(),Ot=s.useMemo(()=>qe.map(({component:Lt})=>s.createElement(Lt,{identifiers:Le,addToQuery:an=>le(ft,ut,an,Fe)})),[qe,Le,ft,ut,Fe]);return Le.length===0?null:s.createElement("div",null,s.createElement("dt",null,"Associated Assets"),Ot.map(Lt=>s.createElement("div",{key:Lt.props.identifiers[0]},Lt)))};var Pe=e("XEgUer9K"),Ve=e("hC1XaH+L"),at=e("y2LHvPyS");const he=({children:Le,message:Fe})=>{const qe=(0,K.A)("views.components.widgets.messageDetails.contextProviders");return!qe||(qe==null?void 0:qe.length)===0?Le:qe.reduce((ut,ft)=>s.createElement(at.tH,{FallbackComponent:()=>ut},s.createElement(ft,{message:Fe},ut)),Le)};var Ie=e("E9JT2cEW"),Re=e("v4GbOr/o"),ce=e("8OvTct/Z"),Ee=e("0t7Ye+61"),oe=e("MdYBRjRJ");const ae=(Le,Fe,qe)=>{const ut=(0,ce.A)(),ft=(0,Ee.A)(),Ot=()=>{ut(Re.g.SEARCH_MESSAGE_TABLE_TEST_AGAINST_STREAM,{app_pathname:(0,oe.i)(ft.pathname),app_section:"search-message-table",app_action_value:"seach-message-table-test-against-stream"})},Lt=Le.map(an=>an.is_default?s.createElement(E.MenuItem,{key:an.id,onClick:()=>Ot(),disabled:!0,title:"Cannot test against the default stream"},an.title):s.createElement(p.m,{key:an.id,to:C.Ay.stream_edit_example(an.id,Fe,qe)},s.createElement(E.MenuItem,{onClick:()=>Ot()},an.title)));return s.createElement(E.DropdownButton,{pullRight:!0,bsSize:"small",title:"Test against stream",id:"select-stream-dropdown"},Lt&&!Lt.isEmpty()?Lt.toArray():s.createElement(E.MenuItem,{header:!0},"No streams available"))},ye=(Le,Fe)=>(0,K.A)("views.components.widgets.messageTable.messageActions").filter(ut=>ut.useCondition?!!ut.useCondition():!0).map(({component:ut,key:ft})=>s.createElement(ut,{key:ft,id:Le,index:Fe})),ve=({index:Le,id:Fe,fields:qe,decorationStats:ut,disabled:ft,disableSurroundingSearch:Ot,disableTestAgainstStream:Lt,showOriginal:an,toggleShowOriginal:Ft,streams:rn,searchConfig:$t})=>{const be=ye(Fe,Le);if(ft)return s.createElement(E.ButtonGroup,null);const yn=Le?C.Ay.message_show(Le,Fe):"#",{timestamp:Kt,...An}=qe,qt=Ot||s.createElement(Ie.A,{id:Fe,timestamp:Kt,searchConfig:$t,messageFields:An}),io=ut&&s.createElement(E.Button,{onClick:Ft,active:an},"Show changes");return s.createElement(E.ButtonGroup,null,io,s.createElement(E.Button,{bsSize:"small",href:yn},"Permalink"),be,s.createElement(A.bL,{title:"Copy ID",text:Fe,bsSize:"small"}),s.createElement(A.bL,{title:"Copy message",bsSize:"small",text:JSON.stringify(qe,null,2)}),qt,Lt?null:ae(rn,Le,Fe))};var _e=e("AfN6xyeM"),He=e.n(_e),je=e("UeAH/0t7");const Qe=(0,d.default)(He())` position: static !important; `,xe=({message:Le})=>{const Fe=(0,d.useTheme)(),qe=(0,K.A)("messageAugmentations"),ft=(0,s.useContext)(je.A).width>=Fe.breakpoints.px.max.md;return!qe||qe.length===0?null:s.createElement(Qe,{boundaryElement:`#sticky-augmentations-boundary-${Le.id}`,disabled:!ft,positionRecheckInterval:400,scrollElement:"#sticky-augmentations-container"},s.createElement("dl",null,qe.map(({component:Ot,id:Lt})=>s.createElement(Ot,{key:Lt,message:Le}))))},ke=({timestamp:Le,receivedBy:Fe,index:qe,streams:ut,assets:ft})=>s.createElement(A.D2,null,Le,Fe,s.createElement("dt",null,"Stored in index"),s.createElement("dd",null,qe||"Message is not stored"),ut.size>0&&s.createElement(s.Fragment,null,s.createElement("dt",null,"Routed into streams"),s.createElement("dd",{className:"stream-list"},s.createElement("ul",null,ut.toArray()))),ft),Se=(Le,Fe)=>Le?s.createElement(p.N,{to:C.Ay.message_show(Le,Fe)},Fe):s.createElement("span",null,Fe," ",s.createElement(E.Label,{bsStyle:"warning"},"Not stored")),Je=d.default.div` display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; `,nt=({disableMessageActions:Le,disableSurroundingSearch:Fe,disableTestAgainstStream:qe,expandAllRenderAsync:ut,fields:ft,message:Ot,streams:Lt,inputs:an,showTimestamp:Ft,allStreams:rn})=>{var $t;const{searchesClusterConfig:be}=(0,P.P)(I.o),[yn,Kt]=(0,s.useState)(!1),{fields:An,index:qt,id:io,decoration_stats:Be}=Ot,{gl2_source_node:bn,gl2_source_input:gn,associated_assets:wn}=An,{isLocalNode:Zn}=(0,Pe.A)(bn),Vn=(0,s.useMemo)(()=>({isLocalNode:Zn}),[Zn]),{all:po}=(0,s.useContext)(Ve.A),De=()=>{Kt(!yn)},ln=(0,s.useCallback)(Ye=>po.find(At=>At.name===Ye),[po]);if(ut)return s.createElement(E.Row,null,s.createElement(E.Col,{md:12},s.createElement(A.y$,null)));const It=n().Set(An.streams).map(Ye=>{const At=Lt.get(Ye);return At!==void 0?s.createElement("li",{key:At.id},s.createElement(l.A,{stream:At})):null}).toSet();let En=null;if(Ft){En=[];const Ye=An.timestamp;En.push(s.createElement("dt",{key:`dt-${Ye}`},"Timestamp")),En.push(s.createElement("dd",{key:`dd-${Ye}`},s.createElement(A.Dc,{dateTime:Ye,format:"complete"})))}const Xt=Se(qt,io);return s.createElement(f.V.Provider,{value:Vn},s.createElement(he,{message:Ot},s.createElement(s.Fragment,null,s.createElement(E.Row,{className:"row-sm"},s.createElement(E.Col,{md:12},s.createElement(Je,null,s.createElement(h.A,null,s.createElement(A.In,{name:"mail"}),"\xA0",Xt),s.createElement(ve,{index:qt,id:io,fields:An,decorationStats:Be,disabled:Le,disableSurroundingSearch:Fe,disableTestAgainstStream:qe,showOriginal:yn,toggleShowOriginal:De,searchConfig:be,streams:rn})))),s.createElement(E.Row,{id:`sticky-augmentations-boundary-${Ot.id}`},s.createElement(E.Col,{md:3},s.createElement(ke,{timestamp:En,index:qt,receivedBy:s.createElement(k,{isLocalNode:Zn,inputs:an,sourceNodeId:bn,sourceInputId:gn}),streams:It,assets:wn?s.createElement(me,{associated_assets:wn,fieldType:($t=ln("associated_assets"))==null?void 0:$t.type}):s.createElement("div",null)}),s.createElement(xe,{message:Ot})),s.createElement(E.Col,{md:9},s.createElement(m.bB,{message:Ot,fields:ft}))))))};nt.propTypes={allStreams:g().list,disableMessageActions:r().bool,disableSurroundingSearch:r().bool,disableTestAgainstStream:r().bool,expandAllRenderAsync:r().bool,fields:g().list,inputs:g().map,message:_.A.Message.isRequired,showTimestamp:r().bool,streams:g().map},nt.defaultProps={allStreams:n().List(),disableMessageActions:!1,disableSurroundingSearch:!1,disableTestAgainstStream:!1,expandAllRenderAsync:!1,fields:n().List(),inputs:n().Map(),showTimestamp:!0,streams:n().Map()};const Wt=nt},y5LMk7Rh:(x,y,e)=>{"use strict";e.d(y,{A:()=>z});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("gSdhV+tG"),n=e("nxMFMmDQ"),c=e("w7+AQV2V"),g=e.n(c),d=e("PpCK0BgN"),f=e.n(d),p=e("J6y4/h8P"),E=e("TJOheZRu"),l=e("7J1sc9Ol"),m=e("9pdI12pI"),h=e.n(m);const C=le=>h()(le).format("0,0.[0000000]"),P=le=>typeof le=="number"?!0:typeof le!="string"||le.trim()===""?!1:!Number.isNaN(Number(le)),I=(le,V,me={})=>t.createElement("span",{key:`highlight-${V}`,style:me},le);function M(le,V){if(le.length!==1)return!1;const{start:me,length:Pe}=le[0],Ve=E.A.stringify(V);return me===0&&Pe===Ve.length}const O=(le,V)=>(0,l.Tn)(le)&&P(V),U=({color:le=n.PP,field:V,value:me,highlightRanges:Pe={}})=>{const Ve=(0,p.useTheme)();if(me==null)return"";if(!Pe||!Pe[V])return O(V,me)?C(me):me;const at=le.colorFor(me),ze={backgroundColor:at,color:Ve.utils.contrastingColor(at),padding:"0 1px"};if(M(Pe[V],me)){const ae=O(V,me)?C(me):me;return I(ae,0,ze)}const he=E.A.stringify(me),Ie=f()(Pe[V],ae=>ae.start),Re=(ae,ye)=>he.substring(ae,ae+ye),ce=ae=>he.substring(ae,he.length),Ee=Ie.filter(({start:ae})=>ae>=0).filter(({length:ae})=>ae>=0).reduce(([ae,ye],Oe,ve)=>[[...ae,Re(ye,Math.max(0,Oe.start-ye)),I(Re(Math.max(Oe.start,ye),Math.max(0,Oe.length-Math.max(0,ye-Oe.start))),ve,ze)],Oe.start+Oe.length],[[],0])[0],oe=g()(f()(Ie,ae=>ae.start+ae.length));return Ee.push(ce(oe.start+oe.length)),t.createElement("div",null,Ee)};U.propTypes={color:s().object,field:s().string.isRequired,value:s().any,highlightRanges:s().object},U.defaultProps={color:n.PP,highlightRanges:{},value:void 0};const W=U,K=({field:le,value:V})=>t.createElement(o.V.Consumer,null,({message:me})=>t.createElement(W,{field:le,color:n.PP,value:V,highlightRanges:me==null?void 0:me.highlight_ranges}));K.propTypes={field:s().string.isRequired,value:s().any.isRequired};const j=K,k=t.createContext([j]),Q=le=>({value:me,...Pe})=>t.createElement(t.Fragment,null,le.reduce((Ve,at)=>t.createElement(at,{...Pe,value:me},Ve),null)),z=le=>t.createElement(k.Consumer,null,V=>{const me=Q(V);return t.createElement(me,{...le})})},"H1J/o4st":(x,y,e)=>{"use strict";e.d(y,{A:()=>O});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("kqAR+wt5"),n=e.n(o),c=e("J6y4/h8P"),g=e("Jg5wVMAu"),d=e.n(g),f=e("+qc3iAHh"),p=e("IOI9nV80"),E=e("fc14XwmC"),l=e("rIl5IEuP"),m=e("6j4Sgo2g"),h=e("7dh0vSOR"),A=e("E+CaPsQD"),C=e("mSSPPdLK");const _=()=>s.createElement(m.A,{width:275,position:"right",withArrow:!0,withinPortal:!0},s.createElement(m.A.Target,null,s.createElement(l.Button,{bsStyle:"link",className:C.A.helpLink},"What are message decorators?")),s.createElement(m.A.Dropdown,null,s.createElement("p",{className:"description"},"Decorators can modify messages shown in the search results on the fly. These changes are not stored, but only shown in the search results. Decorator config is stored ",s.createElement("strong",null,"per stream"),"."),s.createElement("p",{className:"description"},"Use drag and drop to modify the order in which decorators are processed."),s.createElement("p",null,"Read more about message decorators in the ",s.createElement(h.A,{page:A.A.PAGES.DECORATORS,text:"documentation"}),".")));_.propTypes={};const P=_,I=c.default.div(({theme:U})=>(0,c.css)` margin-bottom: 10px; margin-top: 10px; margin-left: 5px; display: inline-block; border-style: solid; border-color: ${U.colors.gray[80]}; border-radius: 5px; border-width: 1px; padding: 10px; background: ${U.colors.global.background}; `);class M extends s.Component{constructor(W){super(W),this._formatDecoratorType=(K,j)=>({value:j,label:K.name}),this._handleCancel=()=>this.setState({typeName:void 0,typeDefinition:void 0}),this._handleSubmit=K=>{const{stream:j,nextOrder:G,onCreate:k}=this.props,Q={id:new(d())().toString(),stream:j,type:K.type,config:K.configuration,order:G};k(Q),this.setState({typeName:void 0})},this._openModal=()=>{var K,j;return(j=(K=this.configurationForm)==null?void 0:K.current)==null?void 0:j.open()},this._onTypeChange=K=>{const{decoratorTypes:j}=this.props;this.setState({typeName:K}),j[K]?this.setState({typeDefinition:j[K]}):this.setState({typeDefinition:{}})},this.configurationForm=s.createRef(),this.state={}}render(){const{typeDefinition:W,typeName:K}=this.state,{decoratorTypes:j,disabled:G,showHelp:k=!0}=this.props,Q=n().map(j,this._formatDecoratorType),ne=(0,E.A)(),z=K!==void 0?s.createElement(f.lD,{ref:this.configurationForm,key:"configuration-form-output",configFields:W.requested_configuration,title:`Create new ${W.name}`,typeName:K,includeTitleField:!1,wrapperComponent:ne,submitAction:this._handleSubmit,cancelAction:this._handleCancel}):null;return s.createElement(s.Fragment,null,s.createElement("div",{className:`${C.A.decoratorBox} ${C.A.addDecoratorButtonContainer}`},s.createElement("div",{className:C.A.addDecoratorSelect},s.createElement(p.l6,{placeholder:"Select decorator",onChange:this._onTypeChange,options:Q,matchProp:"label",disabled:G,value:K}))),k&&s.createElement(P,null),K&&s.createElement(I,null,z))}}M.propTypes={decoratorTypes:r().object.isRequired,nextOrder:r().number.isRequired,stream:r().string,disabled:r().bool,onCreate:r().func.isRequired,showHelp:r().bool},M.defaultProps={disabled:!1,showHelp:!0,stream:null};const O=M},B6AO2vlN:(x,y,e)=>{"use strict";e.d(y,{A:()=>p});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("J6y4/h8P"),n=e("rIl5IEuP"),c=e("IOI9nV80"),g=e("mSSPPdLK");const d=o.default.div` margin-bottom: 20px; `;class f extends s.Component{constructor(){super(...arguments),this._onReorderWrapper=l=>{const{onReorder:m}=this.props;m(l)}}render(){const{decorators:l,disableDragging:m}=this.props;return!l||l.length===0?s.createElement(d,null,s.createElement(n.Alert,{bsStyle:"info",className:g.A.noDecoratorsAlert},"No decorators configured.")):s.createElement(c.bH,{items:l,onMoveItem:this._onReorderWrapper,disableDragging:m,displayOverlayInPortal:!0})}}f.propTypes={decorators:r().arrayOf(r().object).isRequired,disableDragging:r().bool,onReorder:r().func},f.defaultProps={disableDragging:!1,onReorder:()=>{}};const p=f},"0l+/Cv54":(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("ii0bleBb"),r=e.n(t),s=e("Z7aTuO5B"),o=e("J6y4/h8P"),n=e("rIl5IEuP"),c=e("+qc3iAHh"),g=e("fc14XwmC"),d=e("mSSPPdLK");const f=o.default.div` margin-left: 5px; `;class p extends s.Component{constructor(m){super(m),this._handleDeleteClick=()=>{const{onDelete:h,decorator:A}=this.props;window.confirm("Do you really want to delete this decorator?")&&h(A.id)},this._handleEditClick=()=>{this.setState({editing:!0})},this._closeEditForm=()=>{this.setState({editing:!1})},this._handleSubmit=h=>{const{decorator:A}=this.props,{stream:C,id:_,order:P}=A,{onUpdate:I}=this.props;I(_,{id:_,type:h.type,config:h.configuration,order:P,stream:C}),this._closeEditForm()},this._resolveConfigurationIds=h=>{const{typeDefinition:A}=this.props,C=A.requested_configuration,_={};return Object.keys(h).forEach(I=>{const M=C[I]?C[I].additional_info.values:void 0,O=h[I];M&&M[O]&&(_[I]=M[O])}),{...h,..._}},this._formatActionsMenu=()=>{const{decorator:h}=this.props;return s.createElement(f,null,s.createElement(n.DropdownButton,{id:`decorator-${h.id}-actions`,bsStyle:"default",bsSize:"xsmall",title:"Actions"},s.createElement(n.MenuItem,{onSelect:this._handleEditClick},"Edit"),s.createElement(n.MenuItem,{divider:!0}),s.createElement(n.MenuItem,{onSelect:this._handleDeleteClick},"Delete")))},this.state={editing:!1}}render(){const{disableMenu:m=!1,decorator:h,decoratorTypes:A,typeDefinition:C}=this.props,{editing:_}=this.state,P=this._resolveConfigurationIds(h.config),I=A[h.type]||{name:"Unknown decorator type"},M=m||this._formatActionsMenu(),{name:O,requested_configuration:U}=C,W=(0,g.A)("Update"),K=h.id||"new",j=_?s.createElement(c.lD,{key:"configuration-form-decorator",configFields:U,title:`Edit ${O}`,typeName:h.type,includeTitleField:!1,submitAction:this._handleSubmit,cancelAction:this._closeEditForm,wrapperComponent:W,values:h.config}):s.createElement(c.Xz,{key:`configuration-well-decorator-${K}`,id:K,configuration:P,typeDefinition:C});return s.createElement("span",{className:d.A.fixedWidth},s.createElement("div",{className:d.A.decoratorBox},s.createElement("h6",null,I.name),M),j)}}p.propTypes={decorator:r().object.isRequired,decoratorTypes:r().object.isRequired,disableMenu:r().bool,typeDefinition:r().object.isRequired,onDelete:r().func.isRequired,onUpdate:r().func.isRequired},p.defaultProps={disableMenu:!1};const E=p},fc14XwmC:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("rIl5IEuP");const o=(n="Create")=>t.forwardRef(({children:c,disabled:g,onCancel:d,onSubmitForm:f},p)=>{const E=l=>{l.stopPropagation();const{target:m}=l;if(typeof m.checkValidity=="function"&&!m.checkValidity()){l.preventDefault();return}typeof f=="function"&&(l.preventDefault(),f(l))};return t.createElement("form",{onSubmit:E,ref:p},c,t.createElement(r.Button,{type:"submit",bsStyle:"success",disabled:g},n)," ",t.createElement(r.Button,{type:"button",disabled:g,onClick:d},"Cancel"))})},"hOf/Kwna":(x,y,e)=>{"use strict";e.d(y,{bB:()=>K,Ok:()=>zt});var t=e("fh5GG281"),r=e("ii0bleBb"),s=e.n(r),o=e("Z7aTuO5B"),n=e("J6y4/h8P"),c=e("SnOQy/BL"),g=e("UPOvISKg"),d=e("jlRcBdjT"),f=e("nxMFMmDQ"),p=e("N3RHy9gr"),E=e("y5LMk7Rh"),l=e("Xt0X5Kl4"),m=e("GFJVQ2dX");const h=[f.TW,"level"],A=n.default.small(({theme:xe})=>(0,n.css)` color: ${xe.colors.gray[70]}; font-weight: normal; `),C=n.default.dd(({theme:xe})=>` font-family: ${xe.fonts.family.monospace}; `),_=({fieldName:xe,fieldType:Ue,message:ke,value:Se})=>{const Je=h.indexOf(xe)!==-1?ke.fields[xe]:Se,nt=(0,p.A)(),{decoration_stats:Wt={added_fields:{},changed_fields:{},removed_fields:{}}}=ke,Le=Wt&&(Wt.added_fields[xe]!==void 0||Wt.changed_fields[xe]!==void 0),Fe=Le?({children:qe})=>o.createElement(m.A.Provider,{value:!1},qe," ",o.createElement(A,null,"(decorated)")):({children:qe})=>qe;return o.createElement(o.Fragment,null,o.createElement("dt",{"data-testid":`message-field-name-${xe}`},o.createElement(c.A,{queryId:nt,name:xe,type:Le?d.Ay.Decorated:Ue},xe)),o.createElement(C,{"data-testid":`message-field-value-${xe}`},o.createElement(Fe,null,o.createElement(g.A,{field:xe,value:Je,type:Le?d.Ay.Decorated:Ue,render:E.A}))))};_.propTypes={fieldName:s().string.isRequired,fieldType:l.A.FieldType.isRequired,message:l.A.Message.isRequired,value:s().any.isRequired};const P=_;var I=e("IOI9nV80"),M=e("8Crd7QGv"),O=e("BQipOvpT");const U=(0,n.default)(I.D2)(({theme:xe})=>(0,n.css)` color: ${xe.colors.global.textDefault}; dd { &:not(:last-child) { border-bottom: 1px solid ${xe.colors.gray[90]}; } } `),K=({message:xe,fields:Ue})=>{const ke=xe.formatted_fields,Se=Object.keys(ke).sort().map(Je=>{const{type:nt}=Ue.find(Wt=>Wt.name===Je,void 0,M.A.create(Je,d.Ay.Unknown));return o.createElement(O.A,{key:Je,field:Je,value:ke[Je]},o.createElement(P,{fieldName:Je,fieldType:nt,message:xe,value:ke[Je]}))});return o.createElement(U,{className:"message-details-fields"},Se)};var j=e("VPaD/Np4"),G=e("gSdhV+tG"),k=e("8fnsnG21"),Q=e("Cd4wX32x"),ne=e("yEuO7gC5"),z=e("8OvTct/Z"),le=e("v4GbOr/o"),V=e("MdYBRjRJ"),me=e("0t7Ye+61"),Pe=e("jcqbe10s"),Ve=e("0hhBr0/b"),at=e("/zlmJemQ");const ze=n.default.div` white-space: pre-line; max-height: 6em; /* show 4 lines: line-height * 4 */ overflow: hidden; `,Ie=({message:xe,messageFieldType:Ue})=>o.createElement(ze,null,o.createElement(O.A,{field:"message",value:xe.fields[f.Zv]},o.createElement(at.A,{field:"message",value:xe.fields[f.Zv],type:Ue,render:E.A}))),Re=n.default.tr(({theme:xe})=>(0,n.css)` && { cursor: pointer; td { border-top: 0; padding-top: 0; padding-bottom: 4px; font-family: ${xe.fonts.family.monospace}; color: ${xe.colors.variant.dark.info}; } } `),ce=(xe,Ue)=>o.createElement(Ie,{message:xe,messageFieldType:Ue}),Ee=({onRowClick:xe,colSpanFixup:Ue,message:ke,messageFieldType:Se,showMessageRow:Je,config:nt})=>{var Wt;const Le=(Wt=(0,Ve.A)("views.components.widgets.messageTable.messageRowOverride"))==null?void 0:Wt[0];return o.createElement(Re,{onClick:xe},o.createElement("td",{colSpan:Ue},Je&&!!Le&&o.createElement(Le,{messageFields:ke.fields,config:nt,renderMessageRow:()=>ce(ke,Se)}),Je&&!Le&&ce(ke,Se)))};Ee.defaultProps={showMessageRow:!1};const oe=Ee;var ae=e("5CYElDLi");const ye=n.default.tbody(({$expanded:xe,$highlighted:Ue,theme:ke})=>` && { border-top: 0; ${xe?(0,n.css)` border-left: 7px solid ${ke.colors.variant.light.info}; `:""} ${Ue?(0,n.css)` border-left: 7px solid ${ke.colors.variant.light.success}; `:""} } `),Oe=n.default.tr` cursor: pointer; && td { min-width: 50px; word-break: break-word; padding: 4px 5px 2px; } time { line-height: 1; } `,ve=n.default.tr` td { padding-top: 5px; border-top: 0; } .row { margin-right: 0; } div[class*='col-'] { padding-right: 0; } `,_e=(xe,Ue)=>Ue&&(Ue.added_fields[xe]!==void 0||Ue.changed_fields[xe]!==void 0),He=(xe,{decoration_stats:Ue},ke)=>_e(xe,Ue)?d.Ay.Decorated:(ke&&ke.find(Se=>Se.name===xe)||{type:d.Ay.Unknown}).type,je=(xe,Ue=!1)=>Ue?o.createElement("strong",null,xe):xe,Qe=({config:xe,disableSurroundingSearch:Ue,expandAllRenderAsync:ke,expanded:Se,fields:Je,message:nt,showMessageRow:Wt,selectedFields:Le=j.OrderedSet(),toggleDetail:Fe})=>{const{inputs:qe=[]}=(0,k.P)(ne.C),{streams:ut=[]}=(0,k.P)(Q.h),ft=(0,o.useContext)(ae.A),Ot=(0,me.A)(),Lt=(0,z.A)(),an=(0,o.useMemo)(()=>({message:nt}),[nt]),Ft=j.List(ut),rn=j.Map(ut.map(Kt=>[Kt.id,Kt])),$t=j.Map(qe.map(Kt=>[Kt.id,Kt])),be=()=>{var Kt;!!((Kt=window.getSelection())!=null&&Kt.toString())||(Lt(le.g.SEARCH_MESSAGE_TABLE_DETAILS_TOGGLED,{app_pathname:(0,V.i)(Ot.pathname),app_section:"widget",app_action_value:"widget-message-table-toggle-details"}),Fe(`${nt.index}-${nt.id}`))},yn=Le.size+1;return o.createElement(G.V.Provider,{value:an},o.createElement(ye,{$expanded:Se,$highlighted:nt.id===ft},o.createElement(Oe,{onClick:be},Le.toArray().map((Kt,An)=>{const qt=He(Kt,nt,Je);return o.createElement(Pe.Dw,{$isNumeric:qt.isNumeric(),key:Kt,"data-testid":`message-summary-field-${Kt}`},je(o.createElement(O.A,{field:Kt,value:nt.fields[Kt]},o.createElement(at.A,{value:nt.fields[Kt],field:Kt,type:qt,render:E.A})),An===0))})),o.createElement(oe,{showMessageRow:Wt,config:xe,colSpanFixup:yn,messageFieldType:He(f.Zv,nt,Je),onRowClick:be,message:nt}),Se&&o.createElement(ve,null,o.createElement("td",{colSpan:yn},o.createElement(t.A,{message:nt,fields:Je,streams:rn,allStreams:Ft,inputs:$t,disableSurroundingSearch:Ue,expandAllRenderAsync:ke})))))};Qe.propTypes={disableSurroundingSearch:s().bool,expandAllRenderAsync:s().bool.isRequired,expanded:s().bool.isRequired,fields:s().object.isRequired,message:s().shape({fields:s().object.isRequired,highlight_ranges:s().object,id:s().string.isRequired,index:s().string.isRequired,decoration_stats:s().shape({added_fields:s().object,changed_fields:s().object,removed_fields:s().object})}).isRequired,selectedFields:s().instanceOf(j.OrderedSet),showMessageRow:s().bool,toggleDetail:s().func.isRequired},Qe.defaultProps={disableSurroundingSearch:!1,selectedFields:j.OrderedSet(),showMessageRow:!1};const zt=Qe},xsbnunTq:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("UmnljV2q"),s=e("xudoaDQq");const n=({children:c})=>(0,s.A)()===r.A.Type.Search?t.createElement(t.Fragment,null,c):null},"nUqpNf+1":(x,y,e)=>{"use strict";e.d(y,{A:()=>E,C:()=>f});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("xAuw/bbM"),o=e("Ofda/4py"),n=e("ZgnHE8Va");const c=100,g=r.default.div` display: flex; justify-content: center; align-items: center; margin-left: 6px; `,d=()=>s.Cf.suggestQueryStrings(c).then(l=>l.sort(({last_used:m},{last_used:h})=>new Date(h).getTime()-new Date(m).getTime()).map((m,h)=>({value:m.query,meta:"history",score:h,completer:{insertMatch:(A,C)=>{A.setValue(C.value,1)}}}))),f=async l=>{const m=await d();m!=null&&m.length&&(0,n.R)(l,{matches:m})},E=({editorRef:l})=>{const m=async()=>{l.current&&(l.current.focus(),f(l.current))};return t.createElement(g,null,t.createElement(o.A,{name:"history",onClick:m}))}},"2XdKdJGP":(x,y,e)=>{"use strict";e.d(y,{Dp:()=>n,Io:()=>c,L$:()=>o,d7:()=>d,iV:()=>g,uE:()=>s});var t=e("J6y4/h8P"),r=e("IOI9nV80");const s="10px",o=(0,t.default)(r.Rq)` display: flex; flex-direction: column; gap: ${s}; `,n=t.default.div(({theme:f})=>(0,t.css)` display: flex; gap: ${s}; align-items: flex-start; @media (max-width: ${f.breakpoints.max.sm}) { flex-direction: column; > div { width: 100%; } } `),c=t.default.div` flex: 1; display: flex; align-items: flex-start; gap: ${s}; `,g=t.default.div` display: flex; flex: 1; `,d=t.default.div(({theme:f})=>(0,t.css)` display: flex; gap: ${s}; align-items: flex-start; @media (max-width: ${f.breakpoints.max.md}) { flex-direction: column; > div { width: 100%; } } `)},"OQnHlPS/":(x,y,e)=>{"use strict";e.d(y,{A:()=>C,v:()=>l});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("rIl5IEuP"),c=e("IOI9nV80"),g=e("baf4E2h0"),d=e("8OvTct/Z"),f=e("v4GbOr/o"),p=e("MdYBRjRJ"),E=e("0t7Ye+61");const l="64",m=(0,o.default)(n.Button)(({theme:_,$dirty:P})=>(0,o.css)` position: relative; min-width: ${l}px; &&&.disabled { color: ${_.utils.contrastingColor(_.colors.variant.success)}; } ${P?(0,o.css)` &::after { position: absolute; content: ''; height: 16px; width: 16px; top: -5px; right: -6px; border-radius: 50%; background-color: ${_.colors.variant.warning}; } `:""} `),h=(_,P,I)=>{P&&(_.preventDefault(),g.A.displayValidationErrors()),I()},A=({dirty:_,disabled:P,glyph:I,displaySpinner:M})=>{const O=(0,d.A)(),U=(0,E.A)(),W=P?"disabled":"",K=_?"Perform search (changes were made after last search execution)":"Perform Search",j=()=>{O(f.g.SEARCH_BUTTON_CLICKED,{app_pathname:(0,p.i)(U.pathname),app_section:"search-bar",app_action_value:"search-button",event_details:{disabled:P}})};return t.createElement(m,{onClick:G=>h(G,P,j),title:K,className:W,type:"submit",bsStyle:"success",$dirty:_},M?t.createElement(c.y$,{delay:0,text:""}):t.createElement(c.In,{name:I,size:"lg"}))};A.defaultProps={disabled:!1,displaySpinner:!1,dirty:!1,glyph:"search"},A.propTypes={disabled:s().bool,displaySpinner:s().bool,dirty:s().bool,glyph:s().string};const C=A},OsdZaKdz:(x,y,e)=>{"use strict";e.d(y,{h:()=>E});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("rIl5IEuP"),o=e("IOI9nV80");const n=r.default.div` display: flex; align-items: center; `,c=(0,r.default)(s.ButtonGroup)` margin-left: 5px; `,g=r.default.div` display: flex; justify-content: flex-end; `,d=(0,r.default)(l=>t.createElement(o.Zf,{...l}))` margin-left: 5px; `,f=()=>t.createElement(t.Fragment,null,t.createElement("p",null,t.createElement("i",null,"Search filters")," contain their own query and extend the main query using the ",t.createElement("b",null,"AND")," operator."),t.createElement("p",null,"Filters can be saved separately and reused in saved searches and dashboards. Updating a saved filter will automatically affect the search results of searches which include the filter.")),E=({onHide:l,pluggableControls:m})=>m.find(A=>A.id==="search-filters")?null:t.createElement(n,null,"Filters",t.createElement(d,{title:"Search Filters",trigger:["click"]},t.createElement(f,null),t.createElement("p",null,"Search filters and parameters are available for the enterprise version."),t.createElement(g,null,t.createElement(s.Button,{onClick:l,bsSize:"xs"},"Hide controls"))),t.createElement(c,null,t.createElement(s.Button,{disabled:!0,bsSize:"small"},t.createElement(o.In,{name:"add"})),t.createElement(s.Button,{disabled:!0,bsSize:"small"},t.createElement(o.In,{name:"folder"}))))},ZgnHE8Va:(x,y,e)=>{"use strict";e.d(y,{R:()=>t});const t=(r,s)=>r.execCommand("startAutocomplete",s)},"5YmxItcn":(x,y,e)=>{"use strict";e.d(y,{Ay:()=>Q,uc:()=>I});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("knPiWeMO"),o=e.n(s),n=e("UiXZqrDE"),c=e("6j4Sgo2g"),g=e("u2QUEJU3"),d=e("TJOheZRu"),f=e("7dh0vSOR"),p=e("E+CaPsQD"),E=e("baf4E2h0"),l=e("KhLmrWKP"),m=e("0hhBr0/b");const h=r.default.div` margin-left: 5px; width: 25px; min-height: 34px; display: flex; align-items: center; justify-content: center; `,A=r.default.button(({$clickable:ne})=>(0,r.css)` padding: 0; background: transparent; border: 0; display: flex; align-items: center; cursor: ${ne?"pointer":"default"}; `),C=(0,r.default)(g.A)(({theme:ne,$status:z})=>(0,r.css)` color: ${z==="ERROR"?ne.colors.variant.danger:ne.colors.variant.warning}; font-size: 22px; `),_=(0,r.default)(g.A)` margin-left: 5px; `,P=r.default.div` display: flex; justify-content: space-between; `,I=r.default.div` display: flex; justify-content: space-between; &:not(:last-child) { margin-bottom: 6px; } `,M=(0,r.keyframes)` 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } `,O=(0,r.default)(c.A.Dropdown)(({$shaking:ne})=>(0,r.css)` animation: ${ne?(0,r.css)`${M} 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both`:"none"}; `),U=({title:ne})=>t.createElement(P,null,ne),W=()=>{const[ne,z]=(0,t.useState)(!1),le=(0,t.useCallback)(()=>{ne||(z(!0),o()(()=>z(!1),820))},[ne]);return[ne,le]},K=ne=>{const[z,le]=(0,t.useState)(!1),V=(0,t.useCallback)(()=>le(me=>!me),[]);return(0,t.useEffect)(()=>{const me=E.A.displayValidationErrors.listen(()=>{z?ne():V()});return()=>{me()}},[ne,z,V]),[z,V]},j=ne=>{switch(ne){case"UNKNOWN_FIELD":return p.A.PAGES.SEARCH_QUERY_ERRORS.UNKNOWN_FIELD;case"QUERY_PARSING_ERROR":return p.A.PAGES.SEARCH_QUERY_ERRORS.QUERY_PARSING_ERROR;case"INVALID_OPERATOR":return p.A.PAGES.SEARCH_QUERY_ERRORS.INVALID_OPERATOR;case"UNDECLARED_PARAMETER":return p.A.PAGES.SEARCH_QUERY_ERRORS.UNDECLARED_PARAMETER;default:return p.A.PAGES.SEARCH_QUERY_LANGUAGE}},G=ne=>{if(ne===null||ne.length===0)return[];const[z]=ne.reduce(([le,V],me)=>me.errorType==="UNKNOWN_FIELD"?me.relatedProperty!==void 0&&!V.includes(me.relatedProperty)?[[...le,me],[...V,me.relatedProperty]]:[le,V]:[[...le,me],V],[[],[]]);return z},Q=()=>{const ne=(0,m.A)("views.elements.validationErrorExplanation"),[z,le]=W(),[V,me]=K(le),Pe=(0,t.useRef)(void 0),{errors:{queryString:Ve}}=(0,n.useFormikContext)(),{warnings:at}=(0,t.useContext)(l.A),ze=Ve!=null?Ve:at==null?void 0:at.queryString,{status:he,explanations:Ie=[]}=ze!=null?ze:{explanations:[]},Re=(0,t.useMemo)(()=>[...G(Ie)],[Ie]),ce=ze&&(ze==null?void 0:ze.status)!=="OK";return t.createElement(c.A,{opened:ce&&V,position:"bottom",width:500,withArrow:!0},t.createElement(c.A.Target,null,t.createElement(h,{ref:Pe},ce?t.createElement(A,{title:"Toggle validation error explanation",onClick:me,$clickable:!0,tabIndex:0,type:"button"},t.createElement(C,{$status:he,name:"error"})):t.createElement(f.A,{page:p.A.PAGES.SEARCH_QUERY_LANGUAGE,title:"Search query syntax documentation",text:t.createElement(g.A,{name:"lightbulb_circle"})}))),ce&&V&&t.createElement(O,{id:"query-validation-error-explanation",title:t.createElement(U,{title:d.A.capitalizeFirstLetter(he.toLocaleLowerCase())}),$shaking:z},t.createElement("div",{role:"alert"},Re.map(({errorType:Ee,errorTitle:oe,errorMessage:ae,id:ye})=>t.createElement(I,{key:ye},t.createElement("span",null,t.createElement("b",null,oe),": ",ae),Ee&&t.createElement(f.A,{page:j(Ee),title:`${oe} documentation`,text:t.createElement(_,{name:"lightbulb_circle"})}))),ne==null?void 0:ne.map((Ee,oe)=>t.createElement(Ee,{validationState:ze,key:oe})))))}},YR1bCTOi:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("jAGDuYSC"),r=e("eFxcQyPT"),s=e("MdYBRjRJ"),o=e("iltCXley"),n=e("QV1daZoe");const c=f=>typeof f=="object"?!!f.query_string:!!f,d=({queryString:f,timeRange:p,streams:E,filter:l,...m},h)=>{if(!c(f)&&!c(l)&&!p&&(E==null?void 0:E.length)===0)return Promise.resolve({status:"OK",explanations:[],context:{searched_index_ranges:[]}});const A={query:f,timerange:p?(0,n.So)(p,h):void 0,streams:E,filter:l,...m};return(0,r.Ay)("POST",(0,s.H3)("/search/validate"),A).then(C=>{var _;if(C){const P=(_=C.explanations)==null?void 0:_.map(({error_type:I,error_title:M,error_message:O,begin_line:U,end_line:W,begin_column:K,end_column:j,related_property:G})=>({id:(0,o.A)(),errorMessage:O,errorType:I,errorTitle:M,beginLine:U?U-1:0,endLine:W?W-1:0,beginColumn:K,endColumn:j,relatedProperty:G}));return{status:C.status,explanations:P,context:C.context}}}).catch(C=>(t.A.error(`Validating search query failed with status: ${C}`),{status:"OK",explanations:[],context:{searched_index_ranges:[]}}))}},"+c0Nkc8d":(x,y,e)=>{"use strict";e.d(y,{E:()=>r,q:()=>t});const t=s=>{var o,n;return(n=(o=s==null?void 0:s.context)==null?void 0:o.searched_index_ranges)==null?void 0:n.filter(c=>c.is_warm_tiered)},r=s=>(s==null?void 0:s.length)>0},"2MZA4BUT":(x,y,e)=>{"use strict";e.d(y,{Ay:()=>l,o$:()=>c,y1:()=>f});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("PwTFiGSp"),o=e("Ii+QL2UH"),n=e("vT7mdtQI");const c="----/--/-- --:--:--.---",g={from:c,until:c},d=r.default.div(({theme:m})=>(0,r.css)` width: 100%; padding: 3px 13px; display: flex; justify-content: space-around; background-color: ${m.colors.table.row.backgroundAlt}; align-items: center; > span { flex: 1; } `),f=m=>{let h=c,A=c;if(!(m!=null&&m.type))return g;const{type:C}=m;switch(C){case"relative":return(0,s.r1)(m)&&(h=(0,o.W)(m,"range")),(0,s._b)(m)&&(h=(0,o.W)(m,"from")),A=(0,o.W)(m,"to","Now"),{from:h,until:A};case"absolute":return{from:m.from,until:m.to};default:return(0,n.A)(C,"Invalid time range type")}},p=({timerange:m})=>{if((0,s.u4)(m))return t.createElement("span",null,"Keyword: ",t.createElement("b",null,m.keyword));const{from:h,until:A}=f(m);return t.createElement(t.Fragment,null,t.createElement("span",{"data-testid":"from"},"From: ",t.createElement("b",null,h)),t.createElement("span",{"data-testid":"to"},"Until: ",t.createElement("b",null,A)))},E=({timerange:m,toggleDropdownShow:h})=>t.createElement(d,{"aria-label":"Search Time Range, Opens Time Range Selector On Click",role:"button",onClick:h},(0,s.EZ)(m)?t.createElement("span",null,"No Override"):t.createElement(p,{timerange:m}));E.defaultProps={toggleDropdownShow:void 0};const l=E},f2ImtPH2:(x,y,e)=>{"use strict";e.d(y,{A:()=>ko});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("2XdKdJGP"),c=e("8OvTct/Z"),g=e("GPuPro0F"),d=e("UiXZqrDE"),f=e("9oVghaOd"),p=e.n(f),E=e("rIl5IEuP"),l=e("6j4Sgo2g"),m=e("IOI9nV80"),h=e("PwTFiGSp"),A=e("QV1daZoe"),C=e("tITy3x4L"),_=e("O/XpfGnR"),P=e("MdYBRjRJ"),I=e("0t7Ye+61"),M=e("v4GbOr/o"),O=e("z45xmHGk"),U=e("nxMFMmDQ");const W=Ke=>(0,O.Qy)(Ke)?(0,O.CW)(Ke.from):U.GY,K=Ke=>(0,O.Qy)(Ke)?(0,O.CW)(Ke.to):0,j={absolute:({oldTimeRange:Ke,formatTime:dt})=>({type:"absolute",from:dt(p()().subtract(W(Ke),"seconds"),"complete"),to:dt(p()().subtract(K(Ke),"seconds"),"complete")}),relative:()=>({type:"relative",from:(0,O.Up)(U.GY),to:O.RW}),keyword:({userTimezone:Ke})=>({type:"keyword",keyword:"Last five minutes",timezone:Ke}),disabled:()=>{}},k=({oldTimeRange:Ke,type:dt,formatTime:ht,userTimezone:Pt})=>{const dn=Ke&&"type"in Ke?Ke.type:"disabled";if(dt===dn)return Ke;if(!j[dt])throw new Error(`Invalid time range type: ${dt}`);return j[dt]({oldTimeRange:Ke,formatTime:ht,userTimezone:Pt})};var Q=e("IZYxBTgT"),ne=e("awUYZK9l");const z=({dateTime:Ke,onChange:dt,startDate:ht})=>{const{userTimezone:Pt,formatTime:dn}=(0,_.A)(),jt=(0,Q.Uv)(Ke,Pt),nn=dn(jt,"date"),Rn=Wn=>{if(ht&&ne.Em.isDayBefore(Wn,ht))return!1;const xn=(0,Q.$4)(Wn),zn=(jt.isValid()?jt:(0,Q.Uv)(void 0,Pt)).set({year:xn.year(),month:xn.month(),date:xn.date()});return dt(dn(zn,"default"))};return t.createElement(m.lr,{date:nn,onChange:Rn,fromDate:ht})};z.propTypes={dateTime:s().string.isRequired,onChange:s().func,startDate:s().instanceOf(Date)},z.defaultProps={onChange:()=>{},startDate:void 0};const le=z,V="hourglass_top",me="hourglass",Pe="hourglass_top",Ve=["hours","minutes","seconds","milliseconds"],at=o.default.div` display: flex; align-items: center; justify-content: center; flex: 1; padding-top: 12px; b { padding: 0 3px; } `,ze=(0,o.default)(E.FormControl)` padding: 0 6px 0 9px; &:nth-of-type(1) { grid-area: 2 / 2 / 2 / 2; } &:nth-of-type(2) { grid-area: 2 / 4 / 2 / 4; } &:nth-of-type(3) { grid-area: 2 / 6 / 2 / 6; } `,he=(0,o.default)(E.InputGroup.Addon)(({theme:Ke})=>(0,o.css)` padding: 0; background: ${Ke.colors.variant.lightest.default}; font-weight: bold; width: auto; display: flex; align-items: center; &:not(:first-child, :last-child) { border-right: 0; border-left: 0; padding: 0 3px; } &:nth-of-type(1) { grid-area: 2 / 1 / 2 / 1; } &:nth-of-type(2) { grid-area: 2 / 3 / 2 / 3; } &:nth-of-type(3) { grid-area: 2 / 5 / 2 / 5; } &:nth-of-type(4) { grid-area: 2 / 7 / 2 / 7; } `),Ie=(0,o.default)(E.Button)` padding: 6px 9px; line-height: 1; `,Re=(0,o.default)(E.FormGroup)` display: grid; grid-template-columns: max-content repeat(3, 1fr max-content); grid-template-rows: auto 1fr; label { padding-left: 6px; margin: 0; &:nth-child(1) { grid-area: 1 / 2 / 1 / 2; } &:nth-child(2) { grid-area: 1 / 4 / 1 / 4; } &:nth-child(3) { grid-area: 1 / 6 / 1 / 6; } } `,ce=(0,o.default)(E.InputGroup)` display: contents; `,Ee=Ke=>{Ke.target.select()},oe=(Ke,dt=2)=>String(Ke).padStart(dt,"0"),ae=(Ke,dt)=>{const ht=Ke.match(/[^0-9]/g),Pt=Number(ht?0:Ke);if(dt==="hours"){if(Pt>23)return 23}else if(Pt>59)return 59;return Pt},ye=(Ke,dt)=>{const ht=p()(Ke).toObject();return Ve.forEach(nn=>{ht[nn]=oe(ht[nn])}),{initialDateTime:ht,handleChangeSetTime:nn=>{const Rn=nn.target.getAttribute("id").split("-").pop(),Wn=ae(nn.target.value,Rn);return p()({...ht,[Rn]:Wn}).format(Q.wT.default)},handleClickTimeNow:()=>{const nn=dt(new Date).toObject();return p()({...ht,hours:nn.hours,minutes:nn.minutes,seconds:nn.seconds}).format(Q.wT.default)},handleTimeToggle:(nn=!1)=>p()({...ht,hours:nn?23:0,minutes:nn?59:0,seconds:nn?59:0}).format(Q.wT.default)}},Oe=({dateTime:Ke,range:dt,onChange:ht})=>{var Pt,dn,jt;const nn=(0,t.useRef)(me),{toUserTimezone:Rn}=(0,_.A)(),{initialDateTime:Wn,handleChangeSetTime:xn,handleClickTimeNow:So,handleTimeToggle:zn}=ye(Ke,Rn),Ao=fo=>{nn.current=me,ht(xn(fo))},Jo=()=>{const fo=nn.current===V;fo?nn.current=Pe:nn.current=V,ht(zn(fo))},Ko=()=>{nn.current=me,ht(So())};return t.createElement(at,null,t.createElement(Re,null,t.createElement("label",{htmlFor:`${dt}-time-hours`,title:`${dt} hours label`},"HH"),t.createElement("label",{htmlFor:`${dt}-time-minutes`,title:`${dt} minutes label`},"mm"),t.createElement("label",{htmlFor:`${dt}-time-seconds`,title:`${dt} seconds label`},"ss"),t.createElement(ce,null,t.createElement(he,null,t.createElement(Ie,{bsStyle:"link",bsSize:"small",onClick:Jo,title:"Toggle between beginning and end of day"},t.createElement(m.In,{name:nn.current}))),t.createElement(ze,{type:"number",id:`${dt}-time-hours`,title:`${dt} hour`,value:(Pt=Wn.hours)!=null?Pt:"",onChange:Ao,onFocus:Ee,bsSize:"sm"}),t.createElement(he,null,":"),t.createElement(ze,{type:"number",id:`${dt}-time-minutes`,title:`${dt} minutes`,value:(dn=Wn.minutes)!=null?dn:"",onChange:Ao,onFocus:Ee,bsSize:"sm"}),t.createElement(he,null,":"),t.createElement(ze,{type:"number",id:`${dt}-time-seconds`,title:`${dt} seconds`,value:(jt=Wn.seconds)!=null?jt:"",onChange:Ao,onFocus:Ee,bsSize:"sm"}),t.createElement(he,null,t.createElement(Ie,{bsStyle:"link",bsSize:"small",onClick:Ko,title:"Set to current local time"},t.createElement(m.In,{name:"calendar_clock"}))))))};Oe.propTypes={dateTime:s().string.isRequired,range:s().string.isRequired,onChange:s().func},Oe.defaultProps={onChange:()=>{}};const ve=Oe,_e=o.default.span(({theme:Ke})=>(0,o.css)` color: ${Ke.colors.variant.dark.danger}; font-size: ${Ke.fonts.size.small}; font-style: italic; padding: 3px 3px 9px; height: 1.5em; `),He=({startDate:Ke,timeRange:dt,range:ht})=>t.createElement(d.Field,{name:`timeRangeTabs.absolute.${ht}`},({field:{value:Pt,onChange:dn,name:jt},meta:{error:nn}})=>{const Rn=xn=>dn({target:{name:jt,value:xn}}),Wn=nn?dt[ht]:Pt||dt[ht];return t.createElement(t.Fragment,null,t.createElement(le,{onChange:Rn,startDate:Ke,dateTime:Wn}),t.createElement(ve,{onChange:Rn,range:ht,dateTime:Wn}),t.createElement(_e,null,nn))});He.propTypes={timeRange:s().shape({from:s().string,to:s().string}).isRequired,startDate:s().instanceOf(Date),range:s().oneOf(["to","from"]).isRequired},He.defaultProps={startDate:void 0};const je=He;var Qe=e("Y15zKX1V");const zt=o.default.span(({theme:Ke})=>(0,o.css)` color: ${Ke.colors.variant.dark.danger}; font-size: ${Ke.fonts.size.small}; font-style: italic; padding: 3px 3px 9px; height: 1.5em; `),xe=({disabled:Ke,timeRange:dt,range:ht})=>t.createElement(d.Field,{name:`timeRangeTabs.absolute.${ht}`},({field:{value:Pt,onChange:dn,name:jt},meta:{error:nn}})=>{const Rn=xn=>dn({target:{name:jt,value:xn}}),Wn=nn?dt[ht]:Pt||dt[ht];return t.createElement(t.Fragment,null,t.createElement(Qe.A,{name:jt,disabled:Ke,value:Wn,onChange:Rn}),t.createElement(zt,null,nn))});xe.propTypes={disabled:s().bool,timeRange:s().shape({from:s().string,to:s().string}).isRequired,range:s().oneOf(["to","from"]).isRequired},xe.defaultProps={disabled:!1};const Ue=xe,ke=o.default.div` display: flex; align-items: stretch; justify-content: space-around; `,Se=o.default.div` flex: 4; align-items: center; display: flex; flex-direction: column; .DayPicker-wrapper { padding-bottom: 0; } `,Je=o.default.div` flex: 0.75; display: flex; align-items: center; justify-content: center; transform: translateY(-0.65em); `,nt=(0,o.default)(m.nD)` width: 100%; .panel-body { display: flex; } `,Wt=o.default.div` flex: 1; `,Le=o.default.div` display: flex; `,Fe=({disabled:Ke,limitDuration:dt})=>{const{values:{timeRangeTabs:ht}}=(0,d.useFormikContext)(),Pt=ht.absolute,{toUserTimezone:dn}=(0,_.A)(),[jt,nn]=(0,t.useState)(),Rn=p()(Pt.from).toDate(),Wn=dt?dn(new Date).seconds(-dt).toDate():void 0,xn=So=>{nn(So!=null?So:jt)};return t.createElement(ke,null,t.createElement(nt,{defaultActiveKey:"calendar",onSelect:xn,id:"absolute-time-ranges","data-testid":"absolute-time-ranges",activeKey:jt},t.createElement(m.As,{name:"Calendar"},t.createElement(Se,null,t.createElement(je,{startDate:Wn,timeRange:Pt,range:"from"})),t.createElement(Je,null,t.createElement(m.In,{name:"arrow_right_alt"})),t.createElement(Se,null,t.createElement(je,{startDate:Rn,timeRange:Pt,range:"to"}))),t.createElement(m.As,{name:"Timestamp"},t.createElement(Wt,null,t.createElement("p",null,"Date should be formatted as ",t.createElement("code",null,"YYYY-MM-DD [HH:mm:ss[.SSS]]"),"."),t.createElement(Le,null,t.createElement(Se,null,t.createElement(Ue,{disabled:Ke,timeRange:Pt,range:"from"})),t.createElement(Je,null,t.createElement(m.In,{name:"arrow_right_alt"})),t.createElement(Se,null,t.createElement(Ue,{disabled:Ke,timeRange:Pt,range:"to"})))))))};Fe.propTypes={disabled:s().bool,limitDuration:s().number},Fe.defaultProps={disabled:!1,limitDuration:0};const qe=Fe;var ut=e("DUKaTDO2"),ft=e("sWSSTOXR"),Ot=e.n(ft),Lt=e("7dh0vSOR"),an=e("E+CaPsQD"),Ft=e("yTnlRDNA"),rn=e("eZ5nxjAy"),$t=e("2MZA4BUT");const be=o.default.h3` margin-bottom: 5px; `,yn=(0,o.default)(E.FormControl)(({theme:Ke})=>(0,o.css)` min-height: 34px; font-size: ${Ke.fonts.size.large}; `),Kt=o.default.table` margin-bottom: 5px; td:first-child { padding-right: 10px; } `,An=(0,rn.A)((Ke,dt)=>Ft.A.testNaturalDate(Ke,dt),350),qt=({dateTime:Ke,isLoading:dt})=>!Ke||dt?t.createElement(t.Fragment,null,$t.o$):t.createElement(m.Dc,{dateTime:Ke,format:"complete"}),io=(Ke,dt)=>{const{data:ht,isFetching:Pt}=(0,ut.useQuery)(["time-range","validation","keyword",Ke],()=>An(Ke,dt),{retry:0,enabled:!!Ot()(Ke)});return{data:ht,isFetching:Pt}},Be=()=>{const[{value:{keyword:Ke}}]=(0,d.useField)("timeRangeTabs.keyword"),{userTimezone:dt}=(0,_.A)(),{data:ht,isFetching:Pt}=io(Ke,dt);return t.createElement(Kt,null,t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",null,"From"),t.createElement("td",null,t.createElement(qt,{dateTime:ht==null?void 0:ht.from,isLoading:Pt}))),t.createElement("tr",null,t.createElement("td",null,"To"),t.createElement("td",null,t.createElement(qt,{dateTime:ht==null?void 0:ht.to,isLoading:Pt})))))},bn=({disabled:Ke})=>t.createElement(E.Row,{className:"no-bm"},t.createElement(E.Col,{sm:5},t.createElement(be,null,"Time range:"),t.createElement(d.Field,{name:"timeRangeTabs.keyword.keyword"},({field:{name:dt,value:ht,onChange:Pt},meta:{error:dn}})=>t.createElement(E.FormGroup,{controlId:"form-inline-keyword",style:{marginRight:5,width:"100%",marginBottom:0},validationState:dn?"error":null},t.createElement(yn,{type:"text",className:"input-sm mousetrap",name:dt,disabled:Ke,placeholder:"Last week",title:"Keyword input","aria-label":"Keyword input",onChange:Pt,required:!0,value:ht}),t.createElement(m.QW,{error:dn,help:"Specify the time frame for the search in natural language."}))),t.createElement("b",null,"Preview"),t.createElement(Be,null)),t.createElement(E.Col,{sm:7},t.createElement(E.Panel,null,t.createElement(E.Panel.Body,null,t.createElement("p",null,t.createElement("code",null,"last month")," searches between one month ago and now"),t.createElement("p",null,t.createElement("code",null,"4 hours ago")," searches between four hours ago and now"),t.createElement("p",null,t.createElement("code",null,"1st of april to 2 days ago")," searches between 1st of April and 2 days ago"),t.createElement("p",null,t.createElement("code",null,"yesterday midnight +0200 to today midnight +0200")," searches between yesterday midnight and today midnight in timezone +0200 - will be 22:00 in UTC"),t.createElement("p",null,"Please consult the ",t.createElement(Lt.A,{page:an.A.PAGES.TIME_FRAME_SELECTOR,title:"Keyword Time Range Documentation",text:"documentation"})," for more details.")))));bn.propTypes={disabled:s().bool},bn.defaultProps={disabled:!1};const gn=bn;var wn=e("yDuYCNwc");const Vn=t.memo(({fieldName:Ke,unsetRange:dt,value:ht,onChange:Pt,disabled:dn,error:jt})=>t.createElement(wn.A,{id:`relative-timerange-${Ke}-value`,name:`relative-timerange-${Ke}-value`,disabled:dn||dt,type:"number",min:"1",value:ht===null?"":ht,className:"mousetrap",title:`Set the ${Ke} value`,onChange:Pt,bsStyle:jt?"error":null})),po=o.default.div` flex: 4; align-items: center; display: grid; grid-template-columns: max-content repeat(5, 1fr) max-content; grid-template-rows: repeat(2, 1fr) minmax(1.5em, auto); grid-gap: 0; `,De=o.default.div` grid-area: 2 / 1 / 3 / 3; position: relative; .form-group { margin: 0; } `,ln=(0,o.default)(m.l6)` grid-area: 2 / 3 / 3 / 7; margin: 0 12px; `,bt=o.default.h3` grid-area: 1 / 1 / 2 / 2; `,It=o.default.span(({theme:Ke})=>(0,o.css)` grid-area: 2 / 7 / 3 / 8; font-size: ${Ke.fonts.size.large}; &::after { content: 'ago'; } `),En=o.default.label(({theme:Ke})=>(0,o.css)` font-size: ${Ke.fonts.size.small}; grid-area: 1 / 2 / 2 / 8; margin-left: 15px; font-weight: normal; align-self: self-end; &.shortened { grid-area: 1 / 2 / 2 / 4; text-decoration: line-through; cursor: not-allowed; } input { margin-right: 6px; } `),Xt=o.default.span(({theme:Ke})=>(0,o.css)` color: ${Ke.colors.variant.dark.danger}; grid-area: 3 / 1 / 3 / 4; font-size: ${Ke.fonts.size.small}; font-style: italic; padding: 3px; `),Ye=Ke=>U.bz.map(({label:dt,type:ht})=>{const Pt=p().duration(1,ht).asSeconds();return Ke===0||Pt<=Ke?{label:dt,value:ht}:null}).filter(Boolean),At=({classifiedRange:Ke,defaultRange:dt,disableUnsetRange:ht,disabled:Pt,error:dn,fieldName:jt,limitDuration:nn,name:Rn,onChange:Wn,onUnsetRange:xn,title:So,unsetRangeLabel:zn})=>{const{initialValues:Ao}=(0,d.useFormikContext)(),Jo=Ye(nn),{isAllTime:Ko,value:fo,unit:$o}=Ke,es=t.useCallback(ts=>{Wn({target:{name:Rn,value:ts}})},[Rn,Wn]),vs=t.useCallback(ts=>{const ys=ts.target.value===""?null:ts.target.value;es({value:ys,isAllTime:Ko,unit:$o})},[es,$o,Ko]),Us=ts=>{es({value:fo,isAllTime:Ko,unit:ts})},ga=ts=>{var ds;const ys=ts.target.checked,qs=(0,O.Qy)(Ao.timeRangeTabs.relative)&&!((ds=Ao.timeRangeTabs.relative)!=null&&ds[jt].isAllTime)?Ao.timeRangeTabs.relative[jt]:dt;ys&&xn&&xn(),es(ys?O.RW:qs)};return t.createElement(po,null,t.createElement(bt,null,So),t.createElement(En,{htmlFor:`relative-unset-${jt}`,className:ht&&"shortened"},t.createElement("input",{checked:Ko,className:"mousetrap",disabled:ht,id:`relative-unset-${jt}`,onChange:ga,type:"checkbox",value:"0"}),zn),t.createElement(De,null,t.createElement(Vn,{disabled:Pt,error:dn,fieldName:jt,onChange:vs,unsetRange:Ko,value:fo})),t.createElement(ln,{clearable:!1,disabled:Pt||Ko,id:`relative-timerange-${jt}-unit`,inputProps:{className:"mousetrap"},name:`relative-timerange-${jt}-unit`,onChange:Us,options:Jo,placeholder:"Select a range length",value:$o}),t.createElement(It,null),dn&&t.createElement(Xt,null,dn))},Ct=({defaultRange:Ke,disableUnsetRange:dt,disabled:ht,fieldName:Pt,limitDuration:dn,onUnsetRange:jt,title:nn,unsetRangeLabel:Rn})=>t.createElement(d.Field,{name:`timeRangeTabs.relative.${Pt}`},({field:{value:Wn,onChange:xn,name:So},meta:{error:zn}})=>t.createElement(At,{classifiedRange:Wn,defaultRange:Ke,disableUnsetRange:dt,disabled:ht,error:zn,fieldName:Pt,limitDuration:dn,name:So,onUnsetRange:jt,onChange:xn,title:nn,unsetRangeLabel:Rn}));Ct.defaultProps={disabled:!1,disableUnsetRange:!1,onUnsetRange:void 0};const Bt=Ct,Ze=o.default.div` display: flex; align-items: center; flex-wrap: wrap; justify-content: space-around; `,gt=(0,o.default)(m.In)` flex: 0.75; `,cn=({disabled:Ke,limitDuration:dt})=>{const{values:{timeRangeTabs:ht},setFieldValue:Pt}=(0,d.useFormikContext)(),dn=ht.relative,jt=Ke||(0,h._b)(dn)&&dn.from===U.R$;return t.createElement("div",null,t.createElement(Ze,null,t.createElement(t.Fragment,null,t.createElement(Bt,{defaultRange:(0,O.Up)(U.GY),disableUnsetRange:dt!==0,disabled:Ke,fieldName:"from",limitDuration:dt,onUnsetRange:()=>{Pt("timeRangeTabs.relative.to",O.RW)},title:"From:",unsetRangeLabel:"All Time"}),t.createElement(gt,{name:"arrow_right_alt"}),t.createElement(Bt,{defaultRange:(0,O.jk)(U.Hf),disableUnsetRange:jt,disabled:jt,fieldName:"to",limitDuration:dt,title:"Until:",unsetRangeLabel:"Now"}))))};cn.propTypes={limitDuration:s().number,disabled:s().bool},cn.defaultProps={disabled:!1,limitDuration:0};const un=cn,_n=o.default.div` padding: 12px 6px; h5 { font-weight: bold; margin: 0 0 6px; } `,Ln=()=>t.createElement(_n,null,t.createElement("h5",null,"No Date/Time Override chosen."),t.createElement("p",null,"Use the tabs above to choose a Date & Time Range to Search.")),Xn={absolute:qe,relative:un,keyword:gn},no=(0,o.default)(E.Tabs)` margin-top: 1px; margin-bottom: 9px; `,Wo=({activeTab:Ke,limitDuration:dt,tabs:ht})=>U.Dm.filter(({type:Pt})=>ht.includes(Pt)).map(({type:Pt,name:dn})=>{const jt=Xn[Pt];return t.createElement(E.Tab,{title:dn,key:`time-range-type-selector-${Pt}`,eventKey:Pt},Pt===Ke&&t.createElement(jt,{disabled:!1,limitDuration:dt}))}),Co=Ke=>({absolute:{type:"absolute",from:Ke((0,Q.$4)(new Date).subtract(300,"seconds"),"complete"),to:Ke((0,Q.$4)(new Date),"complete")},relative:{type:"relative",from:{value:5,unit:"minutes",isAllTime:!1},to:O.RW},keyword:{type:"keyword",keyword:"Last five minutes"},disabled:void 0}),Fo=({activeTab:Ke,nextTab:dt,timeRangeTabs:ht,formatTime:Pt,defaultRanges:dn,userTimezone:jt})=>ht[dt]?ht[dt]:(0,h.Df)(ht[Ke])?k({oldTimeRange:ht[Ke],type:dt,formatTime:Pt,userTimezone:jt}):dn[dt],Mt=({limitDuration:Ke,validTypes:dt})=>{const ht=(0,c.A)(),Pt=(0,I.A)(),{formatTime:dn,userTimezone:jt}=(0,_.A)(),{setValues:nn,values:{activeTab:Rn,timeRangeTabs:Wn}}=(0,d.useFormikContext)(),xn=(0,t.useMemo)(()=>Co(dn),[dn]),So=(0,t.useCallback)(Ao=>{nn({timeRangeTabs:{...Wn,[Ao]:Fo({activeTab:Rn,nextTab:Ao,timeRangeTabs:Wn,formatTime:dn,defaultRanges:xn,userTimezone:jt})},activeTab:Ao}),ht(M.g.SEARCH_TIMERANGE_PICKER_TAB_SELECTED,{app_pathname:(0,P.i)(Pt.pathname),app_section:"search-bar",app_action_value:"search-time-range",event_details:{tab:Ao}})},[Rn,xn,dn,Pt.pathname,ht,nn,Wn,jt]),zn=(0,t.useMemo)(()=>Wo({activeTab:Rn,limitDuration:Ke,tabs:dt}),[Rn,Ke,dt]);return t.createElement(no,{id:"dateTimeTypes",defaultActiveKey:U.Dm[0].type,activeKey:Rn!=null?Rn:-1,onSelect:So,animation:!1},zn,!Rn&&t.createElement(Ln,null))};var Rt=e("d4iC/0eA"),fn=e("rKq6XZKM");const Dn=(0,o.default)(m.In)` margin-left: 6px; `,kn=(0,o.default)(E.MenuItem)(({theme:Ke})=>(0,o.css)` font-size: ${Ke.fonts.size.small}; `),ro=Ke=>{switch(Ke.type){case"relative":return(0,h._b)(Ke)?Ke.from:Ke.range;case"absolute":return p()().diff(Ke.from,"seconds");case"keyword":return Ft.A.testNaturalDate(Ke.keyword,Ke.timezone).then(({from:dt})=>p()().diff(dt,"seconds"));default:throw Error("Time range type doesn't not exist")}},Gn=async(Ke,dt)=>(await Promise.all(Ke==null?void 0:Ke.map(async Pt=>{const dn=await ro(Pt.timerange);return dn&&dn<=dt?Pt:null}))).filter(Pt=>!!Pt),vo=async(Ke,dt,ht)=>{const Pt=dt?await Gn(Ke,dt):Ke;return Pt!=null&&Pt.length?Pt.map(({description:dn,timerange:jt,id:nn})=>({eventKey:jt,key:`timerange-option-${nn}`,disabled:ht,label:dn})):[{disabled:!0,label:"No available presets",key:"no-available-presets"}]},yo=Ke=>{const{config:dt}=(0,Rt.A)(),[ht,Pt]=(0,t.useState)(),dn=(0,t.useMemo)(()=>p().duration(dt==null?void 0:dt.query_time_range_limit).asSeconds(),[dt==null?void 0:dt.query_time_range_limit]),jt=(0,t.useCallback)(async()=>{Pt(await vo(dt==null?void 0:dt.quick_access_timerange_presets,dn,Ke))},[dt==null?void 0:dt.quick_access_timerange_presets,Ke,dn]);return{options:ht,setOptions:jt}},lo=({disabled:Ke,onChange:dt,onToggle:ht,className:Pt,displayTitle:dn,bsSize:jt,header:nn})=>{const Rn=(0,c.A)(),{formatTime:Wn}=(0,_.A)(),xn=(0,I.A)(),{options:So,setOptions:zn}=yo(Ke),Ao=(0,t.useCallback)(fo=>{fo!=null&&dt((0,fn.Z)(fo,Wn)),Rn(M.g.SEARCH_TIMERANGE_PRESET_SELECTED,{app_pathname:(0,P.i)(xn.pathname),app_section:"search-bar",app_action_value:"timerange-preset-selector",event_details:{timerange:fo}})},[Wn,xn.pathname,dt,Rn]),Jo=(0,t.useCallback)(async fo=>{typeof ht=="function"&&ht(fo)},[ht]),Ko=(0,t.useCallback)(async()=>{await zn()},[zn]);return t.createElement(E.DropdownButton,{title:dn&&"Load Preset",id:"relative-timerange-selector","aria-label":"Open time range preset select",bsSize:jt,className:Pt,onToggle:Jo,onMouseDown:Ko},nn&&t.createElement(E.MenuItem,{header:!0},nn),So?So.map(({eventKey:fo,key:$o,disabled:es,label:vs})=>t.createElement(E.MenuItem,{key:$o,disabled:es,onClick:()=>Ao(fo)},vs)):t.createElement(E.MenuItem,{eventKey:"loading",key:"loading",disabled:!0},"Loading..."),t.createElement(m.Wj,{permissions:"clusterconfigentry:edit"},t.createElement(E.MenuItem,{divider:!0}),t.createElement(kn,{href:"/system/configurations",target:"_blank"},"Configure presets ",t.createElement(Dn,{name:"open_in_new"}))))};lo.propTypes={bsSize:s().string,className:s().string,disabled:s().bool,displayTitle:s().bool,header:s().string,onChange:s().func,onToggle:s().func},lo.defaultProps={bsSize:"small",className:void 0,disabled:!1,onChange:void 0,onToggle:void 0,header:void 0,displayTitle:!0};const Jn=lo;var Yn=e("+KM7MH1U"),Gt=e.n(Yn),tn=e("ibdPvtmL"),Qt=e("i+sOEQiN"),Bn=e("ty2gyrHp"),co=e("d4kzUuQm"),$n=e("iltCXley");const To=(0,o.default)(m.E6)` margin-top: 15px; `,xo=(Ke,dt)=>Ke.type!==dt.type?!1:Ke.type==="keyword"?Ke.keyword===dt.keyword:Gt()(Ke,dt),Ps=({description:Ke})=>Ke?{}:{description:"Description is required"},bo=({children:Ke,addTimerange:dt,toggleModal:ht,show:Pt})=>{const{userTimezone:dn}=(0,_.A)(),{config:jt}=(0,Rt.A)(),{values:{timeRangeTabs:nn,activeTab:Rn}}=(0,d.useFormikContext)(),Wn=nn[Rn],xn=(0,t.useMemo)(()=>{var zn;return(zn=jt==null?void 0:jt.quick_access_timerange_presets)==null?void 0:zn.find(Ao=>xo(Ao.timerange,(0,A.So)((0,A.mP)(Wn),dn)))},[jt,Wn,dn]),So=({description:zn})=>dt(zn);return t.createElement(l.A,{position:"left",withArrow:!0,opened:Pt},t.createElement(l.A.Target,null,Ke),t.createElement(l.A.Dropdown,{title:"Save as preset",id:"time-range-preset-popover","data-testid":"time-range-preset-popover"},t.createElement(d.Formik,{onSubmit:So,initialValues:{description:""},validate:Ps},({isValid:zn,submitForm:Ao})=>t.createElement(d.Form,null,t.createElement(m.jF,{type:"text",name:"description",id:"time-range-preset-description",placeholder:"Add description...","aria-label":"Time range description",formGroupClassName:""}),!!xn&&t.createElement("p",null,t.createElement(m.In,{name:"warning"}),"You already have similar time range in"," ",t.createElement(Bn.N,{to:co.Ay.SYSTEM.CONFIGURATIONS,target:"_blank"},"Range configuration"),t.createElement("br",null),t.createElement("i",null,"(",xn.description,")")),t.createElement(To,{disabledSubmit:!zn,submitButtonType:"button",onSubmit:Ao,submitButtonText:"Save preset",isAsyncSubmit:!1,displayCancel:!0,onCancel:ht,bsSize:"small"})))))},No=()=>{var Ke;const{userTimezone:dt}=(0,_.A)(),{values:{timeRangeTabs:ht,activeTab:Pt},errors:dn}=(0,d.useFormikContext)(),jt=(0,t.useRef)(),nn=ht[Pt],{config:Rn,refresh:Wn}=(0,Rt.A)(),[xn,So]=(0,t.useState)(!1),zn=(0,c.A)(),Ao=!((Ke=dn.timeRangeTabs)!=null&&Ke[Pt]),Jo=(0,t.useCallback)(()=>{So(fo=>!fo)},[]),Ko=(0,t.useCallback)(fo=>{const $o={description:fo,timerange:nn?(0,A.So)((0,A.mP)(nn),dt):U.IV,id:(0,$n.A)()};tn.t.update(Qt.H.SEARCHES_CLUSTER_CONFIG,{...Rn,quick_access_timerange_presets:[...Rn.quick_access_timerange_presets,$o]}).then(()=>{Wn(),Jo()}),$o&&zn(M.g.SEARCH_TIMERANGE_PRESET_ADD_QUICK_ACCESS,{app_pathname:"search",app_section:"search-bar",event_details:{timerange:$o.timerange,id:$o.id}})},[Rn,Wn,zn,nn,Jo,dt]);return t.createElement(bo,{show:xn,addTimerange:Ko,toggleModal:Jo},t.createElement(E.Button,{disabled:!Ao,title:"Save current time range as preset",ref:jt,bsSize:"small",onClick:Jo},"Save as preset"))},fs=(0,o.default)(E.ButtonToolbar)` float: right; margin-top: 6px; `,Ds=Ke=>(0,h.FW)(Ke)?(0,O.bi)(Ke):Ke,hs=()=>{const{showAddToQuickListButton:Ke}=(0,t.useContext)(g.A),{showPresetsButton:dt}=(0,t.useContext)(g.A),{values:ht,setValues:Pt}=(0,d.useFormikContext)(),{activeTab:dn,timeRangeTabs:jt}=ht,nn=(0,t.useCallback)(Rn=>{Pt({...ht,timeRangeTabs:{...ht.timeRangeTabs,[Rn.type]:Ds(Rn)},activeTab:Rn.type})},[Pt,ht]);return t.createElement(fs,null,Ke&&(0,h.Df)(jt[dn])&&t.createElement(m.Wj,{permissions:"clusterconfigentry:edit"},t.createElement(No,null)),dt&&t.createElement(Jn,{onChange:nn}))},Cs=Object.keys(Xn),$s=o.default.p(({theme:Ke})=>(0,o.css)` font-size: ${Ke.fonts.size.small}; padding-left: 3px; margin: 0; min-height: 34px; display: flex; align-items: center; `),Ts=o.default.span` display: flex; justify-content: space-between; align-items: center; > span { font-weight: 600; } `,re=o.default.span(({theme:Ke})=>(0,o.css)` > svg { margin-right: 3px; color: ${Ke.colors.variant.dark.warning}; } > span { font-size: ${Ke.fonts.size.small}; color: ${Ke.colors.variant.darkest.warning}; } `),we=async(Ke,dt,ht,Pt)=>{if(!Ke)return{};const dn=(0,O.Q_)(Ke),jt=await(0,C.A)(dn,dt,ht,Pt);return Object.keys(jt).length!==0?{timeRangeTabs:{[Ke.type]:jt}}:{}},et=Ke=>(0,h.Df)(Ke)?{timeRangeTabs:{[Ke.type]:(0,h.FW)(Ke)?(0,O.bi)(Ke):Ke},activeTab:Ke.type}:{timeRangeTabs:{},activeTab:void 0},Et=({children:Ke,show:dt,noOverride:ht,toggleDropdownShow:Pt,currentTimeRange:dn,setCurrentTimeRange:jt,validTypes:nn=Cs,position:Rn,limitDuration:Wn,withinPortal:xn})=>{const{ignoreLimitDurationInTimeRangeDropdown:So}=(0,t.useContext)(g.A),zn=(0,t.useMemo)(()=>So?0:Wn,[Wn,So]),{formatTime:Ao,userTimezone:Jo}=(0,_.A)(),Ko=(0,c.A)(),fo=(0,I.A)(),$o=(0,t.useCallback)(()=>{jt({}),Pt()},[jt,Pt]),es=(0,t.useCallback)(()=>{Pt(),Ko(M.g.SEARCH_TIMERANGE_PICKER_CANCELED,{app_pathname:(0,P.i)(fo.pathname),app_section:"search-bar",app_action_value:"search-time-range-cancel-button"})},[fo.pathname,Ko,Pt]),vs=(0,t.useCallback)(({timeRangeTabs:ds,activeTab:ys})=>{const Ns=(0,A.mP)(ds[ys]);jt(Ns),Pt(),Ko(M.g.SEARCH_TIMERANGE_PICKER_UPDATED,{app_pathname:(0,P.i)(fo.pathname),app_section:"search-bar",app_action_value:"search-time-range-confirm-button",event_details:{timerange:Ns}})},[fo.pathname,Ko,jt,Pt]),Us=t.createElement(Ts,null,t.createElement("span",null,"Search Time Range"),zn>0&&t.createElement(re,null,t.createElement(m.In,{name:"warning"}),t.createElement("span",null,"Admin has limited searching to ",p().duration(-zn,"seconds").humanize(!0)))),ga=(0,t.useCallback)(({timeRangeTabs:ds,activeTab:ys})=>we(ds[ys],zn,Ao,Jo),[Ao,zn,Jo]),ts=(0,t.useMemo)(()=>et(dn),[dn]);return t.createElement(l.A,{id:"timerange-type","data-testid":"timerange-type",opened:dt,position:Rn,withinPortal:xn,withArrow:!0,width:735,zIndex:1060},t.createElement(l.A.Target,null,Ke),t.createElement(l.A.Dropdown,{title:Us},t.createElement(d.Formik,{initialValues:ts,validate:ga,onSubmit:vs,validateOnMount:!0},({isValid:ds,submitForm:ys,isValidating:Ns})=>t.createElement(m.gw,{shortcuts:[{actionKey:"submit-form",callback:ys,scope:"general",options:{displayInOverview:!1}},{actionKey:"close-modal",callback:es,scope:"general",options:{displayInOverview:!1}}]},t.createElement(m.mK,null,t.createElement(E.Row,null,t.createElement(E.Col,{md:12},t.createElement(hs,null),t.createElement(Mt,{limitDuration:zn,validTypes:nn}))),t.createElement(E.Row,{className:"row-sm"},t.createElement(E.Col,{md:6},t.createElement($s,null,"All timezones using: ",t.createElement("b",null,Jo))),t.createElement(E.Col,{md:6},t.createElement(m.E6,{leftCol:ht&&t.createElement(E.Button,{bsStyle:"link",onClick:$o},"No Override"),onCancel:es,disabledSubmit:!ds||Ns,submitButtonText:"Update time range"}))))))))};Et.defaultProps={noOverride:!1,validTypes:Cs,withinPortal:!0};const Ut=Et;var Pn=e("OQnHlPS/"),qn=e("qC/AOIKG");const Fn=(0,o.default)(Jn)` padding: 6px 5px 6px 6px; `,jn=(0,o.default)(E.ButtonGroup)` display: flex; align-items: start; width: ${Pn.v}px; `,go=({disabled:Ke,hasErrorOnMount:dt,onPresetSelectOpen:ht,setCurrentTimeRange:Pt,showPresetDropdown:dn=!0,toggleShow:jt})=>{const{submitForm:nn,isValid:Rn}=(0,d.useFormikContext)(),Wn=zn=>{zn.currentTarget.blur(),jt()},xn=zn=>{Pt((0,A.D8)(zn)),Rn&&nn()},So=zn=>{zn&&ht()};return t.createElement(jn,null,t.createElement(qn.A,{hasError:dt,disabled:Ke,onClick:Wn}),dn&&t.createElement(Fn,{disabled:Ke,displayTitle:!1,onChange:xn,onToggle:So,header:"Select time range",bsSize:null}))};go.defaultProps={hasErrorOnMount:!1,disabled:!1,showPresetDropdown:!0};const Eo=go,Lo=o.default.div` display: flex; align-items: stretch; justify-content: space-between; flex: 1; min-width: 430px; gap: ${n.uE}; position: relative; `,Mn=({disabled:Ke,hasErrorOnMount:dt,noOverride:ht,value:Pt=U.IV,onChange:dn,validTypes:jt,position:nn,className:Rn,showPresetDropdown:Wn=!0,limitDuration:xn,withinPortal:So})=>{const zn=(0,t.useRef)(),{showDropdownButton:Ao}=(0,t.useContext)(g.A),Jo=(0,c.A)(),Ko=(0,I.A)(),[fo,$o]=(0,t.useState)(!1);if(jt&&Pt&&"type"in Pt&&!jt.includes(Pt==null?void 0:Pt.type))throw new Error(`Value is of type ${Pt.type}, but only these types are valid: ${jt}`);const es=()=>{$o(!fo),Jo(M.g.SEARCH_TIMERANGE_PICKER_TOGGLED,{app_pathname:(0,P.i)(Ko.pathname),app_section:"search-bar",app_action_value:"time-range-picker",event_details:{showing:!fo}})},vs=()=>fo&&es();return t.createElement(Ut,{show:fo,currentTimeRange:Pt,limitDuration:xn,noOverride:ht,setCurrentTimeRange:dn,toggleDropdownShow:es,validTypes:jt,position:nn,withinPortal:So},t.createElement(Lo,{className:Rn,ref:zn},Ao&&t.createElement(Eo,{disabled:Ke,toggleShow:es,onPresetSelectOpen:vs,setCurrentTimeRange:dn,showPresetDropdown:Wn,hasErrorOnMount:dt}),t.createElement($t.Ay,{timerange:Pt,toggleDropdownShow:es})))};Mn.propTypes={className:s().string,disabled:s().bool,hasErrorOnMount:s().bool,noOverride:s().bool,validTypes:s().arrayOf(s().string),withinPortal:s().bool},Mn.defaultProps={className:void 0,disabled:!1,hasErrorOnMount:!1,noOverride:!1,validTypes:void 0,position:"bottom-start",showPresetDropdown:!0,withinPortal:!0};const ko=Mn},Y15zKX1V:(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("IOI9nV80"),c=e("rIl5IEuP"),g=e("IZYxBTgT"),d=e("O/XpfGnR");const f=o.default.div` width: 100%; .form-group { margin: 0; } `,p=({name:l,disabled:m,onChange:h,value:A,hasError:C,className:_})=>{const{formatTime:P}=(0,d.A)(),I=()=>h(P(new Date,"complete")),M=O=>h(O.target.value);return t.createElement(f,{className:_},t.createElement(c.Input,{type:"text",id:`date-input-${l}`,name:l,autoComplete:"off",disabled:m,onChange:M,placeholder:g.wT.default,value:A,buttonAfter:t.createElement(c.Button,{disabled:m,onClick:I,title:"Insert current date"},t.createElement(n.In,{name:"calendar_clock"})),className:"mousetrap",bsStyle:C?"error":null}))};p.propTypes={disabled:s().bool,hasError:s().bool,name:s().string.isRequired,onChange:s().func,value:s().string},p.defaultProps={className:void 0,disabled:!1,hasError:!1,onChange:()=>{},value:""};const E=p},z45xmHGk:(x,y,e)=>{"use strict";e.d(y,{CW:()=>l,Q_:()=>m,Qy:()=>E,RW:()=>c,Up:()=>d,bi:()=>p,jk:()=>f});var t=e("9oVghaOd"),r=e.n(t),s=e("nxMFMmDQ"),o=e("PwTFiGSp");const n={value:5,unit:"minutes",isAllTime:!1},c={value:0,unit:"seconds",isAllTime:!0},g=(h,A)=>h===null?n:h===A?c:s.bz.map(({type:C})=>{const _=r().duration(h,"seconds").as(C);return _-Math.floor(_)===0?{value:_||0,unit:C,isAllTime:!1}:null}).filter(Boolean).pop(),d=h=>g(h,s.R$),f=h=>g(h,void 0),p=h=>(0,o.r1)(h)?{type:"relative",from:d(h.range),to:f(void 0)}:{type:"relative",from:d(h.from),to:f(h.to)},E=h=>h&&"type"in h&&h.type==="relative"&&"from"in h&&typeof(h==null?void 0:h.from)=="object"&&"to"in h&&typeof h.to=="object",l=({value:h,unit:A,isAllTime:C})=>C?s.R$:r().duration(h||1,A).asSeconds(),m=h=>{if(E(h)){const A=h.from.value!==null?l(h.from):null,C=h.to.value!==null?l(h.to):null;return h.to.isAllTime?{type:"relative",from:A}:{type:"relative",from:A,to:C}}return h}},"qC/AOIKG":(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("rIl5IEuP"),o=e("IOI9nV80");const n=(0,r.default)(s.Button)` padding: 6px 10px; `,c=({hasError:d,disabled:f,onClick:p})=>t.createElement(n,{bsStyle:d?"danger":"info",disabled:f,onClick:p,"aria-label":"Open Time Range Selector"},t.createElement(o.In,{name:d?"warning":"schedule"}));c.defaultProps={hasError:!1,disabled:!1,onClick:void 0};const g=c},i3LesQt8:(x,y,e)=>{"use strict";e.d(y,{A:()=>G});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("IOI9nV80"),c=e("jlRcBdjT"),g=e("dFpwyWHg"),d=e.n(g),f=e("C2ikvoS0"),p=e.n(f),E=e("1IntWRSu"),l=e.n(E),m=e("8nGWeFnd"),h=e.n(m),A=e("TeAcaicX"),C=e.n(A),_=e("eE3+5goe"),P=e.n(_),I=e("d39qUqyh"),M={};M.styleTagTransform=P(),M.setAttributes=h(),M.insert=l().bind(null,"head"),M.domAPI=p(),M.insertStyleElement=C();var O=d()(I.A,M);const U=I.A&&I.A.locals?I.A.locals:void 0,W=k=>{switch(k){case"string":return"text_fields";case"boolean":return"toggle_on";case"byte":case"double":case"float":case"int":case"long":case"short":return"show_chart";case"date":return"event";case"ip":return"lan";case"node":return"network_node";case"streams":return"fork_right";case"input":return"cell_tower";default:return"help"}},K=o.default.div` display: inline-flex; min-width: 20px; justify-content: center; align-items: center; vertical-align: -2px; `,j=({type:k,monospace:Q})=>{const ne=t.createElement(n.In,{name:W(k.type),className:U.fieldTypeIcon});return Q?t.createElement(K,null,ne):ne};j.propTypes={type:s().instanceOf(c.Ay).isRequired,monospace:s().bool},j.defaultProps={monospace:!0};const G=j},gajRAEyE:(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("n/pWmEhD"),r=e.n(t),s=e("ww+BtWnX"),o=e.n(s);const n=d=>{const f=d.map(([E])=>E),p=d.map(([,E])=>E);return s.scale(p).domain(f)},g=d=>{switch(d){case"Blackbody":case"Bluered":case"Cividis":case"Earth":case"Electric":case"Hot":case"Jet":case"Picnic":case"Portland":case"Rainbow":return n(t.scales[d]);default:return s.scale(d)}}},G0W2UiZR:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS"),s=e("oxGoxcS7");const o=t.createContext({colors:s.A.create(),setColor:()=>Promise.resolve([])}),n=(0,r.Gr)("views.components.visualizations.ChartColorContext",()=>o)},oxGoxcS7:(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("VPaD/Np4"),r=e.n(t),s=e("e50u4lQu"),o=e("b2fGY8bZ");class n{constructor(f=(0,t.Map)(),p=-1){this._value=f,this._currentDefaultColor=p}_incrementColor(){this._currentDefaultColor=(this._currentDefaultColor+1)%s.s.length}_nextFreeColor(){return this._incrementColor(),s.s[this._currentDefaultColor]}get(f,p){const E=this._value.get(f);if(E)return f!==o.Nc&&this._incrementColor(),E;if(p)return f!==o.Nc&&this._incrementColor(),this._value=this._value.set(f,p),p;const l=this._nextFreeColor();return this._value=this._value.set(f,l),l}set(f,p){this._value=this._value.set(f,p)}toBuilder(){return new c(this._value,this._currentDefaultColor)}static builder(){return new c}static create(f=(0,t.Map)()){return new n(f)}}class c{constructor(f=(0,t.Map)(),p=-1){this.value=f,this.colorIndex=p}set(f,p){return new c(this.value.set(f,p))}build(){return new n(this.value,this.colorIndex)}}const g=n},e50u4lQu:(x,y,e)=>{"use strict";e.d(y,{T:()=>M,s:()=>O});const t=["#b71c1c","#ce5246","#e27c72","#f3a4a1","#ffcdd2"],r=["#880e4f","#a5426d","#c16b8d","#dd93ae","#f8bbd0"],s=["#4a148c","#7240a3","#9869b9","#bc93d0","#e1bee7"],o=["#311b92","#6044a8","#876dbe","#ad98d3","#d1c4e9"],n=["#1a237e","#4e4998","#7772b3","#9e9dce","#c5cae9"],c=["#0d47a1","#4b6ab7","#738fce","#97b5e4","#bbdefb"],g=["#01579b","#4478b3","#6b9bcb","#8fbfe3","#b3e5fc"],d=["#006064","#3a8185","#62a3a8","#8ac6cc","#b2ebf2"],f=["#004d40","#356f64","#5e9389","#87b8b1","#b2dfdb"],p=["#194d33","#447155","#6e967a","#9abda1","#c8e6c9"],E=["#33691e","#5d8947","#87a970","#b1cb9b","#dcedc8"],l=["#827717","#9e9544","#bab36d","#d5d398","#f0f4c3"],m=["#f57f17","#fd9e48","#ffbe73","#ffdc9c","#fff9c4"],h=["#ff6f00","#ff943f","#ffb368","#ffd08e","#ffecb3"],A=["#e65100","#f17837","#fa9c5f","#febe88","#ffe0b2"],C=["#bf360c","#d35f39","#e58463","#f4a88f","#ffccbc"],_=["#3e2723","#624c48","#877470","#af9f9b","#d7ccc8"],P=["#263238","#4c575d","#758085","#a1abb0","#cfd8dc"],M=[t,r,s,o,n,c,g,d,f,p,E,l,m,h,A,C,_,P,["#000000","#3b3b3b","#777777","#b9b9b9","#ffffff"]],O=[g[1],m[1],E[1],t[1],s[1],_[1],r[1],m[3],d[3],n[0],A[0],f[0],o[0],P[2],s[4],C[0]]},"9RXNqxkm":(x,y,e)=>{"use strict";e.d(y,{A:()=>at});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("wXrUUKFq"),c=e.n(n),g=e("3+X6e5zE"),d=e("b2fGY8bZ"),f=e("CCNXj2ra"),p=e("G0W2UiZR"),E=e("dFpwyWHg"),l=e.n(E),m=e("C2ikvoS0"),h=e.n(m),A=e("1IntWRSu"),C=e.n(A),_=e("8nGWeFnd"),P=e.n(_),I=e("TeAcaicX"),M=e.n(I),O=e("eE3+5goe"),U=e.n(O),W=e("lM0K4xME"),K={};W.A&&W.A.locals&&(K.locals=W.A.locals);var j=0,G,k={};k.styleTagTransform=U(),k.setAttributes=P(),k.insert=C().bind(null,"head"),k.domAPI=h(),k.insertStyleElement=M(),K.use=function(ze){return k.options=ze||{},j++||(G=l()(W.A,k)),K},K.unuse=function(){j>0&&!--j&&(G(),G=null)};const Q=K;var ne=e("GFJVQ2dX"),z=e("pLyxMSSz");const le=(0,o.default)(g.A)(({theme:ze})=>(0,o.css)` .hoverlayer .hovertext { rect { fill: ${ze.colors.global.contentBackground} !important; opacity: 0.9 !important; } .name { fill: ${ze.colors.global.textDefault} !important; } path { stroke: ${ze.colors.global.contentBackground} !important; } } `),V={yaxis:{fixedrange:!0},xaxis:{fixedrange:!0},hovermode:!1},me={height:"100%",width:"100%"},Pe={displayModeBar:!1,doubleClick:!1,responsive:!0};class Ve extends t.Component{constructor(he){super(he),this._onRelayout=Ie=>{if(!Ie.autosize&&Ie["xaxis.range[0]"]&&Ie["xaxis.range[1]"]){const{onZoom:Re}=this.props,ce=Ie["xaxis.range[0]"],Ee=Ie["xaxis.range[1]"];return Re(ce,Ee)}return!0},this.state={}}componentDidMount(){Q.use()}componentWillUnmount(){Q.unuse()}render(){const{chartData:he,layout:Ie,setChartColor:Re,theme:ce}=this.props,Ee={color:ce.colors.global.textDefault,size:f.ZO*Number(ce.fonts.size.small.replace(/rem|em/i,"")),family:ce.fonts.family.body},oe={shapes:[],autosize:!0,showlegend:!1,margin:{t:10,l:40,r:10,b:0,pad:0},legend:{orientation:"h",font:Ee},hoverlabel:{namelength:-1},paper_bgcolor:"transparent",plot_bgcolor:"transparent",title:{font:Ee},yaxis:{automargin:!0,gridcolor:ce.colors.variant.lightest.default,tickfont:Ee,title:{font:Ee}},xaxis:{automargin:!0,tickfont:Ee,title:{font:Ee}}},ae=c()({},oe,Ie);return t.createElement(p.A.Consumer,null,({colors:ye})=>{ae.shapes=ae.shapes.map(ve=>{var _e;return{...ve,line:{color:((_e=ve==null?void 0:ve.line)==null?void 0:_e.color)||ye.get(d.Nc,d.XU)}}});const Oe=he.map(ve=>{if(Re&&ye){const _e=Re(ve,ye);if(ve.type==="pie"&&(_e.outsidetextfont={color:ce.colors.global.textDefault}),(ve==null?void 0:ve.name)===d.Nc){const He=ye.get(d.Nc,d.XU);_e.marker={color:He,size:5}}return _e.line||_e.marker?c()(ve,_e):ve}return ve});return t.createElement(ne.A.Consumer,null,ve=>t.createElement(z.A.Consumer,null,_e=>t.createElement(le,{data:Oe,useResizeHandler:!0,layout:ve?ae:c()({},V,ae),style:me,onAfterPlot:_e,onClick:ve?null:()=>!1,onRelayout:ve?this._onRelayout:()=>!1,config:Pe})))})}}Ve.propTypes={chartData:s().array.isRequired,layout:s().object,onZoom:s().func,setChartColor:s().func},Ve.defaultProps={layout:{},onZoom:()=>!0,setChartColor:void 0};const at=(0,o.withTheme)(Ve)},"3+X6e5zE":(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("8jTixuP6");const s=(0,t.A)(()=>Promise.all([e.e("bb8c8232-9421"),e.e("bb8c8232-5062")]).then(e.bind(e,"EnVHAx3T")))},"9FNnmA1r":(x,y,e)=>{"use strict";e.d(y,{A:()=>k});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("IOI9nV80"),c=e("O+BThgTi"),g=e("dFpwyWHg"),d=e.n(g),f=e("C2ikvoS0"),p=e.n(f),E=e("1IntWRSu"),l=e.n(E),m=e("8nGWeFnd"),h=e.n(m),A=e("TeAcaicX"),C=e.n(A),_=e("eE3+5goe"),P=e.n(_),I=e("BcnLA9qD"),M={};M.styleTagTransform=P(),M.setAttributes=h(),M.insert=l().bind(null,"head"),M.domAPI=p(),M.insertStyleElement=C();var O=d()(I.A,M);const U=I.A&&I.A.locals?I.A.locals:void 0,W=o.default.div` max-width: 700px; `,K=o.default.ul` padding: 0; `,j=o.default.div` margin-bottom: 5px; &:last-child { margin-bottom: 0; } `,G=({errors:Q,title:ne})=>t.createElement(n.ov,null,t.createElement(n.In,{name:"warning",size:"3x",className:U.iconMargin}),t.createElement(W,null,t.createElement(j,null,t.createElement("strong",null,ne)),t.createElement(K,null,Q.map(z=>t.createElement(j,{as:"li",key:z.description},z.description)))));G.propTypes={errors:c.KZ.isRequired,title:s().string},G.defaultProps={title:"While retrieving data for this widget, the following error(s) occurred:"};const k=G},GrokUsBg:(x,y,e)=>{"use strict";e.d(y,{A:()=>h});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("IOI9nV80"),o=e("AKYezHev"),n=e("M04itGxI");const c=r.default.div` display: flex; justify-content: space-between; align-items: center; margin-top: 3px; `,g=(0,r.default)(o.A)` flex: 1; `,d=(0,r.default)(n.A)` flex: 1; `,f=r.default.div` display: flex; align-items: center; justify-content: center; min-height: 25px; margin-right: 5px; `,p=(0,t.forwardRef)(({selectSize:A,className:C,dragHandleProps:_,draggableProps:P,item:I,onChange:M,onRemove:O,selectedFields:U,testIdPrefix:W},K)=>{const[j,G]=(0,t.useState)(!1),k=Q=>{M(Q),G(!1)};return t.createElement(c,{className:C,ref:K,...P!=null?P:{}},j&&t.createElement(g,{id:"add-field-select",onChange:k,onMenuClose:()=>G(!1),autoFocus:!0,openMenuOnFocus:!0,clearable:!1,size:A,excludedFields:U.filter(Q=>Q!==I.id),ariaLabel:"Fields",name:"add-field-select",value:I.id,"aria-label":`Edit ${I.title} field`}),!j&&t.createElement(t.Fragment,null,t.createElement(f,{..._,"data-testid":`${W}-drag-handle`},t.createElement(s.In,{name:"drag_indicator"})),t.createElement(d,null,I.title),t.createElement("div",null,t.createElement(s.K0,{name:"edit_square",title:`Edit ${I.title} field`,onClick:()=>G(!0)}),t.createElement(s.K0,{name:"delete",title:`Remove ${I.title} field`,onClick:O}))))}),E=({testPrefix:A,selectedFields:C,onChange:_,selectSize:P,displayOverlayInPortal:I})=>{const M=(0,t.useMemo)(()=>C==null?void 0:C.map(j=>({id:j,title:j})),[C]),O=(0,t.useCallback)((j,G)=>{const k=[...C];k[j]=G,_(k)},[_,C]),U=(0,t.useCallback)(j=>{const G=C.filter(k=>k!==j);_(G)},[_,C]),W=(0,t.useCallback)(({item:j,index:G,dragHandleProps:k,draggableProps:Q,className:ne,ref:z})=>t.createElement(p,{onChange:le=>O(G,le),onRemove:()=>U(j.id),selectSize:P,selectedFields:C!=null?C:[],item:j,testIdPrefix:`${A}-field-${G}`,dragHandleProps:k,draggableProps:Q,className:ne,ref:z}),[P,C,A,O,U]),K=(0,t.useCallback)(j=>{_(j.map(({id:G})=>G))},[_]);return C!=null&&C.length?t.createElement(s.bH,{items:M,onMoveItem:K,customListItemRender:W,displayOverlayInPortal:I}):null};E.defaultProps={displayOverlayInPortal:!1,testPrefix:void 0,selectSize:void 0};const l=E,m=({createSelectPlaceholder:A,displaySortableListOverlayInPortal:C,menuPortalTarget:_,onChange:P,isFieldQualified:I,selectSize:M,selectedFields:O,testPrefix:U})=>{const W=(0,t.useCallback)(K=>P([...O,K]),[P,O]);return t.createElement(t.Fragment,null,t.createElement(l,{testPrefix:U,selectedFields:O,selectSize:M,displayOverlayInPortal:C,onChange:P}),t.createElement(o.A,{id:"field-create-select",onChange:W,clearable:!1,isFieldQualified:I,persistSelection:!1,name:"field-create-select",value:void 0,size:M,menuPortalTarget:_,excludedFields:O!=null?O:[],placeholder:A,ariaLabel:A}))};m.defaultProps={createSelectPlaceholder:"Add a field",displaySortableListOverlayInPortal:!1,isFieldQualified:void 0,selectSize:void 0,menuPortalTarget:void 0,testPrefix:""};const h=m},pLyxMSSz:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=t.createContext(()=>{}),o=(0,r.Gr)("views.components.widgets.RenderCompletionCallback",()=>s)},hfAjrXHN:(x,y,e)=>{"use strict";e.d(y,{A:()=>C,d:()=>h});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("oCSEoDew"),o=e.n(s),n=e("Ofda/4py"),c=e("u2QUEJU3"),g=e("/8lbhT5j"),d=e("7GNmVOX8"),f=e("CHWvwBKE"),p=e("iltCXley");const E=r.default.a` display: inline-flex; align-items: center; color: inherit; text-decoration: none; &:visited { color: inherit; } `,l=(0,r.default)(c.A)` margin-left: 6px; `,m=(_,P,I,M,O)=>{let U=g.A.builder().query((0,f.P$)(I)).timerange(P).streams(M).build().toURL();return O!=null&&O.size&&(U=new(o())(U).setSearch("session-id",_).toString()),U},h=({searchLink:_,children:P,onClick:I})=>t.createElement(E,{href:_,target:"_blank",rel:"noopener noreferrer",title:"Replay search",onClick:I},P?t.createElement(t.Fragment,null,P," ",t.createElement(l,{name:"play_arrow"})):t.createElement(n.A,{name:"play_arrow",focusable:!1})),A=({queryString:_,timerange:P,streams:I,parameters:M,children:O,parameterBindings:U})=>{const W=(0,t.useMemo)(()=>`replay-search-${(0,p.A)()}`,[]),K=m(W,P,_,I,M),j=(0,t.useCallback)(()=>{M!=null&&M.size&&d.A.set(W,JSON.stringify({parameters:M,parameterBindings:U}))},[W,M,U]);return t.createElement(h,{searchLink:K,onClick:j},O)};A.defaultProps={queryString:void 0,timerange:void 0,streams:void 0,parameters:void 0,parameterBindings:void 0,children:void 0},h.defaultProps={children:void 0,onClick:void 0};const C=A},"ocYLQ/BD":(x,y,e)=>{"use strict";e.d(y,{A:()=>g,O:()=>n});var t=e("Z7aTuO5B"),r=e("6KiaUlHf"),s=e("IOI9nV80"),o=e("0IW4P5Zs");const n="Update widget",g=({onSubmit:d,onCancel:f})=>{const{applyAllWidgetChanges:p}=(0,t.useContext)(r.A),[E,l]=(0,t.useState)(!1),{disabled:m}=(0,t.useContext)(o.A),h=()=>(l(!0),p().then(()=>{l(!1),d()}).catch(()=>{l(!1)}));return t.createElement(s.E6,{isAsyncSubmit:!0,submitButtonText:n,submitLoadingText:"Updating widget...",onSubmit:h,submitButtonType:"button",disabledSubmit:m,isSubmitting:E,displayCancel:!0,onCancel:f})}},"i/Bor0y0":(x,y,e)=>{"use strict";e.d(y,{A:()=>p});var t=e("Z7aTuO5B"),r=e("J6y4/h8P");const s=r.default.div` height: 100%; display: flex; flex-flow: column nowrap; `,o=r.default.div` overflow-y: auto; `,n=r.default.div` position: relative; `,c=r.default.div(({theme:E,$scrolledToBottom:l,$alignAtBottom:m})=>(0,r.css)` position: sticky; width: 100%; bottom: 0; background: ${E.colors.global.contentBackground}; z-index: 1; display: flex; flex-direction: column; flex: 1; justify-content: ${m?"flex-end":"space-between"}; padding-top: 5px; &::before { box-shadow: 1px -2px 3px rgb(0 0 0 / 25%); content: ' '; display: ${l?"block":"none"}; height: 3px; position: absolute; left: 0; right: 0; top: 0; } `),g=r.default.div` width: 1px; position: absolute; bottom: 0; height: 5px; z-index: 0; `,d=()=>{const[E,l]=(0,t.useState)(null),[m,h]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const A=new IntersectionObserver(([C])=>{h(!C.isIntersecting)},{threshold:.9});return E&&A.observe(E),()=>{E&&A.unobserve(E)}},[E]),{setScrolledToBottomIndicatorRef:l,scrolledToBottom:m}},f=({actions:E,children:l,className:m,alignActionsAtBottom:h})=>{const{setScrolledToBottomIndicatorRef:A,scrolledToBottom:C}=d();return t.createElement(s,{className:m},t.createElement(o,null,t.createElement(n,null,l,t.createElement(g,{ref:A}))),t.createElement(c,{$scrolledToBottom:C,$alignAtBottom:h},E))};f.defaultProps={className:void 0,alignActionsAtBottom:!1};const p=f},FYGzXHJc:(x,y,e)=>{"use strict";e.d(y,{A:()=>A});var t=e("Z7aTuO5B"),r=e("ii0bleBb"),s=e.n(r),o=e("J6y4/h8P"),n=e("IOI9nV80"),c=e("5s1wXXQQ"),g=e("Xt0X5Kl4");const d=(0,o.default)(n.y$)` margin-left: 10px; `,f=o.default.div(({theme:C})=>(0,o.css)` font-size: ${C.fonts.size.large}; text-overflow: ellipsis; margin-bottom: 5px; display: grid; grid-template-columns: minmax(35px, 1fr) max-content; align-items: center; `),p=o.default.div` display: flex; align-items: center; `,E=o.default.div` display: flex; align-items: center; justify-content: center; `,l=(0,o.default)(n.In)` cursor: move; opacity: 0.3; margin-right: 5px; `,m=o.default.span` position: relative; `,h=({children:C,onRename:_,hideDragHandle:P,title:I,loading:M})=>t.createElement(f,null,t.createElement(p,null,P||t.createElement(E,{className:"widget-drag-handle",title:`Drag handle for ${I}`},t.createElement(l,{name:"drag_indicator"})),t.createElement(c.A,{key:I,disabled:!_,value:I,onChange:_}),M&&t.createElement(d,{text:"",delay:0})),t.createElement(m,null,C));h.propTypes={children:g.A.OneOrMoreChildren,onRename:s().func,hideDragHandle:s().bool,title:s().node.isRequired,loading:s().bool},h.defaultProps={children:null,onRename:void 0,hideDragHandle:!1,loading:!1};const A=h},"O+BThgTi":(x,y,e)=>{"use strict";e.d(y,{KZ:()=>C,yX:()=>d});var t=e("ii0bleBb"),r=e.n(t),s=e("GaFHk8Qk"),o=e.n(s),n=e("64Qr82UM"),c=e("mPEBamrX"),g=e("Xt0X5Kl4");const d={col:r().number.isRequired,row:r().number.isRequired,height:r().number.isRequired,width:r().number.isRequired},f=r().objectOf(r().shape(d)),p=o().mapOf(o().mapContains(d),r().string),E=r().objectOf(g.A.instanceOf(n.A)),l=o().mapOf(g.A.instanceOf(n.A),r().string),m=r().oneOfType([r().arrayOf(r().object),r().object]),h=r().objectOf(m),A=r().instanceOf(c.A),C=r().arrayOf(A),_=r().objectOf(C)},"2eB4xxdN":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("SwOo9/Yp"),r=e("UmnljV2q"),s=e("RhFA9EKs"),o=e("g2NQZb9A");const c=async({query:g,view:d,executionState:f})=>{if(d.type!==r.A.Type.Search)return[d,f];const{queryString:p,timeRange:E,streamsFilter:l}=(0,s.A)(g);if(!p&&!E&&!l)return[d,f];const{queries:m}=d.search;if(m.size!==1)throw new Error("Searches must only have a single query!");const h=m.first();let A=h.toBuilder();p&&(A=A.query(p)),E&&(A=A.timerange(E)),l&&(A=A.filter(l));const C=A.build();if((0,t.A)(C,h))return[d,f];const _=d.search.toBuilder().newId().queries([C]).build(),P=await(0,o.A)(_);return[d.toBuilder().search(P).build(),f]}},MXZnZFI9:(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const r=async(s,...o)=>{for(const n of s)try{const c=await n(...o);if(c!==null)return c===!0}catch(c){console.trace("Exception occurred in deletion confirmation hook: ",c)}return null}},N3RHy9gr:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("JKWk6hMu");const s=()=>(0,t.A)()},"/LHc6A/9":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("d3qTYP78");const o=()=>{const n=(0,t.useContext)(r.A);if(!n)throw new Error("useAutoRefresh hook needs to be used inside AutoRefreshContext.Provider");return n}},XEgUer9K:(x,y,e)=>{"use strict";e.d(y,{A:()=>n,h:()=>s});var t=e("QL8i6bcz"),r=e("Z7aTuO5B");const s=async c=>{var g;const d=t.d.exports("forwarder"),f=(g=d==null?void 0:d[0])==null?void 0:g.isLocalNode;try{if(c&&f)return f(c)}catch{}return!0},n=c=>{const[g,d]=(0,r.useState)();return(0,r.useEffect)(()=>{(async()=>{const p=await s(c);d(p)})().catch(()=>d(!0))},[c,g]),{isLocalNode:g}}},Gkq4qIYY:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("YcvsU7cw"),r=e("NS75yjmB");const o=()=>(0,t.A)(r.rh)},"4Bes0RHI":(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("DUKaTDO2"),r=e("eFxcQyPT"),s=e("MdYBRjRJ"),o=e("ysvTSBlf");const c=()=>{const{data:g,isInitialLoading:d}=(0,t.useQuery)(["system","configuration","minimum-refresh-interval"],()=>(0,r.Ay)("GET",(0,s.H3)("/system/configuration/minimum_auto_refresh_interval")),{onError:f=>{o.A.error(`Loading system configuration "minimum_auto_refresh_interval" failed with status: ${f}`,"Could not configuration option")},keepPreviousData:!0});return{data:g==null?void 0:g.value,isInitialLoading:d}}},cFn5u42x:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("Z7aTuO5B"),r=e("YcvsU7cw"),s=e("KAQaaMh7");const n=c=>{const g=(0,r.A)(s.Xf),d=(0,t.useRef)();(0,t.useEffect)(()=>{d.current!==g&&c(),d.current=g},[g])}},qZ8Wpsbl:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("Z7aTuO5B"),r=e("0hhBr0/b");const o=()=>{const n=(0,r.A)("views.components.saveViewForm");return(0,t.useMemo)(()=>n.map(c=>c()).filter(c=>!!c),[n])}},crOrxG1u:(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("DUKaTDO2"),r=e("jAGDuYSC"),s=e("UmnljV2q"),o=e("eFxcQyPT"),n=e("MdYBRjRJ"),c=e("gyRmhZSW");const g={pagination:{total:0},list:[],attributes:[]},d=(0,n.H3)("/search/saved"),f=l=>{const m=(0,c.A)(d,l.page,l.pageSize,l.query,{sort:l.sort.attributeId,order:l.sort.direction});return(0,o.Ay)("GET",(0,n.H3)(m)).then(({elements:h,attributes:A,total:C,count:_,page:P,per_page:I})=>({list:h.map(M=>s.A.fromJSON(M)),pagination:{total:C,count:_,page:P,perPage:I},attributes:A}))},E=(l,{enabled:m}={enabled:!0})=>{const{data:h,refetch:A,isInitialLoading:C}=(0,t.useQuery)(["saved-searches","overview",l],()=>f(l),{onError:_=>{r.A.error(`Loading saved searches failed with status: ${_}`,"Could not load saved searches")},keepPreviousData:!0,enabled:m});return{data:h!=null?h:g,refetch:A,isInitialLoading:C}}},n6M7NB8F:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("YcvsU7cw"),r=e("NS75yjmB");const o=()=>(0,t.A)(r.sf)},uEPrrliZ:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("kmCB/Byf"),r=e("SqY3hYJN");const s=(f,p)=>f!=null?f:`Unsaved ${(0,r.A)({type:p,capitalize:!0})}`;var o=e("YcvsU7cw"),n=e("NS75yjmB");const c=(0,t.Mz)(n.sf,n.o$,(f,p)=>s(f==null?void 0:f.title,p)),d=()=>(0,o.A)(c)},xudoaDQq:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("YcvsU7cw"),r=e("NS75yjmB");const o=()=>(0,t.A)(r.o$)},"gSdhV+tG":(x,y,e)=>{"use strict";e.d(y,{V:()=>o,y:()=>s});var t=e("Z7aTuO5B"),r=e("IA3Ku5lS");const s=(0,r.Gr)("contexts.ActionContext",()=>t.createContext({})),o={Provider:({children:n,value:c})=>{const g=(0,t.useContext)(s),d=(0,t.useMemo)(()=>({...g,...c}),[g,c]);return t.createElement(s.Provider,{value:d},n)},Consumer:s.Consumer}},InkdxEOv:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("nxMFMmDQ");const s=o=>t.Y_.includes(o)},"6oM+slHS":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("nxMFMmDQ"),r=e("InkdxEOv");const o=n=>t.dj.includes(n)||(0,r.A)(n)},RhFA9EKs:(x,y,e)=>{"use strict";e.d(y,{A:()=>p,l:()=>f});var t=e("Z7aTuO5B"),r=e("CHWvwBKE"),s=e("WncxYZtK"),o=e("nxMFMmDQ"),n=e("brbjQOmY");const c=E=>E&&"rangetype"in E?(0,s.c)(E):"relative"in E?(0,s.c)({...E,rangetype:o.zD}):void 0,g=(E={})=>{const l=E.streams;return l==null?[]:String(l).split(",").map(m=>m.trim()).filter(m=>m!=="")},d=E=>{const{q:l}=E!=null?E:{},m=c(E),h=(0,r.j$)(g(E));return{timeRange:m,streamsFilter:h,queryString:l?(0,r.P$)(l):void 0}},f=()=>{const E=(0,n.A)();return(0,t.useMemo)(()=>{const{timeRange:l,queryString:m,streamsFilter:h}=d(E);return{timeRange:l,queryString:m,streams:(0,r.RD)(h).toArray()}},[E])},p=d},mPEBamrX:(x,y,e)=>{"use strict";e.d(y,{A:()=>t});class t{constructor(s){const{backtrace:o,description:n,query_id:c,search_type_id:g,type:d}=s;this._state={backtrace:o,description:n,query_id:c,search_type_id:g,type:d}}get backtrace(){return this._state.backtrace}get description(){return this._state.description}get queryId(){return this._state.query_id}get searchTypeId(){return this._state.search_type_id}get type(){return this._state.type}}},"53I4yQGE":(x,y,e)=>{"use strict";e.d(y,{A:()=>h});var t=e("VPaD/Np4"),r=e("7FTHePOw"),s=e.n(r),o=e("X8pjX0rJ"),n=e.n(o),c=e("WExy2xUc"),g=e("mPEBamrX");const d=A=>Object.keys(A.searchTypes).map(C=>A.searchTypes[C]).find(C=>C.type.toLowerCase()==="messages"),f=A=>{const C=(0,c.A)(A);return C&&C.handler?(0,c.A)(A).handler:{convert:_=>(console.log(`No search type handler for type '${A}' result:`,_),_)}};class p{constructor(C){const{duration:_,timestamp:P,effective_timerange:I}=C.execution_stats;this._state={query:C.query,errors:C.errors.map(M=>new g.A(M)),duration:_,timestamp:P,effectiveTimerange:I,searchTypes:s()(C.search_types,M=>f(M.type).convert(M))}}get documentCount(){const C=d(this);return C?C.total:0}get duration(){return this._state.duration}get effectiveTimerange(){return this._state.effectiveTimerange}get errors(){return this._state.errors}get messages(){return d(this)}get query(){return this._state.query}get searchTypes(){return this._state.searchTypes}get timestamp(){return this._state.timestamp}}const E=A=>(A==null?void 0:A.type)==="result_window_limit";class l extends g.A{constructor(C,_){super(C);const{result_window_limit:P}=C;this._state={...this._state,description:l._extendDescription(_,this.description,this.queryId,this.searchTypeId,P)},this._resultWindowLimit=P}static _extendDescription(C,_,P,I,M){const O=l._getPageSizeFromResult(C,P,I),U=Math.floor(M/O);return`${`Elasticsearch limits the search result to ${M} messages. With a page size of ${O} messages, you can use the first ${U} pages.`} ${_}`}static _getPageSizeFromResult(C,_,P){return C.results[_].query.search_types.find(({id:O})=>O===P).limit}get resultWindowLimit(){return this._resultWindowLimit}}class m{constructor(C){var _;this._result=(0,t.fromJS)(C),this._results=(0,t.fromJS)(s()(C.results,P=>new p(P))),this._errors=(0,t.fromJS)(((_=C==null?void 0:C.errors)!=null?_:[]).map(P=>E(P)?new l(P,this):new g.A(P)))}get result(){return this._result.toJS()}get results(){return this._results.toJS()}get errors(){return this._errors.toJS()}forId(C){return this._results.get(C)}updateSearchTypes(C){const _=this.result;return C.forEach(P=>{const I=this._getQueryBySearchTypeId(P.id);_.results[I.query.id].search_types[P.id]=P}),new m(_)}getSearchTypesFromResponse(C){const _=C.map(P=>{const I=this._getQueryBySearchTypeId(P);return m._getSearchTypeFromQuery(I,P)});return m._filterFailedSearchTypes(_)}_getQueryBySearchTypeId(C){return Object.values(this.result.results).find(_=>m._getSearchTypeFromQuery(_,C))}static _getSearchTypeFromQuery(C,_){return C&&C.search_types?C.search_types[_]:void 0}static _filterFailedSearchTypes(C){return n()(C)}}const h=m},WExy2xUc:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("QL8i6bcz");const r="searchTypes";function s(o){return t.d.exports(r).find(n=>n.type.toLocaleUpperCase()===o.toLocaleUpperCase())}},WncxYZtK:(x,y,e)=>{"use strict";e.d(y,{c:()=>n,r:()=>s});var t=e("PwTFiGSp"),r=e("vT7mdtQI");const s=c=>{switch(c.type){case"relative":return(0,t.r1)(c)?{rangetype:"relative",relative:String(c.range)}:(0,t._b)(c)?"to"in c?{rangetype:"relative",from:String(c.from),to:String(c.to)}:{rangetype:"relative",from:String(c.from)}:(0,r.A)(c,"Unexpected time range: ");case"keyword":return{rangetype:"keyword",keyword:c.keyword};case"absolute":return{rangetype:"absolute",from:c.from,to:c.to};default:return(0,r.A)(c,"Unexpected time range type: ")}},o=c=>{const g=d=>parseInt(d,10);if("relative"in c)return{type:"relative",range:g(c.relative)};if("from"in c){const d={type:"relative",from:g(c.from)};return"to"in c?{...d,to:g(c.to)}:d}return(0,r.A)(c,"Invalid relative range specified: ")},n=c=>{switch(c==null?void 0:c.rangetype){case"relative":return o(c);case"absolute":return"from"in c&&"to"in c?{type:c.rangetype,from:c.from,to:c.to}:(0,r.A)(c,"Invalid absolute range specified: ");case"keyword":return"keyword"in c?{type:c.rangetype,keyword:c.keyword,timezone:c.timezone}:(0,r.A)(c,"Invalid keyword range specified: ");default:return(0,r.A)(c,"Unsupported range type in range: ")}}},mTnbNx1k:(x,y,e)=>{"use strict";e.d(y,{Wk:()=>A,_Q:()=>m,s0:()=>h});var t=e("QL8i6bcz"),r=e("nxMFMmDQ"),s=e("iltCXley"),o=e("ugp+BYjv"),n=e("/QVctsfe"),c=e("fCul1Qwh"),g=e("d2pcYUML"),d=e("PmoDOvRy"),f=e("7J1sc9Ol"),p=e("jlRcBdjT");const E="enterpriseWidgets",l=C=>t.d.exports(E).find(_=>_.type.toLocaleUpperCase()===C.toLocaleUpperCase());function m(C){const _=l(C);if(_)return _;const P=l("default");if(P)return P;throw new Error(`Neither a widget of type "${C}" nor a default widget are registered!`)}const h=(C=(0,s.A)())=>n.A.builder().id(C).config(c.A.builder().columnPivots([]).rowPivots([(0,o.A)(r.WK,new p.Ay("date",[],[]))]).series([f.Ay.forFunction("count()")]).sort([]).visualization("bar").rollup(!0).build()).build(),A=(C=(0,s.A)(),_=[])=>g.A.builder().id(C).config(d.Ay.builder().fields(r.mP).showMessageRow(!0).showSummary(!0).decorators(_).build()).build()},"/QVctsfe":(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("VPaD/Np4"),r=e.n(t),s=e("SwOo9/Yp"),o=e("zAtQmw72"),n=e("fCul1Qwh"),c=e("64Qr82UM");const g=class Yu extends c.A{constructor(E,l,m,h,A,C,_){super(E,Yu.type,l,m,h,A,C,_)}static fromJSON(E){const{id:l,config:m,filter:h,timerange:A,query:C,streams:_,filters:P}=E;return new Yu(l,n.A.fromJSON(m),h,A,C,_,P)}toBuilder(){const{id:E,config:l,filter:m,timerange:h,query:A,streams:C,filters:_}=this._value;return new f((0,t.Map)({id:E,config:l,filter:m,timerange:h,query:A,streams:C,filters:_}))}static builder(){return new f}equals(E){return E instanceof Yu?["id","config","filter","timerange","query","streams","filters"].every(l=>(0,s.A)(this[l],E[l])):!1}equalsForSearch(E){return E instanceof Yu?["id","config","filter","timerange","query","streams","filters"].every(l=>(0,o.A)(this[l],E[l])):!1}};g.type="AGGREGATION",g.defaultTitle="Untitled Aggregation";let d=g;class f extends c.A.Builder{build(){const{id:E,config:l,filter:m,timerange:h,query:A,streams:C,filters:_}=this.value.toObject();return new d(E,l,m,h,A,C,_)}}},fCul1Qwh:(x,y,e)=>{"use strict";e.d(y,{A:()=>l});var t=e("VPaD/Np4"),r=e.n(t),s=e("SwOo9/Yp"),o=e("nxMFMmDQ"),n=e("zAtQmw72"),c=e("o+5fKqZg"),g=e("7J1sc9Ol"),d=e("Lc2t2FX7"),f=e("Wk8izdHL"),p=e("4U1brrvO"),E=e("uDndTqtw");class l extends E.A{constructor(A,C,_,P,I,M,O,U,W=!1){super(),this._value={columnPivots:A,rowPivots:C,series:_,sort:P,visualization:I,rollup:M,visualizationConfig:O,formattingSettings:U,eventAnnotation:W}}get rowPivots(){return this._value.rowPivots}get columnPivots(){return this._value.columnPivots}get series(){return this._value.series}get sort(){return this._value.sort}get rollup(){return this._value.rollup}get visualization(){return this._value.visualization}get visualizationConfig(){if(this._value.visualizationConfig!==null)return this._value.visualizationConfig}get formattingSettings(){return this._value.formattingSettings}get eventAnnotation(){return this._value.eventAnnotation}get isTimeline(){var A;return this.rowPivots&&this.rowPivots.length===1&&this.rowPivots[0].type===c.rd&&((A=this.rowPivots[0].fields)==null?void 0:A[0])===o.WK}get isEmpty(){const A=C=>!C.length;return A(this.rowPivots)&&A(this.columnPivots)&&A(this.series)}get rollupForBackendQuery(){return this.columnPivots.length>0?this.rollup:!0}static builder(){return new m().rowPivots([]).columnPivots([]).series([]).sort([]).eventAnnotation(!1).rollup(!1)}toBuilder(){return new m(t.Map(this._value))}toJSON(){const{columnPivots:A,formattingSettings:C,rollup:_,rowPivots:P,series:I,sort:M,visualization:O,visualizationConfig:U,eventAnnotation:W}=this._value;return{column_pivots:A,formatting_settings:C,rollup:_,row_pivots:P,series:I,sort:M,visualization:O,visualization_config:U,event_annotation:W}}equals(A){return A instanceof l?["columnPivots","rowPivots","series","sort","rollup","eventAnnotation","visualizationConfig","visualization","formattingSettings"].every(C=>(0,s.A)(this[C],A[C])):!1}equalsForSearch(A){return A instanceof l?["rowPivots","columnPivots","series","sort","rollup","eventAnnotation","visualizationConfig"].every(C=>(0,n.A)(this[C],A[C])):!1}static fromJSON(A){const{column_pivots:C,formatting_settings:_,rollup:P,row_pivots:I,series:M,sort:O,visualization:U,visualization_config:W,event_annotation:K}=A;return new m().columnPivots(C.map(c.Ay.fromJSON)).rowPivots(I.map(c.Ay.fromJSON)).series(M.map(g.Ay.fromJSON)).sort(O.map(f.A.fromJSON)).visualization(U).rollup(P).visualizationConfig(W?d.A.fromJSON(U,W):null).formattingSettings(_?p.A.fromJSON(_):void 0).eventAnnotation(K).build()}}class m{constructor(A=t.Map()){this.value=A}columnPivots(A){return new m(this.value.set("columnPivots",A))}rowPivots(A){return new m(this.value.set("rowPivots",A))}series(A){return new m(this.value.set("series",A))}sort(A){return new m(this.value.set("sort",A))}visualization(A){return new m(this.value.set("visualization",A))}visualizationConfig(A){return new m(this.value.set("visualizationConfig",A))}rollup(A){return new m(this.value.set("rollup",A))}formattingSettings(A){return new m(this.value.set("formattingSettings",A))}eventAnnotation(A){return new m(this.value.set("eventAnnotation",A))}build(){const{rowPivots:A,columnPivots:C,series:_,sort:P,visualization:I,rollup:M,visualizationConfig:O,formattingSettings:U,eventAnnotation:W}=this.value.toObject(),K=[].concat(A,C,_),j=P.filter(G=>K.find(k=>{var Q;return G.field===k.function||((Q=k.fields)==null?void 0:Q.includes(G.field))}));return new l(C,A,_,j,I,M,O,U,W)}}},"7VrSCphN":(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const t=class xp{constructor(o){this._direction=o}toJSON(){return this._direction}get direction(){return this._direction}equals(o){return o&&o.direction===this._direction}static fromJSON(o){return xp.fromString(o)}static fromString(o){switch(o){case"Ascending":return xp.Ascending;case"Descending":return xp.Descending;default:throw new Error(`Invalid direction: ${o}`)}}};t.Ascending=new t("Ascending"),t.Descending=new t("Descending");let r=t},"o+5fKqZg":(x,y,e)=>{"use strict";e.d(y,{Ay:()=>n,FF:()=>s,rd:()=>r});var t=e("nxMFMmDQ");const r="time",s="values",o={limit:t.JW,skip_empty_values:!1};class n{constructor(g,d,f=o){this._value={fields:g,type:d,config:f}}get fields(){return this._value.fields}get type(){return this._value.type}get config(){return this._value.config}static create(g,d,f=o){return new n(g,d,f)}static createValues(g,d=o){return n.create(g,s,d)}static fromJSON(g){const{fields:d,type:f,config:p=o}=g;return new n(d,f,p)}toJSON(){const{fields:g,type:d,config:f}=this._value;return{fields:g,type:d,config:f}}}},"7J1sc9Ol":(x,y,e)=>{"use strict";e.d(y,{Ay:()=>l,Pd:()=>E,Tn:()=>p});var t=e("/yh+QgO6"),r=e.n(t),s=e("VPaD/Np4"),o=e.n(s),n=e("WyXFCd64");const c=/\((.+)\)/,g=/(\w+)\(/,d=/^(\w+)\((.*)(,(\w+))*\)$/,f=(h,A)=>{const[C,_]=A;return h==="percentile"?{type:h,field:C,percentile:_}:h==="percentage"?{type:h,field:C,strategy:_}:{type:h,field:C}},p=h=>d.test(h),E=h=>{const A=g.exec(h);if(!A)return null;const C=A[1],_={type:C},P=c.exec(h);return P?f(C,P[1].split(",")):_};class l{constructor(A,C=n.A.empty()){this._value={function:A,config:C}}get function(){return this._value.function}get config(){return this._value.config}get effectiveName(){return r()(this,"config.name")||this.function}toString(){return`Series: ${this.effectiveName}, config={${JSON.stringify(this.config)}}`}toJSON(){return{config:this._value.config,function:this._value.function}}static fromJSON(A){return new l(A.function,n.A.fromJSON(A.config))}static forFunction(A){return new m().function(A).config(n.A.empty()).build()}static create(A,C,_){const P=_?`,${_}`:"",I=`${A}(${C!=null?C:""}${P})`;return l.forFunction(I)}toBuilder(){return new m(s.Map(this._value))}}class m{constructor(A=s.Map()){this.value=A}function(A){return new m(this.value.set("function",A))}config(A){return new m(this.value.set("config",A))}parameter(A){return new m(this.value.set("parameter",A))}build(){const{config:A}=this.value.toObject(),C=this.value.get("function");return new l(C,A)}}},WyXFCd64:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("VPaD/Np4"),r=e.n(t);class s{constructor(c){this._value={name:c}}get name(){return this._value.name}toJSON(){const{name:c}=this._value;return{name:c}}static fromJSON(c){const{name:g}=c;return new s(g)}static empty(){return new s(null)}toBuilder(){return new o(t.Map(this._value))}}class o{constructor(c=t.Map()){this.value=c}name(c){return new o(this.value.set("name",c))}build(){const{name:c}=this.value.toObject();return new s(c)}}},Wk8izdHL:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("VPaD/Np4"),r=e.n(t),s=e("7VrSCphN");class o{constructor(g,d,f){this._value={type:g,field:d,direction:f}}get type(){return this._value.type}get field(){return this._value.field}get direction(){return this._value.direction}toJSON(){const{type:g,field:d,direction:f}=this._value;return{type:g,field:d,direction:f}}static fromJSON(g){const{type:d,field:f,direction:p}=g;return new n().type(d).field(f).direction(s.A.fromJSON(p)).build()}static registerSubtype(g,d){this.__registrations[g.toLowerCase()]=d}static fromSeries(g){return new n().type(this.SERIES_TYPE).field(g.function).direction(s.A.Descending).build()}toBuilder(){const{type:g,field:d,direction:f}=this._value;return new n(t.Map({type:g,field:d,direction:f}))}}o.PIVOT_TYPE="pivot",o.SERIES_TYPE="series",o.__registrations={};class n{constructor(g=t.Map()){this.value=g}type(g){return new n(this.value.set("type",g))}field(g){return new n(this.value.set("field",g))}direction(g){return new n(this.value.set("direction",g))}build(){const{type:g,field:d,direction:f}=this.value.toObject();return new o(g,d,f)}}},"4U1brrvO":(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("VPaD/Np4"),r=e.n(t);class s{constructor(c){this._value={chartColors:c}}get chartColors(){return this._value.chartColors}toBuilder(){return new o(t.Map(this._value))}static create(c){return new s(c)}static builder(){return new o().chartColors({})}static empty(){return s.builder().build()}toJSON(){const{chartColors:c}=this._value;return{chart_colors:Object.keys(c).map(d=>({field_name:d,chart_color:c[d]}))}}static fromJSON(c){const{chart_colors:g}=c,d=g.reduce((f,{field_name:p,chart_color:E})=>(f[p]=E,f),{});return s.create(d)}}class o{constructor(c=t.Map()){this.value=c}chartColors(c){return new o(this.value.set("chartColors",c))}build(){const{chartColors:c}=this.value.toObject();return new s(c)}}},"I5+gQ/47":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("VPaD/Np4"),r=e.n(t),s=e("Lc2t2FX7");class o extends s.A{constructor(g){super(),this._value={pinnedColumns:g||[]}}static empty(){return this.create([])}get pinnedColumns(){return t.Set(this._value.pinnedColumns)}toBuilder(){const{pinnedColumns:g}=this._value;return new n(t.Map({pinnedColumns:g}))}static create(g){return new o(g)}toJSON(){const{pinnedColumns:g}=this._value;return{pinned_columns:g}}static fromJSON(g,d){const{pinned_columns:f}=d;return o.create(f)}}class n{constructor(g=t.Map()){this.value=g}pinnedColumns(g){return new n(this.value.set("pinnedColumns",g))}build(){const{pinnedColumns:g}=this.value.toObject();return new o(g)}}},hD3VAVgz:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>n,hx:()=>o});var t=e("VPaD/Np4"),r=e.n(t),s=e("Lc2t2FX7");const o=["Greys","YlGnBu","Greens","YlOrRd","Bluered","RdBu","Reds","Blues","Picnic","Rainbow","Portland","Jet","Hot","Blackbody","Earth","Electric","Viridis","Cividis"];class n extends s.A{constructor(d,f,p,E,l,m,h){super(),this._value={colorScale:d,reverseScale:f,autoScale:p,zMax:l,zMin:E,useSmallestAsDefault:m,defaultValue:h}}get colorScale(){return this._value.colorScale}get reverseScale(){return this._value.reverseScale}get autoScale(){return this._value.autoScale}get zMin(){return this._value.zMin}get zMax(){return this._value.zMax}get defaultValue(){return this._value.defaultValue}get useSmallestAsDefault(){return this._value.useSmallestAsDefault}toBuilder(){return new c(t.Map(this._value))}static create(d,f,p,E,l,m,h){return new n(d,f,p,E,l,m,h)}static empty(){return new n("Viridis",!1,!0,void 0,void 0,!1,void 0)}toJSON(){const{colorScale:d,reverseScale:f,autoScale:p,zMin:E,zMax:l,useSmallestAsDefault:m,defaultValue:h}=this._value;return{color_scale:d,reverse_scale:f,auto_scale:p,z_min:E,z_max:l,use_smallest_as_default:m,default_value:h}}static fromJSON(d,f={color_scale:"Viridis",reverse_scale:!1,auto_scale:!0,z_min:void 0,z_max:void 0,use_smallest_as_default:!1,default_value:void 0}){const{color_scale:p,reverse_scale:E,auto_scale:l,z_min:m,z_max:h,use_smallest_as_default:A,default_value:C}=f;return n.create(p,E,l,m,h,A,C)}}class c{constructor(d=t.Map()){this.value=d}colorScale(d){return new c(this.value.set("colorScale",d))}reverseScale(d){return new c(this.value.set("reverseScale",d))}autoScale(d){return new c(this.value.set("autoScale",d))}zMin(d){return new c(this.value.set("zMin",d))}zMax(d){return new c(this.value.set("zMax",d))}useSmallestAsDefault(d){return new c(this.value.set("useSmallestAsDefault",d))}defaultValue(d){return new c(this.value.set("defaultValue",d))}build(){const{colorScale:d,reverseScale:f,autoScale:p,zMin:E,zMax:l,useSmallestAsDefault:m,defaultValue:h}=this.value.toObject();return new n(d,f,p,E,l,m,h)}}},Lc2t2FX7:(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const t=class rA{static fromJSON(o,n){const c=rA.__registrations[o.toLowerCase()];if(c)return c.fromJSON(o,n);throw new Error(`Unable to find visualization config of type: ${o} - missing plugin?`)}toBuilder(){throw new Error("Must not be called on abstract class!")}equalsForSearch(o){return!0}static registerSubtype(o,n){this.__registrations[o.toLowerCase()]=n}};t.__registrations={};let r=t},eZ5nxjAy:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("XB8LmyQb");const s=t.A},zQXwj91r:(x,y,e)=>{"use strict";e.d(y,{A:()=>Le});var t=e("Z7aTuO5B"),r=e("J6y4/h8P"),s=e("7FTHePOw"),o=e.n(s),n=e("rIl5IEuP"),c=e("IOI9nV80"),g=e("Wh5iba66");const d="field-type",f={pageSize:20,sort:{attributeId:"index_set_title",direction:"asc"},displayedColumns:["index_set_title","stream_titles","types"],columnsOrder:["index_set_title","stream_titles","types"]};var p=e("Dg3D5NJi"),E=e("DUKaTDO2"),l=e("jAGDuYSC"),m=e("xAuw/bbM");const h={pagination:{total:0},list:[],attributes:[]},A=async({field:Fe,streams:qe},ut)=>{const{sort:{attributeId:ft,direction:Ot},page:Lt,pageSize:an}=ut,Ft={field:Fe,streams:qe.length?qe:void 0};return m.AO.fieldTypeSummaries(Ft,ft,Lt,an,Ot).then(({elements:rn,total:$t,attributes:be})=>({list:rn.map(({stream_titles:yn,index_set_title:Kt,index_set_id:An,types:qt})=>({streamTitles:yn,types:qt,id:An,indexSetTitle:Kt})),pagination:{total:$t},attributes:be}))},_=({streams:Fe,field:qe},ut,{enabled:ft}={enabled:!0})=>{const{data:Ot,refetch:Lt,isInitialLoading:an,isLoading:Ft}=(0,E.useQuery)(["fieldTypeUsages",qe,ut],()=>A({streams:Fe,field:qe},ut),{onError:rn=>{l.A.error(`Loading ${qe} types failed with status: ${rn}`,"Could not load field types")},keepPreviousData:!0,enabled:ft});return{data:Ot!=null?Ot:h,refetch:Lt,isInitialLoading:an,isLoading:Ft}};var P=e("qO9czYNI"),I=e("pwvwNHw/"),M=e.n(I),O=e("w7+AQV2V"),U=e.n(O);const W=r.default.i(({theme:Fe})=>(0,r.css)` font-size: ${Fe.fonts.size.small}; display: block; margin-top: 5px; `),j=Fe=>(0,t.useMemo)(()=>({attributes:{stream_titles:{renderCell:ut=>ut.join(", ")},types:{renderCell:ut=>{const ft=Fe[U()(ut)]||U()(ut),Ot=M()(ut,ut.length-1).map(Lt=>Fe[Lt]||Lt);return ft?t.createElement("div",null,t.createElement("span",null,t.createElement("b",null,ft)),!!Ot.length&&t.createElement(W,null,"(previous values:"," ",Ot.join(", "),")")):t.createElement("i",null,"type is not defined")}}}}),[Fe]);var G=e("Z2BtcgLJ"),k=e("A1XxupLI");const Q=r.default.div` margin-top: 20px; `,z=({field:Fe,setIndexSetSelection:qe,fieldTypes:ut,initialSelection:ft})=>{const[Ot,Lt]=(0,t.useState)(1),{layoutConfig:an,isInitialLoading:Ft}=(0,p.A)({entityTableId:d,defaultPageSize:f.pageSize,defaultDisplayedAttributes:f.displayedColumns,defaultSort:f.sort}),rn=(0,t.useMemo)(()=>({page:Ot,pageSize:an.pageSize,sort:an.sort}),[Ot,an.pageSize,an.sort]),$t=(0,k.A)(),{data:{list:be,attributes:yn,pagination:Kt},isLoading:An}=_({field:Fe,streams:$t},rn,{enabled:!Ft&&!!$t}),{mutate:qt}=(0,P.A)(d),io=(0,t.useCallback)((Vn,po)=>{Vn&&Lt(Vn),po&&qt({perPage:po})},[qt]),Be=(0,t.useCallback)(Vn=>{Lt(1),qt({perPage:Vn})},[qt]),bn=(0,t.useCallback)(Vn=>{Lt(1),qt({sort:Vn})},[qt]),gn=(0,t.useCallback)(Vn=>{qt({displayedAttributes:Vn})},[qt]),wn=j(ut),Zn=(0,t.useCallback)(Vn=>{qe(Vn)},[qe]);return Ft||An?t.createElement(c.y$,null):t.createElement(Q,null,t.createElement(c.OW,{onChange:io,totalItems:Kt==null?void 0:Kt.total,pageSize:an.pageSize,activePage:Ot,showPageSizeSelect:!1,useQueryParameter:!1},!(be!=null&&be.length)&&t.createElement(c.WE,null,"No index sets have been found."),be.length&&t.createElement(c.UA,{activeSort:an.sort,bulkSelection:{onChangeSelection:Zn,initialSelection:ft,actions:t.createElement(G.A,null)},columnDefinitions:yn,columnRenderers:wn,columnsOrder:f.columnsOrder,data:be,onColumnsChange:gn,onPageSizeChange:Be,onSortChange:bn,pageSize:an.pageSize,visibleColumns:an.displayedAttributes})))};var le=e("eFxcQyPT"),V=e("MdYBRjRJ");const me="/system/indices/mappings",Pe=async({indexSetSelection:Fe,newFieldType:qe,rotated:ut,field:ft})=>{const Ot=(0,V.H3)(me),Lt={index_sets:Fe,type:qe,rotate:ut,field:ft};return(0,le.Ay)("PUT",Ot,Lt)},at=()=>{const Fe=(0,E.useMutation)(Pe,{onError:qe=>{l.A.error(`Changing the field type failed with status: ${qe}`,"Could not change the field type")},onSuccess:()=>{l.A.success("The field type changed successfully","Success!")}});return{putFieldTypeMutation:Fe.mutateAsync,isLoading:Fe.isLoading}};var ze=e("yzCFXWYn"),he=e("fVisTAey"),Ie=e("E+CaPsQD"),Re=e("4E3oowBb"),ce=e("8OvTct/Z"),Ee=e("v4GbOr/o"),oe=e("0t7Ye+61");const ae={options:[],currentTypes:{}},ye=async Fe=>{const qe=(0,V.H3)(`/system/indices/index_sets/types/${Fe}/all`);return(0,le.Ay)("GET",qe).then(ut=>({currentTypes:Object.fromEntries(ut.map(ft=>[ft.field_name,ft.type])),options:ut.map(ft=>({value:ft.field_name,label:ft.field_name,disabled:ft.is_reserved===!0}))}))},ve=Fe=>{const{data:qe,isLoading:ut,refetch:ft}=(0,E.useQuery)(["indexSetFieldTypesAll",Fe],()=>ye(Fe),{onError:Ot=>{l.A.error(`Loading index field types failed with status: ${Ot}`,"Could not load index field types")},keepPreviousData:!0,enabled:!!Fe});return{data:qe!=null?qe:ae,isLoading:ut,refetch:ft}},_e=r.default.h5` font-weight: bold; margin-bottom: 5px; `,He=(0,r.default)(c.l6)` width: 400px; margin-bottom: 20px; `,Qe=({indexSetId:Fe,onFieldChange:qe,field:ut})=>{const{data:{options:ft,currentTypes:Ot},isLoading:Lt}=ve(Fe),an=(0,t.useCallback)(Ft=>{qe({fieldName:Ft,type:Ot==null?void 0:Ot[Ft]})},[Ot,qe]);return t.createElement(t.Fragment,null,t.createElement(_e,null,"Select Field"),t.createElement(n.Input,{id:"field"},t.createElement(He,{inputId:"field",options:ft,value:ut,onChange:an,placeholder:"Select or type the field",disabled:Lt,inputProps:{"aria-label":"Select Field"},required:!0,allowCreate:!0})))};var zt=e("A4KcNqtF"),xe=e("ty2gyrHp"),Ue=e("d4kzUuQm");const ke=(0,r.default)(c.l6)` width: 400px; margin-bottom: 20px; `,Se=r.default.h5` font-weight: bold; margin-bottom: 5px; `,Je="000000000000000000000004",nt=()=>{const{data:Fe,isFetching:qe,isError:ut}=(0,ze.A)(Je);return qe?t.createElement(c.y$,null):t.createElement("span",null,t.createElement(g.A,{stream:ut?{id:Je,title:"Processing and Indexing Failures"}:Fe}),t.createElement("i",null," (",t.createElement(xe.N,{to:Ue.Ay.SYSTEM.ENTERPRISE},"Enterprise Plugin")," required)"))},Wt=({show:Fe,onSubmitCallback:qe,initialSelectedIndexSets:ut,onClose:ft,showSelectionTable:Ot,showFieldSelect:Lt,initialData:an})=>{const[{fieldName:Ft,type:rn},$t]=(0,t.useState)(an),{data:{fieldTypes:be},isLoading:yn}=(0,zt.A)(),Kt=(0,ce.A)(),[An,qt]=(0,t.useState)(!0),io=(0,t.useMemo)(()=>Object.entries(be).sort(([,bt],[,It])=>(0,Re.j)(bt,It)).map(([bt,It])=>({value:bt,label:It})),[be]),[Be,bn]=(0,t.useState)(),{putFieldTypeMutation:gn,isLoading:wn}=at(),{pathname:Zn}=(0,oe.A)(),Vn=(0,t.useMemo)(()=>(0,V.i)(Zn),[Zn]),po=(0,t.useCallback)(bt=>{bt.preventDefault(),gn({indexSetSelection:Be,newFieldType:rn,rotated:An,field:Ft}).then(It=>{if(Kt(Ee.g.SEARCH_FIELD_VALUE_ACTION.CHANGE_FIELD_TYPE_CHANGED,{app_pathname:Vn,app_action_value:{value:"change-field-type",rotated:An,isAllIndexesSelected:Be.length===ut.length}}),qe){const En=o()(It,Xt=>({id:Xt.field_name,origin:Xt.origin,fieldName:Xt.field_name,type:Xt.type,isReserved:Xt.is_reserved}));qe(En)}}).then(()=>ft())},[Ft,Be,ut.length,ft,qe,gn,An,Kt,Vn,rn]),De=(0,t.useCallback)(bt=>{$t(It=>({...It,type:bt}))},[]);(0,t.useEffect)(()=>{Kt(Ee.g.SEARCH_FIELD_VALUE_ACTION.CHANGE_FIELD_TYPE_OPENED,{app_pathname:Vn,app_action_value:"change-field-type-opened"})},[Kt,Vn]);const ln=(0,t.useCallback)(()=>{Kt(Ee.g.SEARCH_FIELD_VALUE_ACTION.CHANGE_FIELD_TYPE_CLOSED,{app_pathname:Vn,app_action_value:"change-field-type-closed"}),ft()},[ft,Kt,Vn]);return(0,t.useEffect)(()=>{bn(ut)},[ut,bn]),t.createElement(n.BootstrapModalForm,{title:t.createElement("span",null,"Change ",Ft," Field Type"),submitButtonText:wn?"Changing field type...":"Change field type",onSubmitForm:po,onCancel:ln,show:Fe,bsSize:"large",submitButtonDisabled:wn},t.createElement("div",null,Lt&&t.createElement(Qe,{indexSetId:ut[0],onFieldChange:$t,field:Ft}),t.createElement(n.Alert,{bsStyle:"warning"},"Changing the type of the field ",t.createElement("b",null,Ft)," can have a significant impact on the ingestion of future log messages. If you declare a field to have a type which is incompatible with the logs you are ingesting, it can lead to ingestion errors. It is recommended to enable ",t.createElement(he.$,{page:Ie.A.PAGES.INDEXER_FAILURES,displayIcon:!0,text:"Failure Processing"})," and watch the ",t.createElement(nt,null)," stream closely afterwards."),t.createElement(Se,null,`Select Field Type For ${Ft||"Field"}`),t.createElement(n.Input,{id:"field_type"},t.createElement(ke,{inputId:"field_type",options:io,value:rn,onChange:De,placeholder:"Select field type",disabled:yn,inputProps:{"aria-label":"Select Field Type For Field"},required:!0})),Ot&&t.createElement(t.Fragment,null,t.createElement(Se,null,"Select Targeted Index Sets"),t.createElement("p",null,"By default the ",rn?t.createElement("b",null,rn):"selected"," field type will be set for the ",t.createElement("b",null,Ft)," field in all index sets of the current message/search. You can select for which index sets you would like to make the change."),t.createElement(z,{field:Ft,setIndexSetSelection:bn,fieldTypes:be,initialSelection:ut})),t.createElement(Se,null,"Select Rotation Strategy"),t.createElement("p",null,"To see and use the ",rn?t.createElement("b",null,rn):"selected field type"," as a field type",Ft?t.createElement(t.Fragment,null," for ",t.createElement("b",null,Ft)):"",", you have to rotate indices. You can automatically rotate affected indices after submitting this form or do that manually later."),t.createElement(n.Input,{type:"checkbox",id:"rotate",name:"rotate",label:"Rotate affected indices after change",onChange:()=>qt(bt=>!bt),checked:An})))};Wt.defaultProps={showSelectionTable:!0,onSubmitCallback:void 0,showFieldSelect:!1,initialData:{fieldName:void 0,type:void 0}};const Le=Wt},A1XxupLI:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("Z7aTuO5B"),r=e("gSdhV+tG"),s=e("m7J9z16Z"),o=e("CHWvwBKE");const c=()=>{var g;const{widget:d,message:f}=(0,t.useContext)(r.y),p=(0,s.A)();return(0,t.useMemo)(()=>{var E,l,m,h;return(h=(m=(l=(E=f==null?void 0:f.fields)==null?void 0:E.streams)!=null?l:d==null?void 0:d.streams)!=null?m:(0,o.RD)(p.filter).toJS())!=null?h:[]},[(g=f==null?void 0:f.fields)==null?void 0:g.streams,p.filter,d==null?void 0:d.streams])}},A4KcNqtF:(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("DUKaTDO2"),r=e("jAGDuYSC"),s=e("xAuw/bbM");const o={fieldTypes:{}},n=async()=>({fieldTypes:await s.$1.getAllFieldTypes()}),g=()=>{const{data:d,isLoading:f}=(0,t.useQuery)(["fieldTypeOptions"],n,{onError:p=>{r.A.error(`Loading field type options failed with status: ${p}`,"Could not load field type options")},keepPreviousData:!0});return{data:d!=null?d:o,isLoading:f}}},jlRcBdjT:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>c,OA:()=>s,yw:()=>d});var t=e("VPaD/Np4"),r=e.n(t);const s={Compound:"compound",Enumerable:"enumerable",FullTextSearch:"full-text-search",Numeric:"numeric",Decorated:"decorated"},o=class Ah{constructor(p,E,l){this.value=t.Map({type:p,properties:t.Set(E),indexNames:t.Set(l)})}get type(){return this.value.get("type")}get properties(){return this.value.get("properties")}get indexNames(){return this.value.get("indexNames")}isNumeric(){return this.properties.has(s.Numeric)}isEnumerable(){return this.properties.has(s.Enumerable)}isCompound(){return this.properties.has(s.Compound)}isDecorated(){return this.properties.has(s.Decorated)}static fromJSON(p){const{type:E,properties:l,index_names:m}=p;return new Ah(E,l,m)}static create(p,E=[],l=[]){return new Ah(p,E,l)}};o.Unknown=new o("unknown",[],[]),o.Decorated=new o("decorated field",[s.Decorated],[]);let n=o;const c=n,g=(f,p=[])=>(E=[])=>n.create(f,p,E),d={STRING:g("string",[s.Enumerable]),STRING_FTS:g("string",[s.FullTextSearch]),LONG:g("long",[s.Numeric,s.Enumerable]),INT:g("int",[s.Numeric,s.Enumerable]),SHORT:g("short",[s.Numeric,s.Enumerable]),BYTE:g("byte",[s.Numeric,s.Enumerable]),DOUBLE:g("double",[s.Numeric,s.Enumerable]),FLOAT:g("float",[s.Numeric,s.Enumerable]),DATE:g("date",[s.Enumerable]),BOOLEAN:g("boolean",[s.Enumerable]),BINARY:g("binary",[]),GEO_POINT:g("geo-point",[]),IP:g("ip",[s.Enumerable]),PERCENTAGE:g("percentage",[s.Numeric])}},T6QWz2T7:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("7J1sc9Ol"),r=e("kXOFp4bk"),s=e("jlRcBdjT");const n=(c,g)=>{if((0,t.Tn)(c)){const{type:f}=(0,r.A)(t.Ay.forFunction(c),g);return f}const d=g&&g.find(f=>f.name===c);return d?d.type:s.Ay.Unknown}},"8Crd7QGv":(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("jlRcBdjT");class r{constructor(n,c){this.value={name:n,type:c}}get name(){return this.value.name}get type(){return this.value.type}static fromJSON(n){const{name:c,type:g}=n;return new r(c,t.Ay.fromJSON(g))}static create(n,c){return new r(n,c)}}const s=r},kXOFp4bk:(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("7J1sc9Ol"),r=e("jlRcBdjT"),s=e("8Crd7QGv");const o=["avg","min","max","percentile"],n={card:r.yw.LONG,count:r.yw.LONG,percentage:r.yw.PERCENTAGE},g=(d,f)=>{const p=(0,t.Pd)(d.function),E=h=>s.A.create(d.function,h);if(p===null)return E(r.Ay.Unknown);const{type:l,field:m}=p;if(n[l])return E(n[l]());if(o.includes(l)){const h=f==null?void 0:f.find(A=>A.name===m);return E(h?h.type:r.Ay.Unknown)}return E(r.yw.FLOAT())}},"9kZNWwre":(x,y,e)=>{"use strict";e.d(y,{A:()=>A});var t=e("Z7aTuO5B"),r=e("DUKaTDO2"),s=e("MdYBRjRJ"),o=e("eFxcQyPT"),n=e("8Crd7QGv"),c=e("IZYxBTgT"),g=e("O/XpfGnR"),d=e("IA3Ku5lS");const f=(0,s.H3)("/views/fields"),p=C=>C.map(_=>n.A.fromJSON(_)),E=(C,_)=>{let P={};return C&&C.length>0&&(P={streams:C}),_&&(P={...P,timerange:_}),P},l=(C,_)=>(0,o.Ay)("POST",f,E(C,_)).then(p),m=(C,_)=>{switch(C==null?void 0:C.type){case"absolute":return{type:"absolute",from:(0,c.to)((0,c.Uv)(C.from,_),"internal"),to:(0,c.to)((0,c.Uv)(C.to,_),"internal")};default:return C}},h=(C,_)=>{const{userTimezone:P}=(0,g.A)(),I=(0,t.useMemo)(()=>m(_,P),[_,P]);return(0,r.useQuery)(["fieldTypes",C,I],()=>l(C,I),{staleTime:3e4,refetchOnWindowFocus:!1,cacheTime:0})},A=(0,d.Gr)("hooks.useFieldTypes",()=>h)},fBC5XqGO:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("VPaD/Np4"),r=e.n(t),s=e("BcOICGB7");const o=class Xu extends s.A{constructor(d,f,p,E,l,m,h,A){super(Xu.type,d,f,p,E,l,m),this._value2={lookupTable:h,key:A}}static create(d,f,p,E,l,m,h,A,C){return new Xu(f,p,E,l,m,h,A,C)}toBuilder(){const{type:d,name:f,title:p,description:E,dataType:l,defaultValue:m,optional:h}=this._value,{lookupTable:A,key:C}=this._value2;return new c(t.Map({type:d,name:f,title:p,description:E,dataType:l,defaultValue:m,optional:h,lookupTable:A,key:C}))}get needsBinding(){return!1}get lookupTable(){return this._value2.lookupTable}get key(){return this._value2.key}toJSON(){const{type:d,name:f,title:p,description:E,dataType:l,defaultValue:m,optional:h}=this._value,{lookupTable:A,key:C}=this._value2;return{type:d,name:f,title:p,description:E,data_type:l,default_value:m,optional:h,binding:void 0,lookup_table:A,key:C}}static fromJSON(d){const{name:f,title:p,description:E,data_type:l,default_value:m,optional:h,lookup_table:A,key:C}=d;return new Xu(f,p,E,l,m,h,A,C)}static builder(){return new c().type(Xu.type).optional(!1).dataType("any")}};o.type="lut-parameter-v1";let n=o;class c{constructor(d=t.Map()){this.value=d}type(d){return new c(this.value.set("type",d))}name(d){return new c(this.value.set("name",d))}title(d){return new c(this.value.set("title",d))}description(d){return new c(this.value.set("description",d))}dataType(d){return new c(this.value.set("dataType",d))}defaultValue(d){return new c(this.value.set("defaultValue",d))}optional(d){return new c(this.value.set("optional",d))}lookupTable(d){return new c(this.value.set("lookupTable",d))}key(d){return new c(this.value.set("key",d))}build(){const{name:d,title:f,description:p,dataType:E,defaultValue:l,optional:m,lookupTable:h,key:A}=this.value.toObject();return new n(d,f,p,E,l,m,h,A)}}n.Builder=c},BcOICGB7:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("IA3Ku5lS");const r=class lA{constructor(g,d,f,p,E,l,m,h){this._value={type:g,name:d,title:f,description:p,dataType:E,defaultValue:l,optional:m,binding:h}}get type(){return this._value.type}get name(){return this._value.name}get title(){return this._value.title}get description(){return this._value.description}get dataType(){return this._value.dataType}get defaultValue(){return this._value.defaultValue}get optional(){return this._value.optional}get needsBinding(){return!0}get binding(){return this._value.binding}static fromJSON(g){const{type:d="value-parameter-v1"}=g,f=lA.__registrations[d.toLowerCase()];if(f)return f.fromJSON(g);throw new Error(`No class found for type <${d}>`)}static registerSubtype(g,d){this.__registrations[g.toLowerCase()]=d}toJSON(){throw new Error("Method toJSON has no implementation")}};r.__registrations={};let s=r;const n=(0,t.Gr)("views.logic.parameters.Parameter",()=>s)},yM9BwDic:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("VPaD/Np4"),r=e.n(t);class s{constructor(c,g){this._value={type:c,value:g}}get type(){return this._value.type}get value(){return this._value.value}toBuilder(){const{type:c,value:g}=this._value;return new o(t.Map({type:c,value:g}))}static create(c,g){return new s(c,g)}static forValue(c){return s.create("value",c)}static empty(){return s.create("value","")}toJSON(){const{type:c,value:g}=this._value;return{type:c,value:g}}static fromJSON(c){if(c==null)return null;const{type:g,value:d}=c;return s.create(g,d)}}class o{constructor(c=t.Map()){this._value=c}type(c){return new o(this._value.set("type",c))}value(c){return new o(this._value.set("value",c))}build(){const{type:c,value:g}=this._value.toObject();return new s(c,g)}}},QV1daZoe:(x,y,e)=>{"use strict";e.d(y,{mP:()=>d,So:()=>f,D8:()=>g});var t=e("nxMFMmDQ"),r=e("PwTFiGSp");const o=p=>(0,r._b)(p)&&p.from===t.R$||(0,r.r1)(p)&&p.range===t.R$;var n=e("z45xmHGk"),c=e("IZYxBTgT");const g=p=>"type"in p&&o(p)?{type:p.type,range:t.R$}:p,d=p=>p?(l=>(0,r.u4)(l)?{type:l.type,timezone:l.timezone,keyword:l.keyword}:l)(g((0,n.Q_)(p))):t.IV,f=(p,E)=>{const{type:l}=p;switch(p.type){case"absolute":return{type:p.type,from:(0,c.to)((0,c.Uv)(p.from,E),"internal"),to:(0,c.to)((0,c.Uv)(p.to,E),"internal")};case"relative":if((0,r.r1)(p))return{type:p.type,range:p.range};if((0,r._b)(p))return"to"in p?{type:p.type,from:p.from,to:p.to}:{type:p.type,from:p.from};throw new Error("Invalid relative time range");case"keyword":return p;default:throw new Error(`Invalid time range type: ${l}`)}}},CHWvwBKE:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>p,P$:()=>n,RD:()=>d,j$:()=>g});var t=e("VPaD/Np4"),r=e.n(t),s=e("SwOo9/Yp"),o=e("iltCXley");const n=(l="")=>({type:"elasticsearch",query_string:l}),c=l=>t.List(l.map(m=>t.Map({type:"stream",id:m}))),g=l=>{if(!l||l.length===0)return null;const m=c(l);return t.Map({type:"or",filters:m})},d=l=>l?l.get("type")==="stream"?t.Set([l.get("id")]):l.get("filters",t.List()).map(d).reduce((A,C)=>A.merge(C),t.Set()):t.Set(),f=l=>l==null;class p{constructor(m,h,A,C,_,P){this._value={id:m,query:h,timerange:A,filter:C,filters:P,searchTypes:_}}get id(){return this._value.id}get query(){return this._value.query}get timerange(){return this._value.timerange}get filter(){return this._value.filter}get filters(){return this._value.filters}get searchTypes(){return this._value.searchTypes}toBuilder(){const{id:m,query:h,timerange:A,filter:C,filters:_,searchTypes:P}=this._value,I=p.builder().id(m).query(h).timerange(A).filter(C).filters(_).searchTypes(P);return C?I.filter(C):I}equals(m){return!(m===void 0||!(m instanceof p)||this.id!==m.id||!(0,s.A)(this.query,m.query)||!(0,s.A)(this.timerange,m.timerange)||!(f(this.filter)&&f(m.filter)||(0,s.A)(this.filter,m.filter))||!(f(this.filters)&&f(m.filters)||(0,s.A)(this.filters,m.filters))||!(0,s.A)(this.searchTypes,m.searchTypes))}toJSON(){const{id:m,query:h,timerange:A,filter:C,filters:_,searchTypes:P}=this._value;return{id:m,query:h,timerange:A,filter:C,filters:_==null?void 0:_.toArray(),search_types:P}}static builder(){return new E().searchTypes([])}static fromJSON(m){const{id:h,query:A,timerange:C,filter:_,filters:P,search_types:I}=m;return new p(h,A,C,t.fromJS(_),I,P?t.List(P):void 0)}}class E{constructor(m=t.Map()){this.value=m}id(m){return new E(this.value.set("id",m))}newId(){return this.id((0,o.A)())}query(m){return new E(this.value.set("query",m))}timerange(m){return new E(this.value.set("timerange",m))}filter(m){return new E(this.value.set("filter",t.fromJS(m)))}filters(m){return new E(this.value.set("filters",m&&t.List(m)))}searchTypes(m){return new E(this.value.set("searchTypes",m))}build(){const{id:m,query:h,timerange:A,filter:C,filters:_,searchTypes:P}=this.value.toObject();return new p(m,h,A,C,P,_)}}},ZJjLtB2e:(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("VPaD/Np4"),r=e.n(t),s=e("i3pQAyXy"),o=e("nxMFMmDQ"),n=e("CHWvwBKE"),c=e("iltCXley");const g=(d,f=(0,c.A)(),p,E,l)=>{const m=d?d instanceof Array?d:[d]:null,h=(0,n.j$)(m),A=l?(0,t.OrderedMap)(l==null?void 0:l.map(_=>[_.id||(0,s.A)(),_])):(0,t.OrderedMap)(),C=n.Ay.builder().id(f).query(E!=null?E:(0,n.P$)()).timerange(p!=null?p:o.Zl).filters(A.toList());return h?C.filter(h).build():C.build()}},"I4XORk+Y":(x,y,e)=>{"use strict";e.d(y,{$A:()=>n,ih:()=>o,nu:()=>c});var t=e("sWSSTOXR"),r=e.n(t);const s=g=>String(g).indexOf(" ")!==-1,o=g=>{let d=String(g);return d=d.replace(/\r\n/g," "),d=d.replace(/\n/g," "),d=d.replace(/
    /g," "),s(d)?(d=String(d).replace(/(["\\])/g,"\\$&"),d=`"${d}"`):d=String(d).replace(/(&&|\|\||[:\\/+\-!(){}[\]^"~*?$])/g,"\\$&"),d},n=(g,d,f="AND")=>r()(g)==="*"||r()(g)===""?d:r()(d)==="*"||r()(d)===""?g:`${g} ${f} ${d}`,c=(g,{operator:d="AND",withBrackets:f=!0}={})=>{const p=g.filter(l=>!!(l!=null&&l.trim())),E=f&&p.length>1;return p.map(l=>E?`(${l})`:l).join(` ${d} `)}},pzHcYe8v:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("6BCpJW2W");const s=(o,n)=>o&&o.search&&o.search.queries?o.search.queries.keySeq().map((c,g)=>{if(n!==void 0&&c.id!==void 0&&n===c.id)return o.state?o.state.getIn([c.id],t.A.create()).titles.getIn(["tab","title"],`Page#${g+1}`):`Page#${g+1}`}).filter(c=>c!==void 0).first():void 0},"Ii+QL2UH":(x,y,e)=>{"use strict";e.d(y,{A:()=>m,W:()=>d});var t=e("9oVghaOd"),r=e.n(t),s=e("gtXNkEXl"),o=e.n(s),n=e("V4hxOpTk"),c=e.n(n),g=e("PwTFiGSp");const d=(h,A,C="All Time")=>{const _=h==null?void 0:h[A];if(!_)return C;const P=r()(),I=r()(P).subtract(_,"seconds");return`${r().preciseDiff(P,I)} ago`},f=h=>(0,g.r1)(h)?h.range===0?"All Time":`${d(h,"range")} - Now`:`${d(h,"from")} - ${d(h,"to","Now")}`,p=(h,A=C=>C)=>{const{from:C,to:_}=h;return`${A(C)} - ${A(_)}`},E=h=>h.keyword,m=(h,A)=>{const{type:C}=h||{};switch(C){case"relative":return f(h);case"absolute":return p(h,A);case"keyword":return E(h);default:return""}}},m7J9z16Z:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("YcvsU7cw"),r=e("NS75yjmB");const o=()=>(0,t.A)(r.OR)},JKWk6hMu:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("YcvsU7cw"),r=e("NS75yjmB");const o=()=>(0,t.A)(r.Hz)},LqPK8SLb:(x,y,e)=>{"use strict";e.d(y,{A:()=>s});var t=e("VPaD/Np4"),r=e.n(t);class s{constructor(c,g,d,f,p){this._value={timerange:c,query:g,keepSearchTypes:d,searchTypes:f,keepQueries:p}}get timerange(){return this._value.timerange}get query(){return this._value.query}get keepSearchTypes(){return this._value.keepSearchTypes}get keepQueries(){return this._value.keepQueries}get searchTypes(){return this._value.searchTypes}toBuilder(){const{timerange:c,query:g,keepSearchTypes:d,searchTypes:f,keepQueries:p}=this._value;return new o(t.Map({timerange:c,query:g,keepSearchTypes:d,searchTypes:f,keepQueries:p}))}static create(c,g,d,f,p){return new s(c,g,d,f,p)}static empty(){return new s}toJSON(){const{timerange:c,query:g,keepSearchTypes:d,keepQueries:f,searchTypes:p}=this._value;return{timerange:c,query:g,keep_search_types:d,keep_queries:f,search_types:p}}static fromJSON(c){const{timerange:g,query:d,keep_search_types:f,search_types:p,keep_queries:E}=c;return s.create(g,d,f,p,E)}}class o{constructor(c=t.Map()){this.value=c}timerange(c){return new o(this.value.set("timerange",c))}query(c){return new o(this.value.set("query",c))}keepSearchTypes(c){return new o(this.value.set("keepSearchTypes",c))}keepQueries(c){return new o(this.value.set("keepQueries",c))}searchTypes(c){return new o(this.value.set("searchTypes",c))}build(){const{timerange:c,query:g,keepSearchTypes:d,searchTypes:f,keepQueries:p}=this.value.toObject();return new s(c,g,d,f,p)}}},"/coHI+Jz":(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("VPaD/Np4"),r=e.n(t),s=e("Jg5wVMAu"),o=e.n(s),n=e("CHWvwBKE"),c=e("BcOICGB7");class g{constructor(p,E,l){this._value={id:p,queries:t.OrderedSet(E),parameters:t.Set(l)}}static create(){return new d().newId().queries([]).parameters([]).build()}get id(){return this._value.id}get queries(){return this._value.queries}get parameters(){return this._value.parameters}get requiredParameters(){return this.parameters.filter(p=>!p.defaultValue&&!p.optional&&p.needsBinding).toSet()}toBuilder(){const{id:p,queries:E,parameters:l}=this._value;return new d(t.Map({id:p,queries:E,parameters:l}))}toJSON(){const{id:p,queries:E,parameters:l}=this._value;return{id:p,queries:E.toJS(),parameters:l.toJS()}}static fromJSON(p){const{id:E,parameters:l}=p,m=p.queries.map(h=>n.Ay.fromJSON(h));return new g(E,m,l.map(h=>c.A.fromJSON(h)))}static builder(){return new d}}class d{constructor(p=t.Map()){this.value=p}id(p){return new d(this.value.set("id",p))}newId(){return this.id(new(o())().toString())}queries(p){return new d(this.value.set("queries",p))}parameters(p){return new d(this.value.set("parameters",p))}build(){const{id:p,queries:E,parameters:l}=this.value.toObject();return new g(p,E,l)}}},oMyijaIY:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>o});var t=e("VPaD/Np4"),r=e.n(t),s=e("yM9BwDic");class o{constructor(f=t.Map(),p){this._value={parameterBindings:f,globalOverride:p}}get parameterBindings(){return this._value.parameterBindings}get globalOverride(){return this._value.globalOverride}toBuilder(){const{globalOverride:f,parameterBindings:p}=this._value;return new n(t.Map({globalOverride:f,parameterBindings:p}))}static create(f,p){return new o(f,p)}static empty(){return new o}toJSON(){const{globalOverride:f,parameterBindings:p}=this._value;return{global_override:f,parameter_bindings:p}}static fromJSON(f){const{global_override:p,parameter_bindings:E}=f;return o.create(E,p)}}class n{constructor(f=t.Map()){this.value=f}parameterBindings(f){return new n(this.value.set("parameterBindings",f))}globalOverride(f){return new n(this.value.set("globalOverride",f))}build(){const{globalOverride:f,parameterBindings:p}=this.value.toObject();return new o(p,f)}}const c=(d,f)=>d.parameterBindings.get(f,ParameterBinding.empty()).value,g=d=>d.flatMap((f,p)=>Immutable.Map({[p]:f.value}))},"/8lbhT5j":(x,y,e)=>{"use strict";e.d(y,{A:()=>f});var t=e("VPaD/Np4"),r=e.n(t),s=e("oCSEoDew"),o=e.n(s),n=e("d4kzUuQm"),c=e("WncxYZtK"),g=e("I4XORk+Y");const d=(E,l={})=>Object.keys(l).filter(m=>l[m]!==null&&l[m]!==void 0).map(m=>`${m}:"${(0,g.ih)(String(l[m]))}"`).reduce((m,h)=>(0,g.$A)(m,h),E?E.query_string:"");class f{constructor(l,m,h,A,C,_){this._value={id:l,timerange:m,query:h,streams:A,highlightedMessage:C,filterFields:_}}get id(){return this._value.id}get timerange(){return this._value.timerange}get query(){return this._value.query}get streams(){return this._value.streams}get highlightedMessage(){return this._value.highlightedMessage}get filterFields(){return this._value.filterFields}static builder(){return new p}toURL(){const{id:l,query:m,highlightedMessage:h,streams:A,filterFields:C,timerange:_}=this._value,P=d(m,C),M={..._?(0,c.r)(_):{},q:P===""?void 0:P,highlightMessage:h},O=A&&A.length>0?{...M,streams:A.join(",")}:M,U=l?`${n.Ay.SEARCH}/${l}`:n.Ay.SEARCH;return new(o())(U).setSearch(O).toString()}}class p{constructor(l=t.Map()){this.value=l}id(l){return new p(this.value.set("id",l))}timerange(l){return new p(this.value.set("timerange",l))}query(l){return new p(this.value.set("query",l))}streams(l){return new p(this.value.set("streams",l))}highlightedMessage(l){return new p(this.value.set("highlightedMessage",l))}filterFields(l){return new p(this.value.set("filterFields",l))}build(){const{id:l,timerange:m,query:h,streams:A,highlightedMessage:C,filterFields:_}=this.value.toObject();return new f(l,m,h,A,C,_)}}},AMSn1A3N:(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("VPaD/Np4");class r{constructor(c){this._value={usedParameterNames:c}}get usedParameterNames(){return this._value.usedParameterNames}static fromJSON(c){return new r(t.Set(c.used_parameters_names))}}var s=e("BcOICGB7");class o{constructor(c,g){const d=c.valueSeq().reduce((l,m)=>[...l,...m.usedParameterNames.toJS()],[]),f=g.keySeq().toJS(),p=t.Set(d.filter(l=>f.includes(l)).map(l=>g.get(l))),E=t.Set(d.filter(l=>!f.includes(l)));this._value={queryMetadata:c,declaredParameters:g,used:p,undeclared:E}}get queryMetadata(){return this._value.queryMetadata}get declaredParameters(){return this._value.declaredParameters}get used(){return this._value.used}get undeclared(){return this._value.undeclared}static empty(){return new o(t.Map(),t.Map())}static fromJSON(c){const{query_metadata:g,declared_parameters:d}=c,f=t.Map(g).map(E=>r.fromJSON(E)).toMap(),p=t.Map(d).map(E=>s.A.fromJSON(E)).toMap();return new o(f,p)}}},"ugp+BYjv":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("8u9vblRK"),r=e.n(t),s=e("o+5fKqZg");const o=(n,c)=>{const g=r()(n)?n:[n];switch(c.type){case"date":return s.Ay.create(g,"time",{interval:{type:"auto",scaling:1}});default:return s.Ay.createValues(g)}}},b2fGY8bZ:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>n,Nc:()=>o,XU:()=>s});var t=e("t5bvLtVB"),r=e.n(t);const s="#d3d3d3",o="Alerts",n={convert({events:c,total_results:g,id:d,type:f,name:p}){return{events:c,totalResults:g,id:d,type:f,name:p}},toVisualizationData(c,g){const d=r()(c,f=>f.timestamp);return{eventChartData:this.toChartData(d,g),shapes:this.toShapeData(Object.keys(d),g)}},transformGroupedEvents(c){return Object.entries(c).map(([g,d])=>{if(!(d instanceof Array))throw new Error("Unexpected data type");return d.length>1?[g,d.length]:[g,d[0]]})},toChartData(c,g){const d=this.transformGroupedEvents(c),f=d.map(l=>g(l[0])),p=d.map(l=>typeof l[1]!="number"&&"message"in l[1]?l[1].message:`${l[1]} alerts occurred.`),E=d.map(()=>0);return{hovertemplate:"%{text}",mode:"markers",name:o,type:"scatter",opacity:.5,x:f,y:E,text:p,originalName:o}},toShapeData(c,g){return c.map(d=>{const f=g(d);return{layer:"below",type:"line",yref:"paper",y0:0,y1:1,x0:f,x1:f,opacity:.5}})}}},g2NQZb9A:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("MdYBRjRJ"),r=e("/coHI+Jz"),s=e("eFxcQyPT");const o=(0,t.H3)("/views/search"),c=g=>(0,s.Ay)("POST",o,JSON.stringify(g)).then(d=>r.A.fromJSON(d))},"2NTfO+Rh":(x,y,e)=>{"use strict";e.d(y,{M:()=>E,A:()=>m});var t=e("LqPK8SLb"),r=e("eFxcQyPT"),s=e("MdYBRjRJ");const o=h=>s.H3(`/views/search/${h}/execute`),n=h=>s.H3(`/views/search/status/${h}`);function c(h,A){return(0,r.Ay)("POST",o(h.id),JSON.stringify(A))}function g(h){return(0,r.Ay)("GET",n(h))}var d=e("53I4yQGE");const f=h=>new Promise(A=>{setTimeout(A,h)}),p=h=>new Promise(A=>{var C,_;(C=h==null?void 0:h.execution)!=null&&C.done||(_=h==null?void 0:h.execution)!=null&&_.completed_exceptionally?A(h):A(f(250).then(()=>g(h.id)).then(P=>p(P)))}),E=(h,A,C,_=[])=>{var P;const{widgetMapping:I}=h,M=((P=C.globalOverride)!=null?P:t.A.empty()).toBuilder().keepQueries(_).build();let O=C.toBuilder().globalOverride(M);if(A){const U=A.map(K=>I.get(K)).reduce((K,j)=>j?[...K,...j.toArray()]:K,M.keepSearchTypes||[]),W=M.toBuilder().keepSearchTypes(U).build();O=O.globalOverride(W)}return O.build()},m=(h,A,C,_=[])=>{const{widgetMapping:P,search:I}=h,M=E(h,A,C,_);return c(I,M).then(O=>p(O)).then(O=>({widgetMapping:P,result:new d.A(O)}))}},gofDlXL2:(x,y,e)=>{"use strict";e.d(y,{EC:()=>d,HK:()=>c,PM:()=>l,iw:()=>E,lf:()=>g,n:()=>p});var t=e("UnwAqHt2"),r=e("NS75yjmB"),s=e("4/JSMBsA"),o=e("rNH0cW39"),n=e("dogTzS57");const c=m=>async(h,A)=>{const C=(0,r.Hz)(A()),_=(0,r.td)(A()),{formatting:P=s.A.empty()}=_,I=_.toBuilder().formatting(P.toBuilder().highlighting(m).build()).build();return h((0,o.YS)(C,I))},g=(m,h)=>async(A,C)=>{const _=(0,n.W)(C());if(Object.entries(h).length===0)return Promise.resolve();const I=Object.entries(h).reduce((O,[U,W])=>O[U](W),m.toBuilder()).build(),M=_.map(O=>O===m?I:O);return A(c(M))},d=m=>async(h,A)=>{const C=(0,r.td)(A()),{formatting:_=s.A.empty()}=C;return h(c([..._.highlighting,m]))},f=m=>async(h,A)=>{const C=(0,r.td)(A()),{formatting:_=s.A.empty()}=C;return h(c([..._.highlighting,...m]))},p=(m,h)=>async A=>{const C=t.Ay.builder().field(m).value(h).color((0,t.XL)()).build();return A(d(C))},E=m=>async h=>{const A=m.map(({field:C,value:_,color:P,condition:I})=>t.Ay.builder().field(C).value(_).condition(I||"equal").color(P||(0,t.XL)()).build());return h(f(A))},l=m=>async(h,A)=>{const _=(0,n.W)(A()).filter(P=>P!==m);return h(c(_))}},dogTzS57:(x,y,e)=>{"use strict";e.d(y,{W:()=>s});var t=e("kmCB/Byf"),r=e("NS75yjmB");const s=(0,t.Mz)(r.td,o=>{var n,c;return(c=(n=o==null?void 0:o.formatting)==null?void 0:n.highlighting)!=null?c:[]})},EapCXqJr:(x,y,e)=>{"use strict";e.d(y,{A:()=>c});var t=e("MdYBRjRJ"),r=e("eFxcQyPT"),s=e("AMSn1A3N");const o=t.H3("/views/search/metadata"),c=g=>(0,r.Ay)("POST",o,JSON.stringify(g)).then(d=>s.A.fromJSON(d),()=>{})},KAQaaMh7:(x,y,e)=>{"use strict";e.d(y,{AU:()=>s,CY:()=>n,I0:()=>d,T4:()=>o,Xf:()=>c,kK:()=>g});var t=e("kmCB/Byf");const r=f=>f.searchExecution,s=(0,t.Mz)(r,f=>f.executionState),o=(0,t.Mz)(r,f=>f.widgetsToSearch),n=(0,t.Mz)(r,f=>f.result),c=(0,t.Mz)(n,f=>{var p,E;return(E=(p=f==null?void 0:f.result)==null?void 0:p.result)==null?void 0:E.id}),g=(0,t.Mz)(s,f=>f.globalOverride),d=(0,t.Mz)(s,f=>f.parameterBindings)},YX1HQgTG:(x,y,e)=>{"use strict";e.d(y,{IB:()=>K,MJ:()=>G,OB:()=>j,b4:()=>U,dY:()=>P,g7:()=>W,t$:()=>O});var t=e("VYzIwY9T"),r=e("VPaD/Np4"),s=e.n(r),o=e("sWSSTOXR"),n=e.n(o),c=e("oMyijaIY"),g=e("iyGdd7jp"),d=e("LqPK8SLb"),f=e("NS75yjmB"),p=e("KAQaaMh7"),E=e("yM9BwDic"),l=e("rNH0cW39"),m=e("CHWvwBKE");const h=(0,t.Z0)({name:"searchExecution",initialState:{widgetsToSearch:void 0,executionState:c.Ay.empty(),isLoading:!1,result:void 0},reducers:{loading:z=>({...z,isLoading:!0}),finishedLoading:(z,le)=>({...z,isLoading:!1,result:le.payload}),updateGlobalOverride:(z,le)=>({...z,executionState:z.executionState.toBuilder().globalOverride(le.payload).build()}),setWidgetsToSearch:(z,le)=>({...z,widgetsToSearch:le.payload}),setParameterValues:(z,le)=>{const V=le.payload;let{parameterBindings:me}=z.executionState;return V.forEach((Pe,Ve)=>{me=me.set(Ve,E.A.forValue(Pe))}),{...z,executionState:z.executionState.toBuilder().parameterBindings(me).build()}},setParameterBindings:(z,le)=>({...z,executionState:z.executionState.toBuilder().parameterBindings(le.payload).build()}),addParameterBindings:(z,le)=>{const{parameterBindings:V}=z.executionState,me=le.payload,Pe=r.Map(me.filter(at=>!!at.defaultValue).map(at=>[at.name,E.A.forValue(at.defaultValue)])),Ve=V.merge(Pe);return{...z,executionState:z.executionState.toBuilder().parameterBindings(Ve).build()}}}}),{loading:A,finishedLoading:C,updateGlobalOverride:_,setWidgetsToSearch:P,setParameterValues:I,setParameterBindings:M}=h.actions,O=h.reducer,U=(z,le,V,me)=>(Pe,Ve)=>Pe((0,g.K)(z.search,me.parse)).then(()=>{Pe(A());const at=(0,f.Hz)(Ve());return me.execute(z,le,V,[at]).then(me.resultMapper).then(ze=>Pe(C(ze)))}),W=()=>(z,le,{searchExecutors:V})=>{const me=le(),Pe=(0,f.sf)(me),Ve=(0,p.AU)(me),at=(0,p.T4)(me);return z(U(Pe,at,Ve,V))},K=z=>async(le,V)=>{var me;const Ve=((me=(0,p.kK)(V()))!=null?me:d.A.empty()).toBuilder().query((0,m.P$)(z)).build();return le(h.actions.updateGlobalOverride(Ve))},j=z=>async(le,V)=>{var me;const Ve=((me=(0,p.kK)(V()))!=null?me:d.A.empty()).toBuilder().timerange(z).build();return le(h.actions.updateGlobalOverride(Ve))},G=(z,le)=>(V,me)=>{var Pe;const at=((Pe=(0,p.kK)(me()))!=null?Pe:d.A.empty()).toBuilder().query((0,m.P$)(z)).timerange(le).build();return V(h.actions.updateGlobalOverride(at))},k=z=>async(le,V)=>{const me=selectParameters(V()).toArray(),Pe=z.valueSeq().toArray();return await le(h.actions.addParameterBindings(Pe)),le(setParameters([...me,...Pe]))},Q=z=>async(le,V)=>{const Pe=selectParameters(V()).filter(ze=>ze.name!==z).toArray(),at=selectParameterBindings(V()).remove(z);return await le(setParameters(Pe)),le(h.actions.setParameterBindings(at))},ne=(z,le)=>async(V,me)=>{const Ve=selectParameters(me()).map(ze=>ze.name===z?le:ze).toArray(),at=selectParameterBindings(me());if(!trim(at.get(z,ParameterBinding.empty()).value)&&le.defaultValue){const ze=at.set(z,ParameterBinding.forValue(le.defaultValue));await V(h.actions.setParameterBindings(ze))}return V(setParameters(Ve))}},iyGdd7jp:(x,y,e)=>{"use strict";e.d(y,{K:()=>c,o:()=>n});var t=e("VYzIwY9T");const r=(0,t.Z0)({name:"searchMetadata",initialState:{isLoading:!1,metadata:void 0},reducers:{loading:g=>({...g,isLoading:!0,metadata:void 0}),finishedLoading:(g,d)=>({...g,isLoading:!1,metadata:d.payload})}}),{finishedLoading:s,loading:o}=r.actions,n=r.reducer,c=(g,d)=>async f=>(f(o()),d(g).then(p=>f(s(p))))},A2mY8G47:(x,y,e)=>{"use strict";e.d(y,{D:()=>g});var t=e("NS75yjmB"),r=e("rNH0cW39"),s=e("kmCB/Byf");const o=(0,s.Mz)(t.td,d=>d.titles),n=d=>(0,s.Mz)((0,t.ZA)(d),f=>f.titles),c=(d,f)=>async(p,E)=>{const m=selectViewState(d)(E()).toBuilder().titles(f).build();return p(updateViewState(d,m))},g=(d,f,p,E)=>async(l,m)=>{const h=(0,t.ZA)(d)(m()),C=n(d)(m()).setIn([f,p],E),_=h.toBuilder().titles(C).build();return l((0,r.YS)(d,_))}},qIv98lrg:(x,y,e)=>{"use strict";e.d(y,{B:()=>r,e:()=>s});var t=e("kmCB/Byf");const r=o=>o.undoRedo,s=(0,t.Mz)(r,({currentRevision:o,revisions:n})=>({isUndoAvailable:o>0,isRedoAvailable:o{"use strict";e.d(y,{$V:()=>n,Z1:()=>d,bR:()=>g});var t=e("VYzIwY9T"),r=e("qIv98lrg");const s=10,o=(0,t.Z0)({name:"undoRedo",initialState:{revisions:[],currentRevision:0},reducers:{setRevisions:(f,p)=>({...f,revisions:p.payload.revisions,currentRevision:p.payload.currentRevision}),setCurrentRevision:(f,p)=>({...f,currentRevision:p.payload})}}),n=o.reducer,{setRevisions:c,setCurrentRevision:g}=o.actions,d=(f,p=!0)=>async(E,l)=>{const{revisions:m,currentRevision:h}=(0,r.B)(l()),C=h===m.length?m:m.slice(0,h),_=C.length{"use strict";e.d(y,{Dm:()=>_,Hz:()=>g,OR:()=>P,SL:()=>j,TY:()=>d,Xj:()=>O,ZA:()=>l,bB:()=>G,fm:()=>C,o$:()=>p,or:()=>k,qP:()=>E,rh:()=>f,sf:()=>c,td:()=>m,u3:()=>M,x$:()=>I,yC:()=>n});var t=e("kmCB/Byf"),r=e("KAQaaMh7"),s=e("UmnljV2q"),o=e("CHWvwBKE");const n=Q=>Q.view,c=(0,t.Mz)(n,Q=>Q.view),g=(0,t.Mz)(n,Q=>Q.activeQuery),d=(0,t.Mz)(n,Q=>Q.isDirty),f=(0,t.Mz)(n,Q=>Q.isNew),p=(0,t.Mz)(c,Q=>Q.type),E=(0,t.Mz)(c,Q=>Q.state),l=Q=>(0,t.Mz)(E,ne=>ne.get(Q)),m=(0,t.Mz)(g,E,(Q,ne)=>ne==null?void 0:ne.get(Q)),h=(0,t.Mz)(c,Q=>Q.search),A=(0,t.Mz)(h,Q=>Q.id),C=(0,t.Mz)(h,Q=>Q.queries),_=Q=>(0,t.Mz)(C,ne=>ne.find(z=>z.id===Q)),P=(0,t.Mz)(g,C,(Q,ne)=>ne.find(z=>z.id===Q)),I=Q=>(0,t.Mz)(C,ne=>ne.find(z=>z.id===Q)),M=(0,t.Mz)(m,Q=>Q.widgets),O=Q=>(0,t.Mz)(M,ne=>ne.find(z=>z.id===Q)),U=(0,t.Mz)(m,Q=>Q.titles),W=Q=>(0,t.Mz)(h,ne=>ne.queries.find(z=>z.id===Q).query.query_string),K=(0,t.Mz)(r.kK,Q=>{var ne;const{query_string:z}=(ne=Q==null?void 0:Q.query)!=null?ne:(0,o.P$)();return z}),j=Q=>(0,t.Mz)(p,W(Q),K,(ne,z,le)=>ne===s.A.Type.Search?z:le),G=(0,t.Mz)(h,Q=>Q.parameters),k=(0,t.Mz)(g,r.CY,(Q,ne)=>{var z;return(z=ne==null?void 0:ne.result)==null?void 0:z.forId(Q)})},rNH0cW39:(x,y,e)=>{"use strict";e.d(y,{VZ:()=>V,mB:()=>me,qP:()=>U,QJ:()=>j,MI:()=>Ve,DU:()=>le,Z1:()=>K,Xb:()=>I,hn:()=>M,hX:()=>Pe,H_:()=>ze,oR:()=>z,Ze:()=>he,vl:()=>k,YS:()=>Ie,AC:()=>_});var t=e("VYzIwY9T"),r=e("VPaD/Np4"),s=e("ZJjLtB2e"),o=e("dcP8FKpJ");const n=async ce=>{const Ee=(0,s.A)(),oe=await(0,o.A)(ce);return[Ee,oe]};var c=e("2z9Zbpb8"),g=e("UmnljV2q"),d=e("YX1HQgTG"),f=e("zAtQmw72"),p=e("gbXdylj1"),E=e("NS75yjmB"),l=e("g2NQZb9A"),m=e("iltCXley"),h=e("CHWvwBKE"),A=e("PLPb65Bv");const C=(0,t.Z0)({name:"view",initialState:{view:void 0,isDirty:!1,isNew:!1,activeQuery:void 0},reducers:{setActiveQuery:(ce,Ee)=>({...ce,activeQuery:Ee.payload}),setView:{reducer(ce,Ee){const[oe,ae]=Ee.payload;return{...ce,view:oe,isDirty:ae===void 0?ce.isDirty:ae}},prepare(ce,Ee){return{payload:[ce,Ee]}}},setIsNew:(ce,Ee)=>({...ce,isNew:Ee.payload}),setIsDirty:(ce,Ee)=>({...ce,isDirty:Ee.payload})}}),_=C.reducer,{setView:P,setIsDirty:I,setIsNew:M,setActiveQuery:O}=C.actions,U=(ce,Ee)=>{var oe,ae;const ye=(oe=ce==null?void 0:ce.state)==null?void 0:oe.map(ve=>ve.widgets),Oe=(ae=Ee==null?void 0:Ee.state)==null?void 0:ae.map(ve=>ve.widgets);return(0,f.A)(ye,Oe)},W=async ce=>{const Ee=(0,p.A)(ce),oe=await(0,l.A)(Ee.search);return Ee.toBuilder().search(oe).build()},K=ce=>async(Ee,oe)=>{const ae=(0,E.Hz)(oe());Ee(O(ce)),ae!==ce&&Ee((0,d.g7)())},j=(ce,Ee=!1)=>async(oe,ae)=>{const ye=(0,E.sf)(ae());if(Ee||!U(ye,ce)){const Oe=await W(ce);return await oe(P(Oe)),oe((0,d.g7)())}return oe(P(ce))},G={hasToPushRevision:!0},k=(ce,Ee=!1,oe=G)=>async(ae,ye)=>{const Oe=ye(),ve=(0,E.sf)(Oe);if(oe.hasToPushRevision&&await ae((0,A.Z1)({type:"view",state:{...Oe.view}})),Ee||!U(ve,ce)){const _e=await W(ce);return await ae(P(_e,!0)),ae((0,d.g7)())}return ae(P(ce,!0))},Q=ce=>async(Ee,oe)=>{const ae=(0,E.sf)(oe()),{search:ye}=ae,Oe=ye.toBuilder().newId().queries(ce).build(),ve=await(0,l.A)(Oe),_e=ae.state.filter((je,Qe)=>!!ce.find(zt=>zt.id===Qe)).toMap(),He=ae.toBuilder().search(ve).state(_e).build();return Ee(k(He))},ne=(ce,Ee)=>async(oe,ae)=>{const ye=ae(),Oe=(0,E.sf)(ye),{search:ve}=Oe,_e=ve.queries.add(ce),He=Oe.state.set(ce.id,Ee),je=Oe.toBuilder().search(ve.toBuilder().queries(_e).build()).state(He).build();return oe(k(je,!0)).then(()=>oe(K(ce.id))).then(()=>ce.id)},z=(ce,Ee)=>async(oe,ae)=>{const ye=ae(),Oe=(0,E.sf)(ye),{queries:ve}=Oe.search,_e=ve.map(Qe=>Qe.id===ce?Ee:Qe).toOrderedSet(),He=Oe.search.toBuilder().queries(_e).build(),je=Oe.toBuilder().search(He).build();return oe(k(je,!0))},le=ce=>async(Ee,oe)=>{const ae=oe(),ye=(0,E.sf)(ae),Oe=(0,E.Hz)(ae),{search:ve}=ye,_e=ve.queries.filter(xe=>xe.id!==ce).toOrderedSet(),He=ye.state.remove(ce),je=ye.toBuilder().search(ve.toBuilder().queries(_e).build()).state(He).build(),Qe=ve.queries.map(xe=>xe.id).toList(),zt=(0,c.A)(Qe,Oe,r.List([ce]));await Ee(K(zt)),await Ee(k(je,!0))},V=()=>async(ce,Ee)=>{const oe=(0,E.o$)(Ee()),[ae,ye]=await n(oe);return ce(ne(ae,ye))},me=ce=>async(Ee,oe)=>{const ae=(0,m.A)(),Oe=(0,E.ZA)(ce)(oe()).duplicate(),_e=(0,E.Dm)(ce)(oe()).toBuilder().id(ae).build();return await Ee(ne(_e,Oe)),ae},Pe=ce=>async(Ee,oe)=>{const ae=(0,E.fm)(oe()),ye=ce.map(Oe=>ae.find(ve=>ve.id===Oe)).toOrderedSet();return Ee(Q(ye))},Ve=ce=>async(Ee,oe)=>{const ae=(0,E.sf)(oe());let ye=ae.state;ce.forEach(({titlesMap:ve,queryId:_e})=>{const He=ye.get(_e);let je=He.titles;ve.forEach((Qe,zt)=>{Qe.forEach((xe,Ue)=>{je=je.setIn([zt,Ue],xe)})}),ye=ye.set(_e,He.toBuilder().titles(je).build())});const Oe=ae.toBuilder().state(ye).build();return Ee(k(Oe))},at=(ce,Ee)=>(oe,ae)=>{const Oe=(0,E.x$)(ce)(ae()).toBuilder().query((0,h.P$)(Ee)).build();return oe(z(ce,Oe))},ze=(ce,Ee)=>(oe,ae)=>{const Oe=(0,E.x$)(ce)(ae()).toBuilder().timerange(Ee).build();return oe(z(ce,Oe))},he=(ce,Ee)=>(oe,ae)=>(0,E.o$)(ae())===g.A.Type.Search?oe(at(ce,Ee)):oe((0,d.IB)(Ee)).then(()=>oe((0,d.g7)())),Ie=(ce,Ee)=>(oe,ae)=>{const ye=(0,E.sf)(ae()),Oe=ye.state.set(ce,Ee),ve=ye.toBuilder().state(Oe).build();return oe(k(ve))},Re=ce=>async(Ee,oe)=>{const ae=selectView(oe()),Oe=selectSearch(oe()).toBuilder().parameters(ce).build(),ve=ae.toBuilder().search(Oe).build();return Ee(k(ve,!0))}},l8tl93Rz:(x,y,e)=>{"use strict";e.d(y,{QD:()=>h,qT:()=>_,hW:()=>P,ye:()=>I,WK:()=>A,Ox:()=>C,b4:()=>l,SY:()=>E,Ru:()=>m});var t=e("VPaD/Np4"),r=e("kmCB/Byf"),s=e("NS75yjmB");const o=(0,r.Mz)(s.td,M=>M.widgetPositions);var n=e("rNH0cW39"),c=e("iltCXley"),g=e("A2mY8G47"),d=e("4U1brrvO"),f=e("/vL3Sz6z"),p=e("STGxpovz");const E=M=>(O,U)=>{const W=(0,s.Hz)(U()),j=(0,s.td)(U()).toBuilder().widgetPositions(M).build();return O((0,n.YS)(W,j))},l=(M,O)=>(U,W)=>{const j={...o(W()),[M]:O};return U(E(j))},m=M=>(O,U)=>{const W=(0,s.Hz)(U()),j=(0,s.td)(U()).toBuilder().widgets(M).build(),G=(0,p.A)(j);return O((0,n.YS)(W,G))},h=(M,O)=>(U,W)=>{if(M.id===void 0)throw new Error("Unable to add widget without id to query.");const K=(0,s.u3)(W()),j=t.Map(o(W())),G=K.push(M),k=O?j.set(M.id,O):(0,f.A)(j,G.toArray()),Q=(0,s.Hz)(W()),z=(0,s.td)(W()).toBuilder().widgetPositions(k).widgets(G).build();return U((0,n.YS)(Q,z))},A=(M,O)=>(U,W)=>{const j=(0,s.u3)(W()).map(G=>G.id===M?O:G).toList();return U(m(j))},C=(M,O)=>(U,W)=>{const j=(0,s.Xj)(M)(W()).toBuilder().config(O).build();return U(A(M,j))},_=(M,O)=>async(U,W)=>{const K=(0,s.Xj)(M)(W());if(!K)throw new Error(`Unable to duplicate widget with id "${M}", it is not found.`);const j=(0,s.Hz)(W()),G=K.duplicate((0,c.A)());return U(h(G)).then(()=>U((0,g.D)(j,"widget",G.id,`${O} (copy)`)))},P=M=>async(O,U)=>{const K=(0,s.u3)(U()).filter(j=>j.id!==M).toList();return O(m(K))},I=(M,O,U)=>(W,K)=>{var j,G;const k=(0,s.Xj)(M)(K()),Q=(G=(j=k==null?void 0:k.config)==null?void 0:j.formattingSettings)!=null?G:d.A.empty(),{chartColors:ne}=Q,z=k.toBuilder().config(k.config.toBuilder().formattingSettings(Q.toBuilder().chartColors({...ne,[O]:U}).build()).build()).build();return W(A(M,z))}},L2qXWCIB:(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("ASBo/Til"),r=e.n(t),s=e("IZYxBTgT"),o=e("nxMFMmDQ"),n=e("I4XORk+Y"),c=e("rNH0cW39"),g=e("NS75yjmB");const d=l=>`"${r()(l).tz("UTC").format(s.wT.internalIndexer)}"`,f=(l,m,h,A)=>{const C=A.type==="date"?d(h):(0,n.ih)(h),_=h===o.gx?`NOT _exists_:${m}`:`${m}:${C}`;return(0,n.$A)(l,_)},E=({queryId:l,field:m,value:h="",type:A})=>async(C,_)=>{const P=(0,g.SL)(l)(_()),I=f(P,m,h,A);return C((0,c.Ze)(l,I))}},AEcypqf3:(x,y,e)=>{"use strict";e.d(y,{$q:()=>c,GC:()=>o,QJ:()=>g,RR:()=>d,X3:()=>n,l3:()=>f});var t=e("pjsNBHWI"),r=e.n(t),s=e("d4kzUuQm");const o=p=>p.push(`${s.Ay.SEARCH}/new`),n=o,c=(p,E)=>p.push(`${s.Ay.stream_search(E)}/new`),g=(p,E)=>p.push(`${s.Ay.SEARCH}/${E}`),d=(p,E,l)=>p.push(`${s.Ay.pluginRoute("DASHBOARDS_VIEWID")(E)}${l?`?${(0,t.stringify)({page:l})}`:""}`),f=(p,E)=>p.pushWithState(s.Ay.pluginRoute("DASHBOARDS_NEW"),{view:E})},"2z9Zbpb8":(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const r=(s,o,n)=>{const c=s.indexOf(o),g=s.slice(0,c).toList();return(g.isEmpty()?s:g.reverse()).find(f=>!n.includes(f))}},"/vL3Sz6z":(x,y,e)=>{"use strict";e.d(y,{z:()=>c,A:()=>g});var t=e("VPaD/Np4"),r=e("mTnbNx1k"),s=e("FfX57J1C");const n=d=>{const{defaultHeight:f,defaultWidth:p}=(0,r._Q)(d.type);return s.A.builder().height(f).width(p).col(1).row(1).build()},c=(d,f)=>{let p=0;const E=d.map(m=>{const h=m.height,A=p+m.row,C=m.toBuilder().row(A).build();return p+=h,C}).toMap(),l=f.map(m=>{const h=p+m.row;return m.toBuilder().row(h).build()}).toMap();return E.merge(l)},g=(d,f)=>{const p=f.filter(h=>d.has(h.id)),E=f.filter(h=>!d.has(h.id)),l=t.Map(E.map(h=>[h.id,n(h)])),m=t.Map(p.map(h=>{const A=d.get(h.id);return[h.id,A]}));return c(l,m)}},tt0llszK:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("jAGDuYSC"),r=e("iSSis/Yq"),s=e("rNH0cW39");const o=c=>c&&c.additional&&c.additional.body&&c.additional.body.message?c.additional.body.message:c,n=c=>async g=>{try{await r.u.update(c),g((0,s.hn)(!1)),g((0,s.Xb)(!1)),t.A.success(`Saving view "${c.title}" was successful!`,"Success!")}catch(d){t.A.error(`Saving view failed: ${o(d)}`,"Error!")}}},gbXdylj1:(x,y,e)=>{"use strict";e.d(y,{A:()=>p});var t=e("/yh+QgO6"),r=e.n(t),s=e("VPaD/Np4"),o=e("iltCXley"),n=e("mTnbNx1k"),c=e("WExy2xUc");const g=E=>E.filter?{filter:{type:"query_string",query:E.filter}}:{},d=E=>{let l=s.Map();const m=s.List(E).map(h=>(0,n._Q)(h.type).searchTypes(h).map(A=>({id:(0,o.A)(),timerange:h.timerange,query:h.query,streams:h.streams,...A,widgetId:h.id,...g(h),filters:h.filters}))).reduce((h,A)=>h.merge(A),s.Set()).map(h=>{l=l.update(h.widgetId,s.Set(),M=>M.add(h.id));const A=(0,c.A)(h.type);(!A||!A.defaults)&&console.warn(`Unable to find type definition or defaults for search type ${h.type} - skipping!`);const{defaults:C={}}=A||{},{config:_,widgetId:P,...I}=h;return s.Map(C).merge(I).merge(_).merge({id:h.id,type:h.type}).toJS()}).toArray();return{widgetMapping:l,searchTypes:m}},p=E=>{const{state:l}=E,m=l.map(P=>d(P.widgets)),h=r()(E,"search"),A=h.queries.map(P=>{var I,M;return P.toBuilder().searchTypes((M=(I=m.get(P.id))==null?void 0:I.searchTypes)!=null?M:[]).build()}),C=h.toBuilder().newId().queries(A.toOrderedSet()).build();let _=E.toBuilder().search(C).build();return m.map(({widgetMapping:P})=>P).forEach((P,I)=>{const M=_.state;l.has(I)&&(_=_.toBuilder().state(M.update(I,O=>O.toBuilder().widgetMapping(P).build())).build())}),_}},UmnljV2q:(x,y,e)=>{"use strict";e.d(y,{A:()=>p});var t=e("VPaD/Np4"),r=e.n(t),s=e("Jy5RbH6g"),o=e.n(s),n=e("Jg5wVMAu"),c=e.n(n),g=e("qhwXAFlw"),d=e("6BCpJW2W");const f=class iA{constructor(m,h,A,C,_,P,I,M,O,U,W,K){this._value={id:m,type:h,title:A,summary:C,description:_,search:P,properties:t.fromJS(I),state:t.fromJS(M),createdAt:O,owner:U,requires:W,favorite:K}}static create(){return new E().createdAt(new Date).build()}get id(){return this._value.id}get type(){return this._value.type}get title(){return this._value.title}get summary(){return this._value.summary}get description(){return this._value.description}get search(){return this._value.search}get properties(){return this._value.properties}get state(){return this._value.state}get createdAt(){return this._value.createdAt}get widgetMapping(){return(this.state||t.Map()).valueSeq().map(m=>m.widgetMapping).reduce((m,h)=>t.fromJS(m).merge(t.fromJS(h)))}get owner(){return this._value.owner}get requires(){return this._value.requires||{}}get favorite(){return this._value.favorite||!1}getSearchTypeByWidgetId(m){const A=this.state.map(_=>_.widgetMapping).flatten(!0).get(m).first();if(!A)throw new Error(`Search type for widget with id ${m} does not exist`);return o()(this.search.queries.map(_=>_.searchTypes).toArray()).find(_=>_&&_.id&&_.id===A)}getWidgetTitleByWidget(m){const h=this.state.flatMap(C=>C.titles.get("widget")),A=(0,g.A)(m);return h.get(m.id)||A}toBuilder(){const{id:m,title:h,summary:A,description:C,search:_,properties:P,state:I,createdAt:M,owner:O,requires:U,type:W,favorite:K}=this._value;return new E(t.Map({id:m,title:h,summary:A,description:C,search:_,properties:P,state:I,createdAt:M,owner:O,requires:U,type:W,favorite:K}))}toJSON(){const{id:m,type:h,title:A,summary:C,description:_,search:P,properties:I,state:M,createdAt:O,owner:U}=this._value;return{id:m,type:h,title:A,summary:C,description:_,search_id:P.id,properties:I,state:M,created_at:O,owner:U}}static fromJSON(m){const{id:h,type:A,title:C,summary:_,description:P,properties:I,state:M,created_at:O,owner:U,requires:W,favorite:K}=m,j=t.Map(M).map(d.A.fromJSON).toMap(),G=new Date(O);return iA.create().toBuilder().id(h).type(A).title(C).summary(_).description(P).properties(I).state(j).createdAt(G).owner(U).requires(W).favorite(K).build()}static builder(){return new E}};f.Type={Search:"SEARCH",Dashboard:"DASHBOARD"};let p=f;class E{constructor(m=t.Map()){this.value=m}id(m){return new E(this.value.set("id",m))}toNewView(){return new E(this.value.set("id",void 0).set("title",void 0))}type(m){return new E(this.value.set("type",m))}newId(){return this.id(new(c())().toString())}title(m){return new E(this.value.set("title",m))}summary(m){return new E(this.value.set("summary",m))}description(m){return new E(this.value.set("description",m))}search(m){return new E(this.value.set("search",m))}properties(m){return new E(this.value.set("properties",m))}state(m){return new E(this.value.set("state",t.Map(m)))}createdAt(m){return new E(this.value.set("createdAt",m))}owner(m){return new E(this.value.set("owner",m))}requires(m){return new E(this.value.set("requires",m))}favorite(m){return new E(this.value.set("favorite",m))}build(){const{id:m,type:h,title:A,summary:C,description:_,search:P,properties:I,state:M,createdAt:O,owner:U,requires:W,favorite:K}=this.value.toObject();return new p(m,h,A,C,_,P,I,M,O,U,W,K)}}},"6BCpJW2W":(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("VPaD/Np4"),r=e.n(t),s=e("SwOo9/Yp"),o=e("64Qr82UM"),n=e("FfX57J1C"),c=e("i0LZga0C"),g=e("4/JSMBsA");class d{constructor(E,l,m,h,A,C,_){this._value={fields:E,titles:l,widgets:(0,t.List)(m),widgetMapping:h,widgetPositions:(0,t.Map)(A),formatting:C,staticMessageListId:_}}static create(){return new f().widgets((0,t.List)()).widgetPositions((0,t.Map)()).titles((0,t.Map)()).build()}get fields(){return this._value.fields}get formatting(){return this._value.formatting}get titles(){return this._value.titles}get widgets(){return this._value.widgets}get widgetMapping(){return this._value.widgetMapping}get widgetPositions(){return this._value.widgetPositions.toJS()}get staticMessageListId(){return this._value.staticMessageListId}duplicate(){const E={},l=this.widgets.map(C=>{const _=C.toBuilder().newId().build();return E[C.id]=_.id,_}).toList(),m=(0,t.Map)(this.titles.get(c.A.Widget,(0,t.Map)()).mapEntries(([C,_])=>[E[C],_])),h=this.titles.set(c.A.Widget,m).updateIn([c.A.Tab,"title"],C=>C&&`${C} (Copy)`),A=(0,t.Map)(this.widgetPositions).mapEntries(([C,_])=>[E[C],_]).toJS();return this.toBuilder().widgetMapping((0,t.Map)()).widgetPositions(A).widgets(l).titles(h).build()}toBuilder(){const E=this._value;return new f((0,t.Map)(E))}equals(E){return E===void 0||!(E instanceof d)?!1:(0,s.A)(this.fields,E.fields)&&(0,s.A)(this.titles,E.titles)&&(0,s.A)(this.widgets,E.widgets)&&(0,s.A)(this.widgetMapping,E.widgetMapping)&&(0,s.A)(this.widgetPositions,E.widgetPositions)&&(0,s.A)(this.formatting,E.formatting)}toJSON(){const{fields:E,formatting:l,titles:m,widgets:h,widgetMapping:A,widgetPositions:C}=this._value;return{selected_fields:E,formatting:l,titles:m,widgets:h,widget_mapping:A,positions:C}}static fromJSON(E){const{selected_fields:l,titles:m,widgets:h,widget_mapping:A,positions:C,formatting:_}=E;return d.builder().titles((0,t.fromJS)(m)).widgets((0,t.List)(h.map(P=>o.A.fromJSON(P)))).widgetMapping((0,t.fromJS)(A)).fields(l).widgetPositions((0,t.Map)(C).map(n.A.fromJSON).toMap()).formatting(_?g.A.fromJSON(_):g.A.empty()).build()}static builder(){return new f}}class f{constructor(E=(0,t.Map)()){this.value=E}fields(E){return new f(this.value.set("fields",E))}formatting(E){return new f(this.value.set("formatting",E))}titles(E){return new f(this.value.set("titles",(0,t.fromJS)(E)))}widgets(E){return new f(this.value.set("widgets",(0,t.List)(E)))}widgetMapping(E){return new f(this.value.set("widgetMapping",E))}widgetPositions(E){return new f(this.value.set("widgetPositions",(0,t.Map)(E)))}build(){const{fields:E,formatting:l,titles:m,widgets:h,widgetMapping:A,widgetPositions:C}=this.value.toObject();return new d(E,m,h,A,C,l)}}},dcP8FKpJ:(x,y,e)=>{"use strict";e.d(y,{A:()=>p,f:()=>d});var t=e("VPaD/Np4"),r=e.n(t),s=e("pa3lbc7X"),o=e("UmnljV2q"),n=e("6BCpJW2W"),c=e("mTnbNx1k"),g=e("FfX57J1C");const d=E=>E?E instanceof Array?({stream:l})=>E.includes(l):({stream:l})=>l===E:({stream:l})=>l===null,f={[o.A.Type.Search]:async E=>{const l=await s.A.list(),m=d(E),h=l?l.filter(m):[],A=(0,c.s0)(),C=(0,c.Wk)(void 0,h),_=[A,C],P={widget:{[A.id]:"Message Count",[C.id]:"All Messages"}},I={[A.id]:new g.A(1,1,2,1/0),[C.id]:new g.A(1,3,6,1/0)};return{titles:P,widgets:_,positions:I}},[o.A.Type.Dashboard]:async E=>({titles:{},widgets:[],positions:{}})},p=async(E,l)=>{const{titles:m,widgets:h,positions:A}=await f[E](l);return n.A.create().toBuilder().titles(m).widgets(t.List(h)).widgetPositions(A).build()}},"Y/YOqMWf":(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("eFxcQyPT"),r=e("MdYBRjRJ");const s=(0,r.H3)("/views/search"),n=c=>(0,t.Ay)("GET",`${s}/${c}`)},"4/JSMBsA":(x,y,e)=>{"use strict";e.d(y,{A:()=>o});var t=e("VPaD/Np4"),r=e.n(t),s=e("UnwAqHt2");class o{constructor(g=[]){this._value={highlighting:g}}get highlighting(){return this._value.highlighting}toBuilder(){const{highlighting:g}=this._value;return new n(t.Map({highlighting:g}))}static create(g){return new o(g)}static empty(){return new n().build()}toJSON(){const{highlighting:g}=this._value;return{highlighting:g}}static fromJSON(g){const{highlighting:d=[]}=g;return o.create(d.map(f=>s.Ay.fromJSON(f)))}}class n{constructor(g=t.Map()){this.value=g}highlighting(g){return new n(this.value.set("highlighting",g))}build(){const{highlighting:g}=this.value.toObject();return new o(g)}}},NhiTWmq4:(x,y,e)=>{"use strict";e.d(y,{An:()=>n,Ay:()=>c,QU:()=>s});var t=e("gajRAEyE");class r{static fromJSON(d){switch(d.type){case"gradient":return n.fromJSON(d);case"static":return s.fromJSON(d);default:throw new Error(`Invalid highlighting color type: ${d.type}`)}}isStatic(){return this.type==="static"}isGradient(){return this.type==="gradient"}}class s extends r{constructor(d){super(),this._color=d}get type(){return"static"}get color(){return this._color}colorFor(){return this.color}static fromJSON({color:d}){return new s(d)}static create(d){return new s(d)}toJSON(){const{color:d}=this;return{type:"static",color:d}}}const o=(g,d=0)=>{if(typeof g=="number")return g;try{return Number.parseFloat(g)}catch{return d}};class n extends r{constructor(d,f,p){super(),this._lower=f,this._upper=p,this._gradient=d,this._scale=(0,t.A)(d)}get type(){return"gradient"}get gradient(){return this._gradient}get lower(){return this._lower}get upper(){return this._upper}get scale(){return this._scale}colorFor(d){const f=o(d,this.lower),p=this.upper-this.lower,E=Math.max(this.lower,Math.min(this.upper,f));return this._scale((E-this.lower)/p)}static fromJSON({gradient:d,lower:f,upper:p}){return new n(d,f,p)}static create(d,f,p){return new n(d,f,p)}withGradient(d){return n.create(d,this.lower,this.upper)}withLower(d){return n.create(this.gradient,d,this.upper)}withUpper(d){return n.create(this.gradient,this.lower,d)}toJSON(){const{gradient:d,lower:f,upper:p}=this;return{type:"gradient",gradient:d,lower:f,upper:p}}}const c=r},UnwAqHt2:(x,y,e)=>{"use strict";e.d(y,{c6:()=>f,$9:()=>d,Ay:()=>E,XL:()=>p});var t=e("VPaD/Np4");const r=m=>typeof m=="number"?!0:typeof m!="string"||m.trim()===""?!1:!Number.isNaN(Number(m)),s=(m,h,A)=>r(m)&&r(h)?A(parseFloat(m),parseFloat(h)):!1,n={equal:(m,h)=>String(m)===String(h),not_equal:(m,h)=>String(m)!==String(h),less_equal:(m,h)=>s(m,h,(A,C)=>A<=C),greater_equal:(m,h)=>s(m,h,(A,C)=>A>=C),greater:(m,h)=>s(m,h,(A,C)=>A>C),less:(m,h)=>s(m,h,(A,C)=>A=",less:"<",greater:">"},p=()=>c.QU.create(g.X1[Math.floor(Math.random()*g.X1.length)]);class E{constructor(h,A,C,_){this._value={field:h,value:A,condition:C,color:_}}get field(){return this._value.field}get value(){return this._value.value}get condition(){var h;return(h=this._value.condition)!=null?h:"equal"}get conditionFunc(){var h;return n[(h=this._value.condition)!=null?h:"equal"]}get color(){return this._value.color}toBuilder(){const{field:h,value:A,condition:C,color:_}=this._value;return new l(t.Map({field:h,value:A,condition:C,color:_}))}static create(h,A,C,_){return new E(h,A,C,_)}static builder(){return new l}toJSON(){const{field:h,value:A,condition:C,color:_}=this._value;return{field:h,value:A,condition:C,color:_}}static fromJSON(h){const{field:A,value:C,condition:_,color:P}=h;return E.create(A,C,_,c.Ay.fromJSON(P))}}class l{constructor(h=t.Map()){this._value=h}field(h){return new l(this._value.set("field",h))}value(h){return new l(this._value.set("value",h))}condition(h){return new l(this._value.set("condition",h))}color(h){return new l(this._value.set("color",h))}build(){const{field:h,value:A,condition:C,color:_}=this._value.toObject();return new E(h,A,C,_)}}},STGxpovz:(x,y,e)=>{"use strict";e.d(y,{A:()=>n});var t=e("3UCnSGqh"),r=e.n(t),s=e("hKs41owK");const n=c=>{const{widgetPositions:g,widgets:d}=c,f=r()(d.toArray(),"id"),p=(0,s.q)(g,f);return c.toBuilder().widgetPositions(p).build()}},d2pcYUML:(x,y,e)=>{"use strict";e.d(y,{A:()=>d});var t=e("VPaD/Np4"),r=e.n(t),s=e("SwOo9/Yp"),o=e("zAtQmw72"),n=e("64Qr82UM"),c=e("PmoDOvRy");const g=class pc extends n.A{constructor(E,l,m,h,A,C,_){super(E,pc.type,l,m,h,A,C,_)}get isExportable(){return!0}static fromJSON(E){const{id:l,config:m,filter:h,timerange:A,query:C,streams:_,filters:P}=E;return new pc(l,c.Ay.fromJSON(m),h,A,C,_,P)}equals(E){return E instanceof pc?["id","config","filter","timerange","query","streams","filters"].every(l=>(0,s.A)(this._value[l],E[l])):!1}get config(){return this._value.config}equalsForSearch(E){return E instanceof pc?["id","config","filter","timerange","query","streams","filters"].every(l=>(0,o.A)(this._value[l],E[l])):!1}toBuilder(){const{id:E,config:l,filter:m,timerange:h,query:A,streams:C,filters:_}=this._value;return new f((0,t.Map)({id:E,config:l,filter:m,timerange:h,query:A,streams:C,filters:_}))}static builder(){return new f}static isMessagesWidget(E){return E&&E.type===pc.type}};g.type="messages",g.defaultTitle="Untitled Message Table";let d=g;class f extends n.A.Builder{build(){const{id:E,config:l,filter:m,timerange:h,query:A,streams:C,filters:_}=this.value.toObject();return new d(E,l,m,h,A,C,_)}}},PmoDOvRy:(x,y,e)=>{"use strict";e.d(y,{Ay:()=>E,He:()=>f});var t=e("VPaD/Np4"),r=e.n(t),s=e("SwOo9/Yp"),o=e("zAtQmw72"),n=e("Wk8izdHL"),c=e("7VrSCphN"),g=e("nxMFMmDQ"),d=e("uDndTqtw");const f=c.A.Descending,p=[new n.A(n.A.PIVOT_TYPE,g.WK,f)];class E extends d.A{constructor(h,A,C,_,P){super(),this._value={decorators:_,fields:h.slice(0),showMessageRow:A,showSummary:C,sort:P&&P.length>0?P:p}}get decorators(){return this._value.decorators}get fields(){return this._value.fields}get sort(){return this._value.sort}get showMessageRow(){return this._value.showMessageRow}get showSummary(){return this._value.showSummary}toBuilder(){return new l(t.Map(this._value))}toJSON(){const{decorators:h,fields:A,showMessageRow:C,showSummary:_,sort:P}=this._value;return{decorators:h,fields:A,show_message_row:C,show_summary:_,sort:P}}equals(h){return h instanceof E&&(0,s.A)(this.decorators,h.decorators)&&(0,s.A)(this.fields,h.fields)&&(0,s.A)(this.sort,h.sort)&&this.showMessageRow===h.showMessageRow&&this.showSummary===h.showSummary}equalsForSearch(h){return h instanceof E&&(0,o.A)(h.decorators,this.decorators)&&(0,o.A)(h.sort,this.sort)}static builder(){return new l().decorators([]).fields([]).sort([])}static fromJSON(h){const{decorators:A,show_message_row:C,show_summary:_,fields:P,sort:I}=h;return new E(P,C,_,A,I.map(n.A.fromJSON))}}class l{constructor(h=t.Map()){this.value=h}decorators(h){return new l(this.value.set("decorators",h.slice(0)))}fields(h){return new l(this.value.set("fields",h.slice(0)))}showMessageRow(h){return new l(this.value.set("showMessageRow",h))}showSummary(h){return new l(this.value.set("showSummary",h))}sort(h){return new l(this.value.set("sort",h))}build(){const{decorators:h,fields:A,showMessageRow:C,showSummary:_,sort:P}=this.value.toObject();return new E(A,C,_,h,P)}}},"64Qr82UM":(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("VPaD/Np4"),r=e.n(t),s=e("IA3Ku5lS"),o=e("iltCXley"),n=e("SwOo9/Yp");const c=l=>l==null,g=class Lp{constructor(m,h,A,C,_,P,I,M){this._value={id:m,type:h,config:A,filter:C===null?void 0:C,filters:(0,t.List)(M),timerange:_,query:P,streams:I}}get id(){return this._value.id}get type(){return this._value.type}get config(){return this._value.config}get filter(){return this._value.filter}get filters(){return this._value.filters}get timerange(){return this._value.timerange}get query(){return this._value.query}get streams(){return this._value.streams}get isExportable(){return!1}get returnsAllRecords(){return!1}equals(m){return m===void 0||!(m instanceof Lp)?!1:this.id===m.id&&(c(this.filter)&&c(m.filter)||(0,n.A)(this.filter,m.filter))&&(c(this.filters)&&c(m.filters)||(0,n.A)(this.filters,m.filters))&&(0,n.A)(this.config,m.config)&&(0,n.A)(this.timerange,m.timerange)&&(0,n.A)(this.query,m.query)&&(0,n.A)(this.streams,m.streams)}duplicate(m){return this.toBuilder().id(m).build()}toBuilder(){const{id:m,type:h,config:A,filter:C,filters:_,timerange:P,query:I,streams:M}=this._value;return new f((0,t.Map)({id:m,type:h,config:A,filter:C,filters:_,timerange:P,query:I,streams:M}))}toJSON(){const{id:m,type:h,config:A,filter:C,filters:_,timerange:P,query:I,streams:M}=this._value;return{id:m,type:h.toLowerCase(),config:A,filter:C,filters:_,timerange:P,query:I,streams:M}}static fromJSON(m){const{id:h,type:A,config:C,filter:_,filters:P,timerange:I,query:M,streams:O}=m,U=Lp.__registrations[A.toLowerCase()];return U?U.fromJSON(m):new Lp(h,A,C,_,I,M,O,P)}static empty(){return this.builder().build()}static builder(){return new f}static registerSubtype(m,h){this.__registrations[m.toLowerCase()]=h}};g.__registrations={};let d=g;class f{constructor(m=(0,t.Map)()){this.value=m}id(m){return this.value=this.value.set("id",m),this}newId(){return this.id((0,o.A)())}type(m){return this.value=this.value.set("type",m),this}config(m){return this.value=this.value.set("config",m),this}filter(m){return this.value=this.value.set("filter",m),this}filters(m){return this.value=this.value.set("filters",m&&t.List(m)),this}timerange(m){return this.value=this.value.set("timerange",m),this}query(m){return this.value=this.value.set("query",m),this}streams(m){return this.value=this.value.set("streams",m),this}build(){const{id:m,type:h,config:A,filter:C,filters:_,timerange:P,query:I,streams:M}=this.value.toObject();return new d(m,h,A,C,P,I,M,_)}}d.Builder=f;const E=(0,s.Gr)("views.logic.widgets.Widget",()=>d)},uDndTqtw:(x,y,e)=>{"use strict";e.d(y,{A:()=>t});class t{}},FfX57J1C:(x,y,e)=>{"use strict";e.d(y,{A:()=>g});var t=e("VPaD/Np4"),r=e.n(t),s=e("IA3Ku5lS");class o{constructor(f,p,E,l){this._value={col:f,row:p,height:E,width:l}}static fromJSON(f){const{col:p,row:E,height:l,width:m}=f,h=p==="Infinity"?1/0:p,A=E==="Infinity"?1/0:E,C=l==="Infinity"?1/0:l,_=m==="Infinity"?1/0:m;return new o(h,A,C,_)}get col(){return this._value.col}get row(){return this._value.row}get height(){return this._value.height}get width(){return this._value.width}toJSON(){const{col:f,row:p,height:E,width:l}=this._value;return{col:f===1/0?"Infinity":f,row:p===1/0?"Infinity":p,height:E===1/0?"Infinity":E,width:l===1/0?"Infinity":l}}toBuilder(){return new n((0,t.Map)(this._value))}static builder(){return new n}equals(f){return f instanceof o?this.col===f.col&&this.row===f.row&&this.height===f.height&&this.width===f.width:!1}}class n{constructor(f=(0,t.Map)()){this.value=f}col(f){return this.value=this.value.set("col",f),this}row(f){return this.value=this.value.set("row",f),this}height(f){return this.value=this.value.set("height",f),this}width(f){return this.value=this.value.set("width",f),this}build(){const{col:f,row:p,height:E,width:l}=this.value.toObject();return new o(f,p,E,l)}}const g=(0,s.Gr)("views.logic.widgets.WidgetPosition",()=>o)},hKs41owK:(x,y,e)=>{"use strict";e.d(y,{YM:()=>E,cn:()=>m,q:()=>h});var t=e("V09ZIpgK"),r=e.n(t),s=e("9xJxp5+I"),o=e.n(s),n=e("3UCnSGqh"),c=e.n(n),g=e("7FTHePOw"),d=e.n(g),f=e("FfX57J1C");const p=({i:A,x:C,y:_,w:P,h:I})=>({id:A,col:C+1,row:_+1,height:I,width:P}),E=A=>A.map(p),l=([A,C])=>{const{col:_,row:P,height:I,width:M}=C;return{i:A,x:_?Math.max(_-1,0):0,y:P===void 0||P<=0?1/0:P-1,h:I||1,w:M||1}},m=A=>Object.entries(A).map(l),h=(A,C)=>{const _=o()(A,(O,U)=>!C[U]),P=m(_),I=t.utils.compact(P,"vertical",12),M=c()(E(I),"id");return d()(M,({col:O,row:U,width:W,height:K})=>f.A.builder().row(U).col(O).width(W).height(K).build())}},"MDn/VShH":(x,y,e)=>{"use strict";e.d(y,{A:()=>Cf});var t=e("Z7aTuO5B");const s=t.createContext(void 0),n=t.createContext(()=>{});var c=e("J6y4/h8P"),g=e("0eB11aFj"),d=e("8fnsnG21"),f=e("ww+BtWnX"),p=e.n(f),E=e("ii0bleBb"),l=e.n(E),m=e("IA3Ku5lS");const h=t.createContext(void 0),A=(0,m.Gr)("contexts.SearchPagePreferences",()=>h);var C=e("N3RHy9gr"),_=e("8OvTct/Z"),P=e("v4GbOr/o"),I=e("MdYBRjRJ"),M=e("0t7Ye+61"),O=e("u2QUEJU3");const U=c.default.button(({theme:{colors:v,fonts:b},$isSelected:D,$sidebarIsPinned:L,$disabled:N})=>(0,c.css)` position: relative; z-index: 4; /* to render over SidebarNav::before */ width: 100%; height: 40px; text-align: center; cursor: ${N?"not-allowed":"pointer"}; font-size: ${b.size.h3}; color: ${v.variant.darkest.default}; background: ${D?v.gray[90]:v.global.contentBackground}; border: 0; padding: 0; &:hover { color: ${D?v.variant.darkest.default:v.variant.darker.default}; background: ${D?v.gray[80]:v.variant.lightest.default}; } &:active { background: ${v.variant.lighter.default}; } /* stylelint-disable selector-max-empty-lines, indentation */ ${D&&!L&&(0,c.css)` &::before, &::after { content: ''; position: absolute; right: -5px; height: 15px; width: 5px; background-color: ${v.global.contentBackground}; } &::before { transform: skewY(-45deg); top: calc(50% - 12px); } &::after { transform: skewY(45deg); bottom: calc(50% - 12px); } `} /* stylelint-enable selector-max-empty-lines, indentation */ `),W=c.default.span(({$showTitleOnHover:v,$isSelected:b,$disabled:D,$sidebarIsPinned:L,theme:{colors:N}})=>(0,c.css)` display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; position: relative; opacity: ${D?.65:1}; &:hover { + div { display: ${v&&!b?"flex":"none"}; } &::after { display: ${v?"block":"none"}; } } &::after { display: ${b?"block":"none"}; box-shadow: ${b&&!L?`inset 2px -2px 2px 0 ${N.global.navigationBoxShadow}`:"none"}; background-color: ${b?N.global.contentBackground:N.variant.lightest.info}; border: ${b?"none":`1px solid ${N.variant.light.info}`}; content: ' '; position: absolute; left: 82.5%; top: calc(50% - 9px); width: 18px; height: 18px; transform: rotate(45deg); } `),K=c.default.div(({theme:{colors:v,fonts:b}})=>(0,c.css)` display: none; position: absolute; padding: 0 10px; left: 100%; top: calc(50% - 13px); height: 26px; background-color: ${v.variant.lightest.info}; border: 1px solid ${v.variant.light.info}; border-left: none; box-shadow: 3px 3px 3px ${v.global.navigationBoxShadow}; z-index: 4; border-radius: 0 3px 3px 0; align-items: center; span { color: ${v.variant.darker.info}; font-size: ${b.size.body}; font-weight: bold; text-transform: uppercase; } `),j=({isSelected:v,title:b,icon:D,onClick:L,showTitleOnHover:N,sidebarIsPinned:w,disabled:H,ariaLabel:Z})=>t.createElement(U,{"aria-label":Z,$isSelected:v,onClick:H?void 0:L,title:N?"":b,$sidebarIsPinned:w,$disabled:H},t.createElement(W,{$showTitleOnHover:N,$isSelected:v,$sidebarIsPinned:w,$disabled:H},t.createElement(O.A,{name:D,type:"regular"})),N&&!v&&t.createElement(K,null,t.createElement("span",null,b)));j.propTypes={icon:l().node.isRequired,isSelected:l().bool,showTitleOnHover:l().bool,sidebarIsPinned:l().bool.isRequired,title:l().string.isRequired,disabled:l().bool},j.defaultProps={isSelected:!1,showTitleOnHover:!0,disabled:!1};const G=j,k=c.default.div(({$isOpen:v,$sidebarIsPinned:b,theme:D})=>(0,c.css)` background: ${D.colors.global.navigationBackground}; color: ${D.utils.contrastingColor(D.colors.global.navigationBackground,"AA")}; box-shadow: ${b&&v?"none":`3px 3px 3px ${D.colors.global.navigationBoxShadow}`}; width: 50px; height: 100%; position: relative; z-index: 1031; &::before { content: ''; position: absolute; top: 0; right: -6px; height: 6px; width: 6px; border-top-left-radius: 50%; background: transparent; box-shadow: -6px -6px 0 3px ${D.colors.global.navigationBackground}; z-index: 4; /* to render over Sidebar ContentColumn */ } `),Q=c.default.div` > * { margin-bottom: 5px; &:last-child { margin-bottom: 0; } } `,ne=c.default.div` padding: 0 10px; hr { border-color: currentColor; margin: 5px 0 10px; } `,le=({sections:v,activeSection:b,selectSidebarSection:D,sidebarIsPinned:L,actions:N})=>{const w=b==null?void 0:b.key;return t.createElement(k,{$sidebarIsPinned:L,$isOpen:!!b},t.createElement(Q,null,v.map(({key:H,icon:Z,title:ee})=>{const Ce=w===H;return t.createElement(G,{isSelected:Ce,ariaLabel:Ce?`Close ${ee} section`:`Open ${ee} section`,icon:Z,onClick:()=>D(H),key:H,title:ee,sidebarIsPinned:L})})),t.createElement(ne,null,t.createElement("hr",null)),t.createElement(Q,null,N.map(({key:H,Component:Z})=>t.createElement(Z,{key:H,sidebarIsPinned:L}))))};var V=e("IOI9nV80"),me=e("uEPrrliZ");const Pe=c.default.div(({theme:v,$sidebarIsPinned:b})=>(0,c.css)` position: ${b?"relative":"fixed"}; width: 270px; height: ${b?"100%":"calc(100% - 50px)"}; /* subtract the nav height */ top: ${b?0:"50px"}; left: ${b?0:"50px"}; background: ${v.colors.global.contentBackground}; border-right: ${b?"none":`1px solid ${v.colors.variant.light.default}`}; box-shadow: ${b?`3px 3px 3px ${v.colors.global.navigationBoxShadow}`:"none"}; z-index: ${b?1030:6}; ${b&&(0,c.css)` &::before { content: ''; position: absolute; top: 0; right: -6px; height: 6px; width: 6px; border-top-left-radius: 50%; background: transparent; box-shadow: -6px -6px 0 3px ${v.colors.global.contentBackground}; z-index: 5; /* to render over Sidebar ContentColumn */ } `} `),Ve=c.default.div(({theme:v})=>(0,c.css)` display: grid; grid-template-columns: 1fr; grid-template-rows: auto minmax(1px, 1fr); height: 100%; overflow-y: auto; padding: 5px 15px 0; color: ${v.colors.global.textDefault}; `),at=c.default.div` grid-column: 1; grid-row: 1; `,ze=c.default.div` height: 35px; display: grid; grid-template-columns: 1fr auto; > *:nth-child(1) { grid-column: 1; } > *:nth-child(2) { grid-column: 2; } `,he=c.default.h1` color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; `,Ie=c.default.div(({theme:v,$sidebarIsPinned:b})=>(0,c.css)` > * { font-size: ${v.fonts.size.large}; color: ${b?v.colors.variant.info:v.colors.gray[30]}; } `),Re=c.default.hr` margin: 5px 0 10px; `,ce=c.default.h2` margin-bottom: 10px; `,Ee=c.default.div` display: inline-grid; align-content: center; `,oe=c.default.div` grid-column: 1; grid-row: 2; /* Fixes padding problem with padding-bottom from container */ > *:last-child { padding-bottom: 15px; } `,ae=v=>{if(!v)return;const{actions:{toggleSidebarPinning:b}}=v;b()},Oe=({children:v,sectionTitle:b,closeSidebar:D,searchPageLayout:L})=>{const N=L==null?void 0:L.config.sidebar.isPinned,w=(0,me.A)();return t.createElement(Pe,{$sidebarIsPinned:N},t.createElement(Ve,null,t.createElement(at,null,t.createElement(ze,{title:w},t.createElement(Ee,null,t.createElement(he,{onClick:D},w)),t.createElement(Ee,null,t.createElement(Ie,{$sidebarIsPinned:N},t.createElement(V.K0,{onClick:()=>ae(L),title:`Display sidebar ${N?"as overlay":"inline"}`,name:"push_pin"})))),t.createElement(Re,null),t.createElement(ce,null,b)),t.createElement(oe,null,v)))};var ve=e("SqY3hYJN"),_e=e("xudoaDQq"),He=e("kmCB/Byf"),je=e("YcvsU7cw"),Qe=e("NS75yjmB");const zt=(0,He.Mz)(Qe.Hz,Qe.sf,(v,b)=>b?{id:b==null?void 0:b.id,title:b==null?void 0:b.title,description:b==null?void 0:b.description,summary:b==null?void 0:b.summary,activeQuery:v}:{}),Ue=()=>(0,je.A)(zt);var ke=e("9pdI12pI"),Se=e.n(ke),Je=e("oc9db6Tt"),nt=e.n(Je),Wt=e("KAQaaMh7");const Fe=()=>(0,je.A)(Wt.kK);var qe=e("UmnljV2q");const ut=c.default.div` margin-bottom: 10px; `,ft=c.default.table` margin-bottom: 5px; td:first-child { padding-right: 10px; } `,Ot=({results:v})=>{var b,D,L;const{timerange:N}=(b=Fe())!=null?b:{},w=(0,_e.A)();if(nt()(v))return t.createElement("i",null,"No query executed yet.");const{timestamp:H,duration:Z,effectiveTimerange:ee,searchTypes:Ce}=v,Me=Ce&&((L=(D=Object.values(Ce))==null?void 0:D[0])==null?void 0:L.total),Ne=w===qe.A.Type.Dashboard&&!N;return t.createElement(t.Fragment,null,t.createElement("p",null,"Query executed in ",t.createElement("br",null),Se()(Z).format("0,0"),"ms at ",t.createElement(V.Dc,{dateTime:H})),t.createElement(ut,null,"Effective time range",t.createElement("br",null),Ne?t.createElement("i",null,"Varies per widget"):t.createElement(ft,null,t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",null,"From"),t.createElement("td",{"aria-label":"Effective time range from"},t.createElement(V.Dc,{dateTime:ee.from,format:"complete"}))),t.createElement("tr",null,t.createElement("td",null,"To"),t.createElement("td",{"aria-label":"Effective time range to"},t.createElement(V.Dc,{dateTime:ee.to,format:"complete"})))))),t.createElement("p",null,"Total results",t.createElement("br",null),Ne?t.createElement("i",null,"Varies per widget"):Se()(Me).format("0,0")))};Ot.propTypes={results:l().object.isRequired};const Lt=Ot,Ft=c.default.p(({theme:v})=>(0,c.css)` color: ${v.colors.global.textDefault}; margin-bottom: 15px; `),$t=c.default.h3` margin-bottom: 10px; `,be=({results:v})=>{const b=Ue(),D=!b.id,L=(0,_e.A)(),N=L?(0,ve.A)({type:L}):"",w=t.createElement(t.Fragment,null,t.createElement($t,null,"Execution"),t.createElement(Lt,{results:v}));return D?t.createElement(t.Fragment,null,t.createElement(Ft,null,"Save the search or export it to a dashboard to add a custom summary and description."),w):t.createElement(t.Fragment,null,(!b.summary||!b.description)&&t.createElement(Ft,null,"To add a description and summary for this ",N," click on the ",t.createElement(V.In,{name:"more_horiz"}),' icon in the search bar to open its action menu. The action menu includes the option "Edit metadata".'),w,t.createElement($t,null,"Search"),t.createElement("p",null,b.summary||t.createElement("i",null,"This ",N," has no summary.")),t.createElement("p",null,b.description||t.createElement("i",null,"This ",N," has no description.")))};be.propTypes={results:l().object.isRequired};const yn=be;var Kt=e("PpCK0BgN"),An=e.n(Kt),qt=e("PfG+ecgN"),io=e.n(qt),Be=e("rIl5IEuP"),bn=e("iltCXley"),gn=e("orDZ6Vj2"),wn=e("0hhBr0/b");const Zn=c.default.div` margin-bottom: 20px; &:last-child { margin-bottom: 0; } `,Vn=(0,c.default)(Be.Button)` display: block; margin: 5px 0; width: 100%; `,po=v=>"func"in v,De=({creator:v,onClick:b,setOverflowingComponents:D})=>{var L;const N=(0,M.A)(),w=(0,_.A)(),H=(0,gn.A)(),Z=((L=v.useCondition)==null?void 0:L.call(v))===!1,ee=()=>{if(po(v))return()=>{w(P.g.SEARCH_WIDGET_CREATE[io()(v.title).replace(/ /g,"_")],{app_pathname:(0,I.i)(N.pathname),app_section:"search-sidebar",event_details:{widgetType:v.type}}),b(),H(v.func())};if(v.component){const Ce=v.component;return()=>{const Me=(0,bn.A)(),Ne=()=>{D(st=>{const pt={...st};return delete pt[Me],pt}),b()},ot=t.createElement(Ce,{key:v.title,onClose:Ne});D(st=>{const pt={...st};return pt[Me]=ot,pt})}}throw new Error(`Invalid binding for creator: ${JSON.stringify(v)} - has neither 'func' nor 'component'.`)};return t.createElement(Vn,{key:v.title,onClick:ee(),disabled:Z},v.title)},ln=({creators:v,onClick:b,setOverflowingComponents:D})=>t.createElement(t.Fragment,null,An()(v,"title").map(L=>t.createElement(De,{creator:L,key:L.title,onClick:b,setOverflowingComponents:D}))),bt=(v,b)=>v.filter(D=>D.type===b),En=({onClick:v})=>{const[b,D]=(0,t.useState)({}),L=(0,wn.A)("creators"),N=bt(L,"preset"),w=bt(L,"generic"),H=bt(L,"investigations"),Z=bt(L,"events"),ee=Object.values(b);return t.createElement(t.Fragment,null,t.createElement(Ft,null,"Use the following options to add an aggregation, log view (enterprise feature) or parameters (enterprise feature) to your search."),t.createElement(Zn,null,t.createElement($t,null,"Generic"),t.createElement(ln,{creators:w,onClick:v,setOverflowingComponents:D})),t.createElement(Zn,null,t.createElement($t,null,"Predefined Aggregation"),t.createElement(ln,{creators:N,onClick:v,setOverflowingComponents:D})),!!(H!=null&&H.length)&&t.createElement(Zn,null,t.createElement($t,null,"Investigations"),t.createElement(ln,{creators:H,onClick:v,setOverflowingComponents:D})),!!(Z!=null&&Z.length)&&t.createElement(Zn,null,t.createElement($t,null,"Events"),t.createElement(ln,{creators:Z,onClick:v,setOverflowingComponents:D})),ee)};var Xt=e("nxMFMmDQ"),Ye=e("RTnJ3JrH"),At=e("Ofda/4py"),Ct=e("gofDlXL2"),Bt=e("UnwAqHt2"),Ze=e("VPaD/Np4"),gt=e("UiXZqrDE"),cn=e("yt/z6tOx"),un=e.n(cn),_n=e("4E3oowBb"),vn=e("hC1XaH+L"),Ln=e("hhdCSTZj"),Xn=e("sWSSTOXR"),no=e.n(Xn),Wo=e("gajRAEyE");const Co=c.default.div` height: 25px; width: 25px; margin-right: 0.4rem; border-radius: 4px; border: 1px solid rgb(0 126 255 / 24%); `,Fo=(0,c.default)(Co)(({color:v})=>(0,c.css)` background-color: ${v}; `),rt=(v,b=5)=>(0,Wo.A)(v).colors(b),Mt=(0,c.default)(Co)(({$gradient:v})=>{const b=rt(v);return(0,c.css)` border: none; background: linear-gradient(0deg, ${b.map((D,L)=>`${D} ${L*(100/b.length)}%`).join(", ")}); `}),Rt=t.forwardRef(({color:v,onClick:b=()=>{}},D)=>{if(v.type==="static")return t.createElement(Fo,{ref:D,"data-testid":"static-color-preview",onClick:b,color:v.color});if(v.type==="gradient")return t.createElement(Mt,{ref:D,onClick:b,$gradient:v.gradient});throw new Error(`Invalid highlighting color type: ${v}`)});Rt.propTypes={color:l().any.isRequired,onClick:l().func},Rt.defaultProps={onClick:()=>{}};const fn=Rt;var Dn=e("NhiTWmq4"),kn=e("hD3VAVgz");const ro=()=>t.createElement(gt.Field,{name:"color.color"},({field:{name:v,value:b,onChange:D},meta:L})=>t.createElement(Be.Input,{id:v,error:L==null?void 0:L.error,label:"Color"},t.createElement(V.$I,{id:"formatting-rule-color",placement:"right",color:b,colors:Xt.X1.map(N=>[N]),triggerNode:t.createElement(fn,{color:Dn.QU.create(b)}),onChange:(N,w,H)=>{H(),D({target:{name:v,value:N}})}}))),Gn=c.default.div` display: flex; `,vo=v=>({label:t.createElement(Gn,null,t.createElement(Mt,{$gradient:v}),v),value:v}),yo=[...kn.hx].sort(_n.j).map(vo),lo=/^-?[0-9]+$/,Jn=v=>{const b={};return(v==null?void 0:v.type)==="gradient"&&(no()(v==null?void 0:v.gradient)===""&&(b.gradient="Must be selected."),no()(v==null?void 0:v.lower)===""?b.lower="Must be present.":lo.test(v==null?void 0:v.lower)||(b.lower="Must be a number."),no()(v==null?void 0:v.upper)===""?b.upper="Must be present.":lo.test(v==null?void 0:v.upper)||(b.upper="Must be a number."),(v==null?void 0:v.upper)<=(v==null?void 0:v.lower)&&(b.upper="Must be higher than lowest value.")),Object.keys(b).length>0?b:void 0},Yn=()=>t.createElement(gt.Field,{name:"color",validate:Jn},()=>t.createElement(t.Fragment,null,t.createElement(gt.Field,{name:"color.gradient"},({field:{name:v,value:b,onChange:D},meta:L})=>t.createElement(Be.Input,{id:`${v}-name`,error:L==null?void 0:L.error,label:"Gradient Name"},t.createElement(V.l6,{options:yo,inputProps:{"aria-label":"Select gradient colors"},value:b,onChange:N=>D({target:{name:v,value:N}})}))),t.createElement(gt.Field,{name:"color.lower"},({field:{name:v,value:b,onChange:D},meta:L})=>t.createElement(Be.Input,{id:v,"aria-label":"Specify lowest value",label:"Lowest Value",type:"number",value:b,error:L==null?void 0:L.error,onChange:D,help:"The lowest value expected in the field/series.",required:!0})),t.createElement(gt.Field,{name:"color.upper"},({field:{name:v,value:b,onChange:D},meta:L})=>t.createElement(Be.Input,{id:v,"aria-label":"Specify highest value",label:"Highest Value",type:"number",value:b,error:L==null?void 0:L.error,onChange:D,help:"The highest value expected in the field/series.",required:!0})))),Gt=({type:v})=>{switch(v){case"static":return t.createElement(ro,null);case"gradient":return t.createElement(Yn,null);default:return null}},tn=c.default.div` margin-left: 10px; `,Qt=()=>Xt.X1[Math.floor(Math.random()*Xt.X1.length)],Bn=v=>{if(v==="static")return{type:"static",color:Qt()};if(v==="gradient")return{type:"gradient",gradient:"Viridis",upper:0,lower:0};throw new Error(`Invalid color type: ${v}`)},co=(v,b)=>{if(!v||v==="")return"Coloring is required";if(!b&&v==="gradient")return"A gradient can only be defined for numeric fields."},To=({field:v})=>{var b,D;const L=(D=(b=v==null?void 0:v.type)==null?void 0:b.isNumeric())!=null?D:!1,{setFieldValue:N}=(0,gt.useFormikContext)(),w=(0,t.useCallback)(H=>{const{target:{value:Z}}=H;N("color",Bn(Z))},[N]);return t.createElement(gt.Field,{name:"color.type",validate:H=>co(H,L)},({field:{name:H,value:Z},meta:ee})=>t.createElement(t.Fragment,null,t.createElement(Be.Input,{id:`${H}-coloring`,label:"Coloring",error:ee==null?void 0:ee.error},t.createElement(tn,null,t.createElement(Be.Input,{checked:Z==="static",formGroupClassName:"",id:H,label:"Static Color",onChange:w,type:"radio",value:"static"}),t.createElement(Be.Input,{checked:Z==="gradient",formGroupClassName:"",id:H,disabled:!L,label:"Gradient",onChange:w,type:"radio",value:"gradient"}))),Z&&t.createElement(Gt,{type:Z})))};var xo=e("7J1sc9Ol"),Ps=e("kXOFp4bk");const bo=v=>b=>{if(["",null,void 0].includes(b))return`${v} is required`},Ro=Object.entries(Bt.c6).map(([v,b])=>({value:v,label:b})),No=Object.entries(Bt.$9).map(([v,b])=>({value:v,label:b})),fs=(v,b)=>(0,xo.Tn)(b)?(0,Ps.A)(xo.Ay.forFunction(b),v):v.find(D=>D.name===b),Ds=v=>{const b="static";if((v==null?void 0:v.type)==="static"){const{type:D,color:L}=v;return{type:D,color:L}}if((v==null?void 0:v.type)==="gradient"){const{type:D,gradient:L,upper:N,lower:w}=v;return{type:D,gradient:L,upper:N,lower:w}}return Bn(b)},Os=v=>{if((v==null?void 0:v.type)==="static")return Dn.QU.create(v.color);if((v==null?void 0:v.type)==="gradient"){const{gradient:b,lower:D,upper:L}=v;return Dn.An.create(b,D,L)}},hs=({onClose:v,rule:b})=>{var D;const L=(0,t.useContext)(vn.A),N=(0,_.A)(),w=(0,M.A)(),H=L!=null&&L.all?L.all:Ze.List(),Z=(0,t.useMemo)(()=>H.map(({name:ot})=>({value:ot,label:ot})).sort((ot,st)=>(0,_n.j)(ot.label,st.label)).toArray(),[H]),ee=(0,gn.A)(),Ce=(0,t.useCallback)(({field:ot,value:st,color:pt,condition:Vt})=>{const kt=Os(pt);return N(P.g[`SEARCH_SIDEBAR_HIGHLIGHT_${b?"UPDATED":"CREATED"}`],{app_pathname:(0,I.i)(w.pathname),app_action_value:"search-sidebar-highlight"}),b?ee((0,Ct.lf)(b,{field:ot,value:st,condition:Vt,color:kt})).then(v):ee((0,Ct.EC)(Bt.Ay.create(ot,st,Vt,kt))).then(v)},[ee,w.pathname,v,b,N]),Me=b?"Edit":"Create",Ne=b?"Update":"Create";return t.createElement(gt.Formik,{onSubmit:Ce,validateOnMount:!0,initialValues:{field:b==null?void 0:b.field,value:un()(b==null?void 0:b.value)?"":String(b==null?void 0:b.value),condition:(D=b==null?void 0:b.condition)!=null?D:"equal",color:Ds(b==null?void 0:b.color)}},({isValid:ot,values:{field:st}})=>{var pt,Vt;const kt=fs(H,st),Tn=(Vt=(pt=kt==null?void 0:kt.type)==null?void 0:pt.isNumeric())!=null?Vt:!1;return t.createElement(Be.BootstrapModalWrapper,{showModal:!0,onHide:v},t.createElement(gt.Form,{className:"form","data-testid":`${Me}-highlighting-rule-dialog`},t.createElement(Be.Modal.Header,null,t.createElement(Be.Modal.Title,null,Me," Highlighting Rule")),t.createElement(Be.Modal.Body,null,t.createElement(gt.Field,{name:"field",validate:bo("Field")},({field:{name:on,value:Sn,onChange:Nn},meta:sn})=>t.createElement(Be.Input,{id:"field_type_controls",error:sn==null?void 0:sn.error,label:"Field"},t.createElement(Ln.A,{inputId:"field-select",onChange:ho=>Nn({target:{name:on,value:ho}}),options:Z,allowCreate:!0,value:Sn,placeholder:"Pick a field"}))),t.createElement(gt.Field,{name:"condition",validate:bo("Condition")},({field:{name:on,value:Sn,onChange:Nn},meta:sn})=>t.createElement(Be.Input,{id:"condition-controls",error:sn==null?void 0:sn.error,label:"Condition"},t.createElement(Ln.A,{inputId:"condition-select",onChange:ho=>Nn({target:{name:on,value:ho}}),options:Tn?Ro:No,value:Sn,placeholder:"Choose a condition"}))),t.createElement(gt.Field,{name:"value",validate:bo("Value")},({field:{name:on,value:Sn,onChange:Nn},meta:sn})=>t.createElement(Be.Input,{id:on,type:"text",error:sn==null?void 0:sn.error,onChange:Nn,value:Sn!=null?Sn:"",label:"Value"})),t.createElement(To,{field:kt})),t.createElement(Be.Modal.Footer,null,t.createElement(V.E6,{onCancel:v,disabledSubmit:!ot,submitButtonText:`${Ne} rule`}))))})};hs.propTypes={onClose:l().func.isRequired,rule:l().object},hs.defaultProps={rule:void 0};const Cs=hs,$s=c.default.div(({theme:v,$displayBorder:b=!0})=>(0,c.css)` display: flex; padding-top: 5px; padding-bottom: 5px; word-break: break-word; &:not(:last-child) { border-bottom: ${b?`1px solid ${v.colors.global.background}`:"none"}; } `),Ts=c.default.div` flex: 1; `,re=c.default.div` display: inline-flex; float: right; `,we=c.default.div` padding-top: 2px; display: inline-block; `,et=c.default.div` display: flex; align-items: center; justify-content: center; height: 25px; width: 25px; `,Et=(v,b,D)=>async L=>L((0,Ct.lf)(v,{color:b})).then(D),wt=v=>async b=>window.confirm("Do you really want to remove this highlighting?")?b((0,Ct.PM)(v)):Promise.resolve(),Ut=({color:v,onChange:b})=>{const D=(0,t.useCallback)((L,N,w)=>b(Dn.QU.create(L),w),[b]);if(v.isStatic())return t.createElement(V.$I,{id:"formatting-rule-color",placement:"right",color:v.color,colors:Xt.X1.map(L=>[L]),triggerNode:t.createElement(fn,{color:v}),onChange:D});if(v.isGradient())return t.createElement(fn,{color:v});throw new Error(`Invalid highlighting color: ${v}`)},Pn=(0,t.forwardRef)(({rule:v,className:b,draggableProps:D,dragHandleProps:L},N)=>{const{field:w,value:H,color:Z,condition:ee}=v,[Ce,Me]=(0,t.useState)(!1),Ne=(0,gn.A)(),ot=(0,_.A)(),st=(0,M.A)(),pt=(0,t.useCallback)((kt,Tn)=>(ot(P.g.SEARCH_SIDEBAR_HIGHLIGHT_UPDATED,{app_pathname:(0,I.i)(st.pathname),app_action_value:"search-sidebar-highlight-color-update"}),Ne(Et(v,kt,Tn))),[Ne,st.pathname,v,ot]),Vt=(0,t.useCallback)(()=>(ot(P.g.SEARCH_SIDEBAR_HIGHLIGHT_DELETED,{app_pathname:(0,I.i)(st.pathname),app_action_value:"search-sidebar-highlight-delete"}),Ne(wt(v))),[Ne,st.pathname,v,ot]);return t.createElement($s,{className:b,ref:N,...D!=null?D:{}},t.createElement(Ut,{color:Z,onChange:pt}),t.createElement(Ts,null,t.createElement(we,{"data-testid":"highlighting-rule"},t.createElement("strong",null,w)," ",Bt.c6[ee]," ",t.createElement("i",null,'"',String(H),'"'),"."),t.createElement(re,null,t.createElement(V.K0,{title:"Edit this Highlighting Rule",name:"edit_square",onClick:()=>Me(!0)}),t.createElement(V.K0,{title:"Remove this Highlighting Rule",name:"delete",onClick:Vt}),L&&t.createElement(et,{...L},t.createElement(V.In,{name:"drag_indicator"})))),Ce&&t.createElement(Cs,{onClose:()=>Me(!1),rule:v}))});Pn.defaultProps={className:void 0,draggableProps:void 0,dragHandleProps:void 0},Pn.propTypes={rule:l().instanceOf(Bt.Ay).isRequired};const qn=Pn,Fn=({item:{id:v,rule:b},draggableProps:D,dragHandleProps:L,className:N,ref:w})=>t.createElement(qn,{key:v,rule:b,dragHandleProps:L,draggableProps:D,className:N,ref:w});Fn.defaultProps={className:void 0};const go=()=>{var v;const[b,D]=(0,t.useState)(!1),N=((v=(0,t.useContext)(Ye.A))!=null?v:[]).map(Z=>({rule:Z,id:`${Z.field}-${Z.value}-${Z.color}-${Z.condition}`})),w=(0,gn.A)(),H=(0,t.useCallback)(Z=>{const ee=Z.map(({rule:Ce})=>Ce);return w((0,Ct.HK)(ee))},[w]);return t.createElement(t.Fragment,null,t.createElement(Ft,null,'Search terms and field values can be highlighted. Highlighting your search query in the results can be enabled/disabled in the graylog server config. Any field value can be highlighted by clicking on the value and selecting "Highlight this value". If a term or a value has more than one rule, the first matching rule is used.'),t.createElement($t,null,"Active highlights ",t.createElement(At.A,{className:"pull-right",name:"add",onClick:()=>D(!b)})," "),b&&t.createElement(Cs,{onClose:()=>D(!1)}),t.createElement($s,{$displayBorder:!!(N!=null&&N.length)},t.createElement(fn,{color:Xt.PP}),t.createElement(we,null,"Search terms")),t.createElement(V.bH,{items:N,onMoveItem:H,customListItemRender:Fn}))},Lo=[{key:"viewDescription",title:"Description",icon:"info",content:({results:v})=>t.createElement(yn,{results:v})},{key:"create",icon:"add",title:"Create",content:({toggleSidebar:v,sidebarIsPinned:b})=>t.createElement(En,{onClick:b?()=>{}:v})},{key:"highlighting",icon:"format_paragraph",title:"Highlighting",content:()=>t.createElement(go,null)},{key:"fieldList",icon:"subscript",title:"Fields",content:({sidebarChildren:v})=>v}];var Mn=e("qIv98lrg"),On=e("rNH0cW39"),ko=e("PLPb65Bv"),Ke=e("zAtQmw72");const dt=(v,b)=>(0,Ke.A)(v,b),ht=(v,{hasToPushRevision:b,dispatch:D,currentView:L})=>D((0,On.Z1)(v.activeQuery)).then(()=>{const N=!(0,On.qP)(v.view,L)||!dt(v.view.search,L.search);return D((0,On.vl)(v.view,N,{hasToPushRevision:b}))}),Pt=()=>async(v,b)=>{const D=b(),{revisions:L,currentRevision:N}=(0,Mn.B)(D),{isUndoAvailable:w}=(0,Mn.e)(D),{view:H}=(0,Qe.yC)(D),Z=N===L.length;if(w){const ee=N-1,{state:Ce}=L[ee];ht(Ce,{hasToPushRevision:Z,dispatch:v,currentView:H}).then(()=>v((0,ko.bR)(ee)))}},dn=()=>async(v,b)=>{const D=b(),{revisions:L,currentRevision:N}=(0,Mn.B)(D),{view:w}=(0,Qe.yC)(D),{isRedoAvailable:H}=(0,Mn.e)(D);if(H){const Z=N+1,{state:ee}=L[Z];ht(ee,{dispatch:v,hasToPushRevision:!1,currentView:w}).then(()=>v((0,ko.bR)(Z)))}};var jt=e("D/X+X5ed");const nn="Undo",Wn=({sidebarIsPinned:v})=>{const b=(0,_e.A)(),D=(0,gn.A)(),{isUndoAvailable:L}=(0,je.A)(Mn.e),N=(0,_.A)(),w=(0,M.A)(),H=(0,t.useCallback)(()=>(N(P.g.SEARCH_SIDEBAR_UNDO,{app_pathname:(0,I.i)(w.pathname),app_action_value:"search-sidebar-undo"}),D(Pt())),[D,w.pathname,N]);return(0,jt.Ay)({actionKey:"undo",callback:()=>D(Pt()),scope:b.toLowerCase()}),t.createElement(G,{disabled:!L,onClick:H,icon:"undo",title:nn,ariaLabel:nn,sidebarIsPinned:v})},xn="Redo",Jo=[{key:"undoAction",Component:Wn},{key:"redoAction",Component:({sidebarIsPinned:v})=>{const b=(0,_e.A)(),D=(0,gn.A)(),{isRedoAvailable:L}=(0,je.A)(Mn.e),N=(0,_.A)(),w=(0,M.A)(),H=(0,t.useCallback)(()=>(N(P.g.SEARCH_SIDEBAR_REDO,{app_pathname:(0,I.i)(w.pathname),app_action_value:"search-sidebar-redo"}),D(dn())),[D,w.pathname,N]);return(0,jt.Ay)({actionKey:"redo",callback:()=>D(dn()),scope:b.toLowerCase()}),t.createElement(G,{disabled:!L,onClick:H,icon:"redo",title:xn,ariaLabel:xn,sidebarIsPinned:v})}}];var Ko=e("Xt0X5Kl4");const fo=c.default.div` display: flex; height: 100%; width: min-content; `,$o=c.default.div(({theme:v})=>(0,c.css)` position: fixed; inset: 0 0 0 50px; background: ${p()(v.colors.brand.tertiary).alpha(.25).css()}; z-index: 5; `),es=(v,b,D)=>{if(b){D(null);return}D(v)},vs=(v,b,D,L)=>{if(v===b){L();return}D(v)},Us=({searchPageLayout:v,results:b,children:D,sections:L,actions:N})=>{var w;const H=(0,_.A)(),Z=(0,M.A)(),ee=(0,C.A)(),Ce=(w=v==null?void 0:v.config.sidebar.isPinned)!=null?w:!1,Me=L[0].key,[Ne,ot]=(0,t.useState)(Ce?Me:null),st=L.find(Tn=>Tn.key===Ne),pt=()=>{H(P.g.SEARCH_SIDEBAR_TOGGLE,{app_pathname:(0,I.i)(Z.pathname),app_action_value:"search_sidebar",initialSectionKey:Me,activeSectionKey:Ne}),es(Me,Ne,ot)},Vt=Tn=>vs(Tn,Ne,ot,pt),kt=st==null?void 0:st.content;return t.createElement(fo,null,t.createElement(le,{activeSection:st,selectSidebarSection:Vt,sections:L,sidebarIsPinned:Ce,actions:N}),st&&!!kt&&t.createElement(Oe,{closeSidebar:pt,searchPageLayout:v,sectionTitle:st.title},t.createElement(kt,{results:b,queryId:ee,sidebarChildren:D,sidebarIsPinned:Ce,toggleSidebar:pt})),st&&!Ce&&t.createElement($o,{onClick:pt}))};Us.propTypes={children:Ko.A.OneOrMoreChildren.isRequired,results:l().object,sections:l().arrayOf(l().object)},Us.defaultProps={results:{},sections:Lo,actions:Jo,searchPageLayout:void 0};const ts=({children:v,...b})=>t.createElement(A.Consumer,null,D=>t.createElement(Us,{...b,searchPageLayout:D},v));var ds=e("dsvqAVKU"),ys=e("E+CaPsQD"),Ns=e("7dh0vSOR");const _o=({children:v})=>(0,_e.A)()===qe.A.Type.Dashboard?t.createElement(t.Fragment,null,v):null;var Gs=e("xsbnunTq"),ea=e("g6WV7s1k"),js=e("mTnbNx1k"),ta=e("FfX57J1C"),cs=e("m/3sLmyX"),Rs=e("GFJVQ2dX"),na=e("IdpefXWm"),Ea=e("efAt+LzL"),Ga=e.n(Ea);const mr=(v,b)=>[...Array(b+1-v).keys()].map(D=>D+v),ja=({width:v,height:b,col:D,row:L},N)=>({col:D,row:L,height:b,width:Number.isFinite(v)?v:N}),Hs=(v,b,D,L=D)=>{let N=!1;return mr(b.col,b.col+b.width-1).forEach(w=>{mr(b.row,b.row+b.height-1).forEach(H=>{var Z,ee,Ce;((Z=v[H])==null?void 0:Z[w])!==void 0&&(N=!0),((ee=v[H])!=null?ee:v[H]=[])[w]=((Ce=v[H])==null?void 0:Ce[w])!==void 0?L:D})}),N},Ca=v=>{if(v.length===0)return!1;const b=[];for(const D of v)if(Hs(b,D,!0))return!0;return!1},ks=(v,b)=>{var D;return((D=v[b])!=null?D:[]).every(L=>L===void 0)},Ae=(v,b=1,D=13)=>{var L,N;if(v.length===0)return[];const w=v.map(Me=>ja(Me,D)),H=Math.min(...w.map(({row:Me})=>Me)),Z=Math.max(...w.map(({row:Me,height:Ne})=>Me+Ne-1));if(Ca(w))return[];const ee=[];w.forEach(Me=>Hs(ee,Me,!0));const Ce=[];for(let Me=b;Me1){for(;!ks(ee,ot.row+ot.height)&&ot.row+ot.height<=Z&&mr(ot.col,ot.col+ot.width-1).every(st=>{var pt;return!((pt=ee[ot.row+ot.height])!=null&&pt[st])});)ot.height+=1;Hs(ee,ot,!0),Ce.push(ot)}}return Ga()(Ce)},$e=c.default.div(({theme:v})=>(0,c.css)` opacity: 0; transition: visibility 0s, opacity 0.2s linear; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 10px; background-color: ${v.colors.global.contentBackground}; color: ${v.colors.gray[30]}; margin-bottom: ${v.spacings.xs}; &:hover { opacity: 1; } cursor: pointer; `),Xe=(0,c.default)(V.In)(({theme:v})=>(0,c.css)` font-size: ${v.fonts.size.huge}; margin-bottom: 10px; `),St=t.forwardRef(({style:v,position:b,component:D},L)=>{const[N,w]=(0,t.useState)(!1),H=(0,t.useCallback)(()=>w(!1),[]),Z=(0,t.useCallback)(()=>w(!0),[]),ee={...v,transition:"none"};return t.createElement("div",{style:ee,ref:L},t.createElement($e,{onClick:Z},t.createElement(Xe,{name:"add_circle"}),"Create a new widget here"),N&&t.createElement(D,{onCancel:H,position:b}))});St.defaultProps={style:{}};const xt=St;var Nt=e("n6M7NB8F"),Ht=e("l8tl93Rz");const Zt="Create new widget",Kn=c.default.div` display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; `,Un=(0,c.default)(Be.Button)(({theme:v})=>(0,c.css)` background-color: transparent; border-color: ${v.colors.variant.gray}; border-radius: 4px; height: 8rem; width: 8rem; `),ue=c.default.div` display: flex; flex-flow: column nowrap; align-items: center; word-wrap: break-word; white-space: break-spaces; text-align: center; gap: 0.3rem; `,Te=c.default.div(({theme:v})=>(0,c.css)` font-size: ${v.fonts.size.huge}; `),mt=({onCancel:v,position:b})=>{const D=(0,wn.A)("widgetCreators"),L=(0,Nt.A)(),N=(0,gn.A)(),w=(0,M.A)(),H=(0,_.A)(),Z=(0,t.useMemo)(()=>D.map(({title:ee,func:Ce,icon:Me})=>{const Ne=async()=>{H(P.g.SEARCH_WIDGET_CREATE[io()(ee).replace(/ /g,"_")],{app_pathname:(0,I.i)(w.pathname),app_section:"search-widget"});const ot=(0,bn.A)(),st=Ce({view:L}).toBuilder().id(ot).build();return N((0,Ht.QD)(st,b))};return t.createElement(Un,{key:ee,type:"button",title:`Create ${ee} Widget`,onClick:Ne},t.createElement(ue,null,t.createElement(Te,null,t.createElement(Me,null)),ee))}),[D,N,w.pathname,b,H,L]);return t.createElement(Be.Modal,{onHide:v,show:!0},t.createElement(Be.Modal.Header,{closeButton:!0},t.createElement(Be.Modal.Title,null,Zt)),t.createElement(Be.Modal.Body,null,t.createElement(Kn,null,Z)),t.createElement(Be.Modal.Footer,null,t.createElement(Be.Button,{type:"button",onClick:v},"Cancel")))};var Dt=e("SwOo9/Yp"),Jt=e("liHGlRT1");const mn=c.default.div` z-index: auto; ${Jt.w} margin-bottom: 0; `,oo=t.forwardRef(({children:v,className:b,isFocused:D,style:L,...N},w)=>{let H={...L,transition:"none"};return D&&(H={...H,height:"100%",width:"100%",zIndex:3,top:0,left:0}),t.createElement(mn,{className:b,style:H,ref:w,...N},v)});oo.defaultProps={className:void 0,style:{}},oo.propTypes={children:l().any.isRequired,className:l().string,isFocused:l().bool.isRequired,style:l().object};const Qo=oo;var Po=e("gSdhV+tG"),Do=e("S/tO1idZ");const _s=t.createContext({settings:{},setSettings:()=>{}}),oa=(0,m.Gr)("contexts.ExportSettingsContext",()=>_s),Is=({children:v})=>{const[b,D]=(0,t.useState)(),L=(0,t.useMemo)(()=>({settings:b,setSettings:D}),[b]);return t.createElement(oa.Provider,{value:L},v)};var us=e("qhwXAFlw"),as=e("i0LZga0C");const sa=v=>(0,je.A)((0,Qe.Xj)(v)),Ra=()=>(0,je.A)(Qe.td);var Ta=e("O+BThgTi"),ul=e("64Qr82UM"),ra=e("Ii+QL2UH"),bs=e("O/XpfGnR");const Ur=()=>(0,je.A)(Wt.CY);var la=e("6j4Sgo2g");const gr=c.default.div` cursor: pointer; display: flex; margin-right: 10px `,Er=(0,c.default)(Be.Table)(({theme:v})=>(0,c.css)` margin-bottom: 0; background-color: transparent; > tbody td { background-color: ${v.colors.global.contentBackground}; color: ${v.utils.contrastingColor(v.colors.global.contentBackground)}; } `),Ms=(0,c.default)(V.In)(({theme:v})=>(0,c.css)` color: ${v.colors.gray[60]} `),Ha=({widgetExecutionData:v})=>{var b,D;return t.createElement(Er,{condensed:!0},t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",null,t.createElement("i",null,"Executed at:")),t.createElement("td",{"aria-label":"Executed at"},t.createElement(V.Dc,{dateTime:v==null?void 0:v.timestamp}))),t.createElement("tr",null,t.createElement("td",null,t.createElement("i",null,"Executed in:")," "),t.createElement("td",null,Se()(v==null?void 0:v.duration).format("0,0"),"ms")),t.createElement("tr",null,t.createElement("td",{colSpan:2},t.createElement("i",null,"Effective time range:"))),t.createElement("tr",null,t.createElement("td",null,"From"),t.createElement("td",{"aria-label":"Effective time range from"},t.createElement(V.Dc,{dateTime:(b=v==null?void 0:v.effectiveTimerange)==null?void 0:b.from,format:"complete"}))),t.createElement("tr",null,t.createElement("td",null,"To"),t.createElement("td",{"aria-label":"Effective time range to"},t.createElement(V.Dc,{dateTime:(D=v==null?void 0:v.effectiveTimerange)==null?void 0:D.to,format:"complete"}))),t.createElement("tr",null,t.createElement("td",null,t.createElement("i",null,"Total results:")),t.createElement("td",null,Se()(v==null?void 0:v.total).format("0,0")))))},za=({currentWidgetMapping:v,children:b})=>{const[D,L]=(0,t.useState)(!1),N=(0,t.useContext)(Rs.A),w=(0,je.A)(Qe.or),H=(0,t.useMemo)(()=>{var Me,Ne;const ot=(Me=v==null?void 0:v.toJS())==null?void 0:Me[0];return(Ne=w==null?void 0:w.searchTypes)==null?void 0:Ne[ot]},[v,w==null?void 0:w.searchTypes]),Z=(0,t.useMemo)(()=>({effectiveTimerange:(H==null?void 0:H.effectiveTimerange)||(H==null?void 0:H.effective_timerange),total:H==null?void 0:H.total,duration:w==null?void 0:w.duration,timestamp:w==null?void 0:w.timestamp}),[H,w==null?void 0:w.duration,w==null?void 0:w.timestamp]),ee=(0,t.useCallback)(()=>{L(!1)},[]),Ce=(0,t.useCallback)(()=>{L(Me=>!Me)},[]);return N?t.createElement(la.A,{position:"bottom",opened:D,onClose:ee,closeOnClickOutside:!0},t.createElement(la.A.Target,null,t.createElement(gr,{role:"presentation",onClick:Ce},t.createElement(t.Fragment,null,b,t.createElement(Ms,{name:"help"})))),t.createElement(la.A.Dropdown,{title:"Execution Info"},nt()(w)?t.createElement("i",null,"No query executed yet."):t.createElement(Ha,{widgetExecutionData:Z}))):t.createElement(t.Fragment,null,b)},dl=c.default.div(({theme:v})=>(0,c.css)` font-size: ${v.fonts.size.tiny}; color: ${v.colors.gray[30]}; width: max-content; display: flex; gap: 5px; align-items: center; margin-right: 10px; `),ml=(0,c.default)(V.In)(({theme:v})=>(0,c.css)` color: ${v.colors.gray[60]} `),Va=(v,b,D)=>{var L,N,w;return(w=(N=(L=v==null?void 0:v.results)==null?void 0:L[b])==null?void 0:N.searchTypes[D])==null?void 0:w.effective_timerange},zs=({className:v,widget:b,activeQuery:D,widgetId:L,returnsAllRecords:N})=>{var w,H;const{formatTime:Z}=(0,bs.A)(),{result:ee,widgetMapping:Ce}=(w=Ur())!=null?w:{},Me=Fe(),Ne=Nn=>Z(Nn,"complete"),ot=Nn=>Z(Nn,"internal"),st=Me!=null&&Me.timerange?`Global Override: ${(0,ra.A)(Me.timerange,Ne)}`:void 0,pt=L?(H=Ce==null?void 0:Ce.get(L))==null?void 0:H.first():void 0,Vt=(0,ra.A)(b.timerange||Xt.Zl,Ne),kt=D&&pt?Va(ee,D,pt):void 0,Tn=kt?(0,ra.A)(kt,ot):"Effective widget time range is currently not available.",on=Ce==null?void 0:Ce.get(L),Sn=st||Vt;return N?t.createElement(dl,{className:v},t.createElement(ml,{name:"warning",title:"The result of this widget is independent of the current search."}),t.createElement(V.tJ,{titleOverride:Tn},"All Time")):t.createElement(za,{currentWidgetMapping:on},t.createElement(dl,{className:v},t.createElement(V.tJ,{titleOverride:Tn},Sn)))};zs.defaultProps={className:void 0,activeQuery:void 0,widgetId:void 0,returnsAllRecords:void 0};const fr=zs,gc=(v,b,D)=>{const{searchTypes:L}=D,w=(0,js._Q)(v.type).searchResultTransformer||(Ne=>Ne),H=b.get(v.id,Ze.Set()),Z=H.map(Ne=>L[Ne]).filter(Ne=>Ne!==void 0).toArray(),ee=D.errors.filter(Ne=>H.includes(Ne.searchTypeId));let Ce;const Me=w(Z);if(ee&&ee.length>0&&(Ce=ee),!Z||Z.length===0){const Ne=D.errors.filter(ot=>ot.type==="query");Ne.length>0&&(Ce=Ce?[].concat(Ce,Ne):Ne)}return{widgetData:Me,error:Ce}},pl=(v,b)=>{const D=b==null?void 0:b.find(L=>L.queryId===v);return{widgetData:void 0,error:D?[D]:[]}},gl=v=>(0,He.Mz)(Wt.CY,Qe.Hz,(0,Qe.Xj)(v),(b,D,L)=>{var N;const{result:w,widgetMapping:H}=b!=null?b:{},Z=(N=w==null?void 0:w.results)==null?void 0:N[D],ee=w==null?void 0:w.errors;return Z?gc(L,H,Z):pl(D,ee)}),ti=v=>(0,je.A)(gl(v));var fl=e("A2mY8G47"),hr=e("/LHc6A/9");const ha=c.default.div(({theme:v})=>(0,c.css)` height: inherit; margin: 0; padding: 7px 9px 6px; display: flex; flex-direction: column; overflow: hidden; .dc-chart { float: none; } .controls { display: none; position: relative; left: -3px; } .reloading { margin-right: 2px; font-weight: bold; color: ${v.colors.variant.dark.info}; display: none; } .loading-failed { color: ${v.colors.variant.danger} !important; } .widget-title { font-size: ${v.fonts.size.large}; height: 25px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .load-error { color: ${v.colors.variant.danger}; margin-right: 5px; } .widget-update-info { text-align: left; float: left; font-size: ${v.fonts.size.small}; position: absolute; bottom: 10px; width: 130px; } .configuration dt { text-transform: capitalize; } svg { overflow: hidden; } .quickvalues-graph { text-align: center; } .graph.scatterplot path.line { display: none; } .actions { position: absolute; right: 15px; bottom: 10px; div { display: inline-block; margin-left: 5px; } button { padding: 0 5px; } } `),va=({children:v,widgetId:b})=>t.createElement(ha,{"data-widget-id":b},v);var Ec=e("FYGzXHJc");const ka=t.createContext("query"),wr=(0,m.Gr)("views.components.contexts.QueryEditModeContext",()=>ka);var ni=e("ocYLQ/BD"),Yo=e("jAGDuYSC"),Qa=e("0IW4P5Zs"),Wr=e("6KiaUlHf");const oi=({children:v,widget:b})=>{const{setDisabled:D}=(0,t.useContext)(Qa.A),L=(0,t.useCallback)(Ne=>D("widget-edit-apply-all-changes",Ne),[D]),N=(0,t.useRef)(null),w=(0,t.useRef)(null),H=(0,gn.A)(),Z=(0,t.useCallback)(Ne=>{N.current=Ne},[]),ee=(0,t.useCallback)(Ne=>{w.current=Ne},[]),Ce=(0,t.useCallback)(()=>{let Ne=b,ot=!1;if(N.current){const st=N.current(Ne);st&&(Ne=st,ot=ot||!0)}if(w.current){const st=w.current(Ne.config);st&&(Ne=Ne.toBuilder().config(st).build(),ot=ot||!0)}return ot?(L(!0),H((0,Ht.WK)(b.id,Ne)).catch(st=>(Yo.A.error(`Applying widget changes failed with status: ${st}`),st)).finally(()=>L(!1))):Promise.resolve()},[b,L,H]),Me=(0,t.useMemo)(()=>({applyAllWidgetChanges:Ce,bindApplyElementConfigurationChanges:ee,bindApplySearchControlsChanges:Z}),[Ce,ee,Z]);return t.createElement(Wr.A.Provider,{value:Me},v)};var Ya=e("9oVghaOd"),vr=e.n(Ya),Ma=e("DUKaTDO2"),yr=e("Cd4wX32x"),Qs=e("CHWvwBKE"),Xa=e("PYFLluwn"),hl=e("QBkrNAIi"),Fr=e("5YmxItcn"),xa=e("KhLmrWKP"),Ja=e("D2221jVL");const si=(0,He.Mz)(Wt.I0,Qe.bB,(v,b)=>({parameterBindings:v,parameters:b})),Ar=()=>(0,je.A)(si);var Kr=e("eZ5nxjAy"),_r=e("YR1bCTOi");const $r=({parameters:v})=>{const{validateForm:b}=(0,gt.useFormikContext)(),D=(0,t.useRef)(!1);return(0,t.useEffect)(()=>{D.current?b():D.current=!0},[b,v]),null};var yc=e("wXrUUKFq"),La=e.n(yc);const Gr=(v,b,D)=>{try{return v()}catch(L){console.error(`${b}: ${L}`),Yo.A.error(`${b}: ${L}`)}return D},vl=(v,b)=>{const D=b.map(L=>Gr(()=>L(v),"An error occurred when collecting initial search bar form values from a plugin",{}));return La()({},...D)},yl=v=>{var b;const D=(b=(0,wn.A)("views.components.searchBar"))!=null?b:[],L=D==null?void 0:D.map(N=>{var w;return(w=N())==null?void 0:w.useInitialSearchValues}).filter(N=>!!N);return vl(v,L)},Ba=v=>{var b;const D=(b=(0,wn.A)("views.components.searchBar"))!=null?b:[],L=D==null?void 0:D.map(N=>{var w;return(w=N())==null?void 0:w.useInitialDashboardWidgetValues}).filter(N=>!!N);return vl(v,L)},Cr=async(v,b,D,L)=>{let N=L;for(const w of D){const H=await w(b,v,N).catch(Z=>{const ee=`An error occurred when executing a submit handler from a plugin: ${Z}`;return console.error(ee),Yo.A.error(ee),N});H&&(N=H)}return N},xs=(v,b,D,L)=>{const N=D==null?void 0:D.map(w=>{var H;return(H=w())==null?void 0:H.onSearchSubmit}).filter(w=>!!w);return Cr(v,b,N,L)},ai=(v,b,D,L)=>{const N=D==null?void 0:D.map(w=>{var H;return(H=w())==null?void 0:H.onDashboardWidgetSubmit}).filter(w=>!!w);return Cr(v,b,N,L)},Al=(v,b,D=[])=>{const N=D.map(w=>{var H;return(H=w())==null?void 0:H.validationPayload}).filter(w=>!!w).map(w=>Gr(()=>w(v,b),"An error occurred when preparing search bar validation for a plugin",{}));return La()({},...N)},jr=(v,b,D=[])=>{const N=D.map(w=>{var H;return(H=w())==null?void 0:H.onValidate}).filter(w=>!!w).map(w=>Gr(()=>w(v,b),"An error occurred when validating search bar values from a plugin",{}));return La()({},...N)};var Ss=e("2XdKdJGP");const ri=v=>{const b=(0,wn.A)("views.queryInput.commandContextProviders");return{...Object.fromEntries(b.map(({key:L,provider:N})=>[L,N()])),usage:v}},Ac=v=>{const b=(0,wn.A)("views.queryInput.commands"),D=(0,t.useMemo)(()=>b.filter(({usages:N=[]})=>N.includes(v)),[b,v]),L=ri(v);return(0,t.useMemo)(()=>D.map(({name:N,bindKey:w,exec:H})=>({name:N,bindKey:w,exec:Z=>H(Z,L)})),[D,L])},ia=({children:v,usage:b})=>{const D=Ac(b);return(0,t.useMemo)(()=>v(D),[v,D])};var ms=e("YX1HQgTG");const ii=(0,He.Mz)(Qe.sf,Wt.AU,(v,b)=>({view:v,executionState:b})),Za=()=>(0,je.A)(ii);var As=e("PwTFiGSp"),Tr=e("QV1daZoe"),ws=e("nUqpNf+1"),_c=e("qC/AOIKG");const Ys=c.default.div` display: flex; align-items: center; `,ci=c.default.div(({theme:v})=>` margin-left: 10px; border: 1px dashed ${v.colors.input.border}; width: 100%; border-radius: 4px; padding: 0 5px; min-height: 34px; `),Ws=c.default.div(({theme:v})=>` display: inline-block; margin-left: 0; margin-top: 5px; padding: 0 3px; border-radius: 4px; background-color: ${v.colors.variant.lightest.primary}; color: ${v.colors.variant.darker.primary}; font-size: ${v.fonts.size.body}; font-family: ${v.fonts.family.monospace}; `),ui=(0,c.default)(Be.Button)` margin-top: 5px; margin-bottom: 5px; margin-left: 5px; display: inline-block; float: right; `,br=({value:v,onReset:b})=>{const{formatTime:D}=(0,bs.A)(),L=(0,ra.A)(v,w=>D(w,"complete")),N=(0,ra.A)(v,w=>D(w,"internal"));return t.createElement(Ys,null,t.createElement(_c.A,{disabled:!0}),t.createElement(ci,null,t.createElement(Ws,{title:N},L),t.createElement(ui,{bsSize:"xs",bsStyle:"primary",onClick:b,"data-testid":"reset-global-time-range"},"Reset Global Override")))};var da=e("f2ImtPH2");const zr=c.default.div` flex: 1; grid-area: streams; `,ya=({disabled:v,value:b,streams:D,onChange:L})=>{const N=(0,_.A)(),w=b.join(","),H="Select streams the search should include. Searches in all streams if empty.",Z=D.sort(({key:Ce},{key:Me})=>(0,_n.j)(Ce,Me)),ee=Ce=>{N(P.g.SEARCH_STREAM_INPUT_CHANGED,{app_pathname:"search",app_section:"search-bar",app_action_value:"search-filter",event_details:{streamsCount:Ce.split(",").length}}),L(Ce===""?[]:Ce.split(","))};return t.createElement(zr,{"data-testid":"streams-filter",title:H},t.createElement(Ln.A,{placeholder:H,disabled:v,inputProps:{"aria-label":H},displayKey:"key",inputId:"streams-filter",onChange:ee,options:Z,multi:!0,value:w}))};ya.propTypes={disabled:l().bool,value:l().arrayOf(l().string),streams:l().arrayOf(l().shape({key:l().string.isRequired,value:l().string.isRequired})).isRequired,onChange:l().func.isRequired},ya.defaultProps={disabled:!1,value:[]};const Vr=ya;var qa=e("OQnHlPS/"),kr=e("8jTixuP6");const Ua=(0,kr.A)(()=>Promise.all([e.e("bb8c8232-8179"),e.e("bb8c8232-47"),e.e("bb8c8232-9791")]).then(e.bind(e,"myDR0xOD")));var _l=e("87D/Fijl"),Yr=e.n(_l),Cl=e("rKq6XZKM"),Tl=e("tITy3x4L");const Sr=async(v,b,D,L,N,w,H,Z)=>{const{timerange:ee}=v;let Ce={};const Me=await(0,Tl.A)(ee,b,w,Z,!1);nt()(Me)||(Ce={...Ce,timerange:Me});const Ne=jr(v,H,N);nt()(Ne)||(Ce={...Ce,...Ne});const ot=await L(v);return(ot==null?void 0:ot.status)==="OK"?(D("queryString",void 0),Ce):(ot==null?void 0:ot.status)==="WARNING"?(D("queryString",ot),Ce):(ot==null?void 0:ot.status)==="ERROR"?(D("queryString",void 0),{...Ce,queryString:ot}):Ce};var Pr=e("xAuw/bbM");const Sl=async(v,b)=>{try{v&&b&&await Pr.ZD.queryStringUsed({query_string:b})}catch(D){console.error("Unable to record last used query string: ",D)}},Xr=v=>v===void 0?void 0:v.trim(),te=(v,b)=>{const{userTimezone:D}=(0,bs.A)(),[L,N]=(0,t.useState)(!0),w=(0,t.useCallback)(async H=>{N(!1);const{queryString:Z,timerange:ee,...Ce}=H,Me=Xr(Z);await Sl(Me!==Xr(v==null?void 0:v.queryString),Me);try{return b({queryString:Z,timerange:(0,As.EZ)(ee)?void 0:(0,Tr.So)(ee,D),...Ce})}finally{N(!0)}},[v==null?void 0:v.queryString,b,D]);return{enableReinitialize:L,onSubmit:w}},q=v=>Yr()(v),ie=({initialValues:v,limitDuration:b,onSubmit:D,children:L,validateOnMount:N,formRef:w,validateQueryString:H})=>{const{formatTime:Z,userTimezone:ee}=(0,bs.A)(),Ce=(0,wn.A)("views.components.searchBar"),{setFieldWarning:Me}=(0,t.useContext)(xa.A),Ne=(0,t.useMemo)(()=>{const{timerange:kt,...Tn}=v;return{...Tn,timerange:(0,Cl.Z)(kt,Z)}},[Z,v]),{enableReinitialize:ot,onSubmit:st}=te(Ne,D),pt=Za(),Vt=(0,t.useCallback)(kt=>Sr(kt,b,Me,H,Ce,Z,pt,ee),[b,Me,H,Ce,Z,pt,ee]);return t.createElement(gt.Formik,{initialValues:Ne,enableReinitialize:ot,onSubmit:st,innerRef:w,validate:Vt,validateOnBlur:!1,validateOnMount:N},(...kt)=>t.createElement(gt.Form,null,q(L)?L(...kt):L))};ie.propTypes={onSubmit:l().func.isRequired,limitDuration:l().number.isRequired,validateOnMount:l().bool},ie.defaultProps={validateOnMount:!0,formRef:void 0};const tt=ie,_t=(0,kr.A)(()=>Promise.all([e.e("bb8c8232-8179"),e.e("bb8c8232-47"),e.e("bb8c8232-3161")]).then(e.bind(e,"BaXPld/A"))),Cn=c.default.div` width: 25%; min-width: 300px; max-width: 500px; display: flex; align-items: center; &::before { box-shadow: 17px 0 16px -16px rgb(0 0 0 / 40%) inset; } `,Io=c.default.div(({theme:v})=>(0,c.css)` margin-left: 10px; border: 1px dashed ${v.colors.input.border}; display: flex; align-items: center; width: 100%; border-top-right-radius: 4px; border-bottom-right-radius: 4px; padding: 0 5px; min-height: 34px; border-left: 0; .query { flex: 1; } `),wo=(0,c.default)(_t)` &&.ace-queryinput { border: none; } `,Oo=(0,c.default)(Be.Button)` margin-left: 5px; `,ns=({value:v,onReset:b})=>t.createElement(Cn,null,t.createElement(Io,null,t.createElement(wo,{disabled:!0,value:v.query_string,height:34,wrapEnabled:!1,maxLines:1}),t.createElement(Oo,{bsSize:"xs",bsStyle:"primary",onClick:b,"data-testid":"reset-global-query"},"Reset Global Filter")));var zo=e("OsdZaKdz"),ps=e("7GNmVOX8"),ma=e("zJE5UjMB");const Fs="pluggableSearchBarControlsAreHidden",Ks=c.default.div` display: flex; flex-wrap: wrap; justify-content: space-between; gap: ${Ss.uE}; `,Vs=()=>{var v;const D=((v=(0,wn.A)("views.components.searchBar"))!=null?v:[]).map(w=>w()).filter(w=>!!w),L=D.filter(({placement:w})=>w==="left"),N=D.filter(({placement:w})=>w==="right");return{leftControls:L,rightControls:N}},Aa=v=>v==null?void 0:v.map(({component:b,id:D})=>t.createElement(b,{key:D})),rs=({hidePluggableControlsPreview:v,showLeftControls:b,showRightControls:D,hasPluggableControls:L,hasSearchFilterFeatureFlag:N,hasLeftColFallback:w,hasRightColFallback:H})=>L?!0:v?!1:b&&w&&N||D&&!!H,gs=({showLeftControls:v,showRightControls:b})=>{const[D,L]=(0,t.useState)(()=>!!ps.A.get(Fs)),{leftControls:N,rightControls:w}=Vs(),H=(0,ma.A)("search_filter"),Z=!!(N!=null&&N.length||w!=null&&w.length),ee=(0,t.useCallback)(()=>{L(!0),ps.A.set(Fs,!0)},[]),Ce=t.createElement(zo.h,{onHide:ee,pluggableControls:N});return rs({hidePluggableControlsPreview:D,showLeftControls:v,showRightControls:b,hasPluggableControls:Z,hasSearchFilterFeatureFlag:H,hasLeftColFallback:!!Ce})?t.createElement(Ks,null,t.createElement("div",null,H&&v&&t.createElement(t.Fragment,null,Aa(N),Ce)),t.createElement("div",null,b&&Aa(w))):null};gs.defaultProps={showLeftControls:!0,showRightControls:!0};const Zo=gs,Y=c.default.div` display: flex; flex-direction: column; gap: ${Ss.uE}; `,Na=c.default.div` display: flex; flex: 1; `,Pl=(v,{timerange:b,streams:D,queryString:L})=>v.toBuilder().timerange(b).query((0,Qs.P$)(L)).streams(D).build(),Jr=async(v,b,D,L)=>{const{timerange:N,streams:w,queryString:H}=b,Z=await ai(v,b,D,L),ee=Pl(Z,{timerange:N,streams:w,queryString:H});return L.equals(ee)?v((0,ms.g7)()):v((0,Ht.WK)(L.id,ee))},_a=v=>v((0,ms.OB)(void 0)).then(()=>v((0,ms.g7)())),ba=v=>v((0,ms.IB)(void 0)).then(()=>v((0,ms.g7)())),er=v=>{const{bindApplySearchControlsChanges:b}=(0,t.useContext)(Wr.A),{userTimezone:D}=(0,bs.A)();(0,t.useEffect)(()=>{b(L=>{if(v.current){const{dirty:N,values:{timerange:w,...H},isValid:Z}=v.current;if(N&&Z){const ee={timerange:(0,As.EZ)(w)?void 0:(0,Tr.So)(w,D),...H};return Pl(L,ee)}}})},[v,b,D])},di=v=>{var b,D;const{streams:L}=v,N=(b=v.timerange)!=null?b:Xt.Zl,{query_string:w}=(D=v.query)!=null?D:(0,Qs.P$)(""),H=Ba(v);return(0,t.useMemo)(()=>({timerange:N,streams:L,queryString:w,...H}),[N,L,w,H])},Ju=(0,Kr.A)(_r.A,350),Zu=(v,b,D,L,N)=>{const w={queryString:v==null?void 0:v.queryString,timeRange:nt()(b==null?void 0:b.timerange)?v==null?void 0:v.timerange:b.timerange,filter:b!=null&&b.query?b.query:void 0,streams:v==null?void 0:v.streams,...Al(v,N,D)};return Ju(w,L)},Tc=({availableStreams:v})=>{var b,D;const L=(0,t.useRef)(null),N=(0,Nt.A)(),w=Fe(),H=(0,t.useContext)(Do.A),{userTimezone:Z}=(0,bs.A)(),ee=(0,d.P)(Xa.o,({searchesClusterConfig:so})=>so),Ce=!!(0,Ma.useIsFetching)(["validateSearchQuery"]),Me=(0,wn.A)("views.components.searchBar"),Ne=(b=vr().duration(ee==null?void 0:ee.query_time_range_limit).asSeconds())!=null?b:0,ot=(w==null?void 0:w.timerange)!==void 0,st=!!((D=w==null?void 0:w.query)!=null&&D.query_string),pt=(0,t.useRef)(null),{parameters:Vt}=Ar(),kt=Za(),Tn=(0,t.useCallback)(so=>Zu(so,w,Me,Z,kt),[w,Me,Z,kt]),on=di(H),Sn=(0,gn.A)(),Nn=(0,t.useCallback)(so=>Jr(Sn,so,Me,H),[Sn,Me,H]),sn=(0,t.useCallback)(()=>Sn(_a),[Sn]),ho=(0,t.useCallback)(()=>Sn(ba),[Sn]);return er(pt),t.createElement(Ja.A,null,t.createElement(tt,{initialValues:on,limitDuration:Ne,formRef:pt,onSubmit:Nn,validateQueryString:Tn},({dirty:so,errors:uo,isValid:mo,isSubmitting:Go,handleSubmit:Bo,values:qo,setFieldValue:Hn,validateForm:Xo})=>{const os=Go||Ce||!mo;return t.createElement(Y,null,t.createElement(hl.r,{formKey:"widget-query-controls",disableSubmission:os}),t.createElement($r,{parameters:Vt}),t.createElement(Ss.d7,null,!ot&&t.createElement(da.A,{disabled:ot,limitDuration:Ne,onChange:Uo=>Hn("timerange",Uo),value:qo==null?void 0:qo.timerange,hasErrorOnMount:!!uo.timerange}),ot&&t.createElement(br,{value:w==null?void 0:w.timerange,onReset:sn}),t.createElement(gt.Field,{name:"streams"},({field:{name:Uo,value:cr,onChange:Ka}})=>t.createElement(Vr,{value:cr,streams:v,onChange:ur=>Ka({target:{value:ur,name:Uo}})}))),t.createElement(Ss.Dp,null,t.createElement(qa.A,{disabled:os,dirty:so,displaySpinner:Go}),t.createElement(Na,null,t.createElement(gt.Field,{name:"queryString"},({field:{name:Uo,value:cr,onChange:Ka},meta:{error:ur}})=>t.createElement(xa.A.Consumer,null,({warnings:Fu})=>t.createElement(ia,{usage:"widget_query"},Xl=>t.createElement(Ua,{value:cr,view:N,timeRange:nt()(w==null?void 0:w.timerange)?qo==null?void 0:qo.timerange:w.timerange,streams:qo==null?void 0:qo.streams,placeholder:'Type your search query here and press enter. E.g.: ("not found" AND http) OR http_response_code:[400 TO 404]',error:ur,ref:L,disableExecution:os,isValidating:Ce,warning:Fu.queryString,validate:Xo,name:Uo,onChange:Ka,onExecute:Bo,commands:Xl})))),t.createElement(Fr.Ay,null),t.createElement(ws.A,{editorRef:L})),st&&t.createElement(ns,{value:w==null?void 0:w.query,onReset:ho})),t.createElement(Zo,null))}))};Tc.propTypes={};const qu=(0,d.A)(Tc,{availableStreams:yr.h},({availableStreams:{streams:v=[]},...b})=>({...b,availableStreams:v.map(D=>({key:D.title,value:D.id}))})),ed=({children:v})=>{const b=(0,wn.A)("views.overrides.widgetEdit"),[D,L]=(0,t.useState)(void 0),N=(0,t.useCallback)(()=>L(void 0),[]),w=(0,t.useCallback)(Z=>L(()=>Z),[]);if(D){if(D instanceof Error)throw D;return t.createElement(D,{retry:N})}const H=b.map((Z,ee)=>t.createElement(Z,{key:ee,override:w}));return t.createElement(t.Fragment,null,H,v)},Np=({children:v})=>{const[b,D]=(0,t.useState)({}),L=(0,t.useCallback)((H,Z)=>{!!b[H]!==Z&&D({...b,[H]:Z})},[b]),N=Object.values(b).includes(!0),w=(0,t.useMemo)(()=>({disabled:N,setDisabled:L}),[N,L]);return t.createElement(Qa.A.Provider,{value:w},v)},td=c.default.div` display: flex; flex-direction: column; height: 100%; flex: 1; overflow: hidden; `,nd=c.default.div` margin-bottom: 10px; `,Dr=c.default.div` display: flex; flex: 1; overflow: hidden; `,bc=({children:v,onCancel:b,onSubmit:D,displaySubmitActions:L})=>{const N=(0,t.useContext)(Do.A),H=(0,_e.A)()===qe.A.Type.Dashboard;return N?t.createElement(oi,{widget:N},t.createElement(Np,null,t.createElement(td,null,H&&!N.returnsAllRecords&&t.createElement(nd,null,t.createElement(wr.Provider,{value:"widget"},t.createElement(qu,null))),t.createElement(Dr,{role:"presentation"},t.createElement(ed,null,v)),L&&t.createElement("div",null,t.createElement(ni.A,{onSubmit:D,onCancel:b}))))):t.createElement(ds.A,{text:"Loading widget ..."})};bc.defaultProps={displaySubmitActions:!0};const Sc=bc,mi=()=>t.createElement(V.ov,null,t.createElement(ds.A,{"data-testid":"loading-widget"}));mi.propTypes={};const od=mi;var Dl=e("9FNnmA1r"),sd=e("oxGoxcS7");const Zr=()=>(0,je.A)(Qe.u3);var Pc=e("4U1brrvO");const ad=v=>v&&"formattingSettings"in v,Fp=()=>Zr().valueSeq().toArray().flatMap(b=>{var D;const{config:L}=b,N=b.id;if(ad(L)){const{chartColors:w={}}=(D=L.formattingSettings)!=null?D:Pc.A.empty();return Object.entries(w).map(([H,Z])=>({widgetId:N,name:H,color:Z}))}return[]}).filter(b=>b!==null);var rd=e("G0W2UiZR");const Ls=({children:v,id:b})=>{const D=Fp(),L=(0,t.useMemo)(()=>{const H=sd.A.builder();return D.filter(({widgetId:ee})=>ee===b).reduce((ee,{name:Ce,color:Me})=>ee.set(Ce,Me),H).build()},[D,b]),N=(0,gn.A)(),w=(0,t.useMemo)(()=>({colors:L,setColor:(Z,ee)=>(L.set(Z,ee),N((0,Ht.ye)(b,Z,ee)))}),[L,N,b]);return t.createElement(rd.A.Provider,{value:w},v)};Ls.propTypes={children:l().node.isRequired,id:l().string.isRequired};const ld=Ls;class Kp extends t.Component{constructor(b){super(b),this.state={}}static getDerivedStateFromError(b){return{error:b}}render(){const{error:b}=this.state,{children:D,...L}=this.props,N=t.cloneElement(D,L);return b?t.createElement(Dl.A,{title:"While rendering this widget, the following error occurred:",errors:[{description:b.toString()}]}):N}}var qr=e("QL8i6bcz"),Sa=e("rp7UD7rK"),tr=e("gqVHlIxA");const id=v=>v.sort((b,D)=>(0,_n.j)(b.label,D.label)),Dc=({selectWidget:v,widgets:b,view:D})=>{const L=w=>({label:D.getWidgetTitleByWidget(w),value:w}),N=id(b.map(w=>L(w)).toArray());return t.createElement(t.Fragment,null,t.createElement(Be.Row,null,t.createElement(Gs.A,null,"The export will contain all messages for your current search.",t.createElement("br",null),"Please select a message table to adopt its fields. You can adjust all settings in the next step."),t.createElement(_o,null,"Please select the message table you want to export the search results for. You can adjust its fields in the next step.",t.createElement("br",null),'Selecting a message table equals using the option "Export to CSV" in a message table action menu.')),b.size!==0?t.createElement(Be.Row,null,t.createElement("label",{htmlFor:"widget-selection"},"Select message table"),t.createElement(Ln.A,{placeholder:"Select message table",onChange:v,options:N,inputId:"widget-selection"})):t.createElement(Be.Row,null,t.createElement(Be.Alert,{bsStyle:"warning"},"You need to create a message table widget to export its result.")))},Oc=()=>(0,je.A)(Wt.AU),Ic=()=>{const v=(0,wn.A)("views.export.formats"),b=v.sort((D,L)=>(0,_n.j)(D==null?void 0:D.displayName,L==null?void 0:L.displayName)).map(({type:D,displayName:L,disabled:N=()=>!1})=>{const w=N();return{label:L(),value:D,disabled:w}});return v.length>1?t.createElement(gt.Field,{name:"format"},({field:{name:D,value:L,onChange:N}})=>t.createElement(t.Fragment,null,t.createElement("label",{htmlFor:D},"Output Format"),t.createElement(Ln.A,{name:D,value:L,options:b,onChange:w=>N({target:{name:D,value:w}})}))):null};var pi=e("GrokUsBg");const ud=({widget:v})=>{var b;const{exportComponent:D=()=>null}=(b=(0,t.useMemo)(()=>(v==null?void 0:v.type)&&(0,js._Q)(v.type),[v]))!=null?b:{};return t.createElement(D,{widget:v})},Mc=({selectedWidget:v,view:b})=>{const D=b.getWidgetTitleByWidget(v);return t.createElement(Be.Row,null,t.createElement("i",null,t.createElement(Gs.A,null,v&&`The following settings are based on the message table: ${D}`,t.createElement("br",null)),t.createElement(_o,null,v&&`You are currently exporting the search results for the message table: ${D}`,t.createElement("br",null))))},xc=({selectedWidget:v,view:b})=>t.createElement(t.Fragment,null,t.createElement(Be.Row,null,t.createElement(Ic,null)),v&&t.createElement(Mc,{selectedWidget:v,view:b}),t.createElement(Be.Row,null,t.createElement("p",null,"Define the fields for your file.",t.createElement("br",null)),v&&t.createElement("p",null,"The export supports fields created by decorators which are part of the message table, but they currently do not appear in the field list. If you want to export a decorated field, just enter its name."),t.createElement("p",null,"When you've finished the configuration, click on ",t.createElement("q",null,"Start Download"),".")),t.createElement(Be.Row,null,t.createElement(gt.Field,{name:"selectedFields"},({field:{name:D,value:L,onChange:N}})=>t.createElement(t.Fragment,null,t.createElement("label",{htmlFor:D},"Fields to export"),t.createElement(pi.A,{onChange:w=>N({target:{name:D,value:w.map(H=>({field:H}))}}),selectSize:"normal",displaySortableListOverlayInPortal:!0,selectedFields:L.map(({field:w})=>w)})))),t.createElement(Be.Row,null,t.createElement(gt.Field,{name:"limit"},({field:{name:D,value:L,onChange:N}})=>t.createElement(t.Fragment,null,t.createElement("label",{htmlFor:D},"Messages limit"),t.createElement(Be.Input,{type:"number",id:D,name:D,onChange:N,min:1,step:1,value:L}),t.createElement(Be.HelpBlock,null,"Messages are loaded in chunks. If a limit is defined, all chunks up to the one where the limit is reached will be retrieved. Which means the total number of delivered messages can be higher than the defined limit.")))),t.createElement(ud,{widget:v}));var Ol=e("eFxcQyPT"),gi=e("U1Iufsob");const Lc=(v,b)=>{const D=document.createElement("a");D.download=b,D.href=(0,I.H3)(gi.A.MessagesController.jobResults(v,b).url),document.body.appendChild(D),D.click(),document.body.removeChild(D)},dd=(v,b,D,L)=>{const{url:N}=gi.A.ExportJobsController.exportSearch(b);return(0,Ol.t2)("POST",(0,I.H3)(N),v,D).then(w=>Lc(w,L)).catch(()=>{Yo.A.error("Export failed")})},Ei=(v,b,D,L,N)=>{const{url:w}=gi.A.ExportJobsController.exportSearchType(b,D);return(0,Ol.t2)("POST",(0,I.H3)(w),v,L).then(H=>Lc(H,N)).catch(()=>{Yo.A.error("Export for widget failed")})},Bc=(v,b)=>v.find(D=>D.id===b),fi=(v,b)=>b?Bc(v,b):v.size===1?v.first():null,Rl=v=>{const D=qr.d.exports("views.export.formats").find(({type:L})=>L===v);if(!D)throw new Error(`Unknown export format "${D}"`);return D},Uc=(v,b,D,L,N)=>{if(!D)throw new Error("Exports on a dashboard require a selected widget!");const{mimeType:w,fileExtension:H}=Rl(v),Z=`${N}.${H}`;return Ei(b,L,D.id,w,Z)},Nc=(v,b,D,L,N,w)=>{if(D.size!==1)throw new Error("Searches must only have a single query!");const{mimeType:H,fileExtension:Z}=Rl(v),ee=`${w}.${Z}`;return L?Ei(b,N,L.id,H,ee):dd(b,N,H,ee)},hi={title:"Export all search results",shouldEnableDownload:(v,b,D,L)=>!L&&!v&&!!D&&D.length>0,shouldAllowWidgetSelection:(v,b,D)=>!v&&!b&&D.size>1,shouldShowWidgetSelection:(v,b,D)=>!v&&!b&&D.size>1,initialWidget:fi,downloadFile:(v,b,D,L,N,w)=>Nc(v,b,D,L,N,w)},md={title:"Export message table search results",shouldEnableDownload:(v,b,D,L)=>!L&&!!b&&!!D&&D.length>0,shouldAllowWidgetSelection:(v,b)=>!v&&!b,shouldShowWidgetSelection:(v,b)=>!v&&!b,initialWidget:(v,b)=>b?Bc(v,b):null,downloadFile:(v,b,D,L,N,w)=>Uc(v,b,L,N,w)},pd={createExportStrategy:v=>{switch(v){case qe.A.Type.Dashboard:return md;case qe.A.Type.Search:default:return hi}}};var vi=e("TJOheZRu");const wc=(v,b)=>{let D="search-result";return b?D=`${v.getWidgetTitleByWidget(b)}-${D}`:D=`${v.title||`Untitled ${(0,ve.A)({type:v.type,capitalize:!0})}`}-${D}`,vi.A.replaceSpaces(D,"-")},gd=(v,b,D,L,N,w,H,Z)=>{const ee={execution_state:L,fields_in_order:w.map(Ne=>Ne.field),limit:H,...Z},Ce=N?D.getSearchTypeByWidgetId(N.id):void 0,Me=wc(D,N);return b(v,ee,D.search.queries,Ce,D.search.id,Me)},Wc=(0,Ze.OrderedSet)([Xt.WK,Xt.zA,Xt.Zv]),Ed=c.default.div` margin-left: 15px; margin-right: 15px; `,fd=v=>v.config.showMessageRow?(0,Ze.OrderedSet)(v.config.fields).add(Xt.Zv).toOrderedSet():(0,Ze.OrderedSet)(v.config.fields),Il=v=>(v?fd(v):Wc).map(D=>({field:D})).toArray(),yi=({closeModal:v,view:b,directExportWidgetId:D})=>{const L=Oc(),N=(0,M.A)(),w=(0,_.A)(),{state:H}=b,{shouldEnableDownload:Z,title:ee,initialWidget:Ce,shouldShowWidgetSelection:Me,shouldAllowWidgetSelection:Ne,downloadFile:ot}=pd.createExportStrategy(b.type),st=H.map(sn=>sn.widgets.filter(ho=>ho.isExportable).toList()).toList().flatten(!0),[pt,Vt]=(0,t.useState)(!1),kt=Ce(st,D),Tn=Il(kt),on=!!D,Sn=({selectedWidget:sn,selectedFields:ho,limit:so,customSettings:uo,format:mo})=>(w(P.g.SEARCH_WIDGET_EXPORT_DOWNLOADED,{app_pathname:(0,I.i)(N.pathname),app_section:"widget"}),Vt(!0),gd(mo,ot,b,L,sn,ho,so,uo).then(v).finally(()=>Vt(!1))),Nn={selectedWidget:kt,selectedFields:Tn,limit:void 0,customSettings:{},format:"csv"};return t.createElement(gt.Formik,{onSubmit:Sn,initialValues:Nn},({values:{selectedWidget:sn,selectedFields:ho},setFieldValue:so})=>{const uo=Me(on,sn,st),mo=Ne(on,uo,st),Go=Z(uo,sn,ho,pt),Bo=()=>so("selectedWidget",void 0),qo=Hn=>so("selectedFields",Hn);return t.createElement(tr.A,{showModal:!0,onHide:v},t.createElement(gt.Form,null,t.createElement(Be.Modal.Header,null,t.createElement(Be.Modal.Title,null,ee)),t.createElement(Be.Modal.Body,null,t.createElement(Ed,null,uo&&t.createElement(gt.Field,{name:"selectedWidget"},({field:{name:Hn,onChange:Xo}})=>{const os=Uo=>(qo(Il(Uo)),Xo({target:{name:Hn,value:Uo}}));return t.createElement(Dc,{selectWidget:os,view:b,widgets:st.toList()})}),!uo&&t.createElement(xc,{selectedWidget:kt,view:b}))),t.createElement(Be.Modal.Footer,null,t.createElement(Sa.A,{leftCol:mo&&t.createElement(Be.Button,{bsStyle:"link",onClick:Bo,className:"pull-left"},"Select different message table"),onCancel:v,disabledSubmit:!Go,isSubmitting:pt,isAsyncSubmit:!0,submitLoadingText:"Downloading...",submitIcon:"download",submitButtonText:"Start Download"}))))})};yi.propTypes={closeModal:l().func,directExportWidgetId:l().string},yi.defaultProps={closeModal:()=>{},directExportWidgetId:null};const Ai=yi;var hd=e("STGxpovz");const Fc=(v,b)=>b.state.reduce((D,L,N)=>{if(D)return D;const w=L.widgets.find(H=>H.id===v);if(w)return[w,N]},void 0);var Ml=e("gbXdylj1"),xl=e("/vL3Sz6z");const Kc=(v,b)=>{const D=v.get("widget");if(!D)return v;const L=D.remove(b);return v.set("widget",L)},_i=(v,b,D)=>{const L=D.state.get(b),N=L.widgets.findIndex(Ne=>Ne.id===v),{widgetPositions:w,titles:H}=L,Z=Kc(H,v);delete w[v];const{widgetMapping:ee}=L,Ce=ee.remove(v),Me=L.toBuilder().widgets(L.widgets.delete(N)).widgetMapping(Ce).titles(Z).widgetPositions(w).build();return D.toBuilder().state(D.state.set(b,(0,hd.A)(Me))).build()},yd=(v,b,D)=>{if(!D)return v;const N=v.get("widget",Ze.Map()).set(b,D);return v.set("widget",N)},Ad=(v,b,D,L,N)=>{const w=D.state.get(b),H=v!=null&&v.id?v:v.toBuilder().newId().build(),Z=w.widgets.push(H),{widgetPositions:ee}=w,Ce=N?(0,xl.z)(Ze.Map({[H.id]:N.toBuilder().row(1).col(1).build()}),Ze.Map(ee)):Ze.Map(ee),Me=yd(w.titles,H.id,L),Ne=w.toBuilder().widgets(Z).titles(Me).widgetPositions(Ce).build();return D.toBuilder().state(D.state.set(b,Ne)).build()},Ci=(v,b,D)=>D.state.get(b).titles.getIn(["widget",v]),_d=(v,b,D,L=!1)=>{if(D.type!==qe.A.Type.Dashboard)throw new Error(`Unexpected type ${D.type} expected ${qe.A.Type.Dashboard}`);const N=Fc(v,D);if(N){const[w,H]=N,Z=Ci(v,H,D),{widgetPositions:ee}=D.state.get(H),Ce=ee[v],Me=L?D:_i(v,H,D),Ne=L?w.toBuilder().newId().build():w;return(0,Ml.A)(Ad(Ne,b,Me,Z,Ce))}};var Xs=e("AEcypqf3"),nr=e("iSSis/Yq"),Ll=e("/coHI+Jz");const Ti=(v,b,D)=>v?(0,xl.z)(Ze.Map({[D.id]:v.toBuilder().row(1).col(1).build()}),Ze.Map(b)):Ze.Map(b),Cd=(v,b,D)=>{if(!D)return v;const N=v.get(as.A.Widget,(0,Ze.Map)()).set(b.id,D);return v.set(as.A.Widget,N)},Td=(v,b,D,L)=>{const N=b.search.queries.first().id,w=b.state.get(N),H=w.widgets.push(v),{widgetPositions:Z}=w,ee=Ti(D,Z,v),Ce=w.titles,Me=Cd(Ce,v,L),Ne=w.toBuilder().widgets(H).titles(Me).widgetPositions(ee).build();return b.toBuilder().state(b.state.set(N,Ne)).build()},bd=(v,b,D)=>{if(D.type!==qe.A.Type.Dashboard)return;const L=qr.d.exports("views.hooks.copyWidgetToDashboard"),N=(0,Ze.Map)(b.search.queries.map(H=>[H.id,H])),w=Fc(v,b);if(w){const[H,Z]=w,{timerange:ee,query:Ce,filter:Me=(0,Ze.Map)(),filters:Ne}=N.get(Z),{widgetPositions:ot}=b.state.get(Z),st=ot[v],pt=b.state.get(Z).titles.get(as.A.Widget).get(v),Vt=(Me?Me.get("filters",Ze.List.of()):Ze.List.of()).filter(on=>Ze.Map.isMap(on)&&on.get("type")==="stream").map(on=>on.get("id")).toList().toArray(),kt=H.toBuilder().newId().timerange(ee).query(Ce).streams(Vt).filters(Ne).build(),Tn=(0,Ml.A)(Td(kt,D,st,pt));return L.reduce((on,Sn)=>Sn(b,on),Tn)}};var or=e("MXZnZFI9"),el=e("4zkAw1kt"),Bl=e("g2NQZb9A"),Gc=e("Y/YOqMWf"),Pa=e("/7OuCFNo"),jc=e("6BCpJW2W");const Sd=({widgetId:v,view:b,queryId:D})=>{const L=b.state.get(D),N=Ze.Map({[v]:L.widgetMapping.get(v)}),w=Ze.Map({widget:Ze.Map({[v]:L.titles.get("widget").get(v)})}),H=L.widgetPositions[v].toBuilder().col(0).row(0).build();return{titles:w,widgetPosition:H,widgetMapping:N}},Pd=({widget:v,titles:b,widgetPosition:D,widgetMapping:L})=>jc.A.create().toBuilder().widgets([v]).titles(b).widgetPositions({[v.id]:D}).widgetMapping(L).build(),Hc=({titles:v,search:b,widget:D,widgetPosition:L,widgetMapping:N,queryId:w,viewType:H=qe.A.Type.Search})=>{const Z=Pd({widget:D,widgetPosition:L,widgetMapping:N,titles:v});return qe.A.create().toBuilder().newId().type(H).search(b).state({[w]:Z}).build()},zc=(v,b,D=qe.A.Type.Search)=>{const[L,N]=Fc(b,v),{widgetPosition:w,widgetMapping:H,titles:Z}=Sd({widgetId:b,view:v,queryId:N}),{search:ee}=v;return Hc({titles:Z,widgetPosition:w,widget:L,queryId:N,widgetMapping:H,search:ee,viewType:D})};var Ul=e("hfAjrXHN");const Nl=()=>(0,wn.A)("views.widgets.actions"),kc=({widget:v})=>{const b=(0,t.useContext)(cs.A),D=Nl(),L=(0,gn.A)(),N=(0,_.A)(),{pathname:w}=(0,M.A)(),H=(0,t.useMemo)(()=>D.filter(({isHidden:Z=()=>!1})=>!Z(v)).map(({title:Z,action:ee,type:Ce,disabled:Me=()=>!1})=>{const Ne=()=>{N(P.g.SEARCH_WIDGET_ACTION.SEARCH_WIDGET_EXTRA_ACTION,{app_pathname:(0,I.i)(w),app_section:"search-widget",app_action_value:Ce}),L(ee(v,{widgetFocusContext:b}))};return t.createElement(Be.MenuItem,{key:`${Ce}-${v.id}`,disabled:Me(),onSelect:Ne},Z(v))}),[L,w,D,N,v,b]);return H.length>0?t.createElement(t.Fragment,null,t.createElement(Be.MenuItem,{divider:!0}),H):null};var bi=e("+gqrR506");const Si=({onCancel:v,onCopyToDashboard:b,submitButtonText:D,submitLoadingText:L,activeDashboardId:N,onCreateNewDashboard:w})=>{const[H,Z]=(0,t.useState)(!1),[ee,Ce]=(0,t.useState)(null),Me=(0,t.useRef)(),[Ne,ot]=(0,t.useState)(!1);(0,t.useEffect)(()=>(Me.current=!0,()=>{Me.current=!1}),[]);const[st,pt]=(0,t.useState)({page:1,pageSize:5,query:"",sort:{attributeId:"title",direction:"asc"}}),{data:Vt,isInitialLoading:kt}=(0,bi.A)(st);(0,t.useEffect)(()=>{Ce(null)},[st]);const Tn=(0,t.useCallback)(uo=>pt(mo=>({...mo,query:uo,page:1})),[]),on=(0,t.useCallback)(()=>Tn(""),[Tn]),Sn=(0,t.useCallback)((uo,mo)=>pt(Go=>({...Go,page:uo,pageSize:mo})),[]),Nn=()=>{Z(!0),(async()=>Ne?w():b(ee))().then(()=>{Me.current&&Z(!1)})},sn=uo=>{Ce(uo),Ne&&ot(!1)},ho=()=>{ot(uo=>!uo),ee&&Ce(null)},so=typeof w=="function";return t.createElement(Be.Modal,{show:!0,onHide:()=>{}},t.createElement(Be.Modal.Body,null,kt&&t.createElement(V.y$,null),!kt&&t.createElement(t.Fragment,null,t.createElement(V.OW,{onChange:Sn,activePage:st.page,totalItems:Vt.pagination.total,pageSize:st.pageSize,pageSizes:[5,10,15],useQueryParameter:!1},t.createElement("div",{style:{marginBottom:"5px"}},t.createElement(V.B9,{onSearch:Tn,onReset:on})),Vt.list.length?t.createElement(Be.ListGroup,null,Vt.list.map(uo=>{const mo=N===uo.id;return t.createElement(Be.ListGroupItem,{active:ee===uo.id,onClick:mo?void 0:()=>sn(uo.id),header:uo.title,disabled:mo,key:uo.id},uo.summary)})):t.createElement("span",null,"No dashboards found")),so&&t.createElement(Be.Input,{type:"checkbox",id:"create-new-dashboard",name:"createNewDashboard",label:"Create a new dashboard",onChange:ho,checked:Ne}))),t.createElement(Be.Modal.Footer,null,t.createElement(V.E6,{submitButtonText:D,submitLoadingText:L,isAsyncSubmit:!0,isSubmitting:H,disabledSubmit:!ee&&!Ne,submitButtonType:"button",onSubmit:Nn,onCancel:v})))};Si.defaultProps={activeDashboardId:void 0,onCreateNewDashboard:void 0};const wl=Si;var Or=e("gTexEe+8"),Rr=e("yDuYCNwc"),Wl=e("pzHcYe8v");const Od=(0,He.Mz)(Qe.fm,v=>v.map(b=>b.id).toOrderedSet()),Pi=()=>(0,je.A)(Od),Qc=(v,b)=>b.map(D=>{const L=(0,Wl.A)(v,D)||"Unknown Page title";return{id:D,name:L}}),Id=({view:v,onCancel:b,onSubmit:D,widgetId:L})=>{const[N,w]=(0,t.useState)(null),[H,Z]=(0,t.useState)(!1),ee=(0,C.A)(),Ce=Pi(),Me=(0,t.useCallback)(Vt=>Z(Vt.target.checked),[Z]),Ne=(0,t.useCallback)(()=>D(L,N,H),[D,L,N,H]),ot=Qc(v,Ce.toArray()).filter(({id:Vt})=>Vt!==ee),st=ot.map(({id:Vt,name:kt})=>t.createElement(Be.ListGroupItem,{onClick:()=>w(Vt),active:Vt===N,key:Vt},kt)),pt=ot&&ot.length>0?t.createElement(Be.ListGroup,null,st):t.createElement("span",null,"No pages found");return t.createElement(Or.A,{show:!0,onCancel:b,submitButtonDisabled:!N,submitButtonText:`${H?"Copy":"Move"} widget`,onSubmitForm:Ne,title:"Choose Target Page"},pt,t.createElement(Rr.A,{type:"checkbox",id:"keepCopy",name:"keepCopy",label:"Keep Copy on this Page",onChange:Me,help:"When 'Keep Copy on the Page' is enabled, the widget will be copied and not moved to another page",checked:H}))};var Di=e("oNtoZaGG");const Yc=v=>{v.stopPropagation(),v.preventDefault()},Md=({children:v})=>t.createElement("span",{role:"presentation",onClick:Yc,onMouseDown:Yc},v),Oi=({children:v,element:b,"data-testid":D})=>t.createElement(Md,{"data-testid":D},t.createElement(Di.A,{position:"bottom",withinPortal:!0},t.createElement(Di.A.Target,null,b),t.createElement(Di.A.Dropdown,null,t.createElement(Be.MenuItem,{header:!0},"Actions"),v)));Oi.propTypes={children:l().node.isRequired,element:l().node.isRequired,"data-testid":l().string},Oi.defaultProps={"data-testid":void 0};const Xc=Oi,Jc=({children:v})=>{const b=t.createElement(V.K0,{"data-testid":"widgetActionDropDown",name:"expand_more",title:"Open actions dropdown"});return t.createElement(Xc,{element:b},v)},xd=(0,c.default)(V.K0)(({$stretched:v})=>(0,c.css)` span { position: relative; left: ${v?"-1px":0}; } `),Zc=({onStretch:v,position:b,widgetId:D,widgetType:L})=>{const N=(0,_.A)(),{pathname:w}=(0,M.A)(),H=(0,t.useCallback)(()=>{const{col:Ne,row:ot,height:st,width:pt}=b,{defaultWidth:Vt}=(0,js._Q)(L);v({id:D,col:Ne,row:ot,height:st,width:pt===1/0?Vt:1/0}),N(P.g.SEARCH_WIDGET_ACTION.SEARCH_WIDGET_HORIZONTAL_STRETCH,{app_pathname:(0,I.i)(w),app_section:"search-widget",app_action_value:"widget-stretch-button"})},[v,w,b,N,D,L]);if(!b)return t.createElement(ds.A,null);const{width:Z}=b,ee=Z===1/0,Ce=ee?"compress":"width",Me=ee?"Compress width":"Stretch width";return t.createElement(xd,{onClick:H,name:Ce,title:Me,$stretched:ee,rotation:ee?90:void 0})};Zc.propTypes={widgetId:l().string.isRequired,widgetType:l().string.isRequired,position:l().shape(Ta.yX).isRequired,onStretch:l().func.isRequired};const qc=Zc;var tl=e("wfOnu0E0");const Ld=c.default.div` > *:not(:last-child) { margin-right: 2px; } `,Bd=async(v,b,D,L,N)=>{if(!L)return;const w=await nr.u.get(L),H=qe.A.fromJSON(w),Z=await(0,Gc.A)(w.search_id).then(Ce=>Ll.A.fromJSON(Ce)),ee=bd(D,v,H.toBuilder().search(Z).build());if(ee&&ee.search){const Ce=await(0,Bl.A)(ee.search),Me=ee.toBuilder().search(Ce).build();await nr.u.update(Me),(0,Xs.RR)(N,Me.id)}b(!1)},Ud=async(v,b,D)=>{const L=zc(v,b);(0,Xs.l3)(D,L)},Nd=async(v,b,D,L,N,w)=>{if(!N)return;const H=_d(L,N,b,w);if(H){const Z=await(0,Bl.A)(H.search),ee=H.toBuilder().search(Z).build();await v((0,On.vl)(ee,!0)),D(!1),await v((0,On.Z1)(N))}},wd=async(v,b,D)=>window.confirm(`Are you sure you want to remove the widget "${D}"?`),eu=(v,b,D)=>async L=>{const N=qr.d.exports("views.hooks.confirmDeletingWidget");return await(0,or.A)([...N,wd],v,b,D)===!0?L((0,Ht.hW)(v.id)):Promise.resolve()},tu=(v,b,D)=>L=>L((0,Ht.qT)(v,D)).then(()=>b()),Wd=({isFocused:v,onPositionsChange:b,position:D,title:L,toggleEdit:N})=>{const w=(0,t.useContext)(Do.A),H=(0,Nt.A)(),{query:Z,timerange:ee,streams:Ce}=(0,t.useContext)(el.A),{setWidgetFocusing:Me,unsetWidgetFocusing:Ne}=(0,t.useContext)(cs.A),[ot,st]=(0,t.useState)(!1),[pt,Vt]=(0,t.useState)(!1),[kt,Tn]=(0,t.useState)(!1),on=(0,gn.A)(),Sn=(0,Pa.A)(),{pathname:Nn}=(0,M.A)(),sn=(0,_.A)(),{parameters:ho,parameterBindings:so}=Ar(),uo=(0,t.useCallback)(()=>(sn(P.g.SEARCH_WIDGET_ACTION.DUPLICATE,{app_pathname:(0,I.i)(Nn),app_section:"search-widget",app_action_value:"widget-duplicate-button"}),on(tu(w.id,Ne,L))),[sn,Nn,on,w.id,Ne,L]),mo=(0,t.useCallback)((Xo,os)=>(sn(P.g.SEARCH_WIDGET_ACTION.COPY_TO_DASHBOARD,{app_pathname:(0,I.i)(Nn),app_section:"search-widget",app_action_value:"widget-copy-to-dashboard-button"}),Bd(H,st,Xo,os,Sn)),[Sn,Nn,sn,H]),Go=(0,t.useCallback)(()=>(sn(P.g.SEARCH_WIDGET_ACTION.CREATE_NEW_DASHBOARD,{app_pathname:(0,I.i)(Nn),app_section:"search-widget",app_action_value:"widget-create-new-dashboard-button"}),Ud(H,w.id,Sn)),[sn,Nn,H,w.id,Sn]),Bo=(0,t.useCallback)((Xo,os,Uo)=>(sn(P.g.SEARCH_WIDGET_ACTION.MOVE,{app_pathname:(0,I.i)(Nn),app_section:"search-widget",app_action_value:"widget-move-button"}),Nd(on,H,Tn,Xo,os,Uo)),[on,Nn,sn,H]),qo=(0,t.useCallback)(()=>(sn(P.g.SEARCH_WIDGET_ACTION.DELETED,{app_pathname:(0,I.i)(Nn),app_section:"search-widget",app_action_value:"widget-delete-button"}),on(eu(w,H,L))),[on,Nn,sn,L,H,w]),Hn=(0,t.useCallback)(()=>(sn(P.g.SEARCH_WIDGET_ACTION.FOCUSED,{app_pathname:(0,I.i)(Nn),app_section:"search-widget",app_action_value:"widget-focus-button"}),Me(w.id)),[Nn,sn,Me,w.id]);return t.createElement(Ld,{className:"widget-actions-menu"},t.createElement(tl.A,null,t.createElement(_o,null,t.createElement(Ul.A,{queryString:Z.query_string,timerange:ee,streams:Ce,parameterBindings:so,parameters:ho})),v&&t.createElement(V.K0,{name:"fullscreen_exit",title:"Un-focus widget",onClick:Ne}),!v&&t.createElement(t.Fragment,null,t.createElement(qc,{widgetId:w.id,widgetType:w.type,onStretch:b,position:D}),t.createElement(V.K0,{name:"fullscreen",title:"Focus this widget",onClick:Hn})),t.createElement(V.K0,{name:"edit_square",title:"Edit",iconType:"regular",onClick:N}),t.createElement(Jc,null,t.createElement(Be.MenuItem,{onSelect:uo},"Duplicate"),t.createElement(Gs.A,null,t.createElement(Be.MenuItem,{onSelect:()=>st(!0)},"Copy to Dashboard")),w.isExportable&&t.createElement(Be.MenuItem,{onSelect:()=>Vt(!0)},"Export"),t.createElement(_o,null,t.createElement(Be.MenuItem,{onSelect:()=>Tn(!0)},"Move to Page")),t.createElement(kc,{widget:w}),t.createElement(Be.MenuItem,{divider:!0}),t.createElement(Be.MenuItem,{onSelect:qo},"Delete")),ot&&t.createElement(wl,{onCopyToDashboard:Xo=>mo(w.id,Xo),onCancel:()=>st(!1),submitLoadingText:"Copying widget...",submitButtonText:"Copy widget",onCreateNewDashboard:Go}),pt&&t.createElement(Ai,{view:H,directExportWidgetId:w.id,closeModal:()=>Vt(!1)}),kt&&t.createElement(Id,{view:H,widgetId:w.id,onCancel:()=>Tn(!1),onSubmit:Bo})))},Fd={getExplainForWidget:()=>{},explainedSearch:void 0},Kd=t.createContext(Fd),nu=(0,m.Gr)("contexts.SearchExplain",()=>Kd),Ir=({activeQuery:v,widgetId:b})=>{const{getExplainForWidget:D}=(0,t.useContext)(nu),L=(0,Nt.A)(),N=D(v,b,L.widgetMapping);return(0,t.useMemo)(()=>N==null?void 0:N.searched_index_ranges.some(H=>H.is_warm_tiered),[N==null?void 0:N.searched_index_ranges])?t.createElement(Be.Alert,{bsStyle:"info"},"This widget is retrieving data from the Warm Tier and may take longer to load."):null},Xp=v=>(0,js._Q)(v).visualizationComponent,$d=v=>(0,js._Q)(v).editComponent,ou=v=>(0,js._Q)(v).hasEditSubmitButton,su=()=>{const v=(0,t.useContext)(vn.A),b=(0,C.A)();return(0,t.useMemo)(()=>v.queryFields.get(b,v.all),[v.all,v.queryFields,b])},Gd=c.default.div` width: 100%; display: flex; justify-content: flex-end; `,jd=({title:v,id:b,widget:D,fields:L,queryId:N,editing:w,setLoadingState:H,onToggleEdit:Z,onWidgetConfigChange:ee})=>{const Ce=(0,t.useMemo)(()=>Xp(D.type),[D.type]),{error:Me,widgetData:Ne}=ti(b);if(Me&&Me.length>0)return t.createElement(Dl.A,{errors:Me});if(Ne){const{config:ot,filter:st}=D;return t.createElement(Ce,{config:ot,data:Ne,editing:w,fields:L,filter:st,queryId:N,onConfigChange:ee,setLoadingState:H,title:v,toggleEdit:Z,type:D.type,id:b})}return t.createElement(od,null)},Jp=({children:v,config:b,editing:D,fields:L,id:N,onToggleEdit:w,onCancelEdit:H,onWidgetConfigChange:Z,type:ee})=>{const Ce=(0,t.useMemo)(()=>$d(ee),[ee]),Me=ou(ee);return D?t.createElement(Sc,{onSubmit:w,onCancel:H,displaySubmitActions:!Me},t.createElement(Ce,{config:b,fields:L,editing:D,id:N,type:ee,onSubmit:w,onCancel:H,onChange:Z},v)):v},Hd=(v,b)=>async(D,L)=>{const N=(0,Qe.Hz)(L());return D((0,fl.D)(N,"widget",v,b))},Ii=({id:v,editing:b,widget:D,title:L,position:N,onPositionsChange:w})=>{const H=(0,_e.A)(),Z=su(),{stopAutoRefresh:ee}=(0,hr.A)(),[Ce,Me]=(0,t.useState)(!1),[Ne,ot]=(0,t.useState)(b?D:void 0),{focusedWidget:st,setWidgetEditing:pt,unsetWidgetEditing:Vt}=(0,t.useContext)(cs.A),kt=(0,gn.A)(),Tn=(0,_.A)(),{pathname:on}=(0,M.A)(),Sn=H===qe.A.Type.Dashboard,Nn=(0,t.useCallback)(()=>{Tn(P.g.SEARCH_WIDGET_ACTION.WIDGET_EDIT_TOGGLED,{app_pathname:(0,I.i)(on),app_section:"search-widget",app_action_value:"widget-edit-button"}),b?(Vt(),ot(void 0)):(ee(),pt(D.id),ot(D))},[b,on,Tn,pt,ee,Vt,D]),sn=(0,t.useCallback)(()=>{Tn(P.g.SEARCH_WIDGET_ACTION.WIDGET_EDIT_CANCEL_CLICKED,{app_pathname:(0,I.i)(on),app_section:"search-widget",app_action_value:"widget-edit-cancel-button"}),Ne&&kt((0,Ht.WK)(v,Ne)),Nn()},[kt,v,Ne,Nn,on,Tn]),ho=(0,t.useCallback)(Bo=>kt(Hd(v,Bo)),[kt,v]),so=(0,t.useCallback)(async Bo=>(Tn(P.g.SEARCH_WIDGET_ACTION.WIDGET_CONFIG_UPDATED,{app_pathname:(0,I.i)(on),app_section:"search-widget",app_action_value:"widget-edit-update-button"}),kt((0,Ht.Ox)(v,Bo)).then(()=>{})),[kt,v,on,Tn]),uo=(0,C.A)(),{config:mo}=D,Go=(st==null?void 0:st.id)===v;return t.createElement(ld,{id:v},t.createElement(va,{widgetId:v},t.createElement(_o,null,!b&&t.createElement(Ir,{widgetId:v,activeQuery:uo})),t.createElement(Rs.A.Consumer,null,Bo=>t.createElement(Ec.A,{title:L,hideDragHandle:!Bo||Go,loading:Ce,onRename:ho},b?null:t.createElement(Wd,{isFocused:Go,toggleEdit:Nn,title:L,position:N,onPositionsChange:w}))),t.createElement(Jp,{onToggleEdit:Nn,onCancelEdit:sn,onWidgetConfigChange:so,config:mo,editing:b,fields:Z,id:v,type:D.type},t.createElement(Kp,null,t.createElement(jd,{id:v,editing:b,queryId:uo,widget:D,fields:Z,title:L,setLoadingState:Me,onToggleEdit:Nn,onWidgetConfigChange:so}))),t.createElement(Gd,null,(D.returnsAllRecords||Sn)&&!b&&t.createElement(fr,{widget:D,activeQuery:uo,widgetId:v,returnsAllRecords:D.returnsAllRecords}))))};Ii.propTypes={editing:l().bool,id:l().string.isRequired,onPositionsChange:l().func.isRequired,title:l().string.isRequired,widget:l().instanceOf(ul.A).isRequired},Ii.defaultProps={editing:!1};const zd=Ii;var sr=e("m7J9z16Z"),Vd=e("I4XORk+Y");const Zp=(v,b,D)=>{var L;if((0,_e.A)()===qe.A.Type.Dashboard){const{streams:w,timerange:H,query:Z}=v,ee=(L=b==null?void 0:b.query)!=null&&L.query_string?(0,Vd.nu)([Z==null?void 0:Z.query_string,b.query.query_string]):Z==null?void 0:Z.query_string;return{streams:w,timerange:(b!=null&&b.timerange?b.timerange:H)||Xt.Zl,query:(0,Qs.P$)(ee||"")}}if(D){const w=(0,Qs.RD)(D.filter).toJS(),{timerange:H,query:Z}=D;return{streams:w,timerange:H,query:Z}}},au=({children:v,widget:b})=>{const D=(0,sr.A)(),L=Fe(),N=Zp(b,L,D);return N?t.createElement(el.A.Provider,{value:N},v):v};var Mi=e("9kZNWwre");const kd=({children:v})=>{const{timerange:b,streams:D}=(0,t.useContext)(Do.A),L=(0,sr.A)(),{data:N}=(0,Mi.A)(D,b),w=(0,t.useMemo)(()=>{const H=Ze.List(N);return{all:H,queryFields:Ze.Map({[L.id]:H})}},[N,L.id]);return t.createElement(vn.A.Provider,{value:w},v)},Qd=v=>{var b;const D=Ra();return(b=D==null?void 0:D.titles)==null?void 0:b.getIn([as.A.Widget,v.id],(0,us.A)(v))},xi=({editing:v,onPositionsChange:b=()=>{},position:D,widgetId:L})=>{const N=sa(L),w=(0,_e.A)(),H=Qd(N),Z=(0,t.useMemo)(()=>({widget:N}),[N]),ee=w===qe.A.Type.Dashboard?kd:t.Fragment;return t.createElement(au,{widget:N},t.createElement(Do.A.Provider,{value:N},t.createElement(Po.V.Provider,{value:Z},t.createElement(Is,null,t.createElement(ee,null,t.createElement(zd,{editing:v,id:N.id,onPositionsChange:b,position:D,title:H,widget:N}))))))};xi.propTypes={editing:l().bool.isRequired,onPositionsChange:l().func,position:l().shape(Ta.yX).isRequired},xi.defaultProps={onPositionsChange:()=>{}};const Yd=xi,tg={xxl:12,xl:12,lg:12,md:12,sm:12,xs:12},Xd=(0,c.default)(na.A)(({theme:v})=>(0,c.css)` color: ${v.colors.global.textDefault}; margin: 0; width: 100%; height: 100%; `),ru=(0,c.default)(ea.A)(({$hasFocusedWidget:v})=>(0,c.css)` height: ${v?"100% !important":"100%"}; max-height: ${v?"100%":"auto"}; overflow: ${v?"hidden":"visible"}; transition: none; `),lu=v=>{const b=(0,js._Q)(v);return new ta.A(1,1,b.defaultHeight,b.defaultWidth)},Li=({onPositionsChange:v,positions:b,widgetId:D,focusedWidget:L})=>{const N=(L==null?void 0:L.id)===D&&(L==null?void 0:L.editing),w=b[D];return t.createElement(Yd,{editing:N,onPositionsChange:v,position:w,widgetId:D})},iu=(v,b)=>Object.fromEntries(v.toArray().map(({id:D,type:L})=>{var N;return[D,(N=b[D])!=null?N:lu(L)]})),Jd=(0,He.Mz)(Qe.qP,v=>Object.fromEntries(v.toArray().flatMap(({widgetPositions:b})=>Object.entries(b)))),nl=()=>{const v=(0,je.A)(Jd),b=Zr(),D=(0,t.useMemo)(()=>iu(b,v),[b,v]);return[b,D]},cu=({children:v,locked:b,onPositionsChange:D,onSyncLayout:L,positions:N,width:w})=>{const{focusedWidget:H}=(0,t.useContext)(cs.A);return t.createElement(ru,{$hasFocusedWidget:!!(H!=null&&H.id),columns:tg,isResizable:!(H!=null&&H.id),locked:b,positions:N,measureBeforeMount:!0,onPositionsChange:D,onSyncLayout:L,width:w,draggableHandle:".widget-drag-handle"},v)};cu.defaultProps={onSyncLayout:void 0};const ng=12,Fl=({col:v,row:b,height:D,width:L})=>new ta.A(v,b,D,L>=ng?1/0:L),uu=(v,b)=>{const{id:D}=b,L=Fl(b);return v((0,Ht.b4)(D,L))},Zd=(v,b,D)=>{const L=Object.fromEntries(b.map(N=>[N.id,Fl(N)]));return D((0,bn.A)()),v((0,Ht.SY)(L))},qd=(v,b)=>(D,L)=>{const N=(0,Qe.TY)(L()),w=Object.fromEntries(b.map(H=>[H.id,Fl(H)]));(0,Dt.A)(v,w)||D((0,Ht.SY)(w)).then(()=>D((0,On.Xb)(N)))},em=(v,b)=>{const D=Ae(v.map(w=>b[w.id])),L={...b};return[D.map(w=>{const H=`gap-${(0,bn.A)()}`,{col:Z,row:ee,height:Ce,width:Me}=w,Ne=ta.A.builder().col(Z).row(ee).height(Ce).width(Me).build();return L[H]=Ne,t.createElement(xt,{key:H,position:Ne,component:mt})}),L]},tm=()=>{const v=(0,t.useContext)(Rs.A),{focusedWidget:b}=(0,t.useContext)(cs.A),[D,L]=(0,t.useState)(void 0),N=(0,t.useRef)(),w=(0,gn.A)(),[H,Z]=nl(),ee=(0,t.useCallback)(st=>(N.current=st,Zd(w,st,L)),[w]),Ce=(0,t.useCallback)(st=>uu(w,st),[w]),Me=(0,t.useCallback)(st=>{(0,Dt.A)(N.current,st)||w(qd(Z,st))},[w,Z]),[Ne,ot]=(0,t.useMemo)(()=>{const st=H.toArray().filter(pt=>!!Z[pt.id]).map(({id:pt})=>t.createElement(Qo,{key:pt,className:"widgetFrame","data-widget-id":pt,isFocused:(b==null?void 0:b.id)===pt&&(b==null?void 0:b.focusing)},t.createElement(Li,{positions:Z,widgetId:pt,focusedWidget:b,onPositionsChange:Ce})));if(v){const[pt,Vt]=em(H.toArray(),Z);return[[...st,...pt],Vt]}return[st,Z]},[b,v,D,Z,H]);return t.createElement(Xd,null,({width:st})=>t.createElement(cu,{locked:!v,positions:ot,onPositionsChange:ee,onSyncLayout:Me,width:st},Ne))};tm.displayName="WidgetGrid";const nm=tm,om=(0,c.default)(Be.Jumbotron)(({theme:v})=>(0,c.css)` .container-fluid & { border: 1px solid ${v.colors.gray[80]}; border-top-left-radius: 0; border-top-right-radius: 0; margin-bottom: 0; } `),og=()=>t.createElement(om,null,t.createElement("h2",null,t.createElement(_o,null,"This dashboard has no widgets yet"),t.createElement(Gs.A,null,"There are no widgets defined to visualize the search result")),t.createElement("br",null),t.createElement("p",null,'Create a new widget by selecting a widget type in the left sidebar section "Create".',t.createElement("br",null)),t.createElement("p",null,"A few tips for creating searches and dashboards"),t.createElement("ul",null,t.createElement("li",null,t.createElement("p",null,"1. Start with a ",t.createElement("b",null,"question")," you want to answer. Define the problem you want to solve.")),t.createElement("li",null,t.createElement("p",null,"2. ",t.createElement("b",null,"Limit")," the data to only the data points you want to see.")),t.createElement("li",null,t.createElement("p",null,"3. ",t.createElement("b",null,"Visualize")," the data. Does it answer your question?")),t.createElement(_o,null,t.createElement("li",null,t.createElement("p",null,"4. ",t.createElement("b",null,"Share")," the dashboard with your colleagues. Prepare it for ",t.createElement("b",null,"reuse")," by using parameters (contained in ",t.createElement("a",{href:"https://www.graylog.org/graylog-enterprise-edition",target:"_blank",rel:"noopener noreferrer"},"Graylog Enterprise"),").")))),t.createElement("p",null,"You can also have a look at the ",t.createElement(Ns.A,{page:ys.A.PAGES.DASHBOARDS,text:"documentation"}),", to learn more about the widget creation.")),sm=()=>{const v=Zr();return(v==null?void 0:v.size)>0},sg=()=>sm()?t.createElement(nm,null):t.createElement(og,null),du=t.memo(sg);du.displayName="Query";const Kl=du;var am=e("k7aCBAx/");const Bi=()=>(0,je.A)(v=>v.searchExecution.isLoading),rm=(0,c.default)(Be.Row)(({$hasFocusedWidget:v})=>(0,c.css)` height: ${v?"100%":"auto"}; overflow: ${v?"auto":"visible"}; position: relative; `),lm=(0,c.default)(Be.Col)` height: 100%; `,im=()=>Bi()&&t.createElement(am.A,{text:"Updating search results..."}),$l=t.memo(()=>{const v=(0,t.useContext)(vn.A),{focusedWidget:b}=(0,t.useContext)(cs.A),D=!!(b!=null&&b.id);return v?t.createElement(rm,{$hasFocusedWidget:D},t.createElement(lm,null,t.createElement(Kl,null),t.createElement(im,null))):t.createElement(ds.A,null)});$l.displayName="SearchResult";const mu=$l,lg=()=>{const v=(0,wn.A)("views.elements.header");return t.createElement(t.Fragment,null,v.map((b,D)=>t.createElement(b,{key:D})))},ar=()=>{const v=(0,wn.A)("views.elements.queryBar");return t.createElement(t.Fragment,null,v.map((b,D)=>t.createElement(b,{key:D})))};var Ui=e("t7jeigEY");const S=()=>(0,je.A)(Qe.TY),vt=()=>S()?t.createElement(Ui.A,{question:"Are you sure you want to leave the page? Any unsaved changes will be lost."}):null,en={dashboardPage:void 0,setDashboardPage:()=>{},unsetDashboardPage:()=>{}},pn=t.createContext(en),eo=(0,m.Gr)("contexts.DashboardPage",()=>pn),ss=async()=>window.confirm("Do you really want to delete this dashboard page?"),Gl=async(v,b,D)=>{const L=D.map(w=>w.toArray()).toObject(),N=qr.d.exports("views.hooks.confirmDeletingDashboardPage");return(0,or.A)([...N,ss],v,b,L)},pu=(0,He.Mz)(Qe.qP,v=>v.map(b=>b.titles.getIn(["tab","title"])).filter(b=>b!==void 0).toMap()),ug=()=>(0,je.A)(pu),dg=(0,He.Mz)(Qe.qP,v=>v.map(b=>b.widgets.map(D=>D.id).toList()).toMap()),gu=()=>(0,je.A)(dg);var Sh=e("GaFHk8Qk"),um=e.n(Sh),mg=e("JKWk6hMu");class dm extends t.Component{constructor(b){super(b),this.open=D=>{this.setState({titleDraft:D,showModal:!0})},this.close=()=>{this.setState({showModal:!1})},this._onDraftSave=()=>{const{titleDraft:D}=this.state,{onTitleChange:L}=this.props;L(D),this.close()},this._onDraftChange=D=>{this.setState({titleDraft:D.target.value})},this.state={showModal:!1,titleDraft:""}}render(){const{titleDraft:b,showModal:D}=this.state;return t.createElement(Or.A,{show:D,title:"Editing dashboard page title",onSubmitForm:this._onDraftSave,onCancel:this.close,submitButtonText:"Update title",bsSize:"large"},t.createElement(Rr.A,{autoFocus:!0,help:"Enter a helpful dashboard page title. It has a maximum length of 40 characters.",id:"title",label:"Title",name:"title",onChange:this._onDraftChange,maxLength:40,required:!0,type:"text",value:b}))}}dm.propTypes={onTitleChange:l().func.isRequired};const pg=dm,jl=({children:v})=>t.createElement(Xc,{element:t.createElement(At.A,{name:"arrow_drop_down","data-testid":"query-action-dropdown",title:"Page Actions"})},v);jl.propTypes={children:l().node.isRequired};const gg=jl,Eg=c.default.div` display: flex; align-items: center; `,fg=c.default.span(({$active:v})=>(0,c.css)` padding-right: ${v?"6px":"0"}; `),Eu=({active:v,allowsClosing:b,id:D,onRemove:L,openEditModal:N,openCopyToDashboardModal:w,title:H})=>{const[Z,ee]=(0,t.useState)(H),{setDashboardPage:Ce}=(0,t.useContext)(eo),Me=(0,gn.A)();(0,t.useEffect)(()=>{ee(H)},[H]);const Ne=(0,t.useCallback)(()=>Me((0,On.mB)(D)).then(ot=>Ce(ot)),[Me,D,Ce]);return t.createElement(Eg,null,t.createElement(fg,{"aria-label":Z,$active:v,"data-testid":"query-tab","data-active-query-tab":v},Z),v&&t.createElement(gg,null,t.createElement(Be.MenuItem,{onSelect:()=>N(Z)},"Edit Title"),t.createElement(Be.MenuItem,{onSelect:Ne},"Duplicate"),t.createElement(Be.MenuItem,{onSelect:()=>w(!0)},"Copy to Dashboard"),t.createElement(Be.MenuItem,{divider:!0}),t.createElement(Be.MenuItem,{onSelect:L,disabled:!b},"Delete")))};Eu.propTypes={allowsClosing:l().bool,onRemove:l().func.isRequired,title:l().string.isRequired,openEditModal:l().func.isRequired},Eu.defaultProps={allowsClosing:!0};const hg=Eu;var vg=e("PVMUg5WH"),yg=e("5s1wXXQQ"),Ph=e("2z9Zbpb8");const Ag=c.default.div` display: flex; justify-content: space-between; flex: 1; overflow: hidden; `,fu=({item:{id:v,title:b},onRemove:D,onUpdateTitle:L,disableDelete:N})=>t.createElement(Ag,null,t.createElement(yg.A,{key:b,disabled:!L,value:b,onChange:w=>L(v,w)}),t.createElement("div",null,t.createElement(V.K0,{title:`Remove page ${b}`,name:"delete",onClick:()=>D(v),disabled:N}))),_g=({show:v,setShow:b,queriesList:D,activeQueryId:L,dashboardId:N})=>{const{setDashboardPage:w}=(0,t.useContext)(eo),H=gu(),[Z,ee]=(0,t.useState)(D),Ce=Z.size<=1,Me=(0,gn.A)(),Ne=(0,_.A)(),ot=(0,t.useCallback)(()=>{const on=!Z.find(({id:Sn})=>Sn===L);if(Ne(P.g.DASHBOARD_ACTION.DASHBOARD_PAGE_CONFIGURATION_UPDATED,{app_pathname:"dashboard",app_section:"dashboard",app_action_value:"dashboard-page-configuration"}),on){const Sn=D.map(({id:so})=>so).toList(),Nn=Z.map(({id:so})=>so).toArray(),sn=Sn.filter(so=>!Nn.includes(so)).toList(),ho=(0,Ph.A)(Sn,L,sn);w(ho)}Me((0,On.hX)(Z.map(({id:Sn})=>Sn).toOrderedSet())).then(()=>{const Sn=Z.map(({id:Nn,title:sn})=>{const ho=Ze.Map({title:sn}),so=Ze.Map({[as.A.Tab]:ho});return{queryId:Nn,titlesMap:so}}).toArray();Me((0,On.MI)(Sn)),b(!1)})},[Z,Ne,Me,L,D,w,b]),st=(0,t.useCallback)(()=>{Ne(P.g.DASHBOARD_ACTION.DASHBOARD_PAGE_CONFIGURATION_CANCELED,{app_pathname:"dashboard",app_section:"dashboard",app_action_value:"dashboard-page-configuration"}),b(!1)},[Ne,b]),pt=(0,t.useCallback)(on=>{Ne(P.g.DASHBOARD_ACTION.DASHBOARD_PAGE_CONFIGURATION_SORTING_UPDATED,{app_pathname:"dashboard",app_section:"dashboard",app_action_value:"dashboard-page-configuration-sorting"}),ee(Ze.OrderedSet(on))},[Ne,ee]),Vt=(0,t.useCallback)((on,Sn)=>{ee(Nn=>Nn.map(sn=>sn.id===on?{id:on,title:Sn}:sn).toOrderedSet())},[]),kt=(0,t.useCallback)(async on=>(Ce||await Gl(N,L,H)&&(Ne(P.g.DASHBOARD_ACTION.DASHBOARD_PAGE_CONFIGURATION_PAGE_REMOVED,{app_pathname:"dashboard",app_section:"dashboard",app_action_value:"dashboard-page-configuration-remove-page"}),ee(Sn=>Sn.filter(Nn=>Nn.id!==on).toOrderedSet())),Promise.resolve()),[L,N,Ce,Ne,H]),Tn=(0,t.useCallback)(({item:on})=>t.createElement(fu,{item:on,onUpdateTitle:Vt,onRemove:kt,disableDelete:Ce}),[Ce,kt,Vt]);return t.createElement(vg.A,{showModal:v,title:"Update Dashboard Pages Configuration",onConfirm:ot,onCancel:st,confirmButtonText:"Update configuration"},t.createElement(t.Fragment,null,t.createElement("h3",null,"Order"),t.createElement("p",null,"Use drag and drop to change the order of the dashboard pages. Double-click on a dashboard title to change it."),t.createElement(V.bH,{items:Z.toArray(),onMoveItem:pt,displayOverlayInPortal:!0,alignItemContent:"center",customContentRender:Tn})))},pm=(v,b,D)=>{if(D.type!==qe.A.Type.Dashboard)return;const L=qr.d.exports("views.hooks.copyWidgetToDashboard"),N=b.state.get(v),H=b.search.queries.find(Ne=>Ne.id===v).toBuilder().newId().build(),Z=D.state.set(H.id,N.duplicate()),ee=D.search.queries.add(H),Ce=D.search.toBuilder().queries(ee).build(),Me=(0,Ml.A)(D.toBuilder().state(Z).search(Ce).build());return L.reduce((Ne,ot)=>ot(b,Ne),Me)};var Ni=e("Gkq4qIYY");const Wa="hidden",Cg="locked",gm="active",Em=15,fm="tab-menu-item",hu="query-tabs-more",vu="query-tabs-more-li",yu="query-tab-create",rr=c.default.div` display: flex; justify-content: space-between; align-items: center; `,Tg=(0,c.default)(Be.Nav)(({theme:v})=>(0,c.css)` &.nav.nav-tabs { border-bottom: 0; display: flex; white-space: nowrap; position: relative; padding-left: ${Em}px; > li { > a { color: ${v.colors.global.textDefault}; border: none; &:hover, &:active, &:focus { transition: color 150ms ease-in-out; background: transparent; color: ${v.colors.variant.dark.primary}; } } } > li.active { display: flex; flex-direction: column; align-items: center; margin-bottom: -3px; > a { padding: 9px 15px; border: 1px solid ${v.colors.variant.lighter.default}; border-bottom: none; background-color: ${v.colors.global.contentBackground}; color: ${v.colors.variant.darkest.primary}; &:hover, &:active, &:focus { border: 1px solid ${v.colors.variant.lighter.default}; border-bottom: none; color: ${v.colors.variant.darkest.primary}; } } } > li.${hu}, > li.${hu} a { cursor: pointer; } } `),ol=(0,c.default)(Be.NavItem)` &&&&.active > a { padding: 6px 15px 9px; } `,bg=({menuItems:v})=>t.createElement("li",{className:vu},t.createElement(Be.DropdownButton,{title:t.createElement(V.In,{name:"more_horiz"}),className:hu,id:"query-tabs-more","aria-label":"More Dashboard Pages",noCaret:!0,bsStyle:"link",keepMounted:!0,pullRight:!0},v.toArray())),Au=(v,b,D,L)=>{var N;const w=document.querySelector("#dashboard-tabs"),H=w.querySelectorAll(`:scope > li:not(.${vu}):not(.${yu})`),Z=w.querySelectorAll(`li.${vu} [role="menu"] a.${fm}`),ee=w.querySelector(`.${hu}`),Ce=w.querySelector(`.${yu}`),Me=[];let Ne=ee.offsetWidth+Ce.offsetWidth+((N=L==null?void 0:L.offsetWidth)!=null?N:0)+Em,ot=0;H.forEach(st=>{if(st.classList.remove(Wa),st.setAttribute("aria-hidden","false"),b){const pt=st.querySelector("a"),{tabId:Vt}=pt.dataset;Vt===b&&(Ne+=st.offsetWidth)}}),H.forEach((st,pt)=>{st.classList.contains(Cg)||(ot+=st.offsetWidth,v>=ot+Ne?Me.splice(pt,1):(st.classList.add(Wa),st.setAttribute("aria-hidden","true"),Me.push(pt)))}),Z.forEach((st,pt)=>{if(st.classList.remove(Wa),st.setAttribute("aria-hidden","false"),!Me.includes(pt))st.classList.add(Wa),st.setAttribute("aria-hidden","true");else if(st.classList.contains(gm)){const{tabId:Vt}=st.dataset;D(Vt)}}),Me.length&&ee.classList.contains(Wa)?ee.classList.remove(Wa):!Me.length&&!ee.classList.contains(Wa)&&ee.classList.add(Wa)},lr=(v,b)=>{const D=v.toBuilder().search(b).build();return nr.u.update(D)},Oh=(v,b,D)=>async L=>{const N=Ll.A.fromJSON(L),w=pm(D,b,v.toBuilder().search(N).build());if(!w||!w.search)throw Error("Copying the dashboard page failed.");const H=w.search.queries.last().id,Z=await(0,Bl.A)(w.search);return await lr(w,Z),[w,H]},hm=v=>async(b,D)=>{const L=(0,Qe.sf)(D()),N=(0,Qe.Hz)(D()),w=await nr.u.get(v),H=qe.A.fromJSON(w);return(0,Gc.A)(w.search_id).then(Oh(H,L,N))},Sg=async(v,b,D)=>{const L=pm(b,v,qe.A.create().toBuilder().state({}).type(qe.A.Type.Dashboard).search(Ll.A.create().toBuilder().queries([]).build()).build());(0,Xs.l3)(D,L)},Hl=({maxWidth:v,queries:b,titles:D,onRemove:L,onSelect:N,queryTitleEditModal:w,dashboardId:H})=>{const Z=(0,Nt.A)(),ee=(0,Ni.A)(),Ce=(0,mg.A)(),[Me,Ne]=(0,t.useState)(),[ot,st]=(0,t.useState)(!1),[pt,Vt]=(0,t.useState)(!1),kt=(0,gn.A)(),Tn=(0,Pa.A)(),on=(0,_.A)(),Sn=(0,t.useRef)(null),Nn=(0,t.useCallback)(()=>{Vt(mo=>!mo)},[]),sn=(0,t.useCallback)(mo=>kt(hm(mo)).then(([Go,Bo])=>(0,Xs.RR)(Tn,Go.id,Bo)).catch(Go=>{Yo.A.error(`Copying dashboard page failed with error ${Go}`)}),[kt,Tn]),ho=()=>Sg(Z,Ce,Tn),so=(0,t.useCallback)(mo=>{w&&w.current.open(mo)},[w]),uo=(0,t.useMemo)(()=>{let mo=(0,Ze.OrderedSet)(),Go=(0,Ze.OrderedSet)(),Bo=(0,Ze.OrderedSet)(),qo=(0,Ze.OrderedSet)();return b.keySeq().forEach((Hn,Xo)=>{const os=D.get(Hn,`Page#${Xo+1}`),Uo=t.createElement(hg,{active:Hn===Ce,id:Hn,onRemove:()=>L(Hn),openEditModal:so,openCopyToDashboardModal:Nn,allowsClosing:b.size>1,title:os});mo=mo.add(Me===Hn?null:t.createElement(ol,{eventKey:Hn,key:Hn,"data-tab-id":Hn,onClick:()=>{Ne(void 0),N(Hn)}},Uo)),Go=Go.add(Me===Hn?null:t.createElement(Be.MenuItem,{eventKey:Hn,key:Hn,component:"a",className:`${fm} ${Ce===Hn?gm:""}`,"data-tab-id":Hn,onClick:()=>{Ne(Hn),N(Hn)}},Uo)),Bo=Bo.add(Me!==Hn?null:t.createElement(ol,{eventKey:Hn,key:Hn,"data-tab-id":Hn,onClick:()=>N(Hn),className:Cg},Uo)),qo=qo.add({id:Hn,title:os})}),{navItems:mo,menuItems:Go,lockedItems:Bo,queriesList:qo}},[b,D,Ce,so,Nn,Me,L,N]);return(0,t.useEffect)(()=>{Au(v,Me,Ne,Sn.current)},[v,Me,Ce]),t.createElement(rr,null,t.createElement(Tg,{bsStyle:"tabs",activeKey:Ce,id:"dashboard-tabs"},uo.navItems.toArray(),t.createElement(bg,{menuItems:uo.menuItems}),uo.lockedItems.toArray(),t.createElement(ol,{key:"new",eventKey:"new",title:"Create New Page",onClick:()=>{on(P.g.DASHBOARD_ACTION.DASHBOARD_CREATE_PAGE,{app_pathname:"dashboard",app_section:"dashboard",app_action_value:"dashboard-create-page-button"}),N("new")},className:yu},t.createElement(V.In,{name:"add"}))),t.createElement(V.K0,{title:"Open pages configuration",name:"settings",ref:Sn,className:"query-config-btn",onClick:()=>{on(P.g.DASHBOARD_ACTION.DASHBOARD_PAGE_CONFIGURATION,{app_pathname:"dashboard",app_section:"dashboard",app_action_value:"dashboard-page-configuration-button"}),st(!0)}}),ot&&t.createElement(_g,{show:ot,setShow:st,dashboardId:H,queriesList:uo.queriesList,activeQueryId:Ce}),pt&&t.createElement(wl,{onCopyToDashboard:mo=>sn(mo),onCreateNewDashboard:ee?void 0:ho,onCancel:Nn,activeDashboardId:H,submitButtonText:"Copy page",submitLoadingText:"Copying page..."}))};Hl.propTypes={maxWidth:l().number.isRequired,queries:um().orderedSetOf(l().string).isRequired,titles:l().object.isRequired,onRemove:l().func.isRequired,onSelect:l().func.isRequired,queryTitleEditModal:l().oneOfType([l().func,l().shape({current:l().object})]).isRequired};const wi=Hl,_u=({onRemove:v,onSelect:b,onTitleChange:D,queries:L,titles:N,dashboardId:w})=>{const H=(0,t.useRef)(),Z=(0,mg.A)();return t.createElement(Be.Row,null,t.createElement(Be.Col,null,t.createElement(na.A,null,({width:ee})=>ee?t.createElement(wi,{maxWidth:ee,queries:L,dashboardId:w,titles:N,onRemove:v,onSelect:b,queryTitleEditModal:H,onTitleChange:D}):t.createElement("div",null)),t.createElement(pg,{onTitleChange:ee=>D(Z,ee),ref:H})))};_u.propTypes={onRemove:l().func.isRequired,onSelect:l().func.isRequired,onTitleChange:l().func.isRequired,queries:um().orderedSetOf(l().string).isRequired,titles:l().object.isRequired};const Pg=_u,Rh=async(v,b,D,L,N,w)=>(L.size===1||await Gl(v,D,N)===!0&&w((0,On.DU)(b)),Promise.resolve()),Dg=()=>{const v=Pi(),b=ug(),{activeQuery:D,id:L}=Ue(),{setDashboardPage:N}=(0,t.useContext)(eo),w=gu(),H=(0,gn.A)(),Z=(0,t.useCallback)(Me=>{Me==="new"?H((0,On.VZ)()).then(Ne=>N(Ne)):(N(Me),H((0,On.Z1)(Me)))},[H,N]),ee=(0,t.useCallback)(Me=>Rh(L,Me,D,v,w,H),[L,D,v,w,H]),Ce=(0,t.useCallback)((Me,Ne)=>H((0,fl.D)(Me,"tab","title",Ne)),[H]);return t.createElement(Pg,{queries:v,titles:b,dashboardId:L,onSelect:Z,onTitleChange:Ce,onRemove:ee})};var Mh=e("8RmZXjGq"),Og=e("InkdxEOv"),Rg=e("SnOQy/BL"),Ig=e("i3LesQt8");const Mg=c.default.li(({theme:v})=>(0,c.css)` font-size: ${v.fonts.size.body}; display: table-row; white-space: nowrap; `),xg=({activeQueryFields:v,fieldType:b,selectedQuery:D,style:L})=>{const{name:N,type:w}=b,H=!v.find(Z=>Z.name===N);return t.createElement(Mg,{style:L},t.createElement(Ig.A,{type:w})," ",t.createElement(Rg.A,{queryId:D,disabled:H,name:N,type:w},N))},xh=50,Lg=(0,c.default)(na.A)` overflow: hidden; `,Bg=(v,b,D="all")=>{const L=N=>!(0,Og.A)(N.name);switch(D){case"all":return b.filter(L).toList();case"allreserved":return b;case"current":default:return v.filter(L).toList()}},Lh=({filter:v,activeQueryFields:b,allFields:D,currentGroup:L})=>{const N=(0,C.A)();if(!b)return t.createElement("span",null,"No field information available.");const w=v?ee=>ee.name.toLocaleUpperCase().includes(v.toLocaleUpperCase()):()=>!0,Z=Bg(b,D,L).filter(w).sortBy(ee=>ee.name.toLocaleUpperCase());return Z.isEmpty()?t.createElement("i",null,"No fields to show. Try changing your filter term or select a different field set above."):t.createElement(Lg,null,({width:ee,height:Ce})=>t.createElement(Mh.Y1,{height:Ce||xh,width:ee,itemCount:Z.size,itemSize:20},({index:Me,style:Ne})=>t.createElement(xg,{fieldType:Z.get(Me),selectedQuery:N,activeQueryFields:b,style:Ne})))},Tu=({onSelect:v,selected:b,group:D,text:L,title:N})=>t.createElement("a",{onClick:()=>v(D),role:"button",style:{fontWeight:b?"bold":"normal"},tabIndex:0,title:N},L),Ug=c.default.div` white-space: break-spaces; height: 100%; display: grid; grid-template-columns: 1fr; grid-template-rows: max-content 1fr; > *:nth-child(1) { grid-column: 1; grid-row: 1; } > *:nth-child(2) { grid-column: 1; grid-row: 2; } `,Ng=c.default.form` display: flex; `,wg=c.default.div` margin-right: 5px; `,Wg=c.default.input` width: 100%; `,Fg=c.default.div` margin-top: 5px; margin-bottom: 0; `,Kg=({allFields:v,activeQueryFields:b})=>{const[D,L]=(0,t.useState)("current"),[N,w]=(0,t.useState)(void 0),H=ee=>w(ee.target.value),Z=()=>w(void 0);return t.createElement(Ug,null,t.createElement("div",null,t.createElement(Ng,{onSubmit:ee=>ee.preventDefault()},t.createElement(wg,{className:"form-group has-feedback"},t.createElement(Wg,{id:"common-search-form-query-input",className:"query form-control",onChange:H,value:N||"",placeholder:"Filter fields",type:"text",autoComplete:"off",spellCheck:"false"})),t.createElement("div",{className:"form-group"},t.createElement(Be.Button,{type:"reset",className:"reset-button",onClick:Z},"Reset"))),t.createElement(Fg,null,"List fields of"," ",t.createElement(Tu,{selected:D==="current",group:"current",text:"current query",title:"This shows fields which occur in your current query.",onSelect:L}),", ",t.createElement(Tu,{selected:D==="all",group:"all",text:"all",title:"This shows all fields, but no reserved (gl2_*) fields.",onSelect:L})," or ",t.createElement(Tu,{onSelect:L,selected:D==="allreserved",group:"allreserved",text:"all including reserved",title:"This shows all fields, including reserved (gl2_*) fields."})," fields."),t.createElement("hr",null)),t.createElement(Lh,{filter:N,activeQueryFields:b,allFields:v,currentGroup:D}))},bu=v=>{const b=(0,C.A)();return t.createElement(vn.A.Consumer,null,D=>{const L=D==null?void 0:D.all,N=D==null?void 0:D.queryFields,w=N==null?void 0:N.get(b,L);return t.createElement(Kg,{...v,allFields:L,activeQueryFields:w})})};var Wi=e("d4iC/0eA"),Fi=e("4Bes0RHI"),Su=e("7H4KJ6cl");const $g=(0,c.default)(Be.ButtonGroup)` display: flex; justify-content: flex-end; > .btn-group { .btn:first-child { max-width: 100%; } } `,Gg=()=>{const{refreshConfig:v}=(0,hr.A)();return v!=null&&v.enabled?t.createElement(t.Fragment,null,"Every ",t.createElement(Su.A,{duration:v.interval})):t.createElement(t.Fragment,null,"Not updating")},jg=()=>{const{refreshConfig:v,stopAutoRefresh:b}=(0,hr.A)(),{dirty:D,isSubmitting:L}=(0,gt.useFormikContext)();(0,t.useEffect)(()=>{v!=null&&v.enabled&&!L&&D&&b()},[D,L,v==null?void 0:v.enabled,b])},Fa=v=>vr().duration(v).asMilliseconds(),Hg=()=>{const{config:{auto_refresh_timerange_options:v,default_auto_refresh_option:b}}=(0,Wi.A)(),{data:D}=(0,Fi.A)(),L=Fa(D);if(Fa(b)Fa(w)>=L).sort(([w],[H])=>Fa(w)>Fa(H)?1:-1);return N.length?N[0][0]:null}return b},ym=()=>{const{dirty:v,submitForm:b}=(0,gt.useFormikContext)(),D=(0,M.A)(),L=(0,_.A)(),{config:{auto_refresh_timerange_options:N}}=(0,Wi.A)(),{data:w,isInitialLoading:H}=(0,Fi.A)(),Z=Object.entries(N),{refreshConfig:ee,startAutoRefresh:Ce,stopAutoRefresh:Me}=(0,hr.A)(),Ne=Hg();jg();const ot=(0,t.useCallback)(pt=>{L(P.g.SEARCH_REFRESH_CONTROL_PRESET_SELECTED,{app_pathname:(0,I.i)(D.pathname),app_section:"search-bar",app_action_value:"refresh-search-control-dropdown",event_details:{interval:pt}}),Ce(Fa(pt)),v&&b()},[v,D.pathname,L,Ce,b]),st=(0,t.useCallback)(()=>{var pt;!Ne&&!(ee!=null&&ee.interval)||(L(P.g.SEARCH_REFRESH_CONTROL_TOGGLED,{app_pathname:"search",app_section:"search-bar",app_action_value:"refresh-search-control-enable",event_details:{enabled:!(ee!=null&&ee.enabled)}}),ee!=null&&ee.enabled?Me():(v&&b(),Ce((pt=ee==null?void 0:ee.interval)!=null?pt:Fa(Ne))))},[Ne,v,ee==null?void 0:ee.enabled,ee==null?void 0:ee.interval,L,Ce,Me,b]);return t.createElement($g,{"aria-label":"Refresh Search Controls"},t.createElement(Be.Button,{onClick:st,title:ee!=null&&ee.enabled?"Pause Refresh":"Start Refresh",disabled:H||!Ne},t.createElement(V.In,{name:ee!=null&&ee.enabled?"pause":"play_arrow"})),t.createElement(Be.DropdownButton,{title:t.createElement(Gg,null),id:"refresh-options-dropdown"},H&&t.createElement(V.y$,null),!H&&Z.map(([pt,Vt])=>{const kt=Fa(pt)ot(pt),disabled:kt},Vt,kt&&t.createElement(V.Zf,{displayLeftMargin:!0},"Interval of ",t.createElement(Su.A,{duration:pt})," (",pt,") is below configured minimum interval of ",t.createElement(Su.A,{duration:w})," (",w,")."))})))};var zg=e("kqAR+wt5"),Vg=e.n(zg);const Am={NAVBAR_HEIGHT:55,scrollToHint(v){if(!this.isElementVisible(v)){const b=Vg()("#scroll-to-hint");b.fadeIn("fast").delay(1500).fadeOut("fast").on("click",D=>{D.preventDefault();const L=window.pageYOffset-this.NAVBAR_HEIGHT+v.getBoundingClientRect().top;Vg()("html, body").animate({scrollTop:L},"fast"),b.off("click")})}},isElementVisible(v){const b=v.getBoundingClientRect();return b.top>0&&b.bottom>0}},kg=({children:v,value:b})=>{const D=(0,t.useRef)();return(0,t.useEffect)(()=>{Am.scrollToHint(D.current)},[b]),t.createElement("span",{ref:D},v)};kg.propTypes={children:l().node.isRequired,value:l().any.isRequired};const _m=kg;var Cm=e("yGRmSjYM"),Qg=e("RCNj0OY4");const Yg=({show:v,onClose:b})=>{const D=(0,je.A)(L=>L);return t.createElement(tr.A,{showModal:v,onHide:b},t.createElement(Be.Modal.Header,{closeButton:!0},t.createElement(Be.Modal.Title,null,"Debug information")),t.createElement(Be.Modal.Body,null,t.createElement("textarea",{disabled:!0,style:{height:"80vh",width:"100%"},value:JSON.stringify(D,null,2)})),t.createElement(Be.Modal.Footer,null,t.createElement(Be.Button,{type:"button",onClick:()=>b()},"Close")))};var Xg=e("zKLlqmvB");const Tm=(v,b)=>async D=>{try{const L=await nr.u.create(v);(0,Xg.flushSync)(()=>{D((0,On.Xb)(!1)),D((0,On.hn)(!1))}),(0,Xs.RR)(b,L.id),Yo.A.success(`Saving view "${v.title}" was successful!`,"Success!")}catch(L){Yo.A.error(`Saving view failed: ${L}`,"Error!")}},Jg={Edit:v=>`view:edit:${v}`};var bm=e("DjctQb+S");function ir(){let v=(0,t.useContext)(bm.Ay);return v===void 0&&(v=bm.Ke),v}var Ki=e("q2j1bVbz"),zl=e("HqzDVmZB");const Sm=async(v,b,D)=>{let L=v.toBuilder().build();for(const N of D){const w=await N(L,b).catch(H=>{const Z=`An error occurred when executing a submit handler from a plugin: ${H}`;return console.error(Z),Yo.A.error(Z),L});w&&(L=w)}return L},Zg=(v,b,D)=>{const L=D==null?void 0:D.map(({onSearchDuplication:N})=>N).filter(N=>!!N);return Sm(v,b,L)},qg=(v,b,D)=>{const L=D==null?void 0:D.map(({onDashboardDuplication:N})=>N).filter(N=>!!N);return Sm(v,b,L)};var Pu=e("qZ8Wpsbl"),Pm=e("tt0llszK");const $i=(0,c.default)(V.In)(({theme:v,$isDirty:b})=>(0,c.css)` color: ${b?v.colors.variant.dark.warning:"default"}; `),sl=(0,t.forwardRef)(({title:v,onClick:b,disabled:D},L)=>{const N=S();return t.createElement(Be.Button,{title:v,ref:L,onClick:b,disabled:D},t.createElement($i,{name:"save",type:N?"solid":"regular",$isDirty:!D&&N})," Save")});sl.defaultProps={disabled:!1};const Mr=sl,Du=v=>v.searchMetadata,Gi=(0,He.Mz)(Du,v=>v.metadata),al=(0,He.Mz)(Gi,v=>{var b;return(b=v==null?void 0:v.undeclared)!=null?b:Ze.Set()}),xr=(0,He.Mz)(al,v=>(v==null?void 0:v.size)>0),Dm=()=>(0,je.A)(xr),rl=({userIsAllowedToEdit:v,openSaveAsModal:b})=>{const D=(0,Nt.A)(),L=(0,Ni.A)(),N=(0,_.A)(),w=(0,gn.A)(),H=Dm(),Z=(0,t.useCallback)(()=>(N(P.g.DASHBOARD_ACTION.DASHBOARD_SAVED,{app_pathname:"dashboard",app_section:"dashboard",app_action_value:"dashboard-save"}),w((0,Pm.A)(D))),[w,N,D]);return(0,jt.Ay)({actionKey:"save",callback:()=>L?b():Z(),scope:"dashboard",options:{enabled:!H&&v}}),t.createElement(Mr,{title:"Save dashboard",onClick:Z,disabled:H||L||!v})};var Rm=e("+Ej1FZHV");const tE=({onClick:v,openSaveAsModal:b})=>{const D=Dm();return(0,jt.Ay)({actionKey:"save-as",callback:()=>b(),scope:"dashboard",options:{enabled:!D}}),t.createElement(Rm.A,{onClick:v,disabled:D,title:"Save as new dashboard"},t.createElement(V.In,{name:"content_copy"})," Save as")};var Vl=e("B6TE4HBJ"),Kh=e("oCSEoDew"),ji=e.n(Kh),Da=e("d4kzUuQm");const nE=({onSave:v,view:b,show:D,onClose:L})=>{const N=b.search.queries.keySeq().map((pt,Vt)=>[Vt,(0,Wl.A)(b,pt.id)]).toJS(),[w,H]=(0,t.useState)(10),[Z,ee]=(0,t.useState)(N.map(([pt])=>pt)),[Ce,Me]=(0,t.useState)(30),Ne=(0,t.useCallback)(pt=>ee([...Z,pt]),[Z,ee]),ot=(0,t.useCallback)(pt=>ee(Z.filter(Vt=>Vt!==pt)),[Z,ee]),st=(0,t.useCallback)(()=>v({refreshInterval:w,queryTabs:Z,queryCycleInterval:Ce}),[v,w,Z,Ce]);return t.createElement(Or.A,{bsSize:"large",onCancel:L,onSubmitForm:st,submitButtonText:"Start full screen view",title:"Configuring Full Screen",show:D},t.createElement(Rr.A,{autoFocus:!0,id:"refresh-interval",type:"number",min:"1",name:"refresh-interval",label:"Refresh Interval",help:"After how many seconds should the dashboard refresh?",onChange:({target:{value:pt}})=>H(pt&&Number.parseInt(pt,10)),required:!0,step:1,value:w}),t.createElement(Be.FormGroup,null,t.createElement(Be.ControlLabel,null,"Tabs"),t.createElement("ul",null,N.map(([pt,Vt])=>t.createElement("li",{key:`${pt}-${Vt}`},t.createElement(Be.Checkbox,{inline:!0,checked:Z.includes(pt),onChange:kt=>kt.target.checked?Ne(pt):ot(pt)},Vt)))),t.createElement(Be.HelpBlock,null,"Select the query tabs to include in rotation.")),t.createElement(Rr.A,{id:"query-cycle-interval",type:"number",min:"1",name:"query-cycle-interval",label:"Tab cycle interval",help:"After how many seconds should the next tab be shown?",onChange:({target:{value:pt}})=>Me(pt&&Number.parseInt(pt,10)),required:!0,step:"1",value:Ce}))},$h=(v,b,D,L)=>{L(),v.push(new(ji())(Da.Ay.pluginRoute("DASHBOARDS_TV_VIEWID")(b.id)).search(D).toString())},oE=({queryCycleInterval:v,queryTabs:b,refreshInterval:D},L)=>{const N={interval:Number(v).toString(),refresh:Number(D).toString()},w=L.search.queries.toIndexedSeq().map((H,Z)=>Z).toJS();return!b||w.join(",")===b.join(",")?N:{...N,tabs:b.join(",")}},Ou=({disabled:v,show:b,view:D})=>{const[L,N]=(0,t.useState)(b),{unsetWidgetFocusing:w}=(0,t.useContext)(cs.A),H=(0,Pa.A)(),Z=(0,_.A)(),ee=Ce=>{Z(P.g.DASHBOARD_FULL_SCREEN_MODE_STARTED,{app_pathname:"dashboard",app_section:"dashboard-menu"}),$h(H,D,oE(Ce,D),w)};return t.createElement(t.Fragment,null,L&&t.createElement(nE,{onClose:()=>N(!1),onSave:ee,show:!0,view:D}),t.createElement(Be.MenuItem,{disabled:v,onSelect:()=>N(!0),icon:"live_tv"},"Full Screen"))};Ou.defaultProps={disabled:!1,show:!1};const sE=Ou,aE=(v,b)=>(0,Cm.Nn)(b==null?void 0:b.permissions,[Jg.Edit(v.id)])||v.type===qe.A.Type.Dashboard&&(0,Cm.Nn)(b==null?void 0:b.permissions,[`dashboards:edit:${v.id}`]),jh=()=>{const v=(0,Nt.A)(),b=(0,Ni.A)(),D=(0,Ki.A)(),{viewActions:{save:{isShown:L},saveAs:{isShown:N},share:{isShown:w},actionsDropdown:{isShown:H}}}=ir(),Z=(0,Pu.A)(),[ee,Ce]=(0,t.useState)(!1),[Me,Ne]=(0,t.useState)(!1),[ot,st]=(0,t.useState)(!1),[pt,Vt]=(0,t.useState)(!1),[kt,Tn]=(0,t.useState)(!1),on=(0,_.A)(),Sn=aE(v,D),Nn=Qg.A.gl2DevMode()&&t.createElement(t.Fragment,null,t.createElement(Be.MenuItem,{divider:!0}),t.createElement(Be.MenuItem,{onSelect:()=>Ne(!0),icon:"code"},"Debug")),sn=(0,gn.A)(),ho=(0,Pa.A)(),so=(0,wn.A)("views.components.dashboardActions"),uo=(0,t.useRef)({}),mo=(0,t.useMemo)(()=>so.map(({component:Hn,key:Xo})=>t.createElement(Hn,{key:`dashboard-action-${Xo}`,dashboard:v,modalRef:()=>uo.current[Xo]})),[so,v]),Go=(0,t.useMemo)(()=>so.filter(({modal:Hn})=>!!Hn).map(({modal:Hn,key:Xo})=>t.createElement(Hn,{key:`dashboard-action-modal-${Xo}`,dashboard:v,ref:os=>{uo.current[Xo]=os}})),[so,v]),Bo=(0,t.useCallback)(async Hn=>{if(on(P.g.DASHBOARD_ACTION.DASHBOARD_NEW_SAVED,{app_pathname:"dashboard",app_section:"dashboard",app_action_value:"dashboard-save-new"}),!!v.id){const os=await qg(Hn,D.permissions,Z);return sn(Tm(os,ho))}return sn(Tm(Hn,ho))},[D.permissions,sn,ho,Z,on,v.id]),qo=(0,t.useCallback)(Hn=>(on(P.g.DASHBOARD_ACTION.DASHBOARD_UPDATED,{app_pathname:"dashboard",app_section:"dashboard",app_action_value:"dashboard-update"}),sn((0,On.vl)(Hn))),[sn,on]);return t.createElement(Be.ButtonGroup,null,L&&t.createElement(rl,{userIsAllowedToEdit:Sn,openSaveAsModal:()=>st(!0)}),N&&t.createElement(tE,{onClick:()=>st(!0),openSaveAsModal:()=>st(!0)}),w&&t.createElement(V.wD,{entityType:"dashboard",entityId:v.id,onClick:()=>Ce(!0),bsStyle:"default",disabledInfo:b&&"Only saved dashboards can be shared."}),H&&t.createElement(Be.DropdownButton,{title:t.createElement(V.In,{name:"more_horiz"}),id:"query-tab-actions-dropdown",pullRight:!0,keepMounted:!0,buttonTitle:"More Actions",noCaret:!0},mo.length>0&&t.createElement(t.Fragment,null,mo,t.createElement(Be.MenuItem,{divider:!0})),t.createElement(Be.MenuItem,{onSelect:()=>Vt(!0),disabled:b||!Sn,icon:"edit"},"Edit metadata"),t.createElement(Be.MenuItem,{onSelect:()=>Tn(!0),icon:"download"},"Export"),Nn,t.createElement(Be.MenuItem,{divider:!0}),t.createElement(sE,{view:v,disabled:b})),Me&&t.createElement(Yg,{show:!0,onClose:()=>Ne(!1)}),ot&&t.createElement(Vl.A,{show:!0,view:v.toBuilder().newId().build(),title:"Save new dashboard",submitButtonText:"Create dashboard",onClose:()=>st(!1),onSave:Hn=>Bo(Hn)}),pt&&t.createElement(Vl.A,{show:!0,view:v,title:"Editing dashboard",submitButtonText:"Update dashboard",onClose:()=>Vt(!1),onSave:qo}),ee&&t.createElement(zl.A,{entityId:v.id,entityType:"dashboard",entityTitle:v.title,description:"Search for a User or Team to add as collaborator on this dashboard.",onClose:()=>Ce(!1)}),kt&&t.createElement(Ai,{view:v,closeModal:()=>Tn(!1)}),Go)},Ru=v=>Yr()(v),Im=({initialValues:v,limitDuration:b,onSubmit:D,validateQueryString:L,children:N})=>{const{formatTime:w,userTimezone:H}=(0,bs.A)(),{setFieldWarning:Z}=(0,t.useContext)(xa.A),ee=(0,wn.A)("views.components.searchBar"),{timerange:Ce,...Me}=v,ot={timerange:Ce&&!(0,As.EZ)(Ce)?(0,Cl.Z)(Ce,w):{},...Me},{enableReinitialize:st,onSubmit:pt}=te(ot,D),Vt=Za(),kt=(0,t.useCallback)(Tn=>Sr(Tn,b,Z,L,ee,w,Vt,H),[b,Z,L,ee,w,Vt,H]);return t.createElement(gt.Formik,{initialValues:ot,enableReinitialize:st,onSubmit:pt,validate:kt,validateOnMount:!0},(...Tn)=>t.createElement(gt.Form,null,Ru(N)?N(...Tn):N))};Im.propTypes={initialValues:l().shape({timerange:l().object,queryString:l().string}).isRequired,limitDuration:l().number.isRequired,onSubmit:l().func.isRequired};const rE=Im,lE=c.default.div(({theme:v})=>(0,c.css)` display: flex; justify-content: space-between; gap: ${Ss.uE}; @media (max-width: ${v.breakpoints.max.sm}) { flex-direction: column; } `),iE=(0,c.default)(da.A)(({theme:v})=>(0,c.css)` flex: 0.2; flex-basis: 380px; @media (max-width: ${v.breakpoints.max.sm}) { flex: 1; flex-basis: auto; } `),Mm=(0,Kr.A)(_r.A,350),cE=(v,b,D,L)=>{const N={timeRange:(0,As.EZ)(v==null?void 0:v.timerange)||v==null?void 0:v.timerange,queryString:v==null?void 0:v.queryString,...Al(v,L,b)};return Mm(N,D)},xm=(v,b)=>{const D=yl();return(0,t.useMemo)(()=>({timerange:v,queryString:b,...D}),[b,v,D])},uE=()=>{var v,b;const D=(0,t.useRef)(null),L=(0,Nt.A)(),{userTimezone:N}=(0,bs.A)(),{searchesClusterConfig:w}=(0,d.P)(Xa.o),{timerange:H,query:{query_string:Z=""}={}}=(v=Fe())!=null?v:{},ee=(0,wn.A)("views.components.searchBar"),Ce=(0,gn.A)(),Me=Za(),Ne=(0,t.useCallback)(async kt=>{const{timerange:Tn,queryString:on}=kt;await xs(Ce,kt,ee),Ce((0,ms.MJ)(on,Tn)),Ce((0,ms.g7)())},[Ce,ee]),{parameters:ot}=Ar(),st=xm(H,Z),pt=Bi();if(!w)return t.createElement(V.y$,null);const Vt=(b=vr().duration(w.query_time_range_limit).asSeconds())!=null?b:0;return t.createElement(cs.A.Consumer,null,({focusedWidget:{editing:kt}={editing:!1}})=>t.createElement(_m,{value:Z},t.createElement(Ja.A,null,t.createElement(rE,{initialValues:st,limitDuration:Vt,onSubmit:Ne,validateQueryString:Tn=>cE(Tn,ee,N,Me)},({dirty:Tn,errors:on,isSubmitting:Sn,isValid:Nn,isValidating:sn,handleSubmit:ho,values:so,setFieldValue:uo,validateForm:mo})=>{const Go=Sn||sn||!Nn||pt;return t.createElement(Ss.L$,null,t.createElement($r,{parameters:ot}),t.createElement(lE,null,t.createElement(iE,{onChange:Bo=>uo("timerange",Bo),value:so==null?void 0:so.timerange,limitDuration:Vt,hasErrorOnMount:!!on.timerange,noOverride:!0}),t.createElement(ym,null)),t.createElement(Ss.Dp,null,t.createElement(Ss.Io,null,t.createElement(qa.A,{disabled:Go,glyph:"filter_alt",displaySpinner:Sn||pt,dirty:Tn}),t.createElement(Ss.iV,null,t.createElement(gt.Field,{name:"queryString"},({field:{name:Bo,value:qo,onChange:Hn},meta:{error:Xo}})=>t.createElement(xa.A.Consumer,null,({warnings:os})=>t.createElement(ia,{usage:"global_override_query"},Uo=>t.createElement(Ua,{value:qo,view:L,timeRange:so==null?void 0:so.timerange,placeholder:"Apply filter to all widgets",name:Bo,onChange:Hn,disableExecution:Go,error:Xo,isValidating:sn,validate:mo,warning:os.queryString,ref:D,onExecute:ho,commands:Uo})))),t.createElement(Fr.Ay,null),t.createElement(ws.A,{editorRef:D}))),!kt&&t.createElement(jh,null)),t.createElement(Zo,{showLeftControls:!1}))}))))};var Lm=e("rzOX6PZw"),dE=e("rlwexfKi"),Bm=e("MZSqcZgA"),mE=e("crOrxG1u"),pE=e("ty2gyrHp"),zh=e("YwMFjcSm"),gE=e("Q1zRxDOP");const Vh=(v,b,D)=>(!b||!D||(D(b),v()),!1),EE=(v,b)=>{const D=(0,Ma.useQueryClient)();return{attributes:{title:{renderCell:(L,N)=>t.createElement(s.Consumer,{key:N.id},w=>{const H=Z=>{Z.preventDefault(),Vh(v,N.id,w)};return t.createElement(pE.N,{onClick:H,to:Da.Ay.getPluginRoute("SEARCH_VIEWID")(N.id)},L)})},favorite:{renderCell:(L,N)=>t.createElement(zh.A,{isFavorite:L,grn:(0,gE.i)("search",N.id),onChange:w=>{D.setQueriesData(["saved-searches","overview",b],H=>({...H,list:H.list.map(Z=>Z.id===N.id?Z.toBuilder().favorite(w).build():Z)}))}})}}}},fE="saved-searches",Um={pageSize:20,sort:{attributeId:"title",direction:"asc"},displayedColumns:["title","description","summary","favorite"],columnsOrder:["title","summary","description","owner","created_at","favorite"]};var hE=e("Dg3D5NJi"),vE=e("qO9czYNI");const yE=(v,b)=>{const[D,L]=(0,t.useState)(""),[N,w]=(0,t.useState)(1),{layoutConfig:H,isInitialLoading:Z}=(0,hE.A)({entityTableId:v,defaultPageSize:b.pageSize,defaultDisplayedAttributes:b.displayedColumns,defaultSort:b.sort}),{mutate:ee}=(0,vE.A)(v),Ce=(0,t.useMemo)(()=>({query:D,page:N,pageSize:H.pageSize,sort:H.sort}),[N,H.pageSize,H.sort,D]),Me=(0,t.useCallback)((kt,Tn)=>{kt&&w(kt),Tn&&ee({perPage:Tn})},[ee]),Ne=(0,t.useCallback)(kt=>{w(1),ee({perPage:kt})},[ee]),ot=(0,t.useCallback)(kt=>{w(1),ee({sort:kt})},[ee]),st=(0,t.useCallback)(kt=>{w(1),L(kt)},[]),pt=(0,t.useCallback)(()=>st(""),[st]),Vt=(0,t.useCallback)(kt=>{ee({displayedAttributes:kt})},[ee]);return{activePage:N,isLoadingLayoutPreferences:Z,onPageChange:Me,layoutConfig:H,onSearch:st,onResetSearch:pt,searchParams:Ce,onColumnsChange:Vt,onSortChange:ot,onPageSizeChange:Ne,columnsOrder:b.columnsOrder}},AE=()=>yE(fE,Um);var _E=e("JNPySgKz");const Iu=(v,b,D,L,N,w)=>{v.stopPropagation(),window.confirm(`You are about to delete saved search: "${b.title}". Are you sure?`)&&D(b).then(()=>{b.id!==L&&N(),w(b.id)})},CE=({search:v,onDeleteSavedSearch:b,activeSavedSearchId:D,refetch:L})=>{const{deselectEntity:N}=(0,_E.A)(),[w,H]=(0,t.useState)(!1),Z=(0,t.useCallback)(()=>{H(ee=>!ee)},[]);return t.createElement(t.Fragment,null,t.createElement(V.wD,{bsSize:"xsmall",entityId:v.id,entityType:"search",onClick:()=>H(!0)}),t.createElement(V.Wj,{permissions:[`view:edit:${v.id}`,"view:edit"],anyPermissions:!0},t.createElement(Be.Button,{onClick:ee=>Iu(ee,v,b,D,L,N),role:"button",bsSize:"xsmall",bsStyle:"danger",title:`Delete search ${v.title}`,tabIndex:0},"Delete")),w&&t.createElement(zl.A,{entityId:v.id,entityType:"search",entityTitle:v.title,description:"Search for a User or Team to add as collaborator on this search.",onClose:Z}))};var TE=e("Z2BtcgLJ");const bE="/views/bulk_delete",SE=()=>{const v=(0,Ma.useQueryClient)(),{selectedEntities:b,setSelectedEntities:D}=(0,_E.A)(),L=b==null?void 0:b.length,N=vi.A.pluralize(L,"saved search","saved searches"),w=(0,t.useCallback)(()=>{window.confirm(`Do you really want to remove ${L} ${N}?`)&&(0,Ol.Ay)("POST",(0,I.H3)(bE),{entity_ids:b}).then(({failures:H})=>{if(H!=null&&H.length){const Z=H.map(({entity_id:ee})=>ee);D(Z),Yo.A.error(`${Z.length} out of ${L} selected ${N} could not be deleted.`)}else D([]),Yo.A.success(`${L} ${N} ${vi.A.pluralize(L,"was","were")} deleted successfully.`,"Success")}).catch(H=>{Yo.A.error(`An error occurred while deleting saved searches. ${H}`)}).finally(()=>{v.invalidateQueries(["saved-searches","overview"])})},[N,v,L,b,D]);return t.createElement(TE.A,null,t.createElement(Be.MenuItem,{onSelect:w},"Delete"))},DE=({activeSavedSearchId:v,deleteSavedSearch:b,onLoadSavedSearch:D})=>{const{isLoadingLayoutPreferences:L,onPageChange:N,layoutConfig:w,activePage:H,onSearch:Z,onResetSearch:ee,searchParams:Ce,onColumnsChange:Me,onSortChange:Ne,onPageSizeChange:ot}=AE(),{data:st,isInitialLoading:pt,refetch:Vt}=(0,mE.A)(Ce,{enabled:!L}),kt=(0,t.useCallback)(sn=>t.createElement(CE,{search:sn,onDeleteSavedSearch:b,refetch:Vt,activeSavedSearchId:v}),[v,b,Vt]),Tn=EE(D,Ce);if(pt||L)return t.createElement(V.y$,null);const{list:on,pagination:Sn,attributes:Nn}=st;return t.createElement(V.OW,{onChange:N,totalItems:Sn==null?void 0:Sn.total,pageSize:w.pageSize,activePage:H,showPageSizeSelect:!1,useQueryParameter:!1},t.createElement("div",{style:{marginBottom:"5px"}},t.createElement(V.B9,{focusAfterMount:!0,onSearch:Z,queryHelpComponent:t.createElement(dE.A,{entityName:"search",commonFields:["id","title"]}),topMargin:0,onReset:ee})),(Sn==null?void 0:Sn.total)===0&&!Ce.query&&t.createElement(V.WE,null,"No saved searches have been created yet."),(Sn==null?void 0:Sn.total)===0&&Ce.query&&t.createElement(V.EO,null,"No saved searches have been found."),!!(on!=null&&on.length)&&t.createElement(Bm.A,{data:on,visibleColumns:w.displayedAttributes,columnsOrder:Um.columnsOrder,onColumnsChange:Me,bulkSelection:{actions:t.createElement(SE,null)},onSortChange:Ne,activeSort:w.sort,pageSize:Ce.pageSize,onPageSizeChange:ot,actionsCellWidth:120,rowActions:kt,columnRenderers:Tn,columnDefinitions:Nn}))},OE=({toggleModal:v,deleteSavedSearch:b,activeSavedSearchId:D})=>t.createElement(Be.Modal,{show:!0,title:"Saved searches",bsSize:"large",onHide:v},t.createElement(Be.Modal.Header,{closeButton:!0},t.createElement(Be.Modal.Title,null,"Saved Searches")),t.createElement(Be.Modal.Body,null,t.createElement(DE,{deleteSavedSearch:b,activeSavedSearchId:D,onLoadSavedSearch:v})),t.createElement(Be.Modal.Footer,null,t.createElement(Be.Button,{onClick:v},"Cancel")));OE.propTypes={toggleModal:l().func.isRequired,deleteSavedSearch:l().func.isRequired};const Mu=OE;var RE=e("dFpwyWHg"),IE=e.n(RE),Xh=e("C2ikvoS0"),wm=e.n(Xh),Hi=e("1IntWRSu"),Wm=e.n(Hi),Fm=e("8nGWeFnd"),ME=e.n(Fm),xu=e("TeAcaicX"),Jh=e.n(xu),xE=e("eE3+5goe"),Lu=e.n(xE),zi=e("V7bsrEHK"),kl={};kl.styleTagTransform=Lu(),kl.setAttributes=ME(),kl.insert=Wm().bind(null,"head"),kl.domAPI=wm(),kl.insertStyleElement=Jh();var Zh=IE()(zi.A,kl);const Km=zi.A&&zi.A.locals?zi.A.locals:void 0,LE=c.default.form` width: 210px; `,Bu=v=>{v.preventDefault(),v.stopPropagation()},$m=({children:v,show:b,isCreateNew:D,saveSearch:L,saveAsSearch:N,toggleModal:w,value:H})=>{const[Z,ee]=(0,t.useState)(H),Ce=(0,t.useCallback)(Tn=>ee(Tn.target.value),[]),Me=(Z!=null?Z:"").trim(),Ne=Me===""||!D&&Me===H,ot=D?"Create new":"Save as",st=D?"Create new search":"Save as new search",pt=(0,Pu.A)(),Vt=(0,t.useCallback)(()=>L(Z),[L,Z]),kt=(0,t.useCallback)(()=>N(Z),[N,Z]);return t.createElement(la.A,{position:"left",opened:b,withArrow:!0,withinPortal:!0},t.createElement(la.A.Target,null,v),t.createElement(la.A.Dropdown,{title:"Name of search",id:"saved-search-popover"},t.createElement(LE,{onSubmit:Bu},t.createElement(Be.FormGroup,null,t.createElement(Be.ControlLabel,{htmlFor:"title"},"Title"),t.createElement(Be.FormControl,{type:"text",value:Z,id:"title",placeholder:"Enter title",onChange:Ce})),pt==null?void 0:pt.map(({component:Tn,id:on})=>Tn&&t.createElement(Tn,{key:on,disabledViewCreation:Ne})),t.createElement(Be.ButtonToolbar,null,!D&&t.createElement(Be.Button,{bsStyle:"primary",className:Km.button,type:"submit",bsSize:"sm",title:"Save search",onClick:Vt},"Save"),t.createElement(Be.Button,{disabled:Ne,bsStyle:"info",className:Km.button,type:"submit",bsSize:"sm",title:st,onClick:kt},ot),t.createElement(Be.Button,{className:Km.button,onClick:w,bsSize:"sm"},"Cancel")))))},Vi=(0,c.default)(Be.ButtonGroup)` display: flex; justify-content: flex-end; `,pa=(v,b)=>v.owner===(b==null?void 0:b.username)||(0,Cm.Nn)(b==null?void 0:b.permissions,[Jg.Edit(v.id)]),ki=v=>v&&v.additional&&v.additional.body&&v.additional.body.message?v.additional.body.message:v,qh=(v,b)=>{const D=(0,t.useRef)({}),L=(0,wn.A)("views.components.searchActions"),N=L.filter(H=>H.useCondition?!!H.useCondition():!0).map(({component:H,key:Z,modals:ee})=>{if(ee){const Ce=ee.map(({key:Me})=>Me).reduce((Me,Ne)=>(Me[Ne]=()=>D.current[Ne],Me),{});return t.createElement(H,{key:Z,loaded:v,search:b,modalRefs:Ce})}return t.createElement(H,{key:Z,loaded:v,search:b})}),w=L.filter(({modals:H})=>!!H).flatMap(({modals:H})=>H).map(({key:H,component:Z})=>t.createElement(Z,{key:H,search:b,ref:ee=>{D.current[H]=ee}}));return{actions:N,actionModals:w}},UE=()=>{var v;const b=S(),D=(0,Nt.A)(),L=(0,Ni.A)(),N=(0,t.useContext)(s),w=(0,Ki.A)(),H=(0,t.useContext)(n),Z=D&&D.id&&pa(D,w),ee=(0,t.useRef)(),[Ce,Me]=(0,t.useState)(!1),[Ne,ot]=(0,t.useState)(!1),[st,pt]=(0,t.useState)(!1),[Vt,kt]=(0,t.useState)(!1),[Tn,on]=(0,t.useState)(!1),Sn=(v=D==null?void 0:D.title)!=null?v:"",Nn=(0,gn.A)(),sn=(0,t.useCallback)(ls=>Nn((0,On.vl)(ls)),[Nn]),ho=L===!1,so=!(b||ho),mo=b?"Unsaved changes":ho?"Saved search":"Save search",Go=(0,Pu.A)(),Bo=(0,Pa.A)(),qo=(0,t.useCallback)(()=>Me(ls=>!ls),[]),Hn=(0,t.useCallback)(()=>Me(!1),[]),Xo=(0,t.useCallback)(()=>Me(!0),[]),os=(0,t.useCallback)(()=>ot(ls=>!ls),[]),Uo=(0,t.useCallback)(()=>pt(ls=>!ls),[]),cr=(0,t.useCallback)(()=>kt(ls=>!ls),[]),Ka=(0,t.useCallback)(()=>on(ls=>!ls),[]),{actions:ur,actionModals:Fu}=qh(ho,D),Xl=(0,t.useCallback)(async ls=>{if(!D.id)return;const Zi=D.toBuilder().title(ls).type(qe.A.Type.Search).build();await Nn((0,Pm.A)(Zi)),Hn(),await Nn((0,On.QJ)(Zi))},[Hn,Nn,D]),Ji=(0,t.useCallback)(async ls=>{if(!ls||ls==="")return;const Ku=(await Zg(D,w.permissions,Go)).toBuilder().newId().title(ls).type(qe.A.Type.Search).build();nr.u.create(Ku).then(ll=>(qo(),ll)).then(ll=>{N(ll.id)}).then(()=>Yo.A.success(`Saving view "${Ku.title}" was successful!`,"Success!")).catch(ll=>Yo.A.error(`Saving view failed: ${ki(ll)}`,"Error!"))},[w.permissions,Go,qo,D,N]),ap=(0,t.useCallback)(ls=>nr.u.delete(ls).then(()=>Yo.A.success(`Deleting saved search "${ls.title}" was successful!`,"Success!")).then(()=>(ls.id===D.id&&(0,Xs.X3)(Bo),Promise.resolve())).catch(Zi=>Yo.A.error(`Deleting saved search failed: ${ki(Zi)}`,"Error!")),[Bo,D.id]),Zs=(0,t.useCallback)(()=>{(0,Xs.l3)(Bo,D)},[Bo,D]);return(0,jt.Ay)({actionKey:"save",callback:()=>ho?Xl(mo):Xo(),scope:"search",dependencies:[ho,Xl,mo]}),(0,jt.Ay)({actionKey:"save-as",callback:()=>Xo(),scope:"search"}),t.createElement(Vi,{"aria-label":"Search Meta Buttons"},t.createElement($m,{key:Sn,show:Ce,saveSearch:Xl,saveAsSearch:Ji,isCreateNew:L||!Z,toggleModal:qo,value:Sn},t.createElement(Mr,{title:mo,ref:ee,onClick:qo})),t.createElement(Be.Button,{title:"Load a previously saved search",onClick:os},t.createElement(V.In,{name:"folder",type:"regular"})," Load"),Ne&&t.createElement(Mu,{deleteSavedSearch:ap,toggleModal:os,activeSavedSearchId:D.id}),t.createElement(V.wD,{entityType:"search",entityId:D.id,onClick:Ka,bsStyle:"default",disabledInfo:L&&"Only saved searches can be shared."}),t.createElement(Be.DropdownButton,{title:t.createElement(V.In,{name:"more_horiz"}),"aria-label":"Open search actions dropdown",id:"search-actions-dropdown",pullRight:!0,noCaret:!0},t.createElement(Be.MenuItem,{onSelect:cr,disabled:!Z,icon:"edit"},"Edit metadata"),t.createElement(Lm.A,{permissions:"dashboards:create"},t.createElement(Be.MenuItem,{onSelect:Zs,icon:"dashboard"},"Export to dashboard")),t.createElement(Be.MenuItem,{onSelect:Uo,icon:"download"},"Export"),t.createElement(Be.MenuItem,{disabled:so,onSelect:H,icon:"restart_alt"},"Reset search"),ur.length?t.createElement(t.Fragment,null,t.createElement(Be.MenuItem,{divider:!0}),ur):null),st&&t.createElement(Ai,{view:D,closeModal:Uo}),Vt&&t.createElement(Vl.A,{show:!0,view:D,title:"Editing saved search",submitButtonText:"Update search",onClose:cr,onSave:sn}),Tn&&t.createElement(zl.A,{entityId:D.id,entityType:"search",entityTitle:D.title,description:"Search for a User or Team to add as collaborator on this saved search.",onClose:Ka}),Fu)},NE=(0,He.Mz)(Qe.fm,v=>Ze.OrderedMap(v.map(b=>[b.id,b]))),wE=()=>(0,je.A)(NE),Ql=()=>{const v=wE();return(0,t.useMemo)(()=>v.map(b=>b.filter).toMap(),[v])},WE=c.default.div` display: flex; gap: ${Ss.uE}; flex: 1.5; `,Uu={onSubmit:async(v,b,D,L)=>{const{timerange:N,streams:w,queryString:H}=b,ee=(await xs(v,b,D,L)).toBuilder().timerange(N).filter((0,Qs.j$)(w)).query((0,Qs.P$)(H)).build();return L.equals(ee)?v((0,ms.g7)()):v((0,On.oR)(ee.id,ee))}},Nu=(0,Kr.A)(_r.A,350),nv=({currentQuery:v,queryFilters:b})=>{const{id:D,query:L,timerange:N}=v!=null?v:{},{query_string:w}=L!=null?L:{},H=yl(v),Z=(0,Qs.RD)(b.get(D,Ze.Map())).toJS();return{timerange:N,streams:Z,queryString:w,...H}},Gm=(v,b,D,L)=>{const N={timeRange:v==null?void 0:v.timerange,streams:v==null?void 0:v.streams,queryString:v==null?void 0:v.queryString,...Al(v,L,b)};return Nu(N,D)},Qi=({onSubmit:v=Uu.onSubmit})=>{var b;const D=(0,t.useRef)(null),L=(0,Nt.A)(),N=(0,d.P)(yr.h,({streams:on})=>on.map(Sn=>({key:Sn.title,value:Sn.id}))),{searchesClusterConfig:w}=(0,d.P)(Xa.o),{userTimezone:H}=(0,bs.A)(),{parameters:Z}=Ar(),ee=(0,sr.A)(),Ce=Ql(),Me=(0,wn.A)("views.components.searchBar"),Ne=nv({queryFilters:Ce,currentQuery:ee}),ot=(0,gn.A)(),st=(0,t.useCallback)(on=>v(ot,on,Me,ee),[ee,ot,v,Me]),pt=Za(),Vt=Bi();if(!ee||!w)return t.createElement(V.y$,null);const{query:kt}=ee,Tn=(b=vr().duration(w.query_time_range_limit).asSeconds())!=null?b:0;return t.createElement(cs.A.Consumer,null,({focusedWidget:{editing:on}={editing:!1}})=>t.createElement(_m,{value:kt.query_string},t.createElement(Ja.A,null,t.createElement(tt,{initialValues:Ne,limitDuration:Tn,onSubmit:st,validateQueryString:Sn=>Gm(Sn,Me,H,pt)},({dirty:Sn,errors:Nn,isSubmitting:sn,isValid:ho,isValidating:so,handleSubmit:uo,values:mo,setFieldValue:Go,validateForm:Bo})=>{const qo=sn||so||!ho||Vt;return t.createElement(t.Fragment,null,t.createElement($r,{parameters:Z}),t.createElement(Ss.L$,null,t.createElement(Ss.d7,null,t.createElement(da.A,{limitDuration:Tn,onChange:Hn=>Go("timerange",Hn),value:mo==null?void 0:mo.timerange,hasErrorOnMount:!!Nn.timerange}),t.createElement(WE,null,t.createElement(gt.Field,{name:"streams"},({field:{name:Hn,value:Xo,onChange:os}})=>t.createElement(Vr,{value:Xo,streams:N,onChange:Uo=>os({target:{value:Uo,name:Hn}})})),t.createElement(ym,null))),t.createElement(Ss.Dp,null,t.createElement(Ss.Io,null,t.createElement(qa.A,{disabled:qo,dirty:Sn,displaySpinner:sn||Vt}),t.createElement(Ss.iV,null,t.createElement(gt.Field,{name:"queryString"},({field:{name:Hn,value:Xo,onChange:os},meta:{error:Uo}})=>t.createElement(xa.A.Consumer,null,({warnings:cr})=>t.createElement(ia,{usage:"search_query"},Ka=>t.createElement(Ua,{value:Xo,ref:D,view:L,timeRange:mo.timerange,streams:mo.streams,name:Hn,onChange:os,placeholder:'Type your search query here and press enter. E.g.: ("not found" AND http) OR http_response_code:[400 TO 404]',error:Uo,isValidating:so,warning:cr.queryString,disableExecution:qo,validate:Bo,onExecute:uo,commands:Ka})))),t.createElement(Fr.Ay,null),t.createElement(ws.A,{editorRef:D}))),!on&&t.createElement(UE,null)),t.createElement(Zo,null)))}))))};Qi.propTypes={onSubmit:l().func},Qi.defaultProps=Uu;const FE=Qi;var Yi=e("brbjQOmY"),KE=e("5CYElDLi");const sv=({children:v})=>{const b=(0,Yi.A)(),{highlightMessage:D}=b!=null?b:{};return D?t.createElement(KE.A.Provider,{value:D.toString()},v):v};var $E=e("cFn5u42x");const GE="",jE={type:"relative",from:300},jm=({children:v})=>{const b=(0,sr.A)(),D=(0,t.useMemo)(()=>(0,Qs.RD)(b==null?void 0:b.filter).toArray(),[b==null?void 0:b.filter]),{data:L,refetch:N}=(0,Mi.A)(D,(b==null?void 0:b.timerange)||jE),{data:w,refetch:H}=(0,Mi.A)([],(b==null?void 0:b.timerange)||jE),Z=(0,t.useMemo)(()=>Ze.Map({[(b==null?void 0:b.id)||GE]:Ze.List(L)}),[L,b==null?void 0:b.id]),ee=(0,t.useMemo)(()=>Ze.List(w!=null?w:[]),[w]),Ce=(0,t.useMemo)(()=>({all:ee,queryFields:Z}),[ee,Z]);return(0,$E.A)(()=>{N(),H()}),t.createElement(vn.A.Provider,{value:Ce},v)};jm.propTypes={children:l().node.isRequired};const Hm=jm;var av=e("dogTzS57");const HE=()=>(0,je.A)(av.W),Xi=({children:v})=>{const b=HE();return b?t.createElement(Ye.A.Provider,{value:b},v):v};Xi.propTypes={children:l().node.isRequired};const zE=Xi;var VE=e("2NTfO+Rh");const kE=({children:v})=>{const b=(0,je.A)(Qe.sf),D=(0,je.A)(Wt.AU),L=(0,je.A)(Wt.T4),[N,w]=(0,t.useState)(void 0),{mutateAsync:H}=(0,Ma.useMutation)(()=>(0,Ol.Ay)("POST",(0,I.H3)(`views/search/${b.search.id}/explain`),(0,VE.M)(b,L,D)),{onSuccess:Ce=>{w(Ce)}}),Z=(0,t.useMemo)(()=>({getExplainForWidget:(Me,Ne,ot)=>{var st,pt,Vt,kt;const Tn=ot==null?void 0:ot.get(Ne).first();return(kt=(Vt=(pt=(st=N==null?void 0:N.search)==null?void 0:st.queries)==null?void 0:pt[Me])==null?void 0:Vt.search_types)==null?void 0:kt[Tn]},explainedSearch:N}),[N]),ee=(0,_e.A)();return(0,t.useEffect)(()=>{b.search.id&&ee===qe.A.Type.Dashboard&&b._value.title&&H()},[H,b.search.id,D,L,ee,b._value.title]),t.createElement(nu.Provider,{value:Z},v)};var QE=e("lN93Sbbu"),lv=e("CXwqYNRt");const YE={[qe.A.Type.Dashboard]:"dashboardSidebarIsPinned",[qe.A.Type.Search]:"searchSidebarIsPinned"},zm=v=>{const b=v&&YE[v];if(!b)throw new Error(`User sidebar pinning preference key is missing for view type ${v!=null?v:"(type not provided)"}`);return b},XE=(v,b,D)=>{const L=zm(D);return v!=null&&v.readOnly?ps.A.get(L):b[L]},iv=(v,b,D,L)=>{const N=zm(D);if(v!=null&&v.readOnly)ps.A.set(N,L);else{const w={...b,[N]:L};lv.S.saveUserPreferences(v==null?void 0:v.username,w,void 0,!1)}},JE=({children:v})=>{const b=(0,Ki.A)(),D=(0,t.useContext)(QE.A),L=(0,_e.A)(),[N,w]=(0,t.useState)({sidebarIsPinned:XE(b,D,L)}),H=(0,t.useCallback)(Ce=>iv(b,D,L,Ce),[b,D,L]),Z=(0,t.useCallback)((Ce,Me)=>{var Ne;return(Ne=N[Ce])!=null?Ne:Me},[N]),ee=(0,t.useCallback)((Ce,Me)=>{Ce==="sidebarIsPinned"&&H(Me),w({...N,[Ce]:Me})},[H,N]);return v({getPreference:Z,setPreference:ee})},ZE=({getPreference:v,setPreference:b,children:D})=>{const L=(0,t.useMemo)(()=>{const N={sidebar:{isPinned:v("sidebarIsPinned",!1)}};return{config:N,actions:{toggleSidebarPinning:()=>b("sidebarIsPinned",!N.sidebar.isPinned)}}},[v,b]);return t.createElement(A.Provider,{value:L},D)},dv=({children:v})=>t.createElement(JE,null,({getPreference:b,setPreference:D})=>t.createElement(ZE,{getPreference:b,setPreference:D},v));var mv=e("+KM7MH1U"),qE=e.n(mv);const Vm=v=>new(ji())(v).removeSearch("focusing").removeSearch("editing").removeSearch("focusedId"),pv=(v,b)=>{let D=Vm(b);return v&&(v.id&&(v.focusing||v.editing)&&(D=D.setSearch("focusedId",v.id)),v.focusing&&(D=D.setSearch("focusing",String(!0))),v.editing&&(D=D.setSearch("editing",String(!0)))),D.toString()},ef={editing:!1,focusing:!1,id:void 0},gv=({focusedWidget:v,focusUriParams:b,setFocusedWidget:D,widgetIds:L})=>{const N=(0,gn.A)();(0,t.useEffect)(()=>{const w={id:b.id,editing:b.editing,focusing:b.focusing||b.editing};if(!qE()(v!=null?v:ef,w)){if(b.id&&!L.includes(b.id))return;D(w);const H=w!=null&&w.id?[w.id]:void 0;N((0,ms.dY)(H)),N((0,ms.g7)())}},[v,D,L,b,N])},tf=({focusUriParams:v,widgetIds:b,query:D,history:L})=>{(0,t.useEffect)(()=>{if(v!=null&&v.id&&!b.includes(v.id)&&v.isPageShown||(v==null?void 0:v.id)===void 0){const N=Vm(D);L.replace(N.toString())}},[v,b,D,L])},km=({children:v})=>{const{search:b,pathname:D}=(0,M.A)(),L=D+b,N=(0,Pa.A)(),[w,H]=(0,t.useState)(),Z=Zr(),ee=(0,t.useMemo)(()=>Z.map(on=>on.id).toArray(),[Z]),Ce=(0,C.A)(),Me=(0,Yi.A)(),Ne=(0,t.useMemo)(()=>({editing:Me.editing==="true",focusing:Me.focusing==="true",id:Me.focusedId,isPageShown:!Me.page||Me.page===Ce}),[Me.editing,Me.focusing,Me.focusedId,Me.page,Ce]);gv({focusedWidget:w,setFocusedWidget:H,widgetIds:ee,focusUriParams:Ne}),tf({focusUriParams:Ne,widgetIds:ee,query:L,history:N});const ot=(0,t.useCallback)(on=>{const Sn=pv(on,L);N.replace(Sn)},[N,L]),st=(0,t.useCallback)(on=>ot({id:on,editing:!1,focusing:!0}),[ot]),pt=(0,t.useCallback)(()=>ot(void 0),[ot]),Vt=(0,t.useCallback)(on=>{ot({id:on,editing:!0,focusing:Ne.focusing})},[Ne.focusing,ot]),kt=(0,t.useCallback)(()=>ot({id:Ne.focusing&&Ne.id?Ne.id:void 0,editing:!1,focusing:Ne.focusing}),[Ne.focusing,Ne.id,ot]),Tn=(0,t.useMemo)(()=>({focusedWidget:w,setWidgetFocusing:st,setWidgetEditing:Vt,unsetWidgetEditing:kt,unsetWidgetFocusing:pt}),[w,st,Vt,kt,pt]);return t.createElement(cs.A.Provider,{value:Tn},v)};km.propTypes={children:l().node.isRequired};const Ev=km;var nf=e("HCsT5Gmk");const fv=v=>{const{type:b}=v,D={rangetype:b},L=N=>Object.entries(N);switch(v.type){case"relative":return(0,As.r1)(v)?L({...D,relative:v.range}):(0,As._b)(v)?"to"in v?L({...D,from:v.from,to:v.to}):L({...D,from:v.from}):L(D);case"keyword":return L({...D,keyword:v.keyword});case"absolute":return L({...D,from:v.from,to:v.to});default:return Object.entries(D)}},Qm=(v,b,D,L)=>{if(v===qe.A.Type.Search&&D){const{query:{query_string:N},timerange:w,filter:H=Ze.Map()}=D,Z=new(ji())(b).setSearch("q",N).removeQuery("from").removeQuery("to").removeQuery("keyword").removeQuery("relative"),ee=fv(w).reduce((Ne,[ot,st])=>Ne.setSearch(ot,String(st)),Z),Ce=(0,Qs.RD)(H),Me=Ce.isEmpty()?ee.removeSearch("streams").toString():ee.setSearch("streams",Ce.join(",")).toString();b!==Me&&L(Me)}},of=v=>{const b=(0,_e.A)(),D=(0,sr.A)(),L=(0,Pa.A)();(0,t.useEffect)(()=>Qm(b,v,D,L.replace),[]),(0,t.useEffect)(()=>Qm(b,v,D,L.push),[D,L.push,v,b])};var hv=e("2eB4xxdN");const sf=v=>(b,D)=>{const L=(0,Qe.sf)(D()),N=(0,Wt.AU)(D());(0,hv.A)({view:L,query:v,retry:()=>Promise.resolve(),executionState:N})},vv=v=>{const b=(0,gn.A)();(0,t.useEffect)(()=>{b(sf(v))},[v])},af=({location:v})=>{const{pathname:b,search:D}=v,L=`${b}${D}`;return vv(v.query),of(L),null},Ym=(0,nf.A)(af);var rf=e("Tqc935YZ");const lf=()=>{const v=(0,wn.A)("useExternalActions"),b=(0,t.useMemo)(()=>v&&typeof v[0]=="function"?v[0]:()=>rf.e,[v]),{isLoading:D,externalValueActions:L,isError:N}=b();return(0,t.useMemo)(()=>({isLoading:D,isError:N,externalValueActions:L}),[L,N,D])},Xm=({children:v})=>{const b=lf();return t.createElement(rf.A.Provider,{value:b},v)};Xm.propTypes={children:l().node.isRequired};const cf=Xm,Yl=c.default.div(({$interactive:v})=>v?(0,c.css)` display: flex; overflow: auto; height: 100%; > *:nth-child(2) { flex-grow: 1; } `:(0,c.css)` flex: 1; `),uf=(0,c.default)(g.A)(()=>{const{focusedWidget:v}=(0,t.useContext)(cs.A);return(0,c.css)` ${(v==null?void 0:v.id)&&(0,c.css)` .page-content-grid { display: flex; flex-direction: column; height: 100%; width: 100%; /* overflow auto is required to display the message table widget height correctly */ overflow: ${v!=null&&v.id?"auto":"visible"}; } `} `}),Jm=v=>{const b=(0,je.A)(Qe.or);return t.createElement(ts,{results:b,...v})},Zm=({children:v})=>{var b;const D=(0,Nt.A)(),{searchesClusterConfig:L}=(b=(0,d.P)(Xa.o))!=null?b:{},{parameters:N,parameterBindings:w}=Ar(),H=(0,Ki.A)(),Z=(0,t.useMemo)(()=>({view:D,analysisDisabledFields:L==null?void 0:L.analysis_disabled_fields,currentUser:H,parameters:N,parameterBindings:w}),[H,w,N,L==null?void 0:L.analysis_disabled_fields,D]);return t.createElement(Po.V.Provider,{value:Z},v)};Zm.displayName="ViewAdditionalContextProvider";const Av=()=>{const v=(0,gn.A)(),b=(0,t.useCallback)(()=>v((0,ms.g7)()),[v]),{sidebar:{isShown:D},searchAreaContainer:L,infoBar:N}=ir(),w=N==null?void 0:N.component,H=L==null?void 0:L.component;return(0,t.useEffect)(()=>{b()},[b]),(0,t.useEffect)(()=>{Xa.K.refresh(),yr.t.refresh()},[]),t.createElement(t.Fragment,null,t.createElement(Ym,null),t.createElement(cf,null,t.createElement(kE,null,t.createElement(Ev,null,t.createElement(cs.A.Consumer,null,({focusedWidget:{focusing:Z,editing:ee}={focusing:!1,editing:!1}})=>t.createElement(t.Fragment,null,t.createElement(tl.A,null,t.createElement(_o,null,t.createElement(vt,null))),t.createElement(Rs.A.Consumer,null,Ce=>t.createElement(dv,null,t.createElement(Hm,null,t.createElement(Zm,null,t.createElement(zE,null,t.createElement(Yl,{id:"main-row",$interactive:Ce},t.createElement(tl.A,null,D&&t.createElement(Jm,null,t.createElement(bu,null))),t.createElement(uf,{as:H},t.createElement(tl.A,null,t.createElement(lg,null),w&&t.createElement(w,null),t.createElement(_o,null,!ee&&t.createElement(uE,null)),t.createElement(Gs.A,null,t.createElement(FE,null)),t.createElement(ar,null),t.createElement(_o,null,!Z&&t.createElement(Dg,null))),t.createElement(sv,null,t.createElement(mu,null)))))))))))))))};var df=e("gvNRgdyu"),qm=e("/W/x1zfW");const Cv=()=>t.createElement(V.Qc,{title:"No stream permissions."},t.createElement(g.A,null,t.createElement(qm.A,{title:"No stream permissions."}),t.createElement(Be.Row,{className:"content"},t.createElement(Be.Col,{md:12},t.createElement(Be.Alert,{bsStyle:"warning"},"We cannot start a search right now, because you are not allowed to access any stream. If you feel this is an error, please contact your administrator."))))),mf=({children:v})=>{const b=(0,t.useContext)(df.A);return b&&b.length>0?v:t.createElement(Cv,null)};var Tv=e("yAXMqwrl");const ep=v=>new(ji())(v).removeSearch("page"),bv=(v,b)=>{const D=ep(b);return v?D.setSearch("page",v).toString():D.toString()},pf=({dashboardPage:v,uriParams:b,setDashboardPage:D})=>{const L=(0,je.A)(Qe.qP),N=(0,gn.A)();(0,t.useEffect)(()=>{const w=b.page;L!=null&&L.has(w)?w!==v&&(D(w),N((0,On.Z1)(w))):D(void 0)},[b.page,v,D,L,N])},Sv=({uriParams:v,query:b,navigate:D})=>{(0,t.useEffect)(()=>{if((v==null?void 0:v.page)===void 0){const L=ep(b);D(L.toString(),{replace:!0})}},[b,D,v==null?void 0:v.page])},Dv=({children:v})=>{const{search:b,pathname:D}=(0,M.A)(),L=D+b,N=(0,Tv.useNavigate)(),[w,H]=(0,t.useState)(),Z=(0,Yi.A)(),ee=(0,t.useMemo)(()=>({page:Z.page}),[Z]);pf({dashboardPage:w,uriParams:ee,setDashboardPage:H}),Sv({uriParams:ee,query:L,navigate:N});const Ce=(0,t.useMemo)(()=>{const Me=st=>{const pt=bv(st,L);N(pt,{replace:!0})};return{setDashboardPage:st=>Me(st),unsetDashboardPage:()=>Me(void 0),dashboardPage:w}},[w,N,L]);return t.createElement(eo.Provider,{value:Ce},v)};var gf=e("m5sCWlWB");const tp=v=>((!v||!(v instanceof Array)||v.length<2)&&console.error("Return value supplied by processing hook is not array with two elements. It is: ",JSON.stringify(v,null,2)),v),Ef=(v,b)=>v.reduce((D,L)=>D.then(tp).then(([N,w])=>L({...b,view:N,executionState:w})),Promise.resolve([b.view,b.executionState])),wu=(v,b,D,L,N)=>{let w;return v.length>0?w=Ef(v,{view:b,retry:Z=>{var ee,Ce;const Me=(ee=Z.view)!=null?ee:b,Ne=(Ce=Z.executionState)!=null?Ce:L;return wu(v,Me,D,Ne,N)},query:D,executionState:L}):w=Promise.resolve([b,L]),w.then(tp).then(async([H,Z])=>(await N(H,Z),[H,Z]))},hf=(v,b,D=[],L=[],N={},w=()=>{})=>v.then(H=>wu(D,H,N,b,w)).then(([H,Z])=>wu(L,H,N,Z,w)),np=({error:v})=>((0,t.useEffect)(()=>{console.log(v)},[v]),t.createElement(gf.A,{title:"Something went wrong",description:t.createElement("p",null,"An unknown error has occurred. Please have a look at the following message and the graylog server log for more information.")},t.createElement("pre",null,v==null?void 0:v.message))),Rv=(v,b,D)=>{const L=(0,wn.A)("views.hooks.loadingView"),N=(0,wn.A)("views.hooks.executingView"),[w,H]=(0,t.useState)({status:"loading"});return(0,t.useEffect)(()=>{hf(v,b,L,N,D,(Z,ee)=>{H({status:"loaded",view:Z,executionState:ee})}).catch(Z=>{Z instanceof Error&&console.error(Z);const ee=Z instanceof Error?t.createElement(np,{error:Z}):Z;H({status:"interrupted",component:ee})})},[N,L,v]),w};var vf=e("CXRfb/v3"),yf=e("oMyijaIY"),Af=e("d3qTYP78");const op=({children:v})=>{const b=(0,gn.A)(),D=(0,t.useCallback)(()=>b((0,ms.g7)()),[b]),[L,N]=(0,t.useState)(null),w=(0,t.useCallback)(ee=>N({enabled:!0,interval:ee}),[]),H=(0,t.useCallback)(()=>N(ee=>({...ee,enabled:!1})),[]),Z=(0,t.useMemo)(()=>({refreshConfig:L,startAutoRefresh:w,stopAutoRefresh:H}),[L,w,H]);return(0,t.useEffect)(()=>{const ee=L!=null&&L.enabled?setInterval(()=>D(),L.interval):null;return()=>clearInterval(ee)},[D,L==null?void 0:L.enabled,L==null?void 0:L.interval]),t.createElement(Af.A.Provider,{value:Z},v)},_f=({children:v})=>{const b=(0,me.A)();return t.createElement(V.Qc,{title:b},v)},sp=({children:v,isNew:b,view:D,loadNewView:L=Xs.GC,loadView:N=Xs.QJ,executionState:w,searchResult:H})=>{const Z=(0,Yi.A)(),ee=Z==null?void 0:Z.page,Ce=(0,Pa.A)(),Me=(0,t.useCallback)(()=>L(Ce),[L,Ce]),Ne=(0,t.useCallback)(Vt=>N(Ce,Vt),[N,Ce]),ot=Rv(D,w,Z);if(ot.status==="loading")return t.createElement(V.y$,null);if(ot.status==="interrupted")return ot.component;const{view:st,executionState:pt}=ot;return st?t.createElement(vf.A,{view:st,executionState:pt,isNew:b,initialQuery:ee,result:H},t.createElement(_f,null,t.createElement(Dv,null,t.createElement(n.Provider,{value:Me},t.createElement(s.Provider,{value:Ne},t.createElement(op,null,v,t.createElement(mf,null,t.createElement(Av,null)))))))):t.createElement(V.y$,null)};sp.defaultProps={loadNewView:Xs.GC,loadView:Xs.QJ,executionState:yf.Ay.empty(),searchResult:void 0};const Cf=t.memo(sp)},r4MY1c4i:(x,y,e)=>{"use strict";e.r(y),e.d(y,{default:()=>h});var t=e("Z7aTuO5B"),r=e("6dLKCZdN"),s=e("62FDaRYn"),o=e("iSSis/Yq"),n=e("/coHI+Jz"),c=e("Y/YOqMWf"),g=e("UmnljV2q");function d(A){const C=g.A.fromJSON(A);return(0,c.A)(A.search_id).then(_=>n.A.fromJSON(_)).then(_=>C.toBuilder().search(_).build())}var f=e("9tc+dS6Z");const E=A=>{const C=(0,t.useMemo)(()=>o.u.get(A),[A]);return(0,t.useMemo)(()=>C.then(_=>d(_),_=>{throw _.status===404&&s.A.report((0,f.fE)(_)),_}),[C])};var l=e("MDn/VShH");const h=({children:A})=>{const{viewId:C}=(0,r.A)();if(!C)throw new Error("No view id specified!");const _=E(C);return t.createElement(l.A,{view:_,isNew:!1},A)}},PYFLluwn:(x,y,e)=>{"use strict";e.d(y,{K:()=>n,o:()=>c});var t=e("JnTtTRmZ"),r=e.n(t),s=e("IA3Ku5lS"),o=e("ibdPvtmL");const n=(0,s.rN)("views.SearchConfig",()=>r().createActions({refresh:{asyncResult:!0}})),c=(0,s.Bv)("views.SearchConfig",()=>r().createStore({listenables:[n],init(){this.refresh()},getInitialState(){return this._state()},refresh(){o.t.listSearchesClusterConfig().then(g=>{this.searchesClusterConfig=g,this._trigger()})},_state(){return{searchesClusterConfig:this.searchesClusterConfig}},_trigger(){this.trigger(this._state())}}))},Cd4wX32x:(x,y,e)=>{"use strict";e.d(y,{h:()=>g,t:()=>c});var t=e("JnTtTRmZ"),r=e.n(t),s=e("IA3Ku5lS"),o=e("pUKP3+Pg"),n=e("pc+thvZE");const c=(0,s.rN)("views.Streams",()=>r().createActions(["refresh"])),g=(0,s.Bv)("views.Streams",()=>r().createStore({listenables:[c],streams:[],init(){this.refresh(),n.SessionActions.logout.completed.listen(()=>this.clear())},getInitialState(){return this._state()},refresh(){o.Ay.listStreams().then(d=>{this.streams=d,this._trigger()})},clear(){this.streams=[],this._trigger()},_state(){return{streams:this.streams}},_trigger(){this.trigger(this._state())}}))},i0LZga0C:(x,y,e)=>{"use strict";e.d(y,{A:()=>r});const r={Tab:"tab",Widget:"widget"}},"iSSis/Yq":(x,y,e)=>{"use strict";e.d(y,{u:()=>d});var t=e("JnTtTRmZ"),r=e.n(t),s=e("eFxcQyPT"),o=e("jAGDuYSC"),n=e("MdYBRjRJ"),c=e("IA3Ku5lS"),g=e("J1ga+jW6");const d=(0,c.rN)("views.ViewManagement",()=>r().createActions({create:{asyncResult:!0},delete:{asyncResult:!0},forValue:{asyncResult:!0},get:{asyncResult:!0},search:{asyncResult:!0},update:{asyncResult:!0}})),f=(0,n.H3)("/views"),p=m=>(0,n.H3)(`/views/${m}`),E=()=>(0,n.H3)("/views/forValue"),l=(0,c.Bv)("views.ViewManagement",()=>r().createStore({listenables:[d],views:void 0,pagination:{total:0,count:0,page:1,perPage:10},getInitialState(){return{pagination:this.pagination,list:this.views}},get(m){const h=(0,s.Ay)("GET",`${f}/${m}`);return d.get.promise(h),h},create(m){const h=(0,s.Ay)("POST",f,JSON.stringify(m));return d.create.promise(h),h},createCompleted(){return g.y.reload()},update(m){const h=(0,s.Ay)("PUT",p(m.id),JSON.stringify(m));return d.update.promise(h),h},search(m,h=1,A=10,C="title",_="asc"){const P=(0,s.Ay)("GET",`${f}?query=${m}&page=${h}&per_page=${A}&sort=${C}&order=${_}`).then(I=>(this.views=I.views,this.pagination={total:I.total,count:I.count,page:I.page,perPage:I.per_page},this.trigger({list:this.views,pagination:this.pagination}),I)).catch(I=>{o.A.error(`Fetching views failed with status: ${I}`,"Could not retrieve views")});d.search.promise(P)},delete(m){const h=(0,s.Ay)("DELETE",p(m.id)).catch(A=>{o.A.error(`Deleting view ${m.title} failed with status: ${A}`,"Could not delete view")});d.delete.promise(h)},forValue(){const m=(0,s.Ay)("POST",E()).catch(h=>o.A.error(`Finding matching views for value failed with status: ${h}`,"Could not find matching views"));d.forValue.promise(m)}}))},zAtQmw72:(x,y,e)=>{"use strict";e.d(y,{A:()=>E});var t=e("1twFHSbl"),r=e.n(t),s=e("87D/Fijl"),o=e.n(s);const n=(l,m)=>l&&l[m]&&o()(l[m]),c=l=>n(l,"equals"),g=l=>n(l,"equalsForSearch"),d=l=>n(l,"toJS"),f=(l,m)=>{if(g(l))return l.equalsForSearch(m);if(d(l)&&d(m))return r()(l.toJS(),m.toJS(),f);if(c(l))return l.equals(m)},E=(l,m)=>r()(l,m,f)},PwTFiGSp:(x,y,e)=>{"use strict";e.d(y,{Df:()=>f,EZ:()=>d,FW:()=>o,_b:()=>c,r1:()=>n,u4:()=>g,wb:()=>s});var t=e("+KM7MH1U"),r=e.n(t);const s=p=>"type"in p&&p.type==="absolute",o=p=>"type"in p&&p.type==="relative",n=p=>o(p)&&"range"in p,c=p=>o(p)&&"from"in p,g=p=>"type"in p&&p.type==="keyword",d=p=>p!==void 0&&r()(p,{}),f=p=>p&&"type"in p},"xAuw/bbM":(x,y,e)=>{"use strict";e.d(y,{mr:()=>t,ContentStream:()=>r,aq:()=>s,Nh:()=>o,ZD:()=>n,Cf:()=>c,Ee:()=>g,$1:()=>d,Qo:()=>f,AO:()=>p,YT:()=>E});var t={};e.r(t),e.d(t,{byNamespace:()=>rn,metricNames:()=>Ft,multipleMetrics:()=>an});var r={};e.r(r),e.d(r,{getContentStreamTags:()=>Vn,getContentStreamUserSettings:()=>wn,setContentStreamUserSettings:()=>Zn});var s={};e.r(s),e.d(s,{create:()=>re,list:()=>Ts,order:()=>we,single:()=>wt,terminate:()=>et,update:()=>Et});var o={};e.r(o),e.d(o,{getTrafficPerMinute:()=>ta,resetState:()=>na,serialize:()=>cs,status:()=>Rs,trigger:()=>Ea});var n={};e.r(n),e.d(n,{queryStringUsed:()=>va});var c={};e.r(c),e.d(c,{suggestFieldValue:()=>Qa,suggestQueryStrings:()=>Wr});var g={};e.r(g),e.d(g,{assignToIndexSet:()=>Qr,bulkDelete:()=>ya,bulkPause:()=>Vr,bulkResume:()=>qa,cloneStream:()=>Tl,create:()=>zr,get:()=>da,getBystreamId:()=>_l,getEnabled:()=>kr,getPage:()=>Ua,pause:()=>bl,remove:()=>Cl,resume:()=>Sr,testMatch:()=>Pr,update:()=>Yr});var d={};e.r(d),e.d(d,{changeFieldType:()=>Dc,getAllFieldTypes:()=>Ic,removeCustomMapping:()=>cd,removeProfileFromIndexSets:()=>Oc,setProfile:()=>Rc});var f={};e.r(f),e.d(f,{list:()=>fi,rebuild:()=>Uc,rebuildIndex:()=>Nc,rebuildIndexSet:()=>Rl,show:()=>hi});var p={};e.r(p),e.d(p,{fieldTypeSummaries:()=>Ml,indexSetFieldTypesList:()=>xl,indexSetFieldTypesListByindex_set_idAndfieldNameQueryAndfiltersAndsortAndorder:()=>Kc});var E={};e.r(E),e.d(E,{get:()=>Fl,getTelemetryUserSettings:()=>uu,saveTelemetryUserSettings:()=>Zd});var l=e("pjsNBHWI"),m=e.n(l),h=e("eFxcQyPT"),A=e("MdYBRjRJ");const _=(S,J,vt,en,pn)=>{const eo=Object.entries(en).length>0?`${J}?${m().stringify(en)}`:J,ss=new h.M$(S,A.H3(eo)).json(vt);return Object.entries(pn).reduce((Gl,[pu,cm])=>Gl.setHeader(pu,cm),ss).build()};function P(){return __request__("GET","/aws/available_services",null,{},{Accept:["application/json"]})}function I(S){return __request__("POST","/aws/cloudwatch/log_groups",S,{},{Accept:["application/json"]})}function M(S){return __request__("POST","/aws/inputs",S,{},{Accept:["application/json"]})}function O(S){return __request__("POST","/aws/kinesis/health_check",S,{},{Accept:["application/json"]})}function U(S){return __request__("POST","/aws/kinesis/streams",S,{},{Accept:["application/json"]})}function W(){return __request__("GET","/aws/permissions",null,{},{Accept:["application/json"]})}function K(){return __request__("GET","/aws/regions",null,{},{Accept:["application/json"]})}function j(){return __request__("PUT","/config",null,{},{Accept:["application/json"]})}function G(S){return __request__("POST","/aws/kinesis/auto_setup/create_stream",S,{},{Accept:["application/json"]})}function k(S){return __request__("POST","/aws/kinesis/auto_setup/create_subscription",S,{},{Accept:["application/json"]})}function Q(S){return __request__("POST","/aws/kinesis/auto_setup/create_subscription_policy",S,{},{Accept:["application/json"]})}function ne(){return __request__("GET","/authz/grants-overview",null,{},{Accept:["application/json"]})}function z(S="name",J=1,vt=50,en,pn="asc"){return __request__("GET","/authz/roles",null,{page:J,per_page:vt,query:en,sort:S,order:pn},{Accept:["application/json"]})}function le(S="name",J,vt=1,en=50,pn,eo="asc"){return __request__("GET",`/authz/roles/user/${J}`,null,{page:vt,per_page:en,query:pn,sort:S,order:eo},{Accept:["application/json"]})}function V(S){return __request__("GET",`/authz/roles/${S}`,null,{},{Accept:["application/json"]})}function me(S){return __request__("DELETE",`/authz/roles/${S}`,null,{},{Accept:["application/json"]})}function Pe(S,J){return __request__("DELETE",`/authz/roles/${S}/assignee/${J}`,null,{},{Accept:["application/json"]})}function Ve(S="name",J,vt=1,en=50,pn,eo="asc"){return __request__("GET",`/authz/roles/${J}/assignees`,null,{page:vt,per_page:en,query:pn,sort:S,order:eo},{Accept:["application/json"]})}function at(S,J){return __request__("PUT",`/authz/roles/${S}/assignees`,J,{},{Accept:["application/json"]})}function ze(S,J){return __request__("POST",`/authz/shares/entities/${S}`,J,{},{Accept:["application/json"]})}function he(S,J){return __request__("POST",`/authz/shares/entities/${S}/prepare`,J,{},{Accept:["application/json"]})}function Ie(S,J,vt,en){return __request__("GET",`/authz/shares/user/${S}`,J,{capability:vt,entity_type:en},{Accept:["application/json"]})}function Re(){return __request__("GET","/ca",null,{},{Accept:["application/json"]})}function ce(S){return __request__("POST","/ca/clientcert",S,{},{Accept:["application/json"]})}function Ee(S,J){return __request__("DELETE",`/ca/clientcert/${S}/${J}`,null,{},{Accept:["application/json"]})}function oe(S){return __request__("POST","/ca/create",S,{},{Accept:["application/json"]})}function ae(S,J){const vt=new FormData;return vt.append("password",S),J.forEach(en=>vt.append("files",en)),__request__("POST","/ca/upload",vt,{},{Accept:["application/json"]})}function ye(){return __request__("GET","/cluster",null,{},{Accept:["application/json"]})}function Oe(){return __request__("GET","/cluster/processbufferdump",null,{},{Accept:["application/json"]})}function ve(S){return __request__("GET",`/cluster/${S}/jvm`,null,{},{Accept:["application/json"]})}function _e(S){return __request__("GET",`/cluster/${S}/processbufferdump`,null,{},{Accept:["application/json"]})}function He(S){return __request__("GET",`/cluster/${S}/threaddump`,null,{},{Accept:["application/json"]})}function je(){return __request__("POST","/cluster/debug/support/bundle/build",null,{},{Accept:["application/json"]})}function Qe(S){return __request__("GET",`/cluster/debug/support/bundle/download/${S}`,null,{},{Accept:["application/octet-stream"]})}function zt(){return __request__("GET","/cluster/debug/support/bundle/list",null,{},{Accept:["application/json"]})}function xe(S){return __request__("DELETE",`/cluster/debug/support/bundle/${S}`,null,{},{Accept:["application/json"]})}function Ue(){return __request__("GET","/cluster/debug/support/manifest",null,{},{Accept:["application/json"]})}function ke(){return __request__("POST","/cluster/deflector/cycle",null,{},{Accept:["application/json"]})}function Se(S){return __request__("POST",`/cluster/deflector/${S}/cycle`,null,{},{Accept:["application/json"]})}function Je(){return __request__("GET","/cluster/inputstates",null,{},{Accept:["application/json"]})}function nt(S){return __request__("PUT",`/cluster/inputstates/${S}`,null,{},{Accept:["application/json"]})}function Wt(S){return __request__("DELETE",`/cluster/inputstates/${S}`,null,{},{Accept:["application/json"]})}function Le(){return __request__("GET","/cluster/jobs",null,{},{Accept:["application/json"]})}function Fe(S){return __request__("GET",`/cluster/jobs/${S}`,null,{},{Accept:["application/json"]})}function qe(S){return __request__("DELETE",`/cluster/jobs/${S}`,null,{},{Accept:["application/json"]})}function ut(S){return __request__("GET",`/cluster/${S}/journal`,null,{},{Accept:["application/json"]})}function ft(S,J){return __request__("PUT",`/cluster/${S}/lbstatus/override/${J}`,null,{},{Accept:["application/json"]})}function Ot(S,J){return __request__("POST",`/cluster/system/lookup/tables/${S}/purge`,null,{key:J},{Accept:["application/json"]})}function Lt(S){return __request__("POST","/cluster/metrics/multiple",S,{},{Accept:["application/json"]})}function an(S,J){return _("POST",`/cluster/${S}/metrics/multiple`,J,{},{Accept:["application/json"]})}function Ft(S){return _("GET",`/cluster/${S}/metrics/names`,null,{},{Accept:["application/json"]})}function rn(S,J){return _("GET",`/cluster/${S}/metrics/namespace/${J}`,null,{},{Accept:["application/json"]})}function $t(S){return __request__("GET",`/cluster/${S}/plugins`,null,{},{Accept:["application/json"]})}function be(S){return __request__("POST",`/cluster/${S}/processing/pause`,null,{},{Accept:["application/json"]})}function yn(S){return __request__("POST",`/cluster/${S}/processing/resume`,null,{},{Accept:["application/json"]})}function Kt(){return __request__("GET","/cluster/processing/status",null,{},{Accept:["application/json"]})}function An(){return __request__("GET","/cluster/processing/status/persisted",null,{},{Accept:["application/json"]})}function qt(){return __request__("GET","/cluster/system/loggers",null,{},{Accept:["application/json"]})}function io(S,J=1e3){return __request__("GET",`/cluster/system/loggers/messages/recent/${S}`,null,{limit:J},{Accept:["text/plain"]})}function Be(){return __request__("GET","/cluster/system/loggers/subsystems",null,{},{Accept:["application/json"]})}function bn(S,J){return __request__("PUT",`/cluster/system/loggers/${S}/level/${J}`,null,{},{Accept:["application/json"]})}function gn(S,J,vt){return __request__("PUT",`/cluster/system/loggers/${S}/subsystems/${J}/level/${vt}`,null,{},{Accept:[]})}function wn(S){return _("GET",`/contentstream/settings/${S}`,null,{},{Accept:["application/json"]})}function Zn(S,J){return _("PUT",`/contentstream/settings/${J}`,S,{},{Accept:["application/json"]})}function Vn(){return _("GET","/contentstream/tags",null,{},{Accept:["application/json"]})}function po(S="title",J=1,vt=50,en="asc",pn,eo){return __request__("GET","/dashboards",null,{page:J,per_page:vt,sort:S,order:en,query:pn,filters:eo},{Accept:["application/json"]})}function De(S,J){return __request__("GET",`/datanodes/${J}/opensearch/${S}`,null,{},{Accept:["application/json"]})}function ln(S,J){return __request__("POST",`/datanodes/${J}/opensearch/${S}`,null,{},{Accept:["application/json"]})}function bt(S,J){return __request__("PUT",`/datanodes/${J}/opensearch/${S}`,null,{},{Accept:["application/json"]})}function It(S,J){return __request__("DELETE",`/datanodes/${J}/opensearch/${S}`,null,{},{Accept:["application/json"]})}function En(S,J){return __request__("GET",`/datanodes/${J}/rest/${S}`,null,{},{Accept:["application/json"]})}function Xt(S,J){return __request__("POST",`/datanodes/${J}/rest/${S}`,null,{},{Accept:["application/json"]})}function Ye(S,J){return __request__("PUT",`/datanodes/${J}/rest/${S}`,null,{},{Accept:["application/json"]})}function At(S,J){return __request__("DELETE",`/datanodes/${J}/rest/${S}`,null,{},{Accept:["application/json"]})}function Ct(S){return __request__("POST","/datanode/bulk_remove",S,{},{Accept:["application/json"]})}function Bt(S){return __request__("POST","/datanode/bulk_start",S,{},{Accept:["application/json"]})}function Ze(S){return __request__("POST","/datanode/bulk_stop",S,{},{Accept:["application/json"]})}function gt(){return __request__("GET","/datanode/configured",null,{},{Accept:["application/json"]})}function cn(S){return __request__("GET",`/datanode/${S}`,null,{},{Accept:["application/json"]})}function un(S){return __request__("DELETE",`/datanode/${S}`,null,{},{Accept:["application/json"]})}function _n(S){return __request__("POST",`/datanode/${S}/reset`,null,{},{Accept:["application/json"]})}function vn(S){return __request__("POST",`/datanode/${S}/start`,null,{},{Accept:["application/json"]})}function Ln(S){return __request__("POST",`/datanode/${S}/stop`,null,{},{Accept:["application/json"]})}function Xn(){return __request__("GET","/api-docs",null,{},{Accept:["application/json"]})}function no(){return __request__("GET","/api-docs/global",null,{},{Accept:["application/json"]})}function Wo(S){return __request__("GET",`/api-docs/${S}`,null,{},{Accept:["application/json"]})}function Co(){return __request__("GET","/enterprise/license/info",null,{},{Accept:["application/json"]})}function Fo(S){return __request__("GET",`/entitylists/preferences/${S}`,null,{},{Accept:["application/json"]})}function rt(S,J){return __request__("POST",`/entitylists/preferences/${J}`,S,{},{Accept:[]})}function Mt(){return __request__("GET","/entity_scopes",null,{},{Accept:["application/json"]})}function Rt(S,J="title",vt=1,en=10,pn){return __request__("GET","/entity_suggestions",null,{collection:S,column:J,page:vt,per_page:en,query:pn},{Accept:["application/json"]})}function fn(S){return __request__("POST","/events/search",S,{},{Accept:["application/json"]})}function Dn(S){return __request__("GET",`/events/${S}`,null,{},{Accept:["application/json"]})}function kn(S=1,J=50,vt){return __request__("GET","/events/definitions",null,{page:S,per_page:J,query:vt},{Accept:["application/json"]})}function ro(S=!0,J){return __request__("POST","/events/definitions",J,{schedule:S},{Accept:["application/json"]})}function Gn(S){return __request__("POST","/events/definitions/bulk_delete",S,{},{Accept:["application/json"]})}function vo(S){return __request__("POST","/events/definitions/bulk_schedule",S,{},{Accept:["application/json"]})}function yo(S){return __request__("POST","/events/definitions/bulk_unschedule",S,{},{Accept:["application/json"]})}function lo(S="title",J=1,vt=50,en,pn="asc"){return __request__("GET","/events/definitions/paginated",null,{page:J,per_page:vt,query:en,sort:S,order:pn},{Accept:["application/json"]})}function Jn(S){return __request__("POST","/events/definitions/validate",S,{},{Accept:["application/json"]})}function Yn(S){return __request__("GET",`/events/definitions/${S}`,null,{},{Accept:["application/json"]})}function Gt(S,J=!0,vt){return __request__("PUT",`/events/definitions/${S}`,vt,{schedule:J},{Accept:["application/json"]})}function tn(S){return __request__("DELETE",`/events/definitions/${S}`,null,{},{Accept:["application/json"]})}function Qt(S){return __request__("PUT",`/events/definitions/${S}/clear-notification-queue`,null,{},{Accept:["application/json"]})}function Bn(S){return __request__("POST",`/events/definitions/${S}/duplicate`,null,{},{Accept:["application/json"]})}function co(S,J){return __request__("POST",`/events/definitions/${J}/execute`,S,{},{Accept:["application/json"]})}function $n(S){return __request__("PUT",`/events/definitions/${S}/schedule`,null,{},{Accept:["application/json"]})}function To(S){return __request__("PUT",`/events/definitions/${S}/unschedule`,null,{},{Accept:["application/json"]})}function xo(S){return __request__("GET",`/events/definitions/${S}/with-context`,null,{},{Accept:["application/json"]})}function Ps(){return __request__("GET","/events/entity_types",null,{},{Accept:["application/json"]})}function bo(S=1,J=50,vt){return __request__("GET","/events/notifications",null,{page:S,per_page:J,query:vt},{Accept:["application/json"]})}function Ro(S){return __request__("POST","/events/notifications",S,{},{Accept:["application/json"]})}function No(){return __request__("GET","/events/notifications/legacy/types",null,{},{Accept:["application/json"]})}function fs(S="title",J=1,vt=50,en,pn="asc"){return __request__("GET","/events/notifications/paginated",null,{page:J,per_page:vt,query:en,sort:S,order:pn},{Accept:["application/json"]})}function Ds(S){return __request__("POST","/events/notifications/test",S,{},{Accept:["application/json"]})}function Os(S){return __request__("GET",`/events/notifications/${S}`,null,{},{Accept:["application/json"]})}function hs(S,J){return __request__("PUT",`/events/notifications/${S}`,J,{},{Accept:["application/json"]})}function Cs(S){return __request__("DELETE",`/events/notifications/${S}`,null,{},{Accept:["application/json"]})}function $s(S){return __request__("POST",`/events/notifications/${S}/test`,null,{},{Accept:["application/json"]})}function Ts(S){return _("GET",`/system/inputs/${S}/extractors`,null,{},{Accept:["application/json"]})}function re(S,J){return _("POST",`/system/inputs/${S}/extractors`,J,{},{Accept:["application/json"]})}function we(S,J){return _("POST",`/system/inputs/${S}/extractors/order`,J,{},{Accept:[]})}function et(S,J){return _("DELETE",`/system/inputs/${S}/extractors/${J}`,null,{},{Accept:["application/json"]})}function Et(S,J,vt){return _("PUT",`/system/inputs/${S}/extractors/${J}`,vt,{},{Accept:["application/json"]})}function wt(S,J){return _("GET",`/system/inputs/${S}/extractors/${J}`,null,{},{Accept:["application/json"]})}function Ut(S=1,J=5,vt){return __request__("GET","/favorites",null,{page:S,per_page:J,type:vt},{Accept:["application/json"]})}function Pn(S){return __request__("PUT",`/favorites/${S}`,null,{},{Accept:["application/json"]})}function qn(S){return __request__("DELETE",`/favorites/${S}`,null,{},{Accept:["application/json"]})}function Fn(){return __request__("GET","/views/fields",null,{},{Accept:["application/json"]})}function jn(S){return __request__("POST","/views/fields",S,{},{Accept:["application/json"]})}function go(){return __request__("GET","/",null,{},{Accept:["application/json"]})}function Eo(){return __request__("GET","/system/indexer/cluster/health",null,{},{Accept:["application/json"]})}function Lo(){return __request__("GET","/system/indexer/cluster/name",null,{},{Accept:["application/json"]})}function Mn(S,J){return __request__("GET","/system/indexer/failures",null,{limit:S,offset:J},{Accept:["application/json"]})}function On(S){return __request__("GET","/system/indexer/failures/count",null,{since:S},{Accept:["application/json"]})}function ko(){return __request__("GET","/system/indexer/indices",null,{},{Accept:["application/json"]})}function Ke(){return __request__("GET","/system/indexer/indices/closed",null,{},{Accept:["application/json"]})}function dt(S){return __request__("POST","/system/indexer/indices/multiple",S,{},{Accept:["application/json"]})}function ht(){return __request__("GET","/system/indexer/indices/open",null,{},{Accept:["application/json"]})}function Pt(){return __request__("GET","/system/indexer/indices/reopened",null,{},{Accept:["application/json"]})}function dn(S){return __request__("GET",`/system/indexer/indices/${S}/closed`,null,{},{Accept:["application/json"]})}function jt(S){return __request__("GET",`/system/indexer/indices/${S}/list`,null,{},{Accept:["application/json"]})}function nn(S){return __request__("GET",`/system/indexer/indices/${S}/open`,null,{},{Accept:["application/json"]})}function Rn(S){return __request__("GET",`/system/indexer/indices/${S}/reopened`,null,{},{Accept:["application/json"]})}function Wn(S){return __request__("GET",`/system/indexer/indices/${S}`,null,{},{Accept:["application/json"]})}function xn(S){return __request__("DELETE",`/system/indexer/indices/${S}`,null,{},{Accept:["application/json"]})}function So(S){return __request__("POST",`/system/indexer/indices/${S}/close`,null,{},{Accept:["application/json"]})}function zn(S){return __request__("POST",`/system/indexer/indices/${S}/reopen`,null,{},{Accept:["application/json"]})}function Ao(){return __request__("GET","/system/indexer/indices/templates",null,{},{Accept:["application/json"]})}function Jo(){return __request__("POST","/system/indexer/indices/templates/update",null,{},{Accept:["application/json"]})}function Ko(S){return __request__("GET",`/system/indexer/indices/templates/${S}`,null,{},{Accept:["application/json"]})}function fo(S){return __request__("POST",`/system/indexer/indices/templates/${S}/update`,null,{},{Accept:["application/json"]})}function $o(){return __request__("GET","/system/indexer/overview",null,{},{Accept:["application/json"]})}function es(S){return __request__("GET",`/system/indexer/overview/${S}`,null,{},{Accept:["application/json"]})}function vs(S,J,vt,en,pn,eo,ss=500,Js){return __request__("GET","/search/universal/absolute",null,{query:S,from:J,to:vt,limit:pn,offset:eo,batch_size:ss,filter:Js,fields:en},{Accept:["text/csv"]})}function Us(S,J,vt,en,pn,eo,ss,Js,Gl=!0){return __request__("GET","/search/universal/absolute",null,{query:S,from:J,to:vt,limit:en,offset:pn,filter:eo,fields:ss,sort:Js,decorate:Gl},{Accept:["application/json"]})}function ga(S,J,vt,en,pn,eo,ss=500,Js){return __request__("GET","/search/universal/absolute/export",null,{query:S,from:J,to:vt,limit:pn,offset:eo,batch_size:ss,filter:Js,fields:en},{Accept:["text/csv"]})}function ts(S,J,vt,en,pn,eo=500,ss){return __request__("GET","/search/universal/keyword",null,{query:S,keyword:J,limit:en,offset:pn,batch_size:eo,filter:ss,fields:vt},{Accept:["text/csv"]})}function ds(S,J,vt,en,pn,eo,ss,Js=!0){return __request__("GET","/search/universal/keyword",null,{query:S,keyword:J,limit:vt,offset:en,filter:pn,fields:eo,sort:ss,decorate:Js},{Accept:["application/json"]})}function ys(S,J,vt,en,pn,eo=500,ss){return __request__("GET","/search/universal/keyword/export",null,{query:S,keyword:J,limit:en,offset:pn,batch_size:eo,filter:ss,fields:vt},{Accept:["text/csv"]})}function Ns(S,J,vt,en,pn,eo=500,ss){return __request__("GET","/search/universal/relative",null,{query:S,range:J,limit:en,offset:pn,batch_size:eo,filter:ss,fields:vt},{Accept:["text/csv"]})}function qs(S,J,vt,en,pn,eo,ss,Js=!0){return __request__("GET","/search/universal/relative",null,{query:S,range:J,limit:vt,offset:en,filter:pn,fields:eo,sort:ss,decorate:Js},{Accept:["application/json"]})}function _o(S,J,vt,en,pn,eo=500,ss){return __request__("GET","/search/universal/relative/export",null,{query:S,range:J,limit:en,offset:pn,batch_size:eo,filter:ss,fields:vt},{Accept:["text/csv"]})}function Gs(S){return __request__("POST","/messages/parse",S,{},{Accept:["application/json"]})}function ea(S,J,vt){return __request__("GET",`/messages/${S}/analyze`,null,{analyzer:vt,string:J},{Accept:["application/json"]})}function js(S,J){return __request__("GET",`/messages/${S}/${J}`,null,{},{Accept:["application/json"]})}function ta(){return _("GET","/migration/journalestimate",null,{},{Accept:["application/json"]})}function cs(){return _("GET","/migration/serialize",null,{},{Accept:["text/plain"]})}function Rs(){return _("GET","/migration/state",null,{},{Accept:["application/json"]})}function na(){return _("DELETE","/migration/state",null,{},{Accept:["application/json"]})}function Ea(S){return _("POST","/migration/trigger",S,{},{Accept:["application/json"]})}function Ga(){return __request__("GET","/system/pipelines/connections",null,{},{Accept:["application/json"]})}function mr(S){return __request__("POST","/system/pipelines/connections/to_pipeline",S,{},{Accept:["application/json"]})}function ja(S){return __request__("POST","/system/pipelines/connections/to_stream",S,{},{Accept:["application/json"]})}function Hs(S){return __request__("GET",`/system/pipelines/connections/${S}`,null,{},{Accept:["application/json"]})}function Ca(S){return __request__("POST","/system/pipelines/pipeline",S,{},{Accept:["application/json"]})}function ks(){return __request__("GET","/system/pipelines/pipeline",null,{},{Accept:["application/json"]})}function pe(S="title",J=1,vt=50,en,pn="asc"){return __request__("GET","/system/pipelines/pipeline/paginated",null,{page:J,per_page:vt,query:en,sort:S,order:pn},{Accept:["application/json"]})}function Ae(S){return __request__("POST","/system/pipelines/pipeline/parse",S,{},{Accept:["application/json"]})}function $e(S){return __request__("GET",`/system/pipelines/pipeline/${S}`,null,{},{Accept:["application/json"]})}function Xe(S,J){return __request__("PUT",`/system/pipelines/pipeline/${J}`,S,{},{Accept:["application/json"]})}function St(S){return __request__("DELETE",`/system/pipelines/pipeline/${S}`,null,{},{Accept:["application/json"]})}function xt(S){return __request__("POST","/system/pipelines/rulebuilder",S,{},{Accept:["application/json"]})}function Nt(){return __request__("GET","/system/pipelines/rulebuilder/actions",null,{},{Accept:["application/json"]})}function Ht(){return __request__("GET","/system/pipelines/rulebuilder/conditions",null,{},{Accept:["application/json"]})}function Zt(S){return __request__("POST","/system/pipelines/rulebuilder/simulate",S,{},{Accept:["application/json"]})}function Kn(S){return __request__("POST","/system/pipelines/rulebuilder/validate",S,{},{Accept:["application/json"]})}function Un(S,J){return __request__("PUT",`/system/pipelines/rulebuilder/${J}`,S,{},{Accept:["application/json"]})}function ue(S){return __request__("POST","/system/pipelines/rule",S,{},{Accept:["application/json"]})}function Te(){return __request__("GET","/system/pipelines/rule",null,{},{Accept:["application/json"]})}function Ge(){return __request__("GET","/system/pipelines/rule/config/metrics",null,{},{Accept:["application/json"]})}function mt(){return __request__("PUT","/system/pipelines/rule/config/metrics",null,{},{Accept:["application/json"]})}function Dt(){return __request__("GET","/system/pipelines/rule/functions",null,{},{Accept:["application/json"]})}function Jt(S){return __request__("POST","/system/pipelines/rule/multiple",S,{},{Accept:["application/json"]})}function mn(S="title",J=1,vt=50,en,pn="asc"){return __request__("GET","/system/pipelines/rule/paginated",null,{page:J,per_page:vt,query:en,sort:S,order:pn},{Accept:["application/json"]})}function oo(S){return __request__("POST","/system/pipelines/rule/parse",S,{},{Accept:["application/json"]})}function Qo(){return __request__("GET","/system/pipelines/rule/rulebuilder/conditions",null,{},{Accept:["application/json"]})}function Po(){return __request__("GET","/system/pipelines/rule/rulebuilder/functions",null,{},{Accept:["application/json"]})}function Do(S){return __request__("POST","/system/pipelines/rule/simulate",S,{},{Accept:["application/json"]})}function _s(S){return __request__("GET",`/system/pipelines/rule/${S}`,null,{},{Accept:["application/json"]})}function oa(S,J){return __request__("PUT",`/system/pipelines/rule/${J}`,S,{},{Accept:["application/json"]})}function jo(S){return __request__("DELETE",`/system/pipelines/rule/${S}`,null,{},{Accept:["application/json"]})}function Is(S){return __request__("POST","/system/pipelines/simulate",S,{},{Accept:["application/json"]})}function us(S){return __request__("POST","/remote-reindex-migration/remoteReindex",S,{},{Accept:["application/json"]})}function as(S){return __request__("GET",`/remote-reindex-migration/status/${S}`,null,{},{Accept:["application/json"]})}function pr(){return __request__("GET","/roles",null,{},{Accept:["application/json"]})}function sa(S){return __request__("POST","/roles",S,{},{Accept:["application/json"]})}function aa(S,J){return __request__("PUT",`/roles/${S}`,J,{},{Accept:["application/json"]})}function Ra(S){return __request__("GET",`/roles/${S}`,null,{},{Accept:["application/json"]})}function Ta(S){return __request__("DELETE",`/roles/${S}`,null,{},{Accept:["application/json"]})}function ul(S){return __request__("GET",`/roles/${S}/members`,null,{},{Accept:["application/json"]})}function ra(S,J){return __request__("DELETE",`/roles/${S}/members/${J}`,null,{},{Accept:["application/json"]})}function bs(S,J,vt="{}"){return __request__("PUT",`/roles/${S}/members/${J}`,vt,{},{Accept:["application/json"]})}function fa(S){return __request__("POST","/views/search",S,{},{Accept:["application/json","application/vnd.graylog.search.v1+json"]})}function Ur(S){return __request__("POST","/views/search",S,{},{Accept:["application/vnd.graylog.search.v2+json"]})}function la(){return __request__("GET","/views/search",null,{},{Accept:["application/json","application/vnd.graylog.search.v1+json"]})}function gr(S){return __request__("GET",`/views/search/status/${S}`,null,{},{Accept:["application/json","application/vnd.graylog.search.v1+json"]})}function Er(S,J=6e4){return __request__("POST","/views/search/sync",S,{timeout:J},{Accept:["application/json","application/vnd.graylog.search.v1+json"]})}function Ms(S,J=6e4){return __request__("POST","/views/search/sync",S,{timeout:J},{Accept:["application/vnd.graylog.search.v2+json"]})}function Ha(S){return __request__("GET",`/views/search/${S}`,null,{},{Accept:["application/json","application/vnd.graylog.search.v1+json"]})}function Nr(S,J){return __request__("POST",`/views/search/${S}/execute`,J,{},{Accept:["application/json","application/vnd.graylog.search.v1+json"]})}function za(S,J){return __request__("POST",`/views/search/${S}/explain`,J,{},{Accept:["application/json"]})}function dl(){return __request__("GET","/search/decorators",null,{},{Accept:["application/json"]})}function ml(S){return __request__("POST","/search/decorators",S,{},{Accept:["application/json"]})}function Va(){return __request__("GET","/search/decorators/available",null,{},{Accept:["application/json"]})}function zs(S,J){return __request__("PUT",`/search/decorators/${S}`,J,{},{Accept:["application/json"]})}function fr(S){return __request__("DELETE",`/search/decorators/${S}`,null,{},{Accept:["application/json"]})}function gc(S){return __request__("POST","/views/export",S,{},{Accept:[]})}function pl(S,J){return __request__("POST",`/views/export/${S}`,J,{},{Accept:[]})}function gl(S,J,vt){return __request__("POST",`/views/export/${S}/${J}`,vt,{},{Accept:[]})}function El(S){return __request__("POST","/views/search/messages",S,{},{Accept:["text/csv"]})}function ti(S,J){return __request__("GET",`/views/search/messages/job/${S}/${J}`,null,{},{Accept:[]})}function fl(S,J){return __request__("POST",`/views/search/messages/${S}`,J,{},{Accept:["text/csv"]})}function hr(S,J,vt){return __request__("POST",`/views/search/messages/${S}/${J}`,vt,{},{Accept:[]})}function ha(S){return __request__("POST","/views/search/metadata",S,{},{Accept:["application/json"]})}function Ia(S){return __request__("GET",`/views/search/metadata/${S}`,null,{},{Accept:["application/json"]})}function va(S){return _("POST","/search/query_strings",S,{},{Accept:["application/json"]})}function Ec(S="title",J=1,vt=50,en="asc",pn,eo){return __request__("GET","/search/saved",null,{page:J,per_page:vt,sort:S,order:en,query:pn,filters:eo},{Accept:["application/json"]})}function ka(S,J,vt,en,pn){return __request__("GET","/search/aggregate",null,{query:S,streams:J,timerange:vt,groups:en,metrics:pn},{Accept:[]})}function wr(S){return __request__("POST","/search/aggregate",S,{},{Accept:[]})}function ni(S,J,vt,en,pn,eo,ss,Js){return __request__("GET","/search/messages",null,{query:S,streams:J,timerange:vt,fields:en,sort:pn,sortOrder:eo,from:ss,size:Js},{Accept:[]})}function Yo(S){return __request__("POST","/search/messages",S,{},{Accept:[]})}function Qa(S){return _("POST","/search/suggest",S,{},{Accept:["application/json"]})}function Wr(S){return _("GET","/search/suggest/query_strings",null,{limit:S},{Accept:["application/json"]})}function fc(S){return __request__("POST","/search/validate",S,{},{Accept:["application/json"]})}function oi(S,J){return __request__("GET",`/views/searchjobs/${J}/${S}/status`,null,{},{Accept:["application/json","application/vnd.graylog.search.v1+json"]})}function Ya(S="node_name",J=1,vt=50,en,pn="asc",eo=!1){return __request__("GET","/sidecars",null,{page:J,per_page:vt,query:en,sort:S,order:pn,only_active:eo},{Accept:["application/json"]})}function vr(){return __request__("GET","/sidecars/all",null,{},{Accept:["application/json"]})}function Ma(S){return __request__("PUT","/sidecars/configurations",S,{},{Accept:["application/json"]})}function yr(S){return __request__("GET",`/sidecars/${S}`,null,{},{Accept:["application/json"]})}function Qs(S,J){return __request__("PUT",`/sidecars/${S}`,J,{},{Accept:["application/json"]})}function Xa(S){return __request__("POST","/sidecar/administration",S,{},{Accept:["application/json"]})}function hl(S){return __request__("PUT","/sidecar/administration/action",S,{},{Accept:["application/json"]})}function Fr(S){return __request__("GET",`/sidecar/action/${S}`,null,{},{Accept:["application/json"]})}function xa(S,J){return __request__("PUT",`/sidecar/action/${S}`,J,{},{Accept:["application/json"]})}function Ja(){return __request__("GET","/sidecar/collectors",null,{},{Accept:["application/json"]})}function si(S){return __request__("POST","/sidecar/collectors",S,{},{Accept:["application/json"]})}function hc(S="name",J=1,vt=50,en,pn="asc"){return __request__("GET","/sidecar/collectors/summary",null,{page:J,per_page:vt,query:en,sort:S,order:pn},{Accept:["application/json"]})}function Ar(S){return __request__("POST","/sidecar/collectors/validate",S,{},{Accept:["application/json"]})}function Kr(S){return __request__("GET",`/sidecar/collectors/${S}`,null,{},{Accept:["application/json"]})}function _r(S,J){return __request__("PUT",`/sidecar/collectors/${S}`,J,{},{Accept:["application/json"]})}function vc(S){return __request__("DELETE",`/sidecar/collectors/${S}`,null,{},{Accept:["application/json"]})}function $r(S,J){return __request__("POST",`/sidecar/collectors/${S}/${J}`,null,{},{Accept:["application/json"]})}function yc(){return __request__("GET","/sidecar/configuration_variables",null,{},{Accept:["application/json"]})}function La(S){return __request__("POST","/sidecar/configuration_variables",S,{},{Accept:["application/json"]})}function Gr(S){return __request__("POST","/sidecar/configuration_variables/validate",S,{},{Accept:["application/json"]})}function vl(S,J){return __request__("PUT",`/sidecar/configuration_variables/${S}`,J,{},{Accept:["application/json"]})}function yl(S){return __request__("DELETE",`/sidecar/configuration_variables/${S}`,null,{},{Accept:["application/json"]})}function Ba(S){return __request__("GET",`/sidecar/configuration_variables/${S}/configurations`,null,{},{Accept:["application/json"]})}function Cr(S="name",J=1,vt=50,en,pn="asc"){return __request__("GET","/sidecar/configurations",null,{page:J,per_page:vt,query:en,sort:S,order:pn},{Accept:["application/json"]})}function xs(S){return __request__("POST","/sidecar/configurations",S,{},{Accept:["application/json"]})}function ai(S){return __request__("POST","/sidecar/configurations/render/preview",S,{},{Accept:["application/json"]})}function Al(S,J){return __request__("GET",`/sidecar/configurations/render/${S}/${J}`,null,{},{Accept:["application/json"]})}function jr(S){return __request__("POST","/sidecar/configurations/validate",S,{},{Accept:["application/json"]})}function Ss(S){return __request__("DELETE",`/sidecar/configurations/${S}`,null,{},{Accept:["application/json"]})}function ri(S,J){return __request__("PUT",`/sidecar/configurations/${S}`,J,{},{Accept:["application/json"]})}function Hr(S){return __request__("GET",`/sidecar/configurations/${S}`,null,{},{Accept:["application/json"]})}function Ac(S){return __request__("GET",`/sidecar/configurations/${S}/sidecars`,null,{},{Accept:["application/json"]})}function li(S){return __request__("POST",`/sidecar/configurations/${S}/${name}`,null,{},{Accept:["application/json"]})}function ia(S=1,J=5){return __request__("GET","/startpage/lastOpened",null,{page:S,per_page:J},{Accept:["application/json"]})}function ms(S=1,J=5){return __request__("GET","/startpage/recentActivity",null,{page:S,per_page:J},{Accept:["application/json"]})}function ii(S,J){return __request__("POST",`/system/inputs/${S}/staticfields`,J,{},{Accept:["application/json"]})}function ca(S,J){return __request__("DELETE",`/system/inputs/${J}/staticfields/${S}`,null,{},{Accept:["application/json"]})}function Za(S,J){return __request__("POST",`/streams/${S}/outputs`,J,{},{Accept:["application/json"]})}function As(S){return __request__("GET",`/streams/${S}/outputs`,null,{},{Accept:["application/json"]})}function Tr(S,J){return __request__("DELETE",`/streams/${S}/outputs/${J}`,null,{},{Accept:["application/json"]})}function ws(S,J){return __request__("GET",`/streams/${S}/outputs/${J}`,null,{},{Accept:["application/json"]})}function _c(S){return __request__("GET",`/streams/${S}/rules`,null,{},{Accept:["application/json"]})}function Ys(S,J){return __request__("POST",`/streams/${S}/rules`,J,{},{Accept:["application/json"]})}function ci(S){return __request__("GET",`/streams/${S}/rules/types`,null,{},{Accept:["application/json"]})}function Ws(S,J){return __request__("GET",`/streams/${S}/rules/${J}`,null,{},{Accept:["application/json"]})}function ui(S,J,vt){return __request__("PUT",`/streams/${S}/rules/${J}`,vt,{},{Accept:["application/json"]})}function ua(S,J){return __request__("DELETE",`/streams/${S}/rules/${J}`,null,{},{Accept:[]})}function br(){return __request__("GET","/streams/rules/inputs",null,{},{Accept:["application/json"]})}function da(){return _("GET","/streams",null,{},{Accept:["application/json"]})}function zr(S){return _("POST","/streams",S,{},{Accept:["application/json"]})}function ya(S){return _("POST","/streams/bulk_delete",S,{},{Accept:[]})}function Vr(S){return _("POST","/streams/bulk_pause",S,{},{Accept:[]})}function qa(S){return _("POST","/streams/bulk_resume",S,{},{Accept:[]})}function kr(){return _("GET","/streams/enabled",null,{},{Accept:["application/json"]})}function Qr(S,J){return _("PUT",`/streams/indexSet/${S}`,J,{},{Accept:["application/json"]})}function Ua(S="title",J=1,vt=50,en,pn,eo="asc"){return _("GET","/streams/paginated",null,{page:J,per_page:vt,query:en,filters:pn,sort:S,order:eo},{Accept:["application/json"]})}function _l(S){return _("GET",`/streams/${S}`,null,{},{Accept:["application/json"]})}function Yr(S,J){return _("PUT",`/streams/${S}`,J,{},{Accept:["application/json"]})}function Cl(S){return _("DELETE",`/streams/${S}`,null,{},{Accept:[]})}function Tl(S,J){return _("POST",`/streams/${S}/clone`,J,{},{Accept:["application/json"]})}function bl(S){return _("POST",`/streams/${S}/pause`,null,{},{Accept:[]})}function Sr(S){return _("POST",`/streams/${S}/resume`,null,{},{Accept:[]})}function Pr(S,J){return _("POST",`/streams/${S}/testMatch`,J,{},{Accept:[]})}function Sl(){return __request__("GET","/system",null,{},{Accept:["application/json"]})}function Xr(){return __request__("GET","/system/jvm",null,{},{Accept:["application/json"]})}function Cc(){return __request__("GET","/system/locales",null,{},{Accept:["application/json"]})}function te(){return __request__("GET","/system/processbufferdump",null,{},{Accept:["application/json"]})}function q(){return __request__("GET","/system/threaddump",null,{},{Accept:["application/json"]})}function ie(){return __request__("GET","/system/threaddump",null,{},{Accept:["text/plain"]})}function tt(){return __request__("PUT","/system/authentication/http-header-auth-config",null,{},{Accept:["application/json"]})}function ct(){return __request__("GET","/system/authentication/http-header-auth-config",null,{},{Accept:["application/json"]})}function _t(){return __request__("GET","/system/authentication/services/active-backend",null,{},{Accept:["application/json"]})}function Cn(S){return __request__("GET","/system/authentication/services/backends",S,{},{Accept:["application/json"]})}function Io(S){return __request__("POST","/system/authentication/services/backends",S,{},{Accept:["application/json"]})}function wo(){return __request__("GET","/system/authentication/services/backends/active-backend/type",null,{},{Accept:["application/json"]})}function Oo(S){return __request__("GET",`/system/authentication/services/backends/${S}`,null,{},{Accept:["application/json"]})}function Ho(S,J){return __request__("PUT",`/system/authentication/services/backends/${S}`,J,{},{Accept:["application/json"]})}function ns(S){return __request__("DELETE",`/system/authentication/services/backends/${S}`,null,{},{Accept:["application/json"]})}function zo(S="full_name",J,vt=1,en=50,pn,eo="asc"){return __request__("GET",`/system/authentication/services/backends/${J}/users`,null,{page:vt,per_page:en,query:pn,sort:S,order:eo},{Accept:["application/json"]})}function ps(){return __request__("GET","/system/authentication/services/configuration",null,{},{Accept:["application/json"]})}function ma(S){return __request__("POST","/system/authentication/services/configuration",S,{},{Accept:["application/json"]})}function Fs(S){return __request__("POST","/system/authentication/services/test/backend/connection",S,{},{Accept:["application/json"]})}function Ks(S){return __request__("POST","/system/authentication/services/test/backend/login",S,{},{Accept:["application/json"]})}function Vs(S){return __request__("POST","/system/catalog",S,{},{Accept:["application/json"]})}function Aa(){return __request__("GET","/system/catalog",null,{},{Accept:["application/json"]})}function rs(S){return __request__("POST","/system/catalog/entities/titles",S,{},{Accept:["application/json"]})}function gs(S="title",J=1,vt=50,en,pn="asc"){return __request__("GET","/system/cluster/datanodes",null,{page:J,per_page:vt,query:en,sort:S,order:pn},{Accept:["application/json"]})}function Zo(){return __request__("GET","/system/cluster/node",null,{},{Accept:["application/json"]})}function Y(){return __request__("GET","/system/cluster/nodes",null,{},{Accept:["application/json"]})}function Na(S){return __request__("GET",`/system/cluster/nodes/${S}`,null,{},{Accept:["application/json"]})}function Pl(){return __request__("GET","/system/cluster_config",null,{},{Accept:["application/json"]})}function Jr(S){return __request__("GET",`/system/cluster_config/${S}`,null,{},{Accept:["application/schema+json"]})}function _a(S,J){return __request__("PUT",`/system/cluster_config/${S}`,J,{},{Accept:["application/json"]})}function ba(S){return __request__("GET",`/system/cluster_config/${S}`,null,{},{Accept:["application/json"]})}function er(S){return __request__("DELETE",`/system/cluster_config/${S}`,null,{},{Accept:["application/json"]})}function di(){return __request__("GET","/system/cluster/stats",null,{},{Accept:["application/json"]})}function Ju(){return __request__("GET","/system/cluster/stats/elasticsearch",null,{},{Accept:["application/json"]})}function Zu(){return __request__("GET","/system/cluster/stats/mongo",null,{},{Accept:["application/json"]})}function Tc(S=30,J=!1,vt=!0){return __request__("GET","/system/cluster/traffic",null,{days:S,daily:J,includeToday:vt},{Accept:["application/json"]})}function qu(){return __request__("GET","/system/codecs/types/all",null,{},{Accept:["application/json"]})}function Bp(){return __request__("GET","/system/configuration",null,{},{Accept:["application/json"]})}function ed(S){return __request__("GET",`/system/configuration/${S}`,null,{},{Accept:["application/json"]})}function Up(){return __request__("GET","/system/content_packs",null,{},{Accept:["application/json"]})}function Np(S){return __request__("POST","/system/content_packs",S,{},{Accept:["application/json"]})}function td(){return __request__("GET","/system/content_packs/latest",null,{},{Accept:["application/json"]})}function nd(S){return __request__("GET",`/system/content_packs/${S}`,null,{},{Accept:["application/json"]})}function Dr(S){return __request__("DELETE",`/system/content_packs/${S}`,null,{},{Accept:["application/json"]})}function bc(S){return __request__("GET",`/system/content_packs/${S}/installations`,null,{},{Accept:["application/json"]})}function Sc(S,J){return __request__("DELETE",`/system/content_packs/${S}/installations/${J}`,null,{},{Accept:["application/json"]})}function mi(S,J){return __request__("GET",`/system/content_packs/${S}/installations/${J}/uninstall_details`,null,{},{Accept:["application/json"]})}function od(S,J){return __request__("GET",`/system/content_packs/${S}/${J}`,null,{},{Accept:["application/json"]})}function Dl(S,J){return __request__("DELETE",`/system/content_packs/${S}/${J}`,null,{},{Accept:["application/json"]})}function sd(S,J){return __request__("GET",`/system/content_packs/${S}/${J}/download`,null,{},{Accept:["application/json"]})}function wp(S,J,vt){return __request__("POST",`/system/content_packs/${S}/${J}/installations`,vt,{},{Accept:["application/json"]})}function Zr(S="Cluster Test"){return __request__("POST","/system/debug/events/cluster",S,{},{Accept:["application/json"]})}function Pc(){return __request__("GET","/system/debug/events/cluster",null,{},{Accept:["application/json"]})}function ad(S="Local Test"){return __request__("POST","/system/debug/events/local",S,{},{Accept:["application/json"]})}function Wp(){return __request__("GET","/system/debug/events/local",null,{},{Accept:["application/json"]})}function Fp(){return __request__("GET","/system/debug/streams/router_engine_info",null,{},{Accept:["application/json"]})}function rd(S){return __request__("GET",`/system/debug/support/bundle/download/${S}`,null,{},{Accept:["application/octet-stream"]})}function Ls(){return __request__("GET","/system/debug/support/bundle/list",null,{},{Accept:["application/json"]})}function ld(S){return __request__("DELETE",`/system/debug/support/bundle/${S}`,null,{},{Accept:["application/json"]})}function Kp(S){return __request__("GET",`/system/debug/support/logfile/${S}`,null,{},{Accept:["application/octet-stream"]})}function qr(){return __request__("GET","/system/debug/support/manifest",null,{},{Accept:["application/json"]})}function Sa(){return __request__("GET","/system/deflector",null,{},{Accept:["application/json"]})}function tr(){return __request__("POST","/system/deflector/cycle",null,{},{Accept:[]})}function id(S){return __request__("GET",`/system/deflector/${S}`,null,{},{Accept:["application/json"]})}function $p(S){return __request__("POST",`/system/deflector/${S}/cycle`,null,{},{Accept:[]})}function Dc(S){return _("PUT","/system/indices/mappings",S,{},{Accept:["application/json"]})}function cd(S){return _("PUT","/system/indices/mappings/remove_mapping",S,{},{Accept:["application/json"]})}function Oc(S){return _("PUT","/system/indices/mappings/remove_profile_from",S,{},{Accept:["application/json"]})}function Rc(S){return _("PUT","/system/indices/mappings/set_profile",S,{},{Accept:["application/json"]})}function Ic(){return _("GET","/system/indices/mappings/types",null,{},{Accept:["application/json"]})}function pi(S){return __request__("GET","/system/fields",null,{limit:S},{Accept:["application/json"]})}function Gp(){return __request__("GET","/system/gettingstarted",null,{},{Accept:["application/json"]})}function ud(){return __request__("POST","/system/gettingstarted/dismiss",null,{},{Accept:["application/json"]})}function Mc(){return __request__("GET","/system/grok",null,{},{Accept:["application/json"]})}function wa(S){return __request__("POST","/system/grok",S,{},{Accept:["application/json"]})}function xc(S,J){return __request__("PUT","/system/grok",S,{"import-strategy":J},{Accept:["application/json"]})}function Ol(S,J){return __request__("POST","/system/grok",S,{"import-strategy":J},{Accept:["application/json"]})}function gi(S="name",J=1,vt=50,en,pn="asc"){return __request__("GET","/system/grok/paginated",null,{page:J,per_page:vt,query:en,sort:S,order:pn},{Accept:["application/json"]})}function Lc(S){return __request__("POST","/system/grok/test",S,{},{Accept:["application/json"]})}function dd(S){return __request__("GET",`/system/grok/${S}`,null,{},{Accept:["application/json"]})}function Ei(S,J){return __request__("PUT",`/system/grok/${S}`,J,{},{Accept:["application/json"]})}function Bc(S){return __request__("DELETE",`/system/grok/${S}`,null,{},{Accept:["application/json"]})}function fi(){return _("GET","/system/indices/ranges",null,{},{Accept:["application/json"]})}function Rl(S){return _("POST",`/system/indices/ranges/index_set/${S}/rebuild`,null,{},{Accept:["application/json"]})}function Uc(){return _("POST","/system/indices/ranges/rebuild",null,{},{Accept:["application/json"]})}function Nc(S){return _("POST",`/system/indices/ranges/${S}/rebuild`,null,{},{Accept:["application/json"]})}function hi(S){return _("GET",`/system/indices/ranges/${S}`,null,{},{Accept:["application/json"]})}function md(S){return __request__("PUT","/system/indices/index_set_defaults",S,{},{Accept:["application/json"]})}function jp(S=0,J=0,vt=!1){return __request__("GET","/system/indices/index_sets",null,{skip:S,limit:J,stats:vt},{Accept:["application/json"]})}function pd(S){return __request__("POST","/system/indices/index_sets",S,{},{Accept:["application/json"]})}function vi(S=0,J=0,vt,en=!1){return __request__("GET","/system/indices/index_sets/search",null,{searchTitle:vt,skip:S,limit:J,stats:en},{Accept:["application/json"]})}function wc(){return __request__("GET","/system/indices/index_sets/stats",null,{},{Accept:["application/json"]})}function Hp(S){return __request__("GET",`/system/indices/index_sets/${S}`,null,{},{Accept:["application/json"]})}function gd(S,J){return __request__("PUT",`/system/indices/index_sets/${S}`,J,{},{Accept:["application/json"]})}function Wc(S,J=!0){return __request__("DELETE",`/system/indices/index_sets/${S}`,null,{delete_indices:J},{Accept:["application/json"]})}function Ed(S){return __request__("PUT",`/system/indices/index_sets/${S}/default`,null,{},{Accept:["application/json"]})}function fd(S){return __request__("GET",`/system/indices/index_sets/${S}/stats`,null,{},{Accept:["application/json"]})}function Il(S){return __request__("PUT","/system/indices/index_sets/profiles",S,{},{Accept:["application/json"]})}function yi(S){return __request__("POST","/system/indices/index_sets/profiles",S,{},{Accept:["application/json"]})}function Ai(){return __request__("GET","/system/indices/index_sets/profiles/all",null,{},{Accept:["application/json"]})}function hd(S="name",J=1,vt=50,en,pn,eo="asc"){return __request__("GET","/system/indices/index_sets/profiles/paginated",null,{page:J,per_page:vt,query:en,filters:pn,sort:S,order:eo},{Accept:["application/json"]})}function vd(S){return __request__("GET",`/system/indices/index_sets/profiles/${S}`,null,{},{Accept:["application/json"]})}function Fc(S){return __request__("DELETE",`/system/indices/index_sets/profiles/${S}`,null,{},{Accept:["application/json"]})}function Ml(S,J="index_set_id",vt=1,en=50,pn="asc"){return _("POST","/system/indices/index_sets/types",S,{page:vt,per_page:en,sort:J,order:pn},{Accept:["application/json"]})}function xl(S="field_name",J,vt,en,pn=1,eo=50,ss="asc"){return _("GET",`/system/indices/index_sets/types/${J}`,null,{query:vt,filters:en,page:pn,per_page:eo,sort:S,order:ss},{Accept:["application/json"]})}function Kc(S="field_name",J,vt,en,pn="asc"){return _("GET",`/system/indices/index_sets/types/${J}/all`,null,{fieldNameQuery:vt,filters:en,sort:S,order:pn},{Accept:["application/json"]})}function _i(){return __request__("GET","/system/indices/retention/strategies",null,{},{Accept:["application/json"]})}function yd(S){return __request__("GET",`/system/indices/retention/strategies/${S}`,null,{},{Accept:["application/json"]})}function Ad(){return __request__("GET","/system/indices/rotation/strategies",null,{},{Accept:["application/json"]})}function Ci(S){return __request__("GET",`/system/indices/rotation/strategies/${S}`,null,{},{Accept:["application/json"]})}function bh(){return __request__("GET","/system/inputstates",null,{},{Accept:["application/json"]})}function _d(S){return __request__("GET",`/system/inputstates/${S}`,null,{},{Accept:["application/json"]})}function Xs(S){return __request__("PUT",`/system/inputstates/${S}`,null,{},{Accept:["application/json"]})}function nr(S){return __request__("DELETE",`/system/inputstates/${S}`,null,{},{Accept:["application/json"]})}function Ll(){return __request__("GET","/system/inputs",null,{},{Accept:["application/json"]})}function Ti(S){return __request__("POST","/system/inputs",S,{},{Accept:["application/json"]})}function Cd(S){return __request__("DELETE",`/system/inputs/${S}`,null,{},{Accept:["application/json"]})}function Td(S){return __request__("GET",`/system/inputs/${S}`,null,{},{Accept:["application/json"]})}function $c(S,J){return __request__("PUT",`/system/inputs/${J}`,S,{},{Accept:["application/json"]})}function bd(){return __request__("GET","/system/inputs/types",null,{},{Accept:["application/json"]})}function or(){return __request__("GET","/system/inputs/types/all",null,{},{Accept:["application/json"]})}function el(S){return __request__("GET",`/system/inputs/types/${S}`,null,{},{Accept:["application/json"]})}function Bl(S){return __request__("POST","/system/jobs",S,{},{Accept:["application/json"]})}function Gc(){return __request__("GET","/system/jobs",null,{},{Accept:["application/json"]})}function Pa(S){return __request__("DELETE",`/system/jobs/acknowledge/${S}`,null,{},{Accept:[]})}function jc(S){return __request__("GET",`/system/jobs/${S}`,null,{},{Accept:["application/json"]})}function Sd(S){return __request__("DELETE",`/system/jobs/${S}`,null,{},{Accept:["application/json"]})}function Pd(){return __request__("GET","/system/journal",null,{},{Accept:["application/json"]})}function Hc(){return __request__("GET","/system/lbstatus",null,{},{Accept:["text/plain"]})}function zp(S){return __request__("PUT",`/system/lbstatus/override/${S}`,null,{},{Accept:["application/json"]})}function zc(){return __request__("GET","/system/loggers",null,{},{Accept:["application/json"]})}function Ul(S=1e3){return __request__("GET","/system/loggers/messages/recent",null,{limit:S},{Accept:["text/plain"]})}function Vc(){return __request__("GET","/system/loggers/subsystems",null,{},{Accept:["application/json"]})}function Nl(S,J){return __request__("PUT",`/system/loggers/subsystems/${S}/level/${J}`,null,{},{Accept:[]})}function Dd(S,J){return __request__("PUT",`/system/loggers/${S}/level/${J}`,null,{},{Accept:[]})}function kc(S="title",J=1,vt=50,en="desc",pn){return __request__("GET","/system/lookup/adapters",null,{page:J,per_page:vt,sort:S,order:en,query:pn},{Accept:["application/json"]})}function bi(S){return __request__("POST","/system/lookup/adapters",S,{},{Accept:["application/json"]})}function Si(S){return __request__("POST","/system/lookup/adapters/validate",S,{},{Accept:["application/json"]})}function wl(S){return __request__("DELETE",`/system/lookup/adapters/${S}`,null,{},{Accept:["application/json"]})}function Or(S,J){return __request__("PUT",`/system/lookup/adapters/${S}`,J,{},{Accept:["application/json"]})}function Rr(S){return __request__("GET",`/system/lookup/adapters/${S}`,null,{},{Accept:["application/json"]})}function Wl(S,J){return __request__("GET",`/system/lookup/adapters/${S}/query`,null,{key:J},{Accept:["application/json"]})}function Od(S="title",J=1,vt=50,en="desc",pn){return __request__("GET","/system/lookup/caches",null,{page:J,per_page:vt,sort:S,order:en,query:pn},{Accept:["application/json"]})}function Rd(S){return __request__("POST","/system/lookup/caches",S,{},{Accept:["application/json"]})}function Pi(S){return __request__("POST","/system/lookup/caches/validate",S,{},{Accept:["application/json"]})}function Qc(S){return __request__("DELETE",`/system/lookup/caches/${S}`,null,{},{Accept:["application/json"]})}function Vp(S,J){return __request__("PUT",`/system/lookup/caches/${S}`,J,{},{Accept:["application/json"]})}function Id(S){return __request__("GET",`/system/lookup/caches/${S}`,null,{},{Accept:["application/json"]})}function Di(S){return __request__("POST","/system/lookup/errorstates",S,{},{Accept:["application/json"]})}function Yc(S="title",J=1,vt=50,en="desc",pn,eo=!1){return __request__("GET","/system/lookup/tables",null,{page:J,per_page:vt,sort:S,order:en,query:pn,resolve:eo},{Accept:["application/json"]})}function kp(S){return __request__("POST","/system/lookup/tables",S,{},{Accept:["application/json"]})}function Md(S){return __request__("POST","/system/lookup/tables/validate",S,{},{Accept:["application/json"]})}function Oi(S,J){return __request__("PUT",`/system/lookup/tables/${S}`,J,{},{Accept:["application/json"]})}function Xc(S){return __request__("DELETE",`/system/lookup/tables/${S}`,null,{},{Accept:["application/json"]})}function Qp(S,J=!1){return __request__("GET",`/system/lookup/tables/${S}`,null,{resolve:J},{Accept:["application/json"]})}function Jc(S,J){return __request__("POST",`/system/lookup/tables/${S}/purge`,null,{key:J},{Accept:["application/json"]})}function xd(S,J){return __request__("GET",`/system/lookup/tables/${S}/query`,null,{key:J},{Accept:["application/json"]})}function Zc(){return __request__("GET","/system/lookup/types/adapters",null,{},{Accept:["application/json"]})}function qc(){return __request__("GET","/system/lookup/types/caches",null,{},{Accept:["application/json"]})}function tl(S){return __request__("PUT","/system/messageprocessors/config",S,{},{Accept:["application/json"]})}function Ld(){return __request__("GET","/system/messageprocessors/config",null,{},{Accept:["application/json"]})}function Bd(S){return __request__("GET","/system/messages",null,{page:S},{Accept:["application/json"]})}function Ud(){return __request__("GET","/system/metrics",null,{},{Accept:["application/json"]})}function Nd(S){return __request__("POST","/system/metrics/multiple",S,{},{Accept:[]})}function wd(){return __request__("GET","/system/metrics/names",null,{},{Accept:["application/json"]})}function eu(S){return __request__("GET",`/system/metrics/namespace/${S}`,null,{},{Accept:["application/json"]})}function tu(S){return __request__("GET",`/system/metrics/${S}`,null,{},{Accept:["application/json"]})}function Yp(){return __request__("GET","/system/monitoring/query_duration_histogram",null,{},{Accept:["application/json","text/csv"]})}function Wd(S,J){return __request__("POST",`/system/notification/message/html/${S}`,J,{},{Accept:["application/json"]})}function Fd(S,J,vt){return __request__("POST",`/system/notification/message/html/${S}/${J}`,vt,{},{Accept:["application/json"]})}function Kd(S,J){return __request__("POST",`/system/notification/message/plaintext/${S}`,J,{},{Accept:["application/json"]})}function nu(S,J,vt){return __request__("POST",`/system/notification/message/plaintext/${S}/${J}`,vt,{},{Accept:["application/json"]})}function Ri(){return __request__("GET","/system/notifications",null,{},{Accept:["application/json"]})}function Ir(S){return __request__("DELETE",`/system/notifications/${S}`,null,{},{Accept:["application/json"]})}function Xp(S,J){return __request__("DELETE",`/system/notifications/${S}/${J}`,null,{},{Accept:["application/json"]})}function $d(){return __request__("GET","/system/outputs",null,{},{Accept:["application/json"]})}function ou(S){return __request__("POST","/system/outputs",S,{},{Accept:["application/json"]})}function su(){return __request__("GET","/system/outputs/available",null,{},{Accept:["application/json"]})}function Gd(S){return __request__("GET",`/system/outputs/${S}`,null,{},{Accept:["application/json"]})}function jd(S,J){return __request__("PUT",`/system/outputs/${S}`,J,{},{Accept:["application/json"]})}function Jp(S){return __request__("DELETE",`/system/outputs/${S}`,null,{},{Accept:["application/json"]})}function Hd(){return __request__("GET","/system/permissions",null,{},{Accept:["application/json"]})}function Ii(S){return __request__("GET",`/system/permissions/reader/${S}`,null,{},{Accept:["application/json"]})}function zd(){return __request__("GET","/system/plugins",null,{},{Accept:["application/json"]})}function sr(){return __request__("PUT","/system/processing/pause",null,{},{Accept:[]})}function Vd(){return __request__("PUT","/system/processing/resume",null,{},{Accept:[]})}function Zp(){return __request__("GET","/system/processing/status",null,{},{Accept:["application/json"]})}function qp(){return __request__("GET","/system/processing/status/persisted",null,{},{Accept:["application/json"]})}function au(S,J){return __request__("GET",`/system/searchVersion/satisfiesVersion/${S}`,null,{version:J},{Accept:["application/json"]})}function Mi(){return __request__("GET","/system/serviceManager",null,{},{Accept:["application/json"]})}function eg(){return __request__("DELETE","/system/sessions",null,{},{Accept:["application/json"]})}function kd(){return __request__("GET","/system/sessions",null,{},{Accept:["application/json"]})}function Qd(S){return __request__("POST","/system/sessions",S,{},{Accept:["application/json"]})}function xi(S){return __request__("DELETE",`/system/sessions/${S}`,null,{},{Accept:["application/json"]})}function Yd(){return __request__("GET","/system/stats",null,{},{Accept:["application/json"]})}function tg(){return __request__("GET","/system/stats/fs",null,{},{Accept:["application/json"]})}function Xd(){return __request__("GET","/system/stats/jvm",null,{},{Accept:["application/json"]})}function ru(){return __request__("GET","/system/stats/network",null,{},{Accept:["application/json"]})}function lu(){return __request__("GET","/system/stats/os",null,{},{Accept:["application/json"]})}function Li(){return __request__("GET","/system/stats/process",null,{},{Accept:["application/json"]})}function iu(){return __request__("GET","/system/throughput",null,{},{Accept:["application/json"]})}function Jd(){return __request__("GET","/system/urlwhitelist",null,{},{Accept:["application/json"]})}function nl(S){return __request__("PUT","/system/urlwhitelist",S,{},{Accept:["application/json"]})}function cu(S){return __request__("POST","/system/urlwhitelist/check",S,{},{Accept:["application/json"]})}function ng(S){return __request__("POST","/system/urlwhitelist/generate_regex",S,{},{Accept:["application/json"]})}function Fl(){return _("GET","/telemetry",null,{},{Accept:["application/json"]})}function uu(){return _("GET","/telemetry/user/settings",null,{},{Accept:["application/json"]})}function Zd(S){return _("PUT","/telemetry/user/settings",S,{},{Accept:["application/json"]})}function qd(S=!0,J=!0){return __request__("GET","/users",null,{include_permissions:S,include_sessions:J},{Accept:["application/json"]})}function em(S){return __request__("POST","/users",S,{},{Accept:["application/json"]})}function tm(S){return __request__("GET",`/users/id/${S}`,null,{},{Accept:["application/json"]})}function nm(S){return __request__("DELETE",`/users/id/${S}`,null,{},{Accept:["application/json"]})}function om(S="full_name",J=1,vt=50,en,pn="asc"){return __request__("GET","/users/paginated",null,{page:J,per_page:vt,query:en,sort:S,order:pn},{Accept:["application/json"]})}function og(S,J){return __request__("PUT",`/users/${S}`,J,{},{Accept:["application/json"]})}function sm(S,J){return __request__("PUT",`/users/${S}/password`,J,{},{Accept:["application/json"]})}function sg(S,J="enabled"){return __request__("PUT",`/users/${S}/status/${J}`,null,{},{Accept:["application/json"]})}function du(S){return __request__("GET",`/users/${S}/tokens`,null,{},{Accept:["application/json"]})}function Kl(S,J){return __request__("DELETE",`/users/${S}/tokens/${J}`,null,{},{Accept:["application/json"]})}function am(S,J,vt="{}"){return __request__("POST",`/users/${S}/tokens/${J}`,vt,{},{Accept:["application/json"]})}function ag(S){return __request__("DELETE",`/users/${S}`,null,{},{Accept:["application/json"]})}function Bi(S){return __request__("GET",`/users/${S}`,null,{},{Accept:["application/json"]})}function rm(S,J){return __request__("PUT",`/users/${S}/permissions`,J,{},{Accept:["application/json"]})}function lm(S){return __request__("DELETE",`/users/${S}/permissions`,null,{},{Accept:["application/json"]})}function im(S,J){return __request__("PUT",`/users/${S}/preferences`,J,{},{Accept:["application/json"]})}function $l(S){return __request__("POST","/views",S,{},{Accept:["application/json"]})}function mu(S="title",J=1,vt=50,en="asc",pn){return __request__("GET","/views",null,{page:J,per_page:vt,sort:S,order:en,query:pn},{Accept:["application/json"]})}function rg(S){return __request__("POST","/views/bulk_delete",S,{},{Accept:["application/json"]})}function lg(S){return __request__("GET",`/views/${S}`,null,{},{Accept:["application/json"]})}function ig(S,J){return __request__("PUT",`/views/${S}`,J,{},{Accept:["application/json"]})}function ar(S){return __request__("DELETE",`/views/${S}`,null,{},{Accept:["application/json"]})}function Ui(S){return __request__("PUT",`/views/${S}/default`,null,{},{Accept:["application/json"]})}function cg(){return __request__("POST","/views/forValue",null,{},{Accept:["application/json"]})}},"9O66OgQd":(x,y,e)=>{"use strict";e.d(y,{A:()=>C});var t=e("dFpwyWHg"),r=e.n(t),s=e("C2ikvoS0"),o=e.n(s),n=e("1IntWRSu"),c=e.n(n),g=e("8nGWeFnd"),d=e.n(g),f=e("TeAcaicX"),p=e.n(f),E=e("eE3+5goe"),l=e.n(E),m=e("RnCvQHpm"),h={};h.styleTagTransform=l(),h.setAttributes=d(),h.insert=c().bind(null,"head"),h.domAPI=o(),h.insertStyleElement=p();var A=r()(m.A,h);const C=m.A&&m.A.locals?m.A.locals:void 0},mSSPPdLK:(x,y,e)=>{"use strict";e.d(y,{A:()=>C});var t=e("dFpwyWHg"),r=e.n(t),s=e("C2ikvoS0"),o=e.n(s),n=e("1IntWRSu"),c=e.n(n),g=e("8nGWeFnd"),d=e.n(g),f=e("TeAcaicX"),p=e.n(f),E=e("eE3+5goe"),l=e.n(E),m=e("zUghPtuB"),h={};h.styleTagTransform=l(),h.setAttributes=d(),h.insert=c().bind(null,"head"),h.domAPI=o(),h.insertStyleElement=p();var A=r()(m.A,h);const C=m.A&&m.A.locals?m.A.locals:void 0},rw5gWgKu:x=>{"use strict";x.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg=="},"2JwhIP0b":x=>{"use strict";x.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII="},KVH9cwQk:x=>{"use strict";x.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII="},"IX/Ens47":x=>{"use strict";x.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII="},"WN+LQtRW":x=>{"use strict";x.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAwCAYAAAB5R9gVAAAABGdBTUEAALGPC/xhBQAAAVVJREFUWAnN2G0KgjAYwPHpGfRkaZeqvgQaK+hY3SUHrk1YzNLay/OiEFp92I+/Mp2F2Mh2lLISWnflFjzH263RQjzMZ19wgs73ez0o1WmtW+dgA01VxrE3p6l2GLsnBy1VYQOtVSEH/atCCgqpQgKKqYIOiq2CBkqtggLKqQIKgqgCBjpJ2Y5CdJ+zrT9A7HHSTA1dxUdHgzCqJIEwq0SDsKsEg6iqBIEoq/wEcVRZBXFV+QJxV5mBtlDFB5VjYTaGZ2sf4R9PM7U9ZU+lLuaetPP/5Die3ToO1+u+MKtHs06qODB2zBnI/jBd4MPQm1VkY79Tb18gB+C62FdBFsZR6yeIo1YQiLJWMIiqVjQIu1YSCLNWFgijVjYIuhYYCKoWKAiiFgoopxYaKLUWOii2FgkophYp6F3r42W5A9s9OcgNvva8xQaysKXlFytoqdYmQH6tF3toSUo0INq9AAAAAElFTkSuQmCC"},glNHDCWm:x=>{"use strict";x.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAwCAYAAAB5R9gVAAAABGdBTUEAALGPC/xhBQAAAXRJREFUWAnN119ugjAcwPHWzJ1gnmxzB/BBE0n24m4xfNkTaOL7wOtsl3AXMMb+Vjaa1BG00N8fSEibPpAP3xAKKs2yjzTPH9RAjhEo9WzPr/Vm8zgE0+gXATAxxuxtqeJ9t5tIwv5AtQAApsfT6TPdbp+kUBcgVwvO51KqVhMkXKsVJFXrOkigVhCIs1Y4iKlWZxB1rX4gwlpRIIpa8SDkWmggrFq4IIRaJKCYWnSgnrXIQV1r8YD+1Vrn+bReagysIFfLABRt31v8oBu1xEBttfRbltmfjgEcWh9snUS2kNdBK6WN1vrOWxObWsz+fjxevsxmB1GQDfINWiev83nhaoiB/CoOU438oPrhXS0WpQ9xc1ZQWxWHqUYe0I0qrKCQKjygDlXIQV2r0IF6ViEBxVTBBSFUQQNhVYkHIVeJAtkNsbQ7c1LtzP6FsObhb2rCKv7NBIGoq4SDmKoEgTirXAcJVGkFSVVpgoSrXICGUMUH/QBZNSUy5XWUhwAAAABJRU5ErkJggg=="},OUOTPsAr:x=>{"use strict";x.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+"},hLK4KFKM:(x,y,e)=>{x.exports=e("5knLEQW+")(1468)},"J6y4/h8P":(x,y,e)=>{x.exports=e("5knLEQW+")(1893)},"D4SbLiE/":(x,y,e)=>{x.exports=e("5knLEQW+")(2555)},UiXZqrDE:(x,y,e)=>{x.exports=e("5knLEQW+")(2598)},JnTtTRmZ:(x,y,e)=>{x.exports=e("5knLEQW+")(3001)},DUKaTDO2:(x,y,e)=>{x.exports=e("5knLEQW+")(3109)},ZaccISJq:(x,y,e)=>{x.exports=e("5knLEQW+")(3156)},yAXMqwrl:(x,y,e)=>{x.exports=e("5knLEQW+")(335)},"9oVghaOd":(x,y,e)=>{x.exports=e("5knLEQW+")(381)},zKLlqmvB:(x,y,e)=>{x.exports=e("5knLEQW+")(3935)},omFLJsSD:(x,y,e)=>{x.exports=e("5knLEQW+")(4644)},GLQsuA3c:(x,y,e)=>{x.exports=e("5knLEQW+")(5243)},"L3UIULT/":(x,y,e)=>{x.exports=e("5knLEQW+")(54567)},Z7aTuO5B:(x,y,e)=>{x.exports=e("5knLEQW+")(7294)},aKyEWaw1:(x,y,e)=>{x.exports=e("5knLEQW+")(7588)},"ASBo/Til":(x,y,e)=>{x.exports=e("5knLEQW+")(8)},rDmUG0Dk:(x,y,e)=>{x.exports=e("5knLEQW+")(917)},"ww+BtWnX":(x,y,e)=>{x.exports=e("5knLEQW+")(947)},"kqAR+wt5":(x,y,e)=>{x.exports=e("5knLEQW+")(9755)},"5knLEQW+":x=>{"use strict";x.exports=__vendor},CcxYZm76:()=>{}},Ch={};function ao(x){var y=Ch[x];if(y!==void 0)return y.exports;var e=Ch[x]={id:x,loaded:!1,exports:{}};return _h[x].call(e.exports,e,e.exports,ao),e.loaded=!0,e.exports}ao.m=_h,ao.amdD=function(){throw new Error("define cannot be used indirect")},(()=>{var x=[];ao.O=(y,e,t,r)=>{if(e){r=r||0;for(var s=x.length;s>0&&x[s-1][2]>r;s--)x[s]=x[s-1];x[s]=[e,t,r];return}for(var o=1/0,s=0;s=r)&&Object.keys(ao.O).every(l=>ao.O[l](e[c]))?e.splice(c--,1):(n=!1,r{var y=x&&x.__esModule?()=>x.default:()=>x;return ao.d(y,{a:y}),y},(()=>{var x=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,y;ao.t=function(e,t){if(t&1&&(e=this(e)),t&8||typeof e=="object"&&e&&(t&4&&e.__esModule||t&16&&typeof e.then=="function"))return e;var r=Object.create(null);ao.r(r);var s={};y=y||[null,x({}),x([]),x(x)];for(var o=t&2&&e;typeof o=="object"&&!~y.indexOf(o);o=x(o))Object.getOwnPropertyNames(o).forEach(n=>s[n]=()=>e[n]);return s.default=()=>e,ao.d(r,s),r}})(),ao.d=(x,y)=>{for(var e in y)ao.o(y,e)&&!ao.o(x,e)&&Object.defineProperty(x,e,{enumerable:!0,get:y[e]})},ao.f={},ao.e=x=>Promise.all(Object.keys(ao.f).reduce((y,e)=>(ao.f[e](x,y),y),[])),ao.u=x=>""+({"bb8c8232-3883":"LoginPage","bb8c8232-8052":"LoadingPage","bb8c8232-689":"LoggedInPage","bb8c8232-4890":"NewSearchPage","bb8c8232-3006":"StreamSearchPage","bb8c8232-4324":"NewDashboardPage","bb8c8232-2882":"ShowViewPage"}[x]||x)+"."+{"bb8c8232-3883":"6b573802db269dd374de","bb8c8232-8052":"e4a1f09d6ca59bf55ceb","bb8c8232-689":"b6114c7f4e575fd21193","bb8c8232-8179":"a05d3459a954c9de8eb0","bb8c8232-5002":"5b9332b23464eb9491c4","bb8c8232-8194":"02645077bd3c7a4a223d","bb8c8232-3142":"e8fbd9db4faf506084f5","bb8c8232-3803":"78e5f8f9e48483998e2b","bb8c8232-1774":"1fd67a6c13c14ec41a15","bb8c8232-9808":"17684f49db90c74cbc09","bb8c8232-6563":"fdb9daa2314924b8da4d","bb8c8232-4868":"34a48bf661e1144ff850","bb8c8232-9421":"ebdc1f97db5dea2c919e","bb8c8232-5062":"fa5f9ed853bdcb977668","bb8c8232-6203":"50837924daa1f365aed8","bb8c8232-4890":"948c78c78c0927f4e5df","bb8c8232-3006":"c392b6a3a10ea6bd2b30","bb8c8232-4324":"5e7c1df97fbfe6f95906","bb8c8232-2882":"e3bf67c5aa42ea3bdc0b","bb8c8232-47":"727136069d6ab9599778","bb8c8232-9791":"eb2bc37d57a3a959072f","bb8c8232-3161":"e7af290eb8a119325f42","bb8c8232-3538":"ff0cb526cffbfedf3922","bb8c8232-9234":"e1fbd5b22d1f2df9fd25","bb8c8232-2732":"9a6fe506cb0a05ac7985","bb8c8232-8530":"fa5c49a85ec2f8cc4031","bb8c8232-6435":"4cdcf9f663be75d0d346","bb8c8232-8961":"bc90b204fa01a67751af","bb8c8232-5438":"b5d5fed4239cf715e48b","bb8c8232-6546":"0c990eb60bf81f185a82","bb8c8232-9699":"db416ad418fb19ddf068","bb8c8232-8996":"efd983b5730d4bbd8989","bb8c8232-2624":"0c4c0e2a562d1d6436bb","bb8c8232-3374":"1f64d56dd21954381c06","bb8c8232-1031":"5aae1cecf2f44e7528df","bb8c8232-6119":"23231fc83bcf991086a5","bb8c8232-64":"8324d02abbc7ed0c3d2d","bb8c8232-4041":"50520bc45008d8aa8149","bb8c8232-1143":"d97cae61cfd6dd8c0ce8","bb8c8232-408":"fdc5256fb7803ab51840","bb8c8232-2608":"4c48be2d13205f6f53fe","bb8c8232-2774":"07528bfd7e4060dd064d","bb8c8232-2011":"d8545e2f0ebee4fb8b9c","bb8c8232-4531":"ce3d55e8ad55ef832634","bb8c8232-5764":"9ee255cbdaae447db7c2","bb8c8232-9887":"f3c22a9b87b4d08f62f6","bb8c8232-7170":"8f93011170f0d6eb4a50","bb8c8232-7174":"966f720c17da959cbe6b","bb8c8232-290":"21ce9471c62feeb912e9","bb8c8232-4752":"77d643179b480a221a32","bb8c8232-379":"41e65871d8431e63e9c1","bb8c8232-2809":"da3dedf0b54dfff95a03","bb8c8232-5069":"e183cee7d2da85bb663a","bb8c8232-1956":"e7938ecf4a07dcbf9709","bb8c8232-6291":"730475e9e873e9d34dc6","bb8c8232-9163":"4399065262eda21f3d8e","bb8c8232-2770":"c3ac6e1b4ee9b7ee4cba","bb8c8232-8288":"6812618135ea3c8c8e22","bb8c8232-8316":"db921fb12953c5acf651","bb8c8232-5778":"292c50d54ae3864f7e07","bb8c8232-4987":"9c5a5d01e37d325d511b","bb8c8232-4742":"b7d2aac1c94609dffdc7","bb8c8232-4649":"c2d898f4deea4413f241","bb8c8232-3861":"5c075b20178a60bf0631","bb8c8232-6377":"7a8cab922f60905f3c23","bb8c8232-1554":"9b46048828a11db4ab5a","bb8c8232-4168":"e6772911027ec5fb5c5d","bb8c8232-6242":"c2a95ef1ada95f268da4","bb8c8232-5336":"aa2b9c2fe1d44614db07","bb8c8232-9201":"254dbea333abf953c23e","bb8c8232-4144":"b2c4bcfe8196c44cc215","bb8c8232-9241":"9646796dfd82d485052f","bb8c8232-6486":"4b2f65aa0218cd364901","bb8c8232-5861":"4f0e1d7f83b638e05630","bb8c8232-3969":"2e61a8c0208670a8a632","bb8c8232-2340":"5f288bc3bf486f8aa033","bb8c8232-5260":"277d142133566768ba73","bb8c8232-9916":"e9312cb144de77a59031","bb8c8232-5630":"1b72dd58b20df67d9040","bb8c8232-9099":"9b2b292086f3eed4211a","bb8c8232-8513":"baa65c0398962465ad9d","bb8c8232-4115":"0680afb687decf754db0","bb8c8232-6150":"ecda60a716eefcb4ae0f","bb8c8232-2758":"fdf6fdffa62b8081bbeb","bb8c8232-7379":"1d3e540d87eae7609c2e","bb8c8232-6212":"4af8d590534df64b188d","bb8c8232-2637":"09fe510e90a27261c76f","bb8c8232-5266":"bfbe8e2fa99ffb2a9b9b","bb8c8232-9721":"7d82ab2b903458c8b501","bb8c8232-8928":"8a1e7c6718534f168ea5","bb8c8232-2310":"f7b597027ba87fd4ec17","bb8c8232-2653":"64f8374e77d029fe71d5","bb8c8232-8997":"326a79cbe1e9cb0e6697","bb8c8232-4923":"81d1d6eaec12319d4c0a","bb8c8232-6580":"a3571135bc30cbf98b5f","bb8c8232-5230":"b478a8c74bcb1cb5822e","bb8c8232-7807":"f0e4580e229c695b8b91","bb8c8232-2666":"10ea609c963fa1eec83b","bb8c8232-9610":"753742bafe7a4c882b67","bb8c8232-132":"187803040eada3f837b3","bb8c8232-8815":"90638419a9d0336ed33f","bb8c8232-212":"d77c34586a317c59e34d","bb8c8232-1320":"b35b8a794ed0a972125d","bb8c8232-6376":"719c25bf0a3c3f3c687c","bb8c8232-816":"05699231e5e95479a8f8","bb8c8232-1348":"464d13323d4e71a5cc43","bb8c8232-1207":"f9940377ebd9556d2994","bb8c8232-3947":"be42182220fc1837d370","bb8c8232-2480":"5e638ee150c53e804ebf","bb8c8232-3207":"87d87725fa3cd2c47fde","bb8c8232-5578":"0300fa3f9aefe812c7bd","bb8c8232-3184":"ddc4246aeefa856f9544","bb8c8232-4332":"f6c7ce9b701df61cd38d","bb8c8232-4216":"bf540fd280efaddec622","bb8c8232-1310":"81b244b74044aa71abb6","bb8c8232-4340":"29fb40742a3b1b1fb546","bb8c8232-2523":"e603772f6adf3bb9c29d","bb8c8232-6236":"1518bf827b23a1fcb121","bb8c8232-3122":"0e228dd30d25ae450889","bb8c8232-1893":"6fb2af91dcd578e59a0e","bb8c8232-6862":"1db08f0b2779d8f1d1d7","bb8c8232-6436":"5e868a7d0249865ac2f2","bb8c8232-5816":"9b97c815c6f8df7d960e","bb8c8232-171":"2e0dcb23e39639dcc36f","bb8c8232-9403":"5b2c44c82fca60f630f3","bb8c8232-6368":"70a35aa295fcb97f3029","bb8c8232-4411":"9d6e1c8eceb2ac061299","bb8c8232-8845":"9e6dd7e0b43abda40223","bb8c8232-3795":"00a590d9f21f452fb329","bb8c8232-4297":"f2158f4c3614289dc175","bb8c8232-7224":"72f8b29cca55a0b85f99"}[x]+".js",ao.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),ao.o=(x,y)=>Object.prototype.hasOwnProperty.call(x,y),(()=>{var x={},y="graylog-web-interface:";ao.l=(e,t,r,s)=>{if(x[e]){x[e].push(t);return}var o,n;if(r!==void 0)for(var c=document.getElementsByTagName("script"),g=0;g{o.onerror=o.onload=null,clearTimeout(p);var m=x[e];if(delete x[e],o.parentNode&&o.parentNode.removeChild(o),m&&m.forEach(h=>h(l)),E)return E(l)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=f.bind(null,o.onerror),o.onload=f.bind(null,o.onload),n&&document.head.appendChild(o)}})(),ao.r=x=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(x,"__esModule",{value:!0})},ao.nmd=x=>(x.paths=[],x.children||(x.children=[]),x),(()=>{var x;ao.g.importScripts&&(x=ao.g.location+"");var y=ao.g.document;if(!x&&y&&(y.currentScript&&(x=y.currentScript.src),!x)){var e=y.getElementsByTagName("script");if(e.length)for(var t=e.length-1;t>-1&&(!x||!/^http(s?):/.test(x));)x=e[t--].src}if(!x)throw new Error("Automatic publicPath is not supported in this browser");x=x.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),ao.p=x})(),(()=>{ao.b=document.baseURI||self.location.href;var x={"bb8c8232-3524":0};ao.f.j=(t,r)=>{var s=ao.o(x,t)?x[t]:void 0;if(s!==0)if(s)r.push(s[2]);else{var o=new Promise((d,f)=>s=x[t]=[d,f]);r.push(s[2]=o);var n=ao.p+ao.u(t),c=new Error,g=d=>{if(ao.o(x,t)&&(s=x[t],s!==0&&(x[t]=void 0),s)){var f=d&&(d.type==="load"?"missing":d.type),p=d&&d.target&&d.target.src;c.message="Loading chunk "+t+` failed. (`+f+": "+p+")",c.name="ChunkLoadError",c.type=f,c.request=p,s[1](c)}};ao.l(n,g,"chunk-"+t,t)}},ao.O.j=t=>x[t]===0;var y=(t,r)=>{var[s,o,n]=r,c,g,d=0;if(s.some(p=>x[p]!==0)){for(c in o)ao.o(o,c)&&(ao.m[c]=o[c]);if(n)var f=n(ao)}for(t&&t(r);dao("IhaIlPK3"));Th=ao.O(Th)})();})(); //# sourceMappingURL=app.297742cda878c845f95a.js.map




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy