/* * Kendo UI Web v2013.1.319 (http://kendoui.com) * Copyright 2013 Telerik AD. All rights reserved. * * Kendo UI Web commercial licenses may be obtained at * https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx * If you do not own a commercial license, this file shall be governed by the * GNU General Public License (GPL) version 3. * For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html */ ("function"==typeof define&&define.amd?define:function(t,e){return e()})(["./kendo.core.min"],function(){(function(t){var e=window.kendo,n=window.location,r=window.history,i=50,o=/^#*/,a=window.document.documentMode,u=e.support.browser.msie&&(!a||8>=a),s="onhashchange"in window&&!u,h=window.document,c=e.Observable.extend({start:function(t){t=t||{};var e=this;return e._pushStateRequested=!!t.pushState,e._pushState=e._pushStateRequested&&e._pushStateSupported(),e.root=t.root||"/",e._interval=0,this.bind(["change","ready"],t),e._normalizeUrl()?!0:(e.current=e._currentLocation(),e._listenToLocationChange(),e.trigger("ready",{url:e.current}),undefined)},stop:function(){t(window).unbind(".kendo"),this.unbind("change"),this.unbind("ready"),clearInterval(this._interval)},_normalizeUrl:function(){var t,e=this,i=e.root==n.pathname,a=e._pushStateRequested&&!e._pushStateSupported()&&!i,u=e._pushState&&i&&n.hash;return a?(n.replace(e.root+"#"+e._stripRoot(n.pathname)),!0):u?(t=e._makePushStateUrl(n.hash.replace(o,"")),r.replaceState({},h.title,t),!1):!1},_listenToLocationChange:function(){var e=this,n=t.proxy(e._checkUrl,e);this._pushState?t(window).bind("popstate.kendo",n):s?t(window).bind("hashchange.kendo",n):e._interval=setInterval(n,i)},_pushStateSupported:function(){return window.history&&window.history.pushState},_checkUrl:function(){var t=this,e=t._currentLocation();e!=t.current&&t.navigate(e)},_stripRoot:function(t){var e=this;return 0===t.indexOf(e.root)?("/"+t.substr(e.root.length)).replace(/\/\//g,"/"):t},_makePushStateUrl:function(t){var e=this;return 0!==t.indexOf(e.root)&&(t=(e.root+t).replace(/\/\//g,"/")),n.protocol+"//"+n.host+t},_currentLocation:function(){var t,e=this;return e._pushState?(t=n.pathname,n.search&&(t+=n.search),e._stripRoot(t)):n.hash.replace(o,"")},change:function(t){this.bind("change",t)},navigate:function(t,e){var i=this;return"#:back"===t?(r.back(),undefined):(t=t.replace(o,""),i.current!==t&&i.current!==decodeURIComponent(t)&&(e||i.trigger("change",{url:t})&&(t=i.current),i._pushState?(r.pushState({},h.title,i._makePushStateUrl(t)),i.current=t):n.hash=i.current=t),undefined)}});e.history=new c})(window.kendo.jQuery),function(){function t(t,e){return e?t:"([^/]+)"}function e(e){return RegExp("^"+e.replace(d,"\\$&").replace(s,"(?:$1)?").replace(h,t).replace(c,"(.*?)")+"$")}var n=window.kendo,r=n.history,i=n.Observable,o="init",a="routeMissing",u="change",s=/\((.*?)\)/g,h=/(\(\?)?:\w+/g,c=/\*\w+/g,d=/[\-{}\[\]+?.,\\\^$|#\s]/g,l=n.Class.extend({init:function(t,n){t instanceof RegExp||(t=e(t)),this.route=t,this._callback=n},callback:function(t){for(var e=this.route.exec(t).slice(1),n=0,r=e.length;r>n;n++)e[n]!==void 0&&(e[n]=decodeURIComponent(e[n]));this._callback.apply(null,e)},worksWith:function(t){return this.route.test(t)?(this.callback(t),!0):!1}}),p=i.extend({init:function(t){i.fn.init.call(this),this.routes=[],this.bind([o,a,u],t)},destroy:function(){r.unbind("ready",this._readyProxy),r.unbind("change",this._urlChangedProxy),this.unbind()},start:function(){var t=this,e=function(e){e.url||(e.url="/"),t.trigger(o,e)||t._urlChanged(e)},r=function(e){t._urlChanged(e)};n.history.start({ready:e,change:r}),this._urlChangedProxy=r,this._readyProxy=e},route:function(t,e){this.routes.push(new l(t,e))},navigate:function(t,e){n.history.navigate(t,e)},_urlChanged:function(t){var e,n,r,i,o=t.url;if(o||(o="/"),this.trigger(u,{url:t.url}))return t.preventDefault(),void 0;for(n=0,r=this.routes,i=r.length;i>n;n++)if(e=r[n],e.worksWith(o))return;this.trigger(a,{url:o})}});n.Router=p}()});