@progress/kendo-angular-menu
Advanced tools
Comparing version 1.3.0-dev.201905291318 to 1.3.0
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-angular-menu",["tslib","@progress/kendo-angular-l10n","@angular/core","@angular/common","@progress/kendo-angular-popup"],function(k){var r,a,s,p,c;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){r=t(e)},function(e){a=t(e)},function(e){s=t(e)},function(e){p=t(e)},function(e){c=t(e)}],execute:function(){function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var n,o;o={},i.m=n=[function(e,t){e.exports=r},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function o(e,t){return e.siblingIndex-t.siblingIndex}function i(e,t,n){for(var i=t[e+n];!i;)e<0?e=t.length-1:e>=t.length?e=0:e+=n,i=t[e];return i}var r=n(0),a=n(1),s=/_?\d+$/,p=0,c=(Object.defineProperty(u.prototype,"hasItems",{get:function(){return 0<Object.keys(this.items).length},enumerable:!0,configurable:!0}),u.prototype.childId=function(e){return this.idPrefix+"-child"+e},u.prototype.itemIndex=function(e,t){return(e?e+"_":"")+t},u.prototype.get=function(e){return this.items[e]},u.prototype.add=function(e){this.items[e.index]=e},u.prototype.remove=function(e){delete this.items[e.index]},u.prototype.addList=function(e){this.lists.push(e)},u.prototype.removeList=function(e){var t=this.lists.indexOf(e);0<=t&&this.lists.splice(t,1)},u.prototype.containsList=function(t){return Boolean(this.lists.find(function(e){return e.element.nativeElement===t}))},u.prototype.siblings=function(e){var t=this,n=this.parentIndex(e.index);return this.filter(function(e){return t.parentIndex(e)===n})},u.prototype.otherSiblings=function(t){var n=this,i=this.parentIndex(t.index);return this.filter(function(e){return n.parentIndex(e)===i&&e!==t.index})},u.prototype.children=function(t){var n=this;return this.filter(function(e){return n.parentIndex(e)===t.index})},u.prototype.parent=function(e){return this.items[this.parentIndex(e.index)]},u.prototype.root=function(e){return this.items[this.indices(e.index)[0]]},u.prototype.indices=function(e){return e.split("_")},u.prototype.filter=function(e){var t=[],n=this.items;for(var i in n)e(i,n[i])&&t.push(n[i]);return t.sort(o)},u.prototype.previous=function(e){var t=this.siblings(e),n=t.indexOf(e);return i(n,t,-1)},u.prototype.next=function(e){var t=this.siblings(e),n=t.indexOf(e);return i(n,t,1)},u.prototype.hasParent=function(e,t){return e.index.startsWith(t.index)},u.prototype.areSiblings=function(e,t){return e!==t&&this.parent(e)===this.parent(t)},u.prototype.forEach=function(e){var t=this.items;for(var n in t)t.hasOwnProperty(n)&&e(t[n])},u.prototype.parentIndex=function(e){return e.replace(s,"")},r.__decorate([a.Injectable()],u));function u(){this.items={},this.lists=[],this.idPrefix="k-menu"+p++}t.ItemsService=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);t.hasObservers=function(e){return e&&0<e.observers.length},t.defined=function(e){return void 0!==e},t.bodyFactory=function(){if("undefined"!=typeof document)return new i.ElementRef(document.body)}},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=i.__decorate([o.Directive({selector:"[kendoMenuItemLinkTemplate]"}),i.__param(0,o.Optional()),i.__metadata("design:paramtypes",[o.TemplateRef])],a);function a(e){this.templateRef=e}t.ItemLinkTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=i.__decorate([o.Directive({selector:"[kendoMenuItemTemplate]"}),i.__param(0,o.Optional()),i.__metadata("design:paramtypes",[o.TemplateRef])],a);function a(e){this.templateRef=e}t.ItemTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(15),a=n(6),s=n(5),p=(Object.defineProperty(c.prototype,"rootItems",{get:function(){return this.items||(this.children?this.children.toArray():[])},enumerable:!0,configurable:!0}),i.__decorate([o.Input(),i.__metadata("design:type",Array)],c.prototype,"items",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],c.prototype,"vertical",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],c.prototype,"openOnClick",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number)],c.prototype,"hoverDelay",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],c.prototype,"animate",void 0),i.__decorate([o.ContentChildren(a.ItemTemplateDirective),i.__metadata("design:type",o.QueryList)],c.prototype,"itemTemplate",void 0),i.__decorate([o.ContentChildren(s.ItemLinkTemplateDirective),i.__metadata("design:type",o.QueryList)],c.prototype,"itemLinkTemplate",void 0),i.__decorate([o.ContentChildren(r.MenuItemComponent),i.__metadata("design:type",o.QueryList)],c.prototype,"children",void 0),c);function c(){this.vertical=!1,this.openOnClick=!1,this.hoverDelay=100,this.animate=!0}t.MenuBase=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(3),a=n(10),s=(p.prototype.emit=function(e,t){this.owner.emitMenuEvent(e,t)},p.prototype.hasObservers=function(e){return this.owner&&r.hasObservers(this.owner[e])},p.prototype.leaveMenu=function(e){return!this.items||!a.inMenu(e.target,this.items)},i.__decorate([o.Injectable()],p));function p(){this.keydown=new o.EventEmitter}t.ContextMenuService=s},function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.NODE_INDEX="data-kendo-menu-index",(i=t.KeyCodes||(t.KeyCodes={}))[i.ESC=27]="ESC",i[i.LEFT=37]="LEFT",i[i.UP=38]="UP",i[i.RIGHT=39]="RIGHT",i[i.DOWN=40]="DOWN",i[i.F10=121]="F10"},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=t(9),r=/^(?:a|input|select|option|textarea|button|object)$/i;a.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e},a.closestInScope=function(e,t,n){for(;e&&e!==n&&!t(e);)e=e.parentNode;if(e!==n)return e},a.isFocusable=function(e){if(e.tagName){var t=e.tagName.toLowerCase(),n=e.getAttribute("tabIndex"),i="-1"===n,o=null!==n&&!i;return r.test(t)&&(o=!e.disabled&&!i),o}return!1};function i(e){return String(e).trim().split(" ")}a.hasClass=function(e,t){return 0<=i(e.className).indexOf(t)},a.matchesClasses=function(e){var n=i(e);return function(e){var t=i(e.className);return Boolean(n.find(function(e){return 0<=t.indexOf(e)}))}},a.nodeIndex=function(e){return e.getAttribute(n.NODE_INDEX)},a.closestItem=function(e,t){return a.closestInScope(e,a.nodeIndex,t)},a.closestList=function(e){var t=a.closest(e,a.matchesClasses("k-menu-popup k-menu k-menu-group"));return t&&a.hasClass(t,"k-menu-popup")&&(t=t.querySelector(".k-menu-group")),t},a.inMenu=function(e,t){if(e===t.lists[0].element.nativeElement)return!1;var n=a.closestList(e);return n&&t.containsList(n)},a.findInContainer=function(e,t,n){var i=n.getAttribute("id");i||n.setAttribute("id","kendo-matches-container");var o="#"+(i||"kendo-matches-container")+" "+t,r=a.closestInScope(e,function(e){return n=o,((t=e).matches||t.msMatchesSelector).call(t,n);var t,n},n);return i||n.removeAttribute("id"),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=n(17),s=n(3),p=(c.prototype.open=function(e,t){e.disabled||(e.hasContent&&!e.opened?this.actions.push({name:"open",requiresZone:e.hasContentTemplates(),item:e,finished:t}):t&&t())},c.prototype.close=function(e){this.closeChildren(e),this.closeItem(e)},c.prototype.closeItem=function(e){e.opened&&this.actions.push({name:"close",item:e})},c.prototype.closeToRoot=function(e){this.closeChildren(e);for(var t=e;this.closeItem(t),t=this.items.parent(t););},c.prototype.closeOthers=function(e){this.closeChildren(e);for(var t=e;t;){var n=this.items.otherSiblings(t);this.closeItems(n),t=this.items.parent(t)}},c.prototype.closeAll=function(){var t=this;this.items.forEach(function(e){e.opened&&0===e.level&&t.close(e)})},c.prototype.select=function(e,t,n,i){this.actions.push({name:"select",item:e,prevented:n,finished:i,domEvent:t})},c.prototype.emit=function(e,t,n){var i=this.owner,o=new a.MenuEvent({sender:i,item:t.item,index:t.index,originalEvent:n,hasContent:t.hasContent});return i[e].emit(o),i.contextService&&i.contextService.emit(e,o),o.isDefaultPrevented()},Object.defineProperty(c.prototype,"hasPending",{get:function(){return 0<this.actions.length},enumerable:!0,configurable:!0}),c.prototype.execute=function(e){var t=this;if(this.hasPending||e){var n=e||this.clear();!o.NgZone.isInAngularZone()&&this.requiresZone(n)?this.ngZone.run(function(){t.executeActions(n)}):this.executeActions(n)}},c.prototype.clear=function(){var e=this.actions;return this.actions=[],e},c.prototype.executeActions=function(e){for(var t=0;t<e.length;t++){var n=e[t],i=n.item,o=n.name,r=n.prevented,a=n.finished,s=n.domEvent;p=i,"open"===(c=o)&&p.opened||"close"===c&&!p.opened||(this.emit(o,i,s)?r&&r():(i[o]&&i[o](),a&&a()))}var p,c},c.prototype.requiresZone=function(e){for(var t=e||this.actions,n=this.owner,i=n.contextService,o=0;o<t.length;o++){var r=t[o],a=r.name;if(r.requiresZone||a&&(s.hasObservers(n[a])||i&&i.hasObservers(a)))return!0}return!1},c.prototype.closeChildren=function(e){if(e.opened){var t=this.items.children(e);this.closeItems(t)}},c.prototype.closeItems=function(e){for(var t=0;t<e.length;t++)this.close(e[t])},i.__decorate([o.Injectable(),i.__metadata("design:paramtypes",[o.NgZone,r.ItemsService])],c));function c(e,t){this.ngZone=e,this.items=t,this.actions=[]}t.ActionsService=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=i.__decorate([o.Directive({selector:"[kendoContextMenuTemplate]"}),i.__param(0,o.Optional()),i.__metadata("design:paramtypes",[o.TemplateRef])],a);function a(e){this.templateRef=e}t.ContextMenuTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(26),a=n(4),s=n(37),p=n(15),c=n(34),u=n(33),l=n(32),d=n(31),m=n(6),h=n(5),v=n(14),f=n(30),_=n(27),g=[s.MenuComponent,p.MenuItemComponent,m.ItemTemplateDirective,h.ItemLinkTemplateDirective,v.ItemContentTemplateDirective,f.HierarchyBindingDirective,_.FlatBindingDirective,l.LinkDirective,d.ExpandArrowDirective],y=g.concat([c.ListComponent,u.ItemComponent]),b=i.__decorate([o.NgModule({declarations:[y],exports:[g],imports:[a.PopupModule,r.CommonModule]})],C);function C(){}t.MenuModule=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=i.__decorate([o.Directive({selector:"[kendoMenuItemContentTemplate]"}),i.__param(0,o.Optional()),i.__metadata("design:paramtypes",[o.TemplateRef])],a);function a(e){this.templateRef=e}t.ItemContentTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=n(1),a=n(6),s=n(5),p=n(14),c=(i=u,Object.defineProperty(u.prototype,"template",{get:function(){if(this.itemTemplate&&this.itemTemplate.length)return this.itemTemplate.first.templateRef},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"linkTemplate",{get:function(){if(this.itemLinkTemplate&&this.itemLinkTemplate.length)return this.itemLinkTemplate.first.templateRef},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"contentTemplate",{get:function(){if(this.itemContentTemplate&&this.itemContentTemplate.length)return this.itemContentTemplate.first.templateRef},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){if(this.children.length)return this.children.toArray().slice(1)},enumerable:!0,configurable:!0}),o.__decorate([r.Input(),o.__metadata("design:type",String)],u.prototype,"text",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],u.prototype,"url",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Boolean)],u.prototype,"disabled",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],u.prototype,"cssClass",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],u.prototype,"cssStyle",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],u.prototype,"icon",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],u.prototype,"data",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Boolean)],u.prototype,"separator",void 0),o.__decorate([r.ContentChildren(a.ItemTemplateDirective),o.__metadata("design:type",r.QueryList)],u.prototype,"itemTemplate",void 0),o.__decorate([r.ContentChildren(s.ItemLinkTemplateDirective),o.__metadata("design:type",r.QueryList)],u.prototype,"itemLinkTemplate",void 0),o.__decorate([r.ContentChildren(p.ItemContentTemplateDirective),o.__metadata("design:type",r.QueryList)],u.prototype,"itemContentTemplate",void 0),o.__decorate([r.ContentChildren(i),o.__metadata("design:type",r.QueryList)],u.prototype,"children",void 0),o.__decorate([r.Component({selector:"kendo-menu-item",template:""})],u));function u(){}t.MenuItemComponent=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(18),a=n(2),s=n(11),p=/\S/,c={37:"left",39:"right",38:"up",40:"down",36:"home",35:"end",32:"enter",13:"enter",27:"esc",9:"tab"},u=Object.assign({},c,{37:"right",39:"left"}),l=Promise.resolve(null),d=(Object.defineProperty(m.prototype,"focusedItem",{get:function(){return this.items.get(this.focusedIdx)},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,"activeItem",{get:function(){return this.items.get(this.activeIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,"handlers",{get:function(){return this.localization.rtl?u:c},enumerable:!0,configurable:!0}),m.prototype.focus=function(e){e.index!==this.focusedIdx&&(this.activeItem&&this.items.hasParent(e,this.activeItem)||this.setActive(e),this.setFocus(e))},m.prototype.setFocus=function(e){this.focusedIdx=e.index,e.focus()},m.prototype.focusLeave=function(){var e=this.focusedItem;e&&(this.actions.closeToRoot(e),this.actions.execute()),this.focusedIdx=null},m.prototype.updateActive=function(){var e=this;!this.activeItem&&this.items.hasItems&&(this.items.get("0").toggleActive(!0),this.ngZone.runOutsideAngular(function(){l.then(function(){e.activeIndex="0"})}))},m.prototype.keydown=function(e){var t,n=this.focusedItem||this.activeItem,i=this.handlers[e.keyCode];n&&(i?("tab"!==i&&e.preventDefault(),this[i](n,e)):1===(t=e.key).length&&p.test(t)&&this.search(n,e.key),this.actions.execute())},m.prototype.focusIndex=function(e){if(!e&&this.activeItem)this.setFocus(this.activeItem);else if("first"===e)this.focusFirst();else if("last"===e)this.focusLast();else{var t=this.items.get(e);t&&this.focus(t)}},m.prototype.focusFirst=function(){var e=this.items.siblings(this.items.get("0"));this.focus(e[0])},m.prototype.focusLast=function(){var e=this.items.siblings(this.items.get("0"));this.focus(e[e.length-1])},m.prototype.search=function(e,t){for(var n=this.items.siblings(e),i=n.indexOf(e),o=n.slice(i+1).concat(n.slice(0,i)),r=0;r<o.length;r++){var a=o[r];if((a.item.text||"").toLowerCase().startsWith(t.toLowerCase())){this.focus(a);break}}},m.prototype.down=function(e){0!==e.level||this.vertical?this.focus(this.items.next(e)):e.hasContent&&this.actions.open(e,this.focusChild(e,0))},m.prototype.up=function(e){0!==e.level||this.vertical?this.focus(this.items.previous(e)):e.hasContent&&this.actions.open(e,this.focusChild(e,e.children.length-1))},m.prototype.left=function(e){if(!this.vertical||0!==e.level||!e.disabled)if(1<e.level||this.vertical&&0<e.level){var t=this.items.parent(e);this.focus(t),this.actions.close(t)}else this.vertical&&0===e.level&&!e.disabled?e.hasContent&&this.actions.open(e,this.focusChild(e,e.children.length-1)):this.focus(this.items.previous(this.activeItem))},m.prototype.right=function(e){this.vertical&&0===e.level&&e.disabled||(e.horizontal&&!e.disabled?e.hasContent?this.actions.open(e,this.focusChild(e,0)):(!this.vertical||0<e.level)&&this.focus(this.items.next(this.activeItem)):this.focus(this.items.next(this.activeItem)))},m.prototype.home=function(e){var t=this.items.siblings(e);this.focus(t[0])},m.prototype.end=function(e){var t=this.items.siblings(e);this.focus(t[t.length-1])},m.prototype.enter=function(e,t){var n=this.actions;e.disabled||(e.hasContent?(n.select(e,t),n.open(e,this.focusChild(e,0))):(n.select(e,t,null,function(){e.navigate()}),this.focus(this.items.root(e)),n.closeToRoot(e)))},m.prototype.esc=function(e){if(0<e.level){var t=this.items.parent(e);this.actions.close(t),this.focus(t)}},m.prototype.tab=function(e){0<e.level&&this.activeItem.focus()},m.prototype.focusChild=function(t,n){var i=this;return function(){var e=i.items.children(t)[n];i.setFocus(e)}},m.prototype.setActive=function(e){var t=this.focusedItem,n=this.items.root(e);this.activeItem&&this.activeItem.toggleActive(!1),this.activeIndex=n.index,n.toggleActive(!0),t&&(this.actions.closeToRoot(t),0<t.level&&this.actions.open(n))},i.__decorate([o.Injectable(),i.__metadata("design:paramtypes",[a.ItemsService,s.ActionsService,r.LocalizationService,o.NgZone])],m));function m(e,t,n,i){this.items=e,this.actions=t,this.localization=n,this.ngZone=i,this.vertical=!1,this.activeIndex="0"}t.NavigationService=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=(i=n(36).PreventableEvent,o.__extends(a,i),a);function a(){return null!==i&&i.apply(this,arguments)||this}t.MenuEvent=r},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(26),a=n(4),s=n(13),p=n(23),c=n(12),u=n(20),l=n(22),d=[p.ContextMenuComponent,c.ContextMenuTemplateDirective,u.ContextMenuTargetDirective,l.ContextMenuTargetContainerDirective],m=i.__decorate([o.NgModule({declarations:[d],exports:[d,s.MenuModule],imports:[a.PopupModule,r.CommonModule,s.MenuModule]})],h);function h(){}t.ContextMenuModule=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(21);t.TARGET_CLASS="k-contextmenu-target";var a=(s.prototype.ngOnDestroy=function(){this.targetService.remove(this)},i.__decorate([o.Input("kendoContextMenuTarget"),i.__metadata("design:type",Object)],s.prototype,"data",void 0),i.__decorate([o.HostBinding("class."+t.TARGET_CLASS),i.__metadata("design:type",Boolean)],s.prototype,"hostClass",void 0),i.__decorate([o.Directive({selector:"[kendoContextMenuTarget]",exportAs:"kendoContextMenuTarget"}),i.__metadata("design:paramtypes",[o.ElementRef,r.ContextMenuTargetService])],s));function s(e,t){this.targetService=t,this.hostClass=!0,e&&(this.element=e.nativeElement),t.add(this)}t.ContextMenuTargetDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=(a.prototype.add=function(e){this.targets.push(e)},a.prototype.remove=function(e){var t=this.targets.indexOf(e);this.targets.splice(t,1)},a.prototype.find=function(t){return this.targets.find(function(e){return e.element===t})},i.__decorate([o.Injectable()],a));function a(){this.targets=[]}t.ContextMenuTargetService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(21),a=i.__decorate([o.Directive({selector:"[kendoContextMenuTargetContainer]",exportAs:"kendoContextMenuTargetContainer",providers:[r.ContextMenuTargetService]}),i.__metadata("design:paramtypes",[o.ElementRef,r.ContextMenuTargetService])],s);function s(e,t){this.targetService=t,e&&(this.element=e.nativeElement)}t.ContextMenuTargetContainerDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function o(e){return e.preventDefault()}var r,i,a=n(0),s=n(1),p=n(18),c=n(4),u=n(7),l=n(24),d=n(8),m=n(39),h=n(12),v=n(10),f=n(3),_=n(2),g=n(22),y=n(20),b=n(3),C=n(9),I="contextmenu",x={horizontal:"left",vertical:"bottom"},O={horizontal:"left",vertical:"top"},k={horizontal:"fit",vertical:"flip"},T=(r=u.MenuBase,a.__extends(S,r),(i=S).prototype.hide=function(){this.removePopup()},S.prototype.show=function(e){if(e){var t=e;this.removePopup(),f.defined(t.left)&&f.defined(t.top)?this.createPopup({offset:t}):(this.currentTarget=t.nativeElement||t,this.createPopup({anchor:this.currentTarget}))}},S.prototype.ngOnChanges=function(e){(e.target||e.showOn)&&this.bindShowHandler()},S.prototype.ngOnInit=function(){var n=this;this.ngZone.runOutsideAngular(function(){var e=n.renderer.listen("document","mousedown",function(e){n.popupRef&&!v.closest(e.target,function(e){return e===n.popupRef.popupElement})&&n.service.leaveMenu(e)&&n.closePopup(e)}),t=n.renderer.listen("window","blur",function(e){n.popupRef&&n.closePopup(e)});n.closeSubscription=function(){e(),t()}})},S.prototype.ngOnDestroy=function(){this.closeSubscription&&(this.closeSubscription(),this.closeSubscription=null),this.unbindShowHandler(),this.removePopup()},S.prototype.emitMenuEvent=function(e,t){t.target=this.currentTarget,(t.sender=this)[e].emit(t),"select"!==e||t.hasContent||this.closeAndFocus(t.originalEvent)},S.prototype.bindShowHandler=function(){var n=this;this.unbindShowHandler(),this.ngZone.runOutsideAngular(function(){var t=n.targetElement();if(t){var e=n.showOn||I;n.showSubscription=n.renderer.listen(t,n.showOn||I,function(e){n.showContextMenu(e,t)}),e===I&&(n.keydownSubscription=n.renderer.listen(t,"keydown",function(e){e.shiftKey&&e.keyCode===C.KeyCodes.F10&&n.showContextMenu(e,t)}))}})},S.prototype.showContextMenu=function(e,t){var n=this,i=this.targetFilter();if(this.currentTarget=t,i){var o=this.currentTarget=v.findInContainer(e.target,i,t);if(o&&o!==e.target&&v.isFocusable(e.target))return void(this.currentTarget=null);o&&this.directiveTarget&&(this.currentTarget=this.target.targetService.find(o))}this.currentTarget?this.ngZone.run(function(){n.closePopup(e)||n.openPopup(e)}):this.closePopup(e)},S.prototype.unbindShowHandler=function(){this.showSubscription&&(this.showSubscription(),this.showSubscription=null),this.keydownSubscription&&(this.keydownSubscription(),this.keydownSubscription=null)},S.prototype.targetElement=function(){if("undefined"!=typeof document){this.directiveTarget=!1;var e=this.target;return"string"==typeof e?e=document.querySelector(e):e&&e.nativeElement?e=e.nativeElement:e instanceof g.ContextMenuTargetContainerDirective&&(e=e.element,this.directiveTarget=!0),e}},S.prototype.targetFilter=function(){return this.directiveTarget?"."+y.TARGET_CLASS:this.filter},S.prototype.closePopup=function(e){var t=this;if(this.popupRef)return this.popupAction("popupClose",e,function(){t.removePopup()})},S.prototype.removePopup=function(){this.popupRef&&(this.popupRef.close(),this.popupRef=null,this.currentTarget=null),this.popupSubscriptions&&(this.popupSubscriptions(),this.popupSubscriptions=null)},S.prototype.openPopup=function(n){var i=this;this.popupAction("popupOpen",n,function(){var e,t;n.preventDefault(),i.alignToAnchor||"keydown"===n.type?e=i.currentTargetElement:t={left:n.pageX,top:n.pageY},i.createPopup({anchor:e,offset:t})})},S.prototype.createPopup=function(e){var n=this;this.popupRef=this.popupService.open(Object.assign({animate:!f.defined(this.popupAnimate)||this.popupAnimate,appendTo:this.appendTo,collision:this.collision||k,popupAlign:this.popupAlign||O,anchorAlign:this.anchorAlign||x,content:this.contentTemplate?this.contentTemplate.templateRef:this.defaultContentTemplate},e));var i=this.popupRef.popupElement;this.renderer.setAttribute(i,"tabindex","-1"),this.renderer.setStyle(i,"outline","0"),this.ariaLabel&&this.renderer.setAttribute(i,"aria-label",this.ariaLabel),this.activeTarget=this.currentTargetElement===document.activeElement,this.ngZone.runOutsideAngular(function(){var e=n.renderer.listen(i,"keydown",n.popupKeyDownHandler),t=n.renderer.listen(i,"contextmenu",o);n.popupSubscriptions=function(){e(),t()}}),i.focus()},S.prototype.closeAndFocus=function(e){var t=this.currentTargetElement;!this.closePopup(e)&&this.activeTarget&&t.focus()},S.prototype.popupKeyDownHandler=function(e){var t=this.popupRef.popupElement;e.keyCode!==C.KeyCodes.ESC||!v.hasClass(e.target,"k-menu-item")&&e.target!==t?e.target===t&&this.service.keydown.emit(e):this.closeAndFocus(e)},S.prototype.popupAction=function(e,t,n){var i=this,o=this[e],r=!1;return f.hasObservers(o)?this.ngZone.run(function(){var e=new l.ContextMenuPopupEvent({originalEvent:t,sender:i,target:i.currentTarget});o.emit(e),e.isDefaultPrevented()||n(),r=e.isDefaultPrevented()}):n(),r},Object.defineProperty(S.prototype,"currentTargetElement",{get:function(){return this.directiveTarget&&this.currentTarget?this.currentTarget.element:this.currentTarget},enumerable:!0,configurable:!0}),a.__decorate([s.Input(),a.__metadata("design:type",String)],S.prototype,"showOn",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Object)],S.prototype,"target",void 0),a.__decorate([s.Input(),a.__metadata("design:type",String)],S.prototype,"filter",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Boolean)],S.prototype,"alignToAnchor",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Boolean)],S.prototype,"vertical",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Object)],S.prototype,"popupAnimate",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Object)],S.prototype,"popupAlign",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Object)],S.prototype,"anchorAlign",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Object)],S.prototype,"collision",void 0),a.__decorate([s.Input(),a.__metadata("design:type",s.ViewContainerRef)],S.prototype,"appendTo",void 0),a.__decorate([s.Input(),a.__metadata("design:type",String)],S.prototype,"ariaLabel",void 0),a.__decorate([s.Output(),a.__metadata("design:type",s.EventEmitter)],S.prototype,"popupOpen",void 0),a.__decorate([s.Output(),a.__metadata("design:type",s.EventEmitter)],S.prototype,"popupClose",void 0),a.__decorate([s.Output(),a.__metadata("design:type",s.EventEmitter)],S.prototype,"select",void 0),a.__decorate([s.Output(),a.__metadata("design:type",s.EventEmitter)],S.prototype,"open",void 0),a.__decorate([s.Output(),a.__metadata("design:type",s.EventEmitter)],S.prototype,"close",void 0),a.__decorate([s.ContentChild(h.ContextMenuTemplateDirective),a.__metadata("design:type",h.ContextMenuTemplateDirective)],S.prototype,"contentTemplate",void 0),a.__decorate([s.ViewChild("default"),a.__metadata("design:type",s.TemplateRef)],S.prototype,"defaultContentTemplate",void 0),i=a.__decorate([s.Component({exportAs:"kendoContextMenu",providers:[d.ContextMenuService,p.LocalizationService,{provide:p.L10N_PREFIX,useValue:"kendo.contextmenu"},{provide:_.ItemsService,useClass:m.ContextMenuItemsService},{provide:u.MenuBase,useExisting:s.forwardRef(function(){return i})},c.PopupService,{provide:c.POPUP_CONTAINER,useFactory:b.bodyFactory}],selector:"kendo-contextmenu",template:'\n <ng-template #default>\n <kendo-menu [items]="rootItems"\n [vertical]="vertical"\n [openOnClick]="openOnClick"\n [hoverDelay]="hoverDelay"\n [animate]="animate"\n [menuItemTemplate]="itemTemplate.first?.templateRef"\n [menuItemLinkTemplate]="itemLinkTemplate.first?.templateRef"\n ></kendo-menu>\n </ng-template>\n '}),a.__metadata("design:paramtypes",[c.PopupService,d.ContextMenuService,s.NgZone,s.Renderer2])],S));function S(e,t,n,i){var o=r.call(this)||this;return o.popupService=e,o.service=t,o.ngZone=n,o.renderer=i,o.showOn=I,o.alignToAnchor=!1,o.vertical=!0,o.popupOpen=new s.EventEmitter,o.popupClose=new s.EventEmitter,o.select=new s.EventEmitter,o.open=new s.EventEmitter,o.close=new s.EventEmitter,(o.service.owner=o).popupKeyDownHandler=o.popupKeyDownHandler.bind(o),o}t.ContextMenuComponent=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=(i=n(36).PreventableEvent,o.__extends(a,i),a);function a(){return null!==i&&i.apply(this,arguments)||this}t.ContextMenuPopupEvent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function i(){}t.ContextMenuEvent=i},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=n(1),a=n(7),s=n(29),u=n(28),p=(i=s.BindingDirectiveBase,o.__extends(c,i),c.prototype.mapItems=function(e){var t=this;if(!this.idField||!this.parentIdField)return e.map(function(e){return t.createItem(e)});for(var n=[],i={},o=0;o<e.length;o++){var r=e[o],a=this.createItem(r),s=u.getter(this.idField)(r),p=u.getter(this.parentIdField)(r);if(null==p)n.push(a);else{var c=i[p]=i[p]||{};c.items=c.items||[],c.items.push(a)}i[s]&&(a.items=i[s].items),i[s]=a}return n},c.prototype.createItem=function(e){for(var t={data:e},n=this.fields,i=0;i<n.length;i++){var o=n[i],r=o.source;t[o.target]=u.getter(r)(e)}return t},o.__decorate([r.Input("kendoMenuFlatBinding"),o.__metadata("design:type",Array)],c.prototype,"data",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"textField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"urlField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],c.prototype,"iconField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"disabledField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"cssClassField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"cssStyleField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"separatorField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"idField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"parentIdField",void 0),o.__decorate([r.Directive({exportAs:"kendoMenuFlatBinding",selector:"[kendoMenuFlatBinding]"}),o.__metadata("design:paramtypes",[a.MenuBase])],c));function c(e){return i.call(this,e)||this}t.FlatBindingDirective=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,r={undefined:function(e){return e}};t.getter=function(e){if(r[e])return r[e];var o=[];return e.replace(i,function(e,t,n,i){o.push(void 0!==t?t:n||i)}),r[e]=function(e){for(var t=e,n=0;n<o.length&&t;n++)t=t[o[n]];return t},r[e]},t.last=function(e){return e[e.length-1]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=["textField","urlField","iconField","disabledField","cssClassField","cssStyleField","separatorField"],i=(r.prototype.ngOnChanges=function(){this.rebind()},r.prototype.rebind=function(){for(var e=this.fields=[],t=0;t<o.length;t++){var n=o[t],i=this[n];i&&e.push({target:n.replace("Field",""),source:i})}this.menu.items=this.data?this.mapItems(this.data):[]},r);function r(e){this.menu=e}t.BindingDirectiveBase=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function p(e,t){return Array.isArray(e)?e[t]||c.last(e):e}var i,o=n(0),r=n(1),a=n(7),s=n(29),c=n(28),u=(i=s.BindingDirectiveBase,o.__extends(l,i),l.prototype.mapItems=function(e,i){var o=this;return void 0===i&&(i=0),e.map(function(e){var t=o.createItem(e,i),n=o.getChildren(e,i);return n&&(t.items=o.mapItems(n,i+1)),t})},l.prototype.createItem=function(e,t){for(var n={data:e},i=this.fields,o=0;o<i.length;o++){var r=i[o],a=r.target,s=r.source;n[a]=c.getter(p(s,t))(e)}return n},l.prototype.getChildren=function(e,t){if(this.childrenField)return e[p(this.childrenField,t)]},o.__decorate([r.Input("kendoMenuHierarchyBinding"),o.__metadata("design:type",Array)],l.prototype,"data",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"textField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"urlField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"iconField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"disabledField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"cssClassField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"cssStyleField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"separatorField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"childrenField",void 0),o.__decorate([r.Directive({exportAs:"kendoMenuHierarchyBinding",selector:"[kendoMenuHierarchyBinding]"}),o.__metadata("design:paramtypes",[a.MenuBase])],l));function l(e){return i.call(this,e)||this}t.HierarchyBindingDirective=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=(Object.defineProperty(s.prototype,"arrowDown",{get:function(){return!this.item.horizontal},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"arrowRight",{get:function(){return this.item.horizontal&&!this.item.rtl},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"arrowLeft",{get:function(){return this.item.horizontal&&this.item.rtl},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){if(o.isDevMode()&&!this.index)throw new Error("The kendoMenuExpandArrow directive requires the item index to be set.");this.item=this.itemsService.get(this.index)||{}},i.__decorate([o.Input("kendoMenuExpandArrow"),i.__metadata("design:type",String)],s.prototype,"index",void 0),i.__decorate([o.HostBinding("class.k-icon"),o.HostBinding("class.k-menu-expand-arrow"),i.__metadata("design:type",Boolean)],s.prototype,"hostClasses",void 0),i.__decorate([o.HostBinding("attr.role"),i.__metadata("design:type",String)],s.prototype,"role",void 0),i.__decorate([o.HostBinding("class.k-i-arrow-60-down"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],s.prototype,"arrowDown",null),i.__decorate([o.HostBinding("class.k-i-arrow-60-right"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],s.prototype,"arrowRight",null),i.__decorate([o.HostBinding("class.k-i-arrow-60-left"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],s.prototype,"arrowLeft",null),i.__decorate([o.Directive({selector:"[kendoMenuExpandArrow]"}),i.__metadata("design:paramtypes",[r.ItemsService])],s));function s(e){this.itemsService=e,this.hostClasses=!0,this.role="presentation"}t.ExpandArrowDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=(Object.defineProperty(s.prototype,"activeClass",{get:function(){return this.item.opened},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){if(o.isDevMode()&&!this.index)throw new Error("The kendoMenuItemLink directive requires the item index to be set.");this.item=this.itemsService.get(this.index)||{}},i.__decorate([o.Input("kendoMenuItemLink"),i.__metadata("design:type",String)],s.prototype,"index",void 0),i.__decorate([o.HostBinding("class.k-link"),o.HostBinding("class.k-menu-link"),i.__metadata("design:type",Boolean)],s.prototype,"hostClasses",void 0),i.__decorate([o.HostBinding("attr.role"),i.__metadata("design:type",String)],s.prototype,"role",void 0),i.__decorate([o.HostBinding("attr.tabindex"),i.__metadata("design:type",String)],s.prototype,"tabindex",void 0),i.__decorate([o.HostBinding("class.k-state-active"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],s.prototype,"activeClass",null),i.__decorate([o.Directive({selector:"[kendoMenuItemLink]"}),i.__metadata("design:paramtypes",[r.ItemsService])],s));function s(e){this.itemsService=e,this.hostClasses=!0,this.role="presentation",this.tabindex="-1"}t.LinkDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=n(16),s=n(42),p=n(4),c=n(3),u=(Object.defineProperty(l.prototype,"index",{get:function(){return this._index},set:function(e){this._index&&this._index!==e?(this.itemsService.remove(this),this._index=e,this.itemsService.add(this)):this._index=e,this.childId=this.itemsService.childId(e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"disabled",{get:function(){return this.item.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hasPopup",{get:function(){return!!this.hasContent||null},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"expanded",{get:function(){return this.hasContent?this.opened:null},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"label",{get:function(){return this.item.text?this.item.text:null},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"activeId",{get:function(){return this.index===this.navigation.activeIndex?"0":"-1"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"popupSettings",{get:function(){var e=this.rtl?s.POPUP_SETTINGS_RTL:s.POPUP_SETTINGS;return this.horizontal?e.horizontal:e.vertical},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"horizontal",{get:function(){return this.vertical||0<this.level},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hasLink",{get:function(){return Boolean(this.item.url)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"linkTemplate",{get:function(){return this.item.linkTemplate||this.itemLinkTemplate},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hasContent",{get:function(){var e=this.item.items;return e&&e.length||this.item.contentTemplate},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"isContent",{get:function(){return Boolean(this.item.content)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"iconClass",{get:function(){return"k-i-"+this.item.icon},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"children",{get:function(){var e=this.item;return e.contentTemplate?(this.contentItems||(this.contentItems=[{content:e.contentTemplate,owner:e,ownerIndex:this.index}]),this.contentItems):e.items},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"template",{get:function(){return this.item.template||this.itemTemplate},enumerable:!0,configurable:!0}),l.prototype.hasContentTemplates=function(){var e=this.item;return this.itemTemplate||e.contentTemplate||this.itemLinkTemplate||e.items&&e.items.find(function(e){return e.template||e.linkTemplate})},l.prototype.ngOnInit=function(){this.itemsService.add(this)},l.prototype.ngOnDestroy=function(){this.itemsService.remove(this),this.destroyed=!0,this.popupRef&&(this.popupRef.close(),this.popupRef=null)},l.prototype.focus=function(){this.element.nativeElement.focus()},l.prototype.toggleActive=function(e){e?this.setAttribute("tabindex","0"):this.setAttribute("tabindex","-1")},l.prototype.open=function(){if(!this.destroyed&&this.hasContent&&!this.opened){var e=this.popupSettings,t=!!this.animate&&Object.assign({},this.animate,{direction:e.animate});this.opened=!0,this.popupRef=this.popupService.open({popupAlign:e.popup,anchorAlign:e.anchor,collision:e.collision,anchor:this.element,positionMode:"absolute",content:this.popupTemplate,popupClass:{"k-rtl":this.rtl,"k-menu-popup":!0},animate:t}),this.setAttribute("aria-expanded","true"),this.setAttribute("aria-owns",this.childId),this.changeDetector.detectChanges()}},l.prototype.close=function(){!this.destroyed&&this.opened&&(this.opened=!1,this.popupRef&&(this.popupRef.close(),this.popupRef=null),this.changeDetector.detectChanges(),this.setAttribute("aria-expanded","false"),this.renderer.removeAttribute(this.element.nativeElement,"aria-owns"))},l.prototype.navigate=function(){var e;this.linkTemplate?e=this.element.nativeElement.querySelector("a.k-menu-link"):this.hasLink&&(e=this.link.nativeElement),e&&(this.navigating=!0,e.click(),this.navigating=!1)},l.prototype.setAttribute=function(e,t){this.renderer.setAttribute(this.element.nativeElement,e,t)},i.__decorate([o.Input(),i.__metadata("design:type",Object)],l.prototype,"item",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number)],l.prototype,"level",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],l.prototype,"index",null),i.__decorate([o.Input(),i.__metadata("design:type",Number)],l.prototype,"siblingIndex",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],l.prototype,"animate",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],l.prototype,"vertical",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],l.prototype,"rtl",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],l.prototype,"openOnClick",void 0),i.__decorate([o.Input(),i.__metadata("design:type",o.TemplateRef)],l.prototype,"itemTemplate",void 0),i.__decorate([o.Input(),i.__metadata("design:type",o.TemplateRef)],l.prototype,"itemLinkTemplate",void 0),i.__decorate([o.ViewChild("link"),i.__metadata("design:type",o.ElementRef)],l.prototype,"link",void 0),i.__decorate([o.ViewChild("popupTemplate"),i.__metadata("design:type",o.TemplateRef)],l.prototype,"popupTemplate",void 0),i.__decorate([o.HostBinding("attr.aria-disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],l.prototype,"disabled",null),i.__decorate([o.HostBinding("attr.aria-haspopup"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],l.prototype,"hasPopup",null),i.__decorate([o.HostBinding("attr.aria-expanded"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],l.prototype,"expanded",null),i.__decorate([o.HostBinding("attr.aria-label"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],l.prototype,"label",null),i.__decorate([o.HostBinding("attr.tabindex"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],l.prototype,"activeId",null),i.__decorate([o.Component({providers:[p.PopupService,{provide:p.POPUP_CONTAINER,useFactory:c.bodyFactory}],selector:"[kendoMenuItem]",template:'\n <span *ngIf="!hasLink && !item.content && !linkTemplate" class="k-link k-menu-link" #link\n [class.k-state-active]="opened" role="presentation">\n <ng-template [ngTemplateOutlet]="itemcontent">\n </ng-template>\n </span>\n <a *ngIf="item.url && !linkTemplate" class="k-link k-menu-link" #link [attr.href]="item.url"\n [class.k-state-active]="opened" tabindex="-1" role="presentation">\n <ng-template [ngTemplateOutlet]="itemcontent">\n </ng-template>\n </a>\n <ng-template *ngIf="linkTemplate && !item.content" [ngTemplateOutlet]="linkTemplate"\n [ngTemplateOutletContext]="{ item: item, index: index }">\n </ng-template>\n\n <div class="k-content" *ngIf="item.content" role="presentation">\n <ng-template [ngTemplateOutlet]="item.content" [ngTemplateOutletContext]="{ item: item.owner, index: item.ownerIndex }">\n </ng-template>\n </div>\n\n <ng-template #popupTemplate>\n <ul kendoMenuList\n [attr.id]="childId"\n [animate]="animate"\n [rtl]="rtl"\n [vertical]="vertical"\n [openOnClick]="openOnClick"\n [items]="children"\n [level]="level + 1"\n [index]="index"\n [itemTemplate]="itemTemplate"\n [itemLinkTemplate]="itemLinkTemplate"\n role="menu"\n class="k-group k-menu-group k-reset">\n </ul>\n </ng-template>\n\n <ng-template #itemcontent>\n <span *ngIf="item.icon" class="k-icon" [ngClass]="iconClass" role="presentation"></span>\n <ng-container *ngIf="!template">\n {{ item.text }}\n </ng-container>\n <ng-template *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index: index }">\n </ng-template>\n <span class="k-icon k-menu-expand-arrow" *ngIf="hasContent"\n role="presentation"\n [class.k-i-arrow-60-down]="!horizontal"\n [class.k-i-arrow-60-right]="horizontal && !rtl"\n [class.k-i-arrow-60-left]="horizontal && rtl">\n </span>\n </ng-template>\n '}),i.__metadata("design:paramtypes",[r.ItemsService,a.NavigationService,o.ChangeDetectorRef,o.Renderer2,p.PopupService,o.ElementRef])],l));function l(e,t,n,i,o,r){this.itemsService=e,this.navigation=t,this.changeDetector=n,this.renderer=i,this.popupService=o,this.element=r,this.animate=!0,this.openOnClick=!1,this.opened=!1,this.navigating=!1,this.destroyed=!1}t.ItemComponent=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=n(11),s=n(16),p=n(35),c=n(9),u=n(10),l=(d.prototype.hierarchyIndex=function(e){return this.itemsService.itemIndex(this.index,e)},d.prototype.ngOnInit=function(){this.itemsService.addList(this),this.initDomEvents()},d.prototype.ngOnDestroy=function(){this.itemsService.removeList(this),this.domSubscriptions&&this.domSubscriptions()},d.prototype.initDomEvents=function(){var s=this;this.element&&this.ngZone.runOutsideAngular(function(){var n=s.element.nativeElement,e=0<s.level?u.closest(n,function(e){return u.hasClass(e,"k-menu-popup")}):n,t=s.renderer.listen(n,"mouseover",function(e){if(e.target===n&&0===s.level)s.onLeave();else{var t=s.nodeItem(e.target)||s.itemsService.get(s.index);!t||s.openOnClick&&"click"===s.openOnClick.toggle&&0===t.level&&!t.hasContent||s.hover.over(t)}}),i=s.renderer.listen(e,"mouseleave",function(e){s.leavesMenu(e)&&s.onLeave()}),o=s.renderer.listen(n,"keydown",function(e){u.hasClass(e.target,"k-menu-item")&&s.navigation.keydown(e)}),r=s.renderer.listen(n,"focusout",function(e){s.leavesMenu(e)&&s.navigation.focusLeave()}),a=s.renderer.listen(n,"click",s.clickHandler.bind(s));s.domSubscriptions=function(){t(),i(),o(),r(),a()}})},d.prototype.leavesMenu=function(e){return!e.relatedTarget||!u.inMenu(e.relatedTarget,this.itemsService)},d.prototype.onLeave=function(){var e=this.openOnClick;e&&"click"===e.toggle||this.hover.leave(e&&"leave"===e.toggle)},d.prototype.nodeItem=function(e){var t=u.closestItem(e,this.element.nativeElement);if(t){var n=u.nodeIndex(t);return this.itemsService.get(n)}},d.prototype.clickHandler=function(e){if(!u.isFocusable(e.target)||u.hasClass(e.target,"k-menu-item")){var t=this.nodeItem(e.target);if(t&&!t.isContent&&!t.navigating)if(t.disabled)e.preventDefault();else{if(this.actions.select(t,e,function(){e.preventDefault()}),this.navigation.focus(t),0<t.level&&!t.hasContent&&this.actions.closeToRoot(t),this.openOnClick){var n=this.hover;t.opened?0===t.level&&(n.openOnOver=!1,this.actions.close(t)):t.hasContent?(n.openOnOver=!0,this.actions.closeOthers(t),this.actions.open(t)):(n.openOnOver=!1,0===t.level&&"click"===this.openOnClick.toggle&&this.hover.closeCurrent())}this.actions.execute()}}},i.__decorate([o.Input(),i.__metadata("design:type",Array)],d.prototype,"items",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number)],d.prototype,"level",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],d.prototype,"index",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],d.prototype,"animate",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],d.prototype,"vertical",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],d.prototype,"rtl",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],d.prototype,"openOnClick",void 0),i.__decorate([o.Input(),i.__metadata("design:type",o.TemplateRef)],d.prototype,"itemTemplate",void 0),i.__decorate([o.Input(),i.__metadata("design:type",o.TemplateRef)],d.prototype,"itemLinkTemplate",void 0),i.__decorate([o.Component({selector:"[kendoMenuList]",template:'\n <ng-container *ngFor="let item of items; let idx = index">\n <li *ngIf="!item.separator" kendoMenuItem\n [item]="item" [level]="level" [vertical]="vertical" [animate]="animate" [rtl]="rtl"\n [itemTemplate]="itemTemplate" [itemLinkTemplate]="itemLinkTemplate" [openOnClick]="openOnClick"\n [index]="hierarchyIndex(idx)" [siblingIndex]="idx" [attr.'+c.NODE_INDEX+']="hierarchyIndex(idx)"\n [ngClass]="item.cssClass" [ngStyle]="item.cssStyle"\n role="menuitem"\n class="k-item k-menu-item"\n [class.k-first]="idx === 0" [class.k-last]="idx === items.length - 1"\n [class.k-state-disabled]="item.disabled"></li>\n <li *ngIf="item.separator" class="k-separator k-item"\n role="separator" [ngClass]="item.cssClass" [ngStyle]="item.cssStyle">\n \n </li>\n </ng-container>\n '}),i.__metadata("design:paramtypes",[r.ItemsService,p.HoverService,a.ActionsService,s.NavigationService,o.Renderer2,o.NgZone,o.ElementRef])],d));function d(e,t,n,i,o,r,a){this.itemsService=e,this.hover=t,this.actions=n,this.navigation=i,this.renderer=o,this.ngZone=r,this.element=a,this.animate=!0}t.ListComponent=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=n(11),s=(Object.defineProperty(p.prototype,"openOnOver",{get:function(){return this._openOnOver},set:function(e){this.cancelActions(),this._openOnOver=e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"hovered",{get:function(){return this.items.get(this.hoveredIdx)},set:function(e){this.hoveredIdx=e?e.index:null},enumerable:!0,configurable:!0}),p.prototype.ngOnDestroy=function(){this.cancelActions()},p.prototype.over=function(t){var n=this;this.cancelActions(function(e){return"openOnOver"===e.name}),this.hovered&&this.hovered===t||(this.actions.closeOthers(t),(0<(this.hovered=t).level||this.openOnOver)&&!t.disabled&&(this.actions.open(t),this.cancelActions(function(e){return"close"===e.name&&(t===e.item||n.items.hasParent(t,e.item))||"open"===e.name&&!n.items.hasParent(t,e.item)})),this.scheduleActions())},p.prototype.leave=function(e){var t=this.hovered;t&&(this.actions.closeToRoot(t),this.cancelActions(function(e){return"open"===e.name}),this.scheduleActions()),e&&this._openOnOver&&this.scheduleDisableOpenOnOver(),this.hovered=null},p.prototype.closeCurrent=function(){var e=this.hovered;e&&(this.actions.closeToRoot(e),this.hovered=null)},p.prototype.scheduleActions=function(){var e=this;if(this.actions.hasPending){var t={};t.actions=this.actions.clear(),t.id=setTimeout(function(){e.actions.execute(t.actions),e.removeScheduled(t)},this.delay),this.scheduled.push(t)}},p.prototype.scheduleDisableOpenOnOver=function(){var e=this,t={actions:[{name:"openOnOver"}]};t.id=setTimeout(function(){e._openOnOver=!1,e.removeScheduled(t)},Math.max(this.delay,500)),this.scheduled.push(t)},p.prototype.removeScheduled=function(e){for(var t=this.scheduled,n=0;n<t.length;n++)if(t[n]===e)return void t.splice(n,1)},p.prototype.cancelActions=function(e){for(var t=this.scheduled,n=t.length-1;0<=n;n--){var i=t[n],o=i.actions;if(e)for(var r=o.length-1;0<=r;r--)e(o[r])&&o.splice(r,1);e&&0!==o.length||(clearTimeout(i.id),t.splice(n,1))}},i.__decorate([o.Injectable(),i.__metadata("design:paramtypes",[a.ActionsService,r.ItemsService])],p));function p(e,t){this.actions=e,this.items=t,this.delay=100,this._openOnOver=!0,this.scheduled=[]}t.HoverService=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(o.prototype.preventDefault=function(){this.prevented=!0},o.prototype.isDefaultPrevented=function(){return this.prevented},o);function o(e){this.prevented=!1,Object.assign(this,e)}t.PreventableEvent=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c,i,o=n(0),u=n(1),r=n(18),a=n(2),s=n(11),p=n(16),l=n(35),d=n(43),m=n(10),h=n(8),v=n(7),f=n(9),_=(c=v.MenuBase,o.__extends(g,c),i=g,Object.defineProperty(g.prototype,"ariaOrientation",{get:function(){if(this.vertical)return"vertical"},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"contextMenuClass",{get:function(){return Boolean(this.contextService)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"direction",{get:function(){return this.rtl},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"rtl",{get:function(){return this.localization.rtl},enumerable:!0,configurable:!0}),g.prototype.toggle=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0;i<t.length;i++){var o=this.itemsService.get(t[i]);o&&!o.disabled&&(e?o.open():o.close())}},g.prototype.focus=function(e){this.navigation.focusIndex(e)},g.prototype.ngOnChanges=function(e){if(this.navigation.vertical=this.vertical,this.hover.delay=this.hoverDelay,e.openOnClick){var t=this.openOnClick=d.normalize(this.openOnClick);this.hover.openOnOver=!t,t&&"click"===t.toggle?this.attachCloseClick():this.unsubscribeClick()}},g.prototype.ngAfterViewChecked=function(){this.navigation.updateActive()},g.prototype.ngOnDestroy=function(){this.unsubscribeClick(),this.contextService&&(this.contextService.items=null,this.contextKeyDownSubscription.unsubscribe())},g.prototype.attachCloseClick=function(){var t=this;this.closeClickSubscription||"undefined"==typeof document||this.ngZone.runOutsideAngular(function(){t.closeClickSubscription=t.renderer.listen("document","click",function(e){m.inMenu(e.target,t.itemsService)||(t.hover.openOnOver=!1,t.actions.closeAll(),t.actions.execute())})})},g.prototype.unsubscribeClick=function(){this.closeClickSubscription&&this.closeClickSubscription()},g.prototype.contextKeyDown=function(e){if(this.itemsService.hasItems){var t,n=e.keyCode,i=this.localization.rtl,o=n===f.KeyCodes.DOWN||n===f.KeyCodes.RIGHT,r=n===f.KeyCodes.UP||n===f.KeyCodes.LEFT;o&&!i||r&&i?t="first":(o&&i||r&&!i)&&(t="last"),t&&(e.preventDefault(),this.focus(t))}},o.__decorate([u.Input(),o.__metadata("design:type",u.TemplateRef)],g.prototype,"menuItemTemplate",void 0),o.__decorate([u.Input(),o.__metadata("design:type",u.TemplateRef)],g.prototype,"menuItemLinkTemplate",void 0),o.__decorate([u.Output(),o.__metadata("design:type",u.EventEmitter)],g.prototype,"select",void 0),o.__decorate([u.Output(),o.__metadata("design:type",u.EventEmitter)],g.prototype,"open",void 0),o.__decorate([u.Output(),o.__metadata("design:type",u.EventEmitter)],g.prototype,"close",void 0),o.__decorate([u.HostBinding("class.k-rtl"),o.__metadata("design:type",Boolean),o.__metadata("design:paramtypes",[])],g.prototype,"direction",null),i=o.__decorate([u.Component({exportAs:"kendoMenu",providers:[a.ItemsService,s.ActionsService,p.NavigationService,l.HoverService,r.LocalizationService,{provide:r.L10N_PREFIX,useValue:"kendo.menu"},{provide:v.MenuBase,useExisting:u.forwardRef(function(){return i})}],selector:"kendo-menu",template:'\n <ul role="menubar"\n [attr.aria-orientation]="ariaOrientation"\n kendoMenuList [items]="rootItems" [level]="0" class="k-widget k-reset k-header k-menu"\n [vertical]="vertical" [rtl]="rtl" [animate]="animate" [openOnClick]="openOnClick"\n [itemTemplate]="itemTemplate.first?.templateRef || menuItemTemplate"\n [itemLinkTemplate]="itemLinkTemplate.first?.templateRef || menuItemLinkTemplate"\n [class.k-menu-horizontal]="!vertical"\n [class.k-menu-vertical]="vertical"\n [class.k-context-menu]="contextMenuClass">\n </ul>\n '}),o.__param(7,u.Optional()),o.__metadata("design:paramtypes",[a.ItemsService,l.HoverService,s.ActionsService,p.NavigationService,r.LocalizationService,u.NgZone,u.Renderer2,h.ContextMenuService])],g));function g(e,t,n,i,o,r,a,s){var p=c.call(this)||this;return p.itemsService=e,p.hover=t,p.actions=n,p.navigation=i,p.localization=o,p.ngZone=r,p.renderer=a,p.contextService=s,p.select=new u.EventEmitter,p.open=new u.EventEmitter,p.close=new u.EventEmitter,p.actions.owner=p,s&&(s.items=p.itemsService,p.contextKeyDownSubscription=s.keydown.subscribe(p.contextKeyDown.bind(p))),p}t.MenuComponent=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(13),a=n(19),s=i.__decorate([o.NgModule({exports:[r.MenuModule,a.ContextMenuModule]})],p);function p(){}t.MenusModule=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(8),a=(s.prototype.get=function(e){if(this.contextService.items)return this.contextService.items.get(e)},i.__decorate([o.Injectable(),i.__metadata("design:paramtypes",[r.ContextMenuService])],s));function s(e){this.contextService=e}t.ContextMenuItemsService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=(i=n(25).ContextMenuEvent,o.__extends(a,i),a);function a(){return null!==i&&i.apply(this,arguments)||this}t.ContextMenuSelectEvent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=(i=n(17).MenuEvent,o.__extends(a,i),a);function a(){return null!==i&&i.apply(this,arguments)||this}t.MenuSelectEvent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={vertical:"top",horizontal:"left"},o={vertical:"top",horizontal:"right"},r={vertical:"flip",horizontal:"fit"},a={vertical:"fit",horizontal:"flip"};t.POPUP_SETTINGS_RTL={vertical:{anchor:{vertical:"bottom",horizontal:"right"},popup:o,collision:r,animate:"down"},horizontal:{anchor:{vertical:"top",horizontal:"left"},popup:o,collision:a,animate:"left"}},t.POPUP_SETTINGS={vertical:{anchor:{vertical:"bottom",horizontal:"left"},popup:i,collision:r,animate:"down"},horizontal:{anchor:{vertical:"top",horizontal:"right"},popup:i,collision:a,animate:"right"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=function(e){return e&&Object.assign({toggle:"select"},e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(37);t.MenuComponent=i.MenuComponent;var o=n(34);t.ListComponent=o.ListComponent;var r=n(33);t.ItemComponent=r.ItemComponent;var a=n(32);t.LinkDirective=a.LinkDirective;var s=n(31);t.ExpandArrowDirective=s.ExpandArrowDirective;var p=n(15);t.MenuItemComponent=p.MenuItemComponent;var c=n(17);t.MenuEvent=c.MenuEvent;var u=n(41);t.MenuSelectEvent=u.MenuSelectEvent;var l=n(14);t.ItemContentTemplateDirective=l.ItemContentTemplateDirective;var d=n(6);t.ItemTemplateDirective=d.ItemTemplateDirective;var m=n(5);t.ItemLinkTemplateDirective=m.ItemLinkTemplateDirective;var h=n(30);t.HierarchyBindingDirective=h.HierarchyBindingDirective;var v=n(27);t.FlatBindingDirective=v.FlatBindingDirective;var f=n(13);t.MenuModule=f.MenuModule;var _=n(25);t.ContextMenuEvent=_.ContextMenuEvent;var g=n(40);t.ContextMenuSelectEvent=g.ContextMenuSelectEvent;var y=n(24);t.ContextMenuPopupEvent=y.ContextMenuPopupEvent;var b=n(12);t.ContextMenuTemplateDirective=b.ContextMenuTemplateDirective;var C=n(23);t.ContextMenuComponent=C.ContextMenuComponent;var I=n(19);t.ContextMenuModule=I.ContextMenuModule;var x=n(8);t.ContextMenuService=x.ContextMenuService;var O=n(38);t.MenusModule=O.MenusModule,function(e){for(var t in e)k(t,e[t])}(t)}],i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=44)}}}); | ||
System.register("@progress/kendo-angular-menu",["@angular/core","tslib","@progress/kendo-angular-l10n","@angular/common","@progress/kendo-angular-popup"],function(k){var r,a,s,p,c;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){r=t(e)},function(e){a=t(e)},function(e){s=t(e)},function(e){p=t(e)},function(e){c=t(e)}],execute:function(){function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var n,o;o={},i.m=n=[function(e,t){e.exports=a},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function o(e,t){return e.siblingIndex-t.siblingIndex}function i(e,t,n){for(var i=t[e+n];!i;)e<0?e=t.length-1:e>=t.length?e=0:e+=n,i=t[e];return i}var r=n(0),a=n(1),s=/_?\d+$/,p=0,c=(Object.defineProperty(u.prototype,"hasItems",{get:function(){return 0<Object.keys(this.items).length},enumerable:!0,configurable:!0}),u.prototype.childId=function(e){return this.idPrefix+"-child"+e},u.prototype.itemIndex=function(e,t){return(e?e+"_":"")+t},u.prototype.get=function(e){return this.items[e]},u.prototype.add=function(e){this.items[e.index]=e},u.prototype.remove=function(e){delete this.items[e.index]},u.prototype.addList=function(e){this.lists.push(e)},u.prototype.removeList=function(e){var t=this.lists.indexOf(e);0<=t&&this.lists.splice(t,1)},u.prototype.containsList=function(t){return Boolean(this.lists.find(function(e){return e.element.nativeElement===t}))},u.prototype.siblings=function(e){var t=this,n=this.parentIndex(e.index);return this.filter(function(e){return t.parentIndex(e)===n})},u.prototype.otherSiblings=function(t){var n=this,i=this.parentIndex(t.index);return this.filter(function(e){return n.parentIndex(e)===i&&e!==t.index})},u.prototype.children=function(t){var n=this;return this.filter(function(e){return n.parentIndex(e)===t.index})},u.prototype.parent=function(e){return this.items[this.parentIndex(e.index)]},u.prototype.root=function(e){return this.items[this.indices(e.index)[0]]},u.prototype.indices=function(e){return e.split("_")},u.prototype.filter=function(e){var t=[],n=this.items;for(var i in n)e(i,n[i])&&t.push(n[i]);return t.sort(o)},u.prototype.previous=function(e){var t=this.siblings(e),n=t.indexOf(e);return i(n,t,-1)},u.prototype.next=function(e){var t=this.siblings(e),n=t.indexOf(e);return i(n,t,1)},u.prototype.hasParent=function(e,t){return e.index.startsWith(t.index)},u.prototype.areSiblings=function(e,t){return e!==t&&this.parent(e)===this.parent(t)},u.prototype.forEach=function(e){var t=this.items;for(var n in t)t.hasOwnProperty(n)&&e(t[n])},u.prototype.parentIndex=function(e){return e.replace(s,"")},r.__decorate([a.Injectable()],u));function u(){this.items={},this.lists=[],this.idPrefix="k-menu"+p++}t.ItemsService=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);t.hasObservers=function(e){return e&&0<e.observers.length},t.defined=function(e){return void 0!==e},t.bodyFactory=function(){if("undefined"!=typeof document)return new i.ElementRef(document.body)}},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=i.__decorate([o.Directive({selector:"[kendoMenuItemLinkTemplate]"}),i.__param(0,o.Optional()),i.__metadata("design:paramtypes",[o.TemplateRef])],a);function a(e){this.templateRef=e}t.ItemLinkTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=i.__decorate([o.Directive({selector:"[kendoMenuItemTemplate]"}),i.__param(0,o.Optional()),i.__metadata("design:paramtypes",[o.TemplateRef])],a);function a(e){this.templateRef=e}t.ItemTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(15),a=n(6),s=n(5),p=(Object.defineProperty(c.prototype,"rootItems",{get:function(){return this.items||(this.children?this.children.toArray():[])},enumerable:!0,configurable:!0}),i.__decorate([o.Input(),i.__metadata("design:type",Array)],c.prototype,"items",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],c.prototype,"vertical",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],c.prototype,"openOnClick",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number)],c.prototype,"hoverDelay",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],c.prototype,"animate",void 0),i.__decorate([o.ContentChildren(a.ItemTemplateDirective),i.__metadata("design:type",o.QueryList)],c.prototype,"itemTemplate",void 0),i.__decorate([o.ContentChildren(s.ItemLinkTemplateDirective),i.__metadata("design:type",o.QueryList)],c.prototype,"itemLinkTemplate",void 0),i.__decorate([o.ContentChildren(r.MenuItemComponent),i.__metadata("design:type",o.QueryList)],c.prototype,"children",void 0),c);function c(){this.vertical=!1,this.openOnClick=!1,this.hoverDelay=100,this.animate=!0}t.MenuBase=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(3),a=n(10),s=(p.prototype.emit=function(e,t){this.owner.emitMenuEvent(e,t)},p.prototype.hasObservers=function(e){return this.owner&&r.hasObservers(this.owner[e])},p.prototype.leaveMenu=function(e){return!this.items||!a.inMenu(e.target,this.items)},i.__decorate([o.Injectable()],p));function p(){this.keydown=new o.EventEmitter}t.ContextMenuService=s},function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.NODE_INDEX="data-kendo-menu-index",(i=t.KeyCodes||(t.KeyCodes={}))[i.ESC=27]="ESC",i[i.LEFT=37]="LEFT",i[i.UP=38]="UP",i[i.RIGHT=39]="RIGHT",i[i.DOWN=40]="DOWN",i[i.F10=121]="F10"},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=t(9),r=/^(?:a|input|select|option|textarea|button|object)$/i;a.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e},a.closestInScope=function(e,t,n){for(;e&&e!==n&&!t(e);)e=e.parentNode;if(e!==n)return e},a.isFocusable=function(e){if(e.tagName){var t=e.tagName.toLowerCase(),n=e.getAttribute("tabIndex"),i="-1"===n,o=null!==n&&!i;return r.test(t)&&(o=!e.disabled&&!i),o}return!1};function i(e){return String(e).trim().split(" ")}a.hasClass=function(e,t){return 0<=i(e.className).indexOf(t)},a.matchesClasses=function(e){var n=i(e);return function(e){var t=i(e.className);return Boolean(n.find(function(e){return 0<=t.indexOf(e)}))}},a.nodeIndex=function(e){return e.getAttribute(n.NODE_INDEX)},a.closestItem=function(e,t){return a.closestInScope(e,a.nodeIndex,t)},a.closestList=function(e){var t=a.closest(e,a.matchesClasses("k-menu-popup k-menu k-menu-group"));return t&&a.hasClass(t,"k-menu-popup")&&(t=t.querySelector(".k-menu-group")),t},a.inMenu=function(e,t){if(e===t.lists[0].element.nativeElement)return!1;var n=a.closestList(e);return n&&t.containsList(n)},a.findInContainer=function(e,t,n){var i=n.getAttribute("id");i||n.setAttribute("id","kendo-matches-container");var o="#"+(i||"kendo-matches-container")+" "+t,r=a.closestInScope(e,function(e){return n=o,((t=e).matches||t.msMatchesSelector).call(t,n);var t,n},n);return i||n.removeAttribute("id"),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=n(17),s=n(3),p=(c.prototype.open=function(e,t){e.disabled||(e.hasContent&&!e.opened?this.actions.push({name:"open",requiresZone:e.hasContentTemplates(),item:e,finished:t}):t&&t())},c.prototype.close=function(e){this.closeChildren(e),this.closeItem(e)},c.prototype.closeItem=function(e){e.opened&&this.actions.push({name:"close",item:e})},c.prototype.closeToRoot=function(e){this.closeChildren(e);for(var t=e;this.closeItem(t),t=this.items.parent(t););},c.prototype.closeOthers=function(e){this.closeChildren(e);for(var t=e;t;){var n=this.items.otherSiblings(t);this.closeItems(n),t=this.items.parent(t)}},c.prototype.closeAll=function(){var t=this;this.items.forEach(function(e){e.opened&&0===e.level&&t.close(e)})},c.prototype.select=function(e,t,n,i){this.actions.push({name:"select",item:e,prevented:n,finished:i,domEvent:t})},c.prototype.emit=function(e,t,n){var i=this.owner,o=new a.MenuEvent({sender:i,item:t.item,index:t.index,originalEvent:n,hasContent:t.hasContent});return i[e].emit(o),i.contextService&&i.contextService.emit(e,o),o.isDefaultPrevented()},Object.defineProperty(c.prototype,"hasPending",{get:function(){return 0<this.actions.length},enumerable:!0,configurable:!0}),c.prototype.execute=function(e){var t=this;if(this.hasPending||e){var n=e||this.clear();!o.NgZone.isInAngularZone()&&this.requiresZone(n)?this.ngZone.run(function(){t.executeActions(n)}):this.executeActions(n)}},c.prototype.clear=function(){var e=this.actions;return this.actions=[],e},c.prototype.executeActions=function(e){for(var t=0;t<e.length;t++){var n=e[t],i=n.item,o=n.name,r=n.prevented,a=n.finished,s=n.domEvent;p=i,"open"===(c=o)&&p.opened||"close"===c&&!p.opened||(this.emit(o,i,s)?r&&r():(i[o]&&i[o](),a&&a()))}var p,c},c.prototype.requiresZone=function(e){for(var t=e||this.actions,n=this.owner,i=n.contextService,o=0;o<t.length;o++){var r=t[o],a=r.name;if(r.requiresZone||a&&(s.hasObservers(n[a])||i&&i.hasObservers(a)))return!0}return!1},c.prototype.closeChildren=function(e){if(e.opened){var t=this.items.children(e);this.closeItems(t)}},c.prototype.closeItems=function(e){for(var t=0;t<e.length;t++)this.close(e[t])},i.__decorate([o.Injectable(),i.__metadata("design:paramtypes",[o.NgZone,r.ItemsService])],c));function c(e,t){this.ngZone=e,this.items=t,this.actions=[]}t.ActionsService=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=i.__decorate([o.Directive({selector:"[kendoContextMenuTemplate]"}),i.__param(0,o.Optional()),i.__metadata("design:paramtypes",[o.TemplateRef])],a);function a(e){this.templateRef=e}t.ContextMenuTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(26),a=n(4),s=n(37),p=n(15),c=n(34),u=n(33),l=n(32),d=n(31),m=n(6),h=n(5),v=n(14),f=n(30),_=n(27),g=[s.MenuComponent,p.MenuItemComponent,m.ItemTemplateDirective,h.ItemLinkTemplateDirective,v.ItemContentTemplateDirective,f.HierarchyBindingDirective,_.FlatBindingDirective,l.LinkDirective,d.ExpandArrowDirective],y=g.concat([c.ListComponent,u.ItemComponent]),b=i.__decorate([o.NgModule({declarations:[y],exports:[g],imports:[a.PopupModule,r.CommonModule]})],C);function C(){}t.MenuModule=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=i.__decorate([o.Directive({selector:"[kendoMenuItemContentTemplate]"}),i.__param(0,o.Optional()),i.__metadata("design:paramtypes",[o.TemplateRef])],a);function a(e){this.templateRef=e}t.ItemContentTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=n(1),a=n(6),s=n(5),p=n(14),c=(i=u,Object.defineProperty(u.prototype,"template",{get:function(){if(this.itemTemplate&&this.itemTemplate.length)return this.itemTemplate.first.templateRef},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"linkTemplate",{get:function(){if(this.itemLinkTemplate&&this.itemLinkTemplate.length)return this.itemLinkTemplate.first.templateRef},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"contentTemplate",{get:function(){if(this.itemContentTemplate&&this.itemContentTemplate.length)return this.itemContentTemplate.first.templateRef},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){if(this.children.length)return this.children.toArray().slice(1)},enumerable:!0,configurable:!0}),o.__decorate([r.Input(),o.__metadata("design:type",String)],u.prototype,"text",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],u.prototype,"url",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Boolean)],u.prototype,"disabled",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],u.prototype,"cssClass",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],u.prototype,"cssStyle",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],u.prototype,"icon",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],u.prototype,"data",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Boolean)],u.prototype,"separator",void 0),o.__decorate([r.ContentChildren(a.ItemTemplateDirective),o.__metadata("design:type",r.QueryList)],u.prototype,"itemTemplate",void 0),o.__decorate([r.ContentChildren(s.ItemLinkTemplateDirective),o.__metadata("design:type",r.QueryList)],u.prototype,"itemLinkTemplate",void 0),o.__decorate([r.ContentChildren(p.ItemContentTemplateDirective),o.__metadata("design:type",r.QueryList)],u.prototype,"itemContentTemplate",void 0),o.__decorate([r.ContentChildren(i),o.__metadata("design:type",r.QueryList)],u.prototype,"children",void 0),o.__decorate([r.Component({selector:"kendo-menu-item",template:""})],u));function u(){}t.MenuItemComponent=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(18),a=n(2),s=n(11),p=/\S/,c={37:"left",39:"right",38:"up",40:"down",36:"home",35:"end",32:"enter",13:"enter",27:"esc",9:"tab"},u=Object.assign({},c,{37:"right",39:"left"}),l=Promise.resolve(null),d=(Object.defineProperty(m.prototype,"focusedItem",{get:function(){return this.items.get(this.focusedIdx)},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,"activeItem",{get:function(){return this.items.get(this.activeIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,"handlers",{get:function(){return this.localization.rtl?u:c},enumerable:!0,configurable:!0}),m.prototype.focus=function(e){e.index!==this.focusedIdx&&(this.activeItem&&this.items.hasParent(e,this.activeItem)||this.setActive(e),this.setFocus(e))},m.prototype.setFocus=function(e){this.focusedIdx=e.index,e.focus()},m.prototype.focusLeave=function(){var e=this.focusedItem;e&&(this.actions.closeToRoot(e),this.actions.execute()),this.focusedIdx=null},m.prototype.updateActive=function(){var e=this;!this.activeItem&&this.items.hasItems&&(this.items.get("0").toggleActive(!0),this.ngZone.runOutsideAngular(function(){l.then(function(){e.activeIndex="0"})}))},m.prototype.keydown=function(e){var t,n=this.focusedItem||this.activeItem,i=this.handlers[e.keyCode];n&&(i?("tab"!==i&&e.preventDefault(),this[i](n,e)):1===(t=e.key).length&&p.test(t)&&this.search(n,e.key),this.actions.execute())},m.prototype.focusIndex=function(e){if(!e&&this.activeItem)this.setFocus(this.activeItem);else if("first"===e)this.focusFirst();else if("last"===e)this.focusLast();else{var t=this.items.get(e);t&&this.focus(t)}},m.prototype.focusFirst=function(){var e=this.items.siblings(this.items.get("0"));this.focus(e[0])},m.prototype.focusLast=function(){var e=this.items.siblings(this.items.get("0"));this.focus(e[e.length-1])},m.prototype.search=function(e,t){for(var n=this.items.siblings(e),i=n.indexOf(e),o=n.slice(i+1).concat(n.slice(0,i)),r=0;r<o.length;r++){var a=o[r];if((a.item.text||"").toLowerCase().startsWith(t.toLowerCase())){this.focus(a);break}}},m.prototype.down=function(e){0!==e.level||this.vertical?this.focus(this.items.next(e)):e.hasContent&&this.actions.open(e,this.focusChild(e,0))},m.prototype.up=function(e){0!==e.level||this.vertical?this.focus(this.items.previous(e)):e.hasContent&&this.actions.open(e,this.focusChild(e,e.children.length-1))},m.prototype.left=function(e){if(!this.vertical||0!==e.level||!e.disabled)if(1<e.level||this.vertical&&0<e.level){var t=this.items.parent(e);this.focus(t),this.actions.close(t)}else this.vertical&&0===e.level&&!e.disabled?e.hasContent&&this.actions.open(e,this.focusChild(e,e.children.length-1)):this.focus(this.items.previous(this.activeItem))},m.prototype.right=function(e){this.vertical&&0===e.level&&e.disabled||(e.horizontal&&!e.disabled?e.hasContent?this.actions.open(e,this.focusChild(e,0)):(!this.vertical||0<e.level)&&this.focus(this.items.next(this.activeItem)):this.focus(this.items.next(this.activeItem)))},m.prototype.home=function(e){var t=this.items.siblings(e);this.focus(t[0])},m.prototype.end=function(e){var t=this.items.siblings(e);this.focus(t[t.length-1])},m.prototype.enter=function(e,t){var n=this.actions;e.disabled||(e.hasContent?(n.select(e,t),n.open(e,this.focusChild(e,0))):(n.select(e,t,null,function(){e.navigate()}),this.focus(this.items.root(e)),n.closeToRoot(e)))},m.prototype.esc=function(e){if(0<e.level){var t=this.items.parent(e);this.actions.close(t),this.focus(t)}},m.prototype.tab=function(e){0<e.level&&this.activeItem.focus()},m.prototype.focusChild=function(t,n){var i=this;return function(){var e=i.items.children(t)[n];i.setFocus(e)}},m.prototype.setActive=function(e){var t=this.focusedItem,n=this.items.root(e);this.activeItem&&this.activeItem.toggleActive(!1),this.activeIndex=n.index,n.toggleActive(!0),t&&(this.actions.closeToRoot(t),0<t.level&&this.actions.open(n))},i.__decorate([o.Injectable(),i.__metadata("design:paramtypes",[a.ItemsService,s.ActionsService,r.LocalizationService,o.NgZone])],m));function m(e,t,n,i){this.items=e,this.actions=t,this.localization=n,this.ngZone=i,this.vertical=!1,this.activeIndex="0"}t.NavigationService=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=(i=n(36).PreventableEvent,o.__extends(a,i),a);function a(){return null!==i&&i.apply(this,arguments)||this}t.MenuEvent=r},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(26),a=n(4),s=n(13),p=n(23),c=n(12),u=n(20),l=n(22),d=[p.ContextMenuComponent,c.ContextMenuTemplateDirective,u.ContextMenuTargetDirective,l.ContextMenuTargetContainerDirective],m=i.__decorate([o.NgModule({declarations:[d],exports:[d,s.MenuModule],imports:[a.PopupModule,r.CommonModule,s.MenuModule]})],h);function h(){}t.ContextMenuModule=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(21);t.TARGET_CLASS="k-contextmenu-target";var a=(s.prototype.ngOnDestroy=function(){this.targetService.remove(this)},i.__decorate([o.Input("kendoContextMenuTarget"),i.__metadata("design:type",Object)],s.prototype,"data",void 0),i.__decorate([o.HostBinding("class."+t.TARGET_CLASS),i.__metadata("design:type",Boolean)],s.prototype,"hostClass",void 0),i.__decorate([o.Directive({selector:"[kendoContextMenuTarget]",exportAs:"kendoContextMenuTarget"}),i.__metadata("design:paramtypes",[o.ElementRef,r.ContextMenuTargetService])],s));function s(e,t){this.targetService=t,this.hostClass=!0,e&&(this.element=e.nativeElement),t.add(this)}t.ContextMenuTargetDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=(a.prototype.add=function(e){this.targets.push(e)},a.prototype.remove=function(e){var t=this.targets.indexOf(e);this.targets.splice(t,1)},a.prototype.find=function(t){return this.targets.find(function(e){return e.element===t})},i.__decorate([o.Injectable()],a));function a(){this.targets=[]}t.ContextMenuTargetService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(21),a=i.__decorate([o.Directive({selector:"[kendoContextMenuTargetContainer]",exportAs:"kendoContextMenuTargetContainer",providers:[r.ContextMenuTargetService]}),i.__metadata("design:paramtypes",[o.ElementRef,r.ContextMenuTargetService])],s);function s(e,t){this.targetService=t,e&&(this.element=e.nativeElement)}t.ContextMenuTargetContainerDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function o(e){return e.preventDefault()}var r,i,a=n(0),s=n(1),p=n(18),c=n(4),u=n(7),l=n(24),d=n(8),m=n(39),h=n(12),v=n(10),f=n(3),_=n(2),g=n(22),y=n(20),b=n(3),C=n(9),I="contextmenu",x={horizontal:"left",vertical:"bottom"},O={horizontal:"left",vertical:"top"},k={horizontal:"fit",vertical:"flip"},T=(r=u.MenuBase,a.__extends(S,r),(i=S).prototype.hide=function(){this.removePopup()},S.prototype.show=function(e){if(e){var t=e;this.removePopup(),f.defined(t.left)&&f.defined(t.top)?this.createPopup({offset:t}):(this.currentTarget=t.nativeElement||t,this.createPopup({anchor:this.currentTarget}))}},S.prototype.ngOnChanges=function(e){(e.target||e.showOn)&&this.bindShowHandler()},S.prototype.ngOnInit=function(){var n=this;this.ngZone.runOutsideAngular(function(){var e=n.renderer.listen("document","mousedown",function(e){n.popupRef&&!v.closest(e.target,function(e){return e===n.popupRef.popupElement})&&n.service.leaveMenu(e)&&n.closePopup(e)}),t=n.renderer.listen("window","blur",function(e){n.popupRef&&n.closePopup(e)});n.closeSubscription=function(){e(),t()}})},S.prototype.ngOnDestroy=function(){this.closeSubscription&&(this.closeSubscription(),this.closeSubscription=null),this.unbindShowHandler(),this.removePopup()},S.prototype.emitMenuEvent=function(e,t){t.target=this.currentTarget,(t.sender=this)[e].emit(t),"select"!==e||t.hasContent||this.closeAndFocus(t.originalEvent)},S.prototype.bindShowHandler=function(){var n=this;this.unbindShowHandler(),this.ngZone.runOutsideAngular(function(){var t=n.targetElement();if(t){var e=n.showOn||I;n.showSubscription=n.renderer.listen(t,n.showOn||I,function(e){n.showContextMenu(e,t)}),e===I&&(n.keydownSubscription=n.renderer.listen(t,"keydown",function(e){e.shiftKey&&e.keyCode===C.KeyCodes.F10&&n.showContextMenu(e,t)}))}})},S.prototype.showContextMenu=function(e,t){var n=this,i=this.targetFilter();if(this.currentTarget=t,i){var o=this.currentTarget=v.findInContainer(e.target,i,t);if(o&&o!==e.target&&v.isFocusable(e.target))return void(this.currentTarget=null);o&&this.directiveTarget&&(this.currentTarget=this.target.targetService.find(o))}this.currentTarget?this.ngZone.run(function(){n.closePopup(e)||n.openPopup(e)}):this.closePopup(e)},S.prototype.unbindShowHandler=function(){this.showSubscription&&(this.showSubscription(),this.showSubscription=null),this.keydownSubscription&&(this.keydownSubscription(),this.keydownSubscription=null)},S.prototype.targetElement=function(){if("undefined"!=typeof document){this.directiveTarget=!1;var e=this.target;return"string"==typeof e?e=document.querySelector(e):e&&e.nativeElement?e=e.nativeElement:e instanceof g.ContextMenuTargetContainerDirective&&(e=e.element,this.directiveTarget=!0),e}},S.prototype.targetFilter=function(){return this.directiveTarget?"."+y.TARGET_CLASS:this.filter},S.prototype.closePopup=function(e){var t=this;if(this.popupRef)return this.popupAction("popupClose",e,function(){t.removePopup()})},S.prototype.removePopup=function(){this.popupRef&&(this.popupRef.close(),this.popupRef=null,this.currentTarget=null),this.popupSubscriptions&&(this.popupSubscriptions(),this.popupSubscriptions=null)},S.prototype.openPopup=function(n){var i=this;this.popupAction("popupOpen",n,function(){var e,t;n.preventDefault(),i.alignToAnchor||"keydown"===n.type?e=i.currentTargetElement:t={left:n.pageX,top:n.pageY},i.createPopup({anchor:e,offset:t})})},S.prototype.createPopup=function(e){var n=this;this.popupRef=this.popupService.open(Object.assign({animate:!f.defined(this.popupAnimate)||this.popupAnimate,appendTo:this.appendTo,collision:this.collision||k,popupAlign:this.popupAlign||O,anchorAlign:this.anchorAlign||x,content:this.contentTemplate?this.contentTemplate.templateRef:this.defaultContentTemplate},e));var i=this.popupRef.popupElement;this.renderer.setAttribute(i,"tabindex","-1"),this.renderer.setStyle(i,"outline","0"),this.ariaLabel&&this.renderer.setAttribute(i,"aria-label",this.ariaLabel),this.activeTarget=this.currentTargetElement===document.activeElement,this.ngZone.runOutsideAngular(function(){var e=n.renderer.listen(i,"keydown",n.popupKeyDownHandler),t=n.renderer.listen(i,"contextmenu",o);n.popupSubscriptions=function(){e(),t()}}),i.focus()},S.prototype.closeAndFocus=function(e){var t=this.currentTargetElement;!this.closePopup(e)&&this.activeTarget&&t.focus()},S.prototype.popupKeyDownHandler=function(e){var t=this.popupRef.popupElement;e.keyCode!==C.KeyCodes.ESC||!v.hasClass(e.target,"k-menu-item")&&e.target!==t?e.target===t&&this.service.keydown.emit(e):this.closeAndFocus(e)},S.prototype.popupAction=function(e,t,n){var i=this,o=this[e],r=!1;return f.hasObservers(o)?this.ngZone.run(function(){var e=new l.ContextMenuPopupEvent({originalEvent:t,sender:i,target:i.currentTarget});o.emit(e),e.isDefaultPrevented()||n(),r=e.isDefaultPrevented()}):n(),r},Object.defineProperty(S.prototype,"currentTargetElement",{get:function(){return this.directiveTarget&&this.currentTarget?this.currentTarget.element:this.currentTarget},enumerable:!0,configurable:!0}),a.__decorate([s.Input(),a.__metadata("design:type",String)],S.prototype,"showOn",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Object)],S.prototype,"target",void 0),a.__decorate([s.Input(),a.__metadata("design:type",String)],S.prototype,"filter",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Boolean)],S.prototype,"alignToAnchor",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Boolean)],S.prototype,"vertical",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Object)],S.prototype,"popupAnimate",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Object)],S.prototype,"popupAlign",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Object)],S.prototype,"anchorAlign",void 0),a.__decorate([s.Input(),a.__metadata("design:type",Object)],S.prototype,"collision",void 0),a.__decorate([s.Input(),a.__metadata("design:type",s.ViewContainerRef)],S.prototype,"appendTo",void 0),a.__decorate([s.Input(),a.__metadata("design:type",String)],S.prototype,"ariaLabel",void 0),a.__decorate([s.Output(),a.__metadata("design:type",s.EventEmitter)],S.prototype,"popupOpen",void 0),a.__decorate([s.Output(),a.__metadata("design:type",s.EventEmitter)],S.prototype,"popupClose",void 0),a.__decorate([s.Output(),a.__metadata("design:type",s.EventEmitter)],S.prototype,"select",void 0),a.__decorate([s.Output(),a.__metadata("design:type",s.EventEmitter)],S.prototype,"open",void 0),a.__decorate([s.Output(),a.__metadata("design:type",s.EventEmitter)],S.prototype,"close",void 0),a.__decorate([s.ContentChild(h.ContextMenuTemplateDirective),a.__metadata("design:type",h.ContextMenuTemplateDirective)],S.prototype,"contentTemplate",void 0),a.__decorate([s.ViewChild("default"),a.__metadata("design:type",s.TemplateRef)],S.prototype,"defaultContentTemplate",void 0),i=a.__decorate([s.Component({exportAs:"kendoContextMenu",providers:[d.ContextMenuService,p.LocalizationService,{provide:p.L10N_PREFIX,useValue:"kendo.contextmenu"},{provide:_.ItemsService,useClass:m.ContextMenuItemsService},{provide:u.MenuBase,useExisting:s.forwardRef(function(){return i})},c.PopupService,{provide:c.POPUP_CONTAINER,useFactory:b.bodyFactory}],selector:"kendo-contextmenu",template:'\n <ng-template #default>\n <kendo-menu [items]="rootItems"\n [vertical]="vertical"\n [openOnClick]="openOnClick"\n [hoverDelay]="hoverDelay"\n [animate]="animate"\n [menuItemTemplate]="itemTemplate.first?.templateRef"\n [menuItemLinkTemplate]="itemLinkTemplate.first?.templateRef"\n ></kendo-menu>\n </ng-template>\n '}),a.__metadata("design:paramtypes",[c.PopupService,d.ContextMenuService,s.NgZone,s.Renderer2])],S));function S(e,t,n,i){var o=r.call(this)||this;return o.popupService=e,o.service=t,o.ngZone=n,o.renderer=i,o.showOn=I,o.alignToAnchor=!1,o.vertical=!0,o.popupOpen=new s.EventEmitter,o.popupClose=new s.EventEmitter,o.select=new s.EventEmitter,o.open=new s.EventEmitter,o.close=new s.EventEmitter,(o.service.owner=o).popupKeyDownHandler=o.popupKeyDownHandler.bind(o),o}t.ContextMenuComponent=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=(i=n(36).PreventableEvent,o.__extends(a,i),a);function a(){return null!==i&&i.apply(this,arguments)||this}t.ContextMenuPopupEvent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function i(){}t.ContextMenuEvent=i},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=n(1),a=n(7),s=n(29),u=n(28),p=(i=s.BindingDirectiveBase,o.__extends(c,i),c.prototype.mapItems=function(e){var t=this;if(!this.idField||!this.parentIdField)return e.map(function(e){return t.createItem(e)});for(var n=[],i={},o=0;o<e.length;o++){var r=e[o],a=this.createItem(r),s=u.getter(this.idField)(r),p=u.getter(this.parentIdField)(r);if(null==p)n.push(a);else{var c=i[p]=i[p]||{};c.items=c.items||[],c.items.push(a)}i[s]&&(a.items=i[s].items),i[s]=a}return n},c.prototype.createItem=function(e){for(var t={data:e},n=this.fields,i=0;i<n.length;i++){var o=n[i],r=o.source;t[o.target]=u.getter(r)(e)}return t},o.__decorate([r.Input("kendoMenuFlatBinding"),o.__metadata("design:type",Array)],c.prototype,"data",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"textField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"urlField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],c.prototype,"iconField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"disabledField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"cssClassField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"cssStyleField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"separatorField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"idField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",String)],c.prototype,"parentIdField",void 0),o.__decorate([r.Directive({exportAs:"kendoMenuFlatBinding",selector:"[kendoMenuFlatBinding]"}),o.__metadata("design:paramtypes",[a.MenuBase])],c));function c(e){return i.call(this,e)||this}t.FlatBindingDirective=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,r={undefined:function(e){return e}};t.getter=function(e){if(r[e])return r[e];var o=[];return e.replace(i,function(e,t,n,i){o.push(void 0!==t?t:n||i)}),r[e]=function(e){for(var t=e,n=0;n<o.length&&t;n++)t=t[o[n]];return t},r[e]},t.last=function(e){return e[e.length-1]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=["textField","urlField","iconField","disabledField","cssClassField","cssStyleField","separatorField"],i=(r.prototype.ngOnChanges=function(){this.rebind()},r.prototype.rebind=function(){for(var e=this.fields=[],t=0;t<o.length;t++){var n=o[t],i=this[n];i&&e.push({target:n.replace("Field",""),source:i})}this.menu.items=this.data?this.mapItems(this.data):[]},r);function r(e){this.menu=e}t.BindingDirectiveBase=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function p(e,t){return Array.isArray(e)?e[t]||c.last(e):e}var i,o=n(0),r=n(1),a=n(7),s=n(29),c=n(28),u=(i=s.BindingDirectiveBase,o.__extends(l,i),l.prototype.mapItems=function(e,i){var o=this;return void 0===i&&(i=0),e.map(function(e){var t=o.createItem(e,i),n=o.getChildren(e,i);return n&&(t.items=o.mapItems(n,i+1)),t})},l.prototype.createItem=function(e,t){for(var n={data:e},i=this.fields,o=0;o<i.length;o++){var r=i[o],a=r.target,s=r.source;n[a]=c.getter(p(s,t))(e)}return n},l.prototype.getChildren=function(e,t){if(this.childrenField)return e[p(this.childrenField,t)]},o.__decorate([r.Input("kendoMenuHierarchyBinding"),o.__metadata("design:type",Array)],l.prototype,"data",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"textField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"urlField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"iconField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"disabledField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"cssClassField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"cssStyleField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"separatorField",void 0),o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"childrenField",void 0),o.__decorate([r.Directive({exportAs:"kendoMenuHierarchyBinding",selector:"[kendoMenuHierarchyBinding]"}),o.__metadata("design:paramtypes",[a.MenuBase])],l));function l(e){return i.call(this,e)||this}t.HierarchyBindingDirective=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=(Object.defineProperty(s.prototype,"arrowDown",{get:function(){return!this.item.horizontal},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"arrowRight",{get:function(){return this.item.horizontal&&!this.item.rtl},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"arrowLeft",{get:function(){return this.item.horizontal&&this.item.rtl},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){if(o.isDevMode()&&!this.index)throw new Error("The kendoMenuExpandArrow directive requires the item index to be set.");this.item=this.itemsService.get(this.index)||{}},i.__decorate([o.Input("kendoMenuExpandArrow"),i.__metadata("design:type",String)],s.prototype,"index",void 0),i.__decorate([o.HostBinding("class.k-icon"),o.HostBinding("class.k-menu-expand-arrow"),i.__metadata("design:type",Boolean)],s.prototype,"hostClasses",void 0),i.__decorate([o.HostBinding("attr.role"),i.__metadata("design:type",String)],s.prototype,"role",void 0),i.__decorate([o.HostBinding("class.k-i-arrow-60-down"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],s.prototype,"arrowDown",null),i.__decorate([o.HostBinding("class.k-i-arrow-60-right"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],s.prototype,"arrowRight",null),i.__decorate([o.HostBinding("class.k-i-arrow-60-left"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],s.prototype,"arrowLeft",null),i.__decorate([o.Directive({selector:"[kendoMenuExpandArrow]"}),i.__metadata("design:paramtypes",[r.ItemsService])],s));function s(e){this.itemsService=e,this.hostClasses=!0,this.role="presentation"}t.ExpandArrowDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=(Object.defineProperty(s.prototype,"activeClass",{get:function(){return this.item.opened},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){if(o.isDevMode()&&!this.index)throw new Error("The kendoMenuItemLink directive requires the item index to be set.");this.item=this.itemsService.get(this.index)||{}},i.__decorate([o.Input("kendoMenuItemLink"),i.__metadata("design:type",String)],s.prototype,"index",void 0),i.__decorate([o.HostBinding("class.k-link"),o.HostBinding("class.k-menu-link"),i.__metadata("design:type",Boolean)],s.prototype,"hostClasses",void 0),i.__decorate([o.HostBinding("attr.role"),i.__metadata("design:type",String)],s.prototype,"role",void 0),i.__decorate([o.HostBinding("attr.tabindex"),i.__metadata("design:type",String)],s.prototype,"tabindex",void 0),i.__decorate([o.HostBinding("class.k-state-active"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],s.prototype,"activeClass",null),i.__decorate([o.Directive({selector:"[kendoMenuItemLink]"}),i.__metadata("design:paramtypes",[r.ItemsService])],s));function s(e){this.itemsService=e,this.hostClasses=!0,this.role="presentation",this.tabindex="-1"}t.LinkDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=n(16),s=n(42),p=n(4),c=n(3),u=(Object.defineProperty(l.prototype,"index",{get:function(){return this._index},set:function(e){this._index&&this._index!==e?(this.itemsService.remove(this),this._index=e,this.itemsService.add(this)):this._index=e,this.childId=this.itemsService.childId(e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"disabled",{get:function(){return this.item.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hasPopup",{get:function(){return!!this.hasContent||null},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"expanded",{get:function(){return this.hasContent?this.opened:null},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"label",{get:function(){return this.item.text?this.item.text:null},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"activeId",{get:function(){return this.index===this.navigation.activeIndex?"0":"-1"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"popupSettings",{get:function(){var e=this.rtl?s.POPUP_SETTINGS_RTL:s.POPUP_SETTINGS;return this.horizontal?e.horizontal:e.vertical},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"horizontal",{get:function(){return this.vertical||0<this.level},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hasLink",{get:function(){return Boolean(this.item.url)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"linkTemplate",{get:function(){return this.item.linkTemplate||this.itemLinkTemplate},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hasContent",{get:function(){var e=this.item.items;return e&&e.length||this.item.contentTemplate},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"isContent",{get:function(){return Boolean(this.item.content)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"iconClass",{get:function(){return"k-i-"+this.item.icon},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"children",{get:function(){var e=this.item;return e.contentTemplate?(this.contentItems||(this.contentItems=[{content:e.contentTemplate,owner:e,ownerIndex:this.index}]),this.contentItems):e.items},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"template",{get:function(){return this.item.template||this.itemTemplate},enumerable:!0,configurable:!0}),l.prototype.hasContentTemplates=function(){var e=this.item;return this.itemTemplate||e.contentTemplate||this.itemLinkTemplate||e.items&&e.items.find(function(e){return e.template||e.linkTemplate})},l.prototype.ngOnInit=function(){this.itemsService.add(this)},l.prototype.ngOnDestroy=function(){this.itemsService.remove(this),this.destroyed=!0,this.popupRef&&(this.popupRef.close(),this.popupRef=null)},l.prototype.focus=function(){this.element.nativeElement.focus()},l.prototype.toggleActive=function(e){e?this.setAttribute("tabindex","0"):this.setAttribute("tabindex","-1")},l.prototype.open=function(){if(!this.destroyed&&this.hasContent&&!this.opened){var e=this.popupSettings,t=!!this.animate&&Object.assign({},this.animate,{direction:e.animate});this.opened=!0,this.popupRef=this.popupService.open({popupAlign:e.popup,anchorAlign:e.anchor,collision:e.collision,anchor:this.element,positionMode:"absolute",content:this.popupTemplate,popupClass:{"k-rtl":this.rtl,"k-menu-popup":!0},animate:t}),this.setAttribute("aria-expanded","true"),this.setAttribute("aria-owns",this.childId),this.changeDetector.detectChanges()}},l.prototype.close=function(){!this.destroyed&&this.opened&&(this.opened=!1,this.popupRef&&(this.popupRef.close(),this.popupRef=null),this.changeDetector.detectChanges(),this.setAttribute("aria-expanded","false"),this.renderer.removeAttribute(this.element.nativeElement,"aria-owns"))},l.prototype.navigate=function(){var e;this.linkTemplate?e=this.element.nativeElement.querySelector("a.k-menu-link"):this.hasLink&&(e=this.link.nativeElement),e&&(this.navigating=!0,e.click(),this.navigating=!1)},l.prototype.setAttribute=function(e,t){this.renderer.setAttribute(this.element.nativeElement,e,t)},i.__decorate([o.Input(),i.__metadata("design:type",Object)],l.prototype,"item",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number)],l.prototype,"level",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],l.prototype,"index",null),i.__decorate([o.Input(),i.__metadata("design:type",Number)],l.prototype,"siblingIndex",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],l.prototype,"animate",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],l.prototype,"vertical",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],l.prototype,"rtl",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],l.prototype,"openOnClick",void 0),i.__decorate([o.Input(),i.__metadata("design:type",o.TemplateRef)],l.prototype,"itemTemplate",void 0),i.__decorate([o.Input(),i.__metadata("design:type",o.TemplateRef)],l.prototype,"itemLinkTemplate",void 0),i.__decorate([o.ViewChild("link"),i.__metadata("design:type",o.ElementRef)],l.prototype,"link",void 0),i.__decorate([o.ViewChild("popupTemplate"),i.__metadata("design:type",o.TemplateRef)],l.prototype,"popupTemplate",void 0),i.__decorate([o.HostBinding("attr.aria-disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],l.prototype,"disabled",null),i.__decorate([o.HostBinding("attr.aria-haspopup"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],l.prototype,"hasPopup",null),i.__decorate([o.HostBinding("attr.aria-expanded"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],l.prototype,"expanded",null),i.__decorate([o.HostBinding("attr.aria-label"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],l.prototype,"label",null),i.__decorate([o.HostBinding("attr.tabindex"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],l.prototype,"activeId",null),i.__decorate([o.Component({providers:[p.PopupService,{provide:p.POPUP_CONTAINER,useFactory:c.bodyFactory}],selector:"[kendoMenuItem]",template:'\n <span *ngIf="!hasLink && !item.content && !linkTemplate" class="k-link k-menu-link" #link\n [class.k-state-active]="opened" role="presentation">\n <ng-template [ngTemplateOutlet]="itemcontent">\n </ng-template>\n </span>\n <a *ngIf="item.url && !linkTemplate" class="k-link k-menu-link" #link [attr.href]="item.url"\n [class.k-state-active]="opened" tabindex="-1" role="presentation">\n <ng-template [ngTemplateOutlet]="itemcontent">\n </ng-template>\n </a>\n <ng-template *ngIf="linkTemplate && !item.content" [ngTemplateOutlet]="linkTemplate"\n [ngTemplateOutletContext]="{ item: item, index: index }">\n </ng-template>\n\n <div class="k-content" *ngIf="item.content" role="presentation">\n <ng-template [ngTemplateOutlet]="item.content" [ngTemplateOutletContext]="{ item: item.owner, index: item.ownerIndex }">\n </ng-template>\n </div>\n\n <ng-template #popupTemplate>\n <ul kendoMenuList\n [attr.id]="childId"\n [animate]="animate"\n [rtl]="rtl"\n [vertical]="vertical"\n [openOnClick]="openOnClick"\n [items]="children"\n [level]="level + 1"\n [index]="index"\n [itemTemplate]="itemTemplate"\n [itemLinkTemplate]="itemLinkTemplate"\n role="menu"\n class="k-group k-menu-group k-reset">\n </ul>\n </ng-template>\n\n <ng-template #itemcontent>\n <span *ngIf="item.icon" class="k-icon" [ngClass]="iconClass" role="presentation"></span>\n <ng-container *ngIf="!template">\n {{ item.text }}\n </ng-container>\n <ng-template *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index: index }">\n </ng-template>\n <span class="k-icon k-menu-expand-arrow" *ngIf="hasContent"\n role="presentation"\n [class.k-i-arrow-60-down]="!horizontal"\n [class.k-i-arrow-60-right]="horizontal && !rtl"\n [class.k-i-arrow-60-left]="horizontal && rtl">\n </span>\n </ng-template>\n '}),i.__metadata("design:paramtypes",[r.ItemsService,a.NavigationService,o.ChangeDetectorRef,o.Renderer2,p.PopupService,o.ElementRef])],l));function l(e,t,n,i,o,r){this.itemsService=e,this.navigation=t,this.changeDetector=n,this.renderer=i,this.popupService=o,this.element=r,this.animate=!0,this.openOnClick=!1,this.opened=!1,this.navigating=!1,this.destroyed=!1}t.ItemComponent=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=n(11),s=n(16),p=n(35),c=n(9),u=n(10),l=(d.prototype.hierarchyIndex=function(e){return this.itemsService.itemIndex(this.index,e)},d.prototype.ngOnInit=function(){this.itemsService.addList(this),this.initDomEvents()},d.prototype.ngOnDestroy=function(){this.itemsService.removeList(this),this.domSubscriptions&&this.domSubscriptions()},d.prototype.initDomEvents=function(){var s=this;this.element&&this.ngZone.runOutsideAngular(function(){var n=s.element.nativeElement,e=0<s.level?u.closest(n,function(e){return u.hasClass(e,"k-menu-popup")}):n,t=s.renderer.listen(n,"mouseover",function(e){if(e.target===n&&0===s.level)s.onLeave();else{var t=s.nodeItem(e.target)||s.itemsService.get(s.index);!t||s.openOnClick&&"click"===s.openOnClick.toggle&&0===t.level&&!t.hasContent||s.hover.over(t)}}),i=s.renderer.listen(e,"mouseleave",function(e){s.leavesMenu(e)&&s.onLeave()}),o=s.renderer.listen(n,"keydown",function(e){u.hasClass(e.target,"k-menu-item")&&s.navigation.keydown(e)}),r=s.renderer.listen(n,"focusout",function(e){s.leavesMenu(e)&&s.navigation.focusLeave()}),a=s.renderer.listen(n,"click",s.clickHandler.bind(s));s.domSubscriptions=function(){t(),i(),o(),r(),a()}})},d.prototype.leavesMenu=function(e){return!e.relatedTarget||!u.inMenu(e.relatedTarget,this.itemsService)},d.prototype.onLeave=function(){var e=this.openOnClick;e&&"click"===e.toggle||this.hover.leave(e&&"leave"===e.toggle)},d.prototype.nodeItem=function(e){var t=u.closestItem(e,this.element.nativeElement);if(t){var n=u.nodeIndex(t);return this.itemsService.get(n)}},d.prototype.clickHandler=function(e){if(!u.isFocusable(e.target)||u.hasClass(e.target,"k-menu-item")){var t=this.nodeItem(e.target);if(t&&!t.isContent&&!t.navigating)if(t.disabled)e.preventDefault();else{if(this.actions.select(t,e,function(){e.preventDefault()}),this.navigation.focus(t),0<t.level&&!t.hasContent&&this.actions.closeToRoot(t),this.openOnClick){var n=this.hover;t.opened?0===t.level&&(n.openOnOver=!1,this.actions.close(t)):t.hasContent?(n.openOnOver=!0,this.actions.closeOthers(t),this.actions.open(t)):(n.openOnOver=!1,0===t.level&&"click"===this.openOnClick.toggle&&this.hover.closeCurrent())}this.actions.execute()}}},i.__decorate([o.Input(),i.__metadata("design:type",Array)],d.prototype,"items",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number)],d.prototype,"level",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],d.prototype,"index",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],d.prototype,"animate",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],d.prototype,"vertical",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],d.prototype,"rtl",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],d.prototype,"openOnClick",void 0),i.__decorate([o.Input(),i.__metadata("design:type",o.TemplateRef)],d.prototype,"itemTemplate",void 0),i.__decorate([o.Input(),i.__metadata("design:type",o.TemplateRef)],d.prototype,"itemLinkTemplate",void 0),i.__decorate([o.Component({selector:"[kendoMenuList]",template:'\n <ng-container *ngFor="let item of items; let idx = index">\n <li *ngIf="!item.separator" kendoMenuItem\n [item]="item" [level]="level" [vertical]="vertical" [animate]="animate" [rtl]="rtl"\n [itemTemplate]="itemTemplate" [itemLinkTemplate]="itemLinkTemplate" [openOnClick]="openOnClick"\n [index]="hierarchyIndex(idx)" [siblingIndex]="idx" [attr.'+c.NODE_INDEX+']="hierarchyIndex(idx)"\n [ngClass]="item.cssClass" [ngStyle]="item.cssStyle"\n role="menuitem"\n class="k-item k-menu-item"\n [class.k-first]="idx === 0" [class.k-last]="idx === items.length - 1"\n [class.k-state-disabled]="item.disabled"></li>\n <li *ngIf="item.separator" class="k-separator k-item"\n role="separator" [ngClass]="item.cssClass" [ngStyle]="item.cssStyle">\n \n </li>\n </ng-container>\n '}),i.__metadata("design:paramtypes",[r.ItemsService,p.HoverService,a.ActionsService,s.NavigationService,o.Renderer2,o.NgZone,o.ElementRef])],d));function d(e,t,n,i,o,r,a){this.itemsService=e,this.hover=t,this.actions=n,this.navigation=i,this.renderer=o,this.ngZone=r,this.element=a,this.animate=!0}t.ListComponent=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),a=n(11),s=(Object.defineProperty(p.prototype,"openOnOver",{get:function(){return this._openOnOver},set:function(e){this.cancelActions(),this._openOnOver=e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"hovered",{get:function(){return this.items.get(this.hoveredIdx)},set:function(e){this.hoveredIdx=e?e.index:null},enumerable:!0,configurable:!0}),p.prototype.ngOnDestroy=function(){this.cancelActions()},p.prototype.over=function(t){var n=this;this.cancelActions(function(e){return"openOnOver"===e.name}),this.hovered&&this.hovered===t||(this.actions.closeOthers(t),(0<(this.hovered=t).level||this.openOnOver)&&!t.disabled&&(this.actions.open(t),this.cancelActions(function(e){return"close"===e.name&&(t===e.item||n.items.hasParent(t,e.item))||"open"===e.name&&!n.items.hasParent(t,e.item)})),this.scheduleActions())},p.prototype.leave=function(e){var t=this.hovered;t&&(this.actions.closeToRoot(t),this.cancelActions(function(e){return"open"===e.name}),this.scheduleActions()),e&&this._openOnOver&&this.scheduleDisableOpenOnOver(),this.hovered=null},p.prototype.closeCurrent=function(){var e=this.hovered;e&&(this.actions.closeToRoot(e),this.hovered=null)},p.prototype.scheduleActions=function(){var e=this;if(this.actions.hasPending){var t={};t.actions=this.actions.clear(),t.id=setTimeout(function(){e.actions.execute(t.actions),e.removeScheduled(t)},this.delay),this.scheduled.push(t)}},p.prototype.scheduleDisableOpenOnOver=function(){var e=this,t={actions:[{name:"openOnOver"}]};t.id=setTimeout(function(){e._openOnOver=!1,e.removeScheduled(t)},Math.max(this.delay,500)),this.scheduled.push(t)},p.prototype.removeScheduled=function(e){for(var t=this.scheduled,n=0;n<t.length;n++)if(t[n]===e)return void t.splice(n,1)},p.prototype.cancelActions=function(e){for(var t=this.scheduled,n=t.length-1;0<=n;n--){var i=t[n],o=i.actions;if(e)for(var r=o.length-1;0<=r;r--)e(o[r])&&o.splice(r,1);e&&0!==o.length||(clearTimeout(i.id),t.splice(n,1))}},i.__decorate([o.Injectable(),i.__metadata("design:paramtypes",[a.ActionsService,r.ItemsService])],p));function p(e,t){this.actions=e,this.items=t,this.delay=100,this._openOnOver=!0,this.scheduled=[]}t.HoverService=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(o.prototype.preventDefault=function(){this.prevented=!0},o.prototype.isDefaultPrevented=function(){return this.prevented},o);function o(e){this.prevented=!1,Object.assign(this,e)}t.PreventableEvent=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c,i,o=n(0),u=n(1),r=n(18),a=n(2),s=n(11),p=n(16),l=n(35),d=n(43),m=n(10),h=n(8),v=n(7),f=n(9),_=(c=v.MenuBase,o.__extends(g,c),i=g,Object.defineProperty(g.prototype,"ariaOrientation",{get:function(){if(this.vertical)return"vertical"},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"contextMenuClass",{get:function(){return Boolean(this.contextService)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"direction",{get:function(){return this.rtl},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"rtl",{get:function(){return this.localization.rtl},enumerable:!0,configurable:!0}),g.prototype.toggle=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0;i<t.length;i++){var o=this.itemsService.get(t[i]);o&&!o.disabled&&(e?o.open():o.close())}},g.prototype.focus=function(e){this.navigation.focusIndex(e)},g.prototype.ngOnChanges=function(e){if(this.navigation.vertical=this.vertical,this.hover.delay=this.hoverDelay,e.openOnClick){var t=this.openOnClick=d.normalize(this.openOnClick);this.hover.openOnOver=!t,t&&"click"===t.toggle?this.attachCloseClick():this.unsubscribeClick()}},g.prototype.ngAfterViewChecked=function(){this.navigation.updateActive()},g.prototype.ngOnDestroy=function(){this.unsubscribeClick(),this.contextService&&(this.contextService.items=null,this.contextKeyDownSubscription.unsubscribe())},g.prototype.attachCloseClick=function(){var t=this;this.closeClickSubscription||"undefined"==typeof document||this.ngZone.runOutsideAngular(function(){t.closeClickSubscription=t.renderer.listen("document","click",function(e){m.inMenu(e.target,t.itemsService)||(t.hover.openOnOver=!1,t.actions.closeAll(),t.actions.execute())})})},g.prototype.unsubscribeClick=function(){this.closeClickSubscription&&this.closeClickSubscription()},g.prototype.contextKeyDown=function(e){if(this.itemsService.hasItems){var t,n=e.keyCode,i=this.localization.rtl,o=n===f.KeyCodes.DOWN||n===f.KeyCodes.RIGHT,r=n===f.KeyCodes.UP||n===f.KeyCodes.LEFT;o&&!i||r&&i?t="first":(o&&i||r&&!i)&&(t="last"),t&&(e.preventDefault(),this.focus(t))}},o.__decorate([u.Input(),o.__metadata("design:type",u.TemplateRef)],g.prototype,"menuItemTemplate",void 0),o.__decorate([u.Input(),o.__metadata("design:type",u.TemplateRef)],g.prototype,"menuItemLinkTemplate",void 0),o.__decorate([u.Output(),o.__metadata("design:type",u.EventEmitter)],g.prototype,"select",void 0),o.__decorate([u.Output(),o.__metadata("design:type",u.EventEmitter)],g.prototype,"open",void 0),o.__decorate([u.Output(),o.__metadata("design:type",u.EventEmitter)],g.prototype,"close",void 0),o.__decorate([u.HostBinding("class.k-rtl"),o.__metadata("design:type",Boolean),o.__metadata("design:paramtypes",[])],g.prototype,"direction",null),i=o.__decorate([u.Component({exportAs:"kendoMenu",providers:[a.ItemsService,s.ActionsService,p.NavigationService,l.HoverService,r.LocalizationService,{provide:r.L10N_PREFIX,useValue:"kendo.menu"},{provide:v.MenuBase,useExisting:u.forwardRef(function(){return i})}],selector:"kendo-menu",template:'\n <ul role="menubar"\n [attr.aria-orientation]="ariaOrientation"\n kendoMenuList [items]="rootItems" [level]="0" class="k-widget k-reset k-header k-menu"\n [vertical]="vertical" [rtl]="rtl" [animate]="animate" [openOnClick]="openOnClick"\n [itemTemplate]="itemTemplate.first?.templateRef || menuItemTemplate"\n [itemLinkTemplate]="itemLinkTemplate.first?.templateRef || menuItemLinkTemplate"\n [class.k-menu-horizontal]="!vertical"\n [class.k-menu-vertical]="vertical"\n [class.k-context-menu]="contextMenuClass">\n </ul>\n '}),o.__param(7,u.Optional()),o.__metadata("design:paramtypes",[a.ItemsService,l.HoverService,s.ActionsService,p.NavigationService,r.LocalizationService,u.NgZone,u.Renderer2,h.ContextMenuService])],g));function g(e,t,n,i,o,r,a,s){var p=c.call(this)||this;return p.itemsService=e,p.hover=t,p.actions=n,p.navigation=i,p.localization=o,p.ngZone=r,p.renderer=a,p.contextService=s,p.select=new u.EventEmitter,p.open=new u.EventEmitter,p.close=new u.EventEmitter,p.actions.owner=p,s&&(s.items=p.itemsService,p.contextKeyDownSubscription=s.keydown.subscribe(p.contextKeyDown.bind(p))),p}t.MenuComponent=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(13),a=n(19),s=i.__decorate([o.NgModule({exports:[r.MenuModule,a.ContextMenuModule]})],p);function p(){}t.MenusModule=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(8),a=(s.prototype.get=function(e){if(this.contextService.items)return this.contextService.items.get(e)},i.__decorate([o.Injectable(),i.__metadata("design:paramtypes",[r.ContextMenuService])],s));function s(e){this.contextService=e}t.ContextMenuItemsService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=(i=n(25).ContextMenuEvent,o.__extends(a,i),a);function a(){return null!==i&&i.apply(this,arguments)||this}t.ContextMenuSelectEvent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),r=(i=n(17).MenuEvent,o.__extends(a,i),a);function a(){return null!==i&&i.apply(this,arguments)||this}t.MenuSelectEvent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={vertical:"top",horizontal:"left"},o={vertical:"top",horizontal:"right"},r={vertical:"flip",horizontal:"fit"},a={vertical:"fit",horizontal:"flip"};t.POPUP_SETTINGS_RTL={vertical:{anchor:{vertical:"bottom",horizontal:"right"},popup:o,collision:r,animate:"down"},horizontal:{anchor:{vertical:"top",horizontal:"left"},popup:o,collision:a,animate:"left"}},t.POPUP_SETTINGS={vertical:{anchor:{vertical:"bottom",horizontal:"left"},popup:i,collision:r,animate:"down"},horizontal:{anchor:{vertical:"top",horizontal:"right"},popup:i,collision:a,animate:"right"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=function(e){return e&&Object.assign({toggle:"select"},e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(37);t.MenuComponent=i.MenuComponent;var o=n(34);t.ListComponent=o.ListComponent;var r=n(33);t.ItemComponent=r.ItemComponent;var a=n(32);t.LinkDirective=a.LinkDirective;var s=n(31);t.ExpandArrowDirective=s.ExpandArrowDirective;var p=n(15);t.MenuItemComponent=p.MenuItemComponent;var c=n(17);t.MenuEvent=c.MenuEvent;var u=n(41);t.MenuSelectEvent=u.MenuSelectEvent;var l=n(14);t.ItemContentTemplateDirective=l.ItemContentTemplateDirective;var d=n(6);t.ItemTemplateDirective=d.ItemTemplateDirective;var m=n(5);t.ItemLinkTemplateDirective=m.ItemLinkTemplateDirective;var h=n(30);t.HierarchyBindingDirective=h.HierarchyBindingDirective;var v=n(27);t.FlatBindingDirective=v.FlatBindingDirective;var f=n(13);t.MenuModule=f.MenuModule;var _=n(25);t.ContextMenuEvent=_.ContextMenuEvent;var g=n(40);t.ContextMenuSelectEvent=g.ContextMenuSelectEvent;var y=n(24);t.ContextMenuPopupEvent=y.ContextMenuPopupEvent;var b=n(12);t.ContextMenuTemplateDirective=b.ContextMenuTemplateDirective;var C=n(23);t.ContextMenuComponent=C.ContextMenuComponent;var I=n(19);t.ContextMenuModule=I.ContextMenuModule;var x=n(8);t.ContextMenuService=x.ContextMenuService;var O=n(38);t.MenusModule=O.MenusModule,function(e){for(var t in e)k(t,e[t])}(t)}],i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=44)}}}); |
@@ -6,3 +6,3 @@ { | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
"version": "1.3.0-dev.201905291318", | ||
"version": "1.3.0", | ||
"main": "dist/npm/index.js", | ||
@@ -9,0 +9,0 @@ "module": "dist/fesm5/index.js", |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3
830928