ember-source 1.0.0.rc1.1 → 1.0.0.rc1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ember-source might be problematic. Click here for more details.

@@ -8,13 +8,14 @@
8
8
  // ==========================================================================
9
9
 
10
10
 
11
- // Version: v1.0.0-pre.4-277-g2c0c237
12
- // Last commit: 2c0c237 (2013-02-21 12:03:23 -0500)
11
+ // Version: v1.0.0-pre.4-293-ge707ffa
12
+ // Last commit: e707ffa (2013-02-23 17:35:13 -0500)
13
13
 
14
14
 
15
15
  (function(){var e,t;(function(){var n={},r={};e=function(e,t,r){n[e]={deps:t,callback:r}},t=function(e){if(r[e])return r[e];r[e]={};var i=n[e],s=i.deps,o=i.callback,u=[],a;for(var f=0,l=s.length;f<l;f++)s[f]==="exports"?u.push(a={}):u.push(t(s[f]));var c=o.apply(this,u);return r[e]=a||c}})(),function(){function r(t){if(e.console&&e.console[t])return e.console[t].apply?function(){e.console[t].apply(e.console,arguments)}:function(){var n=Array.prototype.join.call(arguments,", ");e.console[t](n)}}"undefined"==typeof Ember&&(Ember={});var e=Ember.imports=Ember.imports||this,t=Ember.exports=Ember.exports||this,n=Ember.lookup=Ember.lookup||this;t.Em=t.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.0.0-rc.1",Ember.ENV=Ember.ENV||("undefined"==typeof ENV?{}:ENV),Ember.config=Ember.config||{},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,typeof Ember.EXTEND_PROTOTYPES=="undefined"&&(Ember.EXTEND_PROTOTYPES=!0),Ember.LOG_STACKTRACE_ON_DEPRECATION=Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION!==!1,Ember.SHIM_ES5=Ember.ENV.SHIM_ES5===!1?!1:Ember.EXTEND_PROTOTYPES,Ember.K=function(){return this},"undefined"==typeof Ember.assert&&(Ember.assert=Ember.K),"undefined"==typeof Ember.warn&&(Ember.warn=Ember.K),"undefined"==typeof Ember.debug&&(Ember.debug=Ember.K),"undefined"==typeof Ember.deprecate&&(Ember.deprecate=Ember.K),"undefined"==typeof Ember.deprecateFunc&&(Ember.deprecateFunc=function(e,t){return t}),Ember.uuid=0,Ember.Logger={log:r("log")||Ember.K,warn:r("warn")||Ember.K,error:r("error")||Ember.K,info:r("info")||Ember.K,debug:r("debug")||r("info")||Ember.K},Ember.onerror=null,Ember.handleErrors=function(e,t){if("function"!=typeof Ember.onerror)return e.apply(t||this);try{return e.apply(t||this)}catch(n){Ember.onerror(n)}},Ember.merge=function(e,t){for(var n in t){if(!t.hasOwnProperty(n))continue;e[n]=t[n]}}}(),function(){var e=Ember.platform={};Ember.create=Object.create;if(!Ember.create||Ember.ENV.STUB_OBJECT_CREATE){var t=function(){};Ember.create=function(e,n){t.prototype=e,e=new t;if(n){t.prototype=e;for(var r in n)t.prototype[r]=n[r].value;e=new t}return t.prototype=null,e},Ember.create.isSimulated=!0}var n=Object.defineProperty,r,i;if(n)try{n({},"a",{get:function(){}})}catch(s){n=null}n&&(r=function(){var e={};return n(e,"a",{configurable:!0,enumerable:!0,get:function(){},set:function(){}}),n(e,"a",{configurable:!0,enumerable:!0,writable:!0,value:!0}),e.a===!0}(),i=function(){try{return n(document.createElement("div"),"definePropertyOnDOM",{}),!0}catch(e){}return!1}(),r?i||(n=function(e,t,n){var r;return typeof Node=="object"?r=e instanceof Node:r=typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.nodeName=="string",r?e[t]=n.value:Object.defineProperty(e,t,n)}):n=null),e.defineProperty=n,e.hasPropertyAccessors=!0,e.defineProperty||(e.hasPropertyAccessors=!1,e.defineProperty=function(e,t,n){n.get||(e[t]=n.value)},e.defineProperty.isSimulated=!0),Ember.ENV.MANDATORY_SETTER&&!e.hasPropertyAccessors&&(Ember.ENV.MANDATORY_SETTER=!1)}(),function(){function h(e){this.descs={},this.watching={},this.cache={},this.source=e}function p(e,t){return!!e&&typeof e[t]=="function"}var e=Ember.platform.defineProperty,t=Ember.create,n="__ember"+ +(new Date),r=0,i=[],s={},o=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=n;var u={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(i,s){s||(s="ember");var o=s+r++;return i&&(u.value=o,e(i,n,u)),o},Ember.guidFor=function(o){if(o===undefined)return"(undefined)";if(o===null)return"(null)";var a,f,l=typeof o;switch(l){case"number":return f=i[o],f||(f=i[o]="nu"+o),f;case"string":return f=s[o],f||(f=s[o]="st"+r++),f;case"boolean":return o?"(true)":"(false)";default:if(o[n])return o[n];if(o===Object)return"(Object)";if(o===Array)return"(Array)";return f="ember"+r++,u.value=f,e(o,n,u),f}};var a={writable:!0,configurable:!1,enumerable:!1,value:null},f=Ember.GUID_KEY+"_meta";Ember.META_KEY=f;var l={descs:{},watching:{}};o&&(l.values={}),Ember.EMPTY_META=l,Object.freeze&&Object.freeze(l);var c=Ember.platform.defineProperty.isSimulated;c&&(h.prototype.__preventPlainObject__=!0,h.prototype.toJSON=function(){}),Ember.meta=function(r,i){var s=r[f];return i===!1?s||l:(s?s.source!==r&&(c||e(r,f,a),s=t(s),s.descs=t(s.descs),s.watching=t(s.watching),s.cache={},s.source=r,o&&(s.values=t(s.values)),r[f]=s):(c||e(r,f,a),s=new h(r),o&&(s.values={}),r[f]=s,s.descs.constructor=null),s)},Ember.getMeta=function(t,n){var r=Ember.meta(t,!1);return r[n]},Ember.setMeta=function(t,n,r){var i=Ember.meta(t,!0);return i[n]=r,r},Ember.metaPath=function(n,r,i){var s=Ember.meta(n,i),o,u;for(var a=0,f=r.length;a<f;a++){o=r[a],u=s[o];if(!u){if(!i)return undefined;u=s[o]={__ember_source__:n}}else if(u.__ember_source__!==n){if(!i)return undefined;u=s[o]=t(u),u.__ember_source__=n}s=u}return u},Ember.wrap=function(e,t){function n(){}function r(){var r,i=this._super;return this._super=t||n,r=e.apply(this,arguments),this._super=i,r}return r.wrappedFunction=e,r.__ember_observes__=e.__ember_observes__,r.__ember_observesBefore__=e.__ember_observesBefore__,r},Ember.isArray=function(e){return!e||e.setInterval?!1:Array.isArray&&Array.isArray(e)?!0:Ember.Array&&Ember.Array.detect(e)?!0:e.length!==undefined&&"object"==typeof e?!0:!1},Ember.makeArray=function(e){return e===null||e===undefined?[]:Ember.isArray(e)?e:[e]},Ember.canInvoke=p,Ember.tryInvoke=function(e,t,n){if(p(e,t))return e[t].apply(e,n||[])};var d=function(){var e=0;try{try{}finally{throw e++,new Error("needsFinallyFixTest")}}catch(t){}return e!==1}();d?Ember.tryFinally=function(e,t,n){var r,i,s;n=n||this;try{r=e.call(n)}finally{try{i=t.call(n)}catch(o){s=o}}if(s)throw s;return i===undefined?r:i}:Ember.tryFinally=function(e,t,n){var r,i;n=n||this;try{r=e.call(n)}finally{i=t.call(n)}return i===undefined?r:i},d?Ember.tryCatchFinally=function(e,t,n,r){var i,s,o,u;r=r||this;try{i=e.call(r)}catch(a){i=t.call(r,a)}finally{try{s=n.call(r)}catch(f){o=f}}if(o)throw o;return s===undefined?i:s}:Ember.tryCatchFinally=function(e,t,n,r){var i,s;r=r||this;try{i=e.call(r)}catch(o){i=t.call(r,o)}finally{s=n.call(r)}return s===undefined?i:s}}(),function(){Ember.Instrumentation={};var e=[],t={},n=function(n){var r=[],i;for(var s=0,o=e.length;s<o;s++)i=e[s],i.regex.test(n)&&r.push(i.object);return t[n]=r,r},r=function(){var e="undefined"!=typeof window?window.performance||{}:{},t=e.now||e.mozNow||e.webkitNow||e.msNow||e.oNow;return t?t.bind(e):function(){return+(new Date)}}();Ember.Instrumentation.instrument=function(e,i,s,o){function d(){for(h=0,p=u.length;h<p;h++)c=u[h],l[h]=c.before(e,r(),i);return s.call(o)}function v(e){i=i||{},i.exception=e}function m(){for(h=0,p=u.length;h<p;h++)c=u[h],c.after(e,r(),i,l[h]);Ember.STRUCTURED_PROFILE&&console.timeEnd(a)}var u=t[e],a,f;Ember.STRUCTURED_PROFILE&&(a=e+": "+i.object,console.time(a)),u||(u=n(e));if(u.length===0)return f=s.call(o),Ember.STRUCTURED_PROFILE&&console.timeEnd(a),f;var l=[],c,h,p;return Ember.tryCatchFinally(d,v,m)},Ember.Instrumentation.subscribe=function(n,r){var i=n.split("."),s,o=[];for(var u=0,a=i.length;u<a;u++)s=i[u],s==="*"?o.push("[^\\.]*"):o.push(s);o=o.join("\\."),o+="(\\..*)?";var f={pattern:n,regex:new RegExp("^"+o+"$"),object:r};return e.push(f),t={},f},Ember.Instrumentation.unsubscribe=function(n){var r;for(var i=0,s=e.length;i<s;i++)e[i]===n&&(r=i);e.splice(r,1),t={}},Ember.Instrumentation.reset=function(){e=[],t={}},Ember.instrument=Ember.Instrumentation.instrument,Ember.subscribe=Ember.Instrumentation.subscribe}(),function(){var e=Ember.EnumerableUtils={map:function(e,t,n){return e.map?e.map.call(e,t,n):Array.prototype.map.call(e,t,n)},forEach:function(e,t,n){return e.forEach?e.forEach.call(e,t,n):Array.prototype.forEach.call(e,t,n)},indexOf:function(e,t,n){return e.indexOf?e.indexOf.call(e,t,n):Array.prototype.indexOf.call(e,t,n)},indexesOf:function(t,n){return n===undefined?[]:e.map(n,function(n){return e.indexOf(t,n)})},addObject:function(t,n){var r=e.indexOf(t,n);r===-1&&t.push(n)},removeObject:function(t,n){var r=e.indexOf(t,n);r!==-1&&t.splice(r,1)},replace:function(e,t,n,r){if(e.replace)return e.replace(t,n,r);var i=Array.prototype.concat.apply([t,n],r);return e.splice.apply(e,i)},intersection:function(e,t){var n=[];return e.forEach(function(e){t.indexOf(e)>=0&&n.push(e)}),n}}}(),function(){var e=function(e){return e&&Function.prototype.toString.call(e).indexOf("[native code]")>-1},t=e(Array.prototype.map)?Array.prototype.map:function(e){if(this===void 0||this===null)throw new TypeError;var t=Object(this),n=t.length>>>0;if(typeof e!="function")throw new TypeError;var r=new Array(n),i=arguments[1];for(var s=0;s<n;s++)s in t&&(r[s]=e.call(i,t[s],s,t));return r},n=e(Array.prototype.forEach)?Array.prototype.forEach:function(e){if(this===void 0||this===null)throw new TypeError;var t=Object(this),n=t.length>>>0;if(typeof e!="function")throw new TypeError;var r=arguments[1];for(var i=0;i<n;i++)i in t&&e.call(r,t[i],i,t)},r=e(Array.prototype.indexOf)?Array.prototype.indexOf:function(e,t){t===null||t===undefined?t=0:t<0&&(t=Math.max(0,this.length+t));for(var n=t,r=this.length;n<r;n++)if(this[n]===e)return n;return-1};Ember.ArrayPolyfills={map:t,forEach:n,indexOf:r},Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=t),Array.prototype.forEach||(Array.prototype.forEach=n),Array.prototype.indexOf||(Array.prototype.indexOf=r))}(),function(){var e=Ember.guidFor,t=Ember.ArrayPolyfills.indexOf,n=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},r=function(e,t){var r=e.keys.copy(),i=n(e.values);return t.keys=r,t.values=i,t},i=Ember.OrderedSet=function(){this.clear()};i.create=function(){return new i},i.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(t){var n=e(t),r=this.presenceSet,i=this.list;if(n in r)return;r[n]=!0,i.push(t)},remove:function(n){var r=e(n),i=this.presenceSet,s=this.list;delete i[r];var o=t.call(s,n);o>-1&&s.splice(o,1)},isEmpty:function(){return this.list.length===0},has:function(t){var n=e(t),r=this.presenceSet;return n in r},forEach:function(e,t){var n=this.list.slice();for(var r=0,i=n.length;r<i;r++)e.call(t,n[r])},toArray:function(){return this.list.slice()},copy:function(){var e=new i;return e.presenceSet=n(this.presenceSet),e.list=this.list.slice(),e}};var s=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};s.create=function(){return new s},s.prototype={get:function(t){var n=this.values,r=e(t);return n[r]},set:function(t,n){var r=this.keys,i=this.values,s=e(t);r.add(t),i[s]=n},remove:function(t){var n=this.keys,r=this.values,i=e(t),s;return r.hasOwnProperty(i)?(n.remove(t),s=r[i],delete r[i],!0):!1},has:function(t){var n=this.values,r=e(t);return n.hasOwnProperty(r)},forEach:function(t,n){var r=this.keys,i=this.values;r.forEach(function(r){var s=e(r);t.call(n,r,i[s])})},copy:function(){return r(this,new s)}};var o=Ember.MapWithDefault=function(e){s.call(this),this.defaultValue=e.defaultValue};o.create=function(e){return e?new o(e):new s},o.prototype=Ember.create(s.prototype),o.prototype.get=function(e){var t=this.has(e);if(t)return s.prototype.get.call(this,e);var n=this.defaultValue(e);return this.set(e,n),n},o.prototype.copy=function(){return r(this,new o({defaultValue:this.defaultValue}))}}(),function(){function a(e){return e.match(u)[0]}function f(e,n){var r=o.test(n),i=!r&&s.test(n),u;if(!e||i)e=Ember.lookup;r&&(n=n.slice(5)),e===Ember.lookup&&(u=a(n),e=t(e,u),n=n.slice(u.length+1));if(!n||n.length===0)throw new Error("Invalid Path");return[e,n]}function l(e,n){var r,i,s,u,a;if(e===null&&n.indexOf(".")===-1)return t(Ember.lookup,n);r=o.test(n);if(!e||r)s=f(e,n),e=s[0],n=s[1],s.length=0;i=n.split("."),a=i.length;for(u=0;e&&u<a;u++){e=t(e,i[u],!0);if(e&&e.isDestroyed)return undefined}return e}function c(e,t,r,i){var s;s=t.slice(t.lastIndexOf(".")+1),t=t.slice(0,t.length-(s.length+1)),t!=="this"&&(e=l(e,t));if(!s||s.length===0)throw new Error("You passed an empty path");if(!e){if(i)return;throw new Error("Object in path "+t+" could not be found or was destroyed.")}return n(e,s,r)}var e=Ember.META_KEY,t,n,r=Ember.ENV.MANDATORY_SETTER,i=/^([A-Z$]|([0-9][A-Z$]))/,s=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,o=/^this[\.\*]/,u=/^([^\.\*]+)/;t=function(n,i){if(i==="")return n;!i&&"string"==typeof n&&(i=n,n=null);if(!n||i.indexOf(".")!==-1)return l(n,i);var s=n[e],o=s&&s.descs[i],u;return o?o.get(n,i):(r&&s&&s.watching[i]>0?u=s.values[i]:u=n[i],u!==undefined||"object"!=typeof n||i in n||"function"!=typeof n.unknownProperty?u:n.unknownProperty(i))},n=function(n,i,s,o){typeof n=="string"&&(s=i,i=n,n=null);if(!n||i.indexOf(".")!==-1)return c(n,i,s,o);var u=n[e],a=u&&u.descs[i],f,l;return a?a.set(n,i,s):(f="object"==typeof n&&!(i in n),f&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,s):u&&u.watching[i]>0?(r?l=u.values[i]:l=n[i],s!==l&&(Ember.propertyWillChange(n,i),r?l!==undefined||i in n?u.values[i]=s:Ember.defineProperty(n,i,null,s):n[i]=s,Ember.propertyDidChange(n,i))):n[i]=s),s},Ember.config.overrideAccessors&&(Ember.get=t,Ember.set=n,Ember.config.overrideAccessors(),t=Ember.get,n=Ember.set),Ember.normalizeTuple=function(e,t){return f(e,t)},Ember.getWithDefault=function(e,n,r){var i=t(e,n);return i===undefined?r:i},Ember.get=t,Ember.getPath=Ember.deprecateFunc("getPath is deprecated since get now supports paths",Ember.get),Ember.set=n,Ember.setPath=Ember.deprecateFunc("setPath is deprecated since set now supports paths",Ember.set),Ember.trySet=function(e,t,r){return n(e,t,r,!0)},Ember.trySetPath=Ember.deprecateFunc("trySetPath has been renamed to trySet",Ember.trySet),Ember.isGlobalPath=function(e){return i.test(e)}}(),function(){var e=Ember.GUID_KEY,t=Ember.META_KEY,n=Ember.EMPTY_META,r=Ember.meta,i=Ember.create,s=Ember.platform.defineProperty,o=Ember.ENV.MANDATORY_SETTER,u=Ember.Descriptor=function(){},a=Ember.MANDATORY_SETTER_FUNCTION=function(e){},f=Ember.DEFAULT_GETTER_FUNCTION=function(e){return function(){var n=this[t];return n&&n.values[e]}};Ember.defineProperty=function(e,t,n,i,u){var l,c,h,p;return u||(u=r(e)),l=u.descs,c=u.descs[t],h=u.watching[t]>0,c instanceof Ember.Descriptor&&c.teardown(e,t),n instanceof Ember.Descriptor?(p=n,l[t]=n,o&&h?s(e,t,{configurable:!0,enumerable:!0,writable:!0,value:undefined}):e[t]=undefined,n.setup(e,t)):(l[t]=undefined,n==null?(p=i,o&&h?(u.values[t]=i,s(e,t,{configurable:!0,enumerable:!0,set:a,get:f(t)})):e[t]=i):(p=n,s(e,t,n))),h&&Ember.overrideChains(e,t,u),e.didDefineProperty&&e.didDefineProperty(e,t,p),this}}(),function(){function i(){this.clear()}function u(t){return t+e}function a(e){return e+t}var e=":change",t=":before",n=Ember.guidFor,r=0;i.prototype.add=function(e,t,n){var r=this.observerSet,i=this.observers,s=Ember.guidFor(e),o=r[s],u;return o||(r[s]=o={}),u=o[t],u===undefined&&(u=i.push({sender:e,keyName:t,eventName:n,listeners:[]})-1,o[t]=u),i[u].listeners},i.prototype.flush=function(){var e=this.observers,t,n,r,i;this.clear();for(t=0,n=e.length;t<n;++t){r=e[t],i=r.sender;if(i.isDestroying||i.isDestroyed)continue;Ember.sendEvent(i,r.eventName,[i,r.keyName],r.listeners)}},i.prototype.clear=function(){this.observerSet={},this.observers=[]};var s=new i,o=new i;Ember.beginPropertyChanges=function(){r++},Ember.endPropertyChanges=function(){r--,r<=0&&(s.clear(),o.flush())},Ember.changeProperties=function(e,t){Ember.beginPropertyChanges(),Ember.tryFinally(e,Ember.endPropertyChanges,t)},Ember.setProperties=function(e,t){return Ember.changeProperties(function(){for(var n in t)t.hasOwnProperty(n)&&Ember.set(e,n,t[n])}),e},Ember.addObserver=function(e,t,n,r){return Ember.addListener(e,u(t),n,r),Ember.watch(e,t),this},Ember.observersFor=function(e,t){return Ember.listenersFor(e,u(t))},Ember.removeObserver=function(e,t,n,r){return Ember.unwatch(e,t),Ember.removeListener(e,u(t),n,r),this},Ember.addBeforeObserver=function(e,t,n,r){return Ember.addListener(e,a(t),n,r),Ember.watch(e,t),this},Ember._suspendBeforeObserver=function(e,t,n,r,i){return Ember._suspendListener(e,a(t),n,r,i)},Ember._suspendObserver=function(e,t,n,r,i){return Ember._suspendListener(e,u(t),n,r,i)};var f=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,t,n,r,i){var s=f.call(t,a);return Ember._suspendListeners(e,s,n,r,i)},Ember._suspendObservers=function(e,t,n,r,i){var s=f.call(t,u);return Ember._suspendListeners(e,s,n,r,i)},Ember.beforeObserversFor=function(e,t){return Ember.listenersFor(e,a(t))},Ember.removeBeforeObserver=function(e,t,n,r){return Ember.unwatch(e,t),Ember.removeListener(e,a(t),n,r),this},Ember.notifyBeforeObservers=function(e,t){if(e.isDestroying)return;var n=a(t),i,o;r?(i=s.add(e,t,n),o=Ember.listenersDiff(e,n,i),Ember.sendEvent(e,n,[e,t],o)):Ember.sendEvent(e,n,[e,t])},Ember.notifyObservers=function(e,t){if(e.isDestroying)return;var n=u(t),i;r?(i=o.add(e,t,n),Ember.listenersUnion(e,n,i)):Ember.sendEvent(e,n,[e,t])}}(),function(){function p(e){return e.match(f)[0]}function d(e){return e==="*"||!l.test(e)}function v(t,n,r,i,s){var o=e(n);i[o]||(i[o]={});if(i[o][r])return;i[o][r]=!0;var u=s.deps;u=u&&u[r];if(u)for(var a in u){var f=s.descs[a];if(f&&f._suspended===n)continue;t(n,a)}}function y(e,t,n){if(e.isDestroying)return;var r=m,i=!r;i&&(r=m={}),v(O,e,t,r,n),i&&(m=null)}function b(e,t,n){if(e.isDestroying)return;var r=g,i=!r;i&&(r=g={}),v(M,e,t,r,n),i&&(g=null)}function w(e,n,r){if(!e||"object"!=typeof e)return;var i=t(e),s=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(s=i.chainWatchers={}),s[n]||(s[n]=[]),s[n].push(r),Ember.watch(e,n)}function E(e,n,r){if(!e||"object"!=typeof e)return;var i=t(e,!1);if(!i.hasOwnProperty("chainWatchers"))return;var s=i.chainWatchers;if(s[n]){s=s[n];for(var o=0,u=s.length;o<u;o++)s[o]===r&&s.splice(o,1)}Ember.unwatch(e,n)}function x(){if(S.length===0)return;var e=S;S=[],a.call(e,function(e){e[0].add(e[1])})}function T(e){return t(e,!1).proto===e}function k(e){var n=t(e),r=n.chains;return r?r.value()!==e&&(r=n.chains=r.copy(e)):r=n.chains=new N(null,null,e),r}function L(e,t,n,r){if(!n.hasOwnProperty("chainWatchers"))return;var i=n.chainWatchers;i=i[t];if(!i)return;for(var s=0,o=i.length;s<o;s++)i[s].willChange(r)}function A(e,t,n,r){if(!n.hasOwnProperty("chainWatchers"))return;var i=n.chainWatchers;i=i[t];if(!i)return;for(var s=i.length-1;s>=0;s--)i[s].didChange(r)}function O(e,n,r){var i=t(e,!1),s=i.watching[n]>0||n==="length",o=i.proto,u=i.descs[n];if(!s)return;if(o===e)return;u&&u.willChange&&u.willChange(e,n),y(e,n,i),L(e,n,i),Ember.notifyBeforeObservers(e,n)}function M(e,n){var r=t(e,!1),i=r.watching[n]>0||n==="length",s=r.proto,o=r.descs[n];if(s===e)return;o&&o.didChange&&o.didChange(e,n);if(!i&&n!=="length")return;b(e,n,r),A(e,n,r),Ember.notifyObservers(e,n)}var e=Ember.guidFor,t=Ember.meta,n=Ember.get,r=Ember.set,i=Ember.normalizeTuple,s=Ember.GUID_KEY,o=Ember.META_KEY,u=Ember.notifyObservers,a=Ember.ArrayPolyfills.forEach,f=/^([^\.\*]+)/,l=/[\.\*]/,c=Ember.ENV.MANDATORY_SETTER,h=Ember.platform.defineProperty,m,g,S=[],N=function(e,t,n){var r;this._parent=e,this._key=t,this._watching=n===undefined,this._value=n,this._paths={},this._watching&&(this._object=e.value(),this._object&&w(this._object,this._key,this)),this._parent&&this._parent._key==="@each"&&this.value()},C=N.prototype;C.value=function(){if(this._value===undefined&&this._watching){var e=this._parent.value();this._value=e&&!T(e)?n(e,this._key):undefined}return this._value},C.destroy=function(){if(this._watching){var e=this._object;e&&E(e,this._key,this),this._watching=!1}},C.copy=function(e){var t=new N(null,null,e),n=this._paths,r;for(r in n){if(n[r]<=0)continue;t.add(r)}return t},C.add=function(e){var t,n,r,s,o;o=this._paths,o[e]=(o[e]||0)+1,t=this.value(),n=i(t,e);if(n[0]&&n[0]===t)e=n[1],r=p(e),e=e.slice(r.length+1);else{if(!n[0]){S.push([this,e]),n.length=0;return}s=n[0],r=e.slice(0,0-(n[1].length+1)),e=n[1]}n.length=0,this.chain(r,e,s)},C.remove=function(e){var t,n,r,s,o;o=this._paths,o[e]>0&&o[e]--,t=this.value(),n=i(t,e),n[0]===t?(e=n[1],r=p(e),e=e.slice(r.length+1)):(s=n[0],r=e.slice(0,0-(n[1].length+1)),e=n[1]),n.length=0,this.unchain(r,e)},C.count=0,C.chain=function(e,t,n){var r=this._chains,i;r||(r=this._chains={}),i=r[e],i||(i=r[e]=new N(this,e,n)),i.count++,t&&t.length>0&&(e=p(t),t=t.slice(e.length+1),i.chain(e,t))},C.unchain=function(e,t){var n=this._chains,r=n[e];t&&t.length>1&&(e=p(t),t=t.slice(e.length+1),r.unchain(e,t)),r.count--,r.count<=0&&(delete n[r._key],r.destroy())},C.willChange=function(){var e=this._chains;if(e)for(var t in e){if(!e.hasOwnProperty(t))continue;e[t].willChange()}this._parent&&this._parent.chainWillChange(this,this._key,1)},C.chainWillChange=function(e,t,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,n+1):(n>1&&Ember.propertyWillChange(this.value(),t),t="this."+t,this._paths[t]>0&&Ember.propertyWillChange(this.value(),t))},C.chainDidChange=function(e,t,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,n+1):(n>1&&Ember.propertyDidChange(this.value(),t),t="this."+t,this._paths[t]>0&&Ember.propertyDidChange(this.value(),t))},C.didChange=function(e){if(this._watching){var t=this._parent.value();t!==this._object&&(E(this._object,this._key,this),this._object=t,w(t,this._key,this)),this._value=undefined,this._parent&&this._parent._key==="@each"&&this.value()}var n=this._chains;if(n)for(var r in n){if(!n.hasOwnProperty(r))continue;n[r].didChange(e)}if(e)return;this._parent&&this._parent.chainDidChange(this,this._key,1)},Ember.overrideChains=function(e,t,n){A(e,t,n,!0)},Ember.watch=function(e,n){if(n==="length"&&Ember.typeOf(e)==="array")return this;var r=t(e),i=r.watching,s;return i[n]?i[n]=(i[n]||0)+1:(i[n]=1,d(n)?(s=r.descs[n],s&&s.willWatch&&s.willWatch(e,n),"function"==typeof e.willWatchProperty&&e.willWatchProperty(n),c&&n in e&&(r.values[n]=e[n],h(e,n,{configurable:!0,enumerable:!0,set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(n)}))):k(e).add(n)),this},Ember.isWatching=function(t,n){var r=t[o];return(r&&r.watching[n])>0},Ember.watch.flushPending=x,Ember.unwatch=function(e,n){if(n==="length"&&Ember.typeOf(e)==="array")return this;var r=t(e),i=r.watching,s;return i[n]===1?(i[n]=0,d(n)?(s=r.descs[n],s&&s.didUnwatch&&s.didUnwatch(e,n),"function"==typeof e.didUnwatchProperty&&e.didUnwatchProperty(n),c&&n in e&&(h(e,n,{configurable:!0,enumerable:!0,writable:!0,value:r.values[n]}),delete r.values[n])):k(e).remove(n)):i[n]>1&&i[n]--,this},Ember.rewatch=function(e){var n=t(e,!1),r=n.chains;return s in e&&!e.hasOwnProperty(s)&&Ember.generateGuid(e,"ember"),r&&r.value()!==e&&(n.chains=r.copy(e)),this},Ember.finishChains=function(e){var n=t(e,!1),r=n.chains;r&&(r.value()!==e&&(n.chains=r=r.copy(e)),r.didChange(!0))},Ember.propertyWillChange=O,Ember.propertyDidChange=M;var _=[];Ember.destroy=function(e){var t=e[o],n,r,i,s;if(t){e[o]=null,n=t.chains;if(n){_.push(n);while(_.length>0){n=_.pop(),r=n._chains;if(r)for(i in r)r.hasOwnProperty(i)&&_.push(r[i]);n._watching&&(s=n._object,s&&E(s,n._key,n))}}}}}(),function(){function f(e,t,n){var r=t[n];return r?t.hasOwnProperty(n)||(r=t[n]=s(r)):r=t[n]={},r}function l(e,t){var n=t.deps;return n?t.hasOwnProperty("deps")||(n=t.deps=s(n)):n=t.deps={},n}function c(e,t,n,r){var i=e._dependentKeys,s,o,a,c,h;if(!i)return;s=l(t,r);for(o=0,a=i.length;o<a;o++)c=i[o],h=f(t,s,c),h[n]=(h[n]||0)+1,u(t,c)}function h(e,t,n,r){var i=e._dependentKeys,s,o,u,c,h;if(!i)return;s=l(t,r);for(o=0,u=i.length;o<u;o++)c=i[o],h=f(t,s,c),h[n]=(h[n]||0)-1,a(t,c)}function p(e,t){this.func=e,this._cacheable=t&&t.cacheable!==undefined?t.cacheable:!0,this._dependentKeys=t&&t.dependentKeys}var e=Ember.get,t=Ember.set,n=Ember.meta,r=Ember.guidFor,i=[].slice,s=Ember.create,o=Ember.META_KEY,u=Ember.watch,a=Ember.unwatch;Ember.ComputedProperty=p,p.prototype=new Ember.Descriptor;var d=p.prototype;d.cacheable=function(e){return this._cacheable=e!==!1,this},d.volatile=function(){return this.cacheable(!1)},d.property=function(){var e=[];for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return this._dependentKeys=e,this},d.meta=function(e){return arguments.length===0?this._meta||{}:(this._meta=e,this)},d.willWatch=function(e,t){var n=e[o];t in n.cache||c(this,e,t,n)},d.didUnwatch=function(e,t){var n=e[o];t in n.cache||h(this,e,t,n)},d.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=n(e);t in r.cache&&(delete r.cache[t],r.watching[t]||h(this,e,t,r))}},d.get=function(e,t){var r,i,s;if(this._cacheable){s=n(e),i=s.cache;if(t in i)return i[t];r=i[t]=this.func.call(e,t),s.watching[t]||c(this,e,t,s)}else r=this.func.call(e,t);return r},d.set=function(e,t,r){var i=this._cacheable,s=this.func,o=n(e,i),u=o.watching[t],a=this._suspended,f=!1,l=o.cache,h,p;this._suspended=e;try{i&&l.hasOwnProperty(t)&&(h=l[t],f=!0),s.wrappedFunction&&(s=s.wrappedFunction);if(s.length===3)p=s.call(e,t,r,h);else{if(s.length!==2){Ember.defineProperty(e,t,null,h),Ember.set(e,t,r);return}p=s.call(e,t,r)}if(f&&h===p)return;u&&Ember.propertyWillChange(e,t),f&&delete l[t],i&&(!u&&!f&&c(this,e,t,o),l[t]=p),u&&Ember.propertyDidChange(e,t)}finally{this._suspended=a}return p},d.setup=function(e,t){var r=e[o];r&&r.watching[t]&&c(this,e,t,n(e))},d.teardown=function(e,t){var r=n(e);return(r.watching[t]||t in r.cache)&&h(this,e,t,r),this._cacheable&&delete r.cache[t],null},Ember.computed=function(e){var t;arguments.length>1&&(t=i.call(arguments,0,-1),e=i.call(arguments,-1)[0]);var n=new p(e);return t&&n.property.apply(n,t),n},Ember.cacheFor=function(t,r){var i=n(t,!1).cache;if(i&&r in i)return i[r]},Ember.computed.not=function(t){return Ember.computed(t,function(n){return!e(this,t)})},Ember.computed.empty=function(t){return Ember.computed(t,function(n){var r=e(this,t);return r===undefined||r===null||r===""||Ember.isArray(r)&&e(r,"length")===0})},Ember.computed.bool=function(t){return Ember.computed(t,function(n){return!!e(this,t)})},Ember.computed.alias=function(n){return Ember.computed(n,function(r,i){return arguments.length===1?e(this,n):(t(this,n,i),i)})}}(),function(){function i(e,t,n){var r=-1;for(var i=0,s=e.length;i<s;i++)if(t===e[i][0]&&n===e[i][1]){r=i;break}return r}function s(n,r){var i=t(n,!0),s;return i.listeners||(i.listeners={}),i.hasOwnProperty("listeners")||(i.listeners=e(i.listeners)),s=i.listeners[r],s&&!i.listeners.hasOwnProperty(r)?s=i.listeners[r]=i.listeners[r].slice():s||(s=i.listeners[r]=[]),s}function o(e,t,n){var s=e[r],o=s&&s.listeners&&s.listeners[t];if(!o)return;for(var u=o.length-1;u>=0;u--){var a=o[u][0],f=o[u][1],l=o[u][2],c=o[u][3],h=i(n,a,f);h===-1&&n.push([a,f,l,c])}}function u(e,t,n){var s=e[r],o=s&&s.listeners&&s.listeners[t],u=[];if(!o)return;for(var a=o.length-1;a>=0;a--){var f=o[a][0],l=o[a][1],c=o[a][2],h=o[a][3],p=i(n,f,l);if(p!==-1)continue;n.push([f,l,c,h]),u.push([f,l,c,h])}return u}function a(e,t,n,r,o){!r&&"function"==typeof n&&(r=n,n=null);var u=s(e,t),a=i(u,n,r);if(a!==-1)return;u.push([n,r,o,undefined]),"function"==typeof e.didAddListener&&e.didAddListener(t,n,r)}function f(e,t,n,o){function u(n,r,o){var u=s(e,t),a=i(u,n,r);if(a===-1)return;u.splice(a,1),"function"==typeof e.didRemoveListener&&e.didRemoveListener(t,n,r)}!o&&"function"==typeof n&&(o=n,n=null);if(o)u(n,o);else{var a=e[r],f=a&&a.listeners&&a.listeners[t];if(!f)return;for(var l=f.length-1;l>=0;l--)u(f[l][0],f[l][1])}}function l(e,t,n,r,o){function l(){return o.call(n)}function c(){f&&(f[3]=undefined)}!r&&"function"==typeof n&&(r=n,n=null);var u=s(e,t),a=i(u,n,r),f;return a!==-1&&(f=u[a].slice(),f[3]=!0,u[a]=f),Ember.tryFinally(l,c)}function c(e,t,n,r,o){function d(){return o.call(n)}function v(){for(c=0,h=u.length;c<h;c++)u[c][3]=undefined}!r&&"function"==typeof n&&(r=n,n=null);var u=[],a,f,l,c,h;for(c=0,h=t.length;c<h;c++){a=t[c],f=s(e,a);var p=i(f,n,r);p!==-1&&(l=f[p].slice(),l[3]=!0,f[p]=l,u.push(l))}return Ember.tryFinally(d,v)}function h(e){var t=e[r].listeners,n=[];if(t)for(var i in t)t[i]&&n.push(i);return n}function p(e,t,n,i){e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,n);if(!i){var s=e[r];i=s&&s.listeners&&s.listeners[t]}if(!i)return;for(var o=i.length-1;o>=0;o--){if(!i[o]||i[o][3]===!0)continue;var u=i[o][0],a=i[o][1],l=i[o][2];l&&f(e,t,u,a),u||(u=e),"string"==typeof a&&(a=u[a]),n?a.apply(u,n):a.apply(u)}return!0}function d(e,t){var n=e[r],i=n&&n.listeners&&n.listeners[t];return!!i&&!!i.length}function v(e,t){var n=[],i=e[r],s=i&&i.listeners&&i.listeners[t];if(!s)return n;for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];n.push([a,f])}return n}var e=Ember.create,t=Ember.meta,n=Ember.metaPath,r=Ember.META_KEY;Ember.addListener=a,Ember.removeListener=f,Ember._suspendListener=l,Ember._suspendListeners=c,Ember.sendEvent=p,Ember.hasListeners=d,Ember.watchedEvents=h,Ember.listenersFor=v,Ember.listenersDiff=u,Ember.listenersUnion=o}(),function(){function n(t,n,r,i){return n===undefined&&(n=t,t=undefined),"string"==typeof n&&(n=t[n]),r&&i>0&&(r=r.length>i?e.call(r,i):null),Ember.handleErrors(function(){return n.apply(t||this,r||[])},this)}function u(){o=null,s.currentRunLoop&&s.end()}function l(){f=null;var e=+(new Date),t=-1;for(var r in a){if(!a.hasOwnProperty(r))continue;var i=a[r];if(i&&i.expires)if(e>=i.expires)delete a[r],n(i.target,i.method,i.args,2);else if(t<0||i.expires<t)t=i.expires}t>0&&(f=setTimeout(l,t- +(new Date)))}function c(e,t){t[this.tguid]&&delete t[this.tguid][this.mguid],a[e]&&n(this.target,this.method,this.args),delete a[e]}function h(e,t,n,r){var i=Ember.guidFor(t),o=Ember.guidFor(n),u=s.autorun().onceTimers,f=u[i]&&u[i][o],l;return f&&a[f]?a[f].args=r:(l={target:t,method:n,args:r,tguid:i,mguid:o},f=Ember.guidFor(l),a[f]=l,u[i]||(u[i]={}),u[i][o]=f,s.schedule(e,l,c,f,u)),f}function d(){p=null;for(var e in a){if(!a.hasOwnProperty(e))continue;var t=a[e];t.next&&(delete a[e],n(t.target,t.method,t.args,2))}}var e=[].slice,t=Ember.ArrayPolyfills.forEach,r,i=function(e){this._prev=e||null,this.onceTimers={}};i.prototype={end:function(){this.flush()},prev:function(){return this._prev},schedule:function(t,n,r){var i=this._queues,s;i||(i=this._queues={}),s=i[t],s||(s=i[t]=[]);var o=arguments.length>3?e.call(arguments,3):null;return s.push({target:n,method:r,args:o}),this},flush:function(e){function f(e){n(e.target,e.method,e.args)}function l(){t.call(u,f)}var i,s,o,u,a;if(!this._queues)return this;Ember.watch.flushPending();if(e)while(this._queues&&(u=this._queues[e]))this._queues[e]=null,e==="sync"?(a=Ember.LOG_BINDINGS,a&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges(),Ember.tryFinally(l,Ember.endPropertyChanges),a&&Ember.Logger.log("End: Flush Sync Queue")):t.call(u,f);else{i=Ember.run.queues,o=i.length,s=0;e:while(s<o){e=i[s],u=this._queues&&this._queues[e],delete this._queues[e],u&&(e==="sync"?(a=Ember.LOG_BINDINGS,a&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges(),Ember.tryFinally(l,Ember.endPropertyChanges),a&&Ember.Logger.log("End: Flush Sync Queue")):t.call(u,f));for(var c=0;c<=s;c++)if(this._queues&&this._queues[i[c]]){s=c;continue e}s++}}return r=null,this}},Ember.RunLoop=i,Ember.run=function(e,t){function o(){if(e||t)return n(e,t,i,2)}var r,i=arguments;return s.begin(),Ember.tryFinally(o,s.end)};var s=Ember.run;Ember.run.begin=function(){s.currentRunLoop=new i(s.currentRunLoop)},Ember.run.end=function(){function e(){s.currentRunLoop.end()}function t(){s.currentRunLoop=s.currentRunLoop.prev()}Ember.tryFinally(e,t)},Ember.run.queues=["sync","actions","destroy","timers"],Ember.run.schedule=function(e,t,n){var r=s.autorun();r.schedule.apply(r,arguments)};var o;Ember.run.hasScheduledTimers=function(){return!!(o||f||p)},Ember.run.cancelTimers=function(){o&&(clearTimeout(o),o=null),f&&(clearTimeout(f),f=null),p&&(clearTimeout(p),p=null),a={}},Ember.run.autorun=function(){return s.currentRunLoop||(s.begin(),o||(o=setTimeout(u,1))),s.currentRunLoop},Ember.run.sync=function(){s.autorun(),s.currentRunLoop.flush("sync")};var a={},f;Ember.run.later=function(t,n){var r,i,o,u,f;return arguments.length===2&&"function"==typeof t?(f=n,n=t,t=undefined,r=[t,n]):(r=e.call(arguments),f=r.pop()),i=+(new Date)+f,o={target:t,method:n,expires:i,args:r},u=Ember.guidFor(o),a[u]=o,s.once(a,l),u},Ember.run.once=function(t,n){return h("actions",t,n,e.call(arguments,2))},Ember.run.scheduleOnce=function(t,n,r,i){return h(t,n,r,e.call(arguments,3))};var p;Ember.run.next=function(t,n){var r,i={target:t,method:n,args:e.call(arguments),next:!0};return r=Ember.guidFor(i),a[r]=i,p||(p=setTimeout(d,1)),r},Ember.run.cancel=function(e){delete a[e]}}(),function(){function i(t,n){return e(r(n)?Ember.lookup:t,n)}function o(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}Ember.LOG_BINDINGS=!!Ember.ENV.LOG_BINDINGS;var e=Ember.get,t=Ember.set,n=Ember.guidFor,r=Ember.isGlobalPath,s=function(e,t){this._direction="fwd",this._from=t,this._to=
16
- e,this._directionMap=Ember.Map.create()};s.prototype={copy:function(){var e=new s(this._to,this._from);return this._oneWay&&(e._oneWay=!0),e},from:function(e){return this._from=e,this},to:function(e){return this._to=e,this},oneWay:function(){return this._oneWay=!0,this},toString:function(){var e=this._oneWay?"[oneWay]":"";return"Ember.Binding<"+n(this)+">("+this._from+" -> "+this._to+")"+e},connect:function(e){var t=this._from,n=this._to;return Ember.trySet(e,n,i(e,t)),Ember.addObserver(e,t,this,this.fromDidChange),this._oneWay||Ember.addObserver(e,n,this,this.toDidChange),this._readyToSync=!0,this},disconnect:function(e){var t=!this._oneWay;return Ember.removeObserver(e,this._from,this,this.fromDidChange),t&&Ember.removeObserver(e,this._to,this,this.toDidChange),this._readyToSync=!1,this},fromDidChange:function(e){this._scheduleSync(e,"fwd")},toDidChange:function(e){this._scheduleSync(e,"back")},_scheduleSync:function(e,t){var n=this._directionMap,r=n.get(e);r||(Ember.run.schedule("sync",this,this._sync,e),n.set(e,t)),r==="back"&&t==="fwd"&&n.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(t.isDestroyed||!this._readyToSync)return;var r=this._directionMap,s=r.get(t),o=this._from,u=this._to;r.remove(t);if(s==="fwd"){var a=i(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",a,t),this._oneWay?Ember.trySet(t,u,a):Ember._suspendObserver(t,u,this,this.toDidChange,function(){Ember.trySet(t,u,a)})}else if(s==="back"){var f=e(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",f,t),Ember._suspendObserver(t,o,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(o)?Ember.lookup:t,o,f)})}}},o(s,{from:function(){var e=this,t=new e;return t.from.apply(t,arguments)},to:function(){var e=this,t=new e;return t.to.apply(t,arguments)},oneWay:function(e,t){var n=this,r=new n(null,e);return r.oneWay(t)}}),Ember.Binding=s,Ember.bind=function(e,t,n){return(new Ember.Binding(t,n)).connect(e)},Ember.oneWay=function(e,t,n){return(new Ember.Binding(t,n)).oneWay().connect(e)}}(),function(){function c(e){var t=Ember.meta(e,!0),n=t.mixins;return n?t.hasOwnProperty("mixins")||(n=t.mixins=a(n)):n=t.mixins={},n}function h(t,n){return n&&n.length>0&&(t.mixins=r.call(n,function(t){if(t instanceof e)return t;var n=new e;return n.properties=t,n})),t}function p(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function v(t,n){var r;return n instanceof e?(r=l(n),t[r]?d:(t[r]=n,n.properties)):n}function m(e,t,n){var r;return r=t.concatenatedProperties||n.concatenatedProperties,e.concatenatedProperties&&(r=r?r.concat(e.concatenatedProperties):e.concatenatedProperties),r}function g(e,t,n,r,i){var s;return r[t]===undefined&&(s=i[t]),s=s||e.descs[t],!!s&&s instanceof Ember.ComputedProperty?(n=a(n),n.func=Ember.wrap(n.func,s.func),n):n}function y(e,t,n,r,i){var s;return i[t]===undefined&&(s=r[t]),s=s||e[t],"function"!=typeof s?n:Ember.wrap(n,s)}function b(e,t,n,r){var i=r[t]||e[t];return i?"function"==typeof i.concat?i.concat(n):Ember.makeArray(i).concat(n):Ember.makeArray(n)}function w(e,n,r,s,o,u,a){if(r instanceof Ember.Descriptor){if(r===t&&o[n])return d;r.func&&(r=g(s,n,r,u,o)),o[n]=r,u[n]=undefined}else{if(p(r))r=y(e,n,r,u,o);else if(a&&i.call(a,n)>=0||n==="concatenatedProperties")r=b(e,n,r,u);o[n]=undefined,u[n]=r}}function E(e,t,n,r,i){function c(e){delete n[e],delete r[e]}var o,u,a,f,l;for(var h=0,p=e.length;h<p;h++){o=e[h],u=v(t,o);if(u===d)continue;if(u){l=Ember.meta(i),f=m(u,r,i);for(a in u){if(!u.hasOwnProperty(a))continue;w(i,a,u[a],l,n,r,f)}u.hasOwnProperty("toString")&&(i.toString=u.toString)}else o.mixins&&(E(o.mixins,t,n,r,i),o._without&&s.call(o._without,c))}}function S(e){var t=Ember.meta(e),n=t.required;if(!n||!t.hasOwnProperty("required"))n=t.required=n?a(n):{};return n}function T(e,t,n,r){if(x.test(t)){var i=r.bindings;i?r.hasOwnProperty("bindings")||(i=r.bindings=a(r.bindings)):i=r.bindings={},i[t]=n}}function N(e,t){var n=t.bindings,r,i,s;if(n){for(r in n)i=n[r],i&&(s=r.slice(0,-7),i instanceof Ember.Binding?(i=i.copy(),i.to(s)):i=new Ember.Binding(s,i),i.connect(e),e[r]=i);t.bindings={}}}function C(e,t){return N(e,t||Ember.meta(e)),e}function k(e,t,n,r,i){var s=t.methodName,o;return r[s]||i[s]?(o=i[s],t=r[s]):n.descs[s]?(t=n.descs[s],o=undefined):(t=undefined,o=e[s]),{desc:t,value:o}}function L(e,t,n,r,i){if("function"!=typeof n)return;var s=n[r];if(s)for(var o=0,u=s.length;o<u;o++)Ember[i](e,s[o],null,t)}function A(e,t,n){var r=e[t];L(e,t,r,"__ember_observesBefore__","removeBeforeObserver"),L(e,t,r,"__ember_observes__","removeObserver"),L(e,t,n,"__ember_observesBefore__","addBeforeObserver"),L(e,t,n,"__ember_observes__","addObserver")}function O(e,r,i){var s={},o={},u=Ember.meta(e),a,l,h;E(r,c(e),s,o,e);for(a in o){if(a==="contructor"||!o.hasOwnProperty(a))continue;h=s[a],l=o[a];if(h===t)continue;while(h&&h instanceof n){var p=k(e,h,u,s,o);h=p.desc,l=p.value}if(h===undefined&&l===undefined)continue;A(e,a,l),T(e,a,l,u),f(e,a,h,l,u)}return i||C(e,u),e}function _(e,t,n){var r=l(e);if(n[r])return!1;n[r]=!0;if(e===t)return!0;var i=e.mixins,s=i?i.length:0;while(--s>=0)if(_(i[s],t,n))return!0;return!1}function D(e,t,n){if(n[l(t)])return;n[l(t)]=!0;if(t.properties){var r=t.properties;for(var i in r)r.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&s.call(t.mixins,function(t){D(e,t,n)})}var e,t,n,r=Ember.ArrayPolyfills.map,i=Ember.ArrayPolyfills.indexOf,s=Ember.ArrayPolyfills.forEach,o=[].slice,u={},a=Ember.create,f=Ember.defineProperty,l=Ember.guidFor,d={},x=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=o.call(arguments,1);return O(e,t,!1),e},Ember.Mixin=function(){return h(this,arguments)},e=Ember.Mixin,e._apply=O,e.applyPartial=function(e){var t=o.call(arguments,1);return O(e,t,!0)},e.finishPartial=C,Ember.anyUnprocessedMixins=!1,e.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return h(new e,arguments)};var M=e.prototype;M.reopen=function(){var t,n;this.properties?(t=e.create(),t.properties=this.properties,delete this.properties,this.mixins=[t]):this.mixins||(this.mixins=[]);var r=arguments.length,i=this.mixins,s;for(s=0;s<r;s++)t=arguments[s],t instanceof e?i.push(t):(n=e.create(),n.properties=t,i.push(n));return this},M.apply=function(e){return O(e,[this],!1)},M.applyPartial=function(e){return O(e,[this],!0)},M.detect=function(t){if(!t)return!1;if(t instanceof e)return _(t,this,{});var n=Ember.meta(t,!1).mixins;return n?!!n[l(this)]:!1},M.without=function(){var t=new e(this);return t._without=o.call(arguments),t},M.keys=function(){var e={},t={},n=[];D(e,this,t);for(var r in e)e.hasOwnProperty(r)&&n.push(r);return n},e.mixins=function(e){var t=Ember.meta(e,!1).mixins,n=[];if(!t)return n;for(var r in t){var i=t[r];i.properties||n.push(i)}return n},t=new Ember.Descriptor,t.toString=function(){return"(Required Property)"},Ember.required=function(){return t},n=function(e){this.methodName=e},n.prototype=new Ember.Descriptor,Ember.alias=function(e){return new n(e)},Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.",Ember.alias),Ember.aliasMethod=function(e){return new n(e)},Ember.observer=function(e){var t=o.call(arguments,1);return e.__ember_observes__=t,e},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;e<t;e++)var n=arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(e){var t=o.call(arguments,1);return e.__ember_observesBefore__=t,e}}(),function(){}(),function(){e("rsvp",[],function(){"use strict";function d(e,t){n.async(function(){e.trigger("promise:resolved",{detail:t}),e.isResolved=!0,e.resolvedValue=t})}function v(e,t){n.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedValue=t})}function m(e){var t,n=[],r=new c,i=e.length;i===0&&r.resolve([]);var s=function(e){return function(t){o(e,t)}},o=function(e,t){n[e]=t,--i===0&&r.resolve(n)},u=function(e){r.reject(e)};for(t=0;t<i;t++)e[t].then(s(t),u);return r}var e=typeof window!="undefined"?window:{},t=e.MutationObserver||e.WebKitMutationObserver,n,r;if(typeof process!="undefined"&&{}.toString.call(process)==="[object process]")r=function(e,t){process.nextTick(function(){e.call(t)})};else if(t){var i=[],s=new t(function(){var e=i.slice();i=[],e.forEach(function(e){var t=e[0],n=e[1];t.call(n)})}),o=document.createElement("div");s.observe(o,{attributes:!0}),window.addEventListener("unload",function(){s.disconnect(),s=null}),r=function(e,t){i.push([e,t]),o.setAttribute("drainQueue","drainQueue")}}else r=function(e,t){setTimeout(function(){e.call(t)},1)};var u=function(e,t){this.type=e;for(var n in t){if(!t.hasOwnProperty(n))continue;this[n]=t[n]}},a=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n][0]===t)return n;return-1},f=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},l={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e},on:function(e,t,n){var r=f(this),i,s;e=e.split(/\s+/),n=n||this;while(s=e.shift())i=r[s],i||(i=r[s]=[]),a(i,t)===-1&&i.push([t,n])},off:function(e,t){var n=f(this),r,i,s;e=e.split(/\s+/);while(i=e.shift()){if(!t){n[i]=[];continue}r=n[i],s=a(r,t),s!==-1&&r.splice(s,1)}},trigger:function(e,t){var n=f(this),r,i,s,o,a;if(r=n[e])for(var l=0;l<r.length;l++)i=r[l],s=i[0],o=i[1],typeof t!="object"&&(t={detail:t}),a=new u(e,t),s.call(o,a)}},c=function(){this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this),this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this)},h=function(){},p=function(e,t,n,r){var i=typeof n=="function",s,o,u,a;if(i)try{s=n(r.detail),u=!0}catch(f){a=!0,o=f}else s=r.detail,u=!0;s&&typeof s.then=="function"?s.then(function(e){t.resolve(e)},function(e){t.reject(e)}):i&&u?t.resolve(s):a?t.reject(o):t[e](s)};return c.prototype={then:function(e,t){var r=new c;return this.isResolved&&n.async(function(){p("resolve",r,e,{detail:this.resolvedValue})},this),this.isRejected&&n.async(function(){p("reject",r,t,{detail:this.rejectedValue})},this),this.on("promise:resolved",function(t){p("resolve",r,e,t)}),this.on("promise:failed",function(e){p("reject",r,t,e)}),r},resolve:function(e){d(this,e),this.resolve=h,this.reject=h},reject:function(e){v(this,e),this.resolve=h,this.reject=h}},l.mixin(c.prototype),n={async:r,Promise:c,Event:u,EventTarget:l,all:m,raiseOnUncaughtExceptions:!0},n})}(),function(){e("container",[],function(){function e(e){this.parent=e,this.dict={}}function t(t){this.parent=t,this.children=[],this.resolver=t&&t.resolver||function(){},this.registry=new e(t&&t.registry),this.cache=new e(t&&t.cache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this._options=new e(t&&t._options),this._typeOptions=new e(t&&t._typeOptions)}function n(e){throw new Error(e+" is not currently supported on child containers")}function r(e,t){var n=s(e,t,"singleton");return n!==!1}function i(e,t){var n={};if(!t)return n;var r,i;for(var s=0,o=t.length;s<o;s++)r=t[s],i=e.lookup(r.fullName),n[r.property]=i;return n}function s(e,t,n){var r=e._options.get(t);if(r&&r[n]!==undefined)return r[n];var i=t.split(":")[0];r=e._typeOptions.get(i);if(r)return r[n]}function o(e,t){return e.resolve(t)}function u(e,t){var n=o(e,t),r=t.split(":"),u=r[0],a=r[1],f;if(s(e,t,"instantiate")===!1)return n;if(n){var l=[];l=l.concat(e.typeInjections.get(u)||[]),l=l.concat(e.injections[t]||[]);var c=i(e,l);return c.container=e,c._debugContainerKey=t,f=n.create(c),f}}function a(e,t){e.cache.eachLocal(function(n,r){if(s(e,n,"instantiate")===!1)return;t(r)})}function f(e){e.cache.eachLocal(function(t,n){if(s(e,t,"instantiate")===!1)return;n.destroy()}),e.cache.dict={}}return e.prototype={get:function(e){var t=this.dict;if(t.hasOwnProperty(e))return t[e];if(this.parent)return this.parent.get(e)},set:function(e,t){this.dict[e]=t},has:function(e){var t=this.dict;return t.hasOwnProperty(e)?!0:this.parent?this.parent.has(e):!1},eachLocal:function(e,t){var n=this.dict;for(var r in n)n.hasOwnProperty(r)&&e.call(t,r,n[r])}},t.prototype={child:function(){var e=new t(this);return this.children.push(e),e},set:function(e,t,n){e[t]=n},register:function(e,t,n,r){var i;e.indexOf(":")!==-1?(r=n,n=t,i=e):i=e+":"+t,this.registry.set(i,n),this._options.set(i,r||{})},resolve:function(e){return this.resolver(e)||this.registry.get(e)},lookup:function(e,t){t=t||{};if(this.cache.has(e)&&t.singleton!==!1)return this.cache.get(e);var n=u(this,e);if(!n)return;return r(this,e)&&t.singleton!==!1&&this.cache.set(e,n),n},has:function(e){return this.cache.has(e)?!0:!!o(this,e)},optionsForType:function(e,t){this.parent&&n("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,r){this.parent&&n("typeInjection");var i=this.typeInjections.get(e);i||(i=[],this.typeInjections.set(e,i)),i.push({property:t,fullName:r})},injection:function(e,t,r){this.parent&&n("injection");if(e.indexOf(":")===-1)return this.typeInjection(e,t,r);var i=this.injections[e]=this.injections[e]||[];i.push({property:t,fullName:r})},destroy:function(){this.isDestroyed=!0;for(var e=0,t=this.children.length;e<t;e++)this.children[e].destroy();this.children=[],a(this,function(e){e.isDestroying=!0}),a(this,function(e){e.destroy()}),delete this.parent,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;e<t;e++)f(this.children[e]);f(this)}},t})}(),function(){function i(t,n,r,s){var o,u,a;if("object"!=typeof t||t===null)return t;if(n&&(u=e(r,t))>=0)return s[u];if(Ember.typeOf(t)==="array"){o=t.slice();if(n){u=o.length;while(--u>=0)o[u]=i(o[u],n,r,s)}}else if(Ember.Copyable&&Ember.Copyable.detect(t))o=t.copy(n,r,s);else{o={};for(a in t){if(!t.hasOwnProperty(a))continue;if(a.substring(0,2)==="__")continue;o[a]=n?i(t[a],n,r,s):t[a]}}return n&&(r.push(t),s.push(o)),o}var e=Ember.EnumerableUtils.indexOf,t={},n="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(n,function(e){t["[object "+e+"]"]=e.toLowerCase()});var r=Object.prototype.toString;Ember.typeOf=function(e){var n;return n=e===null||e===undefined?String(e):t[r.call(e)]||"object",n==="function"?Ember.Object&&Ember.Object.detect(e)&&(n="class"):n==="object"&&(e instanceof Error?n="error":Ember.Object&&e instanceof Ember.Object?n="instance":n="object"),n},Ember.isNone=function(e){return e===null||e===undefined},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return e===null||e===undefined||e.length===0&&typeof e!="function"||typeof e=="object"&&Ember.get(e,"length")===0},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty),Ember.compare=function o(e,t){if(e===t)return 0;var n=Ember.typeOf(e),r=Ember.typeOf(t),i=Ember.Comparable;if(i){if(n==="instance"&&i.detect(e.constructor))return e.constructor.compare(e,t);if(r==="instance"&&i.detect(t.constructor))return 1-t.constructor.compare(t,e)}var s=Ember.ORDER_DEFINITION_MAPPING;if(!s){var u=Ember.ORDER_DEFINITION;s=Ember.ORDER_DEFINITION_MAPPING={};var a,f;for(a=0,f=u.length;a<f;++a)s[u[a]]=a;delete Ember.ORDER_DEFINITION}var l=s[n],c=s[r];if(l<c)return-1;if(l>c)return 1;switch(n){case"boolean":case"number":if(e<t)return-1;if(e>t)return 1;return 0;case"string":var h=e.localeCompare(t);if(h<0)return-1;if(h>0)return 1;return 0;case"array":var p=e.length,d=t.length,v=Math.min(p,d),m=0,g=0;while(m===0&&g<v)m=o(e[g],t[g]),g++;if(m!==0)return m;if(p<d)return-1;if(p>d)return 1;return 0;case"instance":if(Ember.Comparable&&Ember.Comparable.detect(e))return e.compare(e,t);return 0;case"date":var y=e.getTime(),b=t.getTime();if(y<b)return-1;if(y>b)return 1;return 0;default:return 0}},Ember.copy=function(e,t){return"object"!=typeof e||e===null?e:Ember.Copyable&&Ember.Copyable.detect(e)?e.copy(t):i(e,t,t?[]:null,t?[]:null)},Ember.inspect=function(e){if(typeof e!="object"||e===null)return e+"";var t,n=[];for(var r in e)if(e.hasOwnProperty(r)){t=e[r];if(t==="toString")continue;Ember.typeOf(t)==="function"&&(t="function() { ... }"),n.push(r+": "+t)}return"{"+n.join(", ")+"}"},Ember.isEqual=function(e,t){return e&&"function"==typeof e.isEqual?e.isEqual(t):e===t},Ember.ORDER_DEFINITION=Ember.ENV.ORDER_DEFINITION||["undefined","null","boolean","number","string","array","object","instance","function","class","date"],Ember.keys=Object.keys,Ember.keys||(Ember.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t});var s=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var e=Error.prototype.constructor.apply(this,arguments);for(var t=0;t<s.length;t++)this[s[t]]=e[s[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){var e=/[ _]/g,t={},n=/([a-z])([A-Z])/g,r=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,s=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var n=0;return e.replace(/%@([0-9]+)?/g,function(e,r){return r=r?parseInt(r,0)-1:n++,e=t[r],(e===null?"(null)":e===undefined?"":e).toString()})},loc:function(e,t){return e=Ember.STRINGS[e]||e,Ember.String.fmt(e,t)},w:function(e){return e.split(/\s+/)},decamelize:function(e){return e.replace(n,"$1_$2").toLowerCase()},dasherize:function(n){var r=t,i=r[n];return i?i:(i=Ember.String.decamelize(n).replace(e,"-"),r[n]=i,i)},camelize:function(e){return e.replace(r,function(e,t,n){return n?n.toUpperCase():""}).replace(/^([A-Z])/,function(e,t,n){return e.toLowerCase()})},classify:function(e){var t=e.split("."),n=[];for(var r=0,i=t.length;r<i;r++){var s=Ember.String.camelize(t[r]);n.push(s.charAt(0).toUpperCase()+s.substr(1))}return n.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(s,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,n=Ember.String.loc,r=Ember.String.camelize,i=Ember.String.decamelize,s=Ember.String.dasherize,o=Ember.String.underscore,u=Ember.String.capitalize,a=Ember.String.classify;if(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)String.prototype.fmt=function(){return e(this,arguments)},String.prototype.w=function(){return t(this)},String.prototype.loc=function(){return n(this,arguments)},String.prototype.camelize=function(){return r(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return s(this)},String.prototype.underscore=function(){return o(this)},String.prototype.classify=function(){return a(this)},String.prototype.capitalize=function(){return u(this)}}(),function(){var e=Array.prototype.slice;if(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Function)Function.prototype.property=function(){var e=Ember.computed(this);return e.property.apply(e,arguments)},Function.prototype.observes=function(){return this.__ember_observes__=e.call(arguments),this},Function.prototype.observesBefore=function(){return this.__ember_observesBefore__=e.call(arguments),this}}(),function(){}(),function(){function s(){return i.length===0?{}:i.pop()}function o(e){return i.push(e),null}function u(t,n){function i(i){var s=e(i,t);return r?n===s:!!s}var r=arguments.length===2;return i}var e=Ember.get,t=Ember.set,n=Array.prototype.slice,r=Ember.EnumerableUtils.indexOf,i=[];Ember.Enumerable=Ember.Mixin.create({isEnumerable:!0,nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(e(this,"length")===0)return undefined;var t=s(),n;return n=this.nextObject(0,null,t),o(t),n}).property("[]"),lastObject:Ember.computed(function(){var t=e(this,"length");if(t===0)return undefined;var n=s(),r=0,i,u=null;do u=i,i=this.nextObject(r++,u,n);while(i!==undefined);return o(n),u}).property("[]"),contains:function(e){return this.find(function(t){return t===e})!==undefined},forEach:function(t,n){if(typeof t!="function")throw new TypeError;var r=e(this,"length"),i=null,u=s();n===undefined&&(n=null);for(var a=0;a<r;a++){var f=this.nextObject(a,i,u);t.call(n,f,a,this),i=f}return i=null,u=o(u),this},getEach:function(e){return this.mapProperty(e)},setEach:function(e,n){return this.forEach(function(r){t(r,e,n)})},map:function(e,t){var n=[];return this.forEach(function(r,i,s){n[i]=e.call(t,r,i,s)}),n},mapProperty:function(t){return this.map(function(n){return e(n,t)})},filter:function(e,t){var n=[];return this.forEach(function(r,i,s){e.call(t,r,i,s)&&n.push(r)}),n},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterProperty:function(e,t){return this.filter(u.apply(this,arguments))},rejectProperty:function(t,n){var r=function(r){return e(r,t)===n},i=function(n){return!!e(n,t)},s=arguments.length===2?r:i;return this.reject(s)},find:function(t,n){var r=e(this,"length");n===undefined&&(n=null);var i=null,u,a=!1,f,l=s();for(var c=0;c<r&&!a;c++){u=this.nextObject(c,i,l);if(a=t.call(n,u,c,this))f=u;i=u}return u=i=null,l=o(l),f},findProperty:function(e,t){return this.find(u.apply(this,arguments))},every:function(e,t){return!this.find(function(n,r,i){return!e.call(t,n,r,i)})},everyProperty:function(e,t){return this.every(u.apply(this,arguments))},some:function(e,t){return!!this.find(function(n,r,i){return!!e.call(t,n,r,i)})},someProperty:function(e,t){return this.some(u.apply(this,arguments))},reduce:function(e,t,n){if(typeof e!="function")throw new TypeError;var r=t;return this.forEach(function(t,i){r=e.call(null,r,t,i,this,n)},this),r},invoke:function(e){var t,r=[];return arguments.length>1&&(t=n.call(arguments,1)),this.forEach(function(n,i){var s=n&&n[e];"function"==typeof s&&(r[i]=t?s.apply(n,t):s.call(n))},this),r},toArray:function(){var e=[];return this.forEach(function(t,n){e[n]=t}),e},compact:function(){return this.without(null)},without:function(e){if(!this.contains(e))return this;var t=[];return this.forEach(function(n){n!==e&&(t[t.length]=n)}),t},uniq:function(){var e=[];return this.forEach(function(t){r(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(e,t){return this}),addEnumerableObserver:function(t,n){var r=n&&n.willChange||"enumerableWillChange",i=n&&n.didChange||"enumerableDidChange",s=e(this,"hasEnumerableObservers");return s||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",t,r),Ember.addListener(this,"@enumerable:change",t,i),s||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(t,n){var r=n&&n.willChange||"enumerableWillChange",i=n&&n.didChange||"enumerableDidChange",s=e(this,"hasEnumerableObservers");return s&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",t,r),Ember.removeListener(this,"@enumerable:change",t,i),s&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(t,n){var r,i,s;return"number"==typeof t?r=t:t?r=e(t,"length"):r=t=-1,"number"==typeof n?i=n:n?i=e(n,"length"):i=n=-1,s=i<0||r<0||i-r!==0,t===-1&&(t=null),n===-1&&(n=null),Ember.propertyWillChange(this,"[]"),s&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,t,n]),this},enumerableContentDidChange:function(t,n){var r=this.propertyDidChange,i,s,o;return"number"==typeof t?i=t:t?i=e(t,"length"):i=t=-1,"number"==typeof n?s=n:n?s=e(n,"length"):s=n=-1,o=s<0||i<0||s-i!==0,t===-1&&(t=null),n===-1&&(n=null),Ember.sendEvent(this,"@enumerable:change",[this,t,n]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),function(){function s(e){return e===null||e===undefined}var e=Ember.get,t=Ember.set,n=Ember.meta,r=Ember.EnumerableUtils.map,i=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{isSCArray:!0,length:Ember.required(),objectAt:function(t){return t<0||t>=e(this,"length")?undefined:e(this,t)},objectsAt:function(e){var t=this;return r(e,function(e){return t.objectAt(e)})},nextObject:function(e){return this.objectAt(e)},"[]":Ember.computed(function(t,n){return n!==undefined&&this.replace(0,e(this,"length"),n),this}),firstObject:Ember.computed(function(){return this.objectAt(0)}),lastObject:Ember.computed(function(){return this.objectAt(e(this,"length")-1)}),contains:function(e){return this.indexOf(e)>=0},slice:function(t,n){var r=[],i=e(this,"length");s(t)&&(t=0);if(s(n)||n>i)n=i;while(t<n)r[r.length]=this.objectAt(t++);return r},indexOf:function(t,n){var r,i=e(this,"length");n===undefined&&(n=0),n<0&&(n+=i);for(r=n;r<i;r++)if(this.objectAt(r,!0)===t)return r;return-1},lastIndexOf:function(t,n){var r,i=e(this,"length");if(n===undefined||n>=i)n=i-1;n<0&&(n+=i);for(r=n;r>=0;r--)if(this.objectAt(r)===t)return r;return-1},addArrayObserver:function(t,n){var r=n&&n.willChange||"arrayWillChange",i=n&&n.didChange||"arrayDidChange",s=e(this,"hasArrayObservers");return s||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,r),Ember.addListener(this,"@array:change",t,i),s||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,n){var r=n&&n.willChange||"arrayWillChange",i=n&&n.didChange||"arrayDidChange",s=e(this,"hasArrayObservers");return s&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,r),Ember.removeListener(this,"@array:change",t,i),s&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,n,r){t===undefined?(t=0,n=r=-1):(n===undefined&&(n=-1),r===undefined&&(r=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,n,r]);var i,s;if(t>=0&&n>=0&&e(this,"hasEnumerableObservers")){i=[],s=t+n;for(var o=t;o<s;o++)i.push(this.objectAt(o))}else i=n;return this.enumerableContentWillChange(i,r),this},arrayContentDidChange:function(t,n,r){t===undefined?(t=0,n=r=-1):(n===undefined&&(n=-1),r===undefined&&(r=-1));var s,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){s=[],o=t+r;for(var u=t;u<o;u++)s.push(this.objectAt(u))}else s=r;this.enumerableContentDidChange(n,s),Ember.sendEvent(this,"@array:change",[this,t,n,r]);var a=e(this,"length"),f=i(this,"firstObject"),l=i(this,"lastObject");return this.objectAt(0)!==f&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(a-1)!==l&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){Ember.Comparable=Ember.Mixin.create({isComparable:!0,compare:Ember.required(Function)})}(),function(){var e=Ember.get,t=Ember.set;Ember.Copyable=Ember.Mixin.create({copy:Ember.required(Function),frozenCopy:function(){if(Ember.Freezable&&Ember.Freezable.detect(this))return e(this,"isFrozen")?this:this.copy().freeze();throw new Error(Ember.String.fmt("%@ does not support freezing",[this]))}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Freezable=Ember.Mixin.create({isFrozen:!1,freeze:function(){return e(this,"isFrozen")?this:(t(this,"isFrozen",!0),this)}}),Ember.FROZEN_ERROR="Frozen object cannot be modified."}(),function(){var e=Ember.EnumerableUtils.forEach;Ember.MutableEnumerable=Ember.Mixin.create(Ember.Enumerable,{addObject:Ember.required(Function),addObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.addObject(e)},this),Ember.endPropertyChanges(this),this},removeObject:Ember.required(Function),removeObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.removeObject(e)},this),Ember.endPropertyChanges(this),this}})}(),function(){var e="Index out of range",t=[],n=Ember.get,r=Ember.set,i=Ember.EnumerableUtils.forEach;Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var e=n(this,"length");return e===0?this:(this.replace(0,e,t),this)},insertAt:function(t,r){if(t>n(this,"length"))throw new Error(e);return this.replace(t,0,[r]),this},removeAt:function(r,i){if("number"==typeof r){if(r<0||r>=n(this,"length"))throw new Error(e);i===undefined&&(i=1),this.replace(r,i,t)}return this},pushObject:function(e){return this.insertAt(n(this,"length"),e),e},pushObjects:function(e){return this.replace(n(this,"length"),0,e),this},popObject:function(){var e=n(this,"length");if(e===0)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(n(this,"length")===0)return null;var e=this.objectAt(0);return this.removeAt(0),e},unshiftObject:function(e){return this.insertAt(0,e),e},unshiftObjects:function(e){return this.replace(0,0,e),this},reverseObjects:function(){var e=n(this,"length");if(e===0)return this;var t=this.toArray().reverse();return this.replace(0,e,t),this},setObjects:function(e){if(e.length===0)return this.clear();var t=n(this,"length");return this.replace(0,t,e),this},removeObject:function(e){var t=n(this,"length")||0;while(--t>=0){var r=this.objectAt(t);r===e&&this.removeAt(t)}return this},addObject:function(e){return this.contains(e)||this.pushObject(e),this}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.defineProperty;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){var t={},n=arguments;arguments.length===1&&Ember.typeOf(arguments[0])==="array"&&(n=arguments[0]);for(var r=0;r<n.length;r++)t[n[r]]=e(this,n[r]);return t},set:function(e,n){return t(this,e,n),this},setProperties:function(e){return Ember.setProperties(this,e)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this},endPropertyChanges:function(){return Ember.endPropertyChanges(),this},propertyWillChange:function(e){return Ember.propertyWillChange(this,e),this},propertyDidChange:function(e){return Ember.propertyDidChange(this,e),this},notifyPropertyChange:function(e){return this.propertyWillChange(e),this.propertyDidChange(e),this},addBeforeObserver:function(e,t,n){Ember.addBeforeObserver(this,e,t,n)},addObserver:function(e,t,n){Ember.addObserver(this,e,t,n)},removeObserver:function(e,t,n){Ember.removeObserver(this,e,t,n)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getPath:function(e){return this.get(e)},setPath:function(e,t){return this.set(e,t)},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(n,r){return r||(r=1),t(this,n,(e(this,n)||0)+r),e(this,n)},decrementProperty:function(n,r){return r||(r=1),t(this,n,(e(this,n)||0)-r),e(this,n)},toggleProperty:function(n){return t(this,n,!e(this,n)),e(this,n)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,targetObject:Ember.computed(function(){var t=e(this,"target");if(Ember.typeOf(t)==="string"){var n=e(this,t);return n===undefined&&(n=e(Ember.lookup,t)),n}return t}).property("target"),triggerAction:function(){var t=e(this,"action"),n=e(this,"targetObject");if(n&&t){var r;return typeof n.send=="function"?r=n.send(t,this):(typeof t=="string"&&(t=n[t]),r=t.call(n,this)),r!==!1&&(r=!0),r}return!1}})}(),function(){Ember.Evented=Ember.Mixin.create({on:function(e,t,n){Ember.addListener(this,e,t,n)},one:function(e,t,n){n||(n=t,t=null),Ember.addListener(this,e,t,n,!0)},trigger:function(e){var t=[],n,r;for(n=1,r=arguments.length;n<r;n++)t.push(arguments[n]);Ember.sendEvent(this,e,t)},fire:function(e){this.trigger.apply(this,arguments)},off:function(e,t,n){Ember.removeListener(this,e,t,n)},has:function(e){return Ember.hasListeners(this,e)}})}(),function(){var e=t("rsvp");e.async=function(e,t){Ember.run.schedule("actions",t,e)};var n=Ember.get,r=Array.prototype.slice;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t){var r=n(this,"promise");return r.then.apply(r,arguments)},resolve:function(e){n(this,"promise").resolve(e)},reject:function(e){n(this,"promise").reject(e)},promise:Ember.computed(function(){return new e.Promise})})}(),function(){}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){function w(){var e=!1,t,i,o=function(){e||o.proto(),r(this,s,b),r(this,"_super",b);var u=a(this);u.proto=this;if(t){var f=t;t=null,this.reopen.apply(this,f)}if(i){var c=i;i=null;var h=this.concatenatedProperties;for(var p=0,d=c.length;p<d;p++){var m=c[p];for(var w in m){if(!m.hasOwnProperty(w))continue;var E=m[w],S=Ember.IS_BINDING;if(S.test(w)){var x=u.bindings
17
- ;x?u.hasOwnProperty("bindings")||(x=u.bindings=n(u.bindings)):x=u.bindings={},x[w]=E}var T=u.descs[w];if(h&&y(h,w)>=0){var N=this[w];N?"function"==typeof N.concat?E=N.concat(E):E=Ember.makeArray(N).concat(E):E=Ember.makeArray(E)}T?T.set(this,w,E):typeof this.setUnknownProperty!="function"||w in this?g?Ember.defineProperty(this,w,null,E):this[w]=E:this.setUnknownProperty(w,E)}}}v(this,u),delete u.proto,l(this),this.init.apply(this,arguments)};return o.toString=p.prototype.toString,o.willReopen=function(){e&&(o.PrototypeMixin=p.create(o.PrototypeMixin)),e=!1},o._initMixins=function(e){t=e},o._initProperties=function(e){i=e},o.proto=function(){var t=o.superclass;return t&&t.proto(),e||(e=!0,o.PrototypeMixin.applyPartial(o.prototype),f(o.prototype)),this.prototype},o}function S(e){return function(){return e}}var e=Ember.set,t=Ember.get,n=Ember.create,r=Ember.platform.defineProperty,i=Array.prototype.slice,s=Ember.GUID_KEY,o=Ember.guidFor,u=Ember.generateGuid,a=Ember.meta,f=Ember.rewatch,l=Ember.finishChains,c=Ember.destroy,h=Ember.run.schedule,p=Ember.Mixin,d=p._apply,v=p.finishPartial,m=p.prototype.reopen,g=Ember.ENV.MANDATORY_SETTER,y=Ember.EnumerableUtils.indexOf,b={configurable:!0,writable:!0,enumerable:!1,value:undefined},E=w();E.toString=function(){return"Ember.CoreObject"},E.PrototypeMixin=p.create({reopen:function(){return d(this,arguments,!0),this},isInstance:!0,init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){if(this._didCallDestroy)return;return this.isDestroying=!0,this._didCallDestroy=!0,this.willDestroy&&this.willDestroy(),h("destroy",this,this._scheduledDestroy),this},_scheduledDestroy:function(){c(this),e(this,"isDestroyed",!0),this.didDestroy&&this.didDestroy()},bind:function(e,t){return t instanceof Ember.Binding||(t=Ember.Binding.from(t)),t.to(e).connect(this),t},toString:function T(){var e=typeof this.toStringExtension=="function",t=e?":"+this.toStringExtension():"",n="<"+this.constructor.toString()+":"+o(this)+t+">";return this.toString=S(n),n}}),E.PrototypeMixin.ownerConstructor=E,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(E.PrototypeMixin),E.__super__=null;var x=p.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var e=w(),t;return e.ClassMixin=p.create(this.ClassMixin),e.PrototypeMixin=p.create(this.PrototypeMixin),e.ClassMixin.ownerConstructor=e,e.PrototypeMixin.ownerConstructor=e,m.apply(e.PrototypeMixin,arguments),e.superclass=this,e.__super__=this.prototype,t=e.prototype=n(this.prototype),t.constructor=e,u(t,"ember"),a(t).proto=t,e.ClassMixin.apply(e),e},createWithMixins:function(){var e=this;return arguments.length>0&&this._initMixins(arguments),new e},create:function(){var e=this;return arguments.length>0&&this._initProperties(arguments),new e},reopen:function(){return this.willReopen(),m.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return m.apply(this.ClassMixin,arguments),d(this,arguments,!1),this},detect:function(e){if("function"!=typeof e)return!1;while(e){if(e===this)return!0;e=e.superclass}return!1},detectInstance:function(e){return e instanceof this},metaForProperty:function(e){var t=a(this.proto(),!1).descs[e];return t._meta||{}},eachComputedProperty:function(e,t){var n=this.proto(),r=a(n).descs,i={},s;for(var o in r)s=r[o],s instanceof Ember.ComputedProperty&&e.call(t||this,o,s._meta||i)}});x.ownerConstructor=E,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(x),E.ClassMixin=x,x.apply(E),Ember.CoreObject=E}(),function(){var e=Ember.get,t=Ember.set,n=Ember.guidFor,r=Ember.isNone;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Error(Ember.FROZEN_ERROR);var r=e(this,"length");if(r===0)return this;var i;this.enumerableContentWillChange(r,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var s=0;s<r;s++)i=n(this[s]),delete this[i],delete this[s];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(r,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var n=e(this,"length");if(e(t,"length")!==n)return!1;while(--n>=0)if(!t.contains(this[n]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);var t=this.length>0?this[this.length-1]:null;return this.remove(t),t},push:Ember.aliasMethod("addObject"),shift:Ember.aliasMethod("pop"),unshift:Ember.aliasMethod("push"),addEach:Ember.aliasMethod("addObjects"),removeEach:Ember.aliasMethod("removeObjects"),init:function(e){this._super(),e&&this.addObjects(e)},nextObject:function(e){return this[e]},firstObject:Ember.computed(function(){return this.length>0?this[0]:undefined}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:undefined}),addObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(r(i))return this;var s=n(i),o=this[s],u=e(this,"length"),a;return o>=0&&o<u&&this[o]===i?this:(a=[i],this.enumerableContentWillChange(null,a),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[s]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,a),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(r(i))return this;var s=n(i),o=this[s],u=e(this,"length"),a=o===0,f=o===u-1,l,c;return o>=0&&o<u&&this[o]===i&&(c=[i],this.enumerableContentWillChange(c,null),a&&Ember.propertyWillChange(this,"firstObject"),f&&Ember.propertyWillChange(this,"lastObject"),o<u-1&&(l=this[u-1],this[o]=l,this[n(l)]=o),delete this[s],delete this[u-1],t(this,"length",u-1),a&&Ember.propertyDidChange(this,"firstObject"),f&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(c,null)),this},contains:function(e){return this[n(e)]>=0},copy:function(){var r=this.constructor,i=new r,s=e(this,"length");t(i,"length",s);while(--s>=0)i[s]=this[s],i[n(this[s])]=s;return i},toString:function(){var e=this.length,t,n=[];for(t=0;t<e;t++)n[t]=this[t];return"Ember.Set<%@>".fmt(n.join(","))}})}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function o(e,t,n){var u=e.length;r[e.join(".")]=t;for(var f in t){if(!i.call(t,f))continue;var c=t[f];e[u]=f;if(c&&c.toString===l)c.toString=h(e.join(".")),c[a]=e.join(".");else if(c&&c.isNamespace){if(n[s(c)])continue;n[s(c)]=!0,o(e,c,n)}}e.length=u}function u(){var e=Ember.Namespace,t=Ember.lookup,n,r;if(e.PROCESSED)return;for(var i in t){if(i==="parent"||i==="top"||i==="frameElement")continue;if(i==="globalStorage"&&t.StorageList&&t.globalStorage instanceof t.StorageList)continue;if(t.hasOwnProperty&&!t.hasOwnProperty(i))continue;try{n=Ember.lookup[i],r=n&&n.isNamespace}catch(s){continue}r&&(n[a]=i)}}function f(e){var t=e.superclass;if(t)return t[a]?t[a]:f(t);return}function l(){!Ember.BOOTED&&!this[a]&&c();var e;if(this[a])e=this[a];else{var t=f(this);t?e="(subclass of "+t+")":e="(unknown mixin)",this.toString=h(e)}return e}function c(){var e=!n.PROCESSED,t=Ember.anyUnprocessedMixins;e&&(u(),n.PROCESSED=!0);if(e||t){var r=n.NAMESPACES,i;for(var s=0,a=r.length;s<a;s++)i=r[s],o([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function h(e){return function(){return e}}var e=Ember.get,t=Ember.ArrayPolyfills.indexOf,n=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var t=e(this,"name");return t?t:(u(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){o([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=undefined,e.splice(t.call(e,this),1),this._super()}});n.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:c,byName:function(e){return Ember.BOOTED||c(),r[e]}});var r=n.NAMESPACES_BY_ID,i={}.hasOwnProperty,s=Ember.guidFor,a=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=l}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){var e=Ember.get,t=Ember.set;Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(t){return e(this,"arrangedContent").objectAt(t)},replaceContent:function(t,n,r){e(this,"content").replace(t,n,r)},_contentWillChange:Ember.beforeObserver(function(){this._teardownContent()},"content"),_teardownContent:function(){var t=e(this,"content");t&&t.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){var t=e(this,"content");this._setupContent()},"content"),_setupContent:function(){var t=e(this,"content");t&&t.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(function(){var t=e(this,"arrangedContent"),n=t?e(t,"length"):0;this.arrangedContentArrayWillChange(this,0,n,undefined),this.arrangedContentWillChange(this),this._teardownArrangedContent(t)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var t=e(this,"arrangedContent"),n=t?e(t,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,undefined,n)},"arrangedContent"),_setupArrangedContent:function(){var t=e(this,"arrangedContent");t&&t.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var t=e(this,"arrangedContent");t&&t.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(t){return e(this,"content")&&this.objectAtContent(t)},length:Ember.computed(function(){var t=e(this,"arrangedContent");return t?e(t,"length"):0}),replace:function(t,n,r){return e(this,"content")&&this.replaceContent(t,n,r),this},arrangedContentArrayWillChange:function(e,t,n,r){this.arrayContentWillChange(t,n,r)},arrangedContentArrayDidChange:function(e,t,n,r){this.arrayContentDidChange(t,n,r)},init:function(){this._super(),this._setupContent(),this._setupArrangedContent()},willDestroy:function(){this._teardownArrangedContent(),this._teardownContent()}})}(),function(){function f(e,t){var n=t.slice(8);if(n in this)return;u(this,n)}function l(e,t){var n=t.slice(8);if(n in this)return;a(this,n)}var e=Ember.get,t=Ember.set,n=Ember.String.fmt,r=Ember.addBeforeObserver,i=Ember.addObserver,s=Ember.removeBeforeObserver,o=Ember.removeObserver,u=Ember.propertyWillChange,a=Ember.propertyDidChange;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(e){var t="content."+e;r(this,t,null,f),i(this,t,null,l)},didUnwatchProperty:function(e){var t="content."+e;s(this,t,null,f),o(this,t,null,l)},unknownProperty:function(t){var n=e(this,"content");if(n)return e(n,t)},setUnknownProperty:function(n,r){var i=e(this,"content");return t(i,n,r)}})}(),function(){function o(e,t,r,i,s){var o=r._objects,u;o||(o=r._objects={});while(--s>=i){var a=e.objectAt(s);a&&(Ember.addBeforeObserver(a,t,r,"contentKeyWillChange"),Ember.addObserver(a,t,r,"contentKeyDidChange"),u=n(a),o[u]||(o[u]=[]),o[u].push(s))}}function u(e,t,r,i,s){var o=r._objects;o||(o=r._objects={});var u,a;while(--s>=i){var f=e.objectAt(s);f&&(Ember.removeBeforeObserver(f,t,r,"contentKeyWillChange"),Ember.removeObserver(f,t,r,"contentKeyDidChange"),a=n(f),u=o[a],u[u.indexOf(s)]=null)}}var e=Ember.set,t=Ember.get,n=Ember.guidFor,r=Ember.EnumerableUtils.forEach,i=Ember.Object.extend(Ember.Array,{init:function(e,t,n){this._super(),this._keyName=t,this._owner=n,this._content=e},objectAt:function(e){var n=this._content.objectAt(e);return n&&t(n,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?t(e,"length"):0})}),s=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),r(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e,t){var n;return n=new i(this._content,e,this),Ember.defineProperty(this,e,null,n),this.beginObservingContentKey(e),n},arrayWillChange:function(e,t,n,r){var i=this._keys,s,o,a;a=n>0?t+n:-1,Ember.beginPropertyChanges(this);for(s in i){if(!i.hasOwnProperty(s))continue;a>0&&u(e,s,this,t,a),Ember.propertyWillChange(this,s)}Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(e,t,n,r){var i=this._keys,s,u,a;a=r>0?t+r:-1,Ember.beginPropertyChanges(this);for(s in i){if(!i.hasOwnProperty(s))continue;a>0&&o(e,s,this,t,a),Ember.propertyDidChange(this,s)}Ember.propertyDidChange(this._content,"@each"),Ember.endPropertyChanges(this)},didAddListener:function(e){s.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){s.test(e)&&this.stopObservingContentKey(e.slice(0,-7))},beginObservingContentKey:function(e){var n=this._keys;n||(n=this._keys={});if(!n[e]){n[e]=1;var r=this._content,i=t(r,"length");o(r,e,this,0,i)}else n[e]++},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var r=this._content,i=t(r,"length");u(r,e,this,0,i)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return e==="length"?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(t,n,r){if(this.isFrozen)throw Ember.FROZEN_ERROR;var i=r?e(r,"length"):0;this.arrayContentWillChange(t,n,i);if(!r||r.length===0)this.splice(t,n);else{var s=[t,n].concat(r);this.splice.apply(this,s)}return this.arrayContentDidChange(t,n,i),this},unknownProperty:function(e,t){var n;return t!==undefined&&n===undefined&&(n=this[e]=t),n},indexOf:function(e,t){var n,r=this.length;t===undefined?t=0:t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=r);for(n=t;n<r;n++)if(this[n]===e)return n;return-1},lastIndexOf:function(e,t){var n,r=this.length;t===undefined?t=r-1:t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=r);for(n=t;n>=0;n--)if(this[n]===e)return n;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),r=["length"];Ember.EnumerableUtils.forEach(n.keys(),function(e){Array.prototype[e]&&r.push(e)}),r.length>0&&(n=n.without.apply(n,r)),Ember.NativeArray=n,Ember.A=function(e){return e===undefined&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){n.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.DeferredMixin,t=Ember.Object,n=Ember.get,r=Ember.Object.extend(e);r.reopenClass({promise:function(e,t){var i=r.create();return e.call(t,i),n(i,"promise")}}),Ember.Deferred=r}(),function(){var e=Ember.ENV.EMBER_LOAD_HOOKS||{},t={};Ember.onLoad=function(n,r){var i;e[n]=e[n]||Ember.A(),e[n].pushObject(r),(i=t[n])&&r(i)},Ember.runLoadHooks=function(n,r){var i;t[n]=r,(i=e[n])&&e[n].forEach(function(e){e(r)})}}(),function(){}(),function(){var e=Ember.get;Ember.ControllerMixin=Ember.Mixin.create({isController:!0,target:null,container:null,store:null,model:Ember.computed.alias("content"),send:function(t){var n=[].slice.call(arguments,1),r;this[t]?this[t].apply(this,n):(r=e(this,"target"))&&r.send.apply(r,arguments)}}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var e=Ember.get,t=Ember.set,n=Ember.EnumerableUtils.forEach;Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,orderBy:function(t,r){var i=0,s=e(this,"sortProperties"),o=e(this,"sortAscending");return n(s,function(n){i===0&&(i=Ember.compare(e(t,n),e(r,n)),i!==0&&!o&&(i=-1*i))}),i},destroy:function(){var t=e(this,"content"),r=e(this,"sortProperties");return t&&r&&n(t,function(e){n(r,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(t,r){var i=e(this,"content"),s=e(this,"isSorted"),o=e(this,"sortProperties"),u=this;return i&&s?(i=i.slice(),i.sort(function(e,t){return u.orderBy(e,t)}),n(i,function(e){n(o,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(i)):i}),_contentWillChange:Ember.beforeObserver(function(){var t=e(this,"content"),r=e(this,"sortProperties");t&&r&&n(t,function(e){n(r,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},"content"),sortAscendingWillChange:Ember.beforeObserver(function(){this._lastSortAscending=e(this,"sortAscending")},"sortAscending"),sortAscendingDidChange:Ember.observer(function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}},"sortAscending"),contentArrayWillChange:function(t,r,i,s){var o=e(this,"isSorted");if(o){var u=e(this,"arrangedContent"),a=t.slice(r,r+i),f=e(this,"sortProperties");n(a,function(e){u.removeObject(e),n(f,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(t,r,i,s)},contentArrayDidChange:function(t,r,i,s){var o=e(this,"isSorted"),u=e(this,"sortProperties");if(o){var a=t.slice(r,r+s),f=e(this,"arrangedContent");n(a,function(e){this.insertItemSorted(e),n(u,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(t,r,i,s)},insertItemSorted:function(t){var n=e(this,"arrangedContent"),r=e(n,"length"),i=this._binarySearch(t,0,r);n.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var n=e(this,"arrangedContent"),r=n.indexOf(t),i=n.objectAt(r-1),s=n.objectAt(r+1),o=i&&this.orderBy(t,i),u=s&&this.orderBy(t,s);if(o<0||u>0)n.removeObject(t),this.insertItemSorted(t)},_binarySearch:function(t,n,r){var i,s,o,u;return n===r?n:(u=e(this,"arrangedContent"),i=n+Math.floor((r-n)/2),s=u.objectAt(i),o=this.orderBy(s,t),o<0?this._binarySearch(t,i+1,r):o>0?this._binarySearch(t,n,i):i)}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.isGlobalPath,r=Ember.EnumerableUtils.forEach,i=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(t){return e(this,"itemController")},objectAtContent:function(t){var n=e(this,"length"),r=e(this,"arrangedContent").objectAt(t);if(t>=0&&t<n){var i=this.lookupItemController(r);if(i)return this.controllerAt(t,r,i)}return r},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(t,n,s){var o=e(this,"_subControllers"),u=o.slice(t,t+n);r(u,function(e){e&&e.destroy()}),i(o,t,n,new Array(s)),this._super(t,n,s)},init:function(){this._super(),this.get("content")||Ember.defineProperty(this,"content",undefined,Ember.A()),this.set("_subControllers",Ember.A())},controllerAt:function(t,n,r){var i=e(this,"container"),s=e(this,"_subControllers"),o=s[t];o||(o=i.lookup("controller:"+r,{singleton:!1}),s[t]=o);if(!o)throw new Error('Could not resolve itemController: "'+r+'"');return o.set("target",this),o.set("content",n),o},_subControllers:null,_resetSubControllers:function(){var t=e(this,"_subControllers");r(t,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){}(),function(){}(),function(){var e=Ember.imports.jQuery;Ember.$=e}(),function(){var e=Ember.String.w("dragstart drag dragenter dragleave dragover drop dragend");Ember.EnumerableUtils.forEach(e,function(e){Ember.$.event.fixHooks[e]={props:["dataTransfer"]}})}(),function(){function u(e){var t=e.shiftKey||e.metaKey||e.altKey||e.ctrlKey,n=e.which>1;return!t&&!n}var e=function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",e.firstChild.innerHTML===""}(),t=function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value",e.childNodes[0].nodeValue==="Test:"&&e.childNodes[2].nodeValue===" Value"}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r=e.childNodes.length,i,s,o;for(i=0;i<r;i++){s=e.childNodes[i],o=s.nodeType===1&&n(s,t);if(o)return o}},r=function(r,i){e&&(i="&shy;"+i);var s=[];t&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,n,r){return s.push([r,t]),n})),r.innerHTML=i;if(s.length>0){var o=s.length,u;for(u=0;u<o;u++){var a=n(r,s[u][0]),f=document.createTextNode(s[u][1]);a.parentNode.insertBefore(f,a)}}if(e){var l=r.firstChild;while(l.nodeType===1&&!l.nodeName)l=l.firstChild;l.nodeType===3&&l.nodeValue.charAt(0)==="­"&&(l.nodeValue=l.nodeValue.slice(1))}},i={},s=function(e){if(i[e]!==undefined)return i[e];var t=!0;if(e.toLowerCase()==="select"){var n=document.createElement("select");r(n,'<option value="test">Test</option>'),t=n.options.length===1}return i[e]=t,t},o=function(e,t){var n=e.tagName;if(s(n))r(e,t);else{var i=e.outerHTML.match(new RegExp("<"+n+"([^>]*)>","i"))[0],o="</"+n+">",u=document.createElement("div");r(u,i+t+o),e=u.firstChild;while(e.tagName!==n)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:o,isSimpleClick:u}}(),function(){var e=Ember.get,t=Ember.set,n=Ember.ArrayPolyfills.indexOf,r=function(){this.seen={},this.list=[]};r.prototype={add:function(e){if(e in this.seen)return;this.seen[e]=!0,this.list.push(e)},toDOM:function(){return this.list.join(" ")}},Ember.RenderBuffer=function(e){return new Ember._RenderBuffer(e)},Ember._RenderBuffer=function(e){this.tagNames=[e||null],this.buffer=[]},Ember._RenderBuffer.prototype={_element:null,elementClasses:null,classes:null,elementId:null,elementAttributes:null,elementProperties:null,elementTag:null,elementStyle:null,parentBuffer:null,push:function(e){return this.buffer.push(e),this},addClass:function(e){var t=this.elementClasses=this.elementClasses||new r;return this.elementClasses.add(e),this.classes=this.elementClasses.list,this},setClasses:function(e){this.classes=e},id:function(e){return this.elementId=e,this},attr:function(e,t){var n=this.elementAttributes=this.elementAttributes||{};return arguments.length===1?n[e]:(n[e]=t,this)},removeAttr:function(e){var t=this.elementAttributes;return t&&delete t[e],this},prop:function(e,t){var n=this.elementProperties=this.elementProperties||{};return arguments.length===1?n[e]:(n[e]=t,this)},removeProp:function(e){var t=this.elementProperties;return t&&delete t[e],this},style:function(e,t){var n=this.elementStyle=this.elementStyle||{};return this.elementStyle[e]=t,this},begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var e=this.currentTagName();if(!e)return;if(!this._element&&this.buffer.length===0){this._element=this.generateElement();return}var t=this.buffer,n=this.elementId,r=this.classes,i=this.elementAttributes,s=this.elementProperties,o=this.elementStyle,u,a;t.push("<"+e),n&&(t.push(' id="'+this._escapeAttribute(n)+'"'),this.elementId=null),r&&(t.push(' class="'+this._escapeAttribute(r.join(" "))+'"'),this.classes=null);if(o){t.push(' style="');for(a in o)o.hasOwnProperty(a)&&t.push(a+":"+this._escapeAttribute(o[a])+";");t.push('"'),this.elementStyle=null}if(i){for(u in i)i.hasOwnProperty(u)&&t.push(" "+u+'="'+this._escapeAttribute(i[u])+'"');this.elementAttributes=null}if(s){for(a in s)if(s.hasOwnProperty(a)){var f=s[a];if(f||typeof f=="number")f===!0?t.push(" "+a+'="'+a+'"'):t.push(" "+a+'="'+this._escapeAttribute(s[a])+'"')}this.elementProperties=null}t.push(">")},pushClosingTag:function(){var e=this.tagNames.pop();e&&this.buffer.push("</"+e+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var e=this.tagNames.pop(),t=document.createElement(e),n=Ember.$(t),r=this.elementId,i=this.classes,s=this.elementAttributes,o=this.elementProperties,u=this.elementStyle,a="",f,l;r&&(n.attr("id",r),this.elementId=null),i&&(n.attr("class",i.join(" ")),this.classes=null);if(u){for(l in u)u.hasOwnProperty(l)&&(a+=l+":"+u[l]+";");n.attr("style",a),this.elementStyle=null}if(s){for(f in s)s.hasOwnProperty(f)&&n.attr(f,s[f]);this.elementAttributes=null}if(o){for(l in o)o.hasOwnProperty(l)&&n.prop(l,o[l]);this.elementProperties=null}return t},element:function(){var e=this.innerString();return e&&(this._element=Ember.ViewUtils.setInnerHTML(this._element,e)),this._element},string:function(){return this._element?this.element().outerHTML:this.innerString()},innerString:function(){return this.buffer.join("")},_escapeAttribute:function(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},n=/&(?!\w+;)|[<>"'`]/g,r=/[&<>"'`]/,i=function(e){return t[e]||"&amp;"},s=e.toString();return r.test(s)?s.replace(n,i):s}}}(),function(){var e=Ember.get,t=Ember.set,n=Ember.String.fmt;Ember.EventDispatcher=Ember.Object.extend({rootElement:"body",setup:function(t){var n,r={touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",contextmenu:"contextMenu",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",submit:"submit",input:"input",change:"change",dragstart:"dragStart",drag:"drag",dragenter:"dragEnter",dragleave:"dragLeave",dragover:"dragOver",drop:"drop",dragend:"dragEnd"};Ember.$.extend(r,t||{});var i=Ember.$(e(this,"rootElement"));i.addClass("ember-application");for(n in r)r.hasOwnProperty(n)&&this.setupHandler(i,n,r[n])},setupHandler:function(e,t,n){var r=this;e.delegate(".ember-view",t+".ember",function(e,t){return Ember.handleErrors(function(){var i=Ember.View.views[this.id],s=!0,o=null;return o=r._findNearestEventManager(i,n),o&&o!==t?s=r._dispatchEvent(o,e,n,i):i?s=r._bubbleEvent(i,e,n):e.stopPropagation(),s},this)}),e.delegate("[data-ember-action]",t+".ember",function(e){return Ember.handleErrors(function(){var t=Ember.$(e.currentTarget).attr("data-ember-action"),r=Ember.Handlebars.ActionHelper.registeredActions[t];if(r&&r.eventName===n)return r.handler(e)},this)})},_findNearestEventManager:function(t,n){var r=null;while(t){r=e(t,"eventManager");if(r&&r[n])break;t=e(t,"parentView")}return r},_dispatchEvent:function(e,t,n,r){var i=!0,s=e[n];return Ember.typeOf(s)==="function"?(i=s.call(e,t,r),t.stopPropagation()):i=this._bubbleEvent(r,t,n),i},_bubbleEvent:function(e,t,n){return Ember.run(function(){return e.handleEvent(n,t)})},destroy:function(){var t=e(this,"rootElement");return Ember.$(t).undelegate(".ember").removeClass("ember-application"),this._super()}})}(),function(){var e=Ember.run.queues;e.splice(Ember.$.inArray("actions",e)+1,0,"render","afterRender")}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({target:null,namespace:null,view:null,container:null,_childContainers:null,init:function(){this._super(),t(this,"_childContainers",{})},_modelDidChange:Ember.observer(function(){var n=e(this,"_childContainers"),r;for(var i in n){if(!n.hasOwnProperty(i))continue;n[i].destroy()}t(this,"_childContainers",{})},"model")})}(),function(){}(),function(){var e={},t=Ember.get,n=Ember.set,r=Ember.addObserver,i=Ember.removeObserver,s=Ember.meta,o=Ember.guidFor,u=Ember.String.fmt,a=[].slice,f=Ember.EnumerableUtils.forEach,l=Ember.EnumerableUtils.addObject,c=Ember.computed(function(){var e=this._childViews,n=Ember.A(),r=this;return f(e,function(e){e.isVirtual?n.pushObjects(t(e,"childViews")):n.push(e)}),n.replace=function(e,t,n){if(r instanceof Ember.ContainerView)return r.replace(e,t,n);throw new Error("childViews is immutable")},n});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,{isView:!0,states:e,init:function(){this._super(),this.isVirtual||(Ember.View.views[this.elementId]=this),this.addBeforeObserver("elementId",function(){throw new Error("Changing a view's elementId after creation is not allowed")}),this.transitionTo("preRender")},parentView:Ember.computed(function(){var e=this._parentView;return e&&e.isVirtual?t(e,"parentView"):e}).property("_parentView"),state:null,_parentView:null,concreteView:Ember.computed(function(){return this.isVirtual?t(this,"parentView"):this}).property("parentView").volatile(),instrumentName:"core_view",instrumentDetails:function(e){e.object=this.toString()},renderToBuffer:function(e,t){var n="render."+this.instrumentName,r={};return this.instrumentDetails(r),Ember.instrument(n,r,function(){return this._renderToBuffer(e,t)},this)},_renderToBuffer:function(e,t){Ember.run.sync();var n=this.tagName;if(n===null||n===undefined)n="div";var r=this.buffer=e&&e.begin(n)||Ember.RenderBuffer(n);return this.transitionTo("inBuffer",!1),this.beforeRender(r),this.render(r),this.afterRender(r),r},trigger:function(e){this._super.apply(this,arguments);var t=this[e];if(t){var n=[],r,i;for(r=1,i=arguments.length;r<i;r++)n.push(arguments[r]);return t.apply(this,n)}},has:function(e){return Ember.typeOf(this[e])==="function"||this._super(e)},willDestroy:function(){var e=this._parentView;this.removedFromDOM||this.destroyElement(),e&&e.removeChild(this),this.transitionTo("destroyed"),this.isVirtual||delete Ember.View.views[this.elementId]},clearRenderedChildren:Ember.K,triggerRecursively:Ember.K,invokeRecursively:Ember.K,transitionTo:Ember.K,destroyElement:Ember.K}),Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,templates:Ember.TEMPLATES,template:Ember.computed(function(e,n){if(n!==undefined)return n;var r=t(this,"templateName"),i=this.templateForName(r,"template");return i||t(this,"defaultTemplate")}).property("templateName"),container:Ember.computed(function(){var e=t(this,"_parentView");return e?t(e,"container"):Ember.Container&&Ember.Container.defaultContainer}),controller:Ember.computed(function(e){var n=t(this,"_parentView");return n?t(n,"controller"):null}).property("_parentView"),layout:Ember.computed(function(e){var n=t(this,"layoutName"),r=this.templateForName(n,"layout");return r||t(this,"defaultLayout")}).property("layoutName"),templateForName:function(e,n){if(!e)return;var r=t(this,"container");if(r)return r.lookup("template:"+e)},context:Ember.computed(function(e,r){return arguments.length===2?(n(this,"_context",r),r):t(this,"_context")}).volatile(),_context:Ember.computed(function(e){var n,r;return(r=t(this,"controller"))?r:(n=this._parentView,n?t(n,"_context"):null)}),_contextDidChange:Ember.observer(function(){this.rerender()},"context"),isVisible:!0,childViews:c,_childViews:[],_childViewsWillChange:Ember.beforeObserver(function(){if(this.isVirtual){var e=t(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}},"childViews"),_childViewsDidChange:Ember.observer(function(){if(this.isVirtual){var e=t(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}},"childViews"),nearestInstanceOf:function(e){var n=t(this,"parentView");while(n){if(n instanceof e)return n;n=t(n,"parentView")}},nearestOfType:function(e){var n=t(this,"parentView"),r=e instanceof Ember.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};while(n){if(r(n))return n;n=t(n,"parentView")}},nearestWithProperty:function(e){var n=t(this,"parentView");while(n){if(e in n)return n;n=t(n,"parentView")}},nearestChildOf:function(e){var n=t(this,"parentView");while(n){if(t(n,"parentView")instanceof e)return n;n=t(n,"parentView")}},_parentViewDidChange:Ember.observer(function(){if(this.isDestroying)return;t(this,"parentView.controller")&&!t(this,"controller")&&this.notifyPropertyChange("controller")},"_parentView"),_controllerDidChange:Ember.observer(function(){if(this.isDestroying)return;this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")})},"controller"),cloneKeywords:function(){var e=t(this,"templateData"),r=e?Ember.copy(e.keywords
18
- ):{};return n(r,"view",t(this,"concreteView")),n(r,"_view",this),n(r,"controller",t(this,"controller")),r},render:function(e){var n=t(this,"layout")||t(this,"template");if(n){var r=t(this,"context"),i=this.cloneKeywords(),s,o={view:this,buffer:e,isRenderData:!0,keywords:i,insideGroup:t(this,"templateData.insideGroup")};s=n(r,{data:o}),s!==undefined&&e.push(s)}},rerender:function(){return this.currentState.rerender(this)},clearRenderedChildren:function(){var e=this.lengthBeforeRender,t=this.lengthAfterRender,n=this._childViews;for(var r=t-1;r>=e;r--)n[r]&&n[r].destroy()},_applyClassNameBindings:function(e){var t=this.classNames,n,r,i;f(e,function(e){var s,o=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),n=this.$(),s&&(n.removeClass(s),t.removeObject(s)),r?(n.addClass(r),s=r):s=null};i=this._classStringForProperty(e),i&&(l(t,i),s=i),this.registerObserver(this,o.path,u),this.one("willClearRender",function(){s&&(t.removeObject(s),s=null)})},this)},_applyAttributeBindings:function(e,n){var r,i,s;f(n,function(n){var s=n.split(":"),o=s[0],u=s[1]||o,a=function(){i=this.$();if(!i)return;r=t(this,o),Ember.View.applyAttributeBindings(i,u,r)};this.registerObserver(this,o,a),r=t(this,o),Ember.View.applyAttributeBindings(e,u,r)},this)},_classStringForProperty:function(e){var n=Ember.View._parsePropertyPath(e),r=n.path,i=t(this,r);return i===undefined&&Ember.isGlobalPath(r)&&(i=t(Ember.lookup,r)),Ember.View._classStringForValue(r,i,n.className,n.falsyClassName)},element:Ember.computed(function(e,t){return t!==undefined?this.currentState.setElement(this,t):this.currentState.getElement(this)}).property("_parentView"),$:function(e){return this.currentState.$(this,e)},mutateChildViews:function(e){var t=this._childViews,n=t.length,r;while(--n>=0)r=t[n],e.call(this,r,n);return this},forEachChildView:function(e){var t=this._childViews;if(!t)return this;var n=t.length,r,i;for(i=0;i<n;i++)r=t[i],e.call(this,r);return this},appendTo:function(e){return this._insertElementLater(function(){this.$().appendTo(e)}),this},replaceIn:function(e){return this._insertElementLater(function(){Ember.$(e).empty(),this.$().appendTo(e)}),this},_insertElementLater:function(e){this._scheduledInsert=Ember.run.scheduleOnce("render",this,"_insertElement",e)},_insertElement:function(e){this._scheduledInsert=null,this.currentState.insertElement(this,e)},append:function(){return this.appendTo(document.body)},remove:function(){this.removedFromDOM||this.destroyElement(),this.invokeRecursively(function(e){e.clearRenderedChildren&&e.clearRenderedChildren()})},elementId:null,findElementInParentElement:function(e){var t="#"+this.elementId;return Ember.$(t)[0]||Ember.$(t,e)[0]},createElement:function(){if(t(this,"element"))return this;var e=this.renderToBuffer();return n(this,"element",e.element()),this},willInsertElement:Ember.K,didInsertElement:Ember.K,willClearRender:Ember.K,invokeRecursively:function(e){var t=[this],n,r;while(t.length){n=t.slice(),t=[];for(var i=0,s=n.length;i<s;i++)r=n[i],e.call(r,r),r._childViews&&t.push.apply(t,r._childViews)}},triggerRecursively:function(e){var t=[this],n,r;while(t.length){n=t.slice(),t=[];for(var i=0,s=n.length;i<s;i++)r=n[i],r.trigger&&r.trigger(e),r._childViews&&t.push.apply(t,r._childViews)}},destroyElement:function(){return this.currentState.destroyElement(this)},willDestroyElement:function(){},_notifyWillDestroyElement:function(){this.triggerRecursively("willClearRender"),this.triggerRecursively("willDestroyElement")},_elementWillChange:Ember.beforeObserver(function(){this.forEachChildView(function(e){Ember.propertyWillChange(e,"element")})},"element"),_elementDidChange:Ember.observer(function(){this.forEachChildView(function(e){Ember.propertyDidChange(e,"element")})},"element"),parentViewDidChange:Ember.K,instrumentName:"view",instrumentDetails:function(e){e.template=t(this,"templateName"),this._super(e)},_renderToBuffer:function(e,t){this.lengthBeforeRender=this._childViews.length;var n=this._super(e,t);return this.lengthAfterRender=this._childViews.length,n},renderToBufferIfNeeded:function(){return this.currentState.renderToBufferIfNeeded(this,this)},beforeRender:function(e){this.applyAttributesToBuffer(e),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag()},applyAttributesToBuffer:function(e){var n=t(this,"classNameBindings");n.length&&this._applyClassNameBindings(n);var r=t(this,"attributeBindings");r.length&&this._applyAttributeBindings(e,r),e.setClasses(this.classNames),e.id(this.elementId);var i=t(this,"ariaRole");i&&e.attr("role",i),t(this,"isVisible")===!1&&e.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:[],attributeBindings:[],init:function(){this.elementId=this.elementId||o(this),this._super(),this._childViews=this._childViews.slice(),this.classNameBindings=Ember.A(this.classNameBindings.slice()),this.classNames=Ember.A(this.classNames.slice());var e=t(this,"viewController");e&&(e=t(e),e&&n(e,"view",this))},appendChild:function(e,t){return this.currentState.appendChild(this,e,t)},removeChild:function(e){if(this.isDestroying)return;n(e,"_parentView",null);var t=this._childViews;return Ember.EnumerableUtils.removeObject(t,e),this.propertyDidChange("childViews"),this},removeAllChildren:function(){return this.mutateChildViews(function(e){this.removeChild(e)})},destroyAllChildren:function(){return this.mutateChildViews(function(e){e.destroy()})},removeFromParent:function(){var e=this._parentView;return this.remove(),e&&e.removeChild(this),this},willDestroy:function(){var e=this._childViews,r=this._parentView,i,s;this.removedFromDOM||this.destroyElement(),i=e.length;for(s=i-1;s>=0;s--)e[s].removedFromDOM=!0;if(this.viewName){var o=t(this,"parentView");o&&n(o,this.viewName,null)}r&&r.removeChild(this),this.transitionTo("destroyed"),i=e.length;for(s=i-1;s>=0;s--)e[s].destroy();this.isVirtual||delete Ember.View.views[t(this,"elementId")]},createChildView:function(e,r){return e.isView&&e._parentView===this?e:(Ember.CoreView.detect(e)?(r=r||{},r._parentView=this,r.templateData=r.templateData||t(this,"templateData"),e=e.create(r),e.viewName&&n(t(this,"concreteView"),e.viewName,e)):(r&&e.setProperties(r),t(e,"templateData")||n(e,"templateData",t(this,"templateData")),n(e,"_parentView",this)),e)},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer(function(){var e=this.$();if(!e)return;var n=t(this,"isVisible");e.toggle(n);if(this._isAncestorHidden())return;n?this._notifyBecameVisible():this._notifyBecameHidden()},"isVisible"),_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(e){var n=t(e,"isVisible");(n||n===null)&&e._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(e){var n=t(e,"isVisible");(n||n===null)&&e._notifyBecameHidden()})},_isAncestorHidden:function(){var e=t(this,"parentView");while(e){if(t(e,"isVisible")===!1)return!0;e=t(e,"parentView")}return!1},clearBuffer:function(){this.invokeRecursively(function(e){e.buffer=null})},transitionTo:function(e,t){this.currentState=this.states[e],this.state=e,t!==!1&&this.forEachChildView(function(t){t.transitionTo(e)})},handleEvent:function(e,t){return this.currentState.handleEvent(this,e,t)},registerObserver:function(e,t,n,r){Ember.addObserver(e,t,n,r),this.one("willClearRender",function(){Ember.removeObserver(e,t,n,r)})}});var h={prepend:function(e,t){e.$().prepend(t)},after:function(e,t){e.$().after(t)},html:function(e,t){e.$().html(t)},replace:function(e){var r=t(e,"element");n(e,"element",null),e._insertElementLater(function(){Ember.$(r).replaceWith(t(e,"element"))})},remove:function(e){e.$().remove()},empty:function(e){e.$().empty()}};Ember.View.reopen({domManager:h}),Ember.View.reopenClass({_parsePropertyPath:function(e){var t=e.split(":"),n=t[0],r="",i,s;return t.length>1&&(i=t[1],t.length===3&&(s=t[2]),r=":"+i,s&&(r+=":"+s)),{path:n,classNames:r,className:i===""?undefined:i,falsyClassName:s}},_classStringForValue:function(e,t,n,r){if(n||r)return n&&!!t?n:r&&!t?r:null;if(t===!0){var i=e.split(".");return Ember.String.dasherize(i[i.length-1])}return t!==!1&&t!==undefined&&t!==null?t:null}}),Ember.View.views={},Ember.View.childViewsProperty=c,Ember.View.applyAttributeBindings=function(e,t,n){var r=Ember.typeOf(n);t!=="value"&&(r==="string"||r==="number"&&!isNaN(n))?n!==e.attr(t)&&e.attr(t,n):t==="value"||r==="boolean"?n!==e.prop(t)&&e.prop(t,n):n||e.removeAttr(t)},Ember.View.states=e}(),function(){var e=Ember.get,t=Ember.set;Ember.View.states._default={appendChild:function(){throw"You can't use appendChild outside of the rendering process"},$:function(){return undefined},getElement:function(){return null},handleEvent:function(){return!0},destroyElement:function(e){return t(e,"element",null),e._scheduledInsert&&(Ember.run.cancel(e._scheduledInsert),e._scheduledInsert=null),e},renderToBufferIfNeeded:function(){return!1},rerender:Ember.K}}(),function(){var e=Ember.View.states.preRender=Ember.create(Ember.View.states._default);Ember.merge(e,{insertElement:function(e,t){e.createElement(),e.triggerRecursively("willInsertElement"),t.call(e),e.transitionTo("inDOM"),e.triggerRecursively("didInsertElement")},renderToBufferIfNeeded:function(e){return e.renderToBuffer()},empty:Ember.K,setElement:function(e,t){return t!==null&&e.transitionTo("hasElement"),t}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.meta,r=Ember.View.states.inBuffer=Ember.create(Ember.View.states._default);Ember.merge(r,{$:function(e,t){return e.rerender(),Ember.$()},rerender:function(e){throw new Ember.Error("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.")},appendChild:function(e,t,n){var r=e.buffer;return t=e.createChildView(t,n),e._childViews.push(t),t.renderToBuffer(r),e.propertyDidChange("childViews"),t},destroyElement:function(e){return e.clearBuffer(),e._notifyWillDestroyElement(),e.transitionTo("preRender"),e},empty:function(){},renderToBufferIfNeeded:function(e){return e.buffer},insertElement:function(){throw"You can't insert an element that has already been rendered"},setElement:function(e,t){return t===null?e.transitionTo("preRender"):(e.clearBuffer(),e.transitionTo("hasElement")),t}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.meta,r=Ember.View.states.hasElement=Ember.create(Ember.View.states._default);Ember.merge(r,{$:function(t,n){var r=e(t,"element");return n?Ember.$(n,r):Ember.$(r)},getElement:function(t){var n=e(t,"parentView");return n&&(n=e(n,"element")),n?t.findElementInParentElement(n):Ember.$("#"+e(t,"elementId"))[0]},setElement:function(e,t){if(t!==null)throw"You cannot set an element to a non-null value when the element is already in the DOM.";return e.transitionTo("preRender"),t},rerender:function(e){return e.triggerRecursively("willClearRender"),e.clearRenderedChildren(),e.domManager.replace(e),e},destroyElement:function(e){return e._notifyWillDestroyElement(),e.domManager.remove(e),t(e,"element",null),e._scheduledInsert&&(Ember.run.cancel(e._scheduledInsert),e._scheduledInsert=null),e},empty:function(e){var t=e._childViews,n,r;if(t){n=t.length;for(r=0;r<n;r++)t[r]._notifyWillDestroyElement()}e.domManager.empty(e)},handleEvent:function(e,t,n){return e.has(t)?e.trigger(t,n):!0}});var i=Ember.View.states.inDOM=Ember.create(r);Ember.merge(i,{insertElement:function(e,t){throw"You can't insert an element into the DOM that has already been inserted"}})}(),function(){var e="You can't call %@ on a destroyed view",t=Ember.String.fmt,n=Ember.View.states.destroyed=Ember.create(Ember.View.states._default);Ember.merge(n,{appendChild:function(){throw t(e,["appendChild"])},rerender:function(){throw t(e,["rerender"])},destroyElement:function(){throw t(e,["destroyElement"])},empty:function(){throw t(e,["empty"])},setElement:function(){throw t(e,["set('element', ...)"])},renderToBufferIfNeeded:function(){throw t(e,["renderToBufferIfNeeded"])},insertElement:Ember.K})}(),function(){Ember.View.cloneStates=function(e){var t={};t._default={},t.preRender=Ember.create(t._default),t.destroyed=Ember.create(t._default),t.inBuffer=Ember.create(t._default),t.hasElement=Ember.create(t._default),t.inDOM=Ember.create(t.hasElement);var n;for(var r in e){if(!e.hasOwnProperty(r))continue;Ember.merge(t[r],e[r])}return t}}(),function(){var e=Ember.View.cloneStates(Ember.View.states),t=Ember.get,n=Ember.set,r=Ember.meta,i=Ember.EnumerableUtils.forEach;Ember.ContainerView=Ember.View.extend(Ember.MutableArray,{states:e,init:function(){this._super();var e=t(this,"childViews");Ember.defineProperty(this,"childViews",Ember.View.childViewsProperty);var r=this._childViews;i(e,function(e,i){var s;"string"==typeof e?(s=t(this,e),s=this.createChildView(s),n(this,e,s)):s=this.createChildView(e),r[i]=s},this);var s=t(this,"currentView");s&&r.push(this.createChildView(s))},replace:function(e,n,r){var i=r?t(r,"length"):0;this.arrayContentWillChange(e,n,i),this.childViewsWillChange(this._childViews,e,n);if(i===0)this._childViews.splice(e,n);else{var s=[e,n].concat(r);this._childViews.splice.apply(this._childViews,s)}return this.arrayContentDidChange(e,n,i),this.childViewsDidChange(this._childViews,e,n,i),this},objectAt:function(e){return this._childViews[e]},length:Ember.computed(function(){return this._childViews.length}),render:function(e){this.forEachChildView(function(t){t.renderToBuffer(e)})},instrumentName:"render.container",childViewsWillChange:function(e,t,n){this.propertyWillChange("childViews");if(n>0){var r=e.slice(t,t+n);this.currentState.childViewsWillChange(this,e,t,n),this.initializeViews(r,null,null)}},removeChild:function(e){return this.removeObject(e),this},childViewsDidChange:function(e,n,r,i){if(i>0){var s=e.slice(n,n+i);this.initializeViews(s,this,t(this,"templateData")),this.currentState.childViewsDidChange(this,e,n,i)}this.propertyDidChange("childViews")},initializeViews:function(e,r,s){i(e,function(e){n(e,"_parentView",r),t(e,"templateData")||n(e,"templateData",s)})},currentView:null,_currentViewWillChange:Ember.beforeObserver(function(){var e=t(this,"currentView");e&&e.destroy()},"currentView"),_currentViewDidChange:Ember.observer(function(){var e=t(this,"currentView");e&&this.pushObject(e)},"currentView"),_ensureChildrenAreInDOM:function(){this.currentState.ensureChildrenAreInDOM(this)}}),Ember.merge(e._default,{childViewsWillChange:Ember.K,childViewsDidChange:Ember.K,ensureChildrenAreInDOM:Ember.K}),Ember.merge(e.inBuffer,{childViewsDidChange:function(e,t,n,r){throw new Error("You cannot modify child views while in the inBuffer state")}}),Ember.merge(e.hasElement,{childViewsWillChange:function(e,t,n,r){for(var i=n;i<n+r;i++)t[i].remove()},childViewsDidChange:function(e,t,n,r){Ember.run.scheduleOnce("render",e,"_ensureChildrenAreInDOM")},ensureChildrenAreInDOM:function(e){var t=e._childViews,n,r,i,s,o;for(n=0,r=t.length;n<r;n++)i=t[n],o=i.renderToBufferIfNeeded(),o&&(i.triggerRecursively("willInsertElement"),s?s.domManager.after(s,o.string()):e.domManager.prepend(e,o.string()),i.transitionTo("inDOM"),i.propertyDidChange("element"),i.triggerRecursively("didInsertElement")),s=i}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.String.fmt;Ember.CollectionView=Ember.ContainerView.extend({content:null,emptyViewClass:Ember.View,emptyView:null,itemViewClass:Ember.View,init:function(){var e=this._super();return this._contentDidChange(),e},_contentWillChange:Ember.beforeObserver(function(){var t=this.get("content");t&&t.removeArrayObserver(this);var n=t?e(t,"length"):0;this.arrayWillChange(t,0,n)},"content"),_contentDidChange:Ember.observer(function(){var t=e(this,"content");t&&t.addArrayObserver(this);var n=t?e(t,"length"):0;this.arrayDidChange(t,0,null,n)},"content"),willDestroy:function(){var t=e(this,"content");t&&t.removeArrayObserver(this),this._super(),this._createdEmptyView&&this._createdEmptyView.destroy()},arrayWillChange:function(t,n,r){var i=e(this,"emptyView");i&&i instanceof Ember.View&&i.removeFromParent();var s=this._childViews,o,u,a;a=this._childViews.length;var f=r===a;f&&this.currentState.empty(this);for(u=n+r-1;u>=n;u--)o=s[u],f&&(o.removedFromDOM=!0),o.destroy()},arrayDidChange:function(n,r,i,s){var o=e(this,"itemViewClass"),u=[],a,f,l,c,h;"string"==typeof o&&(o=e(o)),c=n?e(n,"length"):0;if(c)for(l=r;l<r+s;l++)f=n.objectAt(l),a=this.createChildView(o,{content:f,contentIndex:l}),u.push(a);else{var p=e(this,"emptyView");if(!p)return;var d=Ember.CoreView.detect(p);p=this.createChildView(p),u.push(p),t(this,"emptyView",p),d&&(this._createdEmptyView=p)}this.replace(r,0,u)},createChildView:function(n,r){n=this._super(n,r);var i=e(n,"tagName"),s=i===null||i===undefined?Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")]:i;return t(n,"tagName",s),n}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){}(),function(){}(),function(){var e=Ember.get,t=Ember.set;Ember.State=Ember.Object.extend(Ember.Evented,{isState:!0,parentState:null,start:null,name:null,path:Ember.computed(function(){var t=e(this,"parentState.path"),n=e(this,"name");return t&&(n=t+"."+n),n}),trigger:function(e){this[e]&&this[e].apply(this,[].slice.call(arguments,1)),this._super.apply(this,arguments)},init:function(){var n=e(this,"states"),r;t(this,"childStates",Ember.A()),t(this,"eventTransitions",e(this,"eventTransitions")||{});var i,s,o;if(!n){n={};for(i in this){if(i==="constructor")continue;if(s=this[i]){if(o=s.transitionTarget)this.eventTransitions[i]=o;this.setupChild(n,i,s)}}t(this,"states",n)}else for(i in n)this.setupChild(n,i,n[i]);t(this,"pathsCache",{}),t(this,"pathsCacheNoContext",{})},setupChild:function(n,r,i){if(!i)return!1;i.isState?t(i,"name",r):Ember.State.detect(i)&&(i=i.create({name:r}));if(i.isState)return t(i,"parentState",this),e(this,"childStates").pushObject(i),n[r]=i,i},lookupEventTransition:function(e){var t,n=this;while(n&&!t)t=n.eventTransitions[e],n=n.get("parentState");return t},isLeaf:Ember.computed(function(){return!e(this,"childStates").length}),hasContext:!0,setup:Ember.K,enter:Ember.K,exit:Ember.K}),Ember.State.reopenClass({transitionTo:function(e){var t=function(t,n){var r=[],i,s=Ember.$&&Ember.$.Event;n&&s&&n instanceof s?n.hasOwnProperty("contexts")&&(r=n.contexts.slice()):r=[].slice.call(arguments,1),r.unshift(e),t.transitionTo.apply(t,r)};return t.transitionTarget=e,t}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.String.fmt,r=Ember.ArrayPolyfills.forEach,i=function(e){this.enterStates=e.enterStates.slice(),this.exitStates=e.exitStates.slice(),this.resolveState=e.resolveState,this.finalState=e.enterStates[e.enterStates.length-1]||e.resolveState};i.prototype={normalize:function(e,t){return this.matchContextsToStates(t),this.addInitialStates(),this.removeUnchangedContexts(e),this},matchContextsToStates:function(t){var n=this.enterStates.length-1,r=[],i,s;while(t.length>0){if(n>=0)i=this.enterStates[n--];else{if(this.enterStates.length){i=e(this.enterStates[0],"parentState");if(!i)throw"Cannot match all contexts to states"}else i=this.resolveState;this.enterStates.unshift(i),this.exitStates.unshift(i)}e(i,"hasContext")?s=t.pop():s=null,r.unshift(s)}this.contexts=r},addInitialStates:function(){var t=this.finalState,n;for(;;){n=e(t,"initialState")||"start",t=e(t,"states."+n);if(!t)break;this.finalState=t,this.enterStates.push(t),this.contexts.push(undefined)}},removeUnchangedContexts:function(e){while(this.enterStates.length>0){if(this.enterStates[0]!==this.exitStates[0])break;if(this.enterStates.length===this.contexts.length){if(e.getStateMeta(this.enterStates[0],"context")!==this.contexts[0])break;this.contexts.shift()}this.resolveState=this.enterStates.shift(),this.exitStates.shift()}}};var s=function(t,r,i){var u=this.enableLogging,a=i?"unhandledEvent":t,f=r[a],l,c,h;l=[].slice.call(arguments,3);if(typeof f=="function")return u&&(i?Ember.Logger.log(n("STATEMANAGER: Unhandled event '%@' being sent to state %@.",[t,e(r,"path")])):Ember.Logger.log(n("STATEMANAGER: Sending event '%@' to state %@.",[t,e(r,"path")]))),h=l,i&&h.unshift(t),h.unshift(this),f.apply(r,h);var p=e(r,"parentState");if(p)return c=l,c.unshift(t,p,i),s.apply(this,c);if(!i)return o.call(this,t,l,!0)},o=function(t,n,r){return n.unshift(t,e(this,"currentState"),r),s.apply(this,n)};Ember.StateManager=Ember.State.extend({init:function(){this._super(),t(this,"stateMeta",Ember.Map.create());var n=e(this,"initialState");!n&&e(this,"states.start")&&(n="start"),n&&this.transitionTo(n)},stateMetaFor:function(t){var n=e(this,"stateMeta"),r=n.get(t);return r||(r={},n.set(t,r)),r},setStateMeta:function(e,n,r){return t(this.stateMetaFor(e),n,r)},getStateMeta:function(t,n){return e(this.stateMetaFor(t),n)},currentState:null,currentPath:Ember.computed.alias("currentState.path"),transitionEvent:"setup",errorOnUnhandledEvent:!0,send:function(e){var t=[].slice.call(arguments,1);return o.call(this,e,t,!1)},unhandledEvent:function(t,n){if(e(this,"errorOnUnhandledEvent"))throw new Ember.Error(this.toString()+" could not respond to event "+n+" in state "+e(this,"currentState.path")+".")},getStateByPath:function(t,n){var r=n.split("."),i=t;for(var s=0,o=r.length;s<o;s++){i=e(e(i,"states"),r[s]);if(!i)break}return i},findStateByPath:function(t,n){var r;while(!r&&t)r=this.getStateByPath(t,n),t=e(t,"parentState");return r},getStatesInPath:function(t,n){if(!n||n==="")return undefined;var r=n.split("."),i=[],s,o;for(var u=0,a=r.length;u<a;u++){s=e(t,"states");if(!s)return undefined;o=e(s,r[u]);if(!o)return undefined;t=o,i.push(o)}return i},goToState:function(){return this.transitionTo.apply(this,arguments)},transitionTo:function(t,n){if(Ember.isEmpty(t))return;var r=n?Array.prototype.slice.call(arguments,1):[],s=e(this,"currentState")||this,o=this.contextFreeTransition(s,t),u=(new i(o)).normalize(this,r);this.enterState(u),this.triggerSetupContext(u)},contextFreeTransition:function(t,n){var r=t.pathsCache[n];if(r)return r;var i=this.getStatesInPath(t,n),s=[],o=t;while(o&&!i){s.unshift(o),o=e(o,"parentState");if(!o){i=this.getStatesInPath(this,n);if(!i)return}i=this.getStatesInPath(o,n)}while(i.length>0&&i[0]===s[0])o=i.shift(),s.shift();var u=t.pathsCache[n]={exitStates:s,enterStates:i,resolveState:o};return u},triggerSetupContext:function(t){var n=t.contexts,i=t.enterStates.length-n.length,s=t.enterStates,o=e(this,"transitionEvent");r.call(s,function(e,t){e.trigger(o,this,n[t-i])},this)},getState:function(t){var n=e(this,t),r=e(this,"parentState");if(n)return n;if(r)return r.getState(t)},enterState:function(n){var i=this.enableLogging,s=n.exitStates.slice(0).reverse();r.call(s,function(e){e.trigger("exit",this)},this),r.call(n.enterStates,function(t){i&&Ember.Logger.log("STATEMANAGER: Entering "+e(t,"path")),t.trigger("enter",this)},this),t(this,"currentState",n.finalState)}})}(),function(){}(),function(){e("metamorph",[],function(){"use strict";var e=function(){},t=0,n=window.document,r="createRange"in n&&typeof Range!="undefined"&&Range.prototype.createContextualFragment,i=function(){var e=n.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",e.firstChild.innerHTML===""}(),s=function(){var e=n.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value",e.childNodes[0].nodeValue==="Test:"&&e.childNodes[2].nodeValue===" Value"}(),o=function(n){var r;this instanceof o?r=this:r=new e,r.innerHTML=n;var i="metamorph-"+t++;return r.start=i+"-start",r.end=i+"-end",r};e.prototype=o.prototype;var u,a,f,l,c,h,p,d,v;l=function(){return this.startTag()+this.innerHTML+this.endTag()},d=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},v=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"};if(r)u=function(e,t){var r=n.createRange(),i=n.getElementById(e.start),s=n.getElementById(e.end);return t?(r.setStartBefore(i),r.setEndAfter(s)):(r.setStartAfter(i),r.setEndBefore(s)),r},a=function(e,t){var n=u(this,t);n.deleteContents();var r=n.createContextualFragment(e);n.insertNode(r)},f=function(){var e=u(this,!0);e.deleteContents()},c=function(e){var t=n.createRange();t.setStart(e),t.collapse(!1);var r=t.createContextualFragment(this.outerHTML());e.appendChild(r)},h=function(e){var t=n.createRange(),r=n.getElementById(this.end);t.setStartAfter(r),t.setEndAfter(r);var i=t.createContextualFragment(e);t.insertNode(i)},p=function(e){var t=n.createRange(),r=n.getElementById(this.start);t.setStartAfter(r),t.setEndAfter(r);var i=t.createContextualFragment(e);t.insertNode(i)};else{var m={select:[1,"<select multiple='multiple'>","</select>"],fieldset:[1,"<fieldset>","</fieldset>"],table:[1,"<table>","</table>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"],colgroup:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],map:[1,"<map>","</map>"],_default:[0,"",""]},g=function(e,t){if(e.getAttribute("id")===t)return e;var n=e.childNodes.length,r,i,s;for(r=0;r<n;r++){i=e.childNodes[r],s=i.nodeType===1&&g(i,t);if(s)return s}},y=function(e,t){var r=[];s&&(t=t.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,n,i){return r.push([i,t]),n})),e.innerHTML=t;if(r.length>0){var i=r.length,o;for(o=0;o<i;o++){var u=g(e,r[o][0]),a=n.createTextNode(r[o][1]);u.parentNode.insertBefore(a,u)}}},b=function(e,t){var r=m[e.tagName.toLowerCase()]||m._default,s=r[0],o=r[1],u=r[2];i&&(t="&shy;"+t);var a=n.createElement("div");y(a,o+t+u);for(var f=0;f<=s;f++)a=a.firstChild;if(i){var l=a;while(l.nodeType===1&&!l.nodeName)l=l.firstChild;l.nodeType===3&&l.nodeValue.charAt(0)==="­"&&(l.nodeValue=l.nodeValue.slice(1))}return a},w=function(e){while(e.parentNode.tagName==="")e=e.parentNode;return e},E=function(e,t){e.parentNode!==t.parentNode&&t.parentNode.insertBefore(e,t.parentNode.firstChild)};a=function(e,t){var r=w(n.getElementById(this.start)),i=n.getElementById(this.end),s=i.parentNode,o,u,a;E(r,i),o=r.nextSibling;while(o){u=o.nextSibling,a=o===i;if(a){if(!t)break;i=o.nextSibling}o.parentNode.removeChild(o);if(a)break;o=u}o=b(r.parentNode,e);while(o)u=o.nextSibling,s.insertBefore(o,i),o=u},f=function(){var e=w(n.getElementById(this.start)),t=n.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},c=function(e){var t=b(e,this.outerHTML()),n;while(t)n=t.nextSibling,e.appendChild(t),t=n},h=function(e){var t=n.getElementById(this.end),r=t.nextSibling,i=t.parentNode,s,o;o=b(i,e);while(o)s=o.nextSibling,i.insertBefore(o,r),o=s},p=function(e){var t=n.getElementById(this.start),r=t.parentNode,i,s;s=b(r,e);var o=t.nextSibling;while(s)i=s.nextSibling,r.insertBefore(s,o),s=i}}return o.prototype.html=function(e){this.checkRemoved();if(e===undefined)return this.innerHTML;a.call(this,e),this.innerHTML=e},o.prototype.replaceWith=function(e){this.checkRemoved(),a.call(this,e,!0)},o.prototype.remove=f,o.prototype.outerHTML=l,o.prototype.appendTo=c,o.prototype.after=h,o.prototype.prepend=p,o.prototype.startTag=d,o.prototype.endTag=v,o.prototype.isRemoved=function(){var e=n.getElementById(this.start),t=n.getElementById(this.end);return!e||!t},o.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},o})}(),function(){var e=Object.create||function(e){function t(){}return t.prototype=e,new t},t=this.Handlebars||Ember.imports&&Ember.imports.Handlebars;!t&&typeof require=="function"&&(t=require("handlebars")),Ember.Handlebars=e(t),Ember.Handlebars.helpers=e(t.helpers),Ember.Handlebars.Compiler=function(){},t.Compiler&&(Ember.Handlebars.Compiler.prototype=e(t.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},t.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=e(t.JavaScriptCompiler.prototype),Ember.Handlebars.JavaScriptCompiler.prototype.compiler=Ember.Handlebars.JavaScriptCompiler),Ember.Handlebars.JavaScriptCompiler.prototype.namespace="Ember.Handlebars",Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(e){return"data.buffer.push("+e+");"};var n="ember"+ +(new Date),r=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&e.id.string==="control")e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["controlID",new t.AST.StringNode(n+r++)]);else if(!e.params.length&&!e.hash){var i=new t.AST.IdNode(["_triageMustache"]);e.escaped||(e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["unescaped",new t.AST.StringNode("true")])),e=new t.AST.MustacheNode([i].concat([e.id]),e.hash,!e.escaped)}return t.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var n=t.parse(e),r={knownHelpers:{action:!0,unbound:!0,bindAttr:!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(n,r);return(new Ember.Handlebars.JavaScriptCompiler).compile(i,r,undefined,!0)},t.compile&&(Ember.Handlebars.compile=function(e){var n=t.parse(e),r={data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(n,r),s=(new Ember.Handlebars.JavaScriptCompiler).compile(i,r,undefined,!0);return Ember.Handlebars.template(s)})}(),function(){function r(e,n,r,s){var o=r.length,u=this,a=s.data,f=a.view,l=s.hash,c=l.boundOptions,h,p,d,v,m,g;d=new Ember._SimpleHandlebarsView(null,null,!l.unescaped,a),d.normalizedValue=function(){var i=[],u,f;for(f in c){if(!c.hasOwnProperty(f))continue;m=t(e,c[f],a),d.path=m.path,d.pathRoot=m.root,l[f]=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(d)}for(v=0;v<o;++v)m=r[v],d.path=m.path,d.pathRoot=m.root,i.push(Ember._SimpleHandlebarsView.prototype.normalizedValue.call(d));return i.push(s),n.apply(e,i)},f.appendChild(d),h=[];for(p in c)c.hasOwnProperty(p)&&h.push(t(e,c[p],a));h=h.concat(r);for(v=0,g=h.length;v<g;++v)m=h[v],f.registerObserver(m.root,m.path,d,i)}function i(){Ember.run.scheduleOnce("render",this,"rerender")}function s(e,t,n,r){var i=[],s=r.hash,o=s.boundOptions,u,a,f,l;for(l in o){if(!o.hasOwnProperty(l))continue;s[l]=Ember.Handlebars.get(e,o[l],r)}for(u=0,a=n.length;u<a;++u)f=n[u],i.push(Ember.Handlebars.get(e,f.path,r));return i.push(r),t.apply(e,i)}var e=Array.prototype.slice,t=Ember.Handlebars.normalizePath=function(e,t,n){var r=n&&n.keywords||{},i,s;return i=t.split(".",1)[0],r.hasOwnProperty(i)&&(e=r[i],s=!0,t===i?t="":t=t.substr(i.length+1)),{root:e,path:t,isKeyword:s}},n=Ember.Handlebars.get=function(e,n,r){var i=r&&r.data,s=t(e,n,i),o;return e=s.root,n=s.path,o=Ember.get(e,n),o===undefined&&e!==Ember.lookup&&Ember.isGlobalPath(n)&&(o=Ember.get(Ember.lookup,n)),o};Ember.Handlebars.getPath=Ember.deprecateFunc("`Ember.Handlebars.getPath` has been changed to `Ember.Handlebars.get` for consistency.",Ember.Handlebars.get),Ember.Handlebars.resolveParams=function(e,t,r){var i=[],s=r.types,o,u;for(var a=0,f=t.length;a<f;a++)o=t[a],u=s[a],u==="ID"?i.push(n(e,o,r)):i.push(o);return i},Ember.Handlebars.resolveHash=function(e,t,r){var i={},s=r.hashTypes,o;for(var u in t){if(!t.hasOwnProperty(u))continue;o=s[u],o==="ID"?i[u]=n(e,t[u],r):i[u]=t[u]}return i},Ember.Handlebars.registerHelper("helperMissing",function(e,t){var n,r="";throw n="%@ Handlebars error: Could not find property '%@' on object %@.",t.data&&(r=t.data.view),new Ember.Error(Ember.String.fmt(n,[r,e,this]))}),Ember.Handlebars.registerBoundHelper=function(n,o){function a(){var n=e.call(arguments,0,-1),a=n.length,f=arguments[arguments.length-1],l=[],c=f.data,h=f.hash,p=c.view,d=f.contexts&&f.contexts[0]||this,v,m,g,y,b;h.boundOptions={};for(b in h){if(!h.hasOwnProperty(b))continue;Ember.IS_BINDING.test(b)&&typeof h[b]=="string"&&(h.boundOptions[b.slice(0,-7)]=h[b])}c.properties=[];for(y=0;y<a;++y)c.properties.push(n[y]),l.push(t(d,n[y],c));if(c.isUnbound)return s(this,o,l,f);if(u.length===0)return r(d,o,l,f);v=l[0],m=v.root,g=v.path;var w=new Ember._SimpleHandlebarsView(g,m,!f.hash.unescaped,f.data);w.normalizedValue=function(){var e=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(w);return o.call(p,e,f)},p.appendChild(w),p.registerObserver(m,g,w,i);for(var E=0,S=u.length;E<S;E++)p.registerObserver(m,g+"."+u[E],w,i)}var u=e.call(arguments,2);a._rawFunction=o,Ember.Handlebars.registerHelper(n,a)},Ember.Handlebars.template=function(e){var t=Handlebars.template(e);return t.isTop=!0,t}}(),function(){Ember.String.htmlSafe=function(e){return new Handlebars.SafeString(e)};var e=Ember.String.htmlSafe;if(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)String.prototype.htmlSafe=function(){return e(this)}}(),function(){Ember.Handlebars.resolvePaths=function(
19
- e){var t=[],n=e.contexts,r=e.roots,i=e.data;for(var s=0,o=n.length;s<o;s++)t.push(Ember.Handlebars.get(r[s],n[s],{data:i}));return t}}(),function(){var e=Ember.set,n=Ember.get,r=t("metamorph"),i={remove:function(e){e.morph.remove()},prepend:function(e,t){e.morph.prepend(t)},after:function(e,t){e.morph.after(t)},html:function(e,t){e.morph.html(t)},replace:function(e){var t=e.morph;e.transitionTo("preRender"),Ember.run.schedule("render",this,function(){if(e.isDestroying)return;e.clearRenderedChildren();var n=e.renderToBuffer();e.invokeRecursively(function(e){e.propertyDidChange("element")}),e.triggerRecursively("willInsertElement"),t.replaceWith(n.string()),e.transitionTo("inDOM"),e.triggerRecursively("didInsertElement")})},empty:function(e){e.morph.html("")}};Ember._Metamorph=Ember.Mixin.create({isVirtual:!0,tagName:"",instrumentName:"render.metamorph",init:function(){this._super(),this.morph=r()},beforeRender:function(e){e.push(this.morph.startTag()),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag(),e.push(this.morph.endTag())},createElement:function(){var e=this.renderToBuffer();this.outerHTML=e.string(),this.clearBuffer()},domManager:i}),Ember._MetamorphView=Ember.View.extend(Ember._Metamorph),Ember._SimpleMetamorphView=Ember.CoreView.extend(Ember._Metamorph)}(),function(){function s(e,t,n,r){this.path=e,this.pathRoot=t,this.isEscaped=n,this.templateData=r,this.morph=i(),this.state="preRender",this.updateId=null}var e=Ember.get,n=Ember.set,r=Ember.Handlebars.get,i=t("metamorph");Ember._SimpleHandlebarsView=s,s.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this.morph=null},propertyDidChange:Ember.K,normalizedValue:function(){var e=this.path,t=this.pathRoot,n,i;return e===""?n=t:(i=this.templateData,n=r(t,e,{data:i})),n},renderToBuffer:function(e){var t="";t+=this.morph.startTag(),t+=this.render(),t+=this.morph.endTag(),e.push(t)},render:function(){var e=this.isEscaped,t=this.normalizedValue();return t===null||t===undefined?t="":t instanceof Handlebars.SafeString||(t=String(t)),e&&(t=Handlebars.Utils.escapeExpression(t)),t},rerender:function(){switch(this.state){case"preRender":case"destroyed":break;case"inBuffer":throw new Ember.Error("Something you did tried to replace an {{expression}} before it was inserted into the DOM.");case"hasElement":case"inDOM":this.updateId=Ember.run.scheduleOnce("render",this,"update")}return this},update:function(){this.updateId=null,this.morph.html(this.render())},transitionTo:function(e){this.state=e}};var o=Ember.View.cloneStates(Ember.View.states),u=Ember.merge;u(o._default,{rerenderIfNeeded:Ember.K}),u(o.inDOM,{rerenderIfNeeded:function(t){e(t,"normalizedValue")!==t._lastNormalizedValue&&t.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"render.boundHandlebars",states:o,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:Ember.computed(function(){var t=e(this,"path"),n=e(this,"pathRoot"),i=e(this,"valueNormalizerFunc"),s,o;return t===""?s=n:(o=e(this,"templateData"),s=r(n,t,{data:o})),i?i(s):s}).property("path","pathRoot","valueNormalizerFunc").volatile(),rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(t){var r=e(this,"isEscaped"),i=e(this,"shouldDisplayFunc"),s=e(this,"preserveContext"),o=e(this,"previousContext"),u=e(this,"inverseTemplate"),a=e(this,"displayTemplate"),f=e(this,"normalizedValue");this._lastNormalizedValue=f;if(i(f)){n(this,"template",a);if(s)n(this,"_context",o);else{if(!a){f===null||f===undefined?f="":f instanceof Handlebars.SafeString||(f=String(f)),r&&(f=Handlebars.Utils.escapeExpression(f)),t.push(f);return}n(this,"_context",f)}}else u?(n(this,"template",u),s?n(this,"_context",o):n(this,"_context",f)):n(this,"template",function(){return""});return this._super(t)}})}(),function(){function a(e,t,n,s,o,u){var a=t.data,f=t.fn,l=t.inverse,c=a.view,h=this,p,d,v;p=i(h,e,a);if("object"==typeof this){if(a.insideGroup){d=function(){Ember.run.once(c,"rerender")};var m,g,y=r(h,e,t);y=o(y),g=n?h:y,s(y)?m=f:l&&(m=l),m(g,{data:t.data})}else{var b=c.createChildView(Ember._HandlebarsBoundView,{preserveContext:n,shouldDisplayFunc:s,valueNormalizerFunc:o,displayTemplate:f,inverseTemplate:l,path:e,pathRoot:h,previousContext:h,isEscaped:!t.hash.unescaped,templateData:t.data});c.appendChild(b),d=function(){Ember.run.scheduleOnce("render",b,"rerenderIfNeeded")}}if(p.path!==""){c.registerObserver(p.root,p.path,d);if(u)for(v=0;v<u.length;v++)c.registerObserver(p.root,p.path+"."+u[v],d)}}else a.buffer.push(r(h,e,t))}function f(e,t){var n=t.data,s=n.view,o=this,u,a;u=i(o,e,n);if("object"==typeof this){if(n.insideGroup){a=function(){Ember.run.once(s,"rerender")};var f=r(o,e,t);if(f===null||f===undefined)f="";n.buffer.push(f)}else{var l=new Ember._SimpleHandlebarsView(e,o,!t.hash.unescaped,t.data);l._parentView=s,s.appendChild(l),a=function(){Ember.run.scheduleOnce("render",l,"rerender")}}u.path!==""&&s.registerObserver(u.root,u.path,a)}else n.buffer.push(r(o,e,t))}var e=Ember.get,t=Ember.set,n=Ember.String.fmt,r=Ember.Handlebars.get,i=Ember.Handlebars.normalizePath,s=Ember.ArrayPolyfills.forEach,o=Ember.Handlebars,u=o.helpers;o.registerHelper("_triageMustache",function(e,t){return u[e]?u[e].call(this,t):u.bind.apply(this,arguments)}),o.registerHelper("bind",function(e,t){var n=t.contexts&&t.contexts[0]||this;return t.fn?a.call(n,e,t,!1,function(e){return!Ember.isNone(e)}):f.call(n,e,t)}),o.registerHelper("boundIf",function(t,n){var r=n.contexts&&n.contexts[0]||this,i=function(t){var n=t&&e(t,"isTruthy");return typeof n=="boolean"?n:Ember.isArray(t)?e(t,"length")!==0:!!t};return a.call(r,t,n,!0,i,i,["isTruthy","length"])}),o.registerHelper("with",function(e,t){if(arguments.length===4){var n,r,s,o;t=arguments[3],n=arguments[2],r=arguments[0];if(Ember.isGlobalPath(r))Ember.bind(t.data.keywords,n,r);else{o=i(this,r,t.data),r=o.path,s=o.root;var f=Ember.$.expando+Ember.guidFor(s);t.data.keywords[f]=s;var l=r?f+"."+r:f;Ember.bind(t.data.keywords,n,l)}return a.call(this,r,t,!0,function(e){return!Ember.isNone(e)})}return u.bind.call(t.contexts[0],e,t)}),o.registerHelper("if",function(e,t){return u.boundIf.call(t.contexts[0],e,t)}),o.registerHelper("unless",function(e,t){var n=t.fn,r=t.inverse;return t.fn=r,t.inverse=n,u.boundIf.call(t.contexts[0],e,t)}),o.registerHelper("bindAttr",function(e){var t=e.hash,n=e.data.view,u=[],a=this,f=++Ember.uuid,l=t["class"];if(l!==null&&l!==undefined){var c=o.bindClasses(this,l,n,f,e);u.push('class="'+Handlebars.Utils.escapeExpression(c.join(" "))+'"'),delete t["class"]}var h=Ember.keys(t);return s.call(h,function(s){var o=t[s],l;l=i(a,o,e.data);var c=o==="this"?l.root:r(a,o,e),h=Ember.typeOf(c),p,d;p=function(){var i=r(a,o,e),u=n.$("[data-bindattr-"+f+"='"+f+"']");if(!u||u.length===0){Ember.removeObserver(l.root,l.path,d);return}Ember.View.applyAttributeBindings(u,s,i)},d=function(){Ember.run.scheduleOnce("render",p)},o!=="this"&&(!l.isKeyword||l.path!=="")&&n.registerObserver(l.root,l.path,d),h==="string"||h==="number"&&!isNaN(c)?u.push(s+'="'+Handlebars.Utils.escapeExpression(c)+'"'):c&&h==="boolean"&&u.push(s+'="'+s+'"')},this),u.push("data-bindattr-"+f+'="'+f+'"'),new o.SafeString(u.join(" "))}),o.bindClasses=function(e,t,n,o,u){var a=[],f,l,c,h=function(e,t,n){var i,s=t.path;return s==="this"?i=e:s===""?i=!0:i=r(e,s,n),Ember.View._classStringForValue(s,i,t.className,t.falsyClassName)};return s.call(t.split(" "),function(t){var r,s,p,d=Ember.View._parsePropertyPath(t),v=d.path,m=e,g;v!==""&&v!=="this"&&(g=i(e,v,u.data),m=g.root,v=g.path),s=function(){f=h(e,d,u),c=o?n.$("[data-bindattr-"+o+"='"+o+"']"):n.$(),!c||c.length===0?Ember.removeObserver(m,v,p):(r&&c.removeClass(r),f?(c.addClass(f),r=f):r=null)},p=function(){Ember.run.scheduleOnce("render",s)},v!==""&&v!=="this"&&n.registerObserver(m,v,p),l=h(e,d,u),l&&(a.push(l),r=l)}),a}}(),function(){var e=Ember.get,t=Ember.set,n=/^parentView\./,r=Ember.Handlebars;r.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e,t){var n=e.hash,r=e.data,i={},s=n["class"],o=!1;n.id&&(i.elementId=n.id,o=!0),s&&(s=s.split(" "),i.classNames=s,o=!0),n.classBinding&&(i.classNameBindings=n.classBinding.split(" "),o=!0),n.classNameBindings&&(i.classNameBindings===undefined&&(i.classNameBindings=[]),i.classNameBindings=i.classNameBindings.concat(n.classNameBindings.split(" ")),o=!0),n.attributeBindings&&(i.attributeBindings=null,o=!0),o&&(n=Ember.$.extend({},n),delete n.id,delete n["class"],delete n.classBinding);var u;for(var a in n){if(!n.hasOwnProperty(a))continue;Ember.IS_BINDING.test(a)&&typeof n[a]=="string"&&(u=this.contextualizeBindingPath(n[a],r),u&&(n[a]=u))}if(i.classNameBindings)for(var f in i.classNameBindings){var l=i.classNameBindings[f];if(typeof l=="string"){var c=Ember.View._parsePropertyPath(l);u=this.contextualizeBindingPath(c.path,r),u&&(i.classNameBindings[f]=u+c.classNames)}}return Ember.$.extend(n,i)},contextualizeBindingPath:function(e,t){var n=Ember.Handlebars.normalizePath(null,e,t);return n.isKeyword?"templateData.keywords."+e:Ember.isGlobalPath(e)?null:e==="this"?"_parentView.context":"_parentView.context."+e},helper:function(e,t,n){var i=n.inverse,s=n.data,o=s.view,u=n.fn,a=n.hash,f;"string"==typeof t?f=r.get(e,t,n):f=t;var l=this.propertiesFromHTMLOptions(n,e),c=s.view;l.templateData=n.data;var h=f.proto?f.proto():f;u&&(l.template=u),!h.controller&&!h.controllerBinding&&!l.controller&&!l.controllerBinding&&(l._context=e),c.appendChild(f,l)}}),r.registerHelper("view",function(e,t){return e&&e.data&&e.data.isRenderData&&(t=e,e="Ember.View"),r.ViewHelper.helper(this,e,t)})}(),function(){var e=Ember.get,t=Ember.Handlebars.get,n=Ember.String.fmt;Ember.Handlebars.registerHelper("collection",function(n,r){n&&n.data&&n.data.isRenderData&&(r=n,n=undefined);var i=r.fn,s=r.data,o=r.inverse,u=r.data.view,a;a=n?t(this,n,r):Ember.CollectionView;var f=r.hash,l={},c,h,p=f.itemViewClass,d=a.proto();delete f.itemViewClass,h=p?t(d,p,r):d.itemViewClass;for(var v in f)f.hasOwnProperty(v)&&(c=v.match(/^item(.)(.*)$/),c&&v!=="itemController"&&(l[c[1].toLowerCase()+c[2]]=f[v],delete f[v]));var m=f.tagName||d.tagName;i&&(l.template=i,delete r.fn);var g;o&&o!==Handlebars.VM.noop?(g=e(d,"emptyViewClass"),g=g.extend({template:o,tagName:l.tagName})):f.emptyViewClass&&(g=t(this,f.emptyViewClass,r)),g&&(f.emptyView=g),f.keyword||(l._context=Ember.computed.alias("content"));var y=u.toString(),b=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:s,hash:l},this);return f.itemViewClass=h.extend(b),Ember.Handlebars.helpers.view.call(this,a,r)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,n){var r=arguments[arguments.length-1],i,s,o;return arguments.length>2?(r.data.isUnbound=!0,i=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helperMissing,o=i.apply(this,Array.prototype.slice.call(arguments,1)),delete r.data.isUnbound,o):(s=n.contexts&&n.contexts[0]||this,e(s,t,n))})}(),function(){var e=Ember.Handlebars.get,t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(n,r){var i=r.contexts&&r.contexts[0]||this,s=t(i,n,r.data),o=s.root,u=s.path,a=u==="this"?o:e(o,u,r);Ember.Logger.log(a)}),Ember.Handlebars.registerHelper("debugger",function(){debugger})}(),function(){var e=Ember.get,t=Ember.set;Ember.Handlebars.EachView=Ember.CollectionView.extend(Ember._Metamorph,{init:function(){var n=e(this,"itemController"),r;if(n){var i=Ember.ArrayController.create();t(i,"itemController",n),t(i,"container",e(this,"controller.container")),t(i,"_eachView",this),t(i,"target",e(this,"controller")),this.disableContentObservers(function(){t(this,"content",i),r=(new Ember.Binding("content","_eachView.dataSource")).oneWay(),r.connect(i)}),t(this,"_arrayController",i)}else this.disableContentObservers(function(){r=(new Ember.Binding("content","dataSource")).oneWay(),r.connect(this)});return this._super()},disableContentObservers:function(e){Ember.removeBeforeObserver(this,"content",null,"_contentWillChange"),Ember.removeObserver(this,"content",null,"_contentDidChange"),e.apply(this),Ember.addBeforeObserver(this,"content",null,"_contentWillChange"),Ember.addObserver(this,"content",null,"_contentDidChange")},itemViewClass:Ember._MetamorphView,emptyViewClass:Ember._MetamorphView,createChildView:function(n,r){n=this._super(n,r);var i=e(this,"keyword"),s=e(n,"content");if(i){var o=e(n,"templateData");o=Ember.copy(o),o.keywords=n.cloneKeywords(),t(n,"templateData",o),o.keywords[i]=s}return s&&e(s,"isController")&&t(n,"controller",s),n},willDestroy:function(){var t=e(this,"_arrayController");return t&&t.destroy(),this._super()}});var n=Ember.Handlebars.GroupedEach=function(e,t,n){var r=this,i=Ember.Handlebars.normalizePath(e,t,n.data);this.context=e,this.path=t,this.options=n,this.template=n.fn,this.containingView=n.data.view,this.normalizedRoot=i.root,this.normalizedPath=i.path,this.content=this.lookupContent(),this.addContentObservers(),this.addArrayObservers(),this.containingView.on("willClearRender",function(){r.destroy()})};n.prototype={contentWillChange:function(){this.removeArrayObservers()},contentDidChange:function(){this.content=this.lookupContent(),this.addArrayObservers(),this.rerenderContainingView()},contentArrayWillChange:Ember.K,contentArrayDidChange:function(){this.rerenderContainingView()},lookupContent:function(){return Ember.Handlebars.get(this.normalizedRoot,this.normalizedPath,this.options)},addArrayObservers:function(){this.content.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},removeArrayObservers:function(){this.content.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},addContentObservers:function(){Ember.addBeforeObserver(this.normalizedRoot,this.normalizedPath,this,this.contentWillChange),Ember.addObserver(this.normalizedRoot,this.normalizedPath,this,this.contentDidChange)},removeContentObservers:function(){Ember.removeBeforeObserver(this.normalizedRoot,this.normalizedPath,this.contentWillChange),Ember.removeObserver(this.normalizedRoot,this.normalizedPath,this.contentDidChange)},render:function(){var t=this.content,n=e(t,"length"),r=this.options.data,i=this.template;r.insideEach=!0;for(var s=0;s<n;s++)i(t.objectAt(s),{data:r})},rerenderContainingView:function(){Ember.run.scheduleOnce("render",this.containingView,"rerender")},destroy:function(){this.removeContentObservers(),this.removeArrayObservers()}},Ember.Handlebars.registerHelper("each",function(e,t){if(arguments.length===4){var n=arguments[0];t=arguments[3],e=arguments[2],e===""&&(e="this"),t.hash.keyword=n}t.hash.dataSourceBinding=e;if(!(t.data.insideGroup&&!t.hash.groupedRows&&!t.hash.itemViewClass))return Ember.Handlebars.helpers.collection.call(this,"Ember.Handlebars.EachView",t);(new Ember.Handlebars.GroupedEach(this,e,t)).render()})}(),function(){Ember.Handlebars.registerHelper("template",function(e,t){var n=Ember.TEMPLATES[e];Ember.TEMPLATES[e](this,{data:t.data})}),Ember.Handlebars.registerHelper("partial",function(e,t){var n=e.split("/"),r=n[n.length-1];n[n.length-1]="_"+r;var i=n.join("/"),s=Ember.TEMPLATES[i],o=Ember.TEMPLATES[e];s=s||o,s(this,{data:t.data})})}(),function(){var e=Ember.get,t=Ember.set;Ember.Handlebars.registerHelper("yield",function(t){var n=t.data.view,r;while(n&&!e(n,"layout"))n=e(n,"parentView");r=e(n,"template"),r&&r(this,t)})}(),function(){}(),function(){}(),function(){var e=Ember.set,t=Ember.get;Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","disabled","tabindex"],type:"checkbox",checked:!1,disabled:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},_updateElementValue:function(){e(this,"checked",this.$().prop("checked"))}})}(),function(){var e=Ember.get,t=Ember.set;Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex"],placeholder:null,disabled:!1,maxlength:null,insertNewline:Ember.K,cancel:Ember.K,init:function(){this._super(),this.on("focusOut",this,this._elementValueDidChange),this.on("change",this,this._elementValueDidChange),this.on("paste",this,this._elementValueDidChange),this.on("cut",this,this._elementValueDidChange),this.on("input",this,this._elementValueDidChange),this.on("keyUp",this,this.interpretKeyEvents)},interpretKeyEvents:function(e){var t=Ember.TextSupport.KEY_EVENTS,n=t[e.keyCode];this._elementValueDidChange();if(n)return this[n](e)},_elementValueDidChange:function(){t(this,"value",this.$().val())}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){var e=Ember.get,t=Ember.set;Ember.TextField=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern"],value:"",type:"text",size:null,pattern:null,action:null,bubbles:!1,insertNewline:function(t){var n=e(this,"controller"),r=e(this,"action");r&&(n.send(r,e(this,"value"),this),e(this,"bubbles")||t.stopPropagation())}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Button=Ember.View.extend(Ember.TargetActionSupport,{classNames:["ember-button"],classNameBindings:["isActive"],tagName:"button",propagateEvents:!1,attributeBindings:["type","disabled","href","tabindex"],targetObject:Ember.computed(function(){var t=e(this,"target"),n=e(this,"context"),r=e(this,"templateData");return typeof t!="string"?t:Ember.Handlebars.get(n,t,{data:r})}).property("target"),type:Ember.computed(function(e){var t=this.tagName;if(t==="input"||t==="button")return"button"}),disabled:!1,href:Ember.computed(function(){return this.tagName==="a"?"#":null}),mouseDown:function(){return e(this,"disabled")||(t(this,"isActive",!0),this._mouseDown=!0,this._mouseEntered=!0),e(this,"propagateEvents")},mouseLeave:function(){this._mouseDown&&(t(this,"isActive",!1),this._mouseEntered=!1)},mouseEnter:function(){this._mouseDown&&(t(this,"isActive",!0),this._mouseEntered=!0)},mouseUp:function(n){return e(this,"isActive")&&(this.triggerAction(),t(this,"isActive",!1)),this._mouseDown=!1,this._mouseEntered=!1,e(this,"propagateEvents")},keyDown:function(e){(e.keyCode===13||e.keyCode===32)&&this.mouseDown()},keyUp:function(e){(e.keyCode===13||e.keyCode===32)&&this.mouseUp()},touchStart:function(e){return this.mouseDown(e)},touchEnd:function(e){return this.mouseUp(e)},init:function(){this._super()}})}(),function(){var e=Ember.get,t=Ember.set;Ember.TextArea=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols"],rows:null,cols:null,_updateElementValue:Ember.observer(function(){var t=e(this,"value"),n=this.$();n&&t!==n.val()&&n.val(t)},"value"),init:function(){this._super(),this.on("didInsertElement",this,this._updateElementValue)}})}(),function(){var e=Ember.set,t=Ember.get,n=Ember.EnumerableUtils.indexOf,r=Ember.EnumerableUtils.indexesOf,i=Ember.EnumerableUtils.replace,s=Ember.isArray,o=Ember.Handlebars.compile;Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(t,n,r,i,s){function c(e,t){var n="",i;return t.buffer.push('<option value="">'),i={},t.buffer.push(f(r._triageMustache.call(e,"view.prompt",{hash:{},contexts:[e],types:["ID"],hashTypes:i,data:t}))),t.buffer.push("</option>"),n}function h(e,t){var n;n={contentBinding:"STRING"},t.buffer.push(f(r.view.call(e,"Ember.SelectOption",{hash:{contentBinding:"this"},contexts:[e],types:["ID"],hashTypes:n,data:t})))}this.compilerInfo=[2,">= 1.0.0-rc.3"],r=r||Ember.Handlebars.helpers,s=s||{};var o="",u,a,f=this.escapeExpression,l=this;return a={},u=r["if"].call(n,"view.prompt",{hash:{},inverse:l.noop,fn:l.program(1,c,s),contexts:[n],types:["ID"],hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),a={},u=r.each.call(n,"view.content",{hash:{},inverse:l.noop,fn:l.program(3,h,s),contexts:[n],types:["ID"],hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),o}),attributeBindings:["multiple","disabled","tabindex"],multiple:!1,disabled:!1,content:null,selection:null,value:Ember.computed(function(e,n){if(arguments.length===2)return n;var r=t(this,"optionValuePath").replace(/^content\.?/,"");return r?t(this,"selection."+r):t(this,"selection")}).property("selection"),prompt:null,optionLabelPath:"content",optionValuePath:"content",_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer(function(){var n=t(this,"selection");if(t(this,"multiple")){if(!s(n)){e(this,"selection",Ember.A([n]));return}this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()},"selection.@each"),valueDidChange:Ember.observer(function(){var e=t(this,"content"),n=t(this,"value"),r=t(this,"optionValuePath").replace(/^content\.?/,""),i=r?t(this,"selection."+r):t(this,"selection"),s;n!==i&&(s=e.find(function(e){return n===(r?t(e,r):e)}),this.set("selection",s))},"value"),_triggerChange:function(){var e=t(this,"selection"),n=t(this,"value");e&&this.selectionDidChange(),n&&this.valueDidChange(),this._change()},_changeSingle:function(){var n=this.$()[0].selectedIndex,r=t(this,"content"),i=t(this,"prompt");if(!t(r,"length"))return;if(i&&n===0){e(this,"selection",null);return}i&&(n-=1),e(this,"selection",r.objectAt(n))},_changeMultiple:function(){var n=this.$("option:selected"),r=t(this,"prompt"),o=r?1:0,u=t(this,"content"),a=t(this,"selection");if(!u)return;if(n){var f=n.map(function(){return this.index-o}).toArray(),l=u.objectsAt(f);s(a)?i(a,0,t(a,"length"),l):e(this,"selection",l)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(!e)return;var r=t(this,"content"),i=t(this,"selection"),s=r?n(r,i):-1,o=t(this,"prompt");o&&(s+=1),e&&(e.selectedIndex=s)},_selectionDidChangeMultiple:function(){var e=t(this,"content"),i=t(this,"selection"),s=e?r(e,i):[-1],o=t(this,"prompt"),u=o?1:0,a=this.$("option"),f;a&&a.each(function(){f=this.index>-1?this.index-u:-1,this.selected=n(s,f)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}}),Ember.SelectOption=Ember.View.extend({tagName:"option",attributeBindings:["value","selected"],defaultTemplate:function(e,t){t={data:t.data,hash:{}},Ember.Handlebars.helpers.bind.call(e,"view.label",t)},init:function(){this.labelPathDidChange(),this.valuePathDidChange(),this._super()},selected:Ember.computed(function(){var e=t(this,"content"),r=t(this,"parentView.selection");return t(this,"parentView.multiple")?r&&n(r,e.valueOf())>-1:e==r}).property("content","parentView.selection").volatile(),labelPathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionLabelPath");if(!e)return;Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionLabelPath"),valuePathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionValuePath");if(!e)return;Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionValuePath")})}(),function(){}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}Ember.Handlebars.bootstrap=function(e){var t='script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';Ember.$(t,e).each(function(){var e=Ember.$(this),t=e.attr("type")==="text/x-raw-handlebars"?Ember.$.proxy(Handlebars.compile,Handlebars):Ember.$.proxy(Ember.Handlebars.compile,Ember.Handlebars),n=e.attr("data-template-name")||e.attr("id")||"application",r=t(e.html());Ember.TEMPLATES[n]=r,e.remove()})},Ember.onLoad("application",e)}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){var e=Ember.get,t=Ember.set;Ember._PromiseChain=Ember.Object.extend({promises:null,failureCallback:Ember.K,successCallback:Ember.K,abortCallback:Ember.K,promiseSuccessCallback:Ember.K,runNextPromise:function(){if(e(this,"isDestroyed"))return;var t=e(this,"promises").shiftObject();if(t){var n=e(t,"promise")||t,r=this,i=function(){r.promiseSuccessCallback.call(this,t,arguments),r.runNextPromise()},s=e(r,"failureCallback");n.then(i,s)}else this.successCallback()},start:function(){return this.runNextPromise(),this},abort:function(){this.abortCallback(),this.destroy()},init:function(){t(this,"promises",Ember.A(e(this,"promises"))),this._super()}})}(),function(){function e(t,n,r,i){var s=t.name,o=t.incoming,u=t.incomingNames,a=u.length,f;r||(r={}),i||(i=[]);if(r.hasOwnProperty(s))return;i.push(s),r[s]=!0;for(f=0;f<a;f++)e(o[u[f]],n,r,i);n(t,i),i.pop()}function t(){this.names=[],this.vertices={}}t.prototype.add=function(e){if(!e)return;if(this.vertices.hasOwnProperty(e))return this.vertices[e];var t={name:e,incoming:{},incomingNames:[],hasOutgoing:!1,value:null};return this.vertices[e]=t,this.names.push(e),t},t.prototype.map=function(e,t){this.add(e).value=t},t.prototype.addEdge=function(t,n){function s(e,t){if(e.name===n)throw new Error("cycle detected: "+n+" <- "+t.join(" <- "))}if(!t||!n||t===n)return;var r=this.add(t),i=this.add(n);if(i.incoming.hasOwnProperty(t))return;e(r,s),r.hasOutgoing=!0,i.incoming[t]=r,i.incomingNames.push(t)},t.prototype.topsort=function(t){var n={},r=this.vertices,i=this.names,s=i.length,o,u;for(o=0;o<s;o++)u=r[i[o]],u.hasOutgoing||e(u,t,n)},t.prototype.addEdges=function(e,t,n,r){var i;this.map(e,t);if(n)if(typeof n=="string")this.addEdge(e,n);else for(i=0;i<n.length;i++)this.addEdge(e,n[i]);if(r)if(typeof r=="string")this.addEdge(r,e);else for(i=0;i<r.length;i++)this.addEdge(r[i],e)},Ember.DAG=t}(),function(){var e=Ember.get,t=Ember.set;Ember.Application=Ember.Namespace.extend({rootElement:"body",eventDispatcher:null,customEvents:null,autoinit:!Ember.testing,isInitialized:!1,init:function(){this.$||(this.$=Ember.$),this._super(),this.createEventDispatcher(),this._readinessDeferrals=1,this.waitForDOMContentLoaded();if(this.autoinit){var e=this;this.$().ready(function(){if(e.isDestroyed||e.isInitialized)return;e.initialize()})}},createEventDispatcher:function(){var n=e(this,"rootElement"),r=Ember.EventDispatcher.create({rootElement:n});t(this,"eventDispatcher",r)},waitForDOMContentLoaded:function(){this.deferReadiness();var e=this;this.$().ready(function(){e.advanceReadiness()})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,this._readinessDeferrals===0&&Ember.run.once(this,this.didBecomeReady)},initialize:function(e){return e=this.setupRouter(e),this.runInjections(e),Ember.runLoadHooks("application",this),this.isInitialized=!0,this.advanceReadiness(),this},runInjections:function(t){var n=e(this.constructor,"injections"),r=new Ember.DAG,i=this,s,o,u;for(o=0;o<n.length;o++)u=n[o],r.addEdges(u.name,u.injection,u.before,u.after);r.topsort(function(e){var n=e.value,r=Ember.A(Ember.keys(i));r.forEach(function(e){n(i,t,e)})})},setupRouter:function(e){return!e&&Ember.Router.detect(this.Router)&&(e=this.Router.create(),this._createdRouter=e),e&&(t(this,"router",e),t(e,"namespace",this)),e},didBecomeReady:function(){var t=e(this,"eventDispatcher"),n=e(this,"customEvents"),r;t.setup(n),this.ready(),r=e(this,"router"),this.createApplicationView(r),r&&r instanceof Ember.Router&&this.startRouting(r),Ember.BOOTED=!0},createApplicationView:function(n){var r=e(this,"rootElement"),i={},s=this.ApplicationView,o=Ember.TEMPLATES.application,u,a;if(!s&&!o)return;n&&(u=e(n,"applicationController"),u&&(i.controller=u)),o&&(i.template=o),s||(s=Ember.View),a=s.create(i),this._createdApplicationView=a,n&&t(n,"applicationView",a),a.appendTo(r)},startRouting:function(t){var n=e(t,"location");t.route(n.getURL()),n.onUpdateURL(function(e){t.route(e)})},ready:Ember.K,willDestroy:function(){e(this,"eventDispatcher").destroy(),this._createdRouter&&this._createdRouter.destroy(),this._createdApplicationView&&this._createdApplicationView.destroy()},registerInjection:function(e){this.constructor.registerInjection(e)}}),Ember.Application.reopenClass({concatenatedProperties:["injections"],injections:Ember.A(),registerInjection:function(t){var n=e(this,"injections");n.push(t)}}),Ember.Application.registerInjection({name:"controllers",injection:function(e,t,n){if(!t)return;if(!/^[A-Z].*Controller$/.test(n))return;var r=n.charAt(0).toLowerCase()+n.substr(1),i=e[n],s;if(!Ember.Object.detect(i))return;s=e[n].create(),t.set(r,s),s.setProperties({target:t,controllers:t,namespace:e})}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){}(),function(){}(),function(){var e=Ember.get;Ember._ResolvedState=Ember.Object.extend({manager:null,state:null,match:null,object:Ember.computed(function(t){if(this._object)return this._object;var n=e(this,"state"),r=e(this,"match"),i=e(this,"manager");return n.deserialize(i,r.hash)}),hasPromise:Ember.computed(function(){return Ember.canInvoke(e(this,"object"),"then")}).property("object"),promise:Ember.computed(function(){var t=e(this,"object");return Ember.canInvoke(t,"then")?t:{then:function(e){e(t)}}}).property("object"),transition:function(){var t=e(this,"manager"),n=e(this,"state.path"),r=e(this,"object");t.transitionTo(n,r)}})}(),function(){var e=Ember.get,t=function(e){var t=e.toString(),n=t.split("."),r=n[n.length-1];return Ember.String.underscore(r)+"_id"},n=function(e,t){for(var n in t){if(!t.hasOwnProperty(n))continue;if(e.hasOwnProperty(n))continue;e[n]=t[n]}};Ember.Routable=Ember.Mixin.create({init:function(){var t;this.on("setup",this,this.stashContext);if(t=e(this,"redirectsTo"))this.connectOutlets=function(e){e.transitionTo(t)};var n=e(this,"route");n===""&&(n="/"),this._super()},setup:function(){return this.connectOutlets.apply(this,arguments)},stashContext:function(t,n){this.router=t;var r=this.serialize(t,n);t.setStateMeta(this,"context",n),t.setStateMeta(this,"serialized",r),e(this,"isRoutable")&&!e(t,"isRouting")&&this.updateRoute(t,e(t,"location"))},updateRoute:function(t,n){if(e(this,"isLeafRoute")){var r=this.absoluteRoute(t);n.setURL(r)}},absoluteRoute:function(t,r){var i=e(this,"parentState"),s="",o,u;u=null,r&&(r instanceof Array?r.length>0&&(u=r.shift()):u=r),e(i,"isRoutable")&&(s=i.absoluteRoute(t,r));var a=e(this,"routeMatcher"),f=t.getStateMeta(this,"serialized");return u=u||{},n(u,f),o=a&&a.generate(u),o&&(s=s+"/"+o),s},isRoutable:Ember.computed(function(){return typeof e(this,"route")=="string"}),isLeafRoute:Ember.computed(function(){return e(this,"isLeaf")?!0:!e(this,"childStates").findProperty("isRoutable")}),routeMatcher:Ember.computed(function(){var t=e(this,"route");if(t)return Ember._RouteMatcher.create({route:t})}),hasContext:Ember.computed(function(){var t=e(this,"routeMatcher");if(t)return t.identifiers.length>0}),modelClass:Ember.computed(function(){var t=e(this,"modelType");return typeof t=="string"?Ember.get(Ember.lookup,t):t}),modelClassFor:function(t){var n,r,i,s,o;if(n=e(this,"modelClass"))return n;if(!t)return;r=e(this,"routeMatcher");if(!r)return;i=r.identifiers;if(i.length!==2)return;s=i[1].match(/^(.*)_id$/);if(!s)return;return o=Ember.String.classify(s[1]),e(t,o)},deserialize:function(n,r){var i,s,o;return(i=this.modelClassFor(e(n,"namespace")))?i.find(r[t(i)]):r},serialize:function(n,r){var i,s,o,u,a;if(Ember.isEmpty(r))return"";if(i=this.modelClassFor(e(n,"namespace")))u=t(i),a=e(r,"id"),r={},r[u]=a;return r},resolvePath:function(t,n){if(e(this,"isLeafRoute"))return Ember.A();var r=e(this,"childStates"),i;r=Ember.A(r.filterProperty("isRoutable")),r=r.sort(function(t,n){var r=e(t,"routeMatcher.identifiers.length"),i=e(n,"routeMatcher.identifiers.length"),s=e(t,"route"),o=e(n,"route");return s.indexOf(o)===0?-1:o.indexOf(s)===0?1:r!==i?r-i:e(n,"route.length")-e(t,"route.length")});var s=r.find(function(t){var r=e(t,"routeMatcher");if(i=r.match(n))return!0}),o=Ember._ResolvedState.create({manager:t,state:s,match:i}),u=s.resolvePath(t,i.remaining);return Ember.A([o]).pushObjects(u)},routePath:function(t,n){function s(){r.forEach(function(e){e.transition()})}if(e(this,"isLeafRoute"))return;var r=this.resolvePath(t,n),i=r.some(function(t){return e(t,"hasPromise")});i?(t.transitionTo("loading"),t.handleStatePromises(r,s)):s()},unroutePath:function(t,n){var r=e(this,"parentState");if(r===t)return;n=n.replace(/^(?=[^\/])/,"/");var i=this.absoluteRoute(t),s=e(this,"route");if(s!=="/"){var o=n.indexOf(i),u=n.charAt(i.length);if(o===0&&(u==="/"||u===""))return}t.enterState({exitStates:[this],enterStates:[],finalState:r}),t.send("unroutePath",n)},parentTemplate:Ember.computed(function(){var t=this,n,r;while(t=e(t,"parentState"))if(r=e(t,"template"))return r;return"application"}),_template:Ember.computed(function(t){var n=e(this,"template");if(n)return n;var r=
20
- this.constructor.toString(),i;if(/^[^\[].*Route$/.test(r))return i=r.match(/([^\.]+\.)*([^\.]+)/)[2],i=i.replace(/Route$/,""),i.charAt(0).toLowerCase()+i.substr(1)}),render:function(t){t=t||{};var n=t.template||e(this,"_template"),r=t.into||e(this,"parentTemplate"),i=e(this.router,r+"Controller"),s=Ember.String.classify(n)+"View",o=e(e(this.router,"namespace"),s);o=(o||Ember.View).extend({templateName:n}),i.set("view",o.create())},connectOutlets:Ember.K,navigateAway:Ember.K})}(),function(){Ember.Route=Ember.State.extend(Ember.Routable)}(),function(){var e=function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^\$|#\s]/g,"\\$&")};Ember._RouteMatcher=Ember.Object.extend({state:null,init:function(){var t=this.route,n=[],r=1,i;t.charAt(0)==="/"&&(t=this.route=t.substr(1)),i=e(t);var s=i.replace(/(:|(?:\\\*))([a-z_]+)(?=$|\/)/gi,function(e,t,i){n[r++]=i;switch(t){case":":return"([^/]+)";case"\\*":return"(.+)"}});this.identifiers=n,this.regex=new RegExp("^/?"+s)},match:function(e){var t=e.match(this.regex);if(t){var n=this.identifiers,r={};for(var i=1,s=n.length;i<s;i++)r[n[i]]=t[i];return{remaining:e.substr(t[0].length),hash:n.length>0?r:null}}},generate:function(e){var t=this.identifiers,n=this.route,r;for(var i=1,s=t.length;i<s;i++)r=t[i],n=n.replace(new RegExp("(:|(\\*))"+r),e[r]);return n}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Location={create:function(e){var t=e&&e.implementation,n=this.implementations[t];return n.create.apply(n,arguments)},registerImplementation:function(e,t){this.implementations[e]=t},implementations:{}}}(),function(){var e=Ember.get,t=Ember.set;Ember.NoneLocation=Ember.Object.extend({path:"",getURL:function(){return e(this,"path")},setURL:function(e){t(this,"path",e)},onUpdateURL:function(e){},formatURL:function(e){return e}}),Ember.Location.registerImplementation("none",Ember.NoneLocation)}(),function(){var e=Ember.get,t=Ember.set;Ember.HashLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location)},getURL:function(){return e(this,"location").hash.substr(1)},setURL:function(n){e(this,"location").hash=n,t(this,"lastSetURL",n)},onUpdateURL:function(n){var r=this,i=Ember.guidFor(this);Ember.$(window).bind("hashchange.ember-location-"+i,function(){var i=location.hash.substr(1);if(e(r,"lastSetURL")===i)return;t(r,"lastSetURL",null),n(location.hash.substr(1))})},formatURL:function(e){return"#"+e},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("hashchange.ember-location-"+e)}}),Ember.Location.registerImplementation("hash",Ember.HashLocation)}(),function(){var e=Ember.get,t=Ember.set,n=!1;Ember.HistoryLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location),this.initState()},initState:function(){this.replaceState(e(this,"location").pathname),t(this,"history",window.history)},rootURL:"/",getURL:function(){return e(this,"location").pathname},setURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&(n=!0,this.pushState(e))},getState:function(){return e(this,"history").state},pushState:function(e){window.history.pushState({path:e},null,e)},replaceState:function(e){window.history.replaceState({path:e},null,e)},onUpdateURL:function(e){var t=Ember.guidFor(this);Ember.$(window).bind("popstate.ember-location-"+t,function(t){if(!n)return;e(location.pathname)})},formatURL:function(t){var n=e(this,"rootURL");return t!==""&&(n=n.replace(/\/$/,"")),n+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("popstate.ember-location-"+e)}}),Ember.Location.registerImplementation("history",Ember.HistoryLocation)}(),function(){}(),function(){var e=Ember.get,t=Ember.set,n=function(e,t){for(var n in t){if(!t.hasOwnProperty(n))continue;if(e.hasOwnProperty(n))continue;e[n]=t[n]}};Ember.Router=Ember.StateManager.extend({initialState:"root",location:"hash",rootURL:"/",transitionTo:function(){this.abortRoutingPromises(),this._super.apply(this,arguments)},route:function(n){function i(){n=n.replace(e(this,"rootURL"),""),n=n.replace(/^(?=[^\/])/,"/"),this.send("navigateAway"),this.send("unroutePath",n),r=e(this,"currentState");while(r&&!r.get("isRoutable"))r=e(r,"parentState");var t=r?r.absoluteRoute(this):"",i=n.substr(t.length);this.send("routePath",i)}function s(){t(this,"isRouting",!1)}this.abortRoutingPromises(),t(this,"isRouting",!0);var r;Ember.tryFinally(i,s,this),r=e(this,"currentState");while(r&&!r.get("isRoutable"))r=e(r,"parentState");r&&r.updateRoute(this,e(this,"location"))},urlFor:function(t,n){var r=e(this,"currentState")||this,i=this.findStateByPath(r,t),s=e(this,"location"),o=i.absoluteRoute(this,n);return s.formatURL(o)},urlForEvent:function(t){var n=Array.prototype.slice.call(arguments,1),r=e(this,"currentState"),i=r.lookupEventTransition(t),s,o;return s=this.findStateByPath(r,i),o=this.serializeRecursively(s,n,[]),this.urlFor(i,o)},serializeRecursively:function(t,n,r){var i,s=e(t,"hasContext")?n.pop():null,o=s?t.serialize(this,s):null;return r.push(o),i=t.get("parentState"),i&&i instanceof Ember.Route?this.serializeRecursively(i,n,r):r},abortRoutingPromises:function(){this._routingPromises&&(this._routingPromises.abort(),this._routingPromises=null)},handleStatePromises:function(e,n){this.abortRoutingPromises(),this.set("isLocked",!0);var r=this;this._routingPromises=Ember._PromiseChain.create({promises:e.slice(),successCallback:function(){r.set("isLocked",!1),n()},failureCallback:function(){throw"Unable to load object"},promiseSuccessCallback:function(e,n){t(e,"object",n[0])},abortCallback:function(){r.set("isLocked",!1)}}).start()},moveStatesIntoRoot:function(){this.root=Ember.Route.extend();for(var e in this){if(e==="constructor")continue;var t=this[e];if(t instanceof Ember.Route||Ember.Route.detect(t))this.root[e]=t,delete this[e]}},init:function(){this.root||this.moveStatesIntoRoot(),this._super();var n=e(this,"location"),r=e(this,"rootURL");"string"==typeof n&&t(this,"location",Ember.Location.create({implementation:n,rootURL:r})),this.assignRouter(this,this)},assignRouter:function(e,t){e.router=t;var n=e.states;if(n)for(var r in n){if(!n.hasOwnProperty(r))continue;this.assignRouter(n[r],t)}},willDestroy:function(){e(this,"location").destroy()}})}(),function(){var e=Ember.Handlebars,t=e.get,n=Ember.get,r=Array.prototype.slice,i=e.ActionHelper={registeredActions:{}};i.registerAction=function(e,t){var n=(++Ember.uuid).toString();return i.registeredActions[n]={eventName:t.eventName,handler:function(n){var r=n.shiftKey||n.metaKey||n.altKey||n.ctrlKey,i=n.which>1,s=r||i;if(t.link&&s)return;n.preventDefault(),n.view=t.view,t.hasOwnProperty("context")&&(n.context=t.context),t.hasOwnProperty("contexts")&&(n.contexts=t.contexts);var o=t.target;return typeof o.send=="function"?o.send(e,n):o[e].call(o,n)}},t.view.on("willClearRender",function(){delete i.registeredActions[n]}),n},e.registerHelper("action",function(s){var o=arguments[arguments.length-1],u=r.call(arguments,1,-1),a=o.hash,f=o.data.view,l,c,h,p={eventName:a.on||"click"};p.view=f=n(f,"concreteView");if(a.target)l=t(this,a.target,o);else if(c=o.data.keywords.controller)l=c;p.target=l=l||f,u.length&&(p.contexts=u=Ember.EnumerableUtils.map(u,function(e){return t(this,e,o)},this),p.context=u[0]);var d=[],v;a.href&&l.urlForEvent&&(v=l.urlForEvent.apply(l,[s].concat(u)),d.push('href="'+v+'"'),p.link=!0);var m=i.registerAction(s,p);return d.push('data-ember-action="'+m+'"'),new e.SafeString(d.join(" "))})}(),function(){}(),function(){Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,n){return t&&t.data&&t.data.isRenderData&&(n=t,t="view"),n.hash.currentViewBinding="view.context."+t,e.helpers.view.call(this,e.OutletView,n)})})}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({controllers:null,connectOutlet:function(n,r){var i,s,o,u,a;Ember.typeOf(r)==="string"&&(i=n,n=r,r=arguments[2]),arguments.length===1?Ember.typeOf(n)==="object"&&(a=n,i=a.outletName,n=a.name,s=a.viewClass,u=a.controller,r=a.context):a={},i=i||"view";if(n){var f=e(this,"namespace"),l=e(this,"controllers"),c=n.charAt(0).toUpperCase()+n.substr(1)+"View";s=e(f,c),u=e(l,n+"Controller")}return u&&r&&t(u,"content",r),o=this.createOutletView(i,s),u&&t(o,"controller",u),t(this,i,o),o},connectControllers:function(){var n=e(this,"controllers"),r=Array.prototype.slice.apply(arguments),i;for(var s=0,o=r.length;s<o;s++)i=r[s]+"Controller",t(this,i,e(n,i))},disconnectOutlet:function(e){e=e||"view",t(this,e,null)},createOutletView:function(e,t){return t.create()},urlForEvent:function(t,n){var r=e(this,"target");if(r)return r.urlForEvent(t,n)}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.String.fmt;Ember.View.reopen({templateForName:function(t,r){if(!t)return;var i=e(this,"templates"),s=e(i,t);if(!s)throw new Ember.Error(n('%@ - Unable to find %@ "%@".',[this,r,t]));return s}})}(),function(){}()})(),typeof location!="undefined"&&(location.hostname==="localhost"||location.hostname==="127.0.0.1")&&console.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website.");
16
+ e,this._directionMap=Ember.Map.create()};s.prototype={copy:function(){var e=new s(this._to,this._from);return this._oneWay&&(e._oneWay=!0),e},from:function(e){return this._from=e,this},to:function(e){return this._to=e,this},oneWay:function(){return this._oneWay=!0,this},toString:function(){var e=this._oneWay?"[oneWay]":"";return"Ember.Binding<"+n(this)+">("+this._from+" -> "+this._to+")"+e},connect:function(e){var t=this._from,n=this._to;return Ember.trySet(e,n,i(e,t)),Ember.addObserver(e,t,this,this.fromDidChange),this._oneWay||Ember.addObserver(e,n,this,this.toDidChange),this._readyToSync=!0,this},disconnect:function(e){var t=!this._oneWay;return Ember.removeObserver(e,this._from,this,this.fromDidChange),t&&Ember.removeObserver(e,this._to,this,this.toDidChange),this._readyToSync=!1,this},fromDidChange:function(e){this._scheduleSync(e,"fwd")},toDidChange:function(e){this._scheduleSync(e,"back")},_scheduleSync:function(e,t){var n=this._directionMap,r=n.get(e);r||(Ember.run.schedule("sync",this,this._sync,e),n.set(e,t)),r==="back"&&t==="fwd"&&n.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(t.isDestroyed||!this._readyToSync)return;var r=this._directionMap,s=r.get(t),o=this._from,u=this._to;r.remove(t);if(s==="fwd"){var a=i(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",a,t),this._oneWay?Ember.trySet(t,u,a):Ember._suspendObserver(t,u,this,this.toDidChange,function(){Ember.trySet(t,u,a)})}else if(s==="back"){var f=e(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",f,t),Ember._suspendObserver(t,o,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(o)?Ember.lookup:t,o,f)})}}},o(s,{from:function(){var e=this,t=new e;return t.from.apply(t,arguments)},to:function(){var e=this,t=new e;return t.to.apply(t,arguments)},oneWay:function(e,t){var n=this,r=new n(null,e);return r.oneWay(t)}}),Ember.Binding=s,Ember.bind=function(e,t,n){return(new Ember.Binding(t,n)).connect(e)},Ember.oneWay=function(e,t,n){return(new Ember.Binding(t,n)).oneWay().connect(e)}}(),function(){function c(e){var t=Ember.meta(e,!0),n=t.mixins;return n?t.hasOwnProperty("mixins")||(n=t.mixins=a(n)):n=t.mixins={},n}function h(t,n){return n&&n.length>0&&(t.mixins=r.call(n,function(t){if(t instanceof e)return t;var n=new e;return n.properties=t,n})),t}function p(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function v(t,n){var r;return n instanceof e?(r=l(n),t[r]?d:(t[r]=n,n.properties)):n}function m(e,t,n){var r;return r=t.concatenatedProperties||n.concatenatedProperties,e.concatenatedProperties&&(r=r?r.concat(e.concatenatedProperties):e.concatenatedProperties),r}function g(e,t,n,r,i){var s;return r[t]===undefined&&(s=i[t]),s=s||e.descs[t],!!s&&s instanceof Ember.ComputedProperty?(n=a(n),n.func=Ember.wrap(n.func,s.func),n):n}function y(e,t,n,r,i){var s;return i[t]===undefined&&(s=r[t]),s=s||e[t],"function"!=typeof s?n:Ember.wrap(n,s)}function b(e,t,n,r){var i=r[t]||e[t];return i?"function"==typeof i.concat?i.concat(n):Ember.makeArray(i).concat(n):Ember.makeArray(n)}function w(e,n,r,s,o,u,a){if(r instanceof Ember.Descriptor){if(r===t&&o[n])return d;r.func&&(r=g(s,n,r,u,o)),o[n]=r,u[n]=undefined}else{if(p(r))r=y(e,n,r,u,o);else if(a&&i.call(a,n)>=0||n==="concatenatedProperties")r=b(e,n,r,u);o[n]=undefined,u[n]=r}}function E(e,t,n,r,i){function c(e){delete n[e],delete r[e]}var o,u,a,f,l;for(var h=0,p=e.length;h<p;h++){o=e[h],u=v(t,o);if(u===d)continue;if(u){l=Ember.meta(i),f=m(u,r,i);for(a in u){if(!u.hasOwnProperty(a))continue;w(i,a,u[a],l,n,r,f)}u.hasOwnProperty("toString")&&(i.toString=u.toString)}else o.mixins&&(E(o.mixins,t,n,r,i),o._without&&s.call(o._without,c))}}function S(e){var t=Ember.meta(e),n=t.required;if(!n||!t.hasOwnProperty("required"))n=t.required=n?a(n):{};return n}function T(e,t,n,r){if(x.test(t)){var i=r.bindings;i?r.hasOwnProperty("bindings")||(i=r.bindings=a(r.bindings)):i=r.bindings={},i[t]=n}}function N(e,t){var n=t.bindings,r,i,s;if(n){for(r in n)i=n[r],i&&(s=r.slice(0,-7),i instanceof Ember.Binding?(i=i.copy(),i.to(s)):i=new Ember.Binding(s,i),i.connect(e),e[r]=i);t.bindings={}}}function C(e,t){return N(e,t||Ember.meta(e)),e}function k(e,t,n,r,i){var s=t.methodName,o;return r[s]||i[s]?(o=i[s],t=r[s]):n.descs[s]?(t=n.descs[s],o=undefined):(t=undefined,o=e[s]),{desc:t,value:o}}function L(e,t,n,r,i){if("function"!=typeof n)return;var s=n[r];if(s)for(var o=0,u=s.length;o<u;o++)Ember[i](e,s[o],null,t)}function A(e,t,n){var r=e[t];L(e,t,r,"__ember_observesBefore__","removeBeforeObserver"),L(e,t,r,"__ember_observes__","removeObserver"),L(e,t,n,"__ember_observesBefore__","addBeforeObserver"),L(e,t,n,"__ember_observes__","addObserver")}function O(e,r,i){var s={},o={},u=Ember.meta(e),a,l,h;E(r,c(e),s,o,e);for(a in o){if(a==="contructor"||!o.hasOwnProperty(a))continue;h=s[a],l=o[a];if(h===t)continue;while(h&&h instanceof n){var p=k(e,h,u,s,o);h=p.desc,l=p.value}if(h===undefined&&l===undefined)continue;A(e,a,l),T(e,a,l,u),f(e,a,h,l,u)}return i||C(e,u),e}function _(e,t,n){var r=l(e);if(n[r])return!1;n[r]=!0;if(e===t)return!0;var i=e.mixins,s=i?i.length:0;while(--s>=0)if(_(i[s],t,n))return!0;return!1}function D(e,t,n){if(n[l(t)])return;n[l(t)]=!0;if(t.properties){var r=t.properties;for(var i in r)r.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&s.call(t.mixins,function(t){D(e,t,n)})}var e,t,n,r=Ember.ArrayPolyfills.map,i=Ember.ArrayPolyfills.indexOf,s=Ember.ArrayPolyfills.forEach,o=[].slice,u={},a=Ember.create,f=Ember.defineProperty,l=Ember.guidFor,d={},x=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=o.call(arguments,1);return O(e,t,!1),e},Ember.Mixin=function(){return h(this,arguments)},e=Ember.Mixin,e._apply=O,e.applyPartial=function(e){var t=o.call(arguments,1);return O(e,t,!0)},e.finishPartial=C,Ember.anyUnprocessedMixins=!1,e.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return h(new e,arguments)};var M=e.prototype;M.reopen=function(){var t,n;this.properties?(t=e.create(),t.properties=this.properties,delete this.properties,this.mixins=[t]):this.mixins||(this.mixins=[]);var r=arguments.length,i=this.mixins,s;for(s=0;s<r;s++)t=arguments[s],t instanceof e?i.push(t):(n=e.create(),n.properties=t,i.push(n));return this},M.apply=function(e){return O(e,[this],!1)},M.applyPartial=function(e){return O(e,[this],!0)},M.detect=function(t){if(!t)return!1;if(t instanceof e)return _(t,this,{});var n=Ember.meta(t,!1).mixins;return n?!!n[l(this)]:!1},M.without=function(){var t=new e(this);return t._without=o.call(arguments),t},M.keys=function(){var e={},t={},n=[];D(e,this,t);for(var r in e)e.hasOwnProperty(r)&&n.push(r);return n},e.mixins=function(e){var t=Ember.meta(e,!1).mixins,n=[];if(!t)return n;for(var r in t){var i=t[r];i.properties||n.push(i)}return n},t=new Ember.Descriptor,t.toString=function(){return"(Required Property)"},Ember.required=function(){return t},n=function(e){this.methodName=e},n.prototype=new Ember.Descriptor,Ember.alias=function(e){return new n(e)},Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.",Ember.alias),Ember.aliasMethod=function(e){return new n(e)},Ember.observer=function(e){var t=o.call(arguments,1);return e.__ember_observes__=t,e},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;e<t;e++)var n=arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(e){var t=o.call(arguments,1);return e.__ember_observesBefore__=t,e}}(),function(){}(),function(){e("rsvp",[],function(){"use strict";function d(e,t){n.async(function(){e.trigger("promise:resolved",{detail:t}),e.isResolved=!0,e.resolvedValue=t})}function v(e,t){n.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedValue=t})}function m(e){var t,n=[],r=new c,i=e.length;i===0&&r.resolve([]);var s=function(e){return function(t){o(e,t)}},o=function(e,t){n[e]=t,--i===0&&r.resolve(n)},u=function(e){r.reject(e)};for(t=0;t<i;t++)e[t].then(s(t),u);return r}var e=typeof window!="undefined"?window:{},t=e.MutationObserver||e.WebKitMutationObserver,n,r;if(typeof process!="undefined"&&{}.toString.call(process)==="[object process]")r=function(e,t){process.nextTick(function(){e.call(t)})};else if(t){var i=[],s=new t(function(){var e=i.slice();i=[],e.forEach(function(e){var t=e[0],n=e[1];t.call(n)})}),o=document.createElement("div");s.observe(o,{attributes:!0}),window.addEventListener("unload",function(){s.disconnect(),s=null}),r=function(e,t){i.push([e,t]),o.setAttribute("drainQueue","drainQueue")}}else r=function(e,t){setTimeout(function(){e.call(t)},1)};var u=function(e,t){this.type=e;for(var n in t){if(!t.hasOwnProperty(n))continue;this[n]=t[n]}},a=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n][0]===t)return n;return-1},f=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},l={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e},on:function(e,t,n){var r=f(this),i,s;e=e.split(/\s+/),n=n||this;while(s=e.shift())i=r[s],i||(i=r[s]=[]),a(i,t)===-1&&i.push([t,n])},off:function(e,t){var n=f(this),r,i,s;e=e.split(/\s+/);while(i=e.shift()){if(!t){n[i]=[];continue}r=n[i],s=a(r,t),s!==-1&&r.splice(s,1)}},trigger:function(e,t){var n=f(this),r,i,s,o,a;if(r=n[e])for(var l=0;l<r.length;l++)i=r[l],s=i[0],o=i[1],typeof t!="object"&&(t={detail:t}),a=new u(e,t),s.call(o,a)}},c=function(){this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this),this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this)},h=function(){},p=function(e,t,n,r){var i=typeof n=="function",s,o,u,a;if(i)try{s=n(r.detail),u=!0}catch(f){a=!0,o=f}else s=r.detail,u=!0;s&&typeof s.then=="function"?s.then(function(e){t.resolve(e)},function(e){t.reject(e)}):i&&u?t.resolve(s):a?t.reject(o):t[e](s)};return c.prototype={then:function(e,t){var r=new c;return this.isResolved&&n.async(function(){p("resolve",r,e,{detail:this.resolvedValue})},this),this.isRejected&&n.async(function(){p("reject",r,t,{detail:this.rejectedValue})},this),this.on("promise:resolved",function(t){p("resolve",r,e,t)}),this.on("promise:failed",function(e){p("reject",r,t,e)}),r},resolve:function(e){d(this,e),this.resolve=h,this.reject=h},reject:function(e){v(this,e),this.resolve=h,this.reject=h}},l.mixin(c.prototype),n={async:r,Promise:c,Event:u,EventTarget:l,all:m,raiseOnUncaughtExceptions:!0},n})}(),function(){e("container",[],function(){function e(e){this.parent=e,this.dict={}}function t(t){this.parent=t,this.children=[],this.resolver=t&&t.resolver||function(){},this.registry=new e(t&&t.registry),this.cache=new e(t&&t.cache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this._options=new e(t&&t._options),this._typeOptions=new e(t&&t._typeOptions)}function n(e){throw new Error(e+" is not currently supported on child containers")}function r(e,t){var n=s(e,t,"singleton");return n!==!1}function i(e,t){var n={};if(!t)return n;var r,i;for(var s=0,o=t.length;s<o;s++)r=t[s],i=e.lookup(r.fullName),n[r.property]=i;return n}function s(e,t,n){var r=e._options.get(t);if(r&&r[n]!==undefined)return r[n];var i=t.split(":")[0];r=e._typeOptions.get(i);if(r)return r[n]}function o(e,t){var n=e.normalize(t);return e.resolve(n)}function u(e,t){var n=o(e,t),r=t.split(":"),u=r[0],a=r[1],f;if(s(e,t,"instantiate")===!1)return n;if(n){var l=[];l=l.concat(e.typeInjections.get(u)||[]),l=l.concat(e.injections[t]||[]);var c=i(e,l);return c.container=e,c._debugContainerKey=t,f=n.create(c),f}}function a(e,t){e.cache.eachLocal(function(n,r){if(s(e,n,"instantiate")===!1)return;t(r)})}function f(e){e.cache.eachLocal(function(t,n){if(s(e,t,"instantiate")===!1)return;n.destroy()}),e.cache.dict={}}return e.prototype={get:function(e){var t=this.dict;if(t.hasOwnProperty(e))return t[e];if(this.parent)return this.parent.get(e)},set:function(e,t){this.dict[e]=t},has:function(e){var t=this.dict;return t.hasOwnProperty(e)?!0:this.parent?this.parent.has(e):!1},eachLocal:function(e,t){var n=this.dict;for(var r in n)n.hasOwnProperty(r)&&e.call(t,r,n[r])}},t.prototype={child:function(){var e=new t(this);return this.children.push(e),e},set:function(e,t,n){e[t]=n},register:function(e,t,n,r){var i;e.indexOf(":")!==-1?(r=n,n=t,i=e):i=e+":"+t;var s=this.normalize(i);this.registry.set(s,n),this._options.set(s,r||{})},resolve:function(e){return this.resolver(e)||this.registry.get(e)},normalize:function(e){return e},lookup:function(e,t){e=this.normalize(e),t=t||{};if(this.cache.has(e)&&t.singleton!==!1)return this.cache.get(e);var n=u(this,e);if(!n)return;return r(this,e)&&t.singleton!==!1&&this.cache.set(e,n),n},has:function(e){return this.cache.has(e)?!0:!!o(this,e)},optionsForType:function(e,t){this.parent&&n("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,r){this.parent&&n("typeInjection");var i=this.typeInjections.get(e);i||(i=[],this.typeInjections.set(e,i)),i.push({property:t,fullName:r})},injection:function(e,t,r){this.parent&&n("injection");if(e.indexOf(":")===-1)return this.typeInjection(e,t,r);var i=this.injections[e]=this.injections[e]||[];i.push({property:t,fullName:r})},destroy:function(){this.isDestroyed=!0;for(var e=0,t=this.children.length;e<t;e++)this.children[e].destroy();this.children=[],a(this,function(e){e.isDestroying=!0}),a(this,function(e){e.destroy()}),delete this.parent,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;e<t;e++)f(this.children[e]);f(this)}},t})}(),function(){function i(t,n,r,s){var o,u,a;if("object"!=typeof t||t===null)return t;if(n&&(u=e(r,t))>=0)return s[u];if(Ember.typeOf(t)==="array"){o=t.slice();if(n){u=o.length;while(--u>=0)o[u]=i(o[u],n,r,s)}}else if(Ember.Copyable&&Ember.Copyable.detect(t))o=t.copy(n,r,s);else{o={};for(a in t){if(!t.hasOwnProperty(a))continue;if(a.substring(0,2)==="__")continue;o[a]=n?i(t[a],n,r,s):t[a]}}return n&&(r.push(t),s.push(o)),o}var e=Ember.EnumerableUtils.indexOf,t={},n="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(n,function(e){t["[object "+e+"]"]=e.toLowerCase()});var r=Object.prototype.toString;Ember.typeOf=function(e){var n;return n=e===null||e===undefined?String(e):t[r.call(e)]||"object",n==="function"?Ember.Object&&Ember.Object.detect(e)&&(n="class"):n==="object"&&(e instanceof Error?n="error":Ember.Object&&e instanceof Ember.Object?n="instance":n="object"),n},Ember.isNone=function(e){return e===null||e===undefined},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return e===null||e===undefined||e.length===0&&typeof e!="function"||typeof e=="object"&&Ember.get(e,"length")===0},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty),Ember.compare=function o(e,t){if(e===t)return 0;var n=Ember.typeOf(e),r=Ember.typeOf(t),i=Ember.Comparable;if(i){if(n==="instance"&&i.detect(e.constructor))return e.constructor.compare(e,t);if(r==="instance"&&i.detect(t.constructor))return 1-t.constructor.compare(t,e)}var s=Ember.ORDER_DEFINITION_MAPPING;if(!s){var u=Ember.ORDER_DEFINITION;s=Ember.ORDER_DEFINITION_MAPPING={};var a,f;for(a=0,f=u.length;a<f;++a)s[u[a]]=a;delete Ember.ORDER_DEFINITION}var l=s[n],c=s[r];if(l<c)return-1;if(l>c)return 1;switch(n){case"boolean":case"number":if(e<t)return-1;if(e>t)return 1;return 0;case"string":var h=e.localeCompare(t);if(h<0)return-1;if(h>0)return 1;return 0;case"array":var p=e.length,d=t.length,v=Math.min(p,d),m=0,g=0;while(m===0&&g<v)m=o(e[g],t[g]),g++;if(m!==0)return m;if(p<d)return-1;if(p>d)return 1;return 0;case"instance":if(Ember.Comparable&&Ember.Comparable.detect(e))return e.compare(e,t);return 0;case"date":var y=e.getTime(),b=t.getTime();if(y<b)return-1;if(y>b)return 1;return 0;default:return 0}},Ember.copy=function(e,t){return"object"!=typeof e||e===null?e:Ember.Copyable&&Ember.Copyable.detect(e)?e.copy(t):i(e,t,t?[]:null,t?[]:null)},Ember.inspect=function(e){if(typeof e!="object"||e===null)return e+"";var t,n=[];for(var r in e)if(e.hasOwnProperty(r)){t=e[r];if(t==="toString")continue;Ember.typeOf(t)==="function"&&(t="function() { ... }"),n.push(r+": "+t)}return"{"+n.join(", ")+"}"},Ember.isEqual=function(e,t){return e&&"function"==typeof e.isEqual?e.isEqual(t):e===t},Ember.ORDER_DEFINITION=Ember.ENV.ORDER_DEFINITION||["undefined","null","boolean","number","string","array","object","instance","function","class","date"],Ember.keys=Object.keys,Ember.keys||(Ember.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t});var s=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var e=Error.prototype.constructor.apply(this,arguments);for(var t=0;t<s.length;t++)this[s[t]]=e[s[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){var e=/[ _]/g,t={},n=/([a-z])([A-Z])/g,r=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,s=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var n=0;return e.replace(/%@([0-9]+)?/g,function(e,r){return r=r?parseInt(r,0)-1:n++,e=t[r],(e===null?"(null)":e===undefined?"":e).toString()})},loc:function(e,t){return e=Ember.STRINGS[e]||e,Ember.String.fmt(e,t)},w:function(e){return e.split(/\s+/)},decamelize:function(e){return e.replace(n,"$1_$2").toLowerCase()},dasherize:function(n){var r=t,i=r[n];return i?i:(i=Ember.String.decamelize(n).replace(e,"-"),r[n]=i,i)},camelize:function(e){return e.replace(r,function(e,t,n){return n?n.toUpperCase():""}).replace(/^([A-Z])/,function(e,t,n){return e.toLowerCase()})},classify:function(e){var t=e.split("."),n=[];for(var r=0,i=t.length;r<i;r++){var s=Ember.String.camelize(t[r]);n.push(s.charAt(0).toUpperCase()+s.substr(1))}return n.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(s,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,n=Ember.String.loc,r=Ember.String.camelize,i=Ember.String.decamelize,s=Ember.String.dasherize,o=Ember.String.underscore,u=Ember.String.capitalize,a=Ember.String.classify;if(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)String.prototype.fmt=function(){return e(this,arguments)},String.prototype.w=function(){return t(this)},String.prototype.loc=function(){return n(this,arguments)},String.prototype.camelize=function(){return r(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return s(this)},String.prototype.underscore=function(){return o(this)},String.prototype.classify=function(){return a(this)},String.prototype.capitalize=function(){return u(this)}}(),function(){var e=Array.prototype.slice;if(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Function)Function.prototype.property=function(){var e=Ember.computed(this);return e.property.apply(e,arguments)},Function.prototype.observes=function(){return this.__ember_observes__=e.call(arguments),this},Function.prototype.observesBefore=function(){return this.__ember_observesBefore__=e.call(arguments),this}}(),function(){}(),function(){function s(){return i.length===0?{}:i.pop()}function o(e){return i.push(e),null}function u(t,n){function i(i){var s=e(i,t);return r?n===s:!!s}var r=arguments.length===2;return i}var e=Ember.get,t=Ember.set,n=Array.prototype.slice,r=Ember.EnumerableUtils.indexOf,i=[];Ember.Enumerable=Ember.Mixin.create({isEnumerable:!0,nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(e(this,"length")===0)return undefined;var t=s(),n;return n=this.nextObject(0,null,t),o(t),n}).property("[]"),lastObject:Ember.computed(function(){var t=e(this,"length");if(t===0)return undefined;var n=s(),r=0,i,u=null;do u=i,i=this.nextObject(r++,u,n);while(i!==undefined);return o(n),u}).property("[]"),contains:function(e){return this.find(function(t){return t===e})!==undefined},forEach:function(t,n){if(typeof t!="function")throw new TypeError;var r=e(this,"length"),i=null,u=s();n===undefined&&(n=null);for(var a=0;a<r;a++){var f=this.nextObject(a,i,u);t.call(n,f,a,this),i=f}return i=null,u=o(u),this},getEach:function(e){return this.mapProperty(e)},setEach:function(e,n){return this.forEach(function(r){t(r,e,n)})},map:function(e,t){var n=[];return this.forEach(function(r,i,s){n[i]=e.call(t,r,i,s)}),n},mapProperty:function(t){return this.map(function(n){return e(n,t)})},filter:function(e,t){var n=[];return this.forEach(function(r,i,s){e.call(t,r,i,s)&&n.push(r)}),n},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterProperty:function(e,t){return this.filter(u.apply(this,arguments))},rejectProperty:function(t,n){var r=function(r){return e(r,t)===n},i=function(n){return!!e(n,t)},s=arguments.length===2?r:i;return this.reject(s)},find:function(t,n){var r=e(this,"length");n===undefined&&(n=null);var i=null,u,a=!1,f,l=s();for(var c=0;c<r&&!a;c++){u=this.nextObject(c,i,l);if(a=t.call(n,u,c,this))f=u;i=u}return u=i=null,l=o(l),f},findProperty:function(e,t){return this.find(u.apply(this,arguments))},every:function(e,t){return!this.find(function(n,r,i){return!e.call(t,n,r,i)})},everyProperty:function(e,t){return this.every(u.apply(this,arguments))},some:function(e,t){return!!this.find(function(n,r,i){return!!e.call(t,n,r,i)})},someProperty:function(e,t){return this.some(u.apply(this,arguments))},reduce:function(e,t,n){if(typeof e!="function")throw new TypeError;var r=t;return this.forEach(function(t,i){r=e.call(null,r,t,i,this,n)},this),r},invoke:function(e){var t,r=[];return arguments.length>1&&(t=n.call(arguments,1)),this.forEach(function(n,i){var s=n&&n[e];"function"==typeof s&&(r[i]=t?s.apply(n,t):s.call(n))},this),r},toArray:function(){var e=[];return this.forEach(function(t,n){e[n]=t}),e},compact:function(){return this.without(null)},without:function(e){if(!this.contains(e))return this;var t=[];return this.forEach(function(n){n!==e&&(t[t.length]=n)}),t},uniq:function(){var e=[];return this.forEach(function(t){r(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(e,t){return this}),addEnumerableObserver:function(t,n){var r=n&&n.willChange||"enumerableWillChange",i=n&&n.didChange||"enumerableDidChange",s=e(this,"hasEnumerableObservers");return s||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",t,r),Ember.addListener(this,"@enumerable:change",t,i),s||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(t,n){var r=n&&n.willChange||"enumerableWillChange",i=n&&n.didChange||"enumerableDidChange",s=e(this,"hasEnumerableObservers");return s&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",t,r),Ember.removeListener(this,"@enumerable:change",t,i),s&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(t,n){var r,i,s;return"number"==typeof t?r=t:t?r=e(t,"length"):r=t=-1,"number"==typeof n?i=n:n?i=e(n,"length"):i=n=-1,s=i<0||r<0||i-r!==0,t===-1&&(t=null),n===-1&&(n=null),Ember.propertyWillChange(this,"[]"),s&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,t,n]),this},enumerableContentDidChange:function(t,n){var r=this.propertyDidChange,i,s,o;return"number"==typeof t?i=t:t?i=e(t,"length"):i=t=-1,"number"==typeof n?s=n:n?s=e(n,"length"):s=n=-1,o=s<0||i<0||s-i!==0,t===-1&&(t=null),n===-1&&(n=null),Ember.sendEvent(this,"@enumerable:change",[this,t,n]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),function(){function s(e){return e===null||e===undefined}var e=Ember.get,t=Ember.set,n=Ember.meta,r=Ember.EnumerableUtils.map,i=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{isSCArray:!0,length:Ember.required(),objectAt:function(t){return t<0||t>=e(this,"length")?undefined:e(this,t)},objectsAt:function(e){var t=this;return r(e,function(e){return t.objectAt(e)})},nextObject:function(e){return this.objectAt(e)},"[]":Ember.computed(function(t,n){return n!==undefined&&this.replace(0,e(this,"length"),n),this}),firstObject:Ember.computed(function(){return this.objectAt(0)}),lastObject:Ember.computed(function(){return this.objectAt(e(this,"length")-1)}),contains:function(e){return this.indexOf(e)>=0},slice:function(t,n){var r=[],i=e(this,"length");s(t)&&(t=0);if(s(n)||n>i)n=i;while(t<n)r[r.length]=this.objectAt(t++);return r},indexOf:function(t,n){var r,i=e(this,"length");n===undefined&&(n=0),n<0&&(n+=i);for(r=n;r<i;r++)if(this.objectAt(r,!0)===t)return r;return-1},lastIndexOf:function(t,n){var r,i=e(this,"length");if(n===undefined||n>=i)n=i-1;n<0&&(n+=i);for(r=n;r>=0;r--)if(this.objectAt(r)===t)return r;return-1},addArrayObserver:function(t,n){var r=n&&n.willChange||"arrayWillChange",i=n&&n.didChange||"arrayDidChange",s=e(this,"hasArrayObservers");return s||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,r),Ember.addListener(this,"@array:change",t,i),s||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,n){var r=n&&n.willChange||"arrayWillChange",i=n&&n.didChange||"arrayDidChange",s=e(this,"hasArrayObservers");return s&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,r),Ember.removeListener(this,"@array:change",t,i),s&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,n,r){t===undefined?(t=0,n=r=-1):(n===undefined&&(n=-1),r===undefined&&(r=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,n,r]);var i,s;if(t>=0&&n>=0&&e(this,"hasEnumerableObservers")){i=[],s=t+n;for(var o=t;o<s;o++)i.push(this.objectAt(o))}else i=n;return this.enumerableContentWillChange(i,r),this},arrayContentDidChange:function(t,n,r){t===undefined?(t=0,n=r=-1):(n===undefined&&(n=-1),r===undefined&&(r=-1));var s,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){s=[],o=t+r;for(var u=t;u<o;u++)s.push(this.objectAt(u))}else s=r;this.enumerableContentDidChange(n,s),Ember.sendEvent(this,"@array:change",[this,t,n,r]);var a=e(this,"length"),f=i(this,"firstObject"),l=i(this,"lastObject");return this.objectAt(0)!==f&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(a-1)!==l&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){Ember.Comparable=Ember.Mixin.create({isComparable:!0,compare:Ember.required(Function)})}(),function(){var e=Ember.get,t=Ember.set;Ember.Copyable=Ember.Mixin.create({copy:Ember.required(Function),frozenCopy:function(){if(Ember.Freezable&&Ember.Freezable.detect(this))return e(this,"isFrozen")?this:this.copy().freeze();throw new Error(Ember.String.fmt("%@ does not support freezing",[this]))}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Freezable=Ember.Mixin.create({isFrozen:!1,freeze:function(){return e(this,"isFrozen")?this:(t(this,"isFrozen",!0),this)}}),Ember.FROZEN_ERROR="Frozen object cannot be modified."}(),function(){var e=Ember.EnumerableUtils.forEach;Ember.MutableEnumerable=Ember.Mixin.create(Ember.Enumerable,{addObject:Ember.required(Function),addObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.addObject(e)},this),Ember.endPropertyChanges(this),this},removeObject:Ember.required(Function),removeObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.removeObject(e)},this),Ember.endPropertyChanges(this),this}})}(),function(){var e="Index out of range",t=[],n=Ember.get,r=Ember.set,i=Ember.EnumerableUtils.forEach;Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var e=n(this,"length");return e===0?this:(this.replace(0,e,t),this)},insertAt:function(t,r){if(t>n(this,"length"))throw new Error(e);return this.replace(t,0,[r]),this},removeAt:function(r,i){if("number"==typeof r){if(r<0||r>=n(this,"length"))throw new Error(e);i===undefined&&(i=1),this.replace(r,i,t)}return this},pushObject:function(e){return this.insertAt(n(this,"length"),e),e},pushObjects:function(e){return this.replace(n(this,"length"),0,e),this},popObject:function(){var e=n(this,"length");if(e===0)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(n(this,"length")===0)return null;var e=this.objectAt(0);return this.removeAt(0),e},unshiftObject:function(e){return this.insertAt(0,e),e},unshiftObjects:function(e){return this.replace(0,0,e),this},reverseObjects:function(){var e=n(this,"length");if(e===0)return this;var t=this.toArray().reverse();return this.replace(0,e,t),this},setObjects:function(e){if(e.length===0)return this.clear();var t=n(this,"length");return this.replace(0,t,e),this},removeObject:function(e){var t=n(this,"length")||0;while(--t>=0){var r=this.objectAt(t);r===e&&this.removeAt(t)}return this},addObject:function(e){return this.contains(e)||this.pushObject(e),this}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.defineProperty;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){var t={},n=arguments;arguments.length===1&&Ember.typeOf(arguments[0])==="array"&&(n=arguments[0]);for(var r=0;r<n.length;r++)t[n[r]]=e(this,n[r]);return t},set:function(e,n){return t(this,e,n),this},setProperties:function(e){return Ember.setProperties(this,e)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this},endPropertyChanges:function(){return Ember.endPropertyChanges(),this},propertyWillChange:function(e){return Ember.propertyWillChange(this,e),this},propertyDidChange:function(e){return Ember.propertyDidChange(this,e),this},notifyPropertyChange:function(e){return this.propertyWillChange(e),this.propertyDidChange(e),this},addBeforeObserver:function(e,t,n){Ember.addBeforeObserver(this,e,t,n)},addObserver:function(e,t,n){Ember.addObserver(this,e,t,n)},removeObserver:function(e,t,n){Ember.removeObserver(this,e,t,n)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getPath:function(e){return this.get(e)},setPath:function(e,t){return this.set(e,t)},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(n,r){return r||(r=1),t(this,n,(e(this,n)||0)+r),e(this,n)},decrementProperty:function(n,r){return r||(r=1),t(this,n,(e(this,n)||0)-r),e(this,n)},toggleProperty:function(n){return t(this,n,!e(this,n)),e(this,n)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,targetObject:Ember.computed(function(){var t=e(this,"target");if(Ember.typeOf(t)==="string"){var n=e(this,t);return n===undefined&&(n=e(Ember.lookup,t)),n}return t}).property("target"),triggerAction:function(){var t=e(this,"action"),n=e(this,"targetObject");if(n&&t){var r;return typeof n.send=="function"?r=n.send(t,this):(typeof t=="string"&&(t=n[t]),r=t.call(n,this)),r!==!1&&(r=!0),r}return!1}})}(),function(){Ember.Evented=Ember.Mixin.create({on:function(e,t,n){Ember.addListener(this,e,t,n)},one:function(e,t,n){n||(n=t,t=null),Ember.addListener(this,e,t,n,!0)},trigger:function(e){var t=[],n,r;for(n=1,r=arguments.length;n<r;n++)t.push(arguments[n]);Ember.sendEvent(this,e,t)},fire:function(e){this.trigger.apply(this,arguments)},off:function(e,t,n){Ember.removeListener(this,e,t,n)},has:function(e){return Ember.hasListeners(this,e)}})}(),function(){var e=t("rsvp");e.async=function(e,t){Ember.run.schedule("actions",t,e)};var n=Ember.get,r=Array.prototype.slice;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t){var r=n(this,"promise");return r.then.apply(r,arguments)},resolve:function(e){n(this,"promise").resolve(e)},reject:function(e){n(this,"promise").reject(e)},promise:Ember.computed(function(){return new e.Promise})})}(),function(){}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){function w(){var e=!1,t,i,o=function(){e||o.proto(),r(this,s,b),r(this,"_super",b);var u=a(this);u.proto=this;if(t){var f=t;t=null,this.reopen.apply(this,f)}if(i){var c=i;i=null;var h=this.concatenatedProperties;for(var p=0,d=c.length;p<d;p++){var m=c[p];for(var w in
17
+ m){if(!m.hasOwnProperty(w))continue;var E=m[w],S=Ember.IS_BINDING;if(S.test(w)){var x=u.bindings;x?u.hasOwnProperty("bindings")||(x=u.bindings=n(u.bindings)):x=u.bindings={},x[w]=E}var T=u.descs[w];if(h&&y(h,w)>=0){var N=this[w];N?"function"==typeof N.concat?E=N.concat(E):E=Ember.makeArray(N).concat(E):E=Ember.makeArray(E)}T?T.set(this,w,E):typeof this.setUnknownProperty!="function"||w in this?g?Ember.defineProperty(this,w,null,E):this[w]=E:this.setUnknownProperty(w,E)}}}v(this,u),delete u.proto,l(this),this.init.apply(this,arguments)};return o.toString=p.prototype.toString,o.willReopen=function(){e&&(o.PrototypeMixin=p.create(o.PrototypeMixin)),e=!1},o._initMixins=function(e){t=e},o._initProperties=function(e){i=e},o.proto=function(){var t=o.superclass;return t&&t.proto(),e||(e=!0,o.PrototypeMixin.applyPartial(o.prototype),f(o.prototype)),this.prototype},o}function S(e){return function(){return e}}var e=Ember.set,t=Ember.get,n=Ember.create,r=Ember.platform.defineProperty,i=Array.prototype.slice,s=Ember.GUID_KEY,o=Ember.guidFor,u=Ember.generateGuid,a=Ember.meta,f=Ember.rewatch,l=Ember.finishChains,c=Ember.destroy,h=Ember.run.schedule,p=Ember.Mixin,d=p._apply,v=p.finishPartial,m=p.prototype.reopen,g=Ember.ENV.MANDATORY_SETTER,y=Ember.EnumerableUtils.indexOf,b={configurable:!0,writable:!0,enumerable:!1,value:undefined},E=w();E.toString=function(){return"Ember.CoreObject"},E.PrototypeMixin=p.create({reopen:function(){return d(this,arguments,!0),this},isInstance:!0,init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){if(this._didCallDestroy)return;return this.isDestroying=!0,this._didCallDestroy=!0,this.willDestroy&&this.willDestroy(),h("destroy",this,this._scheduledDestroy),this},_scheduledDestroy:function(){c(this),e(this,"isDestroyed",!0),this.didDestroy&&this.didDestroy()},bind:function(e,t){return t instanceof Ember.Binding||(t=Ember.Binding.from(t)),t.to(e).connect(this),t},toString:function T(){var e=typeof this.toStringExtension=="function",t=e?":"+this.toStringExtension():"",n="<"+this.constructor.toString()+":"+o(this)+t+">";return this.toString=S(n),n}}),E.PrototypeMixin.ownerConstructor=E,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(E.PrototypeMixin),E.__super__=null;var x=p.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var e=w(),t;return e.ClassMixin=p.create(this.ClassMixin),e.PrototypeMixin=p.create(this.PrototypeMixin),e.ClassMixin.ownerConstructor=e,e.PrototypeMixin.ownerConstructor=e,m.apply(e.PrototypeMixin,arguments),e.superclass=this,e.__super__=this.prototype,t=e.prototype=n(this.prototype),t.constructor=e,u(t,"ember"),a(t).proto=t,e.ClassMixin.apply(e),e},createWithMixins:function(){var e=this;return arguments.length>0&&this._initMixins(arguments),new e},create:function(){var e=this;return arguments.length>0&&this._initProperties(arguments),new e},reopen:function(){return this.willReopen(),m.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return m.apply(this.ClassMixin,arguments),d(this,arguments,!1),this},detect:function(e){if("function"!=typeof e)return!1;while(e){if(e===this)return!0;e=e.superclass}return!1},detectInstance:function(e){return e instanceof this},metaForProperty:function(e){var t=a(this.proto(),!1).descs[e];return t._meta||{}},eachComputedProperty:function(e,t){var n=this.proto(),r=a(n).descs,i={},s;for(var o in r)s=r[o],s instanceof Ember.ComputedProperty&&e.call(t||this,o,s._meta||i)}});x.ownerConstructor=E,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(x),E.ClassMixin=x,x.apply(E),Ember.CoreObject=E}(),function(){var e=Ember.get,t=Ember.set,n=Ember.guidFor,r=Ember.isNone;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Error(Ember.FROZEN_ERROR);var r=e(this,"length");if(r===0)return this;var i;this.enumerableContentWillChange(r,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var s=0;s<r;s++)i=n(this[s]),delete this[i],delete this[s];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(r,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var n=e(this,"length");if(e(t,"length")!==n)return!1;while(--n>=0)if(!t.contains(this[n]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);var t=this.length>0?this[this.length-1]:null;return this.remove(t),t},push:Ember.aliasMethod("addObject"),shift:Ember.aliasMethod("pop"),unshift:Ember.aliasMethod("push"),addEach:Ember.aliasMethod("addObjects"),removeEach:Ember.aliasMethod("removeObjects"),init:function(e){this._super(),e&&this.addObjects(e)},nextObject:function(e){return this[e]},firstObject:Ember.computed(function(){return this.length>0?this[0]:undefined}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:undefined}),addObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(r(i))return this;var s=n(i),o=this[s],u=e(this,"length"),a;return o>=0&&o<u&&this[o]===i?this:(a=[i],this.enumerableContentWillChange(null,a),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[s]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,a),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(r(i))return this;var s=n(i),o=this[s],u=e(this,"length"),a=o===0,f=o===u-1,l,c;return o>=0&&o<u&&this[o]===i&&(c=[i],this.enumerableContentWillChange(c,null),a&&Ember.propertyWillChange(this,"firstObject"),f&&Ember.propertyWillChange(this,"lastObject"),o<u-1&&(l=this[u-1],this[o]=l,this[n(l)]=o),delete this[s],delete this[u-1],t(this,"length",u-1),a&&Ember.propertyDidChange(this,"firstObject"),f&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(c,null)),this},contains:function(e){return this[n(e)]>=0},copy:function(){var r=this.constructor,i=new r,s=e(this,"length");t(i,"length",s);while(--s>=0)i[s]=this[s],i[n(this[s])]=s;return i},toString:function(){var e=this.length,t,n=[];for(t=0;t<e;t++)n[t]=this[t];return"Ember.Set<%@>".fmt(n.join(","))}})}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function o(e,t,n){var u=e.length;r[e.join(".")]=t;for(var f in t){if(!i.call(t,f))continue;var c=t[f];e[u]=f;if(c&&c.toString===l)c.toString=h(e.join(".")),c[a]=e.join(".");else if(c&&c.isNamespace){if(n[s(c)])continue;n[s(c)]=!0,o(e,c,n)}}e.length=u}function u(){var e=Ember.Namespace,t=Ember.lookup,n,r;if(e.PROCESSED)return;for(var i in t){if(i==="parent"||i==="top"||i==="frameElement")continue;if(i==="globalStorage"&&t.StorageList&&t.globalStorage instanceof t.StorageList)continue;if(t.hasOwnProperty&&!t.hasOwnProperty(i))continue;try{n=Ember.lookup[i],r=n&&n.isNamespace}catch(s){continue}r&&(n[a]=i)}}function f(e){var t=e.superclass;if(t)return t[a]?t[a]:f(t);return}function l(){!Ember.BOOTED&&!this[a]&&c();var e;if(this[a])e=this[a];else{var t=f(this);t?e="(subclass of "+t+")":e="(unknown mixin)",this.toString=h(e)}return e}function c(){var e=!n.PROCESSED,t=Ember.anyUnprocessedMixins;e&&(u(),n.PROCESSED=!0);if(e||t){var r=n.NAMESPACES,i;for(var s=0,a=r.length;s<a;s++)i=r[s],o([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function h(e){return function(){return e}}var e=Ember.get,t=Ember.ArrayPolyfills.indexOf,n=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var t=e(this,"name");return t?t:(u(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){o([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=undefined,e.splice(t.call(e,this),1),this._super()}});n.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:c,byName:function(e){return Ember.BOOTED||c(),r[e]}});var r=n.NAMESPACES_BY_ID,i={}.hasOwnProperty,s=Ember.guidFor,a=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=l}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){var e=Ember.get,t=Ember.set;Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(t){return e(this,"arrangedContent").objectAt(t)},replaceContent:function(t,n,r){e(this,"content").replace(t,n,r)},_contentWillChange:Ember.beforeObserver(function(){this._teardownContent()},"content"),_teardownContent:function(){var t=e(this,"content");t&&t.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){var t=e(this,"content");this._setupContent()},"content"),_setupContent:function(){var t=e(this,"content");t&&t.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(function(){var t=e(this,"arrangedContent"),n=t?e(t,"length"):0;this.arrangedContentArrayWillChange(this,0,n,undefined),this.arrangedContentWillChange(this),this._teardownArrangedContent(t)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var t=e(this,"arrangedContent"),n=t?e(t,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,undefined,n)},"arrangedContent"),_setupArrangedContent:function(){var t=e(this,"arrangedContent");t&&t.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var t=e(this,"arrangedContent");t&&t.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(t){return e(this,"content")&&this.objectAtContent(t)},length:Ember.computed(function(){var t=e(this,"arrangedContent");return t?e(t,"length"):0}),replace:function(t,n,r){return e(this,"content")&&this.replaceContent(t,n,r),this},arrangedContentArrayWillChange:function(e,t,n,r){this.arrayContentWillChange(t,n,r)},arrangedContentArrayDidChange:function(e,t,n,r){this.arrayContentDidChange(t,n,r)},init:function(){this._super(),this._setupContent(),this._setupArrangedContent()},willDestroy:function(){this._teardownArrangedContent(),this._teardownContent()}})}(),function(){function f(e,t){var n=t.slice(8);if(n in this)return;u(this,n)}function l(e,t){var n=t.slice(8);if(n in this)return;a(this,n)}var e=Ember.get,t=Ember.set,n=Ember.String.fmt,r=Ember.addBeforeObserver,i=Ember.addObserver,s=Ember.removeBeforeObserver,o=Ember.removeObserver,u=Ember.propertyWillChange,a=Ember.propertyDidChange;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(e){var t="content."+e;r(this,t,null,f),i(this,t,null,l)},didUnwatchProperty:function(e){var t="content."+e;s(this,t,null,f),o(this,t,null,l)},unknownProperty:function(t){var n=e(this,"content");if(n)return e(n,t)},setUnknownProperty:function(n,r){var i=e(this,"content");return t(i,n,r)}})}(),function(){function o(e,t,r,i,s){var o=r._objects,u;o||(o=r._objects={});while(--s>=i){var a=e.objectAt(s);a&&(Ember.addBeforeObserver(a,t,r,"contentKeyWillChange"),Ember.addObserver(a,t,r,"contentKeyDidChange"),u=n(a),o[u]||(o[u]=[]),o[u].push(s))}}function u(e,t,r,i,s){var o=r._objects;o||(o=r._objects={});var u,a;while(--s>=i){var f=e.objectAt(s);f&&(Ember.removeBeforeObserver(f,t,r,"contentKeyWillChange"),Ember.removeObserver(f,t,r,"contentKeyDidChange"),a=n(f),u=o[a],u[u.indexOf(s)]=null)}}var e=Ember.set,t=Ember.get,n=Ember.guidFor,r=Ember.EnumerableUtils.forEach,i=Ember.Object.extend(Ember.Array,{init:function(e,t,n){this._super(),this._keyName=t,this._owner=n,this._content=e},objectAt:function(e){var n=this._content.objectAt(e);return n&&t(n,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?t(e,"length"):0})}),s=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),r(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e,t){var n;return n=new i(this._content,e,this),Ember.defineProperty(this,e,null,n),this.beginObservingContentKey(e),n},arrayWillChange:function(e,t,n,r){var i=this._keys,s,o,a;a=n>0?t+n:-1,Ember.beginPropertyChanges(this);for(s in i){if(!i.hasOwnProperty(s))continue;a>0&&u(e,s,this,t,a),Ember.propertyWillChange(this,s)}Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(e,t,n,r){var i=this._keys,s,u,a;a=r>0?t+r:-1,Ember.beginPropertyChanges(this);for(s in i){if(!i.hasOwnProperty(s))continue;a>0&&o(e,s,this,t,a),Ember.propertyDidChange(this,s)}Ember.propertyDidChange(this._content,"@each"),Ember.endPropertyChanges(this)},didAddListener:function(e){s.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){s.test(e)&&this.stopObservingContentKey(e.slice(0,-7))},beginObservingContentKey:function(e){var n=this._keys;n||(n=this._keys={});if(!n[e]){n[e]=1;var r=this._content,i=t(r,"length");o(r,e,this,0,i)}else n[e]++},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var r=this._content,i=t(r,"length");u(r,e,this,0,i)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return e==="length"?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(t,n,r){if(this.isFrozen)throw Ember.FROZEN_ERROR;var i=r?e(r,"length"):0;this.arrayContentWillChange(t,n,i);if(!r||r.length===0)this.splice(t,n);else{var s=[t,n].concat(r);this.splice.apply(this,s)}return this.arrayContentDidChange(t,n,i),this},unknownProperty:function(e,t){var n;return t!==undefined&&n===undefined&&(n=this[e]=t),n},indexOf:function(e,t){var n,r=this.length;t===undefined?t=0:t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=r);for(n=t;n<r;n++)if(this[n]===e)return n;return-1},lastIndexOf:function(e,t){var n,r=this.length;t===undefined?t=r-1:t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=r);for(n=t;n>=0;n--)if(this[n]===e)return n;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),r=["length"];Ember.EnumerableUtils.forEach(n.keys(),function(e){Array.prototype[e]&&r.push(e)}),r.length>0&&(n=n.without.apply(n,r)),Ember.NativeArray=n,Ember.A=function(e){return e===undefined&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){n.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.DeferredMixin,t=Ember.Object,n=Ember.get,r=Ember.Object.extend(e);r.reopenClass({promise:function(e,t){var i=r.create();return e.call(t,i),n(i,"promise")}}),Ember.Deferred=r}(),function(){var e=Ember.ENV.EMBER_LOAD_HOOKS||{},t={};Ember.onLoad=function(n,r){var i;e[n]=e[n]||Ember.A(),e[n].pushObject(r),(i=t[n])&&r(i)},Ember.runLoadHooks=function(n,r){var i;t[n]=r,(i=e[n])&&e[n].forEach(function(e){e(r)})}}(),function(){}(),function(){var e=Ember.get;Ember.ControllerMixin=Ember.Mixin.create({isController:!0,target:null,container:null,store:null,model:Ember.computed.alias("content"),send:function(t){var n=[].slice.call(arguments,1),r;this[t]?this[t].apply(this,n):(r=e(this,"target"))&&r.send.apply(r,arguments)}}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var e=Ember.get,t=Ember.set,n=Ember.EnumerableUtils.forEach;Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,orderBy:function(t,r){var i=0,s=e(this,"sortProperties"),o=e(this,"sortAscending");return n(s,function(n){i===0&&(i=Ember.compare(e(t,n),e(r,n)),i!==0&&!o&&(i=-1*i))}),i},destroy:function(){var t=e(this,"content"),r=e(this,"sortProperties");return t&&r&&n(t,function(e){n(r,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(t,r){var i=e(this,"content"),s=e(this,"isSorted"),o=e(this,"sortProperties"),u=this;return i&&s?(i=i.slice(),i.sort(function(e,t){return u.orderBy(e,t)}),n(i,function(e){n(o,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(i)):i}),_contentWillChange:Ember.beforeObserver(function(){var t=e(this,"content"),r=e(this,"sortProperties");t&&r&&n(t,function(e){n(r,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},"content"),sortAscendingWillChange:Ember.beforeObserver(function(){this._lastSortAscending=e(this,"sortAscending")},"sortAscending"),sortAscendingDidChange:Ember.observer(function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}},"sortAscending"),contentArrayWillChange:function(t,r,i,s){var o=e(this,"isSorted");if(o){var u=e(this,"arrangedContent"),a=t.slice(r,r+i),f=e(this,"sortProperties");n(a,function(e){u.removeObject(e),n(f,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(t,r,i,s)},contentArrayDidChange:function(t,r,i,s){var o=e(this,"isSorted"),u=e(this,"sortProperties");if(o){var a=t.slice(r,r+s),f=e(this,"arrangedContent");n(a,function(e){this.insertItemSorted(e),n(u,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(t,r,i,s)},insertItemSorted:function(t){var n=e(this,"arrangedContent"),r=e(n,"length"),i=this._binarySearch(t,0,r);n.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var n=e(this,"arrangedContent"),r=n.indexOf(t),i=n.objectAt(r-1),s=n.objectAt(r+1),o=i&&this.orderBy(t,i),u=s&&this.orderBy(t,s);if(o<0||u>0)n.removeObject(t),this.insertItemSorted(t)},_binarySearch:function(t,n,r){var i,s,o,u;return n===r?n:(u=e(this,"arrangedContent"),i=n+Math.floor((r-n)/2),s=u.objectAt(i),o=this.orderBy(s,t),o<0?this._binarySearch(t,i+1,r):o>0?this._binarySearch(t,n,i):i)}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.isGlobalPath,r=Ember.EnumerableUtils.forEach,i=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(t){return e(this,"itemController")},objectAtContent:function(t){var n=e(this,"length"),r=e(this,"arrangedContent"),i=r&&r.objectAt(t);if(t>=0&&t<n){var s=this.lookupItemController(i);if(s)return this.controllerAt(t,i,s)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(t,n,s){var o=e(this,"_subControllers"),u=o.slice(t,t+n);r(u,function(e){e&&e.destroy()}),i(o,t,n,new Array(s)),this._super(t,n,s)},init:function(){this._super(),this.get("content")||Ember.defineProperty(this,"content",undefined,Ember.A()),this.set("_subControllers",Ember.A())},controllerAt:function(t,n,r){var i=e(this,"container"),s=e(this,"_subControllers"),o=s[t];o||(o=i.lookup("controller:"+r,{singleton:!1}),s[t]=o);if(!o)throw new Error('Could not resolve itemController: "'+r+'"');return o.set("target",this),o.set("content",n),o},_subControllers:null,_resetSubControllers:function(){var t=e(this,"_subControllers");r(t,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){}(),function(){}(),function(){var e=Ember.imports.jQuery;Ember.$=e}(),function(){var e=Ember.String.w("dragstart drag dragenter dragleave dragover drop dragend");Ember.EnumerableUtils.forEach(e,function(e){Ember.$.event.fixHooks[e]={props:["dataTransfer"]}})}(),function(){function u(e){var t=e.shiftKey||e.metaKey||e.altKey||e.ctrlKey,n=e.which>1;return!t&&!n}var e=function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",e.firstChild.innerHTML===""}(),t=function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value",e.childNodes[0].nodeValue==="Test:"&&e.childNodes[2].nodeValue===" Value"}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r=e.childNodes.length,i,s,o;for(i=0;i<r;i++){s=e.childNodes[i],o=s.nodeType===1&&n(s,t);if(o)return o}},r=function(r,i){e&&(i="&shy;"+i);var s=[];t&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,n,r){return s.push([r,t]),n})),r.innerHTML=i;if(s.length>0){var o=s.length,u;for(u=0;u<o;u++){var a=n(r,s[u][0]),f=document.createTextNode(s[u][1]);a.parentNode.insertBefore(f,a)}}if(e){var l=r.firstChild;while(l.nodeType===1&&!l.nodeName)l=l.firstChild;l.nodeType===3&&l.nodeValue.charAt(0)==="­"&&(l.nodeValue=l.nodeValue.slice(1))}},i={},s=function(e){if(i[e]!==undefined)return i[e];var t=!0;if(e.toLowerCase()==="select"){var n=document.createElement("select");r(n,'<option value="test">Test</option>'),t=n.options.length===1}return i[e]=t,t},o=function(e,t){var n=e.tagName;if(s(n))r(e,t);else{var i=e.outerHTML.match(new RegExp("<"+n+"([^>]*)>","i"))[0],o="</"+n+">",u=document.createElement("div");r(u,i+t+o),e=u.firstChild;while(e.tagName!==n)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:o,isSimpleClick:u}}(),function(){var e=Ember.get,t=Ember.set,n=Ember.ArrayPolyfills.indexOf,r=function(){this.seen={},this.list=[]};r.prototype={add:function(e){if(e in this.seen)return;this.seen[e]=!0,this.list.push(e)},toDOM:function(){return this.list.join(" ")}},Ember.RenderBuffer=function(e){return new Ember._RenderBuffer(e)},Ember._RenderBuffer=function(e){this.tagNames=[e||null],this.buffer=[]},Ember._RenderBuffer.prototype={_element:null,elementClasses:null,classes:null,elementId:null,elementAttributes:null,elementProperties:null,elementTag:null,elementStyle:null,parentBuffer:null,push:function(e){return this.buffer.push(e),this},addClass:function(e){var t=this.elementClasses=this.elementClasses||new r;return this.elementClasses.add(e),this.classes=this.elementClasses.list,this},setClasses:function(e){this.classes=e},id:function(e){return this.elementId=e,this},attr:function(e,t){var n=this.elementAttributes=this.elementAttributes||{};return arguments.length===1?n[e]:(n[e]=t,this)},removeAttr:function(e){var t=this.elementAttributes;return t&&delete t[e],this},prop:function(e,t){var n=this.elementProperties=this.elementProperties||{};return arguments.length===1?n[e]:(n[e]=t,this)},removeProp:function(e){var t=this.elementProperties;return t&&delete t[e],this},style:function(e,t){var n=this.elementStyle=this.elementStyle||{};return this.elementStyle[e]=t,this},begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var e=this.currentTagName();if(!e)return;if(!this._element&&this.buffer.length===0){this._element=this.generateElement();return}var t=this.buffer,n=this.elementId,r=this.classes,i=this.elementAttributes,s=this.elementProperties,o=this.elementStyle,u,a;t.push("<"+e),n&&(t.push(' id="'+this._escapeAttribute(n)+'"'),this.elementId=null),r&&(t.push(' class="'+this._escapeAttribute(r.join(" "))+'"'),this.classes=null);if(o){t.push(' style="');for(a in o)o.hasOwnProperty(a)&&t.push(a+":"+this._escapeAttribute(o[a])+";");t.push('"'),this.elementStyle=null}if(i){for(u in i)i.hasOwnProperty(u)&&t.push(" "+u+'="'+this._escapeAttribute(i[u])+'"');this.elementAttributes=null}if(s){for(a in s)if(s.hasOwnProperty(a)){var f=s[a];if(f||typeof f=="number")f===!0?t.push(" "+a+'="'+a+'"'):t.push(" "+a+'="'+this._escapeAttribute(s[a])+'"')}this.elementProperties=null}t.push(">")},pushClosingTag:function(){var e=this.tagNames.pop();e&&this.buffer.push("</"+e+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var e=this.tagNames.pop(),t=document.createElement(e),n=Ember.$(t),r=this.elementId,i=this.classes,s=this.elementAttributes,o=this.elementProperties,u=this.elementStyle,a="",f,l;r&&(n.attr("id",r),this.elementId=null),i&&(n.attr("class",i.join(" ")),this.classes=null);if(u){for(l in u)u.hasOwnProperty(l)&&(a+=l+":"+u[l]+";");n.attr("style",a),this.elementStyle=null}if(s){for(f in s)s.hasOwnProperty(f)&&n.attr(f,s[f]);this.elementAttributes=null}if(o){for(l in o)o.hasOwnProperty(l)&&n.prop(l,o[l]);this.elementProperties=null}return t},element:function(){var e=this.innerString();return e&&(this._element=Ember.ViewUtils.setInnerHTML(this._element,e)),this._element},string:function(){return this._element?this.element().outerHTML:this.innerString()},innerString:function(){return this.buffer.join("")},_escapeAttribute:function(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},n=/&(?!\w+;)|[<>"'`]/g,r=/[&<>"'`]/,i=function(e){return t[e]||"&amp;"},s=e.toString();return r.test(s)?s.replace(n,i):s}}}(),function(){var e=Ember.get,t=Ember.set,n=Ember.String.fmt;Ember.EventDispatcher=Ember.Object.extend({rootElement:"body",setup:function(t){var n,r={touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",contextmenu:"contextMenu",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",submit:"submit",input:"input",change:"change",dragstart:"dragStart",drag:"drag",dragenter:"dragEnter",dragleave:"dragLeave",dragover:"dragOver",drop:"drop",dragend:"dragEnd"};Ember.$.extend(r,t||{});var i=Ember.$(e(this,"rootElement"));i.addClass("ember-application");for(n in r)r.hasOwnProperty(n)&&this.setupHandler(i,n,r[n])},setupHandler:function(e,t,n){var r=this;e.delegate(".ember-view",t+".ember",function(e,t){return Ember.handleErrors(function(){var i=Ember.View.views[this.id],s=!0,o=null;return o=r._findNearestEventManager(i,n),o&&o!==t?s=r._dispatchEvent(o,e,n,i):i?s=r._bubbleEvent(i,e,n):e.stopPropagation(),s},this)}),e.delegate("[data-ember-action]",t+".ember",function(e){return Ember.handleErrors(function(){var t=Ember.$(e.currentTarget).attr("data-ember-action"),r=Ember.Handlebars.ActionHelper.registeredActions[t];if(r&&r.eventName===n)return r.handler(e)},this)})},_findNearestEventManager:function(t,n){var r=null;while(t){r=e(t,"eventManager");if(r&&r[n])break;t=e(t,"parentView")}return r},_dispatchEvent:function(e,t,n,r){var i=!0,s=e[n];return Ember.typeOf(s)==="function"?(i=s.call(e,t,r),t.stopPropagation()):i=this._bubbleEvent(r,t,n),i},_bubbleEvent:function(e,t,n){return Ember.run(function(){return e.handleEvent(n,t)})},destroy:function(){var t=e(this,"rootElement");return Ember.$(t).undelegate(".ember").removeClass("ember-application"),this._super()}})}(),function(){var e=Ember.run.queues;e.splice(Ember.$.inArray("actions",e)+1,0,"render","afterRender")}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({target:null,namespace:null,view:null,container:null,_childContainers:null,init:function(){this._super(),t(this,"_childContainers",{})},_modelDidChange:Ember.observer(function(){var n=e(this,"_childContainers"),r;for(var i in n){if(!n.hasOwnProperty(i))continue;n[i].destroy()}t(this,"_childContainers",{})},"model")})}(),function(){}(),function(){var e={},t=Ember.get,n=Ember.set,r=Ember.addObserver,i=Ember.removeObserver,s=Ember.meta,o=Ember.guidFor,u=Ember.String.fmt,a=[].slice,f=Ember.EnumerableUtils.forEach,l=Ember.EnumerableUtils.addObject,c=Ember.computed(function(){var e=this._childViews,n=Ember.A(),r=this;return f(e,function(e){e.isVirtual?n.pushObjects(t(e,"childViews")):n.push(e)}),n.replace=function(e,t,n){if(r instanceof Ember.ContainerView)return r.replace(e,t,n);throw new Error("childViews is immutable")},n});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,{isView:!0,states:e,init:function(){this._super(),this.isVirtual||(Ember.View.views[this.elementId]=this),this.addBeforeObserver("elementId",function(){throw new Error("Changing a view's elementId after creation is not allowed")}),this.transitionTo("preRender")},parentView:Ember.computed(function(){var e=this._parentView;return e&&e.isVirtual?t(e,"parentView"):e}).property("_parentView"),state:null,_parentView:null,concreteView:Ember.computed(function(){return this.isVirtual?t(this,"parentView"):this}).property("parentView").volatile(),instrumentName:"core_view",instrumentDetails:function(e){e.object=this.toString()},renderToBuffer:function(e,t){var n="render."+this.instrumentName,r={};return this.instrumentDetails(r),Ember.instrument(n,r,function(){return this._renderToBuffer(e,t)},this)},_renderToBuffer:function(e,t){Ember.run.sync();var n=this.tagName;if(n===null||n===undefined)n="div";var r=this.buffer=e&&e.begin(n)||Ember.RenderBuffer(n);return this.transitionTo("inBuffer",!1),this.beforeRender(r),this.render(r),this.afterRender(r),r},trigger:function(e){this._super.apply(this,arguments);var t=this[e];if(t){var n=[],r,i;for(r=1,i=arguments.length;r<i;r++)n.push(arguments[r]);return t.apply(this,n)}},has:function(e){return Ember.typeOf(this[e])==="function"||this._super(e)},willDestroy:function(){var e=this._parentView;this.removedFromDOM||this.destroyElement(),e&&e.removeChild(this),this.transitionTo("destroyed"),this.isVirtual||delete Ember.View.views[this.elementId]},clearRenderedChildren:Ember.K,triggerRecursively:Ember.K,invokeRecursively:Ember.K,transitionTo:Ember.K,destroyElement:Ember.K}),Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,templates:Ember.TEMPLATES,template:Ember.computed(function(e,n){if(n!==undefined)return n;var r=t(this,"templateName"),i=this.templateForName(r,"template");return i||t(this,"defaultTemplate")}).property("templateName"),container:Ember.computed(function(){var e=t(this,"_parentView");return e?t(e,"container"):Ember.Container&&Ember.Container.defaultContainer}),controller:Ember.computed(function(e){var n=t(this,"_parentView");return n?t(n,"controller"):null}).property("_parentView"),layout:Ember.computed(function(e){var n=t(this,"layoutName"),r=this.templateForName(n,"layout");return r||t(this,"defaultLayout")}).property("layoutName"),templateForName:function(e,n){if(!e)return;var r=t(this,"container");if(r)return r.lookup("template:"+e)},context:Ember.computed(function(e,r){return arguments.length===2?(n(this,"_context",r),r):t(this,"_context")}).volatile(),_context:Ember.computed(function(e){var n,r;return(r=t(this,"controller"))?r:(n=this._parentView,n?t(n,"_context"):null)}),_contextDidChange:Ember.observer(function(){this.rerender()},"context"),isVisible:!0,childViews:c,_childViews:[],_childViewsWillChange:Ember.beforeObserver(function(){if(this.isVirtual){var e=t(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}},"childViews"),_childViewsDidChange:Ember.observer(function(){if(this.isVirtual){var e=t(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}},"childViews"),nearestInstanceOf:function(e){var n=t(this,"parentView");while(n){if(n instanceof e)return n;n=t(n,"parentView")}},nearestOfType:function(e){var n=t(this,"parentView"),r=e instanceof Ember.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};while(n){if(r(n))return n;n=t(n,"parentView")}},nearestWithProperty:function(e){var n=t(this,"parentView");while(n){if(e in n)return n;n=t(n,"parentView")}},nearestChildOf:function(e){var n=t(this,"parentView");while(n){if(t(n,"parentView")instanceof e)return n;n=t(n,"parentView")}},_parentViewDidChange:Ember.observer(function(){if(this.isDestroying)return;t(this,"parentView.controller")&&!t(this,"controller")&&this.notifyPropertyChange("controller")},"_parentView"),_controllerDidChange:Ember.observer(function(){if(this.isDestroying)return;this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller"
18
+ )})},"controller"),cloneKeywords:function(){var e=t(this,"templateData"),r=e?Ember.copy(e.keywords):{};return n(r,"view",t(this,"concreteView")),n(r,"_view",this),n(r,"controller",t(this,"controller")),r},render:function(e){var n=t(this,"layout")||t(this,"template");if(n){var r=t(this,"context"),i=this.cloneKeywords(),s,o={view:this,buffer:e,isRenderData:!0,keywords:i,insideGroup:t(this,"templateData.insideGroup")};s=n(r,{data:o}),s!==undefined&&e.push(s)}},rerender:function(){return this.currentState.rerender(this)},clearRenderedChildren:function(){var e=this.lengthBeforeRender,t=this.lengthAfterRender,n=this._childViews;for(var r=t-1;r>=e;r--)n[r]&&n[r].destroy()},_applyClassNameBindings:function(e){var t=this.classNames,n,r,i;f(e,function(e){var s,o=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),n=this.$(),s&&(n.removeClass(s),t.removeObject(s)),r?(n.addClass(r),s=r):s=null};i=this._classStringForProperty(e),i&&(l(t,i),s=i),this.registerObserver(this,o.path,u),this.one("willClearRender",function(){s&&(t.removeObject(s),s=null)})},this)},_applyAttributeBindings:function(e,n){var r,i,s;f(n,function(n){var s=n.split(":"),o=s[0],u=s[1]||o,a=function(){i=this.$();if(!i)return;r=t(this,o),Ember.View.applyAttributeBindings(i,u,r)};this.registerObserver(this,o,a),r=t(this,o),Ember.View.applyAttributeBindings(e,u,r)},this)},_classStringForProperty:function(e){var n=Ember.View._parsePropertyPath(e),r=n.path,i=t(this,r);return i===undefined&&Ember.isGlobalPath(r)&&(i=t(Ember.lookup,r)),Ember.View._classStringForValue(r,i,n.className,n.falsyClassName)},element:Ember.computed(function(e,t){return t!==undefined?this.currentState.setElement(this,t):this.currentState.getElement(this)}).property("_parentView"),$:function(e){return this.currentState.$(this,e)},mutateChildViews:function(e){var t=this._childViews,n=t.length,r;while(--n>=0)r=t[n],e.call(this,r,n);return this},forEachChildView:function(e){var t=this._childViews;if(!t)return this;var n=t.length,r,i;for(i=0;i<n;i++)r=t[i],e.call(this,r);return this},appendTo:function(e){return this._insertElementLater(function(){this.$().appendTo(e)}),this},replaceIn:function(e){return this._insertElementLater(function(){Ember.$(e).empty(),this.$().appendTo(e)}),this},_insertElementLater:function(e){this._scheduledInsert=Ember.run.scheduleOnce("render",this,"_insertElement",e)},_insertElement:function(e){this._scheduledInsert=null,this.currentState.insertElement(this,e)},append:function(){return this.appendTo(document.body)},remove:function(){this.removedFromDOM||this.destroyElement(),this.invokeRecursively(function(e){e.clearRenderedChildren&&e.clearRenderedChildren()})},elementId:null,findElementInParentElement:function(e){var t="#"+this.elementId;return Ember.$(t)[0]||Ember.$(t,e)[0]},createElement:function(){if(t(this,"element"))return this;var e=this.renderToBuffer();return n(this,"element",e.element()),this},willInsertElement:Ember.K,didInsertElement:Ember.K,willClearRender:Ember.K,invokeRecursively:function(e){var t=[this],n,r;while(t.length){n=t.slice(),t=[];for(var i=0,s=n.length;i<s;i++)r=n[i],e.call(r,r),r._childViews&&t.push.apply(t,r._childViews)}},triggerRecursively:function(e){var t=[this],n,r;while(t.length){n=t.slice(),t=[];for(var i=0,s=n.length;i<s;i++)r=n[i],r.trigger&&r.trigger(e),r._childViews&&t.push.apply(t,r._childViews)}},destroyElement:function(){return this.currentState.destroyElement(this)},willDestroyElement:function(){},_notifyWillDestroyElement:function(){this.triggerRecursively("willClearRender"),this.triggerRecursively("willDestroyElement")},_elementWillChange:Ember.beforeObserver(function(){this.forEachChildView(function(e){Ember.propertyWillChange(e,"element")})},"element"),_elementDidChange:Ember.observer(function(){this.forEachChildView(function(e){Ember.propertyDidChange(e,"element")})},"element"),parentViewDidChange:Ember.K,instrumentName:"view",instrumentDetails:function(e){e.template=t(this,"templateName"),this._super(e)},_renderToBuffer:function(e,t){this.lengthBeforeRender=this._childViews.length;var n=this._super(e,t);return this.lengthAfterRender=this._childViews.length,n},renderToBufferIfNeeded:function(){return this.currentState.renderToBufferIfNeeded(this,this)},beforeRender:function(e){this.applyAttributesToBuffer(e),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag()},applyAttributesToBuffer:function(e){var n=t(this,"classNameBindings");n.length&&this._applyClassNameBindings(n);var r=t(this,"attributeBindings");r.length&&this._applyAttributeBindings(e,r),e.setClasses(this.classNames),e.id(this.elementId);var i=t(this,"ariaRole");i&&e.attr("role",i),t(this,"isVisible")===!1&&e.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:[],attributeBindings:[],init:function(){this.elementId=this.elementId||o(this),this._super(),this._childViews=this._childViews.slice(),this.classNameBindings=Ember.A(this.classNameBindings.slice()),this.classNames=Ember.A(this.classNames.slice());var e=t(this,"viewController");e&&(e=t(e),e&&n(e,"view",this))},appendChild:function(e,t){return this.currentState.appendChild(this,e,t)},removeChild:function(e){if(this.isDestroying)return;n(e,"_parentView",null);var t=this._childViews;return Ember.EnumerableUtils.removeObject(t,e),this.propertyDidChange("childViews"),this},removeAllChildren:function(){return this.mutateChildViews(function(e){this.removeChild(e)})},destroyAllChildren:function(){return this.mutateChildViews(function(e){e.destroy()})},removeFromParent:function(){var e=this._parentView;return this.remove(),e&&e.removeChild(this),this},willDestroy:function(){var e=this._childViews,r=this._parentView,i,s;this.removedFromDOM||this.destroyElement(),i=e.length;for(s=i-1;s>=0;s--)e[s].removedFromDOM=!0;if(this.viewName){var o=t(this,"parentView");o&&n(o,this.viewName,null)}r&&r.removeChild(this),this.transitionTo("destroyed"),i=e.length;for(s=i-1;s>=0;s--)e[s].destroy();this.isVirtual||delete Ember.View.views[t(this,"elementId")]},createChildView:function(e,r){return e.isView&&e._parentView===this?e:(Ember.CoreView.detect(e)?(r=r||{},r._parentView=this,r.templateData=r.templateData||t(this,"templateData"),e=e.create(r),e.viewName&&n(t(this,"concreteView"),e.viewName,e)):(r&&e.setProperties(r),t(e,"templateData")||n(e,"templateData",t(this,"templateData")),n(e,"_parentView",this)),e)},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer(function(){var e=this.$();if(!e)return;var n=t(this,"isVisible");e.toggle(n);if(this._isAncestorHidden())return;n?this._notifyBecameVisible():this._notifyBecameHidden()},"isVisible"),_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(e){var n=t(e,"isVisible");(n||n===null)&&e._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(e){var n=t(e,"isVisible");(n||n===null)&&e._notifyBecameHidden()})},_isAncestorHidden:function(){var e=t(this,"parentView");while(e){if(t(e,"isVisible")===!1)return!0;e=t(e,"parentView")}return!1},clearBuffer:function(){this.invokeRecursively(function(e){e.buffer=null})},transitionTo:function(e,t){this.currentState=this.states[e],this.state=e,t!==!1&&this.forEachChildView(function(t){t.transitionTo(e)})},handleEvent:function(e,t){return this.currentState.handleEvent(this,e,t)},registerObserver:function(e,t,n,r){Ember.addObserver(e,t,n,r),this.one("willClearRender",function(){Ember.removeObserver(e,t,n,r)})}});var h={prepend:function(e,t){e.$().prepend(t)},after:function(e,t){e.$().after(t)},html:function(e,t){e.$().html(t)},replace:function(e){var r=t(e,"element");n(e,"element",null),e._insertElementLater(function(){Ember.$(r).replaceWith(t(e,"element"))})},remove:function(e){e.$().remove()},empty:function(e){e.$().empty()}};Ember.View.reopen({domManager:h}),Ember.View.reopenClass({_parsePropertyPath:function(e){var t=e.split(":"),n=t[0],r="",i,s;return t.length>1&&(i=t[1],t.length===3&&(s=t[2]),r=":"+i,s&&(r+=":"+s)),{path:n,classNames:r,className:i===""?undefined:i,falsyClassName:s}},_classStringForValue:function(e,t,n,r){if(n||r)return n&&!!t?n:r&&!t?r:null;if(t===!0){var i=e.split(".");return Ember.String.dasherize(i[i.length-1])}return t!==!1&&t!==undefined&&t!==null?t:null}}),Ember.View.views={},Ember.View.childViewsProperty=c,Ember.View.applyAttributeBindings=function(e,t,n){var r=Ember.typeOf(n);t!=="value"&&(r==="string"||r==="number"&&!isNaN(n))?n!==e.attr(t)&&e.attr(t,n):t==="value"||r==="boolean"?n!==e.prop(t)&&e.prop(t,n):n||e.removeAttr(t)},Ember.View.states=e}(),function(){var e=Ember.get,t=Ember.set;Ember.View.states._default={appendChild:function(){throw"You can't use appendChild outside of the rendering process"},$:function(){return undefined},getElement:function(){return null},handleEvent:function(){return!0},destroyElement:function(e){return t(e,"element",null),e._scheduledInsert&&(Ember.run.cancel(e._scheduledInsert),e._scheduledInsert=null),e},renderToBufferIfNeeded:function(){return!1},rerender:Ember.K}}(),function(){var e=Ember.View.states.preRender=Ember.create(Ember.View.states._default);Ember.merge(e,{insertElement:function(e,t){e.createElement(),e.triggerRecursively("willInsertElement"),t.call(e),e.transitionTo("inDOM"),e.triggerRecursively("didInsertElement")},renderToBufferIfNeeded:function(e){return e.renderToBuffer()},empty:Ember.K,setElement:function(e,t){return t!==null&&e.transitionTo("hasElement"),t}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.meta,r=Ember.View.states.inBuffer=Ember.create(Ember.View.states._default);Ember.merge(r,{$:function(e,t){return e.rerender(),Ember.$()},rerender:function(e){throw new Ember.Error("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.")},appendChild:function(e,t,n){var r=e.buffer;return t=e.createChildView(t,n),e._childViews.push(t),t.renderToBuffer(r),e.propertyDidChange("childViews"),t},destroyElement:function(e){return e.clearBuffer(),e._notifyWillDestroyElement(),e.transitionTo("preRender"),e},empty:function(){},renderToBufferIfNeeded:function(e){return e.buffer},insertElement:function(){throw"You can't insert an element that has already been rendered"},setElement:function(e,t){return t===null?e.transitionTo("preRender"):(e.clearBuffer(),e.transitionTo("hasElement")),t}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.meta,r=Ember.View.states.hasElement=Ember.create(Ember.View.states._default);Ember.merge(r,{$:function(t,n){var r=e(t,"element");return n?Ember.$(n,r):Ember.$(r)},getElement:function(t){var n=e(t,"parentView");return n&&(n=e(n,"element")),n?t.findElementInParentElement(n):Ember.$("#"+e(t,"elementId"))[0]},setElement:function(e,t){if(t!==null)throw"You cannot set an element to a non-null value when the element is already in the DOM.";return e.transitionTo("preRender"),t},rerender:function(e){return e.triggerRecursively("willClearRender"),e.clearRenderedChildren(),e.domManager.replace(e),e},destroyElement:function(e){return e._notifyWillDestroyElement(),e.domManager.remove(e),t(e,"element",null),e._scheduledInsert&&(Ember.run.cancel(e._scheduledInsert),e._scheduledInsert=null),e},empty:function(e){var t=e._childViews,n,r;if(t){n=t.length;for(r=0;r<n;r++)t[r]._notifyWillDestroyElement()}e.domManager.empty(e)},handleEvent:function(e,t,n){return e.has(t)?e.trigger(t,n):!0}});var i=Ember.View.states.inDOM=Ember.create(r);Ember.merge(i,{insertElement:function(e,t){throw"You can't insert an element into the DOM that has already been inserted"}})}(),function(){var e="You can't call %@ on a destroyed view",t=Ember.String.fmt,n=Ember.View.states.destroyed=Ember.create(Ember.View.states._default);Ember.merge(n,{appendChild:function(){throw t(e,["appendChild"])},rerender:function(){throw t(e,["rerender"])},destroyElement:function(){throw t(e,["destroyElement"])},empty:function(){throw t(e,["empty"])},setElement:function(){throw t(e,["set('element', ...)"])},renderToBufferIfNeeded:function(){throw t(e,["renderToBufferIfNeeded"])},insertElement:Ember.K})}(),function(){Ember.View.cloneStates=function(e){var t={};t._default={},t.preRender=Ember.create(t._default),t.destroyed=Ember.create(t._default),t.inBuffer=Ember.create(t._default),t.hasElement=Ember.create(t._default),t.inDOM=Ember.create(t.hasElement);var n;for(var r in e){if(!e.hasOwnProperty(r))continue;Ember.merge(t[r],e[r])}return t}}(),function(){var e=Ember.View.cloneStates(Ember.View.states),t=Ember.get,n=Ember.set,r=Ember.meta,i=Ember.EnumerableUtils.forEach;Ember.ContainerView=Ember.View.extend(Ember.MutableArray,{states:e,init:function(){this._super();var e=t(this,"childViews");Ember.defineProperty(this,"childViews",Ember.View.childViewsProperty);var r=this._childViews;i(e,function(e,i){var s;"string"==typeof e?(s=t(this,e),s=this.createChildView(s),n(this,e,s)):s=this.createChildView(e),r[i]=s},this);var s=t(this,"currentView");s&&r.push(this.createChildView(s))},replace:function(e,n,r){var i=r?t(r,"length"):0;this.arrayContentWillChange(e,n,i),this.childViewsWillChange(this._childViews,e,n);if(i===0)this._childViews.splice(e,n);else{var s=[e,n].concat(r);this._childViews.splice.apply(this._childViews,s)}return this.arrayContentDidChange(e,n,i),this.childViewsDidChange(this._childViews,e,n,i),this},objectAt:function(e){return this._childViews[e]},length:Ember.computed(function(){return this._childViews.length}),render:function(e){this.forEachChildView(function(t){t.renderToBuffer(e)})},instrumentName:"render.container",childViewsWillChange:function(e,t,n){this.propertyWillChange("childViews");if(n>0){var r=e.slice(t,t+n);this.currentState.childViewsWillChange(this,e,t,n),this.initializeViews(r,null,null)}},removeChild:function(e){return this.removeObject(e),this},childViewsDidChange:function(e,n,r,i){if(i>0){var s=e.slice(n,n+i);this.initializeViews(s,this,t(this,"templateData")),this.currentState.childViewsDidChange(this,e,n,i)}this.propertyDidChange("childViews")},initializeViews:function(e,r,s){i(e,function(e){n(e,"_parentView",r),t(e,"templateData")||n(e,"templateData",s)})},currentView:null,_currentViewWillChange:Ember.beforeObserver(function(){var e=t(this,"currentView");e&&e.destroy()},"currentView"),_currentViewDidChange:Ember.observer(function(){var e=t(this,"currentView");e&&this.pushObject(e)},"currentView"),_ensureChildrenAreInDOM:function(){this.currentState.ensureChildrenAreInDOM(this)}}),Ember.merge(e._default,{childViewsWillChange:Ember.K,childViewsDidChange:Ember.K,ensureChildrenAreInDOM:Ember.K}),Ember.merge(e.inBuffer,{childViewsDidChange:function(e,t,n,r){throw new Error("You cannot modify child views while in the inBuffer state")}}),Ember.merge(e.hasElement,{childViewsWillChange:function(e,t,n,r){for(var i=n;i<n+r;i++)t[i].remove()},childViewsDidChange:function(e,t,n,r){Ember.run.scheduleOnce("render",e,"_ensureChildrenAreInDOM")},ensureChildrenAreInDOM:function(e){var t=e._childViews,n,r,i,s,o;for(n=0,r=t.length;n<r;n++)i=t[n],o=i.renderToBufferIfNeeded(),o&&(i.triggerRecursively("willInsertElement"),s?s.domManager.after(s,o.string()):e.domManager.prepend(e,o.string()),i.transitionTo("inDOM"),i.propertyDidChange("element"),i.triggerRecursively("didInsertElement")),s=i}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.String.fmt;Ember.CollectionView=Ember.ContainerView.extend({content:null,emptyViewClass:Ember.View,emptyView:null,itemViewClass:Ember.View,init:function(){var e=this._super();return this._contentDidChange(),e},_contentWillChange:Ember.beforeObserver(function(){var t=this.get("content");t&&t.removeArrayObserver(this);var n=t?e(t,"length"):0;this.arrayWillChange(t,0,n)},"content"),_contentDidChange:Ember.observer(function(){var t=e(this,"content");t&&t.addArrayObserver(this);var n=t?e(t,"length"):0;this.arrayDidChange(t,0,null,n)},"content"),willDestroy:function(){var t=e(this,"content");t&&t.removeArrayObserver(this),this._super(),this._createdEmptyView&&this._createdEmptyView.destroy()},arrayWillChange:function(t,n,r){var i=e(this,"emptyView");i&&i instanceof Ember.View&&i.removeFromParent();var s=this._childViews,o,u,a;a=this._childViews.length;var f=r===a;f&&this.currentState.empty(this);for(u=n+r-1;u>=n;u--)o=s[u],f&&(o.removedFromDOM=!0),o.destroy()},arrayDidChange:function(n,r,i,s){var o=e(this,"itemViewClass"),u=[],a,f,l,c,h;"string"==typeof o&&(o=e(o)),c=n?e(n,"length"):0;if(c)for(l=r;l<r+s;l++)f=n.objectAt(l),a=this.createChildView(o,{content:f,contentIndex:l}),u.push(a);else{var p=e(this,"emptyView");if(!p)return;var d=Ember.CoreView.detect(p);p=this.createChildView(p),u.push(p),t(this,"emptyView",p),d&&(this._createdEmptyView=p)}this.replace(r,0,u)},createChildView:function(n,r){n=this._super(n,r);var i=e(n,"tagName"),s=i===null||i===undefined?Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")]:i;return t(n,"tagName",s),n}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){}(),function(){}(),function(){var e=Ember.get,t=Ember.set;Ember.State=Ember.Object.extend(Ember.Evented,{isState:!0,parentState:null,start:null,name:null,path:Ember.computed(function(){var t=e(this,"parentState.path"),n=e(this,"name");return t&&(n=t+"."+n),n}),trigger:function(e){this[e]&&this[e].apply(this,[].slice.call(arguments,1)),this._super.apply(this,arguments)},init:function(){var n=e(this,"states"),r;t(this,"childStates",Ember.A()),t(this,"eventTransitions",e(this,"eventTransitions")||{});var i,s,o;if(!n){n={};for(i in this){if(i==="constructor")continue;if(s=this[i]){if(o=s.transitionTarget)this.eventTransitions[i]=o;this.setupChild(n,i,s)}}t(this,"states",n)}else for(i in n)this.setupChild(n,i,n[i]);t(this,"pathsCache",{}),t(this,"pathsCacheNoContext",{})},setupChild:function(n,r,i){if(!i)return!1;i.isState?t(i,"name",r):Ember.State.detect(i)&&(i=i.create({name:r}));if(i.isState)return t(i,"parentState",this),e(this,"childStates").pushObject(i),n[r]=i,i},lookupEventTransition:function(e){var t,n=this;while(n&&!t)t=n.eventTransitions[e],n=n.get("parentState");return t},isLeaf:Ember.computed(function(){return!e(this,"childStates").length}),hasContext:!0,setup:Ember.K,enter:Ember.K,exit:Ember.K}),Ember.State.reopenClass({transitionTo:function(e){var t=function(t,n){var r=[],i,s=Ember.$&&Ember.$.Event;n&&s&&n instanceof s?n.hasOwnProperty("contexts")&&(r=n.contexts.slice()):r=[].slice.call(arguments,1),r.unshift(e),t.transitionTo.apply(t,r)};return t.transitionTarget=e,t}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.String.fmt,r=Ember.ArrayPolyfills.forEach,i=function(e){this.enterStates=e.enterStates.slice(),this.exitStates=e.exitStates.slice(),this.resolveState=e.resolveState,this.finalState=e.enterStates[e.enterStates.length-1]||e.resolveState};i.prototype={normalize:function(e,t){return this.matchContextsToStates(t),this.addInitialStates(),this.removeUnchangedContexts(e),this},matchContextsToStates:function(t){var n=this.enterStates.length-1,r=[],i,s;while(t.length>0){if(n>=0)i=this.enterStates[n--];else{if(this.enterStates.length){i=e(this.enterStates[0],"parentState");if(!i)throw"Cannot match all contexts to states"}else i=this.resolveState;this.enterStates.unshift(i),this.exitStates.unshift(i)}e(i,"hasContext")?s=t.pop():s=null,r.unshift(s)}this.contexts=r},addInitialStates:function(){var t=this.finalState,n;for(;;){n=e(t,"initialState")||"start",t=e(t,"states."+n);if(!t)break;this.finalState=t,this.enterStates.push(t),this.contexts.push(undefined)}},removeUnchangedContexts:function(e){while(this.enterStates.length>0){if(this.enterStates[0]!==this.exitStates[0])break;if(this.enterStates.length===this.contexts.length){if(e.getStateMeta(this.enterStates[0],"context")!==this.contexts[0])break;this.contexts.shift()}this.resolveState=this.enterStates.shift(),this.exitStates.shift()}}};var s=function(t,r,i){var u=this.enableLogging,a=i?"unhandledEvent":t,f=r[a],l,c,h;l=[].slice.call(arguments,3);if(typeof f=="function")return u&&(i?Ember.Logger.log(n("STATEMANAGER: Unhandled event '%@' being sent to state %@.",[t,e(r,"path")])):Ember.Logger.log(n("STATEMANAGER: Sending event '%@' to state %@.",[t,e(r,"path")]))),h=l,i&&h.unshift(t),h.unshift(this),f.apply(r,h);var p=e(r,"parentState");if(p)return c=l,c.unshift(t,p,i),s.apply(this,c);if(!i)return o.call(this,t,l,!0)},o=function(t,n,r){return n.unshift(t,e(this,"currentState"),r),s.apply(this,n)};Ember.StateManager=Ember.State.extend({init:function(){this._super(),t(this,"stateMeta",Ember.Map.create());var n=e(this,"initialState");!n&&e(this,"states.start")&&(n="start"),n&&this.transitionTo(n)},stateMetaFor:function(t){var n=e(this,"stateMeta"),r=n.get(t);return r||(r={},n.set(t,r)),r},setStateMeta:function(e,n,r){return t(this.stateMetaFor(e),n,r)},getStateMeta:function(t,n){return e(this.stateMetaFor(t),n)},currentState:null,currentPath:Ember.computed.alias("currentState.path"),transitionEvent:"setup",errorOnUnhandledEvent:!0,send:function(e){var t=[].slice.call(arguments,1);return o.call(this,e,t,!1)},unhandledEvent:function(t,n){if(e(this,"errorOnUnhandledEvent"))throw new Ember.Error(this.toString()+" could not respond to event "+n+" in state "+e(this,"currentState.path")+".")},getStateByPath:function(t,n){var r=n.split("."),i=t;for(var s=0,o=r.length;s<o;s++){i=e(e(i,"states"),r[s]);if(!i)break}return i},findStateByPath:function(t,n){var r;while(!r&&t)r=this.getStateByPath(t,n),t=e(t,"parentState");return r},getStatesInPath:function(t,n){if(!n||n==="")return undefined;var r=n.split("."),i=[],s,o;for(var u=0,a=r.length;u<a;u++){s=e(t,"states");if(!s)return undefined;o=e(s,r[u]);if(!o)return undefined;t=o,i.push(o)}return i},goToState:function(){return this.transitionTo.apply(this,arguments)},transitionTo:function(t,n){if(Ember.isEmpty(t))return;var r=n?Array.prototype.slice.call(arguments,1):[],s=e(this,"currentState")||this,o=this.contextFreeTransition(s,t),u=(new i(o)).normalize(this,r);this.enterState(u),this.triggerSetupContext(u)},contextFreeTransition:function(t,n){var r=t.pathsCache[n];if(r)return r;var i=this.getStatesInPath(t,n),s=[],o=t;while(o&&!i){s.unshift(o),o=e(o,"parentState");if(!o){i=this.getStatesInPath(this,n);if(!i)return}i=this.getStatesInPath(o,n)}while(i.length>0&&i[0]===s[0])o=i.shift(),s.shift();var u=t.pathsCache[n]={exitStates:s,enterStates:i,resolveState:o};return u},triggerSetupContext:function(t){var n=t.contexts,i=t.enterStates.length-n.length,s=t.enterStates,o=e(this,"transitionEvent");r.call(s,function(e,t){e.trigger(o,this,n[t-i])},this)},getState:function(t){var n=e(this,t),r=e(this,"parentState");if(n)return n;if(r)return r.getState(t)},enterState:function(n){var i=this.enableLogging,s=n.exitStates.slice(0).reverse();r.call(s,function(e){e.trigger("exit",this)},this),r.call(n.enterStates,function(t){i&&Ember.Logger.log("STATEMANAGER: Entering "+e(t,"path")),t.trigger("enter",this)},this),t(this,"currentState",n.finalState)}})}(),function(){}(),function(){e("metamorph",[],function(){"use strict";var e=function(){},t=0,n=window.document,r="createRange"in n&&typeof Range!="undefined"&&Range.prototype.createContextualFragment,i=function(){var e=n.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",e.firstChild.innerHTML===""}(),s=function(){var e=n.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value",e.childNodes[0].nodeValue==="Test:"&&e.childNodes[2].nodeValue===" Value"}(),o=function(n){var r;this instanceof o?r=this:r=new e,r.innerHTML=n;var i="metamorph-"+t++;return r.start=i+"-start",r.end=i+"-end",r};e.prototype=o.prototype;var u,a,f,l,c,h,p,d,v;l=function(){return this.startTag()+this.innerHTML+this.endTag()},d=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},v=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"};if(r)u=function(e,t){var r=n.createRange(),i=n.getElementById(e.start),s=n.getElementById(e.end);return t?(r.setStartBefore(i),r.setEndAfter(s)):(r.setStartAfter(i),r.setEndBefore(s)),r},a=function(e,t){var n=u(this,t);n.deleteContents();var r=n.createContextualFragment(e);n.insertNode(r)},f=function(){var e=u(this,!0);e.deleteContents()},c=function(e){var t=n.createRange();t.setStart(e),t.collapse(!1);var r=t.createContextualFragment(this.outerHTML());e.appendChild(r)},h=function(e){var t=n.createRange(),r=n.getElementById(this.end);t.setStartAfter(r),t.setEndAfter(r);var i=t.createContextualFragment(e);t.insertNode(i)},p=function(e){var t=n.createRange(),r=n.getElementById(this.start);t.setStartAfter(r),t.setEndAfter(r);var i=t.createContextualFragment(e);t.insertNode(i)};else{var m={select:[1,"<select multiple='multiple'>","</select>"],fieldset:[1,"<fieldset>","</fieldset>"],table:[1,"<table>","</table>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"],colgroup:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],map:[1,"<map>","</map>"],_default:[0,"",""]},g=function(e,t){if(e.getAttribute("id")===t)return e;var n=e.childNodes.length,r,i,s;for(r=0;r<n;r++){i=e.childNodes[r],s=i.nodeType===1&&g(i,t);if(s)return s}},y=function(e,t){var r=[];s&&(t=t.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,n,i){return r.push([i,t]),n})),e.innerHTML=t;if(r.length>0){var i=r.length,o;for(o=0;o<i;o++){var u=g(e,r[o][0]),a=n.createTextNode(r[o][1]);u.parentNode.insertBefore(a,u)}}},b=function(e,t){var r=m[e.tagName.toLowerCase()]||m._default,s=r[0],o=r[1],u=r[2];i&&(t="&shy;"+t);var a=n.createElement("div");y(a,o+t+u);for(var f=0;f<=s;f++)a=a.firstChild;if(i){var l=a;while(l.nodeType===1&&!l.nodeName)l=l.firstChild;l.nodeType===3&&l.nodeValue.charAt(0)==="­"&&(l.nodeValue=l.nodeValue.slice(1))}return a},w=function(e){while(e.parentNode.tagName==="")e=e.parentNode;return e},E=function(e,t){e.parentNode!==t.parentNode&&t.parentNode.insertBefore(e,t.parentNode.firstChild)};a=function(e,t){var r=w(n.getElementById(this.start)),i=n.getElementById(this.end),s=i.parentNode,o,u,a;E(r,i),o=r.nextSibling;while(o){u=o.nextSibling,a=o===i;if(a){if(!t)break;i=o.nextSibling}o.parentNode.removeChild(o);if(a)break;o=u}o=b(r.parentNode,e);while(o)u=o.nextSibling,s.insertBefore(o,i),o=u},f=function(){var e=w(n.getElementById(this.start)),t=n.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},c=function(e){var t=b(e,this.outerHTML()),n;while(t)n=t.nextSibling,e.appendChild(t),t=n},h=function(e){var t=n.getElementById(this.end),r=t.nextSibling,i=t.parentNode,s,o;o=b(i,e);while(o)s=o.nextSibling,i.insertBefore(o,r),o=s},p=function(e){var t=n.getElementById(this.start),r=t.parentNode,i,s;s=b(r,e);var o=t.nextSibling;while(s)i=s.nextSibling,r.insertBefore(s,o),s=i}}return o.prototype.html=function(e){this.checkRemoved();if(e===undefined)return this.innerHTML;a.call(this,e),this.innerHTML=e},o.prototype.replaceWith=function(e){this.checkRemoved(),a.call(this,e,!0)},o.prototype.remove=f,o.prototype.outerHTML=l,o.prototype.appendTo=c,o.prototype.after=h,o.prototype.prepend=p,o.prototype.startTag=d,o.prototype.endTag=v,o.prototype.isRemoved=function(){var e=n.getElementById(this.start),t=n.getElementById(this.end);return!e||!t},o.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},o})}(),function(){this.Handlebars={},function(e){e.VERSION="1.0.0-rc.3",e.COMPILER_REVISION=2,e.REVISION_CHANGES={1:"<= 1.0.rc.2",2:">= 1.0.0-rc.3"},e.helpers={},e.partials={},e.registerHelper=function(e,t,n){n&&(t.not=n),this.helpers[e]=t},e.registerPartial=function(e,t){this.partials[e]=t},e.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+e+"'")});var t=Object.prototype.toString,n="[object Function]";e.registerHelper("blockHelperMissing",function(r,i){var s=i.inverse||function(){},o=i.fn,u="",a=t.call(r);return a===n&&(r=r.call(this)),r===!0?o(this):r===!1||r==null?s(this):a==="[object Array]"?r.length>0?e.helpers.each(r,i):s(this):o(r)}),e.K=function(){},e.createFrame=Object.create||function(t){e.K.prototype=t;var n=new e.K;return e.K.prototype=null,n},e.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,methodMap:{0:"debug",1:"info",2:"warn",3:"error"},log:function(t,n){if(e.logger.level<=t){var r=e.logger.methodMap[t];typeof console!="undefined"&&console[r]&&console[r].call(console,n)}}},e.log=function(t,n){e.logger.log(t,n)},e.registerHelper("each",function(t,n){var r=n.fn,i=n.inverse,s=0,o="",u;n.data&&(u=e.createFrame(n.data));if(t&&typeof t=="object")if(t instanceof Array)for(var a=t.length;s<a;s++)u&&(u.index=s),o+=r(t[s],{data:u});else for(var f in t)t.hasOwnProperty(f)&&(u&&(u.key=f),o+=r(t[f],{data:u}),s++);return s===0&&(o=i(this)),o}),e.registerHelper("if",function(r,i){var s=t.call(r);return s===n&&(r=r.call(this)),!r||e.Utils.isEmpty(r)?i.inverse(this):i.fn(this)}),e.registerHelper("unless",function(t,n){var r=n.fn,i=n.inverse;return n.fn=i,n.inverse=r,e.helpers["if"].call(this,t,n)}),e.registerHelper("with",function(e,t){return t.fn(e)}),e.registerHelper("log",function(t,n){var r=n.data&&n.data.level!=null?parseInt(n.data.level,10):1;e.log(r,t)})}(this.Handlebars);var e=function(){function n(){this.yy={}}var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,simpleInverse:6,statements:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,OPEN_PARTIAL:24,partialName:25,params:26,hash:27,DATA:28,param:29,STRING:30,INTEGER:31,BOOLEAN:32,hashSegments:33,hashSegment:34,ID:35,EQUALS:36,PARTIAL_NAME:37,pathSegments:38,SEP:39,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"DATA",30:"STRING",31:"INTEGER",32:"BOOLEAN",35:"ID",36:"EQUALS",37:"PARTIAL_NAME",39:"SEP"},productions_:[0,[3,2],[4,2],[4,3],[4,2],[4,1],[4,1],[4,0],[7,1],[7,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[6,2],[17,3],[17,2],[17,2],[17,1],[17,1],[26,2],[26,1],[29,1],[29,1],[29,1],[29,1],[29,1],[27,1],[33,2],[33,1],[34,3],[34,3],[34,3],[34,3],[34,3],[25,1],[21,1],[38,3],[38,1]],performAction:function(t,n,r,i,s,o,u){var a=o.length-1;switch(s){case 1:return o[a-1];case 2:this.$=new i.ProgramNode([],o[a]);break;case 3:this.$=new i.ProgramNode(o[a-2],o[a]);break;case 4:this.$=new i.ProgramNode(o[a-1],[]);break;case 5:this.$=new i.ProgramNode(o[a]);break;case 6:this.$=new i.ProgramNode([],[]);break;case 7:this.$=new i.ProgramNode([]);break;case 8:this.$=[o[a]];break;case 9:o[a-1].push(o[a]),this.$=o[a-1];break;case 10:this.$=new i.BlockNode(o[a-2],o[a-1].inverse,o[a-1],o[a]);break;case 11:this.$=new i.BlockNode(o[a-2],o[a-1],o[a-1].inverse,o[a]);break;case 12:this.$=o[a];break;case 13:this.$=o[a];break;case 14:this.$=new i.ContentNode(o[a]);break;case 15:this.$=new i.CommentNode(o[a]);break;case 16:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 17:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 18:this.$=o[a-1];break;case 19:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 20:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1],!0);break;case 21:this.$=new i.PartialNode(o[a-1]);break;case 22:this.$=new i.PartialNode(o[a-2],o[a-1]);break;case 23:break;case 24:this.$=[[o[a-2]].concat(o[a-1]),o[a]];break;case 25:this.$=[[o[a-1]].concat(o[a]),null];break;case 26:this.$=[[o[a-1]],o[a]];break;case 27:this.$=[[o[a]],null];break;case 28:this.$=[[new i.DataNode(o[a])],null];break;case 29:o[a-1].push(o[a]),this.$=o[a-1];break;case 30:this.$=[o[a]];break;case 31:this.$=o[a];break;case 32:this.$=new i.StringNode(o[a]);break;case 33:this.$=new i.IntegerNode(o[a]);break;case 34:this.$=new i.BooleanNode(o[a]);break;case 35:this.$=new i.DataNode(o[a]);break;case 36:this.$=new i.HashNode(o[a]);break;case 37:o[a-1].push(o[a]),this.$=o[a-1];break;case 38:this.$=[o[a]];break;case 39:this.$=[o[a-2],o[a]];break;case 40:this.$=[o[a-2],new i.StringNode(o[a])];break;case 41:this.$=[o[a-2],new i.IntegerNode(o[a])];break;case 42:this.$=[o[a-2],new i.BooleanNode(o[a])];break;case 43:this.$=[o[a-2],new i.DataNode(o[a])];break;case 44:this.$=new i.PartialNameNode(o[a]);break;case 45:this.$=new i.IdNode(o[a]);break;case 46:o[a-2].push(o[a]),this.$=o[a-2];break;case 47:this.$=[o[a]]}},table:[{3:1,4:2,5:[2,7],6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],22:[1,14],23:[1,15],24:[1,16]},{1:[3]},{5:[1,17]},{5:[2,6],7:18,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12
19
+ ],16:[1,13],19:[1,19],20:[2,6],22:[1,14],23:[1,15],24:[1,16]},{5:[2,5],6:20,8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,5],22:[1,14],23:[1,15],24:[1,16]},{17:23,18:[1,22],21:24,28:[1,25],35:[1,27],38:26},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{4:28,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],24:[1,16]},{4:29,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],24:[1,16]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{17:30,21:24,28:[1,25],35:[1,27],38:26},{17:31,21:24,28:[1,25],35:[1,27],38:26},{17:32,21:24,28:[1,25],35:[1,27],38:26},{25:33,37:[1,34]},{1:[2,1]},{5:[2,2],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,2],22:[1,14],23:[1,15],24:[1,16]},{17:23,21:24,28:[1,25],35:[1,27],38:26},{5:[2,4],7:35,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,4],22:[1,14],23:[1,15],24:[1,16]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,23],14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],24:[2,23]},{18:[1,36]},{18:[2,27],21:41,26:37,27:38,28:[1,45],29:39,30:[1,42],31:[1,43],32:[1,44],33:40,34:46,35:[1,47],38:26},{18:[2,28]},{18:[2,45],28:[2,45],30:[2,45],31:[2,45],32:[2,45],35:[2,45],39:[1,48]},{18:[2,47],28:[2,47],30:[2,47],31:[2,47],32:[2,47],35:[2,47],39:[2,47]},{10:49,20:[1,50]},{10:51,20:[1,50]},{18:[1,52]},{18:[1,53]},{18:[1,54]},{18:[1,55],21:56,35:[1,27],38:26},{18:[2,44],35:[2,44]},{5:[2,3],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,3],22:[1,14],23:[1,15],24:[1,16]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{18:[2,25],21:41,27:57,28:[1,45],29:58,30:[1,42],31:[1,43],32:[1,44],33:40,34:46,35:[1,47],38:26},{18:[2,26]},{18:[2,30],28:[2,30],30:[2,30],31:[2,30],32:[2,30],35:[2,30]},{18:[2,36],34:59,35:[1,60]},{18:[2,31],28:[2,31],30:[2,31],31:[2,31],32:[2,31],35:[2,31]},{18:[2,32],28:[2,32],30:[2,32],31:[2,32],32:[2,32],35:[2,32]},{18:[2,33],28:[2,33],30:[2,33],31:[2,33],32:[2,33],35:[2,33]},{18:[2,34],28:[2,34],30:[2,34],31:[2,34],32:[2,34],35:[2,34]},{18:[2,35],28:[2,35],30:[2,35],31:[2,35],32:[2,35],35:[2,35]},{18:[2,38],35:[2,38]},{18:[2,47],28:[2,47],30:[2,47],31:[2,47],32:[2,47],35:[2,47],36:[1,61],39:[2,47]},{35:[1,62]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{21:63,35:[1,27],38:26},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],24:[2,21]},{18:[1,64]},{18:[2,24]},{18:[2,29],28:[2,29],30:[2,29],31:[2,29],32:[2,29],35:[2,29]},{18:[2,37],35:[2,37]},{36:[1,61]},{21:65,28:[1,69],30:[1,66],31:[1,67],32:[1,68],35:[1,27],38:26},{18:[2,46],28:[2,46],30:[2,46],31:[2,46],32:[2,46],35:[2,46],39:[2,46]},{18:[1,70]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],24:[2,22]},{18:[2,39],35:[2,39]},{18:[2,40],35:[2,40]},{18:[2,41],35:[2,41]},{18:[2,42],35:[2,42]},{18:[2,43],35:[2,43]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]}],defaultActions:{17:[2,1],25:[2,28],38:[2,26],57:[2,24]},parseError:function(t,n){throw new Error(t)},parse:function(t){function v(e){r.length=r.length-2*e,i.length=i.length-e,s.length=s.length-e}function m(){var e;return e=n.lexer.lex()||1,typeof e!="number"&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0,c=2,h=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var p=this.lexer.yylloc;s.push(p);var d=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var g,y,b,w,E,S,x={},T,N,C,k;for(;;){b=r[r.length-1];if(this.defaultActions[b])w=this.defaultActions[b];else{if(g===null||typeof g=="undefined")g=m();w=o[b]&&o[b][g]}if(typeof w=="undefined"||!w.length||!w[0]){var L="";if(!l){k=[];for(T in o[b])this.terminals_[T]&&T>2&&k.push("'"+this.terminals_[T]+"'");this.lexer.showPosition?L="Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[g]||g)+"'":L="Parse error on line "+(a+1)+": Unexpected "+(g==1?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(L,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:p,expected:k})}}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(w[0]){case 1:r.push(g),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(w[1]),g=null,y?(g=y,y=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:N=this.productions_[w[1]][1],x.$=i[i.length-N],x._$={first_line:s[s.length-(N||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(N||1)].first_column,last_column:s[s.length-1].last_column},d&&(x._$.range=[s[s.length-(N||1)].range[0],s[s.length-1].range[1]]),S=this.performAction.call(x,u,f,a,this.yy,w[1],i,s);if(typeof S!="undefined")return S;N&&(r=r.slice(0,-1*N*2),i=i.slice(0,-1*N),s=s.slice(0,-1*N)),r.push(this.productions_[w[1]][0]),i.push(x.$),s.push(x._$),C=o[r[r.length-2]][r[r.length-1]],r.push(C);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i,s;this._more||(this.yytext="",this.match="");var o=this._currentRules();for(var u=0;u<o.length;u++){n=this._input.match(this.rules[o[u]]);if(n&&(!t||n[0].length>t[0].length)){t=n,r=u;if(!this.options.flex)break}}if(t){s=t[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1);if(e)return e;return}return this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return e.options={},e.performAction=function(t,n,r,i){var s=i;switch(r){case 0:n.yytext.slice(-1)!=="\\"&&this.begin("mu"),n.yytext.slice(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1),this.begin("emu"));if(n.yytext)return 14;break;case 1:return 14;case 2:return n.yytext.slice(-1)!=="\\"&&this.popState(),n.yytext.slice(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1)),14;case 3:return n.yytext=n.yytext.substr(0,n.yyleng-4),this.popState(),15;case 4:return this.begin("par"),24;case 5:return 16;case 6:return 20;case 7:return 19;case 8:return 19;case 9:return 23;case 10:return 23;case 11:this.popState(),this.begin("com");break;case 12:return n.yytext=n.yytext.substr(3,n.yyleng-5),this.popState(),15;case 13:return 22;case 14:return 36;case 15:return 35;case 16:return 35;case 17:return 39;case 18:break;case 19:return this.popState(),18;case 20:return this.popState(),18;case 21:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\"/g,'"'),30;case 22:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\'/g,"'"),30;case 23:return n.yytext=n.yytext.substr(1),28;case 24:return 32;case 25:return 32;case 26:return 31;case 27:return 35;case 28:return n.yytext=n.yytext.substr(1,n.yyleng-2),35;case 29:return"INVALID";case 30:break;case 31:return this.popState(),37;case 32:return 5}},e.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[} ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@[a-zA-Z]+)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:[0-9]+(?=[}\s]))/,/^(?:[a-zA-Z0-9_$-]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:\s+)/,/^(?:[a-zA-Z0-9_$-/]+)/,/^(?:$)/],e.conditions={mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,32],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[3],inclusive:!1},par:{rules:[30,31],inclusive:!1},INITIAL:{rules:[0,1,32],inclusive:!0}},e}();return e.lexer=t,n.prototype=e,e.Parser=n,new n}();Handlebars.Parser=e,Handlebars.parse=function(e){return e.constructor===Handlebars.AST.ProgramNode?e:(Handlebars.Parser.yy=Handlebars.AST,Handlebars.Parser.parse(e))},Handlebars.print=function(e){return(new Handlebars.PrintVisitor).accept(e)},function(){Handlebars.AST={},Handlebars.AST.ProgramNode=function(e,t){this.type="program",this.statements=e,t&&(this.inverse=new Handlebars.AST.ProgramNode(t))},Handlebars.AST.MustacheNode=function(e,t,n){this.type="mustache",this.escaped=!n,this.hash=t;var r=this.id=e[0],i=this.params=e.slice(1),s=this.eligibleHelper=r.isSimple;this.isHelper=s&&(i.length||t)},Handlebars.AST.PartialNode=function(e,t){this.type="partial",this.partialName=e,this.context=t};var e=function(e,t){if(e.original!==t.original)throw new Handlebars.Exception(e.original+" doesn't match "+t.original)};Handlebars.AST.BlockNode=function(t,n,r,i){e(t.id,i),this.type="block",this.mustache=t,this.program=n,this.inverse=r,this.inverse&&!this.program&&(this.isInverse=!0)},Handlebars.AST.ContentNode=function(e){this.type="content",this.string=e},Handlebars.AST.HashNode=function(e){this.type="hash",this.pairs=e},Handlebars.AST.IdNode=function(e){this.type="ID",this.original=e.join(".");var t=[],n=0;for(var r=0,i=e.length;r<i;r++){var s=e[r];if(s===".."||s==="."||s==="this"){if(t.length>0)throw new Handlebars.Exception("Invalid path: "+this.original);s===".."?n++:this.isScoped=!0}else t.push(s)}this.parts=t,this.string=t.join("."),this.depth=n,this.isSimple=e.length===1&&!this.isScoped&&n===0,this.stringModeValue=this.string},Handlebars.AST.PartialNameNode=function(e){this.type="PARTIAL_NAME",this.name=e},Handlebars.AST.DataNode=function(e){this.type="DATA",this.id=e},Handlebars.AST.StringNode=function(e){this.type="STRING",this.string=e,this.stringModeValue=e},Handlebars.AST.IntegerNode=function(e){this.type="INTEGER",this.integer=e,this.stringModeValue=Number(e)},Handlebars.AST.BooleanNode=function(e){this.type="BOOLEAN",this.bool=e,this.stringModeValue=e==="true"},Handlebars.AST.CommentNode=function(e){this.type="comment",this.comment=e}}();var t=["description","fileName","lineNumber","message","name","number","stack"];Handlebars.Exception=function(e){var n=Error.prototype.constructor.apply(this,arguments);for(var r=0;r<t.length;r++)this[t[r]]=n[t[r]]},Handlebars.Exception.prototype=new Error,Handlebars.SafeString=function(e){this.string=e},Handlebars.SafeString.prototype.toString=function(){return this.string.toString()},function(){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},t=/[&<>"'`]/g,n=/[&<>"'`]/,r=function(t){return e[t]||"&amp;"};Handlebars.Utils={escapeExpression:function(e){return e instanceof Handlebars.SafeString?e.toString():e==null||e===!1?"":n.test(e)?e.replace(t,r):e},isEmpty:function(e){return!e&&e!==0?!0:Object.prototype.toString.call(e)==="[object Array]"&&e.length===0?!0:!1}}}(),Handlebars.Compiler=function(){},Handlebars.JavaScriptCompiler=function(){},function(e,t){e.prototype={compiler:e,disassemble:function(){var e=this.opcodes,t,n=[],r,i;for(var s=0,o=e.length;s<o;s++){t=e[s];if(t.opcode==="DECLARE")n.push("DECLARE "+t.name+"="+t.value);else{r=[];for(var u=0;u<t.args.length;u++)i=t.args[u],typeof i=="string"&&(i='"'+i.replace("\n","\\n")+'"'),r.push(i);n.push(t.opcode+" "+r.join(" "))}}return n.join("\n")},equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var n=0;n<t;n++){var r=this.opcodes[n],i=e.opcodes[n];if(r.opcode!==i.opcode||r.args.length!==i.args.length)return!1;for(var s=0;s<r.args.length;s++)if(r.args[s]!==i.args[s])return!1}return!0},guid:0,compile:function(e,t){this.children=[],this.depths={list:[]},this.options=t;var n=this.options.knownHelpers;this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0};if(n)for(var r in n)this.options.knownHelpers[r]=n[r];return this.program(e)},accept:function(e){return this[e.type](e)},program:function(e){var t=e.statements,n;this.opcodes=[];for(var r=0,i=t.length;r<i;r++)n=t[r],this[n.type](n);return this.isSimple=i===1,this.depths.list=this.depths.list.sort(function(e,t){return e-t}),this},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),n=this.guid++,r;this.usePartial=this.usePartial||t.usePartial,this.children[n]=t;for(var i=0,s=t.depths.list.length;i<s;i++){r=t.depths.list[i];if(r<2)continue;this.addDepth(r-1)}return n},block:function(e){var t=e.mustache,n=e.program,r=e.inverse;n&&(n=this.compileProgram(n)),r&&(r=this.compileProgram(r));var i=this.classifyMustache(t);i==="helper"?this.helperMustache(t,n,r):i==="simple"?(this.simpleMustache(t),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue")):(this.ambiguousMustache(t,n,r),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(e){var t=e.pairs,n,r;this.opcode("pushHash");for(var i=0,s=t.length;i<s;i++)n=t[i],r=n[1],this.options.stringParams?this.opcode("pushStringParam",r.stringModeValue,r.type):this.accept(r),this.opcode("assignToHash",n[0]);this.opcode("popHash")},partial:function(e){var t=e.partialName;this.usePartial=!0,e.context?this.ID(e.context):this.opcode("push","depth0"),this.opcode("invokePartial",t.name),this.opcode("append")},content:function(e){this.opcode("appendContent",e.string)},mustache:function(e){var t=this.options,n=this.classifyMustache(e);n==="simple"?this.simpleMustache(e):n==="helper"?this.helperMustache(e):this.ambiguousMustache(e),e.escaped&&!t.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousMustache:function(e,t,n){var r=e.id,i=r.parts[0],s=t!=null||n!=null;this.opcode("getContext",r.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("invokeAmbiguous",i,s)},simpleMustache:function(e){var t=e.id;t.type==="DATA"?this.DATA(t):t.parts.length?this.ID(t):(this.addDepth(t.depth),this.opcode("getContext",t.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperMustache:function(e,t,n){var r=this.setupFullMustacheParams(e,t,n),i=e.id.parts[0];if(this.options.knownHelpers[i])this.opcode("invokeKnownHelper",r.length,i);else{if(this.knownHelpersOnly)throw new Error("You specified knownHelpersOnly, but used the unknown helper "+i);this.opcode("invokeHelper",r.length,i)}},ID:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0];t?this.opcode("lookupOnContext",e.parts[0]):this.opcode("pushContext");for(var n=1,r=e.parts.length;n<r;n++)this.opcode("lookup",e.parts[n])},DATA:function(e){this.options.data=!0,this.opcode("lookupData",e.id)},STRING:function(e){this.opcode("pushString",e.string)},INTEGER:function(e){this.opcode("pushLiteral",e.integer)},BOOLEAN:function(e){this.opcode("pushLiteral",e.bool)},comment:function(){},opcode:function(e){this.opcodes.push({opcode:e,args:[].slice.call(arguments,1)})},declare:function(e,t){this.opcodes.push({opcode:"DECLARE",name:e,value:t})},addDepth:function(e){if(isNaN(e))throw new Error("EWOT");if(e===0)return;this.depths[e]||(this.depths[e]=!0,this.depths.list.push(e))},classifyMustache:function(e){var t=e.isHelper,n=e.eligibleHelper,r=this.options;if(n&&!t){var i=e.id.parts[0];r.knownHelpers[i]?t=!0:r.knownHelpersOnly&&(n=!1)}return t?"helper":n?"ambiguous":"simple"},pushParams:function(e){var t=e.length,n;while(t--)n=e[t],this.options.stringParams?(n.depth&&this.addDepth(n.depth),this.opcode("getContext",n.depth||0),this.opcode("pushStringParam",n.stringModeValue,n.type)):this[n.type](n)},setupMustacheParams:function(e){var t=e.params;return this.pushParams(t),e.hash?this.hash(e.hash):this.opcode("emptyHash"),t},setupFullMustacheParams:function(e,t,n){var r=e.params;return this.pushParams(r),this.opcode("pushProgram",t),this.opcode("pushProgram",n),e.hash?this.hash(e.hash):this.opcode("emptyHash"),r}};var n=function(e){this.value=e};t.prototype={nameLookup:function(e,n){return/^[0-9]+$/.test(n)?e+"["+n+"]":t.isValidJavaScriptVariableName(n)?e+"."+n:e+"['"+n+"']"},appendToBuffer:function(e){return this.environment.isSimple?"return "+e+";":{appendToBuffer:!0,content:e,toString:function(){return"buffer += "+e+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(e,t,n,r){this.environment=e,this.options=t||{},Handlebars.log(Handlebars.logger.DEBUG,this.environment.disassemble()+"\n\n"),this.name=this.environment.name,this.isChild=!!n,this.context=n||{programs:[],environments:[],aliases:{}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.registers={list:[]},this.compileStack=[],this.inlineStack=[],this.compileChildren(e,t);var i=e.opcodes,s;this.i=0;for(o=i.length;this.i<o;this.i++)s=i[this.i],s.opcode==="DECLARE"?this[s.name]=s.value:this[s.opcode].apply(this,s.args);return this.createFunctionContext(r)},nextOpcode:function(){var e=this.environment.opcodes;return e[this.i+1]},eat:function(){this.i=this.i+1},preamble:function(){var e=[];if(!this.isChild){var t=this.namespace,n="helpers = helpers || "+t+".helpers;";this.environment.usePartial&&(n=n+" partials = partials || "+t+".partials;"),this.options.data&&(n+=" data = data || {};"),e.push(n)}else e.push("");this.environment.isSimple?e.push(""):e.push(", buffer = "+this.initializeBuffer()),this.lastContext=0,this.source=e},createFunctionContext:function(e){var t=this.stackVars.concat(this.registers.list);t.length>0&&(this.source[1]=this.source[1]+", "+t.join(", "));if(!this.isChild)for(var n in this.context.aliases)this.source[1]=this.source[1]+", "+n+"="+this.context.aliases[n];this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+";"),this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n"),this.environment.isSimple||this.source.push("return buffer;");var r=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var i=0,s=this.environment.depths.list.length;i<s;i++)r.push("depth"+this.environment.depths.list[i]);var o=this.mergeSource();if(!this.isChild){var u=Handlebars.COMPILER_REVISION,a=Handlebars.REVISION_CHANGES[u];o="this.compilerInfo = ["+u+",'"+a+"'];\n"+o}if(e)return r.push(o),Function.apply(this,r);var f="function "+(this.name||"")+"("+r.join(",")+") {\n "+o+"}";return Handlebars.log(Handlebars.logger.DEBUG,f+"\n\n"),f},mergeSource:function(){var e="",t;for(var n=0,r=this.source.length;n<r;n++){var i=this.source[n];i.appendToBuffer?t?t=t+"\n + "+i.content:t=i.content:(t&&(e+="buffer += "+t+";\n ",t=undefined),e+=i+"\n ")}return e},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var e=["depth0"];this.setupParams(0,e),this.replaceStack(function(t){return e.splice(1,0,t),"blockHelperMissing.call("+e.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var e=["depth0"];this.setupParams(0,e);var t=this.topStack();e.splice(1,0,t),e[e.length-1]="options",this.source.push("if (!"+this.lastHelper+") { "+t+" = blockHelperMissing.call("+e.join(", ")+"); }")},appendContent:function(e){this.source.push(this.appendToBuffer(this.quotedString(e)))},append:function(){this.flushInline();var e=this.popStack();this.source.push("if("+e+" || "+e+" === 0) { "+this.appendToBuffer(e)+" }"),this.environment.isSimple&&this.source.push("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression",this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(e){this.lastContext!==e&&(this.lastContext=e)},lookupOnContext:function(e){this.push(this.nameLookup("depth"+this.lastContext,e,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"',this.replaceStack(function(e){return"typeof "+e+" === functionType ? "+e+".apply(depth0) : "+e})},lookup:function(e){this.replaceStack(function(t){return t+" == null || "+t+" === false ? "+t+" : "+this.nameLookup(t,e,"context")})},lookupData:function(e){this.push(this.nameLookup("data",e,"data"))},pushStringParam:function(e,t){this.pushStackLiteral("depth"+this.lastContext),this.pushString(t),typeof e=="string"?this.pushString(e):this.pushStackLiteral(e)},emptyHash:function(){this.pushStackLiteral("{}"),this.options.stringParams&&this.register("hashTypes","{}")},pushHash:function(){this.hash={values:[],types:[]}},popHash:function(){var e=this.hash;this.hash=undefined,this.options.stringParams&&this.register("hashTypes","{"+e.types.join(",")+"}"),this.push("{\n "+e.values.join(",\n ")+"\n }")},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},push:function(e){return this.inlineStack.push(e),e},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},invokeHelper:function(e,t){this.context.aliases.helperMissing="helpers.helperMissing";var n=this.lastHelper=this.setupHelper(e,t,!0);this.push(n.name),this.replaceStack(function(e){return e+" ? "+e+".call("+n.callParams+") "+": helperMissing.call("+n.helperMissingParams+")"})},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(n.name+".call("+n.callParams+")")},invokeAmbiguous:function(e,t){this.context.aliases.functionType='"function"',this.pushStackLiteral("{}");var n=this.setupHelper(0,e,t),r=this.lastHelper=this.nameLookup("helpers",e,"helper"),i=this.nameLookup("depth"+this.lastContext,e,"context"),s=this.nextStack();this.source.push("if ("+s+" = "+r+") { "+s+" = "+s+".call("+n.callParams+"); }"),this.source.push("else { "+s+" = "+i+"; "+s+" = typeof "+s+" === functionType ? "+s+".apply(depth0) : "+s+"; }")},invokePartial:function(e){var t=[this.nameLookup("partials",e,"partial"),"'"+e+"'",this.popStack(),"helpers","partials"];this.options.data&&t.push("data"),this.context.aliases.self="this",this.push("self.invokePartial("+t.join(", ")+")")},assignToHash:function(e){var t=this.popStack(),n;this.options.stringParams&&(n=this.popStack(),this.popStack());var r=this.hash;n&&r.types.push("'"+e+"': "+n),r.values.push("'"+e+"': ("+t+")")},compiler:t,compileChildren:function(e,t){var n=e.children,r,i;for(var s=0,o=n.length;s<o;s++){r=n[s],i=new this.compiler;var u=this.matchExistingProgram(r);u==null?(this.context.programs.push(""),u=this.context.programs.length,r.index=u,r.name="program"+u,this.context.programs[u]=i.compile(r,t,this.context),this.context.environments[u]=r):(r.index=u,r.name="program"+u)}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;t<n;t++){var r=this.context.environments[t];if(r&&r.equals(e))return t}},programExpression:function(e){this.context.aliases.self="this";if(e==null)return"self.noop";var t=this.environment.children[e],n=t.depths.list,r,i=[t.index,t.name,"data"];for(var s=0,o=n.length;s<o;s++)r=n[s],r===1?i.push("depth0"):i.push("depth"+(r-1));return n.length===0?"self.program("+i.join(", ")+")":(i.shift(),"self.programWithDepth("+i.join(", ")+")")},register:function(e,t){this.useRegister(e),this.source.push(e+" = "+t+";")},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},pushStackLiteral:function(e){return this.push(new n(e))},pushStack:function(e){this.flushInline();var t=this.incrStack();return e&&this.source.push(t+" = "+e+";"),this.compileStack.push(t),t},replaceStack:function(e){var t="",r=this.isInline(),i;if(r){var s=this.popStack(!0);if(s instanceof n)i=s.value;else{var o=this.stackSlot?this.topStackName():this.incrStack();t="("+this.push(o)+" = "+s+"),",i=this.topStack()}}else i=this.topStack();var u=e.call(this,i);return r?((this.inlineStack.length||this.compileStack.length)&&this.popStack(),this.push("("+t+u+")")):(/^stack/.test(i)||(i=this.nextStack()),this.source.push(i+" = ("+t+u+");")),i},nextStack:function(){return this.pushStack()},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;if(e.length){this.inlineStack=[];for(var t=0,r=e.length;t<r;t++){var i=e[t];i instanceof n?this.compileStack.push(i):this.pushStack(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),r=(t?this.inlineStack:this.compileStack).pop();return!e&&r instanceof n?r.value:(t||this.stackSlot--,r)},topStack:function(e){var t=this.isInline()?this.inlineStack:this.compileStack,r=t[t.length-1];return!e&&r instanceof n?r.value:r},quotedString:function(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"'},setupHelper:function(e,t,n){var r=[];this.setupParams(e,r,n);var i=this.nameLookup("helpers",t,"helper");return{params:r,name:i,callParams:["depth0"].concat(r).join(", "),helperMissingParams:n&&["depth0",this.quotedString(t)].concat(r).join(", ")}},setupParams:function(e,t,n){var r=[],i=[],s=[],o,u,a;r.push("hash:"+this.popStack()),u=this.popStack(),a=this.popStack();if(a||u)a||(this.context.aliases.self="this",a="self.noop"),u||(this.context.aliases.self="this",u="self.noop"),r.push("inverse:"+u),r.push("fn:"+a);for(var f=0;f<e;f++)o=this.popStack(),t.push(o),this.options.stringParams&&(s.push(this.popStack()),i.push(this.popStack()));return this.options.stringParams&&(r.push("contexts:["+i.join(",")+"]"),r.push("types:["+s.join(",")+"]"),r.push("hashTypes:hashTypes")),this.options.data&&r.push("data:data"),r="{"+r.join(",")+"}",n?(this.register("options",r),t.push("options")):t.push(r),t.join(", ")}};var r="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),i=t.RESERVED_WORDS={};for(var s=0,o=r.length;s<o;s++)i[r[s]]=!0;t.isValidJavaScriptVariableName=function(e){return!t.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(e)?!0:!1}}(Handlebars.Compiler,Handlebars.JavaScriptCompiler),Handlebars.precompile=function(e,t){if(!e||typeof e!="string"&&e.constructor!==Handlebars.AST.ProgramNode)throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=t||{},"data"in t||(t.data=!0);var n=Handlebars.parse(e),r=(new Handlebars.Compiler).compile(n,t);return(new Handlebars.JavaScriptCompiler).compile(r,t)},Handlebars.compile=function(e,t){function r(){var n=Handlebars.parse(e),r=(new Handlebars.Compiler).compile(n,t),i=(new Handlebars.JavaScriptCompiler).compile(r,t,undefined,!0);return Handlebars.template(i)}if(!e||typeof e!="string"&&e.constructor!==Handlebars.AST.ProgramNode)throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=t||{},"data"in t||(t.data=!0);var n;return function(e,t){return n||(n=r()),n.call(this,e,t)}},Handlebars.VM={template:function(e){var t={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(e,t,n){var r=this.programs[e];return n?Handlebars.VM.program(t,n):r?r:(r=this.programs[e]=Handlebars.VM.program(t),r)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop,compilerInfo:null};return function(n,r){r=r||{};var i=e.call(t,Handlebars,n,r.helpers,r.partials,r.data),s=t.compilerInfo||[],o=s[0]||1,u=Handlebars.COMPILER_REVISION;if(o!==u){if(o<u){var a=Handlebars.REVISION_CHANGES[u],f=Handlebars.REVISION_CHANGES[o];throw"Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+a+") or downgrade your runtime to an older version ("+f+")."}throw"Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+s[1]+")."}return i}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,2);return function(n,i){return i=i||{},e.apply(this,[n,i.data||t].concat(r))}},program:function(e,t){return function(n,r){return r=r||{},e(n,r.data||t)}},noop:function(){return""},invokePartial:function(e,t,n,r,i,s){var o={helpers:r,partials:i,data:s};if(e===undefined)throw new Handlebars.Exception("The partial "+t+" could not be found");if(e instanceof Function)return e(n,o);if(!Handlebars.compile)throw new Handlebars.Exception("The partial "+t+" could not be compiled when running in runtime-only mode");return i[t]=Handlebars.compile(e,{data:s!==undefined}),i[t](n,o)}},Handlebars.template=Handlebars.
20
+ VM.template}(),function(){var e=Object.create||function(e){function t(){}return t.prototype=e,new t},t=this.Handlebars||Ember.imports&&Ember.imports.Handlebars;!t&&typeof require=="function"&&(t=require("handlebars")),Ember.Handlebars=e(t),Ember.Handlebars.helpers=e(t.helpers),Ember.Handlebars.Compiler=function(){},t.Compiler&&(Ember.Handlebars.Compiler.prototype=e(t.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},t.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=e(t.JavaScriptCompiler.prototype),Ember.Handlebars.JavaScriptCompiler.prototype.compiler=Ember.Handlebars.JavaScriptCompiler),Ember.Handlebars.JavaScriptCompiler.prototype.namespace="Ember.Handlebars",Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(e){return"data.buffer.push("+e+");"};var n="ember"+ +(new Date),r=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&e.id.string==="control")e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["controlID",new t.AST.StringNode(n+r++)]);else if(!e.params.length&&!e.hash){var i=new t.AST.IdNode(["_triageMustache"]);e.escaped||(e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["unescaped",new t.AST.StringNode("true")])),e=new t.AST.MustacheNode([i].concat([e.id]),e.hash,!e.escaped)}return t.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var n=t.parse(e),r={knownHelpers:{action:!0,unbound:!0,bindAttr:!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(n,r);return(new Ember.Handlebars.JavaScriptCompiler).compile(i,r,undefined,!0)},t.compile&&(Ember.Handlebars.compile=function(e){var n=t.parse(e),r={data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(n,r),s=(new Ember.Handlebars.JavaScriptCompiler).compile(i,r,undefined,!0);return Ember.Handlebars.template(s)})}(),function(){function r(e,n,r,s){var o=r.length,u=this,a=s.data,f=a.view,l=s.hash,c=l.boundOptions,h,p,d,v,m,g;d=new Ember._SimpleHandlebarsView(null,null,!l.unescaped,a),d.normalizedValue=function(){var i=[],u,f;for(f in c){if(!c.hasOwnProperty(f))continue;m=t(e,c[f],a),d.path=m.path,d.pathRoot=m.root,l[f]=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(d)}for(v=0;v<o;++v)m=r[v],d.path=m.path,d.pathRoot=m.root,i.push(Ember._SimpleHandlebarsView.prototype.normalizedValue.call(d));return i.push(s),n.apply(e,i)},f.appendChild(d),h=[];for(p in c)c.hasOwnProperty(p)&&h.push(t(e,c[p],a));h=h.concat(r);for(v=0,g=h.length;v<g;++v)m=h[v],f.registerObserver(m.root,m.path,d,i)}function i(){Ember.run.scheduleOnce("render",this,"rerender")}function s(e,t,n,r){var i=[],s=r.hash,o=s.boundOptions,u,a,f,l;for(l in o){if(!o.hasOwnProperty(l))continue;s[l]=Ember.Handlebars.get(e,o[l],r)}for(u=0,a=n.length;u<a;++u)f=n[u],i.push(Ember.Handlebars.get(e,f.path,r));return i.push(r),t.apply(e,i)}var e=Array.prototype.slice,t=Ember.Handlebars.normalizePath=function(e,t,n){var r=n&&n.keywords||{},i,s;return i=t.split(".",1)[0],r.hasOwnProperty(i)&&(e=r[i],s=!0,t===i?t="":t=t.substr(i.length+1)),{root:e,path:t,isKeyword:s}},n=Ember.Handlebars.get=function(e,n,r){var i=r&&r.data,s=t(e,n,i),o;return e=s.root,n=s.path,o=Ember.get(e,n),o===undefined&&e!==Ember.lookup&&Ember.isGlobalPath(n)&&(o=Ember.get(Ember.lookup,n)),o};Ember.Handlebars.getPath=Ember.deprecateFunc("`Ember.Handlebars.getPath` has been changed to `Ember.Handlebars.get` for consistency.",Ember.Handlebars.get),Ember.Handlebars.resolveParams=function(e,t,r){var i=[],s=r.types,o,u;for(var a=0,f=t.length;a<f;a++)o=t[a],u=s[a],u==="ID"?i.push(n(e,o,r)):i.push(o);return i},Ember.Handlebars.resolveHash=function(e,t,r){var i={},s=r.hashTypes,o;for(var u in t){if(!t.hasOwnProperty(u))continue;o=s[u],o==="ID"?i[u]=n(e,t[u],r):i[u]=t[u]}return i},Ember.Handlebars.registerHelper("helperMissing",function(e,t){var n,r="";throw n="%@ Handlebars error: Could not find property '%@' on object %@.",t.data&&(r=t.data.view),new Ember.Error(Ember.String.fmt(n,[r,e,this]))}),Ember.Handlebars.registerBoundHelper=function(n,o){function a(){var n=e.call(arguments,0,-1),a=n.length,f=arguments[arguments.length-1],l=[],c=f.data,h=f.hash,p=c.view,d=f.contexts&&f.contexts[0]||this,v,m,g,y,b;h.boundOptions={};for(b in h){if(!h.hasOwnProperty(b))continue;Ember.IS_BINDING.test(b)&&typeof h[b]=="string"&&(h.boundOptions[b.slice(0,-7)]=h[b])}c.properties=[];for(y=0;y<a;++y)c.properties.push(n[y]),l.push(t(d,n[y],c));if(c.isUnbound)return s(this,o,l,f);if(u.length===0)return r(d,o,l,f);v=l[0],m=v.root,g=v.path;var w=new Ember._SimpleHandlebarsView(g,m,!f.hash.unescaped,f.data);w.normalizedValue=function(){var e=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(w);return o.call(p,e,f)},p.appendChild(w),p.registerObserver(m,g,w,i);for(var E=0,S=u.length;E<S;E++)p.registerObserver(m,g+"."+u[E],w,i)}var u=e.call(arguments,2);a._rawFunction=o,Ember.Handlebars.registerHelper(n,a)},Ember.Handlebars.template=function(e){var t=Handlebars.template(e);return t.isTop=!0,t}}(),function(){Ember.String.htmlSafe=function(e){return new Handlebars.SafeString(e)};var e=Ember.String.htmlSafe;if(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)String.prototype.htmlSafe=function(){return e(this)}}(),function(){Ember.Handlebars.resolvePaths=function(e){var t=[],n=e.contexts,r=e.roots,i=e.data;for(var s=0,o=n.length;s<o;s++)t.push(Ember.Handlebars.get(r[s],n[s],{data:i}));return t}}(),function(){var e=Ember.set,n=Ember.get,r=t("metamorph"),i={remove:function(e){e.morph.remove()},prepend:function(e,t){e.morph.prepend(t)},after:function(e,t){e.morph.after(t)},html:function(e,t){e.morph.html(t)},replace:function(e){var t=e.morph;e.transitionTo("preRender"),Ember.run.schedule("render",this,function(){if(e.isDestroying)return;e.clearRenderedChildren();var n=e.renderToBuffer();e.invokeRecursively(function(e){e.propertyDidChange("element")}),e.triggerRecursively("willInsertElement"),t.replaceWith(n.string()),e.transitionTo("inDOM"),e.triggerRecursively("didInsertElement")})},empty:function(e){e.morph.html("")}};Ember._Metamorph=Ember.Mixin.create({isVirtual:!0,tagName:"",instrumentName:"render.metamorph",init:function(){this._super(),this.morph=r()},beforeRender:function(e){e.push(this.morph.startTag()),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag(),e.push(this.morph.endTag())},createElement:function(){var e=this.renderToBuffer();this.outerHTML=e.string(),this.clearBuffer()},domManager:i}),Ember._MetamorphView=Ember.View.extend(Ember._Metamorph),Ember._SimpleMetamorphView=Ember.CoreView.extend(Ember._Metamorph)}(),function(){function s(e,t,n,r){this.path=e,this.pathRoot=t,this.isEscaped=n,this.templateData=r,this.morph=i(),this.state="preRender",this.updateId=null}var e=Ember.get,n=Ember.set,r=Ember.Handlebars.get,i=t("metamorph");Ember._SimpleHandlebarsView=s,s.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this.morph=null},propertyDidChange:Ember.K,normalizedValue:function(){var e=this.path,t=this.pathRoot,n,i;return e===""?n=t:(i=this.templateData,n=r(t,e,{data:i})),n},renderToBuffer:function(e){var t="";t+=this.morph.startTag(),t+=this.render(),t+=this.morph.endTag(),e.push(t)},render:function(){var e=this.isEscaped,t=this.normalizedValue();return t===null||t===undefined?t="":t instanceof Handlebars.SafeString||(t=String(t)),e&&(t=Handlebars.Utils.escapeExpression(t)),t},rerender:function(){switch(this.state){case"preRender":case"destroyed":break;case"inBuffer":throw new Ember.Error("Something you did tried to replace an {{expression}} before it was inserted into the DOM.");case"hasElement":case"inDOM":this.updateId=Ember.run.scheduleOnce("render",this,"update")}return this},update:function(){this.updateId=null,this.morph.html(this.render())},transitionTo:function(e){this.state=e}};var o=Ember.View.cloneStates(Ember.View.states),u=Ember.merge;u(o._default,{rerenderIfNeeded:Ember.K}),u(o.inDOM,{rerenderIfNeeded:function(t){e(t,"normalizedValue")!==t._lastNormalizedValue&&t.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"render.boundHandlebars",states:o,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:Ember.computed(function(){var t=e(this,"path"),n=e(this,"pathRoot"),i=e(this,"valueNormalizerFunc"),s,o;return t===""?s=n:(o=e(this,"templateData"),s=r(n,t,{data:o})),i?i(s):s}).property("path","pathRoot","valueNormalizerFunc").volatile(),rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(t){var r=e(this,"isEscaped"),i=e(this,"shouldDisplayFunc"),s=e(this,"preserveContext"),o=e(this,"previousContext"),u=e(this,"inverseTemplate"),a=e(this,"displayTemplate"),f=e(this,"normalizedValue");this._lastNormalizedValue=f;if(i(f)){n(this,"template",a);if(s)n(this,"_context",o);else{if(!a){f===null||f===undefined?f="":f instanceof Handlebars.SafeString||(f=String(f)),r&&(f=Handlebars.Utils.escapeExpression(f)),t.push(f);return}n(this,"_context",f)}}else u?(n(this,"template",u),s?n(this,"_context",o):n(this,"_context",f)):n(this,"template",function(){return""});return this._super(t)}})}(),function(){function a(e,t,n,s,o,u){var a=t.data,f=t.fn,l=t.inverse,c=a.view,h=this,p,d,v;p=i(h,e,a);if("object"==typeof this){if(a.insideGroup){d=function(){Ember.run.once(c,"rerender")};var m,g,y=r(h,e,t);y=o(y),g=n?h:y,s(y)?m=f:l&&(m=l),m(g,{data:t.data})}else{var b=c.createChildView(Ember._HandlebarsBoundView,{preserveContext:n,shouldDisplayFunc:s,valueNormalizerFunc:o,displayTemplate:f,inverseTemplate:l,path:e,pathRoot:h,previousContext:h,isEscaped:!t.hash.unescaped,templateData:t.data});c.appendChild(b),d=function(){Ember.run.scheduleOnce("render",b,"rerenderIfNeeded")}}if(p.path!==""){c.registerObserver(p.root,p.path,d);if(u)for(v=0;v<u.length;v++)c.registerObserver(p.root,p.path+"."+u[v],d)}}else a.buffer.push(r(h,e,t))}function f(e,t){var n=t.data,s=n.view,o=this,u,a;u=i(o,e,n);if("object"==typeof this){if(n.insideGroup){a=function(){Ember.run.once(s,"rerender")};var f=r(o,e,t);if(f===null||f===undefined)f="";n.buffer.push(f)}else{var l=new Ember._SimpleHandlebarsView(e,o,!t.hash.unescaped,t.data);l._parentView=s,s.appendChild(l),a=function(){Ember.run.scheduleOnce("render",l,"rerender")}}u.path!==""&&s.registerObserver(u.root,u.path,a)}else n.buffer.push(r(o,e,t))}var e=Ember.get,t=Ember.set,n=Ember.String.fmt,r=Ember.Handlebars.get,i=Ember.Handlebars.normalizePath,s=Ember.ArrayPolyfills.forEach,o=Ember.Handlebars,u=o.helpers;o.registerHelper("_triageMustache",function(e,t){return u[e]?u[e].call(this,t):u.bind.apply(this,arguments)}),o.registerHelper("bind",function(e,t){var n=t.contexts&&t.contexts[0]||this;return t.fn?a.call(n,e,t,!1,function(e){return!Ember.isNone(e)}):f.call(n,e,t)}),o.registerHelper("boundIf",function(t,n){var r=n.contexts&&n.contexts[0]||this,i=function(t){var n=t&&e(t,"isTruthy");return typeof n=="boolean"?n:Ember.isArray(t)?e(t,"length")!==0:!!t};return a.call(r,t,n,!0,i,i,["isTruthy","length"])}),o.registerHelper("with",function(e,t){if(arguments.length===4){var n,r,s,o;t=arguments[3],n=arguments[2],r=arguments[0];if(Ember.isGlobalPath(r))Ember.bind(t.data.keywords,n,r);else{o=i(this,r,t.data),r=o.path,s=o.root;var f=Ember.$.expando+Ember.guidFor(s);t.data.keywords[f]=s;var l=r?f+"."+r:f;Ember.bind(t.data.keywords,n,l)}return a.call(this,r,t,!0,function(e){return!Ember.isNone(e)})}return u.bind.call(t.contexts[0],e,t)}),o.registerHelper("if",function(e,t){return u.boundIf.call(t.contexts[0],e,t)}),o.registerHelper("unless",function(e,t){var n=t.fn,r=t.inverse;return t.fn=r,t.inverse=n,u.boundIf.call(t.contexts[0],e,t)}),o.registerHelper("bindAttr",function(e){var t=e.hash,n=e.data.view,u=[],a=this,f=++Ember.uuid,l=t["class"];if(l!==null&&l!==undefined){var c=o.bindClasses(this,l,n,f,e);u.push('class="'+Handlebars.Utils.escapeExpression(c.join(" "))+'"'),delete t["class"]}var h=Ember.keys(t);return s.call(h,function(s){var o=t[s],l;l=i(a,o,e.data);var c=o==="this"?l.root:r(a,o,e),h=Ember.typeOf(c),p,d;p=function(){var i=r(a,o,e),u=n.$("[data-bindattr-"+f+"='"+f+"']");if(!u||u.length===0){Ember.removeObserver(l.root,l.path,d);return}Ember.View.applyAttributeBindings(u,s,i)},d=function(){Ember.run.scheduleOnce("render",p)},o!=="this"&&(!l.isKeyword||l.path!=="")&&n.registerObserver(l.root,l.path,d),h==="string"||h==="number"&&!isNaN(c)?u.push(s+'="'+Handlebars.Utils.escapeExpression(c)+'"'):c&&h==="boolean"&&u.push(s+'="'+s+'"')},this),u.push("data-bindattr-"+f+'="'+f+'"'),new o.SafeString(u.join(" "))}),o.bindClasses=function(e,t,n,o,u){var a=[],f,l,c,h=function(e,t,n){var i,s=t.path;return s==="this"?i=e:s===""?i=!0:i=r(e,s,n),Ember.View._classStringForValue(s,i,t.className,t.falsyClassName)};return s.call(t.split(" "),function(t){var r,s,p,d=Ember.View._parsePropertyPath(t),v=d.path,m=e,g;v!==""&&v!=="this"&&(g=i(e,v,u.data),m=g.root,v=g.path),s=function(){f=h(e,d,u),c=o?n.$("[data-bindattr-"+o+"='"+o+"']"):n.$(),!c||c.length===0?Ember.removeObserver(m,v,p):(r&&c.removeClass(r),f?(c.addClass(f),r=f):r=null)},p=function(){Ember.run.scheduleOnce("render",s)},v!==""&&v!=="this"&&n.registerObserver(m,v,p),l=h(e,d,u),l&&(a.push(l),r=l)}),a}}(),function(){var e=Ember.get,t=Ember.set,n=/^parentView\./,r=Ember.Handlebars;r.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e,t){var n=e.hash,r=e.data,i={},s=n["class"],o=!1;n.id&&(i.elementId=n.id,o=!0),s&&(s=s.split(" "),i.classNames=s,o=!0),n.classBinding&&(i.classNameBindings=n.classBinding.split(" "),o=!0),n.classNameBindings&&(i.classNameBindings===undefined&&(i.classNameBindings=[]),i.classNameBindings=i.classNameBindings.concat(n.classNameBindings.split(" ")),o=!0),n.attributeBindings&&(i.attributeBindings=null,o=!0),o&&(n=Ember.$.extend({},n),delete n.id,delete n["class"],delete n.classBinding);var u;for(var a in n){if(!n.hasOwnProperty(a))continue;Ember.IS_BINDING.test(a)&&typeof n[a]=="string"&&(u=this.contextualizeBindingPath(n[a],r),u&&(n[a]=u))}if(i.classNameBindings)for(var f in i.classNameBindings){var l=i.classNameBindings[f];if(typeof l=="string"){var c=Ember.View._parsePropertyPath(l);u=this.contextualizeBindingPath(c.path,r),u&&(i.classNameBindings[f]=u+c.classNames)}}return Ember.$.extend(n,i)},contextualizeBindingPath:function(e,t){var n=Ember.Handlebars.normalizePath(null,e,t);return n.isKeyword?"templateData.keywords."+e:Ember.isGlobalPath(e)?null:e==="this"?"_parentView.context":"_parentView.context."+e},helper:function(e,t,n){var i=n.inverse,s=n.data,o=s.view,u=n.fn,a=n.hash,f;"string"==typeof t?f=r.get(e,t,n):f=t;var l=this.propertiesFromHTMLOptions(n,e),c=s.view;l.templateData=n.data;var h=f.proto?f.proto():f;u&&(l.template=u),!h.controller&&!h.controllerBinding&&!l.controller&&!l.controllerBinding&&(l._context=e),c.appendChild(f,l)}}),r.registerHelper("view",function(e,t){return e&&e.data&&e.data.isRenderData&&(t=e,e="Ember.View"),r.ViewHelper.helper(this,e,t)})}(),function(){var e=Ember.get,t=Ember.Handlebars.get,n=Ember.String.fmt;Ember.Handlebars.registerHelper("collection",function(n,r){n&&n.data&&n.data.isRenderData&&(r=n,n=undefined);var i=r.fn,s=r.data,o=r.inverse,u=r.data.view,a;a=n?t(this,n,r):Ember.CollectionView;var f=r.hash,l={},c,h,p=f.itemViewClass,d=a.proto();delete f.itemViewClass,h=p?t(d,p,r):d.itemViewClass;for(var v in f)f.hasOwnProperty(v)&&(c=v.match(/^item(.)(.*)$/),c&&v!=="itemController"&&(l[c[1].toLowerCase()+c[2]]=f[v],delete f[v]));var m=f.tagName||d.tagName;i&&(l.template=i,delete r.fn);var g;o&&o!==Handlebars.VM.noop?(g=e(d,"emptyViewClass"),g=g.extend({template:o,tagName:l.tagName})):f.emptyViewClass&&(g=t(this,f.emptyViewClass,r)),g&&(f.emptyView=g),f.keyword||(l._context=Ember.computed.alias("content"));var y=u.toString(),b=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:s,hash:l},this);return f.itemViewClass=h.extend(b),Ember.Handlebars.helpers.view.call(this,a,r)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,n){var r=arguments[arguments.length-1],i,s,o;return arguments.length>2?(r.data.isUnbound=!0,i=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helperMissing,o=i.apply(this,Array.prototype.slice.call(arguments,1)),delete r.data.isUnbound,o):(s=n.contexts&&n.contexts[0]||this,e(s,t,n))})}(),function(){var e=Ember.Handlebars.get,t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(n,r){var i=r.contexts&&r.contexts[0]||this,s=t(i,n,r.data),o=s.root,u=s.path,a=u==="this"?o:e(o,u,r);Ember.Logger.log(a)}),Ember.Handlebars.registerHelper("debugger",function(){debugger})}(),function(){var e=Ember.get,t=Ember.set;Ember.Handlebars.EachView=Ember.CollectionView.extend(Ember._Metamorph,{init:function(){var n=e(this,"itemController"),r;if(n){var i=Ember.ArrayController.create();t(i,"itemController",n),t(i,"container",e(this,"controller.container")),t(i,"_eachView",this),t(i,"target",e(this,"controller")),this.disableContentObservers(function(){t(this,"content",i),r=(new Ember.Binding("content","_eachView.dataSource")).oneWay(),r.connect(i)}),t(this,"_arrayController",i)}else this.disableContentObservers(function(){r=(new Ember.Binding("content","dataSource")).oneWay(),r.connect(this)});return this._super()},disableContentObservers:function(e){Ember.removeBeforeObserver(this,"content",null,"_contentWillChange"),Ember.removeObserver(this,"content",null,"_contentDidChange"),e.apply(this),Ember.addBeforeObserver(this,"content",null,"_contentWillChange"),Ember.addObserver(this,"content",null,"_contentDidChange")},itemViewClass:Ember._MetamorphView,emptyViewClass:Ember._MetamorphView,createChildView:function(n,r){n=this._super(n,r);var i=e(this,"keyword"),s=e(n,"content");if(i){var o=e(n,"templateData");o=Ember.copy(o),o.keywords=n.cloneKeywords(),t(n,"templateData",o),o.keywords[i]=s}return s&&e(s,"isController")&&t(n,"controller",s),n},willDestroy:function(){var t=e(this,"_arrayController");return t&&t.destroy(),this._super()}});var n=Ember.Handlebars.GroupedEach=function(e,t,n){var r=this,i=Ember.Handlebars.normalizePath(e,t,n.data);this.context=e,this.path=t,this.options=n,this.template=n.fn,this.containingView=n.data.view,this.normalizedRoot=i.root,this.normalizedPath=i.path,this.content=this.lookupContent(),this.addContentObservers(),this.addArrayObservers(),this.containingView.on("willClearRender",function(){r.destroy()})};n.prototype={contentWillChange:function(){this.removeArrayObservers()},contentDidChange:function(){this.content=this.lookupContent(),this.addArrayObservers(),this.rerenderContainingView()},contentArrayWillChange:Ember.K,contentArrayDidChange:function(){this.rerenderContainingView()},lookupContent:function(){return Ember.Handlebars.get(this.normalizedRoot,this.normalizedPath,this.options)},addArrayObservers:function(){this.content.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},removeArrayObservers:function(){this.content.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},addContentObservers:function(){Ember.addBeforeObserver(this.normalizedRoot,this.normalizedPath,this,this.contentWillChange),Ember.addObserver(this.normalizedRoot,this.normalizedPath,this,this.contentDidChange)},removeContentObservers:function(){Ember.removeBeforeObserver(this.normalizedRoot,this.normalizedPath,this.contentWillChange),Ember.removeObserver(this.normalizedRoot,this.normalizedPath,this.contentDidChange)},render:function(){var t=this.content,n=e(t,"length"),r=this.options.data,i=this.template;r.insideEach=!0;for(var s=0;s<n;s++)i(t.objectAt(s),{data:r})},rerenderContainingView:function(){Ember.run.scheduleOnce("render",this.containingView,"rerender")},destroy:function(){this.removeContentObservers(),this.removeArrayObservers()}},Ember.Handlebars.registerHelper("each",function(e,t){if(arguments.length===4){var n=arguments[0];t=arguments[3],e=arguments[2],e===""&&(e="this"),t.hash.keyword=n}t.hash.dataSourceBinding=e;if(!(t.data.insideGroup&&!t.hash.groupedRows&&!t.hash.itemViewClass))return Ember.Handlebars.helpers.collection.call(this,"Ember.Handlebars.EachView",t);(new Ember.Handlebars.GroupedEach(this,e,t)).render()})}(),function(){Ember.Handlebars.registerHelper("template",function(e,t){var n=Ember.TEMPLATES[e];Ember.TEMPLATES[e](this,{data:t.data})}),Ember.Handlebars.registerHelper("partial",function(e,t){var n=e.split("/"),r=n[n.length-1];n[n.length-1]="_"+r;var i=n.join("/"),s=Ember.TEMPLATES[i],o=Ember.TEMPLATES[e];s=s||o,s(this,{data:t.data})})}(),function(){var e=Ember.get,t=Ember.set;Ember.Handlebars.registerHelper("yield",function(t){var n=t.data.view,r;while(n&&!e(n,"layout"))n=e(n,"parentView");r=e(n,"template"),r&&r(this,t)})}(),function(){}(),function(){}(),function(){var e=Ember.set,t=Ember.get;Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","disabled","tabindex"],type:"checkbox",checked:!1,disabled:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},_updateElementValue:function(){e(this,"checked",this.$().prop("checked"))}})}(),function(){var e=Ember.get,t=Ember.set;Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex"],placeholder:null,disabled:!1,maxlength:null,insertNewline:Ember.K,cancel:Ember.K,init:function(){this._super(),this.on("focusOut",this,this._elementValueDidChange),this.on("change",this,this._elementValueDidChange),this.on("paste",this,this._elementValueDidChange),this.on("cut",this,this._elementValueDidChange),this.on("input",this,this._elementValueDidChange),this.on("keyUp",this,this.interpretKeyEvents)},interpretKeyEvents:function(e){var t=Ember.TextSupport.KEY_EVENTS,n=t[e.keyCode];this._elementValueDidChange();if(n)return this[n](e)},_elementValueDidChange:function(){t(this,"value",this.$().val())}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){var e=Ember.get,t=Ember.set;Ember.TextField=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern"],value:"",type:"text",size:null,pattern:null,action:null,bubbles:!1,insertNewline:function(t){var n=e(this,"controller"),r=e(this,"action");r&&(n.send(r,e(this,"value"),this),e(this,"bubbles")||t.stopPropagation())}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Button=Ember.View.extend(Ember.TargetActionSupport,{classNames:["ember-button"],classNameBindings:["isActive"],tagName:"button",propagateEvents:!1,attributeBindings:["type","disabled","href","tabindex"],targetObject:Ember.computed(function(){var t=e(this,"target"),n=e(this,"context"),r=e(this,"templateData");return typeof t!="string"?t:Ember.Handlebars.get(n,t,{data:r})}).property("target"),type:Ember.computed(function(e){var t=this.tagName;if(t==="input"||t==="button")return"button"}),disabled:!1,href:Ember.computed(function(){return this.tagName==="a"?"#":null}),mouseDown:function(){return e(this,"disabled")||(t(this,"isActive",!0),this._mouseDown=!0,this._mouseEntered=!0),e(this,"propagateEvents")},mouseLeave:function(){this._mouseDown&&(t(this,"isActive",!1),this._mouseEntered=!1)},mouseEnter:function(){this._mouseDown&&(t(this,"isActive",!0),this._mouseEntered=!0)},mouseUp:function(n){return e(this,"isActive")&&(this.triggerAction(),t(this,"isActive",!1)),this._mouseDown=!1,this._mouseEntered=!1,e(this,"propagateEvents")},keyDown:function(e){(e.keyCode===13||e.keyCode===32)&&this.mouseDown()},keyUp:function(e){(e.keyCode===13||e.keyCode===32)&&this.mouseUp()},touchStart:function(e){return this.mouseDown(e)},touchEnd:function(e){return this.mouseUp(e)},init:function(){this._super()}})}(),function(){var e=Ember.get,t=Ember.set;Ember.TextArea=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols"],rows:null,cols:null,_updateElementValue:Ember.observer(function(){var t=e(this,"value"),n=this.$();n&&t!==n.val()&&n.val(t)},"value"),init:function(){this._super(),this.on("didInsertElement",this,this._updateElementValue)}})}(),function(){var e=Ember.set,t=Ember.get,n=Ember.EnumerableUtils.indexOf,r=Ember.EnumerableUtils.indexesOf,i=Ember.EnumerableUtils.replace,s=Ember.isArray,o=Ember.Handlebars.compile;Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(t,n,r,i,s){function c(e,t){var n="",i;return t.buffer.push('<option value="">'),i={},t.buffer.push(f(r._triageMustache.call(e,"view.prompt",{hash:{},contexts:[e],types:["ID"],hashTypes:i,data:t}))),t.buffer.push("</option>"),n}function h(e,t){var n;n={contentBinding:"STRING"},t.buffer.push(f(r.view.call(e,"Ember.SelectOption",{hash:{contentBinding:"this"},contexts:[e],types:["ID"],hashTypes:n,data:t})))}this.compilerInfo=[2,">= 1.0.0-rc.3"],r=r||Ember.Handlebars.helpers,s=s||{};var o="",u,a,f=this.escapeExpression,l=this;return a={},u=r["if"].call(n,"view.prompt",{hash:{},inverse:l.noop,fn:l.program(1,c,s),contexts:[n],types:["ID"],hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),a={},u=r.each.call(n,"view.content",{hash:{},inverse:l.noop,fn:l.program(3,h,s),contexts:[n],types:["ID"],hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),o}),attributeBindings:["multiple","disabled","tabindex"],multiple:!1,disabled:!1,content:null,selection:null,value:Ember.computed(function(e,n){if(arguments.length===2)return n;var r=t(this,"optionValuePath").replace(/^content\.?/,"");return r?t(this,"selection."+r):t(this,"selection")}).property("selection"),prompt:null,optionLabelPath:"content",optionValuePath:"content",_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer(function(){var n=t(this,"selection");if(t(this,"multiple")){if(!s(n)){e(this,"selection",Ember.A([n]));return}this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()},"selection.@each"),valueDidChange:Ember.observer(function(){var e=t(this,"content"),n=t(this,"value"),r=t(this,"optionValuePath").replace(/^content\.?/,""),i=r?t(this,"selection."+r):t(this,"selection"),s;n!==i&&(s=e.find(function(e){return n===(r?t(e,r):e)}),this.set("selection",s))},"value"),_triggerChange:function(){var e=t(this,"selection"),n=t(this,"value");e&&this.selectionDidChange(),n&&this.valueDidChange(),this._change()},_changeSingle:function(){var n=this.$()[0].selectedIndex,r=t(this,"content"),i=t(this,"prompt");if(!t(r,"length"))return;if(i&&n===0){e(this,"selection",null);return}i&&(n-=1),e(this,"selection",r.objectAt(n))},_changeMultiple:function(){var n=this.$("option:selected"),r=t(this,"prompt"),o=r?1:0,u=t(this,"content"),a=t(this,"selection");if(!u)return;if(n){var f=n.map(function(){return this.index-o}).toArray(),l=u.objectsAt(f);s(a)?i(a,0,t(a,"length"),l):e(this,"selection",l)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(!e)return;var r=t(this,"content"),i=t(this,"selection"),s=r?n(r,i):-1,o=t(this,"prompt");o&&(s+=1),e&&(e.selectedIndex=s)},_selectionDidChangeMultiple:function(){var e=t(this,"content"),i=t(this,"selection"),s=e?r(e,i):[-1],o=t(this,"prompt"),u=o?1:0,a=this.$("option"),f;a&&a.each(function(){f=this.index>-1?this.index-u:-1,this.selected=n(s,f)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}}),Ember.SelectOption=Ember.View.extend({tagName:"option",attributeBindings:["value","selected"],defaultTemplate:function(e,t){t={data:t.data,hash:{}},Ember.Handlebars.helpers.bind.call(e,"view.label",t)},init:function(){this.labelPathDidChange(),this.valuePathDidChange(),this._super()},selected:Ember.computed(function(){var e=t(this,"content"),r=t(this,"parentView.selection");return t(this,"parentView.multiple")?r&&n(r,e.valueOf())>-1:e==r}).property("content","parentView.selection").volatile(),labelPathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionLabelPath");if(!e)return;Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionLabelPath"),valuePathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionValuePath");if(!e)return;Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionValuePath")})}(),function(){}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}Ember.Handlebars.bootstrap=function(e){var t='script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';Ember.$(t,e).each(function(){var e=Ember.$(this),t=e.attr("type")==="text/x-raw-handlebars"?Ember.$.proxy(Handlebars.compile,Handlebars):Ember.$.proxy(Ember.Handlebars.compile,Ember.Handlebars),n=e.attr("data-template-name")||e.attr("id")||"application",r=t(e.html());Ember.TEMPLATES[n]=r,e.remove()})},Ember.onLoad("application",e)}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){var e=Ember.get,t=Ember.set;Ember._PromiseChain=Ember.Object.extend({promises:null,failureCallback:Ember.K,successCallback:Ember.K,abortCallback:Ember.K,promiseSuccessCallback:Ember.K,runNextPromise:function(){if(e(this,"isDestroyed"))return;var t=e(this,"promises").shiftObject();if(t){var n=e(t,"promise")||t,r=this,i=function(){r.promiseSuccessCallback.call(this,t,arguments),r.runNextPromise()},s=e(r,"failureCallback");n.then(i,s)}else this.successCallback()},start:function(){return this.runNextPromise(),this},abort:function(){this.abortCallback(),this.destroy()},init:function(){t(this,"promises",Ember.A(e(this,"promises"))),this._super()}})}(),function(){function e(t,n,r,i){var s=t.name,o=t.incoming,u=t.incomingNames,a=u.length,f;r||(r={}),i||(i=[]);if(r.hasOwnProperty(s))return;i.push(s),r[s]=!0;for(f=0;f<a;f++)e(o[u[f]],n,r,i);n(t,i),i.pop()}function t(){this.names=[],this.vertices={}}t.prototype.add=function(e){if(!e)return;if(this.vertices.hasOwnProperty(e))return this.vertices[e];var t={name:e,incoming:{},incomingNames:[],hasOutgoing:!1,value:null};return this.vertices[e]=t,this.names.push(e),t},t.prototype.map=function(e,t){this.add(e).value=t},t.prototype.addEdge=function(t,n){function s(e,t){if(e.name===n)throw new Error("cycle detected: "+n+" <- "+t.join(" <- "))}if(!t||!n||t===n)return;var r=this.add(t),i=this.add(n);if(i.incoming.hasOwnProperty(t))return;e(r,s),r.hasOutgoing=!0,i.incoming[t]=r,i.incomingNames.push(t)},t.prototype.topsort=function(t){var n={},r=this.vertices,i=this.names,s=i.length,o,u;for(o=0;o<s;o++)u=r[i[o]],u.hasOutgoing||e(u,t,n)},t.prototype.addEdges=function(e,t,n,r){var i;this.map(e,t);if(n)if(typeof n=="string")this.addEdge(e,n);else for(i=0;i<n.length;i++)this.addEdge(e,n[i]);if(r)if(typeof r=="string")this.addEdge(r,e);else for(i=0;i<r.length;i++)this.addEdge(r[i],e)},Ember.DAG=t}(),function(){var e=Ember.get,t=Ember.set;Ember.Application=Ember.Namespace.extend({rootElement:"body",eventDispatcher:null,customEvents:null,autoinit:!Ember.testing,isInitialized:!1,init:function(){this.$||(this.$=Ember.$),this._super(),this.createEventDispatcher(),this._readinessDeferrals=1,this.waitForDOMContentLoaded();if(this.autoinit){var e=this;this.$().ready(function(){if(e.isDestroyed||e.isInitialized)return;e.initialize()})}},createEventDispatcher:function(){var n=e(this,"rootElement"),r=Ember.EventDispatcher.create({rootElement:n});t(this,"eventDispatcher",r)},waitForDOMContentLoaded:function(){this.deferReadiness();var e=this;this.$().ready(function(){e.advanceReadiness()})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,this._readinessDeferrals===0&&Ember.run.once(this,this.didBecomeReady)},initialize:function(e){return e=this.setupRouter(e),this.runInjections(e),Ember.runLoadHooks("application",this),this.isInitialized=!0,this.advanceReadiness(),this},runInjections:function(t){var n=e(this.constructor,"injections"),r=new Ember.DAG,i=this,s,o,u;for(o=0;o<n.length;o++)u=n[o],r.addEdges(u.name,u.injection,u.before,u.after);r.topsort(function(e){var n=e.value,r=Ember.A(Ember.keys(i));r.forEach(function(e){n(i,t,e)})})},setupRouter:function(e){return!e&&Ember.Router.detect(this.Router)&&(e=this.Router.create(),this._createdRouter=e),e&&(t(this,"router",e),t(e,"namespace",this)),e},didBecomeReady:function(){var t=e(this,"eventDispatcher"),n=e(this,"customEvents"),r;t.setup(n),this.ready(),r=e(this,"router"),this.createApplicationView(r),r&&
21
+ r instanceof Ember.Router&&this.startRouting(r),Ember.BOOTED=!0},createApplicationView:function(n){var r=e(this,"rootElement"),i={},s=this.ApplicationView,o=Ember.TEMPLATES.application,u,a;if(!s&&!o)return;n&&(u=e(n,"applicationController"),u&&(i.controller=u)),o&&(i.template=o),s||(s=Ember.View),a=s.create(i),this._createdApplicationView=a,n&&t(n,"applicationView",a),a.appendTo(r)},startRouting:function(t){var n=e(t,"location");t.route(n.getURL()),n.onUpdateURL(function(e){t.route(e)})},ready:Ember.K,willDestroy:function(){e(this,"eventDispatcher").destroy(),this._createdRouter&&this._createdRouter.destroy(),this._createdApplicationView&&this._createdApplicationView.destroy()},registerInjection:function(e){this.constructor.registerInjection(e)}}),Ember.Application.reopenClass({concatenatedProperties:["injections"],injections:Ember.A(),registerInjection:function(t){var n=e(this,"injections");n.push(t)}}),Ember.Application.registerInjection({name:"controllers",injection:function(e,t,n){if(!t)return;if(!/^[A-Z].*Controller$/.test(n))return;var r=n.charAt(0).toLowerCase()+n.substr(1),i=e[n],s;if(!Ember.Object.detect(i))return;s=e[n].create(),t.set(r,s),s.setProperties({target:t,controllers:t,namespace:e})}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){}(),function(){}(),function(){var e=Ember.get;Ember._ResolvedState=Ember.Object.extend({manager:null,state:null,match:null,object:Ember.computed(function(t){if(this._object)return this._object;var n=e(this,"state"),r=e(this,"match"),i=e(this,"manager");return n.deserialize(i,r.hash)}),hasPromise:Ember.computed(function(){return Ember.canInvoke(e(this,"object"),"then")}).property("object"),promise:Ember.computed(function(){var t=e(this,"object");return Ember.canInvoke(t,"then")?t:{then:function(e){e(t)}}}).property("object"),transition:function(){var t=e(this,"manager"),n=e(this,"state.path"),r=e(this,"object");t.transitionTo(n,r)}})}(),function(){var e=Ember.get,t=function(e){var t=e.toString(),n=t.split("."),r=n[n.length-1];return Ember.String.underscore(r)+"_id"},n=function(e,t){for(var n in t){if(!t.hasOwnProperty(n))continue;if(e.hasOwnProperty(n))continue;e[n]=t[n]}};Ember.Routable=Ember.Mixin.create({init:function(){var t;this.on("setup",this,this.stashContext);if(t=e(this,"redirectsTo"))this.connectOutlets=function(e){e.transitionTo(t)};var n=e(this,"route");n===""&&(n="/"),this._super()},setup:function(){return this.connectOutlets.apply(this,arguments)},stashContext:function(t,n){this.router=t;var r=this.serialize(t,n);t.setStateMeta(this,"context",n),t.setStateMeta(this,"serialized",r),e(this,"isRoutable")&&!e(t,"isRouting")&&this.updateRoute(t,e(t,"location"))},updateRoute:function(t,n){if(e(this,"isLeafRoute")){var r=this.absoluteRoute(t);n.setURL(r)}},absoluteRoute:function(t,r){var i=e(this,"parentState"),s="",o,u;u=null,r&&(r instanceof Array?r.length>0&&(u=r.shift()):u=r),e(i,"isRoutable")&&(s=i.absoluteRoute(t,r));var a=e(this,"routeMatcher"),f=t.getStateMeta(this,"serialized");return u=u||{},n(u,f),o=a&&a.generate(u),o&&(s=s+"/"+o),s},isRoutable:Ember.computed(function(){return typeof e(this,"route")=="string"}),isLeafRoute:Ember.computed(function(){return e(this,"isLeaf")?!0:!e(this,"childStates").findProperty("isRoutable")}),routeMatcher:Ember.computed(function(){var t=e(this,"route");if(t)return Ember._RouteMatcher.create({route:t})}),hasContext:Ember.computed(function(){var t=e(this,"routeMatcher");if(t)return t.identifiers.length>0}),modelClass:Ember.computed(function(){var t=e(this,"modelType");return typeof t=="string"?Ember.get(Ember.lookup,t):t}),modelClassFor:function(t){var n,r,i,s,o;if(n=e(this,"modelClass"))return n;if(!t)return;r=e(this,"routeMatcher");if(!r)return;i=r.identifiers;if(i.length!==2)return;s=i[1].match(/^(.*)_id$/);if(!s)return;return o=Ember.String.classify(s[1]),e(t,o)},deserialize:function(n,r){var i,s,o;return(i=this.modelClassFor(e(n,"namespace")))?i.find(r[t(i)]):r},serialize:function(n,r){var i,s,o,u,a;if(Ember.isEmpty(r))return"";if(i=this.modelClassFor(e(n,"namespace")))u=t(i),a=e(r,"id"),r={},r[u]=a;return r},resolvePath:function(t,n){if(e(this,"isLeafRoute"))return Ember.A();var r=e(this,"childStates"),i;r=Ember.A(r.filterProperty("isRoutable")),r=r.sort(function(t,n){var r=e(t,"routeMatcher.identifiers.length"),i=e(n,"routeMatcher.identifiers.length"),s=e(t,"route"),o=e(n,"route");return s.indexOf(o)===0?-1:o.indexOf(s)===0?1:r!==i?r-i:e(n,"route.length")-e(t,"route.length")});var s=r.find(function(t){var r=e(t,"routeMatcher");if(i=r.match(n))return!0}),o=Ember._ResolvedState.create({manager:t,state:s,match:i}),u=s.resolvePath(t,i.remaining);return Ember.A([o]).pushObjects(u)},routePath:function(t,n){function s(){r.forEach(function(e){e.transition()})}if(e(this,"isLeafRoute"))return;var r=this.resolvePath(t,n),i=r.some(function(t){return e(t,"hasPromise")});i?(t.transitionTo("loading"),t.handleStatePromises(r,s)):s()},unroutePath:function(t,n){var r=e(this,"parentState");if(r===t)return;n=n.replace(/^(?=[^\/])/,"/");var i=this.absoluteRoute(t),s=e(this,"route");if(s!=="/"){var o=n.indexOf(i),u=n.charAt(i.length);if(o===0&&(u==="/"||u===""))return}t.enterState({exitStates:[this],enterStates:[],finalState:r}),t.send("unroutePath",n)},parentTemplate:Ember.computed(function(){var t=this,n,r;while(t=e(t,"parentState"))if(r=e(t,"template"))return r;return"application"}),_template:Ember.computed(function(t){var n=e(this,"template");if(n)return n;var r=this.constructor.toString(),i;if(/^[^\[].*Route$/.test(r))return i=r.match(/([^\.]+\.)*([^\.]+)/)[2],i=i.replace(/Route$/,""),i.charAt(0).toLowerCase()+i.substr(1)}),render:function(t){t=t||{};var n=t.template||e(this,"_template"),r=t.into||e(this,"parentTemplate"),i=e(this.router,r+"Controller"),s=Ember.String.classify(n)+"View",o=e(e(this.router,"namespace"),s);o=(o||Ember.View).extend({templateName:n}),i.set("view",o.create())},connectOutlets:Ember.K,navigateAway:Ember.K})}(),function(){Ember.Route=Ember.State.extend(Ember.Routable)}(),function(){var e=function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^\$|#\s]/g,"\\$&")};Ember._RouteMatcher=Ember.Object.extend({state:null,init:function(){var t=this.route,n=[],r=1,i;t.charAt(0)==="/"&&(t=this.route=t.substr(1)),i=e(t);var s=i.replace(/(:|(?:\\\*))([a-z_]+)(?=$|\/)/gi,function(e,t,i){n[r++]=i;switch(t){case":":return"([^/]+)";case"\\*":return"(.+)"}});this.identifiers=n,this.regex=new RegExp("^/?"+s)},match:function(e){var t=e.match(this.regex);if(t){var n=this.identifiers,r={};for(var i=1,s=n.length;i<s;i++)r[n[i]]=t[i];return{remaining:e.substr(t[0].length),hash:n.length>0?r:null}}},generate:function(e){var t=this.identifiers,n=this.route,r;for(var i=1,s=t.length;i<s;i++)r=t[i],n=n.replace(new RegExp("(:|(\\*))"+r),e[r]);return n}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Location={create:function(e){var t=e&&e.implementation,n=this.implementations[t];return n.create.apply(n,arguments)},registerImplementation:function(e,t){this.implementations[e]=t},implementations:{}}}(),function(){var e=Ember.get,t=Ember.set;Ember.NoneLocation=Ember.Object.extend({path:"",getURL:function(){return e(this,"path")},setURL:function(e){t(this,"path",e)},onUpdateURL:function(e){},formatURL:function(e){return e}}),Ember.Location.registerImplementation("none",Ember.NoneLocation)}(),function(){var e=Ember.get,t=Ember.set;Ember.HashLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location)},getURL:function(){return e(this,"location").hash.substr(1)},setURL:function(n){e(this,"location").hash=n,t(this,"lastSetURL",n)},onUpdateURL:function(n){var r=this,i=Ember.guidFor(this);Ember.$(window).bind("hashchange.ember-location-"+i,function(){var i=location.hash.substr(1);if(e(r,"lastSetURL")===i)return;t(r,"lastSetURL",null),n(location.hash.substr(1))})},formatURL:function(e){return"#"+e},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("hashchange.ember-location-"+e)}}),Ember.Location.registerImplementation("hash",Ember.HashLocation)}(),function(){var e=Ember.get,t=Ember.set,n=!1;Ember.HistoryLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location),this.initState()},initState:function(){this.replaceState(e(this,"location").pathname),t(this,"history",window.history)},rootURL:"/",getURL:function(){return e(this,"location").pathname},setURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&(n=!0,this.pushState(e))},getState:function(){return e(this,"history").state},pushState:function(e){window.history.pushState({path:e},null,e)},replaceState:function(e){window.history.replaceState({path:e},null,e)},onUpdateURL:function(e){var t=Ember.guidFor(this);Ember.$(window).bind("popstate.ember-location-"+t,function(t){if(!n)return;e(location.pathname)})},formatURL:function(t){var n=e(this,"rootURL");return t!==""&&(n=n.replace(/\/$/,"")),n+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("popstate.ember-location-"+e)}}),Ember.Location.registerImplementation("history",Ember.HistoryLocation)}(),function(){}(),function(){var e=Ember.get,t=Ember.set,n=function(e,t){for(var n in t){if(!t.hasOwnProperty(n))continue;if(e.hasOwnProperty(n))continue;e[n]=t[n]}};Ember.Router=Ember.StateManager.extend({initialState:"root",location:"hash",rootURL:"/",transitionTo:function(){this.abortRoutingPromises(),this._super.apply(this,arguments)},route:function(n){function i(){n=n.replace(e(this,"rootURL"),""),n=n.replace(/^(?=[^\/])/,"/"),this.send("navigateAway"),this.send("unroutePath",n),r=e(this,"currentState");while(r&&!r.get("isRoutable"))r=e(r,"parentState");var t=r?r.absoluteRoute(this):"",i=n.substr(t.length);this.send("routePath",i)}function s(){t(this,"isRouting",!1)}this.abortRoutingPromises(),t(this,"isRouting",!0);var r;Ember.tryFinally(i,s,this),r=e(this,"currentState");while(r&&!r.get("isRoutable"))r=e(r,"parentState");r&&r.updateRoute(this,e(this,"location"))},urlFor:function(t,n){var r=e(this,"currentState")||this,i=this.findStateByPath(r,t),s=e(this,"location"),o=i.absoluteRoute(this,n);return s.formatURL(o)},urlForEvent:function(t){var n=Array.prototype.slice.call(arguments,1),r=e(this,"currentState"),i=r.lookupEventTransition(t),s,o;return s=this.findStateByPath(r,i),o=this.serializeRecursively(s,n,[]),this.urlFor(i,o)},serializeRecursively:function(t,n,r){var i,s=e(t,"hasContext")?n.pop():null,o=s?t.serialize(this,s):null;return r.push(o),i=t.get("parentState"),i&&i instanceof Ember.Route?this.serializeRecursively(i,n,r):r},abortRoutingPromises:function(){this._routingPromises&&(this._routingPromises.abort(),this._routingPromises=null)},handleStatePromises:function(e,n){this.abortRoutingPromises(),this.set("isLocked",!0);var r=this;this._routingPromises=Ember._PromiseChain.create({promises:e.slice(),successCallback:function(){r.set("isLocked",!1),n()},failureCallback:function(){throw"Unable to load object"},promiseSuccessCallback:function(e,n){t(e,"object",n[0])},abortCallback:function(){r.set("isLocked",!1)}}).start()},moveStatesIntoRoot:function(){this.root=Ember.Route.extend();for(var e in this){if(e==="constructor")continue;var t=this[e];if(t instanceof Ember.Route||Ember.Route.detect(t))this.root[e]=t,delete this[e]}},init:function(){this.root||this.moveStatesIntoRoot(),this._super();var n=e(this,"location"),r=e(this,"rootURL");"string"==typeof n&&t(this,"location",Ember.Location.create({implementation:n,rootURL:r})),this.assignRouter(this,this)},assignRouter:function(e,t){e.router=t;var n=e.states;if(n)for(var r in n){if(!n.hasOwnProperty(r))continue;this.assignRouter(n[r],t)}},willDestroy:function(){e(this,"location").destroy()}})}(),function(){var e=Ember.Handlebars,t=e.get,n=Ember.get,r=Array.prototype.slice,i=e.ActionHelper={registeredActions:{}};i.registerAction=function(e,t){var n=(++Ember.uuid).toString();return i.registeredActions[n]={eventName:t.eventName,handler:function(n){var r=n.shiftKey||n.metaKey||n.altKey||n.ctrlKey,i=n.which>1,s=r||i;if(t.link&&s)return;n.preventDefault(),n.view=t.view,t.hasOwnProperty("context")&&(n.context=t.context),t.hasOwnProperty("contexts")&&(n.contexts=t.contexts);var o=t.target;return typeof o.send=="function"?o.send(e,n):o[e].call(o,n)}},t.view.on("willClearRender",function(){delete i.registeredActions[n]}),n},e.registerHelper("action",function(s){var o=arguments[arguments.length-1],u=r.call(arguments,1,-1),a=o.hash,f=o.data.view,l,c,h,p={eventName:a.on||"click"};p.view=f=n(f,"concreteView");if(a.target)l=t(this,a.target,o);else if(c=o.data.keywords.controller)l=c;p.target=l=l||f,u.length&&(p.contexts=u=Ember.EnumerableUtils.map(u,function(e){return t(this,e,o)},this),p.context=u[0]);var d=[],v;a.href&&l.urlForEvent&&(v=l.urlForEvent.apply(l,[s].concat(u)),d.push('href="'+v+'"'),p.link=!0);var m=i.registerAction(s,p);return d.push('data-ember-action="'+m+'"'),new e.SafeString(d.join(" "))})}(),function(){}(),function(){Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,n){return t&&t.data&&t.data.isRenderData&&(n=t,t="view"),n.hash.currentViewBinding="view.context."+t,e.helpers.view.call(this,e.OutletView,n)})})}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({controllers:null,connectOutlet:function(n,r){var i,s,o,u,a;Ember.typeOf(r)==="string"&&(i=n,n=r,r=arguments[2]),arguments.length===1?Ember.typeOf(n)==="object"&&(a=n,i=a.outletName,n=a.name,s=a.viewClass,u=a.controller,r=a.context):a={},i=i||"view";if(n){var f=e(this,"namespace"),l=e(this,"controllers"),c=n.charAt(0).toUpperCase()+n.substr(1)+"View";s=e(f,c),u=e(l,n+"Controller")}return u&&r&&t(u,"content",r),o=this.createOutletView(i,s),u&&t(o,"controller",u),t(this,i,o),o},connectControllers:function(){var n=e(this,"controllers"),r=Array.prototype.slice.apply(arguments),i;for(var s=0,o=r.length;s<o;s++)i=r[s]+"Controller",t(this,i,e(n,i))},disconnectOutlet:function(e){e=e||"view",t(this,e,null)},createOutletView:function(e,t){return t.create()},urlForEvent:function(t,n){var r=e(this,"target");if(r)return r.urlForEvent(t,n)}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.String.fmt;Ember.View.reopen({templateForName:function(t,r){if(!t)return;var i=e(this,"templates"),s=e(i,t);if(!s)throw new Ember.Error(n('%@ - Unable to find %@ "%@".',[this,r,t]));return s}})}(),function(){}()})(),typeof location!="undefined"&&(location.hostname==="localhost"||location.hostname==="127.0.0.1")&&console.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website.");
@@ -5963,7 +5963,6 @@ define("container",
5963
5963
  register: function(type, name, factory, options) {
5964
5964
  var fullName;
5965
5965
 
5966
-
5967
5966
  if (type.indexOf(':') !== -1){
5968
5967
  options = factory;
5969
5968
  factory = name;
@@ -5973,15 +5972,23 @@ define("container",
5973
5972
  fullName = type + ":" + name;
5974
5973
  }
5975
5974
 
5976
- this.registry.set(fullName, factory);
5977
- this._options.set(fullName, options || {});
5975
+ var normalizedName = this.normalize(fullName);
5976
+
5977
+ this.registry.set(normalizedName, factory);
5978
+ this._options.set(normalizedName, options || {});
5978
5979
  },
5979
5980
 
5980
5981
  resolve: function(fullName) {
5981
5982
  return this.resolver(fullName) || this.registry.get(fullName);
5982
5983
  },
5983
5984
 
5985
+ normalize: function(fullName) {
5986
+ return fullName;
5987
+ },
5988
+
5984
5989
  lookup: function(fullName, options) {
5990
+ fullName = this.normalize(fullName);
5991
+
5985
5992
  options = options || {};
5986
5993
 
5987
5994
  if (this.cache.has(fullName) && options.singleton !== false) {
@@ -6110,7 +6117,8 @@ define("container",
6110
6117
  }
6111
6118
 
6112
6119
  function factoryFor(container, fullName) {
6113
- return container.resolve(fullName);
6120
+ var name = container.normalize(fullName);
6121
+ return container.resolve(name);
6114
6122
  }
6115
6123
 
6116
6124
  function instantiate(container, fullName) {
@@ -10962,40 +10970,8 @@ Ember.Mixin.prototype.toString = classToString;
10962
10970
 
10963
10971
 
10964
10972
  (function() {
10965
- /**
10966
- @module ember
10967
- @submodule ember-runtime
10968
- */
10969
-
10970
- /**
10971
- Defines a namespace that will contain an executable application. This is
10972
- very similar to a normal namespace except that it is expected to include at
10973
- least a 'ready' function which can be run to initialize the application.
10974
-
10975
- Currently `Ember.Application` is very similar to `Ember.Namespace.` However,
10976
- this class may be augmented by additional frameworks so it is important to
10977
- use this instance when building new applications.
10978
-
10979
- # Example Usage
10980
-
10981
- ```javascript
10982
- MyApp = Ember.Application.create({
10983
- VERSION: '1.0.0',
10984
- store: Ember.Store.create().from(Ember.fixtures)
10985
- });
10986
-
10987
- MyApp.ready = function() {
10988
- //..init code goes here...
10989
- }
10990
- ```
10991
-
10992
- @class Application
10993
- @namespace Ember
10994
- @extends Ember.Namespace
10995
- */
10996
10973
  Ember.Application = Ember.Namespace.extend();
10997
10974
 
10998
-
10999
10975
  })();
11000
10976
 
11001
10977
 
@@ -12274,7 +12250,8 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
12274
12250
 
12275
12251
  objectAtContent: function(idx) {
12276
12252
  var length = get(this, 'length'),
12277
- object = get(this,'arrangedContent').objectAt(idx);
12253
+ arrangedContent = get(this,'arrangedContent'),
12254
+ object = arrangedContent && arrangedContent.objectAt(idx);
12278
12255
 
12279
12256
  if (idx >= 0 && idx < length) {
12280
12257
  var controllerClass = this.lookupItemController(object);
@@ -18523,6 +18500,2211 @@ define("metamorph",
18523
18500
 
18524
18501
  })();
18525
18502
 
18503
+ (function() {
18504
+ /*
18505
+
18506
+ Copyright (C) 2011 by Yehuda Katz
18507
+
18508
+ Permission is hereby granted, free of charge, to any person obtaining a copy
18509
+ of this software and associated documentation files (the "Software"), to deal
18510
+ in the Software without restriction, including without limitation the rights
18511
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18512
+ copies of the Software, and to permit persons to whom the Software is
18513
+ furnished to do so, subject to the following conditions:
18514
+
18515
+ The above copyright notice and this permission notice shall be included in
18516
+ all copies or substantial portions of the Software.
18517
+
18518
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18519
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18520
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18521
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18522
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18523
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18524
+ THE SOFTWARE.
18525
+
18526
+ */
18527
+
18528
+ // lib/handlebars/base.js
18529
+
18530
+ /*jshint eqnull:true*/
18531
+ this.Handlebars = {};
18532
+
18533
+ (function(Handlebars) {
18534
+
18535
+ Handlebars.VERSION = "1.0.0-rc.3";
18536
+ Handlebars.COMPILER_REVISION = 2;
18537
+
18538
+ Handlebars.REVISION_CHANGES = {
18539
+ 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
18540
+ 2: '>= 1.0.0-rc.3'
18541
+ };
18542
+
18543
+ Handlebars.helpers = {};
18544
+ Handlebars.partials = {};
18545
+
18546
+ Handlebars.registerHelper = function(name, fn, inverse) {
18547
+ if(inverse) { fn.not = inverse; }
18548
+ this.helpers[name] = fn;
18549
+ };
18550
+
18551
+ Handlebars.registerPartial = function(name, str) {
18552
+ this.partials[name] = str;
18553
+ };
18554
+
18555
+ Handlebars.registerHelper('helperMissing', function(arg) {
18556
+ if(arguments.length === 2) {
18557
+ return undefined;
18558
+ } else {
18559
+ throw new Error("Could not find property '" + arg + "'");
18560
+ }
18561
+ });
18562
+
18563
+ var toString = Object.prototype.toString, functionType = "[object Function]";
18564
+
18565
+ Handlebars.registerHelper('blockHelperMissing', function(context, options) {
18566
+ var inverse = options.inverse || function() {}, fn = options.fn;
18567
+
18568
+
18569
+ var ret = "";
18570
+ var type = toString.call(context);
18571
+
18572
+ if(type === functionType) { context = context.call(this); }
18573
+
18574
+ if(context === true) {
18575
+ return fn(this);
18576
+ } else if(context === false || context == null) {
18577
+ return inverse(this);
18578
+ } else if(type === "[object Array]") {
18579
+ if(context.length > 0) {
18580
+ return Handlebars.helpers.each(context, options);
18581
+ } else {
18582
+ return inverse(this);
18583
+ }
18584
+ } else {
18585
+ return fn(context);
18586
+ }
18587
+ });
18588
+
18589
+ Handlebars.K = function() {};
18590
+
18591
+ Handlebars.createFrame = Object.create || function(object) {
18592
+ Handlebars.K.prototype = object;
18593
+ var obj = new Handlebars.K();
18594
+ Handlebars.K.prototype = null;
18595
+ return obj;
18596
+ };
18597
+
18598
+ Handlebars.logger = {
18599
+ DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,
18600
+
18601
+ methodMap: {0: 'debug', 1: 'info', 2: 'warn', 3: 'error'},
18602
+
18603
+ // can be overridden in the host environment
18604
+ log: function(level, obj) {
18605
+ if (Handlebars.logger.level <= level) {
18606
+ var method = Handlebars.logger.methodMap[level];
18607
+ if (typeof console !== 'undefined' && console[method]) {
18608
+ console[method].call(console, obj);
18609
+ }
18610
+ }
18611
+ }
18612
+ };
18613
+
18614
+ Handlebars.log = function(level, obj) { Handlebars.logger.log(level, obj); };
18615
+
18616
+ Handlebars.registerHelper('each', function(context, options) {
18617
+ var fn = options.fn, inverse = options.inverse;
18618
+ var i = 0, ret = "", data;
18619
+
18620
+ if (options.data) {
18621
+ data = Handlebars.createFrame(options.data);
18622
+ }
18623
+
18624
+ if(context && typeof context === 'object') {
18625
+ if(context instanceof Array){
18626
+ for(var j = context.length; i<j; i++) {
18627
+ if (data) { data.index = i; }
18628
+ ret = ret + fn(context[i], { data: data });
18629
+ }
18630
+ } else {
18631
+ for(var key in context) {
18632
+ if(context.hasOwnProperty(key)) {
18633
+ if(data) { data.key = key; }
18634
+ ret = ret + fn(context[key], {data: data});
18635
+ i++;
18636
+ }
18637
+ }
18638
+ }
18639
+ }
18640
+
18641
+ if(i === 0){
18642
+ ret = inverse(this);
18643
+ }
18644
+
18645
+ return ret;
18646
+ });
18647
+
18648
+ Handlebars.registerHelper('if', function(context, options) {
18649
+ var type = toString.call(context);
18650
+ if(type === functionType) { context = context.call(this); }
18651
+
18652
+ if(!context || Handlebars.Utils.isEmpty(context)) {
18653
+ return options.inverse(this);
18654
+ } else {
18655
+ return options.fn(this);
18656
+ }
18657
+ });
18658
+
18659
+ Handlebars.registerHelper('unless', function(context, options) {
18660
+ var fn = options.fn, inverse = options.inverse;
18661
+ options.fn = inverse;
18662
+ options.inverse = fn;
18663
+
18664
+ return Handlebars.helpers['if'].call(this, context, options);
18665
+ });
18666
+
18667
+ Handlebars.registerHelper('with', function(context, options) {
18668
+ return options.fn(context);
18669
+ });
18670
+
18671
+ Handlebars.registerHelper('log', function(context, options) {
18672
+ var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
18673
+ Handlebars.log(level, context);
18674
+ });
18675
+
18676
+ }(this.Handlebars));
18677
+ ;
18678
+ // lib/handlebars/compiler/parser.js
18679
+ /* Jison generated parser */
18680
+ var handlebars = (function(){
18681
+ var parser = {trace: function trace() { },
18682
+ yy: {},
18683
+ symbols_: {"error":2,"root":3,"program":4,"EOF":5,"simpleInverse":6,"statements":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"inMustache":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"OPEN_PARTIAL":24,"partialName":25,"params":26,"hash":27,"DATA":28,"param":29,"STRING":30,"INTEGER":31,"BOOLEAN":32,"hashSegments":33,"hashSegment":34,"ID":35,"EQUALS":36,"PARTIAL_NAME":37,"pathSegments":38,"SEP":39,"$accept":0,"$end":1},
18684
+ terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"DATA",30:"STRING",31:"INTEGER",32:"BOOLEAN",35:"ID",36:"EQUALS",37:"PARTIAL_NAME",39:"SEP"},
18685
+ productions_: [0,[3,2],[4,2],[4,3],[4,2],[4,1],[4,1],[4,0],[7,1],[7,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[6,2],[17,3],[17,2],[17,2],[17,1],[17,1],[26,2],[26,1],[29,1],[29,1],[29,1],[29,1],[29,1],[27,1],[33,2],[33,1],[34,3],[34,3],[34,3],[34,3],[34,3],[25,1],[21,1],[38,3],[38,1]],
18686
+ performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
18687
+
18688
+ var $0 = $$.length - 1;
18689
+ switch (yystate) {
18690
+ case 1: return $$[$0-1];
18691
+ break;
18692
+ case 2: this.$ = new yy.ProgramNode([], $$[$0]);
18693
+ break;
18694
+ case 3: this.$ = new yy.ProgramNode($$[$0-2], $$[$0]);
18695
+ break;
18696
+ case 4: this.$ = new yy.ProgramNode($$[$0-1], []);
18697
+ break;
18698
+ case 5: this.$ = new yy.ProgramNode($$[$0]);
18699
+ break;
18700
+ case 6: this.$ = new yy.ProgramNode([], []);
18701
+ break;
18702
+ case 7: this.$ = new yy.ProgramNode([]);
18703
+ break;
18704
+ case 8: this.$ = [$$[$0]];
18705
+ break;
18706
+ case 9: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
18707
+ break;
18708
+ case 10: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0]);
18709
+ break;
18710
+ case 11: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0]);
18711
+ break;
18712
+ case 12: this.$ = $$[$0];
18713
+ break;
18714
+ case 13: this.$ = $$[$0];
18715
+ break;
18716
+ case 14: this.$ = new yy.ContentNode($$[$0]);
18717
+ break;
18718
+ case 15: this.$ = new yy.CommentNode($$[$0]);
18719
+ break;
18720
+ case 16: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
18721
+ break;
18722
+ case 17: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
18723
+ break;
18724
+ case 18: this.$ = $$[$0-1];
18725
+ break;
18726
+ case 19: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
18727
+ break;
18728
+ case 20: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], true);
18729
+ break;
18730
+ case 21: this.$ = new yy.PartialNode($$[$0-1]);
18731
+ break;
18732
+ case 22: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]);
18733
+ break;
18734
+ case 23:
18735
+ break;
18736
+ case 24: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]];
18737
+ break;
18738
+ case 25: this.$ = [[$$[$0-1]].concat($$[$0]), null];
18739
+ break;
18740
+ case 26: this.$ = [[$$[$0-1]], $$[$0]];
18741
+ break;
18742
+ case 27: this.$ = [[$$[$0]], null];
18743
+ break;
18744
+ case 28: this.$ = [[new yy.DataNode($$[$0])], null];
18745
+ break;
18746
+ case 29: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
18747
+ break;
18748
+ case 30: this.$ = [$$[$0]];
18749
+ break;
18750
+ case 31: this.$ = $$[$0];
18751
+ break;
18752
+ case 32: this.$ = new yy.StringNode($$[$0]);
18753
+ break;
18754
+ case 33: this.$ = new yy.IntegerNode($$[$0]);
18755
+ break;
18756
+ case 34: this.$ = new yy.BooleanNode($$[$0]);
18757
+ break;
18758
+ case 35: this.$ = new yy.DataNode($$[$0]);
18759
+ break;
18760
+ case 36: this.$ = new yy.HashNode($$[$0]);
18761
+ break;
18762
+ case 37: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
18763
+ break;
18764
+ case 38: this.$ = [$$[$0]];
18765
+ break;
18766
+ case 39: this.$ = [$$[$0-2], $$[$0]];
18767
+ break;
18768
+ case 40: this.$ = [$$[$0-2], new yy.StringNode($$[$0])];
18769
+ break;
18770
+ case 41: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])];
18771
+ break;
18772
+ case 42: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])];
18773
+ break;
18774
+ case 43: this.$ = [$$[$0-2], new yy.DataNode($$[$0])];
18775
+ break;
18776
+ case 44: this.$ = new yy.PartialNameNode($$[$0]);
18777
+ break;
18778
+ case 45: this.$ = new yy.IdNode($$[$0]);
18779
+ break;
18780
+ case 46: $$[$0-2].push($$[$0]); this.$ = $$[$0-2];
18781
+ break;
18782
+ case 47: this.$ = [$$[$0]];
18783
+ break;
18784
+ }
18785
+ },
18786
+ table: [{3:1,4:2,5:[2,7],6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],22:[1,14],23:[1,15],24:[1,16]},{1:[3]},{5:[1,17]},{5:[2,6],7:18,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,6],22:[1,14],23:[1,15],24:[1,16]},{5:[2,5],6:20,8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,5],22:[1,14],23:[1,15],24:[1,16]},{17:23,18:[1,22],21:24,28:[1,25],35:[1,27],38:26},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{4:28,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],24:[1,16]},{4:29,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],24:[1,16]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{17:30,21:24,28:[1,25],35:[1,27],38:26},{17:31,21:24,28:[1,25],35:[1,27],38:26},{17:32,21:24,28:[1,25],35:[1,27],38:26},{25:33,37:[1,34]},{1:[2,1]},{5:[2,2],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,2],22:[1,14],23:[1,15],24:[1,16]},{17:23,21:24,28:[1,25],35:[1,27],38:26},{5:[2,4],7:35,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,4],22:[1,14],23:[1,15],24:[1,16]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,23],14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],24:[2,23]},{18:[1,36]},{18:[2,27],21:41,26:37,27:38,28:[1,45],29:39,30:[1,42],31:[1,43],32:[1,44],33:40,34:46,35:[1,47],38:26},{18:[2,28]},{18:[2,45],28:[2,45],30:[2,45],31:[2,45],32:[2,45],35:[2,45],39:[1,48]},{18:[2,47],28:[2,47],30:[2,47],31:[2,47],32:[2,47],35:[2,47],39:[2,47]},{10:49,20:[1,50]},{10:51,20:[1,50]},{18:[1,52]},{18:[1,53]},{18:[1,54]},{18:[1,55],21:56,35:[1,27],38:26},{18:[2,44],35:[2,44]},{5:[2,3],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,3],22:[1,14],23:[1,15],24:[1,16]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{18:[2,25],21:41,27:57,28:[1,45],29:58,30:[1,42],31:[1,43],32:[1,44],33:40,34:46,35:[1,47],38:26},{18:[2,26]},{18:[2,30],28:[2,30],30:[2,30],31:[2,30],32:[2,30],35:[2,30]},{18:[2,36],34:59,35:[1,60]},{18:[2,31],28:[2,31],30:[2,31],31:[2,31],32:[2,31],35:[2,31]},{18:[2,32],28:[2,32],30:[2,32],31:[2,32],32:[2,32],35:[2,32]},{18:[2,33],28:[2,33],30:[2,33],31:[2,33],32:[2,33],35:[2,33]},{18:[2,34],28:[2,34],30:[2,34],31:[2,34],32:[2,34],35:[2,34]},{18:[2,35],28:[2,35],30:[2,35],31:[2,35],32:[2,35],35:[2,35]},{18:[2,38],35:[2,38]},{18:[2,47],28:[2,47],30:[2,47],31:[2,47],32:[2,47],35:[2,47],36:[1,61],39:[2,47]},{35:[1,62]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{21:63,35:[1,27],38:26},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],24:[2,21]},{18:[1,64]},{18:[2,24]},{18:[2,29],28:[2,29],30:[2,29],31:[2,29],32:[2,29],35:[2,29]},{18:[2,37],35:[2,37]},{36:[1,61]},{21:65,28:[1,69],30:[1,66],31:[1,67],32:[1,68],35:[1,27],38:26},{18:[2,46],28:[2,46],30:[2,46],31:[2,46],32:[2,46],35:[2,46],39:[2,46]},{18:[1,70]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],24:[2,22]},{18:[2,39],35:[2,39]},{18:[2,40],35:[2,40]},{18:[2,41],35:[2,41]},{18:[2,42],35:[2,42]},{18:[2,43],35:[2,43]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]}],
18787
+ defaultActions: {17:[2,1],25:[2,28],38:[2,26],57:[2,24]},
18788
+ parseError: function parseError(str, hash) {
18789
+ throw new Error(str);
18790
+ },
18791
+ parse: function parse(input) {
18792
+ var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
18793
+ this.lexer.setInput(input);
18794
+ this.lexer.yy = this.yy;
18795
+ this.yy.lexer = this.lexer;
18796
+ this.yy.parser = this;
18797
+ if (typeof this.lexer.yylloc == "undefined")
18798
+ this.lexer.yylloc = {};
18799
+ var yyloc = this.lexer.yylloc;
18800
+ lstack.push(yyloc);
18801
+ var ranges = this.lexer.options && this.lexer.options.ranges;
18802
+ if (typeof this.yy.parseError === "function")
18803
+ this.parseError = this.yy.parseError;
18804
+ function popStack(n) {
18805
+ stack.length = stack.length - 2 * n;
18806
+ vstack.length = vstack.length - n;
18807
+ lstack.length = lstack.length - n;
18808
+ }
18809
+ function lex() {
18810
+ var token;
18811
+ token = self.lexer.lex() || 1;
18812
+ if (typeof token !== "number") {
18813
+ token = self.symbols_[token] || token;
18814
+ }
18815
+ return token;
18816
+ }
18817
+ var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
18818
+ while (true) {
18819
+ state = stack[stack.length - 1];
18820
+ if (this.defaultActions[state]) {
18821
+ action = this.defaultActions[state];
18822
+ } else {
18823
+ if (symbol === null || typeof symbol == "undefined") {
18824
+ symbol = lex();
18825
+ }
18826
+ action = table[state] && table[state][symbol];
18827
+ }
18828
+ if (typeof action === "undefined" || !action.length || !action[0]) {
18829
+ var errStr = "";
18830
+ if (!recovering) {
18831
+ expected = [];
18832
+ for (p in table[state])
18833
+ if (this.terminals_[p] && p > 2) {
18834
+ expected.push("'" + this.terminals_[p] + "'");
18835
+ }
18836
+ if (this.lexer.showPosition) {
18837
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
18838
+ } else {
18839
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
18840
+ }
18841
+ this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
18842
+ }
18843
+ }
18844
+ if (action[0] instanceof Array && action.length > 1) {
18845
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
18846
+ }
18847
+ switch (action[0]) {
18848
+ case 1:
18849
+ stack.push(symbol);
18850
+ vstack.push(this.lexer.yytext);
18851
+ lstack.push(this.lexer.yylloc);
18852
+ stack.push(action[1]);
18853
+ symbol = null;
18854
+ if (!preErrorSymbol) {
18855
+ yyleng = this.lexer.yyleng;
18856
+ yytext = this.lexer.yytext;
18857
+ yylineno = this.lexer.yylineno;
18858
+ yyloc = this.lexer.yylloc;
18859
+ if (recovering > 0)
18860
+ recovering--;
18861
+ } else {
18862
+ symbol = preErrorSymbol;
18863
+ preErrorSymbol = null;
18864
+ }
18865
+ break;
18866
+ case 2:
18867
+ len = this.productions_[action[1]][1];
18868
+ yyval.$ = vstack[vstack.length - len];
18869
+ yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
18870
+ if (ranges) {
18871
+ yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
18872
+ }
18873
+ r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
18874
+ if (typeof r !== "undefined") {
18875
+ return r;
18876
+ }
18877
+ if (len) {
18878
+ stack = stack.slice(0, -1 * len * 2);
18879
+ vstack = vstack.slice(0, -1 * len);
18880
+ lstack = lstack.slice(0, -1 * len);
18881
+ }
18882
+ stack.push(this.productions_[action[1]][0]);
18883
+ vstack.push(yyval.$);
18884
+ lstack.push(yyval._$);
18885
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
18886
+ stack.push(newState);
18887
+ break;
18888
+ case 3:
18889
+ return true;
18890
+ }
18891
+ }
18892
+ return true;
18893
+ }
18894
+ };
18895
+ /* Jison generated lexer */
18896
+ var lexer = (function(){
18897
+ var lexer = ({EOF:1,
18898
+ parseError:function parseError(str, hash) {
18899
+ if (this.yy.parser) {
18900
+ this.yy.parser.parseError(str, hash);
18901
+ } else {
18902
+ throw new Error(str);
18903
+ }
18904
+ },
18905
+ setInput:function (input) {
18906
+ this._input = input;
18907
+ this._more = this._less = this.done = false;
18908
+ this.yylineno = this.yyleng = 0;
18909
+ this.yytext = this.matched = this.match = '';
18910
+ this.conditionStack = ['INITIAL'];
18911
+ this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
18912
+ if (this.options.ranges) this.yylloc.range = [0,0];
18913
+ this.offset = 0;
18914
+ return this;
18915
+ },
18916
+ input:function () {
18917
+ var ch = this._input[0];
18918
+ this.yytext += ch;
18919
+ this.yyleng++;
18920
+ this.offset++;
18921
+ this.match += ch;
18922
+ this.matched += ch;
18923
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
18924
+ if (lines) {
18925
+ this.yylineno++;
18926
+ this.yylloc.last_line++;
18927
+ } else {
18928
+ this.yylloc.last_column++;
18929
+ }
18930
+ if (this.options.ranges) this.yylloc.range[1]++;
18931
+
18932
+ this._input = this._input.slice(1);
18933
+ return ch;
18934
+ },
18935
+ unput:function (ch) {
18936
+ var len = ch.length;
18937
+ var lines = ch.split(/(?:\r\n?|\n)/g);
18938
+
18939
+ this._input = ch + this._input;
18940
+ this.yytext = this.yytext.substr(0, this.yytext.length-len-1);
18941
+ //this.yyleng -= len;
18942
+ this.offset -= len;
18943
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
18944
+ this.match = this.match.substr(0, this.match.length-1);
18945
+ this.matched = this.matched.substr(0, this.matched.length-1);
18946
+
18947
+ if (lines.length-1) this.yylineno -= lines.length-1;
18948
+ var r = this.yylloc.range;
18949
+
18950
+ this.yylloc = {first_line: this.yylloc.first_line,
18951
+ last_line: this.yylineno+1,
18952
+ first_column: this.yylloc.first_column,
18953
+ last_column: lines ?
18954
+ (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length:
18955
+ this.yylloc.first_column - len
18956
+ };
18957
+
18958
+ if (this.options.ranges) {
18959
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
18960
+ }
18961
+ return this;
18962
+ },
18963
+ more:function () {
18964
+ this._more = true;
18965
+ return this;
18966
+ },
18967
+ less:function (n) {
18968
+ this.unput(this.match.slice(n));
18969
+ },
18970
+ pastInput:function () {
18971
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
18972
+ return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
18973
+ },
18974
+ upcomingInput:function () {
18975
+ var next = this.match;
18976
+ if (next.length < 20) {
18977
+ next += this._input.substr(0, 20-next.length);
18978
+ }
18979
+ return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
18980
+ },
18981
+ showPosition:function () {
18982
+ var pre = this.pastInput();
18983
+ var c = new Array(pre.length + 1).join("-");
18984
+ return pre + this.upcomingInput() + "\n" + c+"^";
18985
+ },
18986
+ next:function () {
18987
+ if (this.done) {
18988
+ return this.EOF;
18989
+ }
18990
+ if (!this._input) this.done = true;
18991
+
18992
+ var token,
18993
+ match,
18994
+ tempMatch,
18995
+ index,
18996
+ col,
18997
+ lines;
18998
+ if (!this._more) {
18999
+ this.yytext = '';
19000
+ this.match = '';
19001
+ }
19002
+ var rules = this._currentRules();
19003
+ for (var i=0;i < rules.length; i++) {
19004
+ tempMatch = this._input.match(this.rules[rules[i]]);
19005
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
19006
+ match = tempMatch;
19007
+ index = i;
19008
+ if (!this.options.flex) break;
19009
+ }
19010
+ }
19011
+ if (match) {
19012
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
19013
+ if (lines) this.yylineno += lines.length;
19014
+ this.yylloc = {first_line: this.yylloc.last_line,
19015
+ last_line: this.yylineno+1,
19016
+ first_column: this.yylloc.last_column,
19017
+ last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length};
19018
+ this.yytext += match[0];
19019
+ this.match += match[0];
19020
+ this.matches = match;
19021
+ this.yyleng = this.yytext.length;
19022
+ if (this.options.ranges) {
19023
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
19024
+ }
19025
+ this._more = false;
19026
+ this._input = this._input.slice(match[0].length);
19027
+ this.matched += match[0];
19028
+ token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);
19029
+ if (this.done && this._input) this.done = false;
19030
+ if (token) return token;
19031
+ else return;
19032
+ }
19033
+ if (this._input === "") {
19034
+ return this.EOF;
19035
+ } else {
19036
+ return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
19037
+ {text: "", token: null, line: this.yylineno});
19038
+ }
19039
+ },
19040
+ lex:function lex() {
19041
+ var r = this.next();
19042
+ if (typeof r !== 'undefined') {
19043
+ return r;
19044
+ } else {
19045
+ return this.lex();
19046
+ }
19047
+ },
19048
+ begin:function begin(condition) {
19049
+ this.conditionStack.push(condition);
19050
+ },
19051
+ popState:function popState() {
19052
+ return this.conditionStack.pop();
19053
+ },
19054
+ _currentRules:function _currentRules() {
19055
+ return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
19056
+ },
19057
+ topState:function () {
19058
+ return this.conditionStack[this.conditionStack.length-2];
19059
+ },
19060
+ pushState:function begin(condition) {
19061
+ this.begin(condition);
19062
+ }});
19063
+ lexer.options = {};
19064
+ lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
19065
+
19066
+ var YYSTATE=YY_START
19067
+ switch($avoiding_name_collisions) {
19068
+ case 0:
19069
+ if(yy_.yytext.slice(-1) !== "\\") this.begin("mu");
19070
+ if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu");
19071
+ if(yy_.yytext) return 14;
19072
+
19073
+ break;
19074
+ case 1: return 14;
19075
+ break;
19076
+ case 2:
19077
+ if(yy_.yytext.slice(-1) !== "\\") this.popState();
19078
+ if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1);
19079
+ return 14;
19080
+
19081
+ break;
19082
+ case 3: yy_.yytext = yy_.yytext.substr(0, yy_.yyleng-4); this.popState(); return 15;
19083
+ break;
19084
+ case 4: this.begin("par"); return 24;
19085
+ break;
19086
+ case 5: return 16;
19087
+ break;
19088
+ case 6: return 20;
19089
+ break;
19090
+ case 7: return 19;
19091
+ break;
19092
+ case 8: return 19;
19093
+ break;
19094
+ case 9: return 23;
19095
+ break;
19096
+ case 10: return 23;
19097
+ break;
19098
+ case 11: this.popState(); this.begin('com');
19099
+ break;
19100
+ case 12: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15;
19101
+ break;
19102
+ case 13: return 22;
19103
+ break;
19104
+ case 14: return 36;
19105
+ break;
19106
+ case 15: return 35;
19107
+ break;
19108
+ case 16: return 35;
19109
+ break;
19110
+ case 17: return 39;
19111
+ break;
19112
+ case 18: /*ignore whitespace*/
19113
+ break;
19114
+ case 19: this.popState(); return 18;
19115
+ break;
19116
+ case 20: this.popState(); return 18;
19117
+ break;
19118
+ case 21: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 30;
19119
+ break;
19120
+ case 22: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\'/g,"'"); return 30;
19121
+ break;
19122
+ case 23: yy_.yytext = yy_.yytext.substr(1); return 28;
19123
+ break;
19124
+ case 24: return 32;
19125
+ break;
19126
+ case 25: return 32;
19127
+ break;
19128
+ case 26: return 31;
19129
+ break;
19130
+ case 27: return 35;
19131
+ break;
19132
+ case 28: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 35;
19133
+ break;
19134
+ case 29: return 'INVALID';
19135
+ break;
19136
+ case 30: /*ignore whitespace*/
19137
+ break;
19138
+ case 31: this.popState(); return 37;
19139
+ break;
19140
+ case 32: return 5;
19141
+ break;
19142
+ }
19143
+ };
19144
+ lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[} ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@[a-zA-Z]+)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:[0-9]+(?=[}\s]))/,/^(?:[a-zA-Z0-9_$-]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:\s+)/,/^(?:[a-zA-Z0-9_$-/]+)/,/^(?:$)/];
19145
+ lexer.conditions = {"mu":{"rules":[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,32],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[3],"inclusive":false},"par":{"rules":[30,31],"inclusive":false},"INITIAL":{"rules":[0,1,32],"inclusive":true}};
19146
+ return lexer;})()
19147
+ parser.lexer = lexer;
19148
+ function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;
19149
+ return new Parser;
19150
+ })();;
19151
+ // lib/handlebars/compiler/base.js
19152
+ Handlebars.Parser = handlebars;
19153
+
19154
+ Handlebars.parse = function(input) {
19155
+
19156
+ // Just return if an already-compile AST was passed in.
19157
+ if(input.constructor === Handlebars.AST.ProgramNode) { return input; }
19158
+
19159
+ Handlebars.Parser.yy = Handlebars.AST;
19160
+ return Handlebars.Parser.parse(input);
19161
+ };
19162
+
19163
+ Handlebars.print = function(ast) {
19164
+ return new Handlebars.PrintVisitor().accept(ast);
19165
+ };;
19166
+ // lib/handlebars/compiler/ast.js
19167
+ (function() {
19168
+
19169
+ Handlebars.AST = {};
19170
+
19171
+ Handlebars.AST.ProgramNode = function(statements, inverse) {
19172
+ this.type = "program";
19173
+ this.statements = statements;
19174
+ if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); }
19175
+ };
19176
+
19177
+ Handlebars.AST.MustacheNode = function(rawParams, hash, unescaped) {
19178
+ this.type = "mustache";
19179
+ this.escaped = !unescaped;
19180
+ this.hash = hash;
19181
+
19182
+ var id = this.id = rawParams[0];
19183
+ var params = this.params = rawParams.slice(1);
19184
+
19185
+ // a mustache is an eligible helper if:
19186
+ // * its id is simple (a single part, not `this` or `..`)
19187
+ var eligibleHelper = this.eligibleHelper = id.isSimple;
19188
+
19189
+ // a mustache is definitely a helper if:
19190
+ // * it is an eligible helper, and
19191
+ // * it has at least one parameter or hash segment
19192
+ this.isHelper = eligibleHelper && (params.length || hash);
19193
+
19194
+ // if a mustache is an eligible helper but not a definite
19195
+ // helper, it is ambiguous, and will be resolved in a later
19196
+ // pass or at runtime.
19197
+ };
19198
+
19199
+ Handlebars.AST.PartialNode = function(partialName, context) {
19200
+ this.type = "partial";
19201
+ this.partialName = partialName;
19202
+ this.context = context;
19203
+ };
19204
+
19205
+ var verifyMatch = function(open, close) {
19206
+ if(open.original !== close.original) {
19207
+ throw new Handlebars.Exception(open.original + " doesn't match " + close.original);
19208
+ }
19209
+ };
19210
+
19211
+ Handlebars.AST.BlockNode = function(mustache, program, inverse, close) {
19212
+ verifyMatch(mustache.id, close);
19213
+ this.type = "block";
19214
+ this.mustache = mustache;
19215
+ this.program = program;
19216
+ this.inverse = inverse;
19217
+
19218
+ if (this.inverse && !this.program) {
19219
+ this.isInverse = true;
19220
+ }
19221
+ };
19222
+
19223
+ Handlebars.AST.ContentNode = function(string) {
19224
+ this.type = "content";
19225
+ this.string = string;
19226
+ };
19227
+
19228
+ Handlebars.AST.HashNode = function(pairs) {
19229
+ this.type = "hash";
19230
+ this.pairs = pairs;
19231
+ };
19232
+
19233
+ Handlebars.AST.IdNode = function(parts) {
19234
+ this.type = "ID";
19235
+ this.original = parts.join(".");
19236
+
19237
+ var dig = [], depth = 0;
19238
+
19239
+ for(var i=0,l=parts.length; i<l; i++) {
19240
+ var part = parts[i];
19241
+
19242
+ if (part === ".." || part === "." || part === "this") {
19243
+ if (dig.length > 0) { throw new Handlebars.Exception("Invalid path: " + this.original); }
19244
+ else if (part === "..") { depth++; }
19245
+ else { this.isScoped = true; }
19246
+ }
19247
+ else { dig.push(part); }
19248
+ }
19249
+
19250
+ this.parts = dig;
19251
+ this.string = dig.join('.');
19252
+ this.depth = depth;
19253
+
19254
+ // an ID is simple if it only has one part, and that part is not
19255
+ // `..` or `this`.
19256
+ this.isSimple = parts.length === 1 && !this.isScoped && depth === 0;
19257
+
19258
+ this.stringModeValue = this.string;
19259
+ };
19260
+
19261
+ Handlebars.AST.PartialNameNode = function(name) {
19262
+ this.type = "PARTIAL_NAME";
19263
+ this.name = name;
19264
+ };
19265
+
19266
+ Handlebars.AST.DataNode = function(id) {
19267
+ this.type = "DATA";
19268
+ this.id = id;
19269
+ };
19270
+
19271
+ Handlebars.AST.StringNode = function(string) {
19272
+ this.type = "STRING";
19273
+ this.string = string;
19274
+ this.stringModeValue = string;
19275
+ };
19276
+
19277
+ Handlebars.AST.IntegerNode = function(integer) {
19278
+ this.type = "INTEGER";
19279
+ this.integer = integer;
19280
+ this.stringModeValue = Number(integer);
19281
+ };
19282
+
19283
+ Handlebars.AST.BooleanNode = function(bool) {
19284
+ this.type = "BOOLEAN";
19285
+ this.bool = bool;
19286
+ this.stringModeValue = bool === "true";
19287
+ };
19288
+
19289
+ Handlebars.AST.CommentNode = function(comment) {
19290
+ this.type = "comment";
19291
+ this.comment = comment;
19292
+ };
19293
+
19294
+ })();;
19295
+ // lib/handlebars/utils.js
19296
+
19297
+ var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
19298
+
19299
+ Handlebars.Exception = function(message) {
19300
+ var tmp = Error.prototype.constructor.apply(this, arguments);
19301
+
19302
+ // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
19303
+ for (var idx = 0; idx < errorProps.length; idx++) {
19304
+ this[errorProps[idx]] = tmp[errorProps[idx]];
19305
+ }
19306
+ };
19307
+ Handlebars.Exception.prototype = new Error();
19308
+
19309
+ // Build out our basic SafeString type
19310
+ Handlebars.SafeString = function(string) {
19311
+ this.string = string;
19312
+ };
19313
+ Handlebars.SafeString.prototype.toString = function() {
19314
+ return this.string.toString();
19315
+ };
19316
+
19317
+ (function() {
19318
+ var escape = {
19319
+ "&": "&amp;",
19320
+ "<": "&lt;",
19321
+ ">": "&gt;",
19322
+ '"': "&quot;",
19323
+ "'": "&#x27;",
19324
+ "`": "&#x60;"
19325
+ };
19326
+
19327
+ var badChars = /[&<>"'`]/g;
19328
+ var possible = /[&<>"'`]/;
19329
+
19330
+ var escapeChar = function(chr) {
19331
+ return escape[chr] || "&amp;";
19332
+ };
19333
+
19334
+ Handlebars.Utils = {
19335
+ escapeExpression: function(string) {
19336
+ // don't escape SafeStrings, since they're already safe
19337
+ if (string instanceof Handlebars.SafeString) {
19338
+ return string.toString();
19339
+ } else if (string == null || string === false) {
19340
+ return "";
19341
+ }
19342
+
19343
+ if(!possible.test(string)) { return string; }
19344
+ return string.replace(badChars, escapeChar);
19345
+ },
19346
+
19347
+ isEmpty: function(value) {
19348
+ if (!value && value !== 0) {
19349
+ return true;
19350
+ } else if(Object.prototype.toString.call(value) === "[object Array]" && value.length === 0) {
19351
+ return true;
19352
+ } else {
19353
+ return false;
19354
+ }
19355
+ }
19356
+ };
19357
+ })();;
19358
+ // lib/handlebars/compiler/compiler.js
19359
+
19360
+ /*jshint eqnull:true*/
19361
+ Handlebars.Compiler = function() {};
19362
+ Handlebars.JavaScriptCompiler = function() {};
19363
+
19364
+ (function(Compiler, JavaScriptCompiler) {
19365
+ // the foundHelper register will disambiguate helper lookup from finding a
19366
+ // function in a context. This is necessary for mustache compatibility, which
19367
+ // requires that context functions in blocks are evaluated by blockHelperMissing,
19368
+ // and then proceed as if the resulting value was provided to blockHelperMissing.
19369
+
19370
+ Compiler.prototype = {
19371
+ compiler: Compiler,
19372
+
19373
+ disassemble: function() {
19374
+ var opcodes = this.opcodes, opcode, out = [], params, param;
19375
+
19376
+ for (var i=0, l=opcodes.length; i<l; i++) {
19377
+ opcode = opcodes[i];
19378
+
19379
+ if (opcode.opcode === 'DECLARE') {
19380
+ out.push("DECLARE " + opcode.name + "=" + opcode.value);
19381
+ } else {
19382
+ params = [];
19383
+ for (var j=0; j<opcode.args.length; j++) {
19384
+ param = opcode.args[j];
19385
+ if (typeof param === "string") {
19386
+ param = "\"" + param.replace("\n", "\\n") + "\"";
19387
+ }
19388
+ params.push(param);
19389
+ }
19390
+ out.push(opcode.opcode + " " + params.join(" "));
19391
+ }
19392
+ }
19393
+
19394
+ return out.join("\n");
19395
+ },
19396
+ equals: function(other) {
19397
+ var len = this.opcodes.length;
19398
+ if (other.opcodes.length !== len) {
19399
+ return false;
19400
+ }
19401
+
19402
+ for (var i = 0; i < len; i++) {
19403
+ var opcode = this.opcodes[i],
19404
+ otherOpcode = other.opcodes[i];
19405
+ if (opcode.opcode !== otherOpcode.opcode || opcode.args.length !== otherOpcode.args.length) {
19406
+ return false;
19407
+ }
19408
+ for (var j = 0; j < opcode.args.length; j++) {
19409
+ if (opcode.args[j] !== otherOpcode.args[j]) {
19410
+ return false;
19411
+ }
19412
+ }
19413
+ }
19414
+ return true;
19415
+ },
19416
+
19417
+ guid: 0,
19418
+
19419
+ compile: function(program, options) {
19420
+ this.children = [];
19421
+ this.depths = {list: []};
19422
+ this.options = options;
19423
+
19424
+ // These changes will propagate to the other compiler components
19425
+ var knownHelpers = this.options.knownHelpers;
19426
+ this.options.knownHelpers = {
19427
+ 'helperMissing': true,
19428
+ 'blockHelperMissing': true,
19429
+ 'each': true,
19430
+ 'if': true,
19431
+ 'unless': true,
19432
+ 'with': true,
19433
+ 'log': true
19434
+ };
19435
+ if (knownHelpers) {
19436
+ for (var name in knownHelpers) {
19437
+ this.options.knownHelpers[name] = knownHelpers[name];
19438
+ }
19439
+ }
19440
+
19441
+ return this.program(program);
19442
+ },
19443
+
19444
+ accept: function(node) {
19445
+ return this[node.type](node);
19446
+ },
19447
+
19448
+ program: function(program) {
19449
+ var statements = program.statements, statement;
19450
+ this.opcodes = [];
19451
+
19452
+ for(var i=0, l=statements.length; i<l; i++) {
19453
+ statement = statements[i];
19454
+ this[statement.type](statement);
19455
+ }
19456
+ this.isSimple = l === 1;
19457
+
19458
+ this.depths.list = this.depths.list.sort(function(a, b) {
19459
+ return a - b;
19460
+ });
19461
+
19462
+ return this;
19463
+ },
19464
+
19465
+ compileProgram: function(program) {
19466
+ var result = new this.compiler().compile(program, this.options);
19467
+ var guid = this.guid++, depth;
19468
+
19469
+ this.usePartial = this.usePartial || result.usePartial;
19470
+
19471
+ this.children[guid] = result;
19472
+
19473
+ for(var i=0, l=result.depths.list.length; i<l; i++) {
19474
+ depth = result.depths.list[i];
19475
+
19476
+ if(depth < 2) { continue; }
19477
+ else { this.addDepth(depth - 1); }
19478
+ }
19479
+
19480
+ return guid;
19481
+ },
19482
+
19483
+ block: function(block) {
19484
+ var mustache = block.mustache,
19485
+ program = block.program,
19486
+ inverse = block.inverse;
19487
+
19488
+ if (program) {
19489
+ program = this.compileProgram(program);
19490
+ }
19491
+
19492
+ if (inverse) {
19493
+ inverse = this.compileProgram(inverse);
19494
+ }
19495
+
19496
+ var type = this.classifyMustache(mustache);
19497
+
19498
+ if (type === "helper") {
19499
+ this.helperMustache(mustache, program, inverse);
19500
+ } else if (type === "simple") {
19501
+ this.simpleMustache(mustache);
19502
+
19503
+ // now that the simple mustache is resolved, we need to
19504
+ // evaluate it by executing `blockHelperMissing`
19505
+ this.opcode('pushProgram', program);
19506
+ this.opcode('pushProgram', inverse);
19507
+ this.opcode('emptyHash');
19508
+ this.opcode('blockValue');
19509
+ } else {
19510
+ this.ambiguousMustache(mustache, program, inverse);
19511
+
19512
+ // now that the simple mustache is resolved, we need to
19513
+ // evaluate it by executing `blockHelperMissing`
19514
+ this.opcode('pushProgram', program);
19515
+ this.opcode('pushProgram', inverse);
19516
+ this.opcode('emptyHash');
19517
+ this.opcode('ambiguousBlockValue');
19518
+ }
19519
+
19520
+ this.opcode('append');
19521
+ },
19522
+
19523
+ hash: function(hash) {
19524
+ var pairs = hash.pairs, pair, val;
19525
+
19526
+ this.opcode('pushHash');
19527
+
19528
+ for(var i=0, l=pairs.length; i<l; i++) {
19529
+ pair = pairs[i];
19530
+ val = pair[1];
19531
+
19532
+ if (this.options.stringParams) {
19533
+ this.opcode('pushStringParam', val.stringModeValue, val.type);
19534
+ } else {
19535
+ this.accept(val);
19536
+ }
19537
+
19538
+ this.opcode('assignToHash', pair[0]);
19539
+ }
19540
+ this.opcode('popHash');
19541
+ },
19542
+
19543
+ partial: function(partial) {
19544
+ var partialName = partial.partialName;
19545
+ this.usePartial = true;
19546
+
19547
+ if(partial.context) {
19548
+ this.ID(partial.context);
19549
+ } else {
19550
+ this.opcode('push', 'depth0');
19551
+ }
19552
+
19553
+ this.opcode('invokePartial', partialName.name);
19554
+ this.opcode('append');
19555
+ },
19556
+
19557
+ content: function(content) {
19558
+ this.opcode('appendContent', content.string);
19559
+ },
19560
+
19561
+ mustache: function(mustache) {
19562
+ var options = this.options;
19563
+ var type = this.classifyMustache(mustache);
19564
+
19565
+ if (type === "simple") {
19566
+ this.simpleMustache(mustache);
19567
+ } else if (type === "helper") {
19568
+ this.helperMustache(mustache);
19569
+ } else {
19570
+ this.ambiguousMustache(mustache);
19571
+ }
19572
+
19573
+ if(mustache.escaped && !options.noEscape) {
19574
+ this.opcode('appendEscaped');
19575
+ } else {
19576
+ this.opcode('append');
19577
+ }
19578
+ },
19579
+
19580
+ ambiguousMustache: function(mustache, program, inverse) {
19581
+ var id = mustache.id,
19582
+ name = id.parts[0],
19583
+ isBlock = program != null || inverse != null;
19584
+
19585
+ this.opcode('getContext', id.depth);
19586
+
19587
+ this.opcode('pushProgram', program);
19588
+ this.opcode('pushProgram', inverse);
19589
+
19590
+ this.opcode('invokeAmbiguous', name, isBlock);
19591
+ },
19592
+
19593
+ simpleMustache: function(mustache) {
19594
+ var id = mustache.id;
19595
+
19596
+ if (id.type === 'DATA') {
19597
+ this.DATA(id);
19598
+ } else if (id.parts.length) {
19599
+ this.ID(id);
19600
+ } else {
19601
+ // Simplified ID for `this`
19602
+ this.addDepth(id.depth);
19603
+ this.opcode('getContext', id.depth);
19604
+ this.opcode('pushContext');
19605
+ }
19606
+
19607
+ this.opcode('resolvePossibleLambda');
19608
+ },
19609
+
19610
+ helperMustache: function(mustache, program, inverse) {
19611
+ var params = this.setupFullMustacheParams(mustache, program, inverse),
19612
+ name = mustache.id.parts[0];
19613
+
19614
+ if (this.options.knownHelpers[name]) {
19615
+ this.opcode('invokeKnownHelper', params.length, name);
19616
+ } else if (this.knownHelpersOnly) {
19617
+ throw new Error("You specified knownHelpersOnly, but used the unknown helper " + name);
19618
+ } else {
19619
+ this.opcode('invokeHelper', params.length, name);
19620
+ }
19621
+ },
19622
+
19623
+ ID: function(id) {
19624
+ this.addDepth(id.depth);
19625
+ this.opcode('getContext', id.depth);
19626
+
19627
+ var name = id.parts[0];
19628
+ if (!name) {
19629
+ this.opcode('pushContext');
19630
+ } else {
19631
+ this.opcode('lookupOnContext', id.parts[0]);
19632
+ }
19633
+
19634
+ for(var i=1, l=id.parts.length; i<l; i++) {
19635
+ this.opcode('lookup', id.parts[i]);
19636
+ }
19637
+ },
19638
+
19639
+ DATA: function(data) {
19640
+ this.options.data = true;
19641
+ this.opcode('lookupData', data.id);
19642
+ },
19643
+
19644
+ STRING: function(string) {
19645
+ this.opcode('pushString', string.string);
19646
+ },
19647
+
19648
+ INTEGER: function(integer) {
19649
+ this.opcode('pushLiteral', integer.integer);
19650
+ },
19651
+
19652
+ BOOLEAN: function(bool) {
19653
+ this.opcode('pushLiteral', bool.bool);
19654
+ },
19655
+
19656
+ comment: function() {},
19657
+
19658
+ // HELPERS
19659
+ opcode: function(name) {
19660
+ this.opcodes.push({ opcode: name, args: [].slice.call(arguments, 1) });
19661
+ },
19662
+
19663
+ declare: function(name, value) {
19664
+ this.opcodes.push({ opcode: 'DECLARE', name: name, value: value });
19665
+ },
19666
+
19667
+ addDepth: function(depth) {
19668
+ if(isNaN(depth)) { throw new Error("EWOT"); }
19669
+ if(depth === 0) { return; }
19670
+
19671
+ if(!this.depths[depth]) {
19672
+ this.depths[depth] = true;
19673
+ this.depths.list.push(depth);
19674
+ }
19675
+ },
19676
+
19677
+ classifyMustache: function(mustache) {
19678
+ var isHelper = mustache.isHelper;
19679
+ var isEligible = mustache.eligibleHelper;
19680
+ var options = this.options;
19681
+
19682
+ // if ambiguous, we can possibly resolve the ambiguity now
19683
+ if (isEligible && !isHelper) {
19684
+ var name = mustache.id.parts[0];
19685
+
19686
+ if (options.knownHelpers[name]) {
19687
+ isHelper = true;
19688
+ } else if (options.knownHelpersOnly) {
19689
+ isEligible = false;
19690
+ }
19691
+ }
19692
+
19693
+ if (isHelper) { return "helper"; }
19694
+ else if (isEligible) { return "ambiguous"; }
19695
+ else { return "simple"; }
19696
+ },
19697
+
19698
+ pushParams: function(params) {
19699
+ var i = params.length, param;
19700
+
19701
+ while(i--) {
19702
+ param = params[i];
19703
+
19704
+ if(this.options.stringParams) {
19705
+ if(param.depth) {
19706
+ this.addDepth(param.depth);
19707
+ }
19708
+
19709
+ this.opcode('getContext', param.depth || 0);
19710
+ this.opcode('pushStringParam', param.stringModeValue, param.type);
19711
+ } else {
19712
+ this[param.type](param);
19713
+ }
19714
+ }
19715
+ },
19716
+
19717
+ setupMustacheParams: function(mustache) {
19718
+ var params = mustache.params;
19719
+ this.pushParams(params);
19720
+
19721
+ if(mustache.hash) {
19722
+ this.hash(mustache.hash);
19723
+ } else {
19724
+ this.opcode('emptyHash');
19725
+ }
19726
+
19727
+ return params;
19728
+ },
19729
+
19730
+ // this will replace setupMustacheParams when we're done
19731
+ setupFullMustacheParams: function(mustache, program, inverse) {
19732
+ var params = mustache.params;
19733
+ this.pushParams(params);
19734
+
19735
+ this.opcode('pushProgram', program);
19736
+ this.opcode('pushProgram', inverse);
19737
+
19738
+ if(mustache.hash) {
19739
+ this.hash(mustache.hash);
19740
+ } else {
19741
+ this.opcode('emptyHash');
19742
+ }
19743
+
19744
+ return params;
19745
+ }
19746
+ };
19747
+
19748
+ var Literal = function(value) {
19749
+ this.value = value;
19750
+ };
19751
+
19752
+ JavaScriptCompiler.prototype = {
19753
+ // PUBLIC API: You can override these methods in a subclass to provide
19754
+ // alternative compiled forms for name lookup and buffering semantics
19755
+ nameLookup: function(parent, name /* , type*/) {
19756
+ if (/^[0-9]+$/.test(name)) {
19757
+ return parent + "[" + name + "]";
19758
+ } else if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
19759
+ return parent + "." + name;
19760
+ }
19761
+ else {
19762
+ return parent + "['" + name + "']";
19763
+ }
19764
+ },
19765
+
19766
+ appendToBuffer: function(string) {
19767
+ if (this.environment.isSimple) {
19768
+ return "return " + string + ";";
19769
+ } else {
19770
+ return {
19771
+ appendToBuffer: true,
19772
+ content: string,
19773
+ toString: function() { return "buffer += " + string + ";"; }
19774
+ };
19775
+ }
19776
+ },
19777
+
19778
+ initializeBuffer: function() {
19779
+ return this.quotedString("");
19780
+ },
19781
+
19782
+ namespace: "Handlebars",
19783
+ // END PUBLIC API
19784
+
19785
+ compile: function(environment, options, context, asObject) {
19786
+ this.environment = environment;
19787
+ this.options = options || {};
19788
+
19789
+ Handlebars.log(Handlebars.logger.DEBUG, this.environment.disassemble() + "\n\n");
19790
+
19791
+ this.name = this.environment.name;
19792
+ this.isChild = !!context;
19793
+ this.context = context || {
19794
+ programs: [],
19795
+ environments: [],
19796
+ aliases: { }
19797
+ };
19798
+
19799
+ this.preamble();
19800
+
19801
+ this.stackSlot = 0;
19802
+ this.stackVars = [];
19803
+ this.registers = { list: [] };
19804
+ this.compileStack = [];
19805
+ this.inlineStack = [];
19806
+
19807
+ this.compileChildren(environment, options);
19808
+
19809
+ var opcodes = environment.opcodes, opcode;
19810
+
19811
+ this.i = 0;
19812
+
19813
+ for(l=opcodes.length; this.i<l; this.i++) {
19814
+ opcode = opcodes[this.i];
19815
+
19816
+ if(opcode.opcode === 'DECLARE') {
19817
+ this[opcode.name] = opcode.value;
19818
+ } else {
19819
+ this[opcode.opcode].apply(this, opcode.args);
19820
+ }
19821
+ }
19822
+
19823
+ return this.createFunctionContext(asObject);
19824
+ },
19825
+
19826
+ nextOpcode: function() {
19827
+ var opcodes = this.environment.opcodes;
19828
+ return opcodes[this.i + 1];
19829
+ },
19830
+
19831
+ eat: function() {
19832
+ this.i = this.i + 1;
19833
+ },
19834
+
19835
+ preamble: function() {
19836
+ var out = [];
19837
+
19838
+ if (!this.isChild) {
19839
+ var namespace = this.namespace;
19840
+ var copies = "helpers = helpers || " + namespace + ".helpers;";
19841
+ if (this.environment.usePartial) { copies = copies + " partials = partials || " + namespace + ".partials;"; }
19842
+ if (this.options.data) { copies = copies + " data = data || {};"; }
19843
+ out.push(copies);
19844
+ } else {
19845
+ out.push('');
19846
+ }
19847
+
19848
+ if (!this.environment.isSimple) {
19849
+ out.push(", buffer = " + this.initializeBuffer());
19850
+ } else {
19851
+ out.push("");
19852
+ }
19853
+
19854
+ // track the last context pushed into place to allow skipping the
19855
+ // getContext opcode when it would be a noop
19856
+ this.lastContext = 0;
19857
+ this.source = out;
19858
+ },
19859
+
19860
+ createFunctionContext: function(asObject) {
19861
+ var locals = this.stackVars.concat(this.registers.list);
19862
+
19863
+ if(locals.length > 0) {
19864
+ this.source[1] = this.source[1] + ", " + locals.join(", ");
19865
+ }
19866
+
19867
+ // Generate minimizer alias mappings
19868
+ if (!this.isChild) {
19869
+ for (var alias in this.context.aliases) {
19870
+ this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias];
19871
+ }
19872
+ }
19873
+
19874
+ if (this.source[1]) {
19875
+ this.source[1] = "var " + this.source[1].substring(2) + ";";
19876
+ }
19877
+
19878
+ // Merge children
19879
+ if (!this.isChild) {
19880
+ this.source[1] += '\n' + this.context.programs.join('\n') + '\n';
19881
+ }
19882
+
19883
+ if (!this.environment.isSimple) {
19884
+ this.source.push("return buffer;");
19885
+ }
19886
+
19887
+ var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"];
19888
+
19889
+ for(var i=0, l=this.environment.depths.list.length; i<l; i++) {
19890
+ params.push("depth" + this.environment.depths.list[i]);
19891
+ }
19892
+
19893
+ // Perform a second pass over the output to merge content when possible
19894
+ var source = this.mergeSource();
19895
+
19896
+ if (!this.isChild) {
19897
+ var revision = Handlebars.COMPILER_REVISION,
19898
+ versions = Handlebars.REVISION_CHANGES[revision];
19899
+ source = "this.compilerInfo = ["+revision+",'"+versions+"'];\n"+source;
19900
+ }
19901
+
19902
+ if (asObject) {
19903
+ params.push(source);
19904
+
19905
+ return Function.apply(this, params);
19906
+ } else {
19907
+ var functionSource = 'function ' + (this.name || '') + '(' + params.join(',') + ') {\n ' + source + '}';
19908
+ Handlebars.log(Handlebars.logger.DEBUG, functionSource + "\n\n");
19909
+ return functionSource;
19910
+ }
19911
+ },
19912
+ mergeSource: function() {
19913
+ // WARN: We are not handling the case where buffer is still populated as the source should
19914
+ // not have buffer append operations as their final action.
19915
+ var source = '',
19916
+ buffer;
19917
+ for (var i = 0, len = this.source.length; i < len; i++) {
19918
+ var line = this.source[i];
19919
+ if (line.appendToBuffer) {
19920
+ if (buffer) {
19921
+ buffer = buffer + '\n + ' + line.content;
19922
+ } else {
19923
+ buffer = line.content;
19924
+ }
19925
+ } else {
19926
+ if (buffer) {
19927
+ source += 'buffer += ' + buffer + ';\n ';
19928
+ buffer = undefined;
19929
+ }
19930
+ source += line + '\n ';
19931
+ }
19932
+ }
19933
+ return source;
19934
+ },
19935
+
19936
+ // [blockValue]
19937
+ //
19938
+ // On stack, before: hash, inverse, program, value
19939
+ // On stack, after: return value of blockHelperMissing
19940
+ //
19941
+ // The purpose of this opcode is to take a block of the form
19942
+ // `{{#foo}}...{{/foo}}`, resolve the value of `foo`, and
19943
+ // replace it on the stack with the result of properly
19944
+ // invoking blockHelperMissing.
19945
+ blockValue: function() {
19946
+ this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';
19947
+
19948
+ var params = ["depth0"];
19949
+ this.setupParams(0, params);
19950
+
19951
+ this.replaceStack(function(current) {
19952
+ params.splice(1, 0, current);
19953
+ return "blockHelperMissing.call(" + params.join(", ") + ")";
19954
+ });
19955
+ },
19956
+
19957
+ // [ambiguousBlockValue]
19958
+ //
19959
+ // On stack, before: hash, inverse, program, value
19960
+ // Compiler value, before: lastHelper=value of last found helper, if any
19961
+ // On stack, after, if no lastHelper: same as [blockValue]
19962
+ // On stack, after, if lastHelper: value
19963
+ ambiguousBlockValue: function() {
19964
+ this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';
19965
+
19966
+ var params = ["depth0"];
19967
+ this.setupParams(0, params);
19968
+
19969
+ var current = this.topStack();
19970
+ params.splice(1, 0, current);
19971
+
19972
+ // Use the options value generated from the invocation
19973
+ params[params.length-1] = 'options';
19974
+
19975
+ this.source.push("if (!" + this.lastHelper + ") { " + current + " = blockHelperMissing.call(" + params.join(", ") + "); }");
19976
+ },
19977
+
19978
+ // [appendContent]
19979
+ //
19980
+ // On stack, before: ...
19981
+ // On stack, after: ...
19982
+ //
19983
+ // Appends the string value of `content` to the current buffer
19984
+ appendContent: function(content) {
19985
+ this.source.push(this.appendToBuffer(this.quotedString(content)));
19986
+ },
19987
+
19988
+ // [append]
19989
+ //
19990
+ // On stack, before: value, ...
19991
+ // On stack, after: ...
19992
+ //
19993
+ // Coerces `value` to a String and appends it to the current buffer.
19994
+ //
19995
+ // If `value` is truthy, or 0, it is coerced into a string and appended
19996
+ // Otherwise, the empty string is appended
19997
+ append: function() {
19998
+ // Force anything that is inlined onto the stack so we don't have duplication
19999
+ // when we examine local
20000
+ this.flushInline();
20001
+ var local = this.popStack();
20002
+ this.source.push("if(" + local + " || " + local + " === 0) { " + this.appendToBuffer(local) + " }");
20003
+ if (this.environment.isSimple) {
20004
+ this.source.push("else { " + this.appendToBuffer("''") + " }");
20005
+ }
20006
+ },
20007
+
20008
+ // [appendEscaped]
20009
+ //
20010
+ // On stack, before: value, ...
20011
+ // On stack, after: ...
20012
+ //
20013
+ // Escape `value` and append it to the buffer
20014
+ appendEscaped: function() {
20015
+ this.context.aliases.escapeExpression = 'this.escapeExpression';
20016
+
20017
+ this.source.push(this.appendToBuffer("escapeExpression(" + this.popStack() + ")"));
20018
+ },
20019
+
20020
+ // [getContext]
20021
+ //
20022
+ // On stack, before: ...
20023
+ // On stack, after: ...
20024
+ // Compiler value, after: lastContext=depth
20025
+ //
20026
+ // Set the value of the `lastContext` compiler value to the depth
20027
+ getContext: function(depth) {
20028
+ if(this.lastContext !== depth) {
20029
+ this.lastContext = depth;
20030
+ }
20031
+ },
20032
+
20033
+ // [lookupOnContext]
20034
+ //
20035
+ // On stack, before: ...
20036
+ // On stack, after: currentContext[name], ...
20037
+ //
20038
+ // Looks up the value of `name` on the current context and pushes
20039
+ // it onto the stack.
20040
+ lookupOnContext: function(name) {
20041
+ this.push(this.nameLookup('depth' + this.lastContext, name, 'context'));
20042
+ },
20043
+
20044
+ // [pushContext]
20045
+ //
20046
+ // On stack, before: ...
20047
+ // On stack, after: currentContext, ...
20048
+ //
20049
+ // Pushes the value of the current context onto the stack.
20050
+ pushContext: function() {
20051
+ this.pushStackLiteral('depth' + this.lastContext);
20052
+ },
20053
+
20054
+ // [resolvePossibleLambda]
20055
+ //
20056
+ // On stack, before: value, ...
20057
+ // On stack, after: resolved value, ...
20058
+ //
20059
+ // If the `value` is a lambda, replace it on the stack by
20060
+ // the return value of the lambda
20061
+ resolvePossibleLambda: function() {
20062
+ this.context.aliases.functionType = '"function"';
20063
+
20064
+ this.replaceStack(function(current) {
20065
+ return "typeof " + current + " === functionType ? " + current + ".apply(depth0) : " + current;
20066
+ });
20067
+ },
20068
+
20069
+ // [lookup]
20070
+ //
20071
+ // On stack, before: value, ...
20072
+ // On stack, after: value[name], ...
20073
+ //
20074
+ // Replace the value on the stack with the result of looking
20075
+ // up `name` on `value`
20076
+ lookup: function(name) {
20077
+ this.replaceStack(function(current) {
20078
+ return current + " == null || " + current + " === false ? " + current + " : " + this.nameLookup(current, name, 'context');
20079
+ });
20080
+ },
20081
+
20082
+ // [lookupData]
20083
+ //
20084
+ // On stack, before: ...
20085
+ // On stack, after: data[id], ...
20086
+ //
20087
+ // Push the result of looking up `id` on the current data
20088
+ lookupData: function(id) {
20089
+ this.push(this.nameLookup('data', id, 'data'));
20090
+ },
20091
+
20092
+ // [pushStringParam]
20093
+ //
20094
+ // On stack, before: ...
20095
+ // On stack, after: string, currentContext, ...
20096
+ //
20097
+ // This opcode is designed for use in string mode, which
20098
+ // provides the string value of a parameter along with its
20099
+ // depth rather than resolving it immediately.
20100
+ pushStringParam: function(string, type) {
20101
+ this.pushStackLiteral('depth' + this.lastContext);
20102
+
20103
+ this.pushString(type);
20104
+
20105
+ if (typeof string === 'string') {
20106
+ this.pushString(string);
20107
+ } else {
20108
+ this.pushStackLiteral(string);
20109
+ }
20110
+ },
20111
+
20112
+ emptyHash: function() {
20113
+ this.pushStackLiteral('{}');
20114
+
20115
+ if (this.options.stringParams) {
20116
+ this.register('hashTypes', '{}');
20117
+ }
20118
+ },
20119
+ pushHash: function() {
20120
+ this.hash = {values: [], types: []};
20121
+ },
20122
+ popHash: function() {
20123
+ var hash = this.hash;
20124
+ this.hash = undefined;
20125
+
20126
+ if (this.options.stringParams) {
20127
+ this.register('hashTypes', '{' + hash.types.join(',') + '}');
20128
+ }
20129
+ this.push('{\n ' + hash.values.join(',\n ') + '\n }');
20130
+ },
20131
+
20132
+ // [pushString]
20133
+ //
20134
+ // On stack, before: ...
20135
+ // On stack, after: quotedString(string), ...
20136
+ //
20137
+ // Push a quoted version of `string` onto the stack
20138
+ pushString: function(string) {
20139
+ this.pushStackLiteral(this.quotedString(string));
20140
+ },
20141
+
20142
+ // [push]
20143
+ //
20144
+ // On stack, before: ...
20145
+ // On stack, after: expr, ...
20146
+ //
20147
+ // Push an expression onto the stack
20148
+ push: function(expr) {
20149
+ this.inlineStack.push(expr);
20150
+ return expr;
20151
+ },
20152
+
20153
+ // [pushLiteral]
20154
+ //
20155
+ // On stack, before: ...
20156
+ // On stack, after: value, ...
20157
+ //
20158
+ // Pushes a value onto the stack. This operation prevents
20159
+ // the compiler from creating a temporary variable to hold
20160
+ // it.
20161
+ pushLiteral: function(value) {
20162
+ this.pushStackLiteral(value);
20163
+ },
20164
+
20165
+ // [pushProgram]
20166
+ //
20167
+ // On stack, before: ...
20168
+ // On stack, after: program(guid), ...
20169
+ //
20170
+ // Push a program expression onto the stack. This takes
20171
+ // a compile-time guid and converts it into a runtime-accessible
20172
+ // expression.
20173
+ pushProgram: function(guid) {
20174
+ if (guid != null) {
20175
+ this.pushStackLiteral(this.programExpression(guid));
20176
+ } else {
20177
+ this.pushStackLiteral(null);
20178
+ }
20179
+ },
20180
+
20181
+ // [invokeHelper]
20182
+ //
20183
+ // On stack, before: hash, inverse, program, params..., ...
20184
+ // On stack, after: result of helper invocation
20185
+ //
20186
+ // Pops off the helper's parameters, invokes the helper,
20187
+ // and pushes the helper's return value onto the stack.
20188
+ //
20189
+ // If the helper is not found, `helperMissing` is called.
20190
+ invokeHelper: function(paramSize, name) {
20191
+ this.context.aliases.helperMissing = 'helpers.helperMissing';
20192
+
20193
+ var helper = this.lastHelper = this.setupHelper(paramSize, name, true);
20194
+
20195
+ this.push(helper.name);
20196
+ this.replaceStack(function(name) {
20197
+ return name + ' ? ' + name + '.call(' +
20198
+ helper.callParams + ") " + ": helperMissing.call(" +
20199
+ helper.helperMissingParams + ")";
20200
+ });
20201
+ },
20202
+
20203
+ // [invokeKnownHelper]
20204
+ //
20205
+ // On stack, before: hash, inverse, program, params..., ...
20206
+ // On stack, after: result of helper invocation
20207
+ //
20208
+ // This operation is used when the helper is known to exist,
20209
+ // so a `helperMissing` fallback is not required.
20210
+ invokeKnownHelper: function(paramSize, name) {
20211
+ var helper = this.setupHelper(paramSize, name);
20212
+ this.push(helper.name + ".call(" + helper.callParams + ")");
20213
+ },
20214
+
20215
+ // [invokeAmbiguous]
20216
+ //
20217
+ // On stack, before: hash, inverse, program, params..., ...
20218
+ // On stack, after: result of disambiguation
20219
+ //
20220
+ // This operation is used when an expression like `{{foo}}`
20221
+ // is provided, but we don't know at compile-time whether it
20222
+ // is a helper or a path.
20223
+ //
20224
+ // This operation emits more code than the other options,
20225
+ // and can be avoided by passing the `knownHelpers` and
20226
+ // `knownHelpersOnly` flags at compile-time.
20227
+ invokeAmbiguous: function(name, helperCall) {
20228
+ this.context.aliases.functionType = '"function"';
20229
+
20230
+ this.pushStackLiteral('{}'); // Hash value
20231
+ var helper = this.setupHelper(0, name, helperCall);
20232
+
20233
+ var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
20234
+
20235
+ var nonHelper = this.nameLookup('depth' + this.lastContext, name, 'context');
20236
+ var nextStack = this.nextStack();
20237
+
20238
+ this.source.push('if (' + nextStack + ' = ' + helperName + ') { ' + nextStack + ' = ' + nextStack + '.call(' + helper.callParams + '); }');
20239
+ this.source.push('else { ' + nextStack + ' = ' + nonHelper + '; ' + nextStack + ' = typeof ' + nextStack + ' === functionType ? ' + nextStack + '.apply(depth0) : ' + nextStack + '; }');
20240
+ },
20241
+
20242
+ // [invokePartial]
20243
+ //
20244
+ // On stack, before: context, ...
20245
+ // On stack after: result of partial invocation
20246
+ //
20247
+ // This operation pops off a context, invokes a partial with that context,
20248
+ // and pushes the result of the invocation back.
20249
+ invokePartial: function(name) {
20250
+ var params = [this.nameLookup('partials', name, 'partial'), "'" + name + "'", this.popStack(), "helpers", "partials"];
20251
+
20252
+ if (this.options.data) {
20253
+ params.push("data");
20254
+ }
20255
+
20256
+ this.context.aliases.self = "this";
20257
+ this.push("self.invokePartial(" + params.join(", ") + ")");
20258
+ },
20259
+
20260
+ // [assignToHash]
20261
+ //
20262
+ // On stack, before: value, hash, ...
20263
+ // On stack, after: hash, ...
20264
+ //
20265
+ // Pops a value and hash off the stack, assigns `hash[key] = value`
20266
+ // and pushes the hash back onto the stack.
20267
+ assignToHash: function(key) {
20268
+ var value = this.popStack(),
20269
+ type;
20270
+
20271
+ if (this.options.stringParams) {
20272
+ type = this.popStack();
20273
+ this.popStack();
20274
+ }
20275
+
20276
+ var hash = this.hash;
20277
+ if (type) {
20278
+ hash.types.push("'" + key + "': " + type);
20279
+ }
20280
+ hash.values.push("'" + key + "': (" + value + ")");
20281
+ },
20282
+
20283
+ // HELPERS
20284
+
20285
+ compiler: JavaScriptCompiler,
20286
+
20287
+ compileChildren: function(environment, options) {
20288
+ var children = environment.children, child, compiler;
20289
+
20290
+ for(var i=0, l=children.length; i<l; i++) {
20291
+ child = children[i];
20292
+ compiler = new this.compiler();
20293
+
20294
+ var index = this.matchExistingProgram(child);
20295
+
20296
+ if (index == null) {
20297
+ this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children
20298
+ index = this.context.programs.length;
20299
+ child.index = index;
20300
+ child.name = 'program' + index;
20301
+ this.context.programs[index] = compiler.compile(child, options, this.context);
20302
+ this.context.environments[index] = child;
20303
+ } else {
20304
+ child.index = index;
20305
+ child.name = 'program' + index;
20306
+ }
20307
+ }
20308
+ },
20309
+ matchExistingProgram: function(child) {
20310
+ for (var i = 0, len = this.context.environments.length; i < len; i++) {
20311
+ var environment = this.context.environments[i];
20312
+ if (environment && environment.equals(child)) {
20313
+ return i;
20314
+ }
20315
+ }
20316
+ },
20317
+
20318
+ programExpression: function(guid) {
20319
+ this.context.aliases.self = "this";
20320
+
20321
+ if(guid == null) {
20322
+ return "self.noop";
20323
+ }
20324
+
20325
+ var child = this.environment.children[guid],
20326
+ depths = child.depths.list, depth;
20327
+
20328
+ var programParams = [child.index, child.name, "data"];
20329
+
20330
+ for(var i=0, l = depths.length; i<l; i++) {
20331
+ depth = depths[i];
20332
+
20333
+ if(depth === 1) { programParams.push("depth0"); }
20334
+ else { programParams.push("depth" + (depth - 1)); }
20335
+ }
20336
+
20337
+ if(depths.length === 0) {
20338
+ return "self.program(" + programParams.join(", ") + ")";
20339
+ } else {
20340
+ programParams.shift();
20341
+ return "self.programWithDepth(" + programParams.join(", ") + ")";
20342
+ }
20343
+ },
20344
+
20345
+ register: function(name, val) {
20346
+ this.useRegister(name);
20347
+ this.source.push(name + " = " + val + ";");
20348
+ },
20349
+
20350
+ useRegister: function(name) {
20351
+ if(!this.registers[name]) {
20352
+ this.registers[name] = true;
20353
+ this.registers.list.push(name);
20354
+ }
20355
+ },
20356
+
20357
+ pushStackLiteral: function(item) {
20358
+ return this.push(new Literal(item));
20359
+ },
20360
+
20361
+ pushStack: function(item) {
20362
+ this.flushInline();
20363
+
20364
+ var stack = this.incrStack();
20365
+ if (item) {
20366
+ this.source.push(stack + " = " + item + ";");
20367
+ }
20368
+ this.compileStack.push(stack);
20369
+ return stack;
20370
+ },
20371
+
20372
+ replaceStack: function(callback) {
20373
+ var prefix = '',
20374
+ inline = this.isInline(),
20375
+ stack;
20376
+
20377
+ // If we are currently inline then we want to merge the inline statement into the
20378
+ // replacement statement via ','
20379
+ if (inline) {
20380
+ var top = this.popStack(true);
20381
+
20382
+ if (top instanceof Literal) {
20383
+ // Literals do not need to be inlined
20384
+ stack = top.value;
20385
+ } else {
20386
+ // Get or create the current stack name for use by the inline
20387
+ var name = this.stackSlot ? this.topStackName() : this.incrStack();
20388
+
20389
+ prefix = '(' + this.push(name) + ' = ' + top + '),';
20390
+ stack = this.topStack();
20391
+ }
20392
+ } else {
20393
+ stack = this.topStack();
20394
+ }
20395
+
20396
+ var item = callback.call(this, stack);
20397
+
20398
+ if (inline) {
20399
+ if (this.inlineStack.length || this.compileStack.length) {
20400
+ this.popStack();
20401
+ }
20402
+ this.push('(' + prefix + item + ')');
20403
+ } else {
20404
+ // Prevent modification of the context depth variable. Through replaceStack
20405
+ if (!/^stack/.test(stack)) {
20406
+ stack = this.nextStack();
20407
+ }
20408
+
20409
+ this.source.push(stack + " = (" + prefix + item + ");");
20410
+ }
20411
+ return stack;
20412
+ },
20413
+
20414
+ nextStack: function() {
20415
+ return this.pushStack();
20416
+ },
20417
+
20418
+ incrStack: function() {
20419
+ this.stackSlot++;
20420
+ if(this.stackSlot > this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); }
20421
+ return this.topStackName();
20422
+ },
20423
+ topStackName: function() {
20424
+ return "stack" + this.stackSlot;
20425
+ },
20426
+ flushInline: function() {
20427
+ var inlineStack = this.inlineStack;
20428
+ if (inlineStack.length) {
20429
+ this.inlineStack = [];
20430
+ for (var i = 0, len = inlineStack.length; i < len; i++) {
20431
+ var entry = inlineStack[i];
20432
+ if (entry instanceof Literal) {
20433
+ this.compileStack.push(entry);
20434
+ } else {
20435
+ this.pushStack(entry);
20436
+ }
20437
+ }
20438
+ }
20439
+ },
20440
+ isInline: function() {
20441
+ return this.inlineStack.length;
20442
+ },
20443
+
20444
+ popStack: function(wrapped) {
20445
+ var inline = this.isInline(),
20446
+ item = (inline ? this.inlineStack : this.compileStack).pop();
20447
+
20448
+ if (!wrapped && (item instanceof Literal)) {
20449
+ return item.value;
20450
+ } else {
20451
+ if (!inline) {
20452
+ this.stackSlot--;
20453
+ }
20454
+ return item;
20455
+ }
20456
+ },
20457
+
20458
+ topStack: function(wrapped) {
20459
+ var stack = (this.isInline() ? this.inlineStack : this.compileStack),
20460
+ item = stack[stack.length - 1];
20461
+
20462
+ if (!wrapped && (item instanceof Literal)) {
20463
+ return item.value;
20464
+ } else {
20465
+ return item;
20466
+ }
20467
+ },
20468
+
20469
+ quotedString: function(str) {
20470
+ return '"' + str
20471
+ .replace(/\\/g, '\\\\')
20472
+ .replace(/"/g, '\\"')
20473
+ .replace(/\n/g, '\\n')
20474
+ .replace(/\r/g, '\\r') + '"';
20475
+ },
20476
+
20477
+ setupHelper: function(paramSize, name, missingParams) {
20478
+ var params = [];
20479
+ this.setupParams(paramSize, params, missingParams);
20480
+ var foundHelper = this.nameLookup('helpers', name, 'helper');
20481
+
20482
+ return {
20483
+ params: params,
20484
+ name: foundHelper,
20485
+ callParams: ["depth0"].concat(params).join(", "),
20486
+ helperMissingParams: missingParams && ["depth0", this.quotedString(name)].concat(params).join(", ")
20487
+ };
20488
+ },
20489
+
20490
+ // the params and contexts arguments are passed in arrays
20491
+ // to fill in
20492
+ setupParams: function(paramSize, params, useRegister) {
20493
+ var options = [], contexts = [], types = [], param, inverse, program;
20494
+
20495
+ options.push("hash:" + this.popStack());
20496
+
20497
+ inverse = this.popStack();
20498
+ program = this.popStack();
20499
+
20500
+ // Avoid setting fn and inverse if neither are set. This allows
20501
+ // helpers to do a check for `if (options.fn)`
20502
+ if (program || inverse) {
20503
+ if (!program) {
20504
+ this.context.aliases.self = "this";
20505
+ program = "self.noop";
20506
+ }
20507
+
20508
+ if (!inverse) {
20509
+ this.context.aliases.self = "this";
20510
+ inverse = "self.noop";
20511
+ }
20512
+
20513
+ options.push("inverse:" + inverse);
20514
+ options.push("fn:" + program);
20515
+ }
20516
+
20517
+ for(var i=0; i<paramSize; i++) {
20518
+ param = this.popStack();
20519
+ params.push(param);
20520
+
20521
+ if(this.options.stringParams) {
20522
+ types.push(this.popStack());
20523
+ contexts.push(this.popStack());
20524
+ }
20525
+ }
20526
+
20527
+ if (this.options.stringParams) {
20528
+ options.push("contexts:[" + contexts.join(",") + "]");
20529
+ options.push("types:[" + types.join(",") + "]");
20530
+ options.push("hashTypes:hashTypes");
20531
+ }
20532
+
20533
+ if(this.options.data) {
20534
+ options.push("data:data");
20535
+ }
20536
+
20537
+ options = "{" + options.join(",") + "}";
20538
+ if (useRegister) {
20539
+ this.register('options', options);
20540
+ params.push('options');
20541
+ } else {
20542
+ params.push(options);
20543
+ }
20544
+ return params.join(", ");
20545
+ }
20546
+ };
20547
+
20548
+ var reservedWords = (
20549
+ "break else new var" +
20550
+ " case finally return void" +
20551
+ " catch for switch while" +
20552
+ " continue function this with" +
20553
+ " default if throw" +
20554
+ " delete in try" +
20555
+ " do instanceof typeof" +
20556
+ " abstract enum int short" +
20557
+ " boolean export interface static" +
20558
+ " byte extends long super" +
20559
+ " char final native synchronized" +
20560
+ " class float package throws" +
20561
+ " const goto private transient" +
20562
+ " debugger implements protected volatile" +
20563
+ " double import public let yield"
20564
+ ).split(" ");
20565
+
20566
+ var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
20567
+
20568
+ for(var i=0, l=reservedWords.length; i<l; i++) {
20569
+ compilerWords[reservedWords[i]] = true;
20570
+ }
20571
+
20572
+ JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
20573
+ if(!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(name)) {
20574
+ return true;
20575
+ }
20576
+ return false;
20577
+ };
20578
+
20579
+ })(Handlebars.Compiler, Handlebars.JavaScriptCompiler);
20580
+
20581
+ Handlebars.precompile = function(input, options) {
20582
+ if (!input || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) {
20583
+ throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
20584
+ }
20585
+
20586
+ options = options || {};
20587
+ if (!('data' in options)) {
20588
+ options.data = true;
20589
+ }
20590
+ var ast = Handlebars.parse(input);
20591
+ var environment = new Handlebars.Compiler().compile(ast, options);
20592
+ return new Handlebars.JavaScriptCompiler().compile(environment, options);
20593
+ };
20594
+
20595
+ Handlebars.compile = function(input, options) {
20596
+ if (!input || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) {
20597
+ throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
20598
+ }
20599
+
20600
+ options = options || {};
20601
+ if (!('data' in options)) {
20602
+ options.data = true;
20603
+ }
20604
+ var compiled;
20605
+ function compile() {
20606
+ var ast = Handlebars.parse(input);
20607
+ var environment = new Handlebars.Compiler().compile(ast, options);
20608
+ var templateSpec = new Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true);
20609
+ return Handlebars.template(templateSpec);
20610
+ }
20611
+
20612
+ // Template is only compiled on first use and cached after that point.
20613
+ return function(context, options) {
20614
+ if (!compiled) {
20615
+ compiled = compile();
20616
+ }
20617
+ return compiled.call(this, context, options);
20618
+ };
20619
+ };
20620
+ ;
20621
+ // lib/handlebars/runtime.js
20622
+ Handlebars.VM = {
20623
+ template: function(templateSpec) {
20624
+ // Just add water
20625
+ var container = {
20626
+ escapeExpression: Handlebars.Utils.escapeExpression,
20627
+ invokePartial: Handlebars.VM.invokePartial,
20628
+ programs: [],
20629
+ program: function(i, fn, data) {
20630
+ var programWrapper = this.programs[i];
20631
+ if(data) {
20632
+ return Handlebars.VM.program(fn, data);
20633
+ } else if(programWrapper) {
20634
+ return programWrapper;
20635
+ } else {
20636
+ programWrapper = this.programs[i] = Handlebars.VM.program(fn);
20637
+ return programWrapper;
20638
+ }
20639
+ },
20640
+ programWithDepth: Handlebars.VM.programWithDepth,
20641
+ noop: Handlebars.VM.noop,
20642
+ compilerInfo: null
20643
+ };
20644
+
20645
+ return function(context, options) {
20646
+ options = options || {};
20647
+ var result = templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);
20648
+
20649
+ var compilerInfo = container.compilerInfo || [],
20650
+ compilerRevision = compilerInfo[0] || 1,
20651
+ currentRevision = Handlebars.COMPILER_REVISION;
20652
+
20653
+ if (compilerRevision !== currentRevision) {
20654
+ if (compilerRevision < currentRevision) {
20655
+ var runtimeVersions = Handlebars.REVISION_CHANGES[currentRevision],
20656
+ compilerVersions = Handlebars.REVISION_CHANGES[compilerRevision];
20657
+ throw "Template was precompiled with an older version of Handlebars than the current runtime. "+
20658
+ "Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+").";
20659
+ } else {
20660
+ // Use the embedded version info since the runtime doesn't know about this revision yet
20661
+ throw "Template was precompiled with a newer version of Handlebars than the current runtime. "+
20662
+ "Please update your runtime to a newer version ("+compilerInfo[1]+").";
20663
+ }
20664
+ }
20665
+
20666
+ return result;
20667
+ };
20668
+ },
20669
+
20670
+ programWithDepth: function(fn, data, $depth) {
20671
+ var args = Array.prototype.slice.call(arguments, 2);
20672
+
20673
+ return function(context, options) {
20674
+ options = options || {};
20675
+
20676
+ return fn.apply(this, [context, options.data || data].concat(args));
20677
+ };
20678
+ },
20679
+ program: function(fn, data) {
20680
+ return function(context, options) {
20681
+ options = options || {};
20682
+
20683
+ return fn(context, options.data || data);
20684
+ };
20685
+ },
20686
+ noop: function() { return ""; },
20687
+ invokePartial: function(partial, name, context, helpers, partials, data) {
20688
+ var options = { helpers: helpers, partials: partials, data: data };
20689
+
20690
+ if(partial === undefined) {
20691
+ throw new Handlebars.Exception("The partial " + name + " could not be found");
20692
+ } else if(partial instanceof Function) {
20693
+ return partial(context, options);
20694
+ } else if (!Handlebars.compile) {
20695
+ throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
20696
+ } else {
20697
+ partials[name] = Handlebars.compile(partial, {data: data !== undefined});
20698
+ return partials[name](context, options);
20699
+ }
20700
+ }
20701
+ };
20702
+
20703
+ Handlebars.template = Handlebars.VM.template;
20704
+ ;
20705
+
20706
+ })();
20707
+
18526
20708
  (function() {
18527
20709
  /**
18528
20710
  @module ember