/**
* Kendo UI v2018.1.117 (http://www.telerik.com/kendo-ui)
* Copyright 2018 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
!function(t,define){define("kendo.toolbar.min",["kendo.core.min","kendo.userevents.min","kendo.popup.min"],t)}(function(){return function(t,e){function o(t){t.target.is(".k-toggle-button")||t.target.toggleClass(N,"press"==t.type)}function i(e){return e=t(e),e.hasClass("km-actionsheet")?e.closest(".km-popup-wrapper"):e.addClass("km-widget km-actionsheet").wrap('
').parent().wrap('').parent()}function n(t){t.preventDefault()}function s(e,o){var i="next"===o?t.fn.next:t.fn.prev,n="next"===o?t.fn.first:t.fn.last,l=i.call(e);return l.is(":kendoFocusable")||!l.length?l:l.find(":kendoFocusable").length?n.call(l.find(":kendoFocusable")):s(l,o)}var l,r,a,d,h,p,u,c,f,m,v,b,g,w,k,C,y=window.kendo,_=y.Class,A=y.ui.Widget,x=t.proxy,B=y.isFunction,E=y.keys,T=y._outerWidth,O="k-toolbar",I="k-button",F="k-overflow-button",P="k-toggle-button",U="k-button-group",D="k-split-button",z="k-separator",G="k-popup",H="k-toolbar-resizable",N="k-state-active",M="k-state-disabled",R="k-state-hidden",W="k-group-start",S="k-group-end",K="k-primary",j="k-icon",q="k-i-",Q="k-button-icon",V="k-button-icontext",L="k-list-container k-split-container",J="k-split-button-arrow",X="k-overflow-anchor",Y="k-overflow-container",Z="k-toolbar-first-visible",$="k-toolbar-last-visible",tt="click",et="toggle",ot="open",it="close",nt="overflowOpen",st="overflowClose",lt="never",rt="auto",at="always",dt="k-overflow-hidden",ht="_optionlist",pt=y.attr("uid");y.toolbar={},l={overflowAnchor:'
',overflowContainer:''},y.toolbar.registerComponent=function(t,e,o){l[t]={toolbar:e,overflow:o}},r=y.Class.extend({addOverflowAttr:function(){this.element.attr(y.attr("overflow"),this.options.overflow||rt)},addUidAttr:function(){this.element.attr(pt,this.options.uid)},addIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id)},addOverflowIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id+"_overflow")},attributes:function(){this.options.attributes&&this.element.attr(this.options.attributes)},show:function(){this.element.removeClass(R).show(),this.options.hidden=!1},hide:function(){this.element.addClass(R).hide(),this.overflow&&this.overflowHidden&&this.overflowHidden(),this.options.hidden=!0},remove:function(){this.element.remove()},enable:function(t){t===e&&(t=!0),this.element.toggleClass(M,!t),this.options.enable=t},twin:function(){var o=this.element.attr(pt);return this.overflow&&this.options.splitContainerId?t("#"+this.options.splitContainerId).find("["+pt+"='"+o+"']").data(this.options.type):this.overflow?this.toolbar.element.find("["+pt+"='"+o+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+pt+"='"+o+"']").data(this.options.type):e}}),y.toolbar.Item=r,a=r.extend({init:function(o,i){var n=t(o.useButtonTag?' ':' ');this.element=n,this.options=o,this.toolbar=i,this.attributes(),o.primary&&n.addClass(K),o.togglable&&(n.addClass(P),this.toggle(o.selected)),o.url===e||o.useButtonTag||(n.attr("href",o.url),o.mobile&&n.attr(y.attr("role"),"button")),o.group&&(n.attr(y.attr("group"),o.group),this.group=this.toolbar.addToGroup(this,o.group)),!o.togglable&&o.click&&B(o.click)&&(this.clickHandler=o.click),o.togglable&&o.toggle&&B(o.toggle)&&(this.toggleHandler=o.toggle)},toggle:function(t,e){t=!!t,this.group&&t?this.group.select(this):this.group||this.select(t),e&&this.twin()&&this.twin().toggle(t)},getParentGroup:function(){if(this.options.isChild)return this.element.closest("."+U).data("buttonGroup")},_addGraphics:function(){var e,o,i,n=this.element,s=this.options.icon,l=this.options.spriteCssClass,r=this.options.imageUrl;(l||r||s)&&(e=!0,n.contents().filter(function(){return!t(this).hasClass("k-sprite")&&!t(this).hasClass(j)&&!t(this).hasClass("k-image")}).each(function(o,i){(1==i.nodeType||3==i.nodeType&&t.trim(i.nodeValue).length>0)&&(e=!1)}),n.addClass(e?Q:V)),s?(o=n.children("span."+j).first(),o[0]||(o=t(' ').prependTo(n)),o.addClass(q+s)):l?(o=n.children("span.k-sprite").first(),o[0]||(o=t(' ').prependTo(n)),o.addClass(l)):r&&(i=n.children("img.k-image").first(),i[0]||(i=t(' ').prependTo(n)),i.attr("src",r))}}),y.toolbar.Button=a,d=a.extend({init:function(t,e){a.fn.init.call(this,t,e);var o=this.element;o.addClass(I),this.addIdAttr(),t.align&&o.addClass("k-align-"+t.align),"overflow"!=t.showText&&t.text&&o.html(t.mobile?''+t.text+" ":t.text),t.hasIcon="overflow"!=t.showIcon&&(t.icon||t.spriteCssClass||t.imageUrl),t.hasIcon&&this._addGraphics(),this.addUidAttr(),this.addOverflowAttr(),this.enable(t.enable),t.hidden&&this.hide(),this.element.data({type:"button",button:this})},select:function(t){t===e&&(t=!1),this.element.toggleClass(N,t),this.options.selected=t}}),y.toolbar.ToolBarButton=d,h=a.extend({init:function(e,o){this.overflow=!0,a.fn.init.call(this,t.extend({},e),o);var i=this.element;"toolbar"!=e.showText&&e.text&&i.html(e.mobile?''+e.text+" ":''+e.text+" "),e.hasIcon="toolbar"!=e.showIcon&&(e.icon||e.spriteCssClass||e.imageUrl),e.hasIcon&&this._addGraphics(),e.isChild||this._wrap(),this.addOverflowIdAttr(),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.enable(e.enable),i.addClass(F+" "+I),e.hidden&&this.hide(),e.togglable&&this.toggle(e.selected),this.element.data({type:"button",button:this})},_wrap:function(){this.element=this.element.wrap(" ").parent()},overflowHidden:function(){this.element.addClass(dt)},select:function(t){t===e&&(t=!1),this.options.isChild?this.element.toggleClass(N,t):this.element.find(".k-button").toggleClass(N,t),this.options.selected=t}}),y.toolbar.OverflowButton=h,y.toolbar.registerComponent("button",d,h),p=r.extend({createButtons:function(e){var o,i,n=this.options,s=n.buttons||[];for(i=0;i");this.options=e,this.toolbar=o,this.addIdAttr(),e.align&&i.addClass("k-align-"+e.align),this.createButtons(d),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass(U),this.element.data({type:"buttonGroup",buttonGroup:this})}}),y.toolbar.ToolBarButtonGroup=u,c=p.extend({init:function(e,o){var i=this.element=t(" ");this.options=e,this.toolbar=o,this.overflow=!0,this.addOverflowIdAttr(),this.createButtons(h),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass((e.mobile?"":U)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(dt)}}),y.toolbar.OverflowButtonGroup=c,y.toolbar.registerComponent("buttonGroup",u,c),f=r.extend({init:function(e,o){var i=this.element=t('
');this.options=e,this.toolbar=o,this.mainButton=new d(t.extend({},e,{hidden:!1}),o),this.arrowButton=t(' '),this.popupElement=t(''),this.mainButton.element.removeAttr("href tabindex").appendTo(i),this.arrowButton.appendTo(i),this.popupElement.appendTo(i),e.align&&i.addClass("k-align-"+e.align),e.id||(e.id=e.uid),i.attr("id",e.id+"_wrapper"),this.addOverflowAttr(),this.addUidAttr(),this.createMenuButtons(),this.createPopup(),this._navigatable(),this.mainButton.main=!0,this.enable(e.enable),e.hidden&&this.hide(),i.data({type:"splitButton",splitButton:this,kendoPopup:this.popup})},_navigatable:function(){var e=this;e.popupElement.on("keydown","."+I,function(o){var i=t(o.target).parent();o.preventDefault(),o.keyCode===E.ESC||o.keyCode===E.TAB||o.altKey&&o.keyCode===E.UP?(e.toggle(),e.focus()):o.keyCode===E.DOWN?s(i,"next").focus():o.keyCode===E.UP?s(i,"prev").focus():o.keyCode===E.SPACEBAR||o.keyCode===E.ENTER?e.toolbar.userEvents.trigger("tap",{target:t(o.target)}):o.keyCode===E.HOME?i.parent().find(":kendoFocusable").first().focus():o.keyCode===E.END&&i.parent().find(":kendoFocusable").last().focus()})},createMenuButtons:function(){var e,o,i=this.options,n=i.menuButtons;for(o=0;o").parent().appendTo(this.popupElement)},createPopup:function(){var o=this,s=this.options,l=this.element;this.popupElement.attr("id",s.id+ht).attr(pt,s.rootUid),s.mobile&&(this.popupElement=i(this.popupElement)),this.popup=this.popupElement.kendoPopup({appendTo:s.mobile?t(s.mobile).children(".km-pane"):null,anchor:l,isRtl:this.toolbar._isRtl,copyAnchorStyles:!1,animation:s.animation,open:function(t){var i=o.toolbar.trigger(ot,{target:l});return i?(t.preventDefault(),e):(o.adjustPopupWidth(t.sender),e)},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(t){var e=o.toolbar.trigger(it,{target:l});e&&t.preventDefault(),l.focus()}}).data("kendoPopup"),this.popup.element.on(tt,"a.k-button",n)},adjustPopupWidth:function(t){var e,o=t.options.anchor,i=T(o);y.wrap(t.element).addClass("k-split-wrapper"),e="border-box"!==t.element.css("box-sizing")?i-(T(t.element)-t.element.width()):i,t.element.css({fontFamily:o.css("font-family"),"min-width":e})},remove:function(){this.popup.element.off(tt,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){this.popup.toggle()},enable:function(t){t===e&&(t=!0),this.mainButton.enable(t),this.options.enable=t},focus:function(){this.element.focus()},hide:function(){this.popup&&this.popup.close(),this.element.addClass(R).hide(),this.options.hidden=!0},show:function(){this.element.removeClass(R).hide(),this.options.hidden=!1}}),y.toolbar.ToolBarSplitButton=f,m=r.extend({init:function(e,o){var i,n,s,l=this.element=t(' '),r=e.menuButtons;for(this.options=e,this.toolbar=o,this.overflow=!0,n=(e.id||e.uid)+ht,this.mainButton=new h(t.extend({},e)),this.mainButton.element.appendTo(l),s=0;s ");this.element=i,this.options=e,this.toolbar=o,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),i.addClass(z),i.data({type:"separator",separator:this})}}),b=r.extend({init:function(e,o){var i=this.element=t(" ");this.element=i,this.options=e,this.toolbar=o,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),i.addClass(z),i.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(dt)}}),y.toolbar.registerComponent("separator",v,b),g=r.extend({init:function(e,o,i){var n=B(e)?e(o):e;n=n instanceof jQuery?n.wrap("
").parent():t("
").html(n),this.element=n,this.options=o,this.options.type="template",this.toolbar=i,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),n.data({type:"template",template:this})}}),y.toolbar.TemplateItem=g,w=r.extend({init:function(e,o,i){var n=t(B(e)?e(o):e);n=n instanceof jQuery?n.wrap(" ").parent():t(" ").html(n),this.element=n,this.options=o,this.options.type="template",this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),this.addOverflowAttr(),n.data({type:"template",template:this})},overflowHidden:function(){this.element.addClass(dt)}}),y.toolbar.OverflowTemplateItem=w,k=_.extend({init:function(t){this.name=t,this.buttons=[]},add:function(t){this.buttons[this.buttons.length]=t},remove:function(e){var o=t.inArray(e,this.buttons);this.buttons.splice(o,1)},select:function(t){var e,o;for(o=0;o'),o=i(o)):e.overflowAnchor.append(' '),e.popup=new y.ui.Popup(o,{origin:"bottom "+r,position:"top "+r,anchor:e.overflowAnchor,isRtl:n,animation:e.animation,appendTo:e.isMobile?t(e.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(o){var i=y.wrap(e.popup.element).addClass("k-overflow-wrapper");e.isMobile?e.popup.container.css("max-height",parseFloat(t(".km-content:visible").innerHeight())-15+"px"):i.css("margin-left",(n?-1:1)*((T(i)-i.width())/2+1)),e.trigger(nt)&&o.preventDefault()},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(t){e.trigger(st)&&t.preventDefault(),this.element.focus()}}),e.popup.element.on("keydown","."+I,function(o){var i,n=t(o.target),l=n.parent(),r=l.is("."+U)||l.is("."+D);o.preventDefault(),o.keyCode===E.ESC||o.keyCode===E.TAB||o.altKey&&o.keyCode===E.UP?(e._toggleOverflow(),e.overflowAnchor.focus()):o.keyCode===E.DOWN?(i=!r||r&&n.is(":last-child")?l:n,s(i,"next").focus()):o.keyCode===E.UP?(i=!r||r&&n.is(":first-child")?l:n,s(i,"prev").focus()):o.keyCode===E.SPACEBAR||o.keyCode===E.ENTER?(e.userEvents.trigger("tap",{target:t(o.target)}),e.overflowAnchor.focus()):o.keyCode===E.HOME?l.parent().find(":kendoFocusable").first().focus():o.keyCode===E.END&&l.parent().find(":kendoFocusable").last().focus()}),e.popup.container=e.isMobile?e.popup.element.find("."+Y):e.popup.element,e.popup.container.attr(pt,this.uid)},_toggleOverflowAnchor:function(){var t=!1;t=this.options.mobile?this.popup.element.find("."+Y).children(":not(."+dt+", ."+G+")").length>0:this.popup.element.children(":not(."+dt+", ."+G+")").length>0,this.overflowAnchor.css(t?{visibility:"visible",width:""}:{visibility:"hidden",width:"1px"})},_buttonClick:function(o){var i,n,s,l,r,a,d,h=this,p=o.target.closest("."+J).length;return o.preventDefault(),p?(h._toggle(o),e):(n=t(o.target).closest("."+I,h.element),n.hasClass(X)||(s=n.data("button"),!s&&h.popup&&(n=t(o.target).closest("."+F,h.popup.container),s=n.parent("li").data("button")),s&&s.options.enable&&(s.options.togglable?(r=B(s.toggleHandler)?s.toggleHandler:null,s.toggle(!s.options.selected,!0),a={target:n,group:s.options.group,checked:s.options.selected,id:s.options.id},r&&r.call(h,a),h.trigger(et,a)):(r=B(s.clickHandler)?s.clickHandler:null,a={sender:h,target:n,id:s.options.id},r&&r.call(h,a),h.trigger(tt,a)),s.options.url&&(s.options.attributes&&s.options.attributes.target&&(d=s.options.attributes.target),window.open(s.options.url,d||"_self")),n.hasClass(F)&&h.popup.close(),l=n.closest(".k-split-container"),l[0]&&(i=l.data("kendoPopup"),(i?i:l.parents(".km-popup-wrapper").data("kendoPopup")).close()))),e)},_navigatable:function(){var e=this;e.element.attr("tabindex",0).focus(function(){var e=t(this).find(":kendoFocusable:first");0!==e.length&&(e.is("."+X)&&(e=s(e,"next")),e[0].focus())}).on("keydown",x(e._keydown,e))},_keydown:function(o){var i,n,s,l,r,a,d,h=t(o.target),p=o.keyCode,u=this.element.children(":not(.k-separator):visible"),c=this._isRtl?-1:1;if(p===E.TAB&&(i=h.parentsUntil(this.element).last(),n=!1,s=!1,i.length||(i=h),i.is("."+X)&&(o.shiftKey&&o.preventDefault(),u.last().is(":kendoFocusable")?u.last().focus():u.last().find(":kendoFocusable").last().focus()),o.shiftKey||u.index(i)!==u.length-1||(n=!i.is("."+U)||h.is(":last-child")),l=u.index(i)===u.not(".k-overflow-anchor").first().index(),o.shiftKey&&l&&(s=!i.is("."+U)||h.is(":first-child")),n&&this.overflowAnchor&&"hidden"!==this.overflowAnchor.css("visibility")&&(o.preventDefault(),this.overflowAnchor.focus()),s&&(o.preventDefault(),r=this._getPrevFocusable(this.wrapper),r&&r.focus()),this._preventNextFocus=!1),o.altKey&&p===E.DOWN)return a=t(document.activeElement).data("splitButton"),d=t(document.activeElement).is("."+X),a?a.toggle():d&&this._toggleOverflow(),e;if((p===E.SPACEBAR||p===E.ENTER)&&!h.is("input, checkbox"))return o.preventDefault(),h.is("."+D)&&(h=h.children().first()),this.userEvents.trigger("tap",{target:h}),e;if(p===E.HOME){if(h.is(".k-dropdown")||h.is("input"))return;this.overflowAnchor?u.eq(1).focus():u.first().focus(),o.preventDefault()}else if(p===E.END){if(h.is(".k-dropdown")||h.is("input"))return;this.overflowAnchor&&"hidden"!=t(this.overflowAnchor).css("visibility")?this.overflowAnchor.focus():u.last().focus(),o.preventDefault()}else p!==E.RIGHT||this._preventNextFocus||h.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(o.target,1*c)?p!==E.LEFT||this._preventNextFocus||h.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(o.target,-1*c)||(this._getNextElement(o.target,-1*c).focus(),o.preventDefault()):(this._getNextElement(o.target,1*c).focus(),o.preventDefault())},_getNextElement:function(e,o){var i=this.element.children(":not(.k-separator):visible"),n=i.index(i.index(e)===-1?e.parentElement:e),s=this.overflowAnchor?1:0,l=o,r=1===o?i.length-1:s,a=1===o?s:i.length-1,d=i[n+o];if(this._preventNextFocus=!1,t(e).closest("."+U).length&&!t(e).is(1===o?":last-child":":first-child"))return t(e).closest("."+U).children()[t(e).closest("."+U).children().index(e)+o];for(this.overflowAnchor&&e===this.overflowAnchor[0]&&o===-1&&(d=i[i.length-1]),n===r&&(d=!this.overflowAnchor||this.overflowAnchor&&"hidden"===t(this.overflowAnchor).css("visibility")?i[a]:this.overflowAnchor);!t(d).is(":kendoFocusable");){if(d=o===-1&&t(d).closest("."+U).length?t(d).children(":not(label, div)").last():t(d).children(":not(label, div)").first(),!d.length&&(l+=o,d=i[n+l],!d))return this.overflowAnchor;this._preventNextFocus=!t(d).closest("."+U).length}return d},_getPrevFocusable:function(o){if(o.is("html"))return o;var i,n,s=o.prevAll();return s.each(function(){return n=t(this),n.is(":kendoFocusable")?(i=n,!1):n.find(":kendoFocusable").length>0?(i=n.find(":kendoFocusable").last(),!1):e}),i?i:this._getPrevFocusable(o.parent())},_toggle:function(e){var o=t(e.target).closest("."+D).data("splitButton");e.preventDefault(),o.options.enable&&o.toggle()},_toggleOverflow:function(){this.popup.toggle()},_resize:function(t){var e=t.width;this.options.resizable&&(this.popup.close(),this._shrink(e),this._stretch(e),this._markVisibles(),this._toggleOverflowAnchor())},_childrenWidth:function(){var e=0;return this.element.children(":visible:not('."+R+"')").each(function(){e+=T(t(this),!0)}),Math.ceil(e)},_shrink:function(t){var e,o,i;if(t=0&&(e=o.eq(i),!(t>this._childrenWidth()));i--)this._hideItem(e)},_stretch:function(t){var e,o,i;if(t>this._childrenWidth())for(o=this.element.children(":hidden:not('."+R+"')"),i=0;ili[data-uid='"+t.data("uid")+"']").removeClass(dt)},_showItem:function(t,e){return!!(t.length&&e>this._childrenWidth()+T(t,!0))&&(t.show(),this.popup&&this.popup.container.find(">li[data-uid='"+t.data("uid")+"']").addClass(dt),!0)},_markVisibles:function(){var t=this.popup.container.children(),e=this.element.children(":not(.k-overflow-anchor)"),o=t.filter(":not(.k-overflow-hidden)"),i=e.filter(":visible");t.add(e).removeClass(Z+" "+$),o.first().add(i.first()).addClass(Z),o.last().add(i.last()).addClass($)}}),y.ui.plugin(C)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,o){(o||e)()});
//# sourceMappingURL=kendo.toolbar.min.js.map