(window["anomalyDetectionDashboards_bundle_jsonpfunction"]=window["anomalyDetectionDashboards_bundle_jsonpfunction"]||[]).push([[21],{2877:function(module,exports,__webpack_require__){"use strict";var _interopRequireDefault=__webpack_require__(0).default;var _interopRequireWildcard=__webpack_require__(9).default;Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(11));var _react=_interopRequireWildcard(__webpack_require__(2));var _query_editor_extension=__webpack_require__(832);var _utils=__webpack_require__(3427);const _excluded=["configMap","componentContainer","bannerContainer","bottomPanelContainer","queryControlsContainer"];const QueryEditorExtensions=_react.default.memo(props=>{const{configMap:configMap,componentContainer:componentContainer,bannerContainer:bannerContainer,bottomPanelContainer:bottomPanelContainer,queryControlsContainer:queryControlsContainer}=props,dependencies=(0,_objectWithoutProperties2.default)(props,_excluded);const sortedConfigs=(0,_react.useMemo)(()=>{if(!configMap||Object.keys(configMap).length===0)return[];return Object.values(configMap).sort((a,b)=>a.order-b.order)},[configMap]);return _react.default.createElement(_react.default.Fragment,null,sortedConfigs.map(config=>{const extensionComponentContainer=(0,_utils.createOrGetExtensionContainer)({extensionConfigId:config.id,containerName:"osdQueryEditorExtensionComponent",parentContainer:componentContainer});const extensionQueryControlsContainer=(0,_utils.createOrGetExtensionContainer)({extensionConfigId:config.id,containerName:"osdQueryEditorExtensionQueryControls",parentContainer:queryControlsContainer});const extensionActionBarContainer=(0,_utils.createOrGetExtensionContainer)({extensionConfigId:config.id,containerName:"osdQueryEditorExtensionActionBarContainer",parentContainer:document.getElementById(_query_editor_extension.ACTION_BAR_BUTTONS_CONTAINER_ID)});return _react.default.createElement(_query_editor_extension.QueryEditorExtension,{key:config.id,config:config,dependencies:dependencies,componentContainer:extensionComponentContainer,bannerContainer:bannerContainer,bottomPanelContainer:bottomPanelContainer,queryControlsContainer:extensionQueryControlsContainer,actionBarContainer:extensionActionBarContainer})}))});var _default=exports.default=QueryEditorExtensions;module.exports=exports.default},3427:function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.createOrGetExtensionContainer=void 0;const createOrGetExtensionContainer=_ref=>{let{extensionConfigId:extensionConfigId,containerName:containerName,parentContainer:parentContainer}=_ref;const extensionId=`${containerName}-${extensionConfigId}`;let extensionContainer=document.getElementById(extensionId);if(!extensionContainer){extensionContainer=document.createElement("div");extensionContainer.className=`${containerName} ${containerName}__${extensionConfigId}`;extensionContainer.id=extensionId;parentContainer===null||parentContainer===void 0||parentContainer.appendChild(extensionContainer)}return extensionContainer};exports.createOrGetExtensionContainer=createOrGetExtensionContainer}}]);