/*! * filename: ej2-popups.min.js * version : 19.1.57 * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ this.ej=this.ej||{},this.ej.popups=function(t,e,i){"use strict";function o(t,i){var o=!1,n={left:0,top:0},s=t;if(!t||!i)return n;for(e.isNullOrUndefined(i.offsetParent)&&"fixed"===i.style.position&&(o=!0);(i.offsetParent||o)&&t&&i.offsetParent!==t;)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;for(t=s;(i.offsetParent||o)&&t&&i.offsetParent!==t;)n.left-=t.scrollLeft,n.top-=t.scrollTop,t=t.parentElement;return n}function n(t,e,i,o,n){if(Wt=void 0,Wt=n,le=!!o,!t)return{left:0,top:0};e||(e="left"),i||(i="top"),Gt=t.ownerDocument,Zt=t;var s={left:0,top:0};return l(e.toLowerCase(),i.toLowerCase(),s)}function s(t,e){e.left=t}function r(t,e){e.top=t}function l(t,e,i){switch(Vt=Zt.getBoundingClientRect(),e+t){case"topcenter":s(m(),i),r(c(),i);break;case"topright":s(f(),i),r(c(),i);break;case"centercenter":s(m(),i),r(p(),i);break;case"centerright":s(f(),i),r(p(),i);break;case"centerleft":s(u(),i),r(p(),i);break;case"bottomcenter":s(m(),i),r(d(),i);break;case"bottomright":s(f(),i),r(d(),i);break;case"bottomleft":s(u(),i),r(d(),i);break;default:case"topleft":s(u(),i),r(c(),i)}return i}function a(){return Gt.documentElement.scrollTop||Gt.body.scrollTop}function h(){return Gt.documentElement.scrollLeft||Gt.body.scrollLeft}function d(){return le?Vt.bottom:Vt.bottom+a()}function p(){return c()+Vt.height/2}function c(){return le?Vt.top:Vt.top+a()}function u(){return Vt.left+h()}function f(){return Vt.right+h()-(Wt&&Vt.width>=Wt.width?Wt.width:0)}function m(){return u()+Vt.width/2}function g(t,e,i,o){if(void 0===e&&(e=null),void 0===i&&(i={X:!1,Y:!1}),!i.Y&&!i.X)return{left:0,top:0};var s=t.getBoundingClientRect();if(Jt=e,Kt=t.ownerDocument,o||(o=n(t,"left","top")),i.X){var r=Jt?T():A(),l=B(),a=R(),h=l-o.left,d=o.left+s.width-a;s.width>r?o.left=h>0&&d<=0?a-s.width:d>0&&h<=0?l:h>d?a-s.width:l:h>0?o.left+=h:d>0&&(o.left-=d)}if(i.Y){var p=Jt?P():M(),c=U(),u=z(),f=c-o.top,m=o.top+s.height-u;s.height>p?o.top=f>0&&m<=0?u-s.height:m>0&&f<=0?c:f>m?u-s.height:c:f>0?o.top+=f:m>0&&(o.top-=m)}return o}function v(t,e,i,o){void 0===e&&(e=null);var s=n(t,"left","top");i&&(s.left=i),o&&(s.top=o);var r=[];Jt=e,Kt=t.ownerDocument;var l=t.getBoundingClientRect(),a=s.top,h=s.left,d=s.left+l.width,p=N(a,s.top+l.height),c=C(h,d);return p.topSide&&r.push("top"),c.rightSide&&r.push("right"),c.leftSide&&r.push("left"),p.bottomSide&&r.push("bottom"),r}function y(t,e,i,o,n,s,r,l,a){if(void 0===r&&(r=null),void 0===l&&(l={X:!0,Y:!0}),e&&t&&n&&s&&(l.X||l.Y)){var h,d={TL:null,TR:null,BL:null,BR:null},p={TL:null,TR:null,BL:null,BR:null};if("none"===window.getComputedStyle(t).display){var c=t.style.visibility;t.style.visibility="hidden",t.style.display="block",h=t.getBoundingClientRect(),t.style.removeProperty("display"),t.style.visibility=c}else h=t.getBoundingClientRect();var u={posX:n,posY:s,offsetX:i,offsetY:o,position:{left:0,top:0}};Jt=r,Kt=e.ownerDocument,E(e,d,u,a,h),O(p,u,h),l.X&&w(e,p,d,u,h,!0),l.Y&&d.TL.top>-1&&S(e,p,d,u,h,!0),b(t,u,h)}}function b(t,e,i){var o=0,s=0;if(null!=t.offsetParent&&("absolute"===getComputedStyle(t.offsetParent).position||"relative"===getComputedStyle(t.offsetParent).position)){var r=n(t.offsetParent,"left","top",!1,i);o=r.left,s=r.top}t.style.top=e.position.top+e.offsetY-s+"px",t.style.left=e.position.left+e.offsetX-o+"px"}function E(t,e,i,o,s){i.position=n(t,i.posX,i.posY,o,s),e.TL=n(t,"left","top",o,s),e.TR=n(t,"right","top",o,s),e.BR=n(t,"left","bottom",o,s),e.BL=n(t,"right","bottom",o,s)}function O(t,e,i){t.TL={top:e.position.top+e.offsetY,left:e.position.left+e.offsetX},t.TR={top:t.TL.top,left:t.TL.left+i.width},t.BL={top:t.TL.top+i.height,left:t.TL.left},t.BR={top:t.TL.top+i.height,left:t.TL.left+i.width}}function C(t,e){var i=!1,o=!1;return t-L()R()&&(o=!0),{leftSide:i,rightSide:o}}function w(t,e,i,o,s,r){var l=C(e.TL.left,e.TR.left);i.TL.left-L()<=B()&&(l.leftSide=!1),i.TR.left>R()&&(l.rightSide=!1),(l.leftSide&&!l.rightSide||!l.leftSide&&l.rightSide)&&("right"===o.posX?o.posX="left":o.posX="right",o.offsetX=o.offsetX+s.width,o.offsetX=-1*o.offsetX,o.position=n(t,o.posX,o.posY,!1),O(e,o,s),r&&w(t,e,i,o,s,!1))}function S(t,e,i,o,s,r){var l=N(e.TL.top,e.BL.top);i.TL.top-k()<=U()&&(l.topSide=!1),i.BL.top>=z()&&t.getBoundingClientRect().bottomz()&&(o=!0),{topSide:i,bottomSide:o}}function T(){return Jt.getBoundingClientRect().width}function P(){return Jt.getBoundingClientRect().height}function x(){return Jt.getBoundingClientRect().left}function H(){return Jt.getBoundingClientRect().top}function U(){return Jt?H():0}function B(){return Jt?x():0}function R(){return Jt?L()+x()+T():L()+A()}function z(){return Jt?k()+H()+P():k()+M()}function k(){return Kt.documentElement.scrollTop||Kt.body.scrollTop}function L(){return Kt.documentElement.scrollLeft||Kt.body.scrollLeft}function M(){return window.innerHeight}function A(){var t=window.innerWidth,i=document.documentElement.getBoundingClientRect();return t-(t-(e.isNullOrUndefined(document.documentElement)?0:i.width))}function I(t,e){for(var i=getComputedStyle(t),o=[],n=/(auto|scroll)/,s=t.parentElement;s&&"HTML"!==s.tagName;){var r=getComputedStyle(s);"absolute"===i.position&&"static"===r.position||!n.test(r.overflow+r.overflowY+r.overflowX)||o.push(s),s=s.parentElement}return e||o.push(document),o}function Y(t){for(var i=t.parentElement,o=[];i&&"BODY"!==i.tagName;){var n=document.defaultView.getComputedStyle(i,null).getPropertyValue("z-index"),s=document.defaultView.getComputedStyle(i,null).getPropertyValue("position");"auto"!==n&&"static"!==s&&o.push(n),i=i.parentElement}for(var r=[],l=0;l2147483647?2147483647:p}function X(t){void 0===t&&(t=["*"]);for(var e=[],i=0;i2147483647?2147483647:l}function D(t){Ne=t.resizeBegin,Te=t.resizing,Pe=t.resizeComplete,Qt=q(t.element),ne=q(t.boundary);for(var i=t.direction.split(" "),o=0;o=0&&i[o])j(i[o]);else if(""!==i[o].trim()){var n=e.createElement("div",{className:"e-icons "+fe+" e-"+i[o]});Qt.appendChild(n)}te=t.minHeight,ie=t.minWidth,oe=t.maxWidth,ee=t.maxHeight,t.proxy&&t.proxy.element&&t.proxy.element.classList.contains("e-dialog")?F(t.proxy):F()}function j(t){Z();var i=e.createElement("span",{attrs:{unselectable:"on",contenteditable:"false"}});i.setAttribute("class","e-dialog-border-resize e-"+t),"south"===t&&(i.style.height="2px",i.style.width="100%",i.style.bottom="0px",i.style.left="0px"),"north"===t&&(i.style.height="2px",i.style.width="100%",i.style.top="0px",i.style.left="0px"),"east"===t&&(i.style.height="100%",i.style.width="2px",i.style.right="0px",i.style.top="0px"),"west"===t&&(i.style.height="100%",i.style.width="2px",i.style.left="0px",i.style.top="0px"),Qt.appendChild(i)}function q(t){var i;return e.isNullOrUndefined(t)||(i="string"==typeof t?document.querySelector(t):t),i}function F(t){e.isNullOrUndefined(t)&&(t=this);for(var i=Qt.querySelectorAll("."+fe),o=0;o-1?"mouse":"touch"}function V(t){if(t.preventDefault(),Qt=t.target.parentElement,Z(),we=t.pageX,Se=t.pageY,t.target.classList.add(me),e.isNullOrUndefined(Ne)||(re=this,!0!==Ne(t,re))){var i=e.isNullOrUndefined(ne)?document:ne;e.EventHandler.add(i,"mousemove",K,this),e.EventHandler.add(document,"mouseup",W,this);for(var o=0;o=0||r.top<0)&&(n=!0):n=!0;var l=Ee+(s-Se);l=l>te?l:te;var a=0;e.isNullOrUndefined(ne)||(a=i.top);var h=e.isNullOrUndefined(ne)?0:ne.offsetHeight-ne.clientHeight,d=r.top-a-h/2;if(d=d<0?0:d,r.top>0&&d+l>ee){if(n=!1,Qt.classList.contains(ve))return;return void(Qt.style.height=ee-parseInt(d.toString(),10)+"px")}var p=0;if(n){r.top<0&&o+(r.height+r.top)>0&&l+(p=r.top)<=30&&(l=r.height-(r.height+r.top)+30),l+r.top>=ee&&(Qt.style.height=r.height+(o-(r.height+r.top))+"px");var c=e.isNullOrUndefined(ne)?p:d;l>=te&&l+c<=ee&&(Qt.style.height=l+"px")}}function $(t){var i,o=!1,n="mouse"===_(t.type)?t.pageY:t.touches[0].pageY,s=J(Qt);e.isNullOrUndefined(ne)||(i=J(ne)),!e.isNullOrUndefined(ne)&&s.top-i.top>0?o=!0:e.isNullOrUndefined(ne)&&n>0&&(o=!0);var r=Ee-(n-Se);if(o&&r>=te&&r<=ee){var l=0;e.isNullOrUndefined(ne)||(l=i.top);var a=Ce-l+(n-Se);a=a>0?a:1,Qt.style.height=r+"px",Qt.style.top=a+"px"}}function tt(t){var i,o=document.documentElement.clientWidth,n=!1;e.isNullOrUndefined(ne)||(i=J(ne));var s="mouse"===_(t.type)?t.pageX:t.touches[0].pageX,r=J(Qt),l=e.isNullOrUndefined(ne)?0:ne.offsetWidth-ne.clientWidth,a=e.isNullOrUndefined(ne)?0:i.left,h=e.isNullOrUndefined(ne)?0:i.width;e.isNullOrUndefined(se)&&(e.isNullOrUndefined(ne)?se=o:(se=r.left-a-l/2+r.width,se+=h-l-se)),!e.isNullOrUndefined(ne)&&Math.floor(r.left-i.left+r.width+(i.right-r.right))-l<=oe?n=!0:e.isNullOrUndefined(ne)&&s>=0&&(n=!0);var d=be-(s-we);if(xe&&(d=d>se?se:d),n&&d>=ie&&d<=oe){var p=0;e.isNullOrUndefined(ne)||(p=i.left);var c=Oe-p+(s-we);c=c>0?c:1,d!==He&&Ue&&(Qt.style.width=d+"px"),xe&&(Qt.style.left=c+"px",Ue=1!==c)}He=d}function et(t){var i,o=document.documentElement.clientWidth,n=!1;e.isNullOrUndefined(ne)||(i=J(ne));var s=(t.touches?t.changedTouches[0]:t).pageX,r=J(Qt);!e.isNullOrUndefined(ne)&&(r.left-i.left+r.widthr.width)?n=!0:e.isNullOrUndefined(ne)&&o-s>0&&(n=!0);var l=be+(s-we),a=0;if(e.isNullOrUndefined(ne)||(a=i.left),r.left-a+l>oe){if(n=!1,Qt.classList.contains(ve))return;Qt.style.width=oe-(r.left-a)+"px"}n&&l>=ie&&l<=oe&&(Qt.style.width=l+"px")}function it(t){te=t}function ot(t){oe=t}function nt(t){ee=t}function st(){for(var t=Qt.querySelectorAll("."+fe),i=0;i=360?0:o,o+=45}}function bt(t,e){function i(t){o.push(t),t===s&&1!==l||(t<=n&&t>1&&!r?t=parseFloat((t-.2).toFixed(2)):1===t?(t=7,t=parseFloat((t+.2).toFixed(2)),r=!0):t<8&&r?8===(t=parseFloat((t+.2).toFixed(2)))&&(r=!1):t<=8&&!r&&(t=parseFloat((t-.2).toFixed(2))),++l,i(t))}var o=[],n=t,s=e,r=!1,l=1;return i(n),o}function Et(t){for(var e=t.querySelector("svg.e-spin-bootstrap").getAttribute("id"),i=1;i<=8;i++)!function(t,e,i,o,n){function s(e){Ze[n].isAnimate&&(++r,t.setAttribute("r",e+""),r>=o.length&&(r=0),Ze[n].timeOut=setTimeout(s.bind(null,o[r]),18))}var r=0;s(e)}(t.getElementsByClassName("e-path-circle_"+(8===i?0:i))[0],i,0,bt(i,i),e)}function Ot(t,i,o){e.isNullOrUndefined(o)||t.classList.add(o),t.querySelector(".e-spinner-inner").innerHTML=i}function Ct(t,e){var i;switch(e){case"Material":i=Ge;break;case"Fabric":i=Ke;break;case"Bootstrap4":i=Qe;break;default:i=Je}return t=t?parseFloat(t+""):i,"Bootstrap"===e?t:t/2}function wt(t,e,i,o){return{radius:e,count:i,previousId:o}}function St(){for(var t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}function Nt(t,e,i,o){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("id",e),n.setAttribute("class",i);var s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("class",ai);var r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("class",hi),t.insertBefore(n,t.firstChild),n.appendChild(s),n.appendChild(r)}function Tt(t,e,i,o){var n=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("class",o),n.setAttribute("id",e),s.setAttribute("class",ai),t.insertBefore(n,t.firstChild),n.appendChild(s)}function Pt(t,e){var i=e("div",{}),o=e("div",{});return i.classList.add(ri),o.classList.add(li),t.appendChild(i),i.appendChild(o),{wrap:i,inner_wrap:o}}function xt(t){Ht(1,149,Lt,1333,t.globalInfo[t.uniqueID].count,75,t),t.globalInfo[t.uniqueID].count=++t.globalInfo[t.uniqueID].count%4}function Ht(t,i,o,n,s,r,l){function a(e){var i=Math.max(0,Math.min((new Date).getTime()-p,n));h(o(i,t,c,n),e.container),d===e.globalInfo[e.uniqueID].previousId&&i=0){var l=s.getAttribute("id");clearTimeout(Ze[l].timeOut)}mt(i,t,r,n)}var Vt,Wt,Zt,Gt,Kt,Jt,Qt,$t,te,ee,ie,oe,ne,se,re,le=!1,ae=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),he=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},de=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ae(i,t),he([e.Property("left")],i.prototype,"X",void 0),he([e.Property("top")],i.prototype,"Y",void 0),i}(e.ChildProperty),pe={ROOT:"e-popup",RTL:"e-rtl",OPEN:"e-popup-open",CLOSE:"e-popup-close"},ce=function(t){function i(e,i){return t.call(this,i,e)||this}return ae(i,t),i.prototype.onPropertyChanged=function(t,i){for(var o=0,n=Object.keys(t);o0&&h.left>0&&h.right>0&&h.bottom>0}var d=i.getBoundingClientRect();return!(o.bottomd.bottom||o.right>d.right||o.lefto.top?this.element.style.top="0px":n.bottomo.left&&(this.element.style.left=parseInt(this.element.style.left,10)+(n.left-o.left)+"px"))}},i.prototype.checkCollision=function(){var t=this.collision.X,e=this.collision.Y;"none"===t&&"none"===e||("flip"===t&&"flip"===e?this.callFlip({X:!0,Y:!0}):"fit"===t&&"fit"===e?this.callFit({X:!0,Y:!0}):("flip"===t?this.callFlip({X:!0,Y:!1}):"flip"===e&&this.callFlip({Y:!0,X:!1}),"fit"===t?this.callFit({X:!0,Y:!1}):"fit"===e&&this.callFit({X:!1,Y:!0})))},i.prototype.show=function(t,i){var o=this;if(this.wireEvents(),1e3===this.zIndex||!e.isNullOrUndefined(i)){var n=e.isNullOrUndefined(i)?this.element:i;this.zIndex=Y(n),e.setStyleAttribute(this.element,{zIndex:this.zIndex})}t=e.isNullOrUndefined(t)||"object"!=typeof t?this.showAnimation:t,"none"===this.collision.X&&"none"===this.collision.Y||(e.removeClass([this.element],pe.CLOSE),e.addClass([this.element],pe.OPEN),this.checkCollision(),e.removeClass([this.element],pe.OPEN),e.addClass([this.element],pe.CLOSE)),e.isNullOrUndefined(t)?(e.removeClass([this.element],pe.CLOSE),e.addClass([this.element],pe.OPEN),this.trigger("open")):(t.begin=function(){o.isDestroyed||(e.removeClass([o.element],pe.CLOSE),e.addClass([o.element],pe.OPEN))},t.end=function(){o.isDestroyed||o.trigger("open")},new e.Animation(t).animate(this.element))},i.prototype.hide=function(t){var i=this;t=e.isNullOrUndefined(t)||"object"!=typeof t?this.hideAnimation:t,e.isNullOrUndefined(t)?(e.removeClass([this.element],pe.OPEN),e.addClass([this.element],pe.CLOSE),this.trigger("close")):(t.end=function(){i.isDestroyed||(e.removeClass([i.element],pe.OPEN),e.addClass([i.element],pe.CLOSE),i.trigger("close"))},new e.Animation(t).animate(this.element)),this.unwireEvents()},i.prototype.getScrollableParent=function(t){return this.checkFixedParent(t),I(t,this.fixedParent)},i.prototype.checkFixedParent=function(t){for(var i=t.parentElement;i&&"HTML"!==i.tagName;){var o=getComputedStyle(i);"fixed"===o.position&&this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&(this.element.style.position="fixed",this.fixedParent=!0),i=i.parentElement,e.isNullOrUndefined(this.element.offsetParent)&&"fixed"===o.position&&"fixed"===this.element.style.position&&(this.fixedParent=!0)}},he([e.Property("auto")],i.prototype,"height",void 0),he([e.Property("auto")],i.prototype,"width",void 0),he([e.Property(null)],i.prototype,"content",void 0),he([e.Property("container")],i.prototype,"targetType",void 0),he([e.Property(null)],i.prototype,"viewPortElement",void 0),he([e.Property({X:"none",Y:"none"})],i.prototype,"collision",void 0),he([e.Property("")],i.prototype,"relateTo",void 0),he([e.Complex({},de)],i.prototype,"position",void 0),he([e.Property(0)],i.prototype,"offsetX",void 0),he([e.Property(0)],i.prototype,"offsetY",void 0),he([e.Property(1e3)],i.prototype,"zIndex",void 0),he([e.Property(!1)],i.prototype,"enableRtl",void 0),he([e.Property("reposition")],i.prototype,"actionOnScroll",void 0),he([e.Property(null)],i.prototype,"showAnimation",void 0),he([e.Property(null)],i.prototype,"hideAnimation",void 0),he([e.Event()],i.prototype,"open",void 0),he([e.Event()],i.prototype,"close",void 0),he([e.Event()],i.prototype,"targetExitViewport",void 0),i=he([e.NotifyPropertyChanges],i)}(e.Component),ue=["north-west","north","north-east","west","east","south-west","south","south-east"],fe="e-resize-handle",me="e-focused-handle",ge=["e-restrict-left"],ve="e-resize-viewport",ye=["north","west","east","south"],be=0,Ee=0,Oe=0,Ce=0,we=0,Se=0,Ne=null,Te=null,Pe=null,xe=!0,He=0,Ue=!0,Be=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Re=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},ze=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Be(i,t),Re([e.Property(!0)],i.prototype,"isFlat",void 0),Re([e.Property()],i.prototype,"buttonModel",void 0),Re([e.Property("Button")],i.prototype,"type",void 0),Re([e.Event()],i.prototype,"click",void 0),i}(e.ChildProperty),ke=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Be(i,t),Re([e.Property("Fade")],i.prototype,"effect",void 0),Re([e.Property(400)],i.prototype,"duration",void 0),Re([e.Property(0)],i.prototype,"delay",void 0),i}(e.ChildProperty),Le="e-dialog",Me="e-dlg-target",Ae="e-scroll-disabled",Ie="e-dlg-fullscreen",Ye="Information",Xe="e-scroll-disabled",De="e-alert-dialog",je="e-confirm-dialog",qe=function(t){function o(e,i){return t.call(this,e,i)||this}return Be(o,t),o.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents(),"100%"===this.width&&(this.element.style.width=""),""!==this.minHeight&&(this.element.style.minHeight=this.minHeight.toString()),this.enableResize&&(this.setResize(),"None"===this.animationSettings.effect&&this.getMinHeight()),this.renderComplete()},o.prototype.preRender=function(){var t=this;this.headerContent=null,this.allowMaxHeight=!0,this.preventVisibility=!0,this.clonedEle=this.element.cloneNode(!0),this.closeIconClickEventHandler=function(e){t.hide(e)},this.dlgOverlayClickEventHandler=function(e){e.preventFocus=!1,t.trigger("overlayClick",e,function(e){e.preventFocus||t.focusContent()})};var i={close:"Close"};if(this.l10n=new e.L10n("dialog",i,this.locale),this.checkPositionData(),e.isNullOrUndefined(this.target)){var o=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.target=document.body,this.isProtectedOnChange=o}},o.prototype.isNumberValue=function(t){return/^[-+]?\d*\.?\d+$/.test(t)},o.prototype.checkPositionData=function(){if(!e.isNullOrUndefined(this.position)){if(!e.isNullOrUndefined(this.position.X)&&"number"!=typeof this.position.X&&(t=this.isNumberValue(this.position.X))){i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.X=parseFloat(this.position.X),this.isProtectedOnChange=i}if(!e.isNullOrUndefined(this.position.Y)&&"number"!=typeof this.position.Y){var t=this.isNumberValue(this.position.Y);if(t){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.Y=parseFloat(this.position.Y),this.isProtectedOnChange=i}}}},o.prototype.getEle=function(t,e){for(var i=void 0,o=0;o-1,r=!1;if(s||(r=n.hasAttribute("contenteditable")&&"true"===n.getAttribute("contenteditable")),27===t.keyCode&&this.closeOnEscape&&this.hide(t),13===t.keyCode&&!t.ctrlKey&&"textarea"!==n.tagName.toLowerCase()&&s&&!e.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&t.ctrlKey&&("textarea"===n.tagName.toLowerCase()||r)&&!e.isNullOrUndefined(this.primaryButtonEle)){var l;this.buttons.some(function(t,i){l=i;var o=t.buttonModel;return!e.isNullOrUndefined(o)&&!0===o.isPrimary})&&"function"==typeof this.buttons[l].click&&setTimeout(function(){i.buttons[l].click.call(i,t)})}},o.prototype.initialize=function(){e.isNullOrUndefined(this.target)||(this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target),this.isBlazorServerRender()||e.addClass([this.element],Le),e.Browser.isDevice&&e.addClass([this.element],"e-device"),this.isBlazorServerRender()||this.setCSSClass(),this.setMaxHeight()},o.prototype.initRender=function(){var t=this;if(this.initialRender=!0,this.isBlazorServerRender()||e.attributes(this.element,{role:"dialog"}),1e3===this.zIndex?(this.setzIndex(this.element,!1),this.calculatezIndex=!0):this.calculatezIndex=!1,this.isBlazorServerRender()&&e.isNullOrUndefined(this.headerContent)&&(this.headerContent=this.element.getElementsByClassName("e-dlg-header-content")[0]),this.isBlazorServerRender()&&e.isNullOrUndefined(this.contentEle)&&(this.contentEle=this.element.querySelector("#"+this.element.id+"_dialog-content")),this.isBlazorServerRender()||(this.setTargetContent(),""===this.header||e.isNullOrUndefined(this.header)||this.setHeader(),this.showCloseIcon&&this.renderCloseIcon(),this.setContent(),""===this.footerTemplate||e.isNullOrUndefined(this.footerTemplate)?e.isNullOrUndefined(this.buttons[0].buttonModel)||this.setButton():this.setFooterTemplate()),this.isBlazorServerRender()&&(e.isNullOrUndefined(this.buttons[0].buttonModel)||""!==this.footerTemplate||this.setButton()),this.allowDragging&&!e.isNullOrUndefined(this.headerContent)&&this.setAllowDragging(),this.isBlazorServerRender()||(e.attributes(this.element,{"aria-modal":this.isModal?"true":"false"}),this.isModal&&this.setIsModal()),this.isBlazorServerRender()&&e.isNullOrUndefined(this.dlgContainer)){this.dlgContainer=this.element.parentElement;for(var i=0,o=this.dlgContainer.children;i0&&e.EventHandler.add(n[s],"click",this.buttons[s].click,this),this.isBlazorServerRender()||e.isNullOrUndefined(this.ftrTemplateContent)||(this.btnObj[s].appendTo(this.ftrTemplateContent.children[s]),this.buttons[s].isFlat&&this.btnObj[s].element.classList.add("e-flat"),this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0])},o.prototype.setContent=function(){e.attributes(this.element,{"aria-describedby":this.element.id+"_dialog-content"}),this.contentEle=this.createElement("div",{className:"e-dlg-content",id:this.element.id+"_dialog-content"}),this.innerContentElement?this.contentEle.appendChild(this.innerContentElement):(e.isNullOrUndefined(this.content)||""===this.content)&&this.initialRender||("string"!=typeof this.content||e.isBlazor()?this.content instanceof HTMLElement?this.contentEle.appendChild(this.content):this.setTemplate(this.content,this.contentEle,"content"):this.contentEle.innerHTML=this.sanitizeHelper(this.content)),e.isNullOrUndefined(this.headerContent)?this.element.insertBefore(this.contentEle,this.element.children[0]):this.element.insertBefore(this.contentEle,this.element.children[1]),"auto"===this.height&&(this.isBlazorServerRender()||!e.Browser.isIE||""!==this.element.style.width||e.isNullOrUndefined(this.width)||(this.element.style.width=e.formatUnit(this.width)),this.setMaxHeight())},o.prototype.setTemplate=function(t,i,o){var n,s;s=i.classList.contains("e-dlg-header")?this.element.id+"header":i.classList.contains("e-footer-content")?this.element.id+"footerTemplate":this.element.id+"content";var r;e.isNullOrUndefined(t.outerHTML)?"string"!=typeof t||e.isBlazor()&&!this.isStringTemplate?(n=e.compile(t),r=t):i.innerHTML=this.sanitizeHelper(t):i.appendChild(t);var l=[];if(!e.isNullOrUndefined(n)){for(var a=0,h=n({},this,o,s,!(e.isBlazor()&&!this.isStringTemplate&&0===r.indexOf("
Blazor"))||this.isStringTemplate);a/g,"");(this.element.children.length>0||i)&&(this.innerContentElement=document.createDocumentFragment(),[].slice.call(this.element.childNodes).forEach(function(e){8!==e.nodeType&&t.innerContentElement.appendChild(e)}))}},o.prototype.setHeader=function(){this.headerEle?this.headerEle.innerHTML="":this.headerEle=this.createElement("div",{id:this.element.id+"_title",className:"e-dlg-header"}),this.createHeaderContent(),this.headerContent.appendChild(this.headerEle),this.setTemplate(this.header,this.headerEle,"header"),e.attributes(this.element,{"aria-labelledby":this.element.id+"_title"}),this.element.insertBefore(this.headerContent,this.element.children[0])},o.prototype.setFooterTemplate=function(){this.ftrTemplateContent?this.ftrTemplateContent.innerHTML="":this.ftrTemplateContent=this.createElement("div",{className:"e-footer-content"}),""===this.footerTemplate||e.isNullOrUndefined(this.footerTemplate)?this.ftrTemplateContent.innerHTML=this.buttonContent.join(""):this.setTemplate(this.footerTemplate,this.ftrTemplateContent,"footerTemplate"),this.element.appendChild(this.ftrTemplateContent)},o.prototype.createHeaderContent=function(){e.isNullOrUndefined(this.headerContent)&&(this.headerContent=this.createElement("div",{id:this.element.id+"_dialog-header",className:"e-dlg-header-content"}))},o.prototype.renderCloseIcon=function(){this.closeIcon=this.createElement("button",{className:"e-dlg-closeicon-btn",attrs:{type:"button"}}),this.closeIconBtnObj=new i.Button({cssClass:"e-flat",iconCss:"e-icon-dlg-close e-icons"}),this.closeIconTitle(),e.isNullOrUndefined(this.headerContent)?(this.createHeaderContent(),e.prepend([this.closeIcon],this.headerContent),this.element.insertBefore(this.headerContent,this.element.children[0])):e.prepend([this.closeIcon],this.headerContent),this.closeIconBtnObj.appendTo(this.closeIcon)},o.prototype.closeIconTitle=function(){this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("close");this.closeIcon.setAttribute("title",t),this.closeIcon.setAttribute("aria-label",t)},o.prototype.setCSSClass=function(t){this.cssClass&&e.addClass([this.element],this.cssClass.split(" ")),t&&e.removeClass([this.element],t.split(" "))},o.prototype.setIsModal=function(){this.dlgContainer=this.createElement("div",{className:"e-dlg-container"}),this.element.classList.remove("e-popup-open"),this.element.parentNode.insertBefore(this.dlgContainer,this.element),this.dlgContainer.appendChild(this.element),e.addClass([this.element],"e-dlg-modal"),this.dlgOverlay=this.createElement("div",{className:"e-dlg-overlay"}),this.dlgOverlay.style.zIndex=(this.zIndex-1).toString(),this.dlgContainer.appendChild(this.dlgOverlay)},o.prototype.getValidFocusNode=function(t){for(var e,i=0;i0||"a"===e.tagName.toLowerCase()&&e.hasAttribute("href"))&&e.tabIndex>-1&&!e.disabled&&!this.disableElement(e,'[disabled],[aria-disabled="true"],[type="hidden"]'))return e;e=null}return e},o.prototype.focusableElements=function(t){if(!e.isNullOrUndefined(t)){var i=t.querySelectorAll('input,select,textarea,button,a,[contenteditable="true"],[tabindex]');return this.getValidFocusNode(i)}return null},o.prototype.getAutoFocusNode=function(t){var i=t.querySelector(".e-dlg-closeicon-btn"),o=t.querySelectorAll("[autofocus]"),n=this.getValidFocusNode(o);if(e.isBlazor()&&(this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]),e.isNullOrUndefined(n)){if(n=this.focusableElements(this.contentEle),!e.isNullOrUndefined(n))return i=n;if(!e.isNullOrUndefined(this.primaryButtonEle))return this.element.querySelector(".e-primary")}else i=n;return i},o.prototype.disableElement=function(t,e){var i=t?t.matches||t.webkitMatchesSelector||t.msGetRegionContent:null;if(i)for(;t;t=t.parentNode)if(t instanceof Element&&i.call(t,e))return t;return null},o.prototype.focusContent=function(){var t=this.getAutoFocusNode(this.element),i=e.isNullOrUndefined(t)?this.element:t,o=e.Browser.userAgent;(o.indexOf("MSIE ")>0||o.indexOf("Trident/")>0)&&this.element.focus(),i.focus(),this.bindEvent(this.element)},o.prototype.bindEvent=function(t){e.EventHandler.add(t,"keydown",this.keyDown,this)},o.prototype.unBindEvent=function(t){e.EventHandler.remove(t,"keydown",this.keyDown)},o.prototype.updateSanitizeContent=function(){this.isBlazorServerRender()||(this.contentEle.innerHTML=this.sanitizeHelper(this.content))},o.prototype.isBlazorServerRender=function(){return e.isBlazor()&&this.isServerRendered},o.prototype.getModuleName=function(){return"dialog"},o.prototype.onPropertyChanged=function(t,i){if(this.element.classList.contains(Le))for(var o=0,n=Object.keys(t);o0?this.showCloseIcon||""!==this.header&&!e.isNullOrUndefined(this.header)?this.showCloseIcon?this.isBlazorServerRender()&&this.wireEvents():e.detach(this.closeIcon):(e.detach(this.headerContent),this.headerContent=null):(this.isBlazorServerRender()||this.renderCloseIcon(),this.wireEvents());break;case"locale":this.showCloseIcon&&this.closeIconTitle();break;case"visible":this.visible?this.show():this.hide();break;case"isModal":this.updateIsModal();break;case"height":e.setStyleAttribute(this.element,{height:e.formatUnit(t.height)});break;case"width":e.setStyleAttribute(this.element,{width:e.formatUnit(t.width)});break;case"zIndex":this.popupObj.zIndex=this.zIndex,this.isModal&&this.setOverlayZindex(this.zIndex),this.element.style.zIndex!==this.zIndex.toString()&&(this.calculatezIndex=!1);break;case"cssClass":this.setCSSClass(i.cssClass);break;case"buttons":var s=this.buttons.length;e.isNullOrUndefined(this.ftrTemplateContent)||this.isBlazorServerRender()||(e.detach(this.ftrTemplateContent),this.ftrTemplateContent=null);for(var r=0;r0&&!e.isNullOrUndefined(this.buttons[0].buttonModel)&&""===this.footerTemplate)for(var t=0;t=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Ve=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Fe(i,t),_e([e.Property({effect:"FadeIn",duration:150,delay:0})],i.prototype,"open",void 0),_e([e.Property({effect:"FadeOut",duration:150,delay:0})],i.prototype,"close",void 0),i}(e.ChildProperty),We=function(t){function i(e,i){var o=t.call(this,e,i)||this;return o.isBlazorTooltip=!1,o.contentTargetValue=null,o.contentEvent=null,o.contentAnimation=null,o}return Fe(i,t),i.prototype.initialize=function(){this.formatPosition(),this.isServerRender()||e.addClass([this.element],"e-tooltip")},i.prototype.isServerRender=function(){return e.isBlazor()&&this.isServerRendered},i.prototype.formatPosition=function(){var t,e;0===this.position.indexOf("Top")||0===this.position.indexOf("Bottom")?(t=this.position.split(/(?=[A-Z])/),this.tooltipPositionY=t[0],this.tooltipPositionX=t[1]):(e=this.position.split(/(?=[A-Z])/),this.tooltipPositionX=e[0],this.tooltipPositionY=e[1])},i.prototype.renderArrow=function(){if(this.setTipClass(this.position),this.isServerRender()){var t=this.tooltipEle.querySelector(".e-arrow-tip");e.addClass([t.querySelector(".e-arrow-tip-outer")],this.tipClass),e.addClass([t.querySelector(".e-arrow-tip-inner")],this.tipClass),this.tooltipEle.appendChild(t)}else(t=this.createElement("div",{className:"e-arrow-tip "+this.tipClass})).appendChild(this.createElement("div",{className:"e-arrow-tip-outer "+this.tipClass})),t.appendChild(this.createElement("div",{className:"e-arrow-tip-inner "+this.tipClass})),this.tooltipEle.appendChild(t)},i.prototype.setTipClass=function(t){0===t.indexOf("Right")?this.tipClass="e-tip-left":0===t.indexOf("Bottom")?this.tipClass="e-tip-top":0===t.indexOf("Left")?this.tipClass="e-tip-right":this.tipClass="e-tip-bottom"},i.prototype.renderPopup=function(t){var e=this.mouseTrail?{top:0,left:0}:this.getTooltipPosition(t);this.tooltipEle.classList.remove("e-lib"),this.popupObj=new ce(this.tooltipEle,{height:this.height,width:this.width,position:{X:e.left,Y:e.top},enableRtl:this.enableRtl,open:this.openPopupHandler.bind(this),close:this.closePopupHandler.bind(this)})},i.prototype.getTooltipPosition=function(t){this.tooltipEle.style.display="block";var e=n(t,this.tooltipPositionX,this.tooltipPositionY),i=this.calculateTooltipOffset(this.position),o=this.collisionFlipFit(t,e.left+i.left,e.top+i.top);return this.tooltipEle.style.display="",o},i.prototype.reposition=function(t){var e=this.getTooltipPosition(t);this.popupObj.position={X:e.left,Y:e.top},this.popupObj.dataBind()},i.prototype.openPopupHandler=function(){!this.mouseTrail&&this.needTemplateReposition()&&this.reposition(this.findTarget()),this.trigger("afterOpen",this.tooltipEventArgs)},i.prototype.closePopupHandler=function(){e.resetBlazorTemplate(this.element.id+"content","Content"),this.clearTemplate(["content"]),this.clear(),this.trigger("afterClose",this.tooltipEventArgs)},i.prototype.calculateTooltipOffset=function(t){var e={top:0,left:0},i=this.tooltipEle.offsetWidth,o=this.tooltipEle.offsetHeight,n=this.tooltipEle.querySelector(".e-arrow-tip"),s=n?n.offsetWidth:0,r=n?n.offsetHeight:0,l=this.showTipPointer?0:8,a=r/2+2+(this.tooltipEle.offsetHeight-this.tooltipEle.clientHeight),h=s/2+2+(this.tooltipEle.offsetWidth-this.tooltipEle.clientWidth);switch(this.mouseTrail&&(l+=2),t){case"RightTop":e.left+=s+l,e.top-=o-a;break;case"RightCenter":e.left+=s+l,e.top-=o/2;break;case"RightBottom":e.left+=s+l,e.top-=a;break;case"BottomRight":e.top+=r+l,e.left-=h;break;case"BottomCenter":e.top+=r+l,e.left-=i/2;break;case"BottomLeft":e.top+=r+l,e.left-=i-h;break;case"LeftBottom":e.left-=s+i+l,e.top-=a;break;case"LeftCenter":e.left-=s+i+l,e.top-=o/2;break;case"LeftTop":e.left-=s+i+l,e.top-=o-a;break;case"TopLeft":e.top-=o+r+l,e.left-=i-h;break;case"TopRight":e.top-=o+r+l,e.left-=h;break;default:e.top-=o+r+l,e.left-=i/2}return e.left+=this.offsetX,e.top+=this.offsetY,e},i.prototype.updateTipPosition=function(t){var i=this.tooltipEle.querySelectorAll(".e-arrow-tip,.e-arrow-tip-outer,.e-arrow-tip-inner"),o=["e-tip-bottom","e-tip-top","e-tip-left","e-tip-right"];e.removeClass(i,o),this.setTipClass(t),e.addClass(i,this.tipClass)},i.prototype.adjustArrow=function(t,e,i,o){if(!1!==this.showTipPointer){this.updateTipPosition(e);var n,s;this.tooltipEle.style.display="block";var r=this.tooltipEle.clientWidth,l=this.tooltipEle.clientHeight,a=this.tooltipEle.querySelector(".e-arrow-tip"),h=this.tooltipEle.querySelector(".e-arrow-tip-inner"),d=a.offsetWidth,p=a.offsetHeight;if(this.tooltipEle.style.display="","e-tip-bottom"===this.tipClass||"e-tip-top"===this.tipClass)"e-tip-bottom"===this.tipClass?(s="99.9%",h.style.top="-"+(p-2)+"px"):(s=-(p-1)+"px",h.style.top="-"+(p-6)+"px"),t&&(n=(c="Center"!==i||r>t.offsetWidth||this.mouseTrail)&&"Left"===i||!c&&"End"===this.tipPointerPosition?r-d-2+"px":c&&"Right"===i||!c&&"Start"===this.tipPointerPosition?"2px":r/2-d/2+"px");else{"e-tip-right"===this.tipClass?(n="99.9%",h.style.left="-"+(d-2)+"px"):(n=-(d-1)+"px",h.style.left=d-2-d+"px");var c="Center"!==o||l>t.offsetHeight||this.mouseTrail;s=c&&"Top"===o||!c&&"End"===this.tipPointerPosition?l-p-2+"px":c&&"Bottom"===o||!c&&"Start"===this.tipPointerPosition?"2px":l/2-p/2+"px"}a.style.top=s,a.style.left=n}},i.prototype.renderContent=function(t){var i=this.tooltipEle.querySelector(".e-tip-content");if(this.cssClass&&e.addClass([this.tooltipEle],this.cssClass.split(" ")),t&&!e.isNullOrUndefined(t.getAttribute("title"))&&(t.setAttribute("data-content",t.getAttribute("title")),t.removeAttribute("title")),e.isNullOrUndefined(this.content))t&&!e.isNullOrUndefined(t.getAttribute("data-content"))&&(i.innerHTML=t.getAttribute("data-content"));else if(this.isBlazorTooltip||!this.isServerRender())if(i.innerHTML="",this.content instanceof HTMLElement)i.appendChild(this.content);else if("string"==typeof this.content&&this.content.indexOf("
Blazor")<0)this.enableHtmlSanitizer&&this.setProperties({content:e.SanitizeHtmlHelper.sanitize(this.content)},!0),i[this.enableHtmlParse?"innerHTML":"textContent"]=this.content;else{var o=e.compile(this.content)({},this,"content",this.element.id+"content",void 0,void 0,i);o&&e.append(o,i),this.renderReactTemplates(),"string"==typeof this.content&&this.content.indexOf("
Blazor")>=0&&(this.isBlazorTemplate=!0,e.updateBlazorTemplate(this.element.id+"content","Content",this))}},i.prototype.renderCloseIcon=function(){if(this.isSticky){var t=this.createElement("div",{className:"e-icons e-tooltip-close"});this.tooltipEle.appendChild(t),e.EventHandler.add(t,e.Browser.touchStartEvent,this.onStickyClose,this)}},i.prototype.addDescribedBy=function(t,i){var o=(t.getAttribute("aria-describedby")||"").split(/\s+/);o.indexOf(i)<0&&o.push(i),e.attributes(t,{"aria-describedby":o.join(" ").trim(),"data-tooltip-id":i})},i.prototype.removeDescribedBy=function(t){var e=t.getAttribute("data-tooltip-id"),i=(t.getAttribute("aria-describedby")||"").split(/\s+/),o=i.indexOf(e);-1!==o&&i.splice(o,1),t.removeAttribute("data-tooltip-id");var n=i.join(" ").trim();n?t.setAttribute("aria-describedby",n):t.removeAttribute("aria-describedby")},i.prototype.tapHoldHandler=function(t){clearTimeout(this.autoCloseTimer),this.targetHover(t.originalEvent)},i.prototype.touchEndHandler=function(t){var e=this;if(!this.isSticky){var i=function(){e.close()};this.autoCloseTimer=setTimeout(i,1500)}},i.prototype.targetClick=function(t){var i;i=this.target?e.closest(t.target,this.target):this.element,e.isNullOrUndefined(i)||(null===i.getAttribute("data-tooltip-id")?this.targetHover(t):this.isSticky||this.hideTooltip(this.animation.close,t,i))},i.prototype.targetHover=function(t){var i;if(i=this.target?e.closest(t.target,this.target):this.element,!(e.isNullOrUndefined(i)||null!==i.getAttribute("data-tooltip-id")&&0===this.closeDelay)){for(var o=0,n=[].slice.call(document.querySelectorAll("[data-tooltip-id= "+this.ctrlId+"_content]"));o0){var l=function(){s.mouseTrail&&e.EventHandler.add(i,"mousemove touchstart mouseenter",s.onMouseMove,s),s.popupObj&&s.popupObj.show(r,i)};this.showTimer=setTimeout(l,this.openDelay)}else this.popupObj&&this.popupObj.show(r,i)}n&&this.wireMouseEvents(n,i)},i.prototype.needTemplateReposition=function(){var t=this;return!e.isNullOrUndefined(t.viewContainerRef)&&"string"!=typeof t.viewContainerRef||this.isServerRender()&&this.isBlazorTemplate},i.prototype.checkCollision=function(t,e,i){var o={left:e,top:i,position:this.position,horizontal:this.tooltipPositionX,vertical:this.tooltipPositionY},n=v(this.tooltipEle,this.checkCollideTarget(),e,i);return n.length>0&&(o.horizontal=n.indexOf("left")>=0?"Right":n.indexOf("right")>=0?"Left":this.tooltipPositionX,o.vertical=n.indexOf("top")>=0?"Bottom":n.indexOf("bottom")>=0?"Top":this.tooltipPositionY),o},i.prototype.collisionFlipFit=function(t,e,i){var o=this.checkCollision(t,e,i),s=o.position;if(this.tooltipPositionY!==o.vertical&&(s=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?o.vertical+this.tooltipPositionX:this.tooltipPositionX+o.vertical),this.tooltipPositionX!==o.horizontal&&(0===s.indexOf("Left")&&(o.vertical="LeftTop"===s||"LeftCenter"===s?"Top":"Bottom",s=o.vertical+"Left"),0===s.indexOf("Right")&&(o.vertical="RightTop"===s||"RightCenter"===s?"Top":"Bottom",s=o.vertical+"Right"),o.horizontal=this.tooltipPositionX),this.tooltipEventArgs={type:null,cancel:!1,target:t,event:null,element:this.tooltipEle,collidedPosition:s},this.trigger("beforeCollision",this.tooltipEventArgs),o.position!==s){var r=n(t,o.horizontal,o.vertical);this.adjustArrow(t,s,o.horizontal,o.vertical);var l=this.calculateTooltipOffset(s);l.top-=-1!=="TopBottom".indexOf(this.position.split(/(?=[A-Z])/)[0])&&-1!=="TopBottom".indexOf(s.split(/(?=[A-Z])/)[0])?2*this.offsetY:0,l.left-=-1!=="RightLeft".indexOf(this.position.split(/(?=[A-Z])/)[0])&&-1!=="RightLeft".indexOf(s.split(/(?=[A-Z])/)[0])?2*this.offsetX:0,o.position=s,o.left=r.left+l.left,o.top=r.top+l.top}else this.adjustArrow(t,s,o.horizontal,o.vertical);var a={left:o.left,top:o.top},h=g(this.tooltipEle,this.checkCollideTarget(),{X:!0,Y:!1},a).left;if(this.tooltipEle.style.display="block",this.showTipPointer&&(0===s.indexOf("Bottom")||0===s.indexOf("Top"))){var d=this.tooltipEle.querySelector(".e-arrow-tip"),p=parseInt(d.style.left,10)-(h-o.left);p<0?p=0:p+d.offsetWidth>this.tooltipEle.clientWidth&&(p=this.tooltipEle.clientWidth-d.offsetWidth),d.style.left=p.toString()+"px"}return this.tooltipEle.style.display="",a.left=h,a},i.prototype.checkCollideTarget=function(){return!this.windowCollision&&this.target?this.element:null},i.prototype.hideTooltip=function(t,e,i){var o=this;if(this.closeDelay>0){clearTimeout(this.hideTimer),clearTimeout(this.showTimer);var n=function(){o.closeDelay&&o.tooltipEle&&o.isTooltipOpen||o.tooltipHide(t,e,i)};this.hideTimer=setTimeout(n,this.closeDelay)}else this.tooltipHide(t,e,i)},i.prototype.tooltipHide=function(t,i,o){var n,s=this;n=i?this.target?o||i.target:this.element:document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]"),this.tooltipEventArgs={type:i?i.type:null,cancel:!1,target:n,event:i||null,element:this.tooltipEle,isInteracted:!e.isNullOrUndefined(i)},this.trigger("beforeClose",this.tooltipEventArgs,function(e){e.cancel?s.isHidden=!1:s.isServerRender()?s.blazorHide(t,n):s.popupHide(t,n)})},i.prototype.blazorHide=function(t,e){var i=this,o=function(){i.popupHide(t,e)};this.popupObj?this.popupHide(t,e):setTimeout(o,200)},i.prototype.popupHide=function(t,e){e&&this.restoreElement(e),this.isHidden=!0;var i={name:t.effect,duration:t.duration,delay:t.delay,timingFunction:"easeIn"};"None"===t.effect&&(i=void 0),this.popupObj&&this.popupObj.hide(i)},i.prototype.restoreElement=function(t){this.unwireMouseEvents(t),e.isNullOrUndefined(t.getAttribute("data-content"))||(t.setAttribute("title",t.getAttribute("data-content")),t.removeAttribute("data-content")),this.removeDescribedBy(t)},i.prototype.clear=function(){if(this.tooltipEle&&(e.removeClass([this.tooltipEle],"e-popup-close"),e.addClass([this.tooltipEle],"e-popup-open")),this.isHidden){if(this.popupObj&&this.popupObj.destroy(),this.isServerRender()&&this.tooltipEle){this.tooltipEle.style.display="none";var t={enableTooltip:"false"};this.interopAdaptor.invokeMethodAsync("OnTooltipServerCall",t),e.remove(this.tooltipEle)}else this.tooltipEle&&e.remove(this.tooltipEle);this.tooltipEle=null,this.popupObj=null}},i.prototype.tooltipHover=function(t){this.tooltipEle&&(this.isTooltipOpen=!0)},i.prototype.tooltipMouseOut=function(t){this.isTooltipOpen=!1,this.hideTooltip(this.animation.close,t,this.findTarget())},i.prototype.onMouseOut=function(t){var i=t.relatedTarget;if(i&&!this.mouseTrail){var o=e.closest(i,".e-tooltip-wrap.e-lib.e-popup");o?e.EventHandler.add(o,"mouseleave",this.tooltipElementMouseOut,this):(this.hideTooltip(this.animation.close,t,this.findTarget()),0===this.closeDelay&&this.clear())}else this.hideTooltip(this.animation.close,t,this.findTarget()),this.clear()},i.prototype.tooltipElementMouseOut=function(t){this.hideTooltip(this.animation.close,t,this.findTarget()),e.EventHandler.remove(this.element,"mouseleave",this.tooltipElementMouseOut),this.clear()},i.prototype.onStickyClose=function(t){this.close()},i.prototype.onMouseMove=function(t){var i=0,o=0;t.type.indexOf("touch")>-1?(t.preventDefault(),i=t.touches[0].pageX,o=t.touches[0].pageY):(i=t.pageX,o=t.pageY),e.Animation.stop(this.tooltipEle),e.removeClass([this.tooltipEle],"e-popup-close"),e.addClass([this.tooltipEle],"e-popup-open"),this.adjustArrow(t.target,this.position,this.tooltipPositionX,this.tooltipPositionY);var n=this.calculateTooltipOffset(this.position),s=i+n.left+this.offsetX,r=o+n.top+this.offsetY,l=this.checkCollision(t.target,s,r);if(this.tooltipPositionX!==l.horizontal||this.tooltipPositionY!==l.vertical){var a=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?l.vertical+l.horizontal:l.horizontal+l.vertical;l.position=a,this.adjustArrow(t.target,l.position,l.horizontal,l.vertical);var h=this.calculateTooltipOffset(l.position);l.left=i+h.left-this.offsetX,l.top=o+h.top-this.offsetY}this.tooltipEle.style.left=l.left+"px",this.tooltipEle.style.top=l.top+"px"},i.prototype.keyDown=function(t){this.tooltipEle&&27===t.keyCode&&this.close()},i.prototype.touchEnd=function(t){this.tooltipEle&&null===e.closest(t.target,".e-tooltip")&&!this.isSticky&&this.close()},i.prototype.scrollHandler=function(t){this.tooltipEle&&(e.closest(t.target,".e-tooltip-wrap.e-lib.e-popup")||this.close())},i.prototype.render=function(){this.initialize(),this.wireEvents(this.opensOn),this.renderComplete()},i.prototype.preRender=function(){this.tipClass="e-tip-bottom",this.tooltipPositionX="Center",this.tooltipPositionY="Top",this.isHidden=!0},i.prototype.wireEvents=function(t){for(var i=0,o=this.getTriggerList(t);i