@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.
10 lines • 111 kB
JavaScript
/*!
* filename: ej2-popups.min.js
* version : 31.1.20
* 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():D(),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():A(),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-I()<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-I()<=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?I()+H()+x():I()+D()}function R(){return re?z()+B()+U():z()+A()}function z(){return le.documentElement.scrollTop||le.body.scrollTop}function I(){return le.documentElement.scrollLeft||le.body.scrollLeft}function A(){return window.innerHeight}function D(){var t=window.innerWidth,i=document.documentElement.getBoundingClientRect();return t-(t-(e.isNullOrUndefined(document.documentElement)?0:i.width))}function Y(){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,Ie=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,Ae++,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++)De=!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(Ie)||Ie(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(De&&(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&&Xe&&(ae.style.width=d+"px"),De&&(ae.style.left=c+"px",Xe=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(){0===--Ae&&(ae=null,he=null,fe=null,me=null,Re=null,ze=null,Ie=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=It(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(Li)){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)?Li:t.template;l.wrap.classList.add(ki),Bt(l.wrap,h,Mi)}l.wrap.classList.add(mi),l=null}}function ct(t,e,i){var o=i("div",{});return o.classList.add(Bi),o.innerHTML=e,t.appendChild(o),o}function ut(t,e,i){var o=Mt();si[""+o]={timeOut:0,type:"Material",radius:e},zt(t,o,i,gi),Yt(e,t,"Material",gi)}function ft(t,e,i){var o=Mt();si[""+o]={timeOut:0,type:"Tailwind3",radius:e},zt(t,o,i,vi),Yt(e,t,"Tailwind3",vi)}function mt(t,e,i){var o=Mt();si[""+o]={timeOut:0,type:"Material3",radius:e},zt(t,o,i,yi),Yt(e,t,"Material3",yi)}function gt(t,e,i){var o=Mt();si[""+o]={timeOut:0,type:"Bootstrap4",radius:e},zt(t,o,i,Ni),Yt(e,t,"Bootstrap4",Ni)}function yt(t,e,i){var o=Mt();si[""+o]={timeOut:0,type:"Bootstrap5",radius:e},zt(t,o,i,Ti),Yt(e,t,"Bootstrap5",Ti)}function vt(t,e,i){var o={};si[""+e].timeOut=0,o[""+e]=Lt(e,i,0,0),At({uniqueID:e,container:t,globalInfo:o,timeOutVar:0})}function bt(t,e,i){var o=Mt();si[""+o]={timeOut:0,type:"Fabric",radius:e},Rt(t,o,bi),Vt(e,t,bi)}function Et(t,e,i){var o=Mt();si[""+o]={timeOut:0,type:"Fluent",radius:e},Rt(t,o,Ei),Vt(e,t,Ei)}function Ot(t,e,i){var o=Mt();si[""+o]={timeOut:0,type:"Fluent2",radius:e},Rt(t,o,Oi),Vt(e,t,Oi)}function Ct(t,e,i){var o=Mt();si[""+o]={timeOut:0,type:"Tailwind",radius:e},Rt(t,o,Ci),Vt(e,t,Ci)}function wt(t,e,i){var o=Mt();si[""+o]={timeOut:0,type:"HighContrast",radius:e},Rt(t,o,Pi),Vt(e,t,Pi)}function Nt(t){return window.getComputedStyle(t,":after").getPropertyValue("content").replace(/['"]+/g,"")}function Tt(t,i,o,n){var s=i.querySelector("."+xi),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();si[""+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",wi),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",Ui+"_"+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("."+Ui+"_"+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){si[""+n].isAnimate&&(++l,t.setAttribute("r",e+""),l>=o.length&&(l=0),si[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=li;break;case"Material3":i=ri;break;case"Fabric":i=ai;break;case"Tailwind":case"Tailwind-dark":case"Tailwind3":i=ai;break;case"Fluent":i=hi;break;case"Fluent2":i=di;break;case"Bootstrap4":i=ci;break;case"Bootstrap5":i=ui;break;default:i=pi}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",Ui);var l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("class",Hi),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",Ui),t.insertBefore(n,t.firstChild),n.appendChild(s)}function It(t,e){var i=e("div",{}),o=e("div",{});return i.classList.add(Si),o.classList.add(xi),o.setAttribute("aria-disabled","true"),t.appendChild(i),i.appendChild(o),{wrap:i,inner_wrap:o}}function At(t){Dt(1,149,Wt,1333,t.globalInfo[t.uniqueID].count,75,t),t.globalInfo[t.uniqueID].count=++t.globalInfo[t.uniqueID].count%4}function Dt(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?si[e.uniqueID].timeOut=setTimeout(a.bind(null,e),1):At(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 Yt(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(Si))o=t;else{var n=t.querySelectorAll("."+Si);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("."+xi);if(i?!o.classList.contains(ki)&&!o.classList.contains(mi):!o.classList.contains(ki)&&!o.classList.contains(fi)){var r=o.querySelector("svg");if(e.isNullOrUndefined(r))return;var a=r.getAttribute("id");switch(si[""+a].isAnimate=!i,si[""+a].type){case"Material":case"Material3":case"Tailwind3":i?clearTimeout(si[a].timeOut):vt(l,a,si[a].radius);break;case"Bootstrap":i?clearTimeout(si[a].timeOut):Ht(l)}}i?e.classList(o,[mi],[fi]):e.classList(o,[fi],[mi]),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&&(Li=t.template,void 0!==t.template&&(Mi=t.cssClass));for(var n=document.querySelectorAll("."+Si),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(ki)?(ee(i,o,n,s),i.classList.contains(fi)?(i.classList.remove(fi),Kt(i)):(i.classList.remove(mi),Qt(i))):(Li=t,e.isNullOrUndefined(n)||(Mi=n),e.isNullOrUndefined(Li)||Bt(i,Li,Mi))}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(si[""+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,Y(),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(),this.getRelateToElement(),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,Ie=null,Ae=0,De=!0,Ye=0,Xe=!0,je=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)}}(),Fe=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},qe=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return je(i,t),Fe([e.Property(!0)],i.prototype,"isFlat",void 0),Fe([e.Property()],i.prototype,"buttonModel",void 0),Fe([e.Property("Button")],i.prototype,"type",void 0),Fe([e.Event()],i.prototype,"click",void 0),i}(e.ChildProperty),We=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return je(i,t),Fe([e.Property("Fade")],i.prototype,"effect",void 0),Fe([e.Property(400)],i.prototype,"duration",void 0),Fe([e.Property(0)],i.prototype,"delay",void 0),i}(e.ChildProperty),Ve="e-dialog",_e="e-dlg-target",Ze="e-scroll-disabled",Ge="e-dlg-fullscreen",Ke="Information",Je="e-scroll-disabled",Qe="e-alert-dialog",$e="e-confirm-dialog",ti=function(t){function o(e,i){var o=t.call(this,e,i)||this;return o.needsID=!0,o}return je(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],Ve),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(Qe)&&!0!==this.element.classList.contains($e)&&!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.closeArgs.preventFocus||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.