(window.devTools_bundle_jsonpfunction=window.devTools_bundle_jsonpfunction||[]).push([[1],{26:function(e,t,n){e.exports=n(7)(1466)},27:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19),o=n(28),s=r.__importDefault(n(30));t.default=function(e,t){s.default(e,t,o.isDeepEqual)}},28:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDeepEqual=t.off=t.on=t.isClient=void 0;var r=n(19).__importDefault(n(29));t.isClient="object"==typeof window,t.on=function(e){for(var t=[],n=1;n{const u=Object(r.useMemo)((()=>{if(t)return e=>Object(f.jsx)(o.a.Fragment,null,Object(f.jsx)(v,null),Object(f.jsx)(t,e))}),[t]);if(u)return Object(f.jsx)(i.Route,l()({},s,{component:u}));if(n||"function"==typeof e){const t="function"==typeof e?e:n;return Object(f.jsx)(i.Route,l()({},s,{render:e=>Object(f.jsx)(o.a.Fragment,null,Object(f.jsx)(v,null),t(e))}))}return Object(f.jsx)(i.Route,s,Object(f.jsx)(v,null),e)},v=()=>{const{executionContext:e}=Object(r.useContext)(d).services,t=Object(i.useRouteMatch)();return function(e,t){j()((()=>(null==e||e.set(t),()=>{null==e||e.clear()})),[t])}(e,{type:"application",page:t.path,id:Object.keys(t.params).length>0?JSON.stringify(t.params):void 0}),null};var O=n(20);const x=({children:e,...t})=>Object(f.jsx)(i.HashRouter,t,Object(f.jsx)(O.CompatRouter,null,e));var h=n(3);const m=({legacySwitch:e=!0,children:t})=>{const n=Object(i.useRouteMatch)();return e?Object(f.jsx)(i.Switch,null,t):Object(f.jsx)(O.Routes,null,r.Children.map(t,(e=>{if(o.a.isValidElement(e)&&e.type===b){var r;const s=Object(h.replace)(null==e?void 0:e.props.path,n.url+"/",""),u="function"==typeof(null==e?void 0:e.props.children)?null==e?void 0:e.props.children:null==e?void 0:e.props.render;return Object(f.jsx)(O.Route,{path:s,element:Object(f.jsx)(o.a.Fragment,null,Object(f.jsx)(v,null),(null==e||null===(r=e.props)||void 0===r?void 0:r.component)&&Object(f.jsx)(e.props.component,null)||u&&u()||t)})}return e})))};var g=n(22),y=n(23),T=n(1),_=n(24),R=n(25);function E({devTools:e,activeDevTool:t,updateRoute:n,theme$:o,appServices:s,location:u}){const{docTitleService:i,breadcrumbService:c}=s,l=Object(r.useRef)(null);return Object(r.useEffect)((()=>()=>{l.current&&l.current.unmountHandler()}),[]),Object(r.useEffect)((()=>{i.setTitle(t.title),c.setBreadcrumbs(t.title)}),[t,i,c]),Object(f.jsx)("main",{className:"devApp"},Object(f.jsx)(g.EuiTabs,{style:{paddingLeft:_.euiThemeVars.euiSizeS},size:"l"},e.map((e=>Object(f.jsx)(g.EuiTab,{key:e.id,disabled:e.isDisabled(),isSelected:e===t,onClick:()=>{e.isDisabled()||n(`/${e.id}`)}},Object(f.jsx)(g.EuiToolTip,{content:e.tooltipContent},Object(f.jsx)("span",null,e.title," ",e.isBeta&&Object(f.jsx)(g.EuiBetaBadge,{size:"s",className:"devApp__tabBeta",label:T.i18n.translate("devTools.badge.betaLabel",{defaultMessage:"Beta"})}))))))),Object(f.jsx)("div",{className:"devApp__container",role:"tabpanel","data-test-subj":t.id,ref:async e=>{if(e&&(null===l.current||l.current.devTool!==t||l.current.mountpoint!==e)){l.current&&l.current.unmountHandler();const n={element:e,location:u,theme$:o},r=await t.mount(n);l.current={devTool:t,mountpoint:e,unmountHandler:r}}}}))}function w(e,t,n,r,o,s,c){if(function(e){return!e.capabilities.dev_tools.show&&(e.navigateToApp("home"),!0)}(t))return()=>{};!function(e,t){e.capabilities.dev_tools.save||t.setBadge({text:T.i18n.translate("devTools.badge.readOnly.text",{defaultMessage:"Read only"}),tooltip:T.i18n.translate("devTools.badge.readOnly.tooltip",{defaultMessage:"Unable to save"}),iconType:"glasses"})}(t,n),u.a.render(Object(f.jsx)(y.I18nProvider,null,Object(f.jsx)(R.KibanaThemeProvider,{theme$:o},Object(f.jsx)(x,null,Object(f.jsx)(m,null,s.filter((e=>!e.isDisabled())).map((e=>Object(f.jsx)(b,{key:e.id,path:`/${e.id}`,exact:!e.enableRouting,render:t=>Object(f.jsx)(E,{updateRoute:t.history.push,location:t.location,activeDevTool:e,devTools:s,theme$:o,appServices:c})}))),Object(f.jsx)(b,{path:"/"},Object(f.jsx)(i.Redirect,{to:`/${s[0].id}`})))))),e);const l=r.listen((()=>{window.dispatchEvent(new HashChangeEvent("hashchange"))}));return()=>{n.docTitle.reset(),u.a.unmountComponentAtNode(e),l()}}}}]);