ember-source 0.0.5 → 0.0.6

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-rc.1-354-g4e75d2b
12
- // Last commit: 4e75d2b (2013-04-09 16:28:08 -0700)
11
+ // Version: v1.0.0-rc.1-536-gd47406c
12
+ // Last commit: d47406c (2013-04-25 17:21:02 -0700)
13
13
 
14
14
 
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.2",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.LOG_VERSION=Ember.ENV.LOG_VERSION===!1?!1:!0,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.call(t||this);try{return e.call(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]}return e},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)}(),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(){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(){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};var v={},m="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(m,function(e){v["[object "+e+"]"]=e.toLowerCase()});var g=Object.prototype.toString;Ember.typeOf=function(e){var t;return t=e===null||e===undefined?String(e):v[g.call(e)]||"object",t==="function"?Ember.Object&&Ember.Object.detect(e)&&(t="class"):t==="object"&&(e instanceof Error?t="error":Ember.Object&&e instanceof Ember.Object?t="instance":t="object"),t}}(),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.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 o(e){return e.match(s)[0]}function u(e,n){var s=i.test(n),u=!s&&r.test(n),a;if(!e||u)e=Ember.lookup;s&&(n=n.slice(5)),e===Ember.lookup&&(a=o(n),e=t(e,a),n=n.slice(a.length+1));if(!n||n.length===0)throw new Error("Invalid Path");return[e,n]}var e=Ember.META_KEY,t,n=Ember.ENV.MANDATORY_SETTER,r=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,i=/^this[\.\*]/,s=/^([^\.\*]+)/;t=function(r,i){if(i==="")return r;!i&&"string"==typeof r&&(i=r,r=null);if(!r||i.indexOf(".")!==-1)return a(r,i);var s=r[e],o=s&&s.descs[i],u;return o?o.get(r,i):(n&&s&&s.watching[i]>0?u=s.values[i]:u=r[i],u!==undefined||"object"!=typeof r||i in r||"function"!=typeof r.unknownProperty?u:r.unknownProperty(i))},Ember.config.overrideAccessors&&(Ember.get=t,Ember.config.overrideAccessors(),t=Ember.get);var a=Ember._getPath=function(e,n){var r,s,o,a,f;if(e===null&&n.indexOf(".")===-1)return t(Ember.lookup,n);r=i.test(n);if(!e||r)o=u(e,n),e=o[0],n=o[1],o.length=0;s=n.split("."),f=s.length;for(a=0;e&&a<f;a++){e=t(e,s[a],!0);if(e&&e.isDestroyed)return undefined}return e};Ember.normalizeTuple=function(e,t){return u(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)}(),function(){function r(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 i(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 s(e,t,i){var s=e[n],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=r(i,a,f);h===-1&&i.push([a,f,l,c])}}function o(e,t,i){var s=e[n],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=r(i,f,l);if(p!==-1)continue;i.push([f,l,c,h]),u.push([f,l,c,h])}return u}function u(e,t,n,s,o){!s&&"function"==typeof n&&(s=n,n=null);var u=i(e,t),a=r(u,n,s);if(a!==-1)return;u.push([n,s,o,undefined]),"function"==typeof e.didAddListener&&e.didAddListener(t,n,s)}function a(e,t,s,o){function u(n,s,o){var u=i(e,t),a=r(u,n,s);if(a===-1)return;u.splice(a,1),"function"==typeof e.didRemoveListener&&e.didRemoveListener(t,n,s)}!o&&"function"==typeof s&&(o=s,s=null);if(o)u(s,o);else{var a=e[n],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 f(e,t,n,s,o){function l(){return o.call(n)}function c(){f&&(f[3]=undefined)}!s&&"function"==typeof n&&(s=n,n=null);var u=i(e,t),a=r(u,n,s),f;return a!==-1&&(f=u[a].slice(),f[3]=!0,u[a]=f),Ember.tryFinally(l,c)}function l(e,t,n,s,o){function d(){return o.call(n)}function v(){for(c=0,h=u.length;c<h;c++)u[c][3]=undefined}!s&&"function"==typeof n&&(s=n,n=null);var u=[],a,f,l,c,h;for(c=0,h=t.length;c<h;c++){a=t[c],f=i(e,a);var p=r(f,n,s);p!==-1&&(l=f[p].slice(),l[3]=!0,f[p]=l,u.push(l))}return Ember.tryFinally(d,v)}function c(e){var t=e[n].listeners,r=[];if(t)for(var i in t)t[i]&&r.push(i);return r}function h(e,t,r,i){e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,r);if(!i){var s=e[n];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],f=i[o][1],l=i[o][2];l&&a(e,t,u,f),u||(u=e),"string"==typeof f&&(f=u[f]),r?f.apply(u,r):f.call(u)}return!0}function p(e,t){var r=e[n],i=r&&r.listeners&&r.listeners[t];return!!i&&!!i.length}function d(e,t){var r=[],i=e[n],s=i&&i.listeners&&i.listeners[t];if(!s)return r;for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];r.push([a,f])}return r}var e=Ember.create,t=Ember.meta,n=Ember.META_KEY;Ember.addListener=u,Ember.removeListener=a,Ember._suspendListener=f,Ember._suspendListeners=l,Ember.sendEvent=h,Ember.hasListeners=p,Ember.watchedEvents=c,Ember.listenersFor=d,Ember.listenersDiff=o,Ember.listenersUnion=s}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,n=Ember._ObserverSet=function(){this.clear()};n.prototype.add=function(t,n,r){var i=this.observerSet,s=this.observers,o=e(t),u=i[o],a;return u||(i[o]=u={}),a=u[n],a===undefined&&(a=s.push({sender:t,keyName:n,eventName:r,listeners:[]})-1,u[n]=a),s[a].listeners},n.prototype.flush=function(){var e=this.observers,n,r,i,s;this.clear();for(n=0,r=e.length;n<r;++n){i=e[n],s=i.sender;if(s.isDestroying||s.isDestroyed)continue;t(s,i.eventName,[s,i.keyName],i.listeners)}},n.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function d(e,t,n){if(e.isDestroying)return;var r=h,i=!r;i&&(r=h={}),m(l,e,t,r,n),i&&(h=null)}function v(e,t,n){if(e.isDestroying)return;var r=p,i=!r;i&&(r=p={}),m(c,e,t,r,n),i&&(p=null)}function m(e,n,r,i,s){var o=t(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;e(n,a)}}var e=Ember.meta,t=Ember.guidFor,n=Ember.tryFinally,r=Ember.sendEvent,i=Ember.listenersUnion,s=Ember.listenersDiff,o=Ember._ObserverSet,u=new o,a=new o,f=0,l=Ember.propertyWillChange=function(t,n){var r=e(t,!1),i=r.watching[n]>0||n==="length",s=r.proto,o=r.descs[n];if(!i)return;if(s===t)return;o&&o.willChange&&o.willChange(t,n),d(t,n,r),g(t,n,r),S(t,n)},c=Ember.propertyDidChange=function(t,n){var r=e(t,!1),i=r.watching[n]>0||n==="length",s=r.proto,o=r.descs[n];if(s===t)return;o&&o.didChange&&o.didChange(t,n);if(!i&&n!=="length")return;v(t,n,r),y(t,n,r),x(t,n)},h,p,g=function(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)},y=function(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)};Ember.overrideChains=function(e,t,n){y(e,t,n,!0)};var b=Ember.beginPropertyChanges=function(){f++},w=Ember.endPropertyChanges=function(){f--,f<=0&&(u.clear(),a.flush())},E=Ember.changeProperties=function(e,t){b(),n(e,w,t)},S=function(e,t){if(e.isDestroying)return;var n=t+":before",i,o;f?(i=u.add(e,t,n),o=s(e,n,i),r(e,n,[e,t],o)):r(e,n,[e,t])},x=function(e,t){if(e.isDestroying)return;var n=t+":change",s;f?(s=a.add(e,t,n),i(e,n,s)):r(e,n,[e,t])}}(),function(){function u(e,t,n,r){var i;i=t.slice(t.lastIndexOf(".")+1),t=t.slice(0,t.length-(i.length+1)),t!=="this"&&(e=s(e,t));if(!i||i.length===0)throw new Error("You passed an empty path");if(!e){if(r)return;throw new Error("Object in path "+t+" could not be found or was destroyed.")}return o(e,i,n)}var e=Ember.META_KEY,t=Ember.ENV.MANDATORY_SETTER,n=/^([A-Z$]|([0-9][A-Z$]))/,r=Ember.propertyWillChange,i=Ember.propertyDidChange,s=Ember._getPath,o=function(r,i,s,o){typeof r=="string"&&(s=i,i=r,r=null);if(!r||i.indexOf(".")!==-1)return u(r,i,s,o);var a=r[e],f=a&&a.descs[i],l,c;return f?f.set(r,i,s):(l="object"==typeof r&&!(i in r),l&&"function"==typeof r.setUnknownProperty?r.setUnknownProperty(i,s):a&&a.watching[i]>0?(t?c=a.values[i]:c=r[i],s!==c&&(Ember.propertyWillChange(r,i),t?c!==undefined||i in r?a.values[i]=s:Ember.defineProperty(r,i,null,s):r[i]=s,Ember.propertyDidChange(r,i))):r[i]=s),s};Ember.config.overrideAccessors&&(Ember.set=o,Ember.config.overrideAccessors(),o=Ember.set),Ember.set=o,Ember.setPath=Ember.deprecateFunc("setPath is deprecated since set now supports paths",Ember.set),Ember.trySet=function(e,t,n){return o(e,t,n,!0)},Ember.trySetPath=Ember.deprecateFunc("trySetPath has been renamed to trySet",Ember.trySet)}(),function(){var e=Ember.META_KEY,t=Ember.meta,n=Ember.platform.defineProperty,r=Ember.ENV.MANDATORY_SETTER,i=Ember.Descriptor=function(){},s=Ember.MANDATORY_SETTER_FUNCTION=function(e){},o=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var n=this[e];return n&&n.values[t]}};Ember.defineProperty=function(e,i,u,a,f){var l,c,h,p;return f||(f=t(e)),l=f.descs,c=f.descs[i],h=f.watching[i]>0,c instanceof Ember.Descriptor&&c.teardown(e,i),u instanceof Ember.Descriptor?(p=u,l[i]=u,r&&h?n(e,i,{configurable:!0,enumerable:!0,writable:!0,value:undefined}):e[i]=undefined,u.setup(e,i)):(l[i]=undefined,u==null?(p=a,r&&h?(f.values[i]=a,n(e,i,{configurable:!0,enumerable:!0,set:s,get:o(i)})):e[i]=a):(p=u,n(e,i,u))),h&&Ember.overrideChains(e,i,f),e.didDefineProperty&&e.didDefineProperty(e,i,p),this}}(),function(){var e=Ember.changeProperties,t=Ember.set;Ember.setProperties=function(n,r){return e(function(){for(var e in r)r.hasOwnProperty(e)&&t(n,e,r[e])}),n}}(),function(){var e=Ember.meta,t=Ember.typeOf,n=Ember.ENV.MANDATORY_SETTER,r=Ember.platform.defineProperty;Ember.watchKey=function(i,s){if(s==="length"&&t(i)==="array")return;var o=e(i),u=o.watching,a;u[s]?u[s]=(u[s]||0)+1:(u[s]=1,a=o.descs[s],a&&a.willWatch&&a.willWatch(i,s),"function"==typeof i.willWatchProperty&&i.willWatchProperty(s),n&&s in i&&(o.values[s]=i[s],r(i,s,{configurable:!0,enumerable:!0,set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(s)})))},Ember.unwatchKey=function(t,i){var s=e(t),o=s.watching,u;o[i]===1?(o[i]=0,u=s.descs[i],u&&u.didUnwatch&&u.didUnwatch(t,i),"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),n&&i in t&&(r(t,i,{configurable:!0,enumerable:!0,writable:!0,value:s.values[i]}),delete s.values[i])):o[i]>1&&o[i]--}}(),function(){function l(e){return e.match(f)[0]}function h(t,n,r){if(!t||"object"!=typeof t)return;var i=e(t),o=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(o=i.chainWatchers={}),o[n]||(o[n]=[]),o[n].push(r),s(t,n)}function d(t){return e(t,!1).proto===t}var e=Ember.meta,t=Ember.get,n=Ember.normalizeTuple,r=Ember.ArrayPolyfills.forEach,i=Ember.warn,s=Ember.watchKey,o=Ember.unwatchKey,u=Ember.propertyWillChange,a=Ember.propertyDidChange,f=/^([^\.\*]+)/,c=[];Ember.flushPendingChains=function(){if(c.length===0)return;var e=c;c=[],r.call(e,function(e){e[0].add(e[1])}),i("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",c.length===0)};var p=Ember.removeChainWatcher=function(t,n,r){if(!t||"object"!=typeof t)return;var i=e(t,!1);if(!i.hasOwnProperty("chainWatchers"))return;var s=i.chainWatchers;if(s[n]){s=s[n];for(var u=0,a=s.length;u<a;u++)s[u]===r&&s.splice(u,1)}o(t,n)},v=Ember._ChainNode=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&&h(this._object,this._key,this)),this._parent&&this._parent._key==="@each"&&this.value()},m=v.prototype;m.value=function(){if(this._value===undefined&&this._watching){var e=this._parent.value();this._value=e&&!d(e)?t(e,this._key):undefined}return this._value},m.destroy=function(){if(this._watching){var e=this._object;e&&p(e,this._key,this),this._watching=!1}},m.copy=function(e){var t=new v(null,null,e),n=this._paths,r;for(r in n){if(n[r]<=0)continue;t.add(r)}return t},m.add=function(e){var t,r,i,s,o;o=this._paths,o[e]=(o[e]||0)+1,t=this.value(),r=n(t,e);if(r[0]&&r[0]===t)e=r[1],i=l(e),e=e.slice(i.length+1);else{if(!r[0]){c.push([this,e]),r.length=0;return}s=r[0],i=e.slice(0,0-(r[1].length+1)),e=r[1]}r.length=0,this.chain(i,e,s)},m.remove=function(e){var t,r,i,s,o;o=this._paths,o[e]>0&&o[e]--,t=this.value(),r=n(t,e),r[0]===t?(e=r[1],i=l(e),e=e.slice(i.length+1)):(s=r[0],i=e.slice(0,0-(r[1].length+1)),e=r[1]),r.length=0,this.unchain(i,e)},m.count=0,m.chain=function(e,t,n){var r=this._chains,i;r||(r=this._chains={}),i=r[e],i||(i=r[e]=new v(this,e,n)),i.count++,t&&t.length>0&&(e=l(t),t=t.slice(e.length+1),i.chain(e,t))},m.unchain=function(e,t){var n=this._chains,r=n[e];t&&t.length>1&&(e=l(t),t=t.slice(e.length+1),r.unchain(e,t)),r.count--,r.count<=0&&(delete n[r._key],r.destroy())},m.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)},m.chainWillChange=function(e,t,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,n+1):(n>1&&u(this.value(),t),t="this."+t,this._paths[t]>0&&u(this.value(),t))},m.chainDidChange=function(e,t,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,n+1):(n>1&&a(this.value(),t),t="this."+t,this._paths[t]>0&&a(this.value(),t))},m.didChange=function(e){if(this._watching){var t=this._parent.value();t!==this._object&&(p(this._object,this._key,this),this._object=t,h(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.finishChains=function(t){var n=e(t,!1),r=n.chains;r&&(r.value()!==t&&(n.chains=r=r.copy(t)),r.didChange(!0))}}(),function(){function r(t){var r=e(t),i=r.chains;return i?i.value()!==t&&(i=r.chains=i.copy(t)):i=r.chains=new n(null,null,t),i}var e=Ember.meta,t=Ember.typeOf,n=Ember._ChainNode;Ember.watchPath=function(n,i){if(i==="length"&&t(n)==="array")return;var s=e(n),o=s.watching;o[i]?o[i]=(o[i]||0)+1:(o[i]=1,r(n).add(i))},Ember.unwatchPath=function(t,n){var i=e(t),s=i.watching,o;s[n]===1?(s[n]=0,r(t).remove(n)):s[n]>1&&s[n]--}}(),function(){function c(e){return e==="*"||!l.test(e)}var e=Ember.meta,t=Ember.GUID_KEY,n=Ember.META_KEY,r=Ember.removeChainWatcher,i=Ember.watchKey,s=Ember.unwatchKey,o=Ember.watchPath,u=Ember.unwatchPath,a=Ember.typeOf,f=Ember.generateGuid,l=/[\.\*]/;Ember.watch=function(e,t){if(t==="length"&&a(e)==="array")return;c(t)?i(e,t):o(e,t)},Ember.isWatching=function(t,r){var i=t[n];return(i&&i.watching[r])>0},Ember.watch.flushPending=Ember.flushPendingChains,Ember.unwatch=function(e,t){if(t==="length"&&a(e)==="array")return;c(t)?s(e,t):u(e,t)},Ember.rewatch=function(n){var r=e(n,!1),i=r.chains;t in n&&!n.hasOwnProperty(t)&&f(n,"ember"),i&&i.value()!==n&&(r.chains=i.copy(n))};var h=[];Ember.destroy=function(e){var t=e[n],i,s,o,u;if(t){e[n]=null,i=t.chains;if(i){h.push(i);while(h.length>0){i=h.pop(),s=i._chains;if(s)for(o in s)s.hasOwnProperty(o)&&h.push(s[o]);i._watching&&(u=i._object,u&&r(u,i._key,i))}}}}}(),function(){function a(e,t,n){var r=t[n];return r?t.hasOwnProperty(n)||(r=t[n]=i(r)):r=t[n]={},r}function f(e,t){return a(e,t,"deps")}function l(e,t,n,r){var i=e._dependentKeys,s,u,l,c,h;if(!i)return;s=f(t,r);for(u=0,l=i.length;u<l;u++)c=i[u],h=a(t,s,c),h[n]=(h[n]||0)+1,o(t,c)}function c(e,t,n,r){var i=e._dependentKeys,s,o,l,c,h;if(!i)return;s=f(t,r);for(o=0,l=i.length;o<l;o++)c=i[o],h=a(t,s,c),h[n]=(h[n]||0)-1,u(t,c)}function h(e,t){this.func=e,this._cacheable=t&&t.cacheable!==undefined?t.cacheable:!0,this._dependentKeys=t&&t.dependentKeys,this._readOnly=t&&(t.readOnly!==undefined||!!t.readOnly)}function d(t,n){var r={};for(var i=0;i<n.length;i++)r[n[i]]=e(t,n[i]);return r}function v(e,t){Ember.computed[e]=function(e){var n=r.call(arguments);return Ember.computed(e,function(){return t.apply(this,n)})}}function m(e,t){Ember.computed[e]=function(){var e=r.call(arguments),n=Ember.computed(function(){return t.apply(this,[d(this,e)])});return n.property.apply(n,e)}}var e=Ember.get,t=Ember.set,n=Ember.meta,r=[].slice,i=Ember.create,s=Ember.META_KEY,o=Ember.watch,u=Ember.unwatch;Ember.ComputedProperty=h,h.prototype=new Ember.Descriptor;var p=h.prototype;p.cacheable=function(e){return this._cacheable=e!==!1,this},p.volatile=function(){return this.cacheable(!1)},p.readOnly=function(e){return this._readOnly=e===undefined||!!e,this},p.property=function(){var e=[];for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return this._dependentKeys=e,this},p.meta=function(e){return arguments.length===0?this._meta||{}:(this._meta=e,this)},p.willWatch=function(e,t){var n=e[s];t in n.cache||l(this,e,t,n)},p.didUnwatch=function(e,t){var n=e[s];t in n.cache||c(this,e,t,n)},p.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]||c(this,e,t,r))}},p.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]||l(this,e,t,s)}else r=this.func.call(e,t);return r},p.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,c=o.cache,h,p;if(this._readOnly)throw new Error("Cannot Set: "+t+" on: "+e.toString());this._suspended=e;try{i&&c.hasOwnProperty(t)&&(h=c[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 c[t],i&&(!u&&!f&&l(this,e,t,o),c[t]=p),u&&Ember.propertyDidChange(e,t)}finally{this._suspended=a}return p},p.setup=function(e,t){var r=e[s];r&&r.watching[t]&&l(this,e,t,n(e))},p.teardown=function(e,t){var r=n(e);return(r.watching[t]||t in r.cache)&&c(this,e,t,r),this._cacheable&&delete r.cache[t],null},Ember.computed=function(e){var t;arguments.length>1&&(t=r.call(arguments,0,-1),e=r.call(arguments,-1)[0]);if(typeof e!="function")throw new Error("Computed Property declared without a property function");var n=new h(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]},v("empty",function(t){return Ember.isEmpty(e(this,t))}),v("notEmpty",function(t){return!Ember.isEmpty(e(this,t))}),v("none",function(t){return Ember.isNone(e(this,t))}),v("not",function(t){return!e(this,t)}),v("bool",function(t){return!!e(this,t)}),v("match",function(t,n){var r=e(this,t);return typeof r=="string"?!!r.match(n):!1}),v("equal",function(t,n){return e(this,t)===n}),v("gt",function(t,n){return e(this,t)>n}),v("gte",function(t,n){return e(this,t)>=n}),v("lt",function(t,n){return e(this,t)<n}),v("lte",function(t,n){return e(this,t)<=n}),m("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),m("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),m("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),m("map",function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&(Ember.isNone(e[n])?t.push(null):t.push(e[n]));return t}),Ember.computed.alias=function(n){return Ember.computed(n,function(r,i){return arguments.length>1?(t(this,n,i),i):e(this,n)})},Ember.computed.defaultTo=function(t){return Ember.computed(function(n,r,i){var s;return arguments.length===1?i!=null?i:e(this,t):r!=null?r:e(this,t)})}}(),function(){function r(t){return t+e}function i(e){return e+t}var e=":change",t=":before",n=Ember.guidFor;Ember.addObserver=function(e,t,n,i){return Ember.addListener(e,r(t),n,i),Ember.watch(e,t),this},Ember.observersFor=function(e,t){return Ember.listenersFor(e,r(t))},Ember.removeObserver=function(e,t,n,i){return Ember.unwatch(e,t),Ember.removeListener(e,r(t),n,i),this},Ember.addBeforeObserver=function(e,t,n,r){return Ember.addListener(e,i(t),n,r),Ember.watch(e,t),this},Ember._suspendBeforeObserver=function(e,t,n,r,s){return Ember._suspendListener(e,i(t),n,r,s)},Ember._suspendObserver=function(e,t,n,i,s){return Ember._suspendListener(e,r(t),n,i,s)};var s=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,t,n,r,o){var u=s.call(t,i);return Ember._suspendListeners(e,u,n,r,o)},Ember._suspendObservers=function(e,t,n,i,o){var u=s.call(t,r);return Ember._suspendListeners(e,u,n,i,o)},Ember.beforeObserversFor=function(e,t){return Ember.listenersFor(e,i(t))},Ember.removeBeforeObserver=function(e,t,n,r){return Ember.unwatch(e,t),Ember.removeListener(e,i(t),n,r),this}}(),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 c(){f=null,s(function(){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(c,t-e),l=t)})}function h(e,t){t[this.tguid]&&delete t[this.tguid][this.mguid],a[e]&&n(this.target,this.method,this.args),delete a[e]}function p(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,h,f,u)),f}var e=[].slice,t=Ember.ArrayPolyfills
16
- .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 i(){if(e||t)return n(e,t,r,2)}var r=arguments;return s.begin(),Ember.tryFinally(i,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"],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},Ember.run.cancelTimers=function(){o&&(clearTimeout(o),o=null),f&&(clearTimeout(f),f=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,l;Ember.run.later=function(t,n){var r,i,s,o,u;return arguments.length===2&&"function"==typeof t?(u=n,n=t,t=undefined,r=[t,n]):(r=e.call(arguments),u=r.pop()),i=+(new Date)+u,s={target:t,method:n,expires:i,args:r},o=Ember.guidFor(s),a[o]=s,f&&i<l&&(clearTimeout(f),f=null),f||(f=setTimeout(c,u),l=i),o},Ember.run.once=function(t,n){return p("actions",t,n,e.call(arguments,2))},Ember.run.scheduleOnce=function(t,n,r,i){return p(t,n,r,e.call(arguments,3))},Ember.run.next=function(){var t=e.call(arguments);return t.push(1),s.later.apply(this,t)},Ember.run.cancel=function(e){delete a[e]}}(),function(){function s(t,n){return e(i(n)?Ember.lookup:t,n)}function u(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=/^([A-Z$]|([0-9][A-Z$]))/,i=Ember.isGlobalPath=function(e){return r.test(e)},o=function(e,t){this._direction="fwd",this._from=t,this._to=e,this._directionMap=Ember.Map.create()};o.prototype={copy:function(){var e=new o(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,s(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,i=r.get(t),o=this._from,u=this._to;r.remove(t);if(i==="fwd"){var a=s(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(i==="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)})}}},u(o,{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=o,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 l(e){var t=Ember.meta(e,!0),n=t.mixins;return n?t.hasOwnProperty("mixins")||(n=t.mixins=u(n)):n=t.mixins={},n}function c(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 h(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function d(t,n){var r;return n instanceof e?(r=f(n),t[r]?p:(t[r]=n,n.properties)):n}function v(e,t,n){var r;return r=t.concatenatedProperties||n.concatenatedProperties,e.concatenatedProperties&&(r=r?r.concat(e.concatenatedProperties):e.concatenatedProperties),r}function m(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=u(n),n.func=Ember.wrap(n.func,s.func),n):n}function g(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 y(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 b(e,n,r,s,o,u,a){if(r instanceof Ember.Descriptor){if(r===t&&o[n])return p;r.func&&(r=m(s,n,r,u,o)),o[n]=r,u[n]=undefined}else{if(h(r))r=g(e,n,r,u,o);else if(a&&i.call(a,n)>=0||n==="concatenatedProperties")r=y(e,n,r,u);o[n]=undefined,u[n]=r}}function w(e,t,n,r,i,o){function h(e){delete n[e],delete r[e]}var u,a,f,l,c;for(var m=0,g=e.length;m<g;m++){u=e[m],a=d(t,u);if(a===p)continue;if(a){c=Ember.meta(i),l=v(a,r,i);for(f in a){if(!a.hasOwnProperty(f))continue;o.push(f),b(i,f,a[f],c,n,r,l)}a.hasOwnProperty("toString")&&(i.toString=a.toString)}else u.mixins&&(w(u.mixins,t,n,r,i,o),u._without&&s.call(u._without,h))}}function E(e){var t=Ember.meta(e),n=t.required;if(!n||!t.hasOwnProperty("required"))n=t.required=n?u(n):{};return n}function x(e,t,n,r){if(S.test(t)){var i=r.bindings;i?r.hasOwnProperty("bindings")||(i=r.bindings=u(r.bindings)):i=r.bindings={},i[t]=n}}function T(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 N(e,t){return T(e,t||Ember.meta(e)),e}function C(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 k(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 L(e,t,n){var r=e[t];k(e,t,r,"__ember_observesBefore__","removeBeforeObserver"),k(e,t,r,"__ember_observes__","removeObserver"),k(e,t,n,"__ember_observesBefore__","addBeforeObserver"),k(e,t,n,"__ember_observes__","addObserver")}function A(e,r,i){var s={},o={},u=Ember.meta(e),f,c,h,p=[];w(r,l(e),s,o,e,p);for(var d=0,v=p.length;d<v;d++){f=p[d];if(f==="constructor"||!o.hasOwnProperty(f))continue;h=s[f],c=o[f];if(h===t)continue;while(h&&h instanceof n){var m=C(e,h,u,s,o);h=m.desc,c=m.value}if(h===undefined&&c===undefined)continue;L(e,f,c),x(e,f,c,u),a(e,f,h,c,u)}return i||N(e,u),e}function M(e,t,n){var r=f(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(M(i[s],t,n))return!0;return!1}function _(e,t,n){if(n[f(t)])return;n[f(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){_(e,t,n)})}var e,t,n,r=Ember.ArrayPolyfills.map,i=Ember.ArrayPolyfills.indexOf,s=Ember.ArrayPolyfills.forEach,o=[].slice,u=Ember.create,a=Ember.defineProperty,f=Ember.guidFor,p={},S=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=o.call(arguments,1);return A(e,t,!1),e},Ember.Mixin=function(){return c(this,arguments)},e=Ember.Mixin,e.prototype={properties:null,mixins:null,ownerConstructor:null},e._apply=A,e.applyPartial=function(e){var t=o.call(arguments,1);return A(e,t,!0)},e.finishPartial=N,Ember.anyUnprocessedMixins=!1,e.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return c(new e,arguments)};var O=e.prototype;O.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},O.apply=function(e){return A(e,[this],!1)},O.applyPartial=function(e){return A(e,[this],!0)},O.detect=function(t){if(!t)return!1;if(t instanceof e)return M(t,this,{});var n=Ember.meta(t,!1).mixins;return n?!!n[f(this)]:!1},O.without=function(){var t=new e(this);return t._without=o.call(arguments),t},O.keys=function(){var e={},t={},n=[];_(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 t(n,r,i,s){var o,u,a;if("object"!=typeof n||n===null)return n;if(r&&(u=e(i,n))>=0)return s[u];if(Ember.typeOf(n)==="array"){o=n.slice();if(r){u=o.length;while(--u>=0)o[u]=t(o[u],r,i,s)}}else if(Ember.Copyable&&Ember.Copyable.detect(n))o=n.copy(r,i,s);else{o={};for(a in n){if(!n.hasOwnProperty(a))continue;if(a.substring(0,2)==="__")continue;o[a]=r?t(n[a],r,i,s):n[a]}}return r&&(i.push(n),s.push(o)),o}var e=Ember.EnumerableUtils.indexOf;Ember.compare=function r(e,t){if(e===t)return 0;var n=Ember.typeOf(e),i=Ember.typeOf(t),s=Ember.Comparable;if(s){if(n==="instance"&&s.detect(e.constructor))return e.constructor.compare(e,t);if(i==="instance"&&s.detect(t.constructor))return 1-t.constructor.compare(t,e)}var o=Ember.ORDER_DEFINITION_MAPPING;if(!o){var u=Ember.ORDER_DEFINITION;o=Ember.ORDER_DEFINITION_MAPPING={};var a,f;for(a=0,f=u.length;a<f;++a)o[u[a]]=a;delete Ember.ORDER_DEFINITION}var l=o[n],c=o[i];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=r(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,n){return"object"!=typeof e||e===null?e:Ember.Copyable&&Ember.Copyable.detect(e)?e.copy(n):t(e,n,n?[]:null,n?[]: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 n=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var e=Error.prototype.constructor.apply(this,arguments);for(var t=0;t<n.length;t++)this[n[t]]=e[n[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){Ember.RSVP=t("rsvp")}(),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.hasOwnProperty(n),s;return i?r[n]:(s=Ember.String.decamelize(n).replace(e,"-"),r[n]=s,s)},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=Ember.A([]);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=Ember.A([]);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=Ember.A([]);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=Ember.A([]);return this.forEach(function(t,n){e[n]=t}),e},compact:function(){return this.filter(function(e){return e!=null})},without:function(e){if(!this.contains(e))return this;var t=Ember.A([]);return this.forEach(function(n){n!==e&&(t[t.length]=n)}),t},uniq:function(){var e=Ember.A([]);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,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.sendEvent(this,"@enumerable:change",[this,t,n]),s&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),function(){function i(e){return e===null||e===undefined}var e=Ember.get,t=Ember.set,n=Ember.EnumerableUtils.map,r=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 n(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=Ember.A([]),s=e(this,"length");i(t)&&(t=0);if(i(n)||n>s)n=s;t<0&&(t=s+t),n<0&&(n=s+n);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,i){t===undefined?(t=0,n=i=-1):(n===undefined&&(n=-1),i===undefined&&(i=-1));var s,o;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){s=[],o=t+i;for(var u=t;u<o;u++)s.push(this.objectAt(u))}else s=i;this.enumerableContentDidChange(n,s),Ember.sendEvent(this,"@array:change",[this,t,n,i]);var a=e(this,"length"),f=r(this,"firstObject"),l=r(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;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;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
17
- .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){return Ember.addListener(this,e,t,n),this},one:function(e,t,n){return n||(n=t,t=null),Ember.addListener(this,e,t,n,!0),this},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){return Ember.removeListener(this,e,t,n),this},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;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 b(){var e=!1,t,s,o=function(){e||o.proto(),r(this,i,y),r(this,"_super",y);var a=u(this);a.proto=this;if(t){var l=t;t=null,this.reopen.apply(this,l)}if(s){var c=s;s=null;var h=this.concatenatedProperties;for(var p=0,v=c.length;p<v;p++){var b=c[p];for(var w in b){if(!b.hasOwnProperty(w))continue;var E=b[w],S=Ember.IS_BINDING;if(S.test(w)){var x=a.bindings;x?a.hasOwnProperty("bindings")||(x=a.bindings=n(a.bindings)):x=a.bindings={},x[w]=E}var T=a.descs[w];if(h&&g(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?m?Ember.defineProperty(this,w,null,E):this[w]=E:this.setUnknownProperty(w,E)}}}d(this,a),delete a.proto,f(this),this.init.apply(this,arguments)};return o.toString=h.prototype.toString,o.willReopen=function(){e&&(o.PrototypeMixin=h.create(o.PrototypeMixin)),e=!1},o._initMixins=function(e){t=e},o._initProperties=function(e){s=e},o.proto=function(){var t=o.superclass;return t&&t.proto(),e||(e=!0,o.PrototypeMixin.applyPartial(o.prototype),a(o.prototype)),this.prototype},o}function E(e){return function(){return e}}var e=Ember.set,t=Ember.get,n=Ember.create,r=Ember.platform.defineProperty,i=Ember.GUID_KEY,s=Ember.guidFor,o=Ember.generateGuid,u=Ember.meta,a=Ember.rewatch,f=Ember.finishChains,l=Ember.destroy,c=Ember.run.schedule,h=Ember.Mixin,p=h._apply,d=h.finishPartial,v=h.prototype.reopen,m=Ember.ENV.MANDATORY_SETTER,g=Ember.EnumerableUtils.indexOf,y={configurable:!0,writable:!0,enumerable:!1,value:undefined},w=b();w.toString=function(){return"Ember.CoreObject"},w.PrototypeMixin=h.create({reopen:function(){return p(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,c("destroy",this,this._scheduledDestroy),this},willDestroy:Ember.K,_scheduledDestroy:function(){this.willDestroy&&this.willDestroy(),l(this),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 x(){var e=typeof this.toStringExtension=="function",t=e?":"+this.toStringExtension():"",n="<"+this.constructor.toString()+":"+s(this)+t+">";return this.toString=E(n),n}}),w.PrototypeMixin.ownerConstructor=w,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(w.PrototypeMixin),w.__super__=null;var S=h.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var e=b(),t;return e.ClassMixin=h.create(this.ClassMixin),e.PrototypeMixin=h.create(this.PrototypeMixin),e.ClassMixin.ownerConstructor=e,e.PrototypeMixin.ownerConstructor=e,v.apply(e.PrototypeMixin,arguments),e.superclass=this,e.__super__=this.prototype,t=e.prototype=n(this.prototype),t.constructor=e,o(t,"ember"),u(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(),v.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return v.apply(this.ClassMixin,arguments),p(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=u(this.proto(),!1).descs[e];return t._meta||{}},eachComputedProperty:function(e,t){var n=this.proto(),r=u(n).descs,i={},s;for(var o in r)s=r[o],s instanceof Ember.ComputedProperty&&e.call(t||this,o,s._meta||i)}});S.ownerConstructor=w,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(S),w.ClassMixin=S,S.apply(w),Ember.CoreObject=w}(),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="Index out of range",t=[],n=Ember.get,r=Ember.set;Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(e){return n(this,"arrangedContent").objectAt(e)},replaceContent:function(e,t,r){n(this,"content").replace(e,t,r)},_contentWillChange:Ember.beforeObserver(function(){this._teardownContent()},"content"),_teardownContent:function(){var e=n(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){var e=n(this,"content");this._setupContent()},"content"),_setupContent:function(){var e=n(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(function(){var e=n(this,"arrangedContent"),t=e?n(e,"length"):0;this.arrangedContentArrayWillChange(this,0,t,undefined),this.arrangedContentWillChange(this),this._teardownArrangedContent(e)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var e=n(this,"arrangedContent"),t=e?n(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,undefined,t)},"arrangedContent"),_setupArrangedContent:function(){var e=n(this,"arrangedContent");e&&e.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var e=n(this,"arrangedContent");e&&e.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(e){return n(this,"content")&&this.objectAtContent(e)},length:Ember.computed(function(){var e=n(this,"arrangedContent");return e?n(e,"length"):0}),_replace:function(e,t,r){var i=n(this,"content");return i&&this.replaceContent(e,t,r),this},replace:function(){if(n(this,"arrangedContent")!==n(this,"content"))throw new Ember.Error("Using replace on an arranged ArrayProxy is not allowed.");this._replace.apply(this,arguments)},_insertAt:function(t,r){if(t>n(this,"content.length"))throw new Error(e);return this._replace(t,0,[r]),this},insertAt:function(e,t){if(n(this,"arrangedContent")===n(this,"content"))return this._insertAt(e,t);throw new Ember.Error("Using insertAt on an arranged ArrayProxy is not allowed.")},removeAt:function(r,i){if("number"==typeof r){var s=n(this,"content"),o=n(this,"arrangedContent"),u=[],a;if(r<0||r>=n(this,"length"))throw new Error(e);i===undefined&&(i=1);for(a=r;a<r+i;a++)u.push(s.indexOf(o.objectAt(a)));u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges();for(a=0;a<u.length;a++)this._replace(u[a],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(n(this,"content.length"),e),e},pushObjects:function(e){return this._replace(n(this,"length"),0,e),this},setObjects:function(e){if(e.length===0)return this.clear();var t=n(this,"length");return this._replace(0,t,e),this},unshiftObject:function(e){return this._insertAt(0,e),e},unshiftObjects:function(e){return this._replace(0,0,e),this},slice:function(){var e=this.toArray();return e.slice.apply(e,arguments)},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)}}),Ember.ObjectProxy.reopenClass({create:function(){var e,t,n,r,i,s;if(arguments.length){t=this.proto();for(n=0,r=arguments.length;n<r;n++){i=arguments[n];for(s in i){if(!i.hasOwnProperty(s)||s in t)continue;e||(e={}),e[s]=null}}e&&this._initMixins([e])}return this._super.apply(this,arguments)}})}(),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;o=n>0?t+n:-1,Ember.beginPropertyChanges(this);for(s in i){if(!i.hasOwnProperty(s))continue;o>0&&u(e,s,this,t,o),Ember.propertyWillChange(this,s)}Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(e,t,n,r){var i=this._keys,s,u;u=r>0?t+r:-1,Ember.beginPropertyChanges(this);for(s in i){if(!i.hasOwnProperty(s))continue;u>0&&o(e,s,this,t,u),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.get,t=Ember.set,n=Ember.guidFor,r=Ember.isNone,i=Ember.String.fmt;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 i("Ember.Set<%@>",[n.join(",")])}})}(),function(){var e=Ember.DeferredMixin,t=Ember.get,n=Ember.Object.extend(e);n.reopenClass({promise:function(e,r){var i=n.create();return e.call(r,i),t(i,"promise")}}),Ember.Deferred=n}(),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);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.EnumerableUtils.forEach,r=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,i,s){var o=e(this,"_subControllers"),u=o.slice(t,t+i);n(u,function(e){e&&e.destroy()}),r(o,t,i,new Array(s)),this._super(t,i,s)},init:function(){this.get("content")||Ember.defineProperty(this,"content",undefined,Ember.A()),this._super(),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");n(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(){if(Ember.$){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=this.document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",e.firstChild.innerHTML===""}(),t=this.document&&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||(new XMLSerializer).serializeToString(e),o=i.match(new RegExp("<"+n+"([^>]*)>","i"))[0],u="</"+n+">",a=document.createElement("div");r(a,o+t+u),e=a.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=function(){this.seen={},this.list=[]};n.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,_hasElement:!0,elementClasses:null,classes:null,elementId:null,elementAttributes:null,elementProperties:null,elementTag:null,elementStyle:null,parentBuffer:null,push:function(e){return this.buffer+=e,this},addClass:function(e){return this.elementClasses=this.elementClasses||new n,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){return this.elementStyle=this.elementStyle||{},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._hasElement&&!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+="<"+e,n&&(t+=' id="'+this._escapeAttribute(n)+'"',this.elementId=null),r&&(t+=' class="'+this._escapeAttribute(r.join(" "))+'"',this.classes=null);if(o){t+=' style="';for(a in o)o.hasOwnProperty(a)&&(t+=a+":"+this._escapeAttribute(o[a])+";");t+='"',this.elementStyle=null}if(i){for(u in i)i.hasOwnProperty(u)&&(t+=" "+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+=" "+a+'="'+a+'"':t+=" "+a+'="'+this._escapeAttribute(s[a])+'"'}this.elementProperties=null}t+=">",this.buffer=t},pushClosingTag:function(){var e=this.tagNames.pop();e&&(this.buffer+="</"+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._hasElement&&this._element?this.element().outerHTML||(new XMLSerializer).serializeToString(this.element()):this.innerString()},innerString:function(){return this.buffer},_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,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+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");for(var r in n){if(!n.hasOwnProperty(r))continue;n[r].destroy()}t(this,"_childContainers",{})},"model")})}(),function(){}(),function(){function f(){Ember.run.once(Ember.View,"notifyMutationListeners")}var e={},t=Ember.get,n=Ember.set,r=Ember.guidFor,i=Ember.EnumerableUtils.forEach,s=Ember.EnumerableUtils.addObject,o=Ember.computed(function(){var e=this._childViews,n=Ember.A(),r=this;return i(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.transitionTo("preRender")},parentView:Ember.computed(function(){var e=this
18
- ._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"),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){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)},destroy:function(){var e=this._parentView;if(!this._super())return;return this.removedFromDOM||this.destroyElement(),e&&e.removeChild(this),this.transitionTo("destroying",!1),this},clearRenderedChildren:Ember.K,triggerRecursively:Ember.K,invokeRecursively:Ember.K,transitionTo:Ember.K,destroyElement:Ember.K});var u=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};u.prototype={length:0,trigger:function(e){var t=this.views,n;for(var r=0,i=t.length;r<i;r++)n=t[r],n.trigger&&n.trigger(e)},triggerRecursively:function(e){var t=this.views;for(var n=0,r=t.length;n<r;n++)t[n].triggerRecursively(e)},transitionTo:function(e,t){var n=this.views;for(var r=0,i=n.length;r<i;r++)n[r].transitionTo(e,t)},push:function(){this.length+=arguments.length;var e=this.views;return e.push.apply(e,arguments)},objectAt:function(e){return this.views[e]},forEach:function(){var e=this.views;return e.forEach.apply(e,arguments)},clear:function(){this.length=0,this.views.length=0}};var a=[];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"),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,t){if(!e)return;var n=this.container||Ember.Container&&Ember.Container.defaultContainer;return n&&n.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:o,_childViews:a,_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):{};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,o;i(e,function(e){var i,u=Ember.View._parsePropertyPath(e),a=function(){r=this._classStringForProperty(e),n=this.$(),i&&(n.removeClass(i),t.removeObject(i)),r?(n.addClass(r),i=r):i=null};o=this._classStringForProperty(e),o&&(s(t,o),i=o),this.registerObserver(this,u.path,a),this.one("willClearRender",function(){i&&(t.removeObject(i),i=null)})},this)},_applyAttributeBindings:function(e,n){var r,s,o;i(n,function(n){var i=n.split(":"),o=i[0],u=i[1]||o,a=function(){s=this.$(),r=t(this,o),Ember.View.applyAttributeBindings(s,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,t){var n=t===!1?this._childViews:[this],r,i;while(n.length){r=n.slice(),n=[];for(var s=0,o=r.length;s<o;s++)i=r[s],e.call(i,i),i._childViews&&n.push.apply(n,i._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)}},viewHierarchyCollection:function(){var e,t=new u([this]);for(var n=0;n<t.length;n++)e=t.objectAt(n),e._childViews&&t.push.apply(t,e._childViews);return t},destroyElement:function(){return this.currentState.destroyElement(this)},willDestroyElement:function(){},_notifyWillDestroyElement:function(){var e=this.viewHierarchyCollection();return e.trigger("willClearRender"),e.trigger("willDestroyElement"),e},_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(e){return this.currentState.renderToBufferIfNeeded(this,e)},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:a,attributeBindings:a,init:function(){this.elementId=this.elementId||r(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},destroy:function(){var e=this._childViews,n=this._parentView,r=t(this,"parentView"),i=this.viewName,s,o;if(!this._super())return;s=e.length;for(o=s-1;o>=0;o--)e[o].removedFromDOM=!0;i&&r&&(r[i]=null),s=e.length;for(o=s-1;o>=0;o--)e[o].destroy();return this},createChildView:function(e,r){return e.isView&&e._parentView===this?e:(Ember.CoreView.detect(e)?(r=r||{},r._parentView=this,r.container=this.container,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){var n=this.currentState,r=this.currentState=this.states[e];this.state=e,n&&n.exit&&n.exit(this),r.enter&&r.enter(this),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){!r&&"function"==typeof n&&(r=n,n=null);var i=this,s=function(){i.currentState.invokeObserver(this,r)},o=function(){Ember.run.scheduleOnce("render",this,s)};Ember.addObserver(e,t,n,o),this.one("willClearRender",function(){Ember.removeObserver(e,t,n,o)})}});var l={prepend:function(e,t){e.$().prepend(t),f()},after:function(e,t){e.$().after(t),f()},html:function(e,t){e.$().html(t),f()},replace:function(e){var r=t(e,"element");n(e,"element",null),e._insertElementLater(function(){Ember.$(r).replaceWith(t(e,"element")),f()})},remove:function(e){e.$().remove(),f()},empty:function(e){e.$().empty(),f()}};Ember.View.reopen({domManager:l}),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}});var c=Ember.Object.extend(Ember.Evented).create();Ember.View.addMutationListener=function(e){c.on("change",e)},Ember.View.removeMutationListener=function(e){c.off("change",e)},Ember.View.notifyMutationListeners=function(){c.trigger("change")},Ember.View.views={},Ember.View.childViewsProperty=o,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===undefined&&(n=null),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,invokeObserver:Ember.K}}(),function(){var e=Ember.View.states.preRender=Ember.create(Ember.View.states._default);Ember.merge(e,{insertElement:function(e,t){e.createElement();var n=e.viewHierarchyCollection();n.trigger("willInsertElement"),t.call(e),n.transitionTo("inDOM",!1),n.trigger("didInsertElement")},renderToBufferIfNeeded:function(e,t){return e.renderToBuffer(t),!0},empty:Ember.K,setElement:function(e,t){return t!==null&&e.transitionTo("hasElement"),t}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.View.states.inBuffer=Ember.create(Ember.View.states._default);Ember.merge(n,{$: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,i=e._childViews;return t=e.createChildView(t,n),i.length||(i=e._childViews=i.slice()),i.push(t),t.renderToBuffer(r),e.propertyDidChange("childViews"),t},destroyElement:function(e){e.clearBuffer();var t=e._notifyWillDestroyElement();return t.transitionTo("preRender",!1),e},empty:function(){},renderToBufferIfNeeded:function(e,t){return!1},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},invokeObserver:function(e,t){t.call(e)}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.View.states.hasElement=Ember.create(Ember.View.states._default);Ember.merge(n,{$: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},invokeObserver:function(e,t){t.call(e)}});var r=Ember.View.states.inDOM=Ember.create(n);Ember.merge(r,{enter:function(e){e.isVirtual||(Ember.View.views[e.elementId]=e),e.addBeforeObserver("elementId",function(){throw new Error("Changing a view's elementId after creation is not allowed")})},exit:function(e){this.isVirtual||delete Ember.View.views[e.elementId]},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 view being destroyed",t=Ember.String.fmt,n=Ember.View.states.destroying=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(){return!1},insertElement:Ember.K})}(),function(){Ember.View.cloneStates=function(e){var t={};t._default={},t.preRender=Ember.create(t._default),t.destroying=Ember.create(t._default),t.inBuffer=Ember.create(t._default),t.hasElement=Ember.create(t._default),t.inDOM=Ember.create(t.hasElement);for(var n in e){if(!e.hasOwnProperty(n))continue;Ember.merge(t[n],e[n])}return t}}(),function(){var e=Ember.View.cloneStates(Ember.View.states),t=Ember.get,n=Ember.set,r=Ember.EnumerableUtils.forEach,i=Ember._ViewCollection;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 i=this._childViews;r(e,function(e,r){var s;"string"==typeof e?(s=t(this,e),s=this.createChildView(s),n(this,e,s)):s=this.createChildView(e),i[r]=s},this);var s=t(this,"currentView");s&&(i.length||(i=this._childViews=this._childViews.slice()),i.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);r.length&&!this._childViews.length&&(this._childViews=this._childViews.slice()),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,i,s){r(e,function(e){n(e,"_parentView",i),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){function f(){a.triggerRecursively("willInsertElement"),o?o.domManager.after(o,u.string()):e.domManager.prepend(e,u.string()),u=null,a.forEach(function(e){e.transitionTo("inDOM"),e.propertyDidChange("element"),e.triggerRecursively("didInsertElement")})}var t=e._childViews,n,r,s,o,u,a=new i;for(n=0,r=t.length;n<r;n++)s=t[n],u||(u=Ember.RenderBuffer(),u._hasElement=!1),s.renderToBufferIfNeeded(u)?a.push(s):a.length?(f(),o=s,a.clear()):o=s;a.length&&f()}})}(),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"),destroy:function(){if(!this._super())return;var t=e(this,"content");return t&&t.removeArrayObserver(this),this._createdEmptyView&&this._createdEmptyView.destroy(),this},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),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1));for(u=n+r-1;u>=n;u--)o=s[u],o.destroy()},arrayDidChange:function(n,r,i,s){var o=e(this,"itemViewClass"),u=[],a,f,l,c;"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 h=e(this,"emptyView");if(!h)return;var p=Ember.CoreView.detect(h);h=this.createChildView(h),u.push(h),t(this,"emptyView",h),p&&(this._createdEmptyView=h)}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(){e("metamorph",[],function(){"use strict";var e=function(){},t=0,n=this.document,r=n&&"createRange"in n&&typeof Range!="undefined"&&Range.prototype.createContextualFragment,i=n&&function(){var e=n.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",e.firstChild.innerHTML===""}(),s=n&&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.helper=function(e,t){Ember.View.detect(t)?Ember.Handlebars.registerHelper(e,function(e,n){return Ember.Handlebars.helpers.view.call(this,t,n)}):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},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,i){var s=r.length,o=i.data,u=o.view,a=i.hash,f=a.boundOptions,l,c,h,p,d,v;h=new Ember._SimpleHandlebarsView(null,null,!a.unescaped,o),h.normalizedValue=function(){var u=[],l,c;for(c in f){if(!f.hasOwnProperty(c))continue;d=t(e,f[c],o),h.path=d.path,h.pathRoot=d.root,a[c]=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(h)}for(p=0;p<s;++p)d=r[p],h.path=d.path,h.pathRoot=d.root,u.push(Ember._SimpleHandlebarsView.prototype.normalizedValue.call(h));return u.push(i),n.apply(e,u)},u.appendChild(h),l=[];for(c in f)f.hasOwnProperty(c)&&l.push(t(e,f[c],o));l=l.concat(r);for(p=0,v=l.length;p<v;++p)d=l[p],u.registerObserver(d.root,d.path,h,h.rerender)}function i(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,s){function u(){var n=e.call(arguments,0,-1),u=n.length,a=arguments[arguments.length-1],f=[],l=a.data,c=a.hash,h=l.view,p=a.contexts&&a.contexts[0]||this,d,v,m,g,y;c.boundOptions={};for(y in c){if(!c.hasOwnProperty(y))continue;Ember.IS_BINDING.test(y)&&typeof c[y]=="string"&&(c.boundOptions[y.slice(0,-7)]=c[y])}l.properties=[];for(g=0;g<u;++g)l.properties.push(n[g]),f.push(t(p,n[g],l));if(l.isUnbound)return i(this,s,f,a);if(o.length===0)return r(p,s,f,a);d=f[0],v=d.root,m=d.path;var b=new Ember._SimpleHandlebarsView(m,v,!a.hash.unescaped,a.data);b.normalizedValue=function(){var e=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(b);return s.call(h,e,a)},h.appendChild(b),h.registerObserver(v,m,b,b.rerender);for(var w=0,E=o.length;w<E;w++)h.registerObserver(v,m+"."+o[w],b,b.rerender)}var o=e.call(arguments,2);u._rawFunction=s,Ember.Handlebars.registerHelper(n,u)},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=
19
- [],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(){function i(){Ember.run.once(Ember.View,"notifyMutationListeners")}var e=Ember.set,n=Ember.get,r=t("metamorph"),s={remove:function(e){e.morph.remove(),i()},prepend:function(e,t){e.morph.prepend(t),i()},after:function(e,t){e.morph.after(t),i()},html:function(e,t){e.morph.html(t),i()},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"),i()})},empty:function(e){e.morph.html(""),i()}};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:s}),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"destroying":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(e){e.normalizedValue()!==e._lastNormalizedValue&&e.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: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},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=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){return!Ember.isNone(e)}function f(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 l(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?f.call(n,e,t,!1,a):l.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 f.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 l=Ember.$.expando+Ember.guidFor(s);t.data.keywords[l]=s;var c=r?l+"."+r:l;Ember.bind(t.data.keywords,n,c)}return f.call(this,r,t,!0,a)}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)},o!=="this"&&(!l.isKeyword||l.path!=="")&&n.registerObserver(l.root,l.path,p),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)},v!==""&&v!=="this"&&n.registerObserver(m,v,s),l=h(e,d,u),l&&(a.push(l),r=l)}),a}}(),function(){var e=Ember.get,t=Ember.set,n=Ember.Handlebars;n.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),n.tag&&(i.tagName=n.tag,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.tag,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,r){var i=r.inverse,s=r.data,o=s.view,u=r.fn,a=r.hash,f;"string"==typeof t?f=n.get(e,t,r):f=t;var l=this.propertiesFromHTMLOptions(r,e),c=s.view;l.templateData=r.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)}}),n.registerHelper("view",function(e,t){return e&&e.data&&e.data.isRenderData&&(t=e,e="Ember.View"),n.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.call(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},destroy:function(){if(!this._super())return;var t=e(this,"_arrayController");return t&&t.destroy(),this}});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=t.data.view,r=n.templateForName(e);r(this,{data:t.data})})}(),function(){Ember.Handlebars.registerHelper("partial",function(e,t){var n=e.split("/"),r=n[n.length-1];n[n.length-1]="_"+r;var i=t.data.view,s=n.join("/"),o=i.templateForName(s),u=i.templateForName(e);o=o||u,o(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","name"],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(){function n(t,n,r){var i=e(n,"action"),s=e(n,"onEvent");if(i&&s===t){var o=e(n,"controller"),u=e(n,"value"),a=e(n,"bubbles");o.send(i,u,n),a||r.stopPropagation()}}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","name"],value:"",type:"text",size:null,pattern:null,action:null,onEvent:"enter",bubbles:!1,insertNewline:function(e){n("enter",this,e)},keyPress:function(e){n("keyPress",this,e)}})}(),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","name"],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","name"],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"),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 e(e,t){for(var n in e)t[n]==="ID"&&(e[n+"Binding"]=e[n],delete e[n])}Ember.Handlebars.registerHelper("input",function(t){var n=t.hash,r=t.hashTypes,i=n.type,s=n.on;return delete n.type,delete n.on,e(n,r),i==="checkbox"?Ember.Handlebars.helpers.view.call(this,Ember.Checkbox,t):(n.type=i,n.onEvent=s||"enter",Ember.Handlebars.helpers.view.call(this,Ember.TextField,t))}),Ember.Handlebars.registerHelper("textarea",function(t){var n=t.hash,r=t.hashTypes;return e(n,r),Ember.Handlebars.helpers.view.call(this,Ember.TextArea,t)})}(),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(){e("route-recognizer",[],function(){"use strict";function n(e){this.string=e}function r(e){this.name=e}function i(e){this.name=e}function s(){}function o(e,t,o){e.charAt(0)==="/"&&(e=e.substr(1));var u=e.split("/"),a=[];for(var f=0,l=u.length;f<l;f++){var c=u[f],h;(h=c.match(/^:([^\/]+)$/))?(a.push(new r(h[1])),t.push(h[1]),o.dynamics++):(h=c.match(/^\*([^\/]+)$/))?(a.push(new i(h[1])),t.push(h[1]),o.stars++):c===""?a.push(new s):(a.push(new n(c)),o.statics++)}return a}function u(e){this.charSpec=e,this.nextStates=[]}function a(e){return e.sort(function(e,t){return e.types.stars!==t.types.stars?e.types.stars-t.types.stars:e.types.dynamics!==t.types.dynamics?e.types.dynamics-t.types.dynamics:e.types.statics!==t.types.statics?e.types.statics-t.types.statics:0})}function f(e,t){var n=[];for(var r=0,i=e.length;r<i;r++){var s=e[r];n=n.concat(s.match(t))}return n}function l(e,t){var n=e.handlers,r=e.regex,i=t.match(r),s=1,o=[];for(var u=0,a=n.length;u<a;u++){var f=n[u],l=f.names,c={};for(var h=0,p=l.length;h<p;h++)c[l[h]]=i[s++];o.push({handler:f.handler,params:c,isDynamic:!!l.length})}return o}function c(e,t){return t.eachChar(function(t){var n;e=e.put(t)}),e}function p(e,t,n){this.path=e,this.matcher=t,this.delegate=n}function d(e){this.routes={},this.children={},this.target=e}function v(e,t,n){return function(r,i){var s=e+r;if(!i)return new p(e+r,t,n);i(v(s,t,n))}}function m(e,t,n){var r=0;for(var i=0,s=e.length;i<s;i++)r+=e[i].path.length;t=t.substr(r),e.push({path:t,handler:n})}function g(e,t,n,r){var i=t.routes;for(var s in i)if(i.hasOwnProperty(s)){var o=e.slice();m(o,s,i[s]),t.children[s]?g(o,t.children[s],n,r):n.call(r,o)}}var e=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],t=new RegExp("(\\"+e.join("|\\")+")","g");n.prototype={eachChar:function(e){var t=this.string,n;for(var r=0,i=t.length;r<i;r++)n=t.charAt(r),e({validChars:n})},regex:function(){return this.string.replace(t,"\\$1")},generate:function(){return this.string}},r.prototype={eachChar:function(e){e({invalidChars:"/",repeat:!0})},regex:function(){return"([^/]+)"},generate:function(e){return e[this.name]}},i.prototype={eachChar:function(e){e({invalidChars:"",repeat:!0})},regex:function(){return"(.+)"},generate:function(e){return e[this.name]}},s.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},u.prototype={get:function(e){var t=this.nextStates;for(var n=0,r=t.length;n<r;n++){var i=t[n],s=i.charSpec.validChars===e.validChars;s=s&&i.charSpec.invalidChars===e.invalidChars;if(s)return i}},put:function(e){var t;return(t=this.get(e))?t:(t=new u(e),this.nextStates.push(t),e.repeat&&t.nextStates.push(t),t)},match:function(e){var t=this.nextStates,n,r,i,s=[];for(var o=0,u=t.length;o<u;o++)n=t[o],r=n.charSpec,typeof (i=r.validChars)!="undefined"?i.indexOf(e)!==-1&&s.push(n):typeof (i=r.invalidChars)!="undefined"&&i.indexOf(e)===-1&&s.push(n);return s}};var h=function(){this.rootState=new u,this.names={}};return h.prototype={add:function(e,t){var n=this.rootState,r="^",i={statics:0,dynamics:0,stars:0},u=[],a=[],f,l=!0;for(var h=0,p=e.length;h<p;h++){var d=e[h],v=[],m=o(d.path,v,i);a=a.concat(m);for(var g=0,y=m.length;g<y;g++){var b=m[g];if(b instanceof s)continue;l=!1,n=n.put({validChars:"/"}),r+="/",n=c(n,b),r+=b.regex()}u.push({handler:d.handler,names:v})}l&&(n=n.put({validChars:"/"}),r+="/"),n.handlers=u,n.regex=new RegExp(r+"$"),n.types=i;if(f=t&&t.as)this.names[f]={segments:a,handlers:u}},handlersFor:function(e){var t=this.names[e],n=[];if(!t)throw new Error("There is no route named "+e);for(var r=0,i=t.handlers.length;r<i;r++)n.push(t.handlers[r]);return n},hasRoute:function(e){return!!this.names[e]},generate:function(e,t){var n=this.names[e],r="";if(!n)throw new Error("There is no route named "+e);var i=n.segments;for(var o=0,u=i.length;o<u;o++){var a=i[o];if(a instanceof s)continue;r+="/",r+=a.generate(t)}return r.charAt(0)!=="/"&&(r="/"+r),r},recognize:function(e){var t=[this.rootState],n,r,i=e.length;e.charAt(0)!=="/"&&(e="/"+e),i>1&&e.charAt(i-1)==="/"&&(e=e.substr(0,i-1));for(n=0,r=e.length;n<r;n++){t=f(t,e.charAt(n));if(!t.length)break}var s=[];for(n=0,r=t.length;n<r;n++)t[n].handlers&&s.push(t[n]);t=a(s);var o=s[0];if(o&&o.handlers)return l(o,e)}},p.prototype={to:function(e,t){var n=this.delegate;n&&n.willAddRoute&&(e=n.willAddRoute(this.matcher.target,e)),this.matcher.add(this.path,e);if(t){if(t.length===0)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,e,t,this.delegate)}}},d.prototype={add:function(e,t){this.routes[e]=t},addChild:function(e,t,n,r){var i=new d(t);this.children[e]=i;var s=v(e,i,r);r&&r.contextEntered&&r.contextEntered(t,s),n(s)}},h.prototype.map=function(e,t){var n=new d;e(v("",n,this.delegate)),g([],n,function(e){t?t(this,e):this.add(e)},this)},h})}(),function(){e("router",["route-recognizer"],function(e){"use strict";function t(){this.recognizer=new e}function n(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function r(e,t){return e[e.length-1].name===t}function i(e){if(!e.isLoading){e.isLoading=!0;var t=e.getHandler("loading");t&&(t.enter&&t.enter(),t.setup&&t.setup())}}function s(e){e.isLoading=!1;var t=e.getHandler("loading");t&&t.exit&&t.exit()}function o(e,t){s(e);var n=e.getHandler("failure");n&&n.setup&&n.setup(t)}function u(e,t,n,r){var i=e._paramsForHandler(t,r,!0),s=i.params,o=i.toSetup,u=e.recognizer.generate(t,s);n.call(e,u),f(e,o)}function a(e,t,n,r){function h(i){l.context!==c&&d(l,c);var s=r.concat([{context:i,handler:u.handler,isDynamic:u.isDynamic}]);a(e,t,n+1,s)}if(t.length===n){s(e),f(e,r);return}var u=t[n],l=e.getHandler(u.handler),c=l.deserialize&&l.deserialize(u.params);c&&typeof c.then=="function"?(i(e),c.then(h).then(null,function(t){o(e,t)})):h(c)}function f(e,t){c(e,t);var n=h(e.currentHandlerInfos||[],t);e.currentHandlerInfos=t,l(n.exited,function(e,t){delete e.context,e.exit&&e.exit()}),l(n.updatedContext,function(e,t){d(e,t),e.setup&&e.setup(t)});var r=!1;l(n.entered,function(e,t){if(r)return;e.enter&&e.enter(),d(e,t),e.setup&&!1===e.setup(t)&&(r=!0)}),e.didTransition&&e.didTransition(t)}function l(e,t){for(var n=0,r=e.length;n<r;n++){var i=e[n],s=i.handler,o=i.context;t(s,o)}}function c(e,t){var n;for(var r=0,i=t.length;r<i;r++)n=t[r],n.name=n.handler,n.handler=e.getHandler(n.handler)}function h(e,t){var n={updatedContext:[],exited:[],entered:[]},r,i,s,o;for(s=0,o=t.length;s<o;s++){var u=e[s],a=t[s];if(!u||u.handler!==a.handler)r=!0;if(r)n.entered.push(a),u&&n.exited.unshift(u);else if(i||u.context!==a.context)i=!0,n.updatedContext.push(a)}for(s=t.length,o=e.length;s<o;s++)n.exited.unshift(e[s]);return n}function p(e,t){var n=e.currentHandlerInfos,r=t.shift();if(!n)throw new Error("Could not trigger event '"+r+"'. There are no active handlers");for(var i=n.length-1;i>=0;i--){var s=n[i],o=s.handler;if(o.events&&o.events[r]){o.events[r].apply(o,t);return}}throw new Error("Nothing handled the event '"+r+"'.")}function d(e,t){e.context=t,e.contextDidChange&&e.contextDidChange()}return t.prototype={map:function(e){this.recognizer.delegate=this.delegate,this.recognizer.map(e,function(e,t){var n=t[t.length-1].handler,r=[t,{as:n}];e.add.apply(e,r)})},hasRoute:function(e){return this.recognizer.hasRoute(e)},handleURL:function(e){var t=this.recognizer.recognize(e),n=[];if(!t)throw new Error("No route matched the URL '"+e+"'");a(this,t,0,[])},updateURL:function(){throw"updateURL is not implemented"},replaceURL:function(e){this.updateURL(e)},transitionTo:function(e){var t=Array.prototype.slice.call(arguments,1);u(this,e,this.updateURL,t)},replaceWith:function(e){var t=Array.prototype.slice.call(arguments,1);u(this,e,this.replaceURL,t)},paramsForHandler:function(e,t){var n=this._paramsForHandler(e,[].slice.call(arguments,1));return n.params},generate:function(e){var t=this.paramsForHandler.apply(this,arguments);return this.recognizer.generate(e,t)},_paramsForHandler:function(e,t,r){var i=this.recognizer.handlersFor(e),s={},o=[],u=i.length,a=t.length,f,l,c,h,p,v,m;for(v=i.length-1;v>=0&&a>0;v--)i[v].names.length&&(a--,u=v);if(a>0)throw"More objects were passed than dynamic segments";for(v=0,m=i.length;v<m;v++)c=i[v],h=this.getHandler(c.handler),p=c.names,l=!1,p.length?(v>=u?(f=t.shift(),l=!0):f=h.context,h.serialize&&n(s,h.serialize(f,p))):r&&(v>u||!h.hasOwnProperty("context")?
20
- h.deserialize&&(f=h.deserialize({}),l=!0):f=h.context),r&&l&&d(h,f),o.push({isDynamic:!!c.names.length,handler:c.handler,name:c.name,context:f});return{params:s,toSetup:o}},isActive:function(e){var t=[].slice.call(arguments,1),n=this.currentHandlerInfos,r=!1,i,s,o,u;for(var a=n.length-1;a>=0;a--){o=n[a],o.name===e&&(r=!0);if(r){if(t.length===0)break;if(o.isDynamic){s=t.pop();if(o.context!==s)return!1}}}return t.length===0&&r},trigger:function(e){var t=[].slice.call(arguments);p(this,t)}},t})}(),function(){function e(e){this.parent=e,this.matches=[]}e.prototype={resource:function(t,n,r){arguments.length===2&&typeof n=="function"&&(r=n,n={}),arguments.length===1&&(n={}),typeof n.path!="string"&&(n.path="/"+t);if(r){var i=new e(t);r.call(i),this.push(n.path,t,i.generate())}else this.push(n.path,t)},push:function(e,t,n){var r=t.split(".");if(e===""||e==="/"||r[r.length-1]==="index")this.explicitIndex=!0;this.matches.push([e,t,n])},route:function(e,t){t=t||{},typeof t.path!="string"&&(t.path="/"+e),this.parent&&this.parent!=="application"&&(e=this.parent+"."+e),this.push(t.path,e)},generate:function(){var e=this.matches;return this.explicitIndex||this.route("index",{path:"/"}),function(t){for(var n=0,r=e.length;n<r;n++){var i=e[n];t(i[0]).to(i[1],i[2])}}}},e.map=function(t){var n=new e;return t.call(n),n},Ember.RouterDSL=e}(),function(){Ember.controllerFor=function(e,t,n,r){return e.lookup("controller:"+t,r)||Ember.generateController(e,t,n)},Ember.generateController=function(e,t,n){var r,i,s;return n&&Ember.isArray(n)?(i=e.resolve("controller:array"),r=i.extend({content:n})):n?(i=e.resolve("controller:object"),r=i.extend({content:n})):(i=e.resolve("controller:basic"),r=i.extend()),r.toString=function(){return"(generated "+t+" controller)"},s="controller:"+t,e.register(s,r),e.lookup(s)}}(),function(){function s(e){var t=n(e,"location"),i=n(e,"rootURL");"string"==typeof t&&(t=r(e,"location",Ember.Location.create({implementation:t})),typeof i=="string"&&r(t,"rootURL",i))}function o(e){var t={},n=e.container,r=n.resolve("route:basic");return function(i){var s="route:"+i,o=n.lookup(s);if(t[i])return o;t[i]=!0;if(!o){if(i==="loading")return{};if(i==="failure")return e.constructor.defaultFailureHandler;n.register(s,r.extend()),o=n.lookup(s)}return o.routeName=i,o}}function u(e){var t=[];for(var n=1,r=e.length;n<r;n++){var i=e[n].name,s=i.split(".");t.push(s[s.length-1])}return t.join(".")}function a(e,t,n){var r;t.getHandler=o(e);var i=function(){n.setURL(r)};t.updateURL=function(e){r=e,Ember.run.once(i)};if(n.replaceURL){var s=function(){n.replaceURL(r)};t.replaceURL=function(e){r=e,Ember.run.once(s)}}t.didTransition=function(t){e.didTransition(t)}}function f(e,t,n){var r=n[0],i;e.router.hasRoute(n[0])?i=r:i=n[0]=r+".index",e.router[t].apply(e.router,n),e.notifyPropertyChange("url")}var e=t("router"),n=Ember.get,r=Ember.set,i=Ember._MetamorphView;Ember.Router=Ember.Object.extend({location:"hash",init:function(){this.router=this.constructor.router,this._activeViews={},s(this)},url:Ember.computed(function(){return n(this,"location").getURL()}),startRouting:function(){this.router=this.router||this.constructor.map(Ember.K);var e=this.router,t=n(this,"location"),r=this.container,s=this;a(this,e,t),r.register("view:default",i),r.register("view:toplevel",Ember.View.extend()),t.onUpdateURL(function(e){s.handleURL(e)}),this.handleURL(t.getURL())},didTransition:function(e){for(var t=0,i=e.length;t<i;t++)if(e[t].handler.redirected)return;var s=this.container.lookup("controller:application"),o=u(e);r(s,"currentPath",o),this.notifyPropertyChange("url"),n(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Transitioned into '"+o+"'")},handleURL:function(e){this.router.handleURL(e),this.notifyPropertyChange("url")},transitionTo:function(e){var t=[].slice.call(arguments);f(this,"transitionTo",t)},replaceWith:function(){var e=[].slice.call(arguments);f(this,"replaceWith",e)},generate:function(){var e=this.router.generate.apply(this.router,arguments);return this.location.formatURL(e)},isActive:function(e){var t=this.router;return t.isActive.apply(t,arguments)},send:function(e,t){this.router.trigger.apply(this.router,arguments)},hasRoute:function(e){return this.router.hasRoute(e)},_lookupActiveView:function(e){var t=this._activeViews[e];return t&&t[0]},_connectActiveView:function(e,t){var n=this._activeViews[e];n&&n[0].off("willDestroyElement",this,n[1]);var r=function(){delete this._activeViews[e]};this._activeViews[e]=[t,r],t.one("willDestroyElement",this,r)}}),Ember.Router.reopenClass({defaultFailureHandler:{setup:function(e){Ember.Logger.error("Error while loading route:",e),setTimeout(function(){throw e})}}}),Ember.Router.reopenClass({map:function(t){var n=this.router=new e,r=Ember.RouterDSL.map(function(){this.resource("application",{path:"/"},function(){t.call(this)})});return n.map(r.generate()),n}})}(),function(){function r(e){var t=e.router.router.currentHandlerInfos,n,r;for(var i=0,s=t.length;i<s;i++){r=t[i].handler;if(r===e)return n;n=r}}function i(e,t){var n=r(e),s;if(!n)return;return(s=n.lastRenderedTemplate)?s:i(n,!0)}function s(e,t,n,r){r=r||{},r.into=r.into?r.into.replace(/\//g,"."):i(e),r.outlet=r.outlet||"main",r.name=t,r.template=n;var s=r.controller,o;return r.controller?s=r.controller:(o=e.container.lookup("controller:"+t))?s=o:s=e.routeName,typeof s=="string"&&(s=e.container.lookup("controller:"+s)),r.controller=s,r}function o(n,r,i){var s=i.into?"view:default":"view:toplevel";return n=n||r.lookup(s),e(n,"templateName")||(t(n,"template",i.template),t(n,"_debugTemplateName",i.name)),t(n,"renderedName",i.name),t(n,"controller",i.controller),n}function u(t,n,r){if(r.into){var i=t.router._lookupActiveView(r.into);t.teardownView=f(i,r.outlet),i.connectOutlet(r.outlet,n)}else{var s=e(t,"router.namespace.rootElement");t.teardownView&&t.teardownView(),t.router._connectActiveView(r.name,n),t.teardownView=a(n),n.appendTo(s)}}function a(e){return function(){e.destroy()}}function f(e,t){return function(){e.disconnectOutlet(t)}}function l(e){e.teardownView&&e.teardownView(),delete e.teardownView,delete e.lastRenderedTemplate}var e=Ember.get,t=Ember.set,n=Ember.String.classify;Ember.Route=Ember.Object.extend({exit:function(){this.deactivate(),l(this)},enter:function(){this.activate()},events:null,deactivate:Ember.K,activate:Ember.K,transitionTo:function(){return this._checkingRedirect&&(this.redirected=!0),this.router.transitionTo.apply(this.router,arguments)},replaceWith:function(){return this._checkingRedirect&&(this.redirected=!0),this.router.replaceWith.apply(this.router,arguments)},send:function(){return this.router.send.apply(this.router,arguments)},setup:function(e){this.redirected=!1,this._checkingRedirect=!0,e===undefined?this.redirect():this.redirect(e),this._checkingRedirect=!1;if(this.redirected)return!1;var n=this.controllerFor(this.routeName,e);n&&(this.controller=n,t(n,"model",e)),this.setupControllers?this.setupControllers(n,e):this.setupController(n,e),this.renderTemplates?this.renderTemplates(e):this.renderTemplate(n,e)},redirect:Ember.K,deserialize:function(e){var t=this.model(e);return this.currentModel=t},contextDidChange:function(){this.currentModel=this.context},model:function(e){var t,r,i,s;for(var o in e){if(t=o.match(/^(.*)_id$/))r=t[1],s=e[o];i=!0}if(!r&&i)return e;if(!r)return;var u=n(r),a=this.router.namespace,f=a[u];return f.find(s)},serialize:function(t,n){if(n.length!==1)return;var r=n[0],i={};return/_id$/.test(r)?i[r]=e(t,"id"):i[r]=t,i},setupController:Ember.K,controllerFor:function(e,t){var n=this.router.container,r=n.lookup("controller:"+e);return r||(t=t||this.modelFor(e),r=Ember.generateController(n,e,t)),r},modelFor:function(e){var t=this.container.lookup("route:"+e);return t&&t.currentModel},renderTemplate:function(e,t){this.render()},render:function(e,t){typeof e=="object"&&!t&&(t=e,e=this.routeName),e=e?e.replace(/\//g,"."):this.routeName;var n=this.container,r=n.lookup("view:"+e),i=n.lookup("template:"+e);if(!r&&!i)return;t=s(this,e,i,t),r=o(r,n,t),t.outlet==="main"&&(this.lastRenderedTemplate=e),u(this,r,t)},willDestroy:function(){l(this)}})}(),function(){}(),function(){Ember.onLoad("Ember.Handlebars",function(){function r(r,i,s){function u(e,t){return i[t]==="controller"?e:Ember.ControllerMixin.detect(e)?u(n(e,"model")):e}var o=e(r,i,s);return t.call(o,u)}var e=Ember.Handlebars.resolveParams,t=Ember.ArrayPolyfills.map,n=Ember.get;Ember.Router.resolveParams=r})}(),function(){var e=Ember.get,t=Ember.set;Ember.onLoad("Ember.Handlebars",function(t){function i(e,t){return e.hasRoute(t)||(t+=".index"),t}function s(e){var t=e.options.types.slice(1),r=e.options.data;return n(e.context,e.params,{types:t,data:r})}function o(e,t,n){var r=n||e.namedRoute,o;o=i(t,r);var u=[o];return u.concat(s(e.parameters))}var n=Ember.Router.resolveParams,r=Ember.ViewUtils.isSimpleClick,u=Ember.LinkView=Ember.View.extend({tagName:"a",namedRoute:null,currentWhen:null,title:null,activeClass:"active",replace:!1,attributeBindings:["href","title"],classNameBindings:"active",concreteView:Ember.computed(function(){return e(this,"parentView")}).property("parentView"),active:Ember.computed(function(){var t=this.get("router"),n=s(this.parameters),r=this.currentWhen+".index",i=t.isActive.apply(t,[this.currentWhen].concat(n))||t.isActive.apply(t,[r].concat(n));if(i)return e(this,"activeClass")}).property("namedRoute","router.url"),router:Ember.computed(function(){return this.get("controller").container.lookup("router:main")}),click:function(e){if(!r(e))return!0;e.preventDefault(),this.bubbles===!1&&e.stopPropagation();var t=this.get("router");this.get("replace")?t.replaceWith.apply(t,o(this,t)):t.transitionTo.apply(t,o(this,t))},href:Ember.computed(function(){var e=this.get("router");return e.generate.apply(e,o(this,e))})});u.toString=function(){return"LinkView"},Ember.Handlebars.registerHelper("linkTo",function(e){var t=[].slice.call(arguments,-1)[0],n=[].slice.call(arguments,1,-1),r=t.hash;return r.namedRoute=e,r.currentWhen=r.currentWhen||e,r.parameters={context:this,options:t,params:n},Ember.Handlebars.helpers.view.call(this,u,t)})})}(),function(){var e=Ember.get,t=Ember.set;Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,n){var r;t&&t.data&&t.data.isRenderData&&(n=t,t="main"),r=n.data.view;while(!r.get("template.isTop"))r=r.get("_parentView");return n.data.view.set("outletSource",r),n.hash.currentViewBinding="_view.outletSource._outlets."+t,e.helpers.view.call(this,e.OutletView,n)})})}(),function(){var e=Ember.get,t=Ember.set;Ember.onLoad("Ember.Handlebars",function(e){Ember.Handlebars.registerHelper("render",function(e,t,n){var r,i,s,o,u,a;arguments.length===2&&(n=t,t=undefined),typeof t=="string"&&(u=Ember.Handlebars.get(n.contexts[1],t,n),a={singleton:!1}),e=e.replace(/\//g,"."),r=n.data.keywords.controller.container,i=r.lookup("router:main"),o=r.lookup("view:"+e)||r.lookup("view:default"),(s=n.hash.controller)?s=r.lookup("controller:"+s,a):s=Ember.controllerFor(r,e,u,a),s&&u&&s.set("model",u);var f=n.contexts[1];f&&o.registerObserver(f,t,function(){s.set("model",Ember.Handlebars.get(f,t,n))}),s.set("target",n.data.keywords.controller),n.hash.viewName=Ember.String.camelize(e),n.hash.template=r.lookup("template:"+e),n.hash.controller=s,i&&!u&&i._connectActiveView(e,o),Ember.Handlebars.helpers.view.call(this,o,n)})})}(),function(){Ember.onLoad("Ember.Handlebars",function(e){function a(e,n){var r=[];n&&r.push(n);var i=e.options.types.slice(1),s=e.options.data;return r.concat(t(e.context,e.params,{types:i,data:s}))}var t=Ember.Router.resolveParams,n=Ember.ViewUtils.isSimpleClick,r=Ember.Handlebars,i=r.get,s=r.SafeString,o=Ember.get,u=Array.prototype.slice,f=r.ActionHelper={registeredActions:{}},l=["alt","shift","meta","ctrl"],c=function(e,t){if(typeof t=="undefined")return n(e);var r=!0;return l.forEach(function(n){e[n+"Key"]&&t.indexOf(n)===-1&&(r=!1)}),r};f.registerAction=function(e,t,n){var r=(++Ember.uuid).toString();return f.registeredActions[r]={eventName:t.eventName,handler:function(r){if(!c(r,n))return!0;r.preventDefault(),t.bubbles===!1&&r.stopPropagation();var s=t.target;s.target?s=i(s.root,s.target,s.options):s=s.root,Ember.run(function(){s.send?s.send.apply(s,a(t.parameters,e)):s[e].apply(s,a(t.parameters))})}},t.view.on("willClearRender",function(){delete f.registeredActions[r]}),r},r.registerHelper("action",function(e){var t=arguments[arguments.length-1],n=u.call(arguments,1,-1),r=t.hash,i,o={eventName:r.on||"click"};o.parameters={context:this,options:t,params:n},o.view=t.data.view;var a,l;if(r.target)a=this,l=r.target;else if(i=t.data.keywords.controller)a=i;o.target={root:a,target:l,options:t},o.bubbles=r.bubbles;var c=f.registerAction(e,o,r.allowedKeys);return new s('data-ember-action="'+c+'"')})})}(),function(){if(Ember.ENV.EXPERIMENTAL_CONTROL_HELPER){var e=Ember.get,t=Ember.set;Ember.Handlebars.registerHelper("control",function(n,r,i){function m(){var e=Ember.Handlebars.get(this,r,i);t(d,"model",e),p.rerender()}arguments.length===2&&(i=r,r=undefined);var s;r&&(s=Ember.Handlebars.get(this,r,i));var o=i.data.keywords.controller,u=i.data.keywords.view,a=e(o,"_childContainers"),f=i.hash.controlID,l,c;a.hasOwnProperty(f)?c=a[f]:(l=e(o,"container"),c=l.child(),a[f]=c);var h=n.replace(/\//g,"."),p=c.lookup("view:"+h)||c.lookup("view:default"),d=c.lookup("controller:"+h),v=c.lookup("template:"+n);t(d,"target",o),t(d,"model",s),i.hash.template=v,i.hash.controller=d,Ember.addObserver(this,r,m),p.one("willDestroyElement",this,function(){Ember.removeObserver(this,r,m)}),Ember.Handlebars.helpers.view.call(this,p,i)})}}(),function(){}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({transitionToRoute:function(){var t=e(this,"target"),n=t.transitionToRoute||t.transitionTo;return n.apply(t,arguments)},transitionTo:function(){return this.transitionToRoute.apply(this,arguments)},replaceRoute:function(){var t=e(this,"target"),n=t.replaceRoute||t.replaceWith;return n.apply(t,arguments)},replaceWith:function(){return this.replaceRoute.apply(this,arguments)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.View.reopen({init:function(){t(this,"_outlets",{}),this._super()},connectOutlet:function(n,r){var i=e(this,"_outlets"),s=e(this,"container"),o=s&&s.lookup("router:main"),u=e(r,"renderedName");t(i,n,r),o&&u&&o._connectActiveView(u,r)},disconnectOutlet:function(n){var r=e(this,"_outlets");t(r,n,null)}})}(),function(){}(),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){this.updateCallback=e},handleURL:function(e){t(this,"path",e),this.updateCallback(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(){Ember.run(function(){var i=location.hash.substr(1);if(e(r,"lastSetURL")===i)return;t(r,"lastSetURL",null),n(i)})})},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._initialUrl=this.getURL(),this.initState()},initState:function(){this.replaceState(this.formatURL(this.getURL())),t(this,"history",window.history)},rootURL:"/",getURL:function(){var t=e(this,"rootURL"),n=e(this,"location").pathname;return t=t.replace(/\/$/,""),n=n.replace(t,""),n},setURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&this.pushState(e)},replaceURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&this.replaceState(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),r=this;Ember.$(window).bind("popstate.ember-location-"+t,function(t){if(!n){n=!0;if(r.formatURL(r.getURL())===r._initialUrl)return}e(r.getURL())})},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(){}(),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.String.classify,n=Ember.String.capitalize,r=Ember.String.decamelize;Ember.DefaultResolver=Ember.Object.extend({namespace:null,resolve:function(e){var t=this.parseName(e),n=this[t.resolveMethodName];if(n){var r=n.call(this,t);if(r)return r}return this.resolveOther(t)},parseName:function(r){var i=r.split(":"),s=i[0],o=i[1],u=o,a=e(this,"namespace"),f=a;if(s!=="template"&&u.indexOf("/")!==-1){var l=u.split("/");u=l[l.length-1];var c=n(l.slice(0,-1).join("."));f=Ember.Namespace.byName(c)}return{fullName:r,type:s,fullNameWithoutType:o,name:u,root:f,resolveMethodName:"resolve"+t(s)}},resolveTemplate:function(e){var t=e.fullNameWithoutType.replace(/\./g,"/");if(Ember.TEMPLATES[t])return Ember.TEMPLATES[t];t=r(t);if(Ember.TEMPLATES[t])return Ember.TEMPLATES[t]},useRouterNaming:function(e){e.name=e.name.replace(/\./g,"_"),e.name==="basic"&&(e.name="")},resolveController:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveRoute:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveView:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveOther:function(n){var r=t(n.name)+t(n.type),i=e(n.root,r);if(i)return i}})}(),function(){function r(e){var t=e.get("resolver")||Ember.DefaultResolver,n=t.create({namespace:e});return function(e){return n.resolve(e)}}function i(e){var t=e.split(":"),n=t[0],r=t[1];if(n!=="template"){var i=r;return i.indexOf(".")>-1&&(i=i.replace(/\.(.)/g,function(e){return e.charAt(1).toUpperCase()})),r.indexOf("_")>-1&&(i=i.replace(/_(.)/g,function(e){return e.charAt(1).toUpperCase()})),n+":"+i}return e}var e=Ember.get,t=Ember.set,n=Ember.Application=Ember.Namespace.extend(Ember.DeferredMixin,{rootElement:"body",eventDispatcher:null,customEvents:null,_readinessDeferrals:1,init:function(){this.$||(this.$=Ember.$),this.__container__=this.buildContainer(),this.Router=this.Router||this.defaultRouter(),this.Router&&(this.Router.namespace=this),this._super(),this.scheduleInitialize(),Ember.LOG_VERSION&&(Ember.LOG_VERSION=!1)},buildContainer:function(){var e=this.__container__=n.buildContainer(this);return e},defaultRouter:function(){if(this.router===undefined)return Ember.Router.extend()},scheduleInitialize:function(){var e=this;!this.$||this.$.isReady?Ember.run.schedule("actions",e,"_initialize"):this.$().ready(function(){Ember.run(e,"_initialize")})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,this._readinessDeferrals===0&&Ember.run.once(this,this.didBecomeReady)},register:function(){var e=this.__container__;e.register.apply(e,arguments)},inject:function(){var e=this.__container__;e.injection.apply(e,arguments)},initialize:function(){},_initialize:function(){if(this.isDestroyed)return;return this.register("router:main",this.Router),this.runInitializers(),Ember.runLoadHooks("application",this),this.advanceReadiness(),this},reset:function(){e(this,"__container__").destroy(),this.buildContainer(),Ember.run.schedule("actions",this,function(){this._initialize(),this.startRouting()})},runInitializers:function(){var t=e(this.constructor,"initializers"),n=this.__container__,r=new Ember.DAG,i=this,s,o;for(s=0;s<t.length;s++)o=t[s],r.addEdges(o.name,o.initialize,o.before,o.after);r.topsort(function(e){var t=e.value;t(n,i)})},didBecomeReady:function(){this.setupEventDispatcher(),this.ready(),this.startRouting(),Ember.testing||(Ember.Namespace.processAll(),Ember.BOOTED=!0),this.resolve(this)},setupEventDispatcher:function(){var t=this.createEventDispatcher(),n=e(this,"customEvents");t.setup(n)},createEventDispatcher:function(){var n=e(this,"rootElement"),r=Ember.EventDispatcher.create({rootElement:n});return t(this,"eventDispatcher",r),r},startRouting:function(){var e=this.__container__.lookup("router:main");if(!e)return;e.startRouting()},handleURL:function(e){var t=this.__container__.lookup("router:main");t.handleURL(e)},ready:Ember.K,resolver:null,willDestroy:function(){Ember.BOOTED=!1;var t=e(this,"eventDispatcher");t&&t.destroy(),e(this,"__container__").destroy()},initializer:function(e){this.constructor.initializer(e)}});Ember.Application.reopenClass({concatenatedProperties:["initializers"],initializers:Ember.A(),initializer:function(t){var n=e(this,"initializers");n.push(t)},buildContainer:function(e){var t=new Ember.Container;return Ember.Container.defaultContainer=Ember.Container.defaultContainer||t,t.set=Ember.set,t.normalize=i,t.resolver=r(e),t.optionsForType("view",{singleton:!1}),t.optionsForType("template",{instantiate:!1}),t.register("application:main",e,{instantiate:!1}),t.register("controller:basic",Ember.Controller,{instantiate:!1}),t.register("controller:object",Ember.ObjectController,{instantiate:!1}),t.register("controller:array",Ember.ArrayController,{instantiate:!1}),t.register("route:basic",Ember.Route,{instantiate:!1}),t.injection("router:main","namespace","application:main"),t.typeInjection("controller","target","router:main"),t.typeInjection("controller","namespace","application:main"),t.typeInjection("route","router","router:main"),t}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){}(),function(){function r(t){var n=e(t,"needs"),r=e(t,"container"),i,s=!0;for(var o=0,u=n.length;o<u;o++)i=n[o],i.indexOf(":")===-1&&(i="controller:"+i),r.has(i)||(s=!1);return s}var e=Ember.get,t=Ember.set,n=Ember.Object.extend({controller:null,unknownProperty:function(t){var n=e(this,"controller"),r=e(n,"needs"),i=n.get("container"),s;for(var o=0,u=r.length;o<u;o++){s=r[o];if(s===t)return i.lookup("controller:"+t)}}});Ember.ControllerMixin.reopen({concatenatedProperties:["needs"],needs:[],init:function(){this._super.apply(this,arguments),!r(this)},controllerFor:function(t){var n=e(this,"container");return n.lookup("controller:"+t)},controllers:Ember.computed(function(){return n.create({controller:this})})})}(),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");t(this,"childStates",Ember.A()),t(this,"eventTransitions",e(this,"eventTransitions")||{});var r,i,s;if(!n){n={};for(r in this){if(r==="constructor")continue;if(i=this[r]){if(s=i.transitionTarget)this.eventTransitions[r]=s;this.setupChild(n,r,i)}}t(this,"states",n)}else for(r in n)this.setupChild(n,r,n[r]);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=Ember.$&&Ember.$.Event;n&&i&&n instanceof i?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(){}()})(),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.");
15
+ (function(){var e,t;(function(){var r={},n={};e=function(e,t,n){r[e]={deps:t,callback:n}},t=function(e){if(n[e])return n[e];n[e]={};for(var i,o=r[e],s=o.deps,a=o.callback,u=[],c=0,l=s.length;l>c;c++)"exports"===s[c]?u.push(i={}):u.push(t(s[c]));var h=a.apply(this,u);return n[e]=i||h}})(),function(){function e(e){return t.console&&t.console[e]?t.console[e].apply?function(){t.console[e].apply(t.console,arguments)}:function(){var r=Array.prototype.join.call(arguments,", ");t.console[e](r)}:void 0}"undefined"==typeof Ember&&(Ember={});var t=Ember.imports=Ember.imports||this,r=Ember.exports=Ember.exports||this;Ember.lookup=Ember.lookup||this,r.Em=r.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.0.0-rc.3",Ember.ENV=Ember.ENV||("undefined"==typeof ENV?{}:ENV),Ember.config=Ember.config||{},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,"undefined"==typeof Ember.EXTEND_PROTOTYPES&&(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.LOG_VERSION=Ember.ENV.LOG_VERSION===!1?!1:!0,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:e("log")||Ember.K,warn:e("warn")||Ember.K,error:e("error")||Ember.K,info:e("info")||Ember.K,debug:e("debug")||e("info")||Ember.K},Ember.onerror=null,Ember.handleErrors=function(e,t){if("function"!=typeof Ember.onerror)return e.call(t||this);try{return e.call(t||this)}catch(r){Ember.onerror(r)}},Ember.merge=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},Ember.isNone=function(e){return null===e||void 0===e},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return Ember.isNone(e)||0===e.length&&"function"!=typeof e||"object"==typeof e&&0===Ember.get(e,"length")},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty)}(),function(){var e=Ember.platform={};if(Ember.create=Object.create,Ember.create&&2!==Ember.create({a:1},{a:{value:2}}).a&&(Ember.create=null),!Ember.create||Ember.ENV.STUB_OBJECT_CREATE){var t=function(){};Ember.create=function(e,r){if(t.prototype=e,e=new t,r){t.prototype=e;for(var n in r)t.prototype[n]=r[n].value;e=new t}return t.prototype=null,e},Ember.create.isSimulated=!0}var r,n,i=Object.defineProperty;if(i)try{i({},"a",{get:function(){}})}catch(o){i=null}i&&(r=function(){var e={};return i(e,"a",{configurable:!0,enumerable:!0,get:function(){},set:function(){}}),i(e,"a",{configurable:!0,enumerable:!0,writable:!0,value:!0}),e.a===!0}(),n=function(){try{return i(document.createElement("div"),"definePropertyOnDOM",{}),!0}catch(e){}return!1}(),r?n||(i=function(e,t,r){var n;return n="object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName,n?e[t]=r.value:Object.defineProperty(e,t,r)}):i=null),e.defineProperty=i,e.hasPropertyAccessors=!0,e.defineProperty||(e.hasPropertyAccessors=!1,e.defineProperty=function(e,t,r){r.get||(e[t]=r.value)},e.defineProperty.isSimulated=!0),Ember.ENV.MANDATORY_SETTER&&!e.hasPropertyAccessors&&(Ember.ENV.MANDATORY_SETTER=!1)}(),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(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=new Array(r),i=arguments[1],o=0;r>o;o++)o in t&&(n[o]=e.call(i,t[o],o,t));return n},r=e(Array.prototype.forEach)?Array.prototype.forEach:function(e){if(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=arguments[1],i=0;r>i;i++)i in t&&e.call(n,t[i],i,t)},n=e(Array.prototype.indexOf)?Array.prototype.indexOf:function(e,t){null===t||void 0===t?t=0:0>t&&(t=Math.max(0,this.length+t));for(var r=t,n=this.length;n>r;r++)if(this[r]===e)return r;return-1};Ember.ArrayPolyfills={map:t,forEach:r,indexOf:n},Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=t),Array.prototype.forEach||(Array.prototype.forEach=r),Array.prototype.indexOf||(Array.prototype.indexOf=n))}(),function(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}var r=Ember.platform.defineProperty,n=Ember.create,i="__ember"+ +new Date,o=0,s=[],a={},u=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=i;var c={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(e,t){t||(t="ember");var n=t+o++;return e&&(c.value=n,r(e,i,c)),n},Ember.guidFor=function(e){if(void 0===e)return"(undefined)";if(null===e)return"(null)";var t,n=typeof e;switch(n){case"number":return t=s[e],t||(t=s[e]="nu"+e),t;case"string":return t=a[e],t||(t=a[e]="st"+o++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+o++,c.value=t,r(e,i,c),t)}};var l={writable:!0,configurable:!1,enumerable:!1,value:null},h=Ember.GUID_KEY+"_meta";Ember.META_KEY=h;var m={descs:{},watching:{}};u&&(m.values={}),Ember.EMPTY_META=m,Object.freeze&&Object.freeze(m);var f=Ember.platform.defineProperty.isSimulated;f&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){}),Ember.meta=function(t,i){var o=t[h];return i===!1?o||m:(o?o.source!==t&&(f||r(t,h,l),o=n(o),o.descs=n(o.descs),o.watching=n(o.watching),o.cache={},o.source=t,u&&(o.values=n(o.values)),t[h]=o):(f||r(t,h,l),o=new e(t),u&&(o.values={}),t[h]=o,o.descs.constructor=null),o)},Ember.getMeta=function(e,t){var r=Ember.meta(e,!1);return r[t]},Ember.setMeta=function(e,t,r){var n=Ember.meta(e,!0);return n[t]=r,r},Ember.metaPath=function(e,t,r){for(var i,o,s=Ember.meta(e,r),a=0,u=t.length;u>a;a++){if(i=t[a],o=s[i]){if(o.__ember_source__!==e){if(!r)return void 0;o=s[i]=n(o),o.__ember_source__=e}}else{if(!r)return void 0;o=s[i]={__ember_source__:e}}s=o}return o},Ember.wrap=function(e,t){function r(){}function n(){var n,i=this._super;return this._super=t||r,n=e.apply(this,arguments),this._super=i,n}return n.wrappedFunction=e,n.__ember_observes__=e.__ember_observes__,n.__ember_observesBefore__=e.__ember_observesBefore__,n},Ember.isArray=function(e){return!e||e.setInterval?!1:Array.isArray&&Array.isArray(e)?!0:Ember.Array&&Ember.Array.detect(e)?!0:void 0!==e.length&&"object"==typeof e?!0:!1},Ember.makeArray=function(e){return null===e||void 0===e?[]:Ember.isArray(e)?e:[e]},Ember.canInvoke=t,Ember.tryInvoke=function(e,r,n){return t(e,r)?e[r].apply(e,n||[]):void 0};var p=function(){var e=0;try{try{}finally{throw e++,new Error("needsFinallyFixTest")}}catch(t){}return 1!==e}();Ember.tryFinally=p?function(e,t,r){var n,i,o;r=r||this;try{n=e.call(r)}finally{try{i=t.call(r)}catch(s){o=s}}if(o)throw o;return void 0===i?n:i}:function(e,t,r){var n,i;r=r||this;try{n=e.call(r)}finally{i=t.call(r)}return void 0===i?n:i},Ember.tryCatchFinally=p?function(e,t,r,n){var i,o,s;n=n||this;try{i=e.call(n)}catch(a){i=t.call(n,a)}finally{try{o=r.call(n)}catch(u){s=u}}if(s)throw s;return void 0===o?i:o}:function(e,t,r,n){var i,o;n=n||this;try{i=e.call(n)}catch(s){i=t.call(n,s)}finally{o=r.call(n)}return void 0===o?i:o};var d={},b="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(b,function(e){d["[object "+e+"]"]=e.toLowerCase()});var E=Object.prototype.toString;Ember.typeOf=function(e){var t;return t=null===e||void 0===e?String(e):d[E.call(e)]||"object","function"===t?Ember.Object&&Ember.Object.detect(e)&&(t="class"):"object"===t&&(t=e instanceof Error?"error":Ember.Object&&e instanceof Ember.Object?"instance":"object"),t}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],o=0,s=e.length;s>o;o++)n=e[o],n.regex.test(r)&&i.push(n.object);return t[r]=i,i},n=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,o,s){function a(){for(p=0,d=m.length;d>p;p++)f=m[p],b[p]=f.before(e,n(),i);return o.call(s)}function u(e){i=i||{},i.exception=e}function c(){for(p=0,d=m.length;d>p;p++)f=m[p],f.after(e,n(),i,b[p]);Ember.STRUCTURED_PROFILE&&console.timeEnd(l)}var l,h,m=t[e];if(Ember.STRUCTURED_PROFILE&&(l=e+": "+i.object,console.time(l)),m||(m=r(e)),0===m.length)return h=o.call(s),Ember.STRUCTURED_PROFILE&&console.timeEnd(l),h;var f,p,d,b=[];return Ember.tryCatchFinally(a,u,c)},Ember.Instrumentation.subscribe=function(r,n){for(var i,o=r.split("."),s=[],a=0,u=o.length;u>a;a++)i=o[a],"*"===i?s.push("[^\\.]*"):s.push(i);s=s.join("\\."),s+="(\\..*)?";var c={pattern:r,regex:new RegExp("^"+s+"$"),object:n};return e.push(c),t={},c},Ember.Instrumentation.unsubscribe=function(r){for(var n,i=0,o=e.length;o>i;i++)e[i]===r&&(n=i);e.splice(n,1),t={}},Ember.Instrumentation.reset=function(){e=[],t={}},Ember.instrument=Ember.Instrumentation.instrument,Ember.subscribe=Ember.Instrumentation.subscribe}(),function(){var e,t,r,n;n=Array.prototype.concat,e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf;var i=Ember.EnumerableUtils={map:function(t,r,n){return t.map?t.map.call(t,r,n):e.call(t,r,n)},forEach:function(e,r,n){return e.forEach?e.forEach.call(e,r,n):t.call(e,r,n)},indexOf:function(e,t,n){return e.indexOf?e.indexOf.call(e,t,n):r.call(e,t,n)},indexesOf:function(e,t){return void 0===t?[]:i.map(t,function(t){return i.indexOf(e,t)})},addObject:function(e,t){var r=i.indexOf(e,t);-1===r&&e.push(t)},removeObject:function(e,t){var r=i.indexOf(e,t);-1!==r&&e.splice(r,1)},replace:function(e,t,r,i){if(e.replace)return e.replace(t,r,i);var o=n.apply([t,r],i);return e.splice.apply(e,o)},intersection:function(e,t){var r=[];return i.forEach(e,function(e){i.indexOf(t,e)>=0&&r.push(e)}),r}}}(),function(){var e=Ember.guidFor,t=Ember.ArrayPolyfills.indexOf,r=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},n=function(e,t){var n=e.keys.copy(),i=r(e.values);return t.keys=n,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 r=e(t),n=this.presenceSet,i=this.list;r in n||(n[r]=!0,i.push(t))},remove:function(r){var n=e(r),i=this.presenceSet,o=this.list;delete i[n];var s=t.call(o,r);s>-1&&o.splice(s,1)},isEmpty:function(){return 0===this.list.length},has:function(t){var r=e(t),n=this.presenceSet;return r in n},forEach:function(e,t){for(var r=this.toArray(),n=0,i=r.length;i>n;n++)e.call(t,r[n])},toArray:function(){return this.list.slice()},copy:function(){var e=new i;return e.presenceSet=r(this.presenceSet),e.list=this.toArray(),e}};var o=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};o.create=function(){return new o},o.prototype={get:function(t){var r=this.values,n=e(t);return r[n]},set:function(t,r){var n=this.keys,i=this.values,o=e(t);n.add(t),i[o]=r},remove:function(t){var r=this.keys,n=this.values,i=e(t);return n.hasOwnProperty(i)?(r.remove(t),delete n[i],!0):!1},has:function(t){var r=this.values,n=e(t);return r.hasOwnProperty(n)},forEach:function(t,r){var n=this.keys,i=this.values;n.forEach(function(n){var o=e(n);t.call(r,n,i[o])})},copy:function(){return n(this,new o)}};var s=Ember.MapWithDefault=function(e){o.call(this),this.defaultValue=e.defaultValue};s.create=function(e){return e?new s(e):new o},s.prototype=Ember.create(o.prototype),s.prototype.get=function(e){var t=this.has(e);if(t)return o.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},s.prototype.copy=function(){return n(this,new s({defaultValue:this.defaultValue}))}}(),function(){function e(e){return e.match(a)[0]}function t(t,n){var i,a=s.test(n),u=!a&&o.test(n);if((!t||u)&&(t=Ember.lookup),a&&(n=n.slice(5)),t===Ember.lookup&&(i=e(n),t=r(t,i),n=n.slice(i.length+1)),!n||0===n.length)throw new Error("Invalid Path");return[t,n]}var r,n=Ember.META_KEY,i=Ember.ENV.MANDATORY_SETTER,o=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,s=/^this[\.\*]/,a=/^([^\.\*]+)/;r=function r(e,t){if(""===t)return e;if(t||"string"!=typeof e||(t=e,e=null),null===e||-1!==t.indexOf("."))return u(e,t);var r,o=e[n],s=o&&o.descs[t];return s?s.get(e,t):(r=i&&o&&o.watching[t]>0?o.values[t]:e[t],void 0!==r||"object"!=typeof e||t in e||"function"!=typeof e.unknownProperty?r:e.unknownProperty(t))},Ember.config.overrideAccessors&&(Ember.get=r,Ember.config.overrideAccessors(),r=Ember.get);var u=Ember._getPath=function(e,n){var i,o,a,u,c;if(null===e&&-1===n.indexOf("."))return r(Ember.lookup,n);for(i=s.test(n),(!e||i)&&(a=t(e,n),e=a[0],n=a[1],a.length=0),o=n.split("."),c=o.length,u=0;void 0!==e&&null!==e&&c>u;u++)if(e=r(e,o[u],!0),e&&e.isDestroyed)return void 0;return e};Ember.normalizeTuple=function(e,r){return t(e,r)},Ember.getWithDefault=function(e,t,n){var i=r(e,t);return void 0===i?n:i},Ember.get=r,Ember.getPath=Ember.deprecateFunc("getPath is deprecated since get now supports paths",Ember.get)}(),function(){function e(e,t,r){for(var n=-1,i=0,o=e.length;o>i;i++)if(t===e[i][0]&&r===e[i][1]){n=i;break}return n}function t(e,t){var r,n=f(e,!0);return n.listeners||(n.listeners={}),n.hasOwnProperty("listeners")||(n.listeners=m(n.listeners)),r=n.listeners[t],r&&!n.listeners.hasOwnProperty(t)?r=n.listeners[t]=n.listeners[t].slice():r||(r=n.listeners[t]=[]),r}function r(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r];if(o)for(var s=o.length-1;s>=0;s--){var a=o[s][0],u=o[s][1],c=o[s][2],l=e(n,a,u);-1===l&&n.push([a,u,c])}}function n(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r],s=[];if(o){for(var a=o.length-1;a>=0;a--){var u=o[a][0],c=o[a][1],l=o[a][2],h=e(n,u,c);-1===h&&(n.push([u,c,l]),s.push([u,c,l]))}return s}}function i(r,n,i,o,s){o||"function"!=typeof i||(o=i,i=null);var a=t(r,n),u=e(a,i,o),c=0;s&&(c|=d),-1===u&&(a.push([i,o,c]),"function"==typeof r.didAddListener&&r.didAddListener(n,i,o))}function o(r,n,i,o){function s(i,o){var s=t(r,n),a=e(s,i,o);-1!==a&&(s.splice(a,1),"function"==typeof r.didRemoveListener&&r.didRemoveListener(n,i,o))}if(o||"function"!=typeof i||(o=i,i=null),o)s(i,o);else{var a=r[p],u=a&&a.listeners&&a.listeners[n];if(!u)return;for(var c=u.length-1;c>=0;c--)s(u[c][0],u[c][1])}}function s(r,n,i,o,s){function a(){return s.call(i)}function u(){c&&(c[2]&=~b)}o||"function"!=typeof i||(o=i,i=null);var c,l=t(r,n),h=e(l,i,o);return-1!==h&&(c=l[h].slice(),c[2]|=b,l[h]=c),Ember.tryFinally(a,u)}function a(r,n,i,o,s){function a(){return s.call(i)}function u(){for(m=0,f=p.length;f>m;m++)p[m][2]&=~b}o||"function"!=typeof i||(o=i,i=null);var c,l,h,m,f,p=[];for(m=0,f=n.length;f>m;m++){c=n[m],l=t(r,c);var d=e(l,i,o);-1!==d&&(h=l[d].slice(),h[2]|=b,l[d]=h,p.push(h))}return Ember.tryFinally(a,u)}function u(e){var t=e[p].listeners,r=[];if(t)for(var n in t)t[n]&&r.push(n);return r}function c(e,t,r,n){if(e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,r),!n){var i=e[p];n=i&&i.listeners&&i.listeners[t]}if(n){for(var s=n.length-1;s>=0;s--){var a=n[s];if(a){var u=a[0],c=a[1],l=a[2];l&b||(l&d&&o(e,t,u,c),u||(u=e),"string"==typeof c&&(c=u[c]),r?c.apply(u,r):c.call(u))}}return!0}}function l(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function h(e,t){var r=[],n=e[p],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var o=0,s=i.length;s>o;o++){var a=i[o][0],u=i[o][1];r.push([a,u])}return r}var m=Ember.create,f=Ember.meta,p=Ember.META_KEY,d=1,b=2;Ember.addListener=i,Ember.removeListener=o,Ember._suspendListener=s,Ember._suspendListeners=a,Ember.sendEvent=c,Ember.hasListeners=l,Ember.watchedEvents=u,Ember.listenersFor=h,Ember.listenersDiff=n,Ember.listenersUnion=r}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,r=Ember._ObserverSet=function(){this.clear()};r.prototype.add=function(t,r,n){var i,o=this.observerSet,s=this.observers,a=e(t),u=o[a];return u||(o[a]=u={}),i=u[r],void 0===i&&(i=s.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),s[i].listeners},r.prototype.flush=function(){var e,r,n,i,o=this.observers;for(this.clear(),e=0,r=o.length;r>e;++e)n=o[e],i=n.sender,i.isDestroying||i.isDestroyed||t(i,n.eventName,[i,n.keyName],n.listeners)},r.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function e(e,t,i){if(!e.isDestroying){var o=n,s=!o;s&&(o=n={}),r(d,e,t,o,i),s&&(n=null)}}function t(e,t,n){if(!e.isDestroying){var o=i,s=!o;s&&(o=i={}),r(b,e,t,o,n),s&&(i=null)}}function r(e,t,r,n,i){var o=s(t);if(n[o]||(n[o]={}),!n[o][r]){n[o][r]=!0;var a=i.deps;if(a=a&&a[r])for(var u in a){var c=i.descs[u];c&&c._suspended===t||e(t,u)}}}var n,i,o=Ember.meta,s=Ember.guidFor,a=Ember.tryFinally,u=Ember.sendEvent,c=Ember.listenersUnion,l=Ember.listenersDiff,h=Ember._ObserverSet,m=new h,f=new h,p=0,d=Ember.propertyWillChange=function(t,r){var n=o(t,!1),i=n.watching[r]>0||"length"===r,s=n.proto,a=n.descs[r];i&&s!==t&&(a&&a.willChange&&a.willChange(t,r),e(t,r,n),E(t,r,n),w(t,r))},b=Ember.propertyDidChange=function(e,r){var n=o(e,!1),i=n.watching[r]>0||"length"===r,s=n.proto,a=n.descs[r];s!==e&&(a&&a.didChange&&a.didChange(e,r),(i||"length"===r)&&(t(e,r,n),v(e,r,n),_(e,r)))},E=function(e,t,r,n){if(r.hasOwnProperty("chainWatchers")){var i=r.chainWatchers;if(i=i[t])for(var o=0,s=i.length;s>o;o++)i[o].willChange(n)}},v=function(e,t,r,n){if(r.hasOwnProperty("chainWatchers")){var i=r.chainWatchers;if(i=i[t])for(var o=i.length-1;o>=0;o--)i[o].didChange(n)}};Ember.overrideChains=function(e,t,r){v(e,t,r,!0)};var g=Ember.beginPropertyChanges=function(){p++},y=Ember.endPropertyChanges=function(){p--,0>=p&&(m.clear(),f.flush())};Ember.changeProperties=function(e,t){g(),a(e,y,t)};var w=function(e,t){if(!e.isDestroying){var r,n,i=t+":before";p?(r=m.add(e,t,i),n=l(e,i,r),u(e,i,[e,t],n)):u(e,i,[e,t])}},_=function(e,t){if(!e.isDestroying){var r,n=t+":change";p?(r=f.add(e,t,n),c(e,n,r)):u(e,n,[e,t])}}}(),function(){function e(e,t,r,o){var s;if(s=t.slice(t.lastIndexOf(".")+1),t=t.slice(0,t.length-(s.length+1)),"this"!==t&&(e=n(e,t)),!s||0===s.length)throw new Error("You passed an empty path");if(!e){if(o)return;throw new Error("Object in path "+t+" could not be found or was destroyed.")}return i(e,s,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=Ember._getPath,i=function i(n,i,o,s){if("string"==typeof n&&(o=i,i=n,n=null),!n||-1!==i.indexOf("."))return e(n,i,o,s);var a,u,c=n[t],l=c&&c.descs[i];return l?l.set(n,i,o):(a="object"==typeof n&&!(i in n),a&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,o):c&&c.watching[i]>0?(u=r?c.values[i]:n[i],o!==u&&(Ember.propertyWillChange(n,i),r?void 0!==u||i in n?c.values[i]=o:Ember.defineProperty(n,i,null,o):n[i]=o,Ember.propertyDidChange(n,i))):n[i]=o),o};Ember.config.overrideAccessors&&(Ember.set=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.setPath=Ember.deprecateFunc("setPath is deprecated since set now supports paths",Ember.set),Ember.trySet=function(e,t,r){return i(e,t,r,!0)},Ember.trySetPath=Ember.deprecateFunc("trySetPath has been renamed to trySet",Ember.trySet)}(),function(){var e=Ember.META_KEY,t=Ember.meta,r=Ember.platform.defineProperty,n=Ember.ENV.MANDATORY_SETTER;Ember.Descriptor=function(){};var i=Ember.MANDATORY_SETTER_FUNCTION=function(){},o=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};Ember.defineProperty=function(e,s,a,u,c){var l,h,m,f;return c||(c=t(e)),l=c.descs,h=c.descs[s],m=c.watching[s]>0,h instanceof Ember.Descriptor&&h.teardown(e,s),a instanceof Ember.Descriptor?(f=a,l[s]=a,n&&m?r(e,s,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[s]=void 0,a.setup(e,s)):(l[s]=void 0,null==a?(f=u,n&&m?(c.values[s]=u,r(e,s,{configurable:!0,enumerable:!0,set:i,get:o(s)})):e[s]=u):(f=a,r(e,s,a))),m&&Ember.overrideChains(e,s,c),e.didDefineProperty&&e.didDefineProperty(e,s,f),this}}(),function(){var e=Ember.changeProperties,t=Ember.set;Ember.setProperties=function(r,n){return e(function(){for(var e in n)n.hasOwnProperty(e)&&t(r,e,n[e])}),r}}(),function(){var e=Ember.meta,t=Ember.typeOf,r=Ember.ENV.MANDATORY_SETTER,n=Ember.platform.defineProperty;Ember.watchKey=function(i,o){if("length"!==o||"array"!==t(i)){var s,a=e(i),u=a.watching;u[o]?u[o]=(u[o]||0)+1:(u[o]=1,s=a.descs[o],s&&s.willWatch&&s.willWatch(i,o),"function"==typeof i.willWatchProperty&&i.willWatchProperty(o),r&&o in i&&(a.values[o]=i[o],n(i,o,{configurable:!0,enumerable:!0,set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(o)})))}},Ember.unwatchKey=function(t,i){var o,s=e(t),a=s.watching;1===a[i]?(a[i]=0,o=s.descs[i],o&&o.didUnwatch&&o.didUnwatch(t,i),"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),r&&i in t&&(n(t,i,{configurable:!0,enumerable:!0,writable:!0,value:s.values[i]}),delete s.values[i])):a[i]>1&&a[i]--}}(),function(){function e(e){return e.match(m)[0]}function t(e,t,r){if(e&&"object"==typeof e){var i=n(e),o=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(o=i.chainWatchers={}),o[t]||(o[t]=[]),o[t].push(r),u(e,t)}}function r(e){return n(e,!1).proto===e}var n=Ember.meta,i=Ember.get,o=Ember.normalizeTuple,s=Ember.ArrayPolyfills.forEach,a=Ember.warn,u=Ember.watchKey,c=Ember.unwatchKey,l=Ember.propertyWillChange,h=Ember.propertyDidChange,m=/^([^\.\*]+)/,f=[];Ember.flushPendingChains=function(){if(0!==f.length){var e=f;f=[],s.call(e,function(e){e[0].add(e[1])}),a("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",0===f.length)}};var p=Ember.removeChainWatcher=function(e,t,r){if(e&&"object"==typeof e){var i=n(e,!1);if(i.hasOwnProperty("chainWatchers")){var o=i.chainWatchers;if(o[t]){o=o[t];for(var s=0,a=o.length;a>s;s++)o[s]===r&&o.splice(s,1)}c(e,t)}}},d=Ember._ChainNode=function(e,r,n){this._parent=e,this._key=r,this._watching=void 0===n,this._value=n,this._paths={},this._watching&&(this._object=e.value(),this._object&&t(this._object,this._key,this)),this._parent&&"@each"===this._parent._key&&this.value()},b=d.prototype;b.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=e&&!r(e)?i(e,this._key):void 0}return this._value},b.destroy=function(){if(this._watching){var e=this._object;e&&p(e,this._key,this),this._watching=!1}},b.copy=function(e){var t,r=new d(null,null,e),n=this._paths;for(t in n)0>=n[t]||r.add(t);return r},b.add=function(t){var r,n,i,s,a;if(a=this._paths,a[t]=(a[t]||0)+1,r=this.value(),n=o(r,t),n[0]&&n[0]===r)t=n[1],i=e(t),t=t.slice(i.length+1);else{if(!n[0])return f.push([this,t]),n.length=0,void 0;s=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]}n.length=0,this.chain(i,t,s)},b.remove=function(t){var r,n,i,s,a;a=this._paths,a[t]>0&&a[t]--,r=this.value(),n=o(r,t),n[0]===r?(t=n[1],i=e(t),t=t.slice(i.length+1)):(s=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]),n.length=0,this.unchain(i,t)},b.count=0,b.chain=function(t,r,n){var i,o=this._chains;o||(o=this._chains={}),i=o[t],i||(i=o[t]=new d(this,t,n)),i.count++,r&&r.length>0&&(t=e(r),r=r.slice(t.length+1),i.chain(t,r))},b.unchain=function(t,r){var n=this._chains,i=n[t];r&&r.length>1&&(t=e(r),r=r.slice(t.length+1),i.unchain(t,r)),i.count--,0>=i.count&&(delete n[i._key],i.destroy())},b.willChange=function(){var e=this._chains;if(e)for(var t in e)e.hasOwnProperty(t)&&e[t].willChange();this._parent&&this._parent.chainWillChange(this,this._key,1)},b.chainWillChange=function(e,t,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,r+1):(r>1&&l(this.value(),t),t="this."+t,this._paths[t]>0&&l(this.value(),t))},b.chainDidChange=function(e,t,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,r+1):(r>1&&h(this.value(),t),t="this."+t,this._paths[t]>0&&h(this.value(),t))},b.didChange=function(e){if(this._watching){var r=this._parent.value();r!==this._object&&(p(this._object,this._key,this),this._object=r,t(r,this._key,this)),this._value=void 0,this._parent&&"@each"===this._parent._key&&this.value()}var n=this._chains;if(n)for(var i in n)n.hasOwnProperty(i)&&n[i].didChange(e);e||this._parent&&this._parent.chainDidChange(this,this._key,1)},Ember.finishChains=function(e){var t=n(e,!1),r=t.chains;r&&(r.value()!==e&&(t.chains=r=r.copy(e)),r.didChange(!0))}}(),function(){function e(e){var r=t(e),i=r.chains;return i?i.value()!==e&&(i=r.chains=i.copy(e)):i=r.chains=new n(null,null,e),i}var t=Ember.meta,r=Ember.typeOf,n=Ember._ChainNode;Ember.watchPath=function(n,i){if("length"!==i||"array"!==r(n)){var o=t(n),s=o.watching;s[i]?s[i]=(s[i]||0)+1:(s[i]=1,e(n).add(i))}},Ember.unwatchPath=function(r,n){var i=t(r),o=i.watching;1===o[n]?(o[n]=0,e(r).remove(n)):o[n]>1&&o[n]--}}(),function(){function e(e){return"*"===e||!h.test(e)}var t=Ember.meta,r=Ember.GUID_KEY,n=Ember.META_KEY,i=Ember.removeChainWatcher,o=Ember.watchKey,s=Ember.unwatchKey,a=Ember.watchPath,u=Ember.unwatchPath,c=Ember.typeOf,l=Ember.generateGuid,h=/[\.\*]/;Ember.watch=function(t,r){("length"!==r||"array"!==c(t))&&(e(r)?o(t,r):a(t,r))},Ember.isWatching=function(e,t){var r=e[n];return(r&&r.watching[t])>0},Ember.watch.flushPending=Ember.flushPendingChains,Ember.unwatch=function(t,r){("length"!==r||"array"!==c(t))&&(e(r)?s(t,r):u(t,r))},Ember.rewatch=function(e){var n=t(e,!1),i=n.chains;r in e&&!e.hasOwnProperty(r)&&l(e,"ember"),i&&i.value()!==e&&(n.chains=i.copy(e))};var m=[];Ember.destroy=function(e){var t,r,o,s,a=e[n];if(a&&(e[n]=null,t=a.chains))for(m.push(t);m.length>0;){if(t=m.pop(),r=t._chains)for(o in r)r.hasOwnProperty(o)&&m.push(r[o]);t._watching&&(s=t._object,s&&i(s,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=m(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,o){var s,a,u,c,l,h=r._dependentKeys;if(h)for(s=t(o),a=0,u=h.length;u>a;a++)c=h[a],l=e(s,c),l[i]=(l[i]||0)+1,p(n,c)}function n(r,n,i,o){var s,a,u,c,l,h=r._dependentKeys;if(h)for(s=t(o),a=0,u=h.length;u>a;a++)c=h[a],l=e(s,c),l[i]=(l[i]||0)-1,d(n,c)}function i(e,t){this.func=e,this._cacheable=t&&void 0!==t.cacheable?t.cacheable:!0,this._dependentKeys=t&&t.dependentKeys,this._readOnly=t&&(void 0!==t.readOnly||!!t.readOnly)}function o(e,t){for(var r={},n=0;t.length>n;n++)r[t[n]]=u(e,t[n]);return r}function s(e,t){Ember.computed[e]=function(e){var r=h.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}}function a(e,t){Ember.computed[e]=function(){var e=h.call(arguments),r=Ember.computed(function(){return t.apply(this,[o(this,e)])});return r.property.apply(r,e)}}var u=Ember.get,c=Ember.set,l=Ember.meta,h=[].slice,m=Ember.create,f=Ember.META_KEY,p=Ember.watch,d=Ember.unwatch;Ember.ComputedProperty=i,i.prototype=new Ember.Descriptor;var b=i.prototype;b.cacheable=function(e){return this._cacheable=e!==!1,this},b.volatile=function(){return this.cacheable(!1)},b.readOnly=function(e){return this._readOnly=void 0===e||!!e,this},b.property=function(){for(var e=[],t=0,r=arguments.length;r>t;t++)e.push(arguments[t]);return this._dependentKeys=e,this},b.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},b.willWatch=function(e,t){var n=e[f];t in n.cache||r(this,e,t,n)},b.didUnwatch=function(e,t){var r=e[f];t in r.cache||n(this,e,t,r)},b.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=l(e);t in r.cache&&(delete r.cache[t],r.watching[t]||n(this,e,t,r))}},b.get=function(e,t){var n,i,o;if(this._cacheable){if(o=l(e),i=o.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),o.watching[t]||r(this,e,t,o)}else n=this.func.call(e,t);return n},b.set=function(e,t,n){var i,o,s=this._cacheable,a=this.func,u=l(e,s),c=u.watching[t],h=this._suspended,m=!1,f=u.cache;if(this._readOnly)throw new Error("Cannot Set: "+t+" on: "+e.toString());this._suspended=e;try{if(s&&f.hasOwnProperty(t)&&(i=f[t],m=!0),a.wrappedFunction&&(a=a.wrappedFunction),3===a.length)o=a.call(e,t,n,i);else{if(2!==a.length)return Ember.defineProperty(e,t,null,i),Ember.set(e,t,n),void 0;o=a.call(e,t,n)}if(m&&i===o)return;c&&Ember.propertyWillChange(e,t),m&&delete f[t],s&&(c||m||r(this,e,t,u),f[t]=o),c&&Ember.propertyDidChange(e,t)}finally{this._suspended=h}return o},b.setup=function(e,t){var n=e[f];n&&n.watching[t]&&r(this,e,t,l(e))},b.teardown=function(e,t){var r=l(e);return(r.watching[t]||t in r.cache)&&n(this,e,t,r),this._cacheable&&delete r.cache[t],null},Ember.computed=function(e){var t;if(arguments.length>1&&(t=h.call(arguments,0,-1),e=h.call(arguments,-1)[0]),"function"!=typeof e)throw new Error("Computed Property declared without a property function");var r=new i(e);return t&&r.property.apply(r,t),r},Ember.cacheFor=function(e,t){var r=l(e,!1).cache;return r&&t in r?r[t]:void 0},s("empty",function(e){return Ember.isEmpty(u(this,e))}),s("notEmpty",function(e){return!Ember.isEmpty(u(this,e))}),s("none",function(e){return Ember.isNone(u(this,e))}),s("not",function(e){return!u(this,e)}),s("bool",function(e){return!!u(this,e)}),s("match",function(e,t){var r=u(this,e);return"string"==typeof r?!!r.match(t):!1}),s("equal",function(e,t){return u(this,e)===t}),s("gt",function(e,t){return u(this,e)>t}),s("gte",function(e,t){return u(this,e)>=t}),s("lt",function(e,t){return t>u(this,e)}),s("lte",function(e,t){return t>=u(this,e)}),a("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),a("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),a("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),a("map",function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&(Ember.isNone(e[r])?t.push(null):t.push(e[r]));return t}),Ember.computed.alias=function(e){return Ember.computed(e,function(t,r){return arguments.length>1?(c(this,e,r),r):u(this,e)})},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return 1===arguments.length?null!=n?n:u(this,e):null!=r?r:u(this,e)})}}(),function(){function e(e){return e+r}function t(e){return e+n}var r=":change",n=":before";Ember.guidFor,Ember.addObserver=function(t,r,n,i){return Ember.addListener(t,e(r),n,i),Ember.watch(t,r),this},Ember.observersFor=function(t,r){return Ember.listenersFor(t,e(r))},Ember.removeObserver=function(t,r,n,i){return Ember.unwatch(t,r),Ember.removeListener(t,e(r),n,i),this},Ember.addBeforeObserver=function(e,r,n,i){return Ember.addListener(e,t(r),n,i),Ember.watch(e,r),this},Ember._suspendBeforeObserver=function(e,r,n,i,o){return Ember._suspendListener(e,t(r),n,i,o)},Ember._suspendObserver=function(t,r,n,i,o){return Ember._suspendListener(t,e(r),n,i,o)};var i=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,r,n,o,s){var a=i.call(r,t);return Ember._suspendListeners(e,a,n,o,s)},Ember._suspendObservers=function(t,r,n,o,s){var a=i.call(r,e);return Ember._suspendListeners(t,a,n,o,s)},Ember.beforeObserversFor=function(e,r){return Ember.listenersFor(e,t(r))},Ember.removeBeforeObserver=function(e,r,n,i){return Ember.unwatch(e,r),Ember.removeListener(e,t(r),n,i),this}}(),function(){function e(e,t,r,n){return void 0===t&&(t=e,e=void 0),"string"==typeof t&&(t=e[t]),r&&n>0&&(r=r.length>n?s.call(r,n):null),Ember.handleErrors(function(){return t.apply(e||this,r||[])},this)}function t(){l=null,c.currentRunLoop&&c.end()}function r(e,t){var r=e.expires,n=t.expires;return r>n?1:n>r?-1:0}function n(){h=null,c(function(){var t=+new Date,i=-1,o=[];for(var s in f)if(f.hasOwnProperty(s)){var u=f[s];u&&u.expires&&(t>=u.expires?(delete f[s],o.push(u)):(0>i||i>u.expires)&&(i=u.expires))}a.call(o.sort(r),function(t){e(t.target,t.method,t.args,2)}),i>0&&(h=window.setTimeout(n,i-t),m=i)})}function i(t,r){r[this.tguid]&&delete r[this.tguid][this.mguid],f[t]&&e(this.target,this.method,this.args),delete f[t]}function o(e,t,r,n){var o,s=Ember.guidFor(t),a=Ember.guidFor(r),u=c.autorun().onceTimers,l=u[s]&&u[s][a];return l&&f[l]?f[l].args=n:(o={target:t,method:r,args:n,tguid:s,mguid:a},l=Ember.guidFor(o),f[l]=o,u[s]||(u[s]={}),u[s][a]=l,c.schedule(e,o,i,l,u)),l}var s=[].slice,a=Ember.ArrayPolyfills.forEach,u=function(e){this._prev=e||null,this.onceTimers={}};u.prototype={end:function(){this.flush()},prev:function(){return this._prev},schedule:function(e,t,r){var n,i=this._queues;i||(i=this._queues={}),n=i[e],n||(n=i[e]=[]);var o=arguments.length>3?s.call(arguments,3):null;return n.push({target:t,method:r,args:o}),this
16
+ },flush:function(t){function r(t){e(t.target,t.method,t.args)}function n(){a.call(u,r)}var i,o,s,u,c;if(!this._queues)return this;if(Ember.watch.flushPending(),t)for(;this._queues&&(u=this._queues[t]);)this._queues[t]=null,"sync"===t?(c=Ember.LOG_BINDINGS,c&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges(),Ember.tryFinally(n,Ember.endPropertyChanges),c&&Ember.Logger.log("End: Flush Sync Queue")):a.call(u,r);else{i=Ember.run.queues,s=i.length,o=0;e:for(;s>o;){t=i[o],u=this._queues&&this._queues[t],delete this._queues[t],u&&("sync"===t?(c=Ember.LOG_BINDINGS,c&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges(),Ember.tryFinally(n,Ember.endPropertyChanges),c&&Ember.Logger.log("End: Flush Sync Queue")):a.call(u,r));for(var l=0;o>=l;l++)if(this._queues&&this._queues[i[l]]){o=l;continue e}o++}}return this}},Ember.RunLoop=u,Ember.run=function(t,r){function n(){return t||r?e(t,r,i,2):void 0}var i=arguments;return c.begin(),Ember.tryFinally(n,c.end)};var c=Ember.run;Ember.run.begin=function(){c.currentRunLoop=new u(c.currentRunLoop)},Ember.run.end=function(){function e(){c.currentRunLoop.end()}function t(){c.currentRunLoop=c.currentRunLoop.prev()}Ember.tryFinally(e,t)},Ember.run.queues=["sync","actions","destroy"],Ember.run.schedule=function(){var e=c.autorun();e.schedule.apply(e,arguments)};var l;Ember.run.hasScheduledTimers=function(){return!(!l&&!h)},Ember.run.cancelTimers=function(){l&&(clearTimeout(l),l=null),h&&(clearTimeout(h),h=null),f={}},Ember.run.autorun=function(){return c.currentRunLoop||(c.begin(),l||(l=setTimeout(t,1))),c.currentRunLoop},Ember.run.sync=function(){c.autorun(),c.currentRunLoop.flush("sync")};var h,m,f={};Ember.run.later=function(e,t){var r,i,o,a,u;return 2===arguments.length&&"function"==typeof e?(u=t,t=e,e=void 0,r=[e,t]):(r=s.call(arguments),u=r.pop()),i=+new Date+u,o={target:e,method:t,expires:i,args:r},a=Ember.guidFor(o),f[a]=o,h&&m>i&&(clearTimeout(h),h=null),h||(h=setTimeout(n,u),m=i),a},Ember.run.once=function(e,t){return o("actions",e,t,s.call(arguments,2))},Ember.run.scheduleOnce=function(e,t,r){return o(e,t,r,s.call(arguments,3))},Ember.run.next=function(){var e=s.call(arguments);return e.push(1),c.later.apply(this,e)},Ember.run.cancel=function(e){delete f[e]}}(),function(){function e(e,t){return r(o(t)?Ember.lookup:e,t)}function t(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}Ember.LOG_BINDINGS=!1||!!Ember.ENV.LOG_BINDINGS;var r=Ember.get,n=(Ember.set,Ember.guidFor),i=/^([A-Z$]|([0-9][A-Z$]))/,o=Ember.isGlobalPath=function(e){return i.test(e)},s=function(e,t){this._direction="fwd",this._from=t,this._to=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(t){var r=this._from,n=this._to;return Ember.trySet(t,n,e(t,r)),Ember.addObserver(t,r,this,this.fromDidChange),this._oneWay||Ember.addObserver(t,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 r=this._directionMap,n=r.get(e);n||(Ember.run.schedule("sync",this,this._sync,e),r.set(e,t)),"back"===n&&"fwd"===t&&r.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(!t.isDestroyed&&this._readyToSync){var i=this._directionMap,o=i.get(t),s=this._from,a=this._to;if(i.remove(t),"fwd"===o){var u=e(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",u,t),this._oneWay?Ember.trySet(t,a,u):Ember._suspendObserver(t,a,this,this.toDidChange,function(){Ember.trySet(t,a,u)})}else if("back"===o){var c=r(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",c,t),Ember._suspendObserver(t,s,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(s)?Ember.lookup:t,s,c)})}}}},t(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 r=this,n=new r(null,e);return n.oneWay(t)}}),Ember.Binding=s,Ember.bind=function(e,t,r){return new Ember.Binding(t,r).connect(e)},Ember.oneWay=function(e,t,r){return new Ember.Binding(t,r).oneWay().connect(e)}}(),function(){function e(e){var t=Ember.meta(e,!0),r=t.mixins;return r?t.hasOwnProperty("mixins")||(r=t.mixins=x(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=_.call(t,function(e){if(e instanceof g)return e;var t=new g;return t.properties=e,t})),e}function r(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function n(e,t){var r;return t instanceof g?(r=P(t),e[r]?V:(e[r]=t,t.properties)):t}function i(e,t,r){var n;return n=t.concatenatedProperties||r.concatenatedProperties,e.concatenatedProperties&&(n=n?n.concat(e.concatenatedProperties):e.concatenatedProperties),n}function o(e,t,r,n,i){var o;return void 0===n[t]&&(o=i[t]),o=o||e.descs[t],o&&o instanceof Ember.ComputedProperty?(r=x(r),r.func=Ember.wrap(r.func,o.func),r):r}function s(e,t,r,n,i){var o;return void 0===i[t]&&(o=n[t]),o=o||e[t],"function"!=typeof o?r:Ember.wrap(r,o)}function a(e,t,r,n){var i=n[t]||e[t];return i?"function"==typeof i.concat?i.concat(r):Ember.makeArray(i).concat(r):Ember.makeArray(r)}function u(e,t,n,i,u,c,l){if(n instanceof Ember.Descriptor){if(n===y&&u[t])return V;n.func&&(n=o(i,t,n,c,u)),u[t]=n,c[t]=void 0}else r(n)?n=s(e,t,n,c,u):(l&&C.call(l,t)>=0||"concatenatedProperties"===t)&&(n=a(e,t,n,c)),u[t]=void 0,c[t]=n}function c(e,t,r,o,s,a){function l(e){delete r[e],delete o[e]}for(var h,m,f,p,d,b=0,E=e.length;E>b;b++)if(h=e[b],m=n(t,h),m!==V)if(m){d=Ember.meta(s),p=i(m,o,s);for(f in m)m.hasOwnProperty(f)&&(a.push(f),u(s,f,m[f],d,r,o,p));m.hasOwnProperty("toString")&&(s.toString=m.toString)}else h.mixins&&(c(h.mixins,t,r,o,s,a),h._without&&O.call(h._without,l))}function l(e,t,r,n){if(T.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=x(n.bindings)):i=n.bindings={},i[t]=r}}function h(e,t){var r,n,i,o=t.bindings;if(o){for(r in o)n=o[r],n&&(i=r.slice(0,-7),n instanceof Ember.Binding?(n=n.copy(),n.to(i)):n=new Ember.Binding(i,n),n.connect(e),e[r]=n);t.bindings={}}}function m(e,t){return h(e,t||Ember.meta(e)),e}function f(e,t,r,n,i){var o,s=t.methodName;return n[s]||i[s]?(o=i[s],t=n[s]):r.descs[s]?(t=r.descs[s],o=void 0):(t=void 0,o=e[s]),{desc:t,value:o}}function p(e,t,r,n,i){if("function"==typeof r){var o=r[n];if(o)for(var s=0,a=o.length;a>s;s++)Ember[i](e,o[s],null,t)}}function d(e,t,r){var n=e[t];p(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),p(e,t,n,"__ember_observes__","removeObserver"),p(e,t,r,"__ember_observesBefore__","addBeforeObserver"),p(e,t,r,"__ember_observes__","addObserver")}function b(t,r,n){var i,o,s,a={},u={},h=Ember.meta(t),p=[];c(r,e(t),a,u,t,p);for(var b=0,E=p.length;E>b;b++)if(i=p[b],"constructor"!==i&&u.hasOwnProperty(i)&&(s=a[i],o=u[i],s!==y)){for(;s&&s instanceof w;){var v=f(t,s,h,a,u);s=v.desc,o=v.value}(void 0!==s||void 0!==o)&&(d(t,i,o),l(t,i,o,h),A(t,i,s,o,h))}return n||m(t,h),t}function E(e,t,r){var n=P(e);if(r[n])return!1;if(r[n]=!0,e===t)return!0;for(var i=e.mixins,o=i?i.length:0;--o>=0;)if(E(i[o],t,r))return!0;return!1}function v(e,t,r){if(!r[P(t)])if(r[P(t)]=!0,t.properties){var n=t.properties;for(var i in n)n.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&O.call(t.mixins,function(t){v(e,t,r)})}var g,y,w,_=Ember.ArrayPolyfills.map,C=Ember.ArrayPolyfills.indexOf,O=Ember.ArrayPolyfills.forEach,S=[].slice,x=Ember.create,A=Ember.defineProperty,P=Ember.guidFor,V={},T=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=S.call(arguments,1);return b(e,t,!1),e},Ember.Mixin=function(){return t(this,arguments)},g=Ember.Mixin,g.prototype={properties:null,mixins:null,ownerConstructor:null},g._apply=b,g.applyPartial=function(e){var t=S.call(arguments,1);return b(e,t,!0)},g.finishPartial=m,Ember.anyUnprocessedMixins=!1,g.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var D=g.prototype;D.reopen=function(){var e,t;this.properties?(e=g.create(),e.properties=this.properties,delete this.properties,this.mixins=[e]):this.mixins||(this.mixins=[]);var r,n=arguments.length,i=this.mixins;for(r=0;n>r;r++)e=arguments[r],e instanceof g?i.push(e):(t=g.create(),t.properties=e,i.push(t));return this},D.apply=function(e){return b(e,[this],!1)},D.applyPartial=function(e){return b(e,[this],!0)},D.detect=function(e){if(!e)return!1;if(e instanceof g)return E(e,this,{});var t=Ember.meta(e,!1).mixins;return t?!!t[P(this)]:!1},D.without=function(){var e=new g(this);return e._without=S.call(arguments),e},D.keys=function(){var e={},t={},r=[];v(e,this,t);for(var n in e)e.hasOwnProperty(n)&&r.push(n);return r},g.mixins=function(e){var t=Ember.meta(e,!1).mixins,r=[];if(!t)return r;for(var n in t){var i=t[n];i.properties||r.push(i)}return r},y=new Ember.Descriptor,y.toString=function(){return"(Required Property)"},Ember.required=function(){return y},w=function(e){this.methodName=e},w.prototype=new Ember.Descriptor,Ember.alias=function(e){return new w(e)},Ember.alias=Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.",Ember.alias),Ember.aliasMethod=function(e){return new w(e)},Ember.observer=function(e){var t=S.call(arguments,1);return e.__ember_observes__=t,e},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++)arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(e){var t=S.call(arguments,1);return e.__ember_observesBefore__=t,e}}(),function(){e("rsvp/all",["rsvp/defer","exports"],function(e,t){"use strict";function r(e){var t=[],r=n(),i=e.length;0===i&&r.resolve([]);for(var o=function(e){return function(t){s(e,t)}},s=function(e,n){t[e]=n,0===--i&&r.resolve(t)},a=function(e){r.reject(e)},u=0;e.length>u;u++)e[u]&&"function"==typeof e[u].then?e[u].then(o(u),a):s(u,e[u]);return r.promise}var n=e.defer;t.all=r}),e("rsvp/async",["exports"],function(e){"use strict";var t,r="undefined"!=typeof window?window:{},n=r.MutationObserver||r.WebKitMutationObserver;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))t=function(e,t){process.nextTick(function(){e.call(t)})};else if(n){var i=[],o=new n(function(){var e=i.slice();i=[],e.forEach(function(e){var t=e[0],r=e[1];t.call(r)})}),s=document.createElement("div");o.observe(s,{attributes:!0}),window.addEventListener("unload",function(){o.disconnect(),o=null}),t=function(e,t){i.push([e,t]),s.setAttribute("drainQueue","drainQueue")}}else t=function(e,t){setTimeout(function(){e.call(t)},1)};e.async=t}),e("rsvp/config",["rsvp/async","exports"],function(e,t){"use strict";var r=e.async,n={};n.async=r,t.config=n}),e("rsvp/defer",["rsvp/promise","exports"],function(e,t){"use strict";function r(){var e={},t=new n(function(t,r){e.resolve=t,e.reject=r});return e.promise=t,e}var n=e.Promise;t.defer=r}),e("rsvp/events",["exports"],function(e){"use strict";var t=function(e,t){this.type=e;for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r])},r=function(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r][0]===t)return r;return-1},n=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},i={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e},on:function(e,t,i){var o,s,a=n(this);for(e=e.split(/\s+/),i=i||this;s=e.shift();)o=a[s],o||(o=a[s]=[]),-1===r(o,t)&&o.push([t,i])},off:function(e,t){var i,o,s,a=n(this);for(e=e.split(/\s+/);o=e.shift();)t?(i=a[o],s=r(i,t),-1!==s&&i.splice(s,1)):a[o]=[]},trigger:function(e,r){var i,o,s,a,u,c=n(this);if(i=c[e])for(var l=0;i.length>l;l++)o=i[l],s=o[0],a=o[1],"object"!=typeof r&&(r={detail:r}),u=new t(e,r),s.call(a,u)}};e.EventTarget=i}),e("rsvp/hash",["rsvp/defer","exports"],function(e,t){"use strict";function r(e){var t=0;for(var r in e)t++;return t}function n(e){var t={},n=i(),o=r(e);0===o&&n.resolve({});var s=function(e){return function(t){a(e,t)}},a=function(e,r){t[e]=r,0===--o&&n.resolve(t)},u=function(e){n.reject(e)};for(var c in e)e[c]&&"function"==typeof e[c].then?e[c].then(s(c),u):a(c,e[c]);return n.promise}var i=e.defer;t.hash=n}),e("rsvp/node",["rsvp/promise","rsvp/all","exports"],function(e,t,r){"use strict";function n(e,t){return function(r,n){r?t(r):arguments.length>2?e(Array.prototype.slice.call(arguments,1)):e(n)}}function i(e){return function(){var t,r,i=Array.prototype.slice.call(arguments),a=new o(function(e,n){t=e,r=n});return s(i).then(function(i){i.push(n(t,r));try{e.apply(this,i)}catch(o){r(o)}}),a}}var o=e.Promise,s=t.all;r.denodeify=i}),e("rsvp/promise",["rsvp/config","rsvp/events","exports"],function(e,t,r){"use strict";function n(e){return i(e)||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function o(e,t){e===t?a(e,t):s(e,t)||a(e,t)}function s(e,t){var r=null;if(n(t)){try{r=t.then}catch(s){return u(e,s),!0}if(i(r)){try{r.call(t,function(r){t!==r?o(e,r):a(e,r)},function(t){u(e,t)})}catch(s){u(e,s)}return!0}}return!1}function a(e,t){c.async(function(){e.trigger("promise:resolved",{detail:t}),e.isFulfilled=!0,e.fulfillmentValue=t})}function u(e,t){c.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedReason=t})}var c=e.config,l=t.EventTarget,h=function(e){var t=this,r=!1;if("function"!=typeof e)throw new TypeError("You must pass a resolver function as the sole argument to the promise constructor");if(!(t instanceof h))return new h(e);var n=function(e){r||(r=!0,o(t,e))},i=function(e){r||(r=!0,u(t,e))};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),e(n,i)},m=function(e,t,r,n){var a,c,l,h,m=i(r);if(m)try{a=r(n.detail),l=!0}catch(f){h=!0,c=f}else a=n.detail,l=!0;s(t,a)||(m&&l?o(t,a):h?u(t,c):"resolve"===e?o(t,a):"reject"===e&&u(t,a))};h.prototype={constructor:h,then:function(e,t){var r=new h(function(){});return this.isFulfilled&&c.async(function(){m("resolve",r,e,{detail:this.fulfillmentValue})},this),this.isRejected&&c.async(function(){m("reject",r,t,{detail:this.rejectedReason})},this),this.on("promise:resolved",function(t){m("resolve",r,e,t)}),this.on("promise:failed",function(e){m("reject",r,t,e)}),r}},l.mixin(h.prototype),r.Promise=h}),e("rsvp/resolve",["rsvp/promise","exports"],function(e,t){"use strict";function r(e){return"function"==typeof e||"object"==typeof e&&null!==e}function n(e){var t=new i(function(t,n){var i;try{r(e)?(i=e.then,"function"==typeof i?i.call(e,t,n):t(e)):t(e)}catch(o){n(o)}});return t}var i=e.Promise;t.resolve=n}),e("rsvp",["rsvp/events","rsvp/promise","rsvp/node","rsvp/all","rsvp/hash","rsvp/defer","rsvp/config","rsvp/resolve","exports"],function(e,t,r,n,i,o,s,a,u){"use strict";function c(e,t){b[e]=t}var l=e.EventTarget,h=t.Promise,m=r.denodeify,f=n.all,p=i.hash,d=o.defer,b=s.config,E=a.resolve;u.Promise=h,u.EventTarget=l,u.all=f,u.hash=p,u.defer=d,u.denodeify=m,u.configure=c,u.resolve=E})}(),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 r(e){throw new Error(e+" is not currently supported on child containers")}function n(e,t){var r=o(e,t,"singleton");return r!==!1}function i(e,t){var r={};if(!t)return r;for(var n,i,o=0,s=t.length;s>o;o++)n=t[o],i=e.lookup(n.fullName),r[n.property]=i;return r}function o(e,t,r){var n=e._options.get(t);if(n&&void 0!==n[r])return n[r];var i=t.split(":")[0];return n=e._typeOptions.get(i),n?n[r]:void 0}function s(e,t){var r=e.normalize(t);return e.resolve(r)}function a(e,t){var r,n=s(e,t),a=t.split(":"),u=a[0];if(o(e,t,"instantiate")===!1)return n;if(n){var c=[];c=c.concat(e.typeInjections.get(u)||[]),c=c.concat(e.injections[t]||[]);var l=i(e,c);return l.container=e,l._debugContainerKey=t,r=n.create(l)}}function u(e,t){e.cache.eachLocal(function(r,n){o(e,r,"instantiate")!==!1&&t(n)})}function c(e){e.cache.eachLocal(function(t,r){o(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}return e.prototype={get:function(e){var t=this.dict;return t.hasOwnProperty(e)?t[e]:this.parent?this.parent.get(e):void 0},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 r=this.dict;for(var n in r)r.hasOwnProperty(n)&&e.call(t,n,r[n])}},t.prototype={child:function(){var e=new t(this);return this.children.push(e),e},set:function(e,t,r){e[t]=r},register:function(e,t,r,n){var i;-1!==e.indexOf(":")?(n=r,r=t,i=e):i=e+":"+t;var o=this.normalize(i);this.registry.set(o,r),this._options.set(o,n||{})},resolve:function(e){return this.resolver(e)||this.registry.get(e)},normalize:function(e){return e},lookup:function(e,t){if(e=this.normalize(e),t=t||{},this.cache.has(e)&&t.singleton!==!1)return this.cache.get(e);var r=a(this,e);return r?(n(this,e)&&t.singleton!==!1&&this.cache.set(e,r),r):void 0},has:function(e){return this.cache.has(e)?!0:!!s(this,e)},optionsForType:function(e,t){this.parent&&r("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,n){this.parent&&r("typeInjection");var i=this.typeInjections.get(e);i||(i=[],this.typeInjections.set(e,i)),i.push({property:t,fullName:n})},injection:function(e,t,n){if(this.parent&&r("injection"),-1===e.indexOf(":"))return this.typeInjection(e,t,n);var i=this.injections[e]=this.injections[e]||[];i.push({property:t,fullName:n})},destroy:function(){this.isDestroyed=!0;for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],u(this,function(e){e.isDestroying=!0}),u(this,function(e){e.destroy()}),delete this.parent,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;t>e;e++)c(this.children[e]);c(this)}},t})}(),function(){function e(r,n,i,o){var s,a,u;if("object"!=typeof r||null===r)return r;if(n&&(a=t(i,r))>=0)return o[a];if("array"===Ember.typeOf(r)){if(s=r.slice(),n)for(a=s.length;--a>=0;)s[a]=e(s[a],n,i,o)}else if(Ember.Copyable&&Ember.Copyable.detect(r))s=r.copy(n,i,o);else{s={};for(u in r)r.hasOwnProperty(u)&&"__"!==u.substring(0,2)&&(s[u]=n?e(r[u],n,i,o):r[u])}return n&&(i.push(r),o.push(s)),s}var t=Ember.EnumerableUtils.indexOf;Ember.compare=function r(e,t){if(e===t)return 0;var n=Ember.typeOf(e),i=Ember.typeOf(t),o=Ember.Comparable;if(o){if("instance"===n&&o.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===i&&o.detect(t.constructor))return 1-t.constructor.compare(t,e)}var s=Ember.ORDER_DEFINITION_MAPPING;if(!s){var a=Ember.ORDER_DEFINITION;s=Ember.ORDER_DEFINITION_MAPPING={};var u,c;for(u=0,c=a.length;c>u;++u)s[a[u]]=u;delete Ember.ORDER_DEFINITION}var l=s[n],h=s[i];if(h>l)return-1;if(l>h)return 1;switch(n){case"boolean":case"number":return t>e?-1:e>t?1:0;case"string":var m=e.localeCompare(t);return 0>m?-1:m>0?1:0;case"array":for(var f=e.length,p=t.length,d=Math.min(f,p),b=0,E=0;0===b&&d>E;)b=r(e[E],t[E]),E++;return 0!==b?b:p>f?-1:f>p?1:0;case"instance":return Ember.Comparable&&Ember.Comparable.detect(e)?e.compare(e,t):0;case"date":var v=e.getTime(),g=t.getTime();return g>v?-1:v>g?1:0;default:return 0}},Ember.copy=function(t,r){return"object"!=typeof t||null===t?t:Ember.Copyable&&Ember.Copyable.detect(t)?t.copy(r):e(t,r,r?[]:null,r?[]:null)},Ember.inspect=function(e){if("object"!=typeof e||null===e)return e+"";var t,r=[];for(var n in e)if(e.hasOwnProperty(n)){if(t=e[n],"toString"===t)continue;"function"===Ember.typeOf(t)&&(t="function() { ... }"),r.push(n+": "+t)}return"{"+r.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 r in e)e.hasOwnProperty(r)&&t.push(r);return t});var n=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){for(var e=Error.prototype.constructor.apply(this,arguments),t=0;n.length>t;t++)this[n[t]]=e[n[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){Ember.RSVP=t("rsvp")}(),function(){var e=/[ _]/g,t={},r=/([a-z])([A-Z])/g,n=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,o=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var r=0;return e.replace(/%@([0-9]+)?/g,function(e,n){return n=n?parseInt(n,0)-1:r++,e=t[n],(null===e?"(null)":void 0===e?"":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(r,"$1_$2").toLowerCase()},dasherize:function(r){var n,i=t,o=i.hasOwnProperty(r);return o?i[r]:(n=Ember.String.decamelize(r).replace(e,"-"),i[r]=n,n)},camelize:function(e){return e.replace(n,function(e,t,r){return r?r.toUpperCase():""}).replace(/^([A-Z])/,function(e){return e.toLowerCase()})},classify:function(e){for(var t=e.split("."),r=[],n=0,i=t.length;i>n;n++){var o=Ember.String.camelize(t[n]);r.push(o.charAt(0).toUpperCase()+o.substr(1))}return r.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(o,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,r=Ember.String.loc,n=Ember.String.camelize,i=Ember.String.decamelize,o=Ember.String.dasherize,s=Ember.String.underscore,a=Ember.String.capitalize,u=Ember.String.classify;(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 r(this,arguments)},String.prototype.camelize=function(){return n(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return o(this)},String.prototype.underscore=function(){return s(this)},String.prototype.classify=function(){return u(this)},String.prototype.capitalize=function(){return a(this)})}(),function(){var e=Array.prototype.slice;(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 e(){return 0===a.length?{}:a.pop()}function t(e){return a.push(e),null}function r(e,t){function r(r){var o=n(r,e);return i?t===o:!!o}var i=2===arguments.length;return r}var n=Ember.get,i=Ember.set,o=Array.prototype.slice,s=Ember.EnumerableUtils.indexOf,a=[];Ember.Enumerable=Ember.Mixin.create({isEnumerable:!0,nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(0===n(this,"length"))return void 0;var r,i=e();return r=this.nextObject(0,null,i),t(i),r}).property("[]"),lastObject:Ember.computed(function(){var r=n(this,"length");if(0===r)return void 0;var i,o=e(),s=0,a=null;do a=i,i=this.nextObject(s++,a,o);while(void 0!==i);return t(o),a}).property("[]"),contains:function(e){return void 0!==this.find(function(t){return t===e})},forEach:function(r,i){if("function"!=typeof r)throw new TypeError;var o=n(this,"length"),s=null,a=e();void 0===i&&(i=null);for(var u=0;o>u;u++){var c=this.nextObject(u,s,a);r.call(i,c,u,this),s=c}return s=null,a=t(a),this},getEach:function(e){return this.mapProperty(e)},setEach:function(e,t){return this.forEach(function(r){i(r,e,t)})},map:function(e,t){var r=Ember.A([]);return this.forEach(function(n,i,o){r[i]=e.call(t,n,i,o)}),r},mapProperty:function(e){return this.map(function(t){return n(t,e)})},filter:function(e,t){var r=Ember.A([]);return this.forEach(function(n,i,o){e.call(t,n,i,o)&&r.push(n)}),r},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterProperty:function(){return this.filter(r.apply(this,arguments))},rejectProperty:function(e,t){var r=function(r){return n(r,e)===t},i=function(t){return!!n(t,e)},o=2===arguments.length?r:i;return this.reject(o)},find:function(r,i){var o=n(this,"length");void 0===i&&(i=null);for(var s,a,u=null,c=!1,l=e(),h=0;o>h&&!c;h++)s=this.nextObject(h,u,l),(c=r.call(i,s,h,this))&&(a=s),u=s;return s=u=null,l=t(l),a},findProperty:function(){return this.find(r.apply(this,arguments))},every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyProperty:function(){return this.every(r.apply(this,arguments))},some:function(e,t){return!!this.find(function(r,n,i){return!!e.call(t,r,n,i)})},someProperty:function(){return this.some(r.apply(this,arguments))},reduce:function(e,t,r){if("function"!=typeof e)throw new TypeError;var n=t;return this.forEach(function(t,i){n=e.call(null,n,t,i,this,r)},this),n},invoke:function(e){var t,r=Ember.A([]);return arguments.length>1&&(t=o.call(arguments,1)),this.forEach(function(n,i){var o=n&&n[e];"function"==typeof o&&(r[i]=t?o.apply(n,t):o.call(n))},this),r},toArray:function(){var e=Ember.A([]);return this.forEach(function(t,r){e[r]=t}),e},compact:function(){return this.filter(function(e){return null!=e})},without:function(e){if(!this.contains(e))return this;var t=Ember.A([]);return this.forEach(function(r){r!==e&&(t[t.length]=r)}),t},uniq:function(){var e=Ember.A([]);return this.forEach(function(t){0>s(e,t)&&e.push(t)}),e},"[]":Ember.computed(function(){return this}),addEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),o||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),o&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),o&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.isNone),r=Ember.EnumerableUtils.map,n=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{isSCArray:!0,length:Ember.required(),objectAt:function(t){return 0>t||t>=e(this,"length")?void 0: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,r){return void 0!==r&&this.replace(0,e(this,"length"),r),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(r,n){var i=Ember.A([]),o=e(this,"length");for(t(r)&&(r=0),(t(n)||n>o)&&(n=o),0>r&&(r=o+r),0>n&&(n=o+n);n>r;)i[i.length]=this.objectAt(r++);return i},indexOf:function(t,r){var n,i=e(this,"length");for(void 0===r&&(r=0),0>r&&(r+=i),n=r;i>n;n++)if(this.objectAt(n,!0)===t)return n;return-1},lastIndexOf:function(t,r){var n,i=e(this,"length");for((void 0===r||r>=i)&&(r=i-1),0>r&&(r+=i),n=r;n>=0;n--)if(this.objectAt(n)===t)return n;return-1},addArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,n),Ember.addListener(this,"@array:change",t,i),o||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,n),Ember.removeListener(this,"@array:change",t,i),o&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,r,n){void 0===t?(t=0,r=n=-1):(void 0===r&&(r=-1),void 0===n&&(n=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,r,n]);var i,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){i=[],o=t+r;for(var s=t;o>s;s++)i.push(this.objectAt(s))}else i=r;return this.enumerableContentWillChange(i,n),this},arrayContentDidChange:function(t,r,i){void 0===t?(t=0,r=i=-1):(void 0===r&&(r=-1),void 0===i&&(i=-1));var o,s;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){o=[],s=t+i;for(var a=t;s>a;a++)o.push(this.objectAt(a))}else o=i;this.enumerableContentDidChange(r,o),Ember.sendEvent(this,"@array:change",[this,t,r,i]);var u=e(this,"length"),c=n(this,"firstObject"),l=n(this,"lastObject");return this.objectAt(0)!==c&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-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;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=[],r=Ember.get;Ember.set,Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var e=r(this,"length");return 0===e?this:(this.replace(0,e,t),this)},insertAt:function(t,n){if(t>r(this,"length"))throw new Error(e);return this.replace(t,0,[n]),this},removeAt:function(n,i){if("number"==typeof n){if(0>n||n>=r(this,"length"))throw new Error(e);void 0===i&&(i=1),this.replace(n,i,t)}return this},pushObject:function(e){return this.insertAt(r(this,"length"),e),e},pushObjects:function(e){return this.replace(r(this,"length"),0,e),this},popObject:function(){var e=r(this,"length");if(0===e)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(0===r(this,"length"))return null;var e=this.objectAt(0);
17
+ 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=r(this,"length");if(0===e)return this;var t=this.toArray().reverse();return this.replace(0,e,t),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this.replace(0,t,e),this},removeObject:function(e){for(var t=r(this,"length")||0;--t>=0;){var n=this.objectAt(t);n===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;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){var t={},r=arguments;1===arguments.length&&"array"===Ember.typeOf(arguments[0])&&(r=arguments[0]);for(var n=0;r.length>n;n++)t[r[n]]=e(this,r[n]);return t},set:function(e,r){return t(this,e,r),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,r){Ember.addBeforeObserver(this,e,t,r)},addObserver:function(e,t,r){Ember.addObserver(this,e,t,r)},removeObserver:function(e,t,r){Ember.removeObserver(this,e,t,r)},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(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)+n),e(this,r)},decrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)-n),e(this,r)},toggleProperty:function(r){return t(this,r,!e(this,r)),e(this,r)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){var e=Ember.get;Ember.set,Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,actionContext:null,targetObject:Ember.computed(function(){var t=e(this,"target");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("target"),actionContextObject:Ember.computed(function(){var t=e(this,"actionContext");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("actionContext"),triggerAction:function(t){t=t||{};var r=t.action||e(this,"action"),n=t.target||e(this,"targetObject"),i=t.actionContext||e(this,"actionContextObject")||this;if(n&&r){var o;return o=n.send?n.send.apply(n,[r,i]):n[r].apply(n,[i]),o!==!1&&(o=!0),o}return!1}})}(),function(){Ember.Evented=Ember.Mixin.create({on:function(e,t,r){return Ember.addListener(this,e,t,r),this},one:function(e,t,r){return r||(r=t,t=null),Ember.addListener(this,e,t,r,!0),this},trigger:function(e){var t,r,n=[];for(t=1,r=arguments.length;r>t;t++)n.push(arguments[t]);Ember.sendEvent(this,e,n)},fire:function(){this.trigger.apply(this,arguments)},off:function(e,t,r){return Ember.removeListener(this,e,t,r),this},has:function(e){return Ember.hasListeners(this,e)}})}(),function(){var e=t("rsvp");e.configure("async",function(e,t){Ember.run.schedule("actions",t,e)});var r=Ember.get;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t){var n,i,o;return o=this,n=r(this,"_deferred"),i=n.promise,i.then(function(t){return t===i?e(o):e(t)},function(e){return t(e)})},resolve:function(e){var t,n;t=r(this,"_deferred"),n=t.promise,e===this?t.resolve(n):t.resolve(e)},reject:function(e){r(this,"_deferred").reject(e)},_deferred:Ember.computed(function(){return new e.defer})})}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){function e(){var e,t,o=!1,s=function(){o||s.proto(),n(this,i,v),n(this,"_super",v);var u=a(this);if(u.proto=this,e){var l=e;e=null,this.reopen.apply(this,l)}if(t){var h=t;t=null;for(var m=this.concatenatedProperties,f=0,d=h.length;d>f;f++){var g=h[f];for(var y in g)if(g.hasOwnProperty(y)){var w=g[y],_=Ember.IS_BINDING;if(_.test(y)){var C=u.bindings;C?u.hasOwnProperty("bindings")||(C=u.bindings=r(u.bindings)):C=u.bindings={},C[y]=w}var O=u.descs[y];if(m&&E(m,y)>=0){var S=this[y];w=S?"function"==typeof S.concat?S.concat(w):Ember.makeArray(S).concat(w):Ember.makeArray(w)}O?O.set(this,y,w):"function"!=typeof this.setUnknownProperty||y in this?b?Ember.defineProperty(this,y,null,w):this[y]=w:this.setUnknownProperty(y,w)}}}p(this,u),delete u.proto,c(this),this.init.apply(this,arguments)};return s.toString=m.prototype.toString,s.willReopen=function(){o&&(s.PrototypeMixin=m.create(s.PrototypeMixin)),o=!1},s._initMixins=function(t){e=t},s._initProperties=function(e){t=e},s.proto=function(){var e=s.superclass;return e&&e.proto(),o||(o=!0,s.PrototypeMixin.applyPartial(s.prototype),u(s.prototype)),this.prototype},s}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,o=Ember.guidFor,s=Ember.generateGuid,a=Ember.meta,u=Ember.rewatch,c=Ember.finishChains,l=Ember.destroy,h=Ember.run.schedule,m=Ember.Mixin,f=m._apply,p=m.finishPartial,d=m.prototype.reopen,b=Ember.ENV.MANDATORY_SETTER,E=Ember.EnumerableUtils.indexOf,v={configurable:!0,writable:!0,enumerable:!1,value:void 0},g=e();g.toString=function(){return"Ember.CoreObject"},g.PrototypeMixin=m.create({reopen:function(){return f(this,arguments,!0),this},isInstance:!0,init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this._didCallDestroy?void 0:(this.isDestroying=!0,this._didCallDestroy=!0,h("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.willDestroy&&this.willDestroy(),l(this),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(){var e="function"==typeof this.toStringExtension,r=e?":"+this.toStringExtension():"",n="<"+this.constructor.toString()+":"+o(this)+r+">";return this.toString=t(n),n}}),g.PrototypeMixin.ownerConstructor=g,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(g.PrototypeMixin),g.__super__=null;var y=m.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,n=e();return n.ClassMixin=m.create(this.ClassMixin),n.PrototypeMixin=m.create(this.PrototypeMixin),n.ClassMixin.ownerConstructor=n,n.PrototypeMixin.ownerConstructor=n,d.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,s(t,"ember"),a(t).proto=t,n.ClassMixin.apply(n),n},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(),d.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return d.apply(this.ClassMixin,arguments),f(this,arguments,!1),this},detect:function(e){if("function"!=typeof e)return!1;for(;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 r,n=this.proto(),i=a(n).descs,o={};for(var s in i)r=i[s],r instanceof Ember.ComputedProperty&&e.call(t||this,s,r._meta||o)}});y.ownerConstructor=g,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(y),g.ClassMixin=y,y.apply(g),Ember.CoreObject=g}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var s=t.length;c[t.join(".")]=r;for(var a in r)if(l.call(r,a)){var u=r[a];if(t[s]=a,u&&u.toString===n)u.toString=o(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[h(u)])continue;i[h(u)]=!0,e(t,u,i)}}t.length=s}function t(){var e,t,r=Ember.Namespace,n=Ember.lookup;if(!r.PROCESSED)for(var i in n)if("parent"!==i&&"top"!==i&&"frameElement"!==i&&"webkitStorageInfo"!==i&&!("globalStorage"===i&&n.StorageList&&n.globalStorage instanceof n.StorageList||n.hasOwnProperty&&!n.hasOwnProperty(i))){try{e=Ember.lookup[i],t=e&&e.isNamespace}catch(o){continue}t&&(e[m]=i)}}function r(e){var t=e.superclass;return t?t[m]?t[m]:r(t):void 0}function n(){Ember.BOOTED||this[m]||i();var e;if(this[m])e=this[m];else{var t=r(this);e=t?"(subclass of "+t+")":"(unknown mixin)",this.toString=o(e)}return e}function i(){var r=!u.PROCESSED,n=Ember.anyUnprocessedMixins;if(r&&(t(),u.PROCESSED=!0),r||n){for(var i,o=u.NAMESPACES,s=0,a=o.length;a>s;s++)i=o[s],e([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function o(e){return function(){return e}}var s=Ember.get,a=Ember.ArrayPolyfills.indexOf,u=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var e=s(this,"name");return e?e:(t(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){e([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=void 0,e.splice(a.call(e,this),1),this._super()}});u.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:i,byName:function(e){return Ember.BOOTED||i(),c[e]}});var c=u.NAMESPACES_BY_ID,l={}.hasOwnProperty,h=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){var e="Index out of range",t=[],r=Ember.get;Ember.set,Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(e){return r(this,"arrangedContent").objectAt(e)},replaceContent:function(e,t,n){r(this,"content").replace(e,t,n)},_contentWillChange:Ember.beforeObserver(function(){this._teardownContent()},"content"),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){r(this,"content"),this._setupContent()},"content"),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this.arrangedContentArrayWillChange(this,0,t,void 0),this.arrangedContentWillChange(this),this._teardownArrangedContent(e)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)},"arrangedContent"),_setupArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(e){return r(this,"content")&&this.objectAtContent(e)},length:Ember.computed(function(){var e=r(this,"arrangedContent");return e?r(e,"length"):0}),_replace:function(e,t,n){var i=r(this,"content");return i&&this.replaceContent(e,t,n),this},replace:function(){if(r(this,"arrangedContent")!==r(this,"content"))throw new Ember.Error("Using replace on an arranged ArrayProxy is not allowed.");this._replace.apply(this,arguments)},_insertAt:function(t,n){if(t>r(this,"content.length"))throw new Error(e);return this._replace(t,0,[n]),this},insertAt:function(e,t){if(r(this,"arrangedContent")===r(this,"content"))return this._insertAt(e,t);throw new Ember.Error("Using insertAt on an arranged ArrayProxy is not allowed.")},removeAt:function(n,i){if("number"==typeof n){var o,s=r(this,"content"),a=r(this,"arrangedContent"),u=[];if(0>n||n>=r(this,"length"))throw new Error(e);for(void 0===i&&(i=1),o=n;n+i>o;o++)u.push(s.indexOf(a.objectAt(o)));for(u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),o=0;u.length>o;o++)this._replace(u[o],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(r(this,"content.length"),e),e},pushObjects:function(e){return this._replace(r(this,"length"),0,e),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this._replace(0,t,e),this},unshiftObject:function(e){return this._insertAt(0,e),e},unshiftObjects:function(e){return this._replace(0,0,e),this},slice:function(){var e=this.toArray();return e.slice.apply(e,arguments)},arrangedContentArrayWillChange:function(e,t,r,n){this.arrayContentWillChange(t,r,n)},arrangedContentArrayDidChange:function(e,t,r,n){this.arrayContentDidChange(t,r,n)},init:function(){this._super(),this._setupContent(),this._setupArrangedContent()},willDestroy:function(){this._teardownArrangedContent(),this._teardownContent()}})}(),function(){function e(e,t){var r=t.slice(8);r in this||u(this,r)}function t(e,t){var r=t.slice(8);r in this||c(this,r)}var r=Ember.get,n=Ember.set,i=(Ember.String.fmt,Ember.addBeforeObserver),o=Ember.addObserver,s=Ember.removeBeforeObserver,a=Ember.removeObserver,u=Ember.propertyWillChange,c=Ember.propertyDidChange;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;i(this,n,null,e),o(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;s(this,n,null,e),a(this,n,null,t)},unknownProperty:function(e){var t=r(this,"content");return t?r(t,e):void 0},setUnknownProperty:function(e,t){var i=r(this,"content");return n(i,e,t)}}),Ember.ObjectProxy.reopenClass({create:function(){var e,t,r,n,i,o;if(arguments.length){for(t=this.proto(),r=0,n=arguments.length;n>r;r++){i=arguments[r];for(o in i)!i.hasOwnProperty(o)||o in t||(e||(e={}),e[o]=null)}e&&this._initMixins([e])}return this._super.apply(this,arguments)}})}(),function(){function e(e,t,r,i,o){var s,a=r._objects;for(a||(a=r._objects={});--o>=i;){var u=e.objectAt(o);u&&(Ember.addBeforeObserver(u,t,r,"contentKeyWillChange"),Ember.addObserver(u,t,r,"contentKeyDidChange"),s=n(u),a[s]||(a[s]=[]),a[s].push(o))}}function t(e,t,r,i,o){var s=r._objects;s||(s=r._objects={});for(var a,u;--o>=i;){var c=e.objectAt(o);c&&(Ember.removeBeforeObserver(c,t,r,"contentKeyWillChange"),Ember.removeObserver(c,t,r,"contentKeyDidChange"),u=n(c),a=s[u],a[a.indexOf(o)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,o=Ember.Object.extend(Ember.Array,{init:function(e,t,r){this._super(),this._keyName=t,this._owner=r,this._content=e},objectAt:function(e){var t=this._content.objectAt(e);return t&&r(t,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?r(e,"length"):0})}),s=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),i(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e){var t;return t=new o(this._content,e,this),Ember.defineProperty(this,e,null,t),this.beginObservingContentKey(e),t},arrayWillChange:function(e,r,n){var i,o,s=this._keys;o=n>0?r+n:-1,Ember.beginPropertyChanges(this);for(i in s)s.hasOwnProperty(i)&&(o>0&&t(e,i,this,r,o),Ember.propertyWillChange(this,i));Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(t,r,n,i){var o,s,a=this._keys;s=i>0?r+i:-1,Ember.beginPropertyChanges(this);for(o in a)a.hasOwnProperty(o)&&(s>0&&e(t,o,this,r,s),Ember.propertyDidChange(this,o));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(t){var n=this._keys;if(n||(n=this._keys={}),n[t])n[t]++;else{n[t]=1;var i=this._content,o=r(i,"length");e(i,t,this,0,o)}},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&0>=--n[e]){var i=this._content,o=r(i,"length");t(i,e,this,0,o)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get;Ember.set;var t=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return"length"===e?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(t,r,n){if(this.isFrozen)throw Ember.FROZEN_ERROR;var i=n?e(n,"length"):0;if(this.arrayContentWillChange(t,r,i),n&&0!==n.length){var o=[t,r].concat(n);this.splice.apply(this,o)}else this.splice(t,r);return this.arrayContentDidChange(t,r,i),this},unknownProperty:function(e,t){var r;return void 0!==t&&void 0===r&&(r=this[e]=t),r},indexOf:function(e,t){var r,n=this.length;for(t=void 0===t?0:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;n>r;r++)if(this[r]===e)return r;return-1},lastIndexOf:function(e,t){var r,n=this.length;for(t=void 0===t?n-1:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;r>=0;r--)if(this[r]===e)return r;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),r=["length"];Ember.EnumerableUtils.forEach(t.keys(),function(e){Array.prototype[e]&&r.push(e)}),r.length>0&&(t=t.without.apply(t,r)),Ember.NativeArray=t,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){t.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.get,t=Ember.set,r=Ember.guidFor,n=Ember.isNone,i=Ember.String.fmt;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 n=e(this,"length");if(0===n)return this;var i;this.enumerableContentWillChange(n,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var o=0;n>o;o++)i=r(this[o]),delete this[i],delete this[o];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(n,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var r=e(this,"length");if(e(t,"length")!==r)return!1;for(;--r>=0;)if(!t.contains(this[r]))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]:void 0}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:void 0}),addObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,s=r(i),a=this[s],u=e(this,"length");return a>=0&&u>a&&this[a]===i?this:(o=[i],this.enumerableContentWillChange(null,o),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,o),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,s,a=r(i),u=this[a],c=e(this,"length"),l=0===u,h=u===c-1;return u>=0&&c>u&&this[u]===i&&(s=[i],this.enumerableContentWillChange(s,null),l&&Ember.propertyWillChange(this,"firstObject"),h&&Ember.propertyWillChange(this,"lastObject"),c-1>u&&(o=this[c-1],this[u]=o,this[r(o)]=u),delete this[a],delete this[c-1],t(this,"length",c-1),l&&Ember.propertyDidChange(this,"firstObject"),h&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(s,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,o=e(this,"length");for(t(i,"length",o);--o>=0;)i[o]=this[o],i[r(this[o])]=o;return i},toString:function(){var e,t=this.length,r=[];for(e=0;t>e;e++)r[e]=this[e];return i("Ember.Set<%@>",[r.join(",")])}})}(),function(){var e=Ember.DeferredMixin;Ember.get;var t=Ember.Object.extend(e);t.reopenClass({promise:function(e,r){var n=t.create();return e.call(r,n),n}}),Ember.Deferred=t}(),function(){var e=Ember.ArrayPolyfills.forEach,t=Ember.ENV.EMBER_LOAD_HOOKS||{},r={};Ember.onLoad=function(e,n){var i;t[e]=t[e]||Ember.A(),t[e].pushObject(n),(i=r[e])&&n(i)},Ember.runLoadHooks=function(n,i){r[n]=i,t[n]&&e.call(t[n],function(e){e(i)})}}(),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 r,n=[].slice.call(arguments,1);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,Ember.EnumerableUtils.forEach);Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,orderBy:function(r,n){var i=0,o=e(this,"sortProperties"),s=e(this,"sortAscending");return t(o,function(t){0===i&&(i=Ember.compare(e(r,t),e(n,t)),0===i||s||(i=-1*i))}),i},destroy:function(){var r=e(this,"content"),n=e(this,"sortProperties");return r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(){var r=e(this,"content"),n=e(this,"isSorted"),i=e(this,"sortProperties"),o=this;return r&&n?(r=r.slice(),r.sort(function(e,t){return o.orderBy(e,t)}),t(r,function(e){t(i,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(r)):r}),_contentWillChange:Ember.beforeObserver(function(){var r=e(this,"content"),n=e(this,"sortProperties");r&&n&&t(r,function(e){t(n,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(r,n,i,o){var s=e(this,"isSorted");if(s){var a=e(this,"arrangedContent"),u=r.slice(n,n+i),c=e(this,"sortProperties");t(u,function(e){a.removeObject(e),t(c,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},contentArrayDidChange:function(r,n,i,o){var s=e(this,"isSorted"),a=e(this,"sortProperties");if(s){var u=r.slice(n,n+o);t(u,function(e){this.insertItemSorted(e),t(a,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},insertItemSorted:function(t){var r=e(this,"arrangedContent"),n=e(r,"length"),i=this._binarySearch(t,0,n);r.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var r=e(this,"arrangedContent"),n=r.indexOf(t),i=r.objectAt(n-1),o=r.objectAt(n+1),s=i&&this.orderBy(t,i),a=o&&this.orderBy(t,o);(0>s||a>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,o,s,a;return r===n?r:(a=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),o=a.objectAt(i),s=this.orderBy(o,t),0>s?this._binarySearch(t,i+1,n):s>0?this._binarySearch(t,r,i):i)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach),r=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(){return e(this,"itemController")},objectAtContent:function(t){var r=e(this,"length"),n=e(this,"arrangedContent"),i=n&&n.objectAt(t);if(t>=0&&r>t){var o=this.lookupItemController(i);if(o)return this.controllerAt(t,i,o)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,o){var s=e(this,"_subControllers"),a=s.slice(n,n+i);t(a,function(e){e&&e.destroy()}),r(s,n,i,new Array(o)),this._super(n,i,o)},init:function(){this.get("content")||Ember.defineProperty(this,"content",void 0,Ember.A()),this._super(),this.set("_subControllers",Ember.A())},controllerAt:function(t,r,n){var i=e(this,"container"),o=e(this,"_subControllers"),s=o[t];if(s||(s=i.lookup("controller:"+n,{singleton:!1}),o[t]=s),!s)throw new Error('Could not resolve itemController: "'+n+'"');return s.set("target",this),s.set("content",r),s},_subControllers:null,_resetSubControllers:function(){var r=e(this,"_subControllers");r&&t(r,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){var e=Ember.imports.jQuery;Ember.$=e}(),function(){if(Ember.$){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 e(e){var t=e.shiftKey||e.metaKey||e.altKey||e.ctrlKey,r=e.which>1;return!t&&!r}var t=this.document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),r=this.document&&function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r,i,o,s=e.childNodes.length;for(r=0;s>r;r++)if(i=e.childNodes[r],o=1===i.nodeType&&n(i,t))return o},i=function(e,i){t&&(i="&shy;"+i);var o=[];if(r&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,n){return o.push([n,t]),r})),e.innerHTML=i,o.length>0){var s,a=o.length;for(s=0;a>s;s++){var u=n(e,o[s][0]),c=document.createTextNode(o[s][1]);u.parentNode.insertBefore(c,u)}}if(t){for(var l=e.firstChild;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&"­"===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}},o={},s=function(e){if(void 0!==o[e])return o[e];var t=!0;if("select"===e.toLowerCase()){var r=document.createElement("select");i(r,'<option value="test">Test</option>'),t=1===r.options.length}return o[e]=t,t},a=function(e,t){var r=e.tagName;if(s(r))i(e,t);else{var n=e.outerHTML||(new XMLSerializer).serializeToString(e),o=n.match(new RegExp("<"+r+"([^>]*)>","i"))[0],a="</"+r+">",u=document.createElement("div");for(i(u,o+t+a),e=u.firstChild;e.tagName!==r;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:a,isSimpleClick:e}}(),function(){Ember.get,Ember.set;var e=function(){this.seen={},this.list=[]};e.prototype={add:function(e){e in this.seen||(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,_hasElement:!0,elementClasses:null,classes:null,elementId:null,elementAttributes:null,elementProperties:null,elementTag:null,elementStyle:null,parentBuffer:null,push:function(e){return this.buffer+=e,this},addClass:function(t){return this.elementClasses=this.elementClasses||new e,this.elementClasses.add(t),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 r=this.elementAttributes=this.elementAttributes||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeAttr:function(e){var t=this.elementAttributes;return t&&delete t[e],this},prop:function(e,t){var r=this.elementProperties=this.elementProperties||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeProp:function(e){var t=this.elementProperties;return t&&delete t[e],this},style:function(e,t){return this.elementStyle=this.elementStyle||{},this.elementStyle[e]=t,this},begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var e=this.currentTagName();if(e){if(this._hasElement&&!this._element&&0===this.buffer.length)return this._element=this.generateElement(),void 0;var t,r,n=this.buffer,i=this.elementId,o=this.classes,s=this.elementAttributes,a=this.elementProperties,u=this.elementStyle;if(n+="<"+e,i&&(n+=' id="'+this._escapeAttribute(i)+'"',this.elementId=null),o&&(n+=' class="'+this._escapeAttribute(o.join(" "))+'"',this.classes=null),u){n+=' style="';for(r in u)u.hasOwnProperty(r)&&(n+=r+":"+this._escapeAttribute(u[r])+";");n+='"',this.elementStyle=null}if(s){for(t in s)s.hasOwnProperty(t)&&(n+=" "+t+'="'+this._escapeAttribute(s[t])+'"');this.elementAttributes=null}if(a){for(r in a)if(a.hasOwnProperty(r)){var c=a[r];(c||"number"==typeof c)&&(n+=c===!0?" "+r+'="'+r+'"':" "+r+'="'+this._escapeAttribute(a[r])+'"')}this.elementProperties=null}n+=">",this.buffer=n}},pushClosingTag:function(){var e=this.tagNames.pop();e&&(this.buffer+="</"+e+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var e,t,r=this.tagNames.pop(),n=document.createElement(r),i=Ember.$(n),o=this.elementId,s=this.classes,a=this.elementAttributes,u=this.elementProperties,c=this.elementStyle,l="";if(o&&(i.attr("id",o),this.elementId=null),s&&(i.attr("class",s.join(" ")),this.classes=null),c){for(t in c)c.hasOwnProperty(t)&&(l+=t+":"+c[t]+";");i.attr("style",l),this.elementStyle=null}if(a){for(e in a)a.hasOwnProperty(e)&&i.attr(e,a[e]);this.elementAttributes=null}if(u){for(t in u)u.hasOwnProperty(t)&&i.prop(t,u[t]);this.elementProperties=null}return n},element:function(){var e=this.innerString();return e&&(this._element=Ember.ViewUtils.setInnerHTML(this._element,e)),this._element},string:function(){if(this._hasElement&&this._element){var e=this.element(),t=e.outerHTML;return"undefined"==typeof t?Ember.$("<div/>").append(e).html():t}return this.innerString()},innerString:function(){return this.buffer},_escapeAttribute:function(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r=/&(?!\w+;)|[<>"'`]/g,n=/[&<>"'`]/,i=function(e){return t[e]||"&amp;"},o=e.toString();return n.test(o)?o.replace(r,i):o}}}(),function(){var e=Ember.get,t=Ember.set;Ember.String.fmt,Ember.EventDispatcher=Ember.Object.extend({rootElement:"body",setup:function(r,n){var i,o={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(o,r||{}),Ember.isNone(n)||t(this,"rootElement",n),n=Ember.$(e(this,"rootElement")),n.addClass("ember-application");for(i in o)o.hasOwnProperty(i)&&this.setupHandler(n,i,o[i])},setupHandler:function(e,t,r){var n=this;e.delegate(".ember-view",t+".ember",function(e,t){return Ember.handleErrors(function(){var i=Ember.View.views[this.id],o=!0,s=null;return s=n._findNearestEventManager(i,r),s&&s!==t?o=n._dispatchEvent(s,e,r,i):i?o=n._bubbleEvent(i,e,r):e.stopPropagation(),o},this)}),e.delegate("[data-ember-action]",t+".ember",function(e){return Ember.handleErrors(function(){var t=Ember.$(e.currentTarget).attr("data-ember-action"),n=Ember.Handlebars.ActionHelper.registeredActions[t];
18
+ return n&&n.eventName===r?n.handler(e):void 0},this)})},_findNearestEventManager:function(t,r){for(var n=null;t&&(n=e(t,"eventManager"),!n||!n[r]);)t=e(t,"parentView");return n},_dispatchEvent:function(e,t,r,n){var i=!0,o=e[r];return"function"===Ember.typeOf(o)?(i=o.call(e,t,n),t.stopPropagation()):i=this._bubbleEvent(n,t,r),i},_bubbleEvent:function(e,t,r){return Ember.run(function(){return e.handleEvent(r,t)})},destroy:function(){var t=e(this,"rootElement");return Ember.$(t).undelegate(".ember").removeClass("ember-application"),this._super()}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+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 r=e(this,"_childContainers");for(var n in r)r.hasOwnProperty(n)&&r[n].destroy();t(this,"_childContainers",{})},"model")})}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var t={},r=Ember.get,n=Ember.set,i=Ember.guidFor,o=Ember.EnumerableUtils.forEach,s=Ember.EnumerableUtils.addObject,a=Ember.computed(function(){var e=this._childViews,t=Ember.A(),n=this;return o(e,function(e){e.isVirtual?t.pushObjects(r(e,"childViews")):t.push(e)}),t.replace=function(e,t,r){if(n instanceof Ember.ContainerView)return n.replace(e,t,r);throw new Error("childViews is immutable")},t});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,{isView:!0,states:t,init:function(){this._super(),this.transitionTo("preRender")},parentView:Ember.computed(function(){var e=this._parentView;return e&&e.isVirtual?r(e,"parentView"):e}).property("_parentView"),state:null,_parentView:null,concreteView:Ember.computed(function(){return this.isVirtual?r(this,"parentView"):this}).property("parentView"),instrumentName:"core_view",instrumentDetails:function(e){e.object=this.toString()},renderToBuffer:function(e,t){var r="render."+this.instrumentName,n={};return this.instrumentDetails(n),Ember.instrument(r,n,function(){return this._renderToBuffer(e,t)},this)},_renderToBuffer:function(e){var t=this.tagName;Ember.isNone(t)&&(t="div");var r=this.buffer=e&&e.begin(t)||Ember.RenderBuffer(t);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 r,n,i=[];for(r=1,n=arguments.length;n>r;r++)i.push(arguments[r]);return t.apply(this,i)}},has:function(e){return"function"===Ember.typeOf(this[e])||this._super(e)},destroy:function(){var e=this._parentView;if(this._super())return this.removedFromDOM||this.destroyElement(),e&&e.removeChild(this),this.transitionTo("destroying",!1),this},clearRenderedChildren:Ember.K,triggerRecursively:Ember.K,invokeRecursively:Ember.K,transitionTo:Ember.K,destroyElement:Ember.K});var u=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};u.prototype={length:0,trigger:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],t.trigger&&t.trigger(e)},triggerRecursively:function(e){for(var t=this.views,r=0,n=t.length;n>r;r++)t[r].triggerRecursively(e)},invokeRecursively:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],e(t)},transitionTo:function(e,t){for(var r=this.views,n=0,i=r.length;i>n;n++)r[n].transitionTo(e,t)},push:function(){this.length+=arguments.length;var e=this.views;return e.push.apply(e,arguments)},objectAt:function(e){return this.views[e]},forEach:function(e){var t=this.views;return o(t,e)},clear:function(){this.length=0,this.views.length=0}};var c=[];Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,templates:Ember.TEMPLATES,template:Ember.computed(function(e,t){if(void 0!==t)return t;var n=r(this,"templateName"),i=this.templateForName(n,"template");return i||r(this,"defaultTemplate")}).property("templateName"),controller:Ember.computed(function(){var e=r(this,"_parentView");return e?r(e,"controller"):null}).property("_parentView"),layout:Ember.computed(function(){var e=r(this,"layoutName"),t=this.templateForName(e,"layout");return t||r(this,"defaultLayout")}).property("layoutName"),templateForName:function(e){if(e){var t=this.container||Ember.Container&&Ember.Container.defaultContainer;return t&&t.lookup("template:"+e)}},context:Ember.computed(function(e,t){return 2===arguments.length?(n(this,"_context",t),t):r(this,"_context")}).volatile(),_context:Ember.computed(function(){var e,t;return(t=r(this,"controller"))?t:(e=this._parentView,e?r(e,"_context"):null)}),_contextDidChange:Ember.observer(function(){this.rerender()},"context"),isVisible:!0,childViews:a,_childViews:c,_childViewsWillChange:Ember.beforeObserver(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}},"childViews"),_childViewsDidChange:Ember.observer(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}},"childViews"),nearestInstanceOf:function(e){for(var t=r(this,"parentView");t;){if(t instanceof e)return t;t=r(t,"parentView")}},nearestOfType:function(e){for(var t=r(this,"parentView"),n=e instanceof Ember.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};t;){if(n(t))return t;t=r(t,"parentView")}},nearestWithProperty:function(e){for(var t=r(this,"parentView");t;){if(e in t)return t;t=r(t,"parentView")}},nearestChildOf:function(e){for(var t=r(this,"parentView");t;){if(r(t,"parentView")instanceof e)return t;t=r(t,"parentView")}},_parentViewDidChange:Ember.observer(function(){this.isDestroying||r(this,"parentView.controller")&&!r(this,"controller")&&this.notifyPropertyChange("controller")},"_parentView"),_controllerDidChange:Ember.observer(function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))},"controller"),cloneKeywords:function(){var e=r(this,"templateData"),t=e?Ember.copy(e.keywords):{};return n(t,"view",r(this,"concreteView")),n(t,"_view",this),n(t,"controller",r(this,"controller")),t},render:function(e){var t=r(this,"layout")||r(this,"template");if(t){var n,i=r(this,"context"),o=this.cloneKeywords(),s={view:this,buffer:e,isRenderData:!0,keywords:o,insideGroup:r(this,"templateData.insideGroup")};n=t(i,{data:s}),void 0!==n&&e.push(n)}},rerender:function(){return this.currentState.rerender(this)},clearRenderedChildren:function(){for(var e=this.lengthBeforeRender,t=this.lengthAfterRender,r=this._childViews,n=t-1;n>=e;n--)r[n]&&r[n].destroy()},_applyClassNameBindings:function(e){var t,r,n,i=this.classNames;o(e,function(e){var o,a=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),t=this.$(),o&&(t.removeClass(o),i.removeObject(o)),r?(t.addClass(r),o=r):o=null};n=this._classStringForProperty(e),n&&(s(i,n),o=n),this.registerObserver(this,a.path,u),this.one("willClearRender",function(){o&&(i.removeObject(o),o=null)})},this)},_applyAttributeBindings:function(e,t){var n,i;o(t,function(t){var o=t.split(":"),s=o[0],a=o[1]||s,u=function(){i=this.$(),n=r(this,s),Ember.View.applyAttributeBindings(i,a,n)};this.registerObserver(this,s,u),n=r(this,s),Ember.View.applyAttributeBindings(e,a,n)},this)},_classStringForProperty:function(e){var t=Ember.View._parsePropertyPath(e),n=t.path,i=r(this,n);return void 0===i&&Ember.isGlobalPath(n)&&(i=r(Ember.lookup,n)),Ember.View._classStringForValue(n,i,t.className,t.falsyClassName)},element:Ember.computed(function(e,t){return void 0!==t?this.currentState.setElement(this,t):this.currentState.getElement(this)}).property("_parentView"),$:function(e){return this.currentState.$(this,e)},mutateChildViews:function(e){for(var t,r=this._childViews,n=r.length;--n>=0;)t=r[n],e(this,t,n);return this},forEachChildView:function(e){var t=this._childViews;if(!t)return this;var r,n,i=t.length;for(n=0;i>n;n++)r=t[n],e(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(r(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,t){for(var r,n,i=t===!1?this._childViews:[this];i.length;){r=i.slice(),i=[];for(var o=0,s=r.length;s>o;o++)n=r[o],e(n),n._childViews&&i.push.apply(i,n._childViews)}},triggerRecursively:function(e){for(var t,r,n=[this];n.length;){t=n.slice(),n=[];for(var i=0,o=t.length;o>i;i++)r=t[i],r.trigger&&r.trigger(e),r._childViews&&n.push.apply(n,r._childViews)}},viewHierarchyCollection:function(){for(var e,t=new u([this]),r=0;t.length>r;r++)e=t.objectAt(r),e._childViews&&t.push.apply(t,e._childViews);return t},destroyElement:function(){return this.currentState.destroyElement(this)},willDestroyElement:function(){},_notifyWillDestroyElement:function(){var e=this.viewHierarchyCollection();return e.trigger("willClearRender"),e.trigger("willDestroyElement"),e},_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=r(this,"templateName"),this._super(e)},_renderToBuffer:function(e,t){this.lengthBeforeRender=this._childViews.length;var r=this._super(e,t);return this.lengthAfterRender=this._childViews.length,r},renderToBufferIfNeeded:function(e){return this.currentState.renderToBufferIfNeeded(this,e)},beforeRender:function(e){this.applyAttributesToBuffer(e),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag()},applyAttributesToBuffer:function(e){var t=r(this,"classNameBindings");t.length&&this._applyClassNameBindings(t);var n=r(this,"attributeBindings");n.length&&this._applyAttributeBindings(e,n),e.setClasses(this.classNames),e.id(this.elementId);var i=r(this,"ariaRole");i&&e.attr("role",i),r(this,"isVisible")===!1&&e.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:c,attributeBindings:c,init:function(){this.elementId=this.elementId||i(this),this._super(),this._childViews=this._childViews.slice(),this.classNameBindings=Ember.A(this.classNameBindings.slice()),this.classNames=Ember.A(this.classNames.slice());var e=r(this,"viewController");e&&(e=r(e),e&&n(e,"view",this))},appendChild:function(e,t){return this.currentState.appendChild(this,e,t)},removeChild:function(e){if(!this.isDestroying){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,t){e.removeChild(t)})},destroyAllChildren:function(){return this.mutateChildViews(function(e,t){t.destroy()})},removeFromParent:function(){var e=this._parentView;return this.remove(),e&&e.removeChild(this),this},destroy:function(){var e,t,n=this._childViews,i=r(this,"parentView"),o=this.viewName;if(this._super()){for(e=n.length,t=e-1;t>=0;t--)n[t].removedFromDOM=!0;for(o&&i&&i.set(o,null),e=n.length,t=e-1;t>=0;t--)n[t].destroy();return this}},createChildView:function(e,t){return e.isView&&e._parentView===this?e:(Ember.CoreView.detect(e)?(t=t||{},t._parentView=this,t.container=this.container,t.templateData=t.templateData||r(this,"templateData"),e=e.create(t),e.viewName&&n(r(this,"concreteView"),e.viewName,e)):(t&&e.setProperties(t),r(e,"templateData")||n(e,"templateData",r(this,"templateData")),n(e,"_parentView",this)),e)},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer(function(){var e=this.$();if(e){var t=r(this,"isVisible");e.toggle(t),this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden())}},"isVisible"),_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameHidden()})},_isAncestorHidden:function(){for(var e=r(this,"parentView");e;){if(r(e,"isVisible")===!1)return!0;e=r(e,"parentView")}return!1},clearBuffer:function(){this.invokeRecursively(function(e){e.buffer=null})},transitionTo:function(e,t){var r=this.currentState,n=this.currentState=this.states[e];this.state=e,r&&r.exit&&r.exit(this),n.enter&&n.enter(this),t!==!1&&this.forEachChildView(function(t){t.transitionTo(e)})},handleEvent:function(e,t){return this.currentState.handleEvent(this,e,t)},registerObserver:function(e,t,r,n){n||"function"!=typeof r||(n=r,r=null);var i=this,o=function(){i.currentState.invokeObserver(this,n)},s=function(){Ember.run.scheduleOnce("render",this,o)};Ember.addObserver(e,t,r,s),this.one("willClearRender",function(){Ember.removeObserver(e,t,r,s)})}});var l={prepend:function(t,r){t.$().prepend(r),e()},after:function(t,r){t.$().after(r),e()},html:function(t,r){t.$().html(r),e()},replace:function(t){var i=r(t,"element");n(t,"element",null),t._insertElementLater(function(){Ember.$(i).replaceWith(r(t,"element")),e()})},remove:function(t){t.$().remove(),e()},empty:function(t){t.$().empty(),e()}};Ember.View.reopen({domManager:l}),Ember.View.reopenClass({_parsePropertyPath:function(e){var t,r,n=e.split(":"),i=n[0],o="";return n.length>1&&(t=n[1],3===n.length&&(r=n[2]),o=":"+t,r&&(o+=":"+r)),{path:i,classNames:o,className:""===t?void 0:t,falsyClassName:r}},_classStringForValue:function(e,t,r,n){if(r||n)return r&&t?r:n&&!t?n:null;if(t===!0){var i=e.split(".");return Ember.String.dasherize(i[i.length-1])}return t!==!1&&void 0!==t&&null!==t?t:null}});var h=Ember.Object.extend(Ember.Evented).create();Ember.View.addMutationListener=function(e){h.on("change",e)},Ember.View.removeMutationListener=function(e){h.off("change",e)},Ember.View.notifyMutationListeners=function(){h.trigger("change")},Ember.View.views={},Ember.View.childViewsProperty=a,Ember.View.applyAttributeBindings=function(e,t,r){var n=Ember.typeOf(r);"value"===t||"string"!==n&&("number"!==n||isNaN(r))?"value"===t||"boolean"===n?(void 0===r&&(r=null),r!==e.prop(t)&&e.prop(t,r)):r||e.removeAttr(t):r!==e.attr(t)&&e.attr(t,r)},Ember.View.states=t}(),function(){var e=(Ember.get,Ember.set);Ember.View.states._default={appendChild:function(){throw"You can't use appendChild outside of the rendering process"},$:function(){return void 0},getElement:function(){return null},handleEvent:function(){return!0},destroyElement:function(t){return e(t,"element",null),t._scheduledInsert&&(Ember.run.cancel(t._scheduledInsert),t._scheduledInsert=null),t},renderToBufferIfNeeded:function(){return!1},rerender:Ember.K,invokeObserver:Ember.K}}(),function(){var e=Ember.View.states.preRender=Ember.create(Ember.View.states._default);Ember.merge(e,{insertElement:function(e,t){e.createElement();var r=e.viewHierarchyCollection();r.trigger("willInsertElement"),t.call(e),r.transitionTo("inDOM",!1),r.trigger("didInsertElement")},renderToBufferIfNeeded:function(e,t){return e.renderToBuffer(t),!0},empty:Ember.K,setElement:function(e,t){return null!==t&&e.transitionTo("hasElement"),t}})}(),function(){Ember.get,Ember.set;var e=Ember.View.states.inBuffer=Ember.create(Ember.View.states._default);Ember.merge(e,{$:function(e){return e.rerender(),Ember.$()},rerender:function(){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,r){var n=e.buffer,i=e._childViews;return t=e.createChildView(t,r),i.length||(i=e._childViews=i.slice()),i.push(t),t.renderToBuffer(n),e.propertyDidChange("childViews"),t},destroyElement:function(e){e.clearBuffer();var t=e._notifyWillDestroyElement();return t.transitionTo("preRender",!1),e},empty:function(){},renderToBufferIfNeeded:function(){return!1},insertElement:function(){throw"You can't insert an element that has already been rendered"},setElement:function(e,t){return null===t?e.transitionTo("preRender"):(e.clearBuffer(),e.transitionTo("hasElement")),t},invokeObserver:function(e,t){t.call(e)}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.View.states.hasElement=Ember.create(Ember.View.states._default);Ember.merge(r,{$:function(t,r){var n=e(t,"element");return r?Ember.$(r,n):Ember.$(n)},getElement:function(t){var r=e(t,"parentView");return r&&(r=e(r,"element")),r?t.findElementInParentElement(r):Ember.$("#"+e(t,"elementId"))[0]},setElement:function(e,t){if(null!==t)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,r,n=e._childViews;if(n)for(t=n.length,r=0;t>r;r++)n[r]._notifyWillDestroyElement();e.domManager.empty(e)},handleEvent:function(e,t,r){return e.has(t)?e.trigger(t,r):!0},invokeObserver:function(e,t){t.call(e)}});var n=Ember.View.states.inDOM=Ember.create(r);Ember.merge(n,{enter:function(e){e.isVirtual||(Ember.View.views[e.elementId]=e),e.addBeforeObserver("elementId",function(){throw new Error("Changing a view's elementId after creation is not allowed")})},exit:function(e){this.isVirtual||delete Ember.View.views[e.elementId]},insertElement:function(){throw"You can't insert an element into the DOM that has already been inserted"}})}(),function(){var e="You can't call %@ on a view being destroyed",t=Ember.String.fmt,r=Ember.View.states.destroying=Ember.create(Ember.View.states._default);Ember.merge(r,{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(){return!1},insertElement:Ember.K})}(),function(){Ember.View.cloneStates=function(e){var t={};t._default={},t.preRender=Ember.create(t._default),t.destroying=Ember.create(t._default),t.inBuffer=Ember.create(t._default),t.hasElement=Ember.create(t._default),t.inDOM=Ember.create(t.hasElement);for(var r in e)e.hasOwnProperty(r)&&Ember.merge(t[r],e[r]);return t}}(),function(){function e(e,t,r,n){t.triggerRecursively("willInsertElement"),r?r.domManager.after(r,n.string()):e.domManager.prepend(e,n.string()),t.forEach(function(e){e.transitionTo("inDOM"),e.propertyDidChange("element"),e.triggerRecursively("didInsertElement")})}var t=Ember.View.cloneStates(Ember.View.states),r=Ember.get,n=Ember.set,i=Ember.EnumerableUtils.forEach,o=Ember._ViewCollection;Ember.ContainerView=Ember.View.extend(Ember.MutableArray,{states:t,init:function(){this._super();var e=r(this,"childViews");Ember.defineProperty(this,"childViews",Ember.View.childViewsProperty);var t=this._childViews;i(e,function(e,i){var o;"string"==typeof e?(o=r(this,e),o=this.createChildView(o),n(this,e,o)):o=this.createChildView(e),t[i]=o},this);var o=r(this,"currentView");o&&(t.length||(t=this._childViews=this._childViews.slice()),t.push(this.createChildView(o)))},replace:function(e,t,n){var i=n?r(n,"length"):0;if(this.arrayContentWillChange(e,t,i),this.childViewsWillChange(this._childViews,e,t),0===i)this._childViews.splice(e,t);else{var o=[e,t].concat(n);n.length&&!this._childViews.length&&(this._childViews=this._childViews.slice()),this._childViews.splice.apply(this._childViews,o)}return this.arrayContentDidChange(e,t,i),this.childViewsDidChange(this._childViews,e,t,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:"container",childViewsWillChange:function(e,t,r){if(this.propertyWillChange("childViews"),r>0){var n=e.slice(t,t+r);this.currentState.childViewsWillChange(this,e,t,r),this.initializeViews(n,null,null)}},removeChild:function(e){return this.removeObject(e),this},childViewsDidChange:function(e,t,n,i){if(i>0){var o=e.slice(t,t+i);this.initializeViews(o,this,r(this,"templateData")),this.currentState.childViewsDidChange(this,e,t,i)}this.propertyDidChange("childViews")},initializeViews:function(e,t,o){i(e,function(e){n(e,"_parentView",t),r(e,"templateData")||n(e,"templateData",o)})},currentView:null,_currentViewWillChange:Ember.beforeObserver(function(){var e=r(this,"currentView");e&&e.destroy()},"currentView"),_currentViewDidChange:Ember.observer(function(){var e=r(this,"currentView");e&&this.pushObject(e)},"currentView"),_ensureChildrenAreInDOM:function(){this.currentState.ensureChildrenAreInDOM(this)}}),Ember.merge(t._default,{childViewsWillChange:Ember.K,childViewsDidChange:Ember.K,ensureChildrenAreInDOM:Ember.K}),Ember.merge(t.inBuffer,{childViewsDidChange:function(){throw new Error("You cannot modify child views while in the inBuffer state")}}),Ember.merge(t.hasElement,{childViewsWillChange:function(e,t,r,n){for(var i=r;r+n>i;i++)t[i].remove()},childViewsDidChange:function(e){Ember.run.scheduleOnce("render",e,"_ensureChildrenAreInDOM")},ensureChildrenAreInDOM:function(t){var r,n,i,s,a,u=t._childViews,c=new o;for(r=0,n=u.length;n>r;r++)i=u[r],a||(a=Ember.RenderBuffer(),a._hasElement=!1),i.renderToBufferIfNeeded(a)?c.push(i):c.length?(e(t,c,s,a),a=null,s=i,c.clear()):s=i;c.length&&e(t,c,s,a)}})}(),function(){var e=Ember.get,t=Ember.set;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 r=t?e(t,"length"):0;this.arrayWillChange(t,0,r)},"content"),_contentDidChange:Ember.observer(function(){var t=e(this,"content");t&&t.addArrayObserver(this);var r=t?e(t,"length"):0;this.arrayDidChange(t,0,null,r)},"content"),destroy:function(){if(this._super()){var t=e(this,"content");return t&&t.removeArrayObserver(this),this._createdEmptyView&&this._createdEmptyView.destroy(),this}},arrayWillChange:function(t,r,n){var i=e(this,"emptyView");i&&i instanceof Ember.View&&i.removeFromParent();var o,s,a,u=this._childViews;a=this._childViews.length;var c=n===a;for(c&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),s=r+n-1;s>=r;s--)o=u[s],o.destroy()},arrayDidChange:function(r,n,i,o){var s,a,u,c,l=e(this,"itemViewClass"),h=[];if("string"==typeof l&&(l=e(l)),c=r?e(r,"length"):0)for(u=n;n+o>u;u++)a=r.objectAt(u),s=this.createChildView(l,{content:a,contentIndex:u}),h.push(s);else{var m=e(this,"emptyView");if(!m)return;var f=Ember.CoreView.detect(m);m=this.createChildView(m),h.push(m),t(this,"emptyView",m),f&&(this._createdEmptyView=m)}this.replace(n,0,h)},createChildView:function(r,n){r=this._super(r,n);var i=e(r,"tagName"),o=null===i||void 0===i?Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")]:i;return t(r,"tagName",o),r}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){Ember.ViewTargetActionSupport=Ember.Mixin.create(Ember.TargetActionSupport,{target:Ember.computed.alias("controller"),actionContext:Ember.computed.alias("context")})}(),function(){e("metamorph",[],function(){"use strict";// Copyright: ©2011 My Company Inc. All rights reserved.
19
+ var e=function(){},t=0,r=this.document,n=r&&"createRange"in r&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,i=r&&function(){var e=r.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),o=r&&function(){var e=r.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),s=function(r){var n;n=this instanceof s?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=s.prototype;var a,u,c,l,h,m,f,p,d;if(l=function(){return this.startTag()+this.innerHTML+this.endTag()},p=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},d=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"},n)a=function(e,t){var n=r.createRange(),i=r.getElementById(e.start),o=r.getElementById(e.end);return t?(n.setStartBefore(i),n.setEndAfter(o)):(n.setStartAfter(i),n.setEndBefore(o)),n},u=function(e,t){var r=a(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},c=function(){var e=a(this,!0);e.deleteContents()},h=function(e){var t=r.createRange();t.setStart(e),t.collapse(!1);var n=t.createContextualFragment(this.outerHTML());e.appendChild(n)},m=function(e){var t=r.createRange(),n=r.getElementById(this.end);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)},f=function(e){var t=r.createRange(),n=r.getElementById(this.start);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)};else{var b={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,"",""]},E=function(e,t){if(e.getAttribute("id")===t)return e;var r,n,i,o=e.childNodes.length;for(r=0;o>r;r++)if(n=e.childNodes[r],i=1===n.nodeType&&E(n,t))return i},v=function(e,t){var n=[];if(o&&(t=t.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,i){return n.push([i,t]),r})),e.innerHTML=t,n.length>0){var i,s=n.length;for(i=0;s>i;i++){var a=E(e,n[i][0]),u=r.createTextNode(n[i][1]);a.parentNode.insertBefore(u,a)}}},g=function(e,t){var n=b[e.tagName.toLowerCase()]||b._default,o=n[0],s=n[1],a=n[2];i&&(t="&shy;"+t);var u=r.createElement("div");v(u,s+t+a);for(var c=0;o>=c;c++)u=u.firstChild;if(i){for(var l=u;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&"­"===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}return u},y=function(e){for(;""===e.parentNode.tagName;)e=e.parentNode;return e},w=function(e,t){e.parentNode!==t.parentNode&&t.parentNode.insertBefore(e,t.parentNode.firstChild)};u=function(e,t){var n,i,o,s=y(r.getElementById(this.start)),a=r.getElementById(this.end),u=a.parentNode;for(w(s,a),n=s.nextSibling;n;){if(i=n.nextSibling,o=n===a){if(!t)break;a=n.nextSibling}if(n.parentNode.removeChild(n),o)break;n=i}for(n=g(s.parentNode,e);n;)i=n.nextSibling,u.insertBefore(n,a),n=i},c=function(){var e=y(r.getElementById(this.start)),t=r.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},h=function(e){for(var t,r=g(e,this.outerHTML());r;)t=r.nextSibling,e.appendChild(r),r=t},m=function(e){var t,n,i=r.getElementById(this.end),o=i.nextSibling,s=i.parentNode;for(n=g(s,e);n;)t=n.nextSibling,s.insertBefore(n,o),n=t},f=function(e){var t,n,i=r.getElementById(this.start),o=i.parentNode;n=g(o,e);for(var s=i.nextSibling;n;)t=n.nextSibling,o.insertBefore(n,s),n=t}}return s.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(u.call(this,e),this.innerHTML=e,void 0)},s.prototype.replaceWith=function(e){this.checkRemoved(),u.call(this,e,!0)},s.prototype.remove=c,s.prototype.outerHTML=l,s.prototype.appendTo=h,s.prototype.after=m,s.prototype.prepend=f,s.prototype.startTag=p,s.prototype.endTag=d,s.prototype.isRemoved=function(){var e=r.getElementById(this.start),t=r.getElementById(this.end);return!e||!t},s.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},s})}(),function(){function e(e){var t=e.hash,r=e.hashTypes;for(var n in t)"ID"===r[n]&&(t[n+"Binding"]=t[n],r[n+"Binding"]="STRING",delete t[n],delete r[n])}var t=Object.create||function(e){function t(){}return t.prototype=e,new t},r=this.Handlebars||Ember.imports&&Ember.imports.Handlebars;r||"function"!=typeof require||(r=require("handlebars")),Ember.Handlebars=t(r),Ember.Handlebars.helper=function(t,r){Ember.View.detect(r)?Ember.Handlebars.registerHelper(t,function(t){return e(t),Ember.Handlebars.helpers.view.call(this,r,t)}):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.helpers=t(r.helpers),Ember.Handlebars.Compiler=function(){},r.Compiler&&(Ember.Handlebars.Compiler.prototype=t(r.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},r.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=t(r.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,i=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&"control"===e.id.string)e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["controlID",new r.AST.StringNode(n+i++)]);else if(e.params.length||e.hash);else{var t=new r.AST.IdNode(["_triageMustache"]);e.escaped||(e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["unescaped",new r.AST.StringNode("true")])),e=new r.AST.MustacheNode([t].concat([e.id]),e.hash,!e.escaped)}return r.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var t=r.parse(e),n={knownHelpers:{action:!0,unbound:!0,bindAttr:!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(t,n);return(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0)},r.compile&&(Ember.Handlebars.compile=function(e){var t=r.parse(e),n={data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(t,n),o=(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0);return Ember.Handlebars.template(o)})}(),function(){function e(e,t,r,i){var o,s,a,u,c,l,h=r.length,m=i.data,f=m.view,p=i.hash,d=p.boundOptions;a=new Ember._SimpleHandlebarsView(null,null,!p.unescaped,m),a.normalizedValue=function(){var o,s=[];for(o in d)d.hasOwnProperty(o)&&(c=n(e,d[o],m),a.path=c.path,a.pathRoot=c.root,p[o]=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(a));for(u=0;h>u;++u)c=r[u],a.path=c.path,a.pathRoot=c.root,s.push(Ember._SimpleHandlebarsView.prototype.normalizedValue.call(a));return s.push(i),t.apply(e,s)},f.appendChild(a),o=[];for(s in d)d.hasOwnProperty(s)&&o.push(n(e,d[s],m));for(o=o.concat(r),u=0,l=o.length;l>u;++u)c=o[u],f.registerObserver(c.root,c.path,a,a.rerender)}function t(e,t,r,n){var i,o,s,a,u=[],c=n.hash,l=c.boundOptions;for(a in l)l.hasOwnProperty(a)&&(c[a]=Ember.Handlebars.get(e,l[a],n));for(i=0,o=r.length;o>i;++i)s=r[i],u.push(Ember.Handlebars.get(e,s.path,n));return u.push(n),t.apply(e,u)}var r=Array.prototype.slice,n=Ember.Handlebars.normalizePath=function(e,t,r){var n,i,o=r&&r.keywords||{};return n=t.split(".",1)[0],o.hasOwnProperty(n)&&(e=o[n],i=!0,t=t===n?"":t.substr(n.length+1)),{root:e,path:t,isKeyword:i}},i=Ember.Handlebars.get=function(e,t,r){var i,o=r&&r.data,s=n(e,t,o);return e=s.root,t=s.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t)),i};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){for(var n,o,s=[],a=r.types,u=0,c=t.length;c>u;u++)n=t[u],o=a[u],"ID"===o?s.push(i(e,n,r)):s.push(n);return s},Ember.Handlebars.resolveHash=function(e,t,r){var n,o={},s=r.hashTypes;for(var a in t)t.hasOwnProperty(a)&&(n=s[a],o[a]="ID"===n?i(e,t[a],r):t[a]);return o},Ember.Handlebars.registerHelper("helperMissing",function(e,t){var r,n="";throw r="%@ Handlebars error: Could not find property '%@' on object %@.",t.data&&(n=t.data.view),new Ember.Error(Ember.String.fmt(r,[n,e,this]))}),Ember.Handlebars.registerBoundHelper=function(i,o){function s(){var i,s,u,c,l,h=r.call(arguments,0,-1),m=h.length,f=arguments[arguments.length-1],p=[],d=f.data,b=f.hash,E=d.view,v=f.contexts&&f.contexts[0]||this;b.boundOptions={};for(l in b)b.hasOwnProperty(l)&&Ember.IS_BINDING.test(l)&&"string"==typeof b[l]&&(b.boundOptions[l.slice(0,-7)]=b[l]);for(d.properties=[],c=0;m>c;++c)d.properties.push(h[c]),p.push(n(v,h[c],d));if(d.isUnbound)return t(this,o,p,f);if(0===a.length)return e(v,o,p,f);i=p[0],s=i.root,u=i.path;var g=new Ember._SimpleHandlebarsView(u,s,!f.hash.unescaped,f.data);g.normalizedValue=function(){var e=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(g);return o.call(E,e,f)},E.appendChild(g),E.registerObserver(s,u,g,g.rerender);for(var y=0,w=a.length;w>y;y++)E.registerObserver(s,u+"."+a[y],g,g.rerender)}var a=r.call(arguments,2);s._rawFunction=o,Ember.Handlebars.registerHelper(i,s)},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;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.htmlSafe=function(){return e(this)})}(),function(){Ember.Handlebars.resolvePaths=function(e){for(var t=[],r=e.contexts,n=e.roots,i=e.data,o=0,s=r.length;s>o;o++)t.push(Ember.Handlebars.get(n[o],r[o],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}Ember.set,Ember.get;var r=t("metamorph"),n={remove:function(t){t.morph.remove(),e()},prepend:function(t,r){t.morph.prepend(r),e()},after:function(t,r){t.morph.after(r),e()},html:function(t,r){t.morph.html(r),e()},replace:function(t){var r=t.morph;t.transitionTo("preRender"),Ember.run.schedule("render",this,function(){if(!t.isDestroying){t.clearRenderedChildren();var n=t.renderToBuffer();t.invokeRecursively(function(e){e.propertyWillChange("element")}),t.triggerRecursively("willInsertElement"),r.replaceWith(n.string()),t.transitionTo("inDOM"),t.invokeRecursively(function(e){e.propertyDidChange("element")}),t.triggerRecursively("didInsertElement"),e()}})},empty:function(t){t.morph.html(""),e()}};Ember._Metamorph=Ember.Mixin.create({isVirtual:!0,tagName:"",instrumentName:"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:n}),Ember._MetamorphView=Ember.View.extend(Ember._Metamorph),Ember._SimpleMetamorphView=Ember.CoreView.extend(Ember._Metamorph)}(),function(){function e(e,t,r,n){this.path=e,this.pathRoot=t,this.isEscaped=r,this.templateData=n,this.morph=o(),this.state="preRender",this.updateId=null}var r=Ember.get,n=Ember.set,i=Ember.Handlebars.get,o=t("metamorph");Ember._SimpleHandlebarsView=e,e.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this.morph=null},propertyWillChange:Ember.K,propertyDidChange:Ember.K,normalizedValue:function(){var e,t,r=this.path,n=this.pathRoot;return""===r?e=n:(t=this.templateData,e=i(n,r,{data:t})),e},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 null===t||void 0===t?t="":t instanceof Handlebars.SafeString||(t=String(t)),e&&(t=Handlebars.Utils.escapeExpression(t)),t},rerender:function(){switch(this.state){case"preRender":case"destroying":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 s=Ember.View.cloneStates(Ember.View.states),a=Ember.merge;a(s._default,{rerenderIfNeeded:Ember.K}),a(s.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"boundHandlebars",states:s,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,n=r(this,"path"),o=r(this,"pathRoot"),s=r(this,"valueNormalizerFunc");return""===n?e=o:(t=r(this,"templateData"),e=i(o,n,{data:t})),s?s(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t=r(this,"isEscaped"),i=r(this,"shouldDisplayFunc"),o=r(this,"preserveContext"),s=r(this,"previousContext"),a=r(this,"inverseTemplate"),u=r(this,"displayTemplate"),c=this.normalizedValue();if(this._lastNormalizedValue=c,i(c))if(n(this,"template",u),o)n(this,"_context",s);else{if(!u)return null===c||void 0===c?c="":c instanceof Handlebars.SafeString||(c=String(c)),t&&(c=Handlebars.Utils.escapeExpression(c)),e.push(c),void 0;n(this,"_context",c)}else a?(n(this,"template",a),o?n(this,"_context",s):n(this,"_context",c)):n(this,"template",function(){return""});return this._super(e)}})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,r,n,s,a){var u,c,l,h=t.data,m=t.fn,f=t.inverse,p=h.view,d=this;if(u=o(d,e,h),"object"==typeof this){if(h.insideGroup){c=function(){Ember.run.once(p,"rerender")};var b,E,v=i(d,e,t);v=s(v),E=r?d:v,n(v)?b=m:f&&(b=f),b(E,{data:t.data})}else{var g=p.createChildView(Ember._HandlebarsBoundView,{preserveContext:r,shouldDisplayFunc:n,valueNormalizerFunc:s,displayTemplate:m,inverseTemplate:f,path:e,pathRoot:d,previousContext:d,isEscaped:!t.hash.unescaped,templateData:t.data});p.appendChild(g),c=function(){Ember.run.scheduleOnce("render",g,"rerenderIfNeeded")}}if(""!==u.path&&(p.registerObserver(u.root,u.path,c),a))for(l=0;a.length>l;l++)p.registerObserver(u.root,u.path+"."+a[l],c)}else h.buffer.push(i(d,e,t))}function r(e,t){var r,n,s=t.data,a=s.view,u=this;if(r=o(u,e,s),"object"==typeof this){if(s.insideGroup){n=function(){Ember.run.once(a,"rerender")};var c=i(u,e,t);(null===c||void 0===c)&&(c=""),s.buffer.push(c)}else{var l=new Ember._SimpleHandlebarsView(e,u,!t.hash.unescaped,t.data);l._parentView=a,a.appendChild(l),n=function(){Ember.run.scheduleOnce("render",l,"rerender")}}""!==r.path&&a.registerObserver(r.root,r.path,n)}else s.buffer.push(i(u,e,t))}var n=Ember.get;Ember.set,Ember.String.fmt;var i=Ember.Handlebars.get,o=Ember.Handlebars.normalizePath,s=Ember.ArrayPolyfills.forEach,a=Ember.Handlebars,u=a.helpers;a.registerHelper("_triageMustache",function(e,t){return u[e]?u[e].call(this,t):u.bind.apply(this,arguments)}),a.registerHelper("bind",function(n,i){var o=i.contexts&&i.contexts[0]||this;return i.fn?t.call(o,n,i,!1,e):r.call(o,n,i)}),a.registerHelper("boundIf",function(e,r){var i=r.contexts&&r.contexts[0]||this,o=function(e){var t=e&&n(e,"isTruthy");return"boolean"==typeof t?t:Ember.isArray(e)?0!==n(e,"length"):!!e};return t.call(i,e,r,!0,o,o,["isTruthy","length"])}),a.registerHelper("with",function(r,n){if(4===arguments.length){var i,s,a,c;if(n=arguments[3],i=arguments[2],s=arguments[0],Ember.isGlobalPath(s))Ember.bind(n.data.keywords,i,s);else{c=o(this,s,n.data),s=c.path,a=c.root;var l=Ember.$.expando+Ember.guidFor(a);n.data.keywords[l]=a;var h=s?l+"."+s:l;Ember.bind(n.data.keywords,i,h)}return t.call(this,s,n,!0,e)}return u.bind.call(n.contexts[0],r,n)}),a.registerHelper("if",function(e,t){return u.boundIf.call(t.contexts[0],e,t)}),a.registerHelper("unless",function(e,t){var r=t.fn,n=t.inverse;return t.fn=n,t.inverse=r,u.boundIf.call(t.contexts[0],e,t)}),a.registerHelper("bindAttr",function(e){var t=e.hash,r=e.data.view,n=[],u=this,c=++Ember.uuid,l=t["class"];if(null!==l&&void 0!==l){var h=a.bindClasses(this,l,r,c,e);n.push('class="'+Handlebars.Utils.escapeExpression(h.join(" "))+'"'),delete t["class"]}var m=Ember.keys(t);return s.call(m,function(s){var a,l=t[s];a=o(u,l,e.data);var h,m,f="this"===l?a.root:i(u,l,e),p=Ember.typeOf(f);h=function h(){var t=i(u,l,e),n=r.$("[data-bindattr-"+c+"='"+c+"']");return n&&0!==n.length?(Ember.View.applyAttributeBindings(n,s,t),void 0):(Ember.removeObserver(a.root,a.path,m),void 0)},"this"===l||a.isKeyword&&""===a.path||r.registerObserver(a.root,a.path,h),"string"===p||"number"===p&&!isNaN(f)?n.push(s+'="'+Handlebars.Utils.escapeExpression(f)+'"'):f&&"boolean"===p&&n.push(s+'="'+s+'"')},this),n.push("data-bindattr-"+c+'="'+c+'"'),new a.SafeString(n.join(" "))}),a.bindClasses=function(e,t,r,n,a){var u,c,l,h=[],m=function(e,t,r){var n,o=t.path;return n="this"===o?e:""===o?!0:i(e,o,r),Ember.View._classStringForValue(o,n,t.className,t.falsyClassName)};return s.call(t.split(" "),function(t){var i,s,f,p,d=Ember.View._parsePropertyPath(t),b=d.path,E=e;""!==b&&"this"!==b&&(p=o(e,b,a.data),E=p.root,b=p.path),s=function(){u=m(e,d,a),l=n?r.$("[data-bindattr-"+n+"='"+n+"']"):r.$(),l&&0!==l.length?(i&&l.removeClass(i),u?(l.addClass(u),i=u):i=null):Ember.removeObserver(E,b,f)},""!==b&&"this"!==b&&r.registerObserver(E,b,s),c=m(e,d,a),c&&(h.push(c),i=c)}),h}}(),function(){Ember.get,Ember.set;var e=Ember.Handlebars;e.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e){var t=e.hash,r=e.data,n={},i=t["class"],o=!1;t.id&&(n.elementId=t.id,o=!0),t.tag&&(n.tagName=t.tag,o=!0),i&&(i=i.split(" "),n.classNames=i,o=!0),t.classBinding&&(n.classNameBindings=t.classBinding.split(" "),o=!0),t.classNameBindings&&(void 0===n.classNameBindings&&(n.classNameBindings=[]),n.classNameBindings=n.classNameBindings.concat(t.classNameBindings.split(" ")),o=!0),t.attributeBindings&&(n.attributeBindings=null,o=!0),o&&(t=Ember.$.extend({},t),delete t.id,delete t.tag,delete t["class"],delete t.classBinding);var s;for(var a in t)t.hasOwnProperty(a)&&Ember.IS_BINDING.test(a)&&"string"==typeof t[a]&&(s=this.contextualizeBindingPath(t[a],r),s&&(t[a]=s));if(n.classNameBindings)for(var u in n.classNameBindings){var c=n.classNameBindings[u];if("string"==typeof c){var l=Ember.View._parsePropertyPath(c);s=this.contextualizeBindingPath(l.path,r),s&&(n.classNameBindings[u]=s+l.classNames)}}return Ember.$.extend(t,n)},contextualizeBindingPath:function(e,t){var r=Ember.Handlebars.normalizePath(null,e,t);return r.isKeyword?"templateData.keywords."+e:Ember.isGlobalPath(e)?null:"this"===e?"_parentView.context":"_parentView.context."+e},helper:function(t,r,n){var i,o=n.data,s=n.fn;i="string"==typeof r?e.get(t,r,n):r;var a=this.propertiesFromHTMLOptions(n,t),u=o.view;a.templateData=o;var c=i.proto?i.proto():i;s&&(a.template=s),c.controller||c.controllerBinding||a.controller||a.controllerBinding||(a._context=t),u.appendChild(i,a)}}),e.registerHelper("view",function(t,r){return t&&t.data&&t.data.isRenderData&&(r=t,t="Ember.View"),e.ViewHelper.helper(this,t,r)})}(),function(){var e=Ember.get,t=Ember.Handlebars.get;Ember.String.fmt,Ember.Handlebars.registerHelper("collection",function(r,n){r&&r.data&&r.data.isRenderData&&(n=r,r=void 0);var i=n.fn,o=n.data,s=n.inverse;n.data.view;var a;a=r?t(this,r,n):Ember.CollectionView;var u,c,l=n.hash,h={},m=l.itemViewClass,f=a.proto();delete l.itemViewClass,c=m?t(f,m,n):f.itemViewClass;for(var p in l)l.hasOwnProperty(p)&&(u=p.match(/^item(.)(.*)$/),u&&"itemController"!==p&&(h[u[1].toLowerCase()+u[2]]=l[p],delete l[p]));i&&(h.template=i,delete n.fn);var d;s&&s!==Handlebars.VM.noop?(d=e(f,"emptyViewClass"),d=d.extend({template:s,tagName:h.tagName})):l.emptyViewClass&&(d=t(this,l.emptyViewClass,n)),d&&(l.emptyView=d),l.keyword||(h._context=Ember.computed.alias("content"));var b=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:o,hash:h},this);return l.itemViewClass=c.extend(b),Ember.Handlebars.helpers.view.call(this,a,n)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,r){var n,i,o,s=arguments[arguments.length-1];return arguments.length>2?(s.data.isUnbound=!0,n=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helperMissing,o=n.apply(this,Array.prototype.slice.call(arguments,1)),delete s.data.isUnbound,o):(i=r.contexts&&r.contexts[0]||this,e(i,t,r))})}(),function(){var e=Ember.Handlebars.get,t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(r,n){var i=n.contexts&&n.contexts[0]||this,o=t(i,r,n.data),s=o.root,a=o.path,u="this"===a?s:e(s,a,n);Ember.Logger.log(u)}),Ember.Handlebars.registerHelper("debugger",function(){})}(),function(){var e=Ember.get,t=Ember.set;Ember.Handlebars.EachView=Ember.CollectionView.extend(Ember._Metamorph,{init:function(){var r,n=e(this,"itemController");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.call(this),Ember.addBeforeObserver(this,"content",null,"_contentWillChange"),Ember.addObserver(this,"content",null,"_contentDidChange")},itemViewClass:Ember._MetamorphView,emptyViewClass:Ember._MetamorphView,createChildView:function(r,n){r=this._super(r,n);var i=e(this,"keyword"),o=e(r,"content");if(i){var s=e(r,"templateData");s=Ember.copy(s),s.keywords=r.cloneKeywords(),t(r,"templateData",s),s.keywords[i]=o}return o&&e(o,"isController")&&t(r,"controller",o),r},destroy:function(){if(this._super()){var t=e(this,"_arrayController");return t&&t.destroy(),this}}});var r=Ember.Handlebars.GroupedEach=function(e,t,r){var n=this,i=Ember.Handlebars.normalizePath(e,t,r.data);this.context=e,this.path=t,this.options=r,this.template=r.fn,this.containingView=r.data.view,this.normalizedRoot=i.root,this.normalizedPath=i.path,this.content=this.lookupContent(),this.addContentObservers(),this.addArrayObservers(),this.containingView.on("willClearRender",function(){n.destroy()})};r.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,r=e(t,"length"),n=this.options.data,i=this.template;n.insideEach=!0;for(var o=0;r>o;o++)i(t.objectAt(o),{data:n})},rerenderContainingView:function(){Ember.run.scheduleOnce("render",this.containingView,"rerender")},destroy:function(){this.removeContentObservers(),this.removeArrayObservers()}},Ember.Handlebars.registerHelper("each",function(e,t){if(4===arguments.length){var r=arguments[0];t=arguments[3],e=arguments[2],""===e&&(e="this"),t.hash.keyword=r}return t.hash.dataSourceBinding=e,!t.data.insideGroup||t.hash.groupedRows||t.hash.itemViewClass?Ember.Handlebars.helpers.collection.call(this,"Ember.Handlebars.EachView",t):(new Ember.Handlebars.GroupedEach(this,e,t).render(),void 0)})}(),function(){Ember.Handlebars.registerHelper("template",function(e,t){var r=t.data.view,n=r.templateForName(e);n(this,{data:t.data})})}(),function(){Ember.Handlebars.registerHelper("partial",function(e,t){var r=e.split("/"),n=r[r.length-1];r[r.length-1]="_"+n;var i=t.data.view,o=r.join("/"),s=i.templateForName(o),a=i.templateForName(e);s=s||a,s(this,{data:t.data})})}(),function(){var e=Ember.get;Ember.set,Ember.Handlebars.registerHelper("yield",function(t){for(var r,n=t.data.view;n&&!e(n,"layout");)n=e(n,"parentView");r=e(n,"template"),r&&r(this,t)})}(),function(){var e=Ember.set;Ember.get,Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","disabled","tabindex","name"],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,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,r=t[e.keyCode];return this._elementValueDidChange(),r?this[r](e):void 0},_elementValueDidChange:function(){e(this,"value",this.$().val())}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){function e(e,r,n){var i=t(r,"action"),o=t(r,"onEvent");if(i&&o===e){var s=t(r,"controller"),a=t(r,"value"),u=t(r,"bubbles");s.send(i,a,r),u||n.stopPropagation()}}var t=Ember.get;Ember.set,Ember.TextField=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern","name"],value:"",type:"text",size:null,pattern:null,action:null,onEvent:"enter",bubbles:!1,insertNewline:function(t){e("enter",this,t)},keyPress:function(t){e("keyPress",this,t)}})}(),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"),r=e(this,"context"),n=e(this,"templateData");return"string"!=typeof t?t:Ember.Handlebars.get(r,t,{data:n})}).property("target"),type:Ember.computed(function(){var e=this.tagName;return"input"===e||"button"===e?"button":void 0}),disabled:!1,href:Ember.computed(function(){return"a"===this.tagName?"#":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(){return e(this,"isActive")&&(this.triggerAction(),t(this,"isActive",!1)),this._mouseDown=!1,this._mouseEntered=!1,e(this,"propagateEvents")},keyDown:function(e){(13===e.keyCode||32===e.keyCode)&&this.mouseDown()},keyUp:function(e){(13===e.keyCode||32===e.keyCode)&&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;Ember.set,Ember.TextArea=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols","name"],rows:null,cols:null,_updateElementValue:Ember.observer(function(){var t=e(this,"value"),r=this.$();r&&t!==r.val()&&r.val(t)},"value"),init:function(){this._super(),this.on("didInsertElement",this,this._updateElementValue)}})}(),function(){var e=Ember.set,t=Ember.get,r=Ember.EnumerableUtils.indexOf,n=Ember.EnumerableUtils.indexesOf,i=Ember.EnumerableUtils.replace,o=Ember.isArray;Ember.Handlebars.compile,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"),n=t(this,"parentView.selection");return t(this,"parentView.multiple")?n&&r(n,e.valueOf())>-1:e==n}).property("content","parentView.selection"),labelPathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionLabelPath");e&&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");e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionValuePath")}),Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(e,t,r,n,i){function o(e,t){var n,i="";return t.buffer.push('<option value="">'),n={},t.buffer.push(l(r._triageMustache.call(e,"view.prompt",{hash:{},contexts:[e],types:["ID"],hashTypes:n,data:t}))),t.buffer.push("</option>"),i}function s(e,t){var n;n={contentBinding:"STRING"},t.buffer.push(l(r.view.call(e,"view.optionView",{hash:{contentBinding:"this"},contexts:[e],types:["ID"],hashTypes:n,data:t})))}this.compilerInfo=[2,">= 1.0.0-rc.3"],r=r||Ember.Handlebars.helpers,i=i||{};var a,u,c="",l=this.escapeExpression,h=this;return u={},a=r["if"].call(t,"view.prompt",{hash:{},inverse:h.noop,fn:h.program(1,o,i),contexts:[t],types:["ID"],hashTypes:u,data:i}),(a||0===a)&&i.buffer.push(a),u={},a=r.each.call(t,"view.content",{hash:{},inverse:h.noop,fn:h.program(3,s,i),contexts:[t],types:["ID"],hashTypes:u,data:i}),(a||0===a)&&i.buffer.push(a),c}),attributeBindings:["multiple","disabled","tabindex","name"],multiple:!1,disabled:!1,content:null,selection:null,value:Ember.computed(function(e,r){if(2===arguments.length)return r;var n=t(this,"optionValuePath").replace(/^content\.?/,"");return n?t(this,"selection."+n):t(this,"selection")}).property("selection"),prompt:null,optionLabelPath:"content",optionValuePath:"content",optionView:Ember.SelectOption,_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer(function(){var r=t(this,"selection");if(t(this,"multiple")){if(!o(r))return e(this,"selection",Ember.A([r])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()},"selection.@each"),valueDidChange:Ember.observer(function(){var e,r=t(this,"content"),n=t(this,"value"),i=t(this,"optionValuePath").replace(/^content\.?/,""),o=i?t(this,"selection."+i):t(this,"selection");n!==o&&(e=r.find(function(e){return n===(i?t(e,i):e)}),this.set("selection",e))},"value"),_triggerChange:function(){var e=t(this,"selection"),r=t(this,"value");e&&this.selectionDidChange(),r&&this.valueDidChange(),this._change()},_changeSingle:function(){var r=this.$()[0].selectedIndex,n=t(this,"content"),i=t(this,"prompt");if(t(n,"length")){if(i&&0===r)return e(this,"selection",null),void 0;i&&(r-=1),e(this,"selection",n.objectAt(r))}},_changeMultiple:function(){var r=this.$("option:selected"),n=t(this,"prompt"),s=n?1:0,a=t(this,"content"),u=t(this,"selection");if(a&&r){var c=r.map(function(){return this.index-s}).toArray(),l=a.objectsAt(c);o(u)?i(u,0,t(u,"length"),l):e(this,"selection",l)}},_selectionDidChangeSingle:function(){var e=this.get("element");
20
+ if(e){var n=t(this,"content"),i=t(this,"selection"),o=n?r(n,i):-1,s=t(this,"prompt");s&&(o+=1),e&&(e.selectedIndex=o)}},_selectionDidChangeMultiple:function(){var e,i=t(this,"content"),o=t(this,"selection"),s=i?n(i,o):[-1],a=t(this,"prompt"),u=a?1:0,c=this.$("option");c&&c.each(function(){e=this.index>-1?this.index-u:-1,this.selected=r(s,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){function e(e,t){for(var r in e)"ID"===t[r]&&(e[r+"Binding"]=e[r],delete e[r])}Ember.Handlebars.registerHelper("input",function(t){var r=t.hash,n=t.hashTypes,i=r.type,o=r.on;return delete r.type,delete r.on,e(r,n),"checkbox"===i?Ember.Handlebars.helpers.view.call(this,Ember.Checkbox,t):(r.type=i,r.onEvent=o||"enter",Ember.Handlebars.helpers.view.call(this,Ember.TextField,t))}),Ember.Handlebars.registerHelper("textarea",function(t){var r=t.hash,n=t.hashTypes;return e(r,n),Ember.Handlebars.helpers.view.call(this,Ember.TextArea,t)})}(),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="text/x-raw-handlebars"===e.attr("type")?Ember.$.proxy(Handlebars.compile,Handlebars):Ember.$.proxy(Ember.Handlebars.compile,Ember.Handlebars),r=e.attr("data-template-name")||e.attr("id")||"application",n=t(e.html());Ember.TEMPLATES[r]=n,e.remove()})},Ember.onLoad("application",e)}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){e("route-recognizer",[],function(){"use strict";function e(e){this.string=e}function t(e){this.name=e}function r(e){this.name=e}function n(){}function i(i,o,s){"/"===i.charAt(0)&&(i=i.substr(1));for(var a=i.split("/"),u=[],c=0,l=a.length;l>c;c++){var h,m=a[c];(h=m.match(/^:([^\/]+)$/))?(u.push(new t(h[1])),o.push(h[1]),s.dynamics++):(h=m.match(/^\*([^\/]+)$/))?(u.push(new r(h[1])),o.push(h[1]),s.stars++):""===m?u.push(new n):(u.push(new e(m)),s.statics++)}return u}function o(e){this.charSpec=e,this.nextStates=[]}function s(e){return e.sort(function(e,t){return e.types.stars!==t.types.stars?e.types.stars-t.types.stars:e.types.dynamics!==t.types.dynamics?e.types.dynamics-t.types.dynamics:e.types.statics!==t.types.statics?e.types.statics-t.types.statics:0})}function a(e,t){for(var r=[],n=0,i=e.length;i>n;n++){var o=e[n];r=r.concat(o.match(t))}return r}function u(e,t){for(var r=e.handlers,n=e.regex,i=t.match(n),o=1,s=[],a=0,u=r.length;u>a;a++){for(var c=r[a],l=c.names,h={},m=0,f=l.length;f>m;m++)h[l[m]]=i[o++];s.push({handler:c.handler,params:h,isDynamic:!!l.length})}return s}function c(e,t){return t.eachChar(function(t){e=e.put(t)}),e}function l(e,t,r){this.path=e,this.matcher=t,this.delegate=r}function h(e){this.routes={},this.children={},this.target=e}function m(e,t,r){return function(n,i){var o=e+n;return i?(i(m(o,t,r)),void 0):new l(e+n,t,r)}}function f(e,t,r){for(var n=0,i=0,o=e.length;o>i;i++)n+=e[i].path.length;t=t.substr(n),e.push({path:t,handler:r})}function p(e,t,r,n){var i=t.routes;for(var o in i)if(i.hasOwnProperty(o)){var s=e.slice();f(s,o,i[o]),t.children[o]?p(s,t.children[o],r,n):r.call(n,s)}}var d=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],b=new RegExp("(\\"+d.join("|\\")+")","g");e.prototype={eachChar:function(e){for(var t,r=this.string,n=0,i=r.length;i>n;n++)t=r.charAt(n),e({validChars:t})},regex:function(){return this.string.replace(b,"\\$1")},generate:function(){return this.string}},t.prototype={eachChar:function(e){e({invalidChars:"/",repeat:!0})},regex:function(){return"([^/]+)"},generate:function(e){return e[this.name]}},r.prototype={eachChar:function(e){e({invalidChars:"",repeat:!0})},regex:function(){return"(.+)"},generate:function(e){return e[this.name]}},n.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},o.prototype={get:function(e){for(var t=this.nextStates,r=0,n=t.length;n>r;r++){var i=t[r],o=i.charSpec.validChars===e.validChars;if(o=o&&i.charSpec.invalidChars===e.invalidChars)return i}},put:function(e){var t;return(t=this.get(e))?t:(t=new o(e),this.nextStates.push(t),e.repeat&&t.nextStates.push(t),t)},match:function(e){for(var t,r,n,i=this.nextStates,o=[],s=0,a=i.length;a>s;s++)t=i[s],r=t.charSpec,"undefined"!=typeof(n=r.validChars)?-1!==n.indexOf(e)&&o.push(t):"undefined"!=typeof(n=r.invalidChars)&&-1===n.indexOf(e)&&o.push(t);return o}};var E=function(){this.rootState=new o,this.names={}};return E.prototype={add:function(e,t){for(var r,o=this.rootState,s="^",a={statics:0,dynamics:0,stars:0},u=[],l=[],h=!0,m=0,f=e.length;f>m;m++){var p=e[m],d=[],b=i(p.path,d,a);l=l.concat(b);for(var E=0,v=b.length;v>E;E++){var g=b[E];g instanceof n||(h=!1,o=o.put({validChars:"/"}),s+="/",o=c(o,g),s+=g.regex())}u.push({handler:p.handler,names:d})}h&&(o=o.put({validChars:"/"}),s+="/"),o.handlers=u,o.regex=new RegExp(s+"$"),o.types=a,(r=t&&t.as)&&(this.names[r]={segments:l,handlers:u})},handlersFor:function(e){var t=this.names[e],r=[];if(!t)throw new Error("There is no route named "+e);for(var n=0,i=t.handlers.length;i>n;n++)r.push(t.handlers[n]);return r},hasRoute:function(e){return!!this.names[e]},generate:function(e,t){var r=this.names[e],i="";if(!r)throw new Error("There is no route named "+e);for(var o=r.segments,s=0,a=o.length;a>s;s++){var u=o[s];u instanceof n||(i+="/",i+=u.generate(t))}return"/"!==i.charAt(0)&&(i="/"+i),i},recognize:function(e){var t,r,n=[this.rootState],i=e.length;for("/"!==e.charAt(0)&&(e="/"+e),i>1&&"/"===e.charAt(i-1)&&(e=e.substr(0,i-1)),t=0,r=e.length;r>t&&(n=a(n,e.charAt(t)),n.length);t++);var o=[];for(t=0,r=n.length;r>t;t++)n[t].handlers&&o.push(n[t]);n=s(o);var c=o[0];return c&&c.handlers?u(c,e):void 0}},l.prototype={to:function(e,t){var r=this.delegate;if(r&&r.willAddRoute&&(e=r.willAddRoute(this.matcher.target,e)),this.matcher.add(this.path,e),t){if(0===t.length)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,e,t,this.delegate)}}},h.prototype={add:function(e,t){this.routes[e]=t},addChild:function(e,t,r,n){var i=new h(t);this.children[e]=i;var o=m(e,i,n);n&&n.contextEntered&&n.contextEntered(t,o),r(o)}},E.prototype.map=function(e,t){var r=new h;e(m("",r,this.delegate)),p([],r,function(e){t?t(this,e):this.add(e)},this)},E})}(),function(){e("router",["route-recognizer"],function(e){"use strict";function t(){this.recognizer=new e}function r(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function n(e){if(!e.isLoading){e.isLoading=!0;var t=e.getHandler("loading");t&&(t.enter&&t.enter(),t.setup&&t.setup())}}function i(e){e.isLoading=!1;var t=e.getHandler("loading");t&&t.exit&&t.exit()}function o(e,t){i(e);var r=e.getHandler("failure");r&&(r.enter&&r.enter(),r.setup&&r.setup(t))}function s(e,t,r,n){var i=e._paramsForHandler(t,n,!0),o=i.params,s=i.toSetup,a=e.recognizer.generate(t,o);r.call(e,a),u(e,s)}function a(e,t,r,s){function c(n){d.context!==b&&m(d,b);var i=s.concat([{context:n,name:p.handler,handler:e.getHandler(p.handler),isDynamic:p.isDynamic}]);a(e,t,r+1,i)}if(t.length===r){var l=s[s.length-1],h=l&&l.handler;if(!h||!h.additionalHandler)return i(e),u(e,s),void 0;var f={handler:h.additionalHandler(),params:{},isDynamic:!1};t.push(f)}var p=t[r],d=e.getHandler(p.handler),b=d.deserialize&&d.deserialize(p.params);b&&"function"==typeof b.then?(n(e),b.then(c).then(null,function(t){o(e,t)})):c(b)}function u(e,t){var r=l(e.currentHandlerInfos||[],t);e.currentHandlerInfos=t,c(r.exited,function(e){delete e.context,e.exit&&e.exit()}),c(r.updatedContext,function(e,t){m(e,t),e.setup&&e.setup(t)});var n=!1;c(r.entered,function(e,t){n||(e.enter&&e.enter(),m(e,t),e.setup&&!1===e.setup(t)&&(n=!0))}),!n&&e.didTransition&&e.didTransition(t)}function c(e,t){for(var r=0,n=e.length;n>r;r++){var i=e[r],o=i.handler,s=i.context;t(o,s)}}function l(e,t){var r,n,i,o,s={updatedContext:[],exited:[],entered:[]};for(i=0,o=t.length;o>i;i++){var a=e[i],u=t[i];a&&a.handler===u.handler||(r=!0),r?(s.entered.push(u),a&&s.exited.unshift(a)):(n||a.context!==u.context)&&(n=!0,s.updatedContext.push(u))}for(i=t.length,o=e.length;o>i;i++)s.exited.unshift(e[i]);return s}function h(e,t){var r=e.currentHandlerInfos,n=t.shift();if(!r)throw new Error("Could not trigger event '"+n+"'. There are no active handlers");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.handler;if(s.events&&s.events[n])return s.events[n].apply(s,t),void 0}throw new Error("Nothing handled the event '"+n+"'.")}function m(e,t){e.context=t,e.contextDidChange&&e.contextDidChange()}return t.prototype={map:function(e){this.recognizer.delegate=this.delegate,this.recognizer.map(e,function(e,t){var r=t[t.length-1].handler,n=[t,{as:r}];e.add.apply(e,n)})},hasRoute:function(e){return this.recognizer.hasRoute(e)},handleURL:function(e){var t=this.recognizer.recognize(e);if(!t)throw new Error("No route matched the URL '"+e+"'");a(this,t,0,[])},updateURL:function(){throw"updateURL is not implemented"},replaceURL:function(e){this.updateURL(e)},transitionTo:function(e){var t=Array.prototype.slice.call(arguments,1);s(this,e,this.updateURL,t)},replaceWith:function(e){var t=Array.prototype.slice.call(arguments,1);s(this,e,this.replaceURL,t)},paramsForHandler:function(e){var t=this._paramsForHandler(e,[].slice.call(arguments,1));return t.params},generate:function(e){var t=this.paramsForHandler.apply(this,arguments);return this.recognizer.generate(e,t)},_paramsForHandler:function(e,t,n){var i,o,s,a,u,c,l=this.recognizer.handlersFor(e),h={},f=[],p=l.length,d=t.length;for(c=l.length-1;c>=0&&d>0;c--)l[c].names.length&&(d--,p=c);if(d>0)throw"More context objects were passed than there are dynamic segments for the route: "+e;for(c=0;l.length>c;c++)if(s=l[c],a=this.getHandler(s.handler),u=s.names,o=!1,u.length?(c>=p?(i=t.shift(),o=!0):i=a.context,a.serialize&&r(h,a.serialize(i,u))):n&&(c>p||!a.hasOwnProperty("context")?a.deserialize&&(i=a.deserialize({}),o=!0):i=a.context),n&&o&&m(a,i),f.push({isDynamic:!!s.names.length,name:s.handler,handler:a,context:i}),c===l.length-1){var b,E=f[f.length-1];(b=E.handler.additionalHandler)&&l.push({handler:b.call(E.handler),names:[]})}return{params:h,toSetup:f}},isActive:function(e){for(var t,r,n=[].slice.call(arguments,1),i=this.currentHandlerInfos,o=!1,s=i.length-1;s>=0;s--)if(r=i[s],r.name===e&&(o=!0),o){if(0===n.length)break;if(r.isDynamic&&(t=n.pop(),r.context!==t))return!1}return 0===n.length&&o},trigger:function(){var e=[].slice.call(arguments);h(this,e)}},t})}(),function(){function e(e){this.parent=e,this.matches=[]}e.prototype={resource:function(t,r,n){if(2===arguments.length&&"function"==typeof r&&(n=r,r={}),1===arguments.length&&(r={}),"string"!=typeof r.path&&(r.path="/"+t),n){var i=new e(t);n.call(i),this.push(r.path,t,i.generate())}else this.push(r.path,t)},push:function(e,t,r){var n=t.split(".");(""===e||"/"===e||"index"===n[n.length-1])&&(this.explicitIndex=!0),this.matches.push([e,t,r])},route:function(e,t){t=t||{},"string"!=typeof t.path&&(t.path="/"+e),this.parent&&"application"!==this.parent&&(e=this.parent+"."+e),this.push(t.path,e)},generate:function(){var e=this.matches;return this.explicitIndex||this.route("index",{path:"/"}),function(t){for(var r=0,n=e.length;n>r;r++){var i=e[r];t(i[0]).to(i[1],i[2])}}}},e.map=function(t){var r=new e;return t.call(r),r},Ember.RouterDSL=e}(),function(){Ember.controllerFor=function(e,t,r,n){return e.lookup("controller:"+t,n)||Ember.generateController(e,t,r)},Ember.generateController=function(e,t,r){var n,i,o;return r&&Ember.isArray(r)?(i=e.resolve("controller:array"),n=i.extend({content:r})):r?(i=e.resolve("controller:object"),n=i.extend({content:r})):(i=e.resolve("controller:basic"),n=i.extend()),n.toString=function(){return"(generated "+t+" controller)"},o="controller:"+t,e.register(o,n),e.lookup(o)}}(),function(){function e(e){var t=a(e,"location"),r=a(e,"rootURL"),n={};"string"==typeof r&&(n.rootURL=r),"string"==typeof t&&(n.implementation=t,t=u(e,"location",Ember.Location.create(n)))}function r(e){var t={},r=e.container,n=r.resolve("route:basic");return function(i){var o="route:"+i,s=r.lookup(o);if(t[i])return s;if(t[i]=!0,!s){if("loading"===i)return{};if("failure"===i)return e.constructor.defaultFailureHandler;r.register(o,n.extend()),s=r.lookup(o)}return s.routeName=i,s}}function n(e){for(var t=[],r=1,n=e.length;n>r;r++){var i=e[r].name,o=i.split(".");t.push(o[o.length-1])}return t.join(".")}function i(e,t,n){var i;t.getHandler=r(e);var o=function(){n.setURL(i)};if(t.updateURL=function(e){i=e,Ember.run.once(o)},n.replaceURL){var s=function(){n.replaceURL(i)};t.replaceURL=function(e){i=e,Ember.run.once(s)}}t.didTransition=function(t){e.didTransition(t)}}function o(e,t,r){var n,i=r[0];n=e.router.hasRoute(r[0])?i:r[0]=i+".index",e.router[t].apply(e.router,r),e.notifyPropertyChange("url")}var s=t("router"),a=Ember.get,u=Ember.set,c=Ember._MetamorphView;Ember.Router=Ember.Object.extend({location:"hash",init:function(){this.router=this.constructor.router,this._activeViews={},e(this)},url:Ember.computed(function(){return a(this,"location").getURL()}),startRouting:function(){this.router=this.router||this.constructor.map(Ember.K);var e=this.router,t=a(this,"location"),r=this.container,n=this;i(this,e,t),r.register("view:default",c),r.register("view:toplevel",Ember.View.extend()),t.onUpdateURL(function(e){n.handleURL(e)}),this.handleURL(t.getURL())},didTransition:function(e){var t=this.container.lookup("controller:application"),r=n(e);u(t,"currentPath",r),this.notifyPropertyChange("url"),a(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Transitioned into '"+r+"'")},handleURL:function(e){this.router.handleURL(e),this.notifyPropertyChange("url")},transitionTo:function(){var e=[].slice.call(arguments);o(this,"transitionTo",e)},replaceWith:function(){var e=[].slice.call(arguments);o(this,"replaceWith",e)},generate:function(){var e=this.router.generate.apply(this.router,arguments);return this.location.formatURL(e)},isActive:function(){var e=this.router;return e.isActive.apply(e,arguments)},send:function(){this.router.trigger.apply(this.router,arguments)},hasRoute:function(e){return this.router.hasRoute(e)},_lookupActiveView:function(e){var t=this._activeViews[e];return t&&t[0]},_connectActiveView:function(e,t){var r=this._activeViews[e];r&&r[0].off("willDestroyElement",this,r[1]);var n=function(){delete this._activeViews[e]};this._activeViews[e]=[t,n],t.one("willDestroyElement",this,n)}}),Ember.Router.reopenClass({defaultFailureHandler:{setup:function(e){Ember.Logger.error("Error while loading route:",e),setTimeout(function(){throw e})}}}),Ember.Router.reopenClass({map:function(e){var t=this.router=new s,r=Ember.RouterDSL.map(function(){this.resource("application",{path:"/"},function(){e.call(this)})});return t.map(r.generate()),t}})}(),function(){function e(e){for(var t,r,n=e.router.router.currentHandlerInfos,i=0,o=n.length;o>i;i++){if(r=n[i].handler,r===e)return t;t=r}}function t(r){var n,i=e(r);if(i)return(n=i.lastRenderedTemplate)?n:t(i,!0)}function r(e,r,n,i){i=i||{},i.into=i.into?i.into.replace(/\//g,"."):t(e),i.outlet=i.outlet||"main",i.name=r,i.template=n;var o,s=i.controller;return s=i.controller?i.controller:(o=e.container.lookup("controller:"+r))?o:e.routeName,"string"==typeof s&&(s=e.container.lookup("controller:"+s)),i.controller=s,i}function n(e,t,r){var n=r.into?"view:default":"view:toplevel";return e=e||t.lookup(n),u(e,"templateName")||(c(e,"template",r.template),c(e,"_debugTemplateName",r.name)),c(e,"renderedName",r.name),c(e,"controller",r.controller),e}function i(e,t,r){if(r.into){var n=e.router._lookupActiveView(r.into);e.teardownView=s(n,r.outlet),n.connectOutlet(r.outlet,t)}else{var i=u(e,"router.namespace.rootElement");e.teardownView&&e.teardownView(),e.router._connectActiveView(r.name,t),e.teardownView=o(t),t.appendTo(i)}}function o(e){return function(){e.destroy()}}function s(e,t){return function(){e.disconnectOutlet(t)}}function a(e){e.teardownView&&e.teardownView(),delete e.teardownView,delete e.lastRenderedTemplate}var u=Ember.get,c=Ember.set,l=Ember.String.classify;Ember.String.fmt,Ember.Route=Ember.Object.extend({exit:function(){this.deactivate(),a(this)},enter:function(){this.activate()},events:null,deactivate:Ember.K,activate:Ember.K,transitionTo:function(){var e=this.router;if(!e.isActive.apply(e,arguments))return this._checkingRedirect&&(this._redirected[this._redirectDepth]=!0),e.transitionTo.apply(e,arguments)},replaceWith:function(){var e=this.router;if(!e.isActive.apply(e,arguments))return this._checkingRedirect&&(this._redirected[this._redirectDepth]=!0),this.router.replaceWith.apply(this.router,arguments)},send:function(){return this.router.send.apply(this.router,arguments)},_redirectDepth:0,setup:function(e){var t;this._redirected||(t=!0,this._redirected=[]),this._checkingRedirect=!0;var r=++this._redirectDepth;void 0===e?this.redirect():this.redirect(e),this._redirectDepth--,this._checkingRedirect=!1;var n=this._redirected;if(t&&(this._redirected=null),n[r])return!1;var i=this.controllerFor(this.routeName,e);i&&(this.controller=i,c(i,"model",e)),this.setupControllers?this.setupControllers(i,e):this.setupController(i,e),this.renderTemplates?this.renderTemplates(e):this.renderTemplate(i,e)},redirect:Ember.K,deserialize:function(e){var t=this.model(e);return this.currentModel=t},contextDidChange:function(){this.currentModel=this.context},model:function(e){var t,r,n,i;for(var o in e)(t=o.match(/^(.*)_id$/))&&(r=t[1],i=e[o]),n=!0;if(!r&&n)return e;if(r){var s=l(r),a=this.router.namespace,u=a[s];return u.find(i)}},serialize:function(e,t){if(1===t.length){var r=t[0],n={};return n[r]=/_id$/.test(r)?u(e,"id"):e,n}},setupController:Ember.K,controllerFor:function(e,t){var r=this.router.container,n=r.lookup("controller:"+e);return n||(t=t||this.modelFor(e),n=Ember.generateController(r,e,t)),n},modelFor:function(e){var t=this.container.lookup("route:"+e);return t&&t.currentModel},renderTemplate:function(){this.render()},render:function(e,t){"object"!=typeof e||t||(t=e,e=this.routeName),e=e?e.replace(/\//g,"."):this.routeName;var o=this.container,s=o.lookup("view:"+e),a=o.lookup("template:"+e);(s||a)&&(t=r(this,e,a,t),s=n(s,o,t),"main"===t.outlet&&(this.lastRenderedTemplate=e),i(this,s,t))},willDestroy:function(){a(this)}})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,i,o){function s(e,t){return"controller"===i[t]?e:Ember.ControllerMixin.detect(e)?s(n(e,"model")):e}var a=t(e,i,o);return r.call(a,s)}var t=Ember.Handlebars.resolveParams,r=Ember.ArrayPolyfills.map,n=Ember.get;Ember.Router.resolveParams=e})}(),function(){var e=Ember.get;Ember.set,Ember.String.fmt,Ember.onLoad("Ember.Handlebars",function(){function t(e,t){return e.hasRoute(t)||(t+=".index"),t}function r(e){var t=e.options.types.slice(1),r=e.options.data;return i(e.context,e.params,{types:t,data:r})}function n(e,n,i){var o,s=i||e.namedRoute;o=t(n,s);var a=[o];return a.concat(r(e.parameters))}var i=Ember.Router.resolveParams,o=Ember.ViewUtils.isSimpleClick,s=Ember.LinkView=Ember.View.extend({tagName:"a",namedRoute:null,currentWhen:null,title:null,activeClass:"active",replace:!1,attributeBindings:["href","title"],classNameBindings:"active",concreteView:Ember.computed(function(){return e(this,"parentView")}).property("parentView"),active:Ember.computed(function(){var t=this.get("router"),n=r(this.parameters),i=this.currentWhen+".index",o=t.isActive.apply(t,[this.currentWhen].concat(n))||t.isActive.apply(t,[i].concat(n));return o?e(this,"activeClass"):void 0}).property("namedRoute","router.url"),router:Ember.computed(function(){return this.get("controller").container.lookup("router:main")}),click:function(e){if(!o(e))return!0;e.preventDefault(),this.bubbles===!1&&e.stopPropagation();var t=this.get("router");this.get("replace")?t.replaceWith.apply(t,n(this,t)):t.transitionTo.apply(t,n(this,t))},href:Ember.computed(function(){if("a"!==this.get("tagName"))return!1;var e=this.get("router");return e.generate.apply(e,n(this,e))})});s.toString=function(){return"LinkView"},Ember.Handlebars.registerHelper("linkTo",function(e){var t=[].slice.call(arguments,-1)[0],r=[].slice.call(arguments,1,-1),n=t.hash;return n.namedRoute=e,n.currentWhen=n.currentWhen||e,n.parameters={context:this,options:t,params:r},Ember.Handlebars.helpers.view.call(this,s,t)})})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,r){var n;for(t&&t.data&&t.data.isRenderData&&(r=t,t="main"),n=r.data.view;!n.get("template.isTop");)n=n.get("_parentView");return r.data.view.set("outletSource",n),r.hash.currentViewBinding="_view.outletSource._outlets."+t,e.helpers.view.call(this,e.OutletView,r)})})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(){Ember.Handlebars.registerHelper("render",function(e,t,r){var n,i,o,s,a,u;2===arguments.length&&(r=t,t=void 0),"string"==typeof t&&(a=Ember.Handlebars.get(r.contexts[1],t,r),u={singleton:!1}),e=e.replace(/\//g,"."),n=r.data.keywords.controller.container,i=n.lookup("router:main"),s=n.lookup("view:"+e)||n.lookup("view:default"),o=(o=r.hash.controller)?n.lookup("controller:"+o,u):Ember.controllerFor(n,e,a,u),o&&a&&o.set("model",a);var c=r.contexts[1];c&&s.registerObserver(c,t,function(){o.set("model",Ember.Handlebars.get(c,t,r))}),o.set("target",r.data.keywords.controller),r.hash.viewName=Ember.String.camelize(e),r.hash.template=n.lookup("template:"+e),r.hash.controller=o,i&&!a&&i._connectActiveView(e,s),Ember.Handlebars.helpers.view.call(this,s,r)})})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r){var n=[];r&&n.push(r);var i=e.options.types.slice(1),o=e.options.data;return n.concat(t(e.context,e.params,{types:i,data:o}))}var t=Ember.Router.resolveParams,r=Ember.ViewUtils.isSimpleClick,n=Ember.Handlebars,i=n.get,o=n.SafeString,s=Ember.ArrayPolyfills.forEach,a=(Ember.get,Array.prototype.slice),u=n.ActionHelper={registeredActions:{}},c=["alt","shift","meta","ctrl"],l=function(e,t){if("undefined"==typeof t)return r(e);var n=!0;return s.call(c,function(r){e[r+"Key"]&&-1===t.indexOf(r)&&(n=!1)}),n};u.registerAction=function(t,r,n){var o=(++Ember.uuid).toString();return u.registeredActions[o]={eventName:r.eventName,handler:function(o){if(!l(o,n))return!0;o.preventDefault(),r.bubbles===!1&&o.stopPropagation();var s=r.target;s=s.target?i(s.root,s.target,s.options):s.root,Ember.run(function(){s.send?s.send.apply(s,e(r.parameters,t)):s[t].apply(s,e(r.parameters))})}},r.view.on("willClearRender",function(){delete u.registeredActions[o]}),o},n.registerHelper("action",function(e){var t,r=arguments[arguments.length-1],n=a.call(arguments,1,-1),i=r.hash,s={eventName:i.on||"click"};s.parameters={context:this,options:r,params:n},s.view=r.data.view;var c,l;i.target?(c=this,l=i.target):(t=r.data.keywords.controller)&&(c=t),s.target={root:c,target:l,options:r},s.bubbles=i.bubbles;var h=u.registerAction(e,s,i.allowedKeys);return new o('data-ember-action="'+h+'"')})})}(),function(){if(Ember.ENV.EXPERIMENTAL_CONTROL_HELPER){var e=Ember.get,t=Ember.set;Ember.Handlebars.registerHelper("control",function(r,n,i){function o(){var e=Ember.Handlebars.get(this,n,i);t(p,"model",e),f.rerender()}2===arguments.length&&(i=n,n=void 0);var s;n&&(s=Ember.Handlebars.get(this,n,i));var a,u,c=i.data.keywords.controller,l=(i.data.keywords.view,e(c,"_childContainers")),h=i.hash.controlID;l.hasOwnProperty(h)?u=l[h]:(a=e(c,"container"),u=a.child(),l[h]=u);var m=r.replace(/\//g,"."),f=u.lookup("view:"+m)||u.lookup("view:default"),p=u.lookup("controller:"+m),d=u.lookup("template:"+r);t(p,"target",c),t(p,"model",s),i.hash.template=d,i.hash.controller=p,Ember.addObserver(this,n,o),f.one("willDestroyElement",this,function(){Ember.removeObserver(this,n,o)}),Ember.Handlebars.helpers.view.call(this,f,i)})}}(),function(){var e=Ember.get;Ember.set,Ember.ControllerMixin.reopen({transitionToRoute:function(){var t=e(this,"target"),r=t.transitionToRoute||t.transitionTo;return r.apply(t,arguments)},transitionTo:function(){return this.transitionToRoute.apply(this,arguments)},replaceRoute:function(){var t=e(this,"target"),r=t.replaceRoute||t.replaceWith;return r.apply(t,arguments)},replaceWith:function(){return this.replaceRoute.apply(this,arguments)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.View.reopen({init:function(){t(this,"_outlets",{}),this._super()},connectOutlet:function(r,n){var i=e(this,"_outlets"),o=e(this,"container"),s=o&&o.lookup("router:main"),a=e(n,"renderedName");t(i,r,n),s&&a&&s._connectActiveView(a,n)},disconnectOutlet:function(r){var n=e(this,"_outlets");t(n,r,null)}})}(),function(){Ember.get,Ember.set,Ember.Location={create:function(e){var t=e&&e.implementation,r=this.implementations[t];return r.create.apply(r,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){this.updateCallback=e},handleURL:function(e){t(this,"path",e),this.updateCallback(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(r){e(this,"location").hash=r,t(this,"lastSetURL",r)},onUpdateURL:function(r){var n=this,i=Ember.guidFor(this);Ember.$(window).bind("hashchange.ember-location-"+i,function(){Ember.run(function(){var i=location.hash.substr(1);e(n,"lastSetURL")!==i&&(t(n,"lastSetURL",null),r(i))})})},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,r=!1;Ember.HistoryLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location),this.initState()},initState:function(){t(this,"history",e(this,"history")||window.history),this.replaceState(this.formatURL(this.getURL()))},rootURL:"/",getURL:function(){var t=e(this,"rootURL"),r=e(this,"location").pathname;return t=t.replace(/\/$/,""),r=r.replace(t,"")},setURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&this.pushState(e)},replaceURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&this.replaceState(e)},getState:function(){return e(this,"history").state},pushState:function(t){e(this,"history").pushState({path:t},null,t),this._previousURL=this.getURL()},replaceState:function(t){e(this,"history").replaceState({path:t},null,t),this._previousURL=this.getURL()},onUpdateURL:function(e){var t=Ember.guidFor(this),n=this;Ember.$(window).bind("popstate.ember-location-"+t,function(){(r||(r=!0,n.getURL()!==n._previousURL))&&e(n.getURL())})},formatURL:function(t){var r=e(this,"rootURL");return""!==t&&(r=r.replace(/\/$/,"")),r+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("popstate.ember-location-"+e)}}),Ember.Location.registerImplementation("history",Ember.HistoryLocation)}(),function(){function e(t,r,n,i){var o,s=t.name,a=t.incoming,u=t.incomingNames,c=u.length;if(n||(n={}),i||(i=[]),!n.hasOwnProperty(s)){for(i.push(s),n[s]=!0,o=0;c>o;o++)e(a[u[o]],r,n,i);r(t,i),i.pop()}}function t(){this.names=[],this.vertices={}}t.prototype.add=function(e){if(e){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,r){function n(e,t){if(e.name===r)throw new Error("cycle detected: "+r+" <- "+t.join(" <- "))}if(t&&r&&t!==r){var i=this.add(t),o=this.add(r);o.incoming.hasOwnProperty(t)||(e(i,n),i.hasOutgoing=!0,o.incoming[t]=i,o.incomingNames.push(t))}},t.prototype.topsort=function(t){var r,n,i={},o=this.vertices,s=this.names,a=s.length;for(r=0;a>r;r++)n=o[s[r]],n.hasOutgoing||e(n,t,i)},t.prototype.addEdges=function(e,t,r,n){var i;if(this.map(e,t),r)if("string"==typeof r)this.addEdge(e,r);else for(i=0;r.length>i;i++)this.addEdge(e,r[i]);if(n)if("string"==typeof n)this.addEdge(n,e);else for(i=0;n.length>i;i++)this.addEdge(n[i],e)},Ember.DAG=t}(),function(){var e=Ember.get,t=Ember.String.classify,r=Ember.String.capitalize,n=Ember.String.decamelize;Ember.DefaultResolver=Ember.Object.extend({namespace:null,resolve:function(e){var t=this.parseName(e),r=this[t.resolveMethodName];if(r){var n=r.call(this,t);if(n)return n}return this.resolveOther(t)},parseName:function(n){var i=n.split(":"),o=i[0],s=i[1],a=s,u=e(this,"namespace"),c=u;if("template"!==o&&-1!==a.indexOf("/")){var l=a.split("/");a=l[l.length-1];var h=r(l.slice(0,-1).join("."));c=Ember.Namespace.byName(h)}return{fullName:n,type:o,fullNameWithoutType:s,name:a,root:c,resolveMethodName:"resolve"+t(o)}},resolveTemplate:function(e){var t=e.fullNameWithoutType.replace(/\./g,"/");return Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:(t=n(t),Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:void 0)},useRouterNaming:function(e){e.name=e.name.replace(/\./g,"_"),"basic"===e.name&&(e.name="")},resolveController:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveRoute:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveView:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveOther:function(r){var n=t(r.name)+t(r.type),i=e(r.root,n);return i?i:void 0}})}(),function(){function e(e){var t=e.get("resolver")||Ember.DefaultResolver,r=t.create({namespace:e});return function(e){return r.resolve(e)}}function t(e){var t=e.split(":"),r=t[0],n=t[1];if("template"!==r){var i=n;return i.indexOf(".")>-1&&(i=i.replace(/\.(.)/g,function(e){return e.charAt(1).toUpperCase()})),n.indexOf("_")>-1&&(i=i.replace(/_(.)/g,function(e){return e.charAt(1).toUpperCase()})),r+":"+i}return e}var r=Ember.get,n=Ember.set,i=Ember.Application=Ember.Namespace.extend(Ember.DeferredMixin,{rootElement:"body",eventDispatcher:null,customEvents:null,_readinessDeferrals:1,init:function(){this.$||(this.$=Ember.$),this.__container__=this.buildContainer(),this.Router=this.Router||this.defaultRouter(),this.Router&&(this.Router.namespace=this),this._super(),this.scheduleInitialize(),Ember.LOG_VERSION&&(Ember.LOG_VERSION=!1)},buildContainer:function(){var e=this.__container__=i.buildContainer(this);return e},defaultRouter:function(){return void 0===this.router?Ember.Router.extend():void 0},scheduleInitialize:function(){var e=this;!this.$||this.$.isReady?Ember.run.schedule("actions",e,"_initialize"):this.$().ready(function(){Ember.run(e,"_initialize")})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,0===this._readinessDeferrals&&Ember.run.once(this,this.didBecomeReady)},register:function(){var e=this.__container__;e.register.apply(e,arguments)},inject:function(){var e=this.__container__;e.injection.apply(e,arguments)},initialize:function(){},_initialize:function(){return this.isDestroyed?void 0:(this.register("router:main",this.Router),this.runInitializers(),Ember.runLoadHooks("application",this),this.advanceReadiness(),this)},reset:function(){Ember.run(this,function(){Ember.run(this.__container__,"destroy"),this.buildContainer(),this._readinessDeferrals=1,Ember.run.schedule("actions",this,function(){this._initialize(),this.startRouting()})})},runInitializers:function(){var e,t,n=r(this.constructor,"initializers"),i=this.__container__,o=new Ember.DAG,s=this;for(e=0;n.length>e;e++)t=n[e],o.addEdges(t.name,t.initialize,t.before,t.after);o.topsort(function(e){var t=e.value;t(i,s)})},didBecomeReady:function(){this.setupEventDispatcher(),this.ready(),this.startRouting(),Ember.testing||(Ember.Namespace.processAll(),Ember.BOOTED=!0),this.resolve(this)},setupEventDispatcher:function(){var e=r(this,"customEvents"),t=r(this,"rootElement"),i=this.__container__.lookup("event_dispatcher:main");n(this,"eventDispatcher",i),i.setup(e,t)},startRouting:function(){var e=this.__container__.lookup("router:main");e&&e.startRouting()},handleURL:function(e){var t=this.__container__.lookup("router:main");t.handleURL(e)},ready:Ember.K,resolver:null,willDestroy:function(){Ember.BOOTED=!1,this.__container__.destroy()},initializer:function(e){this.constructor.initializer(e)}});Ember.Application.reopenClass({concatenatedProperties:["initializers"],initializers:Ember.A(),initializer:function(e){var t=r(this,"initializers");
21
+ t.push(e)},buildContainer:function(r){var n=new Ember.Container;return Ember.Container.defaultContainer=Ember.Container.defaultContainer||n,n.set=Ember.set,n.normalize=t,n.resolver=e(r),n.optionsForType("view",{singleton:!1}),n.optionsForType("template",{instantiate:!1}),n.register("application:main",r,{instantiate:!1}),n.register("controller:basic",Ember.Controller,{instantiate:!1}),n.register("controller:object",Ember.ObjectController,{instantiate:!1}),n.register("controller:array",Ember.ArrayController,{instantiate:!1}),n.register("route:basic",Ember.Route,{instantiate:!1}),n.register("event_dispatcher:main",Ember.EventDispatcher),n.injection("router:main","namespace","application:main"),n.injection("controller","target","router:main"),n.injection("controller","namespace","application:main"),n.injection("route","router","router:main"),n}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){function e(e){for(var r,n=t(e,"needs"),i=t(e,"container"),o=!0,s=0,a=n.length;a>s;s++)r=n[s],-1===r.indexOf(":")&&(r="controller:"+r),i.has(r)||(o=!1);return o}var t=Ember.get;Ember.set;var r=Ember.Object.extend({controller:null,unknownProperty:function(e){for(var r,n=t(this,"controller"),i=t(n,"needs"),o=n.get("container"),s=0,a=i.length;a>s;s++)if(r=i[s],r===e)return o.lookup("controller:"+e)}});Ember.ControllerMixin.reopen({concatenatedProperties:["needs"],needs:[],init:function(){this._super.apply(this,arguments),!e(this)},controllerFor:function(e){var r=t(this,"container");return r.lookup("controller:"+e)},controllers:Ember.computed(function(){return r.create({controller:this})})})}(),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"),r=e(this,"name");return t&&(r=t+"."+r),r}),trigger:function(e){this[e]&&this[e].apply(this,[].slice.call(arguments,1)),this._super.apply(this,arguments)},init:function(){var r=e(this,"states");t(this,"childStates",Ember.A()),t(this,"eventTransitions",e(this,"eventTransitions")||{});var n,i,o;if(r)for(n in r)this.setupChild(r,n,r[n]);else{r={};for(n in this)"constructor"!==n&&(i=this[n])&&((o=i.transitionTarget)&&(this.eventTransitions[n]=o),this.setupChild(r,n,i));t(this,"states",r)}t(this,"pathsCaches",{})},setPathsCache:function(t,r,n){var i=Ember.guidFor(t.constructor),o=e(this,"pathsCaches"),s=o[i]||{};s[r]=n,o[i]=s},getPathsCache:function(t,r){var n=Ember.guidFor(t.constructor),i=e(this,"pathsCaches"),o=i[n]||{};return o[r]},setupChild:function(r,n,i){return i?(i.isState?t(i,"name",n):Ember.State.detect(i)&&(i=i.create({name:n})),i.isState?(t(i,"parentState",this),e(this,"childStates").pushObject(i),r[n]=i,i):void 0):!1},lookupEventTransition:function(e){for(var t,r=this;r&&!t;)t=r.eventTransitions[e],r=r.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,r){var n=[],i=Ember.$&&Ember.$.Event;r&&i&&r instanceof i?r.hasOwnProperty("contexts")&&(n=r.contexts.slice()):n=[].slice.call(arguments,1),n.unshift(e),t.transitionTo.apply(t,n)};return t.transitionTarget=e,t}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.String.fmt,n=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){for(var r,n,i=this.enterStates.length-1,o=[];t.length>0;){if(i>=0)r=this.enterStates[i--];else{if(this.enterStates.length){if(r=e(this.enterStates[0],"parentState"),!r)throw"Cannot match all contexts to states"}else r=this.resolveState;this.enterStates.unshift(r),this.exitStates.unshift(r)}n=e(r,"hasContext")?t.pop():null,o.unshift(n)}this.contexts=o},addInitialStates:function(){for(var t,r=this.finalState;;){if(t=e(r,"initialState")||"start",r=e(r,"states."+t),!r)break;this.finalState=r,this.enterStates.push(r),this.contexts.push(void 0)}},removeUnchangedContexts:function(e){for(;this.enterStates.length>0&&this.enterStates[0]===this.exitStates[0];){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 o=function(t,n,i){var a,u,c,l=this.enableLogging,h=i?"unhandledEvent":t,m=n[h];if(a=[].slice.call(arguments,3),"function"==typeof m)return l&&(i?Ember.Logger.log(r("STATEMANAGER: Unhandled event '%@' being sent to state %@.",[t,e(n,"path")])):Ember.Logger.log(r("STATEMANAGER: Sending event '%@' to state %@.",[t,e(n,"path")]))),c=a,i&&c.unshift(t),c.unshift(this),m.apply(n,c);var f=e(n,"parentState");return f?(u=a,u.unshift(t,f,i),o.apply(this,u)):i?void 0:s.call(this,t,a,!0)},s=function(t,r,n){return r.unshift(t,e(this,"currentState"),n),o.apply(this,r)};Ember.StateManager=Ember.State.extend({init:function(){this._super(),t(this,"stateMeta",Ember.Map.create());var r=e(this,"initialState");!r&&e(this,"states.start")&&(r="start"),r&&this.transitionTo(r)},stateMetaFor:function(t){var r=e(this,"stateMeta"),n=r.get(t);return n||(n={},r.set(t,n)),n},setStateMeta:function(e,r,n){return t(this.stateMetaFor(e),r,n)},getStateMeta:function(t,r){return e(this.stateMetaFor(t),r)},currentState:null,currentPath:Ember.computed.alias("currentState.path"),transitionEvent:"setup",errorOnUnhandledEvent:!0,send:function(e){var t=[].slice.call(arguments,1);return s.call(this,e,t,!1)},unhandledEvent:function(t,r){if(e(this,"errorOnUnhandledEvent"))throw new Ember.Error(this.toString()+" could not respond to event "+r+" in state "+e(this,"currentState.path")+".")},getStateByPath:function(t,r){for(var n=r.split("."),i=t,o=0,s=n.length;s>o&&(i=e(e(i,"states"),n[o]),i);o++);return i},findStateByPath:function(t,r){for(var n;!n&&t;)n=this.getStateByPath(t,r),t=e(t,"parentState");return n},getStatesInPath:function(t,r){if(!r||""===r)return void 0;for(var n,i,o=r.split("."),s=[],a=0,u=o.length;u>a;a++){if(n=e(t,"states"),!n)return void 0;if(i=e(n,o[a]),!i)return void 0;t=i,s.push(i)}return s},goToState:function(){return this.transitionTo.apply(this,arguments)},transitionTo:function(t,r){if(!Ember.isEmpty(t)){var n=r?Array.prototype.slice.call(arguments,1):[],o=e(this,"currentState")||this,s=this.contextFreeTransition(o,t),a=new i(s).normalize(this,n);this.enterState(a),this.triggerSetupContext(a)}},contextFreeTransition:function(t,r){var n=t.getPathsCache(this,r);if(n)return n;for(var i=this.getStatesInPath(t,r),o=[],s=t;s&&!i;){if(o.unshift(s),s=e(s,"parentState"),!s&&(i=this.getStatesInPath(this,r),!i))return;i=this.getStatesInPath(s,r)}for(;i.length>0&&i[0]===o[0];)s=i.shift(),o.shift();var a={exitStates:o,enterStates:i,resolveState:s};return t.setPathsCache(this,r,a),a},triggerSetupContext:function(t){var r=t.contexts,i=t.enterStates.length-r.length,o=t.enterStates,s=e(this,"transitionEvent");n.call(o,function(e,t){e.trigger(s,this,r[t-i])},this)},getState:function(t){var r=e(this,t),n=e(this,"parentState");return r?r:n?n.getState(t):void 0},enterState:function(r){var i=this.enableLogging,o=r.exitStates.slice(0).reverse();n.call(o,function(e){e.trigger("exit",this)},this),n.call(r.enterStates,function(t){i&&Ember.Logger.log("STATEMANAGER: Entering "+e(t,"path")),t.trigger("enter",this)},this),t(this,"currentState",r.finalState)}})}(),function(){function e(e){var t=new s;return Ember.run(EMBER_APP_BEING_TESTED,EMBER_APP_BEING_TESTED.handleURL,e),i(t,t.resolve),t}function t(e){var t=new s;return Ember.run(function(){Ember.$(e).click()}),i(t,t.resolve),t}function r(e,t){var r=new s,o=n(e);return Ember.run(function(){o.val(t)}),i(r,r.resolve),r}function n(e){return Ember.$(".ember-application").find(e)}function i(e,t){t||(t=e,e=null),stop();var r=setInterval(function(){var n=EMBER_APP_BEING_TESTED.__container__.lookup("router:main").router.isLoading;n||a||Ember.run.hasScheduledTimers()||Ember.run.currentRunLoop||(clearInterval(r),start(),Ember.run(e,t))},200)}var o,s=Ember.RSVP.Promise,a=0;Ember.Application.reopen({setupForTesting:function(){this.deferReadiness(),this.Router.reopen({location:"none"}),window.EMBER_APP_BEING_TESTED=this},injectTestHelpers:function(){Ember.$(document).ajaxStart(function(){a++}),Ember.$(document).ajaxStop(function(){a--}),window.visit=e,window.click=t,window.fillIn=r,o=window.find,window.find=n},removeTestHelpers:function(){window.visit=null,window.click=null,window.fillIn=null,window.find=o}})}()})(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||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.");
@@ -55,7 +55,7 @@ var define, requireModule;
55
55
 
56
56
  @class Ember
57
57
  @static
58
- @version 1.0.0-rc.2
58
+ @version 1.0.0-rc.3
59
59
  */
60
60
 
61
61
  if ('undefined' === typeof Ember) {
@@ -82,10 +82,10 @@ Ember.toString = function() { return "Ember"; };
82
82
  /**
83
83
  @property VERSION
84
84
  @type String
85
- @default '1.0.0-rc.2'
85
+ @default '1.0.0-rc.3'
86
86
  @final
87
87
  */
88
- Ember.VERSION = '1.0.0-rc.2';
88
+ Ember.VERSION = '1.0.0-rc.3';
89
89
 
90
90
  /**
91
91
  Standard environmental variables. You can define these in a global `ENV`
@@ -310,7 +310,7 @@ Ember.none = Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isN
310
310
  @return {Boolean}
311
311
  */
312
312
  Ember.isEmpty = function(obj) {
313
- return obj === null || obj === undefined || (obj.length === 0 && typeof obj !== 'function') || (typeof obj === 'object' && Ember.get(obj, 'length') === 0);
313
+ return Ember.isNone(obj) || (obj.length === 0 && typeof obj !== 'function') || (typeof obj === 'object' && Ember.get(obj, 'length') === 0);
314
314
  };
315
315
  Ember.empty = Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.", Ember.isEmpty) ;
316
316
 
@@ -343,6 +343,13 @@ var platform = Ember.platform = {};
343
343
  */
344
344
  Ember.create = Object.create;
345
345
 
346
+ // IE8 has Object.create but it couldn't treat property descripters.
347
+ if (Ember.create) {
348
+ if (Ember.create({a: 1}, {a: {value: 2}}).a !== 2) {
349
+ Ember.create = null;
350
+ }
351
+ }
352
+
346
353
  // STUB_OBJECT_CREATE allows us to override other libraries that stub
347
354
  // Object.create different than we would prefer
348
355
  if (!Ember.create || Ember.ENV.STUB_OBJECT_CREATE) {
@@ -477,62 +484,6 @@ if (Ember.ENV.MANDATORY_SETTER && !platform.hasPropertyAccessors) {
477
484
 
478
485
 
479
486
 
480
- (function() {
481
- var utils = Ember.EnumerableUtils = {
482
- map: function(obj, callback, thisArg) {
483
- return obj.map ? obj.map.call(obj, callback, thisArg) : Array.prototype.map.call(obj, callback, thisArg);
484
- },
485
-
486
- forEach: function(obj, callback, thisArg) {
487
- return obj.forEach ? obj.forEach.call(obj, callback, thisArg) : Array.prototype.forEach.call(obj, callback, thisArg);
488
- },
489
-
490
- indexOf: function(obj, element, index) {
491
- return obj.indexOf ? obj.indexOf.call(obj, element, index) : Array.prototype.indexOf.call(obj, element, index);
492
- },
493
-
494
- indexesOf: function(obj, elements) {
495
- return elements === undefined ? [] : utils.map(elements, function(item) {
496
- return utils.indexOf(obj, item);
497
- });
498
- },
499
-
500
- addObject: function(array, item) {
501
- var index = utils.indexOf(array, item);
502
- if (index === -1) { array.push(item); }
503
- },
504
-
505
- removeObject: function(array, item) {
506
- var index = utils.indexOf(array, item);
507
- if (index !== -1) { array.splice(index, 1); }
508
- },
509
-
510
- replace: function(array, idx, amt, objects) {
511
- if (array.replace) {
512
- return array.replace(idx, amt, objects);
513
- } else {
514
- var args = Array.prototype.concat.apply([idx, amt], objects);
515
- return array.splice.apply(array, args);
516
- }
517
- },
518
-
519
- intersection: function(array1, array2) {
520
- var intersection = [];
521
-
522
- array1.forEach(function(element) {
523
- if (array2.indexOf(element) >= 0) {
524
- intersection.push(element);
525
- }
526
- });
527
-
528
- return intersection;
529
- }
530
- };
531
-
532
- })();
533
-
534
-
535
-
536
487
  (function() {
537
488
  /*jshint newcap:false*/
538
489
  /**
@@ -1409,6 +1360,68 @@ Ember.subscribe = Ember.Instrumentation.subscribe;
1409
1360
 
1410
1361
 
1411
1362
 
1363
+ (function() {
1364
+ var map, forEach, indexOf, concat;
1365
+ concat = Array.prototype.concat;
1366
+ map = Array.prototype.map || Ember.ArrayPolyfills.map;
1367
+ forEach = Array.prototype.forEach || Ember.ArrayPolyfills.forEach;
1368
+ indexOf = Array.prototype.indexOf || Ember.ArrayPolyfills.indexOf;
1369
+
1370
+ var utils = Ember.EnumerableUtils = {
1371
+ map: function(obj, callback, thisArg) {
1372
+ return obj.map ? obj.map.call(obj, callback, thisArg) : map.call(obj, callback, thisArg);
1373
+ },
1374
+
1375
+ forEach: function(obj, callback, thisArg) {
1376
+ return obj.forEach ? obj.forEach.call(obj, callback, thisArg) : forEach.call(obj, callback, thisArg);
1377
+ },
1378
+
1379
+ indexOf: function(obj, element, index) {
1380
+ return obj.indexOf ? obj.indexOf.call(obj, element, index) : indexOf.call(obj, element, index);
1381
+ },
1382
+
1383
+ indexesOf: function(obj, elements) {
1384
+ return elements === undefined ? [] : utils.map(elements, function(item) {
1385
+ return utils.indexOf(obj, item);
1386
+ });
1387
+ },
1388
+
1389
+ addObject: function(array, item) {
1390
+ var index = utils.indexOf(array, item);
1391
+ if (index === -1) { array.push(item); }
1392
+ },
1393
+
1394
+ removeObject: function(array, item) {
1395
+ var index = utils.indexOf(array, item);
1396
+ if (index !== -1) { array.splice(index, 1); }
1397
+ },
1398
+
1399
+ replace: function(array, idx, amt, objects) {
1400
+ if (array.replace) {
1401
+ return array.replace(idx, amt, objects);
1402
+ } else {
1403
+ var args = concat.apply([idx, amt], objects);
1404
+ return array.splice.apply(array, args);
1405
+ }
1406
+ },
1407
+
1408
+ intersection: function(array1, array2) {
1409
+ var intersection = [];
1410
+
1411
+ utils.forEach(array1, function(element) {
1412
+ if (utils.indexOf(array2, element) >= 0) {
1413
+ intersection.push(element);
1414
+ }
1415
+ });
1416
+
1417
+ return intersection;
1418
+ }
1419
+ };
1420
+
1421
+ })();
1422
+
1423
+
1424
+
1412
1425
  (function() {
1413
1426
  /**
1414
1427
  @module ember-metal
@@ -1548,7 +1561,7 @@ OrderedSet.prototype = {
1548
1561
  */
1549
1562
  forEach: function(fn, self) {
1550
1563
  // allow mutation during iteration
1551
- var list = this.list.slice();
1564
+ var list = this.toArray();
1552
1565
 
1553
1566
  for (var i = 0, j = list.length; i < j; i++) {
1554
1567
  fn.call(self, list[i]);
@@ -1571,7 +1584,7 @@ OrderedSet.prototype = {
1571
1584
  var set = new OrderedSet();
1572
1585
 
1573
1586
  set.presenceSet = copy(this.presenceSet);
1574
- set.list = this.list.slice();
1587
+ set.list = this.toArray();
1575
1588
 
1576
1589
  return set;
1577
1590
  }
@@ -1654,12 +1667,10 @@ Map.prototype = {
1654
1667
  // to use in browsers that are not ES6 friendly;
1655
1668
  var keys = this.keys,
1656
1669
  values = this.values,
1657
- guid = guidFor(key),
1658
- value;
1670
+ guid = guidFor(key);
1659
1671
 
1660
1672
  if (values.hasOwnProperty(guid)) {
1661
1673
  keys.remove(key);
1662
- value = values[guid];
1663
1674
  delete values[guid];
1664
1675
  return true;
1665
1676
  } else {
@@ -1831,12 +1842,11 @@ get = function get(obj, keyName) {
1831
1842
  obj = null;
1832
1843
  }
1833
1844
 
1834
- if (!obj || keyName.indexOf('.') !== -1) {
1835
1845
 
1846
+ if (obj === null || keyName.indexOf('.') !== -1) {
1836
1847
  return getPath(obj, keyName);
1837
1848
  }
1838
1849
 
1839
-
1840
1850
  var meta = obj[META_KEY], desc = meta && meta.descs[keyName], ret;
1841
1851
  if (desc) {
1842
1852
  return desc.get(obj, keyName);
@@ -1908,7 +1918,7 @@ var getPath = Ember._getPath = function(root, path) {
1908
1918
 
1909
1919
  parts = path.split(".");
1910
1920
  len = parts.length;
1911
- for (idx=0; root && idx<len; idx++) {
1921
+ for (idx=0; root !== undefined && root !== null && idx<len; idx++) {
1912
1922
  root = get(root, parts[idx], true);
1913
1923
  if (root && root.isDestroyed) { return undefined; }
1914
1924
  }
@@ -1954,7 +1964,9 @@ Ember.getPath = Ember.deprecateFunc('getPath is deprecated since get now support
1954
1964
 
1955
1965
  var o_create = Ember.create,
1956
1966
  metaFor = Ember.meta,
1957
- META_KEY = Ember.META_KEY;
1967
+ META_KEY = Ember.META_KEY,
1968
+ /* listener flags */
1969
+ ONCE = 1, SUSPENDED = 2, IMMEDIATE = 4;
1958
1970
 
1959
1971
  /*
1960
1972
  The event system uses a series of nested hashes to store listeners on an
@@ -1967,7 +1979,7 @@ var o_create = Ember.create,
1967
1979
  {
1968
1980
  listeners: { // variable name: `listenerSet`
1969
1981
  "foo:changed": [ // variable name: `actions`
1970
- [target, method, onceFlag, suspendedFlag]
1982
+ [target, method, flags]
1971
1983
  ]
1972
1984
  }
1973
1985
  }
@@ -2013,12 +2025,11 @@ function actionsUnion(obj, eventName, otherActions) {
2013
2025
  for (var i = actions.length - 1; i >= 0; i--) {
2014
2026
  var target = actions[i][0],
2015
2027
  method = actions[i][1],
2016
- once = actions[i][2],
2017
- suspended = actions[i][3],
2028
+ flags = actions[i][2],
2018
2029
  actionIndex = indexOf(otherActions, target, method);
2019
2030
 
2020
2031
  if (actionIndex === -1) {
2021
- otherActions.push([target, method, once, suspended]);
2032
+ otherActions.push([target, method, flags]);
2022
2033
  }
2023
2034
  }
2024
2035
  }
@@ -2032,14 +2043,13 @@ function actionsDiff(obj, eventName, otherActions) {
2032
2043
  for (var i = actions.length - 1; i >= 0; i--) {
2033
2044
  var target = actions[i][0],
2034
2045
  method = actions[i][1],
2035
- once = actions[i][2],
2036
- suspended = actions[i][3],
2046
+ flags = actions[i][2],
2037
2047
  actionIndex = indexOf(otherActions, target, method);
2038
2048
 
2039
2049
  if (actionIndex !== -1) { continue; }
2040
2050
 
2041
- otherActions.push([target, method, once, suspended]);
2042
- diffActions.push([target, method, once, suspended]);
2051
+ otherActions.push([target, method, flags]);
2052
+ diffActions.push([target, method, flags]);
2043
2053
  }
2044
2054
 
2045
2055
  return diffActions;
@@ -2065,11 +2075,14 @@ function addListener(obj, eventName, target, method, once) {
2065
2075
  }
2066
2076
 
2067
2077
  var actions = actionsFor(obj, eventName),
2068
- actionIndex = indexOf(actions, target, method);
2078
+ actionIndex = indexOf(actions, target, method),
2079
+ flags = 0;
2080
+
2081
+ if (once) flags |= ONCE;
2069
2082
 
2070
2083
  if (actionIndex !== -1) { return; }
2071
2084
 
2072
- actions.push([target, method, once, undefined]);
2085
+ actions.push([target, method, flags]);
2073
2086
 
2074
2087
  if ('function' === typeof obj.didAddListener) {
2075
2088
  obj.didAddListener(eventName, target, method);
@@ -2096,7 +2109,7 @@ function removeListener(obj, eventName, target, method) {
2096
2109
  target = null;
2097
2110
  }
2098
2111
 
2099
- function _removeListener(target, method, once) {
2112
+ function _removeListener(target, method) {
2100
2113
  var actions = actionsFor(obj, eventName),
2101
2114
  actionIndex = indexOf(actions, target, method);
2102
2115
 
@@ -2153,12 +2166,12 @@ function suspendListener(obj, eventName, target, method, callback) {
2153
2166
 
2154
2167
  if (actionIndex !== -1) {
2155
2168
  action = actions[actionIndex].slice(); // copy it, otherwise we're modifying a shared object
2156
- action[3] = true; // mark the action as suspended
2169
+ action[2] |= SUSPENDED; // mark the action as suspended
2157
2170
  actions[actionIndex] = action; // replace the shared object with our copy
2158
2171
  }
2159
2172
 
2160
2173
  function tryable() { return callback.call(target); }
2161
- function finalizer() { if (action) { action[3] = undefined; } }
2174
+ function finalizer() { if (action) { action[2] &= ~SUSPENDED; } }
2162
2175
 
2163
2176
  return Ember.tryFinally(tryable, finalizer);
2164
2177
  }
@@ -2197,7 +2210,7 @@ function suspendListeners(obj, eventNames, target, method, callback) {
2197
2210
 
2198
2211
  if (actionIndex !== -1) {
2199
2212
  action = actions[actionIndex].slice();
2200
- action[3] = true;
2213
+ action[2] |= SUSPENDED;
2201
2214
  actions[actionIndex] = action;
2202
2215
  suspendedActions.push(action);
2203
2216
  }
@@ -2207,7 +2220,7 @@ function suspendListeners(obj, eventNames, target, method, callback) {
2207
2220
 
2208
2221
  function finalizer() {
2209
2222
  for (i = 0, l = suspendedActions.length; i < l; i++) {
2210
- suspendedActions[i][3] = undefined;
2223
+ suspendedActions[i][2] &= ~SUSPENDED;
2211
2224
  }
2212
2225
  }
2213
2226
 
@@ -2257,13 +2270,11 @@ function sendEvent(obj, eventName, params, actions) {
2257
2270
  if (!actions) { return; }
2258
2271
 
2259
2272
  for (var i = actions.length - 1; i >= 0; i--) { // looping in reverse for once listeners
2260
- if (!actions[i] || actions[i][3] === true) { continue; }
2261
-
2262
- var target = actions[i][0],
2263
- method = actions[i][1],
2264
- once = actions[i][2];
2265
-
2266
- if (once) { removeListener(obj, eventName, target, method); }
2273
+ var action = actions[i];
2274
+ if (!action) { continue; }
2275
+ var target = action[0], method = action[1], flags = action[2];
2276
+ if (flags & SUSPENDED) { continue; }
2277
+ if (flags & ONCE) { removeListener(obj, eventName, target, method); }
2267
2278
  if (!target) { target = obj; }
2268
2279
  if ('string' === typeof method) { method = target[method]; }
2269
2280
  if (params) {
@@ -2343,7 +2354,7 @@ var guidFor = Ember.guidFor,
2343
2354
  keyName: keyName,
2344
2355
  eventName: eventName,
2345
2356
  listeners: [
2346
- [target, method, onceFlag, suspendedFlag]
2357
+ [target, method, flags]
2347
2358
  ]
2348
2359
  },
2349
2360
  ...
@@ -2617,8 +2628,6 @@ var notifyObservers = function(obj, keyName) {
2617
2628
  var META_KEY = Ember.META_KEY,
2618
2629
  MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER,
2619
2630
  IS_GLOBAL = /^([A-Z$]|([0-9][A-Z$]))/,
2620
- propertyWillChange = Ember.propertyWillChange,
2621
- propertyDidChange = Ember.propertyDidChange,
2622
2631
  getPath = Ember._getPath;
2623
2632
 
2624
2633
  /**
@@ -2772,7 +2781,7 @@ var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
2772
2781
  //
2773
2782
 
2774
2783
  /**
2775
- Objects of this type can implement an interface to responds requests to
2784
+ Objects of this type can implement an interface to respond to requests to
2776
2785
  get and set. The default implementation handles simple properties.
2777
2786
 
2778
2787
  You generally won't need to create or subclass this directly.
@@ -3077,7 +3086,6 @@ function isProto(pvalue) {
3077
3086
  // value for the key then the node won't actually watch it. For a root node
3078
3087
  // pass null for parent and key and object for value.
3079
3088
  var ChainNode = Ember._ChainNode = function(parent, key, value) {
3080
- var obj;
3081
3089
  this._parent = parent;
3082
3090
  this._key = key;
3083
3091
 
@@ -3525,7 +3533,7 @@ var get = Ember.get,
3525
3533
  This function returns a map of unique dependencies for a
3526
3534
  given object and key.
3527
3535
  */
3528
- function keysForDep(obj, depsMeta, depKey) {
3536
+ function keysForDep(depsMeta, depKey) {
3529
3537
  var keys = depsMeta[depKey];
3530
3538
  if (!keys) {
3531
3539
  // if there are no dependencies yet for a the given key
@@ -3539,8 +3547,8 @@ function keysForDep(obj, depsMeta, depKey) {
3539
3547
  return keys;
3540
3548
  }
3541
3549
 
3542
- function metaForDeps(obj, meta) {
3543
- return keysForDep(obj, meta, 'deps');
3550
+ function metaForDeps(meta) {
3551
+ return keysForDep(meta, 'deps');
3544
3552
  }
3545
3553
 
3546
3554
  function addDependentKeys(desc, obj, keyName, meta) {
@@ -3549,12 +3557,12 @@ function addDependentKeys(desc, obj, keyName, meta) {
3549
3557
  var depKeys = desc._dependentKeys, depsMeta, idx, len, depKey, keys;
3550
3558
  if (!depKeys) return;
3551
3559
 
3552
- depsMeta = metaForDeps(obj, meta);
3560
+ depsMeta = metaForDeps(meta);
3553
3561
 
3554
3562
  for(idx = 0, len = depKeys.length; idx < len; idx++) {
3555
3563
  depKey = depKeys[idx];
3556
3564
  // Lookup keys meta for depKey
3557
- keys = keysForDep(obj, depsMeta, depKey);
3565
+ keys = keysForDep(depsMeta, depKey);
3558
3566
  // Increment the number of times depKey depends on keyName.
3559
3567
  keys[keyName] = (keys[keyName] || 0) + 1;
3560
3568
  // Watch the depKey
@@ -3568,12 +3576,12 @@ function removeDependentKeys(desc, obj, keyName, meta) {
3568
3576
  var depKeys = desc._dependentKeys, depsMeta, idx, len, depKey, keys;
3569
3577
  if (!depKeys) return;
3570
3578
 
3571
- depsMeta = metaForDeps(obj, meta);
3579
+ depsMeta = metaForDeps(meta);
3572
3580
 
3573
3581
  for(idx = 0, len = depKeys.length; idx < len; idx++) {
3574
3582
  depKey = depKeys[idx];
3575
3583
  // Lookup keys meta for depKey
3576
- keys = keysForDep(obj, depsMeta, depKey);
3584
+ keys = keysForDep(depsMeta, depKey);
3577
3585
  // Increment the number of times depKey depends on keyName.
3578
3586
  keys[keyName] = (keys[keyName] || 0) - 1;
3579
3587
  // Watch the depKey
@@ -3604,25 +3612,29 @@ ComputedProperty.prototype = new Ember.Descriptor();
3604
3612
 
3605
3613
  var ComputedPropertyPrototype = ComputedProperty.prototype;
3606
3614
 
3607
- /**
3608
- Call on a computed property to set it into cacheable mode. When in this
3609
- mode the computed property will automatically cache the return value of
3610
- your function until one of the dependent keys changes.
3615
+ /*
3616
+ Call on a computed property to explicitly change it's cacheable mode.
3617
+
3618
+ Please use `.volatile` over this method.
3611
3619
 
3612
3620
  ```javascript
3613
3621
  MyApp.president = Ember.Object.create({
3614
3622
  fullName: function() {
3615
3623
  return this.get('firstName') + ' ' + this.get('lastName');
3616
3624
 
3617
- // After calculating the value of this function, Ember will
3618
- // return that value without re-executing this function until
3619
- // one of the dependent properties change.
3625
+ // By default, Ember will return the value of this property
3626
+ // without re-executing this function.
3620
3627
  }.property('firstName', 'lastName')
3628
+
3629
+ initials: function() {
3630
+ return this.get('firstName')[0] + this.get('lastName')[0];
3631
+
3632
+ // This function will be executed every time this property
3633
+ // is requested.
3634
+ }.property('firstName', 'lastName').cacheable(false)
3621
3635
  });
3622
3636
  ```
3623
3637
 
3624
- Properties are cacheable by default.
3625
-
3626
3638
  @method cacheable
3627
3639
  @param {Boolean} aFlag optional set to `false` to disable caching
3628
3640
  @return {Ember.ComputedProperty} this
@@ -4186,7 +4198,6 @@ Ember.computed.alias = function(dependentKey) {
4186
4198
  */
4187
4199
  Ember.computed.defaultTo = function(defaultPath) {
4188
4200
  return Ember.computed(function(key, newValue, cachedValue) {
4189
- var result;
4190
4201
  if (arguments.length === 1) {
4191
4202
  return cachedValue != null ? cachedValue : get(this, defaultPath);
4192
4203
  }
@@ -4346,8 +4357,6 @@ function invoke(target, method, args, ignore) {
4346
4357
  // RUNLOOP
4347
4358
  //
4348
4359
 
4349
- var timerMark; // used by timers...
4350
-
4351
4360
  /**
4352
4361
  Ember RunLoop (Private)
4353
4362
 
@@ -4478,8 +4487,6 @@ RunLoop.prototype = {
4478
4487
  }
4479
4488
  }
4480
4489
 
4481
- timerMark = null;
4482
-
4483
4490
  return this;
4484
4491
  }
4485
4492
 
@@ -4595,7 +4602,7 @@ Ember.run.queues = ['sync', 'actions', 'destroy'];
4595
4602
 
4596
4603
  At the end of a RunLoop, any methods scheduled in this way will be invoked.
4597
4604
  Methods will be invoked in an order matching the named queues defined in
4598
- the `run.queues` property.
4605
+ the `Ember.run.queues` property.
4599
4606
 
4600
4607
  ```javascript
4601
4608
  Ember.run.schedule('sync', this, function(){
@@ -4704,27 +4711,44 @@ Ember.run.sync = function() {
4704
4711
 
4705
4712
  var timers = {}; // active timers...
4706
4713
 
4714
+ function sortByExpires(timerA, timerB) {
4715
+ var a = timerA.expires,
4716
+ b = timerB.expires;
4717
+
4718
+ if (a > b) { return 1; }
4719
+ if (a < b) { return -1; }
4720
+ return 0;
4721
+ }
4722
+
4707
4723
  var scheduledLater, scheduledLaterExpires;
4708
4724
  function invokeLaterTimers() {
4709
4725
  scheduledLater = null;
4710
4726
  run(function() {
4711
4727
  var now = (+ new Date()), earliest = -1;
4728
+ var timersToBeInvoked = [];
4712
4729
  for (var key in timers) {
4713
4730
  if (!timers.hasOwnProperty(key)) { continue; }
4714
4731
  var timer = timers[key];
4715
4732
  if (timer && timer.expires) {
4716
4733
  if (now >= timer.expires) {
4717
4734
  delete timers[key];
4718
- invoke(timer.target, timer.method, timer.args, 2);
4735
+ timersToBeInvoked.push(timer);
4719
4736
  } else {
4720
4737
  if (earliest < 0 || (timer.expires < earliest)) { earliest = timer.expires; }
4721
4738
  }
4722
4739
  }
4723
4740
  }
4724
4741
 
4742
+ forEach.call(timersToBeInvoked.sort(sortByExpires), function(timer) {
4743
+ invoke(timer.target, timer.method, timer.args, 2);
4744
+ });
4745
+
4725
4746
  // schedule next timeout to fire when the earliest timer expires
4726
4747
  if (earliest > 0) {
4727
- scheduledLater = setTimeout(invokeLaterTimers, earliest - now);
4748
+ // To allow overwrite `setTimeout` as stub from test code.
4749
+ // The assignment to `window.setTimeout` doesn't equal to `setTimeout` in older IE.
4750
+ // So `window` is required.
4751
+ scheduledLater = window.setTimeout(invokeLaterTimers, earliest - now);
4728
4752
  scheduledLaterExpires = earliest;
4729
4753
  }
4730
4754
  });
@@ -4826,8 +4850,25 @@ function scheduleOnce(queue, target, method, args) {
4826
4850
  }
4827
4851
 
4828
4852
  /**
4829
- Schedules an item to run one time during the current RunLoop. Calling
4830
- this method with the same target/method combination will have no effect.
4853
+ Schedule a function to run one time during the current RunLoop. This is equivalent
4854
+ to calling `scheduleOnce` with the "actions" queue.
4855
+
4856
+ @method once
4857
+ @param {Object} [target] The target of the method to invoke.
4858
+ @param {Function|String} method The method to invoke.
4859
+ If you pass a string it will be resolved on the
4860
+ target at the time the method is invoked.
4861
+ @param {Object} [args*] Optional arguments to pass to the timeout.
4862
+ @return {Object} timer
4863
+ */
4864
+ Ember.run.once = function(target, method) {
4865
+ return scheduleOnce('actions', target, method, slice.call(arguments, 2));
4866
+ };
4867
+
4868
+ /**
4869
+ Schedules a function to run one time in a given queue of the current RunLoop.
4870
+ Calling this method with the same queue/target/method combination will have
4871
+ no effect (past the initial call).
4831
4872
 
4832
4873
  Note that although you can pass optional arguments these will not be
4833
4874
  considered when looking for duplicates. New arguments will replace previous
@@ -4835,41 +4876,40 @@ function scheduleOnce(queue, target, method, args) {
4835
4876
 
4836
4877
  ```javascript
4837
4878
  Ember.run(function(){
4838
- var doFoo = function() { foo(); }
4839
- Ember.run.once(myContext, doFoo);
4840
- Ember.run.once(myContext, doFoo);
4841
- // doFoo will only be executed once at the end of the RunLoop
4879
+ var sayHi = function() { console.log('hi'); }
4880
+ Ember.run.scheduleOnce('afterRender', myContext, sayHi);
4881
+ Ember.run.scheduleOnce('afterRender', myContext, sayHi);
4882
+ // doFoo will only be executed once, in the afterRender queue of the RunLoop
4842
4883
  });
4843
4884
  ```
4844
4885
 
4845
- Also note that passing an anonymous function to `Ember.run.once` will
4886
+ Also note that passing an anonymous function to `Ember.run.scheduleOnce` will
4846
4887
  not prevent additional calls with an identical anonymous function from
4847
4888
  scheduling the items multiple times, e.g.:
4848
4889
 
4849
4890
  ```javascript
4850
4891
  function scheduleIt() {
4851
- Ember.run.once(myContext, function() { console.log("Closure"); });
4892
+ Ember.run.scheduleOnce('actions', myContext, function() { console.log("Closure"); });
4852
4893
  }
4853
4894
  scheduleIt();
4854
4895
  scheduleIt();
4855
- // "Closure" will print twice, even though we're using `Ember.run.once`,
4896
+ // "Closure" will print twice, even though we're using `Ember.run.scheduleOnce`,
4856
4897
  // because the function we pass to it is anonymous and won't match the
4857
4898
  // previously scheduled operation.
4858
4899
  ```
4859
4900
 
4860
- @method once
4861
- @param {Object} [target] target of method to invoke
4901
+ Available queues, and their order, can be found at `Ember.run.queues`
4902
+
4903
+ @method scheduleOnce
4904
+ @param {String} [queue] The name of the queue to schedule against. Default queues are 'sync' and 'actions'.
4905
+ @param {Object} [target] The target of the method to invoke.
4862
4906
  @param {Function|String} method The method to invoke.
4863
4907
  If you pass a string it will be resolved on the
4864
4908
  target at the time the method is invoked.
4865
4909
  @param {Object} [args*] Optional arguments to pass to the timeout.
4866
4910
  @return {Object} timer
4867
4911
  */
4868
- Ember.run.once = function(target, method) {
4869
- return scheduleOnce('actions', target, method, slice.call(arguments, 2));
4870
- };
4871
-
4872
- Ember.run.scheduleOnce = function(queue, target, method, args) {
4912
+ Ember.run.scheduleOnce = function(queue, target, method) {
4873
4913
  return scheduleOnce(queue, target, method, slice.call(arguments, 3));
4874
4914
  };
4875
4915
 
@@ -5305,7 +5345,7 @@ mixinProperties(Binding, {
5305
5345
  Properties ending in a `Binding` suffix will be converted to `Ember.Binding`
5306
5346
  instances. The value of this property should be a string representing a path
5307
5347
  to another object or a custom binding instanced created using Binding helpers
5308
- (see "Customizing Your Bindings"):
5348
+ (see "One Way Bindings"):
5309
5349
 
5310
5350
  ```
5311
5351
  valueBinding: "MyApp.someController.title"
@@ -6044,7 +6084,7 @@ Ember.alias = function(methodName) {
6044
6084
  return new Alias(methodName);
6045
6085
  };
6046
6086
 
6047
- Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.", Ember.alias);
6087
+ Ember.alias = Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.", Ember.alias);
6048
6088
 
6049
6089
  /**
6050
6090
  Makes a method available via an additional name.
@@ -6132,14 +6172,57 @@ Ember Metal
6132
6172
  })();
6133
6173
 
6134
6174
  (function() {
6135
- define("rsvp",
6136
- [],
6137
- function() {
6175
+ define("rsvp/all",
6176
+ ["rsvp/defer","exports"],
6177
+ function(__dependency1__, __exports__) {
6178
+ "use strict";
6179
+ var defer = __dependency1__.defer;
6180
+
6181
+ function all(promises) {
6182
+ var results = [], deferred = defer(), remaining = promises.length;
6183
+
6184
+ if (remaining === 0) {
6185
+ deferred.resolve([]);
6186
+ }
6187
+
6188
+ var resolver = function(index) {
6189
+ return function(value) {
6190
+ resolveAll(index, value);
6191
+ };
6192
+ };
6193
+
6194
+ var resolveAll = function(index, value) {
6195
+ results[index] = value;
6196
+ if (--remaining === 0) {
6197
+ deferred.resolve(results);
6198
+ }
6199
+ };
6200
+
6201
+ var rejectAll = function(error) {
6202
+ deferred.reject(error);
6203
+ };
6204
+
6205
+ for (var i = 0; i < promises.length; i++) {
6206
+ if (promises[i] && typeof promises[i].then === 'function') {
6207
+ promises[i].then(resolver(i), rejectAll);
6208
+ } else {
6209
+ resolveAll(i, promises[i]);
6210
+ }
6211
+ }
6212
+ return deferred.promise;
6213
+ }
6214
+
6215
+ __exports__.all = all;
6216
+ });
6217
+
6218
+ define("rsvp/async",
6219
+ ["exports"],
6220
+ function(__exports__) {
6138
6221
  "use strict";
6139
6222
  var browserGlobal = (typeof window !== 'undefined') ? window : {};
6140
6223
 
6141
- var MutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
6142
- var RSVP, async;
6224
+ var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
6225
+ var async;
6143
6226
 
6144
6227
  if (typeof process !== 'undefined' &&
6145
6228
  {}.toString.call(process) === '[object process]') {
@@ -6148,10 +6231,10 @@ define("rsvp",
6148
6231
  callback.call(binding);
6149
6232
  });
6150
6233
  };
6151
- } else if (MutationObserver) {
6234
+ } else if (BrowserMutationObserver) {
6152
6235
  var queue = [];
6153
6236
 
6154
- var observer = new MutationObserver(function() {
6237
+ var observer = new BrowserMutationObserver(function() {
6155
6238
  var toProcess = queue.slice();
6156
6239
  queue = [];
6157
6240
 
@@ -6182,6 +6265,47 @@ define("rsvp",
6182
6265
  };
6183
6266
  }
6184
6267
 
6268
+
6269
+ __exports__.async = async;
6270
+ });
6271
+
6272
+ define("rsvp/config",
6273
+ ["rsvp/async","exports"],
6274
+ function(__dependency1__, __exports__) {
6275
+ "use strict";
6276
+ var async = __dependency1__.async;
6277
+
6278
+ var config = {};
6279
+ config.async = async;
6280
+
6281
+ __exports__.config = config;
6282
+ });
6283
+
6284
+ define("rsvp/defer",
6285
+ ["rsvp/promise","exports"],
6286
+ function(__dependency1__, __exports__) {
6287
+ "use strict";
6288
+ var Promise = __dependency1__.Promise;
6289
+
6290
+ function defer() {
6291
+ var deferred = {};
6292
+
6293
+ var promise = new Promise(function(resolve, reject) {
6294
+ deferred.resolve = resolve;
6295
+ deferred.reject = reject;
6296
+ });
6297
+
6298
+ deferred.promise = promise;
6299
+ return deferred;
6300
+ }
6301
+
6302
+ __exports__.defer = defer;
6303
+ });
6304
+
6305
+ define("rsvp/events",
6306
+ ["exports"],
6307
+ function(__exports__) {
6308
+ "use strict";
6185
6309
  var Event = function(type, options) {
6186
6310
  this.type = type;
6187
6311
 
@@ -6276,144 +6400,348 @@ define("rsvp",
6276
6400
  }
6277
6401
  };
6278
6402
 
6279
- var Promise = function() {
6280
- this.on('promise:resolved', function(event) {
6281
- this.trigger('success', { detail: event.detail });
6282
- }, this);
6283
6403
 
6284
- this.on('promise:failed', function(event) {
6285
- this.trigger('error', { detail: event.detail });
6286
- }, this);
6287
- };
6404
+ __exports__.EventTarget = EventTarget;
6405
+ });
6288
6406
 
6289
- var noop = function() {};
6407
+ define("rsvp/hash",
6408
+ ["rsvp/defer","exports"],
6409
+ function(__dependency1__, __exports__) {
6410
+ "use strict";
6411
+ var defer = __dependency1__.defer;
6290
6412
 
6291
- var invokeCallback = function(type, promise, callback, event) {
6292
- var hasCallback = typeof callback === 'function',
6293
- value, error, succeeded, failed;
6413
+ function size(object) {
6414
+ var size = 0;
6294
6415
 
6295
- if (hasCallback) {
6296
- try {
6297
- value = callback(event.detail);
6298
- succeeded = true;
6299
- } catch(e) {
6300
- failed = true;
6301
- error = e;
6302
- }
6303
- } else {
6304
- value = event.detail;
6305
- succeeded = true;
6416
+ for (var prop in object) {
6417
+ size++;
6306
6418
  }
6307
6419
 
6308
- if (value && typeof value.then === 'function') {
6309
- value.then(function(value) {
6310
- promise.resolve(value);
6311
- }, function(error) {
6312
- promise.reject(error);
6313
- });
6314
- } else if (hasCallback && succeeded) {
6315
- promise.resolve(value);
6316
- } else if (failed) {
6317
- promise.reject(error);
6318
- } else {
6319
- promise[type](value);
6420
+ return size;
6421
+ }
6422
+
6423
+ function hash(promises) {
6424
+ var results = {}, deferred = defer(), remaining = size(promises);
6425
+
6426
+ if (remaining === 0) {
6427
+ deferred.resolve({});
6320
6428
  }
6321
- };
6322
6429
 
6323
- Promise.prototype = {
6324
- then: function(done, fail) {
6325
- var thenPromise = new Promise();
6430
+ var resolver = function(prop) {
6431
+ return function(value) {
6432
+ resolveAll(prop, value);
6433
+ };
6434
+ };
6326
6435
 
6327
- if (this.isResolved) {
6328
- RSVP.async(function() {
6329
- invokeCallback('resolve', thenPromise, done, { detail: this.resolvedValue });
6330
- }, this);
6436
+ var resolveAll = function(prop, value) {
6437
+ results[prop] = value;
6438
+ if (--remaining === 0) {
6439
+ deferred.resolve(results);
6331
6440
  }
6441
+ };
6332
6442
 
6333
- if (this.isRejected) {
6334
- RSVP.async(function() {
6335
- invokeCallback('reject', thenPromise, fail, { detail: this.rejectedValue });
6336
- }, this);
6443
+ var rejectAll = function(error) {
6444
+ deferred.reject(error);
6445
+ };
6446
+
6447
+ for (var prop in promises) {
6448
+ if (promises[prop] && typeof promises[prop].then === 'function') {
6449
+ promises[prop].then(resolver(prop), rejectAll);
6450
+ } else {
6451
+ resolveAll(prop, promises[prop]);
6337
6452
  }
6453
+ }
6338
6454
 
6339
- this.on('promise:resolved', function(event) {
6340
- invokeCallback('resolve', thenPromise, done, event);
6341
- });
6455
+ return deferred.promise;
6456
+ }
6342
6457
 
6343
- this.on('promise:failed', function(event) {
6344
- invokeCallback('reject', thenPromise, fail, event);
6345
- });
6458
+ __exports__.hash = hash;
6459
+ });
6346
6460
 
6347
- return thenPromise;
6348
- },
6461
+ define("rsvp/node",
6462
+ ["rsvp/promise","rsvp/all","exports"],
6463
+ function(__dependency1__, __dependency2__, __exports__) {
6464
+ "use strict";
6465
+ var Promise = __dependency1__.Promise;
6466
+ var all = __dependency2__.all;
6467
+
6468
+ function makeNodeCallbackFor(resolve, reject) {
6469
+ return function (error, value) {
6470
+ if (error) {
6471
+ reject(error);
6472
+ } else if (arguments.length > 2) {
6473
+ resolve(Array.prototype.slice.call(arguments, 1));
6474
+ } else {
6475
+ resolve(value);
6476
+ }
6477
+ };
6478
+ }
6349
6479
 
6350
- resolve: function(value) {
6351
- resolve(this, value);
6480
+ function denodeify(nodeFunc) {
6481
+ return function() {
6482
+ var nodeArgs = Array.prototype.slice.call(arguments), resolve, reject;
6352
6483
 
6353
- this.resolve = noop;
6354
- this.reject = noop;
6355
- },
6484
+ var promise = new Promise(function(nodeResolve, nodeReject) {
6485
+ resolve = nodeResolve;
6486
+ reject = nodeReject;
6487
+ });
6488
+
6489
+ all(nodeArgs).then(function(nodeArgs) {
6490
+ nodeArgs.push(makeNodeCallbackFor(resolve, reject));
6491
+
6492
+ try {
6493
+ nodeFunc.apply(this, nodeArgs);
6494
+ } catch(e) {
6495
+ reject(e);
6496
+ }
6497
+ });
6498
+
6499
+ return promise;
6500
+ };
6501
+ }
6502
+
6503
+ __exports__.denodeify = denodeify;
6504
+ });
6505
+
6506
+ define("rsvp/promise",
6507
+ ["rsvp/config","rsvp/events","exports"],
6508
+ function(__dependency1__, __dependency2__, __exports__) {
6509
+ "use strict";
6510
+ var config = __dependency1__.config;
6511
+ var EventTarget = __dependency2__.EventTarget;
6512
+
6513
+ function objectOrFunction(x) {
6514
+ return isFunction(x) || (typeof x === "object" && x !== null);
6515
+ }
6516
+
6517
+ function isFunction(x){
6518
+ return typeof x === "function";
6519
+ }
6520
+
6521
+ var Promise = function(resolver) {
6522
+ var promise = this,
6523
+ resolved = false;
6524
+
6525
+ if (typeof resolver !== 'function') {
6526
+ throw new TypeError('You must pass a resolver function as the sole argument to the promise constructor');
6527
+ }
6528
+
6529
+ if (!(promise instanceof Promise)) {
6530
+ return new Promise(resolver);
6531
+ }
6532
+
6533
+ var resolvePromise = function(value) {
6534
+ if (resolved) { return; }
6535
+ resolved = true;
6536
+ resolve(promise, value);
6537
+ };
6538
+
6539
+ var rejectPromise = function(value) {
6540
+ if (resolved) { return; }
6541
+ resolved = true;
6542
+ reject(promise, value);
6543
+ };
6544
+
6545
+ this.on('promise:resolved', function(event) {
6546
+ this.trigger('success', { detail: event.detail });
6547
+ }, this);
6548
+
6549
+ this.on('promise:failed', function(event) {
6550
+ this.trigger('error', { detail: event.detail });
6551
+ }, this);
6552
+
6553
+ resolver(resolvePromise, rejectPromise);
6554
+ };
6555
+
6556
+ var invokeCallback = function(type, promise, callback, event) {
6557
+ var hasCallback = isFunction(callback),
6558
+ value, error, succeeded, failed;
6559
+
6560
+ if (hasCallback) {
6561
+ try {
6562
+ value = callback(event.detail);
6563
+ succeeded = true;
6564
+ } catch(e) {
6565
+ failed = true;
6566
+ error = e;
6567
+ }
6568
+ } else {
6569
+ value = event.detail;
6570
+ succeeded = true;
6571
+ }
6572
+
6573
+ if (handleThenable(promise, value)) {
6574
+ return;
6575
+ } else if (hasCallback && succeeded) {
6576
+ resolve(promise, value);
6577
+ } else if (failed) {
6578
+ reject(promise, error);
6579
+ } else if (type === 'resolve') {
6580
+ resolve(promise, value);
6581
+ } else if (type === 'reject') {
6582
+ reject(promise, value);
6583
+ }
6584
+ };
6585
+
6586
+ Promise.prototype = {
6587
+ constructor: Promise,
6588
+
6589
+ then: function(done, fail) {
6590
+ var thenPromise = new Promise(function() {});
6591
+
6592
+ if (this.isFulfilled) {
6593
+ config.async(function() {
6594
+ invokeCallback('resolve', thenPromise, done, { detail: this.fulfillmentValue });
6595
+ }, this);
6596
+ }
6597
+
6598
+ if (this.isRejected) {
6599
+ config.async(function() {
6600
+ invokeCallback('reject', thenPromise, fail, { detail: this.rejectedReason });
6601
+ }, this);
6602
+ }
6603
+
6604
+ this.on('promise:resolved', function(event) {
6605
+ invokeCallback('resolve', thenPromise, done, event);
6606
+ });
6356
6607
 
6357
- reject: function(value) {
6358
- reject(this, value);
6608
+ this.on('promise:failed', function(event) {
6609
+ invokeCallback('reject', thenPromise, fail, event);
6610
+ });
6359
6611
 
6360
- this.resolve = noop;
6361
- this.reject = noop;
6612
+ return thenPromise;
6362
6613
  }
6363
6614
  };
6364
6615
 
6616
+ EventTarget.mixin(Promise.prototype);
6617
+
6365
6618
  function resolve(promise, value) {
6366
- RSVP.async(function() {
6619
+ if (promise === value) {
6620
+ fulfill(promise, value);
6621
+ } else if (!handleThenable(promise, value)) {
6622
+ fulfill(promise, value);
6623
+ }
6624
+ }
6625
+
6626
+ function handleThenable(promise, value) {
6627
+ var then = null;
6628
+
6629
+ if (objectOrFunction(value)) {
6630
+ try {
6631
+ then = value.then;
6632
+ } catch(e) {
6633
+ reject(promise, e);
6634
+ return true;
6635
+ }
6636
+
6637
+ if (isFunction(then)) {
6638
+ try {
6639
+ then.call(value, function(val) {
6640
+ if (value !== val) {
6641
+ resolve(promise, val);
6642
+ } else {
6643
+ fulfill(promise, val);
6644
+ }
6645
+ }, function(val) {
6646
+ reject(promise, val);
6647
+ });
6648
+ } catch (e) {
6649
+ reject(promise, e);
6650
+ }
6651
+ return true;
6652
+ }
6653
+ }
6654
+
6655
+ return false;
6656
+ }
6657
+
6658
+ function fulfill(promise, value) {
6659
+ config.async(function() {
6367
6660
  promise.trigger('promise:resolved', { detail: value });
6368
- promise.isResolved = true;
6369
- promise.resolvedValue = value;
6661
+ promise.isFulfilled = true;
6662
+ promise.fulfillmentValue = value;
6370
6663
  });
6371
6664
  }
6372
6665
 
6373
6666
  function reject(promise, value) {
6374
- RSVP.async(function() {
6667
+ config.async(function() {
6375
6668
  promise.trigger('promise:failed', { detail: value });
6376
6669
  promise.isRejected = true;
6377
- promise.rejectedValue = value;
6670
+ promise.rejectedReason = value;
6378
6671
  });
6379
6672
  }
6380
6673
 
6381
- function all(promises) {
6382
- var i, results = [];
6383
- var allPromise = new Promise();
6384
- var remaining = promises.length;
6385
6674
 
6386
- if (remaining === 0) {
6387
- allPromise.resolve([]);
6388
- }
6675
+ __exports__.Promise = Promise;
6676
+ });
6389
6677
 
6390
- var resolver = function(index) {
6391
- return function(value) {
6392
- resolve(index, value);
6393
- };
6394
- };
6678
+ define("rsvp/resolve",
6679
+ ["rsvp/promise","exports"],
6680
+ function(__dependency1__, __exports__) {
6681
+ "use strict";
6682
+ var Promise = __dependency1__.Promise;
6395
6683
 
6396
- var resolve = function(index, value) {
6397
- results[index] = value;
6398
- if (--remaining === 0) {
6399
- allPromise.resolve(results);
6400
- }
6401
- };
6402
6684
 
6403
- var reject = function(error) {
6404
- allPromise.reject(error);
6405
- };
6685
+ function objectOrFunction(x) {
6686
+ return typeof x === "function" || (typeof x === "object" && x !== null);
6687
+ }
6406
6688
 
6407
- for (i = 0; i < remaining; i++) {
6408
- promises[i].then(resolver(i), reject);
6409
- }
6410
- return allPromise;
6689
+ function resolve(thenable){
6690
+ var promise = new Promise(function(resolve, reject){
6691
+ var then;
6692
+
6693
+ try {
6694
+ if ( objectOrFunction(thenable) ) {
6695
+ then = thenable.then;
6696
+
6697
+ if (typeof then === "function") {
6698
+ then.call(thenable, resolve, reject);
6699
+ } else {
6700
+ resolve(thenable);
6701
+ }
6702
+
6703
+ } else {
6704
+ resolve(thenable);
6705
+ }
6706
+
6707
+ } catch(error) {
6708
+ reject(error);
6709
+ }
6710
+ });
6711
+
6712
+ return promise;
6411
6713
  }
6412
6714
 
6413
- EventTarget.mixin(Promise.prototype);
6414
6715
 
6415
- RSVP = { async: async, Promise: Promise, Event: Event, EventTarget: EventTarget, all: all, raiseOnUncaughtExceptions: true };
6416
- return RSVP;
6716
+ __exports__.resolve = resolve;
6717
+ });
6718
+
6719
+ define("rsvp",
6720
+ ["rsvp/events","rsvp/promise","rsvp/node","rsvp/all","rsvp/hash","rsvp/defer","rsvp/config","rsvp/resolve","exports"],
6721
+ function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __exports__) {
6722
+ "use strict";
6723
+ var EventTarget = __dependency1__.EventTarget;
6724
+ var Promise = __dependency2__.Promise;
6725
+ var denodeify = __dependency3__.denodeify;
6726
+ var all = __dependency4__.all;
6727
+ var hash = __dependency5__.hash;
6728
+ var defer = __dependency6__.defer;
6729
+ var config = __dependency7__.config;
6730
+ var resolve = __dependency8__.resolve;
6731
+
6732
+ function configure(name, value) {
6733
+ config[name] = value;
6734
+ }
6735
+
6736
+
6737
+ __exports__.Promise = Promise;
6738
+ __exports__.EventTarget = EventTarget;
6739
+ __exports__.all = all;
6740
+ __exports__.hash = hash;
6741
+ __exports__.defer = defer;
6742
+ __exports__.denodeify = denodeify;
6743
+ __exports__.configure = configure;
6744
+ __exports__.resolve = resolve;
6417
6745
  });
6418
6746
 
6419
6747
  })();
@@ -6659,7 +6987,7 @@ define("container",
6659
6987
  var factory = factoryFor(container, fullName);
6660
6988
 
6661
6989
  var splitName = fullName.split(":"),
6662
- type = splitName[0], name = splitName[1],
6990
+ type = splitName[0],
6663
6991
  value;
6664
6992
 
6665
6993
  if (option(container, fullName, 'instantiate') === false) {
@@ -7067,7 +7395,8 @@ Ember.String = {
7067
7395
  ```
7068
7396
 
7069
7397
  @method fmt
7070
- @param {Object...} [args]
7398
+ @param {String} str The string to format
7399
+ @param {Array} formats An array of parameters to interpolate into string.
7071
7400
  @return {String} formatted string
7072
7401
  */
7073
7402
  fmt: function(str, formats) {
@@ -8397,9 +8726,7 @@ Ember.Enumerable = Ember.Mixin.create({
8397
8726
  // HELPERS
8398
8727
  //
8399
8728
 
8400
- var get = Ember.get, set = Ember.set, map = Ember.EnumerableUtils.map, cacheFor = Ember.cacheFor;
8401
-
8402
- function none(obj) { return obj===null || obj===undefined; }
8729
+ var get = Ember.get, set = Ember.set, isNone = Ember.isNone, map = Ember.EnumerableUtils.map, cacheFor = Ember.cacheFor;
8403
8730
 
8404
8731
  // ..........................................................
8405
8732
  // ARRAY
@@ -8549,8 +8876,8 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
8549
8876
  slice: function(beginIndex, endIndex) {
8550
8877
  var ret = Ember.A([]);
8551
8878
  var length = get(this, 'length') ;
8552
- if (none(beginIndex)) beginIndex = 0 ;
8553
- if (none(endIndex) || (endIndex > length)) endIndex = length ;
8879
+ if (isNone(beginIndex)) beginIndex = 0 ;
8880
+ if (isNone(endIndex) || (endIndex > length)) endIndex = length ;
8554
8881
 
8555
8882
  if (beginIndex < 0) beginIndex = length + beginIndex;
8556
8883
  if (endIndex < 0) endIndex = length + endIndex;
@@ -8710,7 +9037,7 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
8710
9037
  @param {Number} startIdx The starting index in the array that will change.
8711
9038
  @param {Number} removeAmt The number of items that will be removed. If you
8712
9039
  pass `null` assumes 0
8713
- @param {Number} addAmt The number of items that will be added If you
9040
+ @param {Number} addAmt The number of items that will be added. If you
8714
9041
  pass `null` assumes 0.
8715
9042
  @return {Ember.Array} receiver
8716
9043
  */
@@ -8744,6 +9071,20 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
8744
9071
  return this;
8745
9072
  },
8746
9073
 
9074
+ /**
9075
+ If you are implementing an object that supports `Ember.Array`, call this
9076
+ method just after the array content changes to notify any observers and
9077
+ invalidate any related properties. Pass the starting index of the change
9078
+ as well as a delta of the amounts to change.
9079
+
9080
+ @method arrayContentDidChange
9081
+ @param {Number} startIdx The starting index in the array that did change.
9082
+ @param {Number} removeAmt The number of items that were removed. If you
9083
+ pass `null` assumes 0
9084
+ @param {Number} addAmt The number of items that were added. If you
9085
+ pass `null` assumes 0.
9086
+ @return {Ember.Array} receiver
9087
+ */
8747
9088
  arrayContentDidChange: function(startIdx, removeAmt, addAmt) {
8748
9089
 
8749
9090
  // if no args are passed assume everything changes
@@ -9044,7 +9385,7 @@ var forEach = Ember.EnumerableUtils.forEach;
9044
9385
 
9045
9386
  To add an object to an enumerable, use the `addObject()` method. This
9046
9387
  method will only add the object to the enumerable if the object is not
9047
- already present and the object if of a type supported by the enumerable.
9388
+ already present and is of a type supported by the enumerable.
9048
9389
 
9049
9390
  ```javascript
9050
9391
  set.addObject(contact);
@@ -9052,8 +9393,8 @@ var forEach = Ember.EnumerableUtils.forEach;
9052
9393
 
9053
9394
  ## Removing Objects
9054
9395
 
9055
- To remove an object form an enumerable, use the `removeObject()` method. This
9056
- will only remove the object if it is already in the enumerable, otherwise
9396
+ To remove an object from an enumerable, use the `removeObject()` method. This
9397
+ will only remove the object if it is present in the enumerable, otherwise
9057
9398
  this method has no effect.
9058
9399
 
9059
9400
  ```javascript
@@ -9080,7 +9421,7 @@ Ember.MutableEnumerable = Ember.Mixin.create(Ember.Enumerable, {
9080
9421
  already present in the collection. If the object is present, this method
9081
9422
  has no effect.
9082
9423
 
9083
- If the passed object is of a type not supported by the receiver
9424
+ If the passed object is of a type not supported by the receiver,
9084
9425
  then this method should raise an exception.
9085
9426
 
9086
9427
  @method addObject
@@ -9107,10 +9448,10 @@ Ember.MutableEnumerable = Ember.Mixin.create(Ember.Enumerable, {
9107
9448
  __Required.__ You must implement this method to apply this mixin.
9108
9449
 
9109
9450
  Attempts to remove the passed object from the receiver collection if the
9110
- object is in present in the collection. If the object is not present,
9451
+ object is present in the collection. If the object is not present,
9111
9452
  this method has no effect.
9112
9453
 
9113
- If the passed object is of a type not supported by the receiver
9454
+ If the passed object is of a type not supported by the receiver,
9114
9455
  then this method should raise an exception.
9115
9456
 
9116
9457
  @method removeObject
@@ -9121,7 +9462,7 @@ Ember.MutableEnumerable = Ember.Mixin.create(Ember.Enumerable, {
9121
9462
 
9122
9463
 
9123
9464
  /**
9124
- Removes each objects in the passed enumerable from the receiver.
9465
+ Removes each object in the passed enumerable from the receiver.
9125
9466
 
9126
9467
  @method removeObjects
9127
9468
  @param {Ember.Enumerable} objects the objects to remove
@@ -9902,7 +10243,7 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
9902
10243
  @return {Object} The new property value
9903
10244
  */
9904
10245
  incrementProperty: function(keyName, increment) {
9905
- if (!increment) { increment = 1; }
10246
+ if (Ember.isNone(increment)) { increment = 1; }
9906
10247
  set(this, keyName, (get(this, keyName) || 0)+increment);
9907
10248
  return get(this, keyName);
9908
10249
  },
@@ -9921,7 +10262,7 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
9921
10262
  @return {Object} The new property value
9922
10263
  */
9923
10264
  decrementProperty: function(keyName, increment) {
9924
- if (!increment) { increment = 1; }
10265
+ if (Ember.isNone(increment)) { increment = 1; }
9925
10266
  set(this, keyName, (get(this, keyName) || 0)-increment);
9926
10267
  return get(this, keyName);
9927
10268
  },
@@ -9977,6 +10318,15 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
9977
10318
  var get = Ember.get, set = Ember.set;
9978
10319
 
9979
10320
  /**
10321
+ `Ember.TargetActionSupport` is a mixin that can be included in a class
10322
+ to add a `triggerAction` method with semantics similar to the Handlebars
10323
+ `{{action}}` helper. In normal Ember usage, the `{{action}}` helper is
10324
+ usually the best choice. This mixin is most often useful when you are
10325
+ doing more complex event handling in View objects.
10326
+
10327
+ See also `Ember.ViewTargetActionSupport`, which has
10328
+ view-aware defaults for target and actionContext.
10329
+
9980
10330
  @class TargetActionSupport
9981
10331
  @namespace Ember
9982
10332
  @extends Ember.Mixin
@@ -9984,6 +10334,7 @@ var get = Ember.get, set = Ember.set;
9984
10334
  Ember.TargetActionSupport = Ember.Mixin.create({
9985
10335
  target: null,
9986
10336
  action: null,
10337
+ actionContext: null,
9987
10338
 
9988
10339
  targetObject: Ember.computed(function() {
9989
10340
  var target = get(this, 'target');
@@ -9997,21 +10348,86 @@ Ember.TargetActionSupport = Ember.Mixin.create({
9997
10348
  }
9998
10349
  }).property('target'),
9999
10350
 
10000
- triggerAction: function() {
10001
- var action = get(this, 'action'),
10002
- target = get(this, 'targetObject');
10351
+ actionContextObject: Ember.computed(function() {
10352
+ var actionContext = get(this, 'actionContext');
10353
+
10354
+ if (Ember.typeOf(actionContext) === "string") {
10355
+ var value = get(this, actionContext);
10356
+ if (value === undefined) { value = get(Ember.lookup, actionContext); }
10357
+ return value;
10358
+ } else {
10359
+ return actionContext;
10360
+ }
10361
+ }).property('actionContext'),
10362
+
10363
+ /**
10364
+ Send an "action" with an "actionContext" to a "target". The action, actionContext
10365
+ and target will be retrieved from properties of the object. For example:
10366
+
10367
+ ```javascript
10368
+ App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
10369
+ target: Ember.computed.alias('controller'),
10370
+ action: 'save',
10371
+ actionContext: Ember.computed.alias('context'),
10372
+ click: function(){
10373
+ this.triggerAction(); // Sends the `save` action, along with the current context
10374
+ // to the current controller
10375
+ }
10376
+ });
10377
+ ```
10378
+
10379
+ The `target`, `action`, and `actionContext` can be provided as properties of
10380
+ an optional object argument to `triggerAction` as well.
10381
+
10382
+ ```javascript
10383
+ App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
10384
+ click: function(){
10385
+ this.triggerAction({
10386
+ action: 'save',
10387
+ target: this.get('controller'),
10388
+ actionContext: this.get('context'),
10389
+ }); // Sends the `save` action, along with the current context
10390
+ // to the current controller
10391
+ }
10392
+ });
10393
+ ```
10394
+
10395
+ The `actionContext` defaults to the object you mixing `TargetActionSupport` into.
10396
+ But `target` and `action` must be specified either as properties or with the argument
10397
+ to `triggerAction`, or a combination:
10398
+
10399
+ ```javascript
10400
+ App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
10401
+ target: Ember.computed.alias('controller'),
10402
+ click: function(){
10403
+ this.triggerAction({
10404
+ action: 'save'
10405
+ }); // Sends the `save` action, along with a reference to `this`,
10406
+ // to the current controller
10407
+ }
10408
+ });
10409
+ ```
10410
+
10411
+ @method triggerAction
10412
+ @param opts {Hash} (optional, with the optional keys action, target and/or actionContext)
10413
+ @return {Boolean} true if the action was sent successfully and did not return false
10414
+ */
10415
+ triggerAction: function(opts) {
10416
+ opts = opts || {};
10417
+ var action = opts['action'] || get(this, 'action'),
10418
+ target = opts['target'] || get(this, 'targetObject'),
10419
+ actionContext = opts['actionContext'] || get(this, 'actionContextObject') || this;
10003
10420
 
10004
10421
  if (target && action) {
10005
10422
  var ret;
10006
10423
 
10007
- if (typeof target.send === 'function') {
10008
- ret = target.send(action, this);
10424
+ if (target.send) {
10425
+ ret = target.send.apply(target, [action, actionContext]);
10009
10426
  } else {
10010
- if (typeof action === 'string') {
10011
- action = target[action];
10012
- }
10013
- ret = action.call(target, this);
10427
+
10428
+ ret = target[action].apply(target, [actionContext]);
10014
10429
  }
10430
+
10015
10431
  if (ret !== false) ret = true;
10016
10432
 
10017
10433
  return ret;
@@ -10183,9 +10599,9 @@ Ember.Evented = Ember.Mixin.create({
10183
10599
  (function() {
10184
10600
  var RSVP = requireModule("rsvp");
10185
10601
 
10186
- RSVP.async = function(callback, binding) {
10602
+ RSVP.configure('async', function(callback, binding) {
10187
10603
  Ember.run.schedule('actions', binding, callback);
10188
- };
10604
+ });
10189
10605
 
10190
10606
  /**
10191
10607
  @module ember
@@ -10207,9 +10623,22 @@ Ember.DeferredMixin = Ember.Mixin.create({
10207
10623
  @param {Function} doneCallback a callback function to be called when done
10208
10624
  @param {Function} failCallback a callback function to be called when failed
10209
10625
  */
10210
- then: function(doneCallback, failCallback) {
10211
- var promise = get(this, 'promise');
10212
- return promise.then.apply(promise, arguments);
10626
+ then: function(resolve, reject) {
10627
+ var deferred, promise, entity;
10628
+
10629
+ entity = this;
10630
+ deferred = get(this, '_deferred');
10631
+ promise = deferred.promise;
10632
+
10633
+ return promise.then(function(fulfillment) {
10634
+ if (fulfillment === promise) {
10635
+ return resolve(entity);
10636
+ } else {
10637
+ return resolve(fulfillment);
10638
+ }
10639
+ }, function(reason) {
10640
+ return reject(reason);
10641
+ });
10213
10642
  },
10214
10643
 
10215
10644
  /**
@@ -10218,7 +10647,16 @@ Ember.DeferredMixin = Ember.Mixin.create({
10218
10647
  @method resolve
10219
10648
  */
10220
10649
  resolve: function(value) {
10221
- get(this, 'promise').resolve(value);
10650
+ var deferred, promise;
10651
+
10652
+ deferred = get(this, '_deferred');
10653
+ promise = deferred.promise;
10654
+
10655
+ if (value === this){
10656
+ deferred.resolve(promise);
10657
+ } else {
10658
+ deferred.resolve(value);
10659
+ }
10222
10660
  },
10223
10661
 
10224
10662
  /**
@@ -10227,11 +10665,11 @@ Ember.DeferredMixin = Ember.Mixin.create({
10227
10665
  @method reject
10228
10666
  */
10229
10667
  reject: function(value) {
10230
- get(this, 'promise').reject(value);
10668
+ get(this, '_deferred').reject(value);
10231
10669
  },
10232
10670
 
10233
- promise: Ember.computed(function() {
10234
- return new RSVP.Promise();
10671
+ _deferred: Ember.computed(function() {
10672
+ return new RSVP.defer();
10235
10673
  })
10236
10674
  });
10237
10675
 
@@ -10917,7 +11355,7 @@ function findNamespaces() {
10917
11355
 
10918
11356
  for (var prop in lookup) {
10919
11357
  // These don't raise exceptions but can cause warnings
10920
- if (prop === "parent" || prop === "top" || prop === "frameElement") { continue; }
11358
+ if (prop === "parent" || prop === "top" || prop === "frameElement" || prop === "webkitStorageInfo") { continue; }
10921
11359
 
10922
11360
  // get(window.globalStorage, 'isNamespace') would try to read the storage for domain isNamespace and cause exception in Firefox.
10923
11361
  // globalStorage is a storage obsoleted by the WhatWG storage specification. See https://developer.mozilla.org/en/DOM/Storage#globalStorage
@@ -11827,9 +12265,8 @@ if (ignore.length>0) {
11827
12265
  @namespace Ember
11828
12266
  @extends Ember.Mixin
11829
12267
  @uses Ember.MutableArray
11830
- @uses Ember.MutableEnumerable
12268
+ @uses Ember.Observable
11831
12269
  @uses Ember.Copyable
11832
- @uses Ember.Freezable
11833
12270
  */
11834
12271
  Ember.NativeArray = NativeArray;
11835
12272
 
@@ -11876,7 +12313,7 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Array) {
11876
12313
  @submodule ember-runtime
11877
12314
  */
11878
12315
 
11879
- var get = Ember.get, set = Ember.set, guidFor = Ember.guidFor, none = Ember.isNone, fmt = Ember.String.fmt;
12316
+ var get = Ember.get, set = Ember.set, guidFor = Ember.guidFor, isNone = Ember.isNone, fmt = Ember.String.fmt;
11880
12317
 
11881
12318
  /**
11882
12319
  An unordered collection of objects.
@@ -12234,7 +12671,7 @@ Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Emb
12234
12671
  // implements Ember.MutableEnumerable
12235
12672
  addObject: function(obj) {
12236
12673
  if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR);
12237
- if (none(obj)) return this; // nothing to do
12674
+ if (isNone(obj)) return this; // nothing to do
12238
12675
 
12239
12676
  var guid = guidFor(obj),
12240
12677
  idx = this[guid],
@@ -12262,7 +12699,7 @@ Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Emb
12262
12699
  // implements Ember.MutableEnumerable
12263
12700
  removeObject: function(obj) {
12264
12701
  if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR);
12265
- if (none(obj)) return this; // nothing to do
12702
+ if (isNone(obj)) return this; // nothing to do
12266
12703
 
12267
12704
  var guid = guidFor(obj),
12268
12705
  idx = this[guid],
@@ -12337,7 +12774,7 @@ Deferred.reopenClass({
12337
12774
  promise: function(callback, binding) {
12338
12775
  var deferred = Deferred.create();
12339
12776
  callback.call(binding, deferred);
12340
- return get(deferred, 'promise');
12777
+ return deferred;
12341
12778
  }
12342
12779
  });
12343
12780
 
@@ -12348,6 +12785,8 @@ Ember.Deferred = Deferred;
12348
12785
 
12349
12786
 
12350
12787
  (function() {
12788
+ var forEach = Ember.ArrayPolyfills.forEach;
12789
+
12351
12790
  /**
12352
12791
  @module ember
12353
12792
  @submodule ember-runtime
@@ -12380,12 +12819,10 @@ Ember.onLoad = function(name, callback) {
12380
12819
  @param object {Object} object to pass to callbacks
12381
12820
  */
12382
12821
  Ember.runLoadHooks = function(name, object) {
12383
- var hooks;
12384
-
12385
12822
  loaded[name] = object;
12386
12823
 
12387
- if (hooks = loadHooks[name]) {
12388
- loadHooks[name].forEach(function(callback) {
12824
+ if (loadHooks[name]) {
12825
+ forEach.call(loadHooks[name], function(callback) {
12389
12826
  callback(object);
12390
12827
  });
12391
12828
  }
@@ -12839,9 +13276,9 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
12839
13276
  });
12840
13277
  ```
12841
13278
 
12842
- @method
12843
- @type String
12844
- @default null
13279
+ @method lookupItemController
13280
+ @param {Object} object
13281
+ @return {String}
12845
13282
  */
12846
13283
  lookupItemController: function(object) {
12847
13284
  return get(this, 'itemController');
@@ -12919,10 +13356,11 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
12919
13356
 
12920
13357
  _resetSubControllers: function() {
12921
13358
  var subControllers = get(this, '_subControllers');
12922
-
12923
- forEach(subControllers, function(subController) {
12924
- if (subController) { subController.destroy(); }
12925
- });
13359
+ if (subControllers) {
13360
+ forEach(subControllers, function(subController) {
13361
+ if (subController) { subController.destroy(); }
13362
+ });
13363
+ }
12926
13364
 
12927
13365
  this.set('_subControllers', Ember.A());
12928
13366
  }
@@ -13615,8 +14053,11 @@ Ember._RenderBuffer.prototype =
13615
14053
  string: function() {
13616
14054
  if (this._hasElement && this._element) {
13617
14055
  // Firefox versions < 11 do not have support for element.outerHTML.
13618
- return this.element().outerHTML ||
13619
- new XMLSerializer().serializeToString(this.element());
14056
+ var thisElement = this.element(), outerHTML = thisElement.outerHTML;
14057
+ if (typeof outerHTML === 'undefined'){
14058
+ return Ember.$('<div/>').append(thisElement).html();
14059
+ }
14060
+ return outerHTML;
13620
14061
  } else {
13621
14062
  return this.innerString();
13622
14063
  }
@@ -13708,7 +14149,7 @@ Ember.EventDispatcher = Ember.Object.extend(
13708
14149
  @method setup
13709
14150
  @param addedEvents {Hash}
13710
14151
  */
13711
- setup: function(addedEvents) {
14152
+ setup: function(addedEvents, rootElement) {
13712
14153
  var event, events = {
13713
14154
  touchstart : 'touchStart',
13714
14155
  touchmove : 'touchMove',
@@ -13741,7 +14182,12 @@ Ember.EventDispatcher = Ember.Object.extend(
13741
14182
 
13742
14183
  Ember.$.extend(events, addedEvents || {});
13743
14184
 
13744
- var rootElement = Ember.$(get(this, 'rootElement'));
14185
+
14186
+ if (!Ember.isNone(rootElement)) {
14187
+ set(this, 'rootElement', rootElement);
14188
+ }
14189
+
14190
+ rootElement = Ember.$(get(this, 'rootElement'));
13745
14191
 
13746
14192
 
13747
14193
 
@@ -14056,7 +14502,7 @@ Ember.CoreView = Ember.Object.extend(Ember.Evented, {
14056
14502
  // insert a new buffer after the "parent buffer").
14057
14503
  var tagName = this.tagName;
14058
14504
 
14059
- if (tagName === null || tagName === undefined) {
14505
+ if (Ember.isNone(tagName)) {
14060
14506
  tagName = 'div';
14061
14507
  }
14062
14508
 
@@ -14144,6 +14590,15 @@ ViewCollection.prototype = {
14144
14590
  }
14145
14591
  },
14146
14592
 
14593
+ invokeRecursively: function(fn) {
14594
+ var views = this.views, view;
14595
+
14596
+ for (var i = 0, l = views.length; i < l; i++) {
14597
+ view = views[i];
14598
+ fn(view);
14599
+ }
14600
+ },
14601
+
14147
14602
  transitionTo: function(state, children) {
14148
14603
  var views = this.views;
14149
14604
  for (var i = 0, l = views.length; i < l; i++) {
@@ -14161,9 +14616,9 @@ ViewCollection.prototype = {
14161
14616
  return this.views[idx];
14162
14617
  },
14163
14618
 
14164
- forEach: function() {
14619
+ forEach: function(callback) {
14165
14620
  var views = this.views;
14166
- return views.forEach.apply(views, arguments);
14621
+ return a_forEach(views, callback);
14167
14622
  },
14168
14623
 
14169
14624
  clear: function() {
@@ -15226,7 +15681,7 @@ Ember.View = Ember.CoreView.extend(
15226
15681
  @param {Ember.RenderBuffer} buffer
15227
15682
  */
15228
15683
  _applyAttributeBindings: function(buffer, attributeBindings) {
15229
- var attributeValue, elem, type;
15684
+ var attributeValue, elem;
15230
15685
 
15231
15686
  a_forEach(attributeBindings, function(binding) {
15232
15687
  var split = binding.split(':'),
@@ -15317,7 +15772,7 @@ Ember.View = Ember.CoreView.extend(
15317
15772
 
15318
15773
  while(--idx >= 0) {
15319
15774
  view = childViews[idx];
15320
- callback.call(this, view, idx);
15775
+ callback(this, view, idx);
15321
15776
  }
15322
15777
 
15323
15778
  return this;
@@ -15331,9 +15786,9 @@ Ember.View = Ember.CoreView.extend(
15331
15786
  var len = childViews.length,
15332
15787
  view, idx;
15333
15788
 
15334
- for(idx = 0; idx < len; idx++) {
15789
+ for (idx = 0; idx < len; idx++) {
15335
15790
  view = childViews[idx];
15336
- callback.call(this, view);
15791
+ callback(view);
15337
15792
  }
15338
15793
 
15339
15794
  return this;
@@ -15545,7 +16000,7 @@ Ember.View = Ember.CoreView.extend(
15545
16000
 
15546
16001
  for (var i=0, l=currentViews.length; i<l; i++) {
15547
16002
  view = currentViews[i];
15548
- fn.call(view, view);
16003
+ fn(view);
15549
16004
  if (view._childViews) {
15550
16005
  childViews.push.apply(childViews, view._childViews);
15551
16006
  }
@@ -15907,13 +16362,13 @@ Ember.View = Ember.CoreView.extend(
15907
16362
  @return {Ember.View} receiver
15908
16363
  */
15909
16364
  removeAllChildren: function() {
15910
- return this.mutateChildViews(function(view) {
15911
- this.removeChild(view);
16365
+ return this.mutateChildViews(function(parentView, view) {
16366
+ parentView.removeChild(view);
15912
16367
  });
15913
16368
  },
15914
16369
 
15915
16370
  destroyAllChildren: function() {
15916
- return this.mutateChildViews(function(view) {
16371
+ return this.mutateChildViews(function(parentView, view) {
15917
16372
  view.destroy();
15918
16373
  });
15919
16374
  },
@@ -15945,7 +16400,6 @@ Ember.View = Ember.CoreView.extend(
15945
16400
  */
15946
16401
  destroy: function() {
15947
16402
  var childViews = this._childViews,
15948
- parent = this._parentView,
15949
16403
  // get parentView before calling super because it'll be destroyed
15950
16404
  nonVirtualParentView = get(this, 'parentView'),
15951
16405
  viewName = this.viewName,
@@ -15960,7 +16414,7 @@ Ember.View = Ember.CoreView.extend(
15960
16414
 
15961
16415
  // remove from non-virtual parent view if viewName was specified
15962
16416
  if (viewName && nonVirtualParentView) {
15963
- nonVirtualParentView[viewName] = null;
16417
+ nonVirtualParentView.set(viewName, null);
15964
16418
  }
15965
16419
 
15966
16420
  childLen = childViews.length;
@@ -16993,7 +17447,7 @@ Ember.ContainerView = Ember.View.extend(Ember.MutableArray, {
16993
17447
  });
16994
17448
  },
16995
17449
 
16996
- instrumentName: 'render.container',
17450
+ instrumentName: 'container',
16997
17451
 
16998
17452
  /**
16999
17453
  @private
@@ -17108,21 +17562,6 @@ Ember.merge(states.hasElement, {
17108
17562
  ensureChildrenAreInDOM: function(view) {
17109
17563
  var childViews = view._childViews, i, len, childView, previous, buffer, viewCollection = new ViewCollection();
17110
17564
 
17111
- function insertViewCollection() {
17112
- viewCollection.triggerRecursively('willInsertElement');
17113
- if (previous) {
17114
- previous.domManager.after(previous, buffer.string());
17115
- } else {
17116
- view.domManager.prepend(view, buffer.string());
17117
- }
17118
- buffer = null;
17119
- viewCollection.forEach(function(v) {
17120
- v.transitionTo('inDOM');
17121
- v.propertyDidChange('element');
17122
- v.triggerRecursively('didInsertElement');
17123
- });
17124
- }
17125
-
17126
17565
  for (i = 0, len = childViews.length; i < len; i++) {
17127
17566
  childView = childViews[i];
17128
17567
 
@@ -17131,7 +17570,8 @@ Ember.merge(states.hasElement, {
17131
17570
  if (childView.renderToBufferIfNeeded(buffer)) {
17132
17571
  viewCollection.push(childView);
17133
17572
  } else if (viewCollection.length) {
17134
- insertViewCollection();
17573
+ insertViewCollection(view, viewCollection, previous, buffer);
17574
+ buffer = null;
17135
17575
  previous = childView;
17136
17576
  viewCollection.clear();
17137
17577
  } else {
@@ -17139,10 +17579,29 @@ Ember.merge(states.hasElement, {
17139
17579
  }
17140
17580
  }
17141
17581
 
17142
- if (viewCollection.length) { insertViewCollection(); }
17582
+ if (viewCollection.length) {
17583
+ insertViewCollection(view, viewCollection, previous, buffer);
17584
+ }
17143
17585
  }
17144
17586
  });
17145
17587
 
17588
+ function insertViewCollection(view, viewCollection, previous, buffer) {
17589
+ viewCollection.triggerRecursively('willInsertElement');
17590
+
17591
+ if (previous) {
17592
+ previous.domManager.after(previous, buffer.string());
17593
+ } else {
17594
+ view.domManager.prepend(view, buffer.string());
17595
+ }
17596
+
17597
+ viewCollection.forEach(function(v) {
17598
+ v.transitionTo('inDOM');
17599
+ v.propertyDidChange('element');
17600
+ v.triggerRecursively('didInsertElement');
17601
+ });
17602
+ }
17603
+
17604
+
17146
17605
  })();
17147
17606
 
17148
17607
 
@@ -17518,6 +17977,69 @@ Ember.CollectionView.CONTAINER_MAP = {
17518
17977
 
17519
17978
 
17520
17979
 
17980
+ (function() {
17981
+ /**
17982
+ `Ember.ViewTargetActionSupport` is a mixin that can be included in a
17983
+ view class to add a `triggerAction` method with semantics similar to
17984
+ the Handlebars `{{action}}` helper. It provides intelligent defaults
17985
+ for the action's target: the view's controller; and the context that is
17986
+ sent with the action: the view's context.
17987
+
17988
+ Note: In normal Ember usage, the `{{action}}` helper is usually the best
17989
+ choice. This mixin is most often useful when you are doing more complex
17990
+ event handling in custom View subclasses.
17991
+
17992
+ For example:
17993
+
17994
+ ```javascript
17995
+ App.SaveButtonView = Ember.View.extend(Ember.ViewTargetActionSupport, {
17996
+ action: 'save',
17997
+ click: function(){
17998
+ this.triggerAction(); // Sends the `save` action, along with the current context
17999
+ // to the current controller
18000
+ }
18001
+ });
18002
+ ```
18003
+
18004
+ The `action` can be provided as properties of an optional object argument
18005
+ to `triggerAction` as well.
18006
+
18007
+ ```javascript
18008
+ App.SaveButtonView = Ember.View.extend(Ember.ViewTargetActionSupport, {
18009
+ click: function(){
18010
+ this.triggerAction({
18011
+ action: 'save'
18012
+ }); // Sends the `save` action, along with the current context
18013
+ // to the current controller
18014
+ }
18015
+ });
18016
+ ```
18017
+
18018
+ @class ViewTargetActionSupport
18019
+ @namespace Ember
18020
+ @extends Ember.TargetActionSupport
18021
+ */
18022
+ Ember.ViewTargetActionSupport = Ember.Mixin.create(Ember.TargetActionSupport, {
18023
+ /**
18024
+ @property target
18025
+ */
18026
+ target: Ember.computed.alias('controller'),
18027
+ /**
18028
+ @property actionContext
18029
+ */
18030
+ actionContext: Ember.computed.alias('context')
18031
+ });
18032
+
18033
+ })();
18034
+
18035
+
18036
+
18037
+ (function() {
18038
+
18039
+ })();
18040
+
18041
+
18042
+
17521
18043
  (function() {
17522
18044
  /*globals jQuery*/
17523
18045
  /**
@@ -18028,10 +18550,25 @@ if(!Handlebars && typeof require === 'function') {
18028
18550
  */
18029
18551
  Ember.Handlebars = objectCreate(Handlebars);
18030
18552
 
18031
- Ember.Handlebars.helper = function(name, value) {
18032
- if (Ember.View.detect(value)) {
18033
- Ember.Handlebars.registerHelper(name, function(name, options) {
18553
+ function makeBindings(options) {
18554
+ var hash = options.hash,
18555
+ hashType = options.hashTypes;
18034
18556
 
18557
+ for (var prop in hash) {
18558
+ if (hashType[prop] === 'ID') {
18559
+ hash[prop + 'Binding'] = hash[prop];
18560
+ hashType[prop + 'Binding'] = 'STRING';
18561
+ delete hash[prop];
18562
+ delete hashType[prop];
18563
+ }
18564
+ }
18565
+ }
18566
+
18567
+ Ember.Handlebars.helper = function(name, value) {
18568
+ if (Ember.View.detect(value)) {
18569
+ Ember.Handlebars.registerHelper(name, function(options) {
18570
+
18571
+ makeBindings(options);
18035
18572
  return Ember.Handlebars.helpers.view.call(this, value, options);
18036
18573
  });
18037
18574
  } else {
@@ -18507,6 +19044,7 @@ Ember.Handlebars.registerBoundHelper = function(name, fn) {
18507
19044
 
18508
19045
  Renders the unbound form of an otherwise bound helper function.
18509
19046
 
19047
+ @method evaluateMultiPropertyBoundHelper
18510
19048
  @param {Function} fn
18511
19049
  @param {Object} context
18512
19050
  @param {Array} normalizedProperties
@@ -18523,7 +19061,7 @@ function evaluateMultiPropertyBoundHelper(context, fn, normalizedProperties, opt
18523
19061
 
18524
19062
  bindView = new Ember._SimpleHandlebarsView(null, null, !hash.unescaped, data);
18525
19063
  bindView.normalizedValue = function() {
18526
- var args = [], value, boundOption;
19064
+ var args = [], boundOption;
18527
19065
 
18528
19066
  // Copy over bound options.
18529
19067
  for (boundOption in boundOptions) {
@@ -18568,6 +19106,7 @@ function evaluateMultiPropertyBoundHelper(context, fn, normalizedProperties, opt
18568
19106
 
18569
19107
  Renders the unbound form of an otherwise bound helper function.
18570
19108
 
19109
+ @method evaluateUnboundHelper
18571
19110
  @param {Function} fn
18572
19111
  @param {Object} context
18573
19112
  @param {Array} normalizedProperties
@@ -18706,13 +19245,18 @@ var DOMManager = {
18706
19245
  var buffer = view.renderToBuffer();
18707
19246
 
18708
19247
  view.invokeRecursively(function(view) {
18709
- view.propertyDidChange('element');
19248
+ view.propertyWillChange('element');
18710
19249
  });
18711
-
18712
19250
  view.triggerRecursively('willInsertElement');
19251
+
18713
19252
  morph.replaceWith(buffer.string());
18714
19253
  view.transitionTo('inDOM');
19254
+
19255
+ view.invokeRecursively(function(view) {
19256
+ view.propertyDidChange('element');
19257
+ });
18715
19258
  view.triggerRecursively('didInsertElement');
19259
+
18716
19260
  notifyMutationListeners();
18717
19261
  });
18718
19262
  },
@@ -18736,7 +19280,7 @@ Ember._Metamorph = Ember.Mixin.create({
18736
19280
  isVirtual: true,
18737
19281
  tagName: '',
18738
19282
 
18739
- instrumentName: 'render.metamorph',
19283
+ instrumentName: 'metamorph',
18740
19284
 
18741
19285
  init: function() {
18742
19286
  this._super();
@@ -18821,6 +19365,8 @@ SimpleHandlebarsView.prototype = {
18821
19365
  this.morph = null;
18822
19366
  },
18823
19367
 
19368
+ propertyWillChange: Ember.K,
19369
+
18824
19370
  propertyDidChange: Ember.K,
18825
19371
 
18826
19372
  normalizedValue: function() {
@@ -18923,7 +19469,7 @@ merge(states.inDOM, {
18923
19469
  @private
18924
19470
  */
18925
19471
  Ember._HandlebarsBoundView = Ember._MetamorphView.extend({
18926
- instrumentName: 'render.boundHandlebars',
19472
+ instrumentName: 'boundHandlebars',
18927
19473
  states: states,
18928
19474
 
18929
19475
  /**
@@ -19526,7 +20072,7 @@ EmberHandlebars.registerHelper('unless', function(context, options) {
19526
20072
  Results in the following rendered output:
19527
20073
 
19528
20074
  ```html
19529
- <img class=":class-name-to-always-apply">
20075
+ <img class="class-name-to-always-apply">
19530
20076
  ```
19531
20077
 
19532
20078
  All three strategies - string return value, boolean return value, and
@@ -19861,11 +20407,8 @@ EmberHandlebars.ViewHelper = Ember.Object.create({
19861
20407
  },
19862
20408
 
19863
20409
  helper: function(thisContext, path, options) {
19864
- var inverse = options.inverse,
19865
- data = options.data,
19866
- view = data.view,
20410
+ var data = options.data,
19867
20411
  fn = options.fn,
19868
- hash = options.hash,
19869
20412
  newView;
19870
20413
 
19871
20414
  if ('string' === typeof path) {
@@ -19878,7 +20421,7 @@ EmberHandlebars.ViewHelper = Ember.Object.create({
19878
20421
 
19879
20422
  var viewOptions = this.propertiesFromHTMLOptions(options, thisContext);
19880
20423
  var currentView = data.view;
19881
- viewOptions.templateData = options.data;
20424
+ viewOptions.templateData = data;
19882
20425
  var newViewProto = newView.proto ? newView.proto() : newView;
19883
20426
 
19884
20427
  if (fn) {
@@ -20005,9 +20548,8 @@ EmberHandlebars.ViewHelper = Ember.Object.create({
20005
20548
  {{/view}}
20006
20549
  ```
20007
20550
 
20008
- The first argument can also be a relative path. Ember will search for the
20009
- view class starting at the `Ember.View` of the template where `{{view}}` was
20010
- used as the root object:
20551
+ The first argument can also be a relative path accessible from the current
20552
+ context.
20011
20553
 
20012
20554
  ```javascript
20013
20555
  MyApp = Ember.Application.create({});
@@ -20015,7 +20557,7 @@ EmberHandlebars.ViewHelper = Ember.Object.create({
20015
20557
  innerViewClass: Ember.View.extend({
20016
20558
  classNames: ['a-custom-view-class-as-property']
20017
20559
  }),
20018
- template: Ember.Handlebars.compile('{{#view "innerViewClass"}} hi {{/view}}')
20560
+ template: Ember.Handlebars.compile('{{#view "view.innerViewClass"}} hi {{/view}}')
20019
20561
  });
20020
20562
 
20021
20563
  MyApp.OuterView.create().appendTo('body');
@@ -20260,8 +20802,6 @@ Ember.Handlebars.registerHelper('collection', function(path, options) {
20260
20802
  }
20261
20803
  }
20262
20804
 
20263
- var tagName = hash.tagName || collectionPrototype.tagName;
20264
-
20265
20805
  if (fn) {
20266
20806
  itemHash.template = fn;
20267
20807
  delete options.fn;
@@ -20283,8 +20823,6 @@ Ember.Handlebars.registerHelper('collection', function(path, options) {
20283
20823
  itemHash._context = Ember.computed.alias('content');
20284
20824
  }
20285
20825
 
20286
- var viewString = view.toString();
20287
-
20288
20826
  var viewOptions = Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({ data: data, hash: itemHash }, this);
20289
20827
  hash.itemViewClass = itemViewClass.extend(viewOptions);
20290
20828
 
@@ -21433,6 +21971,55 @@ var set = Ember.set,
21433
21971
  isArray = Ember.isArray,
21434
21972
  precompileTemplate = Ember.Handlebars.compile;
21435
21973
 
21974
+ Ember.SelectOption = Ember.View.extend({
21975
+ tagName: 'option',
21976
+ attributeBindings: ['value', 'selected'],
21977
+
21978
+ defaultTemplate: function(context, options) {
21979
+ options = { data: options.data, hash: {} };
21980
+ Ember.Handlebars.helpers.bind.call(context, "view.label", options);
21981
+ },
21982
+
21983
+ init: function() {
21984
+ this.labelPathDidChange();
21985
+ this.valuePathDidChange();
21986
+
21987
+ this._super();
21988
+ },
21989
+
21990
+ selected: Ember.computed(function() {
21991
+ var content = get(this, 'content'),
21992
+ selection = get(this, 'parentView.selection');
21993
+ if (get(this, 'parentView.multiple')) {
21994
+ return selection && indexOf(selection, content.valueOf()) > -1;
21995
+ } else {
21996
+ // Primitives get passed through bindings as objects... since
21997
+ // `new Number(4) !== 4`, we use `==` below
21998
+ return content == selection;
21999
+ }
22000
+ }).property('content', 'parentView.selection'),
22001
+
22002
+ labelPathDidChange: Ember.observer(function() {
22003
+ var labelPath = get(this, 'parentView.optionLabelPath');
22004
+
22005
+ if (!labelPath) { return; }
22006
+
22007
+ Ember.defineProperty(this, 'label', Ember.computed(function() {
22008
+ return get(this, labelPath);
22009
+ }).property(labelPath));
22010
+ }, 'parentView.optionLabelPath'),
22011
+
22012
+ valuePathDidChange: Ember.observer(function() {
22013
+ var valuePath = get(this, 'parentView.optionValuePath');
22014
+
22015
+ if (!valuePath) { return; }
22016
+
22017
+ Ember.defineProperty(this, 'value', Ember.computed(function() {
22018
+ return get(this, valuePath);
22019
+ }).property(valuePath));
22020
+ }, 'parentView.optionValuePath')
22021
+ });
22022
+
21436
22023
  /**
21437
22024
  The `Ember.Select` view class renders a
21438
22025
  [select](https://developer.mozilla.org/en/HTML/Element/select) HTML element,
@@ -21609,7 +22196,7 @@ var set = Ember.set,
21609
22196
  Interacting with the rendered element by selecting the first option
21610
22197
  ('Yehuda') will update the `selectedPerson` value of `App.controller`
21611
22198
  to match the content object of the newly selected `<option>`. In this
21612
- case it is the first object in the `App.content.content`
22199
+ case it is the first object in the `App.controller.content`
21613
22200
 
21614
22201
  ### Supplying a Prompt
21615
22202
 
@@ -21704,7 +22291,7 @@ function program3(depth0,data) {
21704
22291
 
21705
22292
  var hashTypes;
21706
22293
  hashTypes = {'contentBinding': "STRING"};
21707
- data.buffer.push(escapeExpression(helpers.view.call(depth0, "Ember.SelectOption", {hash:{
22294
+ data.buffer.push(escapeExpression(helpers.view.call(depth0, "view.optionView", {hash:{
21708
22295
  'contentBinding': ("this")
21709
22296
  },contexts:[depth0],types:["ID"],hashTypes:hashTypes,data:data})));
21710
22297
  }
@@ -21813,6 +22400,15 @@ function program3(depth0,data) {
21813
22400
  */
21814
22401
  optionValuePath: 'content',
21815
22402
 
22403
+ /**
22404
+ The view class for option.
22405
+
22406
+ @property optionView
22407
+ @type Ember.View
22408
+ @default Ember.SelectOption
22409
+ */
22410
+ optionView: Ember.SelectOption,
22411
+
21816
22412
  _change: function() {
21817
22413
  if (get(this, 'multiple')) {
21818
22414
  this._changeMultiple();
@@ -21933,55 +22529,6 @@ function program3(depth0,data) {
21933
22529
  }
21934
22530
  });
21935
22531
 
21936
- Ember.SelectOption = Ember.View.extend({
21937
- tagName: 'option',
21938
- attributeBindings: ['value', 'selected'],
21939
-
21940
- defaultTemplate: function(context, options) {
21941
- options = { data: options.data, hash: {} };
21942
- Ember.Handlebars.helpers.bind.call(context, "view.label", options);
21943
- },
21944
-
21945
- init: function() {
21946
- this.labelPathDidChange();
21947
- this.valuePathDidChange();
21948
-
21949
- this._super();
21950
- },
21951
-
21952
- selected: Ember.computed(function() {
21953
- var content = get(this, 'content'),
21954
- selection = get(this, 'parentView.selection');
21955
- if (get(this, 'parentView.multiple')) {
21956
- return selection && indexOf(selection, content.valueOf()) > -1;
21957
- } else {
21958
- // Primitives get passed through bindings as objects... since
21959
- // `new Number(4) !== 4`, we use `==` below
21960
- return content == selection;
21961
- }
21962
- }).property('content', 'parentView.selection'),
21963
-
21964
- labelPathDidChange: Ember.observer(function() {
21965
- var labelPath = get(this, 'parentView.optionLabelPath');
21966
-
21967
- if (!labelPath) { return; }
21968
-
21969
- Ember.defineProperty(this, 'label', Ember.computed(function() {
21970
- return get(this, labelPath);
21971
- }).property(labelPath));
21972
- }, 'parentView.optionLabelPath'),
21973
-
21974
- valuePathDidChange: Ember.observer(function() {
21975
- var valuePath = get(this, 'parentView.optionValuePath');
21976
-
21977
- if (!valuePath) { return; }
21978
-
21979
- Ember.defineProperty(this, 'value', Ember.computed(function() {
21980
- return get(this, valuePath);
21981
- }).property(valuePath));
21982
- }, 'parentView.optionValuePath')
21983
- });
21984
-
21985
22532
  })();
21986
22533
 
21987
22534
 
@@ -21996,6 +22543,15 @@ function normalizeHash(hash, hashTypes) {
21996
22543
  }
21997
22544
  }
21998
22545
 
22546
+ /**
22547
+ * `{{input}}` inserts a new instance of either Ember.TextField or
22548
+ * Ember.Checkbox, depending on the `type` option passed in. If no `type`
22549
+ * is supplied it defaults to Ember.TextField.
22550
+ *
22551
+ * @method input
22552
+ * @for Ember.Handlebars.helpers
22553
+ * @param {Hash} options
22554
+ */
21999
22555
  Ember.Handlebars.registerHelper('input', function(options) {
22000
22556
 
22001
22557
 
@@ -22018,6 +22574,14 @@ Ember.Handlebars.registerHelper('input', function(options) {
22018
22574
  }
22019
22575
  });
22020
22576
 
22577
+ /**
22578
+ * `{{textarea}}` inserts a new instance of Ember.TextArea into the template
22579
+ * passing its options to `Ember.TextArea`'s `create` method.
22580
+ *
22581
+ * @method textarea
22582
+ * @for Ember.Handlebars.helpers
22583
+ * @param {Hash} options
22584
+ */
22021
22585
  Ember.Handlebars.registerHelper('textarea', function(options) {
22022
22586
 
22023
22587
 
@@ -22027,6 +22591,7 @@ Ember.Handlebars.registerHelper('textarea', function(options) {
22027
22591
  normalizeHash(hash, types);
22028
22592
  return Ember.Handlebars.helpers.view.call(this, Ember.TextArea, options);
22029
22593
  });
22594
+
22030
22595
  })();
22031
22596
 
22032
22597
 
@@ -22643,16 +23208,10 @@ define("router",
22643
23208
  * `{String} handler`: A handler name
22644
23209
  * `{Object} params`: A hash of recognized parameters
22645
23210
 
22646
- ## `UnresolvedHandlerInfo`
22647
-
22648
- * `{Boolean} isDynamic`: whether a handler has any dynamic segments
22649
- * `{String} name`: the name of a handler
22650
- * `{Object} context`: the active context for the handler
22651
-
22652
23211
  ## `HandlerInfo`
22653
23212
 
22654
23213
  * `{Boolean} isDynamic`: whether a handler has any dynamic segments
22655
- * `{String} name`: the original unresolved handler name
23214
+ * `{String} name`: the name of a handler
22656
23215
  * `{Object} handler`: a handler object
22657
23216
  * `{Object} context`: the active context for the handler
22658
23217
  */
@@ -22699,8 +23258,7 @@ define("router",
22699
23258
  @return {Array} an Array of `[handler, parameter]` tuples
22700
23259
  */
22701
23260
  handleURL: function(url) {
22702
- var results = this.recognizer.recognize(url),
22703
- objects = [];
23261
+ var results = this.recognizer.recognize(url);
22704
23262
 
22705
23263
  if (!results) {
22706
23264
  throw new Error("No route matched the URL '" + url + "'");
@@ -22796,7 +23354,7 @@ define("router",
22796
23354
  toSetup = [],
22797
23355
  startIdx = handlers.length,
22798
23356
  objectsToMatch = objects.length,
22799
- object, objectChanged, handlerObj, handler, names, i, len;
23357
+ object, objectChanged, handlerObj, handler, names, i;
22800
23358
 
22801
23359
  // Find out which handler to start matching at
22802
23360
  for (i=handlers.length-1; i>=0 && objectsToMatch>0; i--) {
@@ -22807,11 +23365,11 @@ define("router",
22807
23365
  }
22808
23366
 
22809
23367
  if (objectsToMatch > 0) {
22810
- throw "More objects were passed than dynamic segments";
23368
+ throw "More context objects were passed than there are dynamic segments for the route: "+handlerName;
22811
23369
  }
22812
23370
 
22813
23371
  // Connect the objects to the routes
22814
- for (i=0, len=handlers.length; i<len; i++) {
23372
+ for (i=0; i<handlers.length; i++) {
22815
23373
  handlerObj = handlers[i];
22816
23374
  handler = this.getHandler(handlerObj.handler);
22817
23375
  names = handlerObj.names;
@@ -22856,10 +23414,22 @@ define("router",
22856
23414
 
22857
23415
  toSetup.push({
22858
23416
  isDynamic: !!handlerObj.names.length,
22859
- handler: handlerObj.handler,
22860
- name: handlerObj.name,
23417
+ name: handlerObj.handler,
23418
+ handler: handler,
22861
23419
  context: object
22862
23420
  });
23421
+
23422
+ if (i === handlers.length - 1) {
23423
+ var lastHandler = toSetup[toSetup.length - 1],
23424
+ additionalHandler;
23425
+
23426
+ if (additionalHandler = lastHandler.handler.additionalHandler) {
23427
+ handlers.push({
23428
+ handler: additionalHandler.call(lastHandler.handler),
23429
+ names: []
23430
+ });
23431
+ }
23432
+ }
22863
23433
  }
22864
23434
 
22865
23435
  return { params: params, toSetup: toSetup };
@@ -22869,7 +23439,7 @@ define("router",
22869
23439
  var contexts = [].slice.call(arguments, 1);
22870
23440
 
22871
23441
  var currentHandlerInfos = this.currentHandlerInfos,
22872
- found = false, names, object, handlerInfo, handlerObj;
23442
+ found = false, object, handlerInfo;
22873
23443
 
22874
23444
  for (var i=currentHandlerInfos.length-1; i>=0; i--) {
22875
23445
  handlerInfo = currentHandlerInfos[i];
@@ -22963,7 +23533,10 @@ define("router",
22963
23533
  function failure(router, error) {
22964
23534
  loaded(router);
22965
23535
  var handler = router.getHandler('failure');
22966
- if (handler && handler.setup) { handler.setup(error); }
23536
+ if (handler){
23537
+ if (handler.enter) { handler.enter(); }
23538
+ if (handler.setup) { handler.setup(error); }
23539
+ }
22967
23540
  }
22968
23541
 
22969
23542
  /**
@@ -22998,9 +23571,21 @@ define("router",
22998
23571
  */
22999
23572
  function collectObjects(router, results, index, objects) {
23000
23573
  if (results.length === index) {
23001
- loaded(router);
23002
- setupContexts(router, objects);
23003
- return;
23574
+ var lastObject = objects[objects.length - 1],
23575
+ lastHandler = lastObject && lastObject.handler;
23576
+
23577
+ if (lastHandler && lastHandler.additionalHandler) {
23578
+ var additionalResult = {
23579
+ handler: lastHandler.additionalHandler(),
23580
+ params: {},
23581
+ isDynamic: false
23582
+ };
23583
+ results.push(additionalResult);
23584
+ } else {
23585
+ loaded(router);
23586
+ setupContexts(router, objects);
23587
+ return;
23588
+ }
23004
23589
  }
23005
23590
 
23006
23591
  var result = results[index];
@@ -23025,7 +23610,8 @@ define("router",
23025
23610
 
23026
23611
  var updatedObjects = objects.concat([{
23027
23612
  context: value,
23028
- handler: result.handler,
23613
+ name: result.handler,
23614
+ handler: router.getHandler(result.handler),
23029
23615
  isDynamic: result.isDynamic
23030
23616
  }]);
23031
23617
  collectObjects(router, results, index + 1, updatedObjects);
@@ -23035,8 +23621,9 @@ define("router",
23035
23621
  /**
23036
23622
  @private
23037
23623
 
23038
- Takes an Array of `UnresolvedHandlerInfo`s, resolves the handler names
23039
- into handlers, and then figures out what to do with each of the handlers.
23624
+ Takes an Array of `HandlerInfo`s, figures out which ones are
23625
+ exiting, entering, or changing contexts, and calls the
23626
+ proper handler hooks.
23040
23627
 
23041
23628
  For example, consider the following tree of handlers. Each handler is
23042
23629
  followed by the URL segment it handles.
@@ -23070,11 +23657,9 @@ define("router",
23070
23657
  4. Triggers the `setup` callback on `about`
23071
23658
 
23072
23659
  @param {Router} router
23073
- @param {Array[UnresolvedHandlerInfo]} handlerInfos
23660
+ @param {Array[HandlerInfo]} handlerInfos
23074
23661
  */
23075
23662
  function setupContexts(router, handlerInfos) {
23076
- resolveHandlers(router, handlerInfos);
23077
-
23078
23663
  var partition =
23079
23664
  partitionHandlers(router.currentHandlerInfos || [], handlerInfos);
23080
23665
 
@@ -23102,7 +23687,7 @@ define("router",
23102
23687
  }
23103
23688
  });
23104
23689
 
23105
- if (router.didTransition) {
23690
+ if (!aborted && router.didTransition) {
23106
23691
  router.didTransition(handlerInfos);
23107
23692
  }
23108
23693
  }
@@ -23126,28 +23711,6 @@ define("router",
23126
23711
  }
23127
23712
  }
23128
23713
 
23129
- /**
23130
- @private
23131
-
23132
- Updates the `handler` field in each element in an Array of
23133
- `UnresolvedHandlerInfo`s from a handler name to a resolved handler.
23134
-
23135
- When done, the Array will contain `HandlerInfo` structures.
23136
-
23137
- @param {Router} router
23138
- @param {Array[UnresolvedHandlerInfo]} handlerInfos
23139
- */
23140
- function resolveHandlers(router, handlerInfos) {
23141
- var handlerInfo;
23142
-
23143
- for (var i=0, l=handlerInfos.length; i<l; i++) {
23144
- handlerInfo = handlerInfos[i];
23145
-
23146
- handlerInfo.name = handlerInfo.handler;
23147
- handlerInfo.handler = router.getHandler(handlerInfo.handler);
23148
- }
23149
- }
23150
-
23151
23714
  /**
23152
23715
  @private
23153
23716
 
@@ -23249,6 +23812,7 @@ define("router",
23249
23812
  return Router;
23250
23813
  });
23251
23814
 
23815
+
23252
23816
  })();
23253
23817
 
23254
23818
 
@@ -23349,7 +23913,7 @@ Ember.controllerFor = function(container, controllerName, context, lookupOptions
23349
23913
  return container.lookup('controller:' + controllerName, lookupOptions) ||
23350
23914
  Ember.generateController(container, controllerName, context);
23351
23915
  };
23352
- /**
23916
+ /*
23353
23917
  Generates a controller automatically if none was provided.
23354
23918
  The type of generated controller depends on the context.
23355
23919
  You can customize your generated controllers by defining
@@ -23399,16 +23963,17 @@ var get = Ember.get, set = Ember.set;
23399
23963
  var DefaultView = Ember._MetamorphView;
23400
23964
  function setupLocation(router) {
23401
23965
  var location = get(router, 'location'),
23402
- rootURL = get(router, 'rootURL');
23966
+ rootURL = get(router, 'rootURL'),
23967
+ options = {};
23968
+
23969
+ if (typeof rootURL === 'string') {
23970
+ options.rootURL = rootURL;
23971
+ }
23403
23972
 
23404
23973
  if ('string' === typeof location) {
23405
- location = set(router, 'location', Ember.Location.create({
23406
- implementation: location
23407
- }));
23974
+ options.implementation = location;
23975
+ location = set(router, 'location', Ember.Location.create(options));
23408
23976
 
23409
- if (typeof rootURL === 'string') {
23410
- set(location, 'rootURL', rootURL);
23411
- }
23412
23977
  }
23413
23978
  }
23414
23979
 
@@ -23454,11 +24019,6 @@ Ember.Router = Ember.Object.extend({
23454
24019
  },
23455
24020
 
23456
24021
  didTransition: function(infos) {
23457
- // Don't do any further action here if we redirected
23458
- for (var i=0, l=infos.length; i<l; i++) {
23459
- if (infos[i].handler.redirected) { return; }
23460
- }
23461
-
23462
24022
  var appController = this.container.lookup('controller:application'),
23463
24023
  path = routePath(infos);
23464
24024
 
@@ -23643,7 +24203,8 @@ Ember.Router.reopenClass({
23643
24203
  */
23644
24204
 
23645
24205
  var get = Ember.get, set = Ember.set,
23646
- classify = Ember.String.classify;
24206
+ classify = Ember.String.classify,
24207
+ fmt = Ember.String.fmt;
23647
24208
 
23648
24209
  /**
23649
24210
  The `Ember.Route` class is used to define individual routes. Refer to
@@ -23718,9 +24279,16 @@ Ember.Route = Ember.Object.extend({
23718
24279
  @param {String} name the name of the route
23719
24280
  @param {...Object} models the
23720
24281
  */
23721
- transitionTo: function() {
23722
- if (this._checkingRedirect) { this.redirected = true; }
23723
- return this.router.transitionTo.apply(this.router, arguments);
24282
+ transitionTo: function(name, context) {
24283
+ var router = this.router;
24284
+
24285
+ // If the transition is a no-op, just bail.
24286
+ if (router.isActive.apply(router, arguments)) {
24287
+ return;
24288
+ }
24289
+
24290
+ if (this._checkingRedirect) { this._redirected[this._redirectDepth] = true; }
24291
+ return router.transitionTo.apply(router, arguments);
23724
24292
  },
23725
24293
 
23726
24294
  /**
@@ -23732,7 +24300,14 @@ Ember.Route = Ember.Object.extend({
23732
24300
  @param {...Object} models the
23733
24301
  */
23734
24302
  replaceWith: function() {
23735
- if (this._checkingRedirect) { this.redirected = true; }
24303
+ var router = this.router;
24304
+
24305
+ // If the transition is a no-op, just bail.
24306
+ if (router.isActive.apply(router, arguments)) {
24307
+ return;
24308
+ }
24309
+
24310
+ if (this._checkingRedirect) { this._redirected[this._redirectDepth] = true; }
23736
24311
  return this.router.replaceWith.apply(this.router, arguments);
23737
24312
  },
23738
24313
 
@@ -23740,6 +24315,15 @@ Ember.Route = Ember.Object.extend({
23740
24315
  return this.router.send.apply(this.router, arguments);
23741
24316
  },
23742
24317
 
24318
+ /**
24319
+ @private
24320
+
24321
+ Internal counter for tracking whether a route handler has
24322
+ called transitionTo or replaceWith inside its redirect hook.
24323
+
24324
+ */
24325
+ _redirectDepth: 0,
24326
+
23743
24327
  /**
23744
24328
  @private
23745
24329
 
@@ -23748,17 +24332,57 @@ Ember.Route = Ember.Object.extend({
23748
24332
  @method setup
23749
24333
  */
23750
24334
  setup: function(context) {
23751
- this.redirected = false;
24335
+ // Determine if this is the top-most transition.
24336
+ // If so, we'll set up a data structure to track
24337
+ // whether `transitionTo` or replaceWith gets called
24338
+ // inside our `redirect` hook.
24339
+ //
24340
+ // This is necessary because we set a flag on the route
24341
+ // inside transitionTo/replaceWith to determine afterwards
24342
+ // if they were called, but `setup` can be called
24343
+ // recursively and we need to disambiguate where in the
24344
+ // call stack the redirect happened.
24345
+
24346
+ // Are we the first call to setup? If so, set up the
24347
+ // redirect tracking data structure, and remember that
24348
+ // we're the top-most so we can clean it up later.
24349
+ var isTop;
24350
+ if (!this._redirected) {
24351
+ isTop = true;
24352
+ this._redirected = [];
24353
+ }
24354
+
24355
+ // Set a flag on this route saying that we are interested in
24356
+ // tracking redirects, and increment the depth count.
23752
24357
  this._checkingRedirect = true;
24358
+ var depth = ++this._redirectDepth;
23753
24359
 
24360
+ // Check to see if context is set. This check preserves
24361
+ // the correct arguments.length inside the `redirect` hook.
23754
24362
  if (context === undefined) {
23755
24363
  this.redirect();
23756
24364
  } else {
23757
24365
  this.redirect(context);
23758
24366
  }
23759
24367
 
24368
+ // After the call to `redirect` returns, decrement the depth count.
24369
+ this._redirectDepth--;
23760
24370
  this._checkingRedirect = false;
23761
- if (this.redirected) { return false; }
24371
+
24372
+ // Save off the data structure so we can reset it on the route but
24373
+ // still reference it later in this method.
24374
+ var redirected = this._redirected;
24375
+
24376
+ // If this is the top `setup` call in the call stack, clear the
24377
+ // redirect tracking data structure.
24378
+ if (isTop) { this._redirected = null; }
24379
+
24380
+ // If we were redirected, there is nothing left for us to do.
24381
+ // Returning false tells router.js not to continue calling setup
24382
+ // on any children route handlers.
24383
+ if (redirected[depth]) {
24384
+ return false;
24385
+ }
23762
24386
 
23763
24387
  var controller = this.controllerFor(this.routeName, context);
23764
24388
 
@@ -23810,6 +24434,8 @@ Ember.Route = Ember.Object.extend({
23810
24434
  @private
23811
24435
 
23812
24436
  Called when the context is changed by router.js.
24437
+
24438
+ @method contextDidChange
23813
24439
  */
23814
24440
  contextDidChange: function() {
23815
24441
  this.currentModel = this.context;
@@ -24236,7 +24862,7 @@ Ember.onLoad('Ember.Handlebars', function() {
24236
24862
  @submodule ember-routing
24237
24863
  */
24238
24864
 
24239
- var get = Ember.get, set = Ember.set;
24865
+ var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
24240
24866
  Ember.onLoad('Ember.Handlebars', function(Handlebars) {
24241
24867
 
24242
24868
  var resolveParams = Ember.Router.resolveParams,
@@ -24268,19 +24894,6 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
24268
24894
  }
24269
24895
 
24270
24896
  /**
24271
- Renders a link to the supplied route.
24272
-
24273
- When the rendered link matches the current route, and the same object instance is passed into the helper,
24274
- then the link is given class="active" by default.
24275
-
24276
- You may re-open LinkView in order to change the default active class:
24277
-
24278
- ``` javascript
24279
- Ember.LinkView.reopen({
24280
- activeClass: "is-active"
24281
- })
24282
- ```
24283
-
24284
24897
  @class LinkView
24285
24898
  @namespace Ember
24286
24899
  @extends Ember.View
@@ -24331,6 +24944,8 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
24331
24944
  },
24332
24945
 
24333
24946
  href: Ember.computed(function() {
24947
+ if (this.get('tagName') !== 'a') { return false; }
24948
+
24334
24949
  var router = this.get('router');
24335
24950
  return router.generate.apply(router, args(this, router));
24336
24951
  })
@@ -24339,6 +24954,155 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
24339
24954
  LinkView.toString = function() { return "LinkView"; };
24340
24955
 
24341
24956
  /**
24957
+ The `{{linkTo}}` helper renders a link to the supplied
24958
+ `routeName` passing an optionally supplied model to the
24959
+ route as its `model` context of the route. The block
24960
+ for `{{linkTo}}` becomes the innerHTML of the rendered
24961
+ element:
24962
+
24963
+ ```handlebars
24964
+ {{#linkTo photoGallery}}
24965
+ Great Hamster Photos
24966
+ {{/linkTo}}
24967
+ ```
24968
+
24969
+ ```html
24970
+ <a href="/hamster-photos">
24971
+ Great Hamster Photos
24972
+ </a>
24973
+ ```
24974
+
24975
+ ### Supplying a tagName
24976
+ By default `{{linkTo}}` renders an `<a>` element. This can
24977
+ be overridden for a single use of `{{linkTo}}` by supplying
24978
+ a `tagName` option:
24979
+
24980
+ ```handlebars
24981
+ {{#linkTo photoGallery tagName="li"}}
24982
+ Great Hamster Photos
24983
+ {{/linkTo}}
24984
+ ```
24985
+
24986
+ ```html
24987
+ <li>
24988
+ Great Hamster Photos
24989
+ </li>
24990
+ ```
24991
+
24992
+ To override this option for your entire application, see
24993
+ "Overriding Application-wide Defaults".
24994
+
24995
+ ### Handling `href`
24996
+ `{{linkTo}}` will use your application's Router to
24997
+ fill the element's `href` property with a url that
24998
+ matches the path to the supplied `routeName` for your
24999
+ routers's configured `Location` scheme, which defaults
25000
+ to Ember.HashLocation.
25001
+
25002
+ ### Handling current route
25003
+ `{{linkTo}}` will apply a CSS class name of 'active'
25004
+ when the application's current route matches
25005
+ the supplied routeName. For example, if the application's
25006
+ current route is 'photoGallery.recent' the following
25007
+ use of `{{linkTo}}`:
25008
+
25009
+ ```handlebars
25010
+ {{#linkTo photoGallery.recent}}
25011
+ Great Hamster Photos from the last week
25012
+ {{/linkTo}}
25013
+ ```
25014
+
25015
+ will result in
25016
+
25017
+ ```html
25018
+ <a href="/hamster-photos/this-week" class="active">
25019
+ Great Hamster Photos
25020
+ </a>
25021
+ ```
25022
+
25023
+ The CSS class name used for active classes can be customized
25024
+ for a single use of `{{linkTo}}` by passing an `activeClass`
25025
+ option:
25026
+
25027
+ ```handlebars
25028
+ {{#linkTo photoGallery.recent activeClass="current-url"}}
25029
+ Great Hamster Photos from the last week
25030
+ {{/linkTo}}
25031
+ ```
25032
+
25033
+ ```html
25034
+ <a href="/hamster-photos/this-week" class="current-url">
25035
+ Great Hamster Photos
25036
+ </a>
25037
+ ```
25038
+
25039
+ To override this option for your entire application, see
25040
+ "Overriding Application-wide Defaults".
25041
+
25042
+ ### Supplying a model
25043
+ An optional model argument can be used for routes whose
25044
+ paths contain dynamic segments. This argument will become
25045
+ the model context of the linked route:
25046
+
25047
+ ```javascript
25048
+ App.Router.map(function(){
25049
+ this.resource("photoGallery", {path: "hamster-photos/:photo_id"});
25050
+ })
25051
+ ```
25052
+
25053
+ ```handlebars
25054
+ {{#linkTo photoGallery aPhoto}}
25055
+ {{aPhoto.title}}
25056
+ {{/linkTo}}
25057
+ ```
25058
+
25059
+ ```html
25060
+ <a href="/hamster-photos/42">
25061
+ Tomster
25062
+ </a>
25063
+ ```
25064
+
25065
+ ### Supplying multiple models
25066
+ For deep-linking to route paths that contain multiple
25067
+ dynamic segments, multiple model arguments can be used.
25068
+ As the router transitions through the route path, each
25069
+ supplied model argument will become the context for the
25070
+ route with the dynamic segments:
25071
+
25072
+ ```javascript
25073
+ App.Router.map(function(){
25074
+ this.resource("photoGallery", {path: "hamster-photos/:photo_id"}, function(){
25075
+ this.route("comment", {path: "comments/:comment_id"});
25076
+ });
25077
+ });
25078
+ ```
25079
+ This argument will become the model context of the linked route:
25080
+
25081
+ ```handlebars
25082
+ {{#linkTo photoGallery.comment aPhoto comment}}
25083
+ {{comment.body}}
25084
+ {{/linkTo}}
25085
+ ```
25086
+
25087
+ ```html
25088
+ <a href="/hamster-photos/42/comment/718">
25089
+ A+++ would snuggle again.
25090
+ </a>
25091
+ ```
25092
+
25093
+ ### Overriding Application-wide Defaults
25094
+ ``{{linkTo}}`` creates an instance of Ember.LinkView
25095
+ for rendering. To override options for your entire
25096
+ application, reopen Ember.LinkView and supply the
25097
+ desired values:
25098
+
25099
+ ``` javascript
25100
+ Ember.LinkView.reopen({
25101
+ activeClass: "is-active",
25102
+ tagName: 'li'
25103
+ })
25104
+ ```
25105
+
24342
25106
  @method linkTo
24343
25107
  @for Ember.Handlebars.helpers
24344
25108
  @param {String} routeName
@@ -24554,6 +25318,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
24554
25318
  var EmberHandlebars = Ember.Handlebars,
24555
25319
  handlebarsGet = EmberHandlebars.get,
24556
25320
  SafeString = EmberHandlebars.SafeString,
25321
+ forEach = Ember.ArrayPolyfills.forEach,
24557
25322
  get = Ember.get,
24558
25323
  a_slice = Array.prototype.slice;
24559
25324
 
@@ -24580,7 +25345,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
24580
25345
 
24581
25346
  var allowed = true;
24582
25347
 
24583
- keys.forEach(function(key) {
25348
+ forEach.call(keys, function(key) {
24584
25349
  if (event[key + "Key"] && allowedKeys.indexOf(key) === -1) {
24585
25350
  allowed = false;
24586
25351
  }
@@ -24952,6 +25717,28 @@ if (Ember.ENV.EXPERIMENTAL_CONTROL_HELPER) {
24952
25717
  var get = Ember.get, set = Ember.set;
24953
25718
 
24954
25719
  Ember.ControllerMixin.reopen({
25720
+ /**
25721
+ Transition the application into another route. The route may
25722
+ be either a single route or route path:
25723
+
25724
+ ```javascript
25725
+ aController.transitionToRoute('blogPosts');
25726
+ aController.transitionToRoute('blogPosts.recentEntries');
25727
+ ```
25728
+
25729
+ Optionally supply a model for the route in question. The model
25730
+ will be serialized into the URL using the `serialize` hook of
25731
+ the route:
25732
+
25733
+ ```javascript
25734
+ aController.transitionToRoute('blogPost', aPost);
25735
+ ```
25736
+
25737
+ @param {String} name the name of the route
25738
+ @param {...Object} models the
25739
+ @for Ember.ControllerMixin
25740
+ @method transitionToRoute
25741
+ */
24955
25742
  transitionToRoute: function() {
24956
25743
  // target may be either another controller or a router
24957
25744
  var target = get(this, 'target'),
@@ -24959,6 +25746,11 @@ Ember.ControllerMixin.reopen({
24959
25746
  return method.apply(target, arguments);
24960
25747
  },
24961
25748
 
25749
+ /**
25750
+ @deprecated
25751
+ @for Ember.ControllerMixin
25752
+ @method transitionTo
25753
+ */
24962
25754
  transitionTo: function() {
24963
25755
 
24964
25756
  return this.transitionToRoute.apply(this, arguments);
@@ -24971,6 +25763,11 @@ Ember.ControllerMixin.reopen({
24971
25763
  return method.apply(target, arguments);
24972
25764
  },
24973
25765
 
25766
+ /**
25767
+ @deprecated
25768
+ @for Ember.ControllerMixin
25769
+ @method replaceWith
25770
+ */
24974
25771
  replaceWith: function() {
24975
25772
 
24976
25773
  return this.replaceRoute.apply(this, arguments);
@@ -25259,7 +26056,6 @@ Ember.HistoryLocation = Ember.Object.extend({
25259
26056
 
25260
26057
  init: function() {
25261
26058
  set(this, 'location', get(this, 'location') || window.location);
25262
- this._initialUrl = this.getURL();
25263
26059
  this.initState();
25264
26060
  },
25265
26061
 
@@ -25271,8 +26067,8 @@ Ember.HistoryLocation = Ember.Object.extend({
25271
26067
  @method initState
25272
26068
  */
25273
26069
  initState: function() {
26070
+ set(this, 'history', get(this, 'history') || window.history);
25274
26071
  this.replaceState(this.formatURL(this.getURL()));
25275
- set(this, 'history', window.history);
25276
26072
  },
25277
26073
 
25278
26074
  /**
@@ -25353,7 +26149,9 @@ Ember.HistoryLocation = Ember.Object.extend({
25353
26149
  @param path {String}
25354
26150
  */
25355
26151
  pushState: function(path) {
25356
- window.history.pushState({ path: path }, null, path);
26152
+ get(this, 'history').pushState({ path: path }, null, path);
26153
+ // used for webkit workaround
26154
+ this._previousURL = this.getURL();
25357
26155
  },
25358
26156
 
25359
26157
  /**
@@ -25365,7 +26163,9 @@ Ember.HistoryLocation = Ember.Object.extend({
25365
26163
  @param path {String}
25366
26164
  */
25367
26165
  replaceState: function(path) {
25368
- window.history.replaceState({ path: path }, null, path);
26166
+ get(this, 'history').replaceState({ path: path }, null, path);
26167
+ // used for webkit workaround
26168
+ this._previousURL = this.getURL();
25369
26169
  },
25370
26170
 
25371
26171
  /**
@@ -25385,7 +26185,7 @@ Ember.HistoryLocation = Ember.Object.extend({
25385
26185
  // Ignore initial page load popstate event in Chrome
25386
26186
  if(!popstateFired) {
25387
26187
  popstateFired = true;
25388
- if (self.formatURL(self.getURL()) === self._initialUrl) { return; }
26188
+ if (self.getURL() === self._previousURL) { return; }
25389
26189
  }
25390
26190
  callback(self.getURL());
25391
26191
  });
@@ -26206,12 +27006,18 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
26206
27006
  },
26207
27007
 
26208
27008
  reset: function() {
26209
- get(this, '__container__').destroy();
26210
- this.buildContainer();
26211
27009
 
26212
- Ember.run.schedule('actions', this, function(){
26213
- this._initialize();
26214
- this.startRouting();
27010
+ Ember.run(this, function(){
27011
+ Ember.run(this.__container__, 'destroy');
27012
+
27013
+ this.buildContainer();
27014
+
27015
+ this._readinessDeferrals = 1;
27016
+
27017
+ Ember.run.schedule('actions', this, function(){
27018
+ this._initialize();
27019
+ this.startRouting();
27020
+ });
26215
27021
  });
26216
27022
  },
26217
27023
 
@@ -26266,27 +27072,12 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
26266
27072
  @method setupEventDispatcher
26267
27073
  */
26268
27074
  setupEventDispatcher: function() {
26269
- var eventDispatcher = this.createEventDispatcher(),
26270
- customEvents = get(this, 'customEvents');
27075
+ var customEvents = get(this, 'customEvents'),
27076
+ rootElement = get(this, 'rootElement'),
27077
+ dispatcher = this.__container__.lookup('event_dispatcher:main');
26271
27078
 
26272
- eventDispatcher.setup(customEvents);
26273
- },
26274
-
26275
- /**
26276
- @private
26277
-
26278
- Create an event dispatcher for the application's `rootElement`.
26279
-
26280
- @method createEventDispatcher
26281
- */
26282
- createEventDispatcher: function() {
26283
- var rootElement = get(this, 'rootElement'),
26284
- eventDispatcher = Ember.EventDispatcher.create({
26285
- rootElement: rootElement
26286
- });
26287
-
26288
- set(this, 'eventDispatcher', eventDispatcher);
26289
- return eventDispatcher;
27079
+ set(this, 'eventDispatcher', dispatcher);
27080
+ dispatcher.setup(customEvents, rootElement);
26290
27081
  },
26291
27082
 
26292
27083
  /**
@@ -26329,10 +27120,7 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
26329
27120
  willDestroy: function() {
26330
27121
  Ember.BOOTED = false;
26331
27122
 
26332
- var eventDispatcher = get(this, 'eventDispatcher');
26333
- if (eventDispatcher) { eventDispatcher.destroy(); }
26334
-
26335
- get(this, '__container__').destroy();
27123
+ this.__container__.destroy();
26336
27124
  },
26337
27125
 
26338
27126
  initializer: function(options) {
@@ -26393,13 +27181,14 @@ Ember.Application.reopenClass({
26393
27181
  container.register('controller:object', Ember.ObjectController, { instantiate: false });
26394
27182
  container.register('controller:array', Ember.ArrayController, { instantiate: false });
26395
27183
  container.register('route:basic', Ember.Route, { instantiate: false });
27184
+ container.register('event_dispatcher:main', Ember.EventDispatcher);
26396
27185
 
26397
27186
  container.injection('router:main', 'namespace', 'application:main');
26398
27187
 
26399
- container.typeInjection('controller', 'target', 'router:main');
26400
- container.typeInjection('controller', 'namespace', 'application:main');
27188
+ container.injection('controller', 'target', 'router:main');
27189
+ container.injection('controller', 'namespace', 'application:main');
26401
27190
 
26402
- container.typeInjection('route', 'router', 'router:main');
27191
+ container.injection('route', 'router', 'router:main');
26403
27192
 
26404
27193
  return container;
26405
27194
  }
@@ -26418,6 +27207,7 @@ Ember.Application.reopenClass({
26418
27207
  This allows the application to register default injections in the container
26419
27208
  that could be overridden by the normal naming convention.
26420
27209
 
27210
+ @method resolverFor
26421
27211
  @param {Ember.Namespace} namespace the namespace to look for classes
26422
27212
  @return {*} the resolved value for a given lookup
26423
27213
  */
@@ -26513,6 +27303,31 @@ function verifyDependencies(controller) {
26513
27303
 
26514
27304
  Ember.ControllerMixin.reopen({
26515
27305
  concatenatedProperties: ['needs'],
27306
+
27307
+ /**
27308
+ An array of other controller objects available inside
27309
+ instances of this controller via the `controllers`
27310
+ property:
27311
+
27312
+ For example, when you define a controller:
27313
+
27314
+ ```javascript
27315
+ App.CommentsController = Ember.ArrayController.extend({
27316
+ needs: ['post']
27317
+ });
27318
+ ```
27319
+
27320
+ The application's single instance of these other
27321
+ controllers are accessible by name through the
27322
+ `controllers` property:
27323
+
27324
+ ```javascript
27325
+ this.get('controllers.post'); // instance of App.PostController
27326
+ ```
27327
+
27328
+ @property {Array} needs
27329
+ @default []
27330
+ */
26516
27331
  needs: [],
26517
27332
 
26518
27333
  init: function() {
@@ -26659,8 +27474,26 @@ Ember.State = Ember.Object.extend(Ember.Evented,
26659
27474
  }
26660
27475
  }
26661
27476
 
26662
- set(this, 'pathsCache', {});
26663
- set(this, 'pathsCacheNoContext', {});
27477
+ // pathsCaches is a nested hash of the form:
27478
+ // pathsCaches[stateManagerTypeGuid][path] == transitions_hash
27479
+ set(this, 'pathsCaches', {});
27480
+ },
27481
+
27482
+ setPathsCache: function(stateManager, path, transitions) {
27483
+ var stateManagerTypeGuid = Ember.guidFor(stateManager.constructor),
27484
+ pathsCaches = get(this, 'pathsCaches'),
27485
+ pathsCacheForManager = pathsCaches[stateManagerTypeGuid] || {};
27486
+
27487
+ pathsCacheForManager[path] = transitions;
27488
+ pathsCaches[stateManagerTypeGuid] = pathsCacheForManager;
27489
+ },
27490
+
27491
+ getPathsCache: function(stateManager, path) {
27492
+ var stateManagerTypeGuid = Ember.guidFor(stateManager.constructor),
27493
+ pathsCaches = get(this, 'pathsCaches'),
27494
+ pathsCacheForManager = pathsCaches[stateManagerTypeGuid] || {};
27495
+
27496
+ return pathsCacheForManager[path];
26664
27497
  },
26665
27498
 
26666
27499
  setupChild: function(states, name, value) {
@@ -27648,7 +28481,7 @@ Ember.StateManager = Ember.State.extend({
27648
28481
  },
27649
28482
 
27650
28483
  contextFreeTransition: function(currentState, path) {
27651
- var cache = currentState.pathsCache[path];
28484
+ var cache = currentState.getPathsCache(this, path);
27652
28485
  if (cache) { return cache; }
27653
28486
 
27654
28487
  var enterStates = this.getStatesInPath(currentState, path),
@@ -27734,12 +28567,14 @@ Ember.StateManager = Ember.State.extend({
27734
28567
 
27735
28568
  // Cache the enterStates, exitStates, and resolveState for the
27736
28569
  // current state and the `path`.
27737
- var transitions = currentState.pathsCache[path] = {
28570
+ var transitions = {
27738
28571
  exitStates: exitStates,
27739
28572
  enterStates: enterStates,
27740
28573
  resolveState: resolveState
27741
28574
  };
27742
28575
 
28576
+ currentState.setPathsCache(this, path, transitions);
28577
+
27743
28578
  return transitions;
27744
28579
  },
27745
28580
 
@@ -27798,6 +28633,103 @@ Ember States
27798
28633
 
27799
28634
  })();
27800
28635
 
28636
+ (function() {
28637
+ /*globals EMBER_APP_BEING_TESTED */
28638
+
28639
+ var Promise = Ember.RSVP.Promise,
28640
+ pendingAjaxRequests = 0,
28641
+ originalFind;
28642
+
28643
+ function visit(url) {
28644
+ var promise = new Promise();
28645
+ Ember.run(EMBER_APP_BEING_TESTED, EMBER_APP_BEING_TESTED.handleURL, url);
28646
+ wait(promise, promise.resolve);
28647
+ return promise;
28648
+ }
28649
+
28650
+ function click(selector) {
28651
+ var promise = new Promise();
28652
+ Ember.run(function() {
28653
+ Ember.$(selector).click();
28654
+ });
28655
+ wait(promise, promise.resolve);
28656
+ return promise;
28657
+ }
28658
+
28659
+ function fillIn(selector, text) {
28660
+ var promise = new Promise();
28661
+ var $el = find(selector);
28662
+ Ember.run(function() {
28663
+ $el.val(text);
28664
+ });
28665
+
28666
+ wait(promise, promise.resolve);
28667
+ return promise;
28668
+ }
28669
+
28670
+ function find(selector) {
28671
+ return Ember.$('.ember-application').find(selector);
28672
+ }
28673
+
28674
+ function wait(target, method) {
28675
+ if (!method) {
28676
+ method = target;
28677
+ target = null;
28678
+ }
28679
+ stop();
28680
+ var watcher = setInterval(function() {
28681
+ var routerIsLoading = EMBER_APP_BEING_TESTED.__container__.lookup('router:main').router.isLoading;
28682
+ if (routerIsLoading) { return; }
28683
+ if (pendingAjaxRequests) { return; }
28684
+ if (Ember.run.hasScheduledTimers() || Ember.run.currentRunLoop) { return; }
28685
+ clearInterval(watcher);
28686
+ start();
28687
+ Ember.run(target, method);
28688
+ }, 200);
28689
+ }
28690
+
28691
+ Ember.Application.reopen({
28692
+ setupForTesting: function() {
28693
+ this.deferReadiness();
28694
+
28695
+ this.Router.reopen({
28696
+ location: 'none'
28697
+ });
28698
+
28699
+ window.EMBER_APP_BEING_TESTED = this;
28700
+ },
28701
+
28702
+ injectTestHelpers: function() {
28703
+ Ember.$(document).ajaxStart(function() {
28704
+ pendingAjaxRequests++;
28705
+ });
28706
+
28707
+ Ember.$(document).ajaxStop(function() {
28708
+ pendingAjaxRequests--;
28709
+ });
28710
+
28711
+ window.visit = visit;
28712
+ window.click = click;
28713
+ window.fillIn = fillIn;
28714
+ originalFind = window.find;
28715
+ window.find = find;
28716
+ },
28717
+
28718
+ removeTestHelpers: function() {
28719
+ window.visit = null;
28720
+ window.click = null;
28721
+ window.fillIn = null;
28722
+ window.find = originalFind;
28723
+ }
28724
+ });
28725
+ })();
28726
+
28727
+
28728
+
28729
+ (function() {
28730
+
28731
+ })();
28732
+
27801
28733
 
27802
28734
  })();
27803
28735