/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */!function(e){function t(t){for(var n,r,o=t[0],i=t[1],c=0,u=[];c",GREATER_THAN_OR_EQUALS:">=",BETWEEN:"between",LESS_THAN:"<",LESS_THAN_OR_EQUALS:"<="},u={initialPageSize:10,pageSizeOptions:[10,50,100]},l={ID:"watcher",MINIMUM_LICENSE_REQUIRED:"gold",getI18nName:e=>e.translate("xpack.watcher.appName",{defaultMessage:"Watcher"})},d=6e4,p={WATCH_LIST:d,WATCH_HISTORY:d,WATCH_VISUALIZATION:d},f={API_ROOT:"/api/watcher"},h={ASCENDING:"asc",DESCENDING:"desc"},_={SECOND:"s",MINUTE:"m",HOUR:"h",DAY:"d"},g=(r.i18n.translate("xpack.watcher.constants.watchStateComments.partiallyThrottledStateCommentText",{defaultMessage:"Partially throttled"}),r.i18n.translate("xpack.watcher.constants.watchStateComments.throttledStateCommentText",{defaultMessage:"Throttled"}),r.i18n.translate("xpack.watcher.constants.watchStateComments.partiallyAcknowledgedStateCommentText",{defaultMessage:"Partially acknowledged"}),r.i18n.translate("xpack.watcher.constants.watchStateComments.acknowledgedStateCommentText",{defaultMessage:"Acknowledged"}),r.i18n.translate("xpack.watcher.constants.watchStateComments.executionFailingStateCommentText",{defaultMessage:"Execution failing"}),{INACTIVE:r.i18n.translate("xpack.watcher.constants.watchStates.inactiveStateText",{defaultMessage:"Inactive"}),ACTIVE:r.i18n.translate("xpack.watcher.constants.watchStates.activeStateText",{defaultMessage:"Active"}),ERROR:r.i18n.translate("xpack.watcher.constants.watchStates.errorStateText",{defaultMessage:"Error"}),CONFIG_ERROR:r.i18n.translate("xpack.watcher.constants.watchStates.configErrorStateText",{defaultMessage:"Config error"})}),m={JSON:"json",THRESHOLD:"threshold",MONITORING:"monitoring"},b={ERR_PROP_MISSING:"ERR_PROP_MISSING"}},function(e,t){e.exports=__kbnSharedDeps__.Rxjs},function(e,t,n){e.exports=n(7)(1465)},function(e,t,n){"use strict";var a,r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function i(e){for(var t=-1,n=0;n{const{state:t,message:n}=e.check(s.h.ID,s.h.MINIMUM_LICENSE_REQUIRED);return{valid:"valid"===t&&e.getFeature(s.h.ID).isAvailable,message:n}};class plugin_WatcherUIPlugin{constructor(){r()(this,"capabilities$",new c.Subject)}setup({notifications:e,http:t,uiSettings:a,getStartServices:r},{licensing:s,management:l,data:d,home:p,charts:f,licenseManagement:h}){const _=l.sections.section.insightsAndAlerting,g=o.i18n.translate("xpack.watcher.sections.watchList.managementSection.watcherDisplayName",{defaultMessage:"Watcher"}),m=_.registerApp({id:"watcher",title:g,order:5,mount:async({element:o,setBreadcrumbs:c,history:l,theme$:p})=>{const[_]=await r(),{chrome:{docTitle:m},i18n:b,docLinks:w,application:S,executionContext:x,settings:v}=_;m.change(g);const{renderApp:T}=await n.e(1).then(n.bind(null,41)),{TimeBuckets:k}=await n.e(2).then(n.bind(null,42)),E=T({licenseStatus$:s.license$.pipe(Object(i.skip)(1),Object(i.map)(u)),element:o,toasts:e.toasts,http:t,uiSettings:a,settings:v,docLinks:w,setBreadcrumbs:c,theme:f.theme,I18nContext:b.Context,createTimeBuckets:()=>new k(a,d),history:l,getUrlForApp:S.getUrlForApp,theme$:p,licenseManagementLocator:null==h?void 0:h.locator,executionContext:x});return()=>{m.reset(),E()}}}),b={id:"watcher",title:"Watcher",category:"admin",description:o.i18n.translate("xpack.watcher.watcherDescription",{defaultMessage:"Detect changes in your data by creating, managing, and monitoring alerts."}),icon:"watchesApp",path:"/app/management/insightsAndAlerting/watcher/watches",showOnHomePage:!1};p.featureCatalogue.register(b),Object(c.combineLatest)([s.license$.pipe(Object(i.first)(),Object(i.map)(u)),this.capabilities$]).subscribe((([{valid:e},t])=>{var n;e&&!0===(null===(n=t.management.insightsAndAlerting)||void 0===n?void 0:n.watcher)?m.enable():m.disable()}))}start(e){this.capabilities$.next(e.application.capabilities)}stop(){}}const l=()=>new plugin_WatcherUIPlugin},function(e,t){e.exports=__kbnSharedDeps__.React},function(e,t){e.exports=__kbnSharedDeps__.EmotionReact},function(e,t){e.exports=__kbnSharedDeps__.ElasticEui},function(e,t){e.exports=__kbnSharedDeps__.Lodash},function(e,t){e.exports=__kbnSharedDeps__.KbnI18nReact},function(e,t,n){n.r(t);var a=__kbnBundles__.get("plugin/kibanaReact/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(a))},function(e,t,n){n.r(t);var a=__kbnBundles__.get("plugin/esUiShared/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(a))},function(e,t){e.exports=__kbnSharedDeps__.SaferLodashSet},function(e,t){e.exports=__kbnSharedDeps__.ReactRouterDom},function(e,t){e.exports=__kbnSharedDeps__.Moment},function(e,t){e.exports=__kbnSharedDeps__.KbnDatemath},function(e,t){e.exports=__kbnSharedDeps__.TsLib},function(e,t){e.exports=__kbnSharedDeps__.ReactRouterDomV5Compat},function(e,t){e.exports=__kbnSharedDeps__.Uuid},function(e,t){e.exports=__kbnSharedDeps__.ReactDom},function(e,t){e.exports=__kbnSharedDeps__.ElasticCharts},function(e,t){e.exports=__kbnSharedDeps__.MomentTimezone},function(e,t,n){n.r(t);var a=__kbnBundles__.get("plugin/data/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(a))},function(e,t,n){n.r(t);var a=__kbnBundles__.get("plugin/fieldFormats/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(a))}]);