@syncfusion/ej2-splitbuttons
Advanced tools
Comparing version 22.1.34 to 22.1.37
@@ -5,2 +5,10 @@ # Changelog | ||
### SplitButton | ||
#### Bug Fixes | ||
- `#I464857` - Issue in Script error When we selecting SplitButton using keyboard interaction has been resolved. | ||
## 22.1.34 (2023-06-21) | ||
### DropDownButton | ||
@@ -7,0 +15,0 @@ |
/*! | ||
* filename: ej2-splitbuttons.min.js | ||
* version : 22.1.34 | ||
* version : 22.1.37 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -10,2 +10,2 @@ * Use of this code is subject to the terms of our license. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionButtons"),require("SyncfusionPopups")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionButtons","SyncfusionPopups"],t):"object"==typeof exports?exports.SyncfusionSplitbuttons=t(require("SyncfusionBase"),require("SyncfusionButtons"),require("SyncfusionPopups")):e.SyncfusionSplitbuttons=t(e.SyncfusionBase,e.SyncfusionButtons,e.SyncfusionPopups)}(this,function(e,t,i){return function(e){function t(n){if(i[n])return i[n].exports;var s=i[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=11)}([function(t,i){t.exports=e},function(e,t,i){"use strict";function n(e,t){for(var n=i.i(a.extend)({},e),s=0,o=Object.keys(n);s<o.length;s++){var r=o[s];t.indexOf(r)<0&&i.i(a.deleteObject)(n,r)}return n}function s(e,t){var n,s=40===t?0:e.childElementCount-1,r=s,p=e.querySelector(".e-selected");p&&p.classList.remove("e-selected");for(var l=0,c=e.children.length;l<c;l++)e.children[l].classList.contains("e-focused")&&(n=e.children[l],r=l,n.classList.remove("e-focused"),40===t?r++:r--,r===(40===t?e.childElementCount:-1)&&(r=s));n=e.children[r],-1!==(r=o(e,n,r,t))&&(i.i(a.addClass)([e.children[r]],"e-focused"),e.children[r].focus())}function o(e,t,i,n,s){if(void 0===s&&(s=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(i===(40===n?e.childElementCount-1:0)?i=40===n?0:e.childElementCount-1:40===n?i++:i--),t=e.children[i],t.classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++s===e.childElementCount)return i=-1;i=o(e,t,i,n,s)}return i}function r(e,t){var n=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(t){[].slice.call(e.getElementsByClassName("e-item")).forEach(function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")})}if(n.length){var s=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!i.i(a.isNullOrUndefined)(s)){s.classList.contains("e-url")&&(s=s.querySelector(".e-menu-url"));var o,r=s.querySelector(".e-menu-icon"),p=e.classList.contains("e-rtl");o=p?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var l=parseInt(getComputedStyle(r).fontSize,10)+parseInt(getComputedStyle(r)[o.margin],10)+parseInt(getComputedStyle(s).paddingLeft,10)+"px";n.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[o.padding]=l:e.style[o.padding]=l})}}}t.a=n,t.d=s,t.c=r,i.d(t,"b",function(){return c});var a=i(0),p=(i.n(a),this&&this.__extends||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])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),l=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),l([i.i(a.Property)("")],t.prototype,"iconCss",void 0),l([i.i(a.Property)("")],t.prototype,"id",void 0),l([i.i(a.Property)(!1)],t.prototype,"separator",void 0),l([i.i(a.Property)("")],t.prototype,"text",void 0),l([i.i(a.Property)("")],t.prototype,"url",void 0),l([i.i(a.Property)(!1)],t.prototype,"disabled",void 0),t}(a.ChildProperty)},function(e,i){e.exports=t},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(0),s=(i.n(n),i(2)),o=(i.n(s),i(4)),r=(i.n(o),i(1)),a=this&&this.__extends||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])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),p=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},l={DISABLED:"e-disabled",FOCUS:"e-focused",ICON:"e-menu-icon",ITEM:"e-item",POPUP:"e-dropdown-popup",RTL:"e-rtl",SEPARATOR:"e-separator",VERTICAL:"e-vertical"},c=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.isPopupCreated=!0,n}return a(t,e),t.prototype.preRender=function(){},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.closePopup()},t.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},t.prototype.addItems=function(e,t){for(var i,n=this.items.length,s=0,o=this.items.length;s<o;s++)if(t===this.items[s].text){n=s;break}for(var a=e.length-1;a>=0;a--)i=new r.b(this,"items",e[a],!0),this.items.splice(n,0,i);this.canOpen()||this.createItems()},t.prototype.removeItems=function(e,t){for(var i=!1,n=0,s=e.length;n<s;n++)for(var o=0,r=this.items.length;o<r;o++)if(e[n]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),i=!0;break}i&&this.getULElement()&&this.createItems()},t.prototype.createPopup=function(){var e,t=this.createElement("div",{className:l.POPUP,id:this.element.id+"-popup"});document.body.appendChild(t),this.dropDown=new o.Popup(t,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),i.i(n.attributes)(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e["aria-label"]=this.element.textContent?this.element.textContent:"dropdownbutton",e)),this.cssClass&&i.i(n.addClass)([t],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},t.prototype.getTargetElement=function(){return"string"==typeof this.target?i.i(n.select)(this.target):this.target},t.prototype.createItems=function(e){var t,s,o,a,p=this.items,c=this.hasIcon(this.items,"iconCss"),d=this.getULElement();d?d.innerHTML="":d=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var h=0;h<p.length;h++){s=p[h];var u=s.text;o=this.createElement("li",{innerHTML:s.url?"":u,className:s.separator?l.ITEM+" "+l.SEPARATOR:l.ITEM,attrs:s.separator?{role:"separator",tabindex:"-1"}:{role:"menuitem",tabindex:"-1","aria-label":u},id:s.id?s.id:i.i(n.getUniqueID)("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?o.textContent=s.url?"":u:o.innerHTML=s.url?"":u,s.url&&(o.appendChild(this.createAnchor(s)),o.classList.add("e-url")),s.iconCss?(t=this.createElement("span",{className:l.ICON+" "+s.iconCss}),s.url?o.childNodes[0].appendChild(t):o.insertBefore(t,o.childNodes[0])):c&&!s.separator&&o.classList.add("e-blank-icon"),s.disabled&&o.classList.add("e-disabled"),a={item:s,element:o},this.trigger("beforeItemRender",a),d.appendChild(o)}e&&this.getPopUpElement().appendChild(d),c&&i.i(r.c)(this.getPopUpElement())},t.prototype.hasIcon=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i][""+t])return!0;return!1},t.prototype.createAnchor=function(e){var t=this.enableHtmlSanitizer?n.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:t,attrs:{href:e.url}})},t.prototype.initialize=function(){this.button=new s.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=i.i(n.getUniqueID)("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.target&&!this.isColorPicker()||!this.createPopupOnClick?this.createPopup():this.isPopupCreated=!1},t.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},t.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(l.VERTICAL)>-1?"bottom":"right")+" e-caret"}))},t.prototype.setActiveElem=function(e){this.activeElem=e},t.prototype.getModuleName=function(){return"dropdown-btn"},t.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},t.prototype.destroy=function(){var t=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var s;this.element.querySelector("span.e-caret")&&i.i(n.detach)(this.element.querySelector("span.e-caret")),this.cssClass&&(s=this.cssClass.split(" ")),this.button.destroy(),s&&i.i(n.removeClass)([this.element],s),i.i(n.removeClass)(this.activeElem,["e-active"]);(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){t.element.removeAttribute(e)}),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents()}},t.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(i.i(n.removeClass)([e],["e-popup-open","e-popup-close"]),i.i(n.detach)(e))}n.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),n.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1},t.prototype.getPopUpElement=function(){var e=null;return this.dropDown&&(e=this.dropDown.element),e},t.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},t.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||n.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),n.EventHandler.add(this.element,"click",this.clickHandler,this),n.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this)},t.prototype.popupWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&n.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(n.EventHandler.add(e,"click",this.clickHandler,this),n.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&n.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=i.i(n.rippleEffect)(e,{selector:"."+l.ITEM})},t.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&n.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(n.EventHandler.remove(e,"click",this.clickHandler),n.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&n.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler)),n.isRippleEnabled&&this.rippleFn&&this.rippleFn()},t.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},t.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),i.i(r.d)(this.getULElement(),e.keyCode))},t.prototype.keyEventHandler=function(e){if(!this.target||13!==e.keyCode&&9!==e.keyCode)return 13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?void this.activeElem[0].focus():void(e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},t.prototype.getLI=function(e){return"LI"===e.tagName?e:i.i(n.closest)(e,"li")},t.prototype.mousedownHandler=function(e){var t=e.target;!this.dropDown||this.canOpen()||i.i(n.closest)(t,'[id="'+this.getPopUpElement().id+'"]')||i.i(n.closest)(t,'[id="'+this.element.id+'"]')||this.closePopup(e)},t.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget;if(t&&t.className.indexOf("e-item")>-1){var i=this.getLI(t);if(i){var n=Array.prototype.indexOf.call(this.getULElement().children,i),s=this.items[n];if(s){var o={element:i,item:s};this.trigger("select",o)}}}this.closePopup(e)}},t.prototype.clickHandler=function(e){var t=e.target;if(i.i(n.closest)(t,'[id="'+this.element.id+'"]'))!this.createPopupOnClick||this.target&&!this.isColorPicker()?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e));else if(i.i(n.closest)(t,'[id="'+this.getPopUpElement().id+'"]')){var s=void 0,o=void 0,r=void 0,a=this.getLI(t);a&&(o=Array.prototype.indexOf.call(this.getULElement().children,a),r=this.items[o],r&&(s={element:a,item:r},this.trigger("select",s)),this.closePopup(e,this.activeElem[0]))}},t.prototype.openPopUp=function(e){var t=this;void 0===e&&(e=null);var s=this.getPopUpElement();if(this.target)if(this.activeElem.length>1){var o=i.i(n.getComponent)(this.activeElem[0],"split-btn");o.isReact&&s.childNodes.length<1&&(!0,o.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&s.childNodes.length<1&&(!0,this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var r=this.getULElement();this.popupWireEvents();var a={element:r,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",a,function(e){if(!e.cancel){var s=t.getULElement();if(t.dropDown.show(null,t.element),i.i(n.addClass)([t.element],"e-active"),t.element.setAttribute("aria-expanded","true"),t.element.setAttribute("aria-owns",t.getPopUpElement().id),s&&s.focus(),t.enableRtl&&"0px"!==s.parentElement.style.left){var o=void 0;o=t.element.parentElement&&t.element.parentElement.classList.contains("e-split-btn-wrapper")?t.element.parentElement.offsetWidth:t.element.offsetWidth;var r=s.parentElement.offsetWidth-o,a=parseFloat(s.parentElement.style.left)-r;a<0&&(a=0),s.parentElement.style.left=a+"px"}var p={element:s,items:t.items};t.trigger("open",p)}})},t.prototype.closePopup=function(e,t){var s=this;void 0===e&&(e=null);var o=this.getULElement(),r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",r,function(e){if(e.cancel)o&&o.focus();else{var r=s.getPopUpElement();r&&n.EventHandler.remove(r,"keydown",s.keyBoardHandler),s.popupUnWireEvents();var a=s.getULElement(),p=void 0;a&&(p=a.querySelector(".e-selected")),p&&p.classList.remove("e-selected"),s.dropDown.hide(),i.i(n.removeClass)(s.activeElem,"e-active"),s.element.setAttribute("aria-expanded","false"),s.element.removeAttribute("aria-owns"),t&&t.focus();var l={element:a,items:s.items};s.trigger("close",l),!s.target&&a&&i.i(n.detach)(a),s.target&&!s.isColorPicker()||s.createPopupOnClick&&s.destroyPopup(),s.target&&(s.isPopupCreated=!s.createPopupOnClick)}})},t.prototype.unWireEvents=function(){this.createPopupOnClick||n.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),n.EventHandler.remove(this.element,"click",this.clickHandler),n.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(n.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),n.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler))},t.prototype.onPropertyChanged=function(e,t){var s=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(i.i(r.a)(e,s));var o;this.isPopupCreated&&(o=this.getPopUpElement(),this.dropDown.setProperties(i.i(r.a)(e,["enableRtl"])));for(var a=0,p=Object.keys(e);a<p.length;a++){switch(p[a]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(l.VERTICAL)>-1||t.cssClass.indexOf(l.VERTICAL)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var c=this.element.querySelector("span.e-caret");e.cssClass.indexOf(l.VERTICAL)>-1?i.i(n.classList)(c,["e-icon-bottom"],["e-icon-right"]):i.i(n.classList)(c,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(t.cssClass&&i.i(n.removeClass)([o],t.cssClass.split(" ")),e.cssClass&&i.i(n.addClass)([o],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}}},t.prototype.focusIn=function(){this.element.focus()},p([i.i(n.Property)("")],t.prototype,"content",void 0),p([i.i(n.Property)("")],t.prototype,"cssClass",void 0),p([i.i(n.Property)(!1)],t.prototype,"disabled",void 0),p([i.i(n.Property)("")],t.prototype,"iconCss",void 0),p([i.i(n.Property)("Left")],t.prototype,"iconPosition",void 0),p([i.i(n.Property)(!1)],t.prototype,"enableHtmlSanitizer",void 0),p([i.i(n.Collection)([],r.b)],t.prototype,"items",void 0),p([i.i(n.Property)(!1)],t.prototype,"createPopupOnClick",void 0),p([i.i(n.Property)("")],t.prototype,"target",void 0),p([i.i(n.Property)("")],t.prototype,"closeActionEvents",void 0),p([i.i(n.Event)()],t.prototype,"beforeItemRender",void 0),p([i.i(n.Event)()],t.prototype,"beforeOpen",void 0),p([i.i(n.Event)()],t.prototype,"beforeClose",void 0),p([i.i(n.Event)()],t.prototype,"close",void 0),p([i.i(n.Event)()],t.prototype,"open",void 0),p([i.i(n.Event)()],t.prototype,"select",void 0),p([i.i(n.Event)()],t.prototype,"created",void 0),t=p([n.NotifyPropertyChanges],t)}(n.Component)},function(e,t){e.exports=i},function(e,t,i){"use strict";var n=i(10);i.d(t,"a",function(){return n.a})},function(e,t,i){"use strict";var n=i(1);i.d(t,"a",function(){return n.a}),i.d(t,"b",function(){return n.d}),i.d(t,"c",function(){return n.c}),i.d(t,"d",function(){return n.b})},function(e,t,i){"use strict";var n=i(3);i.d(t,"a",function(){return n.a})},function(e,t,i){"use strict";var n=i(12);i.d(t,"a",function(){return n.a}),i.d(t,"b",function(){return n.b}),i.d(t,"c",function(){return n.c})},function(e,t,i){"use strict";var n=i(13);i.d(t,"a",function(){return n.a}),i.d(t,"b",function(){return n.b})},function(e,t,i){"use strict";function n(e,t,n){void 0===t&&(t={});var r,a,p,l;i.i(s.isNullOrUndefined)(n)&&(n=s.createElement);var c=document.querySelector(e);i.i(s.addClass)([c],["e-btn-group","e-css"]),c.setAttribute("role","group");var d=c.children;t.buttons=t.buttons||[];for(var h=0,u=0;u<d.length;h++,u++)r=d[u],null!==(l=t.buttons[h])&&("BUTTON"===r.tagName?a=r:(a=n("label"),p=d[u+1],p?c.insertBefore(a,p):c.appendChild(a),r.id&&a.setAttribute("for",r.id),l&&l.disabled&&(r.disabled=!0),u++),t.cssClass&&l&&!l.cssClass&&(l.cssClass=t.cssClass),new o.Button(l||{},a));return c}t.a=n;var s=i(0),o=(i.n(s),i(2));i.n(o)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(6);i.d(t,"getModel",function(){return n.a}),i.d(t,"upDownKeyHandler",function(){return n.b}),i.d(t,"setBlankIconStyle",function(){return n.c}),i.d(t,"Item",function(){return n.d});var s=i(7);i.d(t,"DropDownButton",function(){return s.a});var o=i(9);i.d(t,"SplitButton",function(){return o.a}),i.d(t,"Deferred",function(){return o.b});var r=i(5);i.d(t,"createButtonGroup",function(){return r.a});var a=i(8);i.d(t,"SpinSettings",function(){return a.a}),i.d(t,"AnimationSettings",function(){return a.b}),i.d(t,"ProgressButton",function(){return a.c})},function(e,t,i){"use strict";i.d(t,"a",function(){return l}),i.d(t,"b",function(){return c}),i.d(t,"c",function(){return d});var n=i(2),s=(i.n(n),i(0)),o=(i.n(s),i(4)),r=(i.n(o),this&&this.__extends||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])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),a=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},p="e-btn-content",l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(s.Property)(null)],t.prototype,"template",void 0),a([i.i(s.Property)(16)],t.prototype,"width",void 0),a([i.i(s.Property)("Left")],t.prototype,"position",void 0),t}(s.ChildProperty),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(s.Property)(400)],t.prototype,"duration",void 0),a([i.i(s.Property)("None")],t.prototype,"effect",void 0),a([i.i(s.Property)("ease")],t.prototype,"easing",void 0),t}(s.ChildProperty),d=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.step=1,n}return r(t,e),t.prototype.preRender=function(){e.prototype.preRender.call(this)},t.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},t.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},t.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},t.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},t.prototype.getModuleName=function(){return"progress-btn"},t.prototype.destroy=function(){var t=this,n=["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(n=n.concat(this.cssClass.split(" "))),i.i(s.removeClass)([this.element],n),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){t.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},t.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},t.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),i.i(o.createSpinner)({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},t.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},t.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},t.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(p)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},t.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},t.prototype.setContent=function(){var e;e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=s.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:p,innerHTML:e}))},t.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:p,innerHTML:e});if(this.iconCss){var i=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(i.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var n=t.childNodes[0];!n||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(i):t.insertBefore(i,n)}this.element.appendChild(t)},t.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},t.prototype.startProgress=function(e,t){var n=this.element.classList,s=n.contains("e-vertical");n.add("e-progress-active"),n.contains("e-hide-spinner")||i.i(o.showSpinner)(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,s),this.startContAnimate()},t.prototype.startAnimate=function(e,t,i,n,s,o,r,a){var p=this;try{var l=e-i,c=this.duration*o/100,d=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-d,i=e-d,n+=(l-d)/this.duration*100,s=(t-r)%c==0||100===n?n:s;var h={percent:s,currentDuration:t,step:o};this.eIsVertical=a,0===n?this.trigger("begin",h,function(e){p.successCallback(e,n,s,t,r,d,i)}):100===n||t===this.duration?this.trigger("end",h,function(e){p.successCallback(e,n,s,t,r,d,i)}):this.trigger("progress",h,function(e){p.successCallback(e,n,s,t,r,d,i)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},t.prototype.successCallback=function(e,t,i,n,s,o,r){var a=this,p=t,l=i,c=o,d=n,h=s,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(d-h)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,h=d),this.isPaused||(d<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),d,u,p,l,e.step,h,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},t.prototype.startContAnimate=function(){var e=this,t=this.element.getElementsByClassName(p)[0];"None"!==this.animationSettings.effect?new s.Animation({}).animate(t,{duration:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){t.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},t.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add("e-progress-active");for(var i=this.percent;i<100;i++)i+=10,i>100&&(i=100),this.enableProgress&&(this.getProgress().style[t?"height":"width"]=this.percent<100?i+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var n={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",n),this.progressTime=this.percent=0},t.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(p)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},t.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(p)[0];if(this.element.classList.contains("e-hide-spinner")||i.i(o.hideSpinner)(this.element.querySelector(".e-spinner")),this.element.classList.remove("e-progress-active"),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},t.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(p)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},t.prototype.setAria=function(){i.i(s.attributes)(this.element,{"aria-label":this.element.textContent+" progress","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0"})},t.prototype.wireEvents=function(){s.EventHandler.add(this.element,"click",this.clickHandler,this)},t.prototype.unWireEvents=function(){s.EventHandler.remove(this.element,"click",this.clickHandler)},t.prototype.onPropertyChanged=function(t,n){var r=this.element,a=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(a=!0),e.prototype.onPropertyChanged.call(this,t,n);for(var p=0,l=Object.keys(t);p<l.length;p++){switch(l[p]){case"content":this.setContent(),this.createSpinner(),a&&(i.i(o.showSpinner)(this.element.querySelector(".e-spinner")),a=!1),this.enableProgress&&this.createProgress(),r.setAttribute("aria-label",r.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":t.enableProgress?this.createProgress():i.i(s.remove)(this.getProgress());break;case"spinSettings":t.spinSettings.position&&(r.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(t.spinSettings.template||t.spinSettings.width)&&(r.removeChild(this.getSpinner()),this.createSpinner())}}},t.prototype.focusIn=function(){this.element.focus()},a([i.i(s.Property)(!1)],t.prototype,"enableProgress",void 0),a([i.i(s.Property)(2e3)],t.prototype,"duration",void 0),a([i.i(s.Property)("Left")],t.prototype,"iconPosition",void 0),a([i.i(s.Property)("")],t.prototype,"iconCss",void 0),a([i.i(s.Property)(!1)],t.prototype,"disabled",void 0),a([i.i(s.Property)(!1)],t.prototype,"isPrimary",void 0),a([i.i(s.Property)("")],t.prototype,"cssClass",void 0),a([i.i(s.Property)("")],t.prototype,"content",void 0),a([i.i(s.Property)(!1)],t.prototype,"isToggle",void 0),a([i.i(s.Property)(!1)],t.prototype,"enableHtmlSanitizer",void 0),a([i.i(s.Complex)({},l)],t.prototype,"spinSettings",void 0),a([i.i(s.Complex)({},c)],t.prototype,"animationSettings",void 0),a([i.i(s.Event)()],t.prototype,"created",void 0),a([i.i(s.Event)()],t.prototype,"begin",void 0),a([i.i(s.Event)()],t.prototype,"progress",void 0),a([i.i(s.Event)()],t.prototype,"end",void 0),a([i.i(s.Event)()],t.prototype,"fail",void 0),t=a([s.NotifyPropertyChanges],t)}(n.Button)},function(e,t,i){"use strict";i.d(t,"a",function(){return d}),i.d(t,"b",function(){return h});var n=i(0),s=(i.n(n),i(2)),o=(i.n(s),i(1)),r=i(3),a=this&&this.__extends||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])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),p=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},l="e-rtl",c="EJS-SPLITBUTTON",d=function(e){function t(t,i){return e.call(this,t,i)||this}return a(t,e),t.prototype.preRender=function(){var e=this.element;if(e.tagName===c){for(var t=i.i(n.getValue)("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),o=this.createElement(c,{className:"e-"+this.getModuleName()+"-wrapper"}),r=0,a=e.attributes.length;r<a;r++)s.setAttribute(e.attributes[r].nodeName,e.attributes[r].nodeValue);e.parentNode.insertBefore(o,e),i.i(n.detach)(e),e=s,o.appendChild(e),i.i(n.setValue)("ej2_instances",t,e),this.wrapper=o,this.element=e}this.element.id||(this.element.id=i.i(n.getUniqueID)("e-"+this.getModuleName()))},t.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},t.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},t.prototype.addItems=function(t,i){e.prototype.addItems.call(this,t,i),this.secondaryBtnObj.items=this.items},t.prototype.removeItems=function(t,i){e.prototype.removeItems.call(this,t,i),this.secondaryBtnObj.items=this.items},t.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add(l),this.cssClass&&i.i(n.addClass)([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},t.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new s.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},t.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var i={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick};i.beforeItemRender=function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},i.open=function(t){e.trigger("open",t)},i.close=function(t){e.trigger("close",t)},i.select=function(t){e.trigger("select",t)},i.beforeOpen=function(t){e.createPopupOnClick&&0==e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var i=new h;return e.trigger("beforeOpen",t,function(e){i.resolve(e)}),i},i.beforeClose=function(t){var i=new h;return e.trigger("beforeClose",t,function(e){i.resolve(e)}),i},this.secondaryBtnObj=new r.a(i),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},t.prototype.setAria=function(){i.i(n.attributes)(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent+" splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},t.prototype.getModuleName=function(){return"split-btn"},t.prototype.toggle=function(){this.secondaryBtnObj.toggle()},t.prototype.destroy=function(){var t=this,s=[l];if(this.cssClass&&(s=s.concat(this.cssClass.split(" "))),this.element){var o=document.getElementById(this.element.id);o&&o.parentElement===this.wrapper&&(this.wrapper.tagName===c?(this.wrapper.innerHTML="",i.i(n.removeClass)([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),i.i(n.removeClass)([this.wrapper],this.cssClass.split(" "))):(i.i(n.removeClass)([this.element],s),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){t.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),i.i(n.remove)(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element.getAttribute("class")||this.element.removeAttribute("class")},t.prototype.wireEvents=function(){n.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new n.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},t.prototype.unWireEvents=function(){n.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),i.i(n.getInstance)(this.element,n.KeyboardEvents).destroy()},t.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},t.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement().classList.contains("e-popup-close")?this.secondaryBtnObj.element.classList.remove("e-active"):(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active"))}},t.prototype.onPropertyChanged=function(e,t){var s=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(i.i(o.a)(e,s)),s=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(i.i(o.a)(e,s));for(var r=0,a=Object.keys(e);r<a.length;r++){switch(a[r]){case"cssClass":t.cssClass&&i.i(n.removeClass)([this.wrapper],t.cssClass.split(" ")),i.i(n.addClass)([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?i.i(n.addClass)([this.wrapper],l):i.i(n.removeClass)([this.wrapper],l);break;case"disabled":e.disabled?i.i(n.addClass)([this.wrapper],"e-splitbtn-disabled"):i.i(n.removeClass)([this.wrapper],"e-splitbtn-disabled")}}},t.prototype.focusIn=function(){this.element.focus()},p([i.i(n.Property)("")],t.prototype,"content",void 0),p([i.i(n.Property)("")],t.prototype,"cssClass",void 0),p([i.i(n.Property)(!1)],t.prototype,"disabled",void 0),p([i.i(n.Property)("")],t.prototype,"iconCss",void 0),p([i.i(n.Property)("Left")],t.prototype,"iconPosition",void 0),p([i.i(n.Property)(!1)],t.prototype,"createPopupOnClick",void 0),p([i.i(n.Collection)([],o.b)],t.prototype,"items",void 0),p([i.i(n.Property)("")],t.prototype,"target",void 0),p([i.i(n.Event)()],t.prototype,"beforeItemRender",void 0),p([i.i(n.Event)()],t.prototype,"beforeOpen",void 0),p([i.i(n.Event)()],t.prototype,"beforeClose",void 0),p([i.i(n.Event)()],t.prototype,"click",void 0),p([i.i(n.Event)()],t.prototype,"close",void 0),p([i.i(n.Event)()],t.prototype,"open",void 0),p([i.i(n.Event)()],t.prototype,"select",void 0),p([i.i(n.Event)()],t.prototype,"created",void 0),t=p([n.NotifyPropertyChanges],t)}(r.a),h=function(){function e(){var e=this;this.promise=new Promise(function(t,i){e.resolve=t,e.reject=i}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)}return e}()}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionButtons"),require("SyncfusionPopups")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionButtons","SyncfusionPopups"],t):"object"==typeof exports?exports.SyncfusionSplitbuttons=t(require("SyncfusionBase"),require("SyncfusionButtons"),require("SyncfusionPopups")):e.SyncfusionSplitbuttons=t(e.SyncfusionBase,e.SyncfusionButtons,e.SyncfusionPopups)}(this,function(e,t,i){return function(e){function t(n){if(i[n])return i[n].exports;var s=i[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=11)}([function(t,i){t.exports=e},function(e,t,i){"use strict";function n(e,t){for(var n=i.i(a.extend)({},e),s=0,o=Object.keys(n);s<o.length;s++){var r=o[s];t.indexOf(r)<0&&i.i(a.deleteObject)(n,r)}return n}function s(e,t){var n,s=40===t?0:e.childElementCount-1,r=s,p=e.querySelector(".e-selected");p&&p.classList.remove("e-selected");for(var l=0,c=e.children.length;l<c;l++)e.children[l].classList.contains("e-focused")&&(n=e.children[l],r=l,n.classList.remove("e-focused"),40===t?r++:r--,r===(40===t?e.childElementCount:-1)&&(r=s));n=e.children[r],-1!==(r=o(e,n,r,t))&&(i.i(a.addClass)([e.children[r]],"e-focused"),e.children[r].focus())}function o(e,t,i,n,s){if(void 0===s&&(s=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(i===(40===n?e.childElementCount-1:0)?i=40===n?0:e.childElementCount-1:40===n?i++:i--),t=e.children[i],t.classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++s===e.childElementCount)return i=-1;i=o(e,t,i,n,s)}return i}function r(e,t){var n=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(t){[].slice.call(e.getElementsByClassName("e-item")).forEach(function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")})}if(n.length){var s=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!i.i(a.isNullOrUndefined)(s)){s.classList.contains("e-url")&&(s=s.querySelector(".e-menu-url"));var o,r=s.querySelector(".e-menu-icon"),p=e.classList.contains("e-rtl");o=p?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var l=parseInt(getComputedStyle(r).fontSize,10)+parseInt(getComputedStyle(r)[o.margin],10)+parseInt(getComputedStyle(s).paddingLeft,10)+"px";n.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[o.padding]=l:e.style[o.padding]=l})}}}t.a=n,t.d=s,t.c=r,i.d(t,"b",function(){return c});var a=i(0),p=(i.n(a),this&&this.__extends||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])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),l=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),l([i.i(a.Property)("")],t.prototype,"iconCss",void 0),l([i.i(a.Property)("")],t.prototype,"id",void 0),l([i.i(a.Property)(!1)],t.prototype,"separator",void 0),l([i.i(a.Property)("")],t.prototype,"text",void 0),l([i.i(a.Property)("")],t.prototype,"url",void 0),l([i.i(a.Property)(!1)],t.prototype,"disabled",void 0),t}(a.ChildProperty)},function(e,i){e.exports=t},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(0),s=(i.n(n),i(2)),o=(i.n(s),i(4)),r=(i.n(o),i(1)),a=this&&this.__extends||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])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),p=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},l={DISABLED:"e-disabled",FOCUS:"e-focused",ICON:"e-menu-icon",ITEM:"e-item",POPUP:"e-dropdown-popup",RTL:"e-rtl",SEPARATOR:"e-separator",VERTICAL:"e-vertical"},c=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.isPopupCreated=!0,n}return a(t,e),t.prototype.preRender=function(){},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.createPopupOnClick&&!this.isPopupCreated?(this.createPopup(),this.openPopUp()):this.closePopup()},t.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},t.prototype.addItems=function(e,t){for(var i,n=this.items.length,s=0,o=this.items.length;s<o;s++)if(t===this.items[s].text){n=s;break}for(var a=e.length-1;a>=0;a--)i=new r.b(this,"items",e[a],!0),this.items.splice(n,0,i);this.canOpen()||this.createItems()},t.prototype.removeItems=function(e,t){for(var i=!1,n=0,s=e.length;n<s;n++)for(var o=0,r=this.items.length;o<r;o++)if(e[n]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),i=!0;break}i&&this.getULElement()&&this.createItems()},t.prototype.createPopup=function(){var e,t=this.createElement("div",{className:l.POPUP,id:this.element.id+"-popup"});document.body.appendChild(t),this.dropDown=new o.Popup(t,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),i.i(n.attributes)(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e["aria-label"]=this.element.textContent?this.element.textContent:"dropdownbutton",e)),this.cssClass&&i.i(n.addClass)([t],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},t.prototype.getTargetElement=function(){return"string"==typeof this.target?i.i(n.select)(this.target):this.target},t.prototype.createItems=function(e){var t,s,o,a,p=this.items,c=this.hasIcon(this.items,"iconCss"),d=this.getULElement();d?d.innerHTML="":d=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var h=0;h<p.length;h++){s=p[h];var u=s.text;o=this.createElement("li",{innerHTML:s.url?"":u,className:s.separator?l.ITEM+" "+l.SEPARATOR:l.ITEM,attrs:s.separator?{role:"separator",tabindex:"-1"}:{role:"menuitem",tabindex:"-1","aria-label":u},id:s.id?s.id:i.i(n.getUniqueID)("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?o.textContent=s.url?"":u:o.innerHTML=s.url?"":u,s.url&&(o.appendChild(this.createAnchor(s)),o.classList.add("e-url")),s.iconCss?(t=this.createElement("span",{className:l.ICON+" "+s.iconCss}),s.url?o.childNodes[0].appendChild(t):o.insertBefore(t,o.childNodes[0])):c&&!s.separator&&o.classList.add("e-blank-icon"),s.disabled&&o.classList.add("e-disabled"),a={item:s,element:o},this.trigger("beforeItemRender",a),d.appendChild(o)}e&&this.getPopUpElement().appendChild(d),c&&i.i(r.c)(this.getPopUpElement())},t.prototype.hasIcon=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i][""+t])return!0;return!1},t.prototype.createAnchor=function(e){var t=this.enableHtmlSanitizer?n.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:t,attrs:{href:e.url}})},t.prototype.initialize=function(){this.button=new s.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=i.i(n.getUniqueID)("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.target&&!this.isColorPicker()||!this.createPopupOnClick?this.createPopup():this.isPopupCreated=!1},t.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},t.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(l.VERTICAL)>-1?"bottom":"right")+" e-caret"}))},t.prototype.setActiveElem=function(e){this.activeElem=e},t.prototype.getModuleName=function(){return"dropdown-btn"},t.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},t.prototype.destroy=function(){var t=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var s;this.element.querySelector("span.e-caret")&&i.i(n.detach)(this.element.querySelector("span.e-caret")),this.cssClass&&(s=this.cssClass.split(" ")),this.button.destroy(),s&&i.i(n.removeClass)([this.element],s),i.i(n.removeClass)(this.activeElem,["e-active"]);(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){t.element.removeAttribute(e)}),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents()}},t.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(i.i(n.removeClass)([e],["e-popup-open","e-popup-close"]),i.i(n.detach)(e))}n.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),n.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1},t.prototype.getPopUpElement=function(){var e=null;if(!this.dropDown&&this.activeElem[0].classList.contains("e-split-btn")){var t=i.i(n.getComponent)(this.activeElem[1],"dropdown-btn");t&&(this.dropDown=t.dropDown)}return this.dropDown&&(e=this.dropDown.element),e},t.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},t.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||n.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),n.EventHandler.add(this.element,"click",this.clickHandler,this),n.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this)},t.prototype.popupWireEvents=function(){this.delegateMousedownHandler||(this.delegateMousedownHandler=this.mousedownHandler.bind(this));var e=this.getPopUpElement();this.createPopupOnClick&&n.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(n.EventHandler.add(e,"click",this.clickHandler,this),n.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&n.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=i.i(n.rippleEffect)(e,{selector:"."+l.ITEM})},t.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&n.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(n.EventHandler.remove(e,"click",this.clickHandler),n.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&n.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler)),n.isRippleEnabled&&this.rippleFn&&this.rippleFn()},t.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},t.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),i.i(r.d)(this.getULElement(),e.keyCode))},t.prototype.keyEventHandler=function(e){if(!this.target||13!==e.keyCode&&9!==e.keyCode)return 13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?void this.activeElem[0].focus():void(e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},t.prototype.getLI=function(e){return"LI"===e.tagName?e:i.i(n.closest)(e,"li")},t.prototype.mousedownHandler=function(e){var t=e.target;!this.dropDown||this.canOpen()||i.i(n.closest)(t,'[id="'+this.getPopUpElement().id+'"]')||i.i(n.closest)(t,'[id="'+this.element.id+'"]')||this.closePopup(e)},t.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget;if(t&&t.className.indexOf("e-item")>-1){var i=this.getLI(t);if(i){var n=Array.prototype.indexOf.call(this.getULElement().children,i),s=this.items[n];if(s){var o={element:i,item:s};this.trigger("select",o)}}}this.closePopup(e)}},t.prototype.clickHandler=function(e){var t=e.target;if(i.i(n.closest)(t,'[id="'+this.element.id+'"]'))!this.createPopupOnClick||this.target&&""!==this.target&&!this.isColorPicker()?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e));else if(i.i(n.closest)(t,'[id="'+this.getPopUpElement().id+'"]')){var s=void 0,o=void 0,r=void 0,a=this.getLI(t);a&&(o=Array.prototype.indexOf.call(this.getULElement().children,a),r=this.items[o],r&&(s={element:a,item:r},this.trigger("select",s)),this.closePopup(e,this.activeElem[0]))}},t.prototype.openPopUp=function(e){var t=this;void 0===e&&(e=null);var s=this.getPopUpElement();if(this.target)if(this.activeElem.length>1){var o=i.i(n.getComponent)(this.activeElem[0],"split-btn");o.isReact&&s.childNodes.length<1&&(!0,o.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&s.childNodes.length<1&&(!0,this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var r=this.getULElement();this.popupWireEvents();var a={element:r,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",a,function(e){if(!e.cancel){var s=t.getULElement();if(t.dropDown.show(null,t.element),i.i(n.addClass)([t.element],"e-active"),t.element.setAttribute("aria-expanded","true"),t.element.setAttribute("aria-owns",t.getPopUpElement().id),s&&s.focus(),t.enableRtl&&"0px"!==s.parentElement.style.left){var o=void 0;o=t.element.parentElement&&t.element.parentElement.classList.contains("e-split-btn-wrapper")?t.element.parentElement.offsetWidth:t.element.offsetWidth;var r=s.parentElement.offsetWidth-o,a=parseFloat(s.parentElement.style.left)-r;a<0&&(a=0),s.parentElement.style.left=a+"px"}var p={element:s,items:t.items};t.trigger("open",p)}})},t.prototype.closePopup=function(e,t){var s=this;void 0===e&&(e=null);var o=this.getULElement(),r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",r,function(e){if(e.cancel)o&&o.focus();else{var r=s.getPopUpElement();r&&n.EventHandler.remove(r,"keydown",s.keyBoardHandler),s.popupUnWireEvents();var a=s.getULElement(),p=void 0;a&&(p=a.querySelector(".e-selected")),p&&p.classList.remove("e-selected"),s.dropDown.hide(),i.i(n.removeClass)(s.activeElem,"e-active"),s.element.setAttribute("aria-expanded","false"),s.element.removeAttribute("aria-owns"),t&&t.focus();var l={element:a,items:s.items};s.trigger("close",l),!s.target&&a&&i.i(n.detach)(a),s.target&&!s.isColorPicker()||s.createPopupOnClick&&s.destroyPopup()}})},t.prototype.unWireEvents=function(){this.createPopupOnClick||n.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),n.EventHandler.remove(this.element,"click",this.clickHandler),n.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(n.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),n.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler))},t.prototype.onPropertyChanged=function(e,t){var s=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(i.i(r.a)(e,s));var o;this.isPopupCreated&&(o=this.getPopUpElement(),this.dropDown.setProperties(i.i(r.a)(e,["enableRtl"])));for(var a=0,p=Object.keys(e);a<p.length;a++){switch(p[a]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(l.VERTICAL)>-1||t.cssClass.indexOf(l.VERTICAL)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var c=this.element.querySelector("span.e-caret");e.cssClass.indexOf(l.VERTICAL)>-1?i.i(n.classList)(c,["e-icon-bottom"],["e-icon-right"]):i.i(n.classList)(c,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(t.cssClass&&i.i(n.removeClass)([o],t.cssClass.split(" ")),e.cssClass&&i.i(n.addClass)([o],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}}},t.prototype.focusIn=function(){this.element.focus()},p([i.i(n.Property)("")],t.prototype,"content",void 0),p([i.i(n.Property)("")],t.prototype,"cssClass",void 0),p([i.i(n.Property)(!1)],t.prototype,"disabled",void 0),p([i.i(n.Property)("")],t.prototype,"iconCss",void 0),p([i.i(n.Property)("Left")],t.prototype,"iconPosition",void 0),p([i.i(n.Property)(!1)],t.prototype,"enableHtmlSanitizer",void 0),p([i.i(n.Collection)([],r.b)],t.prototype,"items",void 0),p([i.i(n.Property)(!1)],t.prototype,"createPopupOnClick",void 0),p([i.i(n.Property)("")],t.prototype,"target",void 0),p([i.i(n.Property)("")],t.prototype,"closeActionEvents",void 0),p([i.i(n.Event)()],t.prototype,"beforeItemRender",void 0),p([i.i(n.Event)()],t.prototype,"beforeOpen",void 0),p([i.i(n.Event)()],t.prototype,"beforeClose",void 0),p([i.i(n.Event)()],t.prototype,"close",void 0),p([i.i(n.Event)()],t.prototype,"open",void 0),p([i.i(n.Event)()],t.prototype,"select",void 0),p([i.i(n.Event)()],t.prototype,"created",void 0),t=p([n.NotifyPropertyChanges],t)}(n.Component)},function(e,t){e.exports=i},function(e,t,i){"use strict";var n=i(10);i.d(t,"a",function(){return n.a})},function(e,t,i){"use strict";var n=i(1);i.d(t,"a",function(){return n.a}),i.d(t,"b",function(){return n.d}),i.d(t,"c",function(){return n.c}),i.d(t,"d",function(){return n.b})},function(e,t,i){"use strict";var n=i(3);i.d(t,"a",function(){return n.a})},function(e,t,i){"use strict";var n=i(12);i.d(t,"a",function(){return n.a}),i.d(t,"b",function(){return n.b}),i.d(t,"c",function(){return n.c})},function(e,t,i){"use strict";var n=i(13);i.d(t,"a",function(){return n.a}),i.d(t,"b",function(){return n.b})},function(e,t,i){"use strict";function n(e,t,n){void 0===t&&(t={});var r,a,p,l;i.i(s.isNullOrUndefined)(n)&&(n=s.createElement);var c=document.querySelector(e);i.i(s.addClass)([c],["e-btn-group","e-css"]),c.setAttribute("role","group");var d=c.children;t.buttons=t.buttons||[];for(var h=0,u=0;u<d.length;h++,u++)r=d[u],null!==(l=t.buttons[h])&&("BUTTON"===r.tagName?a=r:(a=n("label"),p=d[u+1],p?c.insertBefore(a,p):c.appendChild(a),r.id&&a.setAttribute("for",r.id),l&&l.disabled&&(r.disabled=!0),u++),t.cssClass&&l&&!l.cssClass&&(l.cssClass=t.cssClass),new o.Button(l||{},a));return c}t.a=n;var s=i(0),o=(i.n(s),i(2));i.n(o)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(6);i.d(t,"getModel",function(){return n.a}),i.d(t,"upDownKeyHandler",function(){return n.b}),i.d(t,"setBlankIconStyle",function(){return n.c}),i.d(t,"Item",function(){return n.d});var s=i(7);i.d(t,"DropDownButton",function(){return s.a});var o=i(9);i.d(t,"SplitButton",function(){return o.a}),i.d(t,"Deferred",function(){return o.b});var r=i(5);i.d(t,"createButtonGroup",function(){return r.a});var a=i(8);i.d(t,"SpinSettings",function(){return a.a}),i.d(t,"AnimationSettings",function(){return a.b}),i.d(t,"ProgressButton",function(){return a.c})},function(e,t,i){"use strict";i.d(t,"a",function(){return l}),i.d(t,"b",function(){return c}),i.d(t,"c",function(){return d});var n=i(2),s=(i.n(n),i(0)),o=(i.n(s),i(4)),r=(i.n(o),this&&this.__extends||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])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),a=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},p="e-btn-content",l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(s.Property)(null)],t.prototype,"template",void 0),a([i.i(s.Property)(16)],t.prototype,"width",void 0),a([i.i(s.Property)("Left")],t.prototype,"position",void 0),t}(s.ChildProperty),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(s.Property)(400)],t.prototype,"duration",void 0),a([i.i(s.Property)("None")],t.prototype,"effect",void 0),a([i.i(s.Property)("ease")],t.prototype,"easing",void 0),t}(s.ChildProperty),d=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.step=1,n}return r(t,e),t.prototype.preRender=function(){e.prototype.preRender.call(this)},t.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},t.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},t.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},t.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},t.prototype.getModuleName=function(){return"progress-btn"},t.prototype.destroy=function(){var t=this,n=["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(n=n.concat(this.cssClass.split(" "))),i.i(s.removeClass)([this.element],n),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){t.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},t.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},t.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),i.i(o.createSpinner)({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},t.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},t.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},t.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(p)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},t.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},t.prototype.setContent=function(){var e;e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=s.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:p,innerHTML:e}))},t.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:p,innerHTML:e});if(this.iconCss){var i=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(i.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var n=t.childNodes[0];!n||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(i):t.insertBefore(i,n)}this.element.appendChild(t)},t.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},t.prototype.startProgress=function(e,t){var n=this.element.classList,s=n.contains("e-vertical");n.add("e-progress-active"),n.contains("e-hide-spinner")||i.i(o.showSpinner)(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,s),this.startContAnimate()},t.prototype.startAnimate=function(e,t,i,n,s,o,r,a){var p=this;try{var l=e-i,c=this.duration*o/100,d=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-d,i=e-d,n+=(l-d)/this.duration*100,s=(t-r)%c==0||100===n?n:s;var h={percent:s,currentDuration:t,step:o};this.eIsVertical=a,0===n?this.trigger("begin",h,function(e){p.successCallback(e,n,s,t,r,d,i)}):100===n||t===this.duration?this.trigger("end",h,function(e){p.successCallback(e,n,s,t,r,d,i)}):this.trigger("progress",h,function(e){p.successCallback(e,n,s,t,r,d,i)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},t.prototype.successCallback=function(e,t,i,n,s,o,r){var a=this,p=t,l=i,c=o,d=n,h=s,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(d-h)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,h=d),this.isPaused||(d<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),d,u,p,l,e.step,h,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},t.prototype.startContAnimate=function(){var e=this,t=this.element.getElementsByClassName(p)[0];"None"!==this.animationSettings.effect?new s.Animation({}).animate(t,{duration:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){t.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},t.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add("e-progress-active");for(var i=this.percent;i<100;i++)i+=10,i>100&&(i=100),this.enableProgress&&(this.getProgress().style[t?"height":"width"]=this.percent<100?i+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var n={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",n),this.progressTime=this.percent=0},t.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(p)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},t.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(p)[0];if(this.element.classList.contains("e-hide-spinner")||i.i(o.hideSpinner)(this.element.querySelector(".e-spinner")),this.element.classList.remove("e-progress-active"),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},t.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(p)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},t.prototype.setAria=function(){i.i(s.attributes)(this.element,{"aria-label":this.element.textContent+" progress","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0"})},t.prototype.wireEvents=function(){s.EventHandler.add(this.element,"click",this.clickHandler,this)},t.prototype.unWireEvents=function(){s.EventHandler.remove(this.element,"click",this.clickHandler)},t.prototype.onPropertyChanged=function(t,n){var r=this.element,a=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(a=!0),e.prototype.onPropertyChanged.call(this,t,n);for(var p=0,l=Object.keys(t);p<l.length;p++){switch(l[p]){case"content":this.setContent(),this.createSpinner(),a&&(i.i(o.showSpinner)(this.element.querySelector(".e-spinner")),a=!1),this.enableProgress&&this.createProgress(),r.setAttribute("aria-label",r.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":t.enableProgress?this.createProgress():i.i(s.remove)(this.getProgress());break;case"spinSettings":t.spinSettings.position&&(r.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(t.spinSettings.template||t.spinSettings.width)&&(r.removeChild(this.getSpinner()),this.createSpinner())}}},t.prototype.focusIn=function(){this.element.focus()},a([i.i(s.Property)(!1)],t.prototype,"enableProgress",void 0),a([i.i(s.Property)(2e3)],t.prototype,"duration",void 0),a([i.i(s.Property)("Left")],t.prototype,"iconPosition",void 0),a([i.i(s.Property)("")],t.prototype,"iconCss",void 0),a([i.i(s.Property)(!1)],t.prototype,"disabled",void 0),a([i.i(s.Property)(!1)],t.prototype,"isPrimary",void 0),a([i.i(s.Property)("")],t.prototype,"cssClass",void 0),a([i.i(s.Property)("")],t.prototype,"content",void 0),a([i.i(s.Property)(!1)],t.prototype,"isToggle",void 0),a([i.i(s.Property)(!1)],t.prototype,"enableHtmlSanitizer",void 0),a([i.i(s.Complex)({},l)],t.prototype,"spinSettings",void 0),a([i.i(s.Complex)({},c)],t.prototype,"animationSettings",void 0),a([i.i(s.Event)()],t.prototype,"created",void 0),a([i.i(s.Event)()],t.prototype,"begin",void 0),a([i.i(s.Event)()],t.prototype,"progress",void 0),a([i.i(s.Event)()],t.prototype,"end",void 0),a([i.i(s.Event)()],t.prototype,"fail",void 0),t=a([s.NotifyPropertyChanges],t)}(n.Button)},function(e,t,i){"use strict";i.d(t,"a",function(){return d}),i.d(t,"b",function(){return h});var n=i(0),s=(i.n(n),i(2)),o=(i.n(s),i(1)),r=i(3),a=this&&this.__extends||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])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),p=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},l="e-rtl",c="EJS-SPLITBUTTON",d=function(e){function t(t,i){return e.call(this,t,i)||this}return a(t,e),t.prototype.preRender=function(){var e=this.element;if(e.tagName===c){for(var t=i.i(n.getValue)("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),o=this.createElement(c,{className:"e-"+this.getModuleName()+"-wrapper"}),r=0,a=e.attributes.length;r<a;r++)s.setAttribute(e.attributes[r].nodeName,e.attributes[r].nodeValue);e.parentNode.insertBefore(o,e),i.i(n.detach)(e),e=s,o.appendChild(e),i.i(n.setValue)("ej2_instances",t,e),this.wrapper=o,this.element=e}this.element.id||(this.element.id=i.i(n.getUniqueID)("e-"+this.getModuleName()))},t.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},t.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},t.prototype.addItems=function(t,i){e.prototype.addItems.call(this,t,i),this.secondaryBtnObj.items=this.items},t.prototype.removeItems=function(t,i){e.prototype.removeItems.call(this,t,i),this.secondaryBtnObj.items=this.items},t.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add(l),this.cssClass&&i.i(n.addClass)([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},t.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new s.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},t.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var i={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick};i.beforeItemRender=function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},i.open=function(t){e.trigger("open",t)},i.close=function(t){e.trigger("close",t)},i.select=function(t){e.trigger("select",t)},i.beforeOpen=function(t){e.createPopupOnClick&&0==e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var i=new h;return e.trigger("beforeOpen",t,function(e){i.resolve(e)}),i},i.beforeClose=function(t){var i=new h;return e.trigger("beforeClose",t,function(e){i.resolve(e)}),i},this.secondaryBtnObj=new r.a(i),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.isPopupCreated=this.secondaryBtnObj.isPopupCreated,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},t.prototype.setAria=function(){i.i(n.attributes)(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent+" splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},t.prototype.getModuleName=function(){return"split-btn"},t.prototype.toggle=function(){this.secondaryBtnObj.toggle()},t.prototype.destroy=function(){var t=this,s=[l];if(this.cssClass&&(s=s.concat(this.cssClass.split(" "))),this.element){var o=document.getElementById(this.element.id);o&&o.parentElement===this.wrapper&&(this.wrapper.tagName===c?(this.wrapper.innerHTML="",i.i(n.removeClass)([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),i.i(n.removeClass)([this.wrapper],this.cssClass.split(" "))):(i.i(n.removeClass)([this.element],s),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){t.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),i.i(n.remove)(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element.getAttribute("class")||this.element.removeAttribute("class")},t.prototype.wireEvents=function(){n.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new n.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},t.prototype.unWireEvents=function(){n.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),i.i(n.getInstance)(this.element,n.KeyboardEvents).destroy()},t.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},t.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement()&&!this.getPopUpElement().classList.contains("e-popup-close")?(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active")):this.secondaryBtnObj.element.classList.remove("e-active")}},t.prototype.onPropertyChanged=function(e,t){var s=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(i.i(o.a)(e,s)),s=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(i.i(o.a)(e,s));for(var r=0,a=Object.keys(e);r<a.length;r++){switch(a[r]){case"cssClass":t.cssClass&&i.i(n.removeClass)([this.wrapper],t.cssClass.split(" ")),i.i(n.addClass)([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?i.i(n.addClass)([this.wrapper],l):i.i(n.removeClass)([this.wrapper],l);break;case"disabled":e.disabled?i.i(n.addClass)([this.wrapper],"e-splitbtn-disabled"):i.i(n.removeClass)([this.wrapper],"e-splitbtn-disabled")}}},t.prototype.focusIn=function(){this.element.focus()},p([i.i(n.Property)("")],t.prototype,"content",void 0),p([i.i(n.Property)("")],t.prototype,"cssClass",void 0),p([i.i(n.Property)(!1)],t.prototype,"disabled",void 0),p([i.i(n.Property)("")],t.prototype,"iconCss",void 0),p([i.i(n.Property)("Left")],t.prototype,"iconPosition",void 0),p([i.i(n.Property)(!1)],t.prototype,"createPopupOnClick",void 0),p([i.i(n.Collection)([],o.b)],t.prototype,"items",void 0),p([i.i(n.Property)("")],t.prototype,"target",void 0),p([i.i(n.Event)()],t.prototype,"beforeItemRender",void 0),p([i.i(n.Event)()],t.prototype,"beforeOpen",void 0),p([i.i(n.Event)()],t.prototype,"beforeClose",void 0),p([i.i(n.Event)()],t.prototype,"click",void 0),p([i.i(n.Event)()],t.prototype,"close",void 0),p([i.i(n.Event)()],t.prototype,"open",void 0),p([i.i(n.Event)()],t.prototype,"select",void 0),p([i.i(n.Event)()],t.prototype,"created",void 0),t=p([n.NotifyPropertyChanges],t)}(r.a),h=function(){function e(){var e=this;this.promise=new Promise(function(t,i){e.resolve=t,e.reject=i}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)}return e}()}])}); |
/*! | ||
* filename: ej2-splitbuttons.umd.min.js | ||
* version : 22.1.34 | ||
* version : 22.1.37 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons","@syncfusion/ej2-popups"],t):t(e.ej={},e.ej2Base,e.ej2Buttons,e.ej2Popups)}(this,function(e,t,s,i){"use strict";function n(e,s){for(var i=t.extend({},e),n=0,o=Object.keys(i);n<o.length;n++){var r=o[n];s.indexOf(r)<0&&t.deleteObject(i,r)}return i}function o(e,s){var i=40===s?0:e.childElementCount-1,n=i,o=e.querySelector(".e-selected");o&&o.classList.remove("e-selected");for(var a=0,p=e.children.length;a<p;a++)e.children[a].classList.contains("e-focused")&&(n=a,e.children[a].classList.remove("e-focused"),40===s?n++:n--,n===(40===s?e.childElementCount:-1)&&(n=i));-1!==(n=r(e,e.children[n],n,s))&&(t.addClass([e.children[n]],"e-focused"),e.children[n].focus())}function r(e,t,s,i,n){if(void 0===n&&(n=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(s===(40===i?e.childElementCount-1:0)?s=40===i?0:e.childElementCount-1:40===i?s++:s--),(t=e.children[s]).classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++n===e.childElementCount)return s=-1;s=r(e,t,s,i,n)}return s}function a(e,s){var i=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(s){[].slice.call(e.getElementsByClassName("e-item")).forEach(function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")})}if(i.length){var n=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!t.isNullOrUndefined(n)){n.classList.contains("e-url")&&(n=n.querySelector(".e-menu-url"));var o,r=n.querySelector(".e-menu-icon"),a=e.classList.contains("e-rtl");o=a?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var p=parseInt(getComputedStyle(r).fontSize,10)+parseInt(getComputedStyle(r)[o.margin],10)+parseInt(getComputedStyle(n).paddingLeft,10)+"px";i.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[o.padding]=p:e.style[o.padding]=p})}}}var p=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),l=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},c=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return p(s,e),l([t.Property("")],s.prototype,"iconCss",void 0),l([t.Property("")],s.prototype,"id",void 0),l([t.Property(!1)],s.prototype,"separator",void 0),l([t.Property("")],s.prototype,"text",void 0),l([t.Property("")],s.prototype,"url",void 0),l([t.Property(!1)],s.prototype,"disabled",void 0),s}(t.ChildProperty),h=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),d=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},u="e-menu-icon",m="e-item",y="e-dropdown-popup",f="e-separator",v="e-vertical",g=function(e){function r(t,s){var i=e.call(this,t,s)||this;return i.isPopupCreated=!0,i}return h(r,e),r.prototype.preRender=function(){},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.closePopup()},r.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},r.prototype.addItems=function(e,t){for(var s,i=this.items.length,n=0,o=this.items.length;n<o;n++)if(t===this.items[n].text){i=n;break}for(var r=e.length-1;r>=0;r--)s=new c(this,"items",e[r],!0),this.items.splice(i,0,s);this.canOpen()||this.createItems()},r.prototype.removeItems=function(e,t){for(var s=!1,i=0,n=e.length;i<n;i++)for(var o=0,r=this.items.length;o<r;o++)if(e[i]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),s=!0;break}s&&this.getULElement()&&this.createItems()},r.prototype.createPopup=function(){var e,s=this.createElement("div",{className:y,id:this.element.id+"-popup"});document.body.appendChild(s),this.dropDown=new i.Popup(s,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e["aria-label"]=this.element.textContent?this.element.textContent:"dropdownbutton",e)),this.cssClass&&t.addClass([s],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},r.prototype.getTargetElement=function(){return"string"==typeof this.target?t.select(this.target):this.target},r.prototype.createItems=function(e){var s,i,n,o,r=this.items,p=this.hasIcon(this.items,"iconCss"),l=this.getULElement();l?l.innerHTML="":l=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var c=0;c<r.length;c++){var h=(i=r[c]).text;n=this.createElement("li",{innerHTML:i.url?"":h,className:i.separator?m+" "+f:m,attrs:i.separator?{role:"separator",tabindex:"-1"}:{role:"menuitem",tabindex:"-1","aria-label":h},id:i.id?i.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?n.textContent=i.url?"":h:n.innerHTML=i.url?"":h,i.url&&(n.appendChild(this.createAnchor(i)),n.classList.add("e-url")),i.iconCss?(s=this.createElement("span",{className:u+" "+i.iconCss}),i.url?n.childNodes[0].appendChild(s):n.insertBefore(s,n.childNodes[0])):p&&!i.separator&&n.classList.add("e-blank-icon"),i.disabled&&n.classList.add("e-disabled"),o={item:i,element:n},this.trigger("beforeItemRender",o),l.appendChild(n)}e&&this.getPopUpElement().appendChild(l),p&&a(this.getPopUpElement())},r.prototype.hasIcon=function(e,t){for(var s=0,i=e.length;s<i;s++)if(e[s][""+t])return!0;return!1},r.prototype.createAnchor=function(e){var s=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:s,attrs:{href:e.url}})},r.prototype.initialize=function(){this.button=new s.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.target&&!this.isColorPicker()||!this.createPopupOnClick?this.createPopup():this.isPopupCreated=!1},r.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},r.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(v)>-1?"bottom":"right")+" e-caret"}))},r.prototype.setActiveElem=function(e){this.activeElem=e},r.prototype.getModuleName=function(){return"dropdown-btn"},r.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},r.prototype.destroy=function(){var s=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var i;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(i=this.cssClass.split(" ")),this.button.destroy(),i&&t.removeClass([this.element],i),t.removeClass(this.activeElem,["e-active"]);(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents()}},r.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(t.removeClass([e],["e-popup-open","e-popup-close"]),t.detach(e))}t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1},r.prototype.getPopUpElement=function(){var e=null;return this.dropDown&&(e=this.dropDown.element),e},r.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},r.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this)},r.prototype.popupWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&t.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=t.rippleEffect(e,{selector:"."+m})},r.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&t.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler)),t.isRippleEnabled&&this.rippleFn&&this.rippleFn()},r.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},r.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),o(this.getULElement(),e.keyCode))},r.prototype.keyEventHandler=function(e){(!this.target||13!==e.keyCode&&9!==e.keyCode)&&(13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?this.activeElem[0].focus():e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},r.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},r.prototype.mousedownHandler=function(e){var s=e.target;!this.dropDown||this.canOpen()||t.closest(s,'[id="'+this.getPopUpElement().id+'"]')||t.closest(s,'[id="'+this.element.id+'"]')||this.closePopup(e)},r.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget;if(t&&t.className.indexOf("e-item")>-1){var s=this.getLI(t);if(s){var i=Array.prototype.indexOf.call(this.getULElement().children,s),n=this.items[i];if(n){var o={element:s,item:n};this.trigger("select",o)}}}this.closePopup(e)}},r.prototype.clickHandler=function(e){var s=e.target;if(t.closest(s,'[id="'+this.element.id+'"]'))!this.createPopupOnClick||this.target&&!this.isColorPicker()?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e));else if(t.closest(s,'[id="'+this.getPopUpElement().id+'"]')){var i=void 0,n=void 0,o=void 0,r=this.getLI(s);r&&(n=Array.prototype.indexOf.call(this.getULElement().children,r),(o=this.items[n])&&(i={element:r,item:o},this.trigger("select",i)),this.closePopup(e,this.activeElem[0]))}},r.prototype.openPopUp=function(e){var s=this;void 0===e&&(e=null);var i=this.getPopUpElement();if(this.target)if(this.activeElem.length>1){var n=t.getComponent(this.activeElem[0],"split-btn");n.isReact&&i.childNodes.length<1&&(n.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&i.childNodes.length<1&&(this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var o=this.getULElement();this.popupWireEvents();var r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",r,function(e){if(!e.cancel){var i=s.getULElement();if(s.dropDown.show(null,s.element),t.addClass([s.element],"e-active"),s.element.setAttribute("aria-expanded","true"),s.element.setAttribute("aria-owns",s.getPopUpElement().id),i&&i.focus(),s.enableRtl&&"0px"!==i.parentElement.style.left){var n=void 0;n=s.element.parentElement&&s.element.parentElement.classList.contains("e-split-btn-wrapper")?s.element.parentElement.offsetWidth:s.element.offsetWidth;var o=i.parentElement.offsetWidth-n,r=parseFloat(i.parentElement.style.left)-o;r<0&&(r=0),i.parentElement.style.left=r+"px"}var a={element:i,items:s.items};s.trigger("open",a)}})},r.prototype.closePopup=function(e,s){var i=this;void 0===e&&(e=null);var n=this.getULElement(),o={element:n,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",o,function(e){if(e.cancel)n&&n.focus();else{var o=i.getPopUpElement();o&&t.EventHandler.remove(o,"keydown",i.keyBoardHandler),i.popupUnWireEvents();var r=i.getULElement(),a=void 0;r&&(a=r.querySelector(".e-selected")),a&&a.classList.remove("e-selected"),i.dropDown.hide(),t.removeClass(i.activeElem,"e-active"),i.element.setAttribute("aria-expanded","false"),i.element.removeAttribute("aria-owns"),s&&s.focus();var p={element:r,items:i.items};i.trigger("close",p),!i.target&&r&&t.detach(r),i.target&&!i.isColorPicker()||i.createPopupOnClick&&i.destroyPopup(),i.target&&(i.isPopupCreated=!i.createPopupOnClick)}})},r.prototype.unWireEvents=function(){this.createPopupOnClick||t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler))},r.prototype.onPropertyChanged=function(e,s){this.button.setProperties(n(e,["content","cssClass","iconCss","iconPosition","disabled","enableRtl"]));var i;this.isPopupCreated&&(i=this.getPopUpElement(),this.dropDown.setProperties(n(e,["enableRtl"])));for(var o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(v)>-1||s.cssClass.indexOf(v)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var a=this.element.querySelector("span.e-caret");e.cssClass.indexOf(v)>-1?t.classList(a,["e-icon-bottom"],["e-icon-right"]):t.classList(a,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}}},r.prototype.focusIn=function(){this.element.focus()},d([t.Property("")],r.prototype,"content",void 0),d([t.Property("")],r.prototype,"cssClass",void 0),d([t.Property(!1)],r.prototype,"disabled",void 0),d([t.Property("")],r.prototype,"iconCss",void 0),d([t.Property("Left")],r.prototype,"iconPosition",void 0),d([t.Property(!1)],r.prototype,"enableHtmlSanitizer",void 0),d([t.Collection([],c)],r.prototype,"items",void 0),d([t.Property(!1)],r.prototype,"createPopupOnClick",void 0),d([t.Property("")],r.prototype,"target",void 0),d([t.Property("")],r.prototype,"closeActionEvents",void 0),d([t.Event()],r.prototype,"beforeItemRender",void 0),d([t.Event()],r.prototype,"beforeOpen",void 0),d([t.Event()],r.prototype,"beforeClose",void 0),d([t.Event()],r.prototype,"close",void 0),d([t.Event()],r.prototype,"open",void 0),d([t.Event()],r.prototype,"select",void 0),d([t.Event()],r.prototype,"created",void 0),r=d([t.NotifyPropertyChanges],r)}(t.Component),b=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),C=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},P="EJS-SPLITBUTTON",E=function(e){function i(t,s){return e.call(this,t,s)||this}return b(i,e),i.prototype.preRender=function(){var e=this.element;if(e.tagName===P){for(var s=t.getValue("ej2_instances",e),i=this.createElement("button",{attrs:{type:"button"}}),n=this.createElement(P,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)i.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(n,e),t.detach(e),e=i,n.appendChild(e),t.setValue("ej2_instances",s,e),this.wrapper=n,this.element=e}this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},i.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},i.prototype.addItems=function(t,s){e.prototype.addItems.call(this,t,s),this.secondaryBtnObj.items=this.items},i.prototype.removeItems=function(t,s){e.prototype.removeItems.call(this,t,s),this.secondaryBtnObj.items=this.items},i.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add("e-rtl"),this.cssClass&&t.addClass([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},i.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new s.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},i.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var s={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick};s.beforeItemRender=function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},s.open=function(t){e.trigger("open",t)},s.close=function(t){e.trigger("close",t)},s.select=function(t){e.trigger("select",t)},s.beforeOpen=function(t){e.createPopupOnClick&&0==e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var s=new w;return e.trigger("beforeOpen",t,function(e){s.resolve(e)}),s},s.beforeClose=function(t){var s=new w;return e.trigger("beforeClose",t,function(e){s.resolve(e)}),s},this.secondaryBtnObj=new g(s),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},i.prototype.setAria=function(){t.attributes(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent+" splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},i.prototype.getModuleName=function(){return"split-btn"},i.prototype.toggle=function(){this.secondaryBtnObj.toggle()},i.prototype.destroy=function(){var s=this,i=["e-rtl"];if(this.cssClass&&(i=i.concat(this.cssClass.split(" "))),this.element){var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===P?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],i),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){s.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element.getAttribute("class")||this.element.removeAttribute("class")},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new t.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),t.getInstance(this.element,t.KeyboardEvents).destroy()},i.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},i.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement().classList.contains("e-popup-close")?this.secondaryBtnObj.element.classList.remove("e-active"):(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active"))}},i.prototype.onPropertyChanged=function(e,s){var i=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(n(e,i)),i=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(n(e,i));for(var o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"cssClass":s.cssClass&&t.removeClass([this.wrapper],s.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],"e-rtl"):t.removeClass([this.wrapper],"e-rtl");break;case"disabled":e.disabled?t.addClass([this.wrapper],"e-splitbtn-disabled"):t.removeClass([this.wrapper],"e-splitbtn-disabled")}}},i.prototype.focusIn=function(){this.element.focus()},C([t.Property("")],i.prototype,"content",void 0),C([t.Property("")],i.prototype,"cssClass",void 0),C([t.Property(!1)],i.prototype,"disabled",void 0),C([t.Property("")],i.prototype,"iconCss",void 0),C([t.Property("Left")],i.prototype,"iconPosition",void 0),C([t.Property(!1)],i.prototype,"createPopupOnClick",void 0),C([t.Collection([],c)],i.prototype,"items",void 0),C([t.Property("")],i.prototype,"target",void 0),C([t.Event()],i.prototype,"beforeItemRender",void 0),C([t.Event()],i.prototype,"beforeOpen",void 0),C([t.Event()],i.prototype,"beforeClose",void 0),C([t.Event()],i.prototype,"click",void 0),C([t.Event()],i.prototype,"close",void 0),C([t.Event()],i.prototype,"open",void 0),C([t.Event()],i.prototype,"select",void 0),C([t.Event()],i.prototype,"created",void 0),i=C([t.NotifyPropertyChanges],i)}(g),w=function(){return function(){var e=this;this.promise=new Promise(function(t,s){e.resolve=t,e.reject=s}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)}}(),k=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),O=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},L="e-hide-spinner",S="e-progress-active",H="e-btn-content",B=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return k(s,e),O([t.Property(null)],s.prototype,"template",void 0),O([t.Property(16)],s.prototype,"width",void 0),O([t.Property("Left")],s.prototype,"position",void 0),s}(t.ChildProperty),j=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return k(s,e),O([t.Property(400)],s.prototype,"duration",void 0),O([t.Property("None")],s.prototype,"effect",void 0),O([t.Property("ease")],s.prototype,"easing",void 0),s}(t.ChildProperty),N=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.step=1,i}return k(s,e),s.prototype.preRender=function(){e.prototype.preRender.call(this)},s.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},s.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},s.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},s.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},s.prototype.getModuleName=function(){return"progress-btn"},s.prototype.destroy=function(){var s=this,i=[L,S,"e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(i=i.concat(this.cssClass.split(" "))),t.removeClass([this.element],i);(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},s.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},s.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),i.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},s.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},s.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},s.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(H)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},s.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},s.prototype.setContent=function(){var e;e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:H,innerHTML:e}))},s.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:H,innerHTML:e});if(this.iconCss){var s=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(s.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var i=t.childNodes[0];!i||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(s):t.insertBefore(s,i)}this.element.appendChild(t)},s.prototype.clickHandler=function(){this.element.classList.contains(S)||this.startProgress()},s.prototype.startProgress=function(e,t){var s=this.element.classList,n=s.contains("e-vertical");s.add(S),s.contains(L)||i.showSpinner(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,n),this.startContAnimate()},s.prototype.startAnimate=function(e,t,s,i,n,o,r,a){var p=this;try{var l=e-s,c=this.duration*o/100,h=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-h,s=e-h,i+=(l-h)/this.duration*100;var d={percent:n=(t-r)%c==0||100===i?i:n,currentDuration:t,step:o};this.eIsVertical=a,0===i?this.trigger("begin",d,function(e){p.successCallback(e,i,n,t,r,h,s)}):100===i||t===this.duration?this.trigger("end",d,function(e){p.successCallback(e,i,n,t,r,h,s)}):this.trigger("progress",d,function(e){p.successCallback(e,i,n,t,r,h,s)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},s.prototype.successCallback=function(e,t,s,i,n,o,r){var a=this,p=t,l=s,c=o,h=i,d=n,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(h-d)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,d=h),this.isPaused||(h<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),h,u,p,l,e.step,d,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},s.prototype.startContAnimate=function(){var e=this,s=this.element.getElementsByClassName(H)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(s,{duration:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){s.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},s.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add(S);for(var s=this.percent;s<100;s++)(s+=10)>100&&(s=100),this.enableProgress&&(this.getProgress().style[t?"height":"width"]=this.percent<100?s+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var i={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",i),this.progressTime=this.percent=0},s.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(H)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},s.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(H)[0];if(this.element.classList.contains(L)||i.hideSpinner(this.element.querySelector(".e-spinner")),this.element.classList.remove(S),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},s.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(H)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},s.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0"})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},s.prototype.onPropertyChanged=function(s,n){var o=this.element,r=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(r=!0),e.prototype.onPropertyChanged.call(this,s,n);for(var a=0,p=Object.keys(s);a<p.length;a++){switch(p[a]){case"content":this.setContent(),this.createSpinner(),r&&(i.showSpinner(this.element.querySelector(".e-spinner")),r=!1),this.enableProgress&&this.createProgress(),o.setAttribute("aria-label",o.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":s.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":s.spinSettings.position&&(o.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(s.spinSettings.template||s.spinSettings.width)&&(o.removeChild(this.getSpinner()),this.createSpinner())}}},s.prototype.focusIn=function(){this.element.focus()},O([t.Property(!1)],s.prototype,"enableProgress",void 0),O([t.Property(2e3)],s.prototype,"duration",void 0),O([t.Property("Left")],s.prototype,"iconPosition",void 0),O([t.Property("")],s.prototype,"iconCss",void 0),O([t.Property(!1)],s.prototype,"disabled",void 0),O([t.Property(!1)],s.prototype,"isPrimary",void 0),O([t.Property("")],s.prototype,"cssClass",void 0),O([t.Property("")],s.prototype,"content",void 0),O([t.Property(!1)],s.prototype,"isToggle",void 0),O([t.Property(!1)],s.prototype,"enableHtmlSanitizer",void 0),O([t.Complex({},B)],s.prototype,"spinSettings",void 0),O([t.Complex({},j)],s.prototype,"animationSettings",void 0),O([t.Event()],s.prototype,"created",void 0),O([t.Event()],s.prototype,"begin",void 0),O([t.Event()],s.prototype,"progress",void 0),O([t.Event()],s.prototype,"end",void 0),O([t.Event()],s.prototype,"fail",void 0),s=O([t.NotifyPropertyChanges],s)}(s.Button);e.getModel=n,e.upDownKeyHandler=o,e.setBlankIconStyle=a,e.Item=c,e.DropDownButton=g,e.SplitButton=E,e.Deferred=w,e.createButtonGroup=function(e,i,n){void 0===i&&(i={});var o,r,a,p;t.isNullOrUndefined(n)&&(n=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;i.buttons=i.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=i.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=n("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),i.cssClass&&p&&!p.cssClass&&(p.cssClass=i.cssClass),new s.Button(p||{},r));return l},e.SpinSettings=B,e.AnimationSettings=j,e.ProgressButton=N,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons","@syncfusion/ej2-popups"],t):t(e.ej={},e.ej2Base,e.ej2Buttons,e.ej2Popups)}(this,function(e,t,s,i){"use strict";function n(e,s){for(var i=t.extend({},e),n=0,o=Object.keys(i);n<o.length;n++){var r=o[n];s.indexOf(r)<0&&t.deleteObject(i,r)}return i}function o(e,s){var i=40===s?0:e.childElementCount-1,n=i,o=e.querySelector(".e-selected");o&&o.classList.remove("e-selected");for(var a=0,p=e.children.length;a<p;a++)e.children[a].classList.contains("e-focused")&&(n=a,e.children[a].classList.remove("e-focused"),40===s?n++:n--,n===(40===s?e.childElementCount:-1)&&(n=i));-1!==(n=r(e,e.children[n],n,s))&&(t.addClass([e.children[n]],"e-focused"),e.children[n].focus())}function r(e,t,s,i,n){if(void 0===n&&(n=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(s===(40===i?e.childElementCount-1:0)?s=40===i?0:e.childElementCount-1:40===i?s++:s--),(t=e.children[s]).classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++n===e.childElementCount)return s=-1;s=r(e,t,s,i,n)}return s}function a(e,s){var i=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(s){[].slice.call(e.getElementsByClassName("e-item")).forEach(function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")})}if(i.length){var n=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!t.isNullOrUndefined(n)){n.classList.contains("e-url")&&(n=n.querySelector(".e-menu-url"));var o,r=n.querySelector(".e-menu-icon"),a=e.classList.contains("e-rtl");o=a?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var p=parseInt(getComputedStyle(r).fontSize,10)+parseInt(getComputedStyle(r)[o.margin],10)+parseInt(getComputedStyle(n).paddingLeft,10)+"px";i.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[o.padding]=p:e.style[o.padding]=p})}}}var p=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),l=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},c=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return p(s,e),l([t.Property("")],s.prototype,"iconCss",void 0),l([t.Property("")],s.prototype,"id",void 0),l([t.Property(!1)],s.prototype,"separator",void 0),l([t.Property("")],s.prototype,"text",void 0),l([t.Property("")],s.prototype,"url",void 0),l([t.Property(!1)],s.prototype,"disabled",void 0),s}(t.ChildProperty),h=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),d=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},u="e-menu-icon",m="e-item",y="e-dropdown-popup",f="e-separator",v="e-vertical",g=function(e){function r(t,s){var i=e.call(this,t,s)||this;return i.isPopupCreated=!0,i}return h(r,e),r.prototype.preRender=function(){},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.createPopupOnClick&&!this.isPopupCreated?(this.createPopup(),this.openPopUp()):this.closePopup()},r.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},r.prototype.addItems=function(e,t){for(var s,i=this.items.length,n=0,o=this.items.length;n<o;n++)if(t===this.items[n].text){i=n;break}for(var r=e.length-1;r>=0;r--)s=new c(this,"items",e[r],!0),this.items.splice(i,0,s);this.canOpen()||this.createItems()},r.prototype.removeItems=function(e,t){for(var s=!1,i=0,n=e.length;i<n;i++)for(var o=0,r=this.items.length;o<r;o++)if(e[i]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),s=!0;break}s&&this.getULElement()&&this.createItems()},r.prototype.createPopup=function(){var e,s=this.createElement("div",{className:y,id:this.element.id+"-popup"});document.body.appendChild(s),this.dropDown=new i.Popup(s,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e["aria-label"]=this.element.textContent?this.element.textContent:"dropdownbutton",e)),this.cssClass&&t.addClass([s],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},r.prototype.getTargetElement=function(){return"string"==typeof this.target?t.select(this.target):this.target},r.prototype.createItems=function(e){var s,i,n,o,r=this.items,p=this.hasIcon(this.items,"iconCss"),l=this.getULElement();l?l.innerHTML="":l=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var c=0;c<r.length;c++){var h=(i=r[c]).text;n=this.createElement("li",{innerHTML:i.url?"":h,className:i.separator?m+" "+f:m,attrs:i.separator?{role:"separator",tabindex:"-1"}:{role:"menuitem",tabindex:"-1","aria-label":h},id:i.id?i.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?n.textContent=i.url?"":h:n.innerHTML=i.url?"":h,i.url&&(n.appendChild(this.createAnchor(i)),n.classList.add("e-url")),i.iconCss?(s=this.createElement("span",{className:u+" "+i.iconCss}),i.url?n.childNodes[0].appendChild(s):n.insertBefore(s,n.childNodes[0])):p&&!i.separator&&n.classList.add("e-blank-icon"),i.disabled&&n.classList.add("e-disabled"),o={item:i,element:n},this.trigger("beforeItemRender",o),l.appendChild(n)}e&&this.getPopUpElement().appendChild(l),p&&a(this.getPopUpElement())},r.prototype.hasIcon=function(e,t){for(var s=0,i=e.length;s<i;s++)if(e[s][""+t])return!0;return!1},r.prototype.createAnchor=function(e){var s=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:s,attrs:{href:e.url}})},r.prototype.initialize=function(){this.button=new s.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.target&&!this.isColorPicker()||!this.createPopupOnClick?this.createPopup():this.isPopupCreated=!1},r.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},r.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(v)>-1?"bottom":"right")+" e-caret"}))},r.prototype.setActiveElem=function(e){this.activeElem=e},r.prototype.getModuleName=function(){return"dropdown-btn"},r.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},r.prototype.destroy=function(){var s=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var i;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(i=this.cssClass.split(" ")),this.button.destroy(),i&&t.removeClass([this.element],i),t.removeClass(this.activeElem,["e-active"]);(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents()}},r.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(t.removeClass([e],["e-popup-open","e-popup-close"]),t.detach(e))}t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1},r.prototype.getPopUpElement=function(){var e=null;if(!this.dropDown&&this.activeElem[0].classList.contains("e-split-btn")){var s=t.getComponent(this.activeElem[1],"dropdown-btn");s&&(this.dropDown=s.dropDown)}return this.dropDown&&(e=this.dropDown.element),e},r.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},r.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this)},r.prototype.popupWireEvents=function(){this.delegateMousedownHandler||(this.delegateMousedownHandler=this.mousedownHandler.bind(this));var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&t.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=t.rippleEffect(e,{selector:"."+m})},r.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&t.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler)),t.isRippleEnabled&&this.rippleFn&&this.rippleFn()},r.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},r.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),o(this.getULElement(),e.keyCode))},r.prototype.keyEventHandler=function(e){(!this.target||13!==e.keyCode&&9!==e.keyCode)&&(13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?this.activeElem[0].focus():e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},r.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},r.prototype.mousedownHandler=function(e){var s=e.target;!this.dropDown||this.canOpen()||t.closest(s,'[id="'+this.getPopUpElement().id+'"]')||t.closest(s,'[id="'+this.element.id+'"]')||this.closePopup(e)},r.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget;if(t&&t.className.indexOf("e-item")>-1){var s=this.getLI(t);if(s){var i=Array.prototype.indexOf.call(this.getULElement().children,s),n=this.items[i];if(n){var o={element:s,item:n};this.trigger("select",o)}}}this.closePopup(e)}},r.prototype.clickHandler=function(e){var s=e.target;if(t.closest(s,'[id="'+this.element.id+'"]'))!this.createPopupOnClick||this.target&&""!==this.target&&!this.isColorPicker()?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e));else if(t.closest(s,'[id="'+this.getPopUpElement().id+'"]')){var i=void 0,n=void 0,o=void 0,r=this.getLI(s);r&&(n=Array.prototype.indexOf.call(this.getULElement().children,r),(o=this.items[n])&&(i={element:r,item:o},this.trigger("select",i)),this.closePopup(e,this.activeElem[0]))}},r.prototype.openPopUp=function(e){var s=this;void 0===e&&(e=null);var i=this.getPopUpElement();if(this.target)if(this.activeElem.length>1){var n=t.getComponent(this.activeElem[0],"split-btn");n.isReact&&i.childNodes.length<1&&(n.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&i.childNodes.length<1&&(this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var o=this.getULElement();this.popupWireEvents();var r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",r,function(e){if(!e.cancel){var i=s.getULElement();if(s.dropDown.show(null,s.element),t.addClass([s.element],"e-active"),s.element.setAttribute("aria-expanded","true"),s.element.setAttribute("aria-owns",s.getPopUpElement().id),i&&i.focus(),s.enableRtl&&"0px"!==i.parentElement.style.left){var n=void 0;n=s.element.parentElement&&s.element.parentElement.classList.contains("e-split-btn-wrapper")?s.element.parentElement.offsetWidth:s.element.offsetWidth;var o=i.parentElement.offsetWidth-n,r=parseFloat(i.parentElement.style.left)-o;r<0&&(r=0),i.parentElement.style.left=r+"px"}var a={element:i,items:s.items};s.trigger("open",a)}})},r.prototype.closePopup=function(e,s){var i=this;void 0===e&&(e=null);var n=this.getULElement(),o={element:n,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",o,function(e){if(e.cancel)n&&n.focus();else{var o=i.getPopUpElement();o&&t.EventHandler.remove(o,"keydown",i.keyBoardHandler),i.popupUnWireEvents();var r=i.getULElement(),a=void 0;r&&(a=r.querySelector(".e-selected")),a&&a.classList.remove("e-selected"),i.dropDown.hide(),t.removeClass(i.activeElem,"e-active"),i.element.setAttribute("aria-expanded","false"),i.element.removeAttribute("aria-owns"),s&&s.focus();var p={element:r,items:i.items};i.trigger("close",p),!i.target&&r&&t.detach(r),i.target&&!i.isColorPicker()||i.createPopupOnClick&&i.destroyPopup()}})},r.prototype.unWireEvents=function(){this.createPopupOnClick||t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler))},r.prototype.onPropertyChanged=function(e,s){this.button.setProperties(n(e,["content","cssClass","iconCss","iconPosition","disabled","enableRtl"]));var i;this.isPopupCreated&&(i=this.getPopUpElement(),this.dropDown.setProperties(n(e,["enableRtl"])));for(var o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(v)>-1||s.cssClass.indexOf(v)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var a=this.element.querySelector("span.e-caret");e.cssClass.indexOf(v)>-1?t.classList(a,["e-icon-bottom"],["e-icon-right"]):t.classList(a,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}}},r.prototype.focusIn=function(){this.element.focus()},d([t.Property("")],r.prototype,"content",void 0),d([t.Property("")],r.prototype,"cssClass",void 0),d([t.Property(!1)],r.prototype,"disabled",void 0),d([t.Property("")],r.prototype,"iconCss",void 0),d([t.Property("Left")],r.prototype,"iconPosition",void 0),d([t.Property(!1)],r.prototype,"enableHtmlSanitizer",void 0),d([t.Collection([],c)],r.prototype,"items",void 0),d([t.Property(!1)],r.prototype,"createPopupOnClick",void 0),d([t.Property("")],r.prototype,"target",void 0),d([t.Property("")],r.prototype,"closeActionEvents",void 0),d([t.Event()],r.prototype,"beforeItemRender",void 0),d([t.Event()],r.prototype,"beforeOpen",void 0),d([t.Event()],r.prototype,"beforeClose",void 0),d([t.Event()],r.prototype,"close",void 0),d([t.Event()],r.prototype,"open",void 0),d([t.Event()],r.prototype,"select",void 0),d([t.Event()],r.prototype,"created",void 0),r=d([t.NotifyPropertyChanges],r)}(t.Component),b=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),C=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},P="EJS-SPLITBUTTON",E=function(e){function i(t,s){return e.call(this,t,s)||this}return b(i,e),i.prototype.preRender=function(){var e=this.element;if(e.tagName===P){for(var s=t.getValue("ej2_instances",e),i=this.createElement("button",{attrs:{type:"button"}}),n=this.createElement(P,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)i.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(n,e),t.detach(e),e=i,n.appendChild(e),t.setValue("ej2_instances",s,e),this.wrapper=n,this.element=e}this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},i.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},i.prototype.addItems=function(t,s){e.prototype.addItems.call(this,t,s),this.secondaryBtnObj.items=this.items},i.prototype.removeItems=function(t,s){e.prototype.removeItems.call(this,t,s),this.secondaryBtnObj.items=this.items},i.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add("e-rtl"),this.cssClass&&t.addClass([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},i.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new s.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},i.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var s={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick};s.beforeItemRender=function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},s.open=function(t){e.trigger("open",t)},s.close=function(t){e.trigger("close",t)},s.select=function(t){e.trigger("select",t)},s.beforeOpen=function(t){e.createPopupOnClick&&0==e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var s=new w;return e.trigger("beforeOpen",t,function(e){s.resolve(e)}),s},s.beforeClose=function(t){var s=new w;return e.trigger("beforeClose",t,function(e){s.resolve(e)}),s},this.secondaryBtnObj=new g(s),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.isPopupCreated=this.secondaryBtnObj.isPopupCreated,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},i.prototype.setAria=function(){t.attributes(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent+" splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},i.prototype.getModuleName=function(){return"split-btn"},i.prototype.toggle=function(){this.secondaryBtnObj.toggle()},i.prototype.destroy=function(){var s=this,i=["e-rtl"];if(this.cssClass&&(i=i.concat(this.cssClass.split(" "))),this.element){var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===P?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],i),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){s.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element.getAttribute("class")||this.element.removeAttribute("class")},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new t.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),t.getInstance(this.element,t.KeyboardEvents).destroy()},i.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},i.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement()&&!this.getPopUpElement().classList.contains("e-popup-close")?(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active")):this.secondaryBtnObj.element.classList.remove("e-active")}},i.prototype.onPropertyChanged=function(e,s){var i=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(n(e,i)),i=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(n(e,i));for(var o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"cssClass":s.cssClass&&t.removeClass([this.wrapper],s.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],"e-rtl"):t.removeClass([this.wrapper],"e-rtl");break;case"disabled":e.disabled?t.addClass([this.wrapper],"e-splitbtn-disabled"):t.removeClass([this.wrapper],"e-splitbtn-disabled")}}},i.prototype.focusIn=function(){this.element.focus()},C([t.Property("")],i.prototype,"content",void 0),C([t.Property("")],i.prototype,"cssClass",void 0),C([t.Property(!1)],i.prototype,"disabled",void 0),C([t.Property("")],i.prototype,"iconCss",void 0),C([t.Property("Left")],i.prototype,"iconPosition",void 0),C([t.Property(!1)],i.prototype,"createPopupOnClick",void 0),C([t.Collection([],c)],i.prototype,"items",void 0),C([t.Property("")],i.prototype,"target",void 0),C([t.Event()],i.prototype,"beforeItemRender",void 0),C([t.Event()],i.prototype,"beforeOpen",void 0),C([t.Event()],i.prototype,"beforeClose",void 0),C([t.Event()],i.prototype,"click",void 0),C([t.Event()],i.prototype,"close",void 0),C([t.Event()],i.prototype,"open",void 0),C([t.Event()],i.prototype,"select",void 0),C([t.Event()],i.prototype,"created",void 0),i=C([t.NotifyPropertyChanges],i)}(g),w=function(){return function(){var e=this;this.promise=new Promise(function(t,s){e.resolve=t,e.reject=s}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)}}(),k=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),O=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},L="e-hide-spinner",H="e-progress-active",S="e-btn-content",B=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return k(s,e),O([t.Property(null)],s.prototype,"template",void 0),O([t.Property(16)],s.prototype,"width",void 0),O([t.Property("Left")],s.prototype,"position",void 0),s}(t.ChildProperty),j=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return k(s,e),O([t.Property(400)],s.prototype,"duration",void 0),O([t.Property("None")],s.prototype,"effect",void 0),O([t.Property("ease")],s.prototype,"easing",void 0),s}(t.ChildProperty),N=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.step=1,i}return k(s,e),s.prototype.preRender=function(){e.prototype.preRender.call(this)},s.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},s.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},s.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},s.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},s.prototype.getModuleName=function(){return"progress-btn"},s.prototype.destroy=function(){var s=this,i=[L,H,"e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(i=i.concat(this.cssClass.split(" "))),t.removeClass([this.element],i);(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},s.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},s.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),i.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},s.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},s.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},s.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(S)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},s.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},s.prototype.setContent=function(){var e;e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:S,innerHTML:e}))},s.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:S,innerHTML:e});if(this.iconCss){var s=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(s.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var i=t.childNodes[0];!i||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(s):t.insertBefore(s,i)}this.element.appendChild(t)},s.prototype.clickHandler=function(){this.element.classList.contains(H)||this.startProgress()},s.prototype.startProgress=function(e,t){var s=this.element.classList,n=s.contains("e-vertical");s.add(H),s.contains(L)||i.showSpinner(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,n),this.startContAnimate()},s.prototype.startAnimate=function(e,t,s,i,n,o,r,a){var p=this;try{var l=e-s,c=this.duration*o/100,h=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-h,s=e-h,i+=(l-h)/this.duration*100;var d={percent:n=(t-r)%c==0||100===i?i:n,currentDuration:t,step:o};this.eIsVertical=a,0===i?this.trigger("begin",d,function(e){p.successCallback(e,i,n,t,r,h,s)}):100===i||t===this.duration?this.trigger("end",d,function(e){p.successCallback(e,i,n,t,r,h,s)}):this.trigger("progress",d,function(e){p.successCallback(e,i,n,t,r,h,s)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},s.prototype.successCallback=function(e,t,s,i,n,o,r){var a=this,p=t,l=s,c=o,h=i,d=n,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(h-d)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,d=h),this.isPaused||(h<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),h,u,p,l,e.step,d,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},s.prototype.startContAnimate=function(){var e=this,s=this.element.getElementsByClassName(S)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(s,{duration:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){s.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},s.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add(H);for(var s=this.percent;s<100;s++)(s+=10)>100&&(s=100),this.enableProgress&&(this.getProgress().style[t?"height":"width"]=this.percent<100?s+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var i={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",i),this.progressTime=this.percent=0},s.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(S)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},s.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(S)[0];if(this.element.classList.contains(L)||i.hideSpinner(this.element.querySelector(".e-spinner")),this.element.classList.remove(H),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},s.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(S)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},s.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0"})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},s.prototype.onPropertyChanged=function(s,n){var o=this.element,r=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(r=!0),e.prototype.onPropertyChanged.call(this,s,n);for(var a=0,p=Object.keys(s);a<p.length;a++){switch(p[a]){case"content":this.setContent(),this.createSpinner(),r&&(i.showSpinner(this.element.querySelector(".e-spinner")),r=!1),this.enableProgress&&this.createProgress(),o.setAttribute("aria-label",o.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":s.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":s.spinSettings.position&&(o.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(s.spinSettings.template||s.spinSettings.width)&&(o.removeChild(this.getSpinner()),this.createSpinner())}}},s.prototype.focusIn=function(){this.element.focus()},O([t.Property(!1)],s.prototype,"enableProgress",void 0),O([t.Property(2e3)],s.prototype,"duration",void 0),O([t.Property("Left")],s.prototype,"iconPosition",void 0),O([t.Property("")],s.prototype,"iconCss",void 0),O([t.Property(!1)],s.prototype,"disabled",void 0),O([t.Property(!1)],s.prototype,"isPrimary",void 0),O([t.Property("")],s.prototype,"cssClass",void 0),O([t.Property("")],s.prototype,"content",void 0),O([t.Property(!1)],s.prototype,"isToggle",void 0),O([t.Property(!1)],s.prototype,"enableHtmlSanitizer",void 0),O([t.Complex({},B)],s.prototype,"spinSettings",void 0),O([t.Complex({},j)],s.prototype,"animationSettings",void 0),O([t.Event()],s.prototype,"created",void 0),O([t.Event()],s.prototype,"begin",void 0),O([t.Event()],s.prototype,"progress",void 0),O([t.Event()],s.prototype,"end",void 0),O([t.Event()],s.prototype,"fail",void 0),s=O([t.NotifyPropertyChanges],s)}(s.Button);e.getModel=n,e.upDownKeyHandler=o,e.setBlankIconStyle=a,e.Item=c,e.DropDownButton=g,e.SplitButton=E,e.Deferred=w,e.createButtonGroup=function(e,i,n){void 0===i&&(i={});var o,r,a,p;t.isNullOrUndefined(n)&&(n=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;i.buttons=i.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=i.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=n("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),i.cssClass&&p&&!p.cssClass&&(p.cssClass=i.cssClass),new s.Button(p||{},r));return l},e.SpinSettings=B,e.AnimationSettings=j,e.ProgressButton=N,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ej2-splitbuttons.umd.min.js.map |
/*! | ||
* filename: ej2-splitbuttons.min.js | ||
* version : 22.1.34 | ||
* version : 22.1.37 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license. | ||
*/ | ||
this.ej=this.ej||{},this.ej.splitbuttons=function(e,t,i,s){"use strict";function n(e,i){for(var s=t.extend({},e),n=0,o=Object.keys(s);n<o.length;n++){var r=o[n];i.indexOf(r)<0&&t.deleteObject(s,r)}return s}function o(e,i){var s=40===i?0:e.childElementCount-1,n=s,o=e.querySelector(".e-selected");o&&o.classList.remove("e-selected");for(var a=0,p=e.children.length;a<p;a++)e.children[a].classList.contains("e-focused")&&(n=a,e.children[a].classList.remove("e-focused"),40===i?n++:n--,n===(40===i?e.childElementCount:-1)&&(n=s));-1!==(n=r(e,e.children[n],n,i))&&(t.addClass([e.children[n]],"e-focused"),e.children[n].focus())}function r(e,t,i,s,n){if(void 0===n&&(n=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(i===(40===s?e.childElementCount-1:0)?i=40===s?0:e.childElementCount-1:40===s?i++:i--),(t=e.children[i]).classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++n===e.childElementCount)return i=-1;i=r(e,t,i,s,n)}return i}function a(e,i){var s=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(i&&[].slice.call(e.getElementsByClassName("e-item")).forEach(function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")}),s.length){var n=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!t.isNullOrUndefined(n)){n.classList.contains("e-url")&&(n=n.querySelector(".e-menu-url"));var o,r=n.querySelector(".e-menu-icon"),a=e.classList.contains("e-rtl");o=a?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var p=parseInt(getComputedStyle(r).fontSize,10)+parseInt(getComputedStyle(r)[o.margin],10)+parseInt(getComputedStyle(n).paddingLeft,10)+"px";s.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[o.padding]=p:e.style[o.padding]=p})}}}function p(e,s,n){void 0===s&&(s={});var o,r,a,p;t.isNullOrUndefined(n)&&(n=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;s.buttons=s.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=s.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=n("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),s.cssClass&&p&&!p.cssClass&&(p.cssClass=s.cssClass),new i.Button(p||{},r));return l}var l=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])})(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,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},h=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return l(i,e),c([t.Property("")],i.prototype,"iconCss",void 0),c([t.Property("")],i.prototype,"id",void 0),c([t.Property(!1)],i.prototype,"separator",void 0),c([t.Property("")],i.prototype,"text",void 0),c([t.Property("")],i.prototype,"url",void 0),c([t.Property(!1)],i.prototype,"disabled",void 0),i}(t.ChildProperty),d=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])})(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)}}(),u=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},m={DISABLED:"e-disabled",FOCUS:"e-focused",ICON:"e-menu-icon",ITEM:"e-item",POPUP:"e-dropdown-popup",RTL:"e-rtl",SEPARATOR:"e-separator",VERTICAL:"e-vertical"},y=function(e){function r(t,i){var s=e.call(this,t,i)||this;return s.isPopupCreated=!0,s}return d(r,e),r.prototype.preRender=function(){},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.closePopup()},r.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},r.prototype.addItems=function(e,t){for(var i,s=this.items.length,n=0,o=this.items.length;n<o;n++)if(t===this.items[n].text){s=n;break}for(var r=e.length-1;r>=0;r--)i=new h(this,"items",e[r],!0),this.items.splice(s,0,i);this.canOpen()||this.createItems()},r.prototype.removeItems=function(e,t){for(var i=!1,s=0,n=e.length;s<n;s++)for(var o=0,r=this.items.length;o<r;o++)if(e[s]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),i=!0;break}i&&this.getULElement()&&this.createItems()},r.prototype.createPopup=function(){var e,i=this.createElement("div",{className:m.POPUP,id:this.element.id+"-popup"});document.body.appendChild(i),this.dropDown=new s.Popup(i,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e["aria-label"]=this.element.textContent?this.element.textContent:"dropdownbutton",e)),this.cssClass&&t.addClass([i],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},r.prototype.getTargetElement=function(){return"string"==typeof this.target?t.select(this.target):this.target},r.prototype.createItems=function(e){var i,s,n,o,r=this.items,p=this.hasIcon(this.items,"iconCss"),l=this.getULElement();l?l.innerHTML="":l=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var c=0;c<r.length;c++){var h=(s=r[c]).text;n=this.createElement("li",{innerHTML:s.url?"":h,className:s.separator?m.ITEM+" "+m.SEPARATOR:m.ITEM,attrs:s.separator?{role:"separator",tabindex:"-1"}:{role:"menuitem",tabindex:"-1","aria-label":h},id:s.id?s.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?n.textContent=s.url?"":h:n.innerHTML=s.url?"":h,s.url&&(n.appendChild(this.createAnchor(s)),n.classList.add("e-url")),s.iconCss?(i=this.createElement("span",{className:m.ICON+" "+s.iconCss}),s.url?n.childNodes[0].appendChild(i):n.insertBefore(i,n.childNodes[0])):p&&!s.separator&&n.classList.add("e-blank-icon"),s.disabled&&n.classList.add("e-disabled"),o={item:s,element:n},this.trigger("beforeItemRender",o),l.appendChild(n)}e&&this.getPopUpElement().appendChild(l),p&&a(this.getPopUpElement())},r.prototype.hasIcon=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][""+t])return!0;return!1},r.prototype.createAnchor=function(e){var i=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:i,attrs:{href:e.url}})},r.prototype.initialize=function(){this.button=new i.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.target&&!this.isColorPicker()||!this.createPopupOnClick?this.createPopup():this.isPopupCreated=!1},r.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},r.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(m.VERTICAL)>-1?"bottom":"right")+" e-caret"}))},r.prototype.setActiveElem=function(e){this.activeElem=e},r.prototype.getModuleName=function(){return"dropdown-btn"},r.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},r.prototype.destroy=function(){var i=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var s;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(s=this.cssClass.split(" ")),this.button.destroy(),s&&t.removeClass([this.element],s),t.removeClass(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){i.element.removeAttribute(e)}),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents()}},r.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(t.removeClass([e],["e-popup-open","e-popup-close"]),t.detach(e))}t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1},r.prototype.getPopUpElement=function(){var e=null;return this.dropDown&&(e=this.dropDown.element),e},r.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},r.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this)},r.prototype.popupWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&t.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=t.rippleEffect(e,{selector:"."+m.ITEM})},r.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&t.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler)),t.isRippleEnabled&&this.rippleFn&&this.rippleFn()},r.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},r.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),o(this.getULElement(),e.keyCode))},r.prototype.keyEventHandler=function(e){if(!this.target||13!==e.keyCode&&9!==e.keyCode)return 13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?void this.activeElem[0].focus():void(e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},r.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},r.prototype.mousedownHandler=function(e){var i=e.target;!this.dropDown||this.canOpen()||t.closest(i,'[id="'+this.getPopUpElement().id+'"]')||t.closest(i,'[id="'+this.element.id+'"]')||this.closePopup(e)},r.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget;if(t&&t.className.indexOf("e-item")>-1){var i=this.getLI(t);if(i){var s=Array.prototype.indexOf.call(this.getULElement().children,i),n=this.items[s];if(n){var o={element:i,item:n};this.trigger("select",o)}}}this.closePopup(e)}},r.prototype.clickHandler=function(e){var i=e.target;if(t.closest(i,'[id="'+this.element.id+'"]'))!this.createPopupOnClick||this.target&&!this.isColorPicker()?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e));else if(t.closest(i,'[id="'+this.getPopUpElement().id+'"]')){var s=void 0,n=void 0,o=void 0,r=this.getLI(i);r&&(n=Array.prototype.indexOf.call(this.getULElement().children,r),(o=this.items[n])&&(s={element:r,item:o},this.trigger("select",s)),this.closePopup(e,this.activeElem[0]))}},r.prototype.openPopUp=function(e){var i=this;void 0===e&&(e=null);var s=this.getPopUpElement();if(this.target)if(this.activeElem.length>1){var n=t.getComponent(this.activeElem[0],"split-btn");n.isReact&&s.childNodes.length<1&&(n.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&s.childNodes.length<1&&(this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var o=this.getULElement();this.popupWireEvents();var r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",r,function(e){if(!e.cancel){var s=i.getULElement();if(i.dropDown.show(null,i.element),t.addClass([i.element],"e-active"),i.element.setAttribute("aria-expanded","true"),i.element.setAttribute("aria-owns",i.getPopUpElement().id),s&&s.focus(),i.enableRtl&&"0px"!==s.parentElement.style.left){var n=void 0;n=i.element.parentElement&&i.element.parentElement.classList.contains("e-split-btn-wrapper")?i.element.parentElement.offsetWidth:i.element.offsetWidth;var o=s.parentElement.offsetWidth-n,r=parseFloat(s.parentElement.style.left)-o;r<0&&(r=0),s.parentElement.style.left=r+"px"}var a={element:s,items:i.items};i.trigger("open",a)}})},r.prototype.closePopup=function(e,i){var s=this;void 0===e&&(e=null);var n=this.getULElement(),o={element:n,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",o,function(e){if(e.cancel)n&&n.focus();else{var o=s.getPopUpElement();o&&t.EventHandler.remove(o,"keydown",s.keyBoardHandler),s.popupUnWireEvents();var r=s.getULElement(),a=void 0;r&&(a=r.querySelector(".e-selected")),a&&a.classList.remove("e-selected"),s.dropDown.hide(),t.removeClass(s.activeElem,"e-active"),s.element.setAttribute("aria-expanded","false"),s.element.removeAttribute("aria-owns"),i&&i.focus();var p={element:r,items:s.items};s.trigger("close",p),!s.target&&r&&t.detach(r),s.target&&!s.isColorPicker()||s.createPopupOnClick&&s.destroyPopup(),s.target&&(s.isPopupCreated=!s.createPopupOnClick)}})},r.prototype.unWireEvents=function(){this.createPopupOnClick||t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler))},r.prototype.onPropertyChanged=function(e,i){var s=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(n(e,s));var o;this.isPopupCreated&&(o=this.getPopUpElement(),this.dropDown.setProperties(n(e,["enableRtl"])));for(var r=0,a=Object.keys(e);r<a.length;r++)switch(a[r]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(m.VERTICAL)>-1||i.cssClass.indexOf(m.VERTICAL)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var p=this.element.querySelector("span.e-caret");e.cssClass.indexOf(m.VERTICAL)>-1?t.classList(p,["e-icon-bottom"],["e-icon-right"]):t.classList(p,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(i.cssClass&&t.removeClass([o],i.cssClass.split(" ")),e.cssClass&&t.addClass([o],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}},r.prototype.focusIn=function(){this.element.focus()},u([t.Property("")],r.prototype,"content",void 0),u([t.Property("")],r.prototype,"cssClass",void 0),u([t.Property(!1)],r.prototype,"disabled",void 0),u([t.Property("")],r.prototype,"iconCss",void 0),u([t.Property("Left")],r.prototype,"iconPosition",void 0),u([t.Property(!1)],r.prototype,"enableHtmlSanitizer",void 0),u([t.Collection([],h)],r.prototype,"items",void 0),u([t.Property(!1)],r.prototype,"createPopupOnClick",void 0),u([t.Property("")],r.prototype,"target",void 0),u([t.Property("")],r.prototype,"closeActionEvents",void 0),u([t.Event()],r.prototype,"beforeItemRender",void 0),u([t.Event()],r.prototype,"beforeOpen",void 0),u([t.Event()],r.prototype,"beforeClose",void 0),u([t.Event()],r.prototype,"close",void 0),u([t.Event()],r.prototype,"open",void 0),u([t.Event()],r.prototype,"select",void 0),u([t.Event()],r.prototype,"created",void 0),r=u([t.NotifyPropertyChanges],r)}(t.Component),f=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])})(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)}}(),v=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},g="e-rtl",b="EJS-SPLITBUTTON",C=function(e){function s(t,i){return e.call(this,t,i)||this}return f(s,e),s.prototype.preRender=function(){var e=this.element;if(e.tagName===b){for(var i=t.getValue("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),n=this.createElement(b,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)s.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(n,e),t.detach(e),e=s,n.appendChild(e),t.setValue("ej2_instances",i,e),this.wrapper=n,this.element=e}this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},s.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},s.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},s.prototype.addItems=function(t,i){e.prototype.addItems.call(this,t,i),this.secondaryBtnObj.items=this.items},s.prototype.removeItems=function(t,i){e.prototype.removeItems.call(this,t,i),this.secondaryBtnObj.items=this.items},s.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add(g),this.cssClass&&t.addClass([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},s.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new i.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},s.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var i={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick};i.beforeItemRender=function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},i.open=function(t){e.trigger("open",t)},i.close=function(t){e.trigger("close",t)},i.select=function(t){e.trigger("select",t)},i.beforeOpen=function(t){e.createPopupOnClick&&0==e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var i=new P;return e.trigger("beforeOpen",t,function(e){i.resolve(e)}),i},i.beforeClose=function(t){var i=new P;return e.trigger("beforeClose",t,function(e){i.resolve(e)}),i},this.secondaryBtnObj=new y(i),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},s.prototype.setAria=function(){t.attributes(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent+" splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},s.prototype.getModuleName=function(){return"split-btn"},s.prototype.toggle=function(){this.secondaryBtnObj.toggle()},s.prototype.destroy=function(){var i=this,s=[g];if(this.cssClass&&(s=s.concat(this.cssClass.split(" "))),this.element){var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===b?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],s),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){i.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element.getAttribute("class")||this.element.removeAttribute("class")},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new t.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),t.getInstance(this.element,t.KeyboardEvents).destroy()},s.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},s.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement().classList.contains("e-popup-close")?this.secondaryBtnObj.element.classList.remove("e-active"):(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active"))}},s.prototype.onPropertyChanged=function(e,i){var s=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(n(e,s)),s=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(n(e,s));for(var o=0,r=Object.keys(e);o<r.length;o++)switch(r[o]){case"cssClass":i.cssClass&&t.removeClass([this.wrapper],i.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],g):t.removeClass([this.wrapper],g);break;case"disabled":e.disabled?t.addClass([this.wrapper],"e-splitbtn-disabled"):t.removeClass([this.wrapper],"e-splitbtn-disabled")}},s.prototype.focusIn=function(){this.element.focus()},v([t.Property("")],s.prototype,"content",void 0),v([t.Property("")],s.prototype,"cssClass",void 0),v([t.Property(!1)],s.prototype,"disabled",void 0),v([t.Property("")],s.prototype,"iconCss",void 0),v([t.Property("Left")],s.prototype,"iconPosition",void 0),v([t.Property(!1)],s.prototype,"createPopupOnClick",void 0),v([t.Collection([],h)],s.prototype,"items",void 0),v([t.Property("")],s.prototype,"target",void 0),v([t.Event()],s.prototype,"beforeItemRender",void 0),v([t.Event()],s.prototype,"beforeOpen",void 0),v([t.Event()],s.prototype,"beforeClose",void 0),v([t.Event()],s.prototype,"click",void 0),v([t.Event()],s.prototype,"close",void 0),v([t.Event()],s.prototype,"open",void 0),v([t.Event()],s.prototype,"select",void 0),v([t.Event()],s.prototype,"created",void 0),s=v([t.NotifyPropertyChanges],s)}(y),P=function(){function e(){var e=this;this.promise=new Promise(function(t,i){e.resolve=t,e.reject=i}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)}return e}(),E=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])})(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)}}(),w=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},k="e-btn-content",O=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return E(i,e),w([t.Property(null)],i.prototype,"template",void 0),w([t.Property(16)],i.prototype,"width",void 0),w([t.Property("Left")],i.prototype,"position",void 0),i}(t.ChildProperty),L=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return E(i,e),w([t.Property(400)],i.prototype,"duration",void 0),w([t.Property("None")],i.prototype,"effect",void 0),w([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),S=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.step=1,s}return E(i,e),i.prototype.preRender=function(){e.prototype.preRender.call(this)},i.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},i.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},i.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},i.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},i.prototype.getModuleName=function(){return"progress-btn"},i.prototype.destroy=function(){var i=this,s=["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(s=s.concat(this.cssClass.split(" "))),t.removeClass([this.element],s),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){i.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},i.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},i.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),s.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},i.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},i.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},i.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(k)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},i.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},i.prototype.setContent=function(){var e;e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:k,innerHTML:e}))},i.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:k,innerHTML:e});if(this.iconCss){var i=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(i.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var s=t.childNodes[0];!s||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(i):t.insertBefore(i,s)}this.element.appendChild(t)},i.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},i.prototype.startProgress=function(e,t){var i=this.element.classList,n=i.contains("e-vertical");i.add("e-progress-active"),i.contains("e-hide-spinner")||s.showSpinner(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,n),this.startContAnimate()},i.prototype.startAnimate=function(e,t,i,s,n,o,r,a){var p=this;try{var l=e-i,c=this.duration*o/100,h=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-h,i=e-h,s+=(l-h)/this.duration*100;var d={percent:n=(t-r)%c==0||100===s?s:n,currentDuration:t,step:o};this.eIsVertical=a,0===s?this.trigger("begin",d,function(e){p.successCallback(e,s,n,t,r,h,i)}):100===s||t===this.duration?this.trigger("end",d,function(e){p.successCallback(e,s,n,t,r,h,i)}):this.trigger("progress",d,function(e){p.successCallback(e,s,n,t,r,h,i)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},i.prototype.successCallback=function(e,t,i,s,n,o,r){var a=this,p=t,l=i,c=o,h=s,d=n,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(h-d)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,d=h),this.isPaused||(h<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),h,u,p,l,e.step,d,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},i.prototype.startContAnimate=function(){var e=this,i=this.element.getElementsByClassName(k)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(i,{duration:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){i.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},i.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add("e-progress-active");for(var i=this.percent;i<100;i++)(i+=10)>100&&(i=100),this.enableProgress&&(this.getProgress().style[t?"height":"width"]=this.percent<100?i+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var s={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",s),this.progressTime=this.percent=0},i.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(k)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},i.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(k)[0];if(this.element.classList.contains("e-hide-spinner")||s.hideSpinner(this.element.querySelector(".e-spinner")),this.element.classList.remove("e-progress-active"),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},i.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(k)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},i.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0"})},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},i.prototype.onPropertyChanged=function(i,n){var o=this.element,r=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(r=!0),e.prototype.onPropertyChanged.call(this,i,n);for(var a=0,p=Object.keys(i);a<p.length;a++)switch(p[a]){case"content":this.setContent(),this.createSpinner(),r&&(s.showSpinner(this.element.querySelector(".e-spinner")),r=!1),this.enableProgress&&this.createProgress(),o.setAttribute("aria-label",o.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":i.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":i.spinSettings.position&&(o.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(i.spinSettings.template||i.spinSettings.width)&&(o.removeChild(this.getSpinner()),this.createSpinner())}},i.prototype.focusIn=function(){this.element.focus()},w([t.Property(!1)],i.prototype,"enableProgress",void 0),w([t.Property(2e3)],i.prototype,"duration",void 0),w([t.Property("Left")],i.prototype,"iconPosition",void 0),w([t.Property("")],i.prototype,"iconCss",void 0),w([t.Property(!1)],i.prototype,"disabled",void 0),w([t.Property(!1)],i.prototype,"isPrimary",void 0),w([t.Property("")],i.prototype,"cssClass",void 0),w([t.Property("")],i.prototype,"content",void 0),w([t.Property(!1)],i.prototype,"isToggle",void 0),w([t.Property(!1)],i.prototype,"enableHtmlSanitizer",void 0),w([t.Complex({},O)],i.prototype,"spinSettings",void 0),w([t.Complex({},L)],i.prototype,"animationSettings",void 0),w([t.Event()],i.prototype,"created",void 0),w([t.Event()],i.prototype,"begin",void 0),w([t.Event()],i.prototype,"progress",void 0),w([t.Event()],i.prototype,"end",void 0),w([t.Event()],i.prototype,"fail",void 0),i=w([t.NotifyPropertyChanges],i)}(i.Button);return e.getModel=n,e.upDownKeyHandler=o,e.setBlankIconStyle=a,e.Item=h,e.DropDownButton=y,e.SplitButton=C,e.Deferred=P,e.createButtonGroup=p,e.SpinSettings=O,e.AnimationSettings=L,e.ProgressButton=S,e}({},ej.base,ej.buttons,ej.popups),this.ejs=ej; | ||
this.ej=this.ej||{},this.ej.splitbuttons=function(e,t,s,i){"use strict";function n(e,s){for(var i=t.extend({},e),n=0,o=Object.keys(i);n<o.length;n++){var r=o[n];s.indexOf(r)<0&&t.deleteObject(i,r)}return i}function o(e,s){var i=40===s?0:e.childElementCount-1,n=i,o=e.querySelector(".e-selected");o&&o.classList.remove("e-selected");for(var a=0,p=e.children.length;a<p;a++)e.children[a].classList.contains("e-focused")&&(n=a,e.children[a].classList.remove("e-focused"),40===s?n++:n--,n===(40===s?e.childElementCount:-1)&&(n=i));-1!==(n=r(e,e.children[n],n,s))&&(t.addClass([e.children[n]],"e-focused"),e.children[n].focus())}function r(e,t,s,i,n){if(void 0===n&&(n=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(s===(40===i?e.childElementCount-1:0)?s=40===i?0:e.childElementCount-1:40===i?s++:s--),(t=e.children[s]).classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++n===e.childElementCount)return s=-1;s=r(e,t,s,i,n)}return s}function a(e,s){var i=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(s&&[].slice.call(e.getElementsByClassName("e-item")).forEach(function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")}),i.length){var n=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!t.isNullOrUndefined(n)){n.classList.contains("e-url")&&(n=n.querySelector(".e-menu-url"));var o,r=n.querySelector(".e-menu-icon"),a=e.classList.contains("e-rtl");o=a?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var p=parseInt(getComputedStyle(r).fontSize,10)+parseInt(getComputedStyle(r)[o.margin],10)+parseInt(getComputedStyle(n).paddingLeft,10)+"px";i.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[o.padding]=p:e.style[o.padding]=p})}}}function p(e,i,n){void 0===i&&(i={});var o,r,a,p;t.isNullOrUndefined(n)&&(n=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;i.buttons=i.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=i.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=n("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),i.cssClass&&p&&!p.cssClass&&(p.cssClass=i.cssClass),new s.Button(p||{},r));return l}var l=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),c=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},h=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return l(s,e),c([t.Property("")],s.prototype,"iconCss",void 0),c([t.Property("")],s.prototype,"id",void 0),c([t.Property(!1)],s.prototype,"separator",void 0),c([t.Property("")],s.prototype,"text",void 0),c([t.Property("")],s.prototype,"url",void 0),c([t.Property(!1)],s.prototype,"disabled",void 0),s}(t.ChildProperty),d=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),u=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},m={DISABLED:"e-disabled",FOCUS:"e-focused",ICON:"e-menu-icon",ITEM:"e-item",POPUP:"e-dropdown-popup",RTL:"e-rtl",SEPARATOR:"e-separator",VERTICAL:"e-vertical"},y=function(e){function r(t,s){var i=e.call(this,t,s)||this;return i.isPopupCreated=!0,i}return d(r,e),r.prototype.preRender=function(){},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.createPopupOnClick&&!this.isPopupCreated?(this.createPopup(),this.openPopUp()):this.closePopup()},r.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},r.prototype.addItems=function(e,t){for(var s,i=this.items.length,n=0,o=this.items.length;n<o;n++)if(t===this.items[n].text){i=n;break}for(var r=e.length-1;r>=0;r--)s=new h(this,"items",e[r],!0),this.items.splice(i,0,s);this.canOpen()||this.createItems()},r.prototype.removeItems=function(e,t){for(var s=!1,i=0,n=e.length;i<n;i++)for(var o=0,r=this.items.length;o<r;o++)if(e[i]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),s=!0;break}s&&this.getULElement()&&this.createItems()},r.prototype.createPopup=function(){var e,s=this.createElement("div",{className:m.POPUP,id:this.element.id+"-popup"});document.body.appendChild(s),this.dropDown=new i.Popup(s,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e["aria-label"]=this.element.textContent?this.element.textContent:"dropdownbutton",e)),this.cssClass&&t.addClass([s],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},r.prototype.getTargetElement=function(){return"string"==typeof this.target?t.select(this.target):this.target},r.prototype.createItems=function(e){var s,i,n,o,r=this.items,p=this.hasIcon(this.items,"iconCss"),l=this.getULElement();l?l.innerHTML="":l=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var c=0;c<r.length;c++){var h=(i=r[c]).text;n=this.createElement("li",{innerHTML:i.url?"":h,className:i.separator?m.ITEM+" "+m.SEPARATOR:m.ITEM,attrs:i.separator?{role:"separator",tabindex:"-1"}:{role:"menuitem",tabindex:"-1","aria-label":h},id:i.id?i.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?n.textContent=i.url?"":h:n.innerHTML=i.url?"":h,i.url&&(n.appendChild(this.createAnchor(i)),n.classList.add("e-url")),i.iconCss?(s=this.createElement("span",{className:m.ICON+" "+i.iconCss}),i.url?n.childNodes[0].appendChild(s):n.insertBefore(s,n.childNodes[0])):p&&!i.separator&&n.classList.add("e-blank-icon"),i.disabled&&n.classList.add("e-disabled"),o={item:i,element:n},this.trigger("beforeItemRender",o),l.appendChild(n)}e&&this.getPopUpElement().appendChild(l),p&&a(this.getPopUpElement())},r.prototype.hasIcon=function(e,t){for(var s=0,i=e.length;s<i;s++)if(e[s][""+t])return!0;return!1},r.prototype.createAnchor=function(e){var s=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:s,attrs:{href:e.url}})},r.prototype.initialize=function(){this.button=new s.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.target&&!this.isColorPicker()||!this.createPopupOnClick?this.createPopup():this.isPopupCreated=!1},r.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},r.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(m.VERTICAL)>-1?"bottom":"right")+" e-caret"}))},r.prototype.setActiveElem=function(e){this.activeElem=e},r.prototype.getModuleName=function(){return"dropdown-btn"},r.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},r.prototype.destroy=function(){var s=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var i;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(i=this.cssClass.split(" ")),this.button.destroy(),i&&t.removeClass([this.element],i),t.removeClass(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents()}},r.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(t.removeClass([e],["e-popup-open","e-popup-close"]),t.detach(e))}t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1},r.prototype.getPopUpElement=function(){var e=null;if(!this.dropDown&&this.activeElem[0].classList.contains("e-split-btn")){var s=t.getComponent(this.activeElem[1],"dropdown-btn");s&&(this.dropDown=s.dropDown)}return this.dropDown&&(e=this.dropDown.element),e},r.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},r.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this)},r.prototype.popupWireEvents=function(){this.delegateMousedownHandler||(this.delegateMousedownHandler=this.mousedownHandler.bind(this));var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&t.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=t.rippleEffect(e,{selector:"."+m.ITEM})},r.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&t.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler)),t.isRippleEnabled&&this.rippleFn&&this.rippleFn()},r.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},r.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),o(this.getULElement(),e.keyCode))},r.prototype.keyEventHandler=function(e){if(!this.target||13!==e.keyCode&&9!==e.keyCode)return 13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?void this.activeElem[0].focus():void(e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},r.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},r.prototype.mousedownHandler=function(e){var s=e.target;!this.dropDown||this.canOpen()||t.closest(s,'[id="'+this.getPopUpElement().id+'"]')||t.closest(s,'[id="'+this.element.id+'"]')||this.closePopup(e)},r.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget;if(t&&t.className.indexOf("e-item")>-1){var s=this.getLI(t);if(s){var i=Array.prototype.indexOf.call(this.getULElement().children,s),n=this.items[i];if(n){var o={element:s,item:n};this.trigger("select",o)}}}this.closePopup(e)}},r.prototype.clickHandler=function(e){var s=e.target;if(t.closest(s,'[id="'+this.element.id+'"]'))!this.createPopupOnClick||this.target&&""!==this.target&&!this.isColorPicker()?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e));else if(t.closest(s,'[id="'+this.getPopUpElement().id+'"]')){var i=void 0,n=void 0,o=void 0,r=this.getLI(s);r&&(n=Array.prototype.indexOf.call(this.getULElement().children,r),(o=this.items[n])&&(i={element:r,item:o},this.trigger("select",i)),this.closePopup(e,this.activeElem[0]))}},r.prototype.openPopUp=function(e){var s=this;void 0===e&&(e=null);var i=this.getPopUpElement();if(this.target)if(this.activeElem.length>1){var n=t.getComponent(this.activeElem[0],"split-btn");n.isReact&&i.childNodes.length<1&&(n.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&i.childNodes.length<1&&(this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var o=this.getULElement();this.popupWireEvents();var r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",r,function(e){if(!e.cancel){var i=s.getULElement();if(s.dropDown.show(null,s.element),t.addClass([s.element],"e-active"),s.element.setAttribute("aria-expanded","true"),s.element.setAttribute("aria-owns",s.getPopUpElement().id),i&&i.focus(),s.enableRtl&&"0px"!==i.parentElement.style.left){var n=void 0;n=s.element.parentElement&&s.element.parentElement.classList.contains("e-split-btn-wrapper")?s.element.parentElement.offsetWidth:s.element.offsetWidth;var o=i.parentElement.offsetWidth-n,r=parseFloat(i.parentElement.style.left)-o;r<0&&(r=0),i.parentElement.style.left=r+"px"}var a={element:i,items:s.items};s.trigger("open",a)}})},r.prototype.closePopup=function(e,s){var i=this;void 0===e&&(e=null);var n=this.getULElement(),o={element:n,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",o,function(e){if(e.cancel)n&&n.focus();else{var o=i.getPopUpElement();o&&t.EventHandler.remove(o,"keydown",i.keyBoardHandler),i.popupUnWireEvents();var r=i.getULElement(),a=void 0;r&&(a=r.querySelector(".e-selected")),a&&a.classList.remove("e-selected"),i.dropDown.hide(),t.removeClass(i.activeElem,"e-active"),i.element.setAttribute("aria-expanded","false"),i.element.removeAttribute("aria-owns"),s&&s.focus();var p={element:r,items:i.items};i.trigger("close",p),!i.target&&r&&t.detach(r),i.target&&!i.isColorPicker()||i.createPopupOnClick&&i.destroyPopup()}})},r.prototype.unWireEvents=function(){this.createPopupOnClick||t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler))},r.prototype.onPropertyChanged=function(e,s){var i=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(n(e,i));var o;this.isPopupCreated&&(o=this.getPopUpElement(),this.dropDown.setProperties(n(e,["enableRtl"])));for(var r=0,a=Object.keys(e);r<a.length;r++)switch(a[r]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(m.VERTICAL)>-1||s.cssClass.indexOf(m.VERTICAL)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var p=this.element.querySelector("span.e-caret");e.cssClass.indexOf(m.VERTICAL)>-1?t.classList(p,["e-icon-bottom"],["e-icon-right"]):t.classList(p,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(s.cssClass&&t.removeClass([o],s.cssClass.split(" ")),e.cssClass&&t.addClass([o],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}},r.prototype.focusIn=function(){this.element.focus()},u([t.Property("")],r.prototype,"content",void 0),u([t.Property("")],r.prototype,"cssClass",void 0),u([t.Property(!1)],r.prototype,"disabled",void 0),u([t.Property("")],r.prototype,"iconCss",void 0),u([t.Property("Left")],r.prototype,"iconPosition",void 0),u([t.Property(!1)],r.prototype,"enableHtmlSanitizer",void 0),u([t.Collection([],h)],r.prototype,"items",void 0),u([t.Property(!1)],r.prototype,"createPopupOnClick",void 0),u([t.Property("")],r.prototype,"target",void 0),u([t.Property("")],r.prototype,"closeActionEvents",void 0),u([t.Event()],r.prototype,"beforeItemRender",void 0),u([t.Event()],r.prototype,"beforeOpen",void 0),u([t.Event()],r.prototype,"beforeClose",void 0),u([t.Event()],r.prototype,"close",void 0),u([t.Event()],r.prototype,"open",void 0),u([t.Event()],r.prototype,"select",void 0),u([t.Event()],r.prototype,"created",void 0),r=u([t.NotifyPropertyChanges],r)}(t.Component),f=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),v=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},g="e-rtl",b="EJS-SPLITBUTTON",C=function(e){function i(t,s){return e.call(this,t,s)||this}return f(i,e),i.prototype.preRender=function(){var e=this.element;if(e.tagName===b){for(var s=t.getValue("ej2_instances",e),i=this.createElement("button",{attrs:{type:"button"}}),n=this.createElement(b,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)i.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(n,e),t.detach(e),e=i,n.appendChild(e),t.setValue("ej2_instances",s,e),this.wrapper=n,this.element=e}this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},i.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},i.prototype.addItems=function(t,s){e.prototype.addItems.call(this,t,s),this.secondaryBtnObj.items=this.items},i.prototype.removeItems=function(t,s){e.prototype.removeItems.call(this,t,s),this.secondaryBtnObj.items=this.items},i.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add(g),this.cssClass&&t.addClass([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},i.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new s.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},i.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var s={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick};s.beforeItemRender=function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},s.open=function(t){e.trigger("open",t)},s.close=function(t){e.trigger("close",t)},s.select=function(t){e.trigger("select",t)},s.beforeOpen=function(t){e.createPopupOnClick&&0==e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var s=new P;return e.trigger("beforeOpen",t,function(e){s.resolve(e)}),s},s.beforeClose=function(t){var s=new P;return e.trigger("beforeClose",t,function(e){s.resolve(e)}),s},this.secondaryBtnObj=new y(s),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.isPopupCreated=this.secondaryBtnObj.isPopupCreated,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},i.prototype.setAria=function(){t.attributes(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent+" splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},i.prototype.getModuleName=function(){return"split-btn"},i.prototype.toggle=function(){this.secondaryBtnObj.toggle()},i.prototype.destroy=function(){var s=this,i=[g];if(this.cssClass&&(i=i.concat(this.cssClass.split(" "))),this.element){var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===b?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],i),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){s.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element.getAttribute("class")||this.element.removeAttribute("class")},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new t.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),t.getInstance(this.element,t.KeyboardEvents).destroy()},i.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},i.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement()&&!this.getPopUpElement().classList.contains("e-popup-close")?(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active")):this.secondaryBtnObj.element.classList.remove("e-active")}},i.prototype.onPropertyChanged=function(e,s){var i=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(n(e,i)),i=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(n(e,i));for(var o=0,r=Object.keys(e);o<r.length;o++)switch(r[o]){case"cssClass":s.cssClass&&t.removeClass([this.wrapper],s.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],g):t.removeClass([this.wrapper],g);break;case"disabled":e.disabled?t.addClass([this.wrapper],"e-splitbtn-disabled"):t.removeClass([this.wrapper],"e-splitbtn-disabled")}},i.prototype.focusIn=function(){this.element.focus()},v([t.Property("")],i.prototype,"content",void 0),v([t.Property("")],i.prototype,"cssClass",void 0),v([t.Property(!1)],i.prototype,"disabled",void 0),v([t.Property("")],i.prototype,"iconCss",void 0),v([t.Property("Left")],i.prototype,"iconPosition",void 0),v([t.Property(!1)],i.prototype,"createPopupOnClick",void 0),v([t.Collection([],h)],i.prototype,"items",void 0),v([t.Property("")],i.prototype,"target",void 0),v([t.Event()],i.prototype,"beforeItemRender",void 0),v([t.Event()],i.prototype,"beforeOpen",void 0),v([t.Event()],i.prototype,"beforeClose",void 0),v([t.Event()],i.prototype,"click",void 0),v([t.Event()],i.prototype,"close",void 0),v([t.Event()],i.prototype,"open",void 0),v([t.Event()],i.prototype,"select",void 0),v([t.Event()],i.prototype,"created",void 0),i=v([t.NotifyPropertyChanges],i)}(y),P=function(){function e(){var e=this;this.promise=new Promise(function(t,s){e.resolve=t,e.reject=s}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)}return e}(),E=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),w=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},k="e-btn-content",O=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return E(s,e),w([t.Property(null)],s.prototype,"template",void 0),w([t.Property(16)],s.prototype,"width",void 0),w([t.Property("Left")],s.prototype,"position",void 0),s}(t.ChildProperty),L=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return E(s,e),w([t.Property(400)],s.prototype,"duration",void 0),w([t.Property("None")],s.prototype,"effect",void 0),w([t.Property("ease")],s.prototype,"easing",void 0),s}(t.ChildProperty),S=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.step=1,i}return E(s,e),s.prototype.preRender=function(){e.prototype.preRender.call(this)},s.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},s.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},s.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},s.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},s.prototype.getModuleName=function(){return"progress-btn"},s.prototype.destroy=function(){var s=this,i=["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(i=i.concat(this.cssClass.split(" "))),t.removeClass([this.element],i),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},s.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},s.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),i.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},s.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},s.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},s.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(k)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},s.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},s.prototype.setContent=function(){var e;e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:k,innerHTML:e}))},s.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:k,innerHTML:e});if(this.iconCss){var s=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(s.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var i=t.childNodes[0];!i||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(s):t.insertBefore(s,i)}this.element.appendChild(t)},s.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},s.prototype.startProgress=function(e,t){var s=this.element.classList,n=s.contains("e-vertical");s.add("e-progress-active"),s.contains("e-hide-spinner")||i.showSpinner(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,n),this.startContAnimate()},s.prototype.startAnimate=function(e,t,s,i,n,o,r,a){var p=this;try{var l=e-s,c=this.duration*o/100,h=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-h,s=e-h,i+=(l-h)/this.duration*100;var d={percent:n=(t-r)%c==0||100===i?i:n,currentDuration:t,step:o};this.eIsVertical=a,0===i?this.trigger("begin",d,function(e){p.successCallback(e,i,n,t,r,h,s)}):100===i||t===this.duration?this.trigger("end",d,function(e){p.successCallback(e,i,n,t,r,h,s)}):this.trigger("progress",d,function(e){p.successCallback(e,i,n,t,r,h,s)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},s.prototype.successCallback=function(e,t,s,i,n,o,r){var a=this,p=t,l=s,c=o,h=i,d=n,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(h-d)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,d=h),this.isPaused||(h<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),h,u,p,l,e.step,d,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},s.prototype.startContAnimate=function(){var e=this,s=this.element.getElementsByClassName(k)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(s,{duration:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){s.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},s.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add("e-progress-active");for(var s=this.percent;s<100;s++)(s+=10)>100&&(s=100),this.enableProgress&&(this.getProgress().style[t?"height":"width"]=this.percent<100?s+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var i={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",i),this.progressTime=this.percent=0},s.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(k)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},s.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(k)[0];if(this.element.classList.contains("e-hide-spinner")||i.hideSpinner(this.element.querySelector(".e-spinner")),this.element.classList.remove("e-progress-active"),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},s.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(k)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},s.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0"})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},s.prototype.onPropertyChanged=function(s,n){var o=this.element,r=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(r=!0),e.prototype.onPropertyChanged.call(this,s,n);for(var a=0,p=Object.keys(s);a<p.length;a++)switch(p[a]){case"content":this.setContent(),this.createSpinner(),r&&(i.showSpinner(this.element.querySelector(".e-spinner")),r=!1),this.enableProgress&&this.createProgress(),o.setAttribute("aria-label",o.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":s.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":s.spinSettings.position&&(o.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(s.spinSettings.template||s.spinSettings.width)&&(o.removeChild(this.getSpinner()),this.createSpinner())}},s.prototype.focusIn=function(){this.element.focus()},w([t.Property(!1)],s.prototype,"enableProgress",void 0),w([t.Property(2e3)],s.prototype,"duration",void 0),w([t.Property("Left")],s.prototype,"iconPosition",void 0),w([t.Property("")],s.prototype,"iconCss",void 0),w([t.Property(!1)],s.prototype,"disabled",void 0),w([t.Property(!1)],s.prototype,"isPrimary",void 0),w([t.Property("")],s.prototype,"cssClass",void 0),w([t.Property("")],s.prototype,"content",void 0),w([t.Property(!1)],s.prototype,"isToggle",void 0),w([t.Property(!1)],s.prototype,"enableHtmlSanitizer",void 0),w([t.Complex({},O)],s.prototype,"spinSettings",void 0),w([t.Complex({},L)],s.prototype,"animationSettings",void 0),w([t.Event()],s.prototype,"created",void 0),w([t.Event()],s.prototype,"begin",void 0),w([t.Event()],s.prototype,"progress",void 0),w([t.Event()],s.prototype,"end",void 0),w([t.Event()],s.prototype,"fail",void 0),s=w([t.NotifyPropertyChanges],s)}(s.Button);return e.getModel=n,e.upDownKeyHandler=o,e.setBlankIconStyle=a,e.Item=h,e.DropDownButton=y,e.SplitButton=C,e.Deferred=P,e.createButtonGroup=p,e.SpinSettings=O,e.AnimationSettings=L,e.ProgressButton=S,e}({},ej.base,ej.buttons,ej.popups),this.ejs=ej; | ||
//# sourceMappingURL=ej2-splitbuttons.min.js.map |
/*! | ||
* filename: index.d.ts | ||
* version : 22.1.34 | ||
* version : 22.1.37 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-splitbuttons@*", | ||
"_id": "@syncfusion/ej2-splitbuttons@19.16.4", | ||
"_id": "@syncfusion/ej2-splitbuttons@22.1.34", | ||
"_inBundle": false, | ||
"_integrity": "sha512-pdd+0KrIvNC36MvqFxzE4EN8ZejyHgtWW7LttFKNwSOEuUmn5lHr3iIq6A4klPezR2KmG5oXDsbMDSLWdIH1wQ==", | ||
"_integrity": "sha512-YAjYQpnVZZjv1FiJCt8xoz00RuY4K9BJQWl/z6tyfatY8hO7447X+qaTyzf4Em89XO7VgxDYvMIBXl+IlgccuQ==", | ||
"_location": "/@syncfusion/ej2-splitbuttons", | ||
@@ -36,4 +36,4 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-splitbuttons/-/ej2-splitbuttons-19.16.4.tgz", | ||
"_shasum": "e2b23a99127c2bb57ff5540052a4c0f3009348c8", | ||
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-splitbuttons/-/ej2-splitbuttons-22.1.34.tgz", | ||
"_shasum": "d20d7c3376735a21d23f4c3e5901431b61c98391", | ||
"_spec": "@syncfusion/ej2-splitbuttons@*", | ||
@@ -50,3 +50,3 @@ "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included", | ||
"@syncfusion/ej2-base": "~22.1.34", | ||
"@syncfusion/ej2-popups": "~22.1.34" | ||
"@syncfusion/ej2-popups": "~22.1.37" | ||
}, | ||
@@ -94,4 +94,4 @@ "deprecated": false, | ||
"typings": "index.d.ts", | ||
"version": "22.1.34", | ||
"version": "22.1.37", | ||
"sideEffects": false | ||
} |
@@ -85,2 +85,6 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
else if (this.createPopupOnClick && !this.isPopupCreated) { | ||
this.createPopup(); | ||
this.openPopUp(); | ||
} | ||
else { | ||
@@ -368,2 +372,8 @@ this.closePopup(); | ||
var val = null; | ||
if (!this.dropDown && this.activeElem[0].classList.contains('e-split-btn')) { | ||
var dropDownBtn = getComponent(this.activeElem[1], 'dropdown-btn'); | ||
if (dropDownBtn) { | ||
this.dropDown = dropDownBtn.dropDown; | ||
} | ||
} | ||
if (this.dropDown) { | ||
@@ -390,2 +400,5 @@ val = this.dropDown.element; | ||
DropDownButton.prototype.popupWireEvents = function () { | ||
if (!this.delegateMousedownHandler) { | ||
this.delegateMousedownHandler = this.mousedownHandler.bind(this); | ||
} | ||
var popupElement = this.getPopUpElement(); | ||
@@ -509,3 +522,3 @@ if (this.createPopupOnClick) { | ||
if (closest(trgt, '[id="' + this.element.id + '"]')) { | ||
if (!this.createPopupOnClick || (this.target && !this.isColorPicker())) { | ||
if (!this.createPopupOnClick || (this.target && this.target !== '' && !this.isColorPicker())) { | ||
if (this.getPopUpElement().classList.contains('e-popup-close')) { | ||
@@ -643,5 +656,2 @@ this.openPopUp(e); | ||
} | ||
if (_this.target) { | ||
_this.isPopupCreated = _this.createPopupOnClick ? false : true; | ||
} | ||
} | ||
@@ -648,0 +658,0 @@ else { |
@@ -210,2 +210,4 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
this.isPopupCreated = this.secondaryBtnObj.isPopupCreated; | ||
this.secondaryBtnObj.activeElem = [this.element, this.secondaryBtnObj.element]; | ||
@@ -296,3 +298,3 @@ this.secondaryBtnObj.element.querySelector('.e-btn-icon').classList.remove('e-icon-right'); | ||
this.clickHandler(e); | ||
if (!this.getPopUpElement().classList.contains('e-popup-close')) { | ||
if (this.getPopUpElement() && !this.getPopUpElement().classList.contains('e-popup-close')) { | ||
this.element.classList.remove('e-active'); | ||
@@ -299,0 +301,0 @@ this.secondaryBtnObj.element.classList.add('e-active'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3640236
71974