/*! 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.lists_bundle_jsonpfunction=window.lists_bundle_jsonpfunction||[]).push([[1],Array(20).concat([function(e,t,n){"use strict";function i(e){return e}function r(e){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(t,"__esModule",{value:!0}),t.bindTo_=t.bind_=t.hole=t.pipe=t.untupled=t.tupled=t.absurd=t.decrement=t.increment=t.tuple=t.flow=t.flip=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.constant=t.not=t.unsafeCoerce=t.identity=void 0,t.identity=i,t.unsafeCoerce=i,t.not=function(e){return function(t){return!e(t)}},t.constant=function(e){return function(){return e}},t.constTrue=function(){return!0},t.constFalse=function(){return!1},t.constNull=function(){return null},t.constUndefined=function(){},t.constVoid=function(){},t.flip=function(e){return function(t,n){return e(n,t)}},t.flow=function(e,t,n,i,r,a,s,o,l){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return i(n(t(e.apply(this,arguments))))};case 5:return function(){return r(i(n(t(e.apply(this,arguments)))))};case 6:return function(){return a(r(i(n(t(e.apply(this,arguments))))))};case 7:return function(){return s(a(r(i(n(t(e.apply(this,arguments)))))))};case 8:return function(){return o(s(a(r(i(n(t(e.apply(this,arguments))))))))};case 9:return function(){return l(o(s(a(r(i(n(t(e.apply(this,arguments)))))))))}}},t.tuple=function(){for(var e=[],t=0;tnull!=e.id?e:{...e,id:Object(l.v4)()},u=e=>{const t=e;if(null!=t.id){const{id:e,...n}=t;return n}return e};var p=n(11);const d=p.i18n.translate("utils.filename.wildcardWarning",{defaultMessage:"Using wildcards in file paths can impact Endpoint performance"}),m=p.i18n.translate("utils.filename.pathWarning",{defaultMessage:"Path may be formed incorrectly; verify value"});let g,h,f;!function(e){e.HASH="process.hash.*",e.PATH="process.executable.caseless",e.SIGNER="process.Ext.code_signature"}(g||(g={})),function(e){e.HASH=".hash.",e.EXECUTABLE=".executable.caseless",e.PATH=".path",e.SIGNER=".Ext.code_signature"}(h||(h={})),function(e){e.LINUX="linux",e.MAC="macos",e.WINDOWS="windows"}(f||(f={}));const b=({os:e,value:t})=>e===f.WINDOWS?/^[a-z]:(?:|\\\\[^<>:"'/\\|?*]+\\[^<>:"'/\\|?*]+|%\w+%|)[\\](?:[^<>:"'/\\|?*]+[\\/])*([^<>:"'/\\|?*])+$/i.test(t):/^(\/|(\/[\w\-]+)+|\/[\w\-]+\.[\w]+|(\/[\w-]+)+\/[\w\-]+\.[\w]+)$/i.test(t),y=e=>{const t=e[0],n=e.slice(-1),i=e.trim(),r=/\//.test(i);return 0!==e.length&&!(r||i.length!==e.length||"^"===t||"\\"===n||!v({path:e,isWindowsPath:!0}))},$=e=>{const t=e[0],n=e.slice(-1),i=e.trim();return 0!==e.length&&!(i.length!==e.length||"/"!==t||"/"===n||e.length>1024==1||!0===e.includes("//")||!v({path:e,isWindowsPath:!1}))},v=({path:e,isWindowsPath:t})=>{for(const n of e.split(t?"\\":"/"))if(!0===/[\*|\?]+/.test(n))return!0;return!1};var x=n(8);new x.Type("DefaultBooleanFalse",x.boolean.is,((e,t)=>null==e?x.success(!1):x.boolean.validate(e,t)),x.identity),new x.Type("DefaultBooleanTrue",x.boolean.is,((e,t)=>null==e?x.success(!0):x.boolean.validate(e,t)),x.identity),new x.Type("DefaultEmptyString",x.string.is,((e,t)=>null==e?x.success(""):x.string.validate(e,t)),x.identity);const E=new x.Type("DefaultStringArray",x.array(x.string).is,((e,t)=>null==e?x.success([]):x.array(x.string).validate(e,t)),x.identity),_=new x.Type("DefaultStringBooleanFalse",x.boolean.is,((e,t)=>null==e?x.success(!1):"string"==typeof e&&"true"===e.toLowerCase()?x.success(!0):"string"==typeof e&&"false"===e.toLowerCase()?x.success(!1):x.boolean.validate(e,t)),x.identity),O=new x.Type("NonEmptyString",x.string.is,((e,t)=>"string"==typeof e&&""!==e.trim()?x.success(e):x.failure(e,t)),x.identity),w=new x.Type("DefaultUuid",x.string.is,((e,t)=>null==e?x.success(Object(l.v4)()):O.validate(e,t)),x.identity),I=new x.Type("PositiveIntegerGreaterThanZero",x.number.is,((e,t)=>"number"==typeof e&&Number.isSafeInteger(e)&&e>=1?x.success(e):x.failure(e,t)),x.identity),S=I,j=(x.union([S,x[void 0]]),new x.Type("DefaultVersionNumber",S.is,((e,t)=>null==e?x.success(1):S.validate(e,t)),x.identity)),k=new x.Type("EmptyStringArray",x.array(x.string).is,((e,t)=>{if(null==e)return x.success([]);if("string"==typeof e&&""!==e.trim()){const n=e.trim().split(",").map((e=>e.trim()));return n.some((e=>""===e))?x.failure(e,t):x.success(n)}return x.failure(e,t)}),String),C=new x.Type("IsoDateString",x.string.is,((e,t)=>{if("string"!=typeof e)return x.failure(e,t);try{return new Date(e).toISOString()===e?x.success(e):x.failure(e,t)}catch(n){return x.failure(e,t)}}),x.identity),T=(x.exact(x.partial({overwrite:_,overwrite_exceptions:_,overwrite_action_connectors:_,as_new_list:_})),new x.Type("NonEmptyOrNullableStringArray",x.array(x.string).is,((e,t)=>{const n=Array.isArray(e)&&e.some((e=>""===e)),i=Array.isArray(e)&&e.some((e=>"string"!=typeof e));return Array.isArray(e)&&(n||i||0===e.length)?x.failure(e,t):x.array(x.string).validate(e,t)}),x.identity)),A=new x.Type("NonEmptyStringArray",x.array(x.string).is,((e,t)=>{if("string"==typeof e&&""!==e.trim()){const n=e.trim().split(",").map((e=>e.trim()));return n.some((e=>""===e))?x.failure(e,t):x.success(n)}return x.failure(e,t)}),String),R=(new x.Type("NumberBetweenZeroAndOneInclusive",x.number.is,((e,t)=>"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)&&e>=0&&e<=1?x.success(e):x.failure(e,t)),x.identity),new x.Type("DefaultBooleanTrue",x.boolean.is,((e,t)=>null==e||"boolean"==typeof e&&!1===e?x.success(!1):x.failure(e,t)),x.identity)),L=x.keyof({included:null});let N;x.keyof({equals:null}),function(e){e.EQUALS="equals"}(N||(N={}));const M=new x.Type("PositiveInteger",x.number.is,((e,t)=>"number"==typeof e&&Number.isSafeInteger(e)&&e>=0?x.success(e):x.failure(e,t)),x.identity);var F=n(21);const D=new x.Type("StringToPositiveNumber",x.number.is,((e,t)=>F.either.chain(x.string.validate(e,t),(n=>{const i=+n;return 0===n.trim().length||isNaN(i)||i<=0?x.failure(e,t):x.success(i)}))),String),U=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,W=(new x.Type("UUID",x.string.is,((e,t)=>"string"==typeof e&&U.test(e)?x.success(e):x.failure(e,t)),x.identity),x.string),P=x.string,B=O,q=(x.union([B,x[void 0]]),x.string),G=x.string,z=x.intersection([x.exact(x.type({comment:O,created_at:W,created_by:P,id:B})),x.exact(x.partial({updated_at:q,updated_by:G}))]),K=x.array(z),H=(x.union([K,x[void 0]]),x.exact(x.type({comment:O}))),V=x.array(H),J=(x.union([V,x[void 0]]),x.string),X=(x.union([J,x[void 0]]),x.keyof({agnostic:null,single:null})),Y=new x.Type("DefaultNamespace",X.is,((e,t)=>null==e?x.success("single"):X.validate(e,t)),x.identity),Q=x.array(X),Z=new x.Type("DefaultNamespaceArray",Q.is,((e,t)=>{if(null==e)return x.success(["single"]);if("string"==typeof e){const n=e.trim().split(",").map((e=>e.trim()));return Q.validate(n,t)}return x.failure(e,t)}),String),ee=new x.Type("DefaultCreateComments",x.array(H).is,(e=>null==e?x.success([]):x.array(H).decode(e)),x.identity),te=x.union([z,H]),ne=x.array(te),ie=(x.union([ne,x[void 0]]),new x.Type("DefaultImportComments",x.array(te).is,((e,t)=>null==e?x.success([]):x.array(te).validate(e,t)),x.identity)),re=x.string,ae=(x.union([re,x[void 0]]),x.string),se=x.union([ae,x[void 0]]),oe=x.exact(x.type({field:O,operator:L,type:x.keyof({match:null}),value:O})),le=x.exact(x.type({field:O,operator:L,type:x.keyof({match_any:null}),value:T})),ce=x.array(x.union([oe,le])),ue=new x.Type("NonEmptyEndpointNestedEntriesArray",(e=>ce.is(e)&&e.length>0),((e,t)=>Array.isArray(e)&&0===e.length?x.failure(e,t):ce.validate(e,t)),x.identity),pe=x.exact(x.type({entries:ue,field:O,type:x.keyof({nested:null})})),de=x.exact(x.type({field:O,operator:L,type:x.keyof({wildcard:null}),value:O})),me=x.array(x.union([oe,le,de,pe])),ge=new x.Type("NonEmptyEndpointEntriesArray",(e=>me.is(e)&&e.length>0),((e,t)=>Array.isArray(e)&&0===e.length?x.failure(e,t):me.validate(e,t)),x.identity),he=x.keyof({excluded:null,included:null});let fe,be;!function(e){e.INCLUDED="included",e.EXCLUDED="excluded"}(fe||(fe={})),function(e){e.NESTED="nested",e.MATCH="match",e.MATCH_ANY="match_any",e.WILDCARD="wildcard",e.EXISTS="exists",e.LIST="list"}(be||(be={}));const ye=x.exact(x.type({field:O,operator:he,type:x.keyof({exists:null})})),$e=x.keyof({binary:null,boolean:null,byte:null,date:null,date_nanos:null,date_range:null,double:null,double_range:null,float:null,float_range:null,geo_point:null,geo_shape:null,half_float:null,integer:null,integer_range:null,ip:null,ip_range:null,keyword:null,long:null,long_range:null,shape:null,short:null,text:null}),ve=(x.union([$e,x[void 0]]),x.exact(x.type({field:O,list:x.exact(x.type({id:O,type:$e})),operator:he,type:x.keyof({list:null})}))),xe=x.exact(x.type({field:O,operator:he,type:x.keyof({match:null}),value:O})),Ee=x.exact(x.type({field:O,operator:he,type:x.keyof({match_any:null}),value:T})),_e=x.exact(x.type({field:O,operator:he,type:x.keyof({wildcard:null}),value:O})),Oe=x.union([xe,Ee,ye]),we=x.array(Oe),Ie=new x.Type("NonEmptyNestedEntriesArray",we.is,((e,t)=>Array.isArray(e)&&0===e.length?x.failure(e,t):we.validate(e,t)),x.identity),Se=x.exact(x.type({entries:Ie,field:O,type:x.keyof({nested:null})})),je=x.union([xe,Ee,ve,ye,_e]),ke=x.array(x.union([xe,Ee,ve,ye,Se,_e])),Ce=(x.union([ke,x[void 0]]),{exported_exception_list_count:x.number,exported_exception_list_item_count:x.number,missing_exception_list_item_count:x.number,missing_exception_list_items:x.array(x.exact(x.type({item_id:O}))),missing_exception_lists:x.array(x.exact(x.type({list_id:O}))),missing_exception_lists_count:x.number}),Te=(x.exact(x.type(Ce)),x.keyof({detection:null,rule_default:null,endpoint:null,endpoint_trusted_apps:null,endpoint_events:null,endpoint_host_isolation_exceptions:null,endpoint_blocklists:null}));let Ae;x.union([Te,x[void 0]]),function(e){e.DETECTION="detection",e.RULE_DEFAULT="rule_default",e.ENDPOINT="endpoint",e.ENDPOINT_TRUSTED_APPS="endpoint",e.ENDPOINT_EVENTS="endpoint_events",e.ENDPOINT_HOST_ISOLATION_EXCEPTIONS="endpoint_host_isolation_exceptions",e.ENDPOINT_BLOCKLISTS="endpoint_blocklists"}(Ae||(Ae={}));const Re=x.keyof({simple:null}),Le=(x.union([Re,x[void 0]]),C),Ne=x.union([Le,x[void 0]]),Me=x.string,Fe=(x.union([Me,x[void 0]]),x.boolean),De=(x.union([Fe,x[void 0]]),O),Ue=(x.union([De,x[void 0]]),O),We=(x.union([Ue,x[void 0]]),x.keyof({item:null,list:null}),x.exact(x.type({id:O,list_id:O,type:Te,namespace_type:X}))),Pe=x.array(We),Be=(x.union([Pe,x[void 0]]),new x.Type("DefaultListArray",x.array(We).is,((e,t)=>null==e?x.success([]):x.array(We).validate(e,t)),x.identity),I),qe=(x.union([Be,x[void 0]]),x.object),Ge=x.union([qe,x[void 0]]),ze=x.string,Ke=(x.union([ze,x[void 0]]),Y),He=new x.Type("NonEmptyEntriesArray",ke.is,((e,t)=>Array.isArray(e)&&0===e.length?x.failure(e,t):Array.isArray(e)&&e.some((e=>ve.is(e)))&&e.some((e=>!ve.is(e)))?x.failure(e,t,"Cannot have entry of type list and other"):ke.validate(e,t)),x.identity),Ve=(e=>{const t=x.array(e);return new x.Type("DefaultArray",t.is,((e,n)=>null==e?x.success([]):t.validate(e,n)),x.identity)})(x.keyof({linux:null,macos:null,windows:null})),Je=x.union([Ve,x[void 0]]),Xe=x.number,Ye=(x.union([Xe,x[void 0]]),x.number),Qe=(x.union([Ye,x[void 0]]),x.string),Ze=x.exact(x.type({id:Qe,keepAlive:x.union([x.string,x[void 0]])})),et=(x.union([Ze,x[void 0]]),x.string),tt=(x.union([et,x[void 0]]),x.array(x.string)),nt=(x.union([tt,x[void 0]]),x.string),it=x.union([nt,x[void 0]]),rt=x.string,at=(x.union([rt,x[void 0]]),x.keyof({asc:null,desc:null})),st=(x.union([at,x[void 0]]),E),ot=(x.union([st,x[void 0]]),x.string),lt=x.number,ct=(x.union([lt,x[void 0]]),x.string),ut=x.union([ct,x[void 0]]),pt=x.intersection([x.exact(x.type({comment:O})),x.exact(x.partial({id:B}))]),dt=x.array(pt),mt=(x.union([dt,x[void 0]]),x.intersection([x.exact(x.type({description:re,entries:ge,name:ze,type:Re})),x.exact(x.partial({comments:ee,item_id:w,meta:qe,os_types:Je,tags:st}))]),x.intersection([x.exact(x.type({description:re,entries:He,list_id:Ue,name:ze,type:Re})),x.exact(x.partial({comments:ee,expire_time:Ne,item_id:w,meta:qe,namespace_type:Ke,os_types:Je,tags:st}))])),gt=x.intersection([x.exact(x.type({description:re,name:ze,type:Te})),x.exact(x.partial({list_id:w,meta:qe,namespace_type:Ke,os_types:Je,tags:st,version:j}))]),ht=x.intersection([x.exact(x.type({description:re,entries:He,name:ze,type:Re})),x.exact(x.partial({comments:ee,item_id:w,list_id:x[void 0],meta:qe,namespace_type:X,os_types:Je,tags:st,expire_time:Ne}))]),ft=x.string,bt=x.union([ft,x[void 0]]),yt=(x.intersection([x.exact(x.type({list_id:Ue,value:ft})),x.exact(x.partial({id:B,meta:qe}))]),x.intersection([x.exact(x.type({description:re,name:ze,type:$e})),x.exact(x.partial({deserializer:ae,id:B,meta:qe,serializer:nt,version:j}))]),x.exact(x.partial({id:B,item_id:De})),x.exact(x.partial({id:B,list_id:Ue,namespace_type:Ke})),x.exact(x.partial({id:B,item_id:De,namespace_type:Ke})),x.intersection([x.exact(x.type({value:bt})),x.exact(x.partial({id:B,list_id:Ue}))]),x.intersection([x.exact(x.type({id:B})),x.exact(x.partial({deleteReferences:_,ignoreReferences:_}))])),$t=x.keyof({true:null,false:null}),vt=x.union([$t,x[void 0]]),xt=(x.exact(x.type({list_id:Ue,namespace_type:Ke,include_expired_exceptions:vt})),x.exact(x.type({id:B,list_id:Ue,namespace_type:Ke,include_expired_exceptions:vt})),x.exact(x.type({list_id:Ue}))),Et=(x.exact(x.partial({filter:Me,page:D,per_page:D,sort_field:rt,sort_order:at})),x.exact(x.partial({filter:Me,namespace_type:Z,page:D,per_page:D,sort_field:rt,sort_order:at})),x.intersection([x.exact(x.type({list_id:A})),x.exact(x.partial({filter:k,namespace_type:Z,page:D,per_page:D,search:et,sort_field:rt,sort_order:at}))]),x.intersection([x.exact(x.type({list_id:Ue})),x.exact(x.partial({cursor:J,filter:Me,page:D,per_page:D,sort_field:rt,sort_order:at}))]),x.exact(x.partial({cursor:J,filter:Me,page:D,per_page:D,sort_field:rt,sort_order:at}))),_t=x.exact(x.type({acknowledged:x.boolean})),Ot=x.exact(x.type({_version:ut,created_at:W,created_by:P,description:re,id:B,immutable:Fe,list_id:Ue,meta:Ge,name:ze,namespace_type:Ke,os_types:Ve,tags:st,tie_breaker_id:ot,type:Te,updated_at:q,updated_by:G,version:S})),wt=(x.union([Ot,x.exact(x.type({}))]),x.exact(x.type({_version:ut,comments:K,created_at:W,created_by:P,description:re,entries:ke,expire_time:Ne,id:B,item_id:De,list_id:Ue,meta:Ge,name:ze,namespace_type:Ke,os_types:Ve,tags:st,tie_breaker_id:ot,type:Re,updated_at:q,updated_by:G}))),It=(x.intersection([x.exact(x.type({data:x.array(wt),page:Xe,per_page:Ye,total:lt})),x.exact(x.partial({pit:Qe}))]),x.intersection([x.exact(x.type({data:x.array(Ot),page:Xe,per_page:Ye,total:lt})),x.exact(x.partial({pit:Qe}))]),x.exact(x.type({_version:ut,created_at:W,created_by:P,deserializer:se,id:B,list_id:Ue,meta:Ge,serializer:it,tie_breaker_id:ot,type:$e,updated_at:q,updated_by:G,value:ft}))),St=x.array(It),jt=(x.exact(x.type({data:x.array(It),total:lt})),x.exact(x.type({_version:ut,created_at:W,created_by:P,description:re,deserializer:se,id:B,immutable:Fe,meta:Ge,name:ze,serializer:it,tie_breaker_id:ot,type:$e,updated_at:q,updated_by:G,version:S}))),kt=(x.array(jt),x.exact(x.type({largeLists:x.array(jt),smallLists:x.array(jt)}))),Ct=(x.exact(x.type({cursor:J,data:x.array(It),page:Xe,per_page:Ye,total:lt})),x.exact(x.type({cursor:J,data:x.array(jt),page:Xe,per_page:Ye,total:lt}))),Tt=x.exact(x.type({status_code:x.number,message:x.string})),At=x.intersection([x.exact(x.type({error:Tt})),x.partial({id:B,list_id:Ue,item_id:De})]),Rt=(x.exact(x.type({errors:x.array(At),success:x.boolean,success_count:M,success_exception_lists:x.boolean,success_count_exception_lists:M,success_exception_list_items:x.boolean,success_count_exception_list_items:M})),x.exact(x.type({windows:M,linux:M,macos:M,total:M})),x.exact(x.type({list_index:x.boolean,list_item_index:x.boolean}))),Lt=x.exact(x.type({items:St,value:x.unknown})),Nt=(x.array(Lt),x.type({exception_list_id:x.string,namespace_type:X})),Mt=x.type({exception_list_ids:x.array(Nt),type:x.literal("exception_list_ids")}),Ft=x.type({exceptions:x.array(x.union([wt,mt])),type:x.literal("exception_items")}),Dt=x.exact(x.partial({alias:x.string,chunk_size:x.number,exclude_exceptions:x.boolean})),Ut=(x.intersection([x.union([Ft,Mt]),Dt]),x.exact(x.partial({deserializer:ae,list_id:Ue,serializer:nt,type:$e}))),Wt=(x.intersection([x.exact(x.type({description:re,name:ze,type:Te,list_id:Ue})),x.exact(x.partial({id:B,immutable:R,meta:qe,namespace_type:Ke,os_types:Je,tags:st,created_at:W,updated_at:q,created_by:P,updated_by:G,_version:ct,tie_breaker_id:ot,version:j}))]),x.intersection([x.exact(x.type({description:re,entries:He,item_id:De,list_id:Ue,name:ze,type:Re})),x.exact(x.partial({id:B,comments:ie,created_at:W,updated_at:q,created_by:P,updated_by:G,_version:ct,tie_breaker_id:ot,meta:qe,namespace_type:Ke,os_types:Je,tags:st,expire_time:Ne}))]),x.object),Pt=x.exact(x.type({file:Wt})),Bt=(x.intersection([x.exact(x.type({id:B})),x.exact(x.partial({_version:ct,meta:qe,value:ft}))]),x.intersection([x.exact(x.type({id:B})),x.exact(x.partial({_version:ct,description:re,meta:qe,name:ze,version:S}))]),x.exact(x.partial({id:B,item_id:De})),x.exact(x.partial({id:B,item_id:De,namespace_type:Ke})),x.exact(x.partial({id:B,list_id:Ue,namespace_type:Ke})),x.exact(x.partial({id:B,list_id:Ue,value:ft})),x.exact(x.type({id:B})),x.exact(x.partial({filter:Me,id:B,list_id:Ue,namespace_type:Ke})),new x.Type("DefaultUpdateComments",dt.is,((e,t)=>null==e?x.success([]):dt.validate(e,t)),x.identity));x.intersection([x.exact(x.type({description:re,entries:He,name:ze,type:Re})),x.exact(x.partial({_version:ct,comments:Bt,id:B,item_id:x.union([x.string,x[void 0]]),meta:qe,os_types:Je,tags:st}))]),x.intersection([x.exact(x.type({description:re,entries:He,name:ze,type:Re})),x.exact(x.partial({_version:ct,comments:Bt,expire_time:Ne,id:B,item_id:x.union([x.string,x[void 0]]),meta:qe,namespace_type:Ke,os_types:Je,tags:st}))]),x.intersection([x.exact(x.type({description:re,name:ze,type:Te})),x.exact(x.partial({_version:ct,id:B,list_id:Ue,meta:qe,namespace_type:Ke,os_types:Je,tags:st,version:S}))]),x.intersection([x.exact(x.type({id:B,value:ft})),x.exact(x.partial({_version:ct,meta:qe}))]),x.intersection([x.exact(x.type({description:re,id:B,name:ze})),x.exact(x.partial({_version:ct,meta:qe,version:S}))]);var qt=n(15);const Gt="/api/lists",zt=`${Gt}/index`,Kt=`${Gt}/items`,Ht=`${Gt}/privileges`,Vt=Object(qt.deepFreeze)({trustedApps:{id:"endpoint_trusted_apps",name:"Endpoint Security Trusted Apps List",description:"Endpoint Security Trusted Apps List"},eventFilters:{id:"endpoint_event_filters",name:"Endpoint Security Event Filters List",description:"Endpoint Security Event Filters List"},hostIsolationExceptions:{id:"endpoint_host_isolation_exceptions",name:"Endpoint Security Host isolation exceptions List",description:"Endpoint Security Host isolation exceptions List"},blocklists:{id:"endpoint_blocklists",name:"Endpoint Security Blocklists List",description:"Endpoint Security Blocklists List"}}),Jt=Object.freeze(Object.values(Vt).map((({id:e})=>e))),Xt=(Vt.trustedApps.id,Vt.trustedApps.name,Vt.trustedApps.description,Vt.eventFilters.id,Vt.eventFilters.name,Vt.eventFilters.description,Vt.hostIsolationExceptions.id,Vt.hostIsolationExceptions.name,Vt.hostIsolationExceptions.description,Vt.blocklists.id,Vt.blocklists.name,Vt.blocklists.description,x.intersection([x.exact(x.type({type:x.keyof({endpoint:null,endpoint_events:null,endpoint_host_isolation_exceptions:null,endpoint_blocklists:null})})),x.exact(x.partial({list_id:x.keyof(Jt.reduce(((e,t)=>(e[t]=null,e)),{}))})),gt]),{message:p.i18n.translate("lists.exceptions.isOperatorLabel",{defaultMessage:"is"}),operator:fe.INCLUDED,type:be.MATCH,value:"is"}),Yt={message:p.i18n.translate("lists.exceptions.isNotOperatorLabel",{defaultMessage:"is not"}),operator:fe.EXCLUDED,type:be.MATCH,value:"is_not"},Qt={message:p.i18n.translate("lists.exceptions.isOneOfOperatorLabel",{defaultMessage:"is one of"}),operator:fe.INCLUDED,type:be.MATCH_ANY,value:"is_one_of"},Zt={message:p.i18n.translate("lists.exceptions.isNotOneOfOperatorLabel",{defaultMessage:"is not one of"}),operator:fe.EXCLUDED,type:be.MATCH_ANY,value:"is_not_one_of"},en={message:p.i18n.translate("lists.exceptions.existsOperatorLabel",{defaultMessage:"exists"}),operator:fe.INCLUDED,type:be.EXISTS,value:"exists"},tn={message:p.i18n.translate("lists.exceptions.doesNotExistOperatorLabel",{defaultMessage:"does not exist"}),operator:fe.EXCLUDED,type:be.EXISTS,value:"does_not_exist"},nn={message:p.i18n.translate("lists.exceptions.isInListOperatorLabel",{defaultMessage:"is in list"}),operator:fe.INCLUDED,type:be.LIST,value:"is_in_list"},rn={message:p.i18n.translate("lists.exceptions.isNotInListOperatorLabel",{defaultMessage:"is not in list"}),operator:fe.EXCLUDED,type:be.LIST,value:"is_not_in_list"},an={message:p.i18n.translate("lists.exceptions.matchesOperatorLabel",{defaultMessage:"matches"}),operator:fe.INCLUDED,type:be.WILDCARD,value:"matches"},sn={message:p.i18n.translate("lists.exceptions.doesNotMatchOperatorLabel",{defaultMessage:"does not match"}),operator:fe.EXCLUDED,type:be.WILDCARD,value:"does_not_match"},on=[Xt,Yt,Qt,Zt,an],ln=[Xt,Yt,Qt,Zt,en,tn,nn,rn,an,sn],cn=[Xt,Yt,Qt,Zt,en,tn,nn,rn,an,sn],un=[Xt,Yt,Qt,Zt,en,tn,an,sn],pn=[nn,rn];var dn=n(12),mn=n(14);const gn=e=>{const t=e.map((e=>{if(null!=e.message)return e.message;{const t=e.context.filter((e=>null!=e.key&&!Number.isInteger(+e.key)&&""!==e.key.trim())).map((e=>e.key)).join(","),n=e.context.find((e=>null!=e.type&&null!=e.type.name&&e.type.name.length>0)),i=""!==t?t:null!=n?n.type.name:"";return`Invalid value "${Object(mn.isObject)(e.value)?JSON.stringify(e.value):e.value}" supplied to "${i}"`}}));return[...new Set(t)]};n(18);var hn=n(16),fn=n.n(hn),bn=n(22);const yn=(e,t)=>{if(null===t&&null===e)return[];if(null!=t){if("object"!=typeof e||null==e)return[];{const n=Object.keys(t);return Object.keys(e).flatMap((i=>{const r=n.some((e=>e===i))?[]:[i],a=Object(mn.get)(i,e),s=Object(mn.get)(i,t);return Object(mn.isObject)(a)?[...r,...yn(a,s)]:Array.isArray(a)?[...r,...a.flatMap(((e,t)=>yn(e,Object(mn.get)(t,s))))]:r}))}}try{return[JSON.stringify(e)]}catch(e){return["circular reference"]}};Object(F.fold)((e=>({schema:{},errors:e})),(e=>({schema:e,errors:[]})));var $n=n(23);const vn=(e,t)=>{const n=(i=e,r=t.decode(e),Object(bn.pipe)(r,Object(F.fold)((e=>Object(F.left)(e)),(e=>{const t=yn(i,e);if(0!==t.length){const e=[{value:t,context:[],message:`invalid keys "${t.join(",")}"`}];return Object(F.left)(e)}return Object(F.right)(e)}))));var i,r;return Object(F.isLeft)(n)?[null,gn(n.left).join(",")]:[n.right,null]},xn=(e,t)=>Object(bn.pipe)(t,(t=>e.validate(t,x.getDefaultContext(e.asDecoder()))),Object(F.mapLeft)((e=>new Error(gn(e).join(",")))));var En=n(17),_n=n(30),On=n.n(_n);let wn,In;!function(e){e._ID="_id",e._INDEX="_index",e._SOURCE="_source",e._TYPE="_type",e.STRING="string",e.TEXT="text",e.MATCH_ONLY_TEXT="match_only_text",e.KEYWORD="keyword",e.VERSION="version",e.BOOLEAN="boolean",e.OBJECT="object",e.DATE="date",e.DATE_NANOS="date_nanos",e.DATE_RANGE="date_range",e.GEO_POINT="geo_point",e.GEO_SHAPE="geo_shape",e.FLOAT="float",e.HALF_FLOAT="half_float",e.SCALED_FLOAT="scaled_float",e.DOUBLE="double",e.INTEGER="integer",e.LONG="long",e.SHORT="short",e.UNSIGNED_LONG="unsigned_long",e.AGGREGATE_METRIC_DOUBLE="aggregate_metric_double",e.FLOAT_RANGE="float_range",e.DOUBLE_RANGE="double_range",e.INTEGER_RANGE="integer_range",e.LONG_RANGE="long_range",e.NESTED="nested",e.BYTE="byte",e.IP="ip",e.IP_RANGE="ip_range",e.ATTACHMENT="attachment",e.TOKEN_COUNT="token_count",e.MURMUR3="murmur3",e.HISTOGRAM="histogram"}(wn||(wn={})),function(e){e._SOURCE="_source",e.ATTACHMENT="attachment",e.BOOLEAN="boolean",e.DATE="date",e.DATE_RANGE="date_range",e.GEO_POINT="geo_point",e.GEO_SHAPE="geo_shape",e.IP="ip",e.IP_RANGE="ip_range",e.MURMUR3="murmur3",e.NUMBER="number",e.NUMBER_RANGE="number_range",e.STRING="string",e.UNKNOWN="unknown",e.CONFLICT="conflict",e.OBJECT="object",e.NESTED="nested",e.HISTOGRAM="histogram",e.MISSING="missing"}(In||(In={}));class kbn_field_type_KbnFieldType{constructor(e={}){On()(this,"name",void 0),On()(this,"sortable",void 0),On()(this,"filterable",void 0),On()(this,"esTypes",void 0),this.name=e.name||In.UNKNOWN,this.sortable=e.sortable||!1,this.filterable=e.filterable||!1,this.esTypes=Object.freeze((e.esTypes||[]).slice())}}const Sn=new kbn_field_type_KbnFieldType({name:In.UNKNOWN}),jn=[new kbn_field_type_KbnFieldType({name:In.STRING,sortable:!0,filterable:!0,esTypes:[wn.STRING,wn.TEXT,wn.MATCH_ONLY_TEXT,wn.KEYWORD,wn.VERSION,wn._TYPE,wn._ID]}),new kbn_field_type_KbnFieldType({name:In.NUMBER,sortable:!0,filterable:!0,esTypes:[wn.FLOAT,wn.HALF_FLOAT,wn.SCALED_FLOAT,wn.DOUBLE,wn.INTEGER,wn.LONG,wn.UNSIGNED_LONG,wn.SHORT,wn.BYTE,wn.TOKEN_COUNT,wn.AGGREGATE_METRIC_DOUBLE]}),new kbn_field_type_KbnFieldType({name:In.NUMBER_RANGE,sortable:!0,filterable:!0,esTypes:[wn.FLOAT_RANGE,wn.DOUBLE_RANGE,wn.INTEGER_RANGE,wn.LONG_RANGE]}),new kbn_field_type_KbnFieldType({name:In.DATE,sortable:!0,filterable:!0,esTypes:[wn.DATE,wn.DATE_NANOS]}),new kbn_field_type_KbnFieldType({name:In.DATE_RANGE,sortable:!0,filterable:!0,esTypes:[wn.DATE_RANGE]}),new kbn_field_type_KbnFieldType({name:In.IP,sortable:!0,filterable:!0,esTypes:[wn.IP]}),new kbn_field_type_KbnFieldType({name:In.IP_RANGE,sortable:!0,filterable:!0,esTypes:[wn.IP_RANGE]}),new kbn_field_type_KbnFieldType({name:In.BOOLEAN,sortable:!0,filterable:!0,esTypes:[wn.BOOLEAN]}),new kbn_field_type_KbnFieldType({name:In.OBJECT,esTypes:[wn.OBJECT]}),new kbn_field_type_KbnFieldType({name:In.NESTED,esTypes:[wn.NESTED]}),new kbn_field_type_KbnFieldType({name:In.GEO_POINT,esTypes:[wn.GEO_POINT]}),new kbn_field_type_KbnFieldType({name:In.GEO_SHAPE,esTypes:[wn.GEO_SHAPE]}),new kbn_field_type_KbnFieldType({name:In.ATTACHMENT,esTypes:[wn.ATTACHMENT]}),new kbn_field_type_KbnFieldType({name:In.MURMUR3,esTypes:[wn.MURMUR3]}),new kbn_field_type_KbnFieldType({name:In._SOURCE,esTypes:[wn._SOURCE]}),new kbn_field_type_KbnFieldType({name:In.HISTOGRAM,filterable:!0,esTypes:[wn.HISTOGRAM]}),new kbn_field_type_KbnFieldType({name:In.CONFLICT}),Sn],kn=e=>{if("nested"===e.type)return Xt;{const t=(e=>{switch(e.type){case"match":return be.MATCH;case"match_any":return be.MATCH_ANY;case"wildcard":return be.WILDCARD;case"list":return be.LIST;default:return be.EXISTS}})(e),n=cn.find((n=>e.operator===n.operator&&t===n.type));return null!=n?n:Xt}},Cn=e=>{switch(e.type){case be.MATCH:case be.MATCH_ANY:case be.WILDCARD:return e.value;case be.EXISTS:return;case be.LIST:return e.list.id;default:return}},Tn=e=>{const t=(e=>{const t=jn.find((t=>t.esTypes.includes(e)));return t&&t.name?t.name:In.UNKNOWN})(e);return t===In.STRING},An=e=>{var t;return null===(t=e.esTypes)||void 0===t?void 0:t.some(Tn)},Rn=(e,t,n,i,r)=>t.reduce(((t,a,s)=>{const o="nested"===a.type&&0===a.entries.length;if("nested"===a.type||o){const i={correspondingKeywordField:void 0,entryIndex:s,field:o?void 0:{aggregatable:!1,esTypes:["nested"],name:null!=a.field?a.field:"",searchable:!1,type:"string"},id:null!=a.id?a.id:`${s}`,nested:"parent",operator:Xt,parent:void 0,value:void 0};if(o)return[...t,i];if((e=>null!=e.entries)(a)){const r=Rn(e,a.entries,n,a,s);return[...t,i,...r]}return[...t]}{const o=((e,t,n,i,r,a)=>{const{fields:s}=e,o=null!=i?`${i.field}.${t.field}`:t.field,[l]=s.filter((({name:e})=>null!=o&&o===e)),c=(({fields:e,selectedField:t})=>{const n=null!=t&&""!==t?t.split("."):[];if("text"===n.slice(-1)[0]&&n.length>0){const t=n.slice(0,n.length-1).join("."),[i]=e.filter((({name:e})=>""!==t&&t===e));return i}})({fields:s,selectedField:o});return null!=i&&null!=r?{correspondingKeywordField:c,entryIndex:n,field:null!=l?{...l,name:l.name.split(".").slice(-1)[0]}:l,id:null!=t.id?t.id:`${n}`,nested:"child",operator:kn(t),parent:{parent:i,parentIndex:r},value:Cn(t)}:{correspondingKeywordField:c,entryIndex:n,field:a?null!=l?l:{name:t.field,type:"keyword"}:l,id:null!=t.id?t.id:`${n}`,nested:void 0,operator:kn(t),parent:void 0,value:Cn(t)}})(e,a,s,i,r,n);return[...t,o]}}),[]),Ln=()=>({field:"",id:Object(l.v4)(),operator:fe.INCLUDED,type:be.MATCH,value:""}),Nn=e=>{let t=e.match(/.ds-(.*?)-[0-9]{4}\.[0-9]{2}\.[0-9]{2}-[0-9]{6}/);return t&&2===t.length?t[1]:(t=e.match(/.siem-(.*?)-[0-9]{6}/),t&&2===t.length?`.siem-${t[1]}`:e)},Mn=e=>{if(!e.conflictDescriptions)return null;const t=[];for(const[n,i]of Object.entries(e.conflictDescriptions)){const e=[],r={};i.forEach((e=>{const t=Nn(e);r[t]||(r[t]=0),r[t]++}));for(const[t,n]of Object.entries(r))e.push({name:t,count:n});e.sort(((e,t)=>t.count-e.count)),t.push({type:n,totalIndexCount:i.length,groupedIndices:e})}return t};var Fn=n(31),Dn=n.n(Fn);const Un=p.i18n.translate("xpack.lists.andOrBadge.andLabel",{defaultMessage:"AND"}),Wn=p.i18n.translate("xpack.lists.andOrBadge.orLabel",{defaultMessage:"OR"}),Pn=o()(a.EuiBadge).withConfig({displayName:"RoundBadge",componentId:"sc-1m5b0dh-0"})(["align-items:center;border-radius:100%;display:inline-flex;font-size:9px;height:34px;justify-content:center;margin:0 5px 0 5px;padding:7px 6px 4px 6px;user-select:none;width:34px;.euiBadge__content{position:relative;top:-1px;}.euiBadge__text{text-overflow:clip;}"]);Pn.displayName="RoundBadge";const Bn=({type:e})=>r.a.createElement(Pn,{"data-test-subj":"and-or-badge",color:"hollow"},"and"===e?Un:Wn);Bn.displayName="RoundedBadge";const qn=Object(s.css)(["background:",";position:relative;width:2px;&:after{background:",";content:'';height:8px;right:-4px;position:absolute;width:10px;clip-path:circle();}"],(({theme:e})=>e.eui.euiColorLightShade),(({theme:e})=>e.eui.euiColorLightShade)),Gn=o()(a.EuiFlexItem).withConfig({displayName:"TopAntenna",componentId:"sc-1c3osbz-0"})([""," &:after{top:0;}"],qn),zn=o()(a.EuiFlexItem).withConfig({displayName:"BottomAntenna",componentId:"sc-1c3osbz-1"})([""," &:after{bottom:0;}"],qn),Kn=({type:e})=>r.a.createElement(a.EuiFlexGroup,{className:"andBadgeContainer",gutterSize:"none",direction:"column",alignItems:"center"},r.a.createElement(Gn,{"data-test-subj":"andOrBadgeBarTop",grow:1}),r.a.createElement(a.EuiFlexItem,{grow:!1},r.a.createElement(Bn,{type:e})),r.a.createElement(zn,{"data-test-subj":"andOrBadgeBarBottom",grow:1}));Kn.displayName="RoundedBadgeAntenna";const Hn=r.a.memo((({type:e,includeAntennas:t=!1})=>t?r.a.createElement(Kn,{type:e}):r.a.createElement(Bn,{type:e})));Hn.displayName="AndOrBadge";const Vn=o()(a.EuiFlexItem).withConfig({displayName:"MyInvisibleAndBadge",componentId:"sc-110ii9l-0"})(["visibility:hidden;"]),Jn=o()(a.EuiFlexItem).withConfig({displayName:"MyFirstRowContainer",componentId:"sc-110ii9l-1"})(["padding-top:20px;"]),Xn=r.a.memo((({entriesLength:e,exceptionItemIndex:t})=>{const n=r.a.createElement(Hn,{includeAntennas:!0,type:"and"});return e>1&&0===t?r.a.createElement(Jn,{grow:!1,"data-test-subj":"exceptionItemEntryFirstRowAndBadge"},n):e<=1?r.a.createElement(Vn,{grow:!1,"data-test-subj":"exceptionItemEntryInvisibleAndBadge"},n):r.a.createElement(a.EuiFlexItem,{grow:!1,"data-test-subj":"exceptionItemEntryAndBadge"},n)}));Xn.displayName="BuilderAndBadge";const Yn=o()(a.EuiFlexItem).withConfig({displayName:"MyFirstRowContainer",componentId:"sc-lw0zku-0"})(["padding-top:25px;"]),Qn=r.a.memo((({entries:e,nestedParentIndex:t,isOnlyItem:n,entryIndex:s,exceptionItemIndex:o,onDelete:l})=>{const c=n&&1===e.length&&0===o&&(null==e[0].field||""===e[0].field),u=Object(i.useCallback)((()=>{l(s,t)}),[l,s,t]),p=r.a.createElement(a.EuiButtonIcon,{color:"danger",iconType:"trash",onClick:u,isDisabled:c,"aria-label":"entryDeleteButton",className:"exceptionItemEntryDeleteButton","data-test-subj":"builderItemEntryDeleteButton"});return 0===s&&0===o&&null==t?r.a.createElement(Yn,{grow:!1,"data-test-subj":"firstRowBuilderDeleteButton"},p):r.a.createElement(a.EuiFlexItem,{grow:!1,"data-test-subj":"builderDeleteButton"},p)}));Qn.displayName="BuilderEntryDeleteButton";var Zn=n(19);const ei=p.i18n.translate("autocomplete.loadingDescription",{defaultMessage:"Loading..."}),ti=p.i18n.translate("autocomplete.selectField",{defaultMessage:"Please select a field first..."}),ni=p.i18n.translate("autocomplete.fieldRequiredError",{defaultMessage:"Value cannot be empty"}),ii=p.i18n.translate("autocomplete.invalidNumberError",{defaultMessage:"Not a valid number"}),ri=p.i18n.translate("autocomplete.invalidDateError",{defaultMessage:"Not a valid date"}),ai=p.i18n.translate("autocomplete.invalidBinaryType",{defaultMessage:"Binary fields are currently unsupported"}),si=p.i18n.translate("autocomplete.fieldSpaceWarning",{defaultMessage:"Warning: Spaces at the start or end of this value aren't being displayed."}),oi=p.i18n.translate("autocomplete.listsTooltipWarning",{defaultMessage:"Lists that aren't able to be processed by this rule type will be disabled."}),li=p.i18n.translate("autocomplete.seeDocumentation",{defaultMessage:"See Documentation"}),ci=p.i18n.translate("autocomplete.conflictIndicesWarning.title",{defaultMessage:"Mapping Conflict"}),ui=p.i18n.translate("autocomplete.conflictIndicesWarning.description",{defaultMessage:"This field is defined as different types across the following indices or is unmapped. This can cause unexpected query results."}),pi=(e,t)=>p.i18n.translate("autocomplete.conflictIndicesWarning.index.description",{defaultMessage:"{name} ({count} indices)",values:{count:t,name:e}});var di=n(10);const mi=({getLabel:e,options:t,selectedOptions:n,disabledOptions:i})=>{const r=t.map(e),a=null==i?void 0:i.map(e),s=r.map((e=>({label:e,disabled:a&&0!==a.length&&a.includes(e)}))),o=n.map(e).filter((e=>-1!==r.indexOf(e))).map((e=>s[r.indexOf(e)]));return{comboOptions:s,labels:r,selectedComboOptions:o}},gi={binary:ai},hi={asPlainText:!0},fi=({fieldInputWidth:e,fieldTypeFilter:t=[],indexPattern:n,isClearable:s=!1,isDisabled:o=!1,isLoading:l=!1,isRequired:c=!1,onChange:u,placeholder:d,selectedField:m,acceptsCustomOptions:g=!1,showMappingConflicts:h=!1})=>{const{isInvalid:f,comboOptions:b,selectedComboOptions:y,fieldWidth:$,renderFields:v,handleTouch:x,handleValuesChange:E,handleCreateCustomOption:_}=(({indexPattern:e,fieldTypeFilter:t,isRequired:n,selectedField:s,fieldInputWidth:o,showMappingConflicts:l,onChange:c})=>{const[u,p]=Object(i.useState)(!1),[d,m]=Object(i.useState)(null),g=Object(a.useEuiPaddingSize)("s"),{availableFields:h,selectedFields:f}=Object(i.useMemo)((()=>((e,t,n)=>{const i=(e=>null!=e?e.fields:[])(e),r=(e=>e&&""!==e.name.trim()?[e]:[])(t),a=((e,t,n)=>{const i=new Map;e.forEach((e=>i.set(e.name,e))),t.forEach((e=>i.set(e.name,e)));const r=Array.from(i.values());return n&&(null==n?void 0:n.length)>0?r.filter((({type:e})=>n.includes(e))):r})(i,r,n);return{availableFields:a,selectedFields:r}})(null!=d&&null!=e?{...e,fields:[d,...null==e?void 0:e.fields]}:e,s,t)),[e,t,s,d]),{comboOptions:b,labels:y,selectedComboOptions:$,disabledLabelTooltipTexts:v,mappingConflictsTooltipInfo:x}=Object(i.useMemo)((()=>(e=>{const{availableFields:t,selectedFields:n}=e,i=mi({getLabel:e=>e.name,options:t,selectedOptions:n}),r=(e=>e.availableFields.reduce(((e,t)=>{var n;const i=null===(n=t.esTypes)||void 0===n?void 0:n.find((e=>gi[e])),r=i&&gi[i]||gi[t.type];return r&&(e[t.name]=r),e}),{}))(e),a=(e=>e.availableFields.reduce(((e,t)=>{const n=Mn(t);return n?(e[t.name]=n,e):e}),{}))(e);return{...i,disabledLabelTooltipTexts:r,mappingConflictsTooltipInfo:a}})({availableFields:h,selectedFields:f})),[h,f]),E=Object(i.useCallback)((e=>{const t=e.map((({label:e})=>h[y.indexOf(e)]));c(t)}),[h,y,c]),_=Object(i.useCallback)((e=>{e.trim().toLowerCase()&&(m({name:e,type:"text"}),c([{name:e,type:"text"}]))}),[c]),O=Object(i.useCallback)((()=>{p(!0)}),[p]),w=Object(i.useMemo)((()=>o?{width:`${o}px`}:{}),[o]);return{isInvalid:Object(i.useMemo)((()=>!!n&&u&&null==s),[n,s,u]),comboOptions:b,selectedComboOptions:$,fieldWidth:w,renderFields:e=>{const{label:t}=e,n=v[t];if(n)return e.disabled=!0,Object(di.jsx)(a.EuiToolTip,{"data-test-subj":"disabledLabelWithTooltip",content:n,position:"bottom"},Object(di.jsx)(r.a.Fragment,null,t));const i=x[t];if(l&&i){const e=Object(di.jsx)(r.a.Fragment,null,ui,i.map((e=>{const t=e.groupedIndices.map((({name:e,count:t})=>`${t>1?pi(e,t):e}`));return Object(di.jsx)(r.a.Fragment,null,Object(di.jsx)(a.EuiSpacer,{size:"s"}),`${e.totalIndexCount>1?pi(e.type,e.totalIndexCount):e.type}: ${t.join(", ")}`)})));return Object(di.jsx)(a.EuiToolTip,{"data-test-subj":"mappingConflictsTooltip",position:"bottom",content:e},Object(di.jsx)(r.a.Fragment,null,t,Object(di.jsx)(a.EuiIcon,{"data-test-subj":"mappingConflictsWarningIcon",tabIndex:0,type:"warning",title:ci,size:"s",css:Object(di.css)({marginLeft:`${g}`},"","")})))}return t},handleTouch:O,handleValuesChange:E,handleCreateCustomOption:_}})({indexPattern:n,fieldTypeFilter:t,isRequired:c,selectedField:m,fieldInputWidth:e,showMappingConflicts:h,onChange:u});return g?Object(di.jsx)(a.EuiComboBox,{placeholder:d,options:b,selectedOptions:y,onChange:E,isLoading:l,isDisabled:o,isClearable:s,isInvalid:f,onFocus:x,singleSelection:hi,"data-test-subj":"fieldAutocompleteComboBox",style:$,onCreateOption:_,customOptionText:p.i18n.translate("autocomplete.customOptionText",{defaultMessage:"Add {searchValuePlaceholder} as a custom field",values:{searchValuePlaceholder:"{searchValue}"}}),fullWidth:!0,renderOption:v}):Object(di.jsx)(a.EuiComboBox,{placeholder:d,options:b,selectedOptions:y,onChange:E,isLoading:l,isDisabled:o,isClearable:s,isInvalid:f,onFocus:x,singleSelection:hi,"data-test-subj":"fieldAutocompleteComboBox",style:$,fullWidth:!0,renderOption:v})};fi.displayName="Field";const bi=[],yi=({placeholder:e,rowLabel:t})=>Object(di.jsx)(a.EuiFormRow,{label:t,fullWidth:!0},Object(di.jsx)(a.EuiComboBox,{placeholder:e,options:bi,selectedOptions:bi,onChange:void 0,isDisabled:!0,"data-test-subj":"valuesAutocompleteComboBox existsComboxBox",fullWidth:!0}));yi.displayName="AutocompleteFieldExists";var $i=n(20);const vi=async e=>Object(bn.pipe)(await e(),Object(F.fold)((e=>Promise.reject(e)),(e=>Promise.resolve(e)))),xi=e=>e instanceof Error?e:new Error(String(e)),Ei=e=>{const t=(()=>{const e=Object(i.useRef)(!1),t=Object(i.useCallback)((()=>e.current),[]),n=Object(i.useCallback)((()=>{e.current=!1}),[]);return Object(i.useEffect)((()=>(e.current=!0,n)),[n]),t})(),[n,r]=Object(i.useState)(!1),[a,s]=Object(i.useState)(),[o,l]=Object(i.useState)();return{error:a,loading:n,result:o,start:Object(i.useCallback)(((...n)=>{r(!0),l(void 0),s(void 0),e(...n).then((e=>t()&&l(e))).catch((e=>t()&&s(e))).finally((()=>t()&&r(!1)))}),[e,t])}},_i=e=>t=>{const n=null!=t.signal?t.signal:(new AbortController).signal;return e({...t,signal:n})},Oi=(_i((async({http:e,signal:t})=>Object($i.flow)((()=>Object($n.tryCatch)((()=>(async({http:e,signal:t})=>e.fetch(zt,{method:"POST",signal:t}))({http:e,signal:t})),xi)),Object($n.chain)((e=>Object($n.fromEither)(xn(_t,e)))),Object($i.flow)(vi))())),_i((async({deleteReferences:e,http:t,id:n,ignoreReferences:i,signal:r})=>Object(bn.pipe)({deleteReferences:e,id:n,ignoreReferences:i},(e=>Object($n.fromEither)(xn(yt,e))),Object($n.chain)((e=>Object($n.tryCatch)((()=>(async({deleteReferences:e=!1,http:t,id:n,ignoreReferences:i=!1,signal:r})=>t.fetch(Gt,{method:"DELETE",query:{deleteReferences:e,id:n,ignoreReferences:i},signal:r}))({http:t,signal:r,...e})),xi))),Object($n.chain)((e=>Object($n.fromEither)(xn(jt,e)))),Object($i.flow)(vi)))),_i((async({http:e,listId:t,signal:n})=>Object(bn.pipe)({list_id:t},(e=>Object($n.fromEither)(xn(xt,e))),Object($n.chain)((t=>Object($n.tryCatch)((()=>(async({http:e,list_id:t,signal:n})=>e.fetch(`${Kt}/_export`,{method:"POST",query:{list_id:t},signal:n}))({http:e,signal:n,...t})),xi))),Object($i.flow)(vi)))),_i((async({cursor:e,http:t,pageIndex:n,pageSize:i,signal:r,sortField:a,sortOrder:s})=>Object(bn.pipe)({cursor:null!=e?e.toString():void 0,page:null!=n?n.toString():void 0,per_page:null!=i?i.toString():void 0,sort_field:null!=a?a.toString():void 0,sort_order:s},(e=>Object($n.fromEither)(xn(Et,e))),Object($n.chain)((e=>Object($n.tryCatch)((()=>(async({http:e,cursor:t,page:n,per_page:i,signal:r,sort_field:a,sort_order:s})=>e.fetch(`${Gt}/_find`,{method:"GET",query:{cursor:t,page:n,per_page:i,sort_field:a,sort_order:s},signal:r}))({http:t,signal:r,...e})),xi))),Object($n.chain)((e=>Object($n.fromEither)(xn(Ct,e)))),Object($i.flow)(vi)))),_i((async({cursor:e,http:t,pageIndex:n,pageSize:i,signal:r})=>Object(bn.pipe)({cursor:null!=e?e.toString():void 0,page:null!=n?n.toString():void 0,per_page:null!=i?i.toString():void 0},(e=>Object($n.fromEither)(xn(Et,e))),Object($n.chain)((e=>Object($n.tryCatch)((()=>(async({http:e,cursor:t,page:n,per_page:i,signal:r})=>e.fetch("/internal/lists/_find_lists_by_size",{method:"GET",query:{cursor:t,page:n,per_page:i},signal:r}))({http:t,signal:r,...e})),xi))),Object($n.chain)((e=>Object($n.fromEither)(xn(kt,e)))),Object($i.flow)(vi))))),wi=(_i((async({file:e,http:t,listId:n,type:i,signal:r})=>Object(bn.pipe)({list_id:n,type:i},(e=>Object($n.fromEither)(xn(Ut,e))),Object($n.chain)((t=>Object(bn.pipe)(Object($n.fromEither)(xn(Pt,{file:e})),Object($n.map)((e=>({...e,...t})))))),Object($n.chain)((e=>Object($n.tryCatch)((()=>(async({file:e,http:t,list_id:n,type:i,signal:r})=>{const a=new FormData;return a.append("file",e),t.fetch(`${Kt}/_import`,{body:a,headers:{"Content-Type":void 0},method:"POST",query:{list_id:n,type:i},signal:r})})({http:t,signal:r,...e})),xi))),Object($n.chain)((e=>Object($n.fromEither)(xn(jt,e)))),vi))),_i((async({http:e,signal:t})=>Object($i.flow)((()=>Object($n.tryCatch)((()=>(async({http:e,signal:t})=>e.fetch(zt,{method:"GET",signal:t}))({http:e,signal:t})),xi)),Object($n.chain)((e=>Object($n.fromEither)(xn(Rt,e)))),Object($i.flow)(vi))())),_i((async({http:e,signal:t})=>e.fetch(Ht,{method:"GET",signal:t}))),({kibanaBranch:e})=>{const t=(({kibanaBranch:e})=>({version:"main"===e?"master":e,elasticWebsiteUrl:"https://www.elastic.co/",elasticGithubUrl:"https://github.com/elastic/",docsWebsiteUrl:"https://docs.elastic.co/"}))({kibanaBranch:e}),n=t.version,i=t.elasticWebsiteUrl,r=t.docsWebsiteUrl,a=t.elasticGithubUrl,s=`${i}guide/en/elasticsearch/reference/${n}/`,o=`${i}guide/en/kibana/${n}/`,l=`${i}guide/en/fleet/${n}/`,c=`${i}guide/en/elasticsearch/plugins/${n}/`,u=`${i}guide/en/apm/`,p=`${i}guide/en/security/${n}/`,d=`${i}guide/en/app-search/${n}/`,m=`${i}guide/en/enterprise-search/${n}/`,g=`${i}guide/en/esre/${n}/`,h=`${i}guide/en/workplace-search/${n}/`,f=`${r}search-ui/`,b=`${i}guide/en/machine-learning/${n}/`,y=`${r}serverless/elasticsearch/`;return Object(qt.deepFreeze)({settings:`${i}guide/en/kibana/${n}/settings.html`,elasticStackGetStarted:`${i}guide/en/index.html`,upgrade:{upgradingStackOnPrem:`${i}guide/en/elastic-stack/current/upgrading-elastic-stack-on-prem.html`,upgradingStackOnCloud:`${i}guide/en/elastic-stack/current/upgrade-elastic-stack-for-elastic-cloud.html`},apm:{kibanaSettings:`${o}apm-settings-in-kibana.html`,supportedServiceMaps:`${o}service-maps.html#service-maps-supported`,customLinks:`${o}custom-links.html`,droppedTransactionSpans:`${u}guide/${n}/data-model-spans.html#data-model-dropped-spans`,upgrading:`${u}guide/${n}/upgrade.html`,metaData:`${u}guide/${n}/data-model-metadata.html`,overview:`${u}guide/${n}/apm-overview.html`,tailSamplingPolicies:`${u}guide/${n}/configure-tail-based-sampling.html`,elasticAgent:`${u}guide/${n}/upgrade-to-apm-integration.html`,storageExplorer:`${o}storage-explorer.html`,spanCompression:`${u}guide/${n}/span-compression.html`,transactionSampling:`${u}guide/${n}/sampling.html`,indexLifecycleManagement:`${u}guide/${n}/ilm-how-to.html`},canvas:{guide:`${o}canvas.html`},cloud:{indexManagement:`${i}guide/en/cloud/current/ec-configure-index-management.html`},console:{guide:`${o}console-kibana.html`,serverlessGuide:`${y}dev-tools-console`},dashboard:{guide:`${o}dashboard.html`,drilldowns:`${o}drilldowns.html`,drilldownsTriggerPicker:`${o}create-drilldowns.html#url-drilldowns`,urlDrilldownTemplateSyntax:`${o}create-drilldowns.html#url_templating-language`,urlDrilldownVariables:`${o}create-drilldowns.html#url-template-variables`},discover:{guide:`${o}discover.html`,fieldStatistics:`${o}show-field-statistics.html`,fieldTypeHelp:`${s}mapping-types.html`,dateFieldTypeDocs:`${s}date.html`,dateFormatsDocs:`${s}mapping-date-format.html`,documentExplorer:`${o}document-explorer.html`},filebeat:{base:`${i}guide/en/beats/filebeat/${n}`,installation:`${i}guide/en/beats/filebeat/${n}/filebeat-installation-configuration.html`,configuration:`${i}guide/en/beats/filebeat/${n}/configuring-howto-filebeat.html`,elasticsearchModule:`${i}guide/en/beats/filebeat/${n}/filebeat-module-elasticsearch.html`,elasticsearchOutput:`${i}guide/en/beats/filebeat/${n}/elasticsearch-output.html`,startup:`${i}guide/en/beats/filebeat/${n}/filebeat-starting.html`,exportedFields:`${i}guide/en/beats/filebeat/${n}/exported-fields.html`,suricataModule:`${i}guide/en/beats/filebeat/${n}/filebeat-module-suricata.html`,zeekModule:`${i}guide/en/beats/filebeat/${n}/filebeat-module-zeek.html`},auditbeat:{base:`${i}guide/en/beats/auditbeat/${n}`,auditdModule:`${i}guide/en/beats/auditbeat/${n}/auditbeat-module-auditd.html`,systemModule:`${i}guide/en/beats/auditbeat/${n}/auditbeat-module-system.html`},appSearch:{adaptiveRelevance:`${d}curations-guide.html#curations-reference-adaptive-relevance`,apiRef:`${d}api-reference.html`,apiClients:`${d}api-clients.html`,apiKeys:`${d}authentication.html#authentication-api-keys`,authentication:`${d}authentication.html`,crawlRules:`${d}crawl-web-content.html#crawl-web-content-manage-crawl-rules`,curations:`${d}curations-guide.html`,duplicateDocuments:`${d}web-crawler-reference.html#web-crawler-reference-content-deduplication`,elasticsearchIndexedEngines:`${d}elasticsearch-engines.html`,entryPoints:`${d}crawl-web-content.html#crawl-web-content-manage-entry-points`,gettingStarted:`${d}getting-started.html`,guide:`${d}index.html`,indexingDocuments:`${d}indexing-documents-guide.html`,indexingDocumentsSchema:`${d}indexing-documents-guide.html#indexing-documents-guide-schema`,logSettings:`${d}logs.html`,metaEngines:`${d}meta-engines-guide.html`,precisionTuning:`${d}precision-tuning.html`,relevanceTuning:`${d}relevance-tuning-guide.html`,resultSettings:`${d}result-settings-guide.html`,searchUI:`${d}reference-ui-guide.html`,security:`${d}security-and-users.html`,synonyms:`${d}synonyms-guide.html`,webCrawler:`${d}web-crawler.html`,webCrawlerEventLogs:`${d}view-web-crawler-events-logs.html`,webCrawlerReference:`${d}web-crawler-reference.html`},enterpriseSearch:{apiKeys:`${o}api-keys.html`,behavioralAnalytics:`${m}analytics-overview.html`,behavioralAnalyticsCORS:`${m}analytics-cors-proxy.html`,behavioralAnalyticsEvents:`${m}analytics-events.html`,buildConnector:`${m}build-connector.html`,bulkApi:`${s}docs-bulk.html`,configuration:`${m}configuration.html`,connectors:`${m}connectors.html`,connectorsAzureBlobStorage:`${m}connectors-azure-blob.html`,connectorsClients:`${m}connectors.html#connectors-build`,connectorsConfluence:`${m}connectors-confluence.html`,connectorsDropbox:`${m}connectors-dropbox.html`,connectorsContentExtraction:`${m}connectors-content-extraction.html`,connectorsGithub:`${m}connectors-github.html`,connectorsGmail:`${m}connectors-gmail.html`,connectorsGoogleCloudStorage:`${m}connectors-google-cloud.html`,connectorsGoogleDrive:`${m}connectors-google-drive.html`,connectorsJira:`${m}connectors-jira.html`,connectorsMicrosoftSQL:`${m}connectors-ms-sql.html`,connectorsMongoDB:`${m}connectors-mongodb.html`,connectorsMySQL:`${m}connectors-mysql.html`,connectorsNative:`${m}connectors.html#connectors-native`,connectorsNetworkDrive:`${m}connectors-network-drive.html`,connectorsOneDrive:`${m}connectors-onedrive.html`,connectorsOracle:`${m}connectors-oracle.html`,connectorsPostgreSQL:`${m}connectors-postgresql.html`,connectorsS3:`${m}connectors-s3.html`,connectorsSalesforce:`${m}connectors-salesforce.html`,connectorsServiceNow:`${m}connectors-servicenow.html`,connectorsSharepoint:`${m}connectors-sharepoint.html`,connectorsSharepointOnline:`${m}connectors-sharepoint-online.html`,connectorsSlack:`${m}connectors-slack.html`,connectorsWorkplaceSearch:`${m}workplace-search-connectors.html`,crawlerExtractionRules:`${m}crawler-extraction-rules.html`,crawlerManaging:`${m}crawler-managing.html`,crawlerOverview:`${m}crawler.html`,deployTrainedModels:`${b}ml-nlp-deploy-models.html`,documentLevelSecurity:`${s}document-level-security.html`,elser:`${m}elser-text-expansion.html`,engines:`${m}engines.html`,esre:`${g}index.html`,esreFaq:`${g}faq.html`,esreHelp:`${g}help.html`,esreLearn:`${g}learn.html`,indexApi:`${s}docs-index_.html`,ingestionApis:`${m}ingestion-apis.html`,ingestPipelines:`${m}ingest-pipelines.html`,knnSearch:`${s}knn-search.html`,knnSearchCombine:`${s}knn-search.html#_combine_approximate_knn_with_other_features`,languageAnalyzers:`${s}analysis-lang-analyzer.html`,languageClients:`${m}programming-language-clients.html`,licenseManagement:`${m}license-management.html`,machineLearningStart:`${m}machine-learning-start.html`,mailService:`${m}mailer-configuration.html`,mlDocumentEnrichment:`${m}document-enrichment.html`,mlDocumentEnrichmentUpdateMappings:`${m}document-enrichment.html#document-enrichment-update-mappings`,searchApplicationsTemplates:`${m}search-applications-templates.html`,searchApplicationsSearchApi:`${m}search-applications-safe-search.html`,searchApplications:`${m}search-applications.html`,searchApplicationsSearch:`${m}search-applications-search.html`,searchTemplates:`${s}search-template.html`,start:`${m}start.html`,supportedNlpModels:`${b}ml-nlp-model-ref.html`,syncRules:`${m}sync-rules.html`,trainedModels:`${b}ml-trained-models.html`,textEmbedding:`${b}ml-nlp-model-ref.html#ml-nlp-model-ref-text-embedding`,troubleshootSetup:`${m}troubleshoot-setup.html`,usersAccess:`${m}users-access.html`},workplaceSearch:{apiKeys:`${h}workplace-search-api-authentication.html`,box:`${h}workplace-search-box-connector.html`,confluenceCloud:`${h}workplace-search-confluence-cloud-connector.html`,confluenceCloudConnectorPackage:`${h}confluence-cloud.html`,confluenceServer:`${h}workplace-search-confluence-server-connector.html`,contentSources:`${h}workplace-search-content-sources.html`,customConnectorPackage:`${h}custom-connector-package.html`,customSources:`${h}workplace-search-custom-api-sources.html`,customSourcePermissions:`${h}workplace-search-custom-api-sources.html#custom-api-source-document-level-access-control`,documentPermissions:`${h}workplace-search-sources-document-permissions.html`,dropbox:`${h}workplace-search-dropbox-connector.html`,externalSharePointOnline:`${h}sharepoint-online-external.html`,externalIdentities:`${h}workplace-search-external-identities-api.html`,gettingStarted:`${h}workplace-search-getting-started.html`,gitHub:`${h}workplace-search-github-connector.html`,gmail:`${h}workplace-search-gmail-connector.html`,googleDrive:`${h}workplace-search-google-drive-connector.html`,indexingSchedule:`${h}workplace-search-customizing-indexing-rules.html#_indexing_schedule`,jiraCloud:`${h}workplace-search-jira-cloud-connector.html`,jiraServer:`${h}workplace-search-jira-server-connector.html`,networkDrive:`${h}network-drives.html`,oneDrive:`${h}workplace-search-onedrive-connector.html`,permissions:`${h}workplace-search-permissions.html`,privateSourcePermissions:`${h}workplace-search-permissions.html#organizational-sources-private-sources`,salesforce:`${h}workplace-search-salesforce-connector.html`,security:`${h}workplace-search-security.html`,serviceNow:`${h}workplace-search-servicenow-connector.html`,sharePoint:`${h}workplace-search-sharepoint-online-connector.html`,sharePointServer:`${h}sharepoint-server.html`,slack:`${h}workplace-search-slack-connector.html`,synch:`${h}workplace-search-customizing-indexing-rules.html`,zendesk:`${h}workplace-search-zendesk-connector.html`},metricbeat:{base:`${i}guide/en/beats/metricbeat/${n}`,configure:`${i}guide/en/beats/metricbeat/${n}/configuring-howto-metricbeat.html`,httpEndpoint:`${i}guide/en/beats/metricbeat/${n}/http-endpoint.html`,install:`${i}guide/en/beats/metricbeat/${n}/metricbeat-installation-configuration.html`,start:`${i}guide/en/beats/metricbeat/${n}/metricbeat-starting.html`},heartbeat:{base:`${i}guide/en/beats/heartbeat/${n}`},libbeat:{getStarted:`${i}guide/en/beats/libbeat/${n}/getting-started.html`},logstash:{base:`${i}guide/en/logstash/${n}`,inputElasticAgent:`${i}guide/en/logstash/${n}/plugins-inputs-elastic_agent.html`},functionbeat:{base:`${i}guide/en/beats/functionbeat/${n}`},winlogbeat:{base:`${i}guide/en/beats/winlogbeat/${n}`},aggs:{composite:`${s}search-aggregations-bucket-composite-aggregation.html`,composite_missing_bucket:`${s}search-aggregations-bucket-composite-aggregation.html#_missing_bucket`,date_histogram:`${s}search-aggregations-bucket-datehistogram-aggregation.html`,date_range:`${s}search-aggregations-bucket-daterange-aggregation.html`,date_format_pattern:`${s}search-aggregations-bucket-daterange-aggregation.html#date-format-pattern`,filter:`${s}search-aggregations-bucket-filter-aggregation.html`,filters:`${s}search-aggregations-bucket-filters-aggregation.html`,geohash_grid:`${s}search-aggregations-bucket-geohashgrid-aggregation.html`,histogram:`${s}search-aggregations-bucket-histogram-aggregation.html`,ip_range:`${s}search-aggregations-bucket-iprange-aggregation.html`,range:`${s}search-aggregations-bucket-range-aggregation.html`,significant_terms:`${s}search-aggregations-bucket-significantterms-aggregation.html`,terms:`${s}search-aggregations-bucket-terms-aggregation.html`,terms_doc_count_error:`${s}search-aggregations-bucket-terms-aggregation.html#_per_bucket_document_count_error`,rare_terms:`${s}search-aggregations-bucket-rare-terms-aggregation.html`,avg:`${s}search-aggregations-metrics-avg-aggregation.html`,avg_bucket:`${s}search-aggregations-pipeline-avg-bucket-aggregation.html`,max_bucket:`${s}search-aggregations-pipeline-max-bucket-aggregation.html`,min_bucket:`${s}search-aggregations-pipeline-min-bucket-aggregation.html`,sum_bucket:`${s}search-aggregations-pipeline-sum-bucket-aggregation.html`,cardinality:`${s}search-aggregations-metrics-cardinality-aggregation.html`,count:`${s}search-aggregations-metrics-valuecount-aggregation.html`,cumulative_sum:`${s}search-aggregations-metrics-sum-aggregation.html`,derivative:`${s}search-aggregations-pipeline-derivative-aggregation.html`,geo_bounds:`${s}search-aggregations-metrics-geobounds-aggregation.html`,geo_centroid:`${s}search-aggregations-metrics-geocentroid-aggregation.html`,max:`${s}search-aggregations-metrics-max-aggregation.html`,median:`${s}search-aggregations-metrics-percentile-aggregation.html`,min:`${s}search-aggregations-metrics-min-aggregation.html`,moving_avg:`${s}search-aggregations-pipeline-movfn-aggregation.html`,percentile_ranks:`${s}search-aggregations-metrics-percentile-rank-aggregation.html`,serial_diff:`${s}search-aggregations-pipeline-serialdiff-aggregation.html`,std_dev:`${s}search-aggregations-metrics-extendedstats-aggregation.html`,sum:`${s}search-aggregations-metrics-sum-aggregation.html`,top_hits:`${s}search-aggregations-metrics-top-hits-aggregation.html`,top_metrics:`${s}search-aggregations-metrics-top-metrics.html`,change_point:`${s}search-aggregations-change-point-aggregation.html`},runtimeFields:{overview:`${s}runtime.html`,mapping:`${s}runtime-mapping-fields.html`},scriptedFields:{scriptFields:`${s}search-request-script-fields.html`,scriptAggs:`${s}search-aggregations.html`,painless:`${s}modules-scripting-painless.html`,painlessApi:`${i}guide/en/elasticsearch/painless/${n}/painless-api-reference.html`,painlessLangSpec:`${i}guide/en/elasticsearch/painless/${n}/painless-lang-spec.html`,painlessSyntax:`${s}modules-scripting-painless-syntax.html`,painlessWalkthrough:`${i}guide/en/elasticsearch/painless/${n}/painless-walkthrough.html`,painlessLanguage:`${i}guide/en/elasticsearch/painless/${n}/painless-lang-spec.html`,luceneExpressions:`${s}modules-scripting-expression.html`},indexPatterns:{introduction:`${o}data-views.html`,fieldFormattersNumber:`${o}numeral.html`,fieldFormattersString:`${o}managing-data-views.html#string-field-formatters`,runtimeFields:`${o}managing-data-views.html#runtime-fields`},addData:`${o}connect-to-elasticsearch.html`,kibana:{askElastic:`${i}products/kibana/ask-elastic?blade=kibanaaskelastic`,createGithubIssue:`${a}kibana/issues/new/choose`,feedback:`${i}products/kibana/feedback?blade=kibanafeedback`,guide:`${o}index.html`,autocompleteSuggestions:`${o}kibana-concepts-analysts.html#autocomplete-suggestions`,secureSavedObject:`${o}xpack-security-secure-saved-objects.html`,xpackSecurity:`${o}xpack-security.html`},upgradeAssistant:{overview:`${o}upgrade-assistant.html`,batchReindex:`${o}batch-start-resume-reindex.html`,remoteReindex:`${s}docs-reindex.html#reindex-from-remote`,reindexWithPipeline:`${s}docs-reindex.html#reindex-with-an-ingest-pipeline`},rollupJobs:`${o}data-rollups.html`,elasticsearch:{docsBase:`${s}`,asyncSearch:`${s}async-search-intro.html`,dataStreams:`${s}data-streams.html`,deprecationLogging:`${s}logging.html#deprecation-logging`,createIndex:`${s}indices-create-index.html`,frozenIndices:`${s}frozen-indices.html`,gettingStarted:`${s}getting-started.html`,hiddenIndices:`${s}multi-index.html#hidden`,ilm:`${s}index-lifecycle-management.html`,ilmForceMerge:`${s}ilm-forcemerge.html`,ilmFreeze:`${s}ilm-freeze.html`,ilmPhaseTransitions:`${s}ilm-index-lifecycle.html#ilm-phase-transitions`,ilmReadOnly:`${s}ilm-readonly.html`,ilmRollover:`${s}ilm-rollover.html`,ilmSearchableSnapshot:`${s}ilm-searchable-snapshot.html`,ilmSetPriority:`${s}ilm-set-priority.html`,ilmShrink:`${s}ilm-shrink.html`,ilmWaitForSnapshot:`${s}ilm-wait-for-snapshot.html`,indexModules:`${s}index-modules.html`,indexSettings:`${s}index-modules.html#index-modules-settings`,dynamicIndexSettings:`${s}index-modules.html#dynamic-index-settings`,indexTemplates:`${s}index-templates.html`,mapping:`${s}mapping.html`,mappingAnalyzer:`${s}analyzer.html`,mappingCoerce:`${s}coerce.html`,mappingCopyTo:`${s}copy-to.html`,mappingDocValues:`${s}doc-values.html`,mappingDynamic:`${s}dynamic.html`,mappingDynamicFields:`${s}dynamic-field-mapping.html`,mappingDynamicTemplates:`${s}dynamic-templates.html`,mappingEagerGlobalOrdinals:`${s}eager-global-ordinals.html`,mappingEnabled:`${s}enabled.html`,mappingFieldData:`${s}text.html#fielddata-mapping-param`,mappingFieldDataEnable:`${s}text.html#before-enabling-fielddata`,mappingFieldDataFilter:`${s}text.html#field-data-filtering`,mappingFieldDataTypes:`${s}mapping-types.html`,mappingFormat:`${s}mapping-date-format.html`,mappingIgnoreAbove:`${s}ignore-above.html`,mappingIgnoreMalformed:`${s}ignore-malformed.html`,mappingIndex:`${s}mapping-index.html`,mappingIndexOptions:`${s}index-options.html`,mappingIndexPhrases:`${s}index-phrases.html`,mappingIndexPrefixes:`${s}index-prefixes.html`,mappingJoinFieldsPerformance:`${s}parent-join.html#_parent_join_and_performance`,mappingMeta:`${s}mapping-field-meta.html`,mappingMetaFields:`${s}mapping-meta-field.html`,mappingMultifields:`${s}multi-fields.html`,mappingNormalizer:`${s}normalizer.html`,mappingNorms:`${s}norms.html`,mappingNullValue:`${s}null-value.html`,mappingParameters:`${s}mapping-params.html`,mappingPositionIncrementGap:`${s}position-increment-gap.html`,mappingRankFeatureFields:`${s}rank-feature.html`,mappingRouting:`${s}mapping-routing-field.html`,mappingSimilarity:`${s}similarity.html`,mappingSourceFields:`${s}mapping-source-field.html`,mappingSourceFieldsDisable:`${s}mapping-source-field.html#disable-source-field`,mappingStore:`${s}mapping-store.html`,mappingTermVector:`${s}term-vector.html`,mappingTypesRemoval:`${s}removal-of-types.html`,migrateIndexAllocationFilters:`${s}migrate-index-allocation-filters.html`,migrationApiDeprecation:`${s}migration-api-deprecation.html`,nodeRoles:`${s}modules-node.html#node-roles`,releaseHighlights:`${s}release-highlights.html`,latestReleaseHighlights:`${i}guide/en/elastic-stack/current/elastic-stack-highlights.html`,remoteClusters:`${s}remote-clusters.html`,remoteClustersProxy:`${s}remote-clusters.html#proxy-mode`,remoteClusersProxySettings:`${s}remote-clusters-settings.html#remote-cluster-proxy-settings`,remoteClustersOnPremSetupTrustWithCert:`${s}remote-clusters-cert.html`,remoteClustersOnPremSetupTrustWithApiKey:`${s}remote-clusters-api-key.html`,remoteClustersCloudSetupTrust:`${i}guide/en/cloud/current/ec-enable-ccs.html`,rrf:`${s}rrf.html`,scriptParameters:`${s}modules-scripting-using.html#prefer-params`,secureCluster:`${s}secure-cluster.html`,shardAllocationSettings:`${s}modules-cluster.html#cluster-shard-allocation-settings`,sortSearch:`${s}sort-search-results.html`,transportSettings:`${s}modules-network.html#common-network-settings`,typesRemoval:`${s}removal-of-types.html`,setupUpgrade:`${s}setup-upgrade.html`,apiCompatibilityHeader:`${s}api-conventions.html#api-compatibility`},siem:{guide:`${p}index.html`,gettingStarted:`${p}index.html`,privileges:`${p}sec-requirements.html`,ml:`${p}machine-learning.html`,ruleChangeLog:`${p}prebuilt-rules-downloadable-updates.html`,detectionsReq:`${p}detections-permissions-section.html`,networkMap:`${p}conf-map-ui.html`,troubleshootGaps:`${p}alerts-ui-monitor.html#troubleshoot-gaps`,ruleApiOverview:`${p}rule-api-overview.html`,configureAlertSuppression:`${p}alert-suppression.html#_configure_alert_suppression`},securitySolution:{trustedApps:`${p}trusted-apps-ov.html`,eventFilters:`${p}event-filters.html`,blocklist:`${p}blocklist.html`,threatIntelInt:`${p}es-threat-intel-integrations.html`,endpointArtifacts:`${p}endpoint-artifacts.html`,policyResponseTroubleshooting:{full_disk_access:`${p}deploy-elastic-endpoint.html#enable-fda-endpoint`,macos_system_ext:`${p}deploy-elastic-endpoint.html#system-extension-endpoint`,linux_deadlock:`${p}ts-management.html#linux-deadlock`},packageActionTroubleshooting:{es_connection:`${p}ts-management.html`},responseActions:`${p}response-actions.html`,configureEndpointIntegrationPolicy:`${p}configure-endpoint-integration-policy.html`,exceptions:{value_lists:`${p}value-lists-exceptions.html`},privileges:`${p}endpoint-management-req.html`,manageDetectionRules:`${p}rules-ui-management.html`},query:{eql:`${s}eql.html`,kueryQuerySyntax:`${o}kuery-query.html`,luceneQuery:`${s}query-dsl-query-string-query.html`,luceneQuerySyntax:`${s}query-dsl-query-string-query.html#query-string-syntax`,percolate:`${s}query-dsl-percolate-query.html`,queryDsl:`${s}query-dsl.html`},search:{sessions:`${o}search-sessions.html`,sessionLimits:`${o}search-sessions.html#_limitations`},date:{dateMath:`${s}common-options.html#date-math`,dateMathIndexNames:`${s}date-math-index-names.html`},management:{dashboardSettings:`${o}advanced-options.html#kibana-dashboard-settings`,indexManagement:`${s}index-mgmt.html`,kibanaSearchSettings:`${o}advanced-options.html#kibana-search-settings`,discoverSettings:`${o}advanced-options.html#kibana-discover-settings`,visualizationSettings:`${o}advanced-options.html#kibana-visualization-settings`,timelionSettings:`${o}advanced-options.html#kibana-timelion-settings`,savedObjectsApiList:`${o}saved-objects-api.html#saved-objects-api`},ml:{guide:`${b}index.html`,aggregations:`${b}ml-configuring-aggregation.html`,anomalyDetection:`${b}ml-ad-overview.html`,anomalyDetectionBucketSpan:`${b}ml-ad-run-jobs.html#ml-ad-bucket-span`,anomalyDetectionConfiguringCategories:`${b}ml-configuring-categories.html`,anomalyDetectionCardinality:`${b}ml-ad-run-jobs.html#ml-ad-cardinality`,anomalyDetectionCreateJobs:`${b}ml-ad-run-jobs.html#ml-ad-create-job`,anomalyDetectionDetectors:`${b}ml-ad-run-jobs.html#ml-ad-detectors`,anomalyDetectionFunctions:`${b}ml-functions.html`,anomalyDetectionInfluencers:`${b}ml-ad-run-jobs.html#ml-ad-influencers`,anomalyDetectionJobs:`${b}ml-ad-finding-anomalies.html`,anomalyDetectionJobResource:`${s}ml-put-job.html#ml-put-job-path-parms`,anomalyDetectionJobResourceAnalysisConfig:`${s}ml-put-job.html#put-analysisconfig`,anomalyDetectionJobTips:`${b}ml-ad-run-jobs.html#ml-ad-job-tips`,anomalyDetectionScoreExplanation:`${b}ml-ad-explain.html`,alertingRules:`${b}ml-configuring-alerts.html`,anomalyDetectionModelMemoryLimits:`${b}ml-ad-run-jobs.html#ml-ad-model-memory-limits`,calendars:`${b}ml-ad-run-jobs.html#ml-ad-calendars`,classificationEvaluation:`${b}ml-dfa-classification.html#ml-dfanalytics-classification-evaluation`,customRules:`${b}ml-ad-run-jobs.html#ml-ad-rules`,customUrls:`${b}ml-configuring-url.html`,dataFrameAnalytics:`${b}ml-dfanalytics.html`,dFAPrepareData:`${b}ml-dfa-overview.html#prepare-transform-data`,featureImportance:`${b}ml-feature-importance.html`,outlierDetectionRoc:`${b}ml-dfa-finding-outliers.html#ml-dfanalytics-roc`,regressionEvaluation:`${b}ml-dfa-regression.html#ml-dfanalytics-regression-evaluation`,classificationAucRoc:`${b}ml-dfa-classification.html#ml-dfanalytics-class-aucroc`,setUpgradeMode:`${s}ml-set-upgrade-mode.html`,trainedModels:`${b}ml-trained-models.html`,startTrainedModelsDeployment:`${b}ml-nlp-deploy-model.html`},transforms:{guide:`${s}transforms.html`,alertingRules:`${s}transform-alerts.html`},visualize:{guide:`${o}dashboard.html`,lens:`${i}what-is/kibana-lens`,lensPanels:`${o}lens.html`,maps:`${i}maps`,vega:`${o}vega.html`,tsvbIndexPatternMode:`${o}tsvb.html#tsvb-index-pattern-mode`},observability:{guide:`${i}guide/en/observability/${n}/index.html`,infrastructureThreshold:`${i}guide/en/observability/${n}/infrastructure-threshold-alert.html`,logsThreshold:`${i}guide/en/observability/${n}/logs-threshold-alert.html`,metricsThreshold:`${i}guide/en/observability/${n}/metrics-threshold-alert.html`,threshold:`${i}guide/en/observability/${n}/threshold-alert.html`,monitorStatus:`${i}guide/en/observability/${n}/monitor-status-alert.html`,monitorUptime:`${i}guide/en/observability/${n}/monitor-uptime.html`,tlsCertificate:`${i}guide/en/observability/${n}/tls-certificate-alert.html`,uptimeDurationAnomaly:`${i}guide/en/observability/${n}/duration-anomaly-alert.html`,monitorLogs:`${i}guide/en/observability/${n}/monitor-logs.html`,analyzeMetrics:`${i}guide/en/observability/${n}/analyze-metrics.html`,monitorUptimeSynthetics:`${i}guide/en/observability/${n}/monitor-uptime-synthetics.html`,userExperience:`${i}guide/en/observability/${n}/user-experience.html`,createAlerts:`${i}guide/en/observability/${n}/create-alerts.html`,syntheticsCommandReference:`${i}guide/en/observability/${n}/synthetics-configuration.html#synthetics-configuration-playwright-options`,syntheticsProjectMonitors:`${i}guide/en/observability/${n}/synthetic-run-tests.html#synthetic-monitor-choose-project`,syntheticsMigrateFromIntegration:`${i}guide/en/observability/${n}/synthetics-migrate-from-integration.html`,sloBurnRateRule:`${i}guide/en/observability/${n}/slo-burn-rate-alert.html`},alerting:{guide:`${o}create-and-manage-rules.html`,actionTypes:`${o}action-types.html`,apmRules:`${o}apm-alerts.html`,emailAction:`${o}email-action-type.html`,emailActionConfig:`${o}email-action-type.html`,emailExchangeClientSecretConfig:`${o}email-action-type.html#exchange-client-secret`,emailExchangeClientIdConfig:`${o}email-action-type.html#exchange-client-tenant-id`,generalSettings:`${o}alert-action-settings-kb.html#general-alert-action-settings`,indexAction:`${o}index-action-type.html`,esQuery:`${o}rule-type-es-query.html`,indexThreshold:`${o}rule-type-index-threshold.html`,maintenanceWindows:`${o}maintenance-windows.html`,pagerDutyAction:`${o}pagerduty-action-type.html`,preconfiguredConnectors:`${o}pre-configured-connectors.html`,preconfiguredAlertHistoryConnector:`${o}index-action-type.html#preconfigured-connector-alert-history`,serviceNowAction:`${o}servicenow-action-type.html#configuring-servicenow`,serviceNowSIRAction:`${o}servicenow-sir-action-type.html`,setupPrerequisites:`${o}alerting-setup.html#alerting-prerequisites`,slackAction:`${o}slack-action-type.html#configuring-slack-webhook`,slackApiAction:`${o}slack-action-type.html#configuring-slack-web-api`,teamsAction:`${o}teams-action-type.html#configuring-teams`,connectors:`${o}action-types.html`},taskManager:{healthMonitoring:`${o}task-manager-health-monitoring.html`},maps:{connectToEms:`${o}maps-connect-to-ems.html`,guide:`${o}maps.html`,importGeospatialPrivileges:`${o}import-geospatial-data.html#import-geospatial-privileges`,gdalTutorial:`${i}blog/how-to-ingest-geospatial-data-into-elasticsearch-with-gdal`,termJoinsExample:`${o}terms-join.html#_example_term_join`},monitoring:{alertsKibana:`${o}kibana-alerts.html`,alertsKibanaCpuThreshold:`${o}kibana-alerts.html#kibana-alerts-cpu-threshold`,alertsKibanaDiskThreshold:`${o}kibana-alerts.html#kibana-alerts-disk-usage-threshold`,alertsKibanaJvmThreshold:`${o}kibana-alerts.html#kibana-alerts-jvm-memory-threshold`,alertsKibanaMissingData:`${o}kibana-alerts.html#kibana-alerts-missing-monitoring-data`,alertsKibanaThreadpoolRejections:`${o}kibana-alerts.html#kibana-alerts-thread-pool-rejections`,alertsKibanaCCRReadExceptions:`${o}kibana-alerts.html#kibana-alerts-ccr-read-exceptions`,alertsKibanaLargeShardSize:`${o}kibana-alerts.html#kibana-alerts-large-shard-size`,alertsKibanaClusterAlerts:`${o}kibana-alerts.html#kibana-alerts-cluster-alerts`,metricbeatBlog:`${i}blog/external-collection-for-elastic-stack-monitoring-is-now-available-via-metricbeat`,monitorElasticsearch:`${s}configuring-metricbeat.html`,monitorKibana:`${o}monitoring-metricbeat.html`,monitorLogstash:`${i}guide/en/logstash/${n}/monitoring-with-metricbeat.html`,troubleshootKibana:`${o}monitor-troubleshooting.html`},reporting:{cloudMinimumRequirements:`${o}reporting-getting-started.html#reporting-on-cloud-resource-requirements`,grantUserAccess:`${o}secure-reporting.html#grant-user-access`,browserSystemDependencies:`${o}secure-reporting.html#install-reporting-packages`,browserSandboxDependencies:`${o}reporting-troubleshooting.html#reporting-troubleshooting-sandbox-dependency`},security:{apiKeyServiceSettings:`${s}security-settings.html#api-key-service-settings`,clusterPrivileges:`${s}security-privileges.html#privileges-list-cluster`,elasticsearchSettings:`${s}security-settings.html`,elasticsearchEnableSecurity:`${s}configuring-stack-security.html`,elasticsearchEnableApiKeys:`${s}security-settings.html#api-key-service-settings`,indicesPrivileges:`${s}security-privileges.html#privileges-list-indices`,kibanaTLS:`${s}security-basic-setup.html#encrypt-internode-communication`,kibanaPrivileges:`${o}kibana-privileges.html`,mappingRoles:`${s}mapping-roles.html`,mappingRolesFieldRules:`${s}role-mapping-resources.html#mapping-roles-rule-field`,runAsPrivilege:`${s}security-privileges.html#_run_as_privilege`},spaces:{kibanaLegacyUrlAliases:`${o}legacy-url-aliases.html`,kibanaDisableLegacyUrlAliasesApi:`${o}spaces-api-disable-legacy-url-aliases.html`},watcher:{jiraAction:`${s}actions-jira.html`,pagerDutyAction:`${s}actions-pagerduty.html`,slackAction:`${s}actions-slack.html`,ui:`${o}watcher-ui.html`},ccs:{guide:`${s}modules-cross-cluster-search.html`,skippingDisconnectedClusters:`${s}modules-cross-cluster-search.html#skip-unavailable-clusters`},apis:{bulkIndexAlias:`${s}indices-aliases.html`,byteSizeUnits:`${s}api-conventions.html#byte-units`,createAutoFollowPattern:`${s}ccr-put-auto-follow-pattern.html`,createFollower:`${s}ccr-put-follow.html`,createIndex:`${s}indices-create-index.html`,createSnapshotLifecyclePolicy:`${s}slm-api-put-policy.html`,createRoleMapping:`${s}security-api-put-role-mapping.html`,createRoleMappingTemplates:`${s}security-api-put-role-mapping.html#_role_templates`,createRollupJobsRequest:`${s}rollup-put-job.html#rollup-put-job-api-request-body`,createApiKey:`${s}security-api-create-api-key.html`,createPipeline:`${s}put-pipeline-api.html`,createTransformRequest:`${s}put-transform.html#put-transform-request-body`,cronExpressions:`${s}cron-expressions.html`,executeWatchActionModes:`${s}watcher-api-execute-watch.html#watcher-api-execute-watch-action-mode`,indexExists:`${s}indices-exists.html`,multiSearch:`${s}search-multi-search.html`,openIndex:`${s}indices-open-close.html`,putComponentTemplate:`${s}indices-component-template.html`,painlessExecute:`${i}guide/en/elasticsearch/painless/${n}/painless-execute-api.html`,painlessExecuteAPIContexts:`${i}guide/en/elasticsearch/painless/${n}/painless-execute-api.html#_contexts`,putComponentTemplateMetadata:`${s}indices-component-template.html#component-templates-metadata`,putEnrichPolicy:`${s}put-enrich-policy-api.html`,putIndexTemplateV1:`${s}indices-templates-v1.html`,putSnapshotLifecyclePolicy:`${s}slm-api-put-policy.html`,putWatch:`${s}watcher-api-put-watch.html`,restApis:`${s}rest-apis.html`,searchPreference:`${s}search-search.html#search-preference`,securityApis:`${s}security-api.html`,simulatePipeline:`${s}simulate-pipeline-api.html`,timeUnits:`${s}api-conventions.html#time-units`,unfreezeIndex:`${s}unfreeze-index-api.html`,updateTransform:`${s}update-transform.html`},plugins:{azureRepo:`${s}repository-azure.html`,gcsRepo:`${s}repository-gcs.html`,hdfsRepo:`${c}repository-hdfs.html`,ingestAttachment:`${c}ingest-attachment.html`,s3Repo:`${s}repository-s3.html`,snapshotRestoreRepos:`${s}snapshots-register-repository.html`,mapperSize:`${c}mapper-size-usage.html`},snapshotRestore:{guide:`${s}snapshot-restore.html`,changeIndexSettings:`${s}index-modules.html`,createSnapshot:`${s}snapshots-take-snapshot.html`,getSnapshot:`${s}get-snapshot-api.html`,registerSharedFileSystem:`${s}snapshots-filesystem-repository.html#filesystem-repository-settings`,registerSourceOnly:`${s}snapshots-source-only-repository.html#source-only-repository-settings`,registerUrl:`${s}snapshots-read-only-repository.html#read-only-url-repository-settings`,restoreSnapshot:`${s}snapshots-restore-snapshot.html`,restoreSnapshotApi:`${s}restore-snapshot-api.html#restore-snapshot-api-request-body`,searchableSnapshotSharedCache:`${s}searchable-snapshots.html#searchable-snapshots-shared-cache`},ingest:{append:`${s}append-processor.html`,bytes:`${s}bytes-processor.html`,circle:`${s}ingest-circle-processor.html`,convert:`${s}convert-processor.html`,csv:`${s}csv-processor.html`,date:`${s}date-processor.html`,dateIndexName:`${s}date-index-name-processor.html`,dissect:`${s}dissect-processor.html`,dissectKeyModifiers:`${s}dissect-processor.html#dissect-key-modifiers`,dotExpander:`${s}dot-expand-processor.html`,drop:`${s}drop-processor.html`,enrich:`${s}ingest-enriching-data.html`,fail:`${s}fail-processor.html`,foreach:`${s}foreach-processor.html`,geoIp:`${s}geoip-processor.html`,geoMatch:`${s}geo-match-enrich-policy-type.html`,grok:`${s}grok-processor.html`,gsub:`${s}gsub-processor.html`,htmlString:`${s}htmlstrip-processor.html`,inference:`${s}inference-processor.html`,inferenceClassification:`${s}inference-processor.html#inference-processor-classification-opt`,inferenceRegression:`${s}inference-processor.html#inference-processor-regression-opt`,join:`${s}join-processor.html`,json:`${s}json-processor.html`,kv:`${s}kv-processor.html`,lowercase:`${s}lowercase-processor.html`,pipeline:`${s}pipeline-processor.html`,pipelines:`${s}ingest.html`,csvPipelines:`${i}guide/en/ecs/${n}/ecs-converting.html`,pipelineFailure:`${s}ingest.html#handling-pipeline-failures`,processors:`${s}processors.html`,remove:`${s}remove-processor.html`,rename:`${s}rename-processor.html`,script:`${s}script-processor.html`,set:`${s}set-processor.html`,setSecurityUser:`${s}ingest-node-set-security-user-processor.html`,sort:`${s}sort-processor.html`,split:`${s}split-processor.html`,trim:`${s}trim-processor.html`,uppercase:`${s}uppercase-processor.html`,uriParts:`${s}uri-parts-processor.html`,urlDecode:`${s}urldecode-processor.html`,userAgent:`${s}user-agent-processor.html`},fleet:{guide:`${l}index.html`,fleetServer:`${l}fleet-server.html`,fleetServerAddFleetServer:`${l}add-a-fleet-server.html`,settings:`${l}fleet-settings.html`,kafkaSettings:`${l}kafka-output-settings.html`,logstashSettings:`${l}ls-output-settings.html`,settingsFleetServerHostSettings:`${l}fleet-settings.html#fleet-server-hosts-setting`,settingsFleetServerProxySettings:`${o}fleet-settings-kb.html#fleet-data-visualizer-settings`,troubleshooting:`${l}fleet-troubleshooting.html`,elasticAgent:`${l}elastic-agent-installation.html`,beatsAgentComparison:`${l}beats-agent-comparison.html`,datastreams:`${l}data-streams.html`,datastreamsILM:`${l}data-streams.html#data-streams-ilm`,datastreamsNamingScheme:`${l}data-streams.html#data-streams-naming-scheme`,datastreamsManualRollover:`${s}use-a-data-stream.html#manually-roll-over-a-data-stream`,datastreamsTSDS:`${s}tsds.html`,datastreamsTSDSMetrics:`${s}tsds.html#time-series-metric`,installElasticAgent:`${l}install-fleet-managed-elastic-agent.html`,installElasticAgentStandalone:`${l}install-standalone-elastic-agent.html`,upgradeElasticAgent:`${l}upgrade-elastic-agent.html`,learnMoreBlog:`${i}blog/elastic-agent-and-fleet-make-it-easier-to-integrate-your-systems-with-elastic`,apiKeysLearnMore:`${o}api-keys.html`,onPremRegistry:`${l}air-gapped.html`,packageSignatures:`${l}package-signatures.html`,secureLogstash:`${l}secure-logstash-connections.html`,agentPolicy:`${l}agent-policy.html`,api:`${l}fleet-api-docs.html`,uninstallAgent:`${p}uninstall-agent.html`},ecs:{guide:`${i}guide/en/ecs/current/index.html`},clients:{guide:`${i}guide/en/elasticsearch/client/index.html`,goConnecting:`${i}guide/en/elasticsearch/client/go-api/${n}/connecting.html`,goGettingStarted:`${i}guide/en/elasticsearch/client/go-api/${n}/getting-started-go.html`,goIndex:`${i}guide/en/elasticsearch/client/go-api/${n}/index.html`,goOverview:`${i}guide/en/elasticsearch/client/go-api/${n}/overview.html`,javaBasicAuthentication:`${i}guide/en/elasticsearch/client/java-api-client/${n}/_basic_authentication.html`,javaIndex:`${i}guide/en/elasticsearch/client/java-api-client/${n}/index.html`,javaInstallation:`${i}guide/en/elasticsearch/client/java-api-client/${n}/installation.html`,javaIntroduction:`${i}guide/en/elasticsearch/client/java-api-client/${n}/introduction.html`,javaRestLow:`${i}guide/en/elasticsearch/client/java-api-client/${n}/java-rest-low.html`,jsAdvancedConfig:`${i}guide/en/elasticsearch/client/javascript-api/${n}/advanced-config.html`,jsApiReference:`${i}guide/en/elasticsearch/client/javascript-api/${n}/api-reference.html`,jsBasicConfig:`${i}guide/en/elasticsearch/client/javascript-api/${n}/basic-config.html`,jsClientConnecting:`${i}guide/en/elasticsearch/client/javascript-api/${n}/client-connecting.html`,jsIntro:`${i}guide/en/elasticsearch/client/javascript-api/${n}/introduction.html`,netGuide:`${i}guide/en/elasticsearch/client/net-api/${n}/index.html`,netIntroduction:`${i}guide/en/elasticsearch/client/net-api/${n}/introduction.html`,netNest:`${i}guide/en/elasticsearch/client/net-api/${n}/nest.html`,netSingleNode:`${i}guide/en/elasticsearch/client/net-api/${n}/connecting.html#single-node`,phpConfiguration:`${i}guide/en/elasticsearch/client/php-api/${n}/configuration.html`,phpConnecting:`${i}guide/en/elasticsearch/client/php-api/${n}/connecting.html`,phpInstallation:`${i}guide/en/elasticsearch/client/php-api/${n}/installation.html`,phpGuide:`${i}guide/en/elasticsearch/client/php-api/${n}/index.html`,phpOverview:`${i}guide/en/elasticsearch/client/php-api/${n}/overview.html`,pythonAuthentication:`${i}guide/en/elasticsearch/client/python-api/${n}/connecting.html#authentication`,pythonConfig:`${i}guide/en/elasticsearch/client/python-api/${n}/config.html`,pythonConnecting:`${i}guide/en/elasticsearch/client/python-api/${n}/connecting.html`,pythonGuide:`${i}guide/en/elasticsearch/client/python-api/${n}/index.html`,pythonOverview:`${i}guide/en/elasticsearch/client/python-api/${n}/overview.html`,rubyAuthentication:`${i}guide/en/elasticsearch/client/ruby-api/${n}/connecting.html#client-auth`,rubyAdvancedConfig:`${i}guide/en/elasticsearch/client/ruby-api/${n}/advanced-config.html`,rubyBasicConfig:`${i}guide/en/elasticsearch/client/ruby-api/${n}/basic-config.html`,rubyExamples:`${i}guide/en/elasticsearch/client/ruby-api/${n}/examples.html`,rubyOverview:`${i}guide/en/elasticsearch/client/ruby-api/${n}/ruby_client.html`,rustGuide:`${i}guide/en/elasticsearch/client/rust-api/${n}/index.html`,rustOverview:`${i}guide/en/elasticsearch/client/rust-api/${n}/overview.html`},endpoints:{troubleshooting:`${p}ts-management.html#ts-endpoints`},legal:{privacyStatement:`${i}legal/product-privacy-statement`},kibanaUpgradeSavedObjects:{resolveMigrationFailures:`${o}resolve-migrations-failures.html`,repeatedTimeoutRequests:`${o}resolve-migrations-failures.html#_repeated_time_out_requests_that_eventually_fail`,routingAllocationDisabled:`${o}resolve-migrations-failures.html#routing-allocation-disabled`,clusterShardLimitExceeded:`${o}resolve-migrations-failures.html#cluster-shard-limit-exceeded`},searchUI:{appSearch:`${f}tutorials/app-search`,elasticsearch:`${f}tutorials/elasticsearch`},serverlessClients:{goApiReference:`${y}go-apis-references`,goGettingStarted:`${y}go-apis`,httpApis:`${y}http-apis`,httpApiReferences:`${y}http-apis-references`,jsApiReference:`${y}nodejs-apis-references`,jsGettingStarted:`${y}nodejs-apis-getting-started`,phpApiReference:`${y}php-apis-references`,phpGettingStarted:`${y}php-apis-getting-started`,pythonApiReference:`${y}python-apis-references`,pythonGettingStarted:`${y}python-apis-getting-started`,pythonReferences:`${y}python-apis-references`,rubyApiReference:`${y}ruby-apis-references`,rubyGettingStarted:`${y}ruby-apis-getting-started`},serverlessSearch:{integrations:`${y}ingest-data-through-integrations`,integrationsLogstash:`${y}ingest-data-through-integrations-logstash`,integrationsBeats:`${y}ingest-data-through-integrations-beats`,integrationsConnectorClient:`${y}ingest-data-through-integrations-connector-client`,gettingStartedExplore:`${y}get-started-explore`,gettingStartedIngest:`${y}get-started-ingest`,gettingStartedSearch:`${y}get-started-search`},synthetics:{featureRoles:`${i}guide/en/observability/${n}/synthetics-feature-roles.html`},telemetry:{settings:`${o}telemetry-settings-kbn.html`}})}),Ii=(e,t)=>e===t||"ip_range"===e&&"ip"===t||"date_range"===e&&"date"===t||"double_range"===e&&"double"===t||"float_range"===e&&"float"===t||"integer_range"===e&&"integer"===t||"long_range"===e&&"long"===t,Si={asPlainText:!0},ji=({httpService:e,isClearable:t=!1,isDisabled:n=!1,isLoading:r=!1,onChange:s,placeholder:o,rowLabel:l,selectedField:c,selectedValue:u,allowLargeValueLists:p=!1})=>{const[d,m]=Object(i.useState)(void 0),[g,h]=Object(i.useState)({smallLists:[],largeLists:[]}),{loading:f,result:b,start:y}=Ei(Oi),$=Object(i.useCallback)((({name:e})=>e),[]),v=Object(i.useMemo)((()=>((e,t)=>{if(null!=t){const{esTypes:n=[]}=t;return{smallLists:e.smallLists.filter((({type:e})=>n.some((t=>Ii(e,t))))),largeLists:e.largeLists.filter((({type:e})=>n.some((t=>Ii(e,t)))))}}return{smallLists:[],largeLists:[]}})(g,c)),[g,c]),x=Object(i.useMemo)((()=>{if(null!=u){const e=[...g.smallLists,...g.largeLists].filter((({id:e})=>e===u));return null!=e?e:[]}return[]}),[u,g]),{comboOptions:E,labels:_,selectedComboOptions:O}=Object(i.useMemo)((()=>mi({getLabel:$,options:[...v.smallLists,...v.largeLists],selectedOptions:x,disabledOptions:p?void 0:v.largeLists})),[v,x,$,p]),w=Object(i.useCallback)((e=>{const t=[...v.smallLists,...v.largeLists],[n]=e.map((({label:e})=>t[_.indexOf(e)]));s(null!=n?n:"")}),[_,v,s]),I=Object(i.useCallback)((()=>{m(null==u?ni:void 0)}),[u]);Object(i.useEffect)((()=>{null!=b&&h(b)}),[b]),Object(i.useEffect)((()=>{null!=c&&null!=e&&y({http:e,pageIndex:1,pageSize:500})}),[c,y,e]);const S=Object(i.useMemo)((()=>r||f),[r,f]),j=Object(i.useMemo)((()=>!p&&Object(di.jsx)(a.EuiText,{size:"xs"},oi," ",Object(di.jsx)(a.EuiLink,{external:!0,target:"_blank",href:wi({kibanaBranch:"main"}).securitySolution.exceptions.value_lists},li))),[p]);return Object(di.jsx)(a.EuiFormRow,{label:l,error:d,isInvalid:null!=d,helpText:j,fullWidth:!0},Object(di.jsx)(a.EuiComboBox,{async:!0,"data-test-subj":"valuesAutocompleteComboBox listsComboxBox",fullWidth:!0,isClearable:t,isDisabled:n,isInvalid:null!=d,isLoading:S,onBlur:I,onChange:w,options:E,placeholder:o,selectedOptions:O,singleSelection:Si,sortMatchesBy:"startsWith"}))};ji.displayName="AutocompleteFieldList";const ki=({selectedField:e,operatorType:t,fieldValue:n,query:r,indexPattern:a,autocompleteService:s})=>{const[o,l]=Object(i.useState)(!1),[c,u]=Object(i.useState)(!0),[p,d]=Object(i.useState)([]),m=Object(i.useRef)(null);return Object(i.useEffect)((()=>{let i=!0;const o=new AbortController,c=Object(dn.debounce)((async({fieldSelected:e,patterns:t,searchQuery:n})=>{try{if(i){if(null==e||null==t)return;if("boolean"===e.type)return void u(!1);l(!0);const i=Object(En.getDataViewFieldSubtypeNested)(e),r=i?{...e,name:`${i.nested.path}.${e.name}`}:e,a=await s.getValueSuggestions({field:r,indexPattern:t,query:n,signal:o.signal,useTimeRange:!1});0===a.length&&u(!1),l(!1),d([...a])}}catch(e){i&&(d([]),l(!1))}}),500);return t!==be.EXISTS&&c({fieldSelected:e,patterns:a,searchQuery:r,value:n}),m.current=c,()=>{i=!1,o.abort()}}),[e,t,n,a,r,s]),[o,c,p,m.current]},Ci=(e,t,n,i)=>{if(null==t)return;const r=((e,t,n,i)=>n&&i&&(null==e||""===e.trim())?ni:null==t||n&&!i||!(n||null!=e&&""!==e)?void 0:null)(e,t,n,i);if(null!==r)return r;switch(t.type){case"date":const t=fn.a.parse(null!=e?e:"");return Boolean(t&&t.isValid())?void 0:ri;case"number":return null==e||""===e.trim()||isNaN(+e)?ii:void 0;default:return}},Ti=e=>e&&e.trim().length!==e.length,Ai=[{inputDisplay:"true",value:"true"},{inputDisplay:"false",value:"false"}],Ri={asPlainText:!0},Li=({placeholder:e,rowLabel:t,selectedField:n,selectedValue:r,indexPattern:s,isLoading:o,isDisabled:l=!1,isClearable:c=!1,isRequired:u=!1,fieldInputWidth:p,autocompleteService:d,onChange:m,onError:g})=>{const[h,f]=Object(i.useState)(""),[b,y]=Object(i.useState)(!1),[$,v]=Object(i.useState)(void 0),[x,E]=Object(i.useState)(!1),[_,O,w]=ki({autocompleteService:d,fieldValue:r,indexPattern:s,operatorType:be.MATCH,query:h,selectedField:n}),I=Object(i.useCallback)((e=>e),[]),S=Object(i.useMemo)((()=>{const e=String(r);return null!=r&&""!==r.trim()?Object(dn.uniq)([e,...w]):w}),[w,r]),j=Object(i.useMemo)((()=>{const e=String(r);return r?[e]:[]}),[r]),k=Object(i.useCallback)((e=>{if(!e)return E(!1);E(!!Ti(e))}),[E]),C=Object(i.useCallback)((e=>{v((t=>{const n=null!=e;return null!=t!==n&&null!=g&&g(n),e}))}),[v,g]),{comboOptions:T,labels:A,selectedComboOptions:R}=Object(i.useMemo)((()=>mi({getLabel:I,options:S,selectedOptions:j})),[S,j,I]),L=Object(i.useCallback)((e=>{const[t]=e.map((({label:e})=>S[A.indexOf(e)]));k(t),C(void 0),m(null!=t?t:"")}),[C,k,A,m,S]),N=Object(i.useCallback)((e=>{if(""!==e&&null!=n){const t=Ci(e,n,u,b);C(t),t||k(e),f(e)}}),[C,k,u,n,b]),M=Object(i.useCallback)((e=>{const t=Ci(e,n,u,b);if(C(t),null!=t)return E(!1),!1;k(e),m(e)}),[u,m,n,b,C,k]),F=Object(i.useCallback)((e=>{const t=e.target.value;m(t)}),[m]),D=Object(i.useCallback)((e=>{m(e)}),[m]),U=Object(i.useCallback)((()=>{y(!0);const e=Ci(r,n,u,!0);C(e)}),[y,C,r,n,u]),W=Object(i.useMemo)((()=>o||_?ei:null==n?ti:e),[o,n,_,e]),P=Object(i.useMemo)((()=>o||_),[o,_]);Object(i.useEffect)((()=>{v(void 0),null!=g&&g(!1),k(r)}),[null==n?void 0:n.name,null==n?void 0:n.type,r,k,g]);const B=Object(i.useMemo)((()=>Object(di.jsx)(a.EuiFormRow,{label:t,error:$,isInvalid:null!=n&&null!=$,"data-test-subj":"valuesAutocompleteMatchLabel",fullWidth:!0,helpText:x&&si},Object(di.jsx)(a.EuiComboBox,{placeholder:W,isDisabled:l||!n,isLoading:P,isClearable:c,options:T,selectedOptions:R,onChange:L,singleSelection:Ri,onSearchChange:N,onCreateOption:M,isInvalid:null!=n&&null!=$,onBlur:U,sortMatchesBy:"startsWith","data-test-subj":"valuesAutocompleteMatch",style:p?{width:`${p}px`}:{},fullWidth:!0,async:!0}))),[T,$,p,W,c,l,P,t,R,n,x,M,N,L,U]);if(O||null==n)return B;switch(n.type){case"number":return Object(di.jsx)(a.EuiFormRow,{label:t,error:$,isInvalid:null!=n&&null!=$,"data-test-subj":"valuesAutocompleteMatchLabel",fullWidth:!0},Object(di.jsx)(a.EuiFieldNumber,{placeholder:W,onBlur:U,value:"string"==typeof r&&r.trim().length>0?parseFloat(r):null!=r?r:"",onChange:F,"data-test-subj":"valueAutocompleteFieldMatchNumber",style:p?{width:`${p}px`}:{},fullWidth:!0}));case"boolean":return Object(di.jsx)(a.EuiFormRow,{label:t,error:$,isInvalid:null!=n&&null!=$,"data-test-subj":"valuesAutocompleteMatchLabel",fullWidth:!0},Object(di.jsx)(a.EuiSuperSelect,{isLoading:P,options:Ai,valueOfSelected:null!=r?r:"true",onChange:D,"data-test-subj":"valuesAutocompleteMatchBoolean",style:p?{width:`${p}px`}:{},fullWidth:!0}));default:return B}};Li.displayName="AutocompleteFieldMatch";const Ni=({placeholder:e,rowLabel:t,selectedField:n,selectedValue:r,indexPattern:s,isLoading:o,isDisabled:l=!1,isClearable:c=!1,isRequired:u=!1,onChange:p,onError:d,autocompleteService:m})=>{const[g,h]=Object(i.useState)(""),[f,b]=Object(i.useState)(!1),[y,$]=Object(i.useState)(void 0),[v,x]=Object(i.useState)(!1),[E,_,O]=ki({autocompleteService:m,fieldValue:r,indexPattern:s,operatorType:be.MATCH_ANY,query:g,selectedField:n}),w=Object(i.useCallback)((e=>e),[]),I=Object(i.useMemo)((()=>r?Object(dn.uniq)([...r,...O]):O),[O,r]),{comboOptions:S,labels:j,selectedComboOptions:k}=Object(i.useMemo)((()=>mi({getLabel:w,options:I,selectedOptions:r})),[I,r,w]),C=Object(i.useCallback)((e=>x(!!e.find((e=>Ti(e))))),[x]),T=Object(i.useCallback)((e=>{$((t=>{const n=null!=e;return null!=t!==n&&null!=d&&d(n),e}))}),[$,d]),A=Object(i.useCallback)((e=>{const t=e.map((({label:e})=>I[j.indexOf(e)]));T(void 0),C(t),p(t)}),[T,C,j,p,I]),R=Object(i.useCallback)((e=>{if(""===e&&T(void 0),""!==e&&null!=n){const t=Ci(e,n,u,f);T(t),t||C([e]),h(e)}}),[T,C,u,n,f]),L=Object(i.useCallback)((e=>{const t=Ci(e,n,u,f);return T(t),null!=t?(x(!1),!1):(p([...r||[],e]),C([e]),!0)}),[T,C,u,p,n,r,f]),N=Object(i.useCallback)((()=>{T(0===k.length?ni:void 0),b(!0)}),[b,T,k]),M=Object(i.useMemo)((()=>o||E?ei:e),[o,E,e]),F=Object(i.useMemo)((()=>o||E),[o,E]);Object(i.useEffect)((()=>{C(r)}),[n,r,C]);const D=Object(i.useMemo)((()=>Object(di.jsx)(a.EuiFormRow,{label:t,error:y,isInvalid:null!=n&&null!=y,helpText:v&&si,fullWidth:!0},Object(di.jsx)(a.EuiComboBox,{placeholder:M,isLoading:F,isClearable:c,isDisabled:l,options:S,selectedOptions:k,onChange:A,onSearchChange:R,onCreateOption:L,isInvalid:null!=n&&null!=y,onBlur:N,"data-test-subj":"valuesAutocompleteMatchAny",fullWidth:!0,async:!0}))),[S,y,L,R,A,M,c,l,F,t,k,n,v,N]);return _||null==n?D:"number"===n.type?Object(di.jsx)(a.EuiFormRow,{label:t,error:y,isInvalid:null!=n&&null!=y,fullWidth:!0},Object(di.jsx)(a.EuiComboBox,{noSuggestions:!0,placeholder:M,isLoading:F,isClearable:c,isDisabled:l,selectedOptions:k,onChange:A,onSearchChange:R,onCreateOption:L,isInvalid:null!=n&&null!=y,onFocus:N,"data-test-subj":"valuesAutocompleteMatchAnyNumber",fullWidth:!0})):D};Ni.displayName="AutocompleteFieldMatchAny";const Mi={asPlainText:!0},Fi=Object(i.memo)((({autocompleteService:e,placeholder:t,rowLabel:n,selectedField:r,selectedValue:s,indexPattern:o,isLoading:l,isDisabled:c=!1,isClearable:u=!1,isRequired:p=!1,fieldInputWidth:d,onChange:m,onError:g,onWarning:h,warning:f})=>{const[b,y]=Object(i.useState)(""),[$,v]=Object(i.useState)(!1),[x,E]=Object(i.useState)(void 0),[_,O]=Object(i.useState)(!1),[w,,I]=ki({autocompleteService:e,fieldValue:s,indexPattern:o,operatorType:be.WILDCARD,query:b,selectedField:r}),S=Object(i.useCallback)((e=>e),[]),j=Object(i.useMemo)((()=>{const e=String(s);return null!=s&&""!==s.trim()?Object(dn.uniq)([e,...I]):I}),[I,s]),k=Object(i.useMemo)((()=>{const e=String(s);return s?[e]:[]}),[s]),C=Object(i.useCallback)((e=>{if(!e)return O(!1);O(!!Ti(e))}),[O]),T=Object(i.useCallback)((e=>{E((t=>{const n=null!=e;return null!=t!==n&&null!=g&&g(n),e}))}),[E,g]),A=Object(i.useCallback)((e=>{h(void 0!==e)}),[h]),{comboOptions:R,labels:L,selectedComboOptions:N}=Object(i.useMemo)((()=>mi({getLabel:S,options:j,selectedOptions:k})),[j,k,S]),M=Object(i.useCallback)((e=>{const[t]=e.map((({label:e})=>j[L.indexOf(e)]));T(void 0),C(t),O(!1),m(null!=t?t:"")}),[T,C,L,m,j]),F=Object(i.useCallback)((e=>{if(""!==e.trim()&&null!=r){const t=Ci(e,r,p,$);T(t),A(f),t||C(e),y(e)}}),[T,C,p,r,$,f,A]),D=Object(i.useCallback)((e=>{const t=Ci(e,r,p,$);if(T(t),A(f),null!=t)return O(!1),!1;C(e),m(e)}),[p,C,m,r,$,T,A,f]),U=Object(i.useCallback)((()=>{v(!0);const e=Ci(s,r,p,!0);T(e),A(f)}),[v,T,s,r,p,A,f]),W=Object(i.useMemo)((()=>l||w?ei:null==r?ti:t),[l,r,w,t]),P=Object(i.useMemo)((()=>l||w),[l,w]);return Object(i.useEffect)((()=>{E(void 0),null!=g&&g(!1),C(s),h(!1)}),[r,s,g,h,C]),Object(i.useMemo)((()=>Object(di.jsx)(a.EuiFormRow,{label:n,error:x,helpText:f||_&&si,isInvalid:null!=r&&null!=x,"data-test-subj":"valuesAutocompleteWildcardLabel",fullWidth:!0},Object(di.jsx)(a.EuiComboBox,{placeholder:W,isDisabled:c||!r,isLoading:P,isClearable:u,options:R,selectedOptions:N,onChange:M,singleSelection:Mi,onSearchChange:F,onCreateOption:D,isInvalid:null!=r&&null!=x,onBlur:U,sortMatchesBy:"startsWith","data-test-subj":"valuesAutocompleteWildcard",style:d?{width:`${d}px`}:{},fullWidth:!0,async:!0}))),[R,x,d,D,F,M,W,u,c,P,n,N,r,U,f,_])}));Fi.displayName="AutocompleteFieldWildcard";const Di={asPlainText:!0},Ui=({isClearable:e=!1,isDisabled:t=!1,isLoading:n=!1,onChange:r,operator:s,operatorOptions:o,operatorInputWidth:l=150,placeholder:c,selectedField:u})=>{const p=Object(i.useCallback)((({message:e})=>e),[]),d=Object(i.useMemo)((()=>{return null!=o&&o.length>0?o:null==(e=u)?[Xt]:"boolean"===e.type?[Xt,Yt,en,tn]:"nested"===e.type?[Xt]:"file.path.text"===e.name?on:cn;var e}),[o,u]),m=Object(i.useMemo)((()=>s?[s]:[]),[s]),{comboOptions:g,labels:h,selectedComboOptions:f}=Object(i.useMemo)((()=>mi({getLabel:p,options:d,selectedOptions:m})),[d,m,p]),b=Object(i.useCallback)((e=>{const t=e.map((({label:e})=>d[h.indexOf(e)]));r(t)}),[h,r,d]),y=Object(i.useMemo)((()=>({width:`${l}px`})),[l]);return Object(di.jsx)(a.EuiComboBox,{placeholder:c,options:g,selectedOptions:f,onChange:b,isLoading:n,isDisabled:t,isClearable:e,singleSelection:Di,"data-test-subj":"operatorAutocompleteComboBox",style:y})};Ui.displayName="Operator";const Wi=p.i18n.translate("xpack.lists.exceptions.builder.fieldLabel",{defaultMessage:"Field"}),Pi=p.i18n.translate("xpack.lists.exceptions.builder.operatorLabel",{defaultMessage:"Operator"}),Bi=p.i18n.translate("xpack.lists.exceptions.builder.valueLabel",{defaultMessage:"Value"}),qi=p.i18n.translate("xpack.lists.exceptions.builder.exceptionFieldValuePlaceholder",{defaultMessage:"Search field value..."}),Gi=p.i18n.translate("xpack.lists.exceptions.builder.exceptionFieldNestedPlaceholder",{defaultMessage:"Search nested field"}),zi=p.i18n.translate("xpack.lists.exceptions.builder.exceptionListsPlaceholder",{defaultMessage:"Search for list..."}),Ki=p.i18n.translate("xpack.lists.exceptions.builder.exceptionFieldPlaceholder",{defaultMessage:"Search"}),Hi=p.i18n.translate("xpack.lists.exceptions.builder.exceptionOperatorPlaceholder",{defaultMessage:"Operator"}),Vi=p.i18n.translate("xpack.lists.exceptions.builder.addNestedDescription",{defaultMessage:"Add nested condition"}),Ji=p.i18n.translate("xpack.lists.exceptions.builder.addNonNestedDescription",{defaultMessage:"Add non-nested condition"}),Xi=p.i18n.translate("xpack.lists.exceptions.andDescription",{defaultMessage:"AND"}),Yi=p.i18n.translate("xpack.lists.exceptions.orDescription",{defaultMessage:"OR"}),Qi=p.i18n.translate("xpack.lists.exceptions.comboBoxCustomOptionText",{defaultMessage:"Select a field from the list. If your field is not available, create a custom one."}),Zi=p.i18n.translate("xpack.lists.exceptions.field.mappingConflict.description",{defaultMessage:"This field is defined as different types across the following indices or is unmapped. This can cause unexpected query results."}),er=(e,t)=>p.i18n.translate("xpack.lists.exceptions.field.index.description",{defaultMessage:"{name} ({count} indices)",values:{count:t,name:e}}),tr=o()(a.EuiFlexItem).withConfig({displayName:"FieldFlexItem",componentId:"sc-5xhhny-0"})(["overflow:hidden;"]),nr=({allowLargeValueLists:e=!1,autocompleteService:t,entry:n,httpService:s,indexPattern:o,osTypes:l,listType:u,onChange:p,onlyShowListOperators:g=!1,setErrorsExist:h,setWarningsExist:v,showLabel:x,isDisabled:E=!1,operatorsList:_,allowCustomOptions:O=!1,getExtendedFields:w})=>{var I;const S=Object(a.useEuiPaddingSize)("s"),j=Object(i.useCallback)((e=>{h({[n.id]:e})}),[h,n.id]),k=Object(i.useCallback)((e=>{v(e)}),[v]),C=Object(i.useCallback)((([e])=>{const{updatedEntry:t,index:i}=((e,t)=>{const{parent:n,entryIndex:i,nested:r}=e,a=null!=t?t.name.split(".").slice(-1)[0]:"";if("parent"===r){const n=Object(En.getDataViewFieldSubtypeNested)(t),r=(null==n?void 0:n.nested.path)||"";return{index:i,updatedEntry:{entries:[c({field:null!=a?a:"",operator:Xt.operator,type:be.MATCH,value:""})],field:r,id:e.id,type:be.NESTED}}}return"child"===r&&null!=n?{index:n.parentIndex,updatedEntry:{...n.parent,entries:[...n.parent.entries.slice(0,i),{field:null!=a?a:"",id:e.id,operator:Xt.operator,type:be.MATCH,value:""},...n.parent.entries.slice(i+1)]}}:{index:i,updatedEntry:{field:null!=t?t.name:"",id:e.id,operator:Xt.operator,type:be.MATCH,value:""}}})(n,e);p(t,i)}),[p,n]),T=Object(i.useCallback)((([e])=>{const{updatedEntry:t,index:i}=((e,t)=>{const{parent:n,entryIndex:i,field:r,nested:a}=e,s=((e,t)=>{const n=t.operator.type===e.type,i=null!=t.field?t.field.name:"";switch(e.type){case"match":return{field:i,id:t.id,operator:e.operator,type:be.MATCH,value:n&&"string"==typeof t.value?t.value:""};case"match_any":return{field:i,id:t.id,operator:e.operator,type:be.MATCH_ANY,value:n&&Array.isArray(t.value)?t.value:[]};case"list":return{field:i,id:t.id,list:{id:"",type:"ip"},operator:e.operator,type:be.LIST};case"wildcard":return{field:i,id:t.id,operator:e.operator,type:be.WILDCARD,value:n&&"string"==typeof t.value?t.value:""};default:return{field:i,id:t.id,operator:e.operator,type:be.EXISTS}}})(t,e);return ve.is(s)||null==a||null==n?{index:i,updatedEntry:s}:{index:n.parentIndex,updatedEntry:{...n.parent,entries:[...n.parent.entries.slice(0,i),{...s,field:null!=r?r.name.split(".").slice(-1)[0]:""},...n.parent.entries.slice(i+1)]}}})(n,e);j(!1),p(t,i)}),[p,n,j]),A=Object(i.useCallback)((e=>{const{updatedEntry:t,index:i}=((e,t)=>{const{nested:n,parent:i,entryIndex:r,field:a,operator:s}=e;if(null!=n&&null!=i){const n=null!=a?a.name.split(".").slice(-1)[0]:"";return{index:i.parentIndex,updatedEntry:{...i.parent,entries:[...i.parent.entries.slice(0,r),{field:n,id:e.id,operator:s.operator,type:be.MATCH,value:t},...i.parent.entries.slice(r+1)]}}}return{index:r,updatedEntry:{field:null!=a?a.name:"",id:e.id,operator:s.operator,type:be.MATCH,value:t}}})(n,e);p(t,i)}),[p,n]),R=Object(i.useCallback)((e=>{const{updatedEntry:t,index:i}=((e,t)=>{const{nested:n,parent:i,entryIndex:r,field:a,operator:s}=e;if(null!=n&&null!=i){const n=null!=a?a.name.split(".").slice(-1)[0]:"";return{index:i.parentIndex,updatedEntry:{...i.parent,entries:[...i.parent.entries.slice(0,r),{field:n,id:e.id,operator:s.operator,type:be.MATCH_ANY,value:t},...i.parent.entries.slice(r+1)]}}}return{index:r,updatedEntry:{field:null!=a?a.name:"",id:e.id,operator:s.operator,type:be.MATCH_ANY,value:t}}})(n,e);p(t,i)}),[p,n]),L=Object(i.useCallback)((e=>{const{updatedEntry:t,index:i}=((e,t)=>{const{nested:n,parent:i,entryIndex:r,field:a,operator:s}=e;if(null!=n&&null!=i){const n=null!=a?a.name.split(".").slice(-1)[0]:"";return{index:i.parentIndex,updatedEntry:{...i.parent,entries:[...i.parent.entries.slice(0,r),{field:n,id:e.id,operator:s.operator,type:be.WILDCARD,value:t},...i.parent.entries.slice(r+1)]}}}return{index:r,updatedEntry:{field:null!=a?a.name:"",id:e.id,operator:s.operator,type:be.WILDCARD,value:t}}})(n,e);p(t,i)}),[p,n]),N=Object(i.useCallback)((e=>{const{updatedEntry:t,index:i}=((e,t)=>{const{entryIndex:n,field:i,operator:r}=e,{id:a,type:s}=t;return{index:n,updatedEntry:{field:null!=i?i.name:"",id:e.id,list:{id:a,type:s},operator:r.operator,type:be.LIST}}})(n,e);p(t,i)}),[p,n]),[M,F]=Object(i.useState)(null);Object(i.useEffect)((()=>{var e;null!==(e=n.field)&&void 0!==e&&e.name||F(null),(async()=>{var e;const t=null===(e=n.field)||void 0===e?void 0:e.name;if(w&&t){var i;const e=null!==(i=(await w([t])).find((e=>e.name===t)))&&void 0!==i?i:null;F(e)}})()}),[null===(I=n.field)||void 0===I?void 0:I.name,w]);const D=Object(i.useMemo)((()=>E||!O&&(null==o||null!=o&&0===o.fields.length)),[E,o,O]),U=Object(i.useCallback)((e=>{const t=(i=o,"child"===(s=n).nested&&null!=s.parent?{...i,fields:i.fields.filter((e=>{const t=Object(En.getDataViewFieldSubtypeNested)(e);return t&&null!=s.parent&&t.nested.path===s.parent.parent.field})).map((e=>{const[t]=e.name.split(".").slice(-1);return{...e,name:t}}))}:"parent"===s.nested&&null!=s.field?{...i,fields:[s.field]}:"parent"===s.nested&&null==s.field?{...i,fields:i.fields.filter((e=>Object(En.isDataViewFieldSubtypeNested)(e)))}:i);var i,s;const l=r.a.createElement(fi,{placeholder:null!=n.nested?Gi:Ki,indexPattern:t,selectedField:n.field,isClearable:!1,isLoading:!1,isDisabled:E||null==o,onChange:C,acceptsCustomOptions:null==n.nested&&O,"data-test-subj":"exceptionBuilderEntryField",showMappingConflicts:!0}),c={marginRight:`${S}`},u=null==n.nested&&O?Qi:void 0,p=null==(null==M?void 0:M.conflictDescriptions)?u:r.a.createElement(r.a.Fragment,null,u,(()=>{if(!M)return null;const e=Mn(M);return e?r.a.createElement(r.a.Fragment,null,r.a.createElement(a.EuiSpacer,{size:"s"}),r.a.createElement(a.EuiAccordion,{id:`${n.id}`,buttonContent:r.a.createElement(r.a.Fragment,null,r.a.createElement(ir,{"data-test-subj":"mappingConflictsAccordionIcon",tabIndex:0,type:"warning",size:"s",$_css:c}),Zi),arrowDisplay:"none","data-test-subj":"mappingConflictsAccordion"},r.a.createElement("div",{"data-test-subj":"mappingConflictsDescription"},e.map(((e,t)=>{const n=e.groupedIndices.map((({name:e,count:t})=>`${t>1?er(e,t):e}`));return r.a.createElement(a.EuiFlexItem,{key:`${t}`},r.a.createElement(a.EuiSpacer,{size:"s"}),`${e.totalIndexCount>1?er(e.type,e.totalIndexCount):e.type}: ${n.join(", ")}`)})),r.a.createElement(a.EuiSpacer,{size:"s"})))):null})());return r.a.createElement(a.EuiFormRow,{fullWidth:!0,label:e?Wi:"",helpText:p,"data-test-subj":"exceptionBuilderEntryFieldFormRow"},l)}),[o,n,E,C,O,S,M]);return r.a.createElement(a.EuiFlexGroup,{direction:"row",gutterSize:"s",alignItems:"flexStart",className:"exceptionItemEntryContainer","data-test-subj":"exceptionItemEntryContainer"},r.a.createElement(tr,{grow:4},U(x)),r.a.createElement(a.EuiFlexItem,{grow:!1},(e=>{const t=void 0!==n.field&&"file.path.text"===n.field.name,i=(_&&t&&"endpoint_events"===u?_:null==_?void 0:_.filter((e=>e.type!==be.WILDCARD)))||(g?pn:((e,t,n,i=!0)=>"parent"===e.nested||null==e.field?[Xt]:null!=e.nested&&"endpoint"===t||"endpoint"===t?n?[Xt]:[Xt,Qt]:null!=e.nested&&"detection"===t?n?[Xt,en]:[Xt,Qt,en]:n?[Xt,Yt,en,tn]:i?"detection"===t?An(e.field)?ln:[Xt,Yt,Qt,Zt,en,tn,nn,rn]:cn:An(e.field)?un:[Xt,Yt,Qt,Zt,en,tn])(n,u,null!=n.field&&"boolean"===n.field.type,e)),s=r.a.createElement(Ui,{placeholder:Hi,selectedField:n.field,operator:n.operator,isDisabled:D,operatorOptions:i,isLoading:!1,isClearable:!1,onChange:T,"data-test-subj":"exceptionBuilderEntryOperator"});return e?r.a.createElement(a.EuiFormRow,{label:Pi,"data-test-subj":"exceptionBuilderEntryFieldFormRow"},s):r.a.createElement(a.EuiFormRow,{label:"","data-test-subj":"exceptionBuilderEntryFieldFormRow"},s)})(x)),r.a.createElement(tr,{grow:5},(W=x,((i,c)=>{var p,g,h;switch(i){case be.MATCH:const i="string"==typeof n.value?n.value:void 0;return r.a.createElement(Li,{autocompleteService:t,rowLabel:c?Bi:void 0,placeholder:qi,selectedField:null!==(p=n.correspondingKeywordField)&&void 0!==p?p:n.field,selectedValue:i,isDisabled:D,isLoading:!1,isClearable:!1,indexPattern:o,onError:j,onChange:A,isRequired:!0,"data-test-subj":"exceptionBuilderEntryFieldMatch"});case be.MATCH_ANY:const v=Array.isArray(n.value)?n.value:[];return r.a.createElement(Ni,{autocompleteService:t,rowLabel:c?Bi:void 0,placeholder:qi,selectedField:null!=n.correspondingKeywordField?n.correspondingKeywordField:n.field,selectedValue:v,isDisabled:D,isLoading:!1,isClearable:!1,indexPattern:o,onError:j,onChange:R,isRequired:!0,"data-test-subj":"exceptionBuilderEntryFieldMatchAny"});case be.WILDCARD:const x="string"==typeof n.value?n.value:void 0;let E;if("detection"!==u&&"rule_default"!==u){let e=f.WINDOWS;l&&([e]=l);const t=(({os:e,value:t=""})=>{const n=t.trim(),i=(({os:e,field:t,type:n,value:i})=>!["process.executable.caseless","file.path","file.path.text"].includes(t)||("wildcard"===n?e===f.WINDOWS?y(i):$(i):b({value:i,os:e})))({os:e,field:"file.path.text",type:"wildcard",value:n}),r=(({os:e,type:t,value:n})=>{const i=e===f.WINDOWS?"\\":"/",r=n.split(i).pop();if(r)return"wildcard"!==t||1===(r.split("*").length||r.split("?").length)})({os:e,type:"wildcard",value:n});return n.length&&i?void 0===r||r?void 0:d:m})({os:e,value:x});E=t===d?t&&(h=t,r.a.createElement("p",null,h," ",r.a.createElement(a.EuiIconTip,{type:"iInCircle",content:r.a.createElement(Zn.FormattedMessage,{id:"xpack.lists.exceptions.builder.exceptionMatchesOperator.warningMessage.wildcardInFilepath",defaultMessage:"To make a more efficient event filter, use multiple conditions and make them as specific as possible when using wildcards in the path values. For instance, adding a process.name or file.name field."}),size:"m"}))):t}return r.a.createElement(Fi,{autocompleteService:t,"data-test-subj":"exceptionBuilderEntryFieldWildcard",isRequired:!0,isDisabled:D,isLoading:!1,isClearable:!1,indexPattern:o,onError:j,onChange:L,onWarning:k,warning:E,placeholder:qi,rowLabel:c?Bi:void 0,selectedField:null!==(g=n.correspondingKeywordField)&&void 0!==g?g:n.field,selectedValue:x});case be.LIST:const _="string"==typeof n.value?n.value:void 0;return r.a.createElement(ji,{httpService:s,rowLabel:c?Bi:void 0,selectedField:n.field,placeholder:zi,selectedValue:_,isLoading:!1,isDisabled:D,isClearable:!1,onChange:N,"data-test-subj":"exceptionBuilderEntryFieldList",allowLargeValueLists:e});case be.EXISTS:return r.a.createElement(yi,{rowLabel:c?Bi:void 0,placeholder:"—","data-test-subj":"exceptionBuilderEntryFieldExists"});default:return r.a.createElement(r.a.Fragment,null)}})("parent"===n.nested?be.EXISTS:n.operator.type,W))));var W};nr.displayName="BuilderEntryItem";var ir=o()(a.EuiIcon).withConfig({displayName:"_StyledEuiIcon",componentId:"sc-5xhhny-1"})(["",""],(e=>e.$_css));const rr=o()(a.EuiFlexItem).withConfig({displayName:"MyBeautifulLine",componentId:"sc-lefeed-0"})(["&:after{background:",";content:'';width:2px;height:40px;margin:0 15px;}"],(({theme:e})=>e.eui.euiColorLightShade)),ar=o()(a.EuiFlexItem).withConfig({displayName:"MyOverflowContainer",componentId:"sc-lefeed-1"})(["overflow:hidden;width:100%;"]),sr=r.a.memo((({allowLargeValueLists:e,httpService:t,autocompleteService:n,exceptionItem:s,osTypes:o,exceptionItemIndex:l,indexPattern:c,isOnlyItem:u,listType:p,andLogicIncluded:d,onDeleteExceptionItem:m,onChangeExceptionItem:g,setErrorsExist:h,setWarningsExist:f,onlyShowListOperators:b=!1,isDisabled:y=!1,operatorsList:$,allowCustomOptions:v=!1,getExtendedFields:x})=>{const E=Object(i.useCallback)(((e,t)=>{const n=[...s.entries.slice(0,t),{...e},...s.entries.slice(t+1)],i={...s,entries:n};g(i,l)}),[g,s,l]),_=Object(i.useCallback)(((e,t)=>{const n=((e,t,n)=>{const i=e.entries[null!=n?n:t];if(null!=n&&i.type===be.NESTED){const r=[...i.entries.slice(0,t),...i.entries.slice(t+1)];if(0===r.length)return{...e,entries:[...e.entries.slice(0,n),...e.entries.slice(n+1)]};{const{field:a}=i,s={entries:r,field:a,id:null!=i.id?i.id:`${t}`,type:be.NESTED};return{...e,entries:[...e.entries.slice(0,n),s,...e.entries.slice(n+1)]}}}return{...e,entries:[...e.entries.slice(0,t),...e.entries.slice(t+1)]}})(s,e,t);m(n,l)}),[s,m,l]),O=Object(i.useMemo)((()=>null!=c&&s.entries.length>0?Rn(c,s.entries,v):[]),[s.entries,c,v]);return r.a.createElement(a.EuiFlexItem,null,r.a.createElement(a.EuiFlexGroup,{gutterSize:"s","data-test-subj":"exceptionEntriesContainer"},d&&r.a.createElement(Xn,{entriesLength:s.entries.length,exceptionItemIndex:l}),r.a.createElement(ar,{grow:6},r.a.createElement(a.EuiFlexGroup,{gutterSize:"s",direction:"column"},O.map(((i,d)=>{var m;const g=null!==(m=i.id)&&void 0!==m?m:`${d}`;return r.a.createElement(a.EuiFlexItem,{key:g,grow:1},r.a.createElement(a.EuiFlexGroup,{gutterSize:"xs",direction:"row"},"child"===i.nested&&r.a.createElement(rr,{grow:!1}),r.a.createElement(ar,{grow:1},r.a.createElement(nr,{allowLargeValueLists:e,autocompleteService:n,entry:i,httpService:t,indexPattern:c,listType:p,onChange:E,onlyShowListOperators:b,setErrorsExist:h,setWarningsExist:f,osTypes:o,isDisabled:y,showLabel:0===l&&0===d&&"child"!==i.nested,operatorsList:$,allowCustomOptions:v,getExtendedFields:x})),r.a.createElement(Qn,{entries:s.entries,entryIndex:i.entryIndex,exceptionItemIndex:l,isOnlyItem:u,nestedParentIndex:null!=i.parent?i.parent.parentIndex:null,onDelete:_})))}))))))}));sr.displayName="BuilderExceptionListItem";const or=o()(a.EuiButton).withConfig({displayName:"MyEuiButton",componentId:"sc-1p4dmy1-0"})(["min-width:95px;"]),lr=({isAndDisabled:e=!1,isNested:t,isNestedDisabled:n=!0,isOrDisabled:i=!1,isOrHidden:s=!1,showNestedButton:o=!1,onAddClickWhenNested:l,onAndClicked:c,onNestedClicked:u,onOrClicked:p})=>r.a.createElement(a.EuiFlexGroup,{gutterSize:"s",alignItems:"center"},r.a.createElement(a.EuiFlexItem,{grow:!1},r.a.createElement(or,{size:"s",iconType:"plusInCircle",onClick:t?l:c,"data-test-subj":"exceptionsAndButton",isDisabled:e},Xi)),!s&&r.a.createElement(a.EuiFlexItem,{grow:!1},r.a.createElement(or,{fill:!0,size:"s",iconType:"plusInCircle",onClick:p,isDisabled:i,"data-test-subj":"exceptionsOrButton"},Yi)),o&&r.a.createElement(a.EuiFlexItem,{grow:!1},r.a.createElement(a.EuiButton,{size:"s",iconType:"nested",onClick:t?c:u,isDisabled:n,"data-test-subj":"exceptionsNestedButton"},t?Ji:Vi))),cr=o()(a.EuiFlexItem).withConfig({displayName:"MyInvisibleAndBadge",componentId:"sc-1ku67d8-0"})(["visibility:hidden;"]),ur=o()(Hn).withConfig({displayName:"MyAndBadge",componentId:"sc-1ku67d8-1"})(["& > .euiFlexItem{margin:0;}"]),pr=o()(a.EuiFlexItem).withConfig({displayName:"MyButtonsContainer",componentId:"sc-1ku67d8-2"})(["margin:16px 0;"]),dr={addNested:!1,andLogicIncluded:!1,disableAnd:!1,disableNested:!1,disableOr:!1,errors:{},exceptions:[],exceptionsToDelete:[],warningExists:0},mr=({allowLargeValueLists:e,autocompleteService:t,exceptionListItems:n,httpService:s,indexPatterns:o,isAndDisabled:p,isNestedDisabled:d,isOrDisabled:m,isOrHidden:g=!1,listId:h,listNamespaceType:f,listType:b,onChange:y,ruleName:$,exceptionItemName:v,isDisabled:x=!1,osTypes:E,operatorsList:_,allowCustomFieldOptions:O=!1,getExtendedFields:w})=>{const[I,S]=Object(i.useReducer)(((e,t)=>{switch(t.type){case"setExceptions":{const n=t.exceptions.filter((({entries:e})=>e.length>1)).length>0,[i]=t.exceptions.slice(-1),r=null!=i&&i.entries.slice(-1).filter((({type:e})=>"nested"===e)).length>0,a=null!=i?i.entries.slice(-1)[0]:null,s=null!=a&&"nested"===a.type&&0===a.entries.length,o=null!=a&&"nested"===a.type,l=t.exceptions.some((({entries:e})=>e.filter((({type:e})=>e===be.LIST)).length>0));return{...e,addNested:r,andLogicIncluded:n,disableAnd:s,disableNested:l,disableOr:o,exceptions:t.exceptions}}case"setDefault":return{...e,...t.initialState,exceptions:[{...t.lastException,entries:[Ln()]}]};case"setExceptionsToDelete":return{...e,exceptionsToDelete:t.exceptions};case"setDisableAnd":return{...e,disableAnd:t.shouldDisable};case"setDisableOr":return{...e,disableOr:t.shouldDisable};case"setAddNested":return{...e,addNested:t.addNested};case"setErrorsExist":{const n={...e.errors,...t.error};return{...e,errors:n}}case"setWarningsExist":{const{warningExists:n}=e,i=t.warningExists?n+1:n-1;return{...e,warningExists:i<0?0:i}}default:return e}}),{...dr,disableAnd:p,disableNested:d,disableOr:m}),[j,k]=Object(i.useState)(!1),{addNested:C,andLogicIncluded:T,disableAnd:A,disableNested:R,disableOr:L,warningExists:N,exceptions:M,exceptionsToDelete:F}=I,D=(e=>{const{exceptions:t,errors:n}=e,i=t.map((e=>e.entries.map((e=>e.id)))).flat();return Object.keys(n).filter((e=>i.includes(e)&&n[e])).length})(I),U=Object(i.useCallback)((e=>{S({error:e,type:"setErrorsExist"})}),[S]),W=Object(i.useCallback)((e=>{S({type:"setWarningsExist",warningExists:e})}),[S]),P=Object(i.useCallback)((e=>{S({exceptions:e,type:"setExceptions"})}),[S]),B=Object(i.useCallback)((e=>{S({initialState:dr,lastException:e,type:"setDefault"})}),[S]),q=Object(i.useCallback)((e=>{S({exceptions:e,type:"setExceptionsToDelete"})}),[S]),G=Object(i.useCallback)((e=>{S({shouldDisable:e,type:"setDisableAnd"})}),[S]),z=Object(i.useCallback)((e=>{S({shouldDisable:e,type:"setDisableOr"})}),[S]),K=Object(i.useCallback)((e=>{S({addNested:e,type:"setAddNested"})}),[S]),H=Object(i.useCallback)(((e,t)=>{const n=[...M.slice(0,t),{...e},...M.slice(t+1)];P(n)}),[P,M]),V=Object(i.useCallback)(((e,t)=>{if(0===e.entries.length){const n=[...M.slice(0,t),...M.slice(t+1)];0===n.length?(B(e),k(!0)):n.length>0&&wt.is(e)?q([...F,e]):P([...M.slice(0,t),...M.slice(t+1)])}else H(e,t)}),[H,P,q,M,F,B]),J=Object(i.useCallback)(((e=!1)=>{const t=M[M.length-1],{entries:n}=t,i={...t,entries:[...n,e?{entries:[],field:"",id:Object(l.v4)(),type:be.NESTED}:Ln()]};P([...M.slice(0,M.length-1),{...i}])}),[P,M]),X=Object(i.useCallback)((()=>{const e=(({listId:e,namespaceType:t,name:n})=>{return{comments:[],description:"Exception list item",entries:(i=[{field:"",operator:"included",type:"match",value:""}],i.map((e=>"nested"===e.type?c({...e,entries:e.entries.map((e=>c(e)))}):c(e)))),item_id:void 0,list_id:e,meta:{temporaryUuid:Object(l.v4)()},name:n,namespace_type:t,tags:[],type:"simple"};var i})({listId:h,name:null!=v?v:`${null!=$?$:"Rule"} - Exception item`,namespaceType:f});P([...M,{...e}])}),[P,M,h,f,$,v]),Y=(e,t)=>null!=e.id?e.id:null!=e.meta.temporaryUuid?e.meta.temporaryUuid:`${t}`,Q=Object(i.useCallback)((()=>{const e=M[M.length-1],{entries:t}=e,n=t[t.length-1];if(Se.is(n)){const i={...e,entries:[...t.slice(0,t.length-1),{...n,entries:[...n.entries,c({field:"",operator:fe.INCLUDED,type:be.MATCH,value:""})]}]};P([...M.slice(0,M.length-1),{...i}])}else P(M)}),[P,M]),Z=Object(i.useCallback)((()=>{K(!0),z(!0),G(!0),J(!0)}),[J,G,z,K]),ee=Object(i.useCallback)((()=>{K(!1),z(!1),J()}),[J,z,K]),te=Object(i.useMemo)((()=>(e=>e.reduce(((e,t)=>{const n=t.entries.reduce(((e,t)=>{const n=u(t);if(Se.is(n)){const i=n.entries.filter((e=>{const t=u(e),[n]=vn(t,Oe);return null!=n})),r=i.map((e=>u(e))),[a]=vn({...n,entries:r},Se);return null!=a?[...e,{...t,entries:i}]:e}{const[i]=vn(n,je);return null!=i?[...e,t]:e}}),[]);if(0===n.length)return e;const i={...t,entries:n};if(wt.is(i))return[...e,i];if(mt.is(i)||ht.is(i)){const{meta:t,...n}=i,r={...n,meta:void 0};return[...e,r]}return e}),[]))(M)),[M]);return Object(i.useEffect)((()=>{y({errorExists:D>0,exceptionItems:te,exceptionsToDelete:F,warningExists:N>0})}),[y,F,te,D,N]),Object(i.useEffect)((()=>{(0===M.length||1===M.length&&null!=M[0].entries&&0===M[0].entries.length)&&X()}),[M,X]),Object(i.useEffect)((()=>{n.length&&!Dn()(n,M)&&(M.some((e=>e.entries.some((e=>e.field))))||j||P(n))}),[j,n,M,P]),r.a.createElement(a.EuiFlexGroup,{gutterSize:"s",direction:"column","data-test-subj":"exceptionsBuilderWrapper"},M.map(((n,i)=>{return r.a.createElement(a.EuiFlexItem,{grow:1,key:Y(n,i)},r.a.createElement(a.EuiFlexGroup,{gutterSize:"s",direction:"column"},0!==i&&(T?r.a.createElement(a.EuiFlexItem,{grow:!1},r.a.createElement(a.EuiFlexGroup,{gutterSize:"none",direction:"row"},r.a.createElement(cr,{grow:!1},r.a.createElement(ur,{includeAntennas:!0,type:"and"})),r.a.createElement(a.EuiFlexItem,{grow:!1},r.a.createElement(ur,{type:"or"})))):r.a.createElement(a.EuiFlexItem,{grow:!1},r.a.createElement(ur,{type:"or"}))),r.a.createElement(a.EuiFlexItem,{grow:!1},r.a.createElement(sr,{allowLargeValueLists:e,andLogicIncluded:T,autocompleteService:t,exceptionItem:n,exceptionItemIndex:i,httpService:s,indexPattern:o,isOnlyItem:1===M.length,key:Y(n,i),listType:b,onChangeExceptionItem:H,onDeleteExceptionItem:V,onlyShowListOperators:(l=M,l.some((e=>e.entries.some((({type:e})=>e===be.LIST))))),setErrorsExist:U,setWarningsExist:W,osTypes:E,isDisabled:x,operatorsList:_,allowCustomOptions:O,getExtendedFields:w}))));var l})),r.a.createElement(a.EuiSpacer,{size:"m"}),r.a.createElement(pr,{"data-test-subj":"andOrOperatorButtons"},r.a.createElement(a.EuiFlexGroup,{gutterSize:"s"},T&&r.a.createElement(cr,{grow:!1},r.a.createElement(Hn,{includeAntennas:!0,type:"and"})),r.a.createElement(a.EuiFlexItem,{grow:1},r.a.createElement(lr,{isOrDisabled:m||L,isOrHidden:g,isAndDisabled:p||A,isNestedDisabled:d||R,isNested:C,showNestedButton:!0,onOrClicked:X,onAndClicked:ee,onNestedClicked:Z,onAddClickWhenNested:Q})))))};mr.displayName="ExceptionBuilder",t.default=mr}])]);