UNPKG

@syncfusion/ej2-navigations

Version:

A package of Essential JS 2 navigation components such as Tree-view, Tab, Toolbar, Context-menu, and Accordion which is used to navigate from one page to another

10 lines 445 kB
/*! * filename: ej2-navigations.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. */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionLists"),require("SyncfusionPopups"),require("SyncfusionButtons"),require("SyncfusionData"),require("SyncfusionInputs")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionLists","SyncfusionPopups","SyncfusionButtons","SyncfusionData","SyncfusionInputs"],t):"object"==typeof exports?exports.SyncfusionNavigations=t(require("SyncfusionBase"),require("SyncfusionLists"),require("SyncfusionPopups"),require("SyncfusionButtons"),require("SyncfusionData"),require("SyncfusionInputs")):e.SyncfusionNavigations=t(e.SyncfusionBase,e.SyncfusionLists,e.SyncfusionPopups,e.SyncfusionButtons,e.SyncfusionData,e.SyncfusionInputs)}(self,(e,t,i,s,n,r)=>(()=>{"use strict";var l={766:t=>{t.exports=e},741:e=>{e.exports=s},74:e=>{e.exports=n},323:e=>{e.exports=r},90:e=>{e.exports=t},197:e=>{e.exports=i}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return l[e](i,i.exports,a),i.exports}a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return(()=>{a.r(d),a.d(d,{Accordion:()=>Ct,AccordionActionSettings:()=>vt,AccordionAnimationSettings:()=>yt,AccordionItem:()=>bt,ActionSettings:()=>cs,AppBar:()=>Xn,Breadcrumb:()=>Xs,BreadcrumbItem:()=>Ks,BreadcrumbOverflowMode:()=>R,Carousel:()=>Mn,CarouselItem:()=>Dn,CarouselSwipeMode:()=>zs,ContextMenu:()=>xt,FieldSettings:()=>ae,FieldsSettings:()=>hs,HScroll:()=>y,Header:()=>mi,Item:()=>Xe,Menu:()=>kt,MenuAnimationSettings:()=>he,MenuItem:()=>de,NodeAnimationSettings:()=>ps,Sidebar:()=>As,Step:()=>tr,StepLabelPosition:()=>ir,StepStatus:()=>Pn,StepType:()=>sr,Stepper:()=>Mr,StepperAnimationSettings:()=>Dr,StepperBase:()=>nr,StepperOrientation:()=>er,Tab:()=>vi,TabActionSettings:()=>ui,TabAnimationSettings:()=>fi,TabItem:()=>gi,Toolbar:()=>Ye,TreeView:()=>us,VScroll:()=>D,addScrolling:()=>M,destroyScroll:()=>U});var e,t=a(766),i=(e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}),s=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},n="e-rtl",r="e-overlay",l="e-nav-arrow",o="e-nav-right-arrow",h="e-nav-left-arrow",c="e-scroll-nav",p="e-scroll-right-nav",u="e-scroll-left-nav",f="e-scroll-device",m="e-scroll-overlay",g="e-scroll-right-overlay",v="e-scroll-left-overlay",y=function(e){function a(t,i){return e.call(this,t,i)||this}return i(a,e),a.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=(0,t.getUniqueID)("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add(n)},a.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollHandler,this),this.isDevice?(this.element.classList.add(f),this.createOverlay(this.element)):this.createNavIcon(this.element),this.setScrollState()},a.prototype.setScrollState=function(){(0,t.isNullOrUndefined)(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetWidth,this.customStep=!1):this.customStep=!0},a.prototype.initialize=function(){var e=this.createElement("div",{className:"e-hscroll-content"}),t=this.createElement("div",{className:"e-hscroll-bar"});t.setAttribute("tabindex","-1");for(var i=this.element,s=0,n=[].slice.call(i.children);s<n.length;s++){var r=n[s];e.appendChild(r)}t.appendChild(e),i.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},a.prototype.getPersistData=function(){return this.addOnPersist(["scrollStep"])},a.prototype.getModuleName=function(){return"hScroll"},a.prototype.destroy=function(){var i=this.element;i.style.display="",i.classList.remove("e-hscroll"),i.classList.remove(f),i.classList.remove(n);var s=(0,t.selectAll)(".e-"+i.id+"_nav."+c,i),r=(0,t.selectAll)("."+m,i);[].slice.call(r).forEach(function(e){(0,t.detach)(e)});for(var l=0,o=[].slice.call(this.scrollItems.children);l<o.length;l++){var a=o[l];i.appendChild(a)}this.uniqueId&&this.element.removeAttribute("id"),(0,t.detach)(this.scrollEle),s.length>0&&((0,t.detach)(s[0]),(0,t.isNullOrUndefined)(s[1])||(0,t.detach)(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},a.prototype.disable=function(e){var i=(0,t.selectAll)(".e-scroll-nav:not(."+r+")",this.element);e?this.element.classList.add(r):this.element.classList.remove(r),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},a.prototype.createOverlay=function(e){var t=e.id.concat("_nav"),i=this.createElement("div",{className:m+" "+g}),s="e-"+e.id.concat("_nav "+c+" "+p),n=this.createElement("div",{id:t.concat("_right"),className:s}),r=this.createElement("div",{className:o+" "+l+" e-icons"});n.appendChild(r);var a=this.createElement("div",{className:m+" "+v});this.ieCheck&&n.classList.add("e-ie-align"),e.appendChild(i),e.appendChild(n),e.insertBefore(a,e.firstChild),this.eventBinding([n])},a.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav "+c+" "+p),s={role:"button",id:t.concat("_right"),"aria-label":"Scroll right"},n=this.createElement("div",{className:i,attrs:s});n.setAttribute("aria-disabled","false");var a=this.createElement("div",{className:o+" "+l+" e-icons"}),d="e-"+e.id.concat("_nav "+c+" "+u),f={role:"button",id:t.concat("_left"),"aria-label":"Scroll left"},m=this.createElement("div",{className:d+" "+r,attrs:f});m.setAttribute("aria-disabled","true");var g=this.createElement("div",{className:h+" "+l+" e-icons"});m.appendChild(g),n.appendChild(a),e.appendChild(n),e.insertBefore(m,e.firstChild),this.ieCheck&&(n.classList.add("e-ie-align"),m.classList.add("e-ie-align")),this.eventBinding([n,m])},a.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){this.keyTimer=window.setTimeout(function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)},100)}},a.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},a.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},a.prototype.repeatScroll=function(){clearInterval(this.timeout)},a.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,c)?i.firstElementChild:i;this.timeout=window.setInterval(function(){t.eleScrolling(10,i,!0)},50)},a.prototype.contains=function(e,t){return e.classList.contains(t)},a.prototype.eleScrolling=function(e,t,i){var s=this.element,r=t.classList;r.contains(c)&&(r=t.querySelector("."+l).classList),this.contains(s,n)&&this.browserCheck&&(e=-e),!this.contains(s,n)||this.browserCheck||this.ieCheck?r.contains(o)?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i):r.contains(h)?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i)},a.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},a.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceX/(10*e.velocity):e.distanceX/e.velocity;var s=.5,n=function(){var r=Math.sin(s);r<=0?window.cancelAnimationFrame(r):("Left"===e.swipeDirection?i.scrollLeft+=t*r:"Right"===e.swipeDirection&&(i.scrollLeft-=t*r),s-=.5,window.requestAnimationFrame(n))};n()},a.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollLeft+=e:this.scrollEle.scrollLeft-=e,this.enableRtl&&this.scrollEle.scrollLeft>0&&(this.scrollEle.scrollLeft=0)},a.prototype.frameScrollRequest=function(e,i,s){var r=this;if(s)this.scrollUpdating(e,i);else{this.customStep||[].slice.call((0,t.selectAll)("."+m,this.element)).forEach(function(t){e-=t.offsetWidth});var l=function(){var t,s;r.contains(r.element,n)&&r.browserCheck?(t=-e,s=-10):(t=e,s=10),t<10?window.cancelAnimationFrame(s):(r.scrollUpdating(s,i),e-=s,window.requestAnimationFrame(l))};l()}},a.prototype.touchHandler=function(e){var t=this.scrollEle,i=e.distanceX;this.ieCheck&&this.contains(this.element,n)&&(i=-i),"Left"===e.scrollDirection?t.scrollLeft=t.scrollLeft+i:"Right"===e.scrollDirection&&(t.scrollLeft=t.scrollLeft-i)},a.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=((0,t.isNullOrUndefined)(e)?i:e).querySelector("."+l);(0,t.isNullOrUndefined)(e)?(0,t.classList)(s,[o],[h]):(0,t.classList)(s,[h],[o])}else e&&i&&(e.classList.add(r),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove(r),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0"));this.repeatScroll()},a.prototype.scrollHandler=function(e){var t=e.target,i=t.offsetWidth,s=(this.element,this.element.querySelector("."+u)),n=this.element.querySelector("."+p),l=this.element.querySelector("."+v),o=this.element.querySelector("."+g),a=t.scrollLeft;if(a<=0&&(a=-a),this.isDevice&&(!this.enableRtl||this.browserCheck||this.ieCheck||(l=this.element.querySelector("."+g),o=this.element.querySelector("."+v)),l.style.width=a<40?a+"px":"40px",t.scrollWidth-Math.ceil(i+a)<40?o.style.width=t.scrollWidth-Math.ceil(i+a)+"px":o.style.width="40px"),0===a)this.arrowDisabling(s,n);else if(Math.ceil(i+a+.1)>=t.scrollWidth)this.arrowDisabling(n,s);else{var d=this.element.querySelector("."+c+"."+r);d&&(d.classList.remove(r),d.setAttribute("aria-disabled","false"),d.setAttribute("tabindex","0"))}},a.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add(n):this.element.classList.remove(n)}}},s([(0,t.Property)(null)],a.prototype,"scrollStep",void 0),a=s([t.NotifyPropertyChanges],a)}(t.Component),b=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),C=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},S="e-rtl",I="e-overlay",E="e-nav-arrow",x="e-nav-up-arrow",N="e-nav-down-arrow",O="e-scroll-nav",w="e-scroll-up-nav",L="e-scroll-down-nav",k="e-scroll-device",A="e-scroll-overlay",T="e-scroll-up-overlay",P="e-scroll-down-overlay",D=function(e){function i(t,i){return e.call(this,t,i)||this}return b(i,e),i.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=(0,t.getUniqueID)("vscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add(S)},i.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollEventHandler,this),this.isDevice?(this.element.classList.add(k),this.createOverlayElement(this.element)):this.createNavIcon(this.element),this.setScrollState(),t.EventHandler.add(this.element,"wheel",this.wheelEventHandler,this)},i.prototype.setScrollState=function(){(0,t.isNullOrUndefined)(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetHeight,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=(0,t.createElement)("div",{className:"e-vscroll-content"}),i=(0,t.createElement)("div",{className:"e-vscroll-bar"});i.setAttribute("tabindex","-1");for(var s=this.element,n=0,r=[].slice.call(s.children);n<r.length;n++){var l=r[n];e.appendChild(l)}i.appendChild(e),s.appendChild(i),i.style.overflow="hidden",this.scrollEle=i,this.scrollItems=e},i.prototype.getPersistData=function(){return this.addOnPersist(["scrollStep"])},i.prototype.getModuleName=function(){return"vScroll"},i.prototype.destroy=function(){var i=this.element;i.style.display="",(0,t.removeClass)([this.element],["e-vscroll",k,S]);var s=(0,t.selectAll)(".e-"+i.id+"_nav."+O,i),n=(0,t.selectAll)("."+A,i);[].slice.call(n).forEach(function(e){(0,t.detach)(e)});for(var r=0,l=[].slice.call(this.scrollItems.children);r<l.length;r++){var o=l[r];i.appendChild(o)}this.uniqueId&&this.element.removeAttribute("id"),(0,t.detach)(this.scrollEle),s.length>0&&((0,t.detach)(s[0]),(0,t.isNullOrUndefined)(s[1])||(0,t.detach)(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollEventHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},i.prototype.disable=function(e){var i=(0,t.selectAll)(".e-scroll-nav:not(."+I+")",this.element);e?this.element.classList.add(I):this.element.classList.remove(I),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlayElement=function(e){var i=e.id.concat("_nav"),s=(0,t.createElement)("div",{className:A+" "+P}),n="e-"+e.id.concat("_nav "+O+" "+L),r=(0,t.createElement)("div",{id:i.concat("down"),className:n}),l=(0,t.createElement)("div",{className:N+" "+E+" e-icons"});r.appendChild(l);var o=(0,t.createElement)("div",{className:A+" "+T});this.ieCheck&&r.classList.add("e-ie-align"),e.appendChild(s),e.appendChild(r),e.insertBefore(o,e.firstChild),this.eventBinding([r])},i.prototype.createNavIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav "+O+" "+L),n=(0,t.createElement)("div",{id:i.concat("_down"),className:s});n.setAttribute("aria-disabled","false");var r=(0,t.createElement)("div",{className:N+" "+E+" e-icons"}),l="e-"+e.id.concat("_nav "+O+" "+w),o=(0,t.createElement)("div",{id:i.concat("_up"),className:l+" "+I});o.setAttribute("aria-disabled","true");var a=(0,t.createElement)("div",{className:x+" "+E+" e-icons"});o.appendChild(a),n.appendChild(r),n.setAttribute("tabindex","0"),e.appendChild(n),e.insertBefore(o,e.firstChild),this.ieCheck&&(n.classList.add("e-ie-align"),o.classList.add("e-ie-align")),this.eventBinding([n,o])},i.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){this.keyTimer=window.setTimeout(function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)},100)}},i.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},i.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,O)?i.firstElementChild:i;this.timeout=window.setInterval(function(){t.eleScrolling(10,i,!0)},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,i){var s=t.classList;s.contains(O)&&(s=t.querySelector("."+E).classList),s.contains(N)?this.frameScrollRequest(e,"add",i):s.contains(x)&&this.frameScrollRequest(e,"",i)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.wheelEventHandler=function(e){e.preventDefault(),this.frameScrollRequest(this.scrollStep,e.deltaY>0?"add":"",!1)},i.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceY/(10*e.velocity):e.distanceY/e.velocity;var s=.5,n=function(){var r=Math.sin(s);r<=0?window.cancelAnimationFrame(r):("Up"===e.swipeDirection?i.scrollTop+=t*r:"Down"===e.swipeDirection&&(i.scrollTop-=t*r),s-=.02,window.requestAnimationFrame(n))};n()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollTop+=e:this.scrollEle.scrollTop-=e},i.prototype.frameScrollRequest=function(e,i,s){var n=this;if(s)this.scrollUpdating(e,i);else{this.customStep||[].slice.call((0,t.selectAll)("."+A,this.element)).forEach(function(t){e-=t.offsetHeight});var r=function(){e<10?window.cancelAnimationFrame(10):(n.scrollUpdating(10,i),e-=10,window.requestAnimationFrame(r))};r()}},i.prototype.touchHandler=function(e){var t=this.scrollEle,i=e.distanceY;"Up"===e.scrollDirection?t.scrollTop=t.scrollTop+i:"Down"===e.scrollDirection&&(t.scrollTop=t.scrollTop-i)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=((0,t.isNullOrUndefined)(e)?i:e).querySelector("."+E);(0,t.isNullOrUndefined)(e)?(0,t.classList)(s,[N],[x]):(0,t.classList)(s,[x],[N])}else e.classList.add(I),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove(I),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollEventHandler=function(e){var t=e.target,i=t.offsetHeight,s=this.element.querySelector("."+w),n=this.element.querySelector("."+L),r=this.element.querySelector("."+T),l=this.element.querySelector("."+P),o=t.scrollTop;if(o<=0&&(o=-o),this.isDevice&&(r.style.height=o<40?o+"px":"40px",t.scrollHeight-Math.ceil(i+o)<40?l.style.height=t.scrollHeight-Math.ceil(i+o)+"px":l.style.height="40px"),0===o)this.arrowDisabling(s,n);else if(Math.ceil(i+o+.1)>=t.scrollHeight)this.arrowDisabling(n,s);else{var a=this.element.querySelector("."+O+"."+I);a&&(a.classList.remove(I),a.setAttribute("aria-disabled","false"),a.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add(S):this.element.classList.remove(S)}}},C([(0,t.Property)(null)],i.prototype,"scrollStep",void 0),i=C([t.NotifyPropertyChanges],i)}(t.Component);function M(e,t,i,s,n,r){var l,o,a=t.parentElement;if("vscroll"===s?(l=r||t.getBoundingClientRect().height,o=i.getBoundingClientRect().height):(l=t.getBoundingClientRect().width,o=i.getBoundingClientRect().width),l<o)return H(e,t,i,s,n,r);if(a){var d=a.getBoundingClientRect().width;return d<l&&"hscroll"===s?(o=d,t.style.maxWidth=d+"px",H(e,t,i,s,n,r)):i}return i}function H(e,i,s,n,r,l){var o=e("div",{className:"e-menu-"+n});return i.appendChild(o),o.appendChild(s),l?(o.style.overflow="hidden",o.style.height=l+"px"):(o.style.maxHeight=i.style.maxHeight,i.style.overflow="hidden"),"vscroll"===n?new D({enableRtl:r},o).scrollStep=(0,t.select)(".e-"+n+"-bar",i).offsetHeight/2:new y({enableRtl:r},o).scrollStep=(0,t.select)(".e-"+n+"-bar",i).offsetWidth,o}function U(e,i,s){if(e){var n=(0,t.select)(".e-menu-parent",i);n?s&&s!==n||(e.destroy(),i.parentElement.appendChild(n),(0,t.detach)(i)):(e.destroy(),(0,t.detach)(i))}}var R,B=a(90),j=a(197),q=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),F=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},W="enter",V="escape",_="e-focused",z="e-menu-header",K="e-selected",X="e-separator",Y="uparrow",G="downarrow",Q="leftarrow",J="rightarrow",Z="home",$="end",ee="tab",te="e-caret",ie="e-menu-item",se="e-disabled",ne="e-menu-hide",re="e-icons",le="e-rtl",oe="e-menu-popup",ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return q(i,e),F([(0,t.Property)("id")],i.prototype,"itemId",void 0),F([(0,t.Property)("parentId")],i.prototype,"parentId",void 0),F([(0,t.Property)("text")],i.prototype,"text",void 0),F([(0,t.Property)("iconCss")],i.prototype,"iconCss",void 0),F([(0,t.Property)("url")],i.prototype,"url",void 0),F([(0,t.Property)("separator")],i.prototype,"separator",void 0),F([(0,t.Property)("items")],i.prototype,"children",void 0),i}(t.ChildProperty),de=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return q(i,e),F([(0,t.Property)(null)],i.prototype,"iconCss",void 0),F([(0,t.Property)("")],i.prototype,"id",void 0),F([(0,t.Property)(!1)],i.prototype,"separator",void 0),F([(0,t.Collection)([],i)],i.prototype,"items",void 0),F([(0,t.Property)("")],i.prototype,"text",void 0),F([(0,t.Property)("")],i.prototype,"url",void 0),F([(0,t.Property)()],i.prototype,"htmlAttributes",void 0),i}(t.ChildProperty),he=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return q(i,e),F([(0,t.Property)("SlideDown")],i.prototype,"effect",void 0),F([(0,t.Property)(400)],i.prototype,"duration",void 0),F([(0,t.Property)("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),ce=function(e){function i(i,s){var n=e.call(this,i,s)||this;return n.navIdx=[],n.animation=new t.Animation({}),n.isTapHold=!1,n.tempItem=[],n.showSubMenuOn="Auto",n.isAnimationNone=!1,n.isKBDAction=!1,n}return q(i,e),i.prototype.preRender=function(){if(!this.isMenu){var e=void 0;if("EJS-CONTEXTMENU"===this.element.tagName){e=this.createElement("ul",{id:(0,t.getUniqueID)(this.getModuleName()),className:"e-control e-lib e-"+this.getModuleName()});var i=(0,t.getValue)("ej2_instances",this.element);(0,t.removeClass)([this.element],["e-control","e-lib","e-"+this.getModuleName()]),this.clonedElement=this.element,this.element=e,(0,t.setValue)("ej2_instances",i,this.element)}else{e=this.createElement("ul",{id:(0,t.getUniqueID)(this.getModuleName())}),(0,t.append)([].slice.call(this.element.cloneNode(!0).children),e);var s=this.element.nextElementSibling;s?this.element.parentElement.insertBefore(e,s):this.element.parentElement.appendChild(e),this.clonedElement=e}this.clonedElement.style.display="none"}if("EJS-MENU"===this.element.tagName){for(var n=this.element,r=(0,t.getValue)("ej2_instances",n),l=(e=this.createElement("ul"),this.createElement("EJS-MENU",{className:"e-"+this.getModuleName()+"-wrapper"})),o=0,a=n.attributes.length;o<a;o++)e.setAttribute(n.attributes[o].nodeName,n.attributes[o].nodeValue);n.parentNode.insertBefore(l,n),(0,t.detach)(n),n=e,l.appendChild(n),(0,t.setValue)("ej2_instances",r,n),this.clonedElement=l,this.element=n,this.element.id||(this.element.id=(0,t.getUniqueID)(this.getModuleName()))}},i.prototype.render=function(){var e=this;this.initialize(),this.renderItems(),this.wireEvents(),this.renderComplete();var t=this.getWrapper();this.template&&this.enableScrolling&&(this.isReact||this.isAngular)&&requestAnimationFrame(function(){M(e.createElement,t,e.element,"hscroll",e.enableRtl)})},i.prototype.enableTouchScroll=function(e){var t=0;this.touchStartFn=function(e){t=e.touches[0].clientY},this.touchMoveFn=function(i){var s=i.touches[0].clientY,n=t-s,r=0===e.scrollTop,l=e.scrollTop+e.clientHeight===e.scrollHeight;(r&&n<0||l&&n>0)&&i.preventDefault(),t=s},e.addEventListener("touchstart",this.touchStartFn,{passive:!1}),e.addEventListener("touchmove",this.touchMoveFn,{passive:!1})},i.prototype.touchOutsideHandler=function(e){var i=e.target;(0,t.closest)(i,".e-"+this.getModuleName()+"-wrapper")||this.closeMenu()},i.prototype.initialize=function(){var e=this.getWrapper();e||(e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.isMenu?this.element.parentElement.insertBefore(e,this.element):document.body.appendChild(e)),this.cssClass&&(0,t.addClass)([e],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.enableRtl&&e.classList.add(le),e.appendChild(this.element),this.isMenu&&this.hamburgerMode&&(this.target||this.createHeaderContainer(e)),this.defaultOption=this.showItemOnClick},i.prototype.renderItems=function(){if(!this.items.length){var e=B.ListBase.createJsonFromElement(this.element,{fields:{child:"items"}});this.setProperties({items:e},!0),(0,t.isBlazor)()&&!this.isMenu?this.element=this.removeChildElement(this.element):this.element.innerHTML=""}var i=this.createItems(this.items);if((0,t.append)(Array.prototype.slice.call(i.children),this.element),this.element.classList.add("e-menu-parent"),this.isMenu){if(!this.hamburgerMode&&this.element.classList.contains("e-vertical")&&this.setBlankIconStyle(this.element),this.enableScrolling){var s=this.getWrapper();this.element.classList.contains("e-vertical")?M(this.createElement,s,this.element,"vscroll",this.enableRtl):M(this.createElement,s,this.element,"hscroll",this.enableRtl)}}else this.element.parentElement.setAttribute("role","dialog"),this.element.parentElement.setAttribute("aria-label","context menu")},i.prototype.wireEvents=function(){var e=this.getWrapper();if(this.target){for(var i=void 0,s=(0,t.selectAll)(this.target),n=0,r=s.length;n<r;n++)i=s[n],this.isMenu?t.EventHandler.add(i,"click",this.menuHeaderClickHandler,this):t.Browser.isIos?new t.Touch(i,{tapHold:this.touchHandler.bind(this)}):t.EventHandler.add(i,"contextmenu",this.cmenuHandler,this);if(this.targetElement=i,!this.isMenu){t.EventHandler.add(this.targetElement,"scroll",this.scrollHandler,this);for(var l=0,o=(0,j.getScrollableParent)(this.targetElement);l<o.length;l++){var a=o[l];t.EventHandler.add(a,"scroll",this.scrollHandler,this)}}}t.Browser.isDevice||(this.delegateMoverHandler=this.moverHandler.bind(this),this.delegateMouseDownHandler=this.mouseDownHandler.bind(this),t.EventHandler.add(this.isMenu?document:e,"mouseover",this.delegateMoverHandler,this),t.EventHandler.add(document,"mousedown",this.delegateMouseDownHandler,this),t.EventHandler.add(document,"keydown",this.domKeyHandler,this),this.isMenu||this.target||t.EventHandler.add(document,"scroll",this.scrollHandler,this)),this.delegateClickHandler=this.clickHandler.bind(this),t.EventHandler.add(document,"click",this.delegateClickHandler,this),this.wireKeyboardEvent(e),this.rippleFn=(0,t.rippleEffect)(e,{selector:"."+ie}),!this.isMenu&&this.enableScrolling&&(this.enableTouchScroll(e),document.addEventListener("touchstart",this.touchOutsideHandler.bind(this),{passive:!0}))},i.prototype.wireKeyboardEvent=function(e){var i={downarrow:G,uparrow:Y,enter:W,leftarrow:Q,rightarrow:J,escape:V};this.isMenu&&(i.home=Z,i.end=$,i.tab=ee),new t.KeyboardEvents(e,{keyAction:this.keyBoardHandler.bind(this),keyConfigs:i})},i.prototype.mouseDownHandler=function(e){(0,t.closest)(e.target,".e-"+this.getModuleName()+"-wrapper")===this.getWrapper()||(0,t.closest)(e.target,".e-"+this.getModuleName()+"-popup")||this.closeMenu(this.isMenu?null:this.navIdx.length,e)},i.prototype.keyHandler=function(e){38!==e.keyCode&&40!==e.keyCode||e.target&&(e.target.classList.contains("e-contextmenu")||e.target.classList.contains("e-menu-item"))&&e.preventDefault()},i.prototype.domKeyHandler=function(e){27===e.keyCode&&(this.isMenuVisible()&&e.stopImmediatePropagation(),e.action=V,this.leftEscKeyHandler(e))},i.prototype.keyBoardHandler=function(e){var i="",s=e.target,n=this.isMenu&&!this.hamburgerMode&&!this.element.classList.contains("e-vertical")&&this.navIdx.length<1;if(e.preventDefault(),this.enableScrolling&&13===e.keyCode&&s.classList.contains("e-scroll-nav")&&this.removeLIStateByClass([_,K],[(0,t.closest)(s,".e-"+this.getModuleName()+"-wrapper")]),this.isKBDAction=!0,n)switch(e.action){case J:i=J,e.action=G;break;case Q:i=Q,e.action=Y;break;case G:i=G,e.action=J;break;case Y:i=Y,e.action=""}else if(this.enableRtl)switch(e.action){case Q:n=!0,i=Q,e.action=J;break;case J:n=!0,i=J,e.action=Q}switch(e.action){case G:case Y:case $:case Z:case ee:this.upDownKeyHandler(e);break;case J:this.rightEnterKeyHandler(e);break;case Q:this.leftEscKeyHandler(e);break;case W:this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):this.rightEnterKeyHandler(e)}this.isAnimationNone&&(this.isKBDAction=!1),n&&(e.action=i)},i.prototype.upDownKeyHandler=function(e){var t=this.getUlByNavIdx(),i=e.action===G||e.action===Z||e.action===ee?0:t.childElementCount-1,s=i,n=this.getLIByClass(t,_);n&&(e.action!==$&&e.action!==Z&&(s=this.getIdx(t,n)),n.classList.remove(_),e.action!==$&&e.action!==Z&&(e.action===G?s++:s--,s===(e.action===G?t.childElementCount:-1)&&(s=i)));var r=t.children[s];s=this.isValidLI(r,s,e.action),t.children[s].classList.add(_),t.children[s].focus()},i.prototype.isValidLI=function(e,t,i){var s=this.getUlByNavIdx(),n=i===G||i===Z||i===ee?0:s.childElementCount-1;return(e.classList.contains(X)||e.classList.contains(se)||e.classList.contains(ne))&&(i===G&&t===s.childElementCount-1||i===Y&&0===t?t=n:i===G||i===J||"tab"===i&&e.classList.contains(X)?t++:t--),(e=s.children[t])&&(e.classList.contains(X)||e.classList.contains(se)||e.classList.contains(ne))&&(t=this.isValidLI(e,t,i)),t},i.prototype.getUlByNavIdx=function(e){var i=this;if(void 0===e&&(e=this.navIdx.length),this.isMenu){var s=[this.getWrapper()].concat([].slice.call((0,t.selectAll)("."+oe)))[e],n=[];return(0,t.selectAll)("."+oe).forEach(function(e){(i.element.id===e.id.split("-")[2]||e.id.split("-")[2]+"-"+e.id.split("-")[3])&&n.push(e)}),s=[this.getWrapper()].concat([].slice.call(n))[e],(0,t.isNullOrUndefined)(s)?null:(0,t.select)(".e-menu-parent",s)}return document.body.contains(this.element)||0!==e?this.getWrapper().children[e]:null},i.prototype.rightEnterKeyHandler=function(e){var t,i=this.getUlByNavIdx(),s=this.getLIByClass(i,_);if(s){var n=this.getIdx(i,s),r=this.navIdx.concat(n),l=this.getItem(r);if(l.items.length)this.navIdx.push(n),this.keyType="right",this.action=e.action,this.openMenu(s,l,-1,-1,e);else if(e.action===W){this.isMenu&&0===this.navIdx.length?this.removeLIStateByClass([K],[this.getWrapper()]):s.classList.remove(_),s.classList.add(K),t={element:s,item:l,event:e},this.trigger("select",t);var o=s.querySelector(".e-menu-url");if(l.url&&o)switch(o.getAttribute("target")){case"_blank":window.open(l.url,"_blank");break;case"_parent":window.parent.location.href=l.url;break;default:window.location.href=l.url}this.closeMenu(null,e);var a=this.getLIByClass(this.getUlByNavIdx(),K);a&&(a.classList.add(_),a.focus())}}},i.prototype.leftEscKeyHandler=function(e){this.navIdx.length?(this.keyType="left",this.closeMenu(this.navIdx.length,e)):e.action===V&&this.closeMenu(null,e)},i.prototype.scrollHandler=function(e){this.closeMenu(null,e)},i.prototype.touchHandler=function(e){this.isTapHold=!0,this.cmenuHandler(e.originalEvent)},i.prototype.cmenuHandler=function(e){e.preventDefault(),this.currentTarget=e.target,this.isCMenu=!0,this.pageX=e.changedTouches?e.changedTouches[0].pageX+1:e.pageX+1,this.pageY=e.changedTouches?e.changedTouches[0].pageY+1:e.pageY+1,this.closeMenu(null,e),this.isCMenu&&(this.canOpen(e.target)&&this.openMenu(null,null,this.pageY,this.pageX,e),this.isCMenu=!1)},i.prototype.closeMenu=function(e,i,s){var n=this;if(void 0===e&&(e=0),void 0===i&&(i=null),this.isMenuVisible()){var r,l,o=void 0,a=this.getWrapper(),d=void 0,h=this.getPopups(),c=!1,p=this.isMenu?h.length+1:a.childElementCount,u=this.isMenu&&1!==p?(0,t.select)(".e-ul",h[p-2]):(0,t.selectAll)(".e-menu-parent",a)[p-1];if(this.isMenu&&u.classList.contains("e-menu")&&((o=this.getLIByClass(u,K))&&o.classList.remove(K),c=!0),!c){var f=i&&i.target&&this.getLI(i.target);this.cli=f||u.children[0],r=this.navIdx.length?this.getItem(this.navIdx):null,l=r?r.items:this.items,d={element:u,parentItem:r,items:l,event:i,cancel:!1,isFocused:!0},this.trigger("beforeClose",d,function(o){var d,h,c,p,m,g,v="",y=!o.cancel;(y||n.isCMenu)&&(n.isMenu?(d=(0,t.closest)(u,"."+oe),n.hamburgerMode&&(d.parentElement.style.minHeight="",(0,t.closest)(u,".e-menu-item").setAttribute("aria-expanded","false")),n.unWireKeyboardEvent(d),U((0,t.getInstance)(d.children[0],D),d.children[0]),(c=(0,t.getInstance)(d,j.Popup)).hide(),v=d.id,c.destroy(),(0,t.detach)(d)):(n.isContextMenuClosed=!1,n.toggleAnimation(u,!1)),h={element:u,parentItem:r,items:l},n.trigger("onClose",h),n.navIdx.pop(),0===n.navIdx.length&&i&&"keyup"===i.type&&(n.showSubMenu=!1),n.isMenu||(t.EventHandler.remove(u,"keydown",n.keyHandler),"right"===n.keyType&&(n.keyType=""))),n.updateReactTemplate();var b=n.getWrapper()&&n.getUlByNavIdx();(n.isCMenu&&(n.canOpen(i.target)&&n.openMenu(null,null,n.pageY,n.pageX,i),n.isCMenu=!1),n.isMenu&&b&&v.length)?(p=new RegExp("(.*)-ej2menu-"+n.element.id+"-popup").exec(v)[1],m=b.querySelector('[id="'+p+'"]'),g=f&&b.querySelector('[id="'+f.id+'"]')):b&&(m=b.querySelector(".e-menu-item.e-selected"),g=f&&b.querySelector('[id="'+f.id+'"]'));var C=f&&f.querySelectorAll(".e-menu-item");if(y&&n.hamburgerMode&&e&&!C.length)n.afterCloseMenu(i);else if(y&&!n.hamburgerMode&&m&&!g&&"left"!==n.keyType&&(n.navIdx.length||!n.isMenu&&0===n.navIdx.length)){var S=i&&i.target.classList&&(i.target.classList.contains("e-vscroll")||i.target.classList.contains("e-scroll-nav"))?(0,t.closest)(i.target,".e-menu-wrapper"):null;S?(S=S.querySelector(".e-menu-item"),(n.showItemOnClick||S&&n.getIndex(S.id,!0).length<=n.navIdx.length)&&n.closeMenu(n.navIdx[n.navIdx.length-1],i,!0)):i&&i.target.classList&&i.target.classList.contains("e-nav-arrow")||n.closeMenu(n.navIdx[n.navIdx.length-1],i)}else if(y&&!s&&!e&&(n.hamburgerMode&&n.navIdx.length||1===n.navIdx.length&&f&&b!==f.parentElement))n.closeMenu(null,i);else if(y&&(0,t.isNullOrUndefined)(e)&&n.navIdx.length)n.closeMenu(null,i);else if(!y||n.isMenu||e||0!==n.navIdx.length||n.isMenusClosed||n.isCmenuHover)if(y&&n.isMenu&&i&&i.target&&0!==n.navIdx.length&&(0,t.closest)(i.target,".e-menu-parent.e-control"))n.closeMenu(0,i);else if(y&&!n.isMenu&&(0,t.selectAll)(".e-menu-parent",a)[e-1]&&3===i.which)n.closeMenu(null,i);else{if(!y||"right"!==n.keyType&&"click"!==n.keyType){var I=n.getUlByNavIdx(),E=n.getLIByClass(I,K);if(E&&(E.setAttribute("aria-expanded","false"),E.classList.remove(K),(o.isFocused&&f||"left"===n.keyType)&&(E.classList.add(_),i.target&&i.target.classList.contains("e-edit-template")||E.focus())),!y&&n.hamburgerMode&&f&&"false"===f.getAttribute("aria-expanded")&&"true"===f.getAttribute("aria-haspopup")){(0,t.closest)(f,".e-menu-parent.e-control")?n.navIdx=[]:n.navIdx.pop(),n.navIdx.push(n.cliIdx);var x=n.getItem(n.navIdx);f.setAttribute("aria-expanded","true"),n.openMenu(f,x,-1,-1,i)}}else n.afterCloseMenu(i);n.navIdx.length<1&&("Hover"!==n.showSubMenuOn&&"Click"!==n.showSubMenuOn||(n.showItemOnClick=n.defaultOption,n.showSubMenuOn="Auto"))}else n.isMenusClosed=!0,n.closeMenu(0,i);n.removeStateWrapper()})}}},i.prototype.updateReactTemplate=function(){if(this.isReact&&this.template&&0===this.navIdx.length){var e=void 0;this.portals&&(e=this.portals.splice(0,this.items.length)),this.clearTemplate(["template"]),this.portals=e,this.renderReactTemplates()}},i.prototype.getMenuItemModel=function(e,i){if((0,t.isNullOrUndefined)(e))return null;(0,t.isNullOrUndefined)(i)&&(i=0);var s=this.getFields(i);return{text:e[s.text],id:e[s.id],items:e[s.child],separator:e[s.separator],iconCss:e[s.iconCss],url:e[s.url]}},i.prototype.getPopups=function(){var e=this,i=[];return[].slice.call(document.querySelectorAll("."+oe)).forEach(function(s){!(0,t.isNullOrUndefined)(s.querySelector("."+ie))&&e.getIndex(s.querySelector("."+ie).id,!0).length&&i.push(s)}),i},i.prototype.isMenuVisible=function(){return this.navIdx.length>0||this.element.classList.contains("e-contextmenu")&&(0,t.isVisible)(this.element).valueOf()},i.prototype.canOpen=function(e){var i=!0;if(this.filter){i=!1;for(var s=this.filter.split(" "),n=0,r=s.length;n<r;n++)if((0,t.closest)(e,"."+s[n])){i=!0;break}}return i},i.prototype.openMenu=function(e,i,s,n,r,l){var o=this;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=null),void 0===l&&(l=this.targetElement);var a=this.getWrapper();this.lItem=e;var d=""!==this.element.id?this.element.id:"menu";if(this.isMenusClosed=!1,(0,t.isNullOrUndefined)(s)&&(s=-1),(0,t.isNullOrUndefined)(n)&&(n=-1),e){if(this.uList=this.createItems(i[this.getField("children",this.navIdx.length-1)]),!this.isMenu&&t.Browser.isDevice){a.lastChild.style.display="none";var h={text:i[this.getField("text")].toString(),iconCss:re+" e-previous"};this.template&&(i.iconCss=(i.iconCss||"")+re+" e-previous");var c=new de(this.items[0],"items",this.template?i:h,!0),p=this.createItems([c]).children[0];p.classList.add(z),this.uList.insertBefore(p,this.uList.children[0])}this.isMenu?(this.popupWrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper "+oe,id:e.id+"-ej2menu-"+d+"-popup"}),this.popupWrapper.setAttribute("role","navigation"),this.popupWrapper.setAttribute("aria-label",i.text+"-menu-popup"),this.hamburgerMode?(s=e.offsetHeight,e.appendChild(this.popupWrapper)):document.body.appendChild(this.popupWrapper),this.isNestedOrVertical=this.element.classList.contains("e-vertical")||1!==this.navIdx.length,this.popupObj=this.generatePopup(this.popupWrapper,this.uList,e,this.isNestedOrVertical),this.template&&this.renderReactTemplates(),this.hamburgerMode?this.calculateIndentSize(this.uList,e):(this.cssClass&&(0,t.addClass)([this.popupWrapper],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.popupObj.hide()),this.hamburgerMode||this.showItemOnClick||!this.hoverDelay?this.triggerBeforeOpen(e,this.uList,i,r,0,0,"menu"):(window.clearInterval(this.timer),this.timer=window.setTimeout(function(){o.triggerBeforeOpen(e,o.uList,i,r,0,0,"menu")},this.hoverDelay))):(this.uList.style.zIndex=this.element.style.zIndex,a.appendChild(this.uList),!this.showItemOnClick&&this.hoverDelay?(window.clearInterval(this.timer),this.timer=window.setTimeout(function(){o.triggerBeforeOpen(e,o.uList,i,r,s,n,"none")},this.hoverDelay)):this.triggerBeforeOpen(e,this.uList,i,r,s,n,"none"))}else if(this.uList=this.element,this.uList.style.zIndex=(0,j.getZindexPartial)(l||this.element).toString(),(0,t.isNullOrUndefined)(r)){var u=document.createEvent("MouseEvents");u.initEvent("click",!0,!1);var f=this.copyObject(u,{});f.target=f.srcElement=l,f.currentTarget=l,this.triggerBeforeOpen(e,this.uList,i,f,s,n,"none")}else this.triggerBeforeOpen(e,this.uList,i,r,s,n,"none")},i.prototype.copyObject=function(e,t){for(var i in e)t[""+i]=e[""+i];return t},i.prototype.calculateIndentSize=function(e,t){var i=getComputedStyle(t),s=parseInt(i.textIndent,10);this.navIdx.length<2&&!t.classList.contains("e-blankicon")?s*=2:s+=s/4,e.style.textIndent=s+"px";var n=e.querySelectorAll(".e-blankicon");if(n&&n.length)for(var r=e.querySelector(".e-menu-icon"),l=getComputedStyle(r),o=parseInt(l.marginRight,10)+r.offsetWidth+s,a=0;a<n.length;a++)n[a].style.textIndent=o+"px"},i.prototype.generatePopup=function(e,i,s,n){var r=this,l=new j.Popup(e,{actionOnScroll:this.hamburgerMode?"none":"reposition",relateTo:s,collision:this.hamburgerMode?{X:"none",Y:"none"}:{X:n||this.enableRtl?"none":"flip",Y:"fit"},position:n&&!this.hamburgerMode?{X:"right",Y:"top"}:{X:"left",Y:"bottom"},targetType:"relative",enableRtl:this.enableRtl,content:i,open:function(){var e=(0,t.select)(".e-menu-vscroll",l.element);e&&(e.style.height="inherit",e.style.maxHeight="");var i=(0,t.select)(".e-ul",l.element);l.element.style.maxHeight="",i.focus(),r.triggerOpen(i)}});return l},i.prototype.createHeaderContainer=function(e){e=e||this.getWrapper();var i=this.createElement("span",{className:"e-"+this.getModuleName()+"-header"}),s=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(this.title):this.title,n=this.createElement("span",{className:"e-"+this.getModuleName()+"-title",innerHTML:s}),r=this.createElement("span",{className:"e-icons e-"+this.getModuleName()+"-icon",attrs:{tabindex:"0"}});i.appendChild(n),i.appendChild(r),e.insertBefore(i,this.element)},i.prototype.openHamburgerMenu=function(e){this.hamburgerMode&&this.triggerBeforeOpen(null,this.element,null,e,0,0,"hamburger")},i.prototype.closeHamburgerMenu=function(e){var t=this,i={element:this.element,parentItem:null,event:e,items:this.items,cancel:!1};this.trigger("beforeClose",i,function(i){i.cancel||(t.closeMenu(null,e),t.element.classList.add("e-hide-menu"),t.trigger("onClose",{element:t.element,parentItem:null,items:t.items}))})},i.prototype.callFit=function(e,t,i,s,n){return(0,j.fit)(e,null,{X:t,Y:i},{top:s,left:n})},i.prototype.triggerBeforeOpen=function(e,i,s,n,r,l,o){var a,d=this,h=e?s[this.getField("children",this.navIdx.length-1)]:this.items,c={element:i,items:h,parentItem:s,event:n,cancel:!1,top:r,left:l,showSubMenuOn:"Auto"},p=o;this.trigger("beforeOpen",c,function(r){switch(p){case"menu":d.hamburgerMode||("Auto"!==r.showSubMenuOn&&(d.showItemOnClick=!d.defaultOption,d.showSubMenuOn=r.showSubMenuOn),d.top=r.top,d.left=r.left),d.popupWrapper.style.display="block",d.hamburgerMode||(d.popupWrapper.style.maxHeight=d.popupWrapper.getBoundingClientRect().height+"px",d.enableScrolling&&M(d.createElement,d.popupWrapper,d.uList,"vscroll",d.enableRtl),d.checkScrollOffset(n)),d.hamburgerMode||d.left||d.top?(d.popupObj.collision={X:"none",Y:"none"},d.popupWrapper.style.display=""):(d.popupObj.refreshPosition(d.lItem,!0),d.left=parseInt(d.popupWrapper.style.left,10),d.top=parseInt(d.popupWrapper.style.top,10),d.enableRtl&&(d.left=d.isNestedOrVertical?d.left-d.popupWrapper.offsetWidth-d.lItem.parentElement.offsetWidth+2:d.left-d.popupWrapper.offsetWidth+d.lItem.offsetWidth),d.template&&(d.isReact||d.isAngular)?requestAnimationFrame(function(){d.collision(),d.popupWrapper.style.display=""}):(d.collision(),d.popupWrapper.style.display=""));break;case"none":d.top=r.top,d.left=r.left,d.isContextMenuClosed=!0,a=r.element,d.enableScrolling&&d.isCMenu&&a&&a.parentElement&&(a.style.height=a.parentElement.style.height);break;case"hamburger":r.cancel||(d.element.classList.remove("e-hide-menu"),d.triggerOpen(d.element))}if("hamburger"!==p)if(r.cancel)d.isMenu?(d.popupObj.destroy(),(0,t.detach)(d.popupWrapper)):i.className.indexOf("e-ul")>-1&&(0,t.detach)(i),d.navIdx.pop();else if(d.isMenu)if(d.hamburgerMode)d.popupWrapper.style.top=d.top+"px",d.popupWrapper.style.left="0px",d.toggleAnimation(d.popupWrapper);else{d.setBlankIconStyle(d.popupWrapper),d.wireKeyboardEvent(d.popupWrapper),(0,t.rippleEffect)(d.popupWrapper,{selector:"."+ie}),d.popupWrapper.style.left=d.left+"px",d.popupWrapper.style.top=d.top+"px";var l="None"!==d.animationSettings.effect?{name:d.animationSettings.effect,duration:d.animationSettings.duration,timingFunction:d.animationSettings.easing}:null;d.popupObj.show(l,d.lItem),t.Browser.isDevice&&(d.popupWrapper.style.left=d.left+"px")}else d.setBlankIconStyle(d.uList),d.setPosition(d.lItem,d.uList,d.top,d.left),d.toggleAnimation(d.uList);if("right"===d.keyType){var o=d.getUlByNavIdx();if(e.classList.remove(_),d.isMenu&&1===d.navIdx.length&&d.removeLIStateByClass([K],[d.getWrapper()]),e.classList.add(K),d.action===W){var h={element:e,item:s,event:n};d.trigger("select",h)}e.focus(),o=d.getUlByNavIdx();var c=d.isValidLI(o.children[0],0,d.action);o.children[c].classList.add(_),o.children[c].focus()}})},i.prototype.collision=function(){var e;if(e=(0,j.isCollide)(this.popupWrapper,null,this.left,this.top),(this.isNestedOrVertical||this.enableRtl)&&(e.indexOf("right")>-1||e.indexOf("left")>-1)){this.popupObj.collision.X="none";var i=(0,t.closest)(this.lItem,".e-"+this.getModuleName()+"-wrapper").offsetWidth;this.left=this.enableRtl?(0,j.calculatePosition)(this.lItem,this.isNestedOrVertical?"right":"left","top").left:this.left-this.popupWrapper.offsetWidth-i+2}((e=(0,j.isCollide)(this.popupWrapper,null,this.left,this.top)).indexOf("left")>-1||e.indexOf("right")>-1)&&(this.left=this.callFit(this.popupWrapper,!0,!1,this.top,this.left).left),this.popupWrapper.style.left=this.left+"px"},i.prototype.setBlankIconStyle=function(e){var t=[].slice.call(e.getElementsByClassName("e-blankicon"));if(t.length){var i=e.querySelector(".e-menu-item:not(.e-blankicon):not(.e-separator)");if(i){var s=i.querySelector(".e-menu-icon");if(s){var n=this.enableRtl?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"},r=getComputedStyle(s),l=parseInt(r.fontSize,10);parseInt(r.width,10)&&parseInt(r.width,10)>l&&(l=parseInt(r.width,10));var o=l+parseInt(r[n.margin],10)+parseInt(getComputedStyle(i)[n.padding],10)+"px";t.forEach(function(e){e.style[n.padding]=o})}}}},i.prototype.checkScrollOffset=function(e){var i=this.getWrapper();if(i.children[0].classList.contains("e-menu-hscroll")&&1===this.navIdx.length){var s=(0,t.isNullOrUndefined)(e)?this.element:(0,t.closest)(e.target,"."+ie),n=(0,t.select)(".e-hscroll-bar",i);n.scrollLeft>s.offsetLeft&&(n.scrollLeft-=n.scrollLeft-s.offsetLeft);var r=n.scrollLeft+n.offsetWidth,l=s.offsetLeft+s.offsetWidth;r<l&&(n.scrollLeft+=l-r)}},i.prototype.setPosition=function(e,i,s,n,r){void 0===r&&(r=!1);var l="px";if(this.toggleVisiblity(i),i===this.element||n>-1&&s>-1){if((c=(0,j.isCollide)(i,null,n,s)).indexOf("right")>-1&&(n-=i.offsetWidth),c.indexOf("bottom")>-1)if((s=(d=this.callFit(i,!1,!0,s,n)).top-20)<0){var o=pageYOffset+document.documentElement.clientHeight-i.getBoundingClientRect().height;o>-1&&(s=o)}if((c=(0,j.isCollide)(i,null,n,s)).indexOf("left")>-1)n=(d=this.callFit(i,!0,!1,s,n)).left}else if(t.Browser.isDevice)if(!this.isMenu&&this.enableScrolling){var a=document.querySelector(".e-menu-vscroll");s=Number(a.style.top.replace("px","")),n=Number(a.style.left.replace("px",""))}else s=Number(this.element.style.top.replace(l,"")),n=Number(this.element.style.left.replace(l,""));else{var d,h=this.enableRtl?"left":"right";s=(d=(0,j.calculatePosition)(e,h,"top")).top,n=d.left;var c,p=(c=(0,j.isCollide)(i,null,this.enableRtl?n-i.offsetWidth:n,s)).indexOf("left")>-1||c.indexOf("right")>-1;p&&(n=(d=(0,j.calculatePosition)(e,this.enableRtl?"right":"left","top")).left),(this.enableRtl||p)&&(n=this.enableRtl&&p?n:n-i.offsetWidth),c.indexOf("bottom")>-1&&(this.isMenu||!this.enableScrolling)&&(s=(d=this.callFit(i,!1,!0,s,n)).top)}this.toggleVisiblity(i,!1),this.isCMenu&&this.enableScrolling&&i&&(i.style.height="",i.style.top="",i.style.left="",i.style.width="",i.style.position="");var u=(0,t.closest)(this.element,".e-"+this.getModuleName()+"-wrapper");if(!this.isMenu&&this.enableScrolling&&i&&u&&u.offsetHeight>0){var f=(0,t.closest)(i,".e-menu-vscroll");i.style.display="block",f&&U((0,t.getInstance)(f,D),f);var m=Math.ceil(this.getMenuWidth(i,i.offsetWidth,this.enableRtl)),g=M(this.createElement,u,i,"vscroll",this.enableRtl,u.offsetHeight);s=this.callFit(g,!1,!0,s,n).top,Object.assign(g.style,{top:s+"px",left:n+"px",width:m+"px",position:"absolute",display:r?"block":"none"})}else i.style.top=s+l,i.style.left=n+l},i.prototype.getMenuWidth=function(e,t,i){var s=e.getElementsByClassName(te)[0];return s&&(t+=parseInt(getComputedStyle(s)[i?"marginRight":"marginLeft"],10)),t<120?120:t},i.prototype.toggleVisiblity=function(e,t){void 0===t&&(t=!0),e.style.visibility=t?"hidden":"",e.style.display=t?"block":"none"},i.prototype.createItems=function(e){var i=this,s=this.navIdx?this.navIdx.length:0,n=this.getFields(s),r=this.hasField(e,this.getField("iconCss",s)),l={showIcon:r,moduleName:"menu",fields:n,template:this.template,itemNavigable:!0,itemCreating:function(e){e.curData[e.fields[n.id]]||(e.curData[e.fields[n.id]]=(0,t.getUniqueID)("menuitem")),(0,t.isNullOrUndefined)(e.curData.htmlAttributes)&&Object.defineProperty(e.curData,"htmlAttributes",{value:{},writable:!0,enumerable:!0,configurable:!0}),t.Browser.isIE?(e.curData.htmlAttributes.role||(e.curData.htmlAttributes.role="menuitem"),e.curData.htmlAttributes.tabindex||(e.curData.htmlAttributes.tabindex="-1")):Object.assign(e.curData.htmlAttributes,{role:e.curData.htmlAttributes.role||"menuitem",tabindex:e.curData.htmlAttributes.tabindex||"-1"}),i.isMenu&&!e.curData[i.getField("separator",s)]&&(e.curData.htmlAttributes["aria-label"]||(e.curData.htmlAttributes["aria-label"]=e.curData[e.fields.text]?e.curData[e.fields.text]:e.curData[e.fields.id])),""===e.curData[e.fields[n.iconCss]]&&(e.curData[e.fields[n.iconCss]]=null)},itemCreated:function(e){if(e.curData[i.getField("separator",s)]&&(e.item.classList.add(X),e.curData.htmlAttributes.role|