From c71c6a4dde32c41aa388f6edebcd62b04f1df2c6 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 8 Feb 2014 21:39:23 -0500 Subject: [PATCH] Release-v0.8.4 --- bower.json | 2 +- component.json | 2 +- dist/vue.js | 15 +++++++++++---- dist/vue.min.js | 6 +++--- package.json | 2 +- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/bower.json b/bower.json index 0ab1c953270..84cb496f295 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "0.8.3", + "version": "0.8.4", "main": "dist/vue.js", "description": "Simple, Fast & Composable MVVM for building interative interfaces", "authors": ["Evan You "], diff --git a/component.json b/component.json index e22c2d8415a..38b6f3eb204 100644 --- a/component.json +++ b/component.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "0.8.3", + "version": "0.8.4", "main": "src/main.js", "author": "Evan You ", "description": "Simple, Fast & Composable MVVM for building interative interfaces", diff --git a/dist/vue.js b/dist/vue.js index 1c7bbdcf75c..c529b867b62 100644 --- a/dist/vue.js +++ b/dist/vue.js @@ -1,5 +1,5 @@ /* - Vue.js v0.8.3 + Vue.js v0.8.4 (c) 2014 Evan You License: MIT */ @@ -1152,7 +1152,7 @@ CompilerProto.compile = function (node, root) { */ CompilerProto.compileNode = function (node) { var i, j, - attrs = node.attributes, + attrs = slice.call(node.attributes), prefix = config.prefix + '-' // parse if has attributes if (attrs && attrs.length) { @@ -1259,9 +1259,9 @@ CompilerProto.bindDirective = function (directive) { // keep track of it so we can unbind() later this.dirs.push(directive) - // for a simple directive, simply call its bind() or _update() + // for empty or literal directives, simply call its bind() // and we're done. - if (directive.isEmpty) { + if (directive.isEmpty || directive.isLiteral) { if (directive.bind) directive.bind() return } @@ -2190,6 +2190,13 @@ function Directive (definition, expression, rawKey, compiler, node) { return } + // for literal directives, all we need + // is the expression as the value. + if (this.isLiteral) { + this.value = expression.trim() + return + } + this.expression = expression.trim() this.rawKey = rawKey diff --git a/dist/vue.min.js b/dist/vue.min.js index 36ae9deded2..6c32cb75d12 100644 --- a/dist/vue.min.js +++ b/dist/vue.min.js @@ -1,7 +1,7 @@ /* - Vue.js v0.8.3 + Vue.js v0.8.4 (c) 2014 Evan You License: MIT */ -!function(){"use strict";function e(t,i,n){var r=e.resolve(t);if(null==r){n=n||t,i=i||"root";var s=new Error('Failed to require "'+n+'" from "'+i+'"');throw s.path=n,s.parent=i,s.require=!0,s}var o=e.modules[r];if(!o._resolving&&!o.exports){var a={};a.exports={},a.client=a.component=!0,o._resolving=!0,o.call(this,a.exports,e.relative(r),a),delete o._resolving,o.exports=a.exports}return o.exports}e.modules={},e.aliases={},e.resolve=function(t){"/"===t.charAt(0)&&(t=t.slice(1));for(var i=[t,t+".js",t+".json",t+"/index.js",t+"/index.json"],n=0;nn;++n)i[n].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}}),e.register("vue/src/main.js",function(e,t,i){function n(e){var t=this;e=r(e,t.options,!0),u.processOptions(e);var i=function(i,n){n||(i=r(i,e,!0)),t.call(this,i,!0)},s=i.prototype=Object.create(t.prototype);u.defProtected(s,"constructor",i);var a=e.methods;if(a)for(var c in a)c in o.prototype||"function"!=typeof a[c]||(s[c]=a[c]);return i.extend=n,i.super=t,i.options=e,i}function r(e,t,i){if(e=e||u.hash(),!t)return e;for(var n in t)if("el"!==n&&"methods"!==n){var s=e[n],o=t[n],a=u.typeOf(s);i&&"Function"===a&&o?(e[n]=[s],Array.isArray(o)?e[n]=e[n].concat(o):e[n].push(o)):i&&"Object"===a?r(s,o):void 0===s&&(e[n]=o)}return e}var s=t("./config"),o=t("./viewmodel"),a=t("./directives"),c=t("./filters"),u=t("./utils");o.config=function(e,t){if("string"==typeof e){if(void 0===t)return s[e];s[e]=t}else u.extend(s,e);return this},o.directive=function(e,t){return t?(a[e]=t,this):a[e]},o.filter=function(e,t){return t?(c[e]=t,this):c[e]},o.component=function(e,t){return t?(u.components[e]=u.toConstructor(t),this):u.components[e]},o.partial=function(e,t){return t?(u.partials[e]=u.toFragment(t),this):u.partials[e]},o.transition=function(e,t){return t?(u.transitions[e]=t,this):u.transitions[e]},o.extend=n,o.nextTick=u.nextTick,i.exports=o}),e.register("vue/src/emitter.js",function(e,t,i){var n,r="emitter";try{n=t(r)}catch(s){n=t("events").EventEmitter,n.prototype.off=function(){var e=arguments.length>1?this.removeListener:this.removeAllListeners;return e.apply(this,arguments)}}i.exports=n}),e.register("vue/src/config.js",function(e,t,i){function n(){s.forEach(function(e){o.attrs[e]=r+"-"+e})}var r="v",s=["pre","text","repeat","partial","with","component","component-id","transition"],o=i.exports={debug:!1,silent:!1,enterClass:"v-enter",leaveClass:"v-leave",attrs:{},get prefix(){return r},set prefix(e){r=e,n()}};n()}),e.register("vue/src/utils.js",function(e,t,i){function n(){return Object.create(null)}var r,s=t("./config"),o=s.attrs,a=Object.prototype.toString,c=Array.prototype.join,u=window.console,l="classList"in document.documentElement,h=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.setTimeout,f=i.exports={hash:n,components:n(),partials:n(),transitions:n(),attr:function(e,t,i){var n=o[t],r=e.getAttribute(n);return i||null===r||e.removeAttribute(n),r},defProtected:function(e,t,i,n,r){e.hasOwnProperty(t)||Object.defineProperty(e,t,{value:i,enumerable:!!n,configurable:!!r})},typeOf:function(e){return a.call(e).slice(8,-1)},bind:function(e,t){return function(i){return e.call(t,i)}},toText:function(e){return"string"==typeof e||"boolean"==typeof e||"number"==typeof e&&e==e?e:""},extend:function(e,t,i){for(var n in t)i&&e[n]||(e[n]=t[n])},unique:function(e){for(var t,i=f.hash(),n=e.length,r=[];n--;)t=e[n],i[t]||(i[t]=1,r.push(t));return r},toFragment:function(e){if("string"!=typeof e)return e;if("#"===e.charAt(0)){var t=document.getElementById(e.slice(1));if(!t)return;e=t.innerHTML}var i,n=document.createElement("div"),r=document.createDocumentFragment();for(n.innerHTML=e.trim();i=n.firstChild;)r.appendChild(i);return r},toConstructor:function(e){return r=r||t("./viewmodel"),"Object"===f.typeOf(e)?r.extend(e):"function"==typeof e?e:null},processOptions:function(e){var t,i=e.components,n=e.partials,r=e.template;if(i)for(t in i)i[t]=f.toConstructor(i[t]);if(n)for(t in n)n[t]=f.toFragment(n[t]);r&&(e.template=f.toFragment(r))},log:function(){s.debug&&u&&u.log(c.call(arguments," "))},warn:function(){!s.silent&&u&&(u.warn(c.call(arguments," ")),s.debug&&u.trace())},nextTick:function(e){h(e,0)},addClass:function(e,t){if(l)e.classList.add(t);else{var i=" "+e.className+" ";i.indexOf(" "+t+" ")<0&&(e.className=(i+t).trim())}},removeClass:function(e,t){if(l)e.classList.remove(t);else{for(var i=" "+e.className+" ",n=" "+t+" ";i.indexOf(n)>=0;)i=i.replace(n," ");e.className=i.trim()}}}}),e.register("vue/src/compiler.js",function(e,t,i){function n(e,t){var i=this;i.init=!0,t=i.options=t||m(),c.processOptions(t);var n=i.data=t.data||{};g(e,n,!0),g(e,t.methods,!0),g(i,t.compilerOptions);var a=i.setupElement(t);v("\nnew VM instance:",a.tagName,"\n"),i.vm=e,i.bindings=m(),i.dirs=[],i.deferred=[],i.exps=[],i.computed=[],i.childCompilers=[],i.emitter=new s,b(e,"$",m()),b(e,"$el",a),b(e,"$compiler",i),b(e,"$root",r(i).vm);var u=i.parentCompiler,l=c.attr(a,"component-id");u&&(u.childCompilers.push(i),b(e,"$parent",u.vm),l&&(i.childId=l,u.vm.$[l]=e)),i.setupObserver();var h=t.computed;if(h)for(var f in h)i.createBinding(f);i.execHook("created"),g(n,e),o.observe(n,"",i.observer),i.repeat&&(b(n,"$index",i.repeatIndex,!1,!0),i.createBinding("$index")),Object.defineProperty(e,"$data",{enumerable:!1,get:function(){return i.data},set:function(e){var t=i.data;o.unobserve(t,"",i.observer),i.data=e,o.copyPaths(e,t),o.observe(e,"",i.observer)}}),i.compile(a,!0),i.deferred.forEach(i.bindDirective,i),i.parseDeps(),i.init=!1,i.execHook("ready")}function r(e){for(;e.parentCompiler;)e=e.parentCompiler;return e}var s=t("./emitter"),o=t("./observer"),a=t("./config"),c=t("./utils"),u=t("./binding"),l=t("./directive"),h=t("./text-parser"),f=t("./deps-parser"),p=t("./exp-parser"),d=Array.prototype.slice,v=c.log,m=c.hash,g=c.extend,b=c.defProtected,y=Object.prototype.hasOwnProperty,_=["created","ready","beforeDestroy","afterDestroy","enteredView","leftView"],x=n.prototype;x.setupElement=function(e){var t=this.el="string"==typeof e.el?document.querySelector(e.el):e.el||document.createElement(e.tagName||"div"),i=e.template;if(i)if(e.replace&&1===i.childNodes.length){var n=i.childNodes[0].cloneNode(!0);t.parentNode&&(t.parentNode.insertBefore(n,t),t.parentNode.removeChild(t)),t=n}else t.innerHTML="",t.appendChild(i.cloneNode(!0));e.id&&(t.id=e.id),e.className&&(t.className=e.className);var r=e.attributes;if(r)for(var s in r)t.setAttribute(s,r[s]);return t},x.setupObserver=function(){function e(e,t){o.on("hook:"+e,function(){t.call(i.vm,r)})}function t(e){n[e]||i.createBinding(e)}var i=this,n=i.bindings,r=i.options,o=i.observer=new s;o.proxies=m(),o.on("get",function(e){t(e),f.catcher.emit("get",n[e])}).on("set",function(e,i){o.emit("change:"+e,i),t(e),n[e].update(i)}).on("mutate",function(e,i,r){o.emit("change:"+e,i,r),t(e),n[e].pub()}),_.forEach(function(t){var i=r[t];if(Array.isArray(i))for(var n=i.length;n--;)e(t,i[n]);else i&&e(t,i)})},x.compile=function(e,t){var i=this,n=e.nodeType,r=e.tagName;if(1===n&&"SCRIPT"!==r){if(null!==c.attr(e,"pre"))return;var s,o,a,u,h=c.attr(e,"component")||r.toLowerCase(),f=i.getOption("components",h);if(s=c.attr(e,"repeat"))u=l.parse("repeat",s,i,e),u&&(u.Ctor=f,i.deferred.push(u));else if(t!==!0&&((o=c.attr(e,"with"))||f))u=l.parse("with",o||"",i,e),u&&(u.Ctor=f,i.deferred.push(u));else{if(e.vue_trans=c.attr(e,"transition"),a=c.attr(e,"partial")){var p=i.getOption("partials",a);p&&(e.innerHTML="",e.appendChild(p.cloneNode(!0)))}i.compileNode(e)}}else 3===n&&i.compileTextNode(e)},x.compileNode=function(e){var t,i,n=e.attributes,r=a.prefix+"-";if(n&&n.length){var s,o,c,u,f;for(t=n.length;t--;){if(s=n[t],o=!1,0===s.name.indexOf(r))for(o=!0,c=l.split(s.value),i=c.length;i--;)u=c[i],f=l.parse(s.name.slice(r.length),u,this,e),f&&this.bindDirective(f);else u=h.parseAttr(s.value),u&&(f=l.parse("attr",s.name+":"+u,this,e),f&&this.bindDirective(f));o&&e.removeAttribute(s.name)}}e.childNodes.length&&d.call(e.childNodes).forEach(this.compile,this)},x.compileTextNode=function(e){var t=h.parse(e.nodeValue);if(t){for(var i,n,r,s,o,c,u=0,f=t.length;f>u;u++)n=t[u],r=c=null,n.key?">"===n.key.charAt(0)?(o=n.key.slice(1).trim(),s=this.getOption("partials",o),s&&(i=s.cloneNode(!0),c=d.call(i.childNodes))):n.html?(i=document.createComment(a.prefix+"-html"),r=l.parse("html",n.key,this,i)):(i=document.createTextNode(""),r=l.parse("text",n.key,this,i)):i=document.createTextNode(n),e.parentNode.insertBefore(i,e),r&&this.bindDirective(r),c&&c.forEach(this.compile,this);e.parentNode.removeChild(e)}},x.bindDirective=function(e){if(this.dirs.push(e),e.isEmpty)return e.bind&&e.bind(),void 0;var t,i=this,n=e.key;if(e.isExp)t=i.createBinding(n,!0,e.isFn);else{for(;i&&!i.hasKey(n);)i=i.parentCompiler;i=i||this,t=i.bindings[n]||i.createBinding(n)}t.instances.push(e),e.binding=t,e.bind&&e.bind(),e.update(t.val(),!0)},x.createBinding=function(e,t,i){v(" created binding: "+e);var n=this,r=n.bindings,s=n.options.computed,a=new u(n,e,t,i);if(t)n.defineExp(e,a);else if(r[e]=a,a.root)s&&s[e]?n.defineComputed(e,a,s[e]):n.defineProp(e,a);else{o.ensurePath(n.data,e);var c=e.slice(0,e.lastIndexOf("."));r[c]||n.createBinding(c)}return a},x.defineProp=function(e,t){var i=this,n=i.data,r=n.__observer__;e in n||(n[e]=void 0),!r||e in r.values||o.convert(n,e),t.value=n[e],Object.defineProperty(i.vm,e,{get:function(){return i.data[e]},set:function(t){i.data[e]=t}})},x.defineExp=function(e,t){var i=p.parse(e,this);i&&(this.markComputed(t,i),this.exps.push(t))},x.defineComputed=function(e,t,i){this.markComputed(t,i);var n={get:t.value.$get,set:t.value.$set};Object.defineProperty(this.vm,e,n)},x.markComputed=function(e,t){e.isComputed=!0,e.isFn?e.value=t:("function"==typeof t&&(t={$get:t}),e.value={$get:c.bind(t.$get,this.vm),$set:t.$set?c.bind(t.$set,this.vm):void 0}),this.computed.push(e)},x.getOption=function(e,t){var i=this.options,n=this.parentCompiler;return i[e]&&i[e][t]||(n?n.getOption(e,t):c[e]&&c[e][t])},x.execHook=function(e){e="hook:"+e,this.observer.emit(e),this.emitter.emit(e)},x.hasKey=function(e){var t=e.split(".")[0];return y.call(this.data,t)||y.call(this.vm,t)},x.parseDeps=function(){this.computed.length&&f.parse(this.computed)},x.destroy=function(){if(!this.destroyed){var e,t,i,n,r,s=this,a=s.vm,c=s.el,u=s.dirs,l=s.exps,h=s.bindings;for(s.execHook("beforeDestroy"),e=u.length;e--;)i=u[e],i.isEmpty||i.binding.compiler===s||(n=i.binding.instances,n&&n.splice(n.indexOf(i),1)),i.unbind();for(e=l.length;e--;)l[e].unbind();for(t in h)r=h[t],r&&(r.root&&o.unobserve(r.value,r.key,s.observer),r.unbind());var f=s.parentCompiler,p=s.childId;f&&(f.childCompilers.splice(f.childCompilers.indexOf(s),1),p&&delete f.vm.$[p]),c===document.body?c.innerHTML="":a.$remove(),this.destroyed=!0,s.execHook("afterDestroy"),s.observer.off(),s.emitter.off()}},i.exports=n}),e.register("vue/src/viewmodel.js",function(e,t,i){function n(e){new o(this,e)}function r(e){return"string"==typeof e?document.querySelector(e):e}function s(e,t){var i=t[0],n=e.$compiler.bindings[i];return n?n.compiler.vm:null}var o=t("./compiler"),a=t("./utils"),c=t("./transition"),u=a.defProtected,l=a.nextTick,h=n.prototype;u(h,"$set",function(e,t){var i=e.split("."),n=s(this,i);if(n){for(var r=0,o=i.length-1;o>r;r++)n=n[i[r]];n[i[r]]=t}}),u(h,"$watch",function(e,t){function i(){var e=arguments;a.nextTick(function(){t.apply(n,e)})}var n=this;t._fn=i,n.$compiler.observer.on("change:"+e,i)}),u(h,"$unwatch",function(e,t){var i=["change:"+e],n=this.$compiler.observer;t&&i.push(t._fn),n.off.apply(n,i)}),u(h,"$destroy",function(){this.$compiler.destroy()}),u(h,"$broadcast",function(){for(var e,t=this.$compiler.childCompilers,i=t.length;i--;)e=t[i],e.emitter.emit.apply(e.emitter,arguments),e.vm.$broadcast.apply(e.vm,arguments)}),u(h,"$dispatch",function(){var e=this.$compiler,t=e.emitter,i=e.parentCompiler;t.emit.apply(t,arguments),i&&i.vm.$dispatch.apply(i.vm,arguments)}),["emit","on","off","once"].forEach(function(e){u(h,"$"+e,function(){var t=this.$compiler.emitter;t[e].apply(t,arguments)})}),u(h,"$appendTo",function(e,t){e=r(e);var i=this.$el;c(i,1,function(){e.appendChild(i),t&&l(t)},this.$compiler)}),u(h,"$remove",function(e){var t=this.$el,i=t.parentNode;i&&c(t,-1,function(){i.removeChild(t),e&&l(e)},this.$compiler)}),u(h,"$before",function(e,t){e=r(e);var i=this.$el,n=e.parentNode;n&&c(i,1,function(){n.insertBefore(i,e),t&&l(t)},this.$compiler)}),u(h,"$after",function(e,t){e=r(e);var i=this.$el,n=e.parentNode,s=e.nextSibling;n&&c(i,1,function(){s?n.insertBefore(i,s):n.appendChild(i),t&&l(t)},this.$compiler)}),i.exports=n}),e.register("vue/src/binding.js",function(e,t,i){function n(e,t,i,n){this.id=s++,this.value=void 0,this.isExp=!!i,this.isFn=n,this.root=!this.isExp&&-1===t.indexOf("."),this.compiler=e,this.key=t,this.instances=[],this.subs=[],this.deps=[],this.unbound=!1}var r=t("./batcher"),s=0,o=n.prototype;o.update=function(e){(!this.isComputed||this.isFn)&&(this.value=e),r.queue(this)},o._update=function(){for(var e=this.instances.length,t=this.val();e--;)this.instances[e].update(t);this.pub()},o.val=function(){return this.isComputed&&!this.isFn?this.value.$get():this.value},o.pub=function(){for(var e=this.subs.length;e--;)this.subs[e].update()},o.unbind=function(){this.unbound=!0;for(var e=this.instances.length;e--;)this.instances[e].unbind();e=this.deps.length;for(var t;e--;)t=this.deps[e].subs,t.splice(t.indexOf(this),1)},i.exports=n}),e.register("vue/src/observer.js",function(e,t,i){function n(e){for(var t in e)s(e,t)}function r(e,t){var i=e.__observer__;if(i||(i=new p,m(e,"__observer__",i)),i.path=t,x)e.__proto__=k;else for(var n in k)m(e,n,k[n])}function s(e,t){var i=t.charAt(0);if("$"!==i&&"_"!==i||"$index"===t){var n=e.__observer__,r=n.values,s=r[t]=e[t];n.emit("set",t,s),Array.isArray(s)&&n.emit("set",t+".length",s.length),Object.defineProperty(e,t,{get:function(){var e=r[t];return C.shouldGet&&v(e)!==b&&n.emit("get",t),e},set:function(e){var i=r[t];h(i,t,n),r[t]=e,c(e,i),n.emit("set",t,e),l(e,t,n)}}),l(s,t,n)}}function o(e){f=f||t("./viewmodel");var i=v(e);return!(i!==b&&i!==y||e instanceof f)}function a(e){var t=v(e),i=e&&e.__observer__;if(t===y)i.emit("set","length",e.length);else if(t===b){var n,r;for(n in e)r=e[n],i.emit("set",n,r),a(r)}}function c(e,t){if(v(t)===b&&v(e)===b){var i,n,r,s;for(i in t)i in e||(r=t[i],n=v(r),n===b?(s=e[i]={},c(s,r)):e[i]=n===y?[]:void 0)}}function u(e,t){for(var i,n=t.split("."),r=0,o=n.length-1;o>r;r++)i=n[r],e[i]||(e[i]={},e.__observer__&&s(e,i)),e=e[i];v(e)===b&&(i=n[r],i in e||(e[i]=void 0,e.__observer__&&s(e,i)))}function l(e,t,i){if(o(e)){var s,c=t?t+".":"",u=!!e.__observer__;u||m(e,"__observer__",new p),s=e.__observer__,s.values=s.values||d.hash(),i.proxies=i.proxies||{};var l=i.proxies[c]={get:function(e){i.emit("get",c+e)},set:function(e,t){i.emit("set",c+e,t)},mutate:function(e,n,r){var s=e?c+e:t;i.emit("mutate",s,n,r);var o=r.method;"sort"!==o&&"reverse"!==o&&i.emit("set",s+".length",n.length)}};if(s.on("get",l.get).on("set",l.set).on("mutate",l.mutate),u)a(e);else{var h=v(e);h===b?n(e):h===y&&r(e)}}}function h(e,t,i){if(e&&e.__observer__){t=t?t+".":"";var n=i.proxies[t];n&&(e.__observer__.off("get",n.get).off("set",n.set).off("mutate",n.mutate),i.proxies[t]=null)}}var f,p=t("./emitter"),d=t("./utils"),v=d.typeOf,m=d.defProtected,g=Array.prototype.slice,b="Object",y="Array",_=["push","pop","shift","unshift","splice","sort","reverse"],x={}.__proto__,k=Object.create(Array.prototype);_.forEach(function(e){m(k,e,function(){var t=Array.prototype[e].apply(this,arguments);return this.__observer__.emit("mutate",this.__observer__.path,this,{method:e,args:g.call(arguments),result:t}),t},!x)});var w={remove:function(e){if("function"==typeof e){for(var t=this.length,i=[];t--;)e(this[t])&&i.push(this.splice(t,1)[0]);return i.reverse()}return"number"!=typeof e&&(e=this.indexOf(e)),e>-1?this.splice(e,1)[0]:void 0},replace:function(e,t){if("function"==typeof e){for(var i,n=this.length,r=[];n--;)i=e(this[n]),void 0!==i&&r.push(this.splice(n,1,i)[0]);return r.reverse()}return"number"!=typeof e&&(e=this.indexOf(e)),e>-1?this.splice(e,1,t)[0]:void 0}};for(var $ in w)m(k,$,w[$],!x);var C=i.exports={shouldGet:!1,observe:l,unobserve:h,ensurePath:u,convert:s,copyPaths:c,watchArray:r}}),e.register("vue/src/directive.js",function(e,t,i){function n(e,t,i,n,o){this.compiler=n,this.vm=n.vm,this.el=o;var a=""===t;if("function"==typeof e)this[a?"bind":"_update"]=e;else for(var c in e)"unbind"===c||"update"===c?this["_"+c]=e[c]:this[c]=e[c];if(a)return this.isEmpty=!0,void 0;this.expression=t.trim(),this.rawKey=i,r(this,i),this.isExp=!v.test(this.key)||d.test(this.key);var u=this.expression.slice(i.length).match(f);if(u){this.filters=[];for(var l,h=0,p=u.length;p>h;h++)l=s(u[h],this.compiler),l&&this.filters.push(l);this.filters.length||(this.filters=null)}else this.filters=null}function r(e,t){var i=t;if(t.indexOf(":")>-1){var n=t.match(h);i=n?n[2].trim():i,e.arg=n?n[1].trim():null}e.key=i}function s(e,t){var i=e.slice(1).match(p);if(i){i=i.map(function(e){return e.replace(/'/g,"").trim()});var n=i[0],r=t.getOption("filters",n)||c[n];return r?{name:n,apply:r,args:i.length>1?i.slice(1):null}:(o.warn("Unknown filter: "+n),void 0)}}var o=t("./utils"),a=t("./directives"),c=t("./filters"),u=/(?:['"](?:\\.|[^'"])*['"]|\((?:\\.|[^\)])*\)|\\.|[^,])+/g,l=/^(?:['"](?:\\.|[^'"])*['"]|\\.|[^\|]|\|\|)+/,h=/^([\w-$ ]+):(.+)$/,f=/\|[^\|]+/g,p=/[^\s']+|'[^']+'/g,d=/^\$(parent|root)\./,v=/^[\w\.$]+$/,m=n.prototype;m.update=function(e,t){(t||e!==this.value)&&(this.value=e,this._update&&this._update(this.filters?this.applyFilters(e):e))},m.applyFilters=function(e){for(var t,i=e,n=0,r=this.filters.length;r>n;n++)t=this.filters[n],i=t.apply.call(this.vm,i,t.args);return i},m.unbind=function(e){this.el&&(this._unbind&&this._unbind(e),e||(this.vm=this.el=this.binding=this.compiler=null))},n.split=function(e){return e.indexOf(",")>-1?e.match(u)||[""]:[e]},n.parse=function(e,t,i,r){var s=i.getOption("directives",e)||a[e];if(!s)return o.warn("unknown directive: "+e);var c;if(t.indexOf("|")>-1){var u=t.match(l);u&&(c=u[0].trim())}else c=t.trim();return c||""===t?new n(s,t,c,i,r):o.warn("invalid directive expression: "+t)},i.exports=n}),e.register("vue/src/exp-parser.js",function(e,t,i){function n(e){return e=e.replace(f,"").replace(p,",").replace(h,"").replace(d,"").replace(v,""),e?e.split(/,+/):[]}function r(e,t){for(var i="",n=0,r=t;t&&!t.hasKey(e);)t=t.parentCompiler,n++;if(t){for(;n--;)i+="$parent.";t.bindings[e]||"$"===e.charAt(0)||t.createBinding(e)}else r.createBinding(e);return i}function s(e,t){var i;try{i=new Function(e)}catch(n){a.warn("Invalid expression: "+t)}return i}function o(e){return"$"===e.charAt(0)?"\\"+e:e}var a=t("./utils"),c=/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/g,u=/"(\d+)"/g,l="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,undefined,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,Math",h=new RegExp(["\\b"+l.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),f=/\/\*(?:.|\n)*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|'[^']*'|"[^"]*"|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,p=/[^\w$]+/g,d=/\b\d[^,]*/g,v=/^,+|,+$/g;i.exports={parse:function(e,t){function i(e){var t=v.length;return v[t]=e,'"'+t+'"'}function l(e){var i=e.charAt(0);e=e.slice(1);var n="this."+r(e,t)+e;return d[e]||(p+=n+";",d[e]=1),i+n}function h(e,t){return v[t]}var f=n(e);if(!f.length)return s("return "+e,e);f=a.unique(f);var p="",d=a.hash(),v=[],m=new RegExp("[^$\\w\\.]("+f.map(o).join("|")+")[$\\w\\.]*\\b","g"),g=("return "+e).replace(c,i).replace(m,l).replace(u,h);return g=p+g,s(g,e)}}}),e.register("vue/src/text-parser.js",function(e){function t(e){if(!n.test(e))return null;for(var t,i,s,o=[];t=e.match(n);)i=t.index,i>0&&o.push(e.slice(0,i)),s={key:t[1].trim()},r.test(t[0])&&(s.html=!0),o.push(s),e=e.slice(i+t[0].length);return e.length&&o.push(e),o}function i(e){var i=t(e);if(!i)return null;for(var n,r=[],s=0,o=i.length;o>s;s++)n=i[s],r.push(n.key||'"'+n+'"');return r.join("+")}var n=/{{{?([^{}]+?)}?}}/,r=/{{{[^{}]+}}}/;e.parse=t,e.parseAttr=i}),e.register("vue/src/deps-parser.js",function(e,t,i){function n(e){if(!e.isFn){s.log("\n- "+e.key);var t=s.hash();e.deps=[],a.on("get",function(i){var n=t[i.key];n&&n.compiler===i.compiler||(t[i.key]=i,s.log(" - "+i.key),e.deps.push(i),i.subs.push(e))}),e.value.$get(),a.off("get")}}var r=t("./emitter"),s=t("./utils"),o=t("./observer"),a=new r;i.exports={catcher:a,parse:function(e){s.log("\nparsing dependencies..."),o.shouldGet=!0,e.forEach(n),o.shouldGet=!1,s.log("\ndone.")}}}),e.register("vue/src/filters.js",function(e,t,i){var n={enter:13,tab:9,"delete":46,up:38,left:37,right:39,down:40,esc:27};i.exports={capitalize:function(e){return e||0===e?(e=e.toString(),e.charAt(0).toUpperCase()+e.slice(1)):""},uppercase:function(e){return e||0===e?e.toString().toUpperCase():""},lowercase:function(e){return e||0===e?e.toString().toLowerCase():""},currency:function(e,t){if(!e&&0!==e)return"";var i=t&&t[0]||"$",n=Math.floor(e).toString(),r=n.length%3,s=r>0?n.slice(0,r)+(n.length>3?",":""):"",o="."+e.toFixed(2).slice(-2);return i+s+n.slice(r).replace(/(\d{3})(?=\d)/g,"$1,")+o},pluralize:function(e,t){return t.length>1?t[e-1]||t[t.length-1]:t[e-1]||t[0]+"s"},key:function(e,t){if(e){var i=n[t[0]];return i||(i=parseInt(t[0],10)),function(t){t.keyCode===i&&e.call(this,t)}}}}}),e.register("vue/src/transition.js",function(e,t,i){function n(e,t,i){if(!o)return i(),c.CSS_SKIP;var n=e.classList,r=e.vue_trans_cb;if(t>0){r&&(e.removeEventListener(o,r),e.vue_trans_cb=null),n.add(a.enterClass),i();{e.clientHeight}return n.remove(a.enterClass),c.CSS_E}n.add(a.leaveClass);var s=function(t){t.target===e&&(e.removeEventListener(o,s),e.vue_trans_cb=null,i(),n.remove(a.leaveClass))};return e.addEventListener(o,s),e.vue_trans_cb=s,c.CSS_L}function r(e,t,i,n,r){var s=r.getOption("transitions",n);if(!s)return i(),c.JS_SKIP;var o=s.enter,a=s.leave;return t>0?"function"!=typeof o?(i(),c.JS_SKIP_E):(o(e,i),c.JS_E):"function"!=typeof a?(i(),c.JS_SKIP_L):(a(e,i),c.JS_L)}function s(){var e=document.createElement("vue"),t="transitionend",i={transition:t,mozTransition:t,webkitTransition:"webkitTransitionEnd"};for(var n in i)if(void 0!==e.style[n])return i[n]}var o=s(),a=t("./config"),c={CSS_E:1,CSS_L:2,JS_E:3,JS_L:4,CSS_SKIP:-1,JS_SKIP:-2,JS_SKIP_E:-3,JS_SKIP_L:-4,INIT:-5,SKIP:-6},u=i.exports=function(e,t,i,s){var o=function(){i(),s.execHook(t>0?"enteredView":"leftView")};if(s.init)return o(),c.INIT;var a=e.vue_trans;return a?r(e,t,o,a,s):""===a?n(e,t,o):(o(),c.SKIP)};u.codes=c}),e.register("vue/src/batcher.js",function(e,t){function i(){for(var e=0;et;t++)this.buildItem(e.args[t],n+t)},pop:function(){var e=this.vms.pop();e&&e.$destroy()},unshift:function(e){e.args.forEach(this.buildItem,this)},shift:function(){var e=this.vms.shift();e&&e.$destroy()},splice:function(e){var t,i,n=e.args[0],r=e.args[1],s=e.args.length-2,o=this.vms.splice(n,r);for(t=0,i=o.length;i>t;t++)o[t].$destroy();for(t=0;s>t;t++)this.buildItem(e.args[t+2],n+t)},sort:function(){var e,t,i,n,r=this.vms,s=this.collection,o=s.length,a=new Array(o);for(e=0;o>e;e++)for(n=s[e],t=0;o>t;t++)if(i=r[t],i.$data===n){a[e]=i;break}for(e=0;o>e;e++)this.container.insertBefore(a[e].$el,this.ref);this.vms=a},reverse:function(){var e=this.vms;e.reverse();for(var t=0,i=e.length;i>t;t++)this.container.insertBefore(e[t].$el,this.ref)}};i.exports={bind:function(){var e=this.el,i=this.container=e.parentNode;n=n||t("../viewmodel"),this.Ctor=this.Ctor||n,this.hasTrans=e.hasAttribute(a.attrs.transition),this.childId=o.attr(e,"component-id"),this.ref=document.createComment(a.prefix+"-repeat-"+this.key),i.insertBefore(this.ref,e),i.removeChild(e),this.initiated=!1,this.collection=null,this.vms=null;var r=this;this.mutationListener=function(e,t,i){var n=i.method;u[n].call(r,i),"push"!==n&&"pop"!==n&&r.updateIndex(),("push"===n||"unshift"===n||"splice"===n)&&r.changed()}},update:function(e,t){this.unbind(!0),this.container.vue_dHandlers=o.hash(),this.initiated||e&&e.length||(this.buildItem(),this.initiated=!0),e=this.collection=e||[],this.vms=[],this.childId&&(this.vm.$[this.childId]=this.vms),e.__observer__||r.watchArray(e,null,new s),e.__observer__.on("mutate",this.mutationListener),e.length&&(e.forEach(this.buildItem,this),t||this.changed())},changed:function(){if(!this.queued){this.queued=!0;var e=this;setTimeout(function(){e.compiler.parseDeps(),e.queued=!1},0)}},buildItem:function(e,t){var i,n,r=this.el.cloneNode(!0),s=this.container,a=this.vms,u=this.collection;e&&(i=a.length>t?a[t].$el:this.ref,i.parentNode||(i=i.vue_ref),r.vue_trans=o.attr(r,"transition",!0),c(r,1,function(){s.insertBefore(r,i)},this.compiler)),n=new this.Ctor({el:r,data:e,compilerOptions:{repeat:!0,repeatIndex:t,parentCompiler:this.compiler,delegator:s}}),e?(a.splice(t,0,n),n.$compiler.observer.on("hook:afterDestroy",function(){u.remove(e)})):n.$destroy()},updateIndex:function(){for(var e=this.vms.length;e--;)this.vms[e].$data.$index=e},unbind:function(){if(this.childId&&delete this.vm.$[this.childId],this.collection){this.collection.__observer__.off("mutate",this.mutationListener);for(var e=this.vms.length;e--;)this.vms[e].$destroy()}var t=this.container,i=t.vue_dHandlers;for(var n in i)t.removeEventListener(i[n].event,i[n]);t.vue_dHandlers=null}}}),e.register("vue/src/directives/on.js",function(e,t,i){function n(e,t,i){for(;e&&e!==t;){if(e[i])return e;e=e.parentNode}}var r=t("../utils");i.exports={isFn:!0,bind:function(){this.compiler.repeat&&(this.el[this.expression]=!0,this.el.vue_viewmodel=this.vm)},update:function(e){if(this.unbind(!0),"function"!=typeof e)return r.warn('Directive "on" expects a function value.');var t=this.compiler,i=this.arg,s=this.binding.isExp,o=this.binding.compiler.vm;if(t.repeat&&!this.vm.constructor.super&&"blur"!==i&&"focus"!==i){var a=t.delegator,c=this.expression,u=a.vue_dHandlers[c];if(u)return;u=a.vue_dHandlers[c]=function(t){var i=n(t.target,a,c);i&&(t.el=i,t.targetVM=i.vue_viewmodel,e.call(s?t.targetVM:o,t))},u.event=i,a.addEventListener(i,u)}else{var l=this.vm;this.handler=function(t){t.el=t.currentTarget,t.targetVM=l,e.call(o,t)},this.el.addEventListener(i,this.handler)}},unbind:function(e){this.el.removeEventListener(this.arg,this.handler),this.handler=null,e||(this.el.vue_viewmodel=null)}}}),e.register("vue/src/directives/model.js",function(e,t,i){var n=t("../utils"),r=navigator.userAgent.indexOf("MSIE 9.0")>0;i.exports={bind:function(){var e=this,t=e.el,i=t.type,s=t.tagName;e.lock=!1,e.event=e.compiler.options.lazy||"SELECT"===s||"checkbox"===i||"radio"===i?"change":"input";var o=e.attr="checkbox"===i?"checked":"INPUT"===s||"SELECT"===s||"TEXTAREA"===s?"value":"innerHTML",a=!1;this.cLock=function(){a=!0},this.cUnlock=function(){a=!1},t.addEventListener("compositionstart",this.cLock),t.addEventListener("compositionend",this.cUnlock),e.set=e.filters?function(){if(!a){var i;try{i=t.selectionStart}catch(r){}e.vm.$set(e.key,t[o]),n.nextTick(function(){void 0!==i&&t.setSelectionRange(i,i)})}}:function(){a||(e.lock=!0,e.vm.$set(e.key,t[o]),n.nextTick(function(){e.lock=!1}))},t.addEventListener(e.event,e.set),r&&(e.onCut=function(){n.nextTick(function(){e.set()})},e.onDel=function(t){(46===t.keyCode||8===t.keyCode)&&e.set()},t.addEventListener("cut",e.onCut),t.addEventListener("keyup",e.onDel))},update:function(e){if(!this.lock){var t=this,i=t.el;if("SELECT"===i.tagName){for(var r=i.options,s=r.length,o=-1;s--;)if(r[s].value==e){o=s;break}r.selectedIndex=o}else"radio"===i.type?i.checked=e==i.value:"checkbox"===i.type?i.checked=!!e:i[t.attr]=n.toText(e)}},unbind:function(){var e=this.el;e.removeEventListener(this.event,this.set),e.removeEventListener("compositionstart",this.cLock),e.removeEventListener("compositionend",this.cUnlock),r&&(e.removeEventListener("cut",this.onCut),e.removeEventListener("keyup",this.onDel))}}}),e.register("vue/src/directives/with.js",function(e,t,i){var n;i.exports={bind:function(){this.isEmpty&&this.build() -},update:function(e){this.component?this.component.$data=e:this.build(e)},build:function(e){n=n||t("../viewmodel");var i=this.Ctor||n;this.component=new i({el:this.el,data:e,compilerOptions:{parentCompiler:this.compiler}})},unbind:function(){this.component.$destroy()}}}),e.register("vue/src/directives/html.js",function(e,t,i){var n=t("../utils").toText,r=Array.prototype.slice;i.exports={bind:function(){8===this.el.nodeType&&(this.holder=document.createElement("div"),this.nodes=[])},update:function(e){e=n(e),this.holder?this.swap(e):this.el.innerHTML=e},swap:function(e){for(var t,i=this.el.parentNode,n=this.holder,s=this.nodes,o=s.length;o--;)i.removeChild(s[o]);for(n.innerHTML=e,s=this.nodes=r.call(n.childNodes),o=0,t=s.length;t>o;o++)i.insertBefore(s[o],this.el)}}}),e.register("vue/src/directives/style.js",function(e,t,i){function n(e){return e[1].toUpperCase()}var r=/-([a-z])/g,s=["webkit","moz","ms"];i.exports={bind:function(){var e=this.arg,t=e.charAt(0);"$"===t?(e=e.slice(1),this.prefixed=!0):"-"===t&&(e=e.slice(1)),this.prop=e.replace(r,n)},update:function(e){var t=this.prop;if(this.el.style[t]=e,this.prefixed){t=t.charAt(0).toUpperCase()+t.slice(1);for(var i=s.length;i--;)this.el.style[s[i]+t]=e}}}}),e.alias("component-emitter/index.js","vue/deps/emitter/index.js"),e.alias("component-emitter/index.js","emitter/index.js"),e.alias("vue/src/main.js","vue/index.js"),"object"==typeof exports?module.exports=e("vue"):"function"==typeof define&&define.amd?define(function(){return e("vue")}):window.Vue=e("vue")}(); \ No newline at end of file +!function(){"use strict";function e(t,i,n){var r=e.resolve(t);if(null==r){n=n||t,i=i||"root";var s=new Error('Failed to require "'+n+'" from "'+i+'"');throw s.path=n,s.parent=i,s.require=!0,s}var o=e.modules[r];if(!o._resolving&&!o.exports){var a={};a.exports={},a.client=a.component=!0,o._resolving=!0,o.call(this,a.exports,e.relative(r),a),delete o._resolving,o.exports=a.exports}return o.exports}e.modules={},e.aliases={},e.resolve=function(t){"/"===t.charAt(0)&&(t=t.slice(1));for(var i=[t,t+".js",t+".json",t+"/index.js",t+"/index.json"],n=0;nn;++n)i[n].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}}),e.register("vue/src/main.js",function(e,t,i){function n(e){var t=this;e=r(e,t.options,!0),u.processOptions(e);var i=function(i,n){n||(i=r(i,e,!0)),t.call(this,i,!0)},s=i.prototype=Object.create(t.prototype);u.defProtected(s,"constructor",i);var a=e.methods;if(a)for(var c in a)c in o.prototype||"function"!=typeof a[c]||(s[c]=a[c]);return i.extend=n,i.super=t,i.options=e,i}function r(e,t,i){if(e=e||u.hash(),!t)return e;for(var n in t)if("el"!==n&&"methods"!==n){var s=e[n],o=t[n],a=u.typeOf(s);i&&"Function"===a&&o?(e[n]=[s],Array.isArray(o)?e[n]=e[n].concat(o):e[n].push(o)):i&&"Object"===a?r(s,o):void 0===s&&(e[n]=o)}return e}var s=t("./config"),o=t("./viewmodel"),a=t("./directives"),c=t("./filters"),u=t("./utils");o.config=function(e,t){if("string"==typeof e){if(void 0===t)return s[e];s[e]=t}else u.extend(s,e);return this},o.directive=function(e,t){return t?(a[e]=t,this):a[e]},o.filter=function(e,t){return t?(c[e]=t,this):c[e]},o.component=function(e,t){return t?(u.components[e]=u.toConstructor(t),this):u.components[e]},o.partial=function(e,t){return t?(u.partials[e]=u.toFragment(t),this):u.partials[e]},o.transition=function(e,t){return t?(u.transitions[e]=t,this):u.transitions[e]},o.extend=n,o.nextTick=u.nextTick,i.exports=o}),e.register("vue/src/emitter.js",function(e,t,i){var n,r="emitter";try{n=t(r)}catch(s){n=t("events").EventEmitter,n.prototype.off=function(){var e=arguments.length>1?this.removeListener:this.removeAllListeners;return e.apply(this,arguments)}}i.exports=n}),e.register("vue/src/config.js",function(e,t,i){function n(){s.forEach(function(e){o.attrs[e]=r+"-"+e})}var r="v",s=["pre","text","repeat","partial","with","component","component-id","transition"],o=i.exports={debug:!1,silent:!1,enterClass:"v-enter",leaveClass:"v-leave",attrs:{},get prefix(){return r},set prefix(e){r=e,n()}};n()}),e.register("vue/src/utils.js",function(e,t,i){function n(){return Object.create(null)}var r,s=t("./config"),o=s.attrs,a=Object.prototype.toString,c=Array.prototype.join,u=window.console,l="classList"in document.documentElement,h=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.setTimeout,f=i.exports={hash:n,components:n(),partials:n(),transitions:n(),attr:function(e,t,i){var n=o[t],r=e.getAttribute(n);return i||null===r||e.removeAttribute(n),r},defProtected:function(e,t,i,n,r){e.hasOwnProperty(t)||Object.defineProperty(e,t,{value:i,enumerable:!!n,configurable:!!r})},typeOf:function(e){return a.call(e).slice(8,-1)},bind:function(e,t){return function(i){return e.call(t,i)}},toText:function(e){return"string"==typeof e||"boolean"==typeof e||"number"==typeof e&&e==e?e:""},extend:function(e,t,i){for(var n in t)i&&e[n]||(e[n]=t[n])},unique:function(e){for(var t,i=f.hash(),n=e.length,r=[];n--;)t=e[n],i[t]||(i[t]=1,r.push(t));return r},toFragment:function(e){if("string"!=typeof e)return e;if("#"===e.charAt(0)){var t=document.getElementById(e.slice(1));if(!t)return;e=t.innerHTML}var i,n=document.createElement("div"),r=document.createDocumentFragment();for(n.innerHTML=e.trim();i=n.firstChild;)r.appendChild(i);return r},toConstructor:function(e){return r=r||t("./viewmodel"),"Object"===f.typeOf(e)?r.extend(e):"function"==typeof e?e:null},processOptions:function(e){var t,i=e.components,n=e.partials,r=e.template;if(i)for(t in i)i[t]=f.toConstructor(i[t]);if(n)for(t in n)n[t]=f.toFragment(n[t]);r&&(e.template=f.toFragment(r))},log:function(){s.debug&&u&&u.log(c.call(arguments," "))},warn:function(){!s.silent&&u&&(u.warn(c.call(arguments," ")),s.debug&&u.trace())},nextTick:function(e){h(e,0)},addClass:function(e,t){if(l)e.classList.add(t);else{var i=" "+e.className+" ";i.indexOf(" "+t+" ")<0&&(e.className=(i+t).trim())}},removeClass:function(e,t){if(l)e.classList.remove(t);else{for(var i=" "+e.className+" ",n=" "+t+" ";i.indexOf(n)>=0;)i=i.replace(n," ");e.className=i.trim()}}}}),e.register("vue/src/compiler.js",function(e,t,i){function n(e,t){var i=this;i.init=!0,t=i.options=t||m(),c.processOptions(t);var n=i.data=t.data||{};g(e,n,!0),g(e,t.methods,!0),g(i,t.compilerOptions);var a=i.setupElement(t);v("\nnew VM instance:",a.tagName,"\n"),i.vm=e,i.bindings=m(),i.dirs=[],i.deferred=[],i.exps=[],i.computed=[],i.childCompilers=[],i.emitter=new s,b(e,"$",m()),b(e,"$el",a),b(e,"$compiler",i),b(e,"$root",r(i).vm);var u=i.parentCompiler,l=c.attr(a,"component-id");u&&(u.childCompilers.push(i),b(e,"$parent",u.vm),l&&(i.childId=l,u.vm.$[l]=e)),i.setupObserver();var h=t.computed;if(h)for(var f in h)i.createBinding(f);i.execHook("created"),g(n,e),o.observe(n,"",i.observer),i.repeat&&(b(n,"$index",i.repeatIndex,!1,!0),i.createBinding("$index")),Object.defineProperty(e,"$data",{enumerable:!1,get:function(){return i.data},set:function(e){var t=i.data;o.unobserve(t,"",i.observer),i.data=e,o.copyPaths(e,t),o.observe(e,"",i.observer)}}),i.compile(a,!0),i.deferred.forEach(i.bindDirective,i),i.parseDeps(),i.init=!1,i.execHook("ready")}function r(e){for(;e.parentCompiler;)e=e.parentCompiler;return e}var s=t("./emitter"),o=t("./observer"),a=t("./config"),c=t("./utils"),u=t("./binding"),l=t("./directive"),h=t("./text-parser"),f=t("./deps-parser"),p=t("./exp-parser"),d=Array.prototype.slice,v=c.log,m=c.hash,g=c.extend,b=c.defProtected,y=Object.prototype.hasOwnProperty,_=["created","ready","beforeDestroy","afterDestroy","enteredView","leftView"],x=n.prototype;x.setupElement=function(e){var t=this.el="string"==typeof e.el?document.querySelector(e.el):e.el||document.createElement(e.tagName||"div"),i=e.template;if(i)if(e.replace&&1===i.childNodes.length){var n=i.childNodes[0].cloneNode(!0);t.parentNode&&(t.parentNode.insertBefore(n,t),t.parentNode.removeChild(t)),t=n}else t.innerHTML="",t.appendChild(i.cloneNode(!0));e.id&&(t.id=e.id),e.className&&(t.className=e.className);var r=e.attributes;if(r)for(var s in r)t.setAttribute(s,r[s]);return t},x.setupObserver=function(){function e(e,t){o.on("hook:"+e,function(){t.call(i.vm,r)})}function t(e){n[e]||i.createBinding(e)}var i=this,n=i.bindings,r=i.options,o=i.observer=new s;o.proxies=m(),o.on("get",function(e){t(e),f.catcher.emit("get",n[e])}).on("set",function(e,i){o.emit("change:"+e,i),t(e),n[e].update(i)}).on("mutate",function(e,i,r){o.emit("change:"+e,i,r),t(e),n[e].pub()}),_.forEach(function(t){var i=r[t];if(Array.isArray(i))for(var n=i.length;n--;)e(t,i[n]);else i&&e(t,i)})},x.compile=function(e,t){var i=this,n=e.nodeType,r=e.tagName;if(1===n&&"SCRIPT"!==r){if(null!==c.attr(e,"pre"))return;var s,o,a,u,h=c.attr(e,"component")||r.toLowerCase(),f=i.getOption("components",h);if(s=c.attr(e,"repeat"))u=l.parse("repeat",s,i,e),u&&(u.Ctor=f,i.deferred.push(u));else if(t!==!0&&((o=c.attr(e,"with"))||f))u=l.parse("with",o||"",i,e),u&&(u.Ctor=f,i.deferred.push(u));else{if(e.vue_trans=c.attr(e,"transition"),a=c.attr(e,"partial")){var p=i.getOption("partials",a);p&&(e.innerHTML="",e.appendChild(p.cloneNode(!0)))}i.compileNode(e)}}else 3===n&&i.compileTextNode(e)},x.compileNode=function(e){var t,i,n=d.call(e.attributes),r=a.prefix+"-";if(n&&n.length){var s,o,c,u,f;for(t=n.length;t--;){if(s=n[t],o=!1,0===s.name.indexOf(r))for(o=!0,c=l.split(s.value),i=c.length;i--;)u=c[i],f=l.parse(s.name.slice(r.length),u,this,e),f&&this.bindDirective(f);else u=h.parseAttr(s.value),u&&(f=l.parse("attr",s.name+":"+u,this,e),f&&this.bindDirective(f));o&&e.removeAttribute(s.name)}}e.childNodes.length&&d.call(e.childNodes).forEach(this.compile,this)},x.compileTextNode=function(e){var t=h.parse(e.nodeValue);if(t){for(var i,n,r,s,o,c,u=0,f=t.length;f>u;u++)n=t[u],r=c=null,n.key?">"===n.key.charAt(0)?(o=n.key.slice(1).trim(),s=this.getOption("partials",o),s&&(i=s.cloneNode(!0),c=d.call(i.childNodes))):n.html?(i=document.createComment(a.prefix+"-html"),r=l.parse("html",n.key,this,i)):(i=document.createTextNode(""),r=l.parse("text",n.key,this,i)):i=document.createTextNode(n),e.parentNode.insertBefore(i,e),r&&this.bindDirective(r),c&&c.forEach(this.compile,this);e.parentNode.removeChild(e)}},x.bindDirective=function(e){if(this.dirs.push(e),e.isEmpty||e.isLiteral)return e.bind&&e.bind(),void 0;var t,i=this,n=e.key;if(e.isExp)t=i.createBinding(n,!0,e.isFn);else{for(;i&&!i.hasKey(n);)i=i.parentCompiler;i=i||this,t=i.bindings[n]||i.createBinding(n)}t.instances.push(e),e.binding=t,e.bind&&e.bind(),e.update(t.val(),!0)},x.createBinding=function(e,t,i){v(" created binding: "+e);var n=this,r=n.bindings,s=n.options.computed,a=new u(n,e,t,i);if(t)n.defineExp(e,a);else if(r[e]=a,a.root)s&&s[e]?n.defineComputed(e,a,s[e]):n.defineProp(e,a);else{o.ensurePath(n.data,e);var c=e.slice(0,e.lastIndexOf("."));r[c]||n.createBinding(c)}return a},x.defineProp=function(e,t){var i=this,n=i.data,r=n.__observer__;e in n||(n[e]=void 0),!r||e in r.values||o.convert(n,e),t.value=n[e],Object.defineProperty(i.vm,e,{get:function(){return i.data[e]},set:function(t){i.data[e]=t}})},x.defineExp=function(e,t){var i=p.parse(e,this);i&&(this.markComputed(t,i),this.exps.push(t))},x.defineComputed=function(e,t,i){this.markComputed(t,i);var n={get:t.value.$get,set:t.value.$set};Object.defineProperty(this.vm,e,n)},x.markComputed=function(e,t){e.isComputed=!0,e.isFn?e.value=t:("function"==typeof t&&(t={$get:t}),e.value={$get:c.bind(t.$get,this.vm),$set:t.$set?c.bind(t.$set,this.vm):void 0}),this.computed.push(e)},x.getOption=function(e,t){var i=this.options,n=this.parentCompiler;return i[e]&&i[e][t]||(n?n.getOption(e,t):c[e]&&c[e][t])},x.execHook=function(e){e="hook:"+e,this.observer.emit(e),this.emitter.emit(e)},x.hasKey=function(e){var t=e.split(".")[0];return y.call(this.data,t)||y.call(this.vm,t)},x.parseDeps=function(){this.computed.length&&f.parse(this.computed)},x.destroy=function(){if(!this.destroyed){var e,t,i,n,r,s=this,a=s.vm,c=s.el,u=s.dirs,l=s.exps,h=s.bindings;for(s.execHook("beforeDestroy"),e=u.length;e--;)i=u[e],i.isEmpty||i.binding.compiler===s||(n=i.binding.instances,n&&n.splice(n.indexOf(i),1)),i.unbind();for(e=l.length;e--;)l[e].unbind();for(t in h)r=h[t],r&&(r.root&&o.unobserve(r.value,r.key,s.observer),r.unbind());var f=s.parentCompiler,p=s.childId;f&&(f.childCompilers.splice(f.childCompilers.indexOf(s),1),p&&delete f.vm.$[p]),c===document.body?c.innerHTML="":a.$remove(),this.destroyed=!0,s.execHook("afterDestroy"),s.observer.off(),s.emitter.off()}},i.exports=n}),e.register("vue/src/viewmodel.js",function(e,t,i){function n(e){new o(this,e)}function r(e){return"string"==typeof e?document.querySelector(e):e}function s(e,t){var i=t[0],n=e.$compiler.bindings[i];return n?n.compiler.vm:null}var o=t("./compiler"),a=t("./utils"),c=t("./transition"),u=a.defProtected,l=a.nextTick,h=n.prototype;u(h,"$set",function(e,t){var i=e.split("."),n=s(this,i);if(n){for(var r=0,o=i.length-1;o>r;r++)n=n[i[r]];n[i[r]]=t}}),u(h,"$watch",function(e,t){function i(){var e=arguments;a.nextTick(function(){t.apply(n,e)})}var n=this;t._fn=i,n.$compiler.observer.on("change:"+e,i)}),u(h,"$unwatch",function(e,t){var i=["change:"+e],n=this.$compiler.observer;t&&i.push(t._fn),n.off.apply(n,i)}),u(h,"$destroy",function(){this.$compiler.destroy()}),u(h,"$broadcast",function(){for(var e,t=this.$compiler.childCompilers,i=t.length;i--;)e=t[i],e.emitter.emit.apply(e.emitter,arguments),e.vm.$broadcast.apply(e.vm,arguments)}),u(h,"$dispatch",function(){var e=this.$compiler,t=e.emitter,i=e.parentCompiler;t.emit.apply(t,arguments),i&&i.vm.$dispatch.apply(i.vm,arguments)}),["emit","on","off","once"].forEach(function(e){u(h,"$"+e,function(){var t=this.$compiler.emitter;t[e].apply(t,arguments)})}),u(h,"$appendTo",function(e,t){e=r(e);var i=this.$el;c(i,1,function(){e.appendChild(i),t&&l(t)},this.$compiler)}),u(h,"$remove",function(e){var t=this.$el,i=t.parentNode;i&&c(t,-1,function(){i.removeChild(t),e&&l(e)},this.$compiler)}),u(h,"$before",function(e,t){e=r(e);var i=this.$el,n=e.parentNode;n&&c(i,1,function(){n.insertBefore(i,e),t&&l(t)},this.$compiler)}),u(h,"$after",function(e,t){e=r(e);var i=this.$el,n=e.parentNode,s=e.nextSibling;n&&c(i,1,function(){s?n.insertBefore(i,s):n.appendChild(i),t&&l(t)},this.$compiler)}),i.exports=n}),e.register("vue/src/binding.js",function(e,t,i){function n(e,t,i,n){this.id=s++,this.value=void 0,this.isExp=!!i,this.isFn=n,this.root=!this.isExp&&-1===t.indexOf("."),this.compiler=e,this.key=t,this.instances=[],this.subs=[],this.deps=[],this.unbound=!1}var r=t("./batcher"),s=0,o=n.prototype;o.update=function(e){(!this.isComputed||this.isFn)&&(this.value=e),r.queue(this)},o._update=function(){for(var e=this.instances.length,t=this.val();e--;)this.instances[e].update(t);this.pub()},o.val=function(){return this.isComputed&&!this.isFn?this.value.$get():this.value},o.pub=function(){for(var e=this.subs.length;e--;)this.subs[e].update()},o.unbind=function(){this.unbound=!0;for(var e=this.instances.length;e--;)this.instances[e].unbind();e=this.deps.length;for(var t;e--;)t=this.deps[e].subs,t.splice(t.indexOf(this),1)},i.exports=n}),e.register("vue/src/observer.js",function(e,t,i){function n(e){for(var t in e)s(e,t)}function r(e,t){var i=e.__observer__;if(i||(i=new p,m(e,"__observer__",i)),i.path=t,x)e.__proto__=k;else for(var n in k)m(e,n,k[n])}function s(e,t){var i=t.charAt(0);if("$"!==i&&"_"!==i||"$index"===t){var n=e.__observer__,r=n.values,s=r[t]=e[t];n.emit("set",t,s),Array.isArray(s)&&n.emit("set",t+".length",s.length),Object.defineProperty(e,t,{get:function(){var e=r[t];return C.shouldGet&&v(e)!==b&&n.emit("get",t),e},set:function(e){var i=r[t];h(i,t,n),r[t]=e,c(e,i),n.emit("set",t,e),l(e,t,n)}}),l(s,t,n)}}function o(e){f=f||t("./viewmodel");var i=v(e);return!(i!==b&&i!==y||e instanceof f)}function a(e){var t=v(e),i=e&&e.__observer__;if(t===y)i.emit("set","length",e.length);else if(t===b){var n,r;for(n in e)r=e[n],i.emit("set",n,r),a(r)}}function c(e,t){if(v(t)===b&&v(e)===b){var i,n,r,s;for(i in t)i in e||(r=t[i],n=v(r),n===b?(s=e[i]={},c(s,r)):e[i]=n===y?[]:void 0)}}function u(e,t){for(var i,n=t.split("."),r=0,o=n.length-1;o>r;r++)i=n[r],e[i]||(e[i]={},e.__observer__&&s(e,i)),e=e[i];v(e)===b&&(i=n[r],i in e||(e[i]=void 0,e.__observer__&&s(e,i)))}function l(e,t,i){if(o(e)){var s,c=t?t+".":"",u=!!e.__observer__;u||m(e,"__observer__",new p),s=e.__observer__,s.values=s.values||d.hash(),i.proxies=i.proxies||{};var l=i.proxies[c]={get:function(e){i.emit("get",c+e)},set:function(e,t){i.emit("set",c+e,t)},mutate:function(e,n,r){var s=e?c+e:t;i.emit("mutate",s,n,r);var o=r.method;"sort"!==o&&"reverse"!==o&&i.emit("set",s+".length",n.length)}};if(s.on("get",l.get).on("set",l.set).on("mutate",l.mutate),u)a(e);else{var h=v(e);h===b?n(e):h===y&&r(e)}}}function h(e,t,i){if(e&&e.__observer__){t=t?t+".":"";var n=i.proxies[t];n&&(e.__observer__.off("get",n.get).off("set",n.set).off("mutate",n.mutate),i.proxies[t]=null)}}var f,p=t("./emitter"),d=t("./utils"),v=d.typeOf,m=d.defProtected,g=Array.prototype.slice,b="Object",y="Array",_=["push","pop","shift","unshift","splice","sort","reverse"],x={}.__proto__,k=Object.create(Array.prototype);_.forEach(function(e){m(k,e,function(){var t=Array.prototype[e].apply(this,arguments);return this.__observer__.emit("mutate",this.__observer__.path,this,{method:e,args:g.call(arguments),result:t}),t},!x)});var w={remove:function(e){if("function"==typeof e){for(var t=this.length,i=[];t--;)e(this[t])&&i.push(this.splice(t,1)[0]);return i.reverse()}return"number"!=typeof e&&(e=this.indexOf(e)),e>-1?this.splice(e,1)[0]:void 0},replace:function(e,t){if("function"==typeof e){for(var i,n=this.length,r=[];n--;)i=e(this[n]),void 0!==i&&r.push(this.splice(n,1,i)[0]);return r.reverse()}return"number"!=typeof e&&(e=this.indexOf(e)),e>-1?this.splice(e,1,t)[0]:void 0}};for(var $ in w)m(k,$,w[$],!x);var C=i.exports={shouldGet:!1,observe:l,unobserve:h,ensurePath:u,convert:s,copyPaths:c,watchArray:r}}),e.register("vue/src/directive.js",function(e,t,i){function n(e,t,i,n,o){this.compiler=n,this.vm=n.vm,this.el=o;var a=""===t;if("function"==typeof e)this[a?"bind":"_update"]=e;else for(var c in e)"unbind"===c||"update"===c?this["_"+c]=e[c]:this[c]=e[c];if(a)return this.isEmpty=!0,void 0;if(this.isLiteral)return this.value=t.trim(),void 0;this.expression=t.trim(),this.rawKey=i,r(this,i),this.isExp=!v.test(this.key)||d.test(this.key);var u=this.expression.slice(i.length).match(f);if(u){this.filters=[];for(var l,h=0,p=u.length;p>h;h++)l=s(u[h],this.compiler),l&&this.filters.push(l);this.filters.length||(this.filters=null)}else this.filters=null}function r(e,t){var i=t;if(t.indexOf(":")>-1){var n=t.match(h);i=n?n[2].trim():i,e.arg=n?n[1].trim():null}e.key=i}function s(e,t){var i=e.slice(1).match(p);if(i){i=i.map(function(e){return e.replace(/'/g,"").trim()});var n=i[0],r=t.getOption("filters",n)||c[n];return r?{name:n,apply:r,args:i.length>1?i.slice(1):null}:(o.warn("Unknown filter: "+n),void 0)}}var o=t("./utils"),a=t("./directives"),c=t("./filters"),u=/(?:['"](?:\\.|[^'"])*['"]|\((?:\\.|[^\)])*\)|\\.|[^,])+/g,l=/^(?:['"](?:\\.|[^'"])*['"]|\\.|[^\|]|\|\|)+/,h=/^([\w-$ ]+):(.+)$/,f=/\|[^\|]+/g,p=/[^\s']+|'[^']+'/g,d=/^\$(parent|root)\./,v=/^[\w\.$]+$/,m=n.prototype;m.update=function(e,t){(t||e!==this.value)&&(this.value=e,this._update&&this._update(this.filters?this.applyFilters(e):e))},m.applyFilters=function(e){for(var t,i=e,n=0,r=this.filters.length;r>n;n++)t=this.filters[n],i=t.apply.call(this.vm,i,t.args);return i},m.unbind=function(e){this.el&&(this._unbind&&this._unbind(e),e||(this.vm=this.el=this.binding=this.compiler=null))},n.split=function(e){return e.indexOf(",")>-1?e.match(u)||[""]:[e]},n.parse=function(e,t,i,r){var s=i.getOption("directives",e)||a[e];if(!s)return o.warn("unknown directive: "+e);var c;if(t.indexOf("|")>-1){var u=t.match(l);u&&(c=u[0].trim())}else c=t.trim();return c||""===t?new n(s,t,c,i,r):o.warn("invalid directive expression: "+t)},i.exports=n}),e.register("vue/src/exp-parser.js",function(e,t,i){function n(e){return e=e.replace(f,"").replace(p,",").replace(h,"").replace(d,"").replace(v,""),e?e.split(/,+/):[]}function r(e,t){for(var i="",n=0,r=t;t&&!t.hasKey(e);)t=t.parentCompiler,n++;if(t){for(;n--;)i+="$parent.";t.bindings[e]||"$"===e.charAt(0)||t.createBinding(e)}else r.createBinding(e);return i}function s(e,t){var i;try{i=new Function(e)}catch(n){a.warn("Invalid expression: "+t)}return i}function o(e){return"$"===e.charAt(0)?"\\"+e:e}var a=t("./utils"),c=/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/g,u=/"(\d+)"/g,l="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,undefined,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,Math",h=new RegExp(["\\b"+l.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),f=/\/\*(?:.|\n)*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|'[^']*'|"[^"]*"|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,p=/[^\w$]+/g,d=/\b\d[^,]*/g,v=/^,+|,+$/g;i.exports={parse:function(e,t){function i(e){var t=v.length;return v[t]=e,'"'+t+'"'}function l(e){var i=e.charAt(0);e=e.slice(1);var n="this."+r(e,t)+e;return d[e]||(p+=n+";",d[e]=1),i+n}function h(e,t){return v[t]}var f=n(e);if(!f.length)return s("return "+e,e);f=a.unique(f);var p="",d=a.hash(),v=[],m=new RegExp("[^$\\w\\.]("+f.map(o).join("|")+")[$\\w\\.]*\\b","g"),g=("return "+e).replace(c,i).replace(m,l).replace(u,h);return g=p+g,s(g,e)}}}),e.register("vue/src/text-parser.js",function(e){function t(e){if(!n.test(e))return null;for(var t,i,s,o=[];t=e.match(n);)i=t.index,i>0&&o.push(e.slice(0,i)),s={key:t[1].trim()},r.test(t[0])&&(s.html=!0),o.push(s),e=e.slice(i+t[0].length);return e.length&&o.push(e),o}function i(e){var i=t(e);if(!i)return null;for(var n,r=[],s=0,o=i.length;o>s;s++)n=i[s],r.push(n.key||'"'+n+'"');return r.join("+")}var n=/{{{?([^{}]+?)}?}}/,r=/{{{[^{}]+}}}/;e.parse=t,e.parseAttr=i}),e.register("vue/src/deps-parser.js",function(e,t,i){function n(e){if(!e.isFn){s.log("\n- "+e.key);var t=s.hash();e.deps=[],a.on("get",function(i){var n=t[i.key];n&&n.compiler===i.compiler||(t[i.key]=i,s.log(" - "+i.key),e.deps.push(i),i.subs.push(e))}),e.value.$get(),a.off("get")}}var r=t("./emitter"),s=t("./utils"),o=t("./observer"),a=new r;i.exports={catcher:a,parse:function(e){s.log("\nparsing dependencies..."),o.shouldGet=!0,e.forEach(n),o.shouldGet=!1,s.log("\ndone.")}}}),e.register("vue/src/filters.js",function(e,t,i){var n={enter:13,tab:9,"delete":46,up:38,left:37,right:39,down:40,esc:27};i.exports={capitalize:function(e){return e||0===e?(e=e.toString(),e.charAt(0).toUpperCase()+e.slice(1)):""},uppercase:function(e){return e||0===e?e.toString().toUpperCase():""},lowercase:function(e){return e||0===e?e.toString().toLowerCase():""},currency:function(e,t){if(!e&&0!==e)return"";var i=t&&t[0]||"$",n=Math.floor(e).toString(),r=n.length%3,s=r>0?n.slice(0,r)+(n.length>3?",":""):"",o="."+e.toFixed(2).slice(-2);return i+s+n.slice(r).replace(/(\d{3})(?=\d)/g,"$1,")+o},pluralize:function(e,t){return t.length>1?t[e-1]||t[t.length-1]:t[e-1]||t[0]+"s"},key:function(e,t){if(e){var i=n[t[0]];return i||(i=parseInt(t[0],10)),function(t){t.keyCode===i&&e.call(this,t)}}}}}),e.register("vue/src/transition.js",function(e,t,i){function n(e,t,i){if(!o)return i(),c.CSS_SKIP;var n=e.classList,r=e.vue_trans_cb;if(t>0){r&&(e.removeEventListener(o,r),e.vue_trans_cb=null),n.add(a.enterClass),i();{e.clientHeight}return n.remove(a.enterClass),c.CSS_E}n.add(a.leaveClass);var s=function(t){t.target===e&&(e.removeEventListener(o,s),e.vue_trans_cb=null,i(),n.remove(a.leaveClass))};return e.addEventListener(o,s),e.vue_trans_cb=s,c.CSS_L}function r(e,t,i,n,r){var s=r.getOption("transitions",n);if(!s)return i(),c.JS_SKIP;var o=s.enter,a=s.leave;return t>0?"function"!=typeof o?(i(),c.JS_SKIP_E):(o(e,i),c.JS_E):"function"!=typeof a?(i(),c.JS_SKIP_L):(a(e,i),c.JS_L)}function s(){var e=document.createElement("vue"),t="transitionend",i={transition:t,mozTransition:t,webkitTransition:"webkitTransitionEnd"};for(var n in i)if(void 0!==e.style[n])return i[n]}var o=s(),a=t("./config"),c={CSS_E:1,CSS_L:2,JS_E:3,JS_L:4,CSS_SKIP:-1,JS_SKIP:-2,JS_SKIP_E:-3,JS_SKIP_L:-4,INIT:-5,SKIP:-6},u=i.exports=function(e,t,i,s){var o=function(){i(),s.execHook(t>0?"enteredView":"leftView")};if(s.init)return o(),c.INIT;var a=e.vue_trans;return a?r(e,t,o,a,s):""===a?n(e,t,o):(o(),c.SKIP)};u.codes=c}),e.register("vue/src/batcher.js",function(e,t){function i(){for(var e=0;et;t++)this.buildItem(e.args[t],n+t)},pop:function(){var e=this.vms.pop();e&&e.$destroy()},unshift:function(e){e.args.forEach(this.buildItem,this)},shift:function(){var e=this.vms.shift();e&&e.$destroy()},splice:function(e){var t,i,n=e.args[0],r=e.args[1],s=e.args.length-2,o=this.vms.splice(n,r);for(t=0,i=o.length;i>t;t++)o[t].$destroy();for(t=0;s>t;t++)this.buildItem(e.args[t+2],n+t)},sort:function(){var e,t,i,n,r=this.vms,s=this.collection,o=s.length,a=new Array(o);for(e=0;o>e;e++)for(n=s[e],t=0;o>t;t++)if(i=r[t],i.$data===n){a[e]=i;break}for(e=0;o>e;e++)this.container.insertBefore(a[e].$el,this.ref);this.vms=a},reverse:function(){var e=this.vms;e.reverse();for(var t=0,i=e.length;i>t;t++)this.container.insertBefore(e[t].$el,this.ref)}};i.exports={bind:function(){var e=this.el,i=this.container=e.parentNode;n=n||t("../viewmodel"),this.Ctor=this.Ctor||n,this.hasTrans=e.hasAttribute(a.attrs.transition),this.childId=o.attr(e,"component-id"),this.ref=document.createComment(a.prefix+"-repeat-"+this.key),i.insertBefore(this.ref,e),i.removeChild(e),this.initiated=!1,this.collection=null,this.vms=null;var r=this;this.mutationListener=function(e,t,i){var n=i.method;u[n].call(r,i),"push"!==n&&"pop"!==n&&r.updateIndex(),("push"===n||"unshift"===n||"splice"===n)&&r.changed()}},update:function(e,t){this.unbind(!0),this.container.vue_dHandlers=o.hash(),this.initiated||e&&e.length||(this.buildItem(),this.initiated=!0),e=this.collection=e||[],this.vms=[],this.childId&&(this.vm.$[this.childId]=this.vms),e.__observer__||r.watchArray(e,null,new s),e.__observer__.on("mutate",this.mutationListener),e.length&&(e.forEach(this.buildItem,this),t||this.changed())},changed:function(){if(!this.queued){this.queued=!0;var e=this;setTimeout(function(){e.compiler.parseDeps(),e.queued=!1},0)}},buildItem:function(e,t){var i,n,r=this.el.cloneNode(!0),s=this.container,a=this.vms,u=this.collection;e&&(i=a.length>t?a[t].$el:this.ref,i.parentNode||(i=i.vue_ref),r.vue_trans=o.attr(r,"transition",!0),c(r,1,function(){s.insertBefore(r,i)},this.compiler)),n=new this.Ctor({el:r,data:e,compilerOptions:{repeat:!0,repeatIndex:t,parentCompiler:this.compiler,delegator:s}}),e?(a.splice(t,0,n),n.$compiler.observer.on("hook:afterDestroy",function(){u.remove(e)})):n.$destroy()},updateIndex:function(){for(var e=this.vms.length;e--;)this.vms[e].$data.$index=e},unbind:function(){if(this.childId&&delete this.vm.$[this.childId],this.collection){this.collection.__observer__.off("mutate",this.mutationListener);for(var e=this.vms.length;e--;)this.vms[e].$destroy()}var t=this.container,i=t.vue_dHandlers;for(var n in i)t.removeEventListener(i[n].event,i[n]);t.vue_dHandlers=null}}}),e.register("vue/src/directives/on.js",function(e,t,i){function n(e,t,i){for(;e&&e!==t;){if(e[i])return e;e=e.parentNode}}var r=t("../utils");i.exports={isFn:!0,bind:function(){this.compiler.repeat&&(this.el[this.expression]=!0,this.el.vue_viewmodel=this.vm)},update:function(e){if(this.unbind(!0),"function"!=typeof e)return r.warn('Directive "on" expects a function value.');var t=this.compiler,i=this.arg,s=this.binding.isExp,o=this.binding.compiler.vm;if(t.repeat&&!this.vm.constructor.super&&"blur"!==i&&"focus"!==i){var a=t.delegator,c=this.expression,u=a.vue_dHandlers[c];if(u)return;u=a.vue_dHandlers[c]=function(t){var i=n(t.target,a,c);i&&(t.el=i,t.targetVM=i.vue_viewmodel,e.call(s?t.targetVM:o,t))},u.event=i,a.addEventListener(i,u)}else{var l=this.vm;this.handler=function(t){t.el=t.currentTarget,t.targetVM=l,e.call(o,t)},this.el.addEventListener(i,this.handler)}},unbind:function(e){this.el.removeEventListener(this.arg,this.handler),this.handler=null,e||(this.el.vue_viewmodel=null)}}}),e.register("vue/src/directives/model.js",function(e,t,i){var n=t("../utils"),r=navigator.userAgent.indexOf("MSIE 9.0")>0;i.exports={bind:function(){var e=this,t=e.el,i=t.type,s=t.tagName;e.lock=!1,e.event=e.compiler.options.lazy||"SELECT"===s||"checkbox"===i||"radio"===i?"change":"input";var o=e.attr="checkbox"===i?"checked":"INPUT"===s||"SELECT"===s||"TEXTAREA"===s?"value":"innerHTML",a=!1;this.cLock=function(){a=!0},this.cUnlock=function(){a=!1},t.addEventListener("compositionstart",this.cLock),t.addEventListener("compositionend",this.cUnlock),e.set=e.filters?function(){if(!a){var i;try{i=t.selectionStart}catch(r){}e.vm.$set(e.key,t[o]),n.nextTick(function(){void 0!==i&&t.setSelectionRange(i,i)})}}:function(){a||(e.lock=!0,e.vm.$set(e.key,t[o]),n.nextTick(function(){e.lock=!1}))},t.addEventListener(e.event,e.set),r&&(e.onCut=function(){n.nextTick(function(){e.set()})},e.onDel=function(t){(46===t.keyCode||8===t.keyCode)&&e.set()},t.addEventListener("cut",e.onCut),t.addEventListener("keyup",e.onDel))},update:function(e){if(!this.lock){var t=this,i=t.el;if("SELECT"===i.tagName){for(var r=i.options,s=r.length,o=-1;s--;)if(r[s].value==e){o=s;break}r.selectedIndex=o}else"radio"===i.type?i.checked=e==i.value:"checkbox"===i.type?i.checked=!!e:i[t.attr]=n.toText(e)}},unbind:function(){var e=this.el;e.removeEventListener(this.event,this.set),e.removeEventListener("compositionstart",this.cLock),e.removeEventListener("compositionend",this.cUnlock),r&&(e.removeEventListener("cut",this.onCut),e.removeEventListener("keyup",this.onDel))}}}),e.register("vue/src/directives/with.js",function(e,t,i){var n; +i.exports={bind:function(){this.isEmpty&&this.build()},update:function(e){this.component?this.component.$data=e:this.build(e)},build:function(e){n=n||t("../viewmodel");var i=this.Ctor||n;this.component=new i({el:this.el,data:e,compilerOptions:{parentCompiler:this.compiler}})},unbind:function(){this.component.$destroy()}}}),e.register("vue/src/directives/html.js",function(e,t,i){var n=t("../utils").toText,r=Array.prototype.slice;i.exports={bind:function(){8===this.el.nodeType&&(this.holder=document.createElement("div"),this.nodes=[])},update:function(e){e=n(e),this.holder?this.swap(e):this.el.innerHTML=e},swap:function(e){for(var t,i=this.el.parentNode,n=this.holder,s=this.nodes,o=s.length;o--;)i.removeChild(s[o]);for(n.innerHTML=e,s=this.nodes=r.call(n.childNodes),o=0,t=s.length;t>o;o++)i.insertBefore(s[o],this.el)}}}),e.register("vue/src/directives/style.js",function(e,t,i){function n(e){return e[1].toUpperCase()}var r=/-([a-z])/g,s=["webkit","moz","ms"];i.exports={bind:function(){var e=this.arg,t=e.charAt(0);"$"===t?(e=e.slice(1),this.prefixed=!0):"-"===t&&(e=e.slice(1)),this.prop=e.replace(r,n)},update:function(e){var t=this.prop;if(this.el.style[t]=e,this.prefixed){t=t.charAt(0).toUpperCase()+t.slice(1);for(var i=s.length;i--;)this.el.style[s[i]+t]=e}}}}),e.alias("component-emitter/index.js","vue/deps/emitter/index.js"),e.alias("component-emitter/index.js","emitter/index.js"),e.alias("vue/src/main.js","vue/index.js"),"object"==typeof exports?module.exports=e("vue"):"function"==typeof define&&define.amd?define(function(){return e("vue")}):window.Vue=e("vue")}(); \ No newline at end of file diff --git a/package.json b/package.json index 162d6357614..dcf5126f0b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "0.8.3", + "version": "0.8.4", "author": { "name": "Evan You", "email": "yyx990803@gmail.com",