/*! 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 o(o){for(var r,i,a=o[0],t=o[1],l=0,_=[];l({app:"dev_tools",path:`#/searchprofiler${o?`?index=${o}`:""}${o&&e?`&load_from=${e}`:""}`,state:{loadFrom:e,index:o}})))}}const p=e=>{const{state:o,message:r}=e.check(a.id,a.minimumLicenseType);return"valid"===o?{valid:!0}:{valid:!1,message:r}};class plugin_SearchProfilerUIPlugin{setup({http:e,getStartServices:o},{devTools:t,home:l,licensing:_,share:f}){l.featureCatalogue.register({id:a.id,title:i.i18n.translate("xpack.searchProfiler.registryProviderTitle",{defaultMessage:"Search Profiler"}),description:i.i18n.translate("xpack.searchProfiler.registryProviderDescription",{defaultMessage:"Quickly check the performance of any Elasticsearch query."}),icon:"searchProfilerApp",path:"/app/dev_tools#/searchprofiler",showOnHomePage:!1,category:"admin"});const s=t.register({id:"searchprofiler",title:i.i18n.translate("xpack.searchProfiler.pageDisplayName",{defaultMessage:"Search Profiler"}),order:5,enableRouting:!1,mount:async i=>{const[a]=await o(),{notifications:t,i18n:l}=a,{renderApp:f}=await r.e(1).then(r.bind(null,31)),s=await Object(n.firstValueFrom)(_.license$),c=p(s);return f({http:e,initialLicenseStatus:c,el:i.element,I18nContext:l.Context,notifications:t.toasts,theme$:i.theme$,location:i.location})}});_.license$.subscribe((e=>{p(e).valid||s.isDisabled()?s.isDisabled()&&s.enable():s.disable()})),f.url.locators.create(new locator_SearchProfilerLocatorDefinition)}start(){}stop(){}}function _(){return new plugin_SearchProfilerUIPlugin}},function(e,o){e.exports=__kbnSharedDeps__.React},function(e,o){e.exports=__kbnSharedDeps__.EmotionReact},function(e,o){e.exports=__kbnSharedDeps__.ElasticEui},function(e,o){e.exports=__kbnSharedDeps__.Lodash},function(e,o,r){r.r(o);var n=__kbnBundles__.get("plugin/esUiShared/public");Object.defineProperties(o,Object.getOwnPropertyDescriptors(n))},function(e,o,r){r.r(o);var n=__kbnBundles__.get("plugin/kibanaReact/public");Object.defineProperties(o,Object.getOwnPropertyDescriptors(n))},function(e,o){e.exports=__kbnSharedDeps__.ReactDom},function(e,o){e.exports=__kbnSharedDeps__.KbnI18nReact},function(e,o){e.exports=__kbnSharedDeps__.Uuid},function(e,o){e.exports=__kbnSharedDeps__.Classnames}]);