1(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{enumerable:true,get:getter})}};__webpack_require__.r=function(exports){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(exports,"__esModule",{value:true})};__webpack_require__.t=function(value,mode){if(mode&1)value=__webpack_require__(value);if(mode&8)return value;if(mode&4&&typeof value==="object"&&value&&value.__esModule)return value;var ns=Object.create(null);__webpack_require__.r(ns);Object.defineProperty(ns,"default",{enumerable:true,value:value});if(mode&2&&typeof value!="string")for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key]}.bind(null,key));return ns};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=15)})([function(module,exports){module.exports=__osdSharedDeps__.React},function(module,exports){module.exports=__osdSharedDeps__.Lodash},function(module,exports){module.exports=__osdSharedDeps__.ElasticEui},function(module,exports,__webpack_require__){"use strict";module.exports=function(cssWithMappingToString){var list=[];list.toString=function toString(){return this.map((function(item){var content=cssWithMappingToString(item);if(item[2]){return"@media ".concat(item[2]," {").concat(content,"}")}return content})).join("")};list.i=function(modules,mediaQuery,dedupe){if(typeof modules==="string"){modules=[[null,modules,""]]}var alreadyImportedModules={};if(dedupe){for(var i=0;i<this.length;i++){var id=this[i][0];if(id!=null){alreadyImportedModules[id]=true}}}for(var _i=0;_i<modules.length;_i++){var item=[].concat(modules[_i]);if(dedupe&&alreadyImportedModules[item[0]]){continue}if(mediaQuery){if(!item[2]){item[2]=mediaQuery}else{item[2]="".concat(mediaQuery," and ").concat(item[2])}}list.push(item)}};return list}},function(module,exports){module.exports=__osdSharedDeps__.OsdI18n},function(module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);var ns=__osdBundles__.get("plugin/uiActions/public");Object.defineProperties(__webpack_exports__,Object.getOwnPropertyDescriptors(ns))},function(module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);var ns=__osdBundles__.get("plugin/opensearchDashboardsUtils/public");Object.defineProperties(__webpack_exports__,Object.getOwnPropertyDescriptors(ns))},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(17);case"v7light":return __webpack_require__(19);case"v8dark":return __webpack_require__(21);case"v8light":return __webpack_require__(23);case"v9dark":return __webpack_require__(25);case"v9light":return __webpack_require__(27)}},function(module,exports){module.exports=__osdSharedDeps__.Moment},function(module,exports,__webpack_require__){"use strict";var isOldIE=function isOldIE(){var memo;return function memorize(){if(typeof memo==="undefined"){memo=Boolean(window&&document&&document.all&&!window.atob)}return memo}}();var getTarget=function getTarget(){var memo={};return function memorize(target){if(typeof memo[target]==="undefined"){var styleTarget=document.querySelector(target);if(window.HTMLIFrameElement&&styleTarget instanceof window.HTMLIFrameElement){try{styleTarget=styleTarget.contentDocument.head}catch(e){styleTarget=null}}memo[target]=styleTarget}return memo[target]}}();var stylesInDom=[];function getIndexByIdentifier(identifier){var result=-1;for(var i=0;i<stylesInDom.length;i++){if(stylesInDom[i].identifier===identifier){result=i;break}}return result}function modulesToDom(list,options){var idCountMap={};var identifiers=[];for(var i=0;i<list.length;i++){var item=list[i];var id=options.base?item[0]+options.base:item[0];var count=idCountMap[id]||0;var identifier="".concat(id," ").concat(count);idCountMap[id]=count+1;var index=getIndexByIdentifier(identifier);var obj={css:item[1],media:item[2],sourceMap:item[3]};if(index!==-1){stylesInDom[index].references++;stylesInDom[index].updater(obj)}else{stylesInDom.push({identifier:identifier,updater:addStyle(obj,options),references:1})}identifiers.push(identifier)}return identifiers}function insertStyleElement(options){var style=document.createElement("style");var attributes=options.attributes||{};if(typeof attributes.nonce==="undefined"){var nonce=true?__webpack_require__.nc:undefined;if(nonce){attributes.nonce=nonce}}
1Object.keys(attributes).forEach((function(key){style.setAttribute(key,attributes[key])}));if(typeof options.insert==="function"){options.insert(style)}else{var target=getTarget(options.insert||"head");if(!target){throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.")}target.appendChild(style)}return style}function removeStyleElement(style){if(style.parentNode===null){return false}style.parentNode.removeChild(style)}var replaceText=function replaceText(){var textStore=[];return function replace(index,replacement){textStore[index]=replacement;return textStore.filter(Boolean).join("\n")}}();function applyToSingletonTag(style,index,remove,obj){var css=remove?"":obj.media?"@media ".concat(obj.media," {").concat(obj.css,"}"):obj.css;if(style.styleSheet){style.styleSheet.cssText=replaceText(index,css)}else{var cssNode=document.createTextNode(css);var childNodes=style.childNodes;if(childNodes[index]){style.removeChild(childNodes[index])}if(childNodes.length){style.insertBefore(cssNode,childNodes[index])}else{style.appendChild(cssNode)}}}function applyToTag(style,options,obj){var css=obj.css;var media=obj.media;var sourceMap=obj.sourceMap;if(media){style.setAttribute("media",media)}else{style.removeAttribute("media")}if(sourceMap&&typeof btoa!=="undefined"){css+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))))," */")}if(style.styleSheet){style.styleSheet.cssText=css}else{while(style.firstChild){style.removeChild(style.firstChild)}style.appendChild(document.createTextNode(css))}}var singleton=null;var singletonCounter=0;function addStyle(obj,options){var style;var update;var remove;if(options.singleton){var styleIndex=singletonCounter++;style=singleton||(singleton=insertStyleElement(options));update=applyToSingletonTag.bind(null,style,styleIndex,false);remove=applyToSingletonTag.bind(null,style,styleIndex,true)}else{style=insertStyleElement(options);update=applyToTag.bind(null,style,options);remove=function remove(){removeStyleElement(style)}}update(obj);return function updateStyle(newObj){if(newObj){if(newObj.css===obj.css&&newObj.media===obj.media&&newObj.sourceMap===obj.sourceMap){return}update(obj=newObj)}else{remove()}}}module.exports=function(list,options){options=options||{};if(!options.singleton&&typeof options.singleton!=="boolean"){options.singleton=isOldIE()}list=list||[];var lastIdentifiers=modulesToDom(list,options);return function update(newList){newList=newList||[];if(Object.prototype.toString.call(newList)!=="[object Array]"){return}for(var i=0;i<lastIdentifiers.length;i++){var identifier=lastIdentifiers[i];var index=getIndexByIdentifier(identifier);stylesInDom[index].references--}var newLastIdentifiers=modulesToDom(newList,options);for(var _i=0;_i<lastIdentifiers.length;_i++){var _identifier=lastIdentifiers[_i];var _index=getIndexByIdentifier(_identifier);if(stylesInDom[_index].references===0){stylesInDom[_index].updater();stylesInDom.splice(_index,1)}}lastIdentifiers=newLastIdentifiers}}},function(module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);var ns=__osdBundles__.get("plugin/embeddable/public");Object.defineProperties(__webpack_exports__,Object.getOwnPropertyDescriptors(ns))},function(module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);var ns=__osdBundles__.get("plugin/savedObjects/public");Object.defineProperties(__webpack_exports__,Object.getOwnPropertyDescriptors(ns))},function(module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);var ns=__osdBundles__.get("plugin/expressions/public");Object.defineProperties(__webpack_exports__,Object.getOwnPropertyDescriptors(ns))},function(module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);var ns=__osdBundles__.get("plugin/opensearchDashboardsReact/public");Object.defineProperties(__webpack_exports__,Object.getOwnPropertyDescriptors(ns))},function(module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);var ns=__osdBundles__.get("plugin/savedObjectsManagement/public");Object.defineProperties(__webpack_exports__,Object.getOwnPropertyDescriptors(ns))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_val_loader_dist_cjs_js_key_visAugmenter_osd_ui_shared_deps_public_path_module_creator_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(16);var _node_modules_val_loader_dist_cjs_js_key_visAugmenter_osd_ui_shared_deps_public_path_module_creator_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_val_loader_dist_cjs_js_key_visAugmenter_osd_ui_shared_deps_public_path_module_creator_js__WEBPACK_IMPORTED_MODULE_0__);__osdBundles__.define("plugin/visAugmenter/public",__webpack_require__,29)},function(module,exports,__webpack_require__){__webpack_require__.p=window.__osdPublicPath__["visAugmenter"]},function(module,exports,__webpack_require__){var api=__webpack_require__(9);var content=__webpack_require__(18);
1content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.view-events-flyout__baseVis{min-height:25vh}.view-events-flyout__eventVis{height:55px}.view-events-flyout__timelinePanel{height:90px}
1.view-events-flyout__visDescription{min-width:200px;max-width:200px;word-break:break-word}.view-events-flyout__content{position:absolute;top:110px;right:12px;bottom:12px;left:12px}.view-events-flyout__contentPanel{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;overflow:auto;overflow-x:hidden;overflow-y:hidden;scrollbar-gutter:stable both-edges}.view-events-flyout__contentPanel::-webkit-scrollbar{width:16px;height:16px}.view-events-flyout__contentPanel::-webkit-scrollbar-thumb{background-color:rgba(152,162,179,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.view-events-flyout__contentPanel::-webkit-scrollbar-corner,.view-events-flyout__contentPanel::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.view-events-flyout__contentPanel:focus{outline:none}.view-events-flyout__contentPanel[tabindex="0"]:focus:focus-visible{outline-style:auto}.show-y-scroll{overflow-y:scroll}.date-range-panel-height{height:45px}.timeline-panel-height{height:90px}.error-icon-padding{margin-right:-8px}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(9);var content=__webpack_require__(20);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.view-events-flyout__baseVis{min-height:25vh}.view-events-flyout__eventVis{height:55px}.view-events-flyout__timelinePanel{height:90px}
1.view-events-flyout__visDescription{min-width:200px;max-width:200px;word-break:break-word}.view-events-flyout__content{position:absolute;top:110px;right:12px;bottom:12px;left:12px}.view-events-flyout__contentPanel{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;overflow:auto;overflow-x:hidden;overflow-y:hidden;scrollbar-gutter:stable both-edges}.view-events-flyout__contentPanel::-webkit-scrollbar{width:16px;height:16px}.view-events-flyout__contentPanel::-webkit-scrollbar-thumb{background-color:rgba(105,112,125,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.view-events-flyout__contentPanel::-webkit-scrollbar-corner,.view-events-flyout__contentPanel::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.view-events-flyout__contentPanel:focus{outline:none}.view-events-flyout__contentPanel[tabindex="0"]:focus:focus-visible{outline-style:auto}.show-y-scroll{overflow-y:scroll}.date-range-panel-height{height:45px}.timeline-panel-height{height:90px}.error-icon-padding{margin-right:-8px}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(9);var content=__webpack_require__(22);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.view-events-flyout__baseVis{min-height:25vh}.view-events-flyout__eventVis{height:55px}.view-events-flyout__timelinePanel{height:90px}
1.view-events-flyout__visDescription{min-width:200px;max-width:200px;word-break:break-word}.view-events-flyout__content{position:absolute;top:110px;right:12px;bottom:12px;left:12px}.view-events-flyout__contentPanel{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;overflow:auto;overflow-x:hidden;overflow-y:hidden;scrollbar-gutter:stable both-edges}.view-events-flyout__contentPanel::-webkit-scrollbar{width:16px;height:16px}.view-events-flyout__contentPanel::-webkit-scrollbar-thumb{background-color:rgba(141,152,163,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.view-events-flyout__contentPanel::-webkit-scrollbar-corner,.view-events-flyout__contentPanel::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.view-events-flyout__contentPanel:focus{outline:none}.view-events-flyout__contentPanel[tabindex="0"]:focus:focus-visible{outline-style:auto}.show-y-scroll{overflow-y:scroll}.date-range-panel-height{height:45px}.timeline-panel-height{height:90px}.error-icon-padding{margin-right:-8px}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(9);var content=__webpack_require__(24);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.view-events-flyout__baseVis{min-height:25vh}.view-events-flyout__eventVis{height:55px}.view-events-flyout__timelinePanel{height:90px}
1.view-events-flyout__visDescription{min-width:200px;max-width:200px;word-break:break-word}.view-events-flyout__content{position:absolute;top:110px;right:12px;bottom:12px;left:12px}.view-events-flyout__contentPanel{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;overflow:auto;overflow-x:hidden;overflow-y:hidden;scrollbar-gutter:stable both-edges}.view-events-flyout__contentPanel::-webkit-scrollbar{width:16px;height:16px}.view-events-flyout__contentPanel::-webkit-scrollbar-thumb{background-color:rgba(90,104,117,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.view-events-flyout__contentPanel::-webkit-scrollbar-corner,.view-events-flyout__contentPanel::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.view-events-flyout__contentPanel:focus{outline:none}.view-events-flyout__contentPanel[tabindex="0"]:focus:focus-visible{outline-style:auto}.show-y-scroll{overflow-y:scroll}.date-range-panel-height{height:45px}.timeline-panel-height{height:90px}.error-icon-padding{margin-right:-8px}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(9);var content=__webpack_require__(26);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.view-events-flyout__baseVis{min-height:25vh}.view-events-flyout__eventVis{height:55px}.view-events-flyout__timelinePanel{height:90px}
1.view-events-flyout__visDescription{min-width:200px;max-width:200px;word-break:break-word}.view-events-flyout__content{position:absolute;top:110px;right:12px;bottom:12px;left:12px}.view-events-flyout__contentPanel{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;overflow:auto;overflow-x:hidden;overflow-y:hidden;scrollbar-gutter:stable both-edges}.view-events-flyout__contentPanel::-webkit-scrollbar{width:16px;height:16px}.view-events-flyout__contentPanel::-webkit-scrollbar-thumb{background-color:rgba(149,155,162,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.view-events-flyout__contentPanel::-webkit-scrollbar-corner,.view-events-flyout__contentPanel::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.view-events-flyout__contentPanel:focus{outline:none}.view-events-flyout__contentPanel[tabindex="0"]:focus:focus-visible{outline-style:auto}.show-y-scroll{overflow-y:scroll}.date-range-panel-height{height:45px}.timeline-panel-height{height:90px}.error-icon-padding{margin-right:-8px}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(9);var content=__webpack_require__(28);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.view-events-flyout__baseVis{min-height:25vh}.view-events-flyout__eventVis{height:55px}.view-events-flyout__timelinePanel{height:90px}
1.view-events-flyout__visDescription{min-width:200px;max-width:200px;word-break:break-word}.view-events-flyout__content{position:absolute;top:110px;right:12px;bottom:12px;left:12px}.view-events-flyout__contentPanel{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;overflow:auto;overflow-x:hidden;overflow-y:hidden;scrollbar-gutter:stable both-edges}.view-events-flyout__contentPanel::-webkit-scrollbar{width:16px;height:16px}.view-events-flyout__contentPanel::-webkit-scrollbar-thumb{background-color:rgba(90,104,117,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.view-events-flyout__contentPanel::-webkit-scrollbar-corner,.view-events-flyout__contentPanel::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.view-events-flyout__contentPanel:focus{outline:none}.view-events-flyout__contentPanel[tabindex="0"]:focus:focus-visible{outline-style:auto}.show-y-scroll{overflow-y:scroll}.date-range-panel-height{height:45px}.timeline-panel-height{height:90px}.error-icon-padding{margin-right:-8px}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,"plugin",(function(){return public_plugin}));__webpack_require__.d(__webpack_exports__,"VisAugmenterSetup",(function(){return undefined}));__webpack_require__.d(__webpack_exports__,"VisAugmenterStart",(function(){return undefined}));__webpack_require__.d(__webpack_exports__,"VisLayer",(function(){return undefined}));__webpack_require__.d(__webpack_exports__,"VisLayers",(function(){return undefined}));__webpack_require__.d(__webpack_exports__,"VisLayerTypes",(function(){return VisLayerTypes}));__webpack_require__.d(__webpack_exports__,"VisLayerErrorTypes",(function(){return VisLayerErrorTypes}));__webpack_require__.d(__webpack_exports__,"VisLayerError",(function(){return undefined}));__webpack_require__.d(__webpack_exports__,"PluginResource",(function(){return undefined}));__webpack_require__.d(__webpack_exports__,"PointInTimeEvent",(function(){return undefined}));__webpack_require__.d(__webpack_exports__,"PointInTimeEventsVisLayer",(function(){return undefined}));__webpack_require__.d(__webpack_exports__,"isPointInTimeEventsVisLayer",(function(){return isPointInTimeEventsVisLayer}));__webpack_require__.d(__webpack_exports__,"isVisLayerWithError",(function(){return isVisLayerWithError}));__webpack_require__.d(__webpack_exports__,"VisAugmenterEmbeddableConfig",(function(){return undefined}));__webpack_require__.d(__webpack_exports__,"VisFlyoutContext",(function(){return VisFlyoutContext}));__webpack_require__.d(__webpack_exports__,"AugmentVisContext",(function(){return undefined}));__webpack_require__.d(__webpack_exports__,"visLayers",(function(){return types_visLayers}));__webpack_require__.d(__webpack_exports__,"isEligibleForVisLayers",(function(){return isEligibleForVisLayers}));__webpack_require__.d(__webpack_exports__,"getAugmentVisSavedObjs",(function(){return getAugmentVisSavedObjs}));__webpack_require__.d(__webpack_exports__,"buildPipelineFromAugmentVisSavedObjs",(function(){return buildPipelineFromAugmentVisSavedObjs}));__webpack_require__.d(__webpack_exports__,"getAnyErrors",(function(){return getAnyErrors}));__webpack_require__.d(__webpack_exports__,"cleanupStaleObjects",(function(){return cleanupStaleObjects}));__webpack_require__.d(__webpack_exports__,"VIS_LAYER_COLUMN_TYPE",(function(){return VIS_LAYER_COLUMN_TYPE}));__webpack_require__.d(__webpack_exports__,"EVENT_COLOR",(function(){return EVENT_COLOR}));__webpack_require__.d(__webpack_exports__,"HOVER_PARAM",(function(){return HOVER_PARAM}));__webpack_require__.d(__webpack_exports__,"EVENT_MARK_SIZE",(function(){return EVENT_MARK_SIZE}));__webpack_require__.d(__webpack_exports__,"EVENT_MARK_SIZE_ENLARGED",(function(){return EVENT_MARK_SIZE_ENLARGED}));__webpack_require__.d(__webpack_exports__,"EVENT_MARK_SHAPE",(function(){return EVENT_MARK_SHAPE}));__webpack_require__.d(__webpack_exports__,"EVENT_TIMELINE_HEIGHT",(function(){return EVENT_TIMELINE_HEIGHT}));__webpack_require__.d(__webpack_exports__,"EVENT_TOOLTIP_CENTER_ON_MARK",(function(){return EVENT_TOOLTIP_CENTER_ON_MARK}));__webpack_require__.d(__webpack_exports__,"enableVisLayersInSpecConfig",(function(){return enableVisLayersInSpecConfig}));__webpack_require__.d(__webpack_exports__,"addVisEventSignalsToSpecConfig",(function(){return addVisEventSignalsToSpecConfig}));__webpack_require__.d(__webpack_exports__,"getXAxisId",(function(){return getXAxisId}));__webpack_require__.d(__webpack_exports__,"isVisLayerColumn",(function(){return isVisLayerColumn}));__webpack_require__.d(__webpack_exports__,"generateVisLayerFilterString",(function(){return generateVisLayerFilterString}));__webpack_require__.d(__webpack_exports__,"generateVisLayerTooltipFields",(function(){return generateVisLayerTooltipFields}));__webpack_require__.d(__webpack_exports__,"addMissingRowsToTableBounds",(function(){return addMissingRowsToTableBounds}));__webpack_require__.d(__webpack_exports__,"addPointInTimeEventsLayersToTable",(function(){return addPointInTimeEventsLayersToTable}));__webpack_require__.d(__webpack_exports__,"addPointInTimeEventsLayersToSpec",(function(){return addPointInTimeEventsLayersToSpec}));__webpack_require__.d(__webpack_exports__,"calculateYAxisPadding",(function(){return calculateYAxisPadding}));__webpack_require__.d(__webpack_exports__,"augmentEventChartSpec",(function(){return augmentEventChartSpec}));__webpack_require__.d(__webpack_exports__,"SavedObjectLoaderAugmentVis",(function(){return saved_augment_vis_SavedObjectLoaderAugmentVis}));
1__webpack_require__.d(__webpack_exports__,"createSavedAugmentVisLoader",(function(){return createSavedAugmentVisLoader}));__webpack_require__.d(__webpack_exports__,"createAugmentVisSavedObject",(function(){return createAugmentVisSavedObject}));__webpack_require__.d(__webpack_exports__,"generateAugmentVisSavedObject",(function(){return generateAugmentVisSavedObject}));__webpack_require__.d(__webpack_exports__,"getMockAugmentVisSavedObjectClient",(function(){return getMockAugmentVisSavedObjectClient}));__webpack_require__.d(__webpack_exports__,"TEST_COLUMNS_NO_VIS_LAYERS",(function(){return TEST_COLUMNS_NO_VIS_LAYERS}));__webpack_require__.d(__webpack_exports__,"TEST_COLUMNS_NO_VIS_LAYERS_DIRTY",(function(){return TEST_COLUMNS_NO_VIS_LAYERS_DIRTY}));__webpack_require__.d(__webpack_exports__,"TEST_COLUMNS_SINGLE_VIS_LAYER",(function(){return TEST_COLUMNS_SINGLE_VIS_LAYER}));__webpack_require__.d(__webpack_exports__,"TEST_COLUMNS_MULTIPLE_VIS_LAYERS",(function(){return TEST_COLUMNS_MULTIPLE_VIS_LAYERS}));__webpack_require__.d(__webpack_exports__,"TEST_DATATABLE_SINGLE_ROW_NO_VIS_LAYERS",(function(){return TEST_DATATABLE_SINGLE_ROW_NO_VIS_LAYERS}));__webpack_require__.d(__webpack_exports__,"TEST_DATATABLE_SINGLE_ROW_SINGLE_VIS_LAYER",(function(){return TEST_DATATABLE_SINGLE_ROW_SINGLE_VIS_LAYER}));__webpack_require__.d(__webpack_exports__,"TEST_DATATABLE_ONLY_VIS_LAYERS",(function(){return TEST_DATATABLE_ONLY_VIS_LAYERS}));__webpack_require__.d(__webpack_exports__,"TEST_DATATABLE_NO_VIS_LAYERS",(function(){return TEST_DATATABLE_NO_VIS_LAYERS}));__webpack_require__.d(__webpack_exports__,"TEST_DATATABLE_NO_VIS_LAYERS_DIRTY",(function(){return TEST_DATATABLE_NO_VIS_LAYERS_DIRTY}));__webpack_require__.d(__webpack_exports__,"TEST_DATATABLE_SINGLE_VIS_LAYER_EMPTY",(function(){return TEST_DATATABLE_SINGLE_VIS_LAYER_EMPTY}));__webpack_require__.d(__webpack_exports__,"TEST_DATATABLE_SINGLE_VIS_LAYER",(function(){return TEST_DATATABLE_SINGLE_VIS_LAYER}));__webpack_require__.d(__webpack_exports__,"TEST_DATATABLE_SINGLE_VIS_LAYER_ON_BOUNDS",(function(){return TEST_DATATABLE_SINGLE_VIS_LAYER_ON_BOUNDS}));__webpack_require__.d(__webpack_exports__,"TEST_DATATABLE_MULTIPLE_VIS_LAYERS",(function(){return TEST_DATATABLE_MULTIPLE_VIS_LAYERS}));__webpack_require__.d(__webpack_exports__,"TEST_DATATABLE_MULTIPLE_VIS_LAYERS_ONE_EMPTY",(function(){return TEST_DATATABLE_MULTIPLE_VIS_LAYERS_ONE_EMPTY}));__webpack_require__.d(__webpack_exports__,"TEST_SPEC_NO_VIS_LAYERS",(function(){return TEST_SPEC_NO_VIS_LAYERS}));__webpack_require__.d(__webpack_exports__,"TEST_SPEC_SINGLE_VIS_LAYER",(function(){return TEST_SPEC_SINGLE_VIS_LAYER}));__webpack_require__.d(__webpack_exports__,"TEST_SPEC_MULTIPLE_VIS_LAYERS",(function(){return TEST_SPEC_MULTIPLE_VIS_LAYERS}));__webpack_require__.d(__webpack_exports__,"TEST_DIMENSIONS",(function(){return TEST_DIMENSIONS}));__webpack_require__.d(__webpack_exports__,"TEST_DIMENSIONS_SINGLE_ROW",(function(){return TEST_DIMENSIONS_SINGLE_ROW}));__webpack_require__.d(__webpack_exports__,"TEST_DIMENSIONS_INVALID_BOUNDS",(function(){return TEST_DIMENSIONS_INVALID_BOUNDS}));__webpack_require__.d(__webpack_exports__,"TEST_VIS_LAYERS_SINGLE",(function(){return TEST_VIS_LAYERS_SINGLE}));__webpack_require__.d(__webpack_exports__,"TEST_VIS_LAYERS_SINGLE_INVALID_BOUNDS",(function(){return TEST_VIS_LAYERS_SINGLE_INVALID_BOUNDS}));__webpack_require__.d(__webpack_exports__,"TEST_VIS_LAYERS_SINGLE_ON_BOUNDS",(function(){return TEST_VIS_LAYERS_SINGLE_ON_BOUNDS}));__webpack_require__.d(__webpack_exports__,"TEST_VIS_LAYERS_MULTIPLE",(function(){return TEST_VIS_LAYERS_MULTIPLE}));__webpack_require__.d(__webpack_exports__,"TEST_VIS_LAYERS_MULTIPLE_ONE_EMPTY",(function(){return TEST_VIS_LAYERS_MULTIPLE_ONE_EMPTY}));__webpack_require__.d(__webpack_exports__,"TEST_RESULT_SPEC_SINGLE_VIS_LAYER",(function(){return TEST_RESULT_SPEC_SINGLE_VIS_LAYER}));__webpack_require__.d(__webpack_exports__,"TEST_RESULT_SPEC_SINGLE_VIS_LAYER_EMPTY",(function(){return TEST_RESULT_SPEC_SINGLE_VIS_LAYER_EMPTY}));__webpack_require__.d(__webpack_exports__,"TEST_RESULT_SPEC_MULTIPLE_VIS_LAYERS",(function(){return TEST_RESULT_SPEC_MULTIPLE_VIS_LAYERS}));__webpack_require__.d(__webpack_exports__,"PLUGIN_RESOURCE_DELETE_TRIGGER",(function(){return PLUGIN_RESOURCE_DELETE_TRIGGER}));__webpack_require__.d(__webpack_exports__,"pluginResourceDeleteTrigger",(function(){return pluginResourceDeleteTrigger}));__webpack_require__.d(__webpack_exports__,"PLUGIN_RESOURCE_DELETE_ACTION",(function(){return PLUGIN_RESOURCE_DELETE_ACTION}));__webpack_require__.d(__webpack_exports__,"PluginResourceDeleteAction",(function(){return plugin_resource_delete_action_PluginResourceDeleteAction}));__webpack_require__.d(__webpack_exports__,"SAVED_OBJECT_DELETE_ACTION",(function(){return SAVED_OBJECT_DELETE_ACTION}));__webpack_require__.d(__webpack_exports__,"SavedObjectDeleteAction",(function(){return saved_object_delete_action_SavedObjectDeleteAction}));__webpack_require__.d(__webpack_exports__,"fetchVisEmbeddable",(function(){return fetchVisEmbeddable}));__webpack_require__.d(__webpack_exports__,"setUISettings",(function(){return setUISettings}));
1const types_name="vis_layers";const types_visLayers={name:types_name,from:{null:()=>({type:types_name,layers:[]}),undefined:()=>({type:types_name,layers:[]})}};var public_=__webpack_require__(6);const[getSavedAugmentVisLoader,setSavedAugmentVisLoader]=Object(public_["createGetterSetter"])("savedAugmentVisLoader");const[getUISettings,setUISettings]=Object(public_["createGetterSetter"])("UISettings");const[getUiActions,setUiActions]=Object(public_["createGetterSetter"])("UIActions");const[getEmbeddable,setEmbeddable]=Object(public_["createGetterSetter"])("embeddable");const[getQueryService,setQueryService]=Object(public_["createGetterSetter"])("Query");const[getVisualizations,setVisualizations]=Object(public_["createGetterSetter"])("visualizations");const[getCore,setCore]=Object(public_["createGetterSetter"])("Core");var public_services={getSavedAugmentVisLoader:getSavedAugmentVisLoader,getUISettings:getUISettings,getUiActions:getUiActions,getEmbeddable:getEmbeddable,getQueryService:getQueryService,getVisualizations:getVisualizations,getCore:getCore};var external_osdSharedDeps_Lodash_=__webpack_require__(1);var savedObjects_public_=__webpack_require__(11);const VIS_REFERENCE_NAME="visualization_0";function extractReferences(_ref){let{attributes:attributes,references:references=[]}=_ref;const updatedAttributes={...attributes};const updatedReferences=[...references];if(updatedAttributes.visId){updatedReferences.push({name:VIS_REFERENCE_NAME,type:"visualization",id:String(updatedAttributes.visId)});delete updatedAttributes.visId;updatedAttributes.visName=VIS_REFERENCE_NAME}return{references:updatedReferences,attributes:updatedAttributes}}function injectReferences(savedObject,references){if(savedObject.visName){const visReference=references.find(reference=>reference.name===savedObject.visName);if(!visReference){throw new Error(`Could not find visualization reference "${savedObject.visName}"`)}savedObject.visId=visReference.id;delete savedObject.visName}}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const _saved_augment_vis_name="augment-vis";function createSavedAugmentVisClass(services){const SavedObjectClass=Object(savedObjects_public_["createSavedObjectClass"])(services);class SavedAugmentVis extends SavedObjectClass{constructor(){let opts=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(typeof opts!=="object"){opts={id:opts}}super({type:SavedAugmentVis.type,mapping:SavedAugmentVis.mapping,extractReferences:extractReferences,injectReferences:injectReferences,id:opts.id||"",defaults:{description:Object(external_osdSharedDeps_Lodash_["get"])(opts,"description",""),originPlugin:Object(external_osdSharedDeps_Lodash_["get"])(opts,"originPlugin",""),pluginResource:Object(external_osdSharedDeps_Lodash_["get"])(opts,"pluginResource",{}),visId:Object(external_osdSharedDeps_Lodash_["get"])(opts,"visId",""),visLayerExpressionFn:Object(external_osdSharedDeps_Lodash_["get"])(opts,"visLayerExpressionFn",{}),version:1}});this.showInRecentlyAccessed=false}}_defineProperty(SavedAugmentVis,"type",_saved_augment_vis_name);_defineProperty(SavedAugmentVis,"mapping",{title:"text",description:"text",originPlugin:"text",pluginResource:"object",visLayerExpressionFn:"object",visId:"keyword,",version:"integer"});return SavedAugmentVis}let VisLayerTypes=function(VisLayerTypes){VisLayerTypes["PointInTimeEvents"]="PointInTimeEvents";return VisLayerTypes}({});let VisLayerErrorTypes=function(VisLayerErrorTypes){VisLayerErrorTypes["PERMISSIONS_FAILURE"]="PERMISSIONS_FAILURE";VisLayerErrorTypes["FETCH_FAILURE"]="FETCH_FAILURE";VisLayerErrorTypes["RESOURCE_DELETED"]="RESOURCE_DELETED";return VisLayerErrorTypes}({});let VisFlyoutContext=function(VisFlyoutContext){VisFlyoutContext["BASE_VIS"]="BASE_VIS";VisFlyoutContext["EVENT_VIS"]="EVENT_VIS";VisFlyoutContext["TIMELINE_VIS"]="TIMELINE_VIS";return VisFlyoutContext}({});const isPointInTimeEventsVisLayer=obj=>(obj===null||obj===void 0?void 0:obj.type)===VisLayerTypes.PointInTimeEvents;const isValidVisLayer=obj=>(obj===null||obj===void 0?void 0:obj.type)in VisLayerTypes;const isVisLayerWithError=visLayer=>visLayer.error!==undefined;const APP_PATH={STATS:"/stats"};const APP_API="/api/vis_augmenter";const PLUGIN_AUGMENTATION_ENABLE_SETTING="visualization:enablePluginAugmentation";const PLUGIN_AUGMENTATION_MAX_OBJECTS_SETTING="visualization:enablePluginAugmentation.maxPluginObjects";function saved_augment_vis_defineProperty(e,r,t){return(r=saved_augment_vis_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function saved_augment_vis_toPropertyKey(t){var i=saved_augment_vis_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function saved_augment_vis_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class saved_augment_vis_SavedObjectLoaderAugmentVis extends savedObjects_public_["SavedObjectLoader"]{constructor(){super(...arguments);saved_augment_vis_defineProperty(this,"config",getUISettings());saved_augment_vis_defineProperty(this,"mapHitSource",(source,id)=>{source.id=id;source.visId=Object(external_osdSharedDeps_Lodash_["get"])(source,"visReference.id","");if(Object(external_osdSharedDeps_Lodash_["isEmpty"])(source.visReference)){source.error="visReference is missing in augment-vis saved object";return source}if(Object(external_osdSharedDeps_Lodash_["isEmpty"])(source.visLayerExpressionFn)){source.error="visLayerExpressionFn is missing in augment-vis saved object";return source}if(!(Object(external_osdSharedDeps_Lodash_["get"])(source,"visLayerExpressionFn.type","")in VisLayerTypes)){source.error="Unknown VisLayer expression function type";return source}if(Object(external_osdSharedDeps_Lodash_["get"])(source,"originPlugin",undefined)===undefined){source.error="originPlugin is missing in augment-vis saved object";return source}if(Object(external_osdSharedDeps_Lodash_["get"])(source,"pluginResource.type",undefined)===undefined){source.error="pluginResource.type is missing in augment-vis saved object";return source}if(Object(external_osdSharedDeps_Lodash_["get"])(source,"pluginResource.id",undefined)===undefined){source.error="pluginResource.id is missing in augment-vis saved object";return source}return source})}mapSavedObjectApiHits(hit){const visReference=hit.references[0];return this.mapHitSource({...hit.attributes,visReference:visReference},hit.id)}get(opts){this.isAugmentationEnabled();return super.get(opts)}findAll(){let search=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";let size=arguments.length>1&&arguments[1]!==undefined?arguments[1]:100;let fields=arguments.length>2?arguments[2]:undefined;let hasReference=arguments.length>3?arguments[3]:undefined;let searchFields=arguments.length>4?arguments[4]:undefined;this.isAugmentationEnabled();return super.findAll(search,size,fields,hasReference,searchFields)}find(){let search=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";let size=arguments.length>1&&arguments[1]!==undefined?arguments[1]:100;this.isAugmentationEnabled();return super.find(search,size)}isAugmentationEnabled(){const isAugmentationEnabled=this.config.get(PLUGIN_AUGMENTATION_ENABLE_SETTING,true);if(!isAugmentationEnabled){throw new Error("Visualization augmentation is disabled, please enable visualization:enablePluginAugmentation.")}}}
1function createSavedAugmentVisLoader(services){const{savedObjectsClient:savedObjectsClient}=services;const SavedAugmentVis=createSavedAugmentVisClass(services);return new saved_augment_vis_SavedObjectLoaderAugmentVis(SavedAugmentVis,savedObjectsClient)}const createAugmentVisSavedObject=async(AugmentVis,savedObjLoader,uiSettings)=>{const loader=savedObjLoader!==undefined?savedObjLoader:getSavedAugmentVisLoader();const config=uiSettings!==undefined?uiSettings:getUISettings();const isAugmentationEnabled=config.get(PLUGIN_AUGMENTATION_ENABLE_SETTING);if(!isAugmentationEnabled){throw new Error("Visualization augmentation is disabled, please enable visualization:enablePluginAugmentation.")}const maxAssociatedCount=config.get(PLUGIN_AUGMENTATION_MAX_OBJECTS_SETTING);await loader.findAll("",100,[],{type:"visualization",id:AugmentVis.visId}).then(async resp=>{if(resp!==undefined){const savedObjectsForThisVisualization=Object(external_osdSharedDeps_Lodash_["get"])(resp,"hits",[]);if(maxAssociatedCount<=savedObjectsForThisVisualization.length){throw new Error(`Cannot associate the plugin resource to the visualization due to the limit of the max\n amount of associated plugin resources (${maxAssociatedCount}) with\n ${savedObjectsForThisVisualization.length} associated to the visualization`)}}});return await loader.get(AugmentVis)};const title="test-title";const version=1;const generateAugmentVisSavedObject=(idArg,exprFnArg,visIdArg,originPluginArg,pluginResourceArg)=>({id:idArg,title:title,originPlugin:originPluginArg,pluginResource:pluginResourceArg,visLayerExpressionFn:exprFnArg,VIS_REFERENCE_NAME:VIS_REFERENCE_NAME,visId:visIdArg,version:version});const getMockAugmentVisSavedObjectClient=function(augmentVisSavedObjs){let keepReferences=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;const savedObjs=augmentVisSavedObjs=Object(external_osdSharedDeps_Lodash_["cloneDeep"])(augmentVisSavedObjs);const client={find:jest.fn(()=>Promise.resolve({total:savedObjs.length,savedObjects:savedObjs.map(savedObj=>{const objVisId=savedObj.visId;const objId=savedObj.id;delete savedObj.visId;delete savedObj.id;return{id:objId,attributes:savedObj,references:keepReferences?[{name:savedObj.visName,type:"visualization",id:objVisId}]:[]}})}))};return client};var external_osdSharedDeps_OsdI18n_=__webpack_require__(4);var uiActions_public_=__webpack_require__(5);var external_osdSharedDeps_React_=__webpack_require__(0);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var opensearchDashboardsReact_public_=__webpack_require__(13);var external_osdSharedDeps_ElasticEui_=__webpack_require__(2);var styles=__webpack_require__(7);function BaseVisItem(props){const PanelComponent=getEmbeddable().getEmbeddablePanel();return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{direction:"row",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{className:"view-events-flyout__visDescription",grow:false}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:true,className:"view-events-flyout__baseVis","data-test-subj":"baseVis"},external_osdSharedDeps_React_default.a.createElement(PanelComponent,{embeddable:props.embeddable,hideHeader:true,hasBorder:false,hasShadow:false})))}var external_osdSharedDeps_Moment_=__webpack_require__(8);var external_osdSharedDeps_Moment_default=__webpack_require__.n(external_osdSharedDeps_Moment_);function DateRangeItem(props){const[lastUpdatedTime,setLastUpdatedTime]=Object(external_osdSharedDeps_React_["useState"])(external_osdSharedDeps_Moment_default()(Date.now()).format(DATE_RANGE_FORMAT));const durationText=Object(external_osdSharedDeps_ElasticEui_["prettyDuration"])(props.timeRange.from,props.timeRange.to,[],DATE_RANGE_FORMAT);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{direction:"row",gutterSize:"m",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"calendar"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{"data-test-subj":"durationText"},durationText)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"refresh",isDisabled:false,onClick:()=>{props.reload();setLastUpdatedTime(external_osdSharedDeps_Moment_default()(Date.now()).format(DATE_RANGE_FORMAT))},"data-test-subj":"refreshButton"},"Refresh")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,"data-test-subj":"refreshDescriptionText"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s",color:"subdued",style:{whiteSpace:"pre-line"}},`This view is not updated to load the latest events automatically.\n Last updated: ${lastUpdatedTime}`)))}function LoadingFlyoutBody(){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceAround"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],{size:"xl","data-test-subj":"loadingSpinner"}))))}function ErrorFlyoutBody(props){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"danger",iconType:"alert","data-test-subj":"errorCallOut"},props.errorMessage))))}function EventVisItemIcon(props){const[isErrorPopoverOpen,setIsErrorPopoverOpen]=Object(external_osdSharedDeps_React_["useState"])(false);const onButtonClick=()=>setIsErrorPopoverOpen(isOpen=>!isOpen);const closeErrorPopover=()=>setIsErrorPopoverOpen(false);const errorMsg=Object(external_osdSharedDeps_Lodash_["get"])(props,"visLayer.error.message",undefined);const isError=errorMsg!==undefined;const showEventCount=props.visLayer.type===VisLayerTypes.PointInTimeEvents&&!isError;const dangerButton=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{"data-test-subj":"dangerButton","aria-label":"Open error details",className:"error-icon-padding",iconType:"alert",color:"danger",size:"xs",display:"empty",onClick:onButtonClick});return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,showEventCount?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,"data-test-subj":"eventCount"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiNotificationBadge"],{color:"subdued"},Object(external_osdSharedDeps_Lodash_["get"])(props.visLayer,"events.length",0))):isError?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,"data-test-subj":"errorButton"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{button:dangerButton,isOpen:isErrorPopoverOpen,closePopover:closeErrorPopover,panelPaddingSize:"s"},external_osdSharedDeps_React_default.a.createElement("div",null,errorMsg))):null)}function EventVisItem(props){const PanelComponent=getEmbeddable().getEmbeddablePanel();const baseUrl=getCore().http.basePath;const name=Object(external_osdSharedDeps_Lodash_["get"])(props,"item.visLayer.pluginResource.name","");const urlPath=Object(external_osdSharedDeps_Lodash_["get"])(props,"item.visLayer.pluginResource.urlPath","");return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{direction:"row",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,className:"view-events-flyout__visDescription","data-test-subj":"pluginResourceDescription"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:`${baseUrl.prepend(`${urlPath}`)}`,target:"_blank"},name)),external_osdSharedDeps_React_default.a.createElement(EventVisItemIcon,{visLayer:props.item.visLayer}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:true,className:"view-events-flyout__eventVis","data-test-subj":"eventVis"},external_osdSharedDeps_React_default.a.createElement(PanelComponent,{embeddable:props.item.embeddable,hideHeader:true,hasBorder:false,hasShadow:false}))))}function PluginEventsPanel(props){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{marginBottom:"12px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"m",style:{fontWeight:"bold"}},props.pluginTitle)),props.items.map((item,index)=>external_osdSharedDeps_React_default.a.createElement(EventVisItem,{key:index,item:item})))}function EventsPanel(props){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,Array.from(props.eventVisEmbeddablesMap.keys()).map((key,index)=>external_osdSharedDeps_React_default.a.createElement("div",{key:index},index!==0?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}):null,external_osdSharedDeps_React_default.a.createElement(PluginEventsPanel,{pluginTitle:key,items:props.eventVisEmbeddablesMap.get(key)}))))}function TimelinePanel(props){const PanelComponent=getEmbeddable().getEmbeddablePanel();return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{direction:"row",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,className:"view-events-flyout__visDescription"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:true,className:"view-events-flyout__timelinePanel","data-test-subj":"timelineVis"},external_osdSharedDeps_React_default.a.createElement(PanelComponent,{embeddable:props.embeddable,hideHeader:true,hasBorder:false,hasShadow:false})))}var embeddable_public_=__webpack_require__(10);function getErrorMessage(errorEmbeddable){return errorEmbeddable.error instanceof Error?errorEmbeddable.error.message:errorEmbeddable.error}function getValueAxisPositions(embeddable){let hasLeftValueAxis=false;let hasRightValueAxis=false;if(embeddable!==undefined){const valueAxes=embeddable.vis.params.valueAxes;const positions=valueAxes.map(valueAxis=>valueAxis.position);hasLeftValueAxis=positions.includes("left");hasRightValueAxis=positions.includes("right")}return{left:hasLeftValueAxis,right:hasRightValueAxis}}async function fetchVisEmbeddable(savedObjectId,embeddableStart,queryStart){const embeddableLoader=embeddableStart!==null&&embeddableStart!==void 0?embeddableStart:getEmbeddable();const embeddableVisFactory=embeddableLoader.getEmbeddableFactory("visualization");const queryService=queryStart!==null&&queryStart!==void 0?queryStart:getQueryService();const contextInput={filters:queryService.filterManager.getFilters(),query:queryService.queryString.getQuery(),timeRange:queryService.timefilter.timefilter.getTime()};const embeddable=await(embeddableVisFactory===null||embeddableVisFactory===void 0?void 0:embeddableVisFactory.createFromSavedObject(savedObjectId,{...contextInput,visAugmenterConfig:{inFlyout:true,flyoutContext:VisFlyoutContext.BASE_VIS}}));if(embeddable instanceof embeddable_public_["ErrorEmbeddable"]){throw getErrorMessage(embeddable)}embeddable.updateInput({refreshConfig:{value:0,pause:true}});await embeddable.populateVisLayers();return embeddable}async function fetchVisEmbeddableWithSetters(savedObjectId,setTimeRange,setVisEmbeddable,setErrorMessage){try{const embeddable=await fetchVisEmbeddable(savedObjectId);setTimeRange(getQueryService().timefilter.timefilter.getTime());setVisEmbeddable(embeddable)}catch(err){setErrorMessage(String(err))}}async function createEventEmbeddables(savedObjectId,embeddable,setEventVisEmbeddablesMap,setErrorMessage){const embeddableVisFactory=getEmbeddable().getEmbeddableFactory("visualization");try{const{left:left,right:right}=getValueAxisPositions(embeddable);const map=new Map;const visLayers=Object(external_osdSharedDeps_Lodash_["get"])(embeddable,"visLayers",[]).filter(visLayer=>isPointInTimeEventsVisLayer(visLayer));if(visLayers!==undefined){const contextInput={filters:embeddable.getInput().filters,query:embeddable.getInput().query,timeRange:embeddable.getInput().timeRange};await Promise.all(visLayers.map(async visLayer=>{const pluginResourceType=visLayer.pluginResource.type;const eventEmbeddable=await(embeddableVisFactory===null||embeddableVisFactory===void 0?void 0:embeddableVisFactory.createFromSavedObject(savedObjectId,{...contextInput,visAugmenterConfig:{visLayerResourceIds:[visLayer.pluginResource.id],inFlyout:true,flyoutContext:VisFlyoutContext.EVENT_VIS,leftValueAxisPadding:left,rightValueAxisPadding:right}}));if(eventEmbeddable instanceof embeddable_public_["ErrorEmbeddable"]){throw getErrorMessage(eventEmbeddable)}eventEmbeddable.updateInput({refreshConfig:{value:0,pause:true}});const curList=map.get(pluginResourceType)===undefined?[]:map.get(pluginResourceType);curList.push({visLayer:visLayer,embeddable:eventEmbeddable});map.set(pluginResourceType,curList)}));setEventVisEmbeddablesMap(map)}}catch(err){setErrorMessage(String(err))}}async function createTimelineEmbeddable(savedObjectId,embeddable,setTimelineVisEmbeddable,setErrorMessage){const embeddableVisFactory=getEmbeddable().getEmbeddableFactory("visualization");try{const{left:left,right:right}=getValueAxisPositions(embeddable);const contextInput={filters:embeddable.getInput().filters,query:embeddable.getInput().query,timeRange:embeddable.getInput().timeRange};const timelineEmbeddable=await(embeddableVisFactory===null||embeddableVisFactory===void 0?void 0:embeddableVisFactory.createFromSavedObject(savedObjectId,{...contextInput,visAugmenterConfig:{inFlyout:true,flyoutContext:VisFlyoutContext.TIMELINE_VIS,leftValueAxisPadding:left,rightValueAxisPadding:right}}));if(timelineEmbeddable instanceof embeddable_public_["ErrorEmbeddable"]){throw getErrorMessage(timelineEmbeddable)}timelineEmbeddable.updateInput({refreshConfig:{value:0,pause:true}});setTimelineVisEmbeddable(timelineEmbeddable)}catch(err){setErrorMessage(String(err))}}const DATE_RANGE_FORMAT="MM/DD/YYYY HH:mm";function ViewEventsFlyout(props){const[visEmbeddable,setVisEmbeddable]=Object(external_osdSharedDeps_React_["useState"])(undefined);const[eventVisEmbeddablesMap,setEventVisEmbeddablesMap]=Object(external_osdSharedDeps_React_["useState"])(undefined);const[timelineVisEmbeddable,setTimelineVisEmbeddable]=Objec
1t(external_osdSharedDeps_React_["useState"])(undefined);const[timeRange,setTimeRange]=Object(external_osdSharedDeps_React_["useState"])(undefined);const[isLoading,setIsLoading]=Object(external_osdSharedDeps_React_["useState"])(true);const[errorMessage,setErrorMessage]=Object(external_osdSharedDeps_React_["useState"])(undefined);function reload(){visEmbeddable===null||visEmbeddable===void 0||visEmbeddable.reload();eventVisEmbeddablesMap===null||eventVisEmbeddablesMap===void 0||eventVisEmbeddablesMap.forEach(embeddableItems=>{embeddableItems.forEach(embeddableItem=>{embeddableItem.embeddable.reload()})})}Object(external_osdSharedDeps_React_["useEffect"])(()=>{fetchVisEmbeddableWithSetters(props.savedObjectId,setTimeRange,setVisEmbeddable,setErrorMessage)},[props.savedObjectId]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(visEmbeddable!==null&&visEmbeddable!==void 0&&visEmbeddable.visLayers){createEventEmbeddables(props.savedObjectId,visEmbeddable,setEventVisEmbeddablesMap,setErrorMessage);createTimelineEmbeddable(props.savedObjectId,visEmbeddable,setTimelineVisEmbeddable,setErrorMessage)}},[visEmbeddable===null||visEmbeddable===void 0?void 0:visEmbeddable.visLayers]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(visEmbeddable!==undefined&&eventVisEmbeddablesMap!==undefined&&timeRange!==undefined&&timelineVisEmbeddable!==undefined){setIsLoading(false)}},[visEmbeddable,eventVisEmbeddablesMap,timeRange,timelineVisEmbeddable]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{size:"l",onClose:props.onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],{hasBorder:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h1",null,isLoading?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingContent"],{lines:1}):errorMessage?"Error fetching events":`${visEmbeddable===null||visEmbeddable===void 0?void 0:visEmbeddable.getTitle()}`))),errorMessage?external_osdSharedDeps_React_default.a.createElement(ErrorFlyoutBody,{errorMessage:errorMessage}):isLoading?external_osdSharedDeps_React_default.a.createElement(LoadingFlyoutBody,null):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{className:"view-events-flyout__content",direction:"column"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{className:"view-events-flyout__contentPanel date-range-panel-height",grow:false},external_osdSharedDeps_React_default.a.createElement(DateRangeItem,{timeRange:timeRange,reload:reload})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{className:"view-events-flyout__contentPanel",grow:7,style:{maxHeight:"40vh"}},external_osdSharedDeps_React_default.a.createElement(BaseVisItem,{embeddable:visEmbeddable})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{className:"view-events-flyout__contentPanel show-y-scroll",grow:3},external_osdSharedDeps_React_default.a.createElement(EventsPanel,{eventVisEmbeddablesMap:eventVisEmbeddablesMap})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{className:"view-events-flyout__contentPanel timeline-panel-height",grow:false},external_osdSharedDeps_React_default.a.createElement(TimelinePanel,{embeddable:timelineVisEmbeddable}))))))}let VIEW_EVENTS_FLYOUT_STATE=function(VIEW_EVENTS_FLYOUT_STATE){VIEW_EVENTS_FLYOUT_STATE["OPEN"]="OPEN";VIEW_EVENTS_FLYOUT_STATE["CLOSED"]="CLOSED";return VIEW_EVENTS_FLYOUT_STATE}({});
1const[getFlyoutState,setFlyoutState]=Object(public_["createGetterSetter"])(VIEW_EVENTS_FLYOUT_STATE.CLOSED);var flyout_state={VIEW_EVENTS_FLYOUT_STATE:VIEW_EVENTS_FLYOUT_STATE,getFlyoutState:getFlyoutState,setFlyoutState:setFlyoutState};async function openViewEventsFlyout(props){setFlyoutState(VIEW_EVENTS_FLYOUT_STATE.OPEN);const flyoutSession=getCore().overlays.openFlyout(Object(opensearchDashboardsReact_public_["toMountPoint"])(external_osdSharedDeps_React_default.a.createElement(ViewEventsFlyout,{onClose:()=>{if(flyoutSession){flyoutSession.close();setFlyoutState(VIEW_EVENTS_FLYOUT_STATE.CLOSED)}},savedObjectId:props.savedObjectId})),{"data-test-subj":"viewEventsFlyout",ownFocus:true})}function open_events_flyout_action_defineProperty(e,r,t){return(r=open_events_flyout_action_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function open_events_flyout_action_toPropertyKey(t){var i=open_events_flyout_action_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function open_events_flyout_action_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const OPEN_EVENTS_FLYOUT_ACTION="OPEN_EVENTS_FLYOUT_ACTION";class open_events_flyout_action_OpenEventsFlyoutAction{constructor(){open_events_flyout_action_defineProperty(this,"type",OPEN_EVENTS_FLYOUT_ACTION);open_events_flyout_action_defineProperty(this,"id",OPEN_EVENTS_FLYOUT_ACTION);open_events_flyout_action_defineProperty(this,"order",1)}getIconType(){return undefined}getDisplayName(){return external_osdSharedDeps_OsdI18n_["i18n"].translate("visAugmenter.actions.viewEvents.displayName",{defaultMessage:"View Events"})}async isCompatible(_ref){let{savedObjectId:savedObjectId}=_ref;return savedObjectId?true:false}async execute(_ref2){let{savedObjectId:savedObjectId}=_ref2;if(!await this.isCompatible({savedObjectId:savedObjectId})){throw new uiActions_public_["IncompatibleActionError"]}if(getFlyoutState()===VIEW_EVENTS_FLYOUT_STATE.CLOSED){openViewEventsFlyout({savedObjectId:savedObjectId})}}}var expressions_public_=__webpack_require__(12);const isEligibleForVisLayers=(vis,uiSettingsClient)=>{var _vis$data,_vis$data$byTypeName,_vis$params,_xAxis$,_aggs;const dateHistograms=(_vis$data=vis.data)===null||_vis$data===void 0||(_vis$data=_vis$data.aggs)===null||_vis$data===void 0||(_vis$data$byTypeName=_vis$data.byTypeName)===null||_vis$data$byTypeName===void 0?void 0:_vis$data$byTypeName.call(_vis$data,"date_histogram");if(!Array.isArray(dateHistograms)||dateHistograms.length!==1)return false;const xAxis=(_vis$params=vis.params)===null||_vis$params===void 0?void 0:_vis$params.categoryAxes;if(!Array.isArray(xAxis)||xAxis.length!==1||((_xAxis$=xAxis[0])===null||_xAxis$===void 0?void 0:_xAxis$.position)!=="bottom")return false;const segmentAggs=vis.data.aggs.bySchemaName("segment");if(!Array.isArray(segmentAggs)||segmentAggs.length===0)return false;const metricAggs=vis.data.aggs.bySchemaName("metric");if(!Array.isArray(metricAggs)||metricAggs.length===0||metricAggs.length!==((_aggs=vis.data.aggs.aggs)===null||_aggs===void 0?void 0:_aggs.length)-1)return false;if(!Array.isArray(vis.params.seriesParams)||vis.params.type!=="line"||vis.params.seriesParams.some(seriesParam=>seriesParam.type!=="line"))return false;const config=uiSettingsClient!==null&&uiSettingsClient!==void 0?uiSettingsClient:getUISettings();return config.get(PLUGIN_AUGMENTATION_ENABLE_SETTING)};const getAugmentVisSavedObjs=async(visId,loader,uiSettings,pluginResourceIds)=>{const config=uiSettings!==undefined?uiSettings:getUISettings();const isAugmentationEnabled=config.get(PLUGIN_AUGMENTATION_ENABLE_SETTING);if(!isAugmentationEnabled){throw new Error("Visualization augmentation is disabled, please enable visualization:enablePluginAugmentation.")}try{const pluginResourceIdsSpecified=Array.isArray(pluginResourceIds)&&pluginResourceIds.length>0;const resp=await(loader===null||loader===void 0?void 0:loader.findAll(pluginResourceIdsSpecified?pluginResourceIds.join("|"):"",100,undefined,{type:"visualization",id:visId},pluginResourceIdsSpecified?["pluginResource.id"]:undefined));return Object(external_osdSharedDeps_Lodash_["get"])(resp,"hits",[])}catch(e){return[]}};const buildPipelineFromAugmentVisSavedObjs=objs=>{try{const visLayerExpressionFns=objs.map(obj=>Object(expressions_public_["buildExpressionFunction"])(obj.visLayerExpressionFn.name,obj.visLayerExpressionFn.args
1));const ast=Object(expressions_public_["buildExpression"])(visLayerExpressionFns).toAst();return Object(expressions_public_["formatExpression"])(ast)}catch(e){throw new Error("Expression function from augment-vis saved objects could not be generated")}};const getAnyErrors=(visLayers,visTitle)=>{const visLayersWithErrors=visLayers.filter(visLayer=>isVisLayerWithError(visLayer));if(!Object(external_osdSharedDeps_Lodash_["isEmpty"])(visLayersWithErrors)){const resourceTypes=[...new Set(visLayersWithErrors.map(visLayer=>visLayer.pluginResource.type))];let msgDetails="";resourceTypes.forEach((type,index)=>{const matchingVisLayers=visLayersWithErrors.filter(visLayer=>visLayer.pluginResource.type===type);if(index!==0)msgDetails+="\n\n\n";msgDetails+=`-----${type}-----`;matchingVisLayers.forEach((visLayer,idx)=>{var _visLayer$error;if(idx!==0)msgDetails+="\n";msgDetails+=`\nID: ${visLayer.pluginResource.id}`;msgDetails+=`\nMessage: "${(_visLayer$error=visLayer.error)===null||_visLayer$error===void 0?void 0:_visLayer$error.message}"`})});const err=new Error(`Certain plugin resources failed to load on the ${visTitle} chart`);err.stack=msgDetails;return err}else{return undefined}};const cleanupStaleObjects=(augmentVisSavedObjs,visLayers,loader)=>{const staleVisLayers=visLayers.filter(visLayer=>isVisLayerWithError(visLayer)).filter(visLayerWithError=>{var _visLayerWithError$er;return((_visLayerWithError$er=visLayerWithError.error)===null||_visLayerWithError$er===void 0?void 0:_visLayerWithError$er.type)===VisLayerErrorTypes.RESOURCE_DELETED});if(!Object(external_osdSharedDeps_Lodash_["isEmpty"])(staleVisLayers)){const objIdsToDelete=[];staleVisLayers.forEach(staleVisLayer=>{var _augmentVisSavedObjs$;const deletedPluginResourceId=staleVisLayer.pluginResource.id;const savedObjId=(_augmentVisSavedObjs$=augmentVisSavedObjs.find(savedObj=>savedObj.pluginResource.id===deletedPluginResourceId))===null||_augmentVisSavedObjs$===void 0?void 0:_augmentVisSavedObjs$.id;if(savedObjId!==undefined)objIdsToDelete.push(savedObjId)});loader===null||loader===void 0||loader.delete(objIdsToDelete)}};function view_events_option_action_defineProperty(e,r,t){return(r=view_events_option_action_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function view_events_option_action_toPropertyKey(t){var i=view_events_option_action_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function view_events_option_action_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const VIEW_EVENTS_OPTION_ACTION="VIEW_EVENTS_OPTION_ACTION";class view_events_option_action_ViewEventsOptionAction{constructor(){view_events_option_action_defineProperty(this,"type",VIEW_EVENTS_OPTION_ACTION);view_events_option_action_defineProperty(this,"id",VIEW_EVENTS_OPTION_ACTION);view_events_option_action_defineProperty(this,"order",1);view_events_option_action_defineProperty(this,"grouping",[{id:VIEW_EVENTS_OPTION_ACTION,getDisplayName:this.getDisplayName,getIconType:this.getIconType,category:"vis_augmenter",order:10}])}getIconType(){return"inspect"}getDisplayName(){return external_osdSharedDeps_OsdI18n_["i18n"].translate("visAugmenter.actions.viewEvents.displayName",{defaultMessage:"View Events"})}async isCompatible(_ref){let{embeddable:embeddable}=_ref;const vis=embeddable.vis;return vis!==undefined&&isEligibleForVisLayers(vis)&&!Object(external_osdSharedDeps_Lodash_["isEmpty"])(embeddable.visLayers)}async execute(_ref2){let{embeddable:embeddable}=_ref2;if(!await this.isCompatible({embeddable:embeddable})){throw new uiActions_public_["IncompatibleActionError"]}const visEmbeddable=embeddable;const savedObjectId=Object(external_osdSharedDeps_Lodash_["get"])(visEmbeddable.getInput(),"savedObjectId","");if(getFlyoutState()===VIEW_EVENTS_FLYOUT_STATE.CLOSED){openViewEventsFlyout({savedObjectId:savedObjectId})}}}var savedObjectsManagement_public_=__webpack_require__(14);function plugin_resource_delete_action_defineProperty(e,r,t){return(r=plugin_resource_delete_action_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function plugin_resource_delete_action_toPropertyKey(t){var i=plugin_resource_delete_action_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function plugin_resource_delete_action_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const PLUGIN_RESOURCE_DELETE_ACTION="PLUGIN_RESOURCE_DELETE_ACTION";class plugin_resource_delete_action_PluginResourceDeleteAction{constructor(){plugin_resource_delete_action_defineProperty(this,"type",PLUGIN_RESOURCE_DELETE_ACTION);plugin_resource_delete_action_defineProperty(this,"id",PLUGIN_RESOURCE_DELETE_ACTION);plugin_resource_delete_action_defineProperty(this,"order",1)}getIconType(){return`trash`}getDisplayName(){return external_osdSharedDeps_OsdI18n_["i18n"].translate("visAugmenter.actions.deleteSavedObject.name",{defaultMessage:"Clean up all augment-vis saved objects associated to the deleted visualization"})}async isCompatible(_ref){let{savedObjs:savedObjs,visLayers:visLayers}=_ref;return!Object(external_osdSharedDeps_Lodash_["isEmpty"])(savedObjs)&&!Object(external_osdSharedDeps_Lodash_["isEmpty"])(visLayers)}async execute(_ref2){let{savedObjs:savedObjs,visLayers:visLayers}=_ref2;if(!await this.isCompatible({savedObjs:savedObjs,visLayers:visLayers})){throw new uiActions_public_["IncompatibleActionError"]}
1cleanupStaleObjects(savedObjs,visLayers,getSavedAugmentVisLoader())}}function saved_object_delete_action_defineProperty(e,r,t){return(r=saved_object_delete_action_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function saved_object_delete_action_toPropertyKey(t){var i=saved_object_delete_action_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function saved_object_delete_action_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const SAVED_OBJECT_DELETE_ACTION="SAVED_OBJECT_DELETE_ACTION";class saved_object_delete_action_SavedObjectDeleteAction{constructor(){saved_object_delete_action_defineProperty(this,"type",SAVED_OBJECT_DELETE_ACTION);saved_object_delete_action_defineProperty(this,"id",SAVED_OBJECT_DELETE_ACTION);saved_object_delete_action_defineProperty(this,"order",1)}getIconType(){return`trash`}getDisplayName(){return external_osdSharedDeps_OsdI18n_["i18n"].translate("visAugmenter.actions.deleteSavedObject.name",{defaultMessage:"Clean up all augment-vis saved objects associated to the deleted visualization"})}async isCompatible(_ref){let{type:type,savedObjectId:savedObjectId}=_ref;return type==="visualization"&&!!savedObjectId}async execute(_ref2){let{type:type,savedObjectId:savedObjectId}=_ref2;if(!await this.isCompatible({type:type,savedObjectId:savedObjectId})){throw new uiActions_public_["IncompatibleActionError"]}try{const loader=getSavedAugmentVisLoader();const augmentVisObjs=await getAugmentVisSavedObjs(savedObjectId,loader);const augmentVisIdsToDelete=augmentVisObjs.map(augmentVisObj=>augmentVisObj.id);if(!Object(external_osdSharedDeps_Lodash_["isEmpty"])(augmentVisIdsToDelete))loader.delete(augmentVisIdsToDelete)}catch(e){console.error(e)}}}const PLUGIN_RESOURCE_DELETE_TRIGGER="PLUGIN_RESOURCE_DELETE_TRIGGER";const pluginResourceDeleteTrigger={id:PLUGIN_RESOURCE_DELETE_TRIGGER,title:external_osdSharedDeps_OsdI18n_["i18n"].translate("visAugmenter.triggers.pluginResourceDeleteTitle",{defaultMessage:"Plugin resource delete"}),description:external_osdSharedDeps_OsdI18n_["i18n"].translate("visAugmenter.triggers.pluginResourceDeleteDescription",{defaultMessage:"Delete augment-vis saved objs associated to the deleted plugin resource"})};const bootstrapUiActions=uiActions=>{const openEventsFlyoutAction=new open_events_flyout_action_OpenEventsFlyoutAction;const viewEventsOptionAction=new view_events_option_action_ViewEventsOptionAction;const savedObjectDeleteAction=new saved_object_delete_action_SavedObjectDeleteAction;const pluginResourceDeleteAction=new plugin_resource_delete_action_PluginResourceDeleteAction;uiActions.registerAction(openEventsFlyoutAction);uiActions.registerAction(viewEventsOptionAction);uiActions.registerAction(savedObjectDeleteAction);uiActions.registerAction(pluginResourceDeleteAction);uiActions.registerTrigger(uiActions_public_["externalActionTrigger"]);uiActions.registerTrigger(pluginResourceDeleteTrigger);uiActions.addTriggerAction(PLUGIN_RESOURCE_DELETE_TRIGGER,pluginResourceDeleteAction);uiActions.addTriggerAction(uiActions_public_["EXTERNAL_ACTION_TRIGGER"],openEventsFlyoutAction);try{uiActions.addTriggerAction(embeddable_public_["CONTEXT_MENU_TRIGGER"],viewEventsOptionAction);uiActions.addTriggerAction(savedObjectsManagement_public_["SAVED_OBJECT_DELETE_TRIGGER"],savedObjectDeleteAction)}catch(e){console.error(e)}};class plugin_VisAugmenterPlugin{constructor(initializerContext){}setup(core,_ref){let{expressions:expressions}=_ref;expressions.registerType(types_visLayers);setUISettings(core.uiSettings);return{}}start(core,_ref2){let{uiActions:uiActions,embeddable:embeddable,data:data,visualizations:visualizations}=_ref2;setUiActions(uiActions);setEmbeddable(embeddable);setQueryService(data.query);setVisualizations(visualizations);setCore(core);setFlyoutState(VIEW_EVENTS_FLYOUT_STATE.CLOSED);
1const savedAugmentVisLoader=createSavedAugmentVisLoader({savedObjectsClient:core.savedObjects.client,indexPatterns:data.indexPatterns,search:data.search,chrome:core.chrome,overlays:core.overlays});setSavedAugmentVisLoader(savedAugmentVisLoader);bootstrapUiActions(uiActions);return{savedAugmentVisLoader:savedAugmentVisLoader}}stop(){}}const VIS_LAYER_COLUMN_TYPE="vis_layer";const EVENT_COLOR="#D36086";const HOVER_PARAM="HOVER";const EVENT_MARK_SIZE=40;const EVENT_MARK_SIZE_ENLARGED=80;const EVENT_MARK_SHAPE="triangle-up";const EVENT_TIMELINE_HEIGHT=25;const EVENT_TOOLTIP_CENTER_ON_MARK=5;let VisAnnotationType=function(VisAnnotationType){VisAnnotationType["POINT_IN_TIME_ANNOTATION"]="POINT_IN_TIME_ANNOTATION";return VisAnnotationType}({});const enableVisLayersInSpecConfig=(spec,visLayers)=>{const config=Object(external_osdSharedDeps_Lodash_["get"])(spec,"config",{kibana:{}});const visibleVisLayers=new Map;const pointInTimeEventsVisLayers=visLayers.filter(visLayer=>isPointInTimeEventsVisLayer(visLayer));if(!Object(external_osdSharedDeps_Lodash_["isEmpty"])(pointInTimeEventsVisLayers)){visibleVisLayers.set(VisLayerTypes.PointInTimeEvents,true)}return{...config,kibana:{...config.kibana,visibleVisLayers:[...visibleVisLayers]}}};const addVisEventSignalsToSpecConfig=spec=>{const config=Object(external_osdSharedDeps_Lodash_["get"])(spec,"config",{kibana:{}});const signals={...config.kibana.signals||{},[`${VisAnnotationType.POINT_IN_TIME_ANNOTATION}`]:[{name:"PointInTimeAnnotationVisEvent",on:[{events:"click",update:"opensearchDashboardsVisEventTriggered(event, datum)"}]}]};return{...config,kibana:{...config.kibana,signals:signals,tooltips:{centerOnMark:EVENT_TOOLTIP_CENTER_ON_MARK}}}};const getXAxisId=(dimensions,columns)=>columns.filter(column=>column.name===dimensions.x.label)[0].id;const isVisLayerColumn=column=>{var _column$meta;return((_column$meta=column.meta)===null||_column$meta===void 0?void 0:_column$meta.type)===VIS_LAYER_COLUMN_TYPE};const convertToDateTimeObj=timestamp=>{const momentObj=external_osdSharedDeps_Moment_default()(timestamp);return{year:Number(momentObj.format("YYYY")),month:momentObj.format("MMMM"),date:momentObj.date(),hours:momentObj.hours(),minutes:momentObj.minutes(),seconds:momentObj.seconds(),milliseconds:momentObj.milliseconds()}};const generateVisLayerFilterString=visLayerColumnIds=>{if(!Object(external_osdSharedDeps_Lodash_["isEmpty"])(visLayerColumnIds)){const filterString=visLayerColumnIds.map(visLayerColumnId=>`datum['${visLayerColumnId}'] > 0`);return filterString.join(" || ")}else{return"false"}};const generateVisLayerTooltipFields=visLayerColumnIds=>visLayerColumnIds.map(id=>({field:id}));const addMissingRowsToTableBounds=(datatable,dimensions)=>{const augmentedTable=Object(external_osdSharedDeps_Lodash_["cloneDeep"])(datatable);const intervalMillis=external_osdSharedDeps_Moment_default.a.duration(dimensions.x.params.interval).asMilliseconds();const xAxisId=getXAxisId(dimensions,augmentedTable.columns);const chartStartTime=new Date(dimensions.x.params.bounds.min).valueOf();const chartEndTime=new Date(dimensions.x.params.bounds.max).valueOf();if(!Object(external_osdSharedDeps_Lodash_["isEmpty"])(augmentedTable.rows)){const dataStartTime=augmentedTable.rows[0][xAxisId];const dataEndTime=augmentedTable.rows[augmentedTable.rows.length-1][xAxisId];let curStartTime=dataStartTime;while(curStartTime>chartStartTime){curStartTime-=intervalMillis;augmentedTable.rows.unshift({[xAxisId]:curStartTime})}let curEndTime=dataEndTime;while(curEndTime<chartEndTime){curEndTime+=intervalMillis;augmentedTable.rows.push({[xAxisId]:curEndTime})}}else{let curTime=chartStartTime;while(curTime<=chartEndTime){augmentedTable.rows.push({[xAxisId]:curTime});curTime+=intervalMillis}}return augmentedTable};const addPointInTimeEventsLayersToTable=(datatable,dimensions,visLayers)=>{const augmentedTable=addMissingRowsToTableBounds(datatable,dimensions);const xAxisId=getXAxisId(dimensions,augmentedTable.columns);if(Object(external_osdSharedDeps_Lodash_["isEmpty"])(visLayers)||augmentedTable.rows.length===0)return augmentedTable;[...new Set(visLayers.map(visLayer=>
1visLayer.pluginEventType))].forEach(pluginEventType=>{augmentedTable.columns.push({id:pluginEventType,name:`${pluginEventType} count`,meta:{type:VIS_LAYER_COLUMN_TYPE}})});visLayers.forEach(visLayer=>{const visLayerColumnId=`${visLayer.pluginEventType}`;let row=0;while(row<augmentedTable.rows.length){augmentedTable.rows[row]={...augmentedTable.rows[row],[visLayerColumnId]:Object(external_osdSharedDeps_Lodash_["get"])(augmentedTable.rows[row],visLayerColumnId,0)};row++}if(augmentedTable.rows.length===1){augmentedTable.rows[0]={...augmentedTable.rows[0],[visLayerColumnId]:Object(external_osdSharedDeps_Lodash_["get"])(augmentedTable.rows[0],visLayerColumnId,0)+visLayer.events.length};return}let rowIndex=0;const minVal=augmentedTable.rows[0][xAxisId];const maxVal=augmentedTable.rows[augmentedTable.rows.length-1][xAxisId]+external_osdSharedDeps_Moment_default.a.duration(dimensions.x.params.interval).asMilliseconds();const sortedTimestamps=visLayer.events.map(event=>event.timestamp).filter(timestamp=>timestamp>=minVal&×tamp<=maxVal).sort((n1,n2)=>n1-n2);sortedTimestamps.forEach(timestamp=>{while(rowIndex<augmentedTable.rows.length-1){const smallerVal=augmentedTable.rows[rowIndex][xAxisId];const higherVal=augmentedTable.rows[rowIndex+1][xAxisId];let rowIndexToInsert;if(timestamp===smallerVal){rowIndexToInsert=rowIndex}else if(timestamp<=higherVal){const smallerValDiff=Math.abs(timestamp-smallerVal);const higherValDiff=Math.abs(timestamp-higherVal);rowIndexToInsert=smallerValDiff<=higherValDiff?rowIndex:rowIndex+1}else if(rowIndex+1===augmentedTable.rows.length-1){rowIndexToInsert=rowIndex+1}else{rowIndex+=1;continue}augmentedTable.rows[rowIndexToInsert][visLayerColumnId]=Object(external_osdSharedDeps_Lodash_["get"])(augmentedTable.rows[rowIndexToInsert],visLayerColumnId,0)+1;break}})});return augmentedTable};const addPointInTimeEventsLayersToSpec=(datatable,dimensions,spec)=>{const newSpec=Object(external_osdSharedDeps_Lodash_["cloneDeep"])(spec);const xAxisId=getXAxisId(dimensions,datatable.columns);const xAxisTitle=dimensions.x.label.replaceAll('"',"");const bucketStartTime=convertToDateTimeObj(datatable.rows[0][xAxisId]);const bucketEndTime=convertToDateTimeObj(datatable.rows[datatable.rows.length-1][xAxisId]);const visLayerColumns=datatable.columns.filter(column=>isVisLayerColumn(column));const visLayerColumnIds=visLayerColumns.map(column=>column.id);newSpec.layer.forEach(dataSeries=>{if(Object(external_osdSharedDeps_Lodash_["get"])(dataSeries,"encoding.x.axis",null)!==null){dataSeries.encoding.x.axis={...dataSeries.encoding.x.axis,labels:false,title:null}}});newSpec.layer.push({mark:{type:"rule",color:EVENT_COLOR,opacity:1},transform:[{filter:generateVisLayerFilterString(visLayerColumnIds)}],encoding:{x:{field:xAxisId,type:"temporal"},opacity:{value:0,condition:{empty:false,param:HOVER_PARAM,value:1}}}});newSpec.vconcat=[];newSpec.vconcat.push({layer:newSpec.layer});delete newSpec.layer;newSpec.vconcat.push({height:EVENT_TIMELINE_HEIGHT,mark:{type:"point",shape:EVENT_MARK_SHAPE,fill:EVENT_COLOR,stroke:EVENT_COLOR,strokeOpacity:1,fillOpacity:1,style:[`${VisAnnotationType.POINT_IN_TIME_ANNOTATION}`],tooltip:true},transform:[{filter:generateVisLayerFilterString(visLayerColumnIds)},{calculate:`'${VisAnnotationType.POINT_IN_TIME_ANNOTATION}'`,as:"annotationType"}],params:[{name:HOVER_PARAM,select:{type:"point",on:"mouseover"}}],encoding:{x:{axis:{title:xAxisTitle,grid:false,ticks:true,orient:"bottom",domain:true},field:xAxisId,type:"temporal",scale:{domain:[bucketStartTime,bucketEndTime]}},size:{condition:{empty:false,param:HOVER_PARAM,value:EVENT_MARK_SIZE_ENLARGED},value:EVENT_MARK_SIZE},tooltip:generateVisLayerTooltipFields(visLayerColumnIds)}});return newSpec};const calculateYAxisPadding=config=>{const defaultPadding=3;return Object(external_osdSharedDeps_Lodash_["get"])(config,"minExtent",0)+Object(external_osdSharedDeps_Lodash_["get"])(config,"offset",0)+Object(external_osdSharedDeps_Lodash_["get"])(config,"translate",0)+Object(external_osdSharedDeps_Lodash_["get"])(config,"domainWidth",0)+Object(external_osdSharedDeps_Lodash_["get"])(config,"labelPadding",0)+Object(external_osdSharedDeps_Lodash_["get"])(config,"titlePadding",0)+Object(external_osdSharedDeps_Lodash_["get"])(config,"tickOffset",0)+Object(external_osdSharedDeps_Lodash_["get"])(config,"tickSize",0)+defaultPadding};const augmentEventChartSpec=(config,origSpec)=>{const inFlyout=Object(external_osdSharedDeps_Lodash_["get"])(config,"inFlyout",false);const flyoutContext=Object(external_osdSharedDeps_Lodash_["get"])(config,"flyoutContext",VisFlyoutContext.BASE_VIS);const newVconcat=[];const newConfig=origSpec===null||origSpec===void 0?void 0:origSpec.config;const visChart=Object(external_osdSharedDeps_Lodash_["get"])(origSpec,"vconcat[0]",{});const eventChart=Object(external_osdSharedDeps_Lodash_["get"])(origSpec,"vconcat[1]",{});if(inFlyout){switch(flyoutContext){case VisFlyoutContext.BASE_VIS:newConfig.legend={...newConfig.legend,orient:"top",offset:0};break;case VisFlyoutContext.EVENT_VIS:eventChart.encoding.x.axis={domain:true,grid:false,ticks:false,labels:false,title:null};eventChart.mark.fillOpacity=0;break;case VisFlyoutContext.TIMELINE_VIS:eventChart.transform=[{filter:"false"}];break}newConfig.axisY={minExtent:40,maxExtent:40,offset:0,translate:0,domainWidth:1,labelPadding:2,titlePadding:2,tickOffset:0,tickSize:5}}if(flyoutContext===VisFlyoutContext.BASE_VIS){newVconcat.push(visChart)}newVconcat.push(eventChart);return{...Object(external_osdSharedDeps_Lodash_["cloneDeep"])(origSpec),config:newConfig,vconcat:ne
1wVconcat}};const TEST_X_AXIS_ID="test-x-axis-id";const TEST_X_AXIS_ID_DIRTY="test.x.axis.id";const TEST_VALUE_AXIS_ID="test-value-axis-id";const TEST_VALUE_AXIS_ID_DIRTY="test.value.axis.id";const TEST_X_AXIS_TITLE="time";const TEST_VALUE_AXIS_TITLE="avg value";const TEST_PLUGIN="test-plugin";const TEST_PLUGIN_EVENT_TYPE="test-plugin-event-type";const TEST_PLUGIN_EVENT_TYPE_2="test-plugin-event-type-2";const TEST_PLUGIN_RESOURCE_TYPE="test-resource-type";const TEST_PLUGIN_RESOURCE_ID="test-resource-id";const TEST_PLUGIN_RESOURCE_ID_2="test-resource-id-2";const TEST_PLUGIN_RESOURCE_NAME="test-resource-name";const TEST_PLUGIN_RESOURCE_NAME_2="test-resource-name-2";const TEST_PLUGIN_RESOURCE_PATH=`${TEST_PLUGIN}/${TEST_PLUGIN_RESOURCE_TYPE}/${TEST_PLUGIN_RESOURCE_ID}`;const TEST_PLUGIN_RESOURCE_PATH_2=`${TEST_PLUGIN}/${TEST_PLUGIN_RESOURCE_TYPE}/${TEST_PLUGIN_RESOURCE_ID_2}`;const TEST_VALUES_SINGLE_ROW_NO_VIS_LAYERS=[{[TEST_X_AXIS_ID]:0,[TEST_VALUE_AXIS_ID]:5}];const TEST_VALUES_SINGLE_ROW_SINGLE_VIS_LAYER=[{[TEST_X_AXIS_ID]:0,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:3}];const TEST_VALUES_ONLY_VIS_LAYERS=[{[TEST_X_AXIS_ID]:0,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:2},{[TEST_X_AXIS_ID]:10,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:15,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:20,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:25,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:30,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:35,[TEST_PLUGIN_EVENT_TYPE]:1},{[TEST_X_AXIS_ID]:40,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:45,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:50,[TEST_PLUGIN_EVENT_TYPE]:0}];const TEST_VALUES_NO_VIS_LAYERS=[{[TEST_X_AXIS_ID]:0,[TEST_VALUE_AXIS_ID]:5},{[TEST_X_AXIS_ID]:5,[TEST_VALUE_AXIS_ID]:10},{[TEST_X_AXIS_ID]:10,[TEST_VALUE_AXIS_ID]:6},{[TEST_X_AXIS_ID]:15,[TEST_VALUE_AXIS_ID]:4},{[TEST_X_AXIS_ID]:20,[TEST_VALUE_AXIS_ID]:5},{[TEST_X_AXIS_ID]:25},{[TEST_X_AXIS_ID]:30},{[TEST_X_AXIS_ID]:35},{[TEST_X_AXIS_ID]:40},{[TEST_X_AXIS_ID]:45,[TEST_VALUE_AXIS_ID]:3},{[TEST_X_AXIS_ID]:50,[TEST_VALUE_AXIS_ID]:5}];const TEST_VALUES_SINGLE_VIS_LAYER_EMPTY=[{[TEST_X_AXIS_ID]:0,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:5,[TEST_VALUE_AXIS_ID]:10,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:10,[TEST_VALUE_AXIS_ID]:6,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:15,[TEST_VALUE_AXIS_ID]:4,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:20,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:25,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:30,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:35,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:40,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:45,[TEST_VALUE_AXIS_ID]:3,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:50,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0}];const TEST_VALUES_NO_VIS_LAYERS_DIRTY=[{[TEST_X_AXIS_ID_DIRTY]:0,[TEST_VALUE_AXIS_ID_DIRTY]:5},{[TEST_X_AXIS_ID_DIRTY]:5,[TEST_VALUE_AXIS_ID_DIRTY]:10},{[TEST_X_AXIS_ID_DIRTY]:10,[TEST_VALUE_AXIS_ID_DIRTY]:6},{[TEST_X_AXIS_ID_DIRTY]:15,[TEST_VALUE_AXIS_ID_DIRTY]:4},{[TEST_X_AXIS_ID_DIRTY]:20,[TEST_VALUE_AXIS_ID_DIRTY]:5},{[TEST_X_AXIS_ID_DIRTY]:25},{[TEST_X_AXIS_ID_DIRTY]:30},{[TEST_X_AXIS_ID_DIRTY]:35},{[TEST_X_AXIS_ID_DIRTY]:40},{[TEST_X_AXIS_ID_DIRTY]:45,[TEST_VALUE_AXIS_ID_DIRTY]:3},{[TEST_X_AXIS_ID_DIRTY]:50,[TEST_VALUE_AXIS_ID_DIRTY]:5}];const TEST_VALUES_SINGLE_VIS_LAYER=[{[TEST_X_AXIS_ID]:0,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:5,[TEST_VALUE_AXIS_ID]:10,[TEST_PLUGIN_EVENT_TYPE]:2},{[TEST_X_AXIS_ID]:10,[TEST_VALUE_AXIS_ID]:6,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:15,[TEST_VALUE_AXIS_ID]:4,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:20,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:25,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:30,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:35,[TEST_PLUGIN_EVENT_TYPE]:1},{[TEST_X_AXIS_ID]:40,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:45,[TEST_VALUE_AXIS_ID]:3,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:50,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0}];const TEST_VALUES_SINGLE_VIS_LAYER_ON_BOUNDS=[{[TEST_X_AXIS_ID]:0,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:2},{[TEST_X_AXIS_ID]:5,[TEST_VALUE_AXIS_ID]:10,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:10,[TEST_VALUE_AXIS_ID]:6,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:15,[TEST_VALUE_AXIS_ID]:4,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:20,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:25,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:30,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:35,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:40,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:45,[TEST_VALUE_AXIS_ID]:3,[TEST_PLUGIN_EVENT_TYPE]:0},{[TEST_X_AXIS_ID]:50,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:1}];const TEST_VALUES_MULTIPLE_VIS_LAYERS=[{[TEST_X_AXIS_ID]:0,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:5,[TEST_VALUE_AXIS_ID]:10,[TEST_PLUGIN_EVENT_TYPE]:2,[TEST_PLUGIN_EVENT_TYPE_2]:1},{[TEST_X_AXIS_ID]:10,[TEST_VALUE_AXIS_ID]:6,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:15,[TEST_VALUE_AXIS_ID]:4,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:1},{[TEST_X_AXIS_ID]:20,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:25,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:30,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:35,[TEST_PLUGIN_EVENT_TYPE]:1,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:40,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:45,[TEST_VALUE_AXIS_ID]:3,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:50,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:2}];const TEST_VALUES_MULTIPLE_VIS_LAYERS_ONE_EMPTY=[{[TEST_X_AXIS_ID]:0,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:5,[TEST_VALUE_AXIS_ID]:10,[TEST_PLUGIN_EVENT_TYPE]:2,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:10,[TEST_VALUE_AXIS_ID]:6,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:15,[TEST_VALUE_AXIS_ID]:4,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:20,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:25,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:30,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:35,[TEST_PLUGIN_EVENT_TYPE]:1,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:40,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:45,[TEST_VALUE_AXIS_ID]:3,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0},{[TEST_X_AXIS_ID]:50,[TEST_VALUE_AXIS_ID]:5,[TEST_PLUGIN_EVENT_TYPE]:0,[TEST_PLUGIN_EVENT_TYPE_2]:0}];const TEST_COLUMNS_NO_VIS_LAYERS=[{id:TEST_X_AXIS_ID,name:TEST_X_AXIS_TITLE},{id:TEST_VALUE_AXIS_ID,name:TEST_VALUE_AXIS_TITLE}];const TEST_COLUMNS_NO_VIS_LAYERS_DIRTY=[{id:TEST_X_AXIS_ID_DIRTY,name:TEST_X_AXIS_TITLE},{id:TEST_VALUE_AXIS_ID_DIRTY,name:TEST_VALUE_AXIS_TITLE}];const TEST_COLUMNS_SINGLE_VIS_LAYER=[...TEST_COLUMNS_NO_VIS_LAYERS,{id:TEST_PLUGIN_EVENT_TYPE,name:`${TEST_PLUGIN_EVENT_TYPE} count`,meta:{type:VIS_LAYER_COLUMN_TYPE}}];const TEST_COLUMNS_MULTIPLE_VIS_LAYERS=[...TEST_COLUMNS_SINGLE_VIS_LAYER,{id:TEST_PLUGIN_EVENT_TYPE_2,name:`${TEST_PLUGIN_EVENT_TYPE_2} count`,meta:{type:VIS_LAYER_COLUMN_TYPE}}];const TEST_DATATABLE_SINGLE_ROW_NO_VIS_LAYERS={type:"opensearch_dashboards_datatable",columns:TEST_COLUMNS_NO_VIS_LAYERS,rows:TEST_VALUES_SINGLE_ROW_NO_VIS_LAYERS};const TEST_DATATABLE_SINGLE_ROW_SINGLE_VIS_LAYER={type:"opensearch_dashboards_datatable",columns:TEST_COLUMNS_SINGLE_VIS_LAYER,rows:TEST_VALUES_SINGLE_ROW_SINGLE_VIS_LAYER};const TEST_DATATABLE_ONLY_VIS_LAYERS={type:"opensearch_dashboards_datatable",columns:TEST_COLUMNS_SINGLE_VIS_LAYER,rows:TEST_VALUES_ONLY_VIS_LAYERS};const TEST_DATATABLE_NO_VIS_LAYERS={type:"opensearch_dashboards_datatable",columns:TEST_COLUMNS_NO_VIS_LAYERS,rows:TEST_VALUES_NO_VIS_LAYERS};const TEST_DATATABLE_NO_VIS_LAYERS_DIRTY={type:"opensearch_dashboards_datatable",columns:TEST_COLUMNS_NO_VIS_LAYERS_DIRTY,rows:TEST_VALUES_NO_VIS_LAYERS_DIRTY};const TEST_DATATABLE_SINGLE_VIS_LAYER_EMPTY={...TEST_DATATABLE_NO_VIS_LAYERS,columns:TEST_COLUMNS_SINGLE_VIS_LAYER,rows:TEST_VALUES_SINGLE_VIS_LAYER_EMPTY};const TEST_DATATABLE_SINGLE_VIS_LAYER={type:"opensearch_dashboards_datatable",columns:TEST_COLUMNS_SINGLE_VIS_LAYER,rows:TEST_VALUES_SINGLE_VIS_LAYER};const TEST_DATATABLE_SINGLE_VIS_LAYER_ON_BOUNDS={type:"opensearch_dashboards_datatable",columns:TEST_COLUMNS_SINGLE_VIS_LAYER,rows:TEST_VALUES_SINGLE_VIS_LAYER_ON_BOUNDS};const TEST_DATATABLE_MULTIPLE_VIS_LAYERS={type:"opensearch_dashboards_datatable",columns:TEST_COLUMNS_MULTIPLE_VIS_LAYERS,rows:TEST_VALUES_MULTIPLE_VIS_LAYERS};const TEST_DATATABLE_MULTIPLE_VIS_LAYERS_ONE_EMPTY={type:"opensearch_dashboards_datatable",columns:TEST_COLUMNS_MULTIPLE_VIS_LAYERS,rows:TEST_VALUES_MULTIPLE_VIS_LAYERS_ONE_EMPTY};const TEST_BASE_CONFIG={view:{stroke:null},concat:{spacing:0},legend:{orient:"right"},kibana:{hideWarnings:true}};const TEST_BASE_VIS_LAYER={mark:{type:"line",interpolate:"linear",strokeWidth:2,point:true},encoding:{x:{axis:{title:TEST_X_AXIS_TITLE,grid:false},field:TEST_X_AXIS_ID,type:"temporal"},y:{axis:{title:TEST_VALUE_AXIS_TITLE,grid:"",orient:"left",labels:true,labelAngle:0},field:TEST_VALUE_AXIS_ID,type:"quantitative"},tooltip:[{field:TEST_X_AXIS_ID,type:"temporal",title:TEST_VALUE_AXIS_TITLE},{field:TEST_VALUE_AXIS_ID,type:"quantitative",title:TEST_VALUE_AXIS_TITLE}],color:{datum:TEST_VALUE_AXIS_TITLE}}};const TEST_SPEC_NO_VIS_LAYERS={$schema:"https://vega.github.io/schema/vega-lite/v5.json",data:{values:TEST_VALUES_NO_VIS_LAYERS},config:TEST_BASE_CONFIG,layer:[TEST_BASE_VIS_LAYER]};const TEST_SPEC_SINGLE_VIS_LAYER={...TEST_SPEC_NO_VIS_LAYERS,data:{...TEST_SPEC_NO_VIS_LAYERS.data,values:TEST_VALUES_SINGLE_VIS_LAYER}};const TEST_SPEC_MULTIPLE_VIS_LAYERS={...TEST_SPEC_NO_VIS_LAYERS,data:{...TEST_SPEC_NO_VIS_LAYERS.data,values:TEST_VALUES_MULTIPLE_VIS_LAYERS}};const TEST_DIMENSIONS={x:{params:{interval:5,bounds:{min:0,max:50}},label:TEST_X_AXIS_TITLE}};const TEST_DIMENSIONS_SINGLE_ROW={x:{params:{interval:5,bounds:{min:0,max:0}},label:TEST_X_AXIS_TITLE}};const TEST_DIMENSIONS_INVALID_BOUNDS={x:{params:{interval:5,bounds:{min:50,max:0}},label:TEST_X_AXIS_TITLE}};const TEST_VIS_LAYERS_SINGLE=[{originPlugin:TEST_PLUGIN,type:VisLayerTypes.PointInTimeEvents,pluginResource:{type:TEST_PLUGIN_RESOURCE_TYPE,id:TEST_PLUGIN_RESOURCE_ID,name:TEST_PLUGIN_RESOURCE_NAME,urlPath:TEST_PLUGIN_RESOURCE_PATH},pluginEventType:TEST_PLUGIN_EVENT_TYPE,events:[{timestamp:4,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID}},{timestamp:6,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID}},{timestamp:35,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID}}]}];const TEST_VIS_LAYERS_SINGLE_INVALID_BOUNDS=[{originPlugin:TEST_PLUGIN,type:VisLayerTypes.PointInTimeEvents,pluginResource:{type:TEST_PLUGIN_RESOURCE_TYPE,id:TEST_PLUGIN_RESOURCE_ID,name:TEST_PLUGIN_RESOURCE_NAME,urlPath:TEST_PLUGIN_RESOURCE_PATH},pluginEventType:TEST_PLUGIN_EVENT_TYPE,events:[{timestamp:-5,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID}},{timestamp:-100,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID}},{timestamp:75,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID}}]}];const TEST_VIS_LAYERS_SINGLE_ON_BOUNDS=[{originPlugin:TEST_PLUGIN,type:VisLayerTypes.PointInTimeEvents,pluginResource:{type:TEST_PLUGIN_RESOURCE_TYPE,id:TEST_PLUGIN_RESOURCE_ID,name:TEST_PLUGIN_RESOURCE_NAME,urlPath:TEST_PLUGIN_RESOURCE_PATH},pluginEventType:TEST_PLUGIN_EVENT_TYPE,events:[{timestamp:0,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID}},{timestamp:2,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID}},{timestamp:55,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID}}]}];const TEST_VIS_LAYERS_MULTIPLE=[...TEST_VIS_LAYERS_SINGLE,{originPlugin:TEST_PLUGIN,type:VisLayerTypes.PointInTimeEvents,pluginResource:{type:TEST_PLUGIN_RESOURCE_TYPE,id:TEST_PLUGIN_RESOURCE_ID_2,name:TEST_PLUGIN_RESOURCE_NAME_2,urlPath:TEST_PLUGIN_RESOURCE_PATH_2},pluginEventType:TEST_PLUGIN_EVENT_TYPE_2,events:[{timestamp:5,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID_2}}
1,{timestamp:15,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID_2}},{timestamp:49,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID_2}},{timestamp:50,metadata:{pluginResourceId:TEST_PLUGIN_RESOURCE_ID_2}}]}];const TEST_VIS_LAYERS_MULTIPLE_ONE_EMPTY=[...TEST_VIS_LAYERS_SINGLE,{originPlugin:TEST_PLUGIN,type:VisLayerTypes.PointInTimeEvents,pluginResource:{type:TEST_PLUGIN_RESOURCE_TYPE,id:TEST_PLUGIN_RESOURCE_ID_2,name:TEST_PLUGIN_RESOURCE_NAME_2,urlPath:TEST_PLUGIN_RESOURCE_PATH_2},pluginEventType:TEST_PLUGIN_EVENT_TYPE_2,events:[]}];const TEST_RULE_LAYER_SINGLE_VIS_LAYER={mark:{type:"rule",color:EVENT_COLOR,opacity:1},transform:[{filter:`datum['${TEST_PLUGIN_EVENT_TYPE}'] > 0`}],encoding:{x:{field:TEST_X_AXIS_ID,type:"temporal"},opacity:{value:0,condition:{empty:false,param:HOVER_PARAM,value:1}}}};const TEST_RULE_LAYER_MULTIPLE_VIS_LAYERS={...TEST_RULE_LAYER_SINGLE_VIS_LAYER,transform:[{filter:`datum['${TEST_PLUGIN_EVENT_TYPE}'] > 0 || datum['${TEST_PLUGIN_EVENT_TYPE_2}'] > 0`}]};const TEST_EVENTS_LAYER_SINGLE_VIS_LAYER={height:25,mark:{type:"point",shape:EVENT_MARK_SHAPE,fill:EVENT_COLOR,fillOpacity:1,stroke:EVENT_COLOR,strokeOpacity:1,style:[`${VisAnnotationType.POINT_IN_TIME_ANNOTATION}`],tooltip:true},transform:[{filter:`datum['${TEST_PLUGIN_EVENT_TYPE}'] > 0`},{calculate:`'${VisAnnotationType.POINT_IN_TIME_ANNOTATION}'`,as:"annotationType"}],params:[{name:HOVER_PARAM,select:{type:"point",on:"mouseover"}}],encoding:{x:{axis:{title:TEST_X_AXIS_TITLE,grid:false,ticks:true,orient:"bottom",domain:true},field:TEST_X_AXIS_ID,type:"temporal",scale:{domain:[{year:2022,month:"December",date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{year:2023,month:"March",date:2,hours:0,minutes:0,seconds:0,milliseconds:0}]}},size:{condition:{empty:false,param:HOVER_PARAM,value:EVENT_MARK_SIZE_ENLARGED},value:EVENT_MARK_SIZE},tooltip:[{field:TEST_PLUGIN_EVENT_TYPE}]}};const TEST_EVENTS_LAYER_MULTIPLE_VIS_LAYERS={...TEST_EVENTS_LAYER_SINGLE_VIS_LAYER,transform:[{filter:`datum['${TEST_PLUGIN_EVENT_TYPE}'] > 0 || datum['${TEST_PLUGIN_EVENT_TYPE_2}'] > 0`},{calculate:`'${VisAnnotationType.POINT_IN_TIME_ANNOTATION}'`,as:"annotationType"}],encoding:{...TEST_EVENTS_LAYER_SINGLE_VIS_LAYER.encoding,tooltip:[{field:TEST_PLUGIN_EVENT_TYPE},{field:TEST_PLUGIN_EVENT_TYPE_2}]}};const TEST_RESULT_SPEC_SINGLE_VIS_LAYER={$schema:"https://vega.github.io/schema/vega-lite/v5.json",data:{values:TEST_VALUES_SINGLE_VIS_LAYER},config:TEST_BASE_CONFIG,vconcat:[{layer:[{...TEST_BASE_VIS_LAYER,encoding:{...TEST_BASE_VIS_LAYER.encoding,x:{...TEST_BASE_VIS_LAYER.encoding.x,axis:{title:null,grid:false,labels:false}}}},TEST_RULE_LAYER_SINGLE_VIS_LAYER]},TEST_EVENTS_LAYER_SINGLE_VIS_LAYER]};const TEST_RESULT_SPEC_SINGLE_VIS_LAYER_EMPTY={...TEST_RESULT_SPEC_SINGLE_VIS_LAYER,data:{values:TEST_VALUES_NO_VIS_LAYERS}};const TEST_RESULT_SPEC_MULTIPLE_VIS_LAYERS={$schema:"https://vega.github.io/schema/vega-lite/v5.json",data:{values:TEST_VALUES_MULTIPLE_VIS_LAYERS},config:TEST_BASE_CONFIG,vconcat:[{layer:[{...TEST_BASE_VIS_LAYER,encoding:{...TEST_BASE_VIS_LAYER.encoding,x:{...TEST_BASE_VIS_LAYER.encoding.x,axis:{title:null,grid:false,labels:false}}}},TEST_RULE_LAYER_MULTIPLE_VIS_LAYERS]},TEST_EVENTS_LAYER_MULTIPLE_VIS_LAYERS]};function public_plugin(initializerContext){return new plugin_VisAugmenterPlugin(initializerContext)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.