define(["require","exports","tslib","react"],(function(t,i,e,h){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=(function(t){function i(i){var e=t.call(this,i)||this;return e.onContentDiv=function(t){if(t){var i=t.getBoundingClientRect(),h=i.height,a=i.width;e.setState({height:h,width:a})}},e.state={height:null,width:null},e}return e.__extends(i,t),i.prototype.getStyles=function(){var t=this.props,i=t.positions,e=t.cornerPadding,h=void 0===e?0:e,a=t.overridePlacement;if((i.target&&i.location||i.location&&a)&&null!==this.state.width&&null!==this.state.height){var o=h+this.state.width,n=h+this.state.height,s=0,r=0,l=0;if(i.target&&!a){var c=i.target.x+i.target.width/2-i.location.x,d=i.target.y+i.target.height/2-i.location.y;c<0?(l=-.5*Math.PI,s=1-this.state.height,r=Math.min(Math.max(d-.5*this.state.height,0+h),i.location.height-n)):c>i.location.width?(l=.5*Math.PI,r=Math.min(Math.max(d-.5*this.state.height,0+h),i.location.height-n),s=i.location.width-1):d<0?(l=0,r=1-this.state.height,s=Math.min(Math.max(c-.5*this.state.width,h),i.location.width-o)):d>i.location.height&&(l=Math.PI,r=i.location.height-1,s=Math.min(Math.max(c-.5*this.state.width,h),i.location.width-o))}else switch(a){case"top":l=0,r=-this.state.height,s=i.location.width/2-this.state.width/2;break;case"right":l=.5*Math.PI,r=i.location.height/2-this.state.width/2,s=i.location.width-1;break;case"bottom":l=Math.PI,r=i.location.height-1,s=i.location.width/2-this.state.width/2;break;case"left":l=-.5*Math.PI,r=i.location.height/2-this.state.width/2,s=-this.state.height}return{position:"absolute",transform:"rotate("+l+"rad)",top:r,left:s}}return{position:"absolute",visibility:"hidden"}},i.prototype.render=function(){return h.createElement("div",{style:this.getStyles(),ref:this.onContentDiv},this.props.children)},i})((h=e.__importStar(h)).Component);i.Arrow=a})); //# sourceMappingURL=arrow.min.js-vflxHnEj8.map