(window["anomalyDetectionDashboards_bundle_jsonpfunction"]=window["anomalyDetectionDashboards_bundle_jsonpfunction"]||[]).push([[18],{2795:function(module,exports,__webpack_require__){"use strict";var _interopRequireWildcard=__webpack_require__(9).default;Object.defineProperty(exports,"__esModule",{value:true});exports.default=FilterLabel;var _react=_interopRequireWildcard(__webpack_require__(2));var _eui=__webpack_require__(7);var _i18n=__webpack_require__(4);var _std=__webpack_require__(28);var _filter_operators=__webpack_require__(2869);var _common=__webpack_require__(10);function FilterLabel(_ref){let{filter:filter,valueLabel:valueLabel,filterLabelStatus:filterLabelStatus}=_ref;const prefixText=filter.meta.negate?` ${_i18n.i18n.translate("data.filter.filterBar.negatedFilterPrefix",{defaultMessage:"NOT "})}`:"";const prefix=filter.meta.negate&&!filter.meta.disabled?_react.default.createElement(_eui.EuiTextColor,{color:"danger"},prefixText):prefixText;const getValue=text=>_react.default.createElement("span",{className:"globalFilterLabel__value","data-test-subj":"globalFilterLabelValue"},text);if(filter.meta.alias!==null){return _react.default.createElement(_react.Fragment,null,prefix,filter.meta.alias,filterLabelStatus&&_react.default.createElement(_react.default.Fragment,null,": ",getValue(valueLabel)))}switch(filter.meta.type){case _common.FILTERS.EXISTS:return _react.default.createElement(_react.Fragment,null,prefix,filter.meta.key,": ",getValue(`${_filter_operators.existsOperator.message}`));case _common.FILTERS.GEO_BOUNDING_BOX:return _react.default.createElement(_react.Fragment,null,prefix,filter.meta.key,": ",getValue(valueLabel));case _common.FILTERS.GEO_POLYGON:return _react.default.createElement(_react.Fragment,null,prefix,filter.meta.key,": ",getValue(valueLabel));case _common.FILTERS.PHRASES:return _react.default.createElement(_react.Fragment,null,prefix,filter.meta.key,": ",getValue(`${_filter_operators.isOneOfOperator.message} ${valueLabel}`));case _common.FILTERS.QUERY_STRING:return _react.default.createElement(_react.Fragment,null,prefix,getValue(`${valueLabel}`));case _common.FILTERS.PHRASE:case _common.FILTERS.RANGE:return _react.default.createElement(_react.Fragment,null,prefix,filter.meta.key,": ",getValue(valueLabel));default:return _react.default.createElement(_react.Fragment,null,prefix,getValue(`${(0,_std.stringify)(filter.query)||filter.meta.value}`))}}module.exports=exports.default},2869:function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isOperator=exports.isOneOfOperator=exports.isNotOperator=exports.isNotOneOfOperator=exports.isNotBetweenOperator=exports.isBetweenOperator=exports.existsOperator=exports.doesNotExistOperator=exports.FILTER_OPERATORS=void 0;var _i18n=__webpack_require__(4);var _filters=__webpack_require__(63);const isOperator=exports.isOperator={message:_i18n.i18n.translate("data.filter.filterEditor.isOperatorOptionLabel",{defaultMessage:"is"}),type:_filters.FILTERS.PHRASE,negate:false};const isNotOperator=exports.isNotOperator={message:_i18n.i18n.translate("data.filter.filterEditor.isNotOperatorOptionLabel",{defaultMessage:"is not"}),type:_filters.FILTERS.PHRASE,negate:true};const isOneOfOperator=exports.isOneOfOperator={message:_i18n.i18n.translate("data.filter.filterEditor.isOneOfOperatorOptionLabel",{defaultMessage:"is one of"}),type:_filters.FILTERS.PHRASES,negate:false,fieldTypes:["string","number","date","ip","geo_point","geo_shape"]};const isNotOneOfOperator=exports.isNotOneOfOperator={message:_i18n.i18n.translate("data.filter.filterEditor.isNotOneOfOperatorOptionLabel",{defaultMessage:"is not one of"}),type:_filters.FILTERS.PHRASES,negate:true,fieldTypes:["string","number","date","ip","geo_point","geo_shape"]};const isBetweenOperator=exports.isBetweenOperator={message:_i18n.i18n.translate("data.filter.filterEditor.isBetweenOperatorOptionLabel",{defaultMessage:"is between"}),type:_filters.FILTERS.RANGE,negate:false,fieldTypes:["number","date","ip"]};const isNotBetweenOperator=exports.isNotBetweenOperator={message:_i18n.i18n.translate("data.filter.filterEditor.isNotBetweenOperatorOptionLabel",{defaultMessage:"is not between"}),type:_filters.FILTERS.RANGE,negate:true,fieldTypes:["number","date","ip"]};const existsOperator=exports.existsOperator={message:_i18n.i18n.translate("data.filter.filterEditor.existsOperatorOptionLabel",{defaultMessage:"exists"}),type:_filters.FILTERS.EXISTS,negate:false};const doesNotExistOperator=exports.doesNotExistOperator={message:_i18n.i18n.translate("data.filter.filterEditor.doesNotExistOperatorOptionLabel",{defaultMessage:"does not exist"}),type:_filters.FILTERS.EXISTS,negate:true};const FILTER_OPERATORS=exports.FILTER_OPERATORS=[isOperator,isNotOperator,isOneOfOperator,isNotOneOfOperator,isBetweenOperator,isNotBetweenOperator,existsOperator,doesNotExistOperator]}}]);