UNPKG

@syncfusion/ej2-popups

Version:

A package of Essential JS 2 popup components such as Dialog and Tooltip that is used to display information or messages in separate pop-ups.

12 lines 111 kB
/*!
*  filename: ej2-popups.min.js
*  version : 29.1.37
*  Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
*  Use of this code is subject to the terms of our license.
*  A copy of the current license can be obtained at any time by e-mailing
*  licensing@syncfusion.com. Any infringement will be prosecuted under
*  applicable laws. 
*/
this.ej=this.ej||{},this.ej.popups=function(t,e,i){"use strict";function o(t,i){var o=!1,n={left:0,top:0},s=t;if(!t||!i)return n;for(e.isNullOrUndefined(i.offsetParent)&&"fixed"===i.style.position&&(o=!0);(i.offsetParent||o)&&t&&i.offsetParent!==t;)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;for(t=s;(i.offsetParent||o)&&t&&i.offsetParent!==t;)n.left-=t.scrollLeft,n.top-=t.scrollTop,t=t.parentElement;return n}function n(t,e,i,o,n){if(oe=void 0,oe=n,ge=!!o,!t)return{left:0,top:0};e||(e="left"),i||(i="top"),se=t.ownerDocument,ne=t;var s={left:0,top:0};return r(e.toLowerCase(),i.toLowerCase(),s)}function s(t,e){e.left=t}function l(t,e){e.top=t}function r(t,e,i){switch(ie=ne.getBoundingClientRect(),e+t){case"topcenter":s(m(),i),l(c(),i);break;case"topright":s(f(),i),l(c(),i);break;case"centercenter":s(m(),i),l(p(),i);break;case"centerright":s(f(),i),l(p(),i);break;case"centerleft":s(u(),i),l(p(),i);break;case"bottomcenter":s(m(),i),l(d(),i);break;case"bottomright":s(f(),i),l(d(),i);break;case"bottomleft":s(u(),i),l(d(),i);break;default:case"topleft":s(u(),i),l(c(),i)}return ne=null,i}function a(){return se.documentElement.scrollTop||se.body.scrollTop}function h(){return se.documentElement.scrollLeft||se.body.scrollLeft}function d(){return ge?ie.bottom:ie.bottom+a()}function p(){return c()+ie.height/2}function c(){return ge?ie.top:ie.top+a()}function u(){return ie.left+h()}function f(){var t=ne&&((ne.classList.contains("e-date-wrapper")||ne.classList.contains("e-datetime-wrapper"))&&ne.classList.contains("e-rtl")||ne.classList.contains("e-ddl")&&ne.classList.contains("e-rtl")||ne.classList.contains("e-date-range-wrapper"))?oe?oe.width:0:oe&&ie.width>=oe.width?oe.width:0;return ne&&ne.classList.contains("e-rtl")&&ne.classList.contains("e-multiselect")&&(t=oe.width),ie.right+h()-t}function m(){return u()+ie.width/2}function g(t,e,i,o){if(void 0===e&&(e=null),void 0===i&&(i={X:!1,Y:!1}),!i.Y&&!i.X)return{left:0,top:0};var s=t.getBoundingClientRect();if(re=e,le=t.ownerDocument,o||(o=n(t,"left","top")),i.X){var l=re?x():Y(),r=L(),a=M(),h=r-o.left,d=o.left+s.width-a;s.width>l?o.left=h>0&&d<=0?a-s.width:d>0&&h<=0?r:h>d?a-s.width:r:h>0?o.left+=h:d>0&&(o.left-=d)}if(i.Y){var p=re?U():I(),c=k(),u=R(),f=c-o.top,m=o.top+s.height-u;s.height>p?o.top=f>0&&m<=0?u-s.height:m>0&&f<=0?c:f>m?u-s.height:c:f>0?o.top+=f:m>0&&(o.top-=m)}return o}function y(t,e,i,o){void 0===e&&(e=null);var s=n(t,"left","top");i&&(s.left=i),o&&(s.top=o);var l=[];re=e,le=t.ownerDocument;var r=t.getBoundingClientRect(),a=s.top,h=s.left,d=s.left+r.width,p=S(a,s.top+r.height),c=N(h,d);return p.topSide&&l.push("top"),c.rightSide&&l.push("right"),c.leftSide&&l.push("left"),p.bottomSide&&l.push("bottom"),l}function v(t,e,i,o,n,s,l,r,a){if(void 0===l&&(l=null),void 0===r&&(r={X:!0,Y:!0}),e&&t&&n&&s&&(r.X||r.Y)){var h,d={TL:null,TR:null,BL:null,BR:null},p={TL:null,TR:null,BL:null,BR:null};if("none"===window.getComputedStyle(t).display){var c=t.style.visibility;t.style.visibility="hidden",t.style.display="block",h=t.getBoundingClientRect(),t.style.removeProperty("display"),t.style.visibility=c}else h=t.getBoundingClientRect();var u={posX:n,posY:s,offsetX:i,offsetY:o,position:{left:0,top:0}};re=l,le=e.ownerDocument,C(e,d,u,a,h),w(p,u,h),r.X&&T(e,p,d,u,h,!0),r.Y&&d.TL.top>-1&&P(e,p,d,u,h,!0),b(t,u,h)}}function b(t,e,i){var o=0,s=0;if(null!=t.offsetParent&&("absolute"===getComputedStyle(t.offsetParent).position||"relative"===getComputedStyle(t.offsetParent).position)){var l=n(t.offsetParent,"left","top",!1,i);o=l.left,s=l.top}var r=1,a=1,h=O(t);if(h){var d=getComputedStyle(h).transform;if("none"!==d){var p=new DOMMatrix(d);r=p.a,a=p.d}if("none"!==getComputedStyle(h).zoom){var c=E(document.body);r*=c,a*=c}}t.style.top=e.position.top/a+e.offsetY-s/a+"px",t.style.left=e.position.left/r+e.offsetX-o/r+"px"}function E(t){var e=getComputedStyle(t).zoom;return parseFloat(e)||1}function O(t){for(;t;){var e=window.getComputedStyle(t).transform,i=E(document.body);if(e&&"none"!==e||i&&1!==i)return t;if(t===document.body)return null;t=t.offsetParent||t.parentElement}return null}function C(t,e,i,o,s){i.position=n(t,i.posX,i.posY,o,s),e.TL=n(t,"left","top",o,s),e.TR=n(t,"right","top",o,s),e.BR=n(t,"left","bottom",o,s),e.BL=n(t,"right","bottom",o,s)}function w(t,e,i){t.TL={top:e.position.top+e.offsetY,left:e.position.left+e.offsetX},t.TR={top:t.TL.top,left:t.TL.left+i.width},t.BL={top:t.TL.top+i.height,left:t.TL.left},t.BR={top:t.TL.top+i.height,left:t.TL.left+i.width}}function N(t,e){var i=!1,o=!1;return t-A()<L()&&(i=!0),e>M()&&(o=!0),{leftSide:i,rightSide:o}}function T(t,e,i,o,s,l){var r=N(e.TL.left,e.TR.left);i.TL.left-A()<=L()&&(r.leftSide=!1),i.TR.left>M()&&(r.rightSide=!1),(r.leftSide&&!r.rightSide||!r.leftSide&&r.rightSide)&&("right"===o.posX?o.posX="left":o.posX="right",o.offsetX=o.offsetX+s.width,o.offsetX=-1*o.offsetX,o.position=n(t,o.posX,o.posY,!1),w(e,o,s),l&&T(t,e,i,o,s,!1))}function P(t,e,i,o,s,l){var r=S(e.TL.top,e.BL.top);i.TL.top-z()<=k()&&(r.topSide=!1),i.BL.top>=R()&&t.getBoundingClientRect().bottom<window.innerHeight&&(r.bottomSide=!1),(r.topSide&&!r.bottomSide||!r.topSide&&r.bottomSide)&&("top"===o.posY?o.posY="bottom":o.posY="top",o.offsetY=o.offsetY+s.height,o.offsetY=-1*o.offsetY,o.position=n(t,o.posX,o.posY,!1,s),w(e,o,s),l&&P(t,e,i,o,s,!1))}function S(t,e){var i=!1,o=!1;return t-z()<k()&&(i=!0),e>R()&&(o=!0),{topSide:i,bottomSide:o}}function x(){return re.getBoundingClientRect().width}function U(){return re.getBoundingClientRect().height}function H(){return re.getBoundingClientRect().left}function B(){return re.getBoundingClientRect().top}function k(){return re?B():0}function L(){return re?H():0}function M(){return re?A()+H()+x():A()+Y()}function R(){return re?z()+B()+U():z()+I()}function z(){return le.documentElement.scrollTop||le.body.scrollTop}function A(){return le.documentElement.scrollLeft||le.body.scrollLeft}function I(){return window.innerHeight}function Y(){var t=window.innerWidth,i=document.documentElement.getBoundingClientRect();return t-(t-(e.isNullOrUndefined(document.documentElement)?0:i.width))}function D(){re=null,le=null}function X(t,e){for(var i=getComputedStyle(t),o=[],n=/(auto|scroll)/,s=t.parentElement;s&&"HTML"!==s.tagName;){var l=getComputedStyle(s);"absolute"===i.position&&"static"===l.position||!n.test(l.overflow+l.overflowY+l.overflowX)||o.push(s),s=s.parentElement}return e||o.push(document),o}function j(t){for(var i=t.parentElement,o=[];i&&"BODY"!==i.tagName;){var n=document.defaultView.getComputedStyle(i,null).getPropertyValue("z-index"),s=document.defaultView.getComputedStyle(i,null).getPropertyValue("position");"auto"!==n&&"static"!==s&&o.push(n),i=i.parentElement}for(var l=[],r=0;r<document.body.children.length;r++)if(!t.isEqualNode(document.body.children[r])){var n=document.defaultView.getComputedStyle(document.body.children[r],null).getPropertyValue("z-index"),s=document.defaultView.getComputedStyle(document.body.children[r],null).getPropertyValue("position");"auto"!==n&&"static"!==s&&l.push(n)}l.push("999");var a=[];if(!e.isNullOrUndefined(t.parentElement)&&"BODY"!==t.parentElement.tagName)for(var h=[].slice.call(t.parentElement.children),r=0;r<h.length;r++)if(!t.isEqualNode(h[r])){var n=document.defaultView.getComputedStyle(h[r],null).getPropertyValue("z-index"),s=document.defaultView.getComputedStyle(h[r],null).getPropertyValue("position");"auto"!==n&&"static"!==s&&a.push(n)}var d=o.concat(l,a),p=Math.max.apply(Math,d)+1;return p>2147483647?2147483647:p}function F(t){void 0===t&&(t=["*"]);for(var e=[],i=0;i<t.length;i++)for(var o=document.getElementsByTagName(t[i]),n=0;n<o.length;n++){var s=document.defaultView.getComputedStyle(o[n],null).getPropertyValue("z-index"),l=document.defaultView.getComputedStyle(o[n],null).getPropertyValue("position");"auto"!==s&&"static"!==l&&e.push(s)}var r=Math.max.apply(Math,e)+1;return r>2147483647?2147483647:r}function q(t){Re=t.resizeBegin,ze=t.resizing,Ae=t.resizeComplete,ae=V(t.element),fe=V(t.boundary);for(var i=t.direction.split(" "),o=0;o<i.length;o++)if(xe.indexOf(i[o])>=0&&i[o])W(i[o]);else if(""!==i[o].trim()){var n=e.createElement("div",{className:"e-icons "+we+" e-"+i[o]});ae.appendChild(n)}de=t.minHeight,ce=t.minWidth,ue=t.maxWidth,pe=t.maxHeight,t.proxy&&t.proxy.element&&t.proxy.element.classList.contains("e-dialog")?_(t.proxy):_()}function W(t){J();var i=e.createElement("span",{attrs:{unselectable:"on",contenteditable:"false"}});i.setAttribute("class","e-dialog-border-resize e-"+t),"south"===t&&(i.style.height="2px",i.style.width="100%",i.style.bottom="0px",i.style.left="0px"),"north"===t&&(i.style.height="2px",i.style.width="100%",i.style.top="0px",i.style.left="0px"),"east"===t&&(i.style.height="100%",i.style.width="2px",i.style.right="0px",i.style.top="0px"),"west"===t&&(i.style.height="100%",i.style.width="2px",i.style.left="0px",i.style.top="0px"),ae.appendChild(i)}function V(t){var i;return e.isNullOrUndefined(t)||(i="string"==typeof t?document.querySelector(t):t),i}function _(t){for(var i=t||this,o=ae.querySelectorAll("."+we),n=0;n<o.length;n++){he=o[n],e.EventHandler.add(he,"mousedown",G,i);l="msie"===e.Browser.info.name?"pointerdown":"touchstart";e.EventHandler.add(he,l,Q,i)}var s=ae.querySelectorAll(".e-dialog-border-resize");if(!e.isNullOrUndefined(s))for(n=0;n<s.length;n++){he=s[n],e.EventHandler.add(he,"mousedown",G,i);var l="msie"===e.Browser.info.name?"pointerdown":"touchstart";e.EventHandler.add(he,l,Q,i)}}function Z(t){return t.indexOf("mouse")>-1?"mouse":"touch"}function G(t){if(t.preventDefault(),ae=t.target.parentElement,J(),Le=t.pageX,Me=t.pageY,t.target.classList.add(Ne),e.isNullOrUndefined(Re)||!0!==Re(t,this)){this.targetEle&&ae&&ae.querySelector("."+Te)&&(fe="body"===this.target?null:this.targetEle,ue=this.targetEle.clientWidth,pe=this.targetEle.clientHeight);var i=e.isNullOrUndefined(fe)?document:fe;e.EventHandler.add(i,"mousemove",$,this),e.EventHandler.add(document,"mouseup",K,this);for(var o=0;o<Pe.length;o++)Ie=!ae.classList.contains(Pe[o])}}function K(t){var i="msie"===e.Browser.info.name?"pointermove":"touchmove",o="msie"===e.Browser.info.name?"pointerup":"touchend",n=e.isNullOrUndefined(fe)?document:fe,s="msie"===e.Browser.info.name?"pointerdown":"touchstart";e.EventHandler.remove(n,"mousemove",$),e.EventHandler.remove(n,i,$),e.EventHandler.remove(n,s,$),e.isNullOrUndefined(document.body.querySelector("."+Ne))||document.body.querySelector("."+Ne).classList.remove(Ne),e.isNullOrUndefined(Ae)||Ae(t,this),e.EventHandler.remove(document,"mouseup",K),e.EventHandler.remove(document,o,K)}function J(){Ue=parseFloat(getComputedStyle(ae,null).getPropertyValue("width").replace("px","")),He=parseFloat(getComputedStyle(ae,null).getPropertyValue("height").replace("px","")),Be=ae.getBoundingClientRect().left,ke=ae.getBoundingClientRect().top}function Q(t){ae=t.target.parentElement,J();var i=ae.classList.contains("e-dialog");(t.target.classList.contains(we)||t.target.classList.contains("e-dialog-border-resize"))&&i&&t.target.classList.add(Ne);var o=t.touches?t.changedTouches[0]:t;if(Le=o.pageX,Me=o.pageY,e.isNullOrUndefined(Re)||!0!==Re(t,this)){var n="msie"===e.Browser.info.name?"pointermove":"touchmove",s="msie"===e.Browser.info.name?"pointerup":"touchend",l=e.isNullOrUndefined(fe)?document:fe;e.EventHandler.add(l,n,$,this),e.EventHandler.add(document,s,K,this)}}function $(t){if(t.target.classList.contains(we)&&t.target.classList.contains(Ne)?he=t.target:e.isNullOrUndefined(document.body.querySelector("."+Ne))||(he=document.body.querySelector("."+Ne)),!e.isNullOrUndefined(he)){for(var i="",o=0;o<Ce.length;o++)he.classList.contains("e-"+Ce[o])&&(i=Ce[o]);switch(e.isNullOrUndefined(ze)||ze(t,this),i){case"south":et(t);break;case"north":it(t);break;case"west":ot(t);break;case"east":nt(t);break;case"south-east":et(t),nt(t);break;case"south-west":et(t),ot(t);break;case"north-east":it(t),nt(t);break;case"north-west":it(t),ot(t)}}}function tt(t){return t.getBoundingClientRect()}function et(t){var i,o=document.documentElement.clientHeight,n=!1,s=(t.touches?t.changedTouches[0]:t).pageY,l=tt(ae);e.isNullOrUndefined(fe)||(i=tt(fe)),e.isNullOrUndefined(fe)?e.isNullOrUndefined(fe)&&(o-s>=0||l.top<0)&&(n=!0):n=!0;var r=He+(s-Me);r=r>de?r:de;var a=0;e.isNullOrUndefined(fe)||(a=i.top);var h=e.isNullOrUndefined(fe)?0:fe.offsetHeight-fe.clientHeight,d=l.top-a-h/2;if(d=d<0?0:d,l.top>0&&d+r>pe){if(n=!1,ae.classList.contains(Se))return;return void(ae.style.height=pe-parseInt(d.toString(),10)+"px")}var p=0;if(n){l.top<0&&o+(l.height+l.top)>0&&r+(p=l.top)<=30&&(r=l.height-(l.height+l.top)+30),r+l.top>=pe&&(ae.style.height=l.height+(o-(l.height+l.top))+"px");var c=e.isNullOrUndefined(fe)?p:d;r>=de&&r+c<=pe&&(ae.style.height=r+"px")}}function it(t){var i,o=!1,n="mouse"===Z(t.type)?t.pageY:t.touches[0].pageY,s=tt(ae),l=e.isNullOrUndefined(fe)?0:fe.offsetHeight-fe.clientHeight;e.isNullOrUndefined(fe)||(i=tt(fe)),!e.isNullOrUndefined(fe)&&s.top-i.top>0?o=!0:e.isNullOrUndefined(fe)&&n>0?o=!0:!e.isNullOrUndefined(fe)&&Math.floor(s.top-i.top+s.height+(i.bottom-s.bottom))-l<=pe&&(o=!0);var r=He-(n-Me);if(o&&r>=de&&r<=pe){var a=0;e.isNullOrUndefined(fe)||(a=i.top);var h=ke-a+(n-Me);h=h>0?h:1,ae.style.height=r+"px",ae.style.top=h+"px"}}function ot(t){var i,o=document.documentElement.clientWidth,n=!1;e.isNullOrUndefined(fe)||(i=tt(fe));var s="mouse"===Z(t.type)?t.pageX:t.touches[0].pageX,l=tt(ae),r=e.isNullOrUndefined(fe)?0:fe.offsetWidth-fe.clientWidth,a=e.isNullOrUndefined(fe)?0:i.left,h=e.isNullOrUndefined(fe)?0:i.width;e.isNullOrUndefined(me)&&(e.isNullOrUndefined(fe)?me=o:(me=l.left-a-r/2+l.width,me+=h-r-me)),!e.isNullOrUndefined(fe)&&Math.floor(l.left-i.left+l.width+(i.right-l.right))-r<=ue?n=!0:e.isNullOrUndefined(fe)&&s>=0&&(n=!0);var d=Ue-(s-Le);if(Ie&&(d=d>me?me:d),n&&d>=ce&&d<=ue){var p=0;e.isNullOrUndefined(fe)||(p=i.left);var c=Be-p+(s-Le);c=c>0?c:1,d!==Ye&&De&&(ae.style.width=d+"px"),Ie&&(ae.style.left=c+"px",De=1!==c)}Ye=d}function nt(t){var i,o=document.documentElement.clientWidth,n=!1;e.isNullOrUndefined(fe)||(i=tt(fe));var s=(t.touches?t.changedTouches[0]:t).pageX,l=tt(ae);!e.isNullOrUndefined(fe)&&(l.left-i.left+l.width<=ue||l.right-i.left>=l.width)?n=!0:e.isNullOrUndefined(fe)&&o-s>0&&(n=!0);var r=Ue+(s-Le),a=0;if(e.isNullOrUndefined(fe)||(a=i.left),l.left-a+r>ue){if(n=!1,ae.classList.contains(Se))return;ae.style.width=ue-(l.left-a)+"px"}n&&r>=ce&&r<=ue&&(ae.style.width=r+"px")}function st(t){de=t}function lt(t){ue=t}function rt(t){pe=t}function at(){for(var t=ae.querySelectorAll("."+we),i=0;i<t.length;i++)e.detach(t[i]);var o=ae.querySelectorAll(".e-dialog-border-resize");if(!e.isNullOrUndefined(o))for(i=0;i<o.length;i++)e.detach(o[i])}function ht(){ae=null,he=null,fe=null,me=null,Re=null,ze=null,Ae=null}function dt(t,e,i,o){switch(t){case"Create":pt({type:o,target:document.querySelector(e.target),cssClass:e.cssClass,label:e.label,width:e.width});break;case"Show":Kt(document.querySelector(i));break;case"Hide":Qt(document.querySelector(i));break;case"Set":$t({cssClass:e.cssClass,type:o})}}function pt(t,i){var o;if(t.target){var n,s=e.isNullOrUndefined(i)?e.createElement:i,l=At(t.target,s);if(!e.isNullOrUndefined(t.cssClass)){var r=t.cssClass.split(" ").filter(function(t){return""!==t.trim()});(o=l.wrap.classList).add.apply(o,r)}if(e.isNullOrUndefined(t.template)&&e.isNullOrUndefined(ki)){var a=e.isNullOrUndefined(t.type)?Nt(l.wrap):t.type;n=kt(e.isNullOrUndefined(t.width)?void 0:t.width,a),Tt(a,l.wrap,n,s),e.isNullOrUndefined(t.label)||ct(l.inner_wrap,t.label,s)}else{var h=e.isNullOrUndefined(t.template)?ki:t.template;l.wrap.classList.add(Bi),Bt(l.wrap,h,Li)}l.wrap.classList.add(fi),l=null}}function ct(t,e,i){var o=i("div",{});return o.classList.add(Hi),o.innerHTML=e,t.appendChild(o),o}function ut(t,e,i){var o=Mt();ni[""+o]={timeOut:0,type:"Material",radius:e},zt(t,o,i,mi),Dt(e,t,"Material",mi)}function ft(t,e,i){var o=Mt();ni[""+o]={timeOut:0,type:"Tailwind3",radius:e},zt(t,o,i,yi),Dt(e,t,"Tailwind3",yi)}function mt(t,e,i){var o=Mt();ni[""+o]={timeOut:0,type:"Material3",radius:e},zt(t,o,i,gi),Dt(e,t,"Material3",gi)}function gt(t,e,i){var o=Mt();ni[""+o]={timeOut:0,type:"Bootstrap4",radius:e},zt(t,o,i,wi),Dt(e,t,"Bootstrap4",wi)}function yt(t,e,i){var o=Mt();ni[""+o]={timeOut:0,type:"Bootstrap5",radius:e},zt(t,o,i,Ni),Dt(e,t,"Bootstrap5",Ni)}function vt(t,e,i){var o={};ni[""+e].timeOut=0,o[""+e]=Lt(e,i,0,0),It({uniqueID:e,container:t,globalInfo:o,timeOutVar:0})}function bt(t,e,i){var o=Mt();ni[""+o]={timeOut:0,type:"Fabric",radius:e},Rt(t,o,vi),Vt(e,t,vi)}function Et(t,e,i){var o=Mt();ni[""+o]={timeOut:0,type:"Fluent",radius:e},Rt(t,o,bi),Vt(e,t,bi)}function Ot(t,e,i){var o=Mt();ni[""+o]={timeOut:0,type:"Fluent2",radius:e},Rt(t,o,Ei),Vt(e,t,Ei)}function Ct(t,e,i){var o=Mt();ni[""+o]={timeOut:0,type:"Tailwind",radius:e},Rt(t,o,Oi),Vt(e,t,Oi)}function wt(t,e,i){var o=Mt();ni[""+o]={timeOut:0,type:"HighContrast",radius:e},Rt(t,o,Ti),Vt(e,t,Ti)}function Nt(t){return window.getComputedStyle(t,":after").getPropertyValue("content").replace(/['"]+/g,"")}function Tt(t,i,o,n){var s=i.querySelector("."+Si),l=s.querySelector("svg");switch(e.isNullOrUndefined(l)||s.removeChild(l),t){case"Material":ut(s,o,n);break;case"Material3":mt(s,o,n);break;case"Fabric":bt(s,o);break;case"Fluent":Et(s,o);break;case"Fluent2":Ot(s,o);break;case"Bootstrap":Pt(s,o);break;case"HighContrast":wt(s,o);break;case"Bootstrap4":gt(s,o,n);break;case"Bootstrap5":yt(s,o,n);break;case"Tailwind":case"Tailwind-dark":Ct(s,o);break;case"Tailwind3":ft(s,o,n)}}function Pt(t,e,i){var o=Mt();ni[""+o]={timeOut:0,type:"Bootstrap",radius:e},St(t,o),xt(t,e)}function St(t,e,i){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("id",e),o.setAttribute("class",Ci),o.setAttribute("viewBox","0 0 64 64"),t.insertBefore(o,t.firstChild);for(var n=0;n<=7;n++){var s=document.createElementNS("http://www.w3.org/2000/svg","circle");s.setAttribute("class",xi+"_"+n),s.setAttribute("r","2"),s.setAttribute("transform","translate(32,32)"),o.appendChild(s)}}function xt(t,e){var i=t.querySelector("svg.e-spin-bootstrap");i.style.width=i.style.height=e+"px";for(var o=90,n=0;n<=7;n++){var s=_t(0,0,24,o),l=i.querySelector("."+xi+"_"+n);l.setAttribute("cx",s.x+""),l.setAttribute("cy",s.y+""),o=o>=360?0:o,o+=45}}function Ut(t,e){function i(t){o.push(t),t===s&&1!==r||(t<=n&&t>1&&!l?t=parseFloat((t-.2).toFixed(2)):1===t?(t=7,t=parseFloat((t+.2).toFixed(2)),l=!0):t<8&&l?8===(t=parseFloat((t+.2).toFixed(2)))&&(l=!1):t<=8&&!l&&(t=parseFloat((t-.2).toFixed(2))),++r,i(t))}var o=[],n=t,s=e,l=!1,r=1;return i(n),o}function Ht(t){for(var e=t.querySelector("svg.e-spin-bootstrap").getAttribute("id"),i=1;i<=8;i++)!function(t,e,i,o,n){function s(e){ni[""+n].isAnimate&&(++l,t.setAttribute("r",e+""),l>=o.length&&(l=0),ni[n].timeOut=setTimeout(s.bind(null,o[l]),18))}var l=0;s(e)}(t.getElementsByClassName("e-path-circle_"+(8===i?0:i))[0],i,0,Ut(i,i),e)}function Bt(t,i,o){e.isNullOrUndefined(o)||t.classList.add(o),t.querySelector(".e-spinner-inner").innerHTML=i}function kt(t,e){var i;switch(e){case"Material":i=si;break;case"Material3":i=li;break;case"Fabric":i=ri;break;case"Tailwind":case"Tailwind-dark":case"Tailwind3":i=ri;break;case"Fluent":i=ai;break;case"Fluent2":i=hi;break;case"Bootstrap4":i=pi;break;case"Bootstrap5":i=ci;break;default:i=di}return t=t?parseFloat(t+""):i,"Bootstrap"===e?t:t/2}function Lt(t,e,i,o){return{radius:e,count:i,previousId:o}}function Mt(){for(var t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}function Rt(t,e,i,o){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("id",e),n.setAttribute("class",i);var s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("class",xi);var l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("class",Ui),t.insertBefore(n,t.firstChild),n.appendChild(s),n.appendChild(l)}function zt(t,e,i,o){var n=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("class",o),n.setAttribute("id",e),s.setAttribute("class",xi),t.insertBefore(n,t.firstChild),n.appendChild(s)}function At(t,e){var i=e("div",{}),o=e("div",{});return i.classList.add(Pi),o.classList.add(Si),o.setAttribute("aria-disabled","true"),t.appendChild(i),i.appendChild(o),{wrap:i,inner_wrap:o}}function It(t){Yt(1,149,Wt,1333,t.globalInfo[t.uniqueID].count,75,t),t.globalInfo[t.uniqueID].count=++t.globalInfo[t.uniqueID].count%4}function Yt(t,i,o,n,s,l,r){function a(e){var i=Math.max(0,Math.min((new Date).getTime()-p,n));h(o(i,t,c,n),e.container),d===e.globalInfo[e.uniqueID].previousId&&i<n?ni[e.uniqueID].timeOut=setTimeout(a.bind(null,e),1):It(e)}function h(t,i){if(!e.isNullOrUndefined(i.querySelector("svg.e-spin-material"))||!e.isNullOrUndefined(i.querySelector("svg.e-spin-material3"))||!e.isNullOrUndefined(i.querySelector("svg.e-spin-tailwind3"))){var o=void 0;if(e.isNullOrUndefined(i.querySelector("svg.e-spin-material"))||e.isNullOrUndefined(i.querySelector("svg.e-spin-material").querySelector("path.e-path-circle"))?e.isNullOrUndefined(i.querySelector("svg.e-spin-material3"))||e.isNullOrUndefined(i.querySelector("svg.e-spin-material3").querySelector("path.e-path-circle"))?e.isNullOrUndefined(i.querySelector("svg.e-spin-tailwind3"))||e.isNullOrUndefined(i.querySelector("svg.e-spin-tailwind3").querySelector("path.e-path-circle"))||(o=i.querySelector("svg.e-spin-tailwind3")):o=i.querySelector("svg.e-spin-material3"):o=i.querySelector("svg.e-spin-material"),!e.isNullOrUndefined(o)){var n=o.querySelector("path.e-path-circle");n.setAttribute("stroke-dashoffset",qt(u,f,t,l)+""),n.setAttribute("transform","rotate("+m+" "+u/2+" "+u/2+")")}}}var d=++r.globalInfo[r.uniqueID].previousId,p=(new Date).getTime(),c=i-t,u=Xt(2*r.globalInfo[r.uniqueID].radius+""),f=Ft(u),m=-90*(r.globalInfo[r.uniqueID].count||0);a(r)}function Dt(t,e,i,o){var n=2*t,s=e.querySelector("svg."+o),l=s.querySelector("path.e-path-circle"),r=Ft(n),a=n/2+"px";s.setAttribute("viewBox","0 0 "+n+" "+n),s.style.width=s.style.height=n+"px",s.style.transformOrigin=a+" "+a+" "+a,l.setAttribute("d",jt(n,r)),"Material"!==i&&"Material3"!==i&&"Fluent2"!==i&&"Tailwind3"!==i||(l.setAttribute("stroke-width",r+""),l.setAttribute("stroke-dasharray",(n-r)*Math.PI*.75+""),l.setAttribute("stroke-dashoffset",qt(n,r,1,75)+""))}function Xt(t){return parseFloat(t)}function jt(t,e){var i=t/2,o=e/2;return"M"+i+","+o+"A"+(i-o)+","+(i-o)+" 0 1 1 "+o+","+i}function Ft(t){return.1*t}function qt(t,e,i,o){return(t-e)*Math.PI*(3*o/100-i/100)}function Wt(t,e,i,o){var n=(t/=o)*t,s=n*t;return e+i*(6*s*n+-15*n*n+10*s)}function Vt(t,e,i){var o=t,n=t,s=2*t,l=e.querySelector("."+i),r=l.querySelector(".e-path-circle"),a=l.querySelector(".e-path-arc"),h=s/2+"px";r.setAttribute("d",Gt(o,n,t)),a.setAttribute("d",Zt(o,n,t,315,45)),l.setAttribute("viewBox","0 0 "+s+" "+s),l.style.transformOrigin=h+" "+h+" "+h,l.style.width=l.style.height=s+"px"}function _t(t,e,i,o){var n=(o-90)*Math.PI/180;return{x:t+i*Math.cos(n),y:e+i*Math.sin(n)}}function Zt(t,e,i,o,n){var s=_t(t,e,i,n),l=_t(t,e,i,o);return["M",s.x,s.y,"A",i,i,0,0,0,l.x,l.y].join(" ")}function Gt(t,e,i){return["M",t,e,"m",-i,0,"a",i,i,0,1,0,2*i,0,"a",i,i,0,1,0,2*-i,0].join(" ")}function Kt(t){Jt(t,!1),t=null}function Jt(t,i){var o;if(t)if(t.classList.contains(Pi))o=t;else{var n=t.querySelectorAll("."+Pi);if(e.Browser.isIE){for(var s=0;s<n.length;s++)if(n[s].parentElement&&n[s].parentElement===t){o=n[s];break}}else o=Array.from(n).find(function(e){return e.parentElement===t})||null}if(t&&o){var l=o.querySelector("."+Si);if(i?!o.classList.contains(Bi)&&!o.classList.contains(fi):!o.classList.contains(Bi)&&!o.classList.contains(ui)){var r=o.querySelector("svg");if(e.isNullOrUndefined(r))return;var a=r.getAttribute("id");switch(ni[""+a].isAnimate=!i,ni[""+a].type){case"Material":case"Material3":case"Tailwind3":i?clearTimeout(ni[a].timeOut):vt(l,a,ni[a].radius);break;case"Bootstrap":i?clearTimeout(ni[a].timeOut):Ht(l)}}i?e.classList(o,[fi],[ui]):e.classList(o,[ui],[fi]),t=null}}function Qt(t){Jt(t,!0),t=null}function $t(t,i){var o=e.isNullOrUndefined(i)?e.createElement:i;void 0!==t.template&&(ki=t.template,void 0!==t.template&&(Li=t.cssClass));for(var n=document.querySelectorAll("."+Pi),s=0;s<n.length;s++)te(t.template,n[s],t.type,t.cssClass,o)}function te(t,i,o,n,s){e.isNullOrUndefined(t)&&!i.classList.contains(Bi)?(ee(i,o,n,s),i.classList.contains(ui)?(i.classList.remove(ui),Kt(i)):(i.classList.remove(fi),Qt(i))):(ki=t,e.isNullOrUndefined(n)||(Li=n),e.isNullOrUndefined(ki)||Bt(i,ki,Li))}function ee(t,i,o,n){e.isNullOrUndefined(o)||t.classList.add(o);var s=t.querySelector("svg");if(!e.isNullOrUndefined(s)){var l="Bootstrap"===i?parseFloat(s.style.height):parseFloat(s.style.height)/2;if(s.getAttribute("class").split(/\s/).indexOf("e-spin-material")>=0){var r=s.getAttribute("id");clearTimeout(ni[""+r].timeOut)}Tt(i,t,l,n)}}var ie,oe,ne,se,le,re,ae,he,de,pe,ce,ue,fe,me,ge=!1,ye=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),ve=function(t,e,i,o){var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},be=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ye(i,t),ve([e.Property("left")],i.prototype,"X",void 0),ve([e.Property("top")],i.prototype,"Y",void 0),i}(e.ChildProperty),Ee={ROOT:"e-popup",RTL:"e-rtl",OPEN:"e-popup-open",CLOSE:"e-popup-close"},Oe=function(t){function i(e,i){return t.call(this,i,e)||this}return ye(i,t),i.prototype.onPropertyChanged=function(t,i){for(var o=0,n=Object.keys(t);o<n.length;o++)switch(n[o]){case"width":e.setStyleAttribute(this.element,{width:e.formatUnit(t.width)});break;case"height":e.setStyleAttribute(this.element,{height:e.formatUnit(t.height)});break;case"zIndex":e.setStyleAttribute(this.element,{zIndex:t.zIndex});break;case"enableRtl":this.setEnableRtl();break;case"position":case"relateTo":this.refreshPosition();break;case"offsetX":var s=t.offsetX-i.offsetX;this.element.style.left=(parseInt(this.element.style.left,10)+s).toString()+"px";break;case"offsetY":var l=t.offsetY-i.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()}},i.prototype.getModuleName=function(){return"popup"},i.prototype.resolveCollision=function(){this.checkCollision()},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.destroy=function(){this.element.classList.contains("e-popup-open")&&this.unwireEvents(),this.element.classList.remove(Ee.ROOT,Ee.RTL,Ee.OPEN,Ee.CLOSE),this.content=null,this.relateTo=null,D(),t.prototype.destroy.call(this)},i.prototype.render=function(){this.element.classList.add(Ee.ROOT);var t={};1e3!==this.zIndex&&(t.zIndex=this.zIndex),"auto"!==this.width&&(t.width=e.formatUnit(this.width)),"auto"!==this.height&&(t.height=e.formatUnit(this.height)),e.setStyleAttribute(this.element,t),this.fixedParent=!1,this.setEnableRtl(),this.setContent()},i.prototype.wireEvents=function(){e.Browser.isDevice&&e.EventHandler.add(window,"orientationchange",this.orientationOnChange,this),"none"!==this.actionOnScroll&&this.wireScrollEvents()},i.prototype.wireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,i=this.getScrollableParent(this.getRelateToElement());t<i.length;t++){var o=i[t];e.EventHandler.add(o,"scroll",this.scrollRefresh,this)}},i.prototype.unwireEvents=function(){e.Browser.isDevice&&e.EventHandler.remove(window,"orientationchange",this.orientationOnChange),"none"!==this.actionOnScroll&&this.unwireScrollEvents()},i.prototype.unwireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,i=this.getScrollableParent(this.getRelateToElement());t<i.length;t++){var o=i[t];e.EventHandler.remove(o,"scroll",this.scrollRefresh)}},i.prototype.getRelateToElement=function(){var t=""===this.relateTo||e.isNullOrUndefined(this.relateTo)?document.body:this.relateTo;return this.setProperties({relateTo:t},!0),"string"==typeof this.relateTo?document.querySelector(this.relateTo):this.relateTo},i.prototype.scrollRefresh=function(t){if("reposition"===this.actionOnScroll?e.isNullOrUndefined(this.element)||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 i=this.isElementOnViewport(this.getRelateToElement(),t.target);i||this.targetInvisibleStatus?i&&(this.targetInvisibleStatus=!1):(this.trigger("targetExitViewport"),this.targetInvisibleStatus=!0)}},i.prototype.isElementOnViewport=function(t,e){for(var i=this.getScrollableParent(t),o=0;o<i.length;o++)if(!this.isElementVisible(t,i[o]))return!1;return!0},i.prototype.isElementVisible=function(t,i){var o=this.checkGetBoundingClientRect(t);if(!o.height||!o.width)return!1;if(e.isNullOrUndefined(this.checkGetBoundingClientRect(i))){var s=window,l={top:s.scrollY,left:s.scrollX,right:s.scrollX+s.outerWidth,bottom:s.scrollY+s.outerHeight},r=n(t),a={top:r.top,left:r.left,right:r.left+o.width,bottom:r.top+o.height},h={top:l.bottom-a.top,left:l.right-a.left,bottom:a.bottom-l.top,right:a.right-l.left};return h.top>0&&h.left>0&&h.right>0&&h.bottom>0}var d=i.getBoundingClientRect();return!(o.bottom<d.top||o.bottom>d.bottom||o.right>d.right||o.left<d.left)},i.prototype.preRender=function(){},i.prototype.setEnableRtl=function(){this.reposition(),this.enableRtl?this.element.classList.add(Ee.RTL):this.element.classList.remove(Ee.RTL)},i.prototype.setContent=function(){if(!e.isNullOrUndefined(this.content))if(this.element.innerHTML="","string"==typeof this.content)this.element.textContent=this.content;else{var t=this.getRelateToElement(),i=this.content.props;t.classList.contains("e-dropdown-btn")&&!e.isNullOrUndefined(i)||this.element.appendChild(this.content)}},i.prototype.orientationOnChange=function(){var t=this;setTimeout(function(){t.refreshPosition()},200)},i.prototype.refreshPosition=function(t,i){e.isNullOrUndefined(t)||this.checkFixedParent(t),this.reposition(),i||this.checkCollision()},i.prototype.reposition=function(){var t,i,o=this.getRelateToElement();if("number"==typeof this.position.X&&"number"==typeof this.position.Y)t={left:this.position.X,top:this.position.Y};else if("string"==typeof this.position.X&&"number"==typeof this.position.Y||"number"==typeof this.position.X&&"string"==typeof this.position.Y){var n=void 0,s=this.element.style.display;this.element.style.display="block",this.element.classList.contains("e-dlg-modal")&&(n=this.element.parentElement.style.display,this.element.parentElement.style.display="block"),i=this.getAnchorPosition(o,this.element,this.position,this.offsetX,this.offsetY),t="string"==typeof this.position.X?{left:i.left,top:this.position.Y}:{left:this.position.X,top:i.top},this.element.style.display=s,this.element.classList.contains("e-dlg-modal")&&(this.element.parentElement.style.display=n)}else if(o){var l=this.element.clientHeight,s=this.element.style.display;this.element.style.display="block",t=this.getAnchorPosition(o,this.element,this.position,this.offsetX,this.offsetY,l),this.element.style.display=s}else t={left:0,top:0};e.isNullOrUndefined(t)||(this.element.style.left=t.left+"px",this.element.style.top=t.top+"px")},i.prototype.checkGetBoundingClientRect=function(t){try{return t.getBoundingClientRect()}catch(t){return null}},i.prototype.getAnchorPosition=function(t,i,s,l,r,a){void 0===a&&(a=0);var h=this.checkGetBoundingClientRect(i),d=this.checkGetBoundingClientRect(t);if(e.isNullOrUndefined(h)||e.isNullOrUndefined(d))return null;var p=t,c={left:0,top:0};switch(i.offsetParent&&"BODY"===i.offsetParent.tagName&&"BODY"===t.tagName?c=n(t):(i.classList.contains("e-dlg-modal")&&"BODY"!==p.tagName&&(i=i.parentElement),c=o(p,i)),s.X){default:case"left":break;case"center":i.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType?c.left+=window.innerWidth/2-h.width/2:"container"===this.targetType?c.left+=d.width/2-h.width/2:c.left+=d.width/2;break;case"right":if(i.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType)c.left+=window.innerWidth-h.width;else if("container"===this.targetType){var u=1,f=O(i);if(f){var m=getComputedStyle(f).transform;"none"!==m&&(u=new DOMMatrix(m).a),"none"!==getComputedStyle(f).zoom&&(u*=E(document.body))}c.left+=(d.width-h.width)/u}else c.left+=d.width}switch(s.Y){default:case"top":break;case"center":i.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType?c.top+=window.innerHeight/2-h.height/2:"container"===this.targetType?c.top+=d.height/2-h.height/2:c.top+=d.height/2;break;case"bottom":i.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType?c.top+=window.innerHeight-h.height:"container"!==this.targetType||i.classList.contains("e-dialog")?"container"===this.targetType&&i.classList.contains("e-dialog")?c.top+=d.height-a:c.top+=d.height:c.top+=d.height-h.height}return c.left+=l,c.top+=r,c},i.prototype.callFlip=function(t){var e=this.getRelateToElement();v(this.element,e,this.offsetX,this.offsetY,this.position.X,this.position.Y,this.viewPortElement,t,this.fixedParent)},i.prototype.callFit=function(t){if(0!==y(this.element,this.viewPortElement).length)if(e.isNullOrUndefined(this.viewPortElement)){var i=g(this.element,this.viewPortElement,t);t.X&&(this.element.style.left=i.left+"px"),t.Y&&(this.element.style.top=i.top+"px")}else{var o=this.checkGetBoundingClientRect(this.element),n=this.checkGetBoundingClientRect(this.viewPortElement);if(e.isNullOrUndefined(o)||e.isNullOrUndefined(n))return null;t&&!0===t.Y&&(n.top>o.top?this.element.style.top="0px":n.bottom<o.bottom&&(this.element.style.top=parseInt(this.element.style.top,10)-(o.bottom-n.bottom)+"px")),t&&!0===t.X&&(n.right<o.right?this.element.style.left=parseInt(this.element.style.left,10)-(o.right-n.right)+"px":n.left>o.left&&(this.element.style.left=parseInt(this.element.style.left,10)+(n.left-o.left)+"px"))}},i.prototype.checkCollision=function(){var t=this.collision.X,e=this.collision.Y;"none"===t&&"none"===e||("flip"===t&&"flip"===e?this.callFlip({X:!0,Y:!0}):"fit"===t&&"fit"===e?this.callFit({X:!0,Y:!0}):("flip"===t?this.callFlip({X:!0,Y:!1}):"flip"===e&&this.callFlip({Y:!0,X:!1}),"fit"===t?this.callFit({X:!0,Y:!1}):"fit"===e&&this.callFit({X:!1,Y:!0})))},i.prototype.show=function(t,i){var o=this;if(this.wireEvents(),1e3===this.zIndex||!e.isNullOrUndefined(i)){var n=e.isNullOrUndefined(i)?this.element:i;this.zIndex=j(n),e.setStyleAttribute(this.element,{zIndex:this.zIndex})}t=e.isNullOrUndefined(t)||"object"!=typeof t?this.showAnimation:t,"none"===this.collision.X&&"none"===this.collision.Y||(e.removeClass([this.element],Ee.CLOSE),e.addClass([this.element],Ee.OPEN),this.checkCollision(),e.removeClass([this.element],Ee.OPEN),e.addClass([this.element],Ee.CLOSE)),e.isNullOrUndefined(t)?(e.removeClass([this.element],Ee.CLOSE),e.addClass([this.element],Ee.OPEN),this.trigger("open")):(t.begin=function(){o.isDestroyed||(e.removeClass([o.element],Ee.CLOSE),e.addClass([o.element],Ee.OPEN))},t.end=function(){o.isDestroyed||o.trigger("open")},new e.Animation(t).animate(this.element))},i.prototype.hide=function(t){var i=this;t=e.isNullOrUndefined(t)||"object"!=typeof t?this.hideAnimation:t,e.isNullOrUndefined(t)?(e.removeClass([this.element],Ee.OPEN),e.addClass([this.element],Ee.CLOSE),this.trigger("close")):(t.end=function(){i.isDestroyed||(e.removeClass([i.element],Ee.OPEN),e.addClass([i.element],Ee.CLOSE),i.trigger("close"))},new e.Animation(t).animate(this.element)),this.unwireEvents()},i.prototype.getScrollableParent=function(t){return this.checkFixedParent(t),X(t,this.fixedParent)},i.prototype.checkFixedParent=function(t){for(var i=t.parentElement;i&&"HTML"!==i.tagName;){var o=getComputedStyle(i);"fixed"!==o.position&&"sticky"!==o.position||e.isNullOrUndefined(this.element)||!this.element.offsetParent||"BODY"!==this.element.offsetParent.tagName||"hidden"===getComputedStyle(this.element.offsetParent).overflow||(this.element.style.top=window.scrollY>parseInt(this.element.style.top,10)?e.formatUnit(window.scrollY-parseInt(this.element.style.top,10)):e.formatUnit(parseInt(this.element.style.top,10)-window.scrollY),this.element.style.position="fixed",this.fixedParent=!0),i=i.parentElement,!e.isNullOrUndefined(this.element)&&e.isNullOrUndefined(this.element.offsetParent)&&"fixed"===o.position&&"fixed"===this.element.style.position&&(this.fixedParent=!0)}},ve([e.Property("auto")],i.prototype,"height",void 0),ve([e.Property("auto")],i.prototype,"width",void 0),ve([e.Property(null)],i.prototype,"content",void 0),ve([e.Property("container")],i.prototype,"targetType",void 0),ve([e.Property(null)],i.prototype,"viewPortElement",void 0),ve([e.Property({X:"none",Y:"none"})],i.prototype,"collision",void 0),ve([e.Property("")],i.prototype,"relateTo",void 0),ve([e.Complex({},be)],i.prototype,"position",void 0),ve([e.Property(0)],i.prototype,"offsetX",void 0),ve([e.Property(0)],i.prototype,"offsetY",void 0),ve([e.Property(1e3)],i.prototype,"zIndex",void 0),ve([e.Property(!1)],i.prototype,"enableRtl",void 0),ve([e.Property("reposition")],i.prototype,"actionOnScroll",void 0),ve([e.Property(null)],i.prototype,"showAnimation",void 0),ve([e.Property(null)],i.prototype,"hideAnimation",void 0),ve([e.Event()],i.prototype,"open",void 0),ve([e.Event()],i.prototype,"close",void 0),ve([e.Event()],i.prototype,"targetExitViewport",void 0),i=ve([e.NotifyPropertyChanges],i)}(e.Component),Ce=["north-west","north","north-east","west","east","south-west","south","south-east"],we="e-resize-handle",Ne="e-focused-handle",Te="e-dlg-resizable",Pe=["e-restrict-left"],Se="e-resize-viewport",xe=["north","west","east","south"],Ue=0,He=0,Be=0,ke=0,Le=0,Me=0,Re=null,ze=null,Ae=null,Ie=!0,Ye=0,De=!0,Xe=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),je=function(t,e,i,o){var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Fe=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Xe(i,t),je([e.Property(!0)],i.prototype,"isFlat",void 0),je([e.Property()],i.prototype,"buttonModel",void 0),je([e.Property("Button")],i.prototype,"type",void 0),je([e.Event()],i.prototype,"click",void 0),i}(e.ChildProperty),qe=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Xe(i,t),je([e.Property("Fade")],i.prototype,"effect",void 0),je([e.Property(400)],i.prototype,"duration",void 0),je([e.Property(0)],i.prototype,"delay",void 0),i}(e.ChildProperty),We="e-dialog",Ve="e-dlg-target",_e="e-scroll-disabled",Ze="e-dlg-fullscreen",Ge="Information",Ke="e-scroll-disabled",Je="e-alert-dialog",Qe="e-confirm-dialog",$e=function(t){function o(e,i){var o=t.call(this,e,i)||this;return o.needsID=!0,o}return Xe(o,t),o.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents(),"100%"===this.width&&(this.element.style.width=""),""!==this.minHeight&&(this.element.style.minHeight=e.formatUnit(this.minHeight)),this.enableResize&&(this.setResize(),this.isModal&&(this.isModelResize=!0),"None"===this.animationSettings.effect&&this.getMinHeight()),this.renderComplete()},o.prototype.initializeValue=function(){this.dlgClosedBy="user action"},o.prototype.preRender=function(){var t=this;this.initializeValue(),this.headerContent=null,this.allowMaxHeight=!0,this.preventVisibility=!0,this.clonedEle=this.element.cloneNode(!0),this.closeIconClickEventHandler=function(e){t.dlgClosedBy="close icon",t.hide(e)},this.dlgOverlayClickEventHandler=function(e){t.dlgClosedBy="overlayClick",e.preventFocus=!1,t.trigger("overlayClick",e,function(e){e.preventFocus||t.focusContent(),t.dlgClosedBy="user action"})};var i={close:"Close"};if(this.l10n=new e.L10n("dialog",i,this.locale),this.checkPositionData(),e.isNullOrUndefined(this.target)){var o=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.target=document.body,this.isProtectedOnChange=o}},o.prototype.updatePersistData=function(){this.enablePersistence&&this.setProperties({width:parseFloat(this.element.style.width),height:parseFloat(this.element.style.height),position:{X:parseFloat(this.dragObj.element.style.left),Y:parseFloat(this.dragObj.element.style.top)}},!0)},o.prototype.isNumberValue=function(t){return/^[-+]?\d*\.?\d+$/.test(t)},o.prototype.checkPositionData=function(){if(!e.isNullOrUndefined(this.position)){if(!e.isNullOrUndefined(this.position.X)&&"number"!=typeof this.position.X&&(t=this.isNumberValue(this.position.X))){i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.X=parseFloat(this.position.X),this.isProtectedOnChange=i}if(!e.isNullOrUndefined(this.position.Y)&&"number"!=typeof this.position.Y){var t=this.isNumberValue(this.position.Y);if(t){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.Y=parseFloat(this.position.Y),this.isProtectedOnChange=i}}}},o.prototype.getEle=function(t,e){for(var i=void 0,o=0;o<t.length;o++)if(t[o].classList.contains(e)){i=t[o];break}return i},o.prototype.getMinHeight=function(){var t="0px",i="0px";e.isNullOrUndefined(this.element.querySelector(".e-dlg-header-content"))||(t=getComputedStyle(this.headerContent).height);var o=this.getEle(this.element.children,"e-footer-content");e.isNullOrUndefined(o)||(i=getComputedStyle(o).height);var n=parseInt(t.slice(0,t.indexOf("p")),10),s=parseInt(i.slice(0,i.indexOf("p")),10);return st(n+30+(isNaN(s)?0:s)),n+30+s},o.prototype.onResizeStart=function(t,i){if(i.trigger("resizeStart",t),!t.cancel&&this.isModelResize&&!e.isNullOrUndefined(this.dlgContainer)&&this.dlgContainer.classList.contains("e-dlg-"+this.position.X+"-"+this.position.Y)){this.setPopupPosition(),this.dlgContainer.classList.remove("e-dlg-"+this.position.X+"-"+this.position.Y);var o=this.getTargetContainer(this.target);o instanceof Element&&"rtl"===window.getComputedStyle(o).getPropertyValue("direction")?this.element.style.position="absolute":this.element.style.position="relative",this.element.classList.contains("e-restrict-left")&&this.element.classList.remove("e-restrict-left"),this.isModelResize=!1}return t.cancel},o.prototype.onResizing=function(t,e){e.trigger("resizing",t)},o.prototype.onResizeComplete=function(t,e){e.trigger("resizeStop",t),this.updatePersistData()},o.prototype.setResize=function(){if(this.enableResize){this.element.classList.add("e-dlg-resizable");for(var t=getComputedStyle(this.element).minHeight,e=getComputedStyle(this.element).minWidth,i="",o=0;o<this.resizeHandles.length;o++){if("All"===this.resizeHandles[o]){i="south north east west north-east north-west south-east south-west";break}var n="";switch(this.resizeHandles[o].toString()){case"SouthEast":n="south-east";break;case"SouthWest":n="south-west";break;case"NorthEast":n="north-east";break;case"NorthWest":n="north-west";break;default:n=this.resizeHandles[o].toString()}i+=n.toLocaleLowerCase()+" "}this.enableRtl&&"south-east"===i.trim()?i="south-west":this.enableRtl&&"south-west"===i.trim()&&(i="south-east"),this.isModal&&this.enableRtl?this.element.classList.add("e-restrict-left"):this.isModal&&this.target===document.body&&this.element.classList.add("e-resize-viewport"),q({element:this.element,direction:i,minHeight:parseInt(t.slice(0,e.indexOf("p")),10),maxHeight:this.targetEle.clientHeight,minWidth:parseInt(e.slice(0,e.indexOf("p")),10),maxWidth:this.targetEle.clientWidth,boundary:this.target===document.body?null:this.targetEle,resizeBegin:this.onResizeStart.bind(this),resizeComplete:this.onResizeComplete.bind(this),resizing:this.onResizing.bind(this),proxy:this}),this.wireWindowResizeEvent()}else at(),this.unWireWindowResizeEvent(),this.isModal?this.element.classList.remove("e-restrict-left"):this.element.classList.remove("e-resize-viewport"),this.element.classList.remove("e-dlg-resizable")},o.prototype.getFocusElement=function(t){var e=t.querySelectorAll('input,select,textarea,button:enabled,a,[contenteditable="true"],[tabindex]');return{element:e[e.length-1]}},o.prototype.keyDown=function(t){var i=this;if(9===t.keyCode&&this.isModal){var o=void 0;e.isNullOrUndefined(this.btnObj)||(o=this.btnObj[this.btnObj.length-1]),e.isNullOrUndefined(this.btnObj)&&!e.isNullOrUndefined(this.ftrTemplateContent)&&(o=this.getFocusElement(this.ftrTemplateContent)),e.isNullOrUndefined(this.btnObj)&&e.isNullOrUndefined(this.ftrTemplateContent)&&!e.isNullOrUndefined(this.contentEle)&&(o=this.getFocusElement(this.contentEle)),e.isNullOrUndefined(o)||document.activeElement!==o.element||t.shiftKey||(t.preventDefault(),this.focusableElements(this.element).focus()),document.activeElement===this.focusableElements(this.element)&&t.shiftKey&&(t.preventDefault(),e.isNullOrUndefined(o)||o.element.focus())}var n=document.activeElement,s=["input","textarea"].indexOf(n.tagName.toLowerCase())>-1,l=!1;if(s||(l=n.hasAttribute("contenteditable")&&"true"===n.getAttribute("contenteditable")),27===t.keyCode&&this.closeOnEscape){this.dlgClosedBy="escape";var r=document.querySelector(".e-popup-open:not(.e-dialog)");(e.isNullOrUndefined(r)||r.classList.contains("e-toolbar-pop")||r.classList.contains("e-slider-tooltip"))&&this.hide(t)}if(13===t.keyCode&&!t.ctrlKey&&"textarea"!==n.tagName.toLowerCase()&&s&&!e.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&t.ctrlKey&&("textarea"===n.tagName.toLowerCase()||l)&&!e.isNullOrUndefined(this.primaryButtonEle)){var a;this.buttons.some(function(t,i){a=i;var o=t.buttonModel;return!e.isNullOrUndefined(o)&&!0===o.isPrimary})&&"function"==typeof this.buttons[a].click&&!this.primaryButtonEle.disabled&&setTimeout(function(){i.buttons[a].click.call(i,t)})}},o.prototype.initialize=function(){e.isNullOrUndefined(this.target)||(this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target),this.isBlazorServerRender()||e.addClass([this.element],We),e.Browser.isDevice&&e.addClass([this.element],"e-device"),this.isBlazorServerRender()||this.setCSSClass(),this.setMaxHeight()},o.prototype.initRender=function(){var t=this;if(this.initialRender=!0,this.isBlazorServerRender()||e.attributes(this.element,{role:"dialog"}),1e3===this.zIndex?(this.setzIndex(this.element,!1),this.calculatezIndex=!0):this.calculatezIndex=!1,this.setTargetContent(),""===this.header||e.isNullOrUndefined(this.header)||this.setHeader(),this.renderCloseIcon(),this.setContent(),""===this.footerTemplate||e.isNullOrUndefined(this.footerTemplate)?e.isNullOrUndefined(this.buttons[0])||e.isNullOrUndefined(this.buttons[0].buttonModel)||this.setButton():this.setFooterTemplate(),this.allowDragging&&!e.isNullOrUndefined(this.headerContent)&&this.setAllowDragging(),e.attributes(this.element,{"aria-modal":this.isModal?"true":"false"}),this.isModal&&this.setIsModal(),!0!==this.element.classList.contains(Je)&&!0!==this.element.classList.contains(Qe)&&!e.isNullOrUndefined(this.element.parentElement)){var i=this.isModal?this.dlgContainer.parentElement:this.element.parentElement;this.refElement=this.createElement("div",{className:"e-dlg-ref-element"}),i.insertBefore(this.refElement,this.isModal?this.dlgContainer:this.element)}if(e.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element)),this.popupObj=new Oe(this.element,{height:this.height,width:this.width,zIndex:this.zIndex,relateTo:this.target,actionOnScroll:"none",enableRtl:this.enableRtl,open:function(e){var i={container:t.isModal?t.dlgContainer:t.element,element:t.element,target:t.target,preventFocus:!1};t.enableResize&&t.resetResizeIcon(),t.trigger("open",i,function(e){e.preventFocus||t.focusContent()})},close:function(i){t.isModal&&e.addClass([t.dlgOverlay],"e-fade"),t.unBindEvent(t.element),t.isModal&&(t.dlgContainer.style.display="none"),t.trigger("close",t.closeArgs);var o=document.activeElement;e.isNullOrUndefined(o)||e.isNullOrUndefined(o.blur)||o.blur(),e.isNullOrUndefined(t.storeActiveElement)||e.isNullOrUndefined(t.storeActiveElement.focus)||t.storeActiveElement.focus()}}),this.positionChange(),this.setEnableRTL(),this.isBlazorServerRender()||(e.addClass([this.element],"e-popup-close"),this.isModal&&this.setOverlayZindex()),this.visible){if(this.show(),this.isModal){var o=this.getTargetContainer(this.target);o instanceof Element&&"rtl"===window.getComputedStyle(o).getPropertyValue("direction")&&this.setPopupPosition()}}else this.isModal&&(this.dlgOverlay.style.display="none");this.initialRender=!1},o.prototype.getTargetContainer=function(t){var e=null;if("string"==typeof t)if(t.startsWith("#"))e=document.getElementById(t.substring(1));else if(t.startsWith(".")){var i=document.getElementsByClassName(t.substring(1));e=i.length>0?i[0]:null}else t instanceof HTMLElement||t===document.body||(e=document.querySelector(t));else t instanceof HTMLElement&&(e=t);return e},o.prototype.resetResizeIcon=function(){var t=this.getMinHeight();if(this.targetEle.offsetHeight<t){var i=this.enableRtl?"e-south-west":"e-south-east",o=this.element.querySelector("."+i);e.isNullOrUndefined(o)||(o.style.bottom="-"+t.toString()+"px")}},o.prototype.setOverlayZindex=function(t){var i;i=e.isNullOrUndefined(t)?parseInt(this.element.style.zIndex,10)?parseInt(this.element.style.zIndex,10):this.zIndex:t,this.dlgOverlay.style.zIndex=(i-1).toString(),this.dlgContainer.style.zIndex=i.toString()},o.prototype.positionChange=function(){this.isModal&&(isNaN(parseFloat(this.position.X))||isNaN(parseFloat(this.position.Y)))?!isNaN(parseFloat(this.position.X))&&isNaN(parseFloat(this.position.Y))||isNaN(parseFloat(this.position.X))&&!isNaN(parseFloat(this.position.Y))?this.setPopupPosition():(this.element.style.top="0px",this.element.style.left="0px",this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y)):this.setPopupPosition()},o.prototype.setPopupPosition=function(){this.popupObj.setProperties({position:{X:this.position.X,Y:this.position.Y}})},o.prototype.setAllowDragging=function(){var t=this;this.element.classList.contains("e-draggable")||(this.dragObj=new e.Draggable(this.element,{clone:!1,isDragScroll:!0,abort:".e-dlg-closeicon-btn",handle:".e-dlg-header-content",dragStart:function(i){t.trigger("dragStart",i,function(t){e.isBlazor()&&t.bindEvents(i.dragElement)})},dragStop:function(i){if(t.isModal){t.IsDragStop=!0,e.isNullOrUndefined(t.position)||t.dlgContainer.classList.remove("e-dlg-"+t.position.X+"-"+t.position.Y);var o=t.getTargetContainer(t.target);o instanceof Element&&"rtl"===window.getComputedStyle(o).getPropertyValue("direction")?t.element.style.position="absolute":t.element.style.position="relative"}t.trigger("dragStop",i),t.isModelResize=!1,t.element.classList.remove("e-restrict-left"),t.updatePersistData()},drag:function(e){t.trigger("drag",e)}}),e.isNullOrUndefined(this.targetEle)||(this.dragObj.dragArea=this.targetEle))},o.prototype.setButton=function(){if(!this.isBlazorServerRender()){this.buttonContent=[],this.btnObj=[];for(s=0;s<this.buttons.length;s++)if(!e.isNullOrUndefined(this.buttons[s].buttonModel)){var t=e.isNullOrUndefined(this.buttons[s].type)?"button":this.buttons[s].type.toLowerCase(),o=this.createElement("button",{className:this.cssClass,attrs:{type:t,tabindex:"0"}});this.buttonContent.push(o.outerHTML)}this.setFooterTemplate()}for(var n,s=0,l=this.element.children;s<l.length;s++)l[s].classList.contains("e-footer-content")&&(n=l[s].querySelectorAll("button"));for(s=0;s<this.buttons.length;s++)e.isNullOrUndefined(this.buttons[s].buttonModel)||(this.isBlazorServerRender()||(this.btnObj[s]=new i.Button(this.buttons[s].buttonModel)),!e.isNullOrUndefined(this.ftrTemplateContent)&&n.length>0&&("function"==typeof this.buttons[s].click&&e.EventHandler.add(n[s],"click",this.buttons[s].click,this),"object"==typeof this.buttons[s].click&&e.EventHandler.add(n[s],"click",this.buttonClickHandler.bind(this,s),this)),this.isBlazorServerRender()||e.isNullOrUndefined(this.ftrTemplateContent)||(this.btnObj[s].appendTo(this.ftrTemplateContent.children[s]),this.buttons[s].isFlat&&this.btnObj[s].element.classList.add("e-flat"),this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]))},o.prototype.buttonClickHandler=function(t){this.trigger("buttons["+t+"].click",{})},o.prototype.setContent=function(){this.contentEle=this.createElement("div",{className:"e-dlg-content",id:this.element.id+"_dialog-content"}),this.headerEle?e.attributes(this.element,{"aria-describedby":this.element.id+"_title "+this.element.id+"_dialog-content"}):e.attributes(this.element,{"aria-describedby":this.element.id+"_dialog-content"}),this.innerContentElement?this.contentEle.appendChild(this.innerContentElement):(e.isNullOrUndefined(this.content)||""===this.content)&&this.initialRender||(("string"!=typeof this.content||e.isBlazor())&&this.content instanceof HTMLElement?this.contentEle.appendChild(this.content):this.setTemplate(this.content,this.contentEle,"content")),e.isNullOrUndefined(this.headerContent)?this.element.insertBefore(this.contentEle,this.element.children[0]):this.element.insertBefore(this.contentEle,this.element.children[1]),"auto"===this.height&&(this.isBlazorServerRender()||!e.Browser.isIE||""!==this.element.style.width||e.isNullOrUndefined(this.width)||(this.element.style.width=e.formatUnit(this.width)),this.setMaxHeight())},o.prototype.setTemplate=function(t,i,o){var n,s;s=i.classList.contains("e-dlg-header")?this.element.id+"header":i.classList.contains("e-footer-content")?this.element.id+"footerTemplate":this.element.id+"content";var l;e.isNullOrUndefined(t.outerHTML)?("string"==typeof t||"string"!=typeof t||e.isBlazor()&&!this.isStringTemplate)&&("string"==typeof t&&(t=this.sanitizeHelper(t)),this.isVue||"string"!=typeof t?(n=e.compile(t),l=t):i.innerHTML=t):i.appendChild(t);var r=[];if(!e.isNullOrUndefined(n)){for(var a=0,h=n({},this,o,s,!(e.isBlazor()&&!this.isStringTemplate&&0===l.indexOf("<div>Blazor"))||this.isStringTemplate);a<h.length;a++){var d=h[a];r.push(d)}e.append([].slice.call(r),i)}},o.prototype.sanitizeHelper=function(t){if(this.enableHtmlSanitizer){var i=e.SanitizeHtmlHelper.beforeSanitize(),o={cancel:!1,helper:null};e.extend(i,i,o),this.trigger("beforeSanitizeHtml",i),i.cancel&&!e.isNullOrUndefined(i.helper)?t=i.helper(t):i.cancel||(t=e.SanitizeHtmlHelper.serializeValue(i,t))}return t},o.prototype.setMaxHeight=function(){if(this.allowMaxHeight){var t=this.element.style.display;this.element.style.display="none",this.element.style.maxHeight=!e.isNullOrUndefined(this.target)&&this.targetEle.offsetHeight<window.innerHeight?this.targetEle.offsetHeight-20+"px":window.innerHeight-20+"px",this.element.style.display=t,e.Browser.isIE&&"auto"===this.height&&!e.isNullOrUndefined(this.contentEle)&&this.element.offsetHeight<this.contentEle.offsetHeight&&(this.element.style.height="inherit")}},o.prototype.setEnableRTL=function(){this.isBlazorServerRender()||(this.enableRtl?e.addClass([this.element],"e-rtl"):e.removeClass([this.element],"e-rtl")),e.isNullOrUndefined(this.element.querySelector(".e-resize-handle"))||(at(),this.setResize())},o.prototype.setTargetContent=function(){var t=this;if(e.isNullOrUndefined(this.content)||""===this.content){var i=""!==this.element.innerHTML.replace(/\s|<(\/?|\/?)(!--!--)>/g,"");(this.element.children.length>0||i)&&(this.innerContentElement=document.createDocumentFragment(),[].slice.call(this.element.childNodes).forEach(function(e){8!==e.nodeType&&t.innerContentElement.appendChild(e)}))}},o.prototype.setHeader=function(){this.headerEle?this.headerEle.innerHTML="":this.headerEle=this.createElement("div",{id:this.element.id+"_title",className:"e-dlg-header"}),this.createHeaderContent(),this.headerContent.appendChild(this.headerEle),this.setTemplate(this.header,this.headerEle,"header"),e.attributes(this.element,{"aria-describedby":this.element.id+"_title"}),e.attributes(this.element,{"aria-labelledby":this.element.id+"_dialog-header"}),this.element.insertBefore(this.headerContent,this.element.children[0]),this.allowDragging&&!e.isNullOrUndefined(this.headerContent)&&this.setAllowDragging()},o.prototype.setFooterTemplate=function(){this.ftrTemplateContent?this.ftrTemplateContent.innerHTML="":this.ftrTemplateContent=this.createElement("div",{className:"e-footer-content"}),""===this.footerTemplate||e.isNullOrUndefined(this.footerTemplate)?this.ftrTemplateContent.innerHTML=this.buttonContent.join(""):this.setTemplate(this.footerTemplate,this.ftrTemplateContent,"footerTemplate"),this.element.appendChild(this.ftrTemplateContent)},o.prototype.createHeaderContent=function(){e.isNullOrUndefined(this.headerContent)&&(this.headerContent=this.createElement("div",{id:this.element.id+"_dialog-header",className:"e-dlg-header-content"}))},o.prototype.renderCloseIcon=function(){this.showCloseIcon&&(this.closeIcon=this.createElement("button",{className:"e-dlg-closeicon-btn",attrs:{type:"button"}}),this.closeIconBtnObj=new i.Button({cssClass:"e-flat",iconCss:"e-icon-dlg-close e-icons"}),this.closeIconTitle(),e.isNullOrUndefined(this.headerContent)?(this.createHeaderContent(),e.prepend([this.closeIcon],this.headerContent),this.element.insertBefore(this.headerContent,this.element.children[0])):e.prepend([this.closeIcon],this.headerContent),this.closeIconBtnObj.appendTo(this.closeIcon))},o.prototype.closeIconTitle=function(){this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("close");this.closeIcon.setAttribute("title",t),this.closeIcon.setAttribute("aria-label",t)},o.prototype.setCSSClass=function(t){t&&(e.removeClass([this.element],t.split(" ")),this.isModal&&!e.isNullOrUndefined(this.dlgContainer)&&e.removeClass([this.dlgContainer],t.split(" "))),this.cssClass&&(e.addClass([this.element],this.cssClass.split(" ")),this.isModal&&!e.isNullOrUndefined(this.dlgContainer)&&e.addClass([this.dlgContainer],this.cssClass.split(" ")))},o.prototype.setIsModal=function(){this.dlgContainer=this.createElement("div",{className:"e-dlg-container"}),this.setCSSClass(),this.element.classList.remove("e-popup-open"),this.element.parentNode.insertBefore(this.dlgContainer,this.element),this.dlgContainer.appendChild(this.element),e.addClass([this.element],"e-dlg-modal"),this.dlgOverlay=this.createElement("div",{className:"e-dlg-overlay"}),this.dlgOverlay.style.zIndex=(this.zIndex-1).toString(),this.dlgContainer.appendChild(this.dlgOverlay)},o.prototype.getValidFocusNode=function(t){for(var e,i=0;i<t.length;i++){if(((e=t[i]).clientHeight>0||"a"===e.tagName.toLowerCase()&&e.hasAttribute("href"))&&e.tabIndex>-1&&!e.disabled&&!this.disableElement(e,'[disabled],[aria-disabled="true"],[type="hidden"]'))return e;e=null}return e},o.prototype.focusableElements=function(t){if(!e.isNullOrUndefined(t)){var i=t.querySelectorAll('input,select,textarea,button,a,[contenteditable="true"],[tabindex]');return this.getValidFocusNode(i)}return null},o.prototype.getAutoFocusNode=function(t){var i=t.querySelector(".e-dlg-closeicon-btn"),o=t.querySelectorAll("[autofocus]"),n=this.getValidFocusNode(o);if(e.isBlazor()&&(this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]),e.isNullOrUndefined(n)){if(n=this.focusableElements(this.contentEle),!e.isNullOrUndefined(n))return i=n;if(!e.isNullOrUndefined(this.primaryButtonEle))return this.element.querySelector(".e-primary")}else i=n;return i},o.prototype.disableElement=function(t,e){var i=t?t.matches||t.webkitMatchesSelector||t.msGetRegionContent:null;if(i)for(;t;t=t.parentNode)if(t instanceof Element&&i.call(t,e))return t;return null},o.prototype.focusContent=function(){var t=this.getAutoFocusNode(this.element),i=e.isNullOrUndefined(t)?this.element:t,o=e.Browser.userAgent;(o.indexOf("MSIE ")>0||o.indexOf("Trident/")>0)&&this.element.focus(),i.focus(),this.unBindEvent(this.element),this.bindEvent(this.element)},o.prototype.bindEvent=function(t){e.EventHandler.add(t,"keydown",this.keyDown,this)},o.prototype.unBindEvent=function(t){e.EventHandler.remove(t,"keydown",this.keyDown)},o.prototype.updateSanitizeContent=function(){this.isBlazorServerRender()||(this.contentEle.innerHTML=this.sanitizeHelper(this.content))},o.prototype.isBlazorServerRender=function(){return e.isBlazor()&&this.isServerRendered},o.prototype.getModuleName=function(){return"dialog"},o.prototype.onPropertyChanged=function(t,i){if(this.element.classList.contains(We))for(var o=0,n=Object.keys(t);o<n.length;o++)switch(n[o]){case"content":e.isNullOrUndefined(this.content)||""===this.content?e.isNullOrUndefined(this.contentEle)||(e.detach(this.contentEle),this.contentEle=null):(this.isBlazorServerRender()&&(this.contentEle=this.element.querySelector(".e-dlg-content")),e.isNullOrUndefined(this.contentEle)||"dialog"===this.contentEle.getAttribute("role")?this.setContent():(this.isBlazorServerRender()||(this.contentEle.innerHTML=""),"function"==typeof this.content?(this.clearTemplate(["content"]),e.detach(this.contentEle),this.contentEle=null,this.setContent()):"string"==typeof this.content?this.updateSanitizeContent():this.contentEle.appendChild(this.content),this.setMaxHeight()));break;case"header":""===this.header||e.isNullOrUndefined(this.header)?this.headerEle&&(e.detach(this.headerEle),this.headerEle=null):this.setHeader();break;case"footerTemplate":if(""===this.footerTemplate||e.isNullOrUndefined(this.footerTemplate)){if(!this.ftrTemplateContent)return;e.detach(this.ftrTemplateContent),this.ftrTemplateContent=null,this.buttons=[{}]}else this.setFooterTemplate(),this.buttons=[{}];break;case"showCloseIcon":this.element.getElementsByClassName("e-icon-dlg-close").length>0?this.showCloseIcon||""!==this.header&&!e.isNullOrUndefined(this.header)?this.showCloseIcon||e.detach(this.closeIcon):(e.detach(this.headerContent),this.headerContent=null):(this.renderCloseIcon(),this.wireEvents());break;case"locale":this.showCloseIcon&&this.closeIconTitle();break;case"visible":this.visible?this.show():this.hide();break;case"isModal":this.updateIsModal();break;case"height":e.setStyleAttribute(this.element,{height:e.formatUnit(t.height)}),this.updatePersistData();break;case"width":e.setStyleAttribute(this.element,{width:e.formatUnit(t.width)}),this.updatePersistData();break;case"zIndex":this.popupObj.zIndex=this.zIndex,this.isModal&&this.setOverlayZindex(this.zIndex),this.element.style.zIndex!==this.zIndex.toString()&&(this.calculatezIndex=!1);break;case"cssClass":this.setCSSClass(i.cssClass);break;case"buttons":this.unWireButtonEvents(),this.destroyButtons(),e.isNullOrUndefined(this.ftrTemplateContent)||(e.detach(this.ftrTemplateContent),this.ftrTemplateContent=null),this.footerTemplate="",this.setButton();break;case"allowDragging":this.allowDragging&&!e.isNullOrUndefined(this.headerContent)?this.setAllowDragging():this.dragObj.destroy();break;case"target":this.setTarget(t.target);break;case"position":if(this.checkPositionData(),this.isModal){var s=this.position.X,l=this.position.Y;e.isNullOrUndefined(i.position)||(e.isNullOrUndefined(i.position.X)||(s=i.position.X),e.isNullOrUndefined(i.position.Y)||(l=i.position.Y)),this.dlgContainer.classList.contains("e-dlg-"+s+"-"+l)&&this.dlgContainer.classList.remove("e-dlg-"+s+"-"+l)}this.positionChange(),this.updatePersistData();break;case"enableRtl":this.setEnableRTL();break;case"enableResize":this.setResize(),this.isModelResize=this.enableResize&&this.isModal,this.enableResize&&this.dialogOpen&&this.resetResizeIcon();break;case"minHeight":""!==this.minHeight&&(this.element.style.minHeight=e.formatUnit(this.minHeight))}},o.prototype.setTarget=function(t){this.popupObj.relateTo=t,this.target=t,this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target,this.dragObj&&(this.dragObj.dragArea=this.targetEle),this.setMaxHeight(),this.isModal&&this.updateIsModal(),this.enableResize&&this.setResize(),e.isNullOrUndefined(this.targetEle)||(this.isModal&&!e.isNullOrUndefined(this.dlgContainer)?this.targetEle.appendChild(this.dlgContainer):e.isNullOrUndefined(this.element)||this.targetEle.appendChild(this.element))},o.prototype.updateIsModal=function(){if(this.element.setAttribute("aria-modal",this.isModal?"true":"false"),this.isModal)e.isNullOrUndefined(this.dlgOverlay)&&(this.setIsModal(),this.element.style.top="0px",this.element.style.left="0px",e.isNullOrUndefined(this.targetEle)||this.targetEle.appendChild(this.dlgContainer));else{for(e.removeClass([this.element],"e-dlg-modal"),e.removeClass([document.body],[Ve,_e]),e.detach(this.dlgOverlay);this.dlgContainer.firstChild;)this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild,this.dlgContainer);this.dlgContainer.parentElement.removeChild(this.dlgContainer)}this.visible&&this.show(),this.positionChange(),this.isModal&&this.dlgOverlay&&e.EventHandler.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},o.prototype.setzIndex=function(t,e){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0;var o=j(t);this.zIndex=o>this.zIndex?o:this.zIndex,this.isProtectedOnChange=i,e&&(this.popupObj.zIndex=this.zIndex)},o.prototype.windowResizeHandler=function(){lt(this.targetEle.clientWidth),rt(this.targetEle.clientHeight),this.setMaxHeight()},o.prototype.getPersistData=function(){return this.addOnPersist(["width","height","position"])},o.prototype.removeAllChildren=function(t){for(;t.children[0];)this.removeAllChildren(t.children[0]),t.removeChild(t.children[0])},o.prototype.destroy=function(){if(!this.isDestroyed){var i=["e-rtl","e-dlg-modal","e-dlg-resizable","e-restrict-left",Ze,"e-device"],o=["role","aria-modal","aria-labelledby","aria-describedby","aria-grabbed","tabindex","style"];e.removeClass([this.targetEle],[Ve,_e]),!e.isNullOrUndefined(this.element)&&this.element.classList.contains(Ze)&&e.removeClass([document.body],[Ve,_e]),this.isModal&&e.removeClass([e.isNullOrUndefined(this.targetEle)?document.body:this.targetEle],_e),this.unWireEvents(),this.unWireButtonEvents(),this.destroyButtons(),e.isNullOrUndefined(this.closeIconBtnObj)||this.closeIconBtnObj.destroy(),e.isNullOrUndefined(this.dragObj)||this.dragObj.destroy(),!e.isNullOrUndefined(this.popupObj.element)&&this.popupObj.element.classList.contains("e-popup")&&this.popupObj.destroy(),e.removeClass([this.element],i),e.isNullOrUndefined(this.cssClass)||""===this.cssClass||e.removeClass([this.element],this.cssClass.split(" ")),e.isNullOrUndefined(this.refElement)||e.isNullOrUndefined(this.refElement.parentElement)||(this.refElement.parentElement.insertBefore(this.isModal?this.dlgContainer:this.element,this.refElement),e.detach(this.refElement),this.refElement=void 0),this.isModal&&(e.detach(this.dlgOverlay),this.dlgContainer.parentNode.insertBefore(this.element,this.dlgContainer),e.detach(this.dlgContainer)),this.element.innerHTML=this.clonedEle.innerHTML;for(var n=0;n<o.length;n++)this.element.removeAttribute(o[n]);this.ftrTemplateContent=null,this.headerContent=null,this.isReact||this.isVue||e.isNullOrUndefined(this.contentEle)||this.removeAllChildren(this.contentEle),this.contentEle=null,ht(),t.prototype.destroy.call(this),this.isReact&&this.clearTemplate()}},o.prototype.wireWindowResizeEvent=function(){this.boundWindowResizeHandler=this.windowResizeHandler.bind(this),window.addEventListener("resize",this.boundWindowResizeHandler)},o.prototype.unWireWindowResizeEvent=function(){window.removeEventListener("resize",this.boundWindowResizeHandler),this.boundWindowResizeHandler=null},o.prototype.wireEvents=function(){this.showCloseIcon&&e.EventHandler.add(this.closeIcon,"click",this.closeIconClickEventHandler,this),this.isModal&&this.dlgOverlay&&e.EventHandler.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},o.prototype.unWireEvents=function(){this.showCloseIcon&&e.EventHandler.remove(this.closeIcon,"click",this.closeIconClickEventHandler),this.isModal&&e.EventHandler.remove(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler)},o.prototype.refreshPosition=function(){this.popupObj.refreshPosition(),this.element.classList.contains("e-dlg-modal")&&this.positionChange()},o.prototype.getDimension=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},o.prototype.show=function(t){var i=this;if(this.element.classList.contains(We)){if(!this.element.classList.contains("e-popup-open")||!e.isNullOrUndefined(t)){e.isNullOrUndefined(t)||this.fullScreen(t);var o=e.isBlazor()?{cancel:!1,element:this.element,container:this.isModal?this.dlgContainer:this.element,maxHeight:this.element.style.maxHeight}:{cancel:!1,element:this.element,container:this.isModal?this.dlgContainer:this.element,target:this.target,maxHeight:this.element.style.maxHeight};this.trigger("beforeOpen",o,function(t){if(!t.cancel){i.element.style.maxHeight!==o.maxHeight&&(i.allowMaxHeight=!1,i.element.style.maxHeight=o.maxHeight),i.enableResize&&null==i.boundWindowResizeHandler&&!i.initialRender&&i.wireWindowResizeEvent(),i.storeActiveElement=document.activeElement,i.element.tabIndex=-1,i.isModal&&!e.isNullOrUndefined(i.dlgOverlay)&&(i.dlgOverlay.style.display="block",i.dlgContainer.style.display="flex",e.removeClass([i.dlgOverlay],"e-fade"),e.isNullOrUndefined(i.targetEle)?e.addClass([document.body],[Ve,_e]):(i.targetEle===document.body?i.dlgContainer.style.position="fixed":i.dlgContainer.style.position="absolute",i.dlgOverlay.style.position="absolute",(l=i.getTargetContainer(i.target))instanceof Element&&"rtl"===(r=window.getComputedStyle(l)).getPropertyValue("direction")?i.element.style.position="absolute":i.element.style.position="relative",e.addClass([i.targetEle],[Ve,_e])));var n={name:"None"===i.animationSettings.effect&&"Enable"===e.animationMode?"ZoomIn":i.animationSettings.effect+"In",duration:i.animationSettings.duration,delay:i.animationSettings.delay},s=i.isModal?i.element.parentElement:i.element;if(i.calculatezIndex&&(i.setzIndex(s,!0),e.setStyleAttribute(i.element,{zIndex:i.zIndex}),i.isModal&&i.setOverlayZindex(i.zIndex)),"None"===i.animationSettings.effect&&"Enable"===e.animationMode?i.popupObj.show(n):"None"===i.animationSettings.effect?i.popupObj.show():i.popupObj.show(n),i.isModal){var l=i.getTargetContainer(i.target);if(l instanceof Element){var r=window.getComputedStyle(l);"rtl"!==r.getPropertyValue("direction")||i.IsDragStop||i.setPopupPosition()}}i.dialogOpen=!0;var a=i.isProtectedOnChange;i.isProtectedOnChange=!0,i.visible=!0,i.preventVisibility=!0,i.isProtectedOnChange=a}})}this.isReact&&this.renderReactTemplates()}},o.prototype.hide=function(t){var i=this;if(this.element.classList.contains(We)&&this.preventVisibility){var o=e.isBlazor()?{cancel:!1,isInteracted:!!t,element:this.element,container:this.isModal?this.dlgContainer:this.element,event:t}:{cancel:!1,isInteracted:!!t,element:this.element,target:this.target,container:this.isModal?this.dlgContainer:this.element,event:t,closedBy:this.dlgClosedBy};this.closeArgs=o,this.trigger("beforeClose",o,function(t){if(!t.cancel){i.enableResize&&i.unWireWindowResizeEvent();var o={name:"None"===i.animationSettings.effect&&"Enable"===e.animationMode?"ZoomOut":i.animationSettings.effect+"Out",duration:i.animationSettings.duration,delay:i.animationSettings.delay};"None"===i.animationSettings.effect&&"Enable"===e.animationMode?i.popupObj.hide(o):"None"===i.animationSettings.effect?i.popupObj.hide():i.popupObj.hide(o),setTimeout(function(){i.isModal&&!e.isNullOrUndefined(i.targetEle)&&i.targetEle.classList.contains(Ve)&&i.targetEle.classList.contains(_e)&&e.removeClass([i.targetEle],[Ve,_e]),document.body.classList.contains(Ve)&&document.body.classList.contains(_e)&&e.removeClass([document.body],[Ve,_e])},i.animationSettings.duration+i.animationSettings.delay),i.dialogOpen=!1;var n=i.isProtectedOnChange;i.isProtectedOnChange=!0,i.visible=!1,i.preventVisibility=!1,i.isProtectedOnChange=n}i.dlgClosedBy="user action"})}},o.prototype.fullScreen=function(t){this.element.offsetTop,this.element.offsetLeft;if(t){this.isModal||(this.element.style.top=document.scrollingElement.scrollTop+"px"),e.addClass([this.element],Ze);var i=this.element.style.display;this.element.style.display="none",this.element.style.maxHeight=e.isNullOrUndefined(this.target)?window.innerHeight+"px":this.targetEle.offsetHeight+"px",this.element.style.display=i,e.addClass([document.body],[Ve,_e]),this.allowDragging&&!e.isNullOrUndefined(this.dragObj)&&this.dragObj.destroy()}else e.removeClass([this.element],Ze),e.removeClass([document.body],[Ve,_e]),this.allowDragging&&!e.isNullOrUndefined(this.headerContent)&&this.setAllowDragging();return t},o.prototype.getButtons=function(t){return e.isNullOrUndefined(t)?this.btnObj:this.btnObj[t]},o.prototype.unWireButtonEvents=function(){if(this.buttons.length>0&&""===this.footerTemplate&&this.ftrTemplateContent)for(var t=0;t<this.buttons.length;t++)this.buttons[t].click&&"function"==typeof this.buttons[t].click&&this.ftrTemplateContent.children[t]&&e.EventHandler.remove(this.ftrTemplateContent.children[t],"click",this.buttons[t].click)},o.prototype.destroyButtons=function(){if(!e.isNullOrUndefined(this.btnObj))for(var t=0;t<this.btnObj.length;t++)this.btnObj[t]&&!this.btnObj[t].isDestroyed&&this.btnObj[t].destroy()},je([e.Property("")],o.prototype,"content",void 0),je([e.Property(!0)],o.prototype,"enableHtmlSanitizer",void 0),je([e.Property(!1)],o.prototype,"enablePersistence",void 0),je([e.Property(!1)],o.prototype,"showCloseIcon",void 0),je([e.Property(!1)],o.prototype,"isModal",void 0),je([e.Property("")],o.prototype,"header",void 0),je([e.Property(!0)],o.prototype,"visible",void 0),je([e.Property(!1)],o.prototype,"enableResize",void 0),je([e.Property(["South-East"])],o.prototype,"resizeHandles",void 0),je([e.Property("auto")],o.prototype,"height",void 0),je([e.Property("")],o.prototype,"minHeight",void 0),je([e.Property("100%")],o.prototype,"width",void 0),je([e.Property("")],o.prototype,"cssClass",void 0),je([e.Property(1e3)],o.prototype,"zIndex",void 0),je([e.Property(null)],o.prototype,"target",void 0),je([e.Property("")],o.prototype,"footerTemplate",void 0),je([e.Property(!1)],o.prototype,"allowDragging",void 0),je([e.Collection([{}],Fe)],o.prototype,"buttons",void 0),je([e.Property(!0)],o.prototype,"closeOnEscape",void 0),je([e.Complex({},qe)],o.prototype,"animationSettings",void 0),je([e.Complex({X:"center",Y:"center"},be)],o.prototype,"position",void 0),je([e.Event()],o.prototype,"created",void 0),je([e.Event()],o.prototype,"open",void 0),je([e.Event()],o.prototype,"beforeSanitizeHtml",void 0),je([e.Event()],o.prototype,"beforeOpen",void 0),je([e.Event()],o.prototype,"close",void 0),je([e.Event()],o.prototype,"beforeClose",void 0),je([e.Event()],o.prototype,"dragStart",void 0),je([e.Event()],o.prototype,"dragStop",void 0),je([e.Event()],o.prototype,"drag",void 0),je([e.Event()],o.prototype,"overlayClick",void 0),je([e.Event()],o.prototype,"resizeStart",void 0),je([e.Event()],o.prototype,"resizing",void 0),je([e.Event()],o.prototype,"resizeStop",void 0),je([e.Event()],o.prototype,"destroyed",void 0),o=je([e.NotifyPropertyChanges],o)}(e.Component);!function(t){function i(t){var i=e.createElement("div",{className:Je});document.body.appendChild(i);var o,l=[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}}];return o="string"==typeof t?n({content:t,position:{X:"center",Y:"top"},isModal:!0,header:Ge,buttons:l},i):n(s(t),i),o.close=function(){t&&t.close&&t.close.apply(o),o.destroy(),o.element.classList.contains("e-dlg-modal")?(o.element.parentElement.remove(),o.target.classList.remove(Ke)):o.element.remove()},o}function o(t){var i=e.createElement("div",{className:Qe});document.body.appendChild(i);var o,s=[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}},{buttonModel:{content:"Cancel"},click:function(){this.hide()}}];return o="string"==typeof t?n({position:{X:"center",Y:"top"},content:t,isModal:!0,header:Ge,buttons:s},i):n(l(t),i),o.close=function(){t&&t.close&&t.close.apply(o),o.destroy(),o.element.classList.contains("e-dlg-modal")?(o.element.parentElement.remove(),o.target.classList.remove(Ke)):o.element.remove()},o}function n(t,e){var i=new $e(t);return i.appendTo(e),i}function s(t){var e={};return e.buttons=[],e=r(e,t),e=a(e,t)}function l(t){var e={};return e.buttons=[],e=r(e,t),e=h(e,t)}function r(t,i){return t.header=e.isNullOrUndefined(i.title)?null:i.title,t.content=e.isNullOrUndefined(i.content)?"":i.content,t.isModal=!!e.isNullOrUndefined(i.isModal)||i.isModal,t.showCloseIcon=!e.isNullOrUndefined(i.showCloseIcon)&&i.showCloseIcon,t.allowDragging=!e.isNullOrUndefined(i.isDraggable)&&i.isDraggable,t.closeOnEscape=!e.isNullOrUndefined(i.closeOnEscape)&&i.closeOnEscape,t.position=e.isNullOrUndefined(i.position)?{X:"center",Y:"top"}:i.position,t.animationSettings=e.isNullOrUndefined(i.animationSettings)?{effect:"Fade",duration:400,delay:0}:i.animationSettings,t.cssClass=e.isNullOrUndefined(i.cssClass)?"":i.cssClass,t.zIndex=e.isNullOrUndefined(i.zIndex)?1e3:i.zIndex,t.open=e.isNullOrUndefined(i.open)?null:i.open,t.width=e.isNullOrUndefined(i.width)?"auto":i.width,t.height=e.isNullOrUndefined(i.height)?"auto":i.height,t}function a(t,i){var o=[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}}];return e.isNullOrUndefined(i.okButton)?t.buttons=o:t.buttons[0]=d(t.buttons[0],i.okButton,o[0]),t}function h(t,i){var o={buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}},n={buttonModel:{content:"Cancel"},click:function(){this.hide()}};return e.isNullOrUndefined(i.okButton)?t.buttons[0]=o:t.buttons[0]=d(t.buttons[0],i.okButton,o),e.isNullOrUndefined(i.cancelButton)?t.buttons[1]=n:t.buttons[1]=d(t.buttons[1],i.cancelButton,n),t}function d(t,i,o){var n=o;return e.isNullOrUndefined(i.text)||(n.buttonModel.content=i.text),e.isNullOrUndefined(i.icon)||(n.buttonModel.iconCss=i.icon),e.isNullOrUndefined(i.cssClass)||(n.buttonModel.cssClass=i.cssClass),e.isNullOrUndefined(i.click)||(n.click=i.click),e.isNullOrUndefined(i.isFlat)||(n.isFlat=i.isFlat),n}t.alert=i,t.confirm=o}(t.DialogUtility||(t.DialogUtility={}));var ti=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),ei=function(t,e,i,o){var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ii=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ti(i,t),ei([e.Property({effect:"FadeIn",duration:150,delay:0})],i.prototype,"open",void 0),ei([e.Property({effect:"FadeOut",duration:150,delay:0})],i.prototype,"close",void 0),i}(e.ChildProperty),oi=function(t){function i(e,i){var o=t.call(this,e,i)||this;return o.mouseMoveEvent=null,o.mouseMoveTarget=null,o.containerElement=null,o.isBodyContainer=!0,o}return ti(i,t),i.prototype.initialize=function(){this.formatPosition(),e.addClass([this.element],"e-tooltip")},i.prototype.formatPosition=function(){var t,e;this.position&&(0===this.position.indexOf("Top")||0===this.position.indexOf("Bottom")?(t=this.position.split(/(?=[A-Z])/),this.tooltipPositionY=t[0],this.tooltipPositionX=t[1]):(e=this.position.split(/(?=[A-Z])/),this.tooltipPositionX=e[0],this.tooltipPositionY=e[1]))},i.prototype.renderArrow=function(){this.setTipClass(this.position);var t=this.createElement("div",{className:"e-arrow-tip "+this.tipClass});t.appendChild(this.createElement("div",{className:"e-arrow-tip-outer "+this.tipClass})),t.appendChild(this.createElement("div",{className:"e-arrow-tip-inner "+this.tipClass})),this.tooltipEle.appendChild(t)},i.prototype.setTipClass=function(t){0===t.indexOf("Right")?this.tipClass="e-tip-left":0===t.indexOf("Bottom")?this.tipClass="e-tip-top":0===t.indexOf("Left")?this.tipClass="e-tip-right":this.tipClass="e-tip-bottom"},i.prototype.renderPopup=function(t){var e=this.mouseTrail?{top:0,left:0}:this.getTooltipPosition(t);this.tooltipEle.classList.remove("e-lib"),this.popupObj=new Oe(this.tooltipEle,{height:this.height,width:this.width,position:{X:e.left,Y:e.top},enableRtl:this.enableRtl,open:this.openPopupHandler.bind(this),close:this.closePopupHandler.bind(this)})},i.prototype.getScalingFactor=function(t){if(!t)return{x:1,y:1};var e={x:1,y:1},i=t.closest('[style*="transform: scale"]');if(i&&i!==this.tooltipEle&&i.contains(this.tooltipEle)){var o=window.getComputedStyle(i).getPropertyValue("transform").match(/matrix\(([^)]+)\)/)[1].split(",").map(parseFloat);e.x=o[0],e.y=o[3]}return e},i.prototype.getTooltipPosition=function(t){this.tooltipEle.style.display="block";var e=this.element.closest('[style*="zoom"]');e&&(e.contains(this.tooltipEle)||(this.tooltipEle.style.zoom=getComputedStyle(e).zoom));var i=n(t,this.tooltipPositionX,this.tooltipPositionY,!this.isBodyContainer,this.isBodyContainer?null:this.containerElement.getBoundingClientRect()),o=this.getScalingFactor(t),s=this.calculateTooltipOffset(this.position,o.x,o.y),l=this.calculateElementPosition(i,s),r=l[0],a=l[1],h=this.collisionFlipFit(t,r,a);return h.left=h.left/o.x,h.top=h.top/o.y,this.tooltipEle.style.display="",h},i.prototype.windowResize=function(){this.reposition(this.findTarget())},i.prototype.reposition=function(t){if(this.popupObj&&t){var e=this.getTooltipPosition(t);this.popupObj.position={X:e.left,Y:e.top},this.popupObj.dataBind()}},i.prototype.openPopupHandler=function(){!this.mouseTrail&&this.needTemplateReposition()&&this.reposition(this.findTarget()),this.trigger("afterOpen",this.tooltipEventArgs),this.tooltipEventArgs=null},i.prototype.closePopupHandler=function(){this.isReact&&"Click"!==this.opensOn&&"function"!=typeof this.content&&this.clearTemplate(["content"]),this.clear();var t={type:this.tooltipEventArgs.event?this.tooltipEventArgs.event.type:null,cancel:!1,target:this.tooltipEventArgs.target,event:this.tooltipEventArgs.event?this.tooltipEventArgs.event:null,element:this.tooltipEle,isInteracted:!e.isNullOrUndefined(this.tooltipEventArgs.event)};this.trigger("afterClose",t),t=null},i.prototype.calculateTooltipOffset=function(t,i,o){void 0===i&&(i=1),void 0===o&&(o=1);var n,s,l,r,a,h,d,p,c={top:0,left:0};if(1!==i||1!==o){var u=this.tooltipEle.getBoundingClientRect(),f=void 0;l=Math.round(u.width),r=Math.round(u.height),(a=e.select(".e-arrow-tip",this.tooltipEle))&&(f=a.getBoundingClientRect()),n=a?Math.round(f.width):0,s=a?Math.round(f.height):0,h=this.showTipPointer?0:8,d=s/2+2+(r-this.tooltipEle.clientHeight*o),p=n/2+2+(l-this.tooltipEle.clientWidth*i)}else l=this.tooltipEle.offsetWidth,r=this.tooltipEle.offsetHeight,n=(a=e.select(".e-arrow-tip",this.tooltipEle))?a.offsetWidth:0,s=a?a.offsetHeight:0,h=this.showTipPointer?0:8,d=s/2+2+(this.tooltipEle.offsetHeight-this.tooltipEle.clientHeight),p=n/2+2+(this.tooltipEle.offsetWidth-this.tooltipEle.clientWidth);switch(this.mouseTrail&&(h+=2),t){case"RightTop":c.left+=n+h,c.top-=r-d;break;case"RightCenter":c.left+=n+h,c.top-=r/2;break;case"RightBottom":c.left+=n+h,c.top-=d;break;case"BottomRight":c.top+=s+h,c.left-=p;break;case"BottomCenter":c.top+=s+h,c.left-=l/2;break;case"BottomLeft":c.top+=s+h,c.left-=l-p;break;case"LeftBottom":c.left-=n+l+h,c.top-=d;break;case"LeftCenter":c.left-=n+l+h,c.top-=r/2;break;case"LeftTop":c.left-=n+l+h,c.top-=r-d;break;case"TopLeft":c.top-=r+s+h,c.left-=l-p;break;case"TopRight":c.top-=r+s+h,c.left-=p;break;default:c.top-=r+s+h,c.left-=l/2}return c.left+=this.offsetX,c.top+=this.offsetY,c},i.prototype.updateTipPosition=function(t){var i=e.selectAll(".e-arrow-tip,.e-arrow-tip-outer,.e-arrow-tip-inner",this.tooltipEle),o=["e-tip-bottom","e-tip-top","e-tip-left","e-tip-right"];e.removeClass(i,o),this.setTipClass(t),e.addClass(i,this.tipClass)},i.prototype.adjustArrow=function(t,i,o,n){var s=e.select(".e-arrow-tip",this.tooltipEle);if(!1!==this.showTipPointer&&null!==s){this.updateTipPosition(i);var l,r;this.tooltipEle.style.display="block";var a=this.tooltipEle.clientWidth,h=this.tooltipEle.clientHeight,d=e.select(".e-arrow-tip-inner",this.tooltipEle),p=s.offsetWidth,c=s.offsetHeight;if(this.tooltipEle.style.display="","e-tip-bottom"===this.tipClass||"e-tip-top"===this.tipClass)"e-tip-bottom"===this.tipClass?(r="99.9%",d.style.top="-"+(c-2)+"px"):(r=-(c-1)+"px",d.style.top="-"+(c-6)+"px"),t&&(l=(u="Center"!==o||a>t.offsetWidth||this.mouseTrail)&&"Left"===o||!u&&"End"===this.tipPointerPosition?a-p-2+"px":u&&"Right"===o||!u&&"Start"===this.tipPointerPosition?"2px":!u||"End"!==this.tipPointerPosition&&"Start"!==this.tipPointerPosition?a/2-p/2+"px":"End"===this.tipPointerPosition?t.offsetWidth+(this.tooltipEle.offsetWidth-t.offsetWidth)/2-p/2-2+"px":(this.tooltipEle.offsetWidth-t.offsetWidth)/2-p/2+2+"px");else{"e-tip-right"===this.tipClass?(l="99.9%",d.style.left="-"+(p-2)+"px"):(l=-(p-1)+"px",d.style.left=p-2-p+"px");var u="Center"!==n||h>t.offsetHeight||this.mouseTrail;r=u&&"Top"===n||!u&&"End"===this.tipPointerPosition?h-c-2+"px":u&&"Bottom"===n||!u&&"Start"===this.tipPointerPosition?"2px":h/2-c/2+"px"}s.style.top=r,s.style.left=l}},i.prototype.renderContent=function(t){var i=this,o=e.select(".e-tip-content",this.tooltipEle);if(this.cssClass&&e.addClass([this.tooltipEle],this.cssClass.split(" ")),t&&!e.isNullOrUndefined(t.getAttribute("title"))&&(t.setAttribute("data-content",t.getAttribute("title")),t.removeAttribute("title")),e.isNullOrUndefined(this.content))t&&!e.isNullOrUndefined(t.getAttribute("data-content"))&&(o.innerHTML=t.getAttribute("data-content"));else if(o.innerHTML="",this.content instanceof HTMLElement)o.appendChild(this.content);else if("string"==typeof this.content)this.isAngular?this.setProperties({content:e.SanitizeHtmlHelper.sanitize(this.content)},!0):this.content=this.enableHtmlSanitizer?e.SanitizeHtmlHelper.sanitize(this.content):this.content,this.enableHtmlParse?(n=e.compile(this.content)({},this,"content",this.element.id+"content",void 0,void 0,o,this.root))&&e.append(n,o):o.textContent=this.content;else{var n=e.compile(this.content)({},this,"content",this.element.id+"content",void 0,void 0,o);n&&(this.isAngular&&setTimeout(function(){i.reposition(t)},1),e.append(n,o)),this.renderReactTemplates()}},i.prototype.renderCloseIcon=function(){if(!this.isSticky){var t=this.tooltipEle.querySelector(".e-icons.e-tooltip-close");return void(t&&e.remove(t))}var i=this.createElement("div",{className:"e-icons e-tooltip-close",attrs:{role:"button","aria-label":"Press escape to close the Tooltip"}});this.tooltipEle.appendChild(i),e.EventHandler.add(i,e.Browser.touchStartEvent,this.onStickyClose,this)},i.prototype.addDescribedBy=function(t,i){var o=(t.getAttribute("aria-describedby")||"").split(/\s+/);o.indexOf(i)<0&&o.push(i),e.attributes(t,{"aria-describedby":o.join(" ").trim(),"data-tooltip-id":i})},i.prototype.removeDescribedBy=function(t){var e=t.getAttribute("data-tooltip-id"),i=(t.getAttribute("aria-describedby")||"").split(/\s+/),o=i.indexOf(e);-1!==o&&i.splice(o,1),t.removeAttribute("data-tooltip-id");var n=i.join(" ").trim();n?t.setAttribute("aria-describedby",n):t.removeAttribute("aria-describedby")},i.prototype.tapHoldHandler=function(t){clearTimeout(this.autoCloseTimer),this.targetHover(t.originalEvent)},i.prototype.touchEndHandler=function(){var t=this;if(!this.isSticky){var e=function(){t.close()};this.autoCloseTimer=setTimeout(e,1500)}},i.prototype.targetClick=function(t){var i;if(i=this.target?e.closest(t.target,this.target):this.element,!e.isNullOrUndefined(i)){var o=t;null===i.getAttribute("data-tooltip-id")?"mousedown"===o.type&&2===o.button||this.targetHover(t):this.isSticky||this.hideTooltip(this.animation.close,t,i)}},i.prototype.targetHover=function(t){var i;if(i=this.target?e.closest(t.target,this.target):this.element,!(e.isNullOrUndefined(i)||null!==i.getAttribute("data-tooltip-id")&&0===this.closeDelay)){!e.isNullOrUndefined(this.tooltipEle)&&this.tooltipEle.getAttribute("e-animation-id")&&(e.Animation.stop(this.tooltipEle),this.clear());for(var o=0,n=[].slice.call(e.selectAll('[data-tooltip-id= "'+this.ctrlId+'_content"]',document));o<n.length;o++){var s=n[o];this.restoreElement(s)}this.showTooltip(i,this.animation.open,t)}},i.prototype.mouseMoveBeforeOpen=function(t){this.mouseMoveEvent=t},i.prototype.mouseMoveBeforeRemove=function(){this.mouseMoveTarget&&e.EventHandler.remove(this.mouseMoveTarget,"mousemove touchstart",this.mouseMoveBeforeOpen)},i.prototype.showTooltip=function(t,i,o){var n=this;clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.openDelay&&this.mouseTrail&&(this.mouseMoveBeforeRemove(),this.mouseMoveTarget=t,e.EventHandler.add(this.mouseMoveTarget,"mousemove touchstart",this.mouseMoveBeforeOpen,this)),this.tooltipEventArgs={type:o?o.type:null,cancel:!1,target:t,event:o||null,element:this.tooltipEle,isInteracted:!e.isNullOrUndefined(o)};var s=function(e){n.beforeRenderCallback(e,t,o,i)};this.trigger("beforeRender",this.tooltipEventArgs,s.bind(this))},i.prototype.beforeRenderCallback=function(t,i,o,n){t.cancel?(this.isHidden=!0,this.clear(),this.mouseMoveBeforeRemove()):(this.isHidden=!1,e.isNullOrUndefined(this.tooltipEle)?(this.ctrlId=this.element.getAttribute("id")?e.getUniqueID(this.element.getAttribute("id")):e.getUniqueID("tooltip"),this.tooltipEle=this.createElement("div",{className:"e-tooltip-wrap e-popup e-lib",attrs:{role:"tooltip","aria-hidden":"false",id:this.ctrlId+"_content"}}),this.tooltipEle.style.width=e.formatUnit(this.width),this.tooltipEle.style.height=e.formatUnit(this.height),this.tooltipEle.style.position="absolute",this.tooltipBeforeRender(i,this),this.tooltipAfterRender(i,o,n,this)):i&&(this.adjustArrow(i,this.position,this.tooltipPositionX,this.tooltipPositionY),this.addDescribedBy(i,this.ctrlId+"_content"),this.renderContent(i),e.Animation.stop(this.tooltipEle),this.reposition(i),this.tooltipAfterRender(i,o,n,this)))},i.prototype.appendContainer=function(t){"string"==typeof this.container?"body"===this.container?this.containerElement=document.body:(this.isBodyContainer=!1,this.containerElement=e.select(this.container,document)):this.container instanceof HTMLElement&&(this.containerElement=this.container,this.isBodyContainer="BODY"===this.containerElement.tagName),this.isBodyContainer||e.addClass([this.containerElement],"e-tooltip-popup-container"),this.containerElement.appendChild(t.tooltipEle)},i.prototype.tooltipBeforeRender=function(t,i){t&&(e.Browser.isDevice&&e.addClass([i.tooltipEle],"e-bigger"),"auto"!==i.width&&(i.tooltipEle.style.maxWidth=e.formatUnit(i.width)),i.tooltipEle.appendChild(i.createElement("div",{className:"e-tip-content"})),this.appendContainer(i),e.removeClass([i.tooltipEle],"e-hidden"),i.addDescribedBy(t,i.ctrlId+"_content"),i.renderContent(t),e.addClass([i.tooltipEle],"e-popup-open"),i.showTipPointer&&i.renderArrow(),i.renderCloseIcon(),i.renderPopup(t),i.adjustArrow(t,i.position,i.tooltipPositionX,i.tooltipPositionY),e.Animation.stop(i.tooltipEle),i.reposition(t))},i.prototype.tooltipAfterRender=function(t,i,o,n){if(t){e.removeClass([n.tooltipEle],"e-popup-open"),e.addClass([n.tooltipEle],"e-popup-close"),n.tooltipEventArgs={type:i?i.type:null,cancel:!1,target:t,event:i||null,element:n.tooltipEle,isInteracted:!e.isNullOrUndefined(i)},n.needTemplateReposition()&&!n.mouseTrail&&("None"===o.effect||"FadeIn"===o.effect||this.isReact&&"string"!=typeof n.content)&&(n.tooltipEle.style.display="none");var s=function(e){n.beforeOpenCallback(e,t,o,i)};n.trigger("beforeOpen",n.tooltipEventArgs,s.bind(n))}},i.prototype.beforeOpenCallback=function(t,i,o,n){var s=this;if(t.cancel)this.isHidden=!0,this.clear(),this.mouseMoveBeforeRemove(),this.restoreElement(i);else{var l={name:"None"===o.effect&&"Enable"===e.animationMode?"FadeIn":this.animation.open.effect,duration:o.duration,delay:o.delay,timingFunction:"easeOut"};if("None"===o.effect&&(l=void 0),this.openDelay>0){var r=function(){s.mouseTrail&&e.EventHandler.add(i,"mousemove touchstart mouseenter",s.onMouseMove,s),s.popupObj&&(s.popupObj.show(l,i),s.mouseMoveEvent&&s.mouseTrail&&s.onMouseMove(s.mouseMoveEvent))};this.showTimer=setTimeout(r,this.openDelay)}else this.popupObj&&this.popupObj.show(l,i)}n&&this.wireMouseEvents(n,i)},i.prototype.needTemplateReposition=function(){var t=this;return!e.isNullOrUndefined(t.viewContainerRef)&&"string"!=typeof t.viewContainerRef||this.isReact},i.prototype.checkCollision=function(t,e,i){var o={left:e,top:i,position:this.position,horizontal:this.tooltipPositionX,vertical:this.tooltipPositionY},n=y(this.tooltipEle,this.checkCollideTarget(),e,i);return n.length>0&&(o.horizontal=n.indexOf("left")>=0?"Right":n.indexOf("right")>=0?"Left":this.tooltipPositionX,o.vertical=n.indexOf("top")>=0?"Bottom":n.indexOf("bottom")>=0?"Top":this.tooltipPositionY),o},i.prototype.calculateElementPosition=function(t,e){return[this.isBodyContainer?t.left+e.left:t.left-this.containerElement.getBoundingClientRect().left+e.left+window.pageXOffset+this.containerElement.scrollLeft,this.isBodyContainer?t.top+e.top:t.top-this.containerElement.getBoundingClientRect().top+e.top+window.pageYOffset+this.containerElement.scrollTop]},i.prototype.collisionFlipFit=function(t,i,o){var s=this.checkCollision(t,i,o),l=s.position;if(this.tooltipPositionY!==s.vertical&&(l=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?s.vertical+this.tooltipPositionX:this.tooltipPositionX+s.vertical),this.tooltipPositionX!==s.horizontal&&(0===l.indexOf("Left")&&(s.vertical="LeftTop"===l||"LeftCenter"===l?"Top":"Bottom",l=s.vertical+"Left"),0===l.indexOf("Right")&&(s.vertical="RightTop"===l||"RightCenter"===l?"Top":"Bottom",l=s.vertical+"Right"),s.horizontal=this.tooltipPositionX),this.tooltipEventArgs={type:null,cancel:!1,target:t,event:null,element:this.tooltipEle,collidedPosition:l},this.trigger("beforeCollision",this.tooltipEventArgs),this.tooltipEventArgs.cancel)l=this.position;else{var r=s.vertical,a=s.horizontal;if(s.position!==l){var h=n(t,a,r,!this.isBodyContainer,this.isBodyContainer?null:this.containerElement.getBoundingClientRect());this.adjustArrow(t,l,a,r);var d=this.getScalingFactor(t),p=this.calculateTooltipOffset(l,d.x,d.y);p.top-=this.getOffSetPosition("TopBottom",l,this.offsetY),p.left-=this.getOffSetPosition("RightLeft",l,this.offsetX),s.position=l;var c=this.calculateElementPosition(h,p);s.left=c[0],s.top=c[1]}else this.adjustArrow(t,l,a,r)}var u={left:s.left,top:s.top},f=this.isBodyContainer?g(this.tooltipEle,this.checkCollideTarget(),{X:!0,Y:this.windowCollision},u):u;this.tooltipEle.style.display="block";var m=e.select(".e-arrow-tip",this.tooltipEle);if(this.showTipPointer&&null!=m&&(0===l.indexOf("Bottom")||0===l.indexOf("Top"))){var y=parseInt(m.style.left,10)-(f.left-s.left);y<0?y=0:y+m.offsetWidth>this.tooltipEle.clientWidth&&(y=this.tooltipEle.clientWidth-m.offsetWidth),m.style.left=y.toString()+"px"}return this.tooltipEle.style.display="",u.left=f.left,u.top=f.top,u},i.prototype.getOffSetPosition=function(t,e,i){return-1!==t.indexOf(this.position.split(/(?=[A-Z])/)[0])&&-1!==t.indexOf(e.split(/(?=[A-Z])/)[0])?2*i:0},i.prototype.checkCollideTarget=function(){return!this.windowCollision&&this.target?this.element:null},i.prototype.hideTooltip=function(t,e,i){var o=this;if(this.closeDelay>0){clearTimeout(this.hideTimer),clearTimeout(this.showTimer);var n=function(){o.closeDelay&&o.tooltipEle&&o.isTooltipOpen||o.tooltipHide(t,e,i)};this.hideTimer=setTimeout(n,this.closeDelay)}else this.tooltipHide(t,e,i)},i.prototype.tooltipHide=function(t,i,o){var n,s=this;n=i?this.target?o||i.target:this.element:e.select('[data-tooltip-id= "'+this.ctrlId+'_content"]',document),this.tooltipEventArgs={type:i?i.type:null,cancel:!1,target:n,event:i||null,element:this.tooltipEle,isInteracted:!e.isNullOrUndefined(i)},this.trigger("beforeClose",this.tooltipEventArgs,function(e){e.cancel?s.isHidden=!1:(s.mouseMoveBeforeRemove(),s.popupHide(t,n,i))})},i.prototype.popupHide=function(t,i,o){i&&o&&this.restoreElement(i),this.isHidden=!0;var n={name:"None"===t.effect&&"Enable"===e.animationMode?"FadeOut":this.animation.close.effect,duration:t.duration,delay:t.delay,timingFunction:"easeIn"};"None"===t.effect&&(n=void 0),this.popupObj&&this.popupObj.hide(n)},i.prototype.restoreElement=function(t){this.unwireMouseEvents(t),e.isNullOrUndefined(t.getAttribute("data-content"))||(t.setAttribute("title",t.getAttribute("data-content")),t.removeAttribute("data-content")),this.removeDescribedBy(t)},i.prototype.clear=function(){var t=this.findTarget();t&&this.restoreElement(t),this.tooltipEle&&(e.removeClass([this.tooltipEle],"e-popup-close"),e.addClass([this.tooltipEle],"e-popup-open")),this.isHidden&&(this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&e.remove(this.tooltipEle),this.tooltipEle=null,this.popupObj=null)},i.prototype.tooltipHover=function(){this.tooltipEle&&(this.isTooltipOpen=!0)},i.prototype.tooltipMouseOut=function(t){this.isTooltipOpen=!1,this.hideTooltip(this.animation.close,t,this.findTarget())},i.prototype.onMouseOut=function(t){var i=t.relatedTarget;if(i&&!this.mouseTrail){var o=e.closest(i,".e-tooltip-wrap.e-lib.e-popup");o?e.EventHandler.add(o,"mouseleave",this.tooltipElementMouseOut,this):(this.hideTooltip(this.animation.close,t,this.findTarget()),0===this.closeDelay&&("None"===this.animation.close.effect||this.isReact&&"string"!=typeof this.content)&&this.clear())}else this.hideTooltip(this.animation.close,t,this.findTarget()),this.clear();this.popupObj&&!this.popupObj.element.classList.contains("e-popup-open")&&this.clear()},i.prototype.tooltipElementMouseOut=function(t){this.hideTooltip(this.animation.close,t,this.findTarget()),e.EventHandler.remove(this.element,"mouseleave",this.tooltipElementMouseOut),this.clear()},i.prototype.onStickyClose=function(){this.close()},i.prototype.onMouseMove=function(t){var i=0,o=0;if(t.type.indexOf("touch")>-1?(t.preventDefault(),i=t.touches[0].pageX,o=t.touches[0].pageY):(i=t.pageX,o=t.pageY),!e.isNullOrUndefined(this.tooltipEle)){e.Animation.stop(this.tooltipEle),e.removeClass([this.tooltipEle],"e-popup-close"),e.addClass([this.tooltipEle],"e-popup-open"),this.adjustArrow(t.target,this.position,this.tooltipPositionX,this.tooltipPositionY);var n=this.getScalingFactor(t.target),s=this.calculateTooltipOffset(this.position,n.x,n.y),l=i+s.left+this.offsetX,r=o+s.top+this.offsetY,a=this.checkCollision(t.target,l,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 d=this.calculateTooltipOffset(a.position,n.x,n.y);a.left=i+d.left-this.offsetX,a.top=o+d.top-this.offsetY}this.tooltipEle.style.left=a.left+"px",this.tooltipEle.style.top=a.top+"px"}},i.prototype.keyDown=function(t){this.tooltipEle&&27===t.keyCode&&this.close()},i.prototype.touchEnd=function(t){this.tooltipEle&&null===e.closest(t.target,".e-tooltip")&&!this.isSticky&&this.close()},i.prototype.scrollHandler=function(t){this.tooltipEle&&!this.isSticky&&(e.closest(t.target,".e-tooltip-wrap.e-lib.e-popup")||this.isSticky||this.close())},i.prototype.render=function(){this.initialize(),this.wireEvents(this.opensOn),this.renderComplete()},i.prototype.preRender=function(){this.tipClass="e-tip-bottom",this.tooltipPositionX="Center",this.tooltipPositionY="Top",this.isHidden=!0},i.prototype.wireEvents=function(t){for(var i=0,o=this.getTriggerList(t);i<o.length;i++){var n=o[i];if("Custom"===n)return;"Focus"===n&&this.wireFocusEvents(),"Click"===n&&e.EventHandler.add(this.element,e.Browser.touchStartEvent,this.targetClick,this),"Hover"===n&&(e.Browser.isDevice?(this.touchModule=new e.Touch(this.element,{tapHoldThreshold:500,tapHold:this.tapHoldHandler.bind(this)}),e.EventHandler.add(this.element,e.Browser.touchEndEvent,this.touchEndHandler,this)):e.EventHandler.add(this.element,"mouseover",this.targetHover,this))}this.windowResizeBound=this.windowResize.bind(this),this.keyDownBound=this.keyDown.bind(this),this.touchEndBound=this.touchEnd.bind(this),this.scrollWheelBound=this.scrollHandler.bind(this),document.addEventListener("wheel",this.scrollWheelBound),document.addEventListener("scroll",this.scrollWheelBound),document.addEventListener("touchend",this.touchEndBound),document.addEventListener("keydown",this.keyDownBound),window.addEventListener("resize",this.windowResizeBound)},i.prototype.getTriggerList=function(t){return t?("Auto"===t&&(t=e.Browser.isDevice?"Hover":"Hover Focus"),t.split(" ")):[]},i.prototype.wireFocusEvents=function(){if(e.isNullOrUndefined(this.target))e.EventHandler.add(this.element,"focusin",this.targetHover,this);else{var t=[].slice.call(e.selectAll(this.target,this.element));if(this.targetsList=t,!e.isNullOrUndefined(this.targetsList)&&this.targetsList.length>0)for(var i=0,o=t;i<o.length;i++){var n=o[i];e.EventHandler.add(n,"focus",this.targetHover,this)}else e.EventHandler.add(this.element,"focusin",this.targetHover,this)}},i.prototype.wireMouseEvents=function(t,i){this.tooltipEle&&(this.isSticky||("focus"===t.type&&e.EventHandler.add(i,"blur",this.onMouseOut,this),"focusin"===t.type&&e.EventHandler.add(i,"focusout",this.onMouseOut,this),"mouseover"===t.type&&e.EventHandler.add(i,"mouseleave",this.onMouseOut,this),this.closeDelay&&(e.EventHandler.add(this.tooltipEle,"mouseenter",this.tooltipHover,this),e.EventHandler.add(this.tooltipEle,"mouseleave",this.tooltipMouseOut,this))),this.mouseTrail&&0===this.openDelay&&e.EventHandler.add(i,"mousemove touchstart mouseenter",this.onMouseMove,this))},i.prototype.unwireEvents=function(t){for(var i=0,o=this.getTriggerList(t);i<o.length;i++){var n=o[i];if("Custom"===n)return;"Focus"===n&&this.unwireFocusEvents(),"Click"===n&&e.EventHandler.remove(this.element,e.Browser.touchStartEvent,this.targetClick),"Hover"===n&&(e.Browser.isDevice?(this.touchModule&&this.touchModule.destroy(),e.EventHandler.remove(this.element,e.Browser.touchEndEvent,this.touchEndHandler)):e.EventHandler.remove(this.element,"mouseover",this.targetHover))}document.removeEventListener("touchend",this.touchEndBound),this.touchEndBound=null,document.removeEventListener("wheel",this.scrollWheelBound),document.removeEventListener("scroll",this.scrollWheelBound),this.scrollWheelBound=null,window.removeEventListener("resize",this.windowResizeBound),this.windowResizeBound=null,document.removeEventListener("keydown",this.keyDownBound),this.keyDownBound=null},i.prototype.unwireFocusEvents=function(){if(e.isNullOrUndefined(this.target))e.EventHandler.remove(this.element,"focusin",this.targetHover);else{var t=[].slice.call(e.selectAll(this.target,this.element));if(!e.isNullOrUndefined(this.targetsList)&&this.targetsList.length>0)for(var i=0,o=t;i<o.length;i++){var n=o[i];e.EventHandler.remove(n,"focus",this.targetHover)}else e.EventHandler.remove(this.element,"focusin",this.targetHover)}},i.prototype.unwireMouseEvents=function(t){if(!this.isSticky){for(var i=0,o=this.getTriggerList(this.opensOn);i<o.length;i++){var n=o[i];"Focus"===n&&(e.EventHandler.remove(t,"blur",this.onMouseOut),e.EventHandler.remove(t,"focusout",this.onMouseOut)),"Hover"!==n||e.Browser.isDevice||e.EventHandler.remove(t,"mouseleave",this.onMouseOut)}this.closeDelay&&(e.EventHandler.remove(t,"mouseenter",this.tooltipHover),e.EventHandler.remove(t,"mouseleave",this.tooltipMouseOut))}this.mouseTrail&&e.EventHandler.remove(t,"mousemove touchstart mouseenter",this.onMouseMove)},i.prototype.findTarget=function(){return e.select('[data-tooltip-id= "'+this.ctrlId+'_content"]',document)},i.prototype.getModuleName=function(){return"tooltip"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.onPropertyChanged=function(t,i){for(var o=this.findTarget(),n=0,s=Object.keys(t);n<s.length;n++)switch(s[n]){case"width":this.tooltipEle&&o&&(this.tooltipEle.style.width=this.tooltipEle.style.maxWidth=e.formatUnit(t.width),this.reposition(o));break;case"height":this.tooltipEle&&o&&(this.tooltipEle.style.height=e.formatUnit(t.height),this.reposition(o));break;case"content":this.tooltipEle&&this.renderContent();break;case"opensOn":this.unwireEvents(i.opensOn),this.wireEvents(t.opensOn);break;case"position":if(this.formatPosition(),this.tooltipEle&&o){var l=e.select(".e-arrow-tip-inner",this.tooltipEle);l&&(l.style.top=l.style.left=null),this.reposition(o)}break;case"tipPointerPosition":this.tooltipEle&&o&&this.reposition(o);break;case"offsetX":if(this.tooltipEle){var r=t.offsetX-i.offsetX;this.tooltipEle.style.left=(parseInt(this.tooltipEle.style.left,10)+r).toString()+"px"}break;case"offsetY":if(this.tooltipEle){var a=t.offsetY-i.offsetY;this.tooltipEle.style.top=(parseInt(this.tooltipEle.style.top,10)+a).toString()+"px"}break;case"cssClass":this.tooltipEle&&(i.cssClass&&e.removeClass([this.tooltipEle],i.cssClass.split(" ")),t.cssClass&&e.addClass([this.tooltipEle],t.cssClass.split(" ")));break;case"enableRtl":this.tooltipEle&&(this.enableRtl?e.addClass([this.tooltipEle],"e-rtl"):e.removeClass([this.tooltipEle],"e-rtl"));break;case"isSticky":this.tooltipEle&&o&&(this.renderCloseIcon(),this.reposition(o));break;case"container":e.isNullOrUndefined(this.containerElement)||e.removeClass([this.containerElement],"e-tooltip-popup-container"),this.container=t.container,this.tooltipEle&&o&&(this.appendContainer(this),this.reposition(o))}},i.prototype.open=function(t,i){e.isNullOrUndefined(i)&&(i=this.animation.open),e.isNullOrUndefined(t)&&(t=this.element),"none"!==t.style.display&&this.showTooltip(t,i)},i.prototype.close=function(t){t||(t=this.animation.close),this.hideTooltip(t)},i.prototype.refresh=function(t){this.tooltipEle&&this.renderContent(t),this.popupObj&&t&&this.reposition(t),e.isNullOrUndefined(this.targetsList)||e.isNullOrUndefined(this.target)||e.selectAll(this.target,this.element).length!==this.targetsList.length&&(this.unwireEvents(this.opensOn),this.wireEvents(this.opensOn))},i.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltipEle&&e.remove(this.tooltipEle),this.popupObj&&this.popupObj.destroy(),D(),e.removeClass([this.element],"e-tooltip"),this.unwireEvents(this.opensOn),this.unwireMouseEvents(this.element),this.tooltipEle=null,this.popupObj=null;for(var i=0,o=e.selectAll('[data-tooltip-id= "'+this.ctrlId+'_content"]',this.element);i<o.length;i++){var n=o[i];this.restoreElement(n)}this.containerElement=null,this.tipClass=null,this.tooltipPositionX=null,this.tooltipPositionY=null,this.ctrlId=null,this.tooltipEventArgs=null,this.touchModule=null,this.mouseMoveEvent=null,this.mouseMoveTarget=null,this.containerElement=null,this.targetsList=null},ei([e.Property("auto")],i.prototype,"width",void 0),ei([e.Property("auto")],i.prototype,"height",void 0),ei([e.Property()],i.prototype,"content",void 0),ei([e.Property("body")],i.prototype,"container",void 0),ei([e.Property()],i.prototype,"target",void 0),ei([e.Property("TopCenter")],i.prototype,"position",void 0),ei([e.Property(0)],i.prototype,"offsetX",void 0),ei([e.Property(0)],i.prototype,"offsetY",void 0),ei([e.Property(!0)],i.prototype,"showTipPointer",void 0),ei([e.Property(!0)],i.prototype,"enableHtmlParse",void 0),ei([e.Property(!1)],i.prototype,"windowCollision",void 0),ei([e.Property("Auto")],i.prototype,"tipPointerPosition",void 0),ei([e.Property("Auto")],i.prototype,"opensOn",void 0),ei([e.Property(!1)],i.prototype,"mouseTrail",void 0),ei([e.Property(!1)],i.prototype,"isSticky",void 0),ei([e.Complex({},ii)],i.prototype,"animation",void 0),ei([e.Property(0)],i.prototype,"openDelay",void 0),ei([e.Property(0)],i.prototype,"closeDelay",void 0),ei([e.Property()],i.prototype,"cssClass",void 0),ei([e.Property(!0)],i.prototype,"enableHtmlSanitizer",void 0),ei([e.Property("")],i.prototype,"htmlAttributes",void 0),ei([e.Event()],i.prototype,"beforeRender",void 0),ei([e.Event()],i.prototype,"beforeOpen",void 0),ei([e.Event()],i.prototype,"afterOpen",void 0),ei([e.Event()],i.prototype,"beforeClose",void 0),ei([e.Event()],i.prototype,"afterClose",void 0),ei([e.Event()],i.prototype,"beforeCollision",void 0),ei([e.Event()],i.prototype,"created",void 0),ei([e.Event()],i.prototype,"destroyed",void 0),i=ei([e.NotifyPropertyChanges],i)}(e.Component),ni={},si=30,li=30,ri=30,ai=30,hi=30,di=30,pi=36,ci=36,ui="e-spin-show",fi="e-spin-hide",mi="e-spin-material",gi="e-spin-material3",yi="e-spin-tailwind3",vi="e-spin-fabric",bi="e-spin-fluent",Ei="e-spin-fluent2",Oi="e-spin-tailwind",Ci="e-spin-bootstrap",wi="e-spin-bootstrap4",Ni="e-spin-bootstrap5",Ti="e-spin-high-contrast",Pi="e-spinner-pane",Si="e-spinner-inner",xi="e-path-circle",Ui="e-path-arc",Hi="e-spin-label",Bi="e-spin-template",ki=null,Li=null;return t.Animation=ii,t.AnimationSettings=qe,t.ButtonProps=Fe,t.Dialog=$e,t.Popup=Oe,t.PositionData=be,t.Spinner=dt,t.Tooltip=oi,t.calculatePosition=n,t.calculateRelativeBasedPosition=o,t.createSpinner=pt,t.destroy=D,t.fit=g,t.flip=v,t.getMaxZindex=F,t.getScrollableParent=X,t.getTransformElement=O,t.getZindexPartial=j,t.getZoomValue=E,t.hideSpinner=Qt,t.isCollide=y,t.setSpinner=$t,t.showSpinner=Kt,t}({},ej.base,ej.buttons),this.ejs=ej;
//# sourceMappingURL=ej2-popups.min.js.map