/*! 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.cases_bundle_jsonpfunction=window.cases_bundle_jsonpfunction||[]).push([[6],{142:function(e,t,a){"use strict";a.r(t),a.d(t,"CasesRoutes",(function(){return Ne})),a.d(t,"default",(function(){return Ne}));var n=a(2),s=a.n(n),i=a(17),c=a(92),r=a(133),o=a(15),l=a(33),u=a(240),d=a(53),p=a.n(d),m=a(227),g=a(130),b=a(1);const E=b.i18n.translate("xpack.cases.callout.updateToPlatinumTitle",{defaultMessage:"Upgrade to an appropriate license"}),f=b.i18n.translate("xpack.cases.callout.appropriateLicense",{defaultMessage:"appropriate license"}),h=b.i18n.translate("xpack.cases.callout.cloudDeploymentLink",{defaultMessage:"cloud deployment"}),y=()=>s.a.createElement(o.EuiCallOut,{title:E,id:"case-callout-license-info",iconType:"gear","data-test-subj":"case-callout-license-info"},s.a.createElement(g.FormattedMessage,{defaultMessage:"Assigning users to cases or opening cases in external systems is available when you have the {appropriateLicense}, are using a {cloud}, or are testing out a Free Trial.",id:"xpack.cases.platinumLicenseCalloutMessage",values:{appropriateLicense:s.a.createElement(o.EuiLink,{href:"https://www.elastic.co/subscriptions",target:"_blank"},f),cloud:s.a.createElement(o.EuiLink,{href:"https://www.elastic.co/cloud/elasticsearch-service/signup",target:"_blank"},h)}}));y.displayName="PlatinumLicenseCalloutComponent";const C=s.a.memo(y),j=()=>{const{euiTheme:e}=Object(o.useEuiTheme)(),{isAtLeastPlatinum:t}=Object(m.a)();return t()?null:s.a.createElement(w,{gutterSize:"none","data-test-subj":"case-callouts",$_css:e.size.l},s.a.createElement(o.EuiFlexItem,null,s.a.createElement(C,null)))};j.displayName="CaseCalloutsComponent";const x=s.a.memo(j);var w=p()(o.EuiFlexGroup).withConfig({displayName:"_StyledEuiFlexGroup",componentId:"sc-9o4tah-0"})((e=>({marginBottom:e.$_css}))),v=a(190),k=a(241),O=a(253),T=a(192),F=a(77),I=a(24),N=a(153),L=a(32);const S=p()(o.EuiFlexGroup).withConfig({displayName:"ButtonFlexGroup",componentId:"sc-n9ygdy-0"})(["",""],(({theme:e})=>Object(d.css)(["&{@media only screen and (max-width:","){flex-direction:column;}}"],e.eui.euiBreakpoints.s))),M=({actionsErrors:e})=>{const{permissions:t}=Object(L.a)(),{getCreateCaseUrl:a,navigateToCreateCase:i}=Object(l.m)(),c=Object(n.useCallback)((e=>{e.preventDefault(),i()}),[i]);return t.create||t.update?s.a.createElement(o.EuiFlexItem,null,s.a.createElement(S,{responsive:!1},t.update&&s.a.createElement(o.EuiFlexItem,{grow:!1},s.a.createElement(N.b,{label:F.l,isDisabled:!Object(I.isEmpty)(e),showToolTip:!Object(I.isEmpty)(e),msgTooltip:Object(I.isEmpty)(e)?s.a.createElement(s.a.Fragment,null):s.a.createElement(s.a.Fragment,null,e[0].description),titleTooltip:Object(I.isEmpty)(e)?"":e[0].title})),t.create&&s.a.createElement(o.EuiFlexItem,null,s.a.createElement(N.d,{fill:!0,onClick:c,href:a(),iconType:"plusInCircle","data-test-subj":"createNewCaseBtn"},F.n)))):null};M.displayName="NavButtons";const B=({actionsErrors:e})=>s.a.createElement(T.a,{title:F.A,border:!0,"data-test-subj":"cases-all-title"},s.a.createElement(o.EuiFlexGroup,{alignItems:"center",gutterSize:"m",wrap:!0,"data-test-subj":"all-cases-header"},s.a.createElement(M,{actionsErrors:e})));B.displayName="CasesTableHeader";const z=()=>{Object(v.a)(l.a.cases);const{data:e=null}=Object(u.a)(),t=Object(n.useMemo)((()=>Object(k.a)(e)),[e]);return s.a.createElement(s.a.Fragment,null,s.a.createElement(x,null),s.a.createElement(B,{actionsErrors:t}),s.a.createElement(O.a,null))};z.displayName="AllCases";var P=a(131),D=a(129),_=a(149),A=a(254);Object(D.getUseField)({component:P.Field});const G=s.a.memo((({afterCaseCreated:e,onCancel:t,onSuccess:a,timelineIntegration:n,withSteps:i})=>(Object(v.a)(l.a.casesCreate),s.a.createElement(o.EuiPageSection,{restrictWidth:!0},s.a.createElement(T.a,{showBackButton:!0,"data-test-subj":"case-create-title",title:_.j}),s.a.createElement(A.a,{afterCaseCreated:e,onCancel:t,onSuccess:a,timelineIntegration:n,withSteps:i})))));G.displayName="CreateCase";var R=a(136),V=a(5),W=a(43),U=a(45),H=a(204),q=a(74),X=a(236),K=a(194),Q=a(234),$=a(160),Z=a(4);const J=({isLoading:e,casesField:t,selectedActionType:a,selectedThirdParty:i})=>{const c=Object(n.useMemo)((()=>Object(I.capitalize)(a)),[a]);return s.a.createElement(o.EuiFlexGroup,{"data-test-subj":"static-mappings",alignItems:"center",responsive:!1},s.a.createElement(o.EuiFlexItem,null,s.a.createElement(o.EuiFlexGroup,{component:"span",justifyContent:"spaceBetween",responsive:!1},s.a.createElement(o.EuiFlexItem,{component:"span",grow:!1},s.a.createElement(o.EuiCode,{"data-test-subj":"field-mapping-source"},t)),s.a.createElement(o.EuiFlexItem,{component:"span",grow:!1},s.a.createElement(o.EuiIcon,{type:"sortRight"})))),s.a.createElement(o.EuiFlexItem,null,s.a.createElement(o.EuiFlexGroup,{component:"span",justifyContent:"spaceBetween",responsive:!1},s.a.createElement(o.EuiFlexItem,{component:"span",grow:!1},e?s.a.createElement(o.EuiLoadingSpinner,{size:"m"}):s.a.createElement(o.EuiCode,{"data-test-subj":"field-mapping-target"},i)))),s.a.createElement(o.EuiFlexItem,null,e?s.a.createElement(o.EuiLoadingSpinner,{size:"m"}):c))};J.displayName="FieldMappingRow";const Y=s.a.memo(J),ee=p.a.div.withConfig({displayName:"FieldRowWrapper",componentId:"sc-i16y6l-0"})(["margin:10px 0;font-size:14px;"]),te=({actionTypeName:e,isLoading:t,mappings:a})=>a.length?s.a.createElement(o.EuiFlexGroup,{direction:"column",gutterSize:"none"},s.a.createElement(o.EuiFlexItem,null," ",s.a.createElement(o.EuiFlexGroup,{responsive:!1},s.a.createElement(o.EuiFlexItem,null,s.a.createElement("span",{className:"euiFormLabel"},$.m)),s.a.createElement(o.EuiFlexItem,{"data-test-subj":"case-configure-field-mappings-second-col-label"},s.a.createElement("span",{className:"euiFormLabel"},$.n(e))),s.a.createElement(o.EuiFlexItem,null,s.a.createElement("span",{className:"euiFormLabel"},$.o)))),s.a.createElement(o.EuiFlexItem,null,s.a.createElement(ee,{"data-test-subj":"case-configure-field-mappings-row-wrapper"},a.map((e=>{var a;return s.a.createElement(Y,{key:`${e.source}`,casesField:e.source,isLoading:t,selectedActionType:e.actionType,selectedThirdParty:null!==(a=e.target)&&void 0!==a?a:"not_mapped"})}))))):null;te.displayName="FieldMapping";const ae=s.a.memo(te),ne=({actionTypeName:e,connectorType:t,isLoading:a,mappings:i})=>{const c=Object(n.useMemo)((()=>i.length>0||a?{desc:$.k(e),color:"subdued"}:t===Z.h.casesWebhook?{desc:$.b,color:"subdued"}:{desc:$.l(e),color:"danger"}),[i.length,a,e,t]);return s.a.createElement(o.EuiFlexGroup,{direction:"column",gutterSize:"none"},s.a.createElement(o.EuiFlexItem,{grow:!1},s.a.createElement(o.EuiText,{size:"xs","data-test-subj":"field-mapping-text"},s.a.createElement("h4",null,$.p(e)),s.a.createElement(o.EuiTextColor,{"data-test-subj":"field-mapping-desc",color:c.color},c.desc))),s.a.createElement(o.EuiFlexItem,{grow:!1},s.a.createElement(ae,{actionTypeName:e,"data-test-subj":"case-mappings-field",isLoading:a,mappings:i})))};ne.displayName="Mapping";const se=s.a.memo(ne);var ie=a(152),ce=a(58);const re=p()(o.EuiFormRow).withConfig({displayName:"EuiFormRowExtended",componentId:"sc-1k8uvpd-0"})([".euiFormRow__labelWrapper{.euiFormRow__label{width:100%;}}"]),oe=({actionTypes:e,connectors:t,disabled:a,handleShowEditFlyout:i,isLoading:c,mappings:r,onChangeConnector:l,selectedConnector:u,updateConnectorDisabled:d})=>{var p;const{actions:m}=Object(V.c)(),g=Object(n.useMemo)((()=>t.find((e=>e.id===u.id))),[t,u.id]),{permissions:b}=Object(L.a)(),E=b.connectors&&m.read,f=null!==(p=null==g?void 0:g.name)&&void 0!==p?p:"none",h=Object(n.useMemo)((()=>{var t,a;return null!==(t=null===(a=e.find((e=>e.id===u.type)))||void 0===a?void 0:a.name)&&void 0!==t?t:$.w}),[e,u.type]),y=Object(n.useMemo)((()=>s.a.createElement(o.EuiFlexGroup,{justifyContent:"spaceBetween"},s.a.createElement(o.EuiFlexItem,{grow:!1},$.r),s.a.createElement(o.EuiFlexItem,{grow:!1},"none"!==f&&s.a.createElement(o.EuiLink,{disabled:d,onClick:i,"data-test-subj":"case-configure-update-selected-connector-button"},$.x(f))))),[f,i,d]);return s.a.createElement(s.a.Fragment,null,s.a.createElement(o.EuiDescribedFormGroup,{fullWidth:!0,title:s.a.createElement("h3",null,$.s),description:$.q,"data-test-subj":"case-connectors-form-group"},s.a.createElement(re,{fullWidth:!0,label:y,"data-test-subj":"case-connectors-form-row"},s.a.createElement(o.EuiFlexGroup,{direction:"column"},s.a.createElement(o.EuiFlexItem,{grow:!1},E?s.a.createElement(Q.a,{connectors:t,disabled:a,selectedConnector:u.id,isLoading:c,onChange:l,"data-test-subj":"case-connectors-dropdown",appendAddConnectorButton:!0}):s.a.createElement(o.EuiText,{"data-test-subj":"configure-case-connector-permissions-error-msg",size:"s"},s.a.createElement("span",null,$.v))),u.type!==Z.h.none&&Object(ce.g)(g)&&s.a.createElement(o.EuiFlexItem,{grow:!1},s.a.createElement(ie.a,null)),u.type!==Z.h.none?s.a.createElement(o.EuiFlexItem,{grow:!1},s.a.createElement(se,{actionTypeName:h,connectorType:u.type,isLoading:c,mappings:r})):null))))};oe.displayName="Connectors";const le=s.a.memo(oe),ue=[{id:"close-by-user",label:$.e},{id:"close-by-pushing",label:$.f}],de=({closureTypeSelected:e,disabled:t,onChangeClosureType:a})=>{const i=Object(n.useCallback)((e=>{a(e)}),[a]);return s.a.createElement(o.EuiRadioGroup,{disabled:t,options:ue,idSelected:e,onChange:i,name:"closure_options","data-test-subj":"closure-options-radio-group"})};de.displayName="ClosureOptionsRadio";const pe=s.a.memo(de),me=({closureTypeSelected:e,disabled:t,onChangeClosureType:a})=>s.a.createElement(o.EuiDescribedFormGroup,{fullWidth:!0,title:s.a.createElement("h3",null,$.g),description:s.a.createElement(s.a.Fragment,null,s.a.createElement("p",null,$.c)),"data-test-subj":"case-closure-options-form-group"},s.a.createElement(o.EuiFormRow,{fullWidth:!0,label:$.d,"data-test-subj":"case-closure-options-form-row"},s.a.createElement(pe,{closureTypeSelected:e,disabled:t,onChangeClosureType:a,"data-test-subj":"case-closure-options-radio"})));me.displayName="ClosureOptions";const ge=s.a.memo(me);var be=a(211),Ee=a(189);const fe=p.a.div.withConfig({displayName:"FormWrapper",componentId:"sc-1f5ixl3-0"})(["",""],(({theme:e})=>Object(d.css)(["& > *{margin-top 40px;}& > :first-child{margin-top:0;}padding-top:",";padding-bottom:",";.euiFlyout{z-index:",";}"],e.eui.euiSizeXL,e.eui.euiSizeXL,e.eui.euiZNavigation+1))),he=s.a.memo((()=>{const{permissions:e}=Object(L.a)(),{triggersActionsUi:t}=Object(V.g)().services;Object(v.a)(l.a.casesConfigure);const[a,i]=Object(n.useState)(!0),[c,r]=Object(n.useState)(!1),[u,d]=Object(n.useState)(!1),[p,m]=Object(n.useState)(null),{connector:b,closureType:E,loading:f,mappings:h,persistLoading:y,persistCaseConfigure:C,refetchCaseConfigure:j,setConnector:x,setClosureType:w}=Object(X.a)(),{isLoading:k,data:O=[],refetch:F}=Object(Ee.a)(),{isLoading:I,data:N=[],refetch:S}=(()=>{const e=Object(V.j)();return Object(W.useQuery)(q.d.connectorTypes(),(({signal:e})=>Object(H.a)({signal:e})),{initialData:[],onError:t=>{e.addError(t.body&&t.body.message?new Error(t.body.message):t,{title:U.e})}})})(),M=Object(n.useCallback)((async e=>{m(e),F(),S(),j()}),[S,j,F,m]),B=Object(n.useCallback)((async e=>{const t=Object(be.b)(e);await C({connector:t,closureType:E}),M(e),x(t)}),[M,E,x,C]),z=k||y||f||I,P=z||!a||"none"===b.id,D=Object(n.useCallback)((()=>{d(!0)}),[]),_=Object(n.useCallback)((()=>r(!1)),[r]),A=Object(n.useCallback)((()=>d(!1)),[]),G=Object(n.useCallback)((e=>{if("add-connector"===e)return void r(!0);const t=Object(ce.b)(e,O),a=null!=t?Object(be.b)(t):Object(be.a)();x(a),C({connector:a,closureType:E})}),[O,E,C,x]),Q=Object(n.useCallback)((e=>{w(e),C({connector:b,closureType:e})}),[b,C,w]);Object(n.useEffect)((()=>{k||"none"===b.id||O.some((e=>e.id===b.id))?k||"none"!==b.id&&!O.some((e=>e.id===b.id))||i(!0):i(!1)}),[O,b,k]),Object(n.useEffect)((()=>{k||"none"===b.id||m(Object(be.c)(O,b))}),[O,b,k]);const Z=Object(n.useMemo)((()=>c?t.getAddConnectorFlyout({onClose:_,featureId:R.CasesConnectorFeatureId,onConnectorCreated:B}):null),[c]),J=Object(n.useMemo)((()=>p&&u?t.getEditConnectorFlyout({connector:p,onClose:A,onConnectorUpdated:M}):null),[b.id,p,u]);return s.a.createElement(s.a.Fragment,null,s.a.createElement(T.a,{border:!0,showBackButton:!0,"data-test-subj":"case-configure-title",title:$.h}),s.a.createElement(o.EuiPageBody,{restrictWidth:!0},s.a.createElement(fe,null,!a&&s.a.createElement(K.a,{style:{marginTop:0}},s.a.createElement(o.EuiCallOut,{title:$.y,color:"warning",iconType:"help","data-test-subj":"configure-cases-warning-callout"},s.a.createElement(g.FormattedMessage,{defaultMessage:"The selected connector has been deleted or you do not have the {appropriateLicense} to use it. Either select a different connector or create a new one.",id:"xpack.cases.configure.connectorDeletedOrLicenseWarning",values:{appropriateLicense:s.a.createElement(o.EuiLink,{href:"https://www.elastic.co/subscriptions",target:"_blank"},$.t)}}))),s.a.createElement(K.a,null,s.a.createElement(ge,{closureTypeSelected:E,disabled:y||k||!e.update,onChangeClosureType:Q})),s.a.createElement(K.a,null,s.a.createElement(le,{actionTypes:N,connectors:null!=O?O:[],disabled:y||k||!e.update,handleShowEditFlyout:D,isLoading:z,mappings:h,onChangeConnector:G,selectedConnector:b,updateConnectorDisabled:P||!e.update})),Z,J)))}));he.displayName="ConfigureCases";const ye=e=>b.i18n.translate("xpack.cases.noPrivileges.message",{values:{pageName:e},defaultMessage:"To view {pageName} page, you must update privileges. For more information, contact your Kibana administrator."}),Ce=b.i18n.translate("xpack.cases.noPrivileges.title",{defaultMessage:"Privileges required"}),je=b.i18n.translate("xpack.cases.noPrivileges.button",{defaultMessage:"Back to Cases"}),xe=s.a.memo((({pageName:e})=>{const{navigateToAllCases:t}=Object(l.i)();return s.a.createElement(o.EuiEmptyPrompt,{iconColor:"default",iconType:"casesApp",title:s.a.createElement("h2",null,Ce),titleSize:"xs",body:s.a.createElement("p",null,ye(e)),actions:s.a.createElement(o.EuiButton,{onClick:t,size:"s",color:"primary",fill:!0},je)})}));xe.displayName="NoPrivilegesPage";const we=b.i18n.translate("xpack.cases.createCase",{defaultMessage:"Create Case"}),ve=b.i18n.translate("xpack.cases.configureCases",{defaultMessage:"Configure Cases"}),ke=b.i18n.translate("xpack.cases.badge.readOnly.text",{defaultMessage:"Read only"}),Oe=b.i18n.translate("xpack.cases.badge.readOnly.tooltip",{defaultMessage:"Unable to create or edit cases"});var Te=a(165);const Fe=Object(n.lazy)((()=>a.e(5).then(a.bind(null,331)))),Ie=({onComponentInitialized:e,actionsNavigation:t,ruleDetailsNavigation:a,showAlertDetails:u,useFetchAlertData:d,refreshRef:p,timelineIntegration:m})=>{const{basePath:g,permissions:b}=Object(L.a)(),{navigateToAllCases:E}=Object(l.i)(),{navigateToCaseView:f}=Object(l.j)();!function(){const{permissions:e}=Object(L.a)(),t=Object(V.g)().services.chrome,a=Object(n.useCallback)((()=>{Object(Te.c)(e)&&t.setBadge({text:ke,tooltip:Oe,iconType:"glasses"})}),[t,e]);Object(n.useEffect)((()=>(a(),()=>{t.setBadge()})),[a,t])}();const h=Object(n.useCallback)((async({id:e})=>f({detailName:e})),[f]);return s.a.createElement(s.a.Fragment,null,s.a.createElement(r.ReactQueryDevtools,{initialIsOpen:!1}),s.a.createElement(c.c,null,s.a.createElement(c.a,{strict:!0,exact:!0,path:g},s.a.createElement(z,null)),s.a.createElement(c.a,{path:Object(l.h)(g)},b.create?s.a.createElement(G,{onSuccess:h,onCancel:E,timelineIntegration:m}):s.a.createElement(xe,{pageName:we})),s.a.createElement(c.a,{path:Object(l.f)(g)},b.update?s.a.createElement(he,null):s.a.createElement(xe,{pageName:ve})),s.a.createElement(c.a,{exact:!0,path:[Object(l.e)(g),Object(l.d)(g)]},s.a.createElement(n.Suspense,{fallback:s.a.createElement(o.EuiLoadingSpinner,null)},s.a.createElement(Fe,{onComponentInitialized:e,actionsNavigation:t,ruleDetailsNavigation:a,showAlertDetails:u,useFetchAlertData:d,refreshRef:p,timelineIntegration:m}))),s.a.createElement(c.a,{path:g},s.a.createElement(i.Redirect,{to:g}))))};Ie.displayName="CasesRoutes";const Ne=s.a.memo(Ie)},152:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(2),s=a.n(n),i=a(15),c=a(1);const r=c.i18n.translate("xpack.cases.connectors.serviceNow.deprecatedConnectorWarningTitle",{defaultMessage:"This connector type is deprecated"}),o=c.i18n.translate("xpack.cases.connectors.serviceNow.deprecatedConnectorWarningDesc",{defaultMessage:"Update this connector, or create a new one."}),l=({type:e="warning"})=>s.a.createElement(i.EuiCallOut,{title:r,color:e,iconType:"warning","data-test-subj":"deprecated-connector-warning-callout"},o);l.displayName="DeprecatedCallout";const u=s.a.memo(l)},155:function(e,t,a){"use strict";a.d(t,"g",(function(){return i})),a.d(t,"j",(function(){return c})),a.d(t,"i",(function(){return r})),a.d(t,"h",(function(){return o})),a.d(t,"a",(function(){return l})),a.d(t,"e",(function(){return u})),a.d(t,"f",(function(){return d})),a.d(t,"d",(function(){return p})),a.d(t,"b",(function(){return m}));var n=a(1),s=a(22);a.d(t,"c",(function(){return s.K}));const i=e=>"none"===e?n.i18n.translate("xpack.cases.caseView.pushThirdPartyIncident",{defaultMessage:"Push as external incident"}):n.i18n.translate("xpack.cases.caseView.pushNamedIncident",{values:{thirdParty:e},defaultMessage:"Push as { thirdParty } incident"}),c=e=>"none"===e?n.i18n.translate("xpack.cases.caseView.updateThirdPartyIncident",{defaultMessage:"Update external incident"}):n.i18n.translate("xpack.cases.caseView.updateNamedIncident",{values:{thirdParty:e},defaultMessage:"Update { thirdParty } incident"}),r=e=>"none"===e?n.i18n.translate("xpack.cases.caseView.lockedIncidentTitleNone",{defaultMessage:"External incident is up to date"}):n.i18n.translate("xpack.cases.caseView.lockedIncidentTitle",{values:{thirdParty:e},defaultMessage:"{ thirdParty } incident is up to date"}),o=n.i18n.translate("xpack.cases.caseView.lockedIncidentDesc",{defaultMessage:"No update is required"}),l=n.i18n.translate("xpack.cases.caseView.pushToService.configureConnector",{defaultMessage:"To create and update a case in an external system, select a connector."}),u=n.i18n.translate("xpack.cases.caseView.pushToServiceDisableByConfigTitle",{defaultMessage:"Enable external service in Kibana configuration file"}),d=n.i18n.translate("xpack.cases.caseView.pushToServiceDisableByLicenseTitle",{defaultMessage:"Upgrade to an appropriate license"}),p=n.i18n.translate("xpack.cases.caseView.cloudDeploymentLink",{defaultMessage:"cloud deployment"}),m=n.i18n.translate("xpack.cases.caseView.actionsConfigurationLink",{defaultMessage:"Alerting and action settings in Kibana"})},190:function(e,t,a){"use strict";a.d(t,"a",(function(){return u})),a.d(t,"b",(function(){return d}));var n=a(1),s=a(2),i=a(5),c=a(33),r=a(32);const o={[c.a.cases]:n.i18n.translate("xpack.cases.breadcrumbs.all_cases",{defaultMessage:"Cases"}),[c.a.casesCreate]:n.i18n.translate("xpack.cases.breadcrumbs.create_case",{defaultMessage:"Create"}),[c.a.casesConfigure]:n.i18n.translate("xpack.cases.breadcrumbs.configure_cases",{defaultMessage:"Configure"})},l=()=>{const{chrome:{docTitle:e,setBreadcrumbs:t},application:{navigateToUrl:a}}=Object(i.g)().services;return Object(s.useCallback)((n=>{e.change(function(e){return e.map((({text:e})=>{var t;return null!==(t=null==e?void 0:e.toString())&&void 0!==t?t:""})).reverse()}(n)),t(n.map((e=>{const{href:t,onClick:n}=e;return{...e,...t&&!n?{onClick:e=>{e&&e.preventDefault(),a(t)}}:{}}})))}),[e,t,a])},u=e=>{const{appId:t,appTitle:a}=Object(r.a)(),{getAppUrl:n}=Object(i.h)(t),u=l();Object(s.useEffect)((()=>{var t;u([{text:a,href:n()},{text:o[c.a.cases],...e!==c.a.cases?{href:n({deepLinkId:c.a.cases})}:{}},...e!==c.a.cases?[{text:o[e]}]:[]]),null===(t=i.b.get().serverless)||void 0===t||t.setBreadcrumbs([])}),[e,a,n,u])},d=e=>{const{appId:t,appTitle:a}=Object(r.a)(),{getAppUrl:n}=Object(i.h)(t),u=l();Object(s.useEffect)((()=>{var t;const s={text:e},r=[{text:a,href:n()},{text:o[c.a.cases],href:n({deepLinkId:c.a.cases})},s];u(r),null===(t=i.b.get().serverless)||void 0===t||t.setBreadcrumbs([s])}),[e,a,n,u])}},191:function(e,t,a){"use strict";a.d(t,"e",(function(){return i})),a.d(t,"d",(function(){return c})),a.d(t,"c",(function(){return r})),a.d(t,"b",(function(){return o}));var n=a(1),s=a(22);a.d(t,"a",(function(){return s.l})),a.d(t,"f",(function(){return s.N})),a.d(t,"g",(function(){return s.pb})),n.i18n.translate("xpack.cases.header.editableTitle.save",{defaultMessage:"Save"}),n.i18n.translate("xpack.cases.header.editableTitle.cancel",{defaultMessage:"Cancel"});const i=n.i18n.translate("xpack.cases.header.badge.experimentalLabel",{defaultMessage:"Technical preview"}),c=n.i18n.translate("xpack.cases.header.badge.experimentalDesc",{defaultMessage:"This functionality is in technical preview and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but features in technical preview are not subject to the support SLA of official GA features."}),r=n.i18n.translate("xpack.cases.header.badge.betaLabel",{defaultMessage:"Beta"}),o=n.i18n.translate("xpack.cases.header.badge.betaDesc",{defaultMessage:"This feature is currently in beta. If you encounter any bugs or have feedback, please open an issue or visit our discussion forum."})},192:function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(53),s=a.n(n),i=a(2),c=a.n(i),r=a(15),o=a(33);const l=s()((({iconSide:e,children:t,...a})=>c.a.createElement(r.EuiLink,a,t))).withConfig({displayName:"Link",componentId:"sc-8ljuz4-0"})(["",""],(({iconSide:e,theme:t})=>Object(n.css)(["align-items:center;display:inline-flex;vertical-align:top;white-space:nowrap;"," ",""],"left"===e&&Object(n.css)([".euiIcon{margin-right:",";}"],t.eui.euiSizeXS),"right"===e&&Object(n.css)(["flex-direction:row-reverse;.euiIcon{margin-left:",";}"],t.eui.euiSizeXS))));l.displayName="Link";const u=c.a.memo((({ariaLabel:e,children:t,color:a,dataTestSubj:n,disabled:s,href:o,iconSide:u="left",iconSize:d="s",iconType:p,onClick:m})=>{const g=Object(i.useCallback)((e=>"object"==typeof e&&null!=e&&"props"in e&&e.props&&e.props.children?g(e.props.children):null!=e&&Object.keys(e).length>0?e:""),[]),b=Object(i.useMemo)((()=>e||g(t)),[e,t,g]);return c.a.createElement(l,{className:"casesLinkIcon",color:a,"data-test-subj":n,disabled:s,href:o,iconSide:u,onClick:m,"aria-label":b},c.a.createElement(r.EuiIcon,{size:d,type:p}),c.a.createElement("span",{className:"casesLinkIcon__label"},t))}));u.displayName="LinkIcon";var d=a(243),p=a(191),m=a(32);const g=s.a.header.attrs({className:"casesHeaderPage"}).withConfig({displayName:"Header",componentId:"sc-avl3zp-0"})(["",""],(({border:e,theme:t})=>Object(n.css)(["margin-bottom:",";",""],t.eui.euiSizeL,e&&Object(n.css)(["border-bottom:",";padding-bottom:",";.euiProgress{top:",";}"],t.eui.euiBorderThin,t.eui.euiSizeL,t.eui.euiSizeL))));g.displayName="Header";const b=s()(r.EuiFlexItem).withConfig({displayName:"FlexItem",componentId:"sc-avl3zp-1"})(["display:block;"]);var E=s()(b).withConfig({displayName:"_StyledFlexItem",componentId:"sc-avl3zp-2"})({overflow:"hidden"});b.displayName="FlexItem";const f=s.a.div.attrs({className:"casesHeaderPage__linkBack"}).withConfig({displayName:"LinkBack",componentId:"sc-avl3zp-3"})(["",""],(({theme:e})=>Object(n.css)(["font-size:",";line-height:",";margin-bottom:",";"],e.eui.euiFontSizeXS,e.eui.euiLineHeight,e.eui.euiSizeS)));f.displayName="LinkBack";const h=({showBackButton:e=!1,border:t,children:a,isLoading:n,title:s,titleNode:l,"data-test-subj":h})=>{const{releasePhase:y}=Object(m.a)(),{getAllCasesUrl:C,navigateToAllCases:j}=Object(o.i)(),x=Object(i.useCallback)((e=>{e&&e.preventDefault(),j()}),[j]);return c.a.createElement(g,{border:t,"data-test-subj":h},c.a.createElement(r.EuiFlexGroup,{alignItems:"center"},c.a.createElement(E,null,e&&c.a.createElement(f,null,c.a.createElement(u,{dataTestSubj:"backToCases",onClick:x,href:C(),iconType:"arrowLeft"},p.a)),l||c.a.createElement(d.a,{title:s,releasePhase:y}),t&&n&&c.a.createElement(r.EuiProgress,{size:"xs",color:"accent"})),a&&c.a.createElement(b,{"data-test-subj":"header-page-supplements",grow:!1},a)))};h.displayName="HeaderPage";const y=c.a.memo(h)},194:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return c}));var n=a(53),s=a.n(n);const i=s.a.div.withConfig({displayName:"SectionWrapper",componentId:"sc-11g3qlk-0"})(["box-sizing:content-box;margin:0 auto;max-width:1175px;width:100%;"]),c=s.a.div.withConfig({displayName:"Wrapper",componentId:"sc-11g3qlk-1"})(["display:flex;flex-direction:column;"])},240:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(43),s=a(5),i=a(75),c=a(45),r=a(4),o=a(74);const l=r.h.jira,u=()=>{const e=Object(s.j)();return Object(n.useQuery)(o.d.license(),(async({signal:e})=>{var t;return null!==(t=(await Object(i.f)(e)).find((e=>e.id===l)))&&void 0!==t?t:null}),{onError:t=>{"AbortError"!==t.name&&e.addError(t.body&&t.body.message?new Error(t.body.message):t,{title:c.e})}})}},241:function(e,t,a){"use strict";a.d(t,"f",(function(){return l})),a.d(t,"e",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return p})),a.d(t,"d",(function(){return m})),a.d(t,"b",(function(){return g}));var n=a(15),s=a(130),i=a(2),c=a.n(i),r=a(155),o=a(242);const l=()=>({id:"license-error",title:"",description:c.a.createElement(s.FormattedMessage,{defaultMessage:"Opening cases in external systems is available when you have the {appropriateLicense}, are using a {cloud}, or are testing out a Free Trial.",id:"xpack.cases.caseView.pushToServiceDisableByLicenseDescription",values:{appropriateLicense:c.a.createElement(n.EuiLink,{href:"https://www.elastic.co/subscriptions",target:"_blank"},r.c),cloud:c.a.createElement(n.EuiLink,{href:"https://www.elastic.co/cloud/elasticsearch-service/signup",target:"_blank"},r.d)}})}),u=()=>({id:"kibana-config-error",title:r.e,description:c.a.createElement(s.FormattedMessage,{defaultMessage:"The kibana.yml file is configured to only allow specific connectors. To enable opening a case in external systems, add .[actionTypeId] (ex: .servicenow | .jira) to the xpack.actions.enabledActiontypes setting. For more information, see {link}.",id:"xpack.cases.caseView.pushToServiceDisableByConfigDescription",values:{link:c.a.createElement(n.EuiLink,{href:"https://www.elastic.co/guide/en/kibana/current/alert-action-settings-kb.html",target:"_blank"},r.b)}})}),d=e=>{let t=[];return null==e||e.enabledInLicense||(t=[...t,l()]),null==e||e.enabledInConfig||(t=[...t,u()]),t},p=()=>({id:"connector-missing-error",title:"",description:r.a}),m=()=>({id:"connector-deleted-error",title:"",description:c.a.createElement(s.FormattedMessage,{defaultMessage:"The connector used to send updates to the external service has been deleted or you do not have the {appropriateLicense} to use it. To update cases in external systems, select a different connector or create a new one.",id:"xpack.cases.configureCases.warningMessage",values:{appropriateLicense:c.a.createElement(n.EuiLink,{href:"https://www.elastic.co/subscriptions",target:"_blank"},r.c)}}),errorType:"danger"}),g=()=>({id:o.a,title:"",description:c.a.createElement(s.FormattedMessage,{defaultMessage:"Closed cases cannot be sent to external systems. Reopen the case if you want to open or update it in an external system.",id:"xpack.cases.caseView.pushToServiceDisableBecauseCaseClosedDescription"})})},242:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n="closed-case-push-error"},243:function(e,t,a){"use strict";a.d(t,"c",(function(){return u})),a.d(t,"b",(function(){return p})),a.d(t,"a",(function(){return g}));var n=a(2),s=a.n(n),i=a(12),c=a(15),r=a(188),o=a(191);const l=()=>s.a.createElement(c.EuiBetaBadge,{label:o.e,tooltipContent:o.d,tooltipPosition:"bottom"});l.displayName="ExperimentalBadge";const u=s.a.memo(l),d=()=>s.a.createElement(c.EuiBetaBadge,{label:o.c,tooltipContent:o.b,tooltipPosition:"bottom"});d.displayName="BetaBadge";const p=s.a.memo(d),m=({title:e,releasePhase:t,children:a})=>s.a.createElement(c.EuiFlexGroup,{alignItems:"baseline",gutterSize:"s",responsive:!1},s.a.createElement(c.EuiFlexItem,{grow:!1},s.a.createElement(c.EuiFlexGroup,{alignItems:"center",gutterSize:"none",responsive:!1},s.a.createElement(c.EuiFlexItem,{grow:!1},s.a.createElement(c.EuiTitle,{size:"l"},s.a.createElement("h1",{"data-test-subj":"header-page-title"},Object(i.isString)(e)?s.a.createElement(r.a,{text:e}):e))),s.a.createElement(c.EuiFlexItem,{grow:!1},a))),s.a.createElement(c.EuiFlexItem,{grow:!1},"experimental"===t&&s.a.createElement(l,null),"beta"===t&&s.a.createElement(d,null)));m.displayName="Title";const g=s.a.memo(m)}}]);