/** 
 * Kendo UI v2016.3.1118 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2016 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(e,define){define("kendo.mobile.switch.min",["kendo.fx.min","kendo.userevents.min"],e)}(function(){return function(e,n){function t(e,n,t){return Math.max(n,Math.min(t,e))}var s=window.kendo,i=s.mobile.ui,o=s._outerWidth,a=i.Widget,r=s.support,c="change",l="km-switch-on",p="km-switch-off",d="margin-left",h="km-state-active",f="km-state-disabled",u="disabled",k=r.transitions.css+"transform",m=e.proxy,g='<span class="km-switch km-widget">        <span class="km-switch-wrapper"><span class="km-switch-background"></span></span>         <span class="km-switch-container"><span class="km-switch-handle" >             <span class="km-switch-label-on">{0}</span>             <span class="km-switch-label-off">{1}</span>         </span>     </span>',w=a.extend({init:function(n,t){var i,o=this;a.fn.init.call(o,n,t),t=o.options,o.wrapper=e(s.format(g,t.onLabel,t.offLabel)),o.handle=o.wrapper.find(".km-switch-handle"),o.background=o.wrapper.find(".km-switch-background"),o.wrapper.insertBefore(o.element).prepend(o.element),o._drag(),o.origin=parseInt(o.background.css(d),10),o.constrain=0,o.snapPoint=0,n=o.element[0],n.type="checkbox",o._animateBackground=!0,i=o.options.checked,null===i&&(i=n.checked),o.check(i),o.options.enable=o.options.enable&&!o.element.attr(u),o.enable(o.options.enable),o.refresh(),s.notify(o,s.mobile.ui)},refresh:function(){var e=this,n=o(e.handle,!0);e.width=e.wrapper.width(),e.constrain=e.width-n,e.snapPoint=e.constrain/2,"number"!=typeof e.origin&&(e.origin=parseInt(e.background.css(d),10)),e.background.data("origin",e.origin),e.check(e.element[0].checked)},events:[c],options:{name:"Switch",onLabel:"on",offLabel:"off",checked:null,enable:!0},check:function(e){var t=this,s=t.element[0];return e===n?s.checked:(t._position(e?t.constrain:0),s.checked=e,t.wrapper.toggleClass(l,e).toggleClass(p,!e),n)},value:function(){return this.check.apply(this,arguments)},destroy:function(){a.fn.destroy.call(this),this.userEvents.destroy()},toggle:function(){var e=this;e.check(!e.element[0].checked)},enable:function(e){var t=this.element,s=this.wrapper;n===e&&(e=!0),this.options.enable=e,e?t.removeAttr(u):t.attr(u,u),s.toggleClass(f,!e)},_resize:function(){this.refresh()},_move:function(e){var n=this;e.preventDefault(),n._position(t(n.position+e.x.delta,0,n.width-o(n.handle,!0)))},_position:function(e){var n=this;n.position=e,n.handle.css(k,"translatex("+e+"px)"),n._animateBackground&&n.background.css(d,n.origin+e)},_start:function(){this.options.enable?(this.userEvents.capture(),this.handle.addClass(h)):this.userEvents.cancel()},_stop:function(){var e=this;e.handle.removeClass(h),e._toggle(e.position>e.snapPoint)},_toggle:function(e){var n,t=this,i=t.handle,o=t.element[0],a=o.checked,r=s.mobile.application&&s.mobile.application.os.wp?100:200;t.wrapper.toggleClass(l,e).toggleClass(p,!e),t.position=n=e*t.constrain,t._animateBackground&&t.background.kendoStop(!0,!0).kendoAnimate({effects:"slideMargin",offset:n,reset:!0,reverse:!e,axis:"left",duration:r}),i.kendoStop(!0,!0).kendoAnimate({effects:"slideTo",duration:r,offset:n+"px,0",reset:!0,complete:function(){a!==e&&(o.checked=e,t.trigger(c,{checked:e}))}})},_drag:function(){var e=this;e.userEvents=new s.UserEvents(e.wrapper,{fastTap:!0,tap:function(){e.options.enable&&e._toggle(!e.element[0].checked)},start:m(e._start,e),move:m(e._move,e),end:m(e._stop,e)})}});i.plugin(w)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,n,t){(t||n)()});
//# sourceMappingURL=kendo.mobile.switch.min.js.map
