/*! 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. */ (window.securitySolutionServerless_bundle_jsonpfunction=window.securitySolutionServerless_bundle_jsonpfunction||[]).push([[4],Array(44).concat([function(t,e,n){t.exports=n(18)(284)},,,,,,,,,,,,function(t,e,n){var o=n(72),r=n(101);t.exports=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=o(t.prototype),i=t.apply(n,e);return r(i)?i:n}}},function(t,e,n){t.exports=n(18)(315)},function(t,e,n){t.exports=n(18)(1654)},,,,,,,,,,,,,function(t,e,n){var o=n(98),r=n(265),i=n(266),s=n(103),u=n(285),c=n(107),a=n(286),l=n(109),f=n(110),p=n(114),x=Math.max;t.exports=function(t,e,n,v,d,j,b,m){var h=2&e;if(!h&&"function"!=typeof t)throw new TypeError("Expected a function");var O=v?v.length:0;if(O||(e&=-97,v=d=void 0),b=void 0===b?b:x(p(b),0),m=void 0===m?m:p(m),O-=d?d.length:0,64&e){var g=v,_=d;v=d=void 0}var y=h?void 0:c(t),E=[t,e,n,v,d,g,_,j,b,m];if(y&&a(E,y),t=E[0],e=E[1],n=E[2],v=E[3],d=E[4],!(m=E[9]=void 0===E[9]?h?0:t.length:x(E[9]-O,0))&&24&e&&(e&=-25),e&&1!=e)I=8==e||16==e?i(t,e,m):32!=e&&33!=e||d.length?s.apply(void 0,E):u(t,e,n,v);else var I=r(t,e,n);return f((y?o:l)(I,E),t,e)}},function(t,e,n){t.exports=n(18)(3657)},function(t,e,n){var o=n(72),r=n(74),i=4294967295;function s(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=i,this.__views__=[]}s.prototype=o(r.prototype),s.prototype.constructor=s,t.exports=s},function(t,e){t.exports=function(){}},function(t,e,n){t.exports=n(18)(282)},function(t,e,n){t.exports=n(18)(3647)},function(t,e){var n="__lodash_placeholder__";t.exports=function(t,e){for(var o=-1,r=t.length,i=0,s=[];++o1&&N.reverse(),O&&m1?"& ":"")+e[r],e=e.join(o>2?", ":" "),t.replace(n,"{\n/* [wrapped with "+e+"] */\n")}},function(t,e,n){t.exports=n(18)(3674)},function(t,e,n){var o=n(111),r=n(279),i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];t.exports=function(t,e){return o(i,(function(n){var o="_."+n[0];e&n[1]&&!r(t,o)&&t.push(o)})),t.sort()}},function(t,e,n){var o=n(280);t.exports=function(t,e){return!(null==t||!t.length)&&o(t,e,0)>-1}},function(t,e,n){var o=n(281),r=n(282),i=n(283);t.exports=function(t,e,n){return e==e?i(t,e,n):o(t,r,n)}},function(t,e){t.exports=function(t,e,n,o){for(var r=t.length,i=n+(o?1:-1);o?i--:++i{const{euiTheme:n}=Object(i.useEuiTheme)();return Object(x.jsx)(i.EuiBetaBadge,{label:null!=t?t:v,size:"s",css:Object(x.css)("margin-left:",n.size.s,";color:",n.colors.text,";vertical-align:middle;margin-bottom:",n.size.xxs,";",""),className:e})};let j;!function(t){t.PANEL_NAVIGATION="panel_navigation_",t.PANEL_NAVIGATION_TOGGLE="panel_navigation_toggle_",t.NAVIGATION="navigation_"}(j||(j={}));const b=Object(o.createContext)(null),m=({children:t,tracker:e})=>Object(x.jsx)(b.Provider,{value:{tracker:e}},t),h=()=>{const t=Object(o.useContext)(b);if(!t)throw new Error("No TelemetryContext found.");return t};var O=n(60);const g="solutionSideNavPanelAccordion__button",_=r.a.memo((function({onClose:t,onOutsideClick:e,title:n,categories:s,items:u,bottomOffset:c,topOffset:l}){const{euiTheme:f}=Object(i.useEuiTheme)(),p=Object(i.useIsWithinMinBreakpoint)("l"),v=p?c:void 0,d=!v,j=((t,{$bottomOffset:e,$topOffset:n}={})=>Object(O.css)("position:fixed;top:",null!=n?n:"96px",";left:","249px",";bottom:0;width:","270px",";height:inherit;z-index:1000;background-color:",t.colors.body,";",null!=e&&`\n height: inherit;\n bottom: ${e};\n box-shadow:\n // left\n -${t.size.s} 0 ${t.size.s} -${t.size.s} rgb(0 0 0 / 15%),\n // right\n ${t.size.s} 0 ${t.size.s} -${t.size.s} rgb(0 0 0 / 15%),\n // bottom inset to match timeline bar top shadow\n inset 0 -6px ${t.size.xs} -${t.size.xs} rgb(0 0 0 / 15%);\n `," .solutionSideNavPanelLink{&:focus-within{background-color:transparent;a{text-decoration:auto;}}&:hover{background-color:",Object(i.transparentize)(t.colors.primary,.1),";a{text-decoration:underline;}}}",""))(f,{$bottomOffset:v,$topOffset:p?l:void 0}),b=a()("solutionSideNavPanel","eui-yScroll",j),m=a()((t=>Object(O.css)("padding-top:",t.size.s,";",""))(f)),h=Object(o.useCallback)((e=>{e.key===i.keys.ESCAPE&&t()}),[t]);return Object(x.jsx)(r.a.Fragment,null,Object(x.jsx)(i.EuiWindowEvent,{event:"keydown",handler:h}),Object(x.jsx)(i.EuiPortal,null,Object(x.jsx)(i.EuiFocusTrap,{autoFocus:!0},Object(x.jsx)(i.EuiOutsideClickDetector,{onOutsideClick:e},Object(x.jsx)(i.EuiPanel,{className:b,hasShadow:d,borderRadius:"none",paddingSize:"m","data-test-subj":"solutionSideNavPanel"},Object(x.jsx)(i.EuiFlexGroup,{direction:"column",gutterSize:"m",alignItems:"flexStart"},Object(x.jsx)(i.EuiFlexItem,null,Object(x.jsx)(i.EuiTitle,{size:"xs",className:m},Object(x.jsx)("strong",null,n))),Object(x.jsx)(i.EuiFlexItem,{style:{width:"100%"}},s?Object(x.jsx)(y,{categories:s,items:u,onClose:t}):Object(x.jsx)(N,{items:u,onClose:t}))))))))})),y=r.a.memo((function({categories:t,items:e,onClose:n}){return Object(x.jsx)(r.a.Fragment,null,t.map(((t,o)=>Object(p.f)(t)?Object(x.jsx)(I,{key:`${t.label}-${o}`,category:t,items:e,onClose:n}):Object(p.d)(t)?Object(x.jsx)(k,{key:`${t.label}-${o}`,category:t,items:e,onClose:n,index:o}):Object(p.e)(t)?Object(x.jsx)(w,{category:t,items:e,onClose:n,key:o}):null)))})),E=({items:t,linkIds:e})=>Object(o.useMemo)((()=>e.reduce(((e,n)=>{const o=t.find((t=>t.id===n));return o&&e.push(o),e}),[])),[t,e]),I=r.a.memo((function({category:{linkIds:t,label:e},items:n,onClose:o}){const{euiTheme:s}=Object(i.useEuiTheme)(),u=a()((t=>Object(O.css)("text-transform:uppercase;color:",t.colors.darkShade,";padding-left:",t.size.s,";padding-bottom:",t.size.s,";",Object(i.euiFontSize)({euiTheme:t},"xxs")," font-weight:",t.font.weight.medium,";",""))(s)),c=E({items:n,linkIds:t});return null!=c&&c.length?Object(x.jsx)(r.a.Fragment,null,Object(x.jsx)(i.EuiSpacer,{size:"l"}),Object(x.jsx)(i.EuiTitle,{size:"xxxs",className:u},Object(x.jsx)("h2",null,e)),Object(x.jsx)(N,{items:c,onClose:o})):null})),k=r.a.memo((function({category:{label:t,categories:e},items:n,onClose:o,index:s}){const{euiTheme:u}=Object(i.useEuiTheme)(),c=a()((t=>Object(O.css)(".",g,"{font-weight:",t.font.weight.bold,";",Object(i.euiFontSize)({euiTheme:t},"xs"),";}",""))(u));return Object(x.jsx)(r.a.Fragment,null,s>0&&Object(x.jsx)(i.EuiHorizontalRule,{margin:"xs"}),Object(x.jsx)(i.EuiSpacer,{size:"m"}),Object(x.jsx)(i.EuiAccordion,{id:t,buttonContent:t,className:c,buttonClassName:g},e&&Object(x.jsx)(y,{categories:e,items:n,onClose:o})))})),w=r.a.memo((function({category:{linkIds:t},items:e,onClose:n}){const o=E({items:e,linkIds:t});return null!=o&&o.length?Object(x.jsx)(r.a.Fragment,null,Object(x.jsx)(i.EuiSpacer,{size:"m"}),Object(x.jsx)(N,{items:o,onClose:n})):null})),N=r.a.memo((function({items:t,onClose:e}){const{euiTheme:n}=Object(i.useEuiTheme)(),o=a()(Object(O.css)({name:"127vvv2",styles:"padding-left:0;padding-right:0"}));return Object(x.jsx)(i.EuiListGroup,{className:o},t.map((t=>Object(x.jsx)(S,{key:t.id,item:t,onClose:e}))))})),S=r.a.memo((function({item:t,onClose:e}){const{tracker:n}=h(),r=a()("solutionSideNavPanelLink"),{id:s,href:u,onClick:c,iconType:f,openInNewTab:p}=t,v=Object(o.useCallback)((t=>{null==n||n(l.METRIC_TYPE.CLICK,`${j.PANEL_NAVIGATION}${s}`),e(),null==c||c(t)}),[s,c,e,n]);return Object(x.jsx)(i.EuiListGroupItem,{key:s,label:Object(x.jsx)(C,{item:t}),wrapText:!0,className:r,size:"s","data-test-subj":`solutionSideNavPanelLink-${s}`,href:u,iconType:f,onClick:v,target:p?"_blank":void 0})})),C=r.a.memo((function({item:{label:t,openInNewTab:e,isBeta:n,betaOptions:o}}){return Object(x.jsx)(r.a.Fragment,null,t," ",e&&Object(x.jsx)(i.EuiIcon,{type:"popout",size:"s"}),n&&Object(x.jsx)(d,{text:null==o?void 0:o.text}))}));var z=n(68);const T=f.i18n.translate("securitySolutionPackages.sideNav.togglePanel",{defaultMessage:"Toggle panel nav"}),P=r.a.memo((function({items:t,categories:e,selectedId:n,panelBottomOffset:r,panelTopOffset:s,tracker:c}){const a=Object(i.useIsWithinBreakpoints)(["xs","s"]),[l,f]=Object(o.useState)(null),p=Object(o.useRef)(null),v=t=>{p.current=t,f(t)},d=Object(o.useCallback)((()=>{p.current=null,f(null)}),[]),j=Object(o.useCallback)((()=>{const t=p.current;setTimeout((()=>{p.current===t&&d()}))}),[d]),[b,h]=Object(o.useMemo)((()=>u()((({position:t=z.a.top})=>t===z.a.top),t)),[t]);return Object(x.jsx)(m,{tracker:c},Object(x.jsx)(i.EuiFlexGroup,{gutterSize:"none",direction:"column"},Object(x.jsx)(i.EuiFlexItem,null,Object(x.jsx)(i.EuiFlexGroup,{gutterSize:"none",direction:"column"},Object(x.jsx)(i.EuiFlexItem,{grow:!1},Object(x.jsx)(A,{items:b,categories:e,selectedId:n,activePanelNavId:l,isMobileSize:a,onOpenPanelNav:v})),Object(x.jsx)(i.EuiFlexItem,null),Object(x.jsx)(i.EuiFlexItem,{grow:!1},Object(x.jsx)(A,{items:h,selectedId:n,activePanelNavId:l,isMobileSize:a,onOpenPanelNav:v}))))),Object(x.jsx)($,{items:t,activePanelNavId:l,onClose:d,onOutsideClick:j,bottomOffset:r,topOffset:s}))})),A=r.a.memo((function({items:t,categories:e,selectedId:n,activePanelNavId:o,isMobileSize:s,onOpenPanelNav:u}){return null!=e&&e.length?Object(x.jsx)(r.a.Fragment,null,null==e?void 0:e.map(((e,c)=>{const a=e.linkIds.reduce(((e,n)=>{const o=t.find((t=>t.id===n));return o&&e.push(o),e}),[]);return a.length?Object(x.jsx)(r.a.Fragment,{key:c},0!==c&&Object(x.jsx)(i.EuiSpacer,{size:"s"}),a.map((t=>Object(x.jsx)(F,{key:t.id,item:t,isSelected:n===t.id,isActive:o===t.id,isMobileSize:s,onOpenPanelNav:u}))),Object(x.jsx)(i.EuiSpacer,{size:"s"})):null}))):Object(x.jsx)(r.a.Fragment,null,t.map((t=>Object(x.jsx)(F,{key:t.id,item:t,isSelected:n===t.id,isActive:o===t.id,isMobileSize:s,onOpenPanelNav:u}))))})),F=r.a.memo((function({item:t,isSelected:e,isActive:n,isMobileSize:s,onOpenPanelNav:u}){const{euiTheme:c}=Object(i.useEuiTheme)(),{tracker:f}=h(),{id:p,href:v,label:d,items:b,onClick:m,iconType:g,appendSeparator:_}=t,y=(t=>Object(O.css)("*{font-weight:",t.font.weight.regular,";}&.solutionSideNavItem--isSelected{background-color:",Object(i.transparentize)(t.colors.lightShade,.5),";& *{font-weight:",t.font.weight.medium,";}}span.euiListGroupItem__label{width:100%;}",""))(c),E=a()("solutionSideNavItem",{"solutionSideNavItem--isSelected":e},y),I=a()("solutionSideNavItemButton"),k=Object(o.useMemo)((()=>!s&&null!=b&&b.length>0),[b,s]),w=Object(o.useCallback)((t=>{null==f||f(l.METRIC_TYPE.CLICK,`${j.NAVIGATION}${p}`),null==m||m(t)}),[p,m,f]),N=Object(o.useCallback)((()=>{null==f||f(l.METRIC_TYPE.CLICK,`${j.PANEL_NAVIGATION_TOGGLE}${p}`),u(p)}),[p,u,f]),S=Object(o.useMemo)((()=>null==g?d:Object(x.jsx)(i.EuiFlexGroup,{alignItems:"center",gutterSize:"none"},Object(x.jsx)(i.EuiFlexItem,null,d),Object(x.jsx)(i.EuiFlexItem,{grow:0},Object(x.jsx)(i.EuiIcon,{type:g,color:"text"})))),[d,g]);return Object(x.jsx)(r.a.Fragment,null,Object(x.jsx)(i.EuiFlexGroup,{alignItems:"center",gutterSize:"xs"},Object(x.jsx)(i.EuiFlexItem,null,Object(x.jsx)(i.EuiListGroup,{gutterSize:"none"},Object(x.jsx)(i.EuiListGroupItem,{label:S,href:v,wrapText:!0,onClick:w,className:E,color:"text",size:"s","data-test-subj":`solutionSideNavItemLink-${p}`}))),k&&Object(x.jsx)(i.EuiFlexItem,{grow:0},Object(x.jsx)(i.EuiButtonIcon,{className:I,display:n?"base":"empty",size:"s",color:"text",onClick:N,iconType:"spaces",iconSize:"m","aria-label":T,"data-test-subj":`solutionSideNavItemButton-${p}`}))),_?Object(x.jsx)(i.EuiHorizontalRule,{margin:"xs"}):Object(x.jsx)(i.EuiSpacer,{size:"xs"}))})),$=r.a.memo((function({items:t,activePanelNavId:e,onClose:n,onOutsideClick:r,bottomOffset:i,topOffset:s}){var u;const c=Object(o.useMemo)((()=>t.find((({id:t})=>t===e))),[t,e]);return null!=c&&null!==(u=c.items)&&void 0!==u&&u.length?Object(x.jsx)(_,{onClose:n,onOutsideClick:r,items:c.items,title:c.label,categories:c.categories,bottomOffset:i,topOffset:s}):null}));e.default=P}])]);