(window.webpackJsonp=window.webpackJsonp||[]).push([["4C7a"],{XM9p:function(e,t,o){"use strict";var n=o("TqRt");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(o("q1tI")),i=n(o("i8i4")),a=o("4PhQ"),d=u(o("6qX+")),l=n(o("F/Ax"));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(s=function(e){return e?o:t})(e)}function u(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=s(t);if(o&&o.has(e))return o.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,o&&o.set(e,n),n}class c extends r.Component{constructor(...e){super(...e),this.showModal=e=>{if(e&&e.preventDefault(),d.handleStartRouterNavigation(),!this._modalContainer){const e=document.createElement("div");if(e.setAttribute("role","dialog"),!document.body)throw new a.KAError("No body found in document!",a.Errors.Internal);let t;document.body.appendChild(e);const o=this.props.modal;t="function"==typeof o?o({closeModal:this.hideModal}):o&&r.cloneElement(o,{onClose:this.hideModal}),(0,l.default)(t,e),this._modalContainer=e}},this.hideModal=()=>{const{focusId:e}=this.props;if(this._modalContainer){if(!document.body)throw new a.KAError("No body found in document!",a.Errors.Internal);document.body.removeChild(this._modalContainer),i.default.unmountComponentAtNode(this._modalContainer),this._modalContainer=null}const t=document.getElementById(e);t&&t.focus()}}componentWillUnmount(){this._modalContainer&&this.hideModal()}render(){const{children:e,ariaLabel:t}=this.props;return e(this.showModal,t)}}var f=c;t.default=f}}]);
//# sourceMappingURL=../../sourcemaps/en/4C7a.17c911e0f8f77678da8c.js.map