text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueRouter=e()}(this,function(){"use strict";function t(t,e){if(!t)throw new Error("[vue-router] "+e)}function e(t,e){t||"undefined"!=typeof console&&console.warn("[vue-router] "+e)}function r(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function n(t,e){for(var r in e)t[r]=e[r];return t}var o={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,r){var o=r.props,i=r.children,a=r.parent,u=r.data;u.routerView=!0;for(var c=a.$createElement,s=o.name,p=a.$route,f=a._routerViewCache||(a._routerViewCache={}),h=0,l=!1;a&&a._routerRoot!==a;){var d=a.$vnode&&a.$vnode.data;d&&(d.routerView&&h++,d.keepAlive&&a._inactive&&(l=!0)),a=a.$parent}if(u.routerViewDepth=h,l)return c(f[s],u,i);var v=p.matched[h];if(!v)return f[s]=null,c();var y=f[s]=v.components[s];u.registerRouteInstance=function(t,e){var r=v.instances[s];(e&&r!==t||!e&&r===t)&&(v.instances[s]=e)},(u.hook||(u.hook={})).prepatch=function(t,e){v.instances[s]=e.componentInstance},u.hook.init=function(t){t.data.keepAlive&&t.componentInstance&&t.componentInstance!==v.instances[s]&&(v.instances[s]=t.componentInstance)};var m=u.props=function(t,r){switch(typeof r){case"undefined":return;case"object":return r;case"function":return r(t);case"boolean":return r?t.params:void 0;default:e(!1,'props in "'+t.path+'" is a '+typeof r+", expecting an object, function or boolean.")}}(p,v.props&&v.props[s]);if(m){m=u.props=n({},m);var g=u.attrs=u.attrs||{};for(var b in m)y.props&&b in y.props||(g[b]=m[b],delete m[b])}return c(y,u,i)}};var i=/[!'()*]/g,a=function(t){return"%"+t.charCodeAt(0).toString(16)},u=/%2C/g,c=function(t){return encodeURIComponent(t).replace(i,a).replace(u,",")},s=decodeURIComponent;function p(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var r=t.replace(/\+/g," ").split("="),n=s(r.shift()),o=r.length>0?s(r.join("=")):null;void 0===e[n]?e[n]=o:Array.isArray(e[n])?e[n].push(o):e[n]=[e[n],o]}),e):e}function f(t){var e=t?Object.keys(t).map(function(e){var r=t[e];if(void 0===r)return"";if(null===r)return c(e);if(Array.isArray(r)){var n=[];return r.forEach(function(t){void 0!==t&&(null===t?n.push(c(e)):n.push(c(e)+"="+c(t)))}),n.join("&")}return c(e)+"="+c(r)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}var h=/\/?$/;function l(t,e,r,n){var o=n&&n.options.stringifyQuery,i=e.query||{};try{i=d(i)}catch(t){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:m(e,o),matched:t?y(t):[]};return r&&(a.redirectedFrom=m(r,o)),Object.freeze(a)}function d(t){if(Array.isArray(t))return t.map(d);if(t&&"object"==typeof t){var e={};for(var r in t)e[r]=d(t[r]);return e}return t}var v=l(null,{path:"/"});function y(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function m(t,e){var r=t.path,n=t.query;void 0===n&&(n={});var o=t.hash;return void 0===o&&(o=""),(r||"/")+(e||f)(n)+o}function g(t,e){return e===v?t===e:!!e&&(t.path&&e.path?t.path.replace(h,"")===e.path.replace(h,"")&&t.hash===e.hash&&b(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&b(t.query,e.query)&&b(t.params,e.params)))}function b(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var r=Object.keys(t),n=Object.keys(e);return r.length===n.length&&r.every(function(r){var n=t[r],o=e[r];return"object"==typeof n&&"object"==typeof o?b(n,o):String(n)===String(o)})}var w,x=[String,Object],k=[String,Array],R={name:"RouterLink",props:{to:{type:x,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:k,default:"click"}},render:function(t){var e=this,r=this.$router,o=this.$route,i=r.resolve(this.to,o,this.append),a=i.location,u=i.route,c=i.href,s={},p=r.options.linkActiveClass,f=r.options.linkExactActiveClass,d=null==p?"router-link-active":p,v=null==f?"router-link-exact-active":f,y=null==this.activeClass?d:this.activeClass,m=null==this.exactActiveClass?v:this.exactActiveClass,b=a.path?l(null,a,null,r):u;s[m]=g(o,b),s[y]=this.exact?s[m]:function(t,e){return 0===t.path.replace(h,"/").indexOf(e.path.replace(h,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var r in e)if(!(r in t))return!1;return!0}(t.query,e.query)}(o,b);var w=function(t){E(t)&&(e.replace?r.replace(a):r.push(a))},x={click:E};Array.isArray(this.event)?this.event.forEach(function(t){x[t]=w}):x[this.event]=w;var k={class:s};if("a"===this.tag)k.on=x,k.attrs={href:c};else{var R=function t(e){if(e)for(var r,n=0;n<e.length;n++){if("a"===(r=e[n]).tag)return r;if(r.children&&(r=t(r.children)))return r}}(this.$slots.default);if(R)R.isStatic=!1,(R.data=n({},R.data)).on=x,(R.data.attrs=n({},R.data.attrs)).href=c;else k.on=x}return t(this.tag,k,this.$slots.default)}};function E(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function O(t){if(!O.installed||w!==t){O.installed=!0,w=t;var e=function(t){return void 0!==t},r=function(t,r){var n=t.$options._parentVnode;e(n)&&e(n=n.data)&&e(n=n.registerRouteInstance)&&n(t,r)};t.mixin({beforeCreate:function(){e(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",o),t.component("RouterLink",R);var n=t.config.optionMergeStrategies;n.beforeRouteEnter=n.beforeRouteLeave=n.beforeRouteUpdate=n.created}}var j="undefined"!=typeof window;function A(t,e,r){var n=t.charAt(0);if("/"===n)return t;if("?"===n||"#"===n)return e+t;var o=e.split("/");r&&o[o.length-1]||o.pop();for(var i=t.replace(/^\//,"").split("/"),a=0;a<i.length;a++){var u=i[a];".."===u?o.pop():"."!==u&&o.push(u)}return""!==o[0]&&o.unshift(""),o.join("/")}function C(t){return t.replace(/\/\//g,"/")}var _=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},S=F,T=P,$=function(t,e){return M(P(t,e))},q=M,L=D,U=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function P(t,e){for(var r,n=[],o=0,i=0,a="",u=e&&e.delimiter||"/";null!=(r=U.exec(t));){var c=r[0],s=r[1],p=r.index;if(a+=t.slice(i,p),i=p+c.length,s)a+=s[1];else{var f=t[i],h=r[2],l=r[3],d=r[4],v=r[5],y=r[6],m=r[7];a&&(n.push(a),a="");var g=null!=h&&null!=f&&f!==h,b="+"===y||"*"===y,w="?"===y||"*"===y,x=r[2]||u,k=d||v;n.push({name:l||o++,prefix:h||"",delimiter:x,optional:w,repeat:b,partial:g,asterisk:!!m,pattern:k?B(k):m?".*":"[^"+V(x)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&n.push(a),n}function I(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function M(t){for(var e=new Array(t.length),r=0;r<t.length;r++)"object"==typeof t[r]&&(e[r]=new RegExp("^(?:"+t[r].pattern+")$"));return function(r,n){for(var o="",i=r||{},a=(n||{}).pretty?I:encodeURIComponent,u=0;u<t.length;u++){var c=t[u];if("string"!=typeof c){var s,p=i[c.name];if(null==p){if(c.optional){c.partial&&(o+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(_(p)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var f=0;f<p.length;f++){if(s=a(p[f]),!e[u].test(s))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(s)+"`");o+=(0===f?c.prefix:c.delimiter)+s}}else{if(s=c.asterisk?encodeURI(p).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):a(p),!e[u].test(s))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+s+'"');o+=c.prefix+s}}else o+=c}return o}}function V(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function B(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function H(t,e){return t.keys=e,t}function z(t){return t.sensitive?"":"i"}function D(t,e,r){_(e)||(r=e||r,e=[]);for(var n=(r=r||{}).strict,o=!1!==r.end,i="",a=0;a<t.length;a++){var u=t[a];if("string"==typeof u)i+=V(u);else{var c=V(u.prefix),s="(?:"+u.pattern+")";e.push(u),u.repeat&&(s+="(?:"+c+s+")*"),i+=s=u.optional?u.partial?c+"("+s+")?":"(?:"+c+"("+s+"))?":c+"("+s+")"}}var p=V(r.delimiter||"/"),f=i.slice(-p.length)===p;return n||(i=(f?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":n&&f?"":"(?="+p+"|$)",H(new RegExp("^"+i,z(r)),e)}function F(t,e,r){return _(e)||(r=e||r,e=[]),r=r||{},t instanceof RegExp?function(t,e){var r=t.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)e.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return H(t,e)}(t,e):_(t)?function(t,e,r){for(var n=[],o=0;o<t.length;o++)n.push(F(t[o],e,r).source);return H(new RegExp("(?:"+n.join("|")+")",z(r)),e)}(t,e,r):function(t,e,r){return D(P(t,r),e,r)}(t,e,r)}S.parse=T,S.compile=$,S.tokensToFunction=q,S.tokensToRegExp=L;var N=Object.create(null);function J(t,r,n){r=r||{};try{var o=N[t]||(N[t]=S.compile(t));return r.pathMatch&&(r[0]=r.pathMatch),o(r,{pretty:!0})}catch(t){return e(!1,"missing param for "+n+": "+t.message),""}finally{delete r[0]}}function K(r,n,o,i){var a=n||[],u=o||Object.create(null),c=i||Object.create(null);r.forEach(function(r){!function r(n,o,i,a,u,c){var s=a.path;var p=a.name;t(null!=s,'"path" is required in a route configuration.'),t("string"!=typeof a.component,'route config "component" for path: '+String(s||p)+" cannot be a string id. Use an actual component instead.");var f=a.pathToRegexpOptions||{};var h=function(t,e,r){r||(t=t.replace(/\/$/,""));if("/"===t[0])return t;if(null==e)return t;return C(e.path+"/"+t)}(s,u,f.strict);"boolean"==typeof a.caseSensitive&&(f.sensitive=a.caseSensitive);var l={path:h,regex:Q(h,f),components:a.components||{default:a.component},instances:{},name:p,parent:u,matchAs:c,redirect:a.redirect,beforeEnter:a.beforeEnter,meta:a.meta||{},props:null==a.props?{}:a.components?a.props:{default:a.props}};a.children&&(a.name&&!a.redirect&&a.children.some(function(t){return/^\/?$/.test(t.path)})&&e(!1,"Named Route '"+a.name+"' has a default child route. When navigating to this named route (:to=\"{name: '"+a.name+"'\"), the default child route will not be rendered. Remove the name from this route and use the name of the default child route for named links instead."),a.children.forEach(function(t){var e=c?C(c+"/"+t.path):void 0;r(n,o,i,t,l,e)}));if(void 0!==a.alias){var d=Array.isArray(a.alias)?a.alias:[a.alias];d.forEach(function(t){var e={path:t,children:a.children};r(n,o,i,e,u,l.path||"/")})}o[l.path]||(n.push(l.path),o[l.path]=l);p&&(i[p]?c||e(!1,'Duplicate named routes definition: { name: "'+p+'", path: "'+l.path+'" }'):i[p]=l)}(a,u,c,r)});for(var s=0,p=a.length;s<p;s++)"*"===a[s]&&(a.push(a.splice(s,1)[0]),p--,s--);return{pathList:a,pathMap:u,nameMap:c}}function Q(t,r){var n=S(t,[],r),o=Object.create(null);return n.keys.forEach(function(r){e(!o[r.name],'Duplicate param keys in route with path: "'+t+'"'),o[r.name]=!0}),n}function W(t,r,o,i){var a="string"==typeof t?{path:t}:t;if(a._normalized)return a;if(a.name)return n({},t);if(!a.path&&a.params&&r){(a=n({},a))._normalized=!0;var u=n(n({},r.params),a.params);if(r.name)a.name=r.name,a.params=u;else if(r.matched.length){var c=r.matched[r.matched.length-1].path;a.path=J(c,u,"path "+r.path)}else e(!1,"relative params navigation requires a current route.");return a}var s=function(t){var e="",r="",n=t.indexOf("#");n>=0&&(e=t.slice(n),t=t.slice(0,n));var o=t.indexOf("?");return o>=0&&(r=t.slice(o+1),t=t.slice(0,o)),{path:t,query:r,hash:e}}(a.path||""),f=r&&r.path||"/",h=s.path?A(s.path,f,o||a.append):f,l=function(t,r,n){void 0===r&&(r={});var o,i=n||p;try{o=i(t||"")}catch(t){e(!1,t.message),o={}}for(var a in r)o[a]=r[a];return o}(s.query,a.query,i&&i.options.parseQuery),d=a.hash||s.hash;return d&&"#"!==d.charAt(0)&&(d="#"+d),{_normalized:!0,path:h,query:l,hash:d}}function X(r,n){var o=K(r),i=o.pathList,a=o.pathMap,u=o.nameMap;function c(t,r,o){var c=W(t,r,!1,n),s=c.name;if(s){var f=u[s];if(e(f,"Route with name '"+s+"' does not exist"),!f)return p(null,c);var h=f.regex.keys.filter(function(t){return!t.optional}).map(function(t){return t.name});if("object"!=typeof c.params&&(c.params={}),r&&"object"==typeof r.params)for(var l in r.params)!(l in c.params)&&h.indexOf(l)>-1&&(c.params[l]=r.params[l]);if(f)return c.path=J(f.path,c.params,'named route "'+s+'"'),p(f,c,o)}else if(c.path){c.params={};for(var d=0;d<i.length;d++){var v=i[d],y=a[v];if(Y(y.regex,c.path,c.params))return p(y,c,o)}}return p(null,c)}function s(r,o){var i=r.redirect,a="function"==typeof i?i(l(r,o,null,n)):i;if("string"==typeof a&&(a={path:a}),!a||"object"!=typeof a)return e(!1,"invalid redirect option: "+JSON.stringify(a)),p(null,o);var s=a,f=s.name,h=s.path,d=o.query,v=o.hash,y=o.params;if(d=s.hasOwnProperty("query")?s.query:d,v=s.hasOwnProperty("hash")?s.hash:v,y=s.hasOwnProperty("params")?s.params:y,f)return t(u[f],'redirect failed: named route "'+f+'" not found.'),c({_normalized:!0,name:f,query:d,hash:v,params:y},void 0,o);if(h){var m=function(t,e){return A(t,e.parent?e.parent.path:"/",!0)}(h,r);return c({_normalized:!0,path:J(m,y,'redirect route with path "'+m+'"'),query:d,hash:v},void 0,o)}return e(!1,"invalid redirect option: "+JSON.stringify(a)),p(null,o)}function p(t,e,r){return t&&t.redirect?s(t,r||e):t&&t.matchAs?function(t,e,r){var n=c({_normalized:!0,path:J(r,e.params,'aliased route with path "'+r+'"')});if(n){var o=n.matched,i=o[o.length-1];return e.params=n.params,p(i,e)}return p(null,e)}(0,e,t.matchAs):l(t,e,r,n)}return{match:c,addRoutes:function(t){K(t,i,a,u)}}}function Y(t,e,r){var n=e.match(t);if(!n)return!1;if(!r)return!0;for(var o=1,i=n.length;o<i;++o){var a=t.keys[o-1],u="string"==typeof n[o]?decodeURIComponent(n[o]):n[o];a&&(r[a.name||"pathMatch"]=u)}return!0}var G=Object.create(null);function Z(){window.history.replaceState({key:ft()},"",window.location.href.replace(window.location.origin,"")),window.addEventListener("popstate",function(t){var e;et(),t.state&&t.state.key&&(e=t.state.key,st=e)})}function tt(e,r,n,o){if(e.app){var i=e.options.scrollBehavior;i&&(t("function"==typeof i,"scrollBehavior must be a function"),e.app.$nextTick(function(){var a=function(){var t=ft();if(t)return G[t]}(),u=i.call(e,r,n,o?a:null);u&&("function"==typeof u.then?u.then(function(t){it(t,a)}).catch(function(e){t(!1,e.toString())}):it(u,a))}))}}function et(){var t=ft();t&&(G[t]={x:window.pageXOffset,y:window.pageYOffset})}function rt(t){return ot(t.x)||ot(t.y)}function nt(t){return{x:ot(t.x)?t.x:window.pageXOffset,y:ot(t.y)?t.y:window.pageYOffset}}function ot(t){return"number"==typeof t}function it(t,e){var r,n="object"==typeof t;if(n&&"string"==typeof t.selector){var o=document.querySelector(t.selector);if(o){var i=t.offset&&"object"==typeof t.offset?t.offset:{};e=function(t,e){var r=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{x:n.left-r.left-e.x,y:n.top-r.top-e.y}}(o,i={x:ot((r=i).x)?r.x:0,y:ot(r.y)?r.y:0})}else rt(t)&&(e=nt(t))}else n&&rt(t)&&(e=nt(t));e&&window.scrollTo(e.x,e.y)}var at,ut=j&&((-1===(at=window.navigator.userAgent).indexOf("Android 2.")&&-1===at.indexOf("Android 4.0")||-1===at.indexOf("Mobile Safari")||-1!==at.indexOf("Chrome")||-1!==at.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history),ct=j&&window.performance&&window.performance.now?window.performance:Date,st=pt();function pt(){return ct.now().toFixed(3)}function ft(){return st}function ht(t,e){et();var r=window.history;try{e?r.replaceState({key:st},"",t):(st=pt(),r.pushState({key:st},"",t))}catch(r){window.location[e?"replace":"assign"](t)}}function lt(t){ht(t,!0)}function dt(t,e,r){var n=function(o){o>=t.length?r():t[o]?e(t[o],function(){n(o+1)}):n(o+1)};n(0)}function vt(t){return function(n,o,i){var a=!1,u=0,c=null;yt(t,function(t,n,o,s){if("function"==typeof t&&void 0===t.cid){a=!0,u++;var p,f=bt(function(e){var r;((r=e).__esModule||gt&&"Module"===r[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:w.extend(e),o.components[s]=e,--u<=0&&i()}),h=bt(function(t){var n="Failed to resolve async component "+s+": "+t;e(!1,n),c||(c=r(t)?t:new Error(n),i(c))});try{p=t(f,h)}catch(t){h(t)}if(p)if("function"==typeof p.then)p.then(f,h);else{var l=p.component;l&&"function"==typeof l.then&&l.then(f,h)}}}),a||i()}}function yt(t,e){return mt(t.map(function(t){return Object.keys(t.components).map(function(r){return e(t.components[r],t.instances[r],t,r)})}))}function mt(t){return Array.prototype.concat.apply([],t)}var gt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function bt(t){var e=!1;return function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];if(!e)return e=!0,t.apply(this,r)}}var wt=function(t,e){this.router=t,this.base=function(t){if(!t)if(j){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=v,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};function xt(t,e,r,n){var o=yt(t,function(t,n,o,i){var a=function(t,e){"function"!=typeof t&&(t=w.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map(function(t){return r(t,n,o,i)}):r(a,n,o,i)});return mt(n?o.reverse():o)}function kt(t,e){if(e)return function(){return t.apply(e,arguments)}}wt.prototype.listen=function(t){this.cb=t},wt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},wt.prototype.onError=function(t){this.errorCbs.push(t)},wt.prototype.transitionTo=function(t,e,r){var n=this,o=this.router.match(t,this.current);this.confirmTransition(o,function(){n.updateRoute(o),e&&e(o),n.ensureURL(),n.ready||(n.ready=!0,n.readyCbs.forEach(function(t){t(o)}))},function(t){r&&r(t),t&&!n.ready&&(n.ready=!0,n.readyErrorCbs.forEach(function(e){e(t)}))})},wt.prototype.confirmTransition=function(t,n,o){var i=this,a=this.current,u=function(t){r(t)&&(i.errorCbs.length?i.errorCbs.forEach(function(e){e(t)}):(e(!1,"uncaught error during route navigation:"),console.error(t))),o&&o(t)};if(g(t,a)&&t.matched.length===a.matched.length)return this.ensureURL(),u();var c=function(t,e){var r,n=Math.max(t.length,e.length);for(r=0;r<n&&t[r]===e[r];r++);return{updated:e.slice(0,r),activated:e.slice(r),deactivated:t.slice(r)}}(this.current.matched,t.matched),s=c.updated,p=c.deactivated,f=c.activated,h=[].concat(function(t){return xt(t,"beforeRouteLeave",kt,!0)}(p),this.router.beforeHooks,function(t){return xt(t,"beforeRouteUpdate",kt)}(s),f.map(function(t){return t.beforeEnter}),vt(f));this.pending=t;var l=function(e,n){if(i.pending!==t)return u();try{e(t,a,function(t){!1===t||r(t)?(i.ensureURL(!0),u(t)):"string"==typeof t||"object"==typeof t&&("string"==typeof t.path||"string"==typeof t.name)?(u(),"object"==typeof t&&t.replace?i.replace(t):i.push(t)):n(t)})}catch(t){u(t)}};dt(h,l,function(){var e=[];dt(function(t,e,r){return xt(t,"beforeRouteEnter",function(t,n,o,i){return function(t,e,r,n,o){return function(i,a,u){return t(i,a,function(t){u(t),"function"==typeof t&&n.push(function(){!function t(e,r,n,o){r[n]&&!r[n]._isBeingDestroyed?e(r[n]):o()&&setTimeout(function(){t(e,r,n,o)},16)}(t,e.instances,r,o)})})}}(t,o,i,e,r)})}(f,e,function(){return i.current===t}).concat(i.router.resolveHooks),l,function(){if(i.pending!==t)return u();i.pending=null,n(t),i.router.app&&i.router.app.$nextTick(function(){e.forEach(function(t){t()})})})})},wt.prototype.updateRoute=function(t){var e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(r){r&&r(t,e)})};var Rt=function(t){function e(e,r){var n=this;t.call(this,e,r);var o=e.options.scrollBehavior,i=ut&&o;i&&Z();var a=Et(this.base);window.addEventListener("popstate",function(t){var r=n.current,o=Et(n.base);n.current===v&&o===a||n.transitionTo(o,function(t){i&&tt(e,t,r,!0)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,function(t){ht(C(n.base+t.fullPath)),tt(n.router,t,o,!1),e&&e(t)},r)},e.prototype.replace=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,function(t){lt(C(n.base+t.fullPath)),tt(n.router,t,o,!1),e&&e(t)},r)},e.prototype.ensureURL=function(t){if(Et(this.base)!==this.current.fullPath){var e=C(this.base+this.current.fullPath);t?ht(e):lt(e)}},e.prototype.getCurrentLocation=function(){return Et(this.base)},e}(wt);function Et(t){var e=decodeURI(window.location.pathname);return t&&0===e.indexOf(t)&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Ot=function(t){function e(e,r,n){t.call(this,e,r),n&&function(t){var e=Et(t);if(!/^\/#/.test(e))return window.location.replace(C(t+"/#"+e)),!0}(this.base)||jt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this,e=this.router.options.scrollBehavior,r=ut&&e;r&&Z(),window.addEventListener(ut?"popstate":"hashchange",function(){var e=t.current;jt()&&t.transitionTo(At(),function(n){r&&tt(t.router,n,e,!0),ut||St(n.fullPath)})})},e.prototype.push=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,function(t){_t(t.fullPath),tt(n.router,t,o,!1),e&&e(t)},r)},e.prototype.replace=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,function(t){St(t.fullPath),tt(n.router,t,o,!1),e&&e(t)},r)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;At()!==e&&(t?_t(e):St(e))},e.prototype.getCurrentLocation=function(){return At()},e}(wt);function jt(){var t=At();return"/"===t.charAt(0)||(St("/"+t),!1)}function At(){var t=window.location.href,e=t.indexOf("#");if(e<0)return"";var r=(t=t.slice(e+1)).indexOf("?");if(r<0){var n=t.indexOf("#");t=n>-1?decodeURI(t.slice(0,n))+t.slice(n):decodeURI(t)}else r>-1&&(t=decodeURI(t.slice(0,r))+t.slice(r));return t}function Ct(t){var e=window.location.href,r=e.indexOf("#");return(r>=0?e.slice(0,r):e)+"#"+t}function _t(t){ut?ht(Ct(t)):window.location.hash=t}function St(t){ut?lt(Ct(t)):window.location.replace(Ct(t))}var Tt=function(t){function e(e,r){t.call(this,e,r),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,r){var n=this;this.transitionTo(t,function(t){n.stack=n.stack.slice(0,n.index+1).concat(t),n.index++,e&&e(t)},r)},e.prototype.replace=function(t,e,r){var n=this;this.transitionTo(t,function(t){n.stack=n.stack.slice(0,n.index).concat(t),e&&e(t)},r)},e.prototype.go=function(t){var e=this,r=this.index+t;if(!(r<0||r>=this.stack.length)){var n=this.stack[r];this.confirmTransition(n,function(){e.index=r,e.updateRoute(n)})}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(wt),$t=function(e){void 0===e&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=X(e.routes||[],this);var r=e.mode||"hash";switch(this.fallback="history"===r&&!ut&&!1!==e.fallback,this.fallback&&(r="hash"),j||(r="abstract"),this.mode=r,r){case"history":this.history=new Rt(this,e.base);break;case"hash":this.history=new Ot(this,e.base,this.fallback);break;case"abstract":this.history=new Tt(this,e.base);break;default:t(!1,"invalid mode: "+r)}},qt={currentRoute:{configurable:!0}};function Lt(t,e){return t.push(e),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}return $t.prototype.match=function(t,e,r){return this.matcher.match(t,e,r)},qt.currentRoute.get=function(){return this.history&&this.history.current},$t.prototype.init=function(e){var r=this;if(t(O.installed,"not installed. Make sure to call `Vue.use(VueRouter)` before creating root instance."),this.apps.push(e),e.$once("hook:destroyed",function(){var t=r.apps.indexOf(e);t>-1&&r.apps.splice(t,1),r.app===e&&(r.app=r.apps[0]||null)}),!this.app){this.app=e;var n=this.history;if(n instanceof Rt)n.transitionTo(n.getCurrentLocation());else if(n instanceof Ot){var o=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),o,o)}n.listen(function(t){r.apps.forEach(function(e){e._route=t})})}},$t.prototype.beforeEach=function(t){return Lt(this.beforeHooks,t)},$t.prototype.beforeResolve=function(t){return Lt(this.resolveHooks,t)},$t.prototype.afterEach=function(t){return Lt(this.afterHooks,t)},$t.prototype.onReady=function(t,e){this.history.onReady(t,e)},$t.prototype.onError=function(t){this.history.onError(t)},$t.prototype.push=function(t,e,r){this.history.push(t,e,r)},$t.prototype.replace=function(t,e,r){this.history.replace(t,e,r)},$t.prototype.go=function(t){this.history.go(t)},$t.prototype.back=function(){this.go(-1)},$t.prototype.forward=function(){this.go(1)},$t.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},$t.prototype.resolve=function(t,e,r){var n=W(t,e=e||this.history.current,r,this),o=this.match(n,e),i=o.redirectedFrom||o.fullPath;return{location:n,route:o,href:function(t,e,r){var n="hash"===r?"#"+e:e;return t?C(t+"/"+n):n}(this.history.base,i,this.mode),normalizedTo:n,resolved:o}},$t.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==v&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties($t.prototype,qt),$t.install=O,$t.version="3.0.6",j&&window.Vue&&window.Vue.use($t),$t});