/*! 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.dataVisualizer_bundle_jsonpfunction=window.dataVisualizer_bundle_jsonpfunction||[]).push([[0],{100:function(e,t,n){"use strict";let i;n.d(t,"a",(function(){return i})),function(e){e.DOCUMENT="document",e.BINARY="binary",e.BOOLEAN="boolean",e.CONFLICT="conflict",e.COUNTER="counter",e.DATE="date",e.DATE_RANGE="date_range",e.DENSE_VECTOR="dense_vector",e.GAUGE="gauge",e.GEO_POINT="geo_point",e.GEO_SHAPE="geo_shape",e.HISTOGRAM="histogram",e.IP="ip",e.IP_RANGE="ip_range",e.FLATTENED="flattened",e.KEYWORD="keyword",e.MURMUR3="murmur3",e.NUMBER="number",e.NESTED="nested",e.RANK_FEATURE="rank_feature",e.RANK_FEATURES="rank_features",e.POINT="point",e.SHAPE="shape",e.STRING="string",e.TEXT="text",e.VERSION="version"}(i||(i={})),Object.values(i)},114:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n(76),o=n.n(i),r=(n(0),n(32)),a=n.n(r),s=n(9),u=n(2);const l={iconType:"questionInCircle",color:"gray"},d={binary:{iconType:"tokenBinary"},boolean:{iconType:"tokenBoolean"},conflict:{iconType:"warning",color:"euiColorVis9",shape:"square"},date:{iconType:"tokenDate"},date_range:{iconType:"tokenDate"},dense_vector:{iconType:"tokenDenseVector"},geo_point:{iconType:"tokenGeo"},geo_shape:{iconType:"tokenGeo"},ip:{iconType:"tokenIP"},ip_range:{iconType:"tokenIP"},flattened:{iconType:"tokenFlattened"},match_only_text:{iconType:"tokenString"},murmur3:{iconType:"tokenSearchType"},number:{iconType:"tokenNumber"},number_range:{iconType:"tokenNumber"},rank_feature:{iconType:"tokenRankFeature"},rank_features:{iconType:"tokenRankFeatures"},histogram:{iconType:"tokenHistogram"},_source:{iconType:"editorCodeBlock",color:"gray"},point:{iconType:"tokenShape"},shape:{iconType:"tokenShape"},string:{iconType:"tokenString"},text:{iconType:"tokenString"},keyword:{iconType:"tokenKeyword"},gauge:{iconType:"tokenMetricGauge"},counter:{iconType:"tokenMetricCounter"},nested:{iconType:"tokenNested"},version:{iconType:"tokenTag"}};function c({type:e,label:t,size:n="s",scripted:i,className:r,...c}){const f=d[e]||l;return Object(u.jsx)(s.EuiToken,o()({},f,{className:a()("kbnFieldIcon",r),"aria-label":t||e,title:t||e,size:n,fill:i?"dark":void 0},c))}n(134);Object.keys({xs:"kbnFieldButton--xs",s:"kbnFieldButton--s"})},127:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;t.default=o},134:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(135);case"v8light":return n(137)}},135:function(e,t,n){var i=n(57),o=n(136);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);i(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},136:function(e,t,n){(t=n(58)(!1)).push([e.i,".kbnFieldButton{align-items:flex-start;border-radius:6px;display:flex;font-size:14px;font-size:1rem;line-height:1.71429rem;margin-bottom:4px;padding:0 8px;transition:box-shadow .15s cubic-bezier(.694,.0482,.335,1),background-color .15s cubic-bezier(.694,.0482,.335,1)}.kbnFieldButton-isActive,.kbnFieldButton:focus-within{outline:2px solid currentColor}.kbnFieldButton-isActive:focus-visible,.kbnFieldButton:focus-within:focus-visible{outline-style:auto}.kbnFieldButton-isActive:not(:focus-visible),.kbnFieldButton:focus-within:not(:focus-visible){outline:none}.kbnFieldButton__button{align-items:flex-start;display:flex;flex-grow:1;line-height:normal;padding:8px 0;text-align:left}.kbnFieldButton__fieldIcon{flex-shrink:0;line-height:0}.kbnFieldButton__name{flex-grow:1;padding:0 8px;word-break:break-word}.kbnFieldButton__infoIcon{align-items:center;display:flex;flex-shrink:0;justify-content:center;line-height:0;min-height:16px}.kbnFieldButton__fieldAction{margin-left:8px}.kbnFieldButton__dragHandle{margin-right:8px}.kbnFieldButton__dragHandle,.kbnFieldButton__fieldAction{line-height:32px}.kbnFieldButton--xs{font-size:12px}.kbnFieldButton--xs .kbnFieldButton__button{padding:4px 0}.kbnFieldButton--xs .kbnFieldButton__fieldAction{margin-left:4px}.kbnFieldButton--xs .kbnFieldButton__dragHandle,.kbnFieldButton--xs .kbnFieldButton__fieldAction{line-height:24px}.kbnFieldButton--flushBoth{padding-left:0;padding-right:0}",""]),e.exports=t},137:function(e,t,n){var i=n(57),o=n(138);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);i(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},138:function(e,t,n){(t=n(58)(!1)).push([e.i,".kbnFieldButton{align-items:flex-start;border-radius:6px;display:flex;font-size:14px;font-size:1rem;line-height:1.71429rem;margin-bottom:4px;padding:0 8px;transition:box-shadow .15s cubic-bezier(.694,.0482,.335,1),background-color .15s cubic-bezier(.694,.0482,.335,1)}.kbnFieldButton-isActive,.kbnFieldButton:focus-within{outline:2px solid currentColor}.kbnFieldButton-isActive:focus-visible,.kbnFieldButton:focus-within:focus-visible{outline-style:auto}.kbnFieldButton-isActive:not(:focus-visible),.kbnFieldButton:focus-within:not(:focus-visible){outline:none}.kbnFieldButton__button{align-items:flex-start;display:flex;flex-grow:1;line-height:normal;padding:8px 0;text-align:left}.kbnFieldButton__fieldIcon{flex-shrink:0;line-height:0}.kbnFieldButton__name{flex-grow:1;padding:0 8px;word-break:break-word}.kbnFieldButton__infoIcon{align-items:center;display:flex;flex-shrink:0;justify-content:center;line-height:0;min-height:16px}.kbnFieldButton__fieldAction{margin-left:8px}.kbnFieldButton__dragHandle{margin-right:8px}.kbnFieldButton__dragHandle,.kbnFieldButton__fieldAction{line-height:32px}.kbnFieldButton--xs{font-size:12px}.kbnFieldButton--xs .kbnFieldButton__button{padding:4px 0}.kbnFieldButton--xs .kbnFieldButton__fieldAction{margin-left:4px}.kbnFieldButton--xs .kbnFieldButton__dragHandle,.kbnFieldButton--xs .kbnFieldButton__fieldAction{line-height:24px}.kbnFieldButton--flushBoth{padding-left:0;padding-right:0}",""]),e.exports=t},139:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(140);case"v8light":return n(142)}},140:function(e,t,n){var i=n(57),o=n(141);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);i(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},141:function(e,t,n){(t=n(58)(!1)).push([e.i,".dvFieldTypeIcon__anchor{align-items:center;display:flex}",""]),e.exports=t},142:function(e,t,n){var i=n(57),o=n(143);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);i(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},143:function(e,t,n){(t=n(58)(!1)).push([e.i,".dvFieldTypeIcon__anchor{align-items:center;display:flex}",""]),e.exports=t},56:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(30);const o=()=>Object(i.useKibana)()},57:function(e,t,n){"use strict";var i,o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),r=[];function a(e){for(var t=-1,n=0;n{const t={term:{_tier:{value:"data_frozen"}}};if(!e)return{bool:{must_not:[t]}};const n=Object(i.cloneDeep)(e);return delete n.match_all,Object(o.a)(n.bool)?Array.isArray(n.bool.must_not)?n.bool.must_not.push(t):(Object(o.a)(n.bool.must_not)&&(n.bool.must_not=[n.bool.must_not,t]),void 0===n.bool.must_not&&(n.bool.must_not=[t])):n.bool={must_not:[t]},n};function a(e,t,n,i){const o=[];return e&&t&&n&&o.push({range:{[e]:{gte:t,lte:n,format:"epoch_millis"}}}),i&&"object"==typeof i&&o.push(i),o}const s={EQ:"eq",GTE:"gte"};function u(e,t){return e.match(/^[a-zA-Z0-9-_.]+$/)?e:`field_${t}`}const l={KUERY:"kuery",LUCENE:"lucene"},d={bool:{must:[{match_all:{}}]}};function c(){return Object(i.cloneDeep)(d)}},61:function(e,t,n){"use strict";function i(e){return null!=e}n.d(t,"a",(function(){return i}))},62:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(46),o=n(0),r=i.__importDefault(n(127));t.default=function(e,t){var n=o.useState(t),i=n[0],a=n[1];return r.default((function(){var t=e.subscribe(a);return function(){return t.unsubscribe()}}),[e]),i}},66:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));class MLRequestFailure extends Error{constructor(e,t){if(super(e.message),Object.setPrototypeOf(this,new.target.prototype),"string"!=typeof t&&void 0!==t)if("body"in t)this.stack=JSON.stringify(t.body,null,2);else try{this.stack=JSON.stringify(t,null,2)}catch(e){}}}var i=n(12);const o=e=>{var t;if(function(e){var t;return e&&void 0!==(null===(t=e.error)||void 0===t?void 0:t.reason)}(e))return{message:null!==(t=e.error.reason)&&void 0!==t?t:"",statusCode:e.status,fullError:e};if(function(e){return"string"==typeof e}(e))return{message:e};if(function(e){return!0===(null==e?void 0:e.isBoom)}(e))return{message:e.output.payload.message,statusCode:e.output.payload.statusCode};if(void 0===(null==e?void 0:e.body)&&(null==e||!e.message))return{message:""};if("string"==typeof e.body)return{message:e.body};if(function(e){return"object"==typeof e.body&&"message"in e.body}(e)){var n,o;if("object"==typeof e.body.attributes&&"string"==typeof(null===(n=e.body.attributes.body)||void 0===n||null===(o=n.error)||void 0===o?void 0:o.reason)){var r,a,s;const t={message:e.body.attributes.body.error.reason,statusCode:e.body.statusCode,fullError:e.body.attributes.body};var u,l,d;return"object"!=typeof e.body.attributes.body.error.caused_by||"string"!=typeof(null===(r=e.body.attributes.body.error.caused_by)||void 0===r?void 0:r.reason)&&"string"!=typeof(null===(a=e.body.attributes.body.error.caused_by)||void 0===a||null===(s=a.caused_by)||void 0===s?void 0:s.reason)||(t.causedBy=(null===(u=e.body.attributes.body.error.caused_by)||void 0===u||null===(l=u.caused_by)||void 0===l?void 0:l.reason)||(null===(d=e.body.attributes.body.error.caused_by)||void 0===d?void 0:d.reason)),Array.isArray(e.body.attributes.body.error.root_cause)&&"object"==typeof e.body.attributes.body.error.root_cause[0]&&Object(i.a)(e.body.attributes.body.error.root_cause[0],["script"])&&(t.causedBy=e.body.attributes.body.error.root_cause[0].script,t.message+=`: '${e.body.attributes.body.error.root_cause[0].script}'`),t}return{message:e.body.message,statusCode:e.body.statusCode}}return function(e){return e&&void 0!==e.message&&"string"==typeof e.message}(e)?{message:e.message}:{message:""}},r=e=>o(e).message},68:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n(0),o=n(13),r=n(62),a=n.n(r),s=n(35);const u={darkMode:!1};var l=n(56);function d(){const{services:{theme:e}}=Object(l.a)();return function(e){const t=function(e){const t=Object(i.useMemo)((()=>{var t;return null!==(t=null==e?void 0:e.theme$)&&void 0!==t?t:Object(o.of)(u)}),[e]),{darkMode:n}=a()(t,u);return n}(e);return Object(i.useMemo)((()=>({euiTheme:t?s.euiDarkVars:s.euiLightVars})),[t])}(e).euiTheme}},73:function(e,t,n){"use strict";function i(e,t=2){if(void 0===e)return"";if(e%1==0)return e;if(Math.abs(e)0&&e<=.5}const s=e=>{var t;const n=(s=e,Object(r.a)(s,["probability"])?e.probability:function(e){let t=1;return e>i&&(t=Math.min(.5,i/e)),+(n=t).toFixed(Math.max(1-Math.log10(n),1));var n}(e.totalNumDocs));var s;const u=null!==(t=e.aggName)&&void 0!==t?t:"sample";return{wrap:t=>a(n)?{[u]:{random_sampler:{probability:n,...e.seed?{seed:e.seed}:{}},aggs:t}}:t,unwrap:e=>a(n)?Object(o.get)(e,[u]):e,probability:n}};var u=n(1),l=n.n(u),d=n(13);[1e-5,5e-5,1e-4,5e-4,.001,.005,.01,.05,.1,.2,.3,.4,.5].map((e=>100*e));const c={ON_AUTOMATIC:"on_automatic",ON_MANUAL:"on_manual",OFF:"off"};class random_sampler_manager_RandomSampler{constructor(e,t,n,i){l()(this,"docCount$",new d.BehaviorSubject(0)),l()(this,"mode$",new d.BehaviorSubject(c.ON_AUTOMATIC)),l()(this,"probability$",new d.BehaviorSubject(.001)),l()(this,"setRandomSamplerModeInStorage",void 0),l()(this,"setRandomSamplerProbabilityInStorage",void 0),this.mode$.next(e),this.setRandomSamplerModeInStorage=t,this.probability$.next(n),this.setRandomSamplerProbabilityInStorage=i}setDocCount(e){return this.docCount$.next(e)}getDocCount(){return this.docCount$.getValue()}setMode(e){return this.setRandomSamplerModeInStorage(e),this.mode$.next(e)}getMode$(){return this.mode$.asObservable()}getMode(){return this.mode$.getValue()}setProbability(e){return this.setRandomSamplerProbabilityInStorage(e),this.probability$.next(e)}getProbability$(){return this.probability$.asObservable()}getProbability(){return this.probability$.getValue()}createRandomSamplerWrapper(){const e=this.getMode(),t=this.getProbability();let n={};e===c.ON_MANUAL?n={probability:t}:e===c.OFF&&(n={probability:1});const i=s({...n,totalNumDocs:this.getDocCount()});return this.setProbability(i.probability),i}}},84:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n(0);var i=n(9),o=n(3),r=n(114),a=n(89),s=(n(139),n(2));const u=({tooltipEnabled:e=!1,type:t})=>{var n;const u=null!==(n=Object(a.a)(t))&&void 0!==n?n:o.i18n.translate("xpack.dataVisualizer.fieldTypeIcon.fieldTypeTooltip",{defaultMessage:"{type} type",values:{type:t}});return!0===e?Object(s.jsx)(i.EuiToolTip,{anchorClassName:"dvFieldTypeIcon__anchor",content:u,"data-test-subj":"dvFieldTypeTooltip",position:"left"},Object(s.jsx)(r.a,{type:t,"data-test-subj":`dvFieldTypeIcon-${t}`})):Object(s.jsx)(r.a,{type:t,label:u})}},89:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(3),o=n(10),r=n(100);const a=i.i18n.translate("unifiedFieldList.fieldNameIcons.unknownFieldAriaLabel",{defaultMessage:"Unknown field"});function s(e){if(!e||e===o.b.UNKNOWN)return a;if("source"===e)return i.i18n.translate("unifiedFieldList.fieldNameIcons.sourceFieldAriaLabel",{defaultMessage:"Source field"});const t=e;switch(t){case r.a.DOCUMENT:return i.i18n.translate("unifiedFieldList.fieldNameIcons.recordAriaLabel",{defaultMessage:"Records"});case r.a.BINARY:return i.i18n.translate("unifiedFieldList.fieldNameIcons.binaryAriaLabel",{defaultMessage:"Binary"});case r.a.BOOLEAN:return i.i18n.translate("unifiedFieldList.fieldNameIcons.booleanAriaLabel",{defaultMessage:"Boolean"});case r.a.CONFLICT:return i.i18n.translate("unifiedFieldList.fieldNameIcons.conflictFieldAriaLabel",{defaultMessage:"Conflict"});case r.a.COUNTER:return i.i18n.translate("unifiedFieldList.fieldNameIcons.counterFieldAriaLabel",{defaultMessage:"Counter metric"});case r.a.DATE:return i.i18n.translate("unifiedFieldList.fieldNameIcons.dateFieldAriaLabel",{defaultMessage:"Date"});case r.a.DATE_RANGE:return i.i18n.translate("unifiedFieldList.fieldNameIcons.dateRangeFieldAriaLabel",{defaultMessage:"Date range"});case r.a.DENSE_VECTOR:return i.i18n.translate("unifiedFieldList.fieldNameIcons.denseVectorFieldAriaLabel",{defaultMessage:"Dense vector"});case r.a.GAUGE:return i.i18n.translate("unifiedFieldList.fieldNameIcons.gaugeFieldAriaLabel",{defaultMessage:"Gauge metric"});case r.a.GEO_POINT:return i.i18n.translate("unifiedFieldList.fieldNameIcons.geoPointFieldAriaLabel",{defaultMessage:"Geo point"});case r.a.GEO_SHAPE:return i.i18n.translate("unifiedFieldList.fieldNameIcons.geoShapeFieldAriaLabel",{defaultMessage:"Geo shape"});case r.a.HISTOGRAM:return i.i18n.translate("unifiedFieldList.fieldNameIcons.histogramFieldAriaLabel",{defaultMessage:"Histogram"});case r.a.IP:return i.i18n.translate("unifiedFieldList.fieldNameIcons.ipAddressFieldAriaLabel",{defaultMessage:"IP address"});case r.a.IP_RANGE:return i.i18n.translate("unifiedFieldList.fieldNameIcons.ipRangeFieldAriaLabel",{defaultMessage:"IP range"});case r.a.FLATTENED:return i.i18n.translate("unifiedFieldList.fieldNameIcons.flattenedFieldAriaLabel",{defaultMessage:"Flattened"});case r.a.MURMUR3:return i.i18n.translate("unifiedFieldList.fieldNameIcons.murmur3FieldAriaLabel",{defaultMessage:"Murmur3"});case r.a.NUMBER:return i.i18n.translate("unifiedFieldList.fieldNameIcons.numberFieldAriaLabel",{defaultMessage:"Number"});case r.a.RANK_FEATURE:return i.i18n.translate("unifiedFieldList.fieldNameIcons.rankFeatureFieldAriaLabel",{defaultMessage:"Rank feature"});case r.a.RANK_FEATURES:return i.i18n.translate("unifiedFieldList.fieldNameIcons.rankFeaturesFieldAriaLabel",{defaultMessage:"Rank features"});case r.a.POINT:return i.i18n.translate("unifiedFieldList.fieldNameIcons.pointFieldAriaLabel",{defaultMessage:"Point"});case r.a.SHAPE:return i.i18n.translate("unifiedFieldList.fieldNameIcons.shapeFieldAriaLabel",{defaultMessage:"Shape"});case r.a.STRING:return i.i18n.translate("unifiedFieldList.fieldNameIcons.stringFieldAriaLabel",{defaultMessage:"String"});case r.a.TEXT:return i.i18n.translate("unifiedFieldList.fieldNameIcons.textFieldAriaLabel",{defaultMessage:"Text"});case r.a.KEYWORD:return i.i18n.translate("unifiedFieldList.fieldNameIcons.keywordFieldAriaLabel",{defaultMessage:"Keyword"});case r.a.NESTED:return i.i18n.translate("unifiedFieldList.fieldNameIcons.nestedFieldAriaLabel",{defaultMessage:"Nested"});case r.a.VERSION:return i.i18n.translate("unifiedFieldList.fieldNameIcons.versionFieldAriaLabel",{defaultMessage:"Version"});default:return t||t}}},97:function(e,t,n){"use strict";function i(e){let t=0,n=0;if(0===e.length)return t;for(let i=0;i