Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-popups

Package Overview
Dependencies
Maintainers
2
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-popups - npm Package Compare versions

Comparing version 1.0.14 to 1.0.16

4

dist/ej2-popups.umd.min.js
/*!
* filename: ej2-popups.umd.min.js
* version : 1.0.14
* version : 1.0.16
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.

@@ -11,2 +11,2 @@ * Use of this code is subject to the terms of our license.

!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base","@syncfusion/ej2-buttons"],e);else{var o="object"==typeof exports?e(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons")):e(t["@syncfusion/ej2-base"],t["@syncfusion/ej2-buttons"]);for(var i in o)("object"==typeof exports?exports:t)[i]=o[i]}}(this,function(t,e){return function(t){function e(i){if(o[i])return o[i].exports;var n=o[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){var i,n;i=[o,e,o(1),o(6),o(7),o(10)],void 0!==(n=function(t,e,o,i,n,s){"use strict";function r(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}Object.defineProperty(e,"__esModule",{value:!0}),r(o),r(i),r(n),r(s)}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n;i=[o,e,o(2)],void 0!==(n=function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}(o)}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n,s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),r=this&&this.__decorate||function(t,e,o,i){var n,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,o,r):n(e,o))||r);return s>3&&r&&Object.defineProperty(e,o,r),r};i=[o,e,o(4),o(4),o(4),o(3),o(4),o(4),o(4),o(5)],void 0!==(n=function(t,e,o,i,n,l,a,h,p,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var c={ROOT:"e-popup",RTL:"e-rtl",OPEN:"e-popup-open",CLOSE:"e-popup-close"},u=function(t){function e(e,o){return t.call(this,o,e)||this}return s(e,t),e.prototype.onPropertyChanged=function(t,e){for(var n=0,s=Object.keys(t);n<s.length;n++){switch(s[n]){case"width":o.setStyleAttribute(this.element,{width:i.formatUnit(t.width)});break;case"height":o.setStyleAttribute(this.element,{height:i.formatUnit(t.height)});break;case"zIndex":o.setStyleAttribute(this.element,{zIndex:t.zIndex});break;case"enableRtl":this.setEnableRtl();break;case"position":case"relateTo":this.refreshPosition();break;case"offsetX":var r=t.offsetX-e.offsetX;this.element.style.left=(parseInt(this.element.style.left,10)+r).toString()+"px";break;case"offsetY":var l=t.offsetY-e.offsetY;this.element.style.top=(parseInt(this.element.style.top,10)+l).toString()+"px";break;case"content":this.setContent()}}},e.prototype.getModuleName=function(){return"popup"},e.prototype.getPersistData=function(){return this.addOnPersist([])},e.prototype.destroy=function(){this.element.classList.remove(c.ROOT,c.RTL),this.unwireEvents(),t.prototype.destroy.call(this)},e.prototype.render=function(){this.element.classList.add(c.ROOT);var t={};1e3!==this.zIndex&&(t.zIndex=this.zIndex),"auto"!==this.width&&(t.width=i.formatUnit(this.width)),"auto"!==this.height&&(t.height=i.formatUnit(this.height)),o.setStyleAttribute(this.element,t),this.setEnableRtl(),this.setContent(),this.wireEvents()},e.prototype.wireEvents=function(){if(n.Browser.isDevice&&p.EventHandler.add(window,"orientationchange",this.orientationOnChange,this),this.getRelateToElement())for(var t=0,e=this.getScrollableParent(this.getRelateToElement());t<e.length;t++){var o=e[t];p.EventHandler.add(o,"scroll",this.scrollRefresh,this)}},e.prototype.unwireEvents=function(){if(n.Browser.isDevice&&p.EventHandler.remove(window,"orientationchange",this.orientationOnChange),this.getRelateToElement())for(var t=0,e=this.getScrollableParent(this.getRelateToElement());t<e.length;t++){var o=e[t];p.EventHandler.remove(o,"scroll",this.scrollRefresh)}},e.prototype.getRelateToElement=function(){return"string"==typeof this.relateTo?document.querySelector(this.relateTo):this.relateTo},e.prototype.scrollRefresh=function(t){if("reposition"===this.actionOnScroll?this.element.offsetParent===t.target||this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&null==t.target.parentElement||this.refreshPosition():"hide"===this.actionOnScroll&&this.hide(),this.getRelateToElement()){var e=this.isElementOnViewport(this.getRelateToElement());e||this.targetInvisibleStatus?e&&(this.targetInvisibleStatus=!1):(this.trigger("targetExitViewport"),this.targetInvisibleStatus=!0)}},e.prototype.isElementOnViewport=function(t){var e=t.getBoundingClientRect();if(!e.height||!e.width)return!1;var o=window,i={top:o.scrollY,left:o.scrollX,right:o.scrollX+o.outerWidth,bottom:o.scrollY+o.outerHeight},n=l.calculatePosition(t),s={top:n.top,left:n.left,right:n.left+e.width,bottom:n.top+e.height},r={top:i.bottom-s.top,left:i.right-s.left,bottom:s.bottom-i.top,right:s.right-i.left};return r.top>0&&r.left>0&&r.right>0&&r.bottom>0},e.prototype.preRender=function(){},e.prototype.setEnableRtl=function(){this.reposition(),this.enableRtl?this.element.classList.add(c.RTL):this.element.classList.remove(c.RTL)},e.prototype.setContent=function(){i.isNullOrUndefined(this.content)||(this.element.innerHTML="","string"==typeof this.content?this.element.textContent=this.content:this.element.appendChild(this.content))},e.prototype.orientationOnChange=function(){var t=this;setTimeout(function(){t.refreshPosition()},200)},e.prototype.refreshPosition=function(){this.reposition(),this.checkCollision()},e.prototype.reposition=function(){var t,e=this.getRelateToElement();if("number"==typeof this.position.X&&"number"==typeof this.position.Y)t={left:this.position.X,top:this.position.Y};else if(e){var o=this.element.style.display;this.element.style.display="block",t=this.getAnchorPosition(e,this.element,this.position,this.offsetX,this.offsetY),this.element.style.display=o}else t={left:0,top:0};this.element.style.left=t.left+"px",this.element.style.top=t.top+"px"},e.prototype.getAnchorPosition=function(t,e,o,i,n){var s=e.getBoundingClientRect(),r=t.getBoundingClientRect(),a=t,h={left:0,top:0};switch(h=e.offsetParent&&"BODY"===e.offsetParent.tagName&&"BODY"===t.tagName?l.calculatePosition(t):l.calculateRelativeBasedPosition(a,e),o.X){default:case"left":break;case"center":"container"===this.targetType?h.left+=r.width/2-s.width/2:h.left+=r.width/2;break;case"right":"container"===this.targetType?h.left+=r.width-s.width:h.left+=r.width}switch(o.Y){default:case"top":break;case"center":"container"===this.targetType?h.top+=r.height/2-s.height/2:h.top+=r.height/2;break;case"bottom":"container"===this.targetType?h.top+=r.height-s.height:h.top+=r.height}return h.left+=i,h.top+=n,h},e.prototype.callFlip=function(t){var e=this.getRelateToElement();d.flip(this.element,e,this.offsetX,this.offsetY,this.position.X,this.position.Y,this.viewPortElement,t)},e.prototype.callFit=function(t){if(0!==d.isCollide(this.element,this.viewPortElement).length){var e=d.fit(this.element,this.viewPortElement,t);this.element.style.left=e.left+"px",this.element.style.top=e.top+"px"}},e.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}):("fit"===t?this.callFit({X:!0,Y:!1}):"fit"===e&&this.callFit({X:!1,Y:!0}),"flip"===t?this.callFlip({X:!0,Y:!1}):"flip"===e&&this.callFlip({Y:!0,X:!1})))},e.prototype.show=function(t){var e=this;t=i.isNullOrUndefined(t)||"object"!=typeof t?this.showAnimation:t,"none"===this.collision.X&&"none"===this.collision.Y||(o.removeClass([this.element],c.CLOSE),o.addClass([this.element],c.OPEN),this.checkCollision(),o.removeClass([this.element],c.OPEN),o.addClass([this.element],c.CLOSE)),i.isNullOrUndefined(t)?(o.removeClass([this.element],c.CLOSE),o.addClass([this.element],c.OPEN),this.trigger("open")):(t.begin=function(){e.isDestroyed||(o.removeClass([e.element],c.CLOSE),o.addClass([e.element],c.OPEN))},t.end=function(){e.isDestroyed||e.trigger("open")},new a.Animation(t).animate(this.element))},e.prototype.hide=function(t){var e=this;t=i.isNullOrUndefined(t)||"object"!=typeof t?this.hideAnimation:t,i.isNullOrUndefined(t)?(o.removeClass([this.element],c.OPEN),o.addClass([this.element],c.CLOSE),this.trigger("close")):(t.end=function(){e.isDestroyed||(o.removeClass([e.element],c.OPEN),o.addClass([e.element],c.CLOSE),e.trigger("close"))},new a.Animation(t).animate(this.element))},e.prototype.getScrollableParent=function(t){for(var e=[];t.parentElement&&"HTML"!==t.parentElement.tagName;)"visible"!==t.parentElement.style.overflow&&e.push(t.parentElement),t=t.parentElement;return e.push(window),e},e}(a.Component);r([a.Property("auto")],u.prototype,"height",void 0),r([a.Property("auto")],u.prototype,"width",void 0),r([a.Property(null)],u.prototype,"content",void 0),r([a.Property("container")],u.prototype,"targetType",void 0),r([a.Property(null)],u.prototype,"viewPortElement",void 0),r([a.Property({X:"none",Y:"none"})],u.prototype,"collision",void 0),r([a.Property(document.body)],u.prototype,"relateTo",void 0),r([a.Property({X:"left",Y:"top"})],u.prototype,"position",void 0),r([a.Property(0)],u.prototype,"offsetX",void 0),r([a.Property(0)],u.prototype,"offsetY",void 0),r([a.Property(1e3)],u.prototype,"zIndex",void 0),r([a.Property(!1)],u.prototype,"enableRtl",void 0),r([a.Property("reposition")],u.prototype,"actionOnScroll",void 0),r([a.Property(null)],u.prototype,"showAnimation",void 0),r([a.Property(null)],u.prototype,"hideAnimation",void 0),r([a.Event()],u.prototype,"open",void 0),r([a.Event()],u.prototype,"close",void 0),r([a.Event()],u.prototype,"targetExitViewport",void 0),u=r([h.NotifyPropertyChanges],u),e.Popup=u}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n;i=[o,e],void 0!==(n=function(t,e){"use strict";function o(t,e){var o={left:0,top:0};if(!t||!e)return o;for(;e.offsetParent&&t&&e.offsetParent!==t;)o.left+=t.offsetLeft,o.top+=t.offsetTop,t=t.offsetParent;return o}function i(t,e,o){if(!t)return{left:0,top:0};e||(e="left"),o||(o="top"),m=t.ownerDocument,v=t;var i={left:0,top:0};return r(e.toLowerCase(),o.toLowerCase(),i)}function n(t,e){e.left=t}function s(t,e){e.top=t}function r(t,e,o){switch(y=v.getBoundingClientRect(),e+t){case"topcenter":n(f(),o),s(d(),o);break;case"topright":n(u(),o),s(d(),o);break;case"centercenter":n(f(),o),s(p(),o);break;case"centerright":n(u(),o),s(p(),o);break;case"centerleft":n(c(),o),s(p(),o);break;case"bottomcenter":n(f(),o),s(h(),o);break;case"bottomright":n(u(),o),s(h(),o);break;case"bottomleft":n(c(),o),s(h(),o);break;default:case"topleft":n(c(),o),s(d(),o)}return o}function l(){return m.documentElement.scrollTop||m.body.scrollTop}function a(){return m.documentElement.scrollLeft||m.body.scrollLeft}function h(){return y.bottom+l()}function p(){return d()+y.height/2}function d(){return y.top+l()}function c(){return y.left+a()}function u(){return y.right+a()}function f(){return c()+y.width/2}Object.defineProperty(e,"__esModule",{value:!0});var y,v,m;e.calculateRelativeBasedPosition=o,e.calculatePosition=i}.apply(e,i))&&(t.exports=n)},function(e,o){e.exports=t},function(t,e,o){var i,n;i=[o,e,o(3)],void 0!==(n=function(t,e,o){"use strict";function i(t,e,i,n){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(x=e,T=t.ownerDocument,n||(n=o.calculatePosition(t,"left","top")),i.X){var r=x?u():P(),l=g(),a=b(),h=l-n.left,p=n.left+s.width-a;s.width>r?n.left=h>0&&p<=0?a-s.width:p>0&&h<=0?l:h>p?a-s.width:l:h>0?n.left+=h:p>0&&(n.left-=p)}if(i.Y){var d=x?f():w(),c=m(),y=E(),v=c-n.top,C=n.top+s.height-y;s.height>d?n.top=v>0&&C<=0?y-s.height:C>0&&v<=0?c:v>C?y-s.height:c:v>0?n.top+=v:C>0&&(n.top-=C)}return n}function n(t,e,i,n){void 0===e&&(e=null);var s=o.calculatePosition(t,"left","top");i&&(s.left=i),n&&(s.top=n);var r=[];x=e,T=t.ownerDocument;var l=t.getBoundingClientRect(),a=s.top,p=s.left,d=s.left+l.width,u=s.top+l.height,f=c(a,u),y=h(p,d);return f.topSide&&r.push("top"),y.rightSide&&r.push("right"),y.leftSide&&r.push("left"),f.bottomSide&&r.push("bottom"),r}function s(t,e,o,i,n,s,h,c){if(void 0===h&&(h=null),void 0===c&&(c={X:!0,Y:!0}),e&&t&&n&&s&&(c.X||c.Y)){var u={TL:null,TR:null,BL:null,BR:null},f={TL:null,TR:null,BL:null,BR:null},y=t.getBoundingClientRect(),v={posX:n,posY:s,offsetX:o,offsetY:i,position:{left:0,top:0}};x=h,T=e.ownerDocument,l(e,u,v),a(f,v,y),c.X&&p(e,f,u,v,y,!0),c.Y&&d(e,f,u,v,y,!0),r(t,v)}}function r(t,e){var i=0,n=0;if(null!=t.offsetParent&&("absolute"===getComputedStyle(t.offsetParent).position||"relative"===getComputedStyle(t.offsetParent).position)){var s=o.calculatePosition(t.offsetParent,"left","top");i=s.left,n=s.top}t.style.top=e.position.top+e.offsetY-n+"px",t.style.left=e.position.left+e.offsetX-i+"px"}function l(t,e,i){i.position=o.calculatePosition(t,i.posX,i.posY),e.TL=o.calculatePosition(t,"left","top"),e.TR=o.calculatePosition(t,"right","top"),e.BR=o.calculatePosition(t,"left","bottom"),e.BL=o.calculatePosition(t,"right","bottom")}function a(t,e,o){t.TL={top:e.position.top+e.offsetY,left:e.position.left+e.offsetX},t.TR={top:t.TL.top,left:t.TL.left+o.width},t.BL={top:t.TL.top+o.height,left:t.TL.left},t.BR={top:t.TL.top+o.height,left:t.TL.left+o.width}}function h(t,e){var o=!1,i=!1;return t-O()<g()&&(o=!0),e>b()&&(i=!0),{leftSide:o,rightSide:i}}function p(t,e,i,n,s,r){var l=h(e.TL.left,e.TR.left);i.TL.left-O()<=g()&&(l.leftSide=!1),i.TR.left>=b()&&(l.rightSide=!1),(l.leftSide&&!l.rightSide||!l.leftSide&&l.rightSide)&&("right"===n.posX?n.posX="left":n.posX="right",n.offsetX=n.offsetX+s.width,n.offsetX=-1*n.offsetX,n.position=o.calculatePosition(t,n.posX,n.posY),a(e,n,s),r&&p(t,e,i,n,s,!1))}function d(t,e,i,n,s,r){var l=c(e.TL.top,e.BL.top);i.TL.top-C()<=m()&&(l.topSide=!1),i.BL.top>=E()&&(l.bottomSide=!1),(l.topSide&&!l.bottomSide||!l.topSide&&l.bottomSide)&&("top"===n.posY?n.posY="bottom":n.posY="top",n.offsetY=n.offsetY+s.height,n.offsetY=-1*n.offsetY,n.position=o.calculatePosition(t,n.posX,n.posY),a(e,n,s),r&&d(t,e,i,n,s,!1))}function c(t,e){var o=!1,i=!1;return t-C()<m()&&(o=!0),e>E()&&(i=!0),{topSide:o,bottomSide:i}}function u(){return x.getBoundingClientRect().width}function f(){return x.getBoundingClientRect().height}function y(){return x.getBoundingClientRect().left}function v(){return x.getBoundingClientRect().top}function m(){return x?v():0}function g(){return x?y():0}function b(){return x?O()+y()+u():O()+P()}function E(){return x?C()+v()+f():C()+w()}function C(){return T.documentElement.scrollTop||T.body.scrollTop}function O(){return T.documentElement.scrollLeft||T.body.scrollLeft}function w(){return window.innerHeight}function P(){return window.innerWidth}Object.defineProperty(e,"__esModule",{value:!0});var T,x;e.fit=i,e.isCollide=n,e.flip=s}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n;i=[o,e,o(3),o(5)],void 0!==(n=function(t,e,o,i){"use strict";function n(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}Object.defineProperty(e,"__esModule",{value:!0}),n(o),n(i)}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n;i=[o,e,o(8)],void 0!==(n=function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}(o)}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n,s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),r=this&&this.__decorate||function(t,e,o,i){var n,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,o,r):n(e,o))||r);return s>3&&r&&Object.defineProperty(e,o,r),r};i=[o,e,o(4),o(4),o(4),o(4),o(4),o(4),o(2),o(9)],void 0!==(n=function(t,e,o,i,n,l,a,h,p,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(n.ChildProperty);r([o.Property()],c.prototype,"buttonModel",void 0),r([o.Property()],c.prototype,"click",void 0),e.ButtonProps=c;var u="e-dialog",f=function(t){function e(e,o){return t.call(this,e,o)||this}return s(e,t),e.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents()},e.prototype.preRender=function(){var t=this;this.closeIconClickEventHandler=function(e){t.hide(),t.closedFrom=e},this.dlgOverlayClickEventHandler=function(e){t.trigger("overlayClick",e)}},e.prototype.keyDown=function(t){var e=this;if(9===t.keyCode){t.preventDefault();var o=void 0;o=t.shiftKey?0===this.focusIndex||l.isNullOrUndefined(this.focusIndex)?this.focusElements.length-1:this.focusIndex-1:this.focusElements.length-1===this.focusIndex||l.isNullOrUndefined(this.focusIndex)?0:this.focusIndex+1;var i=this.focusElements[o];i.focus(),i instanceof HTMLInputElement&&i.select()}var n=document.activeElement,s=["input","textarea"].indexOf(n.tagName.toLowerCase())>-1,r=!1;if(s||(r=n.hasAttribute("contenteditable")&&"true"===n.getAttribute("contenteditable")),27===t.keyCode&&this.closeOnEscape&&(this.hide(),this.closedFrom=t),13===t.keyCode&&"button"===n.tagName.toLowerCase()&&n.classList.contains("e-primary")&&!l.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&!t.ctrlKey&&"textarea"!==n.tagName.toLowerCase()&&s&&!l.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&t.ctrlKey&&("textarea"===n.tagName.toLowerCase()||r)&&!l.isNullOrUndefined(this.primaryButtonEle)){var a;this.buttons.some(function(t,e){a=e;var o=t.buttonModel;return!l.isNullOrUndefined(o)&&!0===o.isPrimary})&&"function"==typeof this.buttons[a].click&&setTimeout(function(){e.buttons[a].click.call(e)})}},e.prototype.initialize=function(){l.isNullOrUndefined(this.target)||(this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target),i.addClass([this.element],u),o.Browser.isDevice&&i.addClass([this.element],"e-device"),this.setCSSClass(),this.element.style.maxHeight=l.isNullOrUndefined(this.target)?window.innerHeight-20+"px":this.targetEle.offsetHeight-20+"px"},e.prototype.initRender=function(){var t=this;i.attributes(this.element,{role:"dialog"}),l.isNullOrUndefined(this.zIndex)&&this.getZindexPartial(),""!==this.header&&this.setHeader(),this.showCloseIcon&&this.renderCloseIcon(),l.isNullOrUndefined(this.content)||""===this.content?this.element.hasChildNodes()&&(this.contentEle=this.element):this.setContent(),""!==this.footerTemplate&&this.setFooterTemplate(),l.isNullOrUndefined(this.buttons[0].buttonModel)||""!==this.footerTemplate||this.setButton(),!this.allowDragging||this.isModal||l.isNullOrUndefined(this.headerContent)||this.setAllowDragging(),i.attributes(this.element,{"aria-modal":this.isModal?"true":"false"}),this.isModal&&this.setIsModal(),l.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element)),this.popupObj=new p.Popup(this.element,{height:this.height,width:this.width,zIndex:this.zIndex,relateTo:this.target,open:function(){t.focusContent(),t.trigger("open")},close:function(e){t.isModal&&(t.dlgContainer.style.display="none"),!l.isNullOrUndefined(t.focusElements)&&t.focusElements.length>0?t.unBindEvent(l.isNullOrUndefined(t.focusIndex)?t.element:t.focusElements[t.focusIndex]):t.unBindEvent(t.element),t.trigger("close",t.closedFrom),t.closedFrom={},l.isNullOrUndefined(t.storeActiveElement)||t.storeActiveElement.focus()}}),this.positionChange(),this.setEnableRTL(),i.addClass([this.element],"e-popup-close"),this.visible?this.show():this.isModal&&(this.dlgOverlay.style.display="none")},e.prototype.positionChange=function(){this.isModal?this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y):this.popupObj.setProperties({position:{X:this.position.X,Y:this.position.Y}})},e.prototype.getZindexPartial=function(){for(var t=this.element.parentElement,e=[];t&&"BODY"!==t.tagName;){var o=document.defaultView.getComputedStyle(t,null).getPropertyValue("z-index"),i=document.defaultView.getComputedStyle(t,null).getPropertyValue("position");"auto"!==o&&"static"!==i&&e.push(o),t=t.parentElement}for(var n=[],s=0;s<document.body.children.length;s++)if(!this.element.isEqualNode(document.body.children[s])){var o=document.defaultView.getComputedStyle(document.body.children[s],null).getPropertyValue("z-index"),i=document.defaultView.getComputedStyle(document.body.children[s],null).getPropertyValue("position");"auto"!==o&&"static"!==i&&n.push(o)}n.push("999");var r=e.concat(n);this.zIndex=Math.max.apply(Math,r)+1},e.prototype.setAllowDragging=function(){var t=this;this.dragObj=new h.Draggable(this.element,{clone:!1,handle:".e-dlg-header-content",dragStart:function(e){t.trigger("dragStart",e)},dragStop:function(e){t.trigger("dragStop",e)},drag:function(e){t.trigger("drag",e)}}),l.isNullOrUndefined(this.targetEle)||(this.dragObj.dragArea=this.targetEle)},e.prototype.setButton=function(){this.buttonContent=[];for(var t=0;t<this.buttons.length;t++){var e=i.createElement("button");this.buttonContent.push(e.outerHTML)}this.setFooterTemplate();for(var t=0;t<this.buttons.length;t++)this.btnObj=new d.Button(this.buttons[t].buttonModel),"function"==typeof this.buttons[t].click&&a.EventHandler.add(this.ftrTemplateContent.children[t],"click",this.buttons[t].click,this),this.btnObj.appendTo(this.ftrTemplateContent.children[t]),this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]},e.prototype.setContent=function(){i.attributes(this.element,{"aria-describedby":this.element.id+"_dialog-content"}),this.contentEle=i.createElement("div",{className:"e-dlg-content",id:this.element.id+"_dialog-content"}),"string"==typeof this.content?this.contentEle.innerHTML=this.content:this.contentEle.appendChild(this.content),l.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.element.style.maxHeight=l.isNullOrUndefined(this.target)?window.innerHeight-20+"px":this.targetEle.offsetHeight-20+"px")},e.prototype.setEnableRTL=function(){this.enableRtl?i.addClass([this.element],"e-rtl"):i.removeClass([this.element],"e-rtl")},e.prototype.setHeader=function(){this.headerEle=i.createElement("div",{id:this.element.id+"_title",className:"e-dlg-header",innerHTML:this.header}),i.attributes(this.element,{"aria-labelledby":this.element.id+"_title"}),this.createHeaderContent(),this.headerContent.appendChild(this.headerEle),this.element.insertBefore(this.headerContent,this.element.children[0])},e.prototype.setFooterTemplate=function(){this.ftrTemplateContent=i.createElement("div",{className:"e-footer-content",innerHTML:""!==this.footerTemplate?this.footerTemplate:this.buttonContent.join("")}),this.element.appendChild(this.ftrTemplateContent)},e.prototype.createHeaderContent=function(){l.isNullOrUndefined(this.headerContent)&&(this.headerContent=i.createElement("div",{className:"e-dlg-header-content"}))},e.prototype.renderCloseIcon=function(){this.closeIcon=i.createElement("button",{className:"e-dlg-closeicon-btn"}),this.closeIconBtnObj=new d.Button({cssClass:"e-flat",iconCss:"e-icon-dlg-close e-icons"}),this.closeIconTitle(),l.isNullOrUndefined(this.headerContent)?(this.createHeaderContent(),i.prepend([this.closeIcon],this.headerContent),this.element.insertBefore(this.headerContent,this.element.children[0])):i.prepend([this.closeIcon],this.headerContent),this.closeIconBtnObj.appendTo(this.closeIcon)},e.prototype.closeIconTitle=function(){if(""!==this.locale){var t=new o.L10n("Dialog",{locale:"Close"});t.setLocale(this.locale);var e=t.getConstant("Close");this.closeIcon.setAttribute("title",e)}else this.closeIcon.setAttribute("title","Close")},e.prototype.setCSSClass=function(t){this.cssClass&&i.addClass([this.element],this.cssClass.split(" ")),t&&i.removeClass([this.element],t.split(" "))},e.prototype.setIsModal=function(){this.dlgContainer=i.createElement("div",{className:"e-dlg-container"}),this.element.parentNode.insertBefore(this.dlgContainer,this.element),this.dlgContainer.appendChild(this.element),i.addClass([this.element],"e-dlg-modal"),this.dlgOverlay=i.createElement("div",{className:"e-dlg-overlay"}),this.dlgOverlay.style.zIndex=(this.zIndex-1).toString(),this.dlgContainer.appendChild(this.dlgOverlay)},e.prototype.focusContentEle=function(t){var e,o=this,i=t.querySelectorAll('input,select,textarea,button,a,[contenteditable="true"]');this.focusElements=[],this.focusIndex=0;for(var n=0;n<i.length;n++)e=i[n],(e.clientHeight>0||"a"===e.tagName.toLowerCase()&&e.hasAttribute("href"))&&e.tabIndex>-1&&!e.disabled&&!this.disableElement(e,'[disabled],[aria-disabled="true"],[type="hidden"]')&&this.focusElements.push(e);if(0<this.focusElements.length){var s=[].slice.call(this.focusElements),r=s.some(function(t,e){return t.hasAttribute("autofocus")?(o.focusIndex=e,r=!0):r=!1,r});if(!r){var a=this.showCloseIcon&&this.focusElements.length>1?1:0,h=!l.isNullOrUndefined(this.contentEle)&&this.focusElements[a];if(h)this.focusIndex=this.focusElements.indexOf(h);else if(!l.isNullOrUndefined(this.primaryButtonEle)){var p=this.element.querySelector(".e-primary");this.focusIndex=this.focusElements.indexOf(p)}}var d=this.focusElements[this.focusIndex];d.focus(),this.bindEvent(d),d instanceof HTMLInputElement&&d.select()}},e.prototype.disableElement=function(t,e){var o=t?t.matches||t.webkitMatchesSelector||t.msMatchesSelector:null;if(o)for(;t;t=t.parentNode)if(t instanceof Element&&o.call(t,e))return t;return null},e.prototype.focusContent=function(){this.focusContentEle(this.element),0===this.focusElements.length&&(this.element.focus(),this.bindEvent(this.element))},e.prototype.bindEvent=function(t){a.EventHandler.add(t,"keydown",this.keyDown,this),a.EventHandler.add(t,"blur",this.focusOut,this)},e.prototype.unBindEvent=function(t){a.EventHandler.remove(t,"keydown",this.keyDown),a.EventHandler.remove(t,"blur",this.focusOut)},e.prototype.focusOut=function(t){var e=this,o=l.isNullOrUndefined(this.focusIndex)?this.element:this.focusElements[this.focusIndex];setTimeout(function(){var t=["input","select","textarea","button","a"],i=document.activeElement,n=t.indexOf(i.tagName.toLowerCase())>-1||i.hasAttribute("contenteditable")&&"true"===i.getAttribute("contenteditable");e.dialogOpen&&e.element.contains(i)&&(e.focusIndex=n?e.focusElements.indexOf(i):null,e.unBindEvent(o),e.bindEvent(l.isNullOrUndefined(e.focusIndex)?e.element:i))})},e.prototype.getModuleName=function(){return"dialog"},e.prototype.onPropertyChanged=function(t,e){for(var o=0,n=Object.keys(t);o<n.length;o++){switch(n[o]){case"content":l.isNullOrUndefined(this.content)||""===this.content?l.isNullOrUndefined(this.contentEle)||this.element.removeChild(this.contentEle):l.isNullOrUndefined(this.contentEle)||"dialog"===this.contentEle.getAttribute("role")?this.setContent():(this.contentEle.innerHTML="","string"==typeof this.content?this.contentEle.innerHTML=this.content:this.contentEle.appendChild(this.content),this.element.style.maxHeight=l.isNullOrUndefined(this.target)?window.innerHeight-20+"px":this.targetEle.offsetHeight-20+"px");break;case"header":""===this.header?i.detach(this.headerEle):this.element.getElementsByClassName("e-dlg-header").length>0?this.element.getElementsByClassName("e-dlg-header")[0].innerHTML=this.header:this.setHeader();break;case"footerTemplate":this.element.getElementsByClassName("e-footer-content").length>0?this.ftrTemplateContent.innerHTML=this.footerTemplate:this.setFooterTemplate();break;case"showCloseIcon":this.element.getElementsByClassName("e-icon-dlg-close").length>0?this.showCloseIcon||""!==this.header?this.showCloseIcon||i.detach(this.closeIcon):i.detach(this.headerContent):(this.renderCloseIcon(),this.wireEvents());break;case"locale":this.showCloseIcon&&this.closeIconTitle();break;case"visible":this.visible?this.show():this.hide();break;case"isModal":if(this.element.setAttribute("aria-modal",this.isModal?"true":"false"),this.isModal)this.setIsModal(),this.wireEvents(),l.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element));else{for(i.removeClass([this.element],"e-dlg-modal"),i.removeClass([document.body],"e-scroll-disabled"),i.detach(this.dlgOverlay);this.dlgContainer.firstChild;)this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild,this.dlgContainer);this.dlgContainer.parentElement.removeChild(this.dlgContainer)}break;case"height":i.setStyleAttribute(this.element,{height:l.formatUnit(t.height)});break;case"width":i.setStyleAttribute(this.element,{width:l.formatUnit(t.width)});break;case"zIndex":this.popupObj.zIndex=this.zIndex;break;case"cssClass":this.setCSSClass(e.cssClass);break;case"animationSettings":this.show();break;case"buttons":l.isNullOrUndefined(this.buttons[0].buttonModel)||""!==this.footerTemplate||(l.isNullOrUndefined(this.ftrTemplateContent)||(this.ftrTemplateContent.innerHTML=""),this.setButton());break;case"allowDragging":!this.allowDragging||this.isModal||l.isNullOrUndefined(this.headerContent)?this.dragObj.destroy():this.setAllowDragging();break;case"position":if(!this.isModal){this.popupObj.position=this.position;break}this.dlgContainer.classList.remove("e-dlg-"+e.position.X+"-"+e.position.Y),this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y);break;case"enableRtl":this.setEnableRTL()}}},e.prototype.getPersistData=function(){return this.addOnPersist([])},e.prototype.destroy=function(){if(this.element.classList.contains(u)){this.unWireEvents(),t.prototype.destroy.call(this);var e=[u,"e-rtl","e-dlg-modal"];i.removeClass([this.element,this.element],e),this.popupObj.element.classList.contains("e-popup")&&this.popupObj.destroy(),l.isNullOrUndefined(this.btnObj)||this.btnObj.destroy(),this.isModal&&i.detach(this.dlgOverlay),this.element.innerHTML=""}},e.prototype.wireEvents=function(){this.showCloseIcon&&a.EventHandler.add(this.closeIcon,"click",this.closeIconClickEventHandler,this),this.isModal&&a.EventHandler.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},e.prototype.unWireEvents=function(){if(this.showCloseIcon&&a.EventHandler.remove(this.closeIcon,"click",this.closeIconClickEventHandler),this.isModal&&a.EventHandler.remove(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler),!l.isNullOrUndefined(this.buttons[0].buttonModel))for(var t=0;t<this.buttons.length;t++)"function"==typeof this.buttons[t].click&&a.EventHandler.remove(this.ftrTemplateContent.children[t],"click",this.buttons[t].click)},e.prototype.refreshPosition=function(){this.popupObj.refreshPosition()},e.prototype.show=function(t){if(!this.element.classList.contains("e-popup-open")||!l.isNullOrUndefined(t)){l.isNullOrUndefined(t)||this.fullScreen(t),this.storeActiveElement=document.activeElement,this.element.tabIndex=-1,this.trigger("beforeOpen"),this.isModal&&!l.isNullOrUndefined(this.dlgOverlay)&&(this.dlgOverlay.style.display="block",this.dlgContainer.style.display="flex",l.isNullOrUndefined(this.targetEle)?i.addClass([document.body],"e-scroll-disabled"):(this.targetEle===document.body&&(this.dlgContainer.style.position="fixed"),this.dlgOverlay.style.position="absolute",this.element.style.position="relative",i.addClass([this.targetEle],"e-scroll-disabled")));var e={name:this.animationSettings.effect+"In",duration:this.animationSettings.duration,delay:this.animationSettings.delay};"None"===this.animationSettings.effect?this.popupObj.show():this.popupObj.show(e),this.dialogOpen=!0,this.visible=!0}},e.prototype.hide=function(){this.trigger("beforeClose"),this.isModal&&(this.dlgOverlay.style.display="none",l.isNullOrUndefined(this.targetEle)?i.removeClass([document.body],"e-scroll-disabled"):i.removeClass([this.targetEle],"e-scroll-disabled"));var t={name:this.animationSettings.effect+"Out",duration:this.animationSettings.duration,delay:this.animationSettings.delay};"None"===this.animationSettings.effect?this.popupObj.hide():this.popupObj.hide(t),this.dialogOpen=!1,this.visible=!1},e.prototype.fullScreen=function(t){this.element.offsetTop,this.element.offsetLeft;return t?(i.addClass([this.element],"e-dlg-fullscreen"),this.element.style.maxHeight=l.isNullOrUndefined(this.target)?window.innerHeight+"px":this.targetEle.offsetHeight+"px",i.addClass([document.body],"e-scroll-disabled"),this.allowDragging&&!l.isNullOrUndefined(this.dragObj)&&this.dragObj.destroy()):(i.removeClass([this.element],"e-dlg-fullscreen"),i.removeClass([document.body],"e-scroll-disabled"),!this.allowDragging||this.isModal||l.isNullOrUndefined(this.headerContent)||this.setAllowDragging()),t},e}(o.Component);r([o.Property("")],f.prototype,"content",void 0),r([o.Property(!1)],f.prototype,"showCloseIcon",void 0),r([o.Property(!1)],f.prototype,"isModal",void 0),r([o.Property("")],f.prototype,"header",void 0),r([o.Property(!0)],f.prototype,"visible",void 0),r([o.Property("auto")],f.prototype,"height",void 0),r([o.Property("100%")],f.prototype,"width",void 0),r([o.Property("")],f.prototype,"cssClass",void 0),r([o.Property()],f.prototype,"zIndex",void 0),r([o.Property(null)],f.prototype,"target",void 0),r([o.Property("")],f.prototype,"footerTemplate",void 0),r([o.Property(!1)],f.prototype,"allowDragging",void 0),r([o.Collection([{}],c)],f.prototype,"buttons",void 0),r([o.Property(!0)],f.prototype,"closeOnEscape",void 0),r([o.Property({effect:"Fade",duration:400,delay:0})],f.prototype,"animationSettings",void 0),r([o.Property({X:"center",Y:"center"})],f.prototype,"position",void 0),r([o.Property("")],f.prototype,"locale",void 0),r([o.Event()],f.prototype,"created",void 0),r([o.Event()],f.prototype,"open",void 0),r([o.Event()],f.prototype,"beforeOpen",void 0),r([o.Event()],f.prototype,"close",void 0),r([o.Event()],f.prototype,"beforeClose",void 0),r([o.Event()],f.prototype,"dragStart",void 0),r([o.Event()],f.prototype,"dragStop",void 0),r([o.Event()],f.prototype,"drag",void 0),r([o.Event()],f.prototype,"overlayClick",void 0),f=r([n.NotifyPropertyChanges],f),e.Dialog=f,e.dialogBuilder=o.CreateBuilder(f)}.apply(e,i))&&(t.exports=n)},function(t,o){t.exports=e},function(t,e,o){var i,n;i=[o,e,o(11)],void 0!==(n=function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}(o)}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n,s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),r=this&&this.__decorate||function(t,e,o,i){var n,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,o,r):n(e,o))||r);return s>3&&r&&Object.defineProperty(e,o,r),r};i=[o,e,o(4),o(4),o(4),o(4),o(4),o(2),o(3),o(5)],void 0!==(n=function(t,e,o,i,n,l,a,h,p,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var c="e-tooltip",u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(o.ChildProperty);r([o.Property({effect:"FadeIn",duration:150,delay:0})],u.prototype,"open",void 0),r([o.Property({effect:"FadeOut",duration:150,delay:0})],u.prototype,"close",void 0),e.Animation=u;var f=function(t){function e(e,o){return t.call(this,e,o)||this}return s(e,t),e.prototype.initialize=function(){this.formatPosition(),l.addClass([this.element],c)},e.prototype.formatPosition=function(){0===this.position.indexOf("top")||0===this.position.indexOf("bottom")?(t=this.position.split(" "),this.tooltipPositionY=t[0],this.tooltipPositionX=t[1]):(e=this.position.split(" "),this.tooltipPositionX=e[0],this.tooltipPositionY=e[1]);var t,e},e.prototype.renderArrow=function(){this.setTipClass(this.position);var t=l.createElement("div",{className:"e-arrow-tip "+this.tipClass});t.appendChild(l.createElement("div",{className:"e-arrow-tip-outer "+this.tipClass})),t.appendChild(l.createElement("div",{className:"e-arrow-tip-inner "+this.tipClass})),this.tooltipEle.appendChild(t)},e.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"},e.prototype.renderPopup=function(t){var e=this.mouseTrail?{top:0,left:0}:this.getTooltipPosition(t);this.popupObj=new h.Popup(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)})},e.prototype.getTooltipPosition=function(t){var e=p.calculatePosition(t,this.tooltipPositionX,this.tooltipPositionY),o=this.calculateTooltipOffset(this.position);return this.collisionFlipFit(t,e.left+o.left,e.top+o.top)},e.prototype.reposition=function(t){var e=this.getTooltipPosition(t);this.popupObj.position={X:e.left,Y:e.top},this.popupObj.dataBind()},e.prototype.openPopupHandler=function(){this.trigger("afterOpen",this.tooltipEventArgs)},e.prototype.closePopupHandler=function(){this.clear(),this.trigger("afterClose",this.tooltipEventArgs)},e.prototype.calculateTooltipOffset=function(t){var e={top:0,left:0},o=this.tooltipEle.offsetWidth,i=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"right top":e.left+=s+l,e.top-=i-a;break;case"right center":e.left+=s+l,e.top-=i/2;break;case"right bottom":e.left+=s+l,e.top-=a;break;case"bottom right":e.top+=r+l,e.left-=h;break;case"bottom center":e.top+=r+l,e.left-=o/2;break;case"bottom left":e.top+=r+l,e.left-=o-h;break;case"left bottom":e.left-=s+o+l,e.top-=a;break;case"left center":e.left-=s+o+l,e.top-=i/2;break;case"left top":e.left-=s+o+l,e.top-=i-a;break;case"top left":e.top-=i+r+l,e.left-=o-h;break;case"top right":e.top-=i+r+l,e.left-=h;break;default:e.top-=i+r+l,e.left-=o/2}return e.left+=this.offsetX,e.top+=this.offsetY,e},e.prototype.updateTipPosition=function(t){var e=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"];l.removeClass(e,o),this.setTipClass(t),l.addClass(e,this.tipClass)},e.prototype.adjustArrow=function(t,e,o,i){if(!1!==this.showTipPointer){this.updateTipPosition(e);var n,s,r=this.tooltipEle.clientWidth,l=this.tooltipEle.clientHeight,a=this.tooltipEle.querySelector(".e-arrow-tip"),h=a.offsetWidth,p=a.offsetHeight;if("e-tip-bottom"===this.tipClass||"e-tip-top"===this.tipClass){s="e-tip-bottom"===this.tipClass?"100%":-p+"px";var d="center"!==o||r>t.offsetWidth||this.mouseTrail;n=d&&"left"===o||!d&&"end"===this.tipPointerPosition?r-h-2+"px":d&&"right"===o||!d&&"start"===this.tipPointerPosition?"2px":r/2-h/2+"px"}else{n="e-tip-right"===this.tipClass?r+"px":-h+"px";var d="center"!==i||l>t.offsetHeight||this.mouseTrail;s=d&&"top"===i||!d&&"end"===this.tipPointerPosition?l-p-2+"px":d&&"bottom"===i||!d&&"start"===this.tipPointerPosition?"2px":l/2-p/2+"px"}a.style.top=s,a.style.left=n}},e.prototype.renderContent=function(t){var e=this.tooltipEle.querySelector(".e-tip-content");if(t&&!n.isNullOrUndefined(t.getAttribute("title"))&&(t.setAttribute("data-content",t.getAttribute("title")),t.removeAttribute("title")),n.isNullOrUndefined(this.content))t&&!n.isNullOrUndefined(t.getAttribute("data-content"))&&(e.innerHTML=t.getAttribute("data-content"));else if("string"==typeof this.content)e.innerHTML=this.content;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(this.content)}},e.prototype.renderCloseIcon=function(){if(this.isSticky){var t=l.createElement("div",{className:"e-icons e-tooltip-close"});this.tooltipEle.appendChild(t),i.EventHandler.add(t,i.Browser.touchStartEvent,this.onStickyClose,this)}},e.prototype.addDescribedBy=function(t,e){var o=(t.getAttribute("aria-describedby")||"").split(/\s+/);o.indexOf(e)<0&&o.push(e),l.attributes(t,{"aria-describedby":o.join(" ").trim(),"data-tooltip-id":e})},e.prototype.removeDescribedBy=function(t){var e=t.getAttribute("data-tooltip-id"),o=(t.getAttribute("aria-describedby")||"").split(/\s+/),i=o.indexOf(e);-1!==i&&o.splice(i,1),t.removeAttribute("data-tooltip-id");var n=o.join(" ").trim();n?t.setAttribute("aria-describedby",n):t.removeAttribute("aria-describedby")},e.prototype.tapHoldHandler=function(t){clearTimeout(this.autoCloseTimer),this.targetHover(t.originalEvent)},e.prototype.touchEndHandler=function(t){var e=this;if(!this.isSticky){var o=function(){e.close()};this.autoCloseTimer=setTimeout(o,1500)}},e.prototype.targetClick=function(t){var e;e=this.target?l.closest(t.target,this.target):this.element,n.isNullOrUndefined(e)||(null===e.getAttribute("data-tooltip-id")?this.targetHover(t):this.onMouseOut(t))},e.prototype.targetHover=function(t){var e;if(e=this.target?l.closest(t.target,this.target):this.element,!n.isNullOrUndefined(e)&&null===e.getAttribute("data-tooltip-id")){for(var o=[].slice.call(document.querySelectorAll("[data-tooltip-id= "+this.ctrlId+"_content]")),i=0,s=o;i<s.length;i++){var r=s[i];this.restoreElement(r)}this.showTooltip(e,this.animation.open,t),this.wireMouseEvents(t,e)}},e.prototype.showTooltip=function(t,e,o){var s=this;if(clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.tooltipEventArgs=o?{type:o.type,cancel:!1,target:t,event:o,element:this.tooltipEle}:{type:null,cancel:!1,target:t,event:null,element:this.tooltipEle},this.trigger("beforeRender",this.tooltipEventArgs),this.tooltipEventArgs.cancel)return this.isHidden=!0,void this.clear();if(this.isHidden=!1,n.isNullOrUndefined(this.tooltipEle)?(this.ctrlId=this.element.getAttribute("id")?n.getUniqueID(this.element.getAttribute("id")):n.getUniqueID("tooltip"),this.tooltipEle=l.createElement("div",{className:"e-tooltip-wrap e-popup",attrs:{role:"tooltip","aria-hidden":"false",id:this.ctrlId+"_content"},styles:"width:"+n.formatUnit(this.width)+";height:"+n.formatUnit(this.height)+";position:absolute;"}),this.cssClass&&l.addClass([this.tooltipEle],this.cssClass),i.Browser.isDevice&&l.addClass([this.tooltipEle],"e-bigger"),"auto"!==this.width&&(this.tooltipEle.style.maxWidth=n.formatUnit(this.width)),this.tooltipEle.appendChild(l.createElement("div",{className:"e-tip-content"})),document.body.appendChild(this.tooltipEle),this.addDescribedBy(t,this.ctrlId+"_content"),this.renderContent(t),l.addClass([this.tooltipEle],"e-popup-open"),this.showTipPointer&&this.renderArrow(),this.renderCloseIcon(),this.renderPopup(t)):(this.adjustArrow(t,this.position,this.tooltipPositionX,this.tooltipPositionY),this.addDescribedBy(t,this.ctrlId+"_content"),this.renderContent(t),i.Animation.stop(this.tooltipEle),this.reposition(t)),l.removeClass([this.tooltipEle],"e-popup-open"),l.addClass([this.tooltipEle],"e-popup-close"),this.tooltipEventArgs=o?{type:o.type,cancel:!1,target:t,event:o,element:this.tooltipEle}:{type:null,cancel:!1,target:t,event:null,element:this.tooltipEle},this.trigger("beforeOpen",this.tooltipEventArgs),this.tooltipEventArgs.cancel)return this.isHidden=!0,void this.clear();var r={name:e.effect,duration:e.duration,delay:e.delay,timingFunction:"easeOut"};if("None"===e.effect&&(r=void 0),this.openDelay>0){var a=function(){s.popupObj&&s.popupObj.show(r)};this.showTimer=setTimeout(a,this.openDelay)}else this.popupObj.show(r)},e.prototype.checkCollision=function(t,e,o){var i={left:e,top:o,position:this.position,horizontal:this.tooltipPositionX,vertical:this.tooltipPositionY},n=d.isCollide(this.tooltipEle,this.target?this.element:null,e,o);return n.length>0&&(i.horizontal=n.indexOf("left")>=0?"right":n.indexOf("right")>=0?"left":this.tooltipPositionX,i.vertical=n.indexOf("top")>=0?"bottom":n.indexOf("bottom")>=0?"top":this.tooltipPositionY),i},e.prototype.collisionFlipFit=function(t,e,o){var i=this.checkCollision(t,e,o),n=i.position;if(this.tooltipPositionY!==i.vertical&&(n=0===this.position.indexOf("bottom")||0===this.position.indexOf("top")?i.vertical+" "+this.tooltipPositionX:this.tooltipPositionX+" "+i.vertical),this.tooltipPositionX!==i.horizontal&&(0===n.indexOf("left")&&(i.vertical="left top"===n||"left center"===n?"top":"bottom",n=i.vertical+" left"),0===n.indexOf("right")&&(i.vertical="right top"===n||"right center"===n?"top":"bottom",n=i.vertical+" right"),i.horizontal=this.tooltipPositionX),i.position!==n){var s=p.calculatePosition(t,this.tooltipPositionX,i.vertical);this.adjustArrow(t,n,i.horizontal,i.vertical);var r=this.calculateTooltipOffset(n);i.position=n,i.left=s.left+r.left,i.top=s.top+r.top}else this.adjustArrow(t,n,i.horizontal,i.vertical);var l={left:i.left,top:i.top},a=d.fit(this.tooltipEle,this.target?this.element:null,{X:!0,Y:!1},l).left;if(this.showTipPointer&&(0===n.indexOf("bottom")||0===n.indexOf("top"))){var h=this.tooltipEle.querySelector(".e-arrow-tip"),c=parseInt(h.style.left,10)-(a-i.left);c<0?c=0:c+h.offsetWidth>this.tooltipEle.clientWidth&&(c=this.tooltipEle.clientWidth-h.offsetWidth),h.style.left=c.toString()+"px"}return l.left=a,l},e.prototype.hideTooltip=function(t,e){var o,i=this;if(e?(o=this.target?e.target:this.element,this.tooltipEventArgs={type:e.type,cancel:!1,target:o,event:e,element:this.tooltipEle}):(o=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]"),this.tooltipEventArgs={type:null,cancel:!1,target:o,event:null,element:this.tooltipEle}),!n.isNullOrUndefined(o))if(this.trigger("beforeClose",this.tooltipEventArgs),this.tooltipEventArgs.cancel)this.isHidden=!1;else{this.restoreElement(o),this.isHidden=!0;var s={name:t.effect,duration:t.duration,delay:t.delay,timingFunction:"easeIn"};if("None"===t.effect&&(s=void 0),this.closeDelay>0){var r=function(){i.popupObj&&i.popupObj.hide(s)};this.hideTimer=setTimeout(r,this.closeDelay)}else this.popupObj.hide(s)}},e.prototype.restoreElement=function(t){this.unwireMouseEvents(t),n.isNullOrUndefined(t.getAttribute("data-content"))||(t.setAttribute("title",t.getAttribute("data-content")),t.removeAttribute("data-content")),this.removeDescribedBy(t)},e.prototype.clear=function(){this.tooltipEle&&(l.removeClass([this.tooltipEle],"e-popup-close"),l.addClass([this.tooltipEle],"e-popup-open")),this.isHidden&&(this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&l.remove(this.tooltipEle),this.tooltipEle=null,this.popupObj=null)},e.prototype.onMouseOut=function(t){this.hideTooltip(this.animation.close,t)},e.prototype.onStickyClose=function(t){this.close()},e.prototype.onMouseMove=function(t){var e=0,o=0;t.type.indexOf("touch")>-1?(t.preventDefault(),e=t.touches[0].pageX,o=t.touches[0].pageY):(e=t.pageX,o=t.pageY),i.Animation.stop(this.tooltipEle),l.removeClass([this.tooltipEle],"e-popup-close"),l.addClass([this.tooltipEle],"e-popup-open"),this.adjustArrow(t.target,this.position,this.tooltipPositionX,this.tooltipPositionY);var n=this.calculateTooltipOffset(this.position),s=e+n.left+this.offsetX,r=o+n.top+this.offsetY,a=this.checkCollision(t.target,s,r);if(this.tooltipPositionX!==a.horizontal||this.tooltipPositionY!==a.vertical){var h=0===this.position.indexOf("bottom")||0===this.position.indexOf("top")?a.vertical+" "+a.horizontal:a.horizontal+" "+a.vertical;a.position=h,this.adjustArrow(t.target,a.position,a.horizontal,a.vertical);var p=this.calculateTooltipOffset(a.position);a.left=e+p.left+this.offsetX,a.top=o+p.top+this.offsetY}this.tooltipEle.style.left=a.left+"px",this.tooltipEle.style.top=a.top+"px"},e.prototype.keyDown=function(t){this.tooltipEle&&27===t.keyCode&&this.close()},e.prototype.touchEnd=function(t){this.tooltipEle&&null===l.closest(t.target,"."+c)&&this.close()},e.prototype.scrollHandler=function(t){this.tooltipEle&&this.close()},e.prototype.render=function(){this.initialize(),this.wireEvents(this.opensOn)},e.prototype.preRender=function(){this.tipClass="e-tip-bottom",this.tooltipPositionX="center",this.tooltipPositionY="top",this.isHidden=!0},e.prototype.wireEvents=function(t){for(var e=this.getTriggerList(t),o=0,n=e;o<n.length;o++){var s=n[o];if("custom"===s)return;"focus"===s&&this.wireFocusEvents(),"click"===s&&i.EventHandler.add(this.element,i.Browser.touchStartEvent,this.targetClick,this),"hover"===s&&(i.Browser.isDevice?(this.touchModule=new i.Touch(this.element,{tapHoldThreshold:500,tapHold:this.tapHoldHandler.bind(this)}),i.EventHandler.add(this.element,i.Browser.touchEndEvent,this.touchEndHandler,this)):i.EventHandler.add(this.element,"mouseover",this.targetHover,this))}i.EventHandler.add(document,"touchend",this.touchEnd,this),i.EventHandler.add(document,"scroll",this.scrollHandler,this),i.EventHandler.add(document,"keydown",this.keyDown,this)},e.prototype.getTriggerList=function(t){return"auto"===t&&(t=i.Browser.isDevice?"hover":"hover focus"),t.split(" ")},e.prototype.wireFocusEvents=function(){if(n.isNullOrUndefined(this.target))i.EventHandler.add(this.element,"focus",this.targetHover,this);else for(var t=[].slice.call(this.element.querySelectorAll(this.target)),e=0,o=t;e<o.length;e++){var s=o[e];i.EventHandler.add(s,"focus",this.targetHover,this)}},e.prototype.wireMouseEvents=function(t,e){this.isSticky||("focus"===t.type&&i.EventHandler.add(e,"blur",this.onMouseOut,this),"mouseover"===t.type&&i.EventHandler.add(e,"mouseleave",this.onMouseOut,this)),this.mouseTrail&&i.EventHandler.add(e,"mousemove touchstart",this.onMouseMove,this)},e.prototype.unwireEvents=function(t){for(var e=this.getTriggerList(t),o=0,n=e;o<n.length;o++){var s=n[o];if("custom"===s)return;"focus"===s&&this.unwireFocusEvents(),"click"===s&&i.EventHandler.remove(this.element,i.Browser.touchStartEvent,this.targetClick),"hover"===s&&(i.Browser.isDevice?(this.touchModule&&this.touchModule.destroy(),i.EventHandler.remove(this.element,i.Browser.touchEndEvent,this.touchEndHandler)):i.EventHandler.remove(this.element,"mouseover",this.targetHover))}i.EventHandler.remove(document,"touchend",this.touchEnd),i.EventHandler.remove(document,"scroll",this.scrollHandler),i.EventHandler.remove(document,"keydown",this.keyDown)},e.prototype.unwireFocusEvents=function(){if(n.isNullOrUndefined(this.target))i.EventHandler.remove(this.element,"focus",this.targetHover);else for(var t=[].slice.call(this.element.querySelectorAll(this.target)),e=0,o=t;e<o.length;e++){var s=o[e];i.EventHandler.remove(s,"focus",this.targetHover)}},e.prototype.unwireMouseEvents=function(t){if(!this.isSticky)for(var e=this.getTriggerList(this.opensOn),o=0,n=e;o<n.length;o++){var s=n[o];"focus"===s&&i.EventHandler.remove(t,"blur",this.onMouseOut),"hover"!==s||i.Browser.isDevice||i.EventHandler.remove(t,"mouseleave",this.onMouseOut)}this.mouseTrail&&i.EventHandler.remove(t,"mousemove touchstart",this.onMouseMove)},e.prototype.getModuleName=function(){return"tooltip"},e.prototype.getPersistData=function(){return this.addOnPersist([])},e.prototype.onPropertyChanged=function(t,e){for(var o=0,i=Object.keys(t);o<i.length;o++){switch(i[o]){case"width":this.tooltipEle&&(this.tooltipEle.style.width=n.formatUnit(t.width));break;case"height":this.tooltipEle&&(this.tooltipEle.style.height=n.formatUnit(t.height));break;case"content":this.tooltipEle&&this.renderContent();break;case"opensOn":this.unwireEvents(e.opensOn),this.wireEvents(t.opensOn);break;case"position":this.formatPosition();var s=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]");this.tooltipEle&&s&&this.reposition(s);break;case"offsetX":if(this.tooltipEle){var r=t.offsetX-e.offsetX;this.tooltipEle.style.left=(parseInt(this.tooltipEle.style.left,10)+r).toString()+"px"}break;case"offsetY":if(this.tooltipEle){var a=t.offsetY-e.offsetY;this.tooltipEle.style.top=(parseInt(this.tooltipEle.style.top,10)+a).toString()+"px"}break;case"cssClass":this.tooltipEle&&(e.cssClass&&l.removeClass([this.tooltipEle],e.cssClass),t.cssClass&&l.addClass([this.tooltipEle],t.cssClass));break;case"enableRtl":this.tooltipEle&&(this.enableRtl?l.addClass([this.tooltipEle],"e-rtl"):l.removeClass([this.tooltipEle],"e-rtl"))}}},e.prototype.open=function(t,e){void 0===e&&(e=this.animation.open),"none"!==t.style.display&&this.showTooltip(t,e)},e.prototype.close=function(t){void 0===t&&(t=this.animation.close),this.hideTooltip(t)},e.prototype.refresh=function(t){this.tooltipEle&&this.renderContent(t),this.popupObj&&t&&this.reposition(t)},e.prototype.destroy=function(){t.prototype.destroy.call(this),l.removeClass([this.element],c),this.unwireEvents(this.opensOn),this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&l.remove(this.tooltipEle),this.tooltipEle=null,this.popupObj=null},e}(o.Component);r([o.Property("auto")],f.prototype,"width",void 0),r([o.Property("auto")],f.prototype,"height",void 0),r([o.Property()],f.prototype,"content",void 0),r([o.Property()],f.prototype,"target",void 0),r([o.Property("top center")],f.prototype,"position",void 0),r([o.Property(0)],f.prototype,"offsetX",void 0),r([o.Property(0)],f.prototype,"offsetY",void 0),r([o.Property(!0)],f.prototype,"showTipPointer",void 0),r([o.Property("auto")],f.prototype,"tipPointerPosition",void 0),r([o.Property("auto")],f.prototype,"opensOn",void 0),r([o.Property(!1)],f.prototype,"mouseTrail",void 0),r([o.Property(!1)],f.prototype,"isSticky",void 0),r([a.Complex({},u)],f.prototype,"animation",void 0),r([o.Property(0)],f.prototype,"openDelay",void 0),r([o.Property(0)],f.prototype,"closeDelay",void 0),r([o.Property()],f.prototype,"cssClass",void 0),r([o.Property(!1)],f.prototype,"enableRtl",void 0),r([o.Event()],f.prototype,"beforeRender",void 0),r([o.Event()],f.prototype,"beforeOpen",void 0),r([o.Event()],f.prototype,"afterOpen",void 0),r([o.Event()],f.prototype,"beforeClose",void 0),r([o.Event()],f.prototype,"afterClose",void 0),r([o.Event()],f.prototype,"created",void 0),r([o.Event()],f.prototype,"destroyed",void 0),f=r([a.NotifyPropertyChanges],f),e.Tooltip=f,e.tooltipBuilder=o.CreateBuilder(f)}.apply(e,i))&&(t.exports=n)}])});
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base","@syncfusion/ej2-buttons"],e);else{var o="object"==typeof exports?e(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons")):e(t["@syncfusion/ej2-base"],t["@syncfusion/ej2-buttons"]);for(var i in o)("object"==typeof exports?exports:t)[i]=o[i]}}(this,function(t,e){return function(t){function e(i){if(o[i])return o[i].exports;var n=o[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){var i,n;i=[o,e,o(1),o(6),o(7),o(10)],void 0!==(n=function(t,e,o,i,n,s){"use strict";function r(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}Object.defineProperty(e,"__esModule",{value:!0}),r(o),r(i),r(n),r(s)}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n;i=[o,e,o(2)],void 0!==(n=function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}(o)}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n,s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),r=this&&this.__decorate||function(t,e,o,i){var n,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,o,r):n(e,o))||r);return s>3&&r&&Object.defineProperty(e,o,r),r};i=[o,e,o(4),o(4),o(4),o(3),o(4),o(4),o(4),o(5)],void 0!==(n=function(t,e,o,i,n,l,a,h,p,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var c={ROOT:"e-popup",RTL:"e-rtl",OPEN:"e-popup-open",CLOSE:"e-popup-close"},u=function(t){function e(e,o){return t.call(this,o,e)||this}return s(e,t),e.prototype.onPropertyChanged=function(t,e){for(var n=0,s=Object.keys(t);n<s.length;n++){switch(s[n]){case"width":o.setStyleAttribute(this.element,{width:i.formatUnit(t.width)});break;case"height":o.setStyleAttribute(this.element,{height:i.formatUnit(t.height)});break;case"zIndex":o.setStyleAttribute(this.element,{zIndex:t.zIndex});break;case"enableRtl":this.setEnableRtl();break;case"position":case"relateTo":this.refreshPosition();break;case"offsetX":var r=t.offsetX-e.offsetX;this.element.style.left=(parseInt(this.element.style.left,10)+r).toString()+"px";break;case"offsetY":var l=t.offsetY-e.offsetY;this.element.style.top=(parseInt(this.element.style.top,10)+l).toString()+"px";break;case"content":this.setContent();break;case"actionOnScroll":"none"!==t.actionOnScroll?this.wireScrollEvents():this.unwireScrollEvents()}}},e.prototype.getModuleName=function(){return"popup"},e.prototype.getPersistData=function(){return this.addOnPersist([])},e.prototype.destroy=function(){this.element.classList.remove(c.ROOT,c.RTL),this.unwireEvents(),t.prototype.destroy.call(this)},e.prototype.render=function(){this.element.classList.add(c.ROOT);var t={};1e3!==this.zIndex&&(t.zIndex=this.zIndex),"auto"!==this.width&&(t.width=i.formatUnit(this.width)),"auto"!==this.height&&(t.height=i.formatUnit(this.height)),o.setStyleAttribute(this.element,t),this.setEnableRtl(),this.setContent(),this.wireEvents()},e.prototype.wireEvents=function(){n.Browser.isDevice&&p.EventHandler.add(window,"orientationchange",this.orientationOnChange,this),"none"!==this.actionOnScroll&&this.wireScrollEvents()},e.prototype.wireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,e=this.getScrollableParent(this.getRelateToElement());t<e.length;t++){var o=e[t];p.EventHandler.add(o,"scroll",this.scrollRefresh,this)}},e.prototype.unwireEvents=function(){n.Browser.isDevice&&p.EventHandler.remove(window,"orientationchange",this.orientationOnChange),"none"!==this.actionOnScroll&&this.unwireScrollEvents()},e.prototype.unwireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,e=this.getScrollableParent(this.getRelateToElement());t<e.length;t++){var o=e[t];p.EventHandler.remove(o,"scroll",this.scrollRefresh)}},e.prototype.getRelateToElement=function(){return"string"==typeof this.relateTo?document.querySelector(this.relateTo):this.relateTo},e.prototype.scrollRefresh=function(t){if("reposition"===this.actionOnScroll?this.element.offsetParent===t.target||this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&null==t.target.parentElement||this.refreshPosition():"hide"===this.actionOnScroll&&this.hide(),"none"!==this.actionOnScroll&&this.getRelateToElement()){var e=this.isElementOnViewport(this.getRelateToElement(),t.target);e||this.targetInvisibleStatus?e&&(this.targetInvisibleStatus=!1):(this.trigger("targetExitViewport"),this.targetInvisibleStatus=!0)}},e.prototype.isElementOnViewport=function(t,e){for(var o=this.getScrollableParent(t),i=0;i<o.length;i++)if(!this.isElementVisible(t,o[i]))return!1;return!0},e.prototype.isElementVisible=function(t,e){var o=t.getBoundingClientRect();if(!o.height||!o.width)return!1;if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return!(o.bottom<i.top||o.bottom>i.bottom||o.right>i.right||o.left<i.left)}var n=window,s={top:n.scrollY,left:n.scrollX,right:n.scrollX+n.outerWidth,bottom:n.scrollY+n.outerHeight},r=l.calculatePosition(t),a={top:r.top,left:r.left,right:r.left+o.width,bottom:r.top+o.height},h={top:s.bottom-a.top,left:s.right-a.left,bottom:a.bottom-s.top,right:a.right-s.left};return h.top>0&&h.left>0&&h.right>0&&h.bottom>0},e.prototype.preRender=function(){},e.prototype.setEnableRtl=function(){this.reposition(),this.enableRtl?this.element.classList.add(c.RTL):this.element.classList.remove(c.RTL)},e.prototype.setContent=function(){i.isNullOrUndefined(this.content)||(this.element.innerHTML="","string"==typeof this.content?this.element.textContent=this.content:this.element.appendChild(this.content))},e.prototype.orientationOnChange=function(){var t=this;setTimeout(function(){t.refreshPosition()},200)},e.prototype.refreshPosition=function(){this.reposition(),this.checkCollision()},e.prototype.reposition=function(){var t,e=this.getRelateToElement();if("number"==typeof this.position.X&&"number"==typeof this.position.Y)t={left:this.position.X,top:this.position.Y};else if(e){var o=this.element.style.display;this.element.style.display="block",t=this.getAnchorPosition(e,this.element,this.position,this.offsetX,this.offsetY),this.element.style.display=o}else t={left:0,top:0};this.element.style.left=t.left+"px",this.element.style.top=t.top+"px"},e.prototype.getAnchorPosition=function(t,e,o,i,n){var s=e.getBoundingClientRect(),r=t.getBoundingClientRect(),a=t,h={left:0,top:0};switch(h=e.offsetParent&&"BODY"===e.offsetParent.tagName&&"BODY"===t.tagName?l.calculatePosition(t):l.calculateRelativeBasedPosition(a,e),o.X){default:case"left":break;case"center":"container"===this.targetType?h.left+=r.width/2-s.width/2:h.left+=r.width/2;break;case"right":"container"===this.targetType?h.left+=r.width-s.width:h.left+=r.width}switch(o.Y){default:case"top":break;case"center":"container"===this.targetType?h.top+=r.height/2-s.height/2:h.top+=r.height/2;break;case"bottom":"container"===this.targetType?h.top+=r.height-s.height:h.top+=r.height}return h.left+=i,h.top+=n,h},e.prototype.callFlip=function(t){var e=this.getRelateToElement();d.flip(this.element,e,this.offsetX,this.offsetY,this.position.X,this.position.Y,this.viewPortElement,t)},e.prototype.callFit=function(t){if(0!==d.isCollide(this.element,this.viewPortElement).length){var e=d.fit(this.element,this.viewPortElement,t);this.element.style.left=e.left+"px",this.element.style.top=e.top+"px"}},e.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}):("fit"===t?this.callFit({X:!0,Y:!1}):"fit"===e&&this.callFit({X:!1,Y:!0}),"flip"===t?this.callFlip({X:!0,Y:!1}):"flip"===e&&this.callFlip({Y:!0,X:!1})))},e.prototype.show=function(t){var e=this;t=i.isNullOrUndefined(t)||"object"!=typeof t?this.showAnimation:t,"none"===this.collision.X&&"none"===this.collision.Y||(o.removeClass([this.element],c.CLOSE),o.addClass([this.element],c.OPEN),this.checkCollision(),o.removeClass([this.element],c.OPEN),o.addClass([this.element],c.CLOSE)),i.isNullOrUndefined(t)?(o.removeClass([this.element],c.CLOSE),o.addClass([this.element],c.OPEN),this.trigger("open")):(t.begin=function(){e.isDestroyed||(o.removeClass([e.element],c.CLOSE),o.addClass([e.element],c.OPEN))},t.end=function(){e.isDestroyed||e.trigger("open")},new a.Animation(t).animate(this.element))},e.prototype.hide=function(t){var e=this;t=i.isNullOrUndefined(t)||"object"!=typeof t?this.hideAnimation:t,i.isNullOrUndefined(t)?(o.removeClass([this.element],c.OPEN),o.addClass([this.element],c.CLOSE),this.trigger("close")):(t.end=function(){e.isDestroyed||(o.removeClass([e.element],c.OPEN),o.addClass([e.element],c.CLOSE),e.trigger("close"))},new a.Animation(t).animate(this.element))},e.prototype.getScrollableParent=function(t){for(var e=getComputedStyle(t),o=[],i=/(auto|scroll)/,n=t.parentElement;n&&"HTML"!==n.tagName;){var s=getComputedStyle(n);"absolute"===e.position&&"static"===s.position||!i.test(s.overflow+s.overflowY+s.overflowX)||o.push(n),n=n.parentElement}return o.push(document),o},e}(a.Component);r([a.Property("auto")],u.prototype,"height",void 0),r([a.Property("auto")],u.prototype,"width",void 0),r([a.Property(null)],u.prototype,"content",void 0),r([a.Property("container")],u.prototype,"targetType",void 0),r([a.Property(null)],u.prototype,"viewPortElement",void 0),r([a.Property({X:"none",Y:"none"})],u.prototype,"collision",void 0),r([a.Property(document.body)],u.prototype,"relateTo",void 0),r([a.Property({X:"left",Y:"top"})],u.prototype,"position",void 0),r([a.Property(0)],u.prototype,"offsetX",void 0),r([a.Property(0)],u.prototype,"offsetY",void 0),r([a.Property(1e3)],u.prototype,"zIndex",void 0),r([a.Property(!1)],u.prototype,"enableRtl",void 0),r([a.Property("reposition")],u.prototype,"actionOnScroll",void 0),r([a.Property(null)],u.prototype,"showAnimation",void 0),r([a.Property(null)],u.prototype,"hideAnimation",void 0),r([a.Event()],u.prototype,"open",void 0),r([a.Event()],u.prototype,"close",void 0),r([a.Event()],u.prototype,"targetExitViewport",void 0),u=r([h.NotifyPropertyChanges],u),e.Popup=u}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n;i=[o,e],void 0!==(n=function(t,e){"use strict";function o(t,e){var o={left:0,top:0};if(!t||!e)return o;for(;e.offsetParent&&t&&e.offsetParent!==t;)o.left+=t.offsetLeft,o.top+=t.offsetTop,t=t.offsetParent;return o}function i(t,e,o){if(!t)return{left:0,top:0};e||(e="left"),o||(o="top"),m=t.ownerDocument,v=t;var i={left:0,top:0};return r(e.toLowerCase(),o.toLowerCase(),i)}function n(t,e){e.left=t}function s(t,e){e.top=t}function r(t,e,o){switch(y=v.getBoundingClientRect(),e+t){case"topcenter":n(f(),o),s(d(),o);break;case"topright":n(u(),o),s(d(),o);break;case"centercenter":n(f(),o),s(p(),o);break;case"centerright":n(u(),o),s(p(),o);break;case"centerleft":n(c(),o),s(p(),o);break;case"bottomcenter":n(f(),o),s(h(),o);break;case"bottomright":n(u(),o),s(h(),o);break;case"bottomleft":n(c(),o),s(h(),o);break;default:case"topleft":n(c(),o),s(d(),o)}return o}function l(){return m.documentElement.scrollTop||m.body.scrollTop}function a(){return m.documentElement.scrollLeft||m.body.scrollLeft}function h(){return y.bottom+l()}function p(){return d()+y.height/2}function d(){return y.top+l()}function c(){return y.left+a()}function u(){return y.right+a()}function f(){return c()+y.width/2}Object.defineProperty(e,"__esModule",{value:!0});var y,v,m;e.calculateRelativeBasedPosition=o,e.calculatePosition=i}.apply(e,i))&&(t.exports=n)},function(e,o){e.exports=t},function(t,e,o){var i,n;i=[o,e,o(3)],void 0!==(n=function(t,e,o){"use strict";function i(t,e,i,n){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(x=e,T=t.ownerDocument,n||(n=o.calculatePosition(t,"left","top")),i.X){var r=x?u():P(),l=g(),a=b(),h=l-n.left,p=n.left+s.width-a;s.width>r?n.left=h>0&&p<=0?a-s.width:p>0&&h<=0?l:h>p?a-s.width:l:h>0?n.left+=h:p>0&&(n.left-=p)}if(i.Y){var d=x?f():w(),c=m(),y=E(),v=c-n.top,C=n.top+s.height-y;s.height>d?n.top=v>0&&C<=0?y-s.height:C>0&&v<=0?c:v>C?y-s.height:c:v>0?n.top+=v:C>0&&(n.top-=C)}return n}function n(t,e,i,n){void 0===e&&(e=null);var s=o.calculatePosition(t,"left","top");i&&(s.left=i),n&&(s.top=n);var r=[];x=e,T=t.ownerDocument;var l=t.getBoundingClientRect(),a=s.top,p=s.left,d=s.left+l.width,u=s.top+l.height,f=c(a,u),y=h(p,d);return f.topSide&&r.push("top"),y.rightSide&&r.push("right"),y.leftSide&&r.push("left"),f.bottomSide&&r.push("bottom"),r}function s(t,e,o,i,n,s,h,c){if(void 0===h&&(h=null),void 0===c&&(c={X:!0,Y:!0}),e&&t&&n&&s&&(c.X||c.Y)){var u={TL:null,TR:null,BL:null,BR:null},f={TL:null,TR:null,BL:null,BR:null},y=t.getBoundingClientRect(),v={posX:n,posY:s,offsetX:o,offsetY:i,position:{left:0,top:0}};x=h,T=e.ownerDocument,l(e,u,v),a(f,v,y),c.X&&p(e,f,u,v,y,!0),c.Y&&d(e,f,u,v,y,!0),r(t,v)}}function r(t,e){var i=0,n=0;if(null!=t.offsetParent&&("absolute"===getComputedStyle(t.offsetParent).position||"relative"===getComputedStyle(t.offsetParent).position)){var s=o.calculatePosition(t.offsetParent,"left","top");i=s.left,n=s.top}t.style.top=e.position.top+e.offsetY-n+"px",t.style.left=e.position.left+e.offsetX-i+"px"}function l(t,e,i){i.position=o.calculatePosition(t,i.posX,i.posY),e.TL=o.calculatePosition(t,"left","top"),e.TR=o.calculatePosition(t,"right","top"),e.BR=o.calculatePosition(t,"left","bottom"),e.BL=o.calculatePosition(t,"right","bottom")}function a(t,e,o){t.TL={top:e.position.top+e.offsetY,left:e.position.left+e.offsetX},t.TR={top:t.TL.top,left:t.TL.left+o.width},t.BL={top:t.TL.top+o.height,left:t.TL.left},t.BR={top:t.TL.top+o.height,left:t.TL.left+o.width}}function h(t,e){var o=!1,i=!1;return t-O()<g()&&(o=!0),e>b()&&(i=!0),{leftSide:o,rightSide:i}}function p(t,e,i,n,s,r){var l=h(e.TL.left,e.TR.left);i.TL.left-O()<=g()&&(l.leftSide=!1),i.TR.left>=b()&&(l.rightSide=!1),(l.leftSide&&!l.rightSide||!l.leftSide&&l.rightSide)&&("right"===n.posX?n.posX="left":n.posX="right",n.offsetX=n.offsetX+s.width,n.offsetX=-1*n.offsetX,n.position=o.calculatePosition(t,n.posX,n.posY),a(e,n,s),r&&p(t,e,i,n,s,!1))}function d(t,e,i,n,s,r){var l=c(e.TL.top,e.BL.top);i.TL.top-C()<=m()&&(l.topSide=!1),i.BL.top>=E()&&(l.bottomSide=!1),(l.topSide&&!l.bottomSide||!l.topSide&&l.bottomSide)&&("top"===n.posY?n.posY="bottom":n.posY="top",n.offsetY=n.offsetY+s.height,n.offsetY=-1*n.offsetY,n.position=o.calculatePosition(t,n.posX,n.posY),a(e,n,s),r&&d(t,e,i,n,s,!1))}function c(t,e){var o=!1,i=!1;return t-C()<m()&&(o=!0),e>E()&&(i=!0),{topSide:o,bottomSide:i}}function u(){return x.getBoundingClientRect().width}function f(){return x.getBoundingClientRect().height}function y(){return x.getBoundingClientRect().left}function v(){return x.getBoundingClientRect().top}function m(){return x?v():0}function g(){return x?y():0}function b(){return x?O()+y()+u():O()+P()}function E(){return x?C()+v()+f():C()+w()}function C(){return T.documentElement.scrollTop||T.body.scrollTop}function O(){return T.documentElement.scrollLeft||T.body.scrollLeft}function w(){return window.innerHeight}function P(){return window.innerWidth}Object.defineProperty(e,"__esModule",{value:!0});var T,x;e.fit=i,e.isCollide=n,e.flip=s}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n;i=[o,e,o(3),o(5)],void 0!==(n=function(t,e,o,i){"use strict";function n(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}Object.defineProperty(e,"__esModule",{value:!0}),n(o),n(i)}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n;i=[o,e,o(8)],void 0!==(n=function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}(o)}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n,s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),r=this&&this.__decorate||function(t,e,o,i){var n,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,o,r):n(e,o))||r);return s>3&&r&&Object.defineProperty(e,o,r),r};i=[o,e,o(4),o(4),o(4),o(4),o(4),o(4),o(2),o(9)],void 0!==(n=function(t,e,o,i,n,l,a,h,p,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(n.ChildProperty);r([o.Property()],c.prototype,"buttonModel",void 0),r([o.Property()],c.prototype,"click",void 0),e.ButtonProps=c;var u="e-dialog",f=function(t){function e(e,o){return t.call(this,e,o)||this}return s(e,t),e.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents()},e.prototype.preRender=function(){var t=this;this.closeIconClickEventHandler=function(e){t.hide(),t.closedFrom=e},this.dlgOverlayClickEventHandler=function(e){t.trigger("overlayClick",e)}},e.prototype.keyDown=function(t){var e=this;if(9===t.keyCode){t.preventDefault();var o=void 0;o=t.shiftKey?0===this.focusIndex||l.isNullOrUndefined(this.focusIndex)?this.focusElements.length-1:this.focusIndex-1:this.focusElements.length-1===this.focusIndex||l.isNullOrUndefined(this.focusIndex)?0:this.focusIndex+1;var i=this.focusElements[o];i.focus(),i instanceof HTMLInputElement&&i.select()}var n=document.activeElement,s=["input","textarea"].indexOf(n.tagName.toLowerCase())>-1,r=!1;if(s||(r=n.hasAttribute("contenteditable")&&"true"===n.getAttribute("contenteditable")),27===t.keyCode&&this.closeOnEscape&&(this.hide(),this.closedFrom=t),13===t.keyCode&&"button"===n.tagName.toLowerCase()&&n.classList.contains("e-primary")&&!l.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&!t.ctrlKey&&"textarea"!==n.tagName.toLowerCase()&&s&&!l.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&t.ctrlKey&&("textarea"===n.tagName.toLowerCase()||r)&&!l.isNullOrUndefined(this.primaryButtonEle)){var a;this.buttons.some(function(t,e){a=e;var o=t.buttonModel;return!l.isNullOrUndefined(o)&&!0===o.isPrimary})&&"function"==typeof this.buttons[a].click&&setTimeout(function(){e.buttons[a].click.call(e)})}},e.prototype.initialize=function(){l.isNullOrUndefined(this.target)||(this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target),i.addClass([this.element],u),o.Browser.isDevice&&i.addClass([this.element],"e-device"),this.setCSSClass(),this.element.style.maxHeight=l.isNullOrUndefined(this.target)?window.innerHeight-20+"px":this.targetEle.offsetHeight-20+"px"},e.prototype.initRender=function(){var t=this;i.attributes(this.element,{role:"dialog"}),l.isNullOrUndefined(this.zIndex)&&this.getZindexPartial(),""!==this.header&&this.setHeader(),this.showCloseIcon&&this.renderCloseIcon(),l.isNullOrUndefined(this.content)||""===this.content?this.element.hasChildNodes()&&(this.contentEle=this.element):this.setContent(),""!==this.footerTemplate&&this.setFooterTemplate(),l.isNullOrUndefined(this.buttons[0].buttonModel)||""!==this.footerTemplate||this.setButton(),!this.allowDragging||this.isModal||l.isNullOrUndefined(this.headerContent)||this.setAllowDragging(),i.attributes(this.element,{"aria-modal":this.isModal?"true":"false"}),this.isModal&&this.setIsModal(),l.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element)),this.popupObj=new p.Popup(this.element,{height:this.height,width:this.width,zIndex:this.zIndex,relateTo:this.target,actionOnScroll:"none",open:function(){t.focusContent(),t.trigger("open")},close:function(e){t.isModal&&(t.dlgContainer.style.display="none"),!l.isNullOrUndefined(t.focusElements)&&t.focusElements.length>0?t.unBindEvent(l.isNullOrUndefined(t.focusIndex)?t.element:t.focusElements[t.focusIndex]):t.unBindEvent(t.element),t.trigger("close",t.closedFrom),t.closedFrom={},l.isNullOrUndefined(t.storeActiveElement)||t.storeActiveElement.focus()}}),this.positionChange(),this.setEnableRTL(),i.addClass([this.element],"e-popup-close"),this.visible?this.show():this.isModal&&(this.dlgOverlay.style.display="none")},e.prototype.positionChange=function(){this.isModal?this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y):this.popupObj.setProperties({position:{X:this.position.X,Y:this.position.Y}})},e.prototype.getZindexPartial=function(){for(var t=this.element.parentElement,e=[];t&&"BODY"!==t.tagName;){var o=document.defaultView.getComputedStyle(t,null).getPropertyValue("z-index"),i=document.defaultView.getComputedStyle(t,null).getPropertyValue("position");"auto"!==o&&"static"!==i&&e.push(o),t=t.parentElement}for(var n=[],s=0;s<document.body.children.length;s++)if(!this.element.isEqualNode(document.body.children[s])){var o=document.defaultView.getComputedStyle(document.body.children[s],null).getPropertyValue("z-index"),i=document.defaultView.getComputedStyle(document.body.children[s],null).getPropertyValue("position");"auto"!==o&&"static"!==i&&n.push(o)}n.push("999");var r=e.concat(n);this.zIndex=Math.max.apply(Math,r)+1},e.prototype.setAllowDragging=function(){var t=this;this.dragObj=new h.Draggable(this.element,{clone:!1,handle:".e-dlg-header-content",dragStart:function(e){t.trigger("dragStart",e)},dragStop:function(e){t.trigger("dragStop",e)},drag:function(e){t.trigger("drag",e)}}),l.isNullOrUndefined(this.targetEle)||(this.dragObj.dragArea=this.targetEle)},e.prototype.setButton=function(){this.buttonContent=[];for(var t=0;t<this.buttons.length;t++){var e=i.createElement("button");this.buttonContent.push(e.outerHTML)}this.setFooterTemplate();for(var t=0;t<this.buttons.length;t++)this.btnObj=new d.Button(this.buttons[t].buttonModel),"function"==typeof this.buttons[t].click&&a.EventHandler.add(this.ftrTemplateContent.children[t],"click",this.buttons[t].click,this),this.btnObj.appendTo(this.ftrTemplateContent.children[t]),this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]},e.prototype.setContent=function(){i.attributes(this.element,{"aria-describedby":this.element.id+"_dialog-content"}),this.contentEle=i.createElement("div",{className:"e-dlg-content",id:this.element.id+"_dialog-content"}),"string"==typeof this.content?this.contentEle.innerHTML=this.content:this.contentEle.appendChild(this.content),l.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.element.style.maxHeight=l.isNullOrUndefined(this.target)?window.innerHeight-20+"px":this.targetEle.offsetHeight-20+"px")},e.prototype.setEnableRTL=function(){this.enableRtl?i.addClass([this.element],"e-rtl"):i.removeClass([this.element],"e-rtl")},e.prototype.setHeader=function(){this.headerEle=i.createElement("div",{id:this.element.id+"_title",className:"e-dlg-header",innerHTML:this.header}),i.attributes(this.element,{"aria-labelledby":this.element.id+"_title"}),this.createHeaderContent(),this.headerContent.appendChild(this.headerEle),this.element.insertBefore(this.headerContent,this.element.children[0])},e.prototype.setFooterTemplate=function(){this.ftrTemplateContent=i.createElement("div",{className:"e-footer-content",innerHTML:""!==this.footerTemplate?this.footerTemplate:this.buttonContent.join("")}),this.element.appendChild(this.ftrTemplateContent)},e.prototype.createHeaderContent=function(){l.isNullOrUndefined(this.headerContent)&&(this.headerContent=i.createElement("div",{className:"e-dlg-header-content"}))},e.prototype.renderCloseIcon=function(){this.closeIcon=i.createElement("button",{className:"e-dlg-closeicon-btn"}),this.closeIconBtnObj=new d.Button({cssClass:"e-flat",iconCss:"e-icon-dlg-close e-icons"}),this.closeIconTitle(),l.isNullOrUndefined(this.headerContent)?(this.createHeaderContent(),i.prepend([this.closeIcon],this.headerContent),this.element.insertBefore(this.headerContent,this.element.children[0])):i.prepend([this.closeIcon],this.headerContent),this.closeIconBtnObj.appendTo(this.closeIcon)},e.prototype.closeIconTitle=function(){if(""!==this.locale){var t=new o.L10n("Dialog",{locale:"Close"});t.setLocale(this.locale);var e=t.getConstant("Close");this.closeIcon.setAttribute("title",e)}else this.closeIcon.setAttribute("title","Close")},e.prototype.setCSSClass=function(t){this.cssClass&&i.addClass([this.element],this.cssClass.split(" ")),t&&i.removeClass([this.element],t.split(" "))},e.prototype.setIsModal=function(){this.dlgContainer=i.createElement("div",{className:"e-dlg-container"}),this.element.parentNode.insertBefore(this.dlgContainer,this.element),this.dlgContainer.appendChild(this.element),i.addClass([this.element],"e-dlg-modal"),this.dlgOverlay=i.createElement("div",{className:"e-dlg-overlay"}),this.dlgOverlay.style.zIndex=(this.zIndex-1).toString(),this.dlgContainer.appendChild(this.dlgOverlay)},e.prototype.focusContentEle=function(t){var e,o=this,i=t.querySelectorAll('input,select,textarea,button,a,[contenteditable="true"]');this.focusElements=[],this.focusIndex=0;for(var n=0;n<i.length;n++)e=i[n],(e.clientHeight>0||"a"===e.tagName.toLowerCase()&&e.hasAttribute("href"))&&e.tabIndex>-1&&!e.disabled&&!this.disableElement(e,'[disabled],[aria-disabled="true"],[type="hidden"]')&&this.focusElements.push(e);if(0<this.focusElements.length){var s=[].slice.call(this.focusElements),r=s.some(function(t,e){return t.hasAttribute("autofocus")?(o.focusIndex=e,r=!0):r=!1,r});if(!r){var a=this.showCloseIcon&&this.focusElements.length>1?1:0,h=!l.isNullOrUndefined(this.contentEle)&&this.focusElements[a];if(h)this.focusIndex=this.focusElements.indexOf(h);else if(!l.isNullOrUndefined(this.primaryButtonEle)){var p=this.element.querySelector(".e-primary");this.focusIndex=this.focusElements.indexOf(p)}}var d=this.focusElements[this.focusIndex];d.focus(),this.bindEvent(d),d instanceof HTMLInputElement&&d.select()}},e.prototype.disableElement=function(t,e){var o=t?t.matches||t.webkitMatchesSelector||t.msMatchesSelector:null;if(o)for(;t;t=t.parentNode)if(t instanceof Element&&o.call(t,e))return t;return null},e.prototype.focusContent=function(){this.focusContentEle(this.element),0===this.focusElements.length&&(this.element.focus(),this.bindEvent(this.element))},e.prototype.bindEvent=function(t){a.EventHandler.add(t,"keydown",this.keyDown,this),a.EventHandler.add(t,"blur",this.focusOut,this)},e.prototype.unBindEvent=function(t){a.EventHandler.remove(t,"keydown",this.keyDown),a.EventHandler.remove(t,"blur",this.focusOut)},e.prototype.focusOut=function(t){var e=this,o=l.isNullOrUndefined(this.focusIndex)?this.element:this.focusElements[this.focusIndex];setTimeout(function(){var t=["input","select","textarea","button","a"],i=document.activeElement,n=t.indexOf(i.tagName.toLowerCase())>-1||i.hasAttribute("contenteditable")&&"true"===i.getAttribute("contenteditable");e.dialogOpen&&e.element.contains(i)&&(e.focusIndex=n?e.focusElements.indexOf(i):null,e.unBindEvent(o),e.bindEvent(l.isNullOrUndefined(e.focusIndex)?e.element:i))})},e.prototype.getModuleName=function(){return"dialog"},e.prototype.onPropertyChanged=function(t,e){for(var o=0,n=Object.keys(t);o<n.length;o++){switch(n[o]){case"content":l.isNullOrUndefined(this.content)||""===this.content?l.isNullOrUndefined(this.contentEle)||this.element.removeChild(this.contentEle):l.isNullOrUndefined(this.contentEle)||"dialog"===this.contentEle.getAttribute("role")?this.setContent():(this.contentEle.innerHTML="","string"==typeof this.content?this.contentEle.innerHTML=this.content:this.contentEle.appendChild(this.content),this.element.style.maxHeight=l.isNullOrUndefined(this.target)?window.innerHeight-20+"px":this.targetEle.offsetHeight-20+"px");break;case"header":""===this.header?i.detach(this.headerEle):this.element.getElementsByClassName("e-dlg-header").length>0?this.element.getElementsByClassName("e-dlg-header")[0].innerHTML=this.header:this.setHeader();break;case"footerTemplate":this.element.getElementsByClassName("e-footer-content").length>0?this.ftrTemplateContent.innerHTML=this.footerTemplate:this.setFooterTemplate();break;case"showCloseIcon":this.element.getElementsByClassName("e-icon-dlg-close").length>0?this.showCloseIcon||""!==this.header?this.showCloseIcon||i.detach(this.closeIcon):i.detach(this.headerContent):(this.renderCloseIcon(),this.wireEvents());break;case"locale":this.showCloseIcon&&this.closeIconTitle();break;case"visible":this.visible?this.show():this.hide();break;case"isModal":if(this.element.setAttribute("aria-modal",this.isModal?"true":"false"),this.isModal)this.setIsModal(),this.wireEvents(),l.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element));else{for(i.removeClass([this.element],"e-dlg-modal"),i.removeClass([document.body],"e-scroll-disabled"),i.detach(this.dlgOverlay);this.dlgContainer.firstChild;)this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild,this.dlgContainer);this.dlgContainer.parentElement.removeChild(this.dlgContainer)}break;case"height":i.setStyleAttribute(this.element,{height:l.formatUnit(t.height)});break;case"width":i.setStyleAttribute(this.element,{width:l.formatUnit(t.width)});break;case"zIndex":this.popupObj.zIndex=this.zIndex;break;case"cssClass":this.setCSSClass(e.cssClass);break;case"animationSettings":this.show();break;case"buttons":l.isNullOrUndefined(this.buttons[0].buttonModel)||""!==this.footerTemplate||(l.isNullOrUndefined(this.ftrTemplateContent)||(this.ftrTemplateContent.innerHTML=""),this.setButton());break;case"allowDragging":!this.allowDragging||this.isModal||l.isNullOrUndefined(this.headerContent)?this.dragObj.destroy():this.setAllowDragging();break;case"position":if(e.position.X===this.position.X&&e.position.Y===this.position.Y)break;if(!this.isModal){this.popupObj.position=this.position;break}this.dlgContainer.classList.remove("e-dlg-"+e.position.X+"-"+e.position.Y),this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y);break;case"enableRtl":this.setEnableRTL()}}},e.prototype.getPersistData=function(){return this.addOnPersist([])},e.prototype.destroy=function(){if(this.element.classList.contains(u)){this.unWireEvents(),t.prototype.destroy.call(this);var e=[u,"e-rtl","e-dlg-modal"];i.removeClass([this.element,this.element],e),this.popupObj.element.classList.contains("e-popup")&&this.popupObj.destroy(),l.isNullOrUndefined(this.btnObj)||this.btnObj.destroy(),this.isModal&&(i.detach(this.dlgOverlay),this.dlgContainer.parentNode.insertBefore(this.element,this.dlgContainer),this.dlgContainer.remove()),this.element.innerHTML=""}},e.prototype.wireEvents=function(){this.showCloseIcon&&a.EventHandler.add(this.closeIcon,"click",this.closeIconClickEventHandler,this),this.isModal&&a.EventHandler.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},e.prototype.unWireEvents=function(){if(this.showCloseIcon&&a.EventHandler.remove(this.closeIcon,"click",this.closeIconClickEventHandler),this.isModal&&a.EventHandler.remove(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler),!l.isNullOrUndefined(this.buttons[0].buttonModel))for(var t=0;t<this.buttons.length;t++)"function"==typeof this.buttons[t].click&&a.EventHandler.remove(this.ftrTemplateContent.children[t],"click",this.buttons[t].click)},e.prototype.refreshPosition=function(){this.popupObj.refreshPosition()},e.prototype.show=function(t){if(!this.element.classList.contains("e-popup-open")||!l.isNullOrUndefined(t)){l.isNullOrUndefined(t)||this.fullScreen(t),this.storeActiveElement=document.activeElement,this.element.tabIndex=-1,this.trigger("beforeOpen"),this.isModal&&!l.isNullOrUndefined(this.dlgOverlay)&&(this.dlgOverlay.style.display="block",this.dlgContainer.style.display="flex",l.isNullOrUndefined(this.targetEle)?i.addClass([document.body],"e-scroll-disabled"):(this.targetEle===document.body?this.dlgContainer.style.position="fixed":this.dlgContainer.style.position="absolute",this.dlgOverlay.style.position="absolute",this.element.style.position="relative",i.addClass([this.targetEle],"e-scroll-disabled")));var e={name:this.animationSettings.effect+"In",duration:this.animationSettings.duration,delay:this.animationSettings.delay};"None"===this.animationSettings.effect?this.popupObj.show():this.popupObj.show(e),this.dialogOpen=!0,this.visible=!0}},e.prototype.hide=function(){this.trigger("beforeClose"),this.isModal&&(this.dlgOverlay.style.display="none",l.isNullOrUndefined(this.targetEle)?i.removeClass([document.body],"e-scroll-disabled"):i.removeClass([this.targetEle],"e-scroll-disabled"));var t={name:this.animationSettings.effect+"Out",duration:this.animationSettings.duration,delay:this.animationSettings.delay};"None"===this.animationSettings.effect?this.popupObj.hide():this.popupObj.hide(t),this.dialogOpen=!1,this.visible=!1},e.prototype.fullScreen=function(t){this.element.offsetTop,this.element.offsetLeft;return t?(i.addClass([this.element],"e-dlg-fullscreen"),this.element.style.maxHeight=l.isNullOrUndefined(this.target)?window.innerHeight+"px":this.targetEle.offsetHeight+"px",i.addClass([document.body],"e-scroll-disabled"),this.allowDragging&&!l.isNullOrUndefined(this.dragObj)&&this.dragObj.destroy()):(i.removeClass([this.element],"e-dlg-fullscreen"),i.removeClass([document.body],"e-scroll-disabled"),!this.allowDragging||this.isModal||l.isNullOrUndefined(this.headerContent)||this.setAllowDragging()),t},e}(o.Component);r([o.Property("")],f.prototype,"content",void 0),r([o.Property(!1)],f.prototype,"showCloseIcon",void 0),r([o.Property(!1)],f.prototype,"isModal",void 0),r([o.Property("")],f.prototype,"header",void 0),r([o.Property(!0)],f.prototype,"visible",void 0),r([o.Property("auto")],f.prototype,"height",void 0),r([o.Property("100%")],f.prototype,"width",void 0),r([o.Property("")],f.prototype,"cssClass",void 0),r([o.Property()],f.prototype,"zIndex",void 0),r([o.Property(null)],f.prototype,"target",void 0),r([o.Property("")],f.prototype,"footerTemplate",void 0),r([o.Property(!1)],f.prototype,"allowDragging",void 0),r([o.Collection([{}],c)],f.prototype,"buttons",void 0),r([o.Property(!0)],f.prototype,"closeOnEscape",void 0),r([o.Property({effect:"Fade",duration:400,delay:0})],f.prototype,"animationSettings",void 0),r([o.Property({X:"center",Y:"center"})],f.prototype,"position",void 0),r([o.Property("")],f.prototype,"locale",void 0),r([o.Event()],f.prototype,"created",void 0),r([o.Event()],f.prototype,"open",void 0),r([o.Event()],f.prototype,"beforeOpen",void 0),r([o.Event()],f.prototype,"close",void 0),r([o.Event()],f.prototype,"beforeClose",void 0),r([o.Event()],f.prototype,"dragStart",void 0),r([o.Event()],f.prototype,"dragStop",void 0),r([o.Event()],f.prototype,"drag",void 0),r([o.Event()],f.prototype,"overlayClick",void 0),f=r([n.NotifyPropertyChanges],f),e.Dialog=f,e.dialogBuilder=o.CreateBuilder(f)}.apply(e,i))&&(t.exports=n)},function(t,o){t.exports=e},function(t,e,o){var i,n;i=[o,e,o(11)],void 0!==(n=function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}(o)}.apply(e,i))&&(t.exports=n)},function(t,e,o){var i,n,s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),r=this&&this.__decorate||function(t,e,o,i){var n,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,o,r):n(e,o))||r);return s>3&&r&&Object.defineProperty(e,o,r),r};i=[o,e,o(4),o(4),o(4),o(4),o(4),o(2),o(3),o(5)],void 0!==(n=function(t,e,o,i,n,l,a,h,p,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var c="e-tooltip",u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(o.ChildProperty);r([o.Property({effect:"FadeIn",duration:150,delay:0})],u.prototype,"open",void 0),r([o.Property({effect:"FadeOut",duration:150,delay:0})],u.prototype,"close",void 0),e.Animation=u;var f=function(t){function e(e,o){return t.call(this,e,o)||this}return s(e,t),e.prototype.initialize=function(){this.formatPosition(),l.addClass([this.element],c)},e.prototype.formatPosition=function(){0===this.position.indexOf("top")||0===this.position.indexOf("bottom")?(t=this.position.split(" "),this.tooltipPositionY=t[0],this.tooltipPositionX=t[1]):(e=this.position.split(" "),this.tooltipPositionX=e[0],this.tooltipPositionY=e[1]);var t,e},e.prototype.renderArrow=function(){this.setTipClass(this.position);var t=l.createElement("div",{className:"e-arrow-tip "+this.tipClass});t.appendChild(l.createElement("div",{className:"e-arrow-tip-outer "+this.tipClass})),t.appendChild(l.createElement("div",{className:"e-arrow-tip-inner "+this.tipClass})),this.tooltipEle.appendChild(t)},e.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"},e.prototype.renderPopup=function(t){var e=this.mouseTrail?{top:0,left:0}:this.getTooltipPosition(t);this.popupObj=new h.Popup(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)})},e.prototype.getTooltipPosition=function(t){var e=p.calculatePosition(t,this.tooltipPositionX,this.tooltipPositionY),o=this.calculateTooltipOffset(this.position);return this.collisionFlipFit(t,e.left+o.left,e.top+o.top)},e.prototype.reposition=function(t){var e=this.getTooltipPosition(t);this.popupObj.position={X:e.left,Y:e.top},this.popupObj.dataBind()},e.prototype.openPopupHandler=function(){this.trigger("afterOpen",this.tooltipEventArgs)},e.prototype.closePopupHandler=function(){this.clear(),this.trigger("afterClose",this.tooltipEventArgs)},e.prototype.calculateTooltipOffset=function(t){var e={top:0,left:0},o=this.tooltipEle.offsetWidth,i=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"right top":e.left+=s+l,e.top-=i-a;break;case"right center":e.left+=s+l,e.top-=i/2;break;case"right bottom":e.left+=s+l,e.top-=a;break;case"bottom right":e.top+=r+l,e.left-=h;break;case"bottom center":e.top+=r+l,e.left-=o/2;break;case"bottom left":e.top+=r+l,e.left-=o-h;break;case"left bottom":e.left-=s+o+l,e.top-=a;break;case"left center":e.left-=s+o+l,e.top-=i/2;break;case"left top":e.left-=s+o+l,e.top-=i-a;break;case"top left":e.top-=i+r+l,e.left-=o-h;break;case"top right":e.top-=i+r+l,e.left-=h;break;default:e.top-=i+r+l,e.left-=o/2}return e.left+=this.offsetX,e.top+=this.offsetY,e},e.prototype.updateTipPosition=function(t){var e=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"];l.removeClass(e,o),this.setTipClass(t),l.addClass(e,this.tipClass)},e.prototype.adjustArrow=function(t,e,o,i){if(!1!==this.showTipPointer){this.updateTipPosition(e);var n,s,r=this.tooltipEle.clientWidth,l=this.tooltipEle.clientHeight,a=this.tooltipEle.querySelector(".e-arrow-tip"),h=a.offsetWidth,p=a.offsetHeight;if("e-tip-bottom"===this.tipClass||"e-tip-top"===this.tipClass){s="e-tip-bottom"===this.tipClass?"100%":-p+"px";var d="center"!==o||r>t.offsetWidth||this.mouseTrail;n=d&&"left"===o||!d&&"end"===this.tipPointerPosition?r-h-2+"px":d&&"right"===o||!d&&"start"===this.tipPointerPosition?"2px":r/2-h/2+"px"}else{n="e-tip-right"===this.tipClass?r+"px":-h+"px";var d="center"!==i||l>t.offsetHeight||this.mouseTrail;s=d&&"top"===i||!d&&"end"===this.tipPointerPosition?l-p-2+"px":d&&"bottom"===i||!d&&"start"===this.tipPointerPosition?"2px":l/2-p/2+"px"}a.style.top=s,a.style.left=n}},e.prototype.renderContent=function(t){var e=this.tooltipEle.querySelector(".e-tip-content");if(t&&!n.isNullOrUndefined(t.getAttribute("title"))&&(t.setAttribute("data-content",t.getAttribute("title")),t.removeAttribute("title")),n.isNullOrUndefined(this.content))t&&!n.isNullOrUndefined(t.getAttribute("data-content"))&&(e.innerHTML=t.getAttribute("data-content"));else if("string"==typeof this.content)e.innerHTML=this.content;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(this.content)}},e.prototype.renderCloseIcon=function(){if(this.isSticky){var t=l.createElement("div",{className:"e-icons e-tooltip-close"});this.tooltipEle.appendChild(t),i.EventHandler.add(t,i.Browser.touchStartEvent,this.onStickyClose,this)}},e.prototype.addDescribedBy=function(t,e){var o=(t.getAttribute("aria-describedby")||"").split(/\s+/);o.indexOf(e)<0&&o.push(e),l.attributes(t,{"aria-describedby":o.join(" ").trim(),"data-tooltip-id":e})},e.prototype.removeDescribedBy=function(t){var e=t.getAttribute("data-tooltip-id"),o=(t.getAttribute("aria-describedby")||"").split(/\s+/),i=o.indexOf(e);-1!==i&&o.splice(i,1),t.removeAttribute("data-tooltip-id");var n=o.join(" ").trim();n?t.setAttribute("aria-describedby",n):t.removeAttribute("aria-describedby")},e.prototype.tapHoldHandler=function(t){clearTimeout(this.autoCloseTimer),this.targetHover(t.originalEvent)},e.prototype.touchEndHandler=function(t){var e=this;if(!this.isSticky){var o=function(){e.close()};this.autoCloseTimer=setTimeout(o,1500)}},e.prototype.targetClick=function(t){var e;e=this.target?l.closest(t.target,this.target):this.element,n.isNullOrUndefined(e)||(null===e.getAttribute("data-tooltip-id")?this.targetHover(t):this.hideTooltip(this.animation.close,t,e))},e.prototype.targetHover=function(t){var e;if(e=this.target?l.closest(t.target,this.target):this.element,!n.isNullOrUndefined(e)&&null===e.getAttribute("data-tooltip-id")){for(var o=[].slice.call(document.querySelectorAll("[data-tooltip-id= "+this.ctrlId+"_content]")),i=0,s=o;i<s.length;i++){var r=s[i];this.restoreElement(r)}this.showTooltip(e,this.animation.open,t),this.wireMouseEvents(t,e)}},e.prototype.showTooltip=function(t,e,o){var s=this;if(clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.tooltipEventArgs=o?{type:o.type,cancel:!1,target:t,event:o,element:this.tooltipEle}:{type:null,cancel:!1,target:t,event:null,element:this.tooltipEle},this.trigger("beforeRender",this.tooltipEventArgs),this.tooltipEventArgs.cancel)return this.isHidden=!0,void this.clear();if(this.isHidden=!1,n.isNullOrUndefined(this.tooltipEle)?(this.ctrlId=this.element.getAttribute("id")?n.getUniqueID(this.element.getAttribute("id")):n.getUniqueID("tooltip"),this.tooltipEle=l.createElement("div",{className:"e-tooltip-wrap e-popup",attrs:{role:"tooltip","aria-hidden":"false",id:this.ctrlId+"_content"},styles:"width:"+n.formatUnit(this.width)+";height:"+n.formatUnit(this.height)+";position:absolute;"}),this.cssClass&&l.addClass([this.tooltipEle],this.cssClass),i.Browser.isDevice&&l.addClass([this.tooltipEle],"e-bigger"),"auto"!==this.width&&(this.tooltipEle.style.maxWidth=n.formatUnit(this.width)),this.tooltipEle.appendChild(l.createElement("div",{className:"e-tip-content"})),document.body.appendChild(this.tooltipEle),this.addDescribedBy(t,this.ctrlId+"_content"),this.renderContent(t),l.addClass([this.tooltipEle],"e-popup-open"),this.showTipPointer&&this.renderArrow(),this.renderCloseIcon(),this.renderPopup(t)):(this.adjustArrow(t,this.position,this.tooltipPositionX,this.tooltipPositionY),this.addDescribedBy(t,this.ctrlId+"_content"),this.renderContent(t),i.Animation.stop(this.tooltipEle),this.reposition(t)),l.removeClass([this.tooltipEle],"e-popup-open"),l.addClass([this.tooltipEle],"e-popup-close"),this.tooltipEventArgs=o?{type:o.type,cancel:!1,target:t,event:o,element:this.tooltipEle}:{type:null,cancel:!1,target:t,event:null,element:this.tooltipEle},this.trigger("beforeOpen",this.tooltipEventArgs),this.tooltipEventArgs.cancel)return this.isHidden=!0,void this.clear();var r={name:e.effect,duration:e.duration,delay:e.delay,timingFunction:"easeOut"};if("None"===e.effect&&(r=void 0),this.openDelay>0){var a=function(){s.popupObj&&s.popupObj.show(r)};this.showTimer=setTimeout(a,this.openDelay)}else this.popupObj.show(r)},e.prototype.checkCollision=function(t,e,o){var i={left:e,top:o,position:this.position,horizontal:this.tooltipPositionX,vertical:this.tooltipPositionY},n=d.isCollide(this.tooltipEle,this.target?this.element:null,e,o);return n.length>0&&(i.horizontal=n.indexOf("left")>=0?"right":n.indexOf("right")>=0?"left":this.tooltipPositionX,i.vertical=n.indexOf("top")>=0?"bottom":n.indexOf("bottom")>=0?"top":this.tooltipPositionY),i},e.prototype.collisionFlipFit=function(t,e,o){var i=this.checkCollision(t,e,o),n=i.position;if(this.tooltipPositionY!==i.vertical&&(n=0===this.position.indexOf("bottom")||0===this.position.indexOf("top")?i.vertical+" "+this.tooltipPositionX:this.tooltipPositionX+" "+i.vertical),this.tooltipPositionX!==i.horizontal&&(0===n.indexOf("left")&&(i.vertical="left top"===n||"left center"===n?"top":"bottom",n=i.vertical+" left"),0===n.indexOf("right")&&(i.vertical="right top"===n||"right center"===n?"top":"bottom",n=i.vertical+" right"),i.horizontal=this.tooltipPositionX),i.position!==n){var s=p.calculatePosition(t,this.tooltipPositionX,i.vertical);this.adjustArrow(t,n,i.horizontal,i.vertical);var r=this.calculateTooltipOffset(n);i.position=n,i.left=s.left+r.left,i.top=s.top+r.top}else this.adjustArrow(t,n,i.horizontal,i.vertical);var l={left:i.left,top:i.top},a=d.fit(this.tooltipEle,this.target?this.element:null,{X:!0,Y:!1},l).left;if(this.showTipPointer&&(0===n.indexOf("bottom")||0===n.indexOf("top"))){var h=this.tooltipEle.querySelector(".e-arrow-tip"),c=parseInt(h.style.left,10)-(a-i.left);c<0?c=0:c+h.offsetWidth>this.tooltipEle.clientWidth&&(c=this.tooltipEle.clientWidth-h.offsetWidth),h.style.left=c.toString()+"px"}return l.left=a,l},e.prototype.hideTooltip=function(t,e,o){var i,s=this;if(e?(i=this.target?o||e.target:this.element,this.tooltipEventArgs={type:e.type,cancel:!1,target:i,event:e,element:this.tooltipEle}):(i=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]"),this.tooltipEventArgs={type:null,cancel:!1,target:i,event:null,element:this.tooltipEle}),!n.isNullOrUndefined(i))if(this.trigger("beforeClose",this.tooltipEventArgs),this.tooltipEventArgs.cancel)this.isHidden=!1;else{this.restoreElement(i),this.isHidden=!0;var r={name:t.effect,duration:t.duration,delay:t.delay,timingFunction:"easeIn"};if("None"===t.effect&&(r=void 0),this.closeDelay>0){var l=function(){s.popupObj&&s.popupObj.hide(r)};this.hideTimer=setTimeout(l,this.closeDelay)}else this.popupObj.hide(r)}},e.prototype.restoreElement=function(t){this.unwireMouseEvents(t),n.isNullOrUndefined(t.getAttribute("data-content"))||(t.setAttribute("title",t.getAttribute("data-content")),t.removeAttribute("data-content")),this.removeDescribedBy(t)},e.prototype.clear=function(){this.tooltipEle&&(l.removeClass([this.tooltipEle],"e-popup-close"),l.addClass([this.tooltipEle],"e-popup-open")),this.isHidden&&(this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&l.remove(this.tooltipEle),this.tooltipEle=null,this.popupObj=null)},e.prototype.onMouseOut=function(t){this.hideTooltip(this.animation.close,t)},e.prototype.onStickyClose=function(t){this.close()},e.prototype.onMouseMove=function(t){var e=0,o=0;t.type.indexOf("touch")>-1?(t.preventDefault(),e=t.touches[0].pageX,o=t.touches[0].pageY):(e=t.pageX,o=t.pageY),i.Animation.stop(this.tooltipEle),l.removeClass([this.tooltipEle],"e-popup-close"),l.addClass([this.tooltipEle],"e-popup-open"),this.adjustArrow(t.target,this.position,this.tooltipPositionX,this.tooltipPositionY);var n=this.calculateTooltipOffset(this.position),s=e+n.left+this.offsetX,r=o+n.top+this.offsetY,a=this.checkCollision(t.target,s,r);if(this.tooltipPositionX!==a.horizontal||this.tooltipPositionY!==a.vertical){var h=0===this.position.indexOf("bottom")||0===this.position.indexOf("top")?a.vertical+" "+a.horizontal:a.horizontal+" "+a.vertical;a.position=h,this.adjustArrow(t.target,a.position,a.horizontal,a.vertical);var p=this.calculateTooltipOffset(a.position);a.left=e+p.left+this.offsetX,a.top=o+p.top+this.offsetY}this.tooltipEle.style.left=a.left+"px",this.tooltipEle.style.top=a.top+"px"},e.prototype.keyDown=function(t){this.tooltipEle&&27===t.keyCode&&this.close()},e.prototype.touchEnd=function(t){this.tooltipEle&&null===l.closest(t.target,"."+c)&&this.close()},e.prototype.scrollHandler=function(t){this.tooltipEle&&this.close()},e.prototype.render=function(){this.initialize(),this.wireEvents(this.opensOn)},e.prototype.preRender=function(){this.tipClass="e-tip-bottom",this.tooltipPositionX="center",this.tooltipPositionY="top",this.isHidden=!0},e.prototype.wireEvents=function(t){for(var e=this.getTriggerList(t),o=0,n=e;o<n.length;o++){var s=n[o];if("custom"===s)return;"focus"===s&&this.wireFocusEvents(),"click"===s&&i.EventHandler.add(this.element,i.Browser.touchStartEvent,this.targetClick,this),"hover"===s&&(i.Browser.isDevice?(this.touchModule=new i.Touch(this.element,{tapHoldThreshold:500,tapHold:this.tapHoldHandler.bind(this)}),i.EventHandler.add(this.element,i.Browser.touchEndEvent,this.touchEndHandler,this)):i.EventHandler.add(this.element,"mouseover",this.targetHover,this))}i.EventHandler.add(document,"touchend",this.touchEnd,this),i.EventHandler.add(document,"scroll",this.scrollHandler,this),i.EventHandler.add(document,"keydown",this.keyDown,this)},e.prototype.getTriggerList=function(t){return"auto"===t&&(t=i.Browser.isDevice?"hover":"hover focus"),t.split(" ")},e.prototype.wireFocusEvents=function(){if(n.isNullOrUndefined(this.target))i.EventHandler.add(this.element,"focus",this.targetHover,this);else for(var t=[].slice.call(this.element.querySelectorAll(this.target)),e=0,o=t;e<o.length;e++){var s=o[e];i.EventHandler.add(s,"focus",this.targetHover,this)}},e.prototype.wireMouseEvents=function(t,e){this.isSticky||("focus"===t.type&&i.EventHandler.add(e,"blur",this.onMouseOut,this),"mouseover"===t.type&&i.EventHandler.add(e,"mouseleave",this.onMouseOut,this)),this.mouseTrail&&i.EventHandler.add(e,"mousemove touchstart",this.onMouseMove,this)},e.prototype.unwireEvents=function(t){for(var e=this.getTriggerList(t),o=0,n=e;o<n.length;o++){var s=n[o];if("custom"===s)return;"focus"===s&&this.unwireFocusEvents(),"click"===s&&i.EventHandler.remove(this.element,i.Browser.touchStartEvent,this.targetClick),"hover"===s&&(i.Browser.isDevice?(this.touchModule&&this.touchModule.destroy(),i.EventHandler.remove(this.element,i.Browser.touchEndEvent,this.touchEndHandler)):i.EventHandler.remove(this.element,"mouseover",this.targetHover))}i.EventHandler.remove(document,"touchend",this.touchEnd),i.EventHandler.remove(document,"scroll",this.scrollHandler),i.EventHandler.remove(document,"keydown",this.keyDown)},e.prototype.unwireFocusEvents=function(){if(n.isNullOrUndefined(this.target))i.EventHandler.remove(this.element,"focus",this.targetHover);else for(var t=[].slice.call(this.element.querySelectorAll(this.target)),e=0,o=t;e<o.length;e++){var s=o[e];i.EventHandler.remove(s,"focus",this.targetHover)}},e.prototype.unwireMouseEvents=function(t){if(!this.isSticky)for(var e=this.getTriggerList(this.opensOn),o=0,n=e;o<n.length;o++){var s=n[o];"focus"===s&&i.EventHandler.remove(t,"blur",this.onMouseOut),"hover"!==s||i.Browser.isDevice||i.EventHandler.remove(t,"mouseleave",this.onMouseOut)}this.mouseTrail&&i.EventHandler.remove(t,"mousemove touchstart",this.onMouseMove)},e.prototype.getModuleName=function(){return"tooltip"},e.prototype.getPersistData=function(){return this.addOnPersist([])},e.prototype.onPropertyChanged=function(t,e){for(var o=0,i=Object.keys(t);o<i.length;o++){switch(i[o]){case"width":this.tooltipEle&&(this.tooltipEle.style.width=n.formatUnit(t.width));break;case"height":this.tooltipEle&&(this.tooltipEle.style.height=n.formatUnit(t.height));break;case"content":this.tooltipEle&&this.renderContent();break;case"opensOn":this.unwireEvents(e.opensOn),this.wireEvents(t.opensOn);break;case"position":this.formatPosition();var s=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]");this.tooltipEle&&s&&this.reposition(s);break;case"tipPointerPosition":var r=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]");this.tooltipEle&&r&&this.reposition(r);break;case"offsetX":if(this.tooltipEle){var a=t.offsetX-e.offsetX;this.tooltipEle.style.left=(parseInt(this.tooltipEle.style.left,10)+a).toString()+"px"}break;case"offsetY":if(this.tooltipEle){var h=t.offsetY-e.offsetY;this.tooltipEle.style.top=(parseInt(this.tooltipEle.style.top,10)+h).toString()+"px"}break;case"cssClass":this.tooltipEle&&(e.cssClass&&l.removeClass([this.tooltipEle],e.cssClass),t.cssClass&&l.addClass([this.tooltipEle],t.cssClass));break;case"enableRtl":this.tooltipEle&&(this.enableRtl?l.addClass([this.tooltipEle],"e-rtl"):l.removeClass([this.tooltipEle],"e-rtl"))}}},e.prototype.open=function(t,e){void 0===e&&(e=this.animation.open),"none"!==t.style.display&&this.showTooltip(t,e)},e.prototype.close=function(t){void 0===t&&(t=this.animation.close),this.hideTooltip(t)},e.prototype.refresh=function(t){this.tooltipEle&&this.renderContent(t),this.popupObj&&t&&this.reposition(t)},e.prototype.destroy=function(){t.prototype.destroy.call(this),l.removeClass([this.element],c),this.unwireEvents(this.opensOn),this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&l.remove(this.tooltipEle),this.tooltipEle=null,this.popupObj=null},e}(o.Component);r([o.Property("auto")],f.prototype,"width",void 0),r([o.Property("auto")],f.prototype,"height",void 0),r([o.Property()],f.prototype,"content",void 0),r([o.Property()],f.prototype,"target",void 0),r([o.Property("top center")],f.prototype,"position",void 0),r([o.Property(0)],f.prototype,"offsetX",void 0),r([o.Property(0)],f.prototype,"offsetY",void 0),r([o.Property(!0)],f.prototype,"showTipPointer",void 0),r([o.Property("auto")],f.prototype,"tipPointerPosition",void 0),r([o.Property("auto")],f.prototype,"opensOn",void 0),r([o.Property(!1)],f.prototype,"mouseTrail",void 0),r([o.Property(!1)],f.prototype,"isSticky",void 0),r([a.Complex({},u)],f.prototype,"animation",void 0),r([o.Property(0)],f.prototype,"openDelay",void 0),r([o.Property(0)],f.prototype,"closeDelay",void 0),r([o.Property()],f.prototype,"cssClass",void 0),r([o.Property(!1)],f.prototype,"enableRtl",void 0),r([o.Event()],f.prototype,"beforeRender",void 0),r([o.Event()],f.prototype,"beforeOpen",void 0),r([o.Event()],f.prototype,"afterOpen",void 0),r([o.Event()],f.prototype,"beforeClose",void 0),r([o.Event()],f.prototype,"afterClose",void 0),r([o.Event()],f.prototype,"created",void 0),r([o.Event()],f.prototype,"destroyed",void 0),f=r([a.NotifyPropertyChanges],f),e.Tooltip=f,e.tooltipBuilder=o.CreateBuilder(f)}.apply(e,i))&&(t.exports=n)}])});

@@ -179,2 +179,3 @@ var __extends = (this && this.__extends) || (function () {

relateTo: this.target,
actionOnScroll: 'none',
open: function () {

@@ -568,2 +569,5 @@ _this.focusContent();

case 'position':
if (oldProp.position.X === this.position.X && oldProp.position.Y === this.position.Y) {
break;
}
if (this.isModal) {

@@ -603,2 +607,4 @@ this.dlgContainer.classList.remove('e-dlg-' + oldProp.position.X + '-' + oldProp.position.Y);

detach(this.dlgOverlay);
this.dlgContainer.parentNode.insertBefore(this.element, this.dlgContainer);
this.dlgContainer.remove();
}

@@ -649,2 +655,5 @@ this.element.innerHTML = '';

}
else {
this.dlgContainer.style.position = 'absolute';
}
this.dlgOverlay.style.position = 'absolute';

@@ -651,0 +660,0 @@ this.element.style.position = 'relative';

@@ -67,2 +67,10 @@ var __extends = (this && this.__extends) || (function () {

break;
case 'actionOnScroll':
if (newProp.actionOnScroll !== 'none') {
this.wireScrollEvents();
}
else {
this.unwireScrollEvents();
}
break;
}

@@ -103,2 +111,7 @@ }

}
if (this.actionOnScroll !== 'none') {
this.wireScrollEvents();
}
};
Popup.prototype.wireScrollEvents = function () {
if (this.getRelateToElement()) {

@@ -115,2 +128,7 @@ for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {

}
if (this.actionOnScroll !== 'none') {
this.unwireScrollEvents();
}
};
Popup.prototype.unwireScrollEvents = function () {
if (this.getRelateToElement()) {

@@ -138,14 +156,28 @@ for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {

}
if (this.getRelateToElement()) {
var targetVisible = this.isElementOnViewport(this.getRelateToElement());
if (!targetVisible && !this.targetInvisibleStatus) {
this.trigger('targetExitViewport');
this.targetInvisibleStatus = true;
if (this.actionOnScroll !== 'none') {
if (this.getRelateToElement()) {
var targetVisible = this.isElementOnViewport(this.getRelateToElement(), e.target);
if (!targetVisible && !this.targetInvisibleStatus) {
this.trigger('targetExitViewport');
this.targetInvisibleStatus = true;
}
else if (targetVisible) {
this.targetInvisibleStatus = false;
}
}
else if (targetVisible) {
this.targetInvisibleStatus = false;
}
};
Popup.prototype.isElementOnViewport = function (relateToElement, scrollElement) {
var scrollParents = this.getScrollableParent(relateToElement);
for (var parent_3 = 0; parent_3 < scrollParents.length; parent_3++) {
if (this.isElementVisible(relateToElement, scrollParents[parent_3])) {
continue;
}
else {
return false;
}
}
return true;
};
Popup.prototype.isElementOnViewport = function (relateToElement) {
Popup.prototype.isElementVisible = function (relateToElement, scrollElement) {
var rect = relateToElement.getBoundingClientRect();

@@ -155,26 +187,35 @@ if (!rect.height || !rect.width) {

}
var win = window;
var windowView = {
top: win.scrollY,
left: win.scrollX,
right: win.scrollX + win.outerWidth,
bottom: win.scrollY + win.outerHeight
};
var off = calculatePosition(relateToElement);
var ele = {
top: off.top,
left: off.left,
right: off.left + rect.width,
bottom: off.top + rect.height
};
var elementView = {
top: windowView.bottom - ele.top,
left: windowView.right - ele.left,
bottom: ele.bottom - windowView.top,
right: ele.right - windowView.left
};
return elementView.top > 0
&& elementView.left > 0
&& elementView.right > 0
&& elementView.bottom > 0;
if (scrollElement.getBoundingClientRect) {
var parent_4 = scrollElement.getBoundingClientRect();
return !(rect.bottom < parent_4.top) &&
(!(rect.bottom > parent_4.bottom) &&
(!(rect.right > parent_4.right) &&
!(rect.left < parent_4.left)));
}
else {
var win = window;
var windowView = {
top: win.scrollY,
left: win.scrollX,
right: win.scrollX + win.outerWidth,
bottom: win.scrollY + win.outerHeight
};
var off = calculatePosition(relateToElement);
var ele = {
top: off.top,
left: off.left,
right: off.left + rect.width,
bottom: off.top + rect.height
};
var elementView = {
top: windowView.bottom - ele.top,
left: windowView.right - ele.left,
bottom: ele.bottom - windowView.top,
right: ele.right - windowView.left
};
return elementView.top > 0
&& elementView.left > 0
&& elementView.right > 0
&& elementView.bottom > 0;
}
};

@@ -373,11 +414,16 @@ Popup.prototype.preRender = function () {

Popup.prototype.getScrollableParent = function (element) {
var parentElements = [];
while (element.parentElement && element.parentElement.tagName !== 'HTML') {
if (element.parentElement.style.overflow !== 'visible') {
parentElements.push(element.parentElement);
var eleStyle = getComputedStyle(element);
var scrollParents = [];
var overflowRegex = /(auto|scroll)/;
var parent = element.parentElement;
while (parent && parent.tagName !== 'HTML') {
var parentStyle = getComputedStyle(parent);
if (!(eleStyle.position === 'absolute' && parentStyle.position === 'static')
&& overflowRegex.test(parentStyle.overflow + parentStyle.overflowY + parentStyle.overflowX)) {
scrollParents.push(parent);
}
element = element.parentElement;
parent = parent.parentElement;
}
parentElements.push(window);
return parentElements;
scrollParents.push(document);
return scrollParents;
};

@@ -384,0 +430,0 @@ return Popup;

@@ -331,3 +331,3 @@ var __extends = (this && this.__extends) || (function () {

else {
this.onMouseOut(e);
this.hideTooltip(this.animation.close, e, target);
}

@@ -488,7 +488,7 @@ };

};
Tooltip.prototype.hideTooltip = function (hideAnimation, e) {
Tooltip.prototype.hideTooltip = function (hideAnimation, e, targetElement) {
var _this = this;
var target;
if (e) {
target = this.target ? e.target : this.element;
target = this.target ? (targetElement || e.target) : this.element;
this.tooltipEventArgs = {

@@ -775,2 +775,8 @@ type: e.type, cancel: false, target: target, event: e, element: this.tooltipEle

break;
case 'tipPointerPosition':
var trgt = document.querySelector('[data-tooltip-id= ' + this.ctrlId + '_content]');
if (this.tooltipEle && trgt) {
this.reposition(trgt);
}
break;
case 'offsetX':

@@ -777,0 +783,0 @@ if (this.tooltipEle) {

{
"name": "@syncfusion/ej2-popups",
"version": "1.0.14",
"version": "1.0.16",
"description": "Essential JS 2 popup Component",

@@ -9,3 +9,3 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "^1.0.14",
"@syncfusion/ej2-base": "^1.0.16",
"@syncfusion/ej2-buttons": "^1.0.14"

@@ -12,0 +12,0 @@ },

@@ -174,2 +174,3 @@ var __extends = (this && this.__extends) || (function () {

relateTo: this.target,
actionOnScroll: 'none',
open: function () {

@@ -563,2 +564,5 @@ _this.focusContent();

case 'position':
if (oldProp.position.X === this.position.X && oldProp.position.Y === this.position.Y) {
break;
}
if (this.isModal) {

@@ -598,2 +602,4 @@ this.dlgContainer.classList.remove('e-dlg-' + oldProp.position.X + '-' + oldProp.position.Y);

ej2_base_2.detach(this.dlgOverlay);
this.dlgContainer.parentNode.insertBefore(this.element, this.dlgContainer);
this.dlgContainer.remove();
}

@@ -644,2 +650,5 @@ this.element.innerHTML = '';

}
else {
this.dlgContainer.style.position = 'absolute';
}
this.dlgOverlay.style.position = 'absolute';

@@ -646,0 +655,0 @@ this.element.style.position = 'relative';

@@ -38,3 +38,3 @@ import { AnimationModel, EmitType, Component } from '@syncfusion/ej2-base';

*/
export declare type ActionOnScrollType = 'reposition' | 'hide';
export declare type ActionOnScrollType = 'reposition' | 'hide' | 'none';
/**

@@ -181,3 +181,5 @@ * Target element type.

private wireEvents();
private wireScrollEvents();
private unwireEvents();
private unwireScrollEvents();
private getRelateToElement();

@@ -190,3 +192,4 @@ private scrollRefresh(e);

*/
private isElementOnViewport(relateToElement);
private isElementOnViewport(relateToElement, scrollElement);
private isElementVisible(relateToElement, scrollElement);
/**

@@ -193,0 +196,0 @@ * Initialize the event handler

@@ -62,2 +62,10 @@ var __extends = (this && this.__extends) || (function () {

break;
case 'actionOnScroll':
if (newProp.actionOnScroll !== 'none') {
this.wireScrollEvents();
}
else {
this.unwireScrollEvents();
}
break;
}

@@ -98,2 +106,7 @@ }

}
if (this.actionOnScroll !== 'none') {
this.wireScrollEvents();
}
};
Popup.prototype.wireScrollEvents = function () {
if (this.getRelateToElement()) {

@@ -110,2 +123,7 @@ for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {

}
if (this.actionOnScroll !== 'none') {
this.unwireScrollEvents();
}
};
Popup.prototype.unwireScrollEvents = function () {
if (this.getRelateToElement()) {

@@ -133,14 +151,28 @@ for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {

}
if (this.getRelateToElement()) {
var targetVisible = this.isElementOnViewport(this.getRelateToElement());
if (!targetVisible && !this.targetInvisibleStatus) {
this.trigger('targetExitViewport');
this.targetInvisibleStatus = true;
if (this.actionOnScroll !== 'none') {
if (this.getRelateToElement()) {
var targetVisible = this.isElementOnViewport(this.getRelateToElement(), e.target);
if (!targetVisible && !this.targetInvisibleStatus) {
this.trigger('targetExitViewport');
this.targetInvisibleStatus = true;
}
else if (targetVisible) {
this.targetInvisibleStatus = false;
}
}
else if (targetVisible) {
this.targetInvisibleStatus = false;
}
};
Popup.prototype.isElementOnViewport = function (relateToElement, scrollElement) {
var scrollParents = this.getScrollableParent(relateToElement);
for (var parent_3 = 0; parent_3 < scrollParents.length; parent_3++) {
if (this.isElementVisible(relateToElement, scrollParents[parent_3])) {
continue;
}
else {
return false;
}
}
return true;
};
Popup.prototype.isElementOnViewport = function (relateToElement) {
Popup.prototype.isElementVisible = function (relateToElement, scrollElement) {
var rect = relateToElement.getBoundingClientRect();

@@ -150,26 +182,35 @@ if (!rect.height || !rect.width) {

}
var win = window;
var windowView = {
top: win.scrollY,
left: win.scrollX,
right: win.scrollX + win.outerWidth,
bottom: win.scrollY + win.outerHeight
};
var off = position_1.calculatePosition(relateToElement);
var ele = {
top: off.top,
left: off.left,
right: off.left + rect.width,
bottom: off.top + rect.height
};
var elementView = {
top: windowView.bottom - ele.top,
left: windowView.right - ele.left,
bottom: ele.bottom - windowView.top,
right: ele.right - windowView.left
};
return elementView.top > 0
&& elementView.left > 0
&& elementView.right > 0
&& elementView.bottom > 0;
if (scrollElement.getBoundingClientRect) {
var parent_4 = scrollElement.getBoundingClientRect();
return !(rect.bottom < parent_4.top) &&
(!(rect.bottom > parent_4.bottom) &&
(!(rect.right > parent_4.right) &&
!(rect.left < parent_4.left)));
}
else {
var win = window;
var windowView = {
top: win.scrollY,
left: win.scrollX,
right: win.scrollX + win.outerWidth,
bottom: win.scrollY + win.outerHeight
};
var off = position_1.calculatePosition(relateToElement);
var ele = {
top: off.top,
left: off.left,
right: off.left + rect.width,
bottom: off.top + rect.height
};
var elementView = {
top: windowView.bottom - ele.top,
left: windowView.right - ele.left,
bottom: ele.bottom - windowView.top,
right: ele.right - windowView.left
};
return elementView.top > 0
&& elementView.left > 0
&& elementView.right > 0
&& elementView.bottom > 0;
}
};

@@ -368,11 +409,16 @@ Popup.prototype.preRender = function () {

Popup.prototype.getScrollableParent = function (element) {
var parentElements = [];
while (element.parentElement && element.parentElement.tagName !== 'HTML') {
if (element.parentElement.style.overflow !== 'visible') {
parentElements.push(element.parentElement);
var eleStyle = getComputedStyle(element);
var scrollParents = [];
var overflowRegex = /(auto|scroll)/;
var parent = element.parentElement;
while (parent && parent.tagName !== 'HTML') {
var parentStyle = getComputedStyle(parent);
if (!(eleStyle.position === 'absolute' && parentStyle.position === 'static')
&& overflowRegex.test(parentStyle.overflow + parentStyle.overflowY + parentStyle.overflowX)) {
scrollParents.push(parent);
}
element = element.parentElement;
parent = parent.parentElement;
}
parentElements.push(window);
return parentElements;
scrollParents.push(document);
return scrollParents;
};

@@ -379,0 +425,0 @@ return Popup;

@@ -261,3 +261,3 @@ import { Component, ChildProperty, BaseEventArgs } from '@syncfusion/ej2-base';

private collisionFlipFit(target, x, y);
private hideTooltip(hideAnimation, e?);
private hideTooltip(hideAnimation, e?, targetElement?);
private restoreElement(target);

@@ -264,0 +264,0 @@ private clear();

@@ -326,3 +326,3 @@ var __extends = (this && this.__extends) || (function () {

else {
this.onMouseOut(e);
this.hideTooltip(this.animation.close, e, target);
}

@@ -483,7 +483,7 @@ };

};
Tooltip.prototype.hideTooltip = function (hideAnimation, e) {
Tooltip.prototype.hideTooltip = function (hideAnimation, e, targetElement) {
var _this = this;
var target;
if (e) {
target = this.target ? e.target : this.element;
target = this.target ? (targetElement || e.target) : this.element;
this.tooltipEventArgs = {

@@ -770,2 +770,8 @@ type: e.type, cancel: false, target: target, event: e, element: this.tooltipEle

break;
case 'tipPointerPosition':
var trgt = document.querySelector('[data-tooltip-id= ' + this.ctrlId + '_content]');
if (this.tooltipEle && trgt) {
this.reposition(trgt);
}
break;
case 'offsetX':

@@ -772,0 +778,0 @@ if (this.tooltipEle) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc