/*! jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */

/*!

 handlebars v1.3.0

Copyright (C) 2011 by Yehuda Katz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

@license
*/

/**
 * @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/text for details
 */

/*
CryptoJS v3.0.2
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/

/*!
 * @overview  Ember - JavaScript Application Framework
 * @copyright Copyright 2011-2014 Tilde Inc. and contributors
 *            Portions Copyright 2006-2011 Strobe Inc.
 *            Portions Copyright 2008-2011 Apple Inc. All rights reserved.
 * @license   Licensed under MIT license
 *            See https://raw.github.com/emberjs/ember.js/master/LICENSE
 * @version   1.4.1+pre.af87bd20
 */

// Copyright: Â©2014 Tilde, Inc. All rights reserved.

function md5cycle(e,t){var n=e[0],r=e[1],i=e[2],s=e[3];n=ff(n,r,i,s,t[0],7,-680876936),s=ff(s,n,r,i,t[1],12,-389564586),i=ff(i,s,n,r,t[2],17,606105819),r=ff(r,i,s,n,t[3],22,-1044525330),n=ff(n,r,i,s,t[4],7,-176418897),s=ff(s,n,r,i,t[5],12,1200080426),i=ff(i,s,n,r,t[6],17,-1473231341),r=ff(r,i,s,n,t[7],22,-45705983),n=ff(n,r,i,s,t[8],7,1770035416),s=ff(s,n,r,i,t[9],12,-1958414417),i=ff(i,s,n,r,t[10],17,-42063),r=ff(r,i,s,n,t[11],22,-1990404162),n=ff(n,r,i,s,t[12],7,1804603682),s=ff(s,n,r,i,t[13],12,-40341101),i=ff(i,s,n,r,t[14],17,-1502002290),r=ff(r,i,s,n,t[15],22,1236535329),n=gg(n,r,i,s,t[1],5,-165796510),s=gg(s,n,r,i,t[6],9,-1069501632),i=gg(i,s,n,r,t[11],14,643717713),r=gg(r,i,s,n,t[0],20,-373897302),n=gg(n,r,i,s,t[5],5,-701558691),s=gg(s,n,r,i,t[10],9,38016083),i=gg(i,s,n,r,t[15],14,-660478335),r=gg(r,i,s,n,t[4],20,-405537848),n=gg(n,r,i,s,t[9],5,568446438),s=gg(s,n,r,i,t[14],9,-1019803690),i=gg(i,s,n,r,t[3],14,-187363961),r=gg(r,i,s,n,t[8],20,1163531501),n=gg(n,r,i,s,t[13],5,-1444681467),s=gg(s,n,r,i,t[2],9,-51403784),i=gg(i,s,n,r,t[7],14,1735328473),r=gg(r,i,s,n,t[12],20,-1926607734),n=hh(n,r,i,s,t[5],4,-378558),s=hh(s,n,r,i,t[8],11,-2022574463),i=hh(i,s,n,r,t[11],16,1839030562),r=hh(r,i,s,n,t[14],23,-35309556),n=hh(n,r,i,s,t[1],4,-1530992060),s=hh(s,n,r,i,t[4],11,1272893353),i=hh(i,s,n,r,t[7],16,-155497632),r=hh(r,i,s,n,t[10],23,-1094730640),n=hh(n,r,i,s,t[13],4,681279174),s=hh(s,n,r,i,t[0],11,-358537222),i=hh(i,s,n,r,t[3],16,-722521979),r=hh(r,i,s,n,t[6],23,76029189),n=hh(n,r,i,s,t[9],4,-640364487),s=hh(s,n,r,i,t[12],11,-421815835),i=hh(i,s,n,r,t[15],16,530742520),r=hh(r,i,s,n,t[2],23,-995338651),n=ii(n,r,i,s,t[0],6,-198630844),s=ii(s,n,r,i,t[7],10,1126891415),i=ii(i,s,n,r,t[14],15,-1416354905),r=ii(r,i,s,n,t[5],21,-57434055),n=ii(n,r,i,s,t[12],6,1700485571),s=ii(s,n,r,i,t[3],10,-1894986606),i=ii(i,s,n,r,t[10],15,-1051523),r=ii(r,i,s,n,t[1],21,-2054922799),n=ii(n,r,i,s,t[8],6,1873313359),s=ii(s,n,r,i,t[15],10,-30611744),i=ii(i,s,n,r,t[6],15,-1560198380),r=ii(r,i,s,n,t[13],21,1309151649),n=ii(n,r,i,s,t[4],6,-145523070),s=ii(s,n,r,i,t[11],10,-1120210379),i=ii(i,s,n,r,t[2],15,718787259),r=ii(r,i,s,n,t[9],21,-343485551),e[0]=add32(n,e[0]),e[1]=add32(r,e[1]),e[2]=add32(i,e[2]),e[3]=add32(s,e[3])}function cmn(e,t,n,r,i,s){return t=add32(add32(t,e),add32(r,s)),add32(t<<i|t>>>32-i,n)}function ff(e,t,n,r,i,s,o){return cmn(t&n|~t&r,e,t,i,s,o)}function gg(e,t,n,r,i,s,o){return cmn(t&r|n&~r,e,t,i,s,o)}function hh(e,t,n,r,i,s,o){return cmn(t^n^r,e,t,i,s,o)}function ii(e,t,n,r,i,s,o){return cmn(n^(t|~r),e,t,i,s,o)}function md51(e){txt="";var t=e.length,n=[1732584193,-271733879,-1732584194,271733878],r;for(r=64;r<=e.length;r+=64)md5cycle(n,md5blk(e.substring(r-64,r)));e=e.substring(r-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(r=0;r<e.length;r++)i[r>>2]|=e.charCodeAt(r)<<(r%4<<3);i[r>>2]|=128<<(r%4<<3);if(r>55){md5cycle(n,i);for(r=0;r<16;r++)i[r]=0}return i[14]=t*8,md5cycle(n,i),n}function md5blk(e){var t=[],n;for(n=0;n<64;n+=4)t[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return t}function rhex(e){var t="",n=0;for(;n<4;n++)t+=hex_chr[e>>n*8+4&15]+hex_chr[e>>n*8&15];return t}function hex(e){for(var t=0;t<e.length;t++)e[t]=rhex(e[t]);return e.join("")}function md5(e){return hex(md51(e))}function add32(e,t){return e+t&4294967295}function log(){try{if(LOGLEVEL>3)return console.log.apply(console,arguments)}catch(e){console.log(e)}}function info(){try{if(LOGLEVEL>2)return console.info.apply(console,arguments)}catch(e){console.log(e)}}function warn(){try{if(LOGLEVEL>1)return console.warn.apply(console,arguments)}catch(e){console.log(e)}}function error(){try{if(LOGLEVEL>0)return console.error.apply(console,arguments)}catch(e){console.log(e)}}function appendShell(e,t){var n=Mist.machineShellController.machine;if(!n)return;var r=n.commandHistory.findBy("id",t);if(!r)return;var e=e.trim().replace("<br/>",String.fromCharCode(13));e.length&&warn(Date()+": "+e),r.set("response",r.response+e),Ember.run.next(function(){$(".output").scrollTop(1e6)})}function completeShell(e,t){$("iframe#"+t).remove(),Mist.machineShellController.machine.commandHistory.findBy("id",t).set("pendingResponse",!1)}function getTemplate(e){return JS_BUILD||!0?Ember.TEMPLATES[e+"/html"]:(info("Compiling template for: "+e),Ember.Handlebars.compile("text!app/templates/"+e+".html"))}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(a,b){function s(e){var t=e.length,n=o.type(e);return"function"===n||o.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function x(e,t,n){if(o.isFunction(t))return o.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return o.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(w.test(t))return o.filter(t,e,n);t=o.filter(t,e)}return o.grep(e,function(e){return g.call(t,e)>=0!==n})}function D(e,t){while((e=e[t])&&1!==e.nodeType);return e}function G(e){var t=F[e]={};return o.each(e.match(E)||[],function(e,n){t[n]=!0}),t}function I(){m.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),o.ready()}function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=o.expando+Math.random()}function P(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:N.test(n)?o.parseJSON(n):n}catch(i){}M.set(e,t,n)}else n=void 0;return n}function Z(){return!0}function $(){return!1}function _(){try{return m.activeElement}catch(e){}}function jb(e,t){return o.nodeName(e,"table")&&o.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function kb(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function lb(e){var t=gb.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function mb(e,t){for(var n=0,r=e.length;r>n;n++)L.set(e[n],"globalEval",!t||L.get(t[n],"globalEval"))}function nb(e,t){var n,r,i,s,u,a,f,l;if(1===t.nodeType){if(L.hasData(e)&&(s=L.access(e),u=L.set(t,s),l=s.events)){delete u.handle,u.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)o.event.add(t,i,l[i][n])}M.hasData(e)&&(a=M.access(e),f=o.extend({},a),M.set(t,f))}}function ob(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&o.nodeName(e,t)?o.merge([e],n):n}function pb(e,t){var n=t.nodeName.toLowerCase();"input"===n&&T.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function sb(e,t){var n=o(t.createElement(e)).appendTo(t.body),r=a.getDefaultComputedStyle?a.getDefaultComputedStyle(n[0]).display:o.css(n[0],"display");return n.detach(),r}function tb(e){var t=m,n=rb[e];return n||(n=sb(e,t),"none"!==n&&n||(qb=(qb||o("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=qb[0].contentDocument,t.write(),t.close(),n=sb(e,t),qb.detach()),rb[e]=n),n}function xb(e,t,n){var r,i,s,u,a=e.style;return n=n||wb(e),n&&(u=n.getPropertyValue(t)||n[t]),n&&(""!==u||o.contains(e.ownerDocument,e)||(u=o.style(e,t)),vb.test(u)&&ub.test(t)&&(r=a.width,i=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=u,u=n.width,a.width=r,a.minWidth=i,a.maxWidth=s)),void 0!==u?u+"":u}function yb(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function Fb(e,t){if(t in e)return t;var n=t[0].toUpperCase()+t.slice(1),r=t,i=Eb.length;while(i--)if(t=Eb[i]+n,t in e)return t;return r}function Gb(e,t,n){var r=Ab.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Hb(e,t,n,r,i){for(var s=n===(r?"border":"content")?4:"width"===t?1:0,u=0;4>s;s+=2)"margin"===n&&(u+=o.css(e,n+R[s],!0,i)),r?("content"===n&&(u-=o.css(e,"padding"+R[s],!0,i)),"margin"!==n&&(u-=o.css(e,"border"+R[s]+"Width",!0,i))):(u+=o.css(e,"padding"+R[s],!0,i),"padding"!==n&&(u+=o.css(e,"border"+R[s]+"Width",!0,i)));return u}function Ib(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,s=wb(e),u="border-box"===o.css(e,"boxSizing",!1,s);if(0>=i||null==i){if(i=xb(e,t,s),(0>i||null==i)&&(i=e.style[t]),vb.test(i))return i;r=u&&(l.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+Hb(e,t,n||(u?"border":"content"),r,s)+"px"}function Jb(e,t){for(var n,r,i,s=[],u=0,a=e.length;a>u;u++)r=e[u],r.style&&(s[u]=L.get(r,"olddisplay"),n=r.style.display,t?(s[u]||"none"!==n||(r.style.display=""),""===r.style.display&&S(r)&&(s[u]=L.access(r,"olddisplay",tb(r.nodeName)))):s[u]||(i=S(r),(n&&"none"!==n||!i)&&L.set(r,"olddisplay",i?n:o.css(r,"display"))));for(u=0;a>u;u++)r=e[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?s[u]||"":"none"));return e}function Kb(e,t,n,r,i){return new Kb.prototype.init(e,t,n,r,i)}function Sb(){return setTimeout(function(){Lb=void 0}),Lb=o.now()}function Tb(e,t){var n,r=0,i={height:e};for(t=t?1:0;4>r;r+=2-t)n=R[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function Ub(e,t,n){for(var r,i=(Rb[t]||[]).concat(Rb["*"]),s=0,o=i.length;o>s;s++)if(r=i[s].call(n,t,e))return r}function Vb(e,t,n){var r,i,s,u,a,f,l,c=this,h={},p=e.style,d=e.nodeType&&S(e),v=L.get(e,"fxshow");n.queue||(a=o._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,f=a.empty.fire,a.empty.fire=function(){a.unqueued||f()}),a.unqueued++,c.always(function(){c.always(function(){a.unqueued--,o.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],l=o.css(e,"display"),"none"===l&&(l=tb(e.nodeName)),"inline"===l&&"none"===o.css(e,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",c.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Nb.exec(i)){if(delete t[r],s=s||"toggle"===i,i===(d?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;d=!0}h[r]=v&&v[r]||o.style(e,r)}if(!o.isEmptyObject(h)){v?"hidden"in v&&(d=v.hidden):v=L.access(e,"fxshow",{}),s&&(v.hidden=!d),d?o(e).show():c.done(function(){o(e).hide()}),c.done(function(){var t;L.remove(e,"fxshow");for(t in h)o.style(e,t,h[t])});for(r in h)u=Ub(d?v[r]:0,r,c),r in v||(v[r]=u.start,d&&(u.end=u.start,u.start="width"===r||"height"===r?1:0))}}function Wb(e,t){var n,r,i,s,u;for(n in e)if(r=o.camelCase(n),i=t[r],s=e[n],o.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),u=o.cssHooks[r],u&&"expand"in u){s=u.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}function Xb(e,t,n){var r,i,s=0,u=Qb.length,a=o.Deferred().always(function(){delete f.elem}),f=function(){if(i)return!1;for(var t=Lb||Sb(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,s=1-r,o=0,u=l.tweens.length;u>o;o++)l.tweens[o].run(s);return a.notifyWith(e,[l,s,n]),1>s&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:o.extend({},t),opts:o.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Lb||Sb(),duration:n.duration,tweens:[],createTween:function(t,n){var r=o.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),c=l.props;for(Wb(c,l.opts.specialEasing);u>s;s++)if(r=Qb[s].call(l,e,c,l.opts))return r;return o.map(c,Ub,l),o.isFunction(l.opts.start)&&l.opts.start.call(e,l),o.fx.timer(o.extend(f,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function rc(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(E)||[];if(o.isFunction(n))while(r=s[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function sc(e,t,n,r){function u(l){var h;return i[l]=!0,o.each(e[l]||[],function(e,o){var a=o(t,n,r);return"string"!=typeof a||s||i[a]?s?!(h=a):void 0:(t.dataTypes.unshift(a),u(a),!1)}),h}var i={},s=e===oc;return u(t.dataTypes[0])||!i["*"]&&u("*")}function tc(e,t){var n,r,i=o.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&o.extend(!0,e,r),e}function uc(e,t,n){var r,i,s,o,u=e.contents,a=e.dataTypes;while("*"===a[0])a.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in u)if(u[i]&&u[i].test(r)){a.unshift(i);break}if(a[0]in n)s=a[0];else{for(i in n){if(!a[0]||e.converters[i+" "+a[0]]){s=i;break}o||(o=i)}s=s||o}return s?(s!==a[0]&&a.unshift(s),n[s]):void 0}function vc(e,t,n,r){var i,s,o,u,a,f={},l=e.dataTypes.slice();if(l[1])for(o in e.converters)f[o.toLowerCase()]=e.converters[o];s=l.shift();while(s)if(e.responseFields[s]&&(n[e.responseFields[s]]=t),!a&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a=s,s=l.shift())if("*"===s)s=a;else if("*"!==a&&a!==s){if(o=f[a+" "+s]||f["* "+s],!o)for(i in f)if(u=i.split(" "),u[1]===s&&(o=f[a+" "+u[0]]||f["* "+u[0]])){o===!0?o=f[i]:f[i]!==!0&&(s=u[0],l.unshift(u[1]));break}if(o!==!0)if(o&&e["throws"])t=o(t);else try{t=o(t)}catch(c){return{state:"parsererror",error:o?c:"No conversion from "+a+" to "+s}}}return{state:"success",data:t}}function Bc(e,t,n,r){var i;if(o.isArray(t))o.each(t,function(t,i){n||xc.test(e)?r(e,i):Bc(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==o.type(t))r(e,t);else for(i in t)Bc(e+"["+i+"]",t[i],n,r)}function Kc(e){return o.isWindow(e)?e:9===e.nodeType&&e.defaultView}var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m=a.document,n="2.1.0",o=function(e,t){return new o.fn.init(e,t)},p=/^-ms-/,q=/-([\da-z])/gi,r=function(e,t){return t.toUpperCase()};o.fn=o.prototype={jquery:n,constructor:o,selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:d.call(this)},pushStack:function(e){var t=o.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return o.each(this,e,t)},map:function(e){return this.pushStack(o.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},o.extend=o.fn.extend=function(){var e,t,n,r,i,s,u=arguments[0]||{},a=1,f=arguments.length,l=!1;for("boolean"==typeof u&&(l=u,u=arguments[a]||{},a++),"object"==typeof u||o.isFunction(u)||(u={}),a===f&&(u=this,a--);f>a;a++)if(null!=(e=arguments[a]))for(t in e)n=u[t],r=e[t],u!==r&&(l&&r&&(o.isPlainObject(r)||(i=o.isArray(r)))?(i?(i=!1,s=n&&o.isArray(n)?n:[]):s=n&&o.isPlainObject(n)?n:{},u[t]=o.extend(l,s,r)):void 0!==r&&(u[t]=r));return u},o.extend({expando:"jQuery"+(n+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===o.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return e-parseFloat(e)>=0},isPlainObject:function(e){if("object"!==o.type(e)||e.nodeType||o.isWindow(e))return!1;try{if(e.constructor&&!j.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?h[i.call(e)]||"object":typeof e},globalEval:function(a){var b,c=eval;a=o.trim(a),a&&(1===a.indexOf("use strict")?(b=m.createElement("script"),b.text=a,m.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(e){return e.replace(p,"ms-").replace(q,r)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,u=s(e);if(n){if(u){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(u){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":k.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(s(Object(e))?o.merge(n,"string"==typeof e?[e]:e):f.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],s=0,o=e.length,u=!n;o>s;s++)r=!t(e[s],s),r!==u&&i.push(e[s]);return i},map:function(t,n,r){var i,o=0,u=t.length,a=s(t),f=[];if(a)for(;u>o;o++)i=n(t[o],o,r),null!=i&&f.push(i);else for(o in t)i=n(t[o],o,r),null!=i&&f.push(i);return e.apply([],f)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),o.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||o.guid++,i):void 0},now:Date.now,support:l}),o.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){h["[object "+t+"]"]=t.toLowerCase()});var t=function(e){function rt(e,t,r,i){var s,o,u,a,f,h,v,m,w,E;if((t?t.ownerDocument||t:b)!==c&&l(t),t=t||c,r=r||[],!e||"string"!=typeof e)return r;if(1!==(a=t.nodeType)&&9!==a)return[];if(p&&!i){if(s=G.exec(e))if(u=s[1]){if(9===a){if(o=t.getElementById(u),!o||!o.parentNode)return r;if(o.id===u)return r.push(o),r}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(u))&&g(t,o)&&o.id===u)return r.push(o),r}else{if(s[2])return _.apply(r,t.getElementsByTagName(e)),r;if((u=s[3])&&n.getElementsByClassName&&t.getElementsByClassName)return _.apply(r,t.getElementsByClassName(u)),r}if(n.qsa&&(!d||!d.test(e))){if(m=v=y,w=t,E=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){h=dt(e),(v=t.getAttribute("id"))?m=v.replace(Z,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",f=h.length;while(f--)h[f]=m+vt(h[f]);w=Y.test(e)&&ht(t.parentNode)||t,E=h.join(",")}if(E)try{return _.apply(r,w.querySelectorAll(E)),r}catch(S){}finally{v||t.removeAttribute("id")}}}return xt(e.replace(R,"$1"),t,r,i)}function it(){function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function st(e){return e[y]=!0,e}function ot(e){var t=c.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ut(e,t){var n=e.split("|"),i=e.length;while(i--)r.attrHandle[n[i]]=t}function at(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||k)-(~e.sourceIndex||k);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ct(e){return st(function(t){return t=+t,st(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ht(e){return e&&typeof e.getElementsByTagName!==C&&e}function pt(){}function dt(e,t){var n,i,s,o,u,a,f,l=x[e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=r.preFilter;while(u){(!n||(i=U.exec(u)))&&(i&&(u=u.slice(i[0].length)||u),a.push(s=[])),n=!1,(i=z.exec(u))&&(n=i.shift(),s.push({value:n,type:i[0].replace(R," ")}),u=u.slice(n.length));for(o in r.filter)!(i=$[o].exec(u))||f[o]&&!(i=f[o](i))||(n=i.shift(),s.push({value:n,type:o,matches:i}),u=u.slice(n.length));if(!n)break}return t?u.length:u?rt.error(e):x(e,a).slice(0)}function vt(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function mt(e,t,n){var r=t.dir,i=n&&"parentNode"===r,s=E++;return t.first?function(t,n,s){while(t=t[r])if(1===t.nodeType||i)return e(t,n,s)}:function(t,n,o){var u,a,f=[w,s];if(o){while(t=t[r])if((1===t.nodeType||i)&&e(t,n,o))return!0}else while(t=t[r])if(1===t.nodeType||i){if(a=t[y]||(t[y]={}),(u=a[r])&&u[0]===w&&u[1]===s)return f[2]=u[2];if(a[r]=f,f[2]=e(t,n,o))return!0}}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function yt(e,t,n,r,i){for(var s,o=[],u=0,a=e.length,f=null!=t;a>u;u++)(s=e[u])&&(!n||n(s,r,i))&&(o.push(s),f&&t.push(u));return o}function bt(e,t,n,r,i,s){return r&&!r[y]&&(r=bt(r)),i&&!i[y]&&(i=bt(i,s)),st(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||St(t||"*",u.nodeType?[u]:u,[]),m=!e||!s&&t?v:yt(v,h,e,u,a),g=n?i||(s?e:d||r)?[]:o:m;if(n&&n(m,g,u,a),r){f=yt(g,p),r(f,[],u,a),l=f.length;while(l--)(c=f[l])&&(g[p[l]]=!(m[p[l]]=c))}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?P.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=yt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):_.apply(o,g)})}function wt(e){for(var t,n,i,s=e.length,o=r.relative[e[0].type],a=o||r.relative[" "],f=o?1:0,l=mt(function(e){return e===t},a,!0),c=mt(function(e){return P.call(t,e)>-1},a,!0),h=[function(e,n,r){return!o&&(r||n!==u)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];s>f;f++)if(n=r.relative[e[f].type])h=[mt(gt(h),n)];else{if(n=r.filter[e[f].type].apply(null,e[f].matches),n[y]){for(i=++f;s>i;i++)if(r.relative[e[i].type])break;return bt(f>1&&gt(h),f>1&&vt(e.slice(0,f-1).concat({value:" "===e[f-2].type?"*":""})).replace(R,"$1"),n,i>f&&wt(e.slice(f,i)),s>i&&wt(e=e.slice(i)),s>i&&vt(e))}h.push(n)}return gt(h)}function Et(e,t){var n=t.length>0,i=e.length>0,s=function(s,o,a,f,l){var h,p,d,v=0,m="0",g=s&&[],y=[],b=u,E=s||i&&r.find.TAG("*",l),S=w+=null==b?1:Math.random()||.1,x=E.length;for(l&&(u=o!==c&&o);m!==x&&null!=(h=E[m]);m++){if(i&&h){p=0;while(d=e[p++])if(d(h,o,a)){f.push(h);break}l&&(w=S)}n&&((h=!d&&h)&&v--,s&&g.push(h))}if(v+=m,n&&m!==v){p=0;while(d=t[p++])d(g,y,o,a);if(s){if(v>0)while(m--)g[m]||y[m]||(y[m]=O.call(f));y=yt(y)}_.apply(f,y),l&&!s&&y.length>0&&v+t.length>1&&rt.uniqueSort(f)}return l&&(w=S,u=b),g};return n?st(s):s}function St(e,t,n){for(var r=0,i=t.length;i>r;r++)rt(e,t[r],n);return n}function xt(e,t,i,s){var u,a,f,l,c,h=dt(e);if(!s&&1===h.length){if(a=h[0]=h[0].slice(0),a.length>2&&"ID"===(f=a[0]).type&&n.getById&&9===t.nodeType&&p&&r.relative[a[1].type]){if(t=(r.find.ID(f.matches[0].replace(et,tt),t)||[])[0],!t)return i;e=e.slice(a.shift().value.length)}u=$.needsContext.test(e)?0:a.length;while(u--){if(f=a[u],r.relative[l=f.type])break;if((c=r.find[l])&&(s=c(f.matches[0].replace(et,tt),Y.test(a[0].type)&&ht(t.parentNode)||t))){if(a.splice(u,1),e=s.length&&vt(a),!e)return _.apply(i,s),i;break}}}return o(e,h)(s,t,!p,i,Y.test(e)&&ht(t.parentNode)||t),i}var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y="sizzle"+ -(new Date),b=e.document,w=0,E=0,S=it(),x=it(),T=it(),N=function(e,t){return e===t&&(f=!0),0},C="undefined",k=1<<31,L={}.hasOwnProperty,A=[],O=A.pop,M=A.push,_=A.push,D=A.slice,P=A.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",B="[\\x20\\t\\r\\n\\f]",j="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",F=j.replace("w","w#"),I="\\["+B+"*("+j+")"+B+"*(?:([*^$|!~]?=)"+B+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+F+")|)|)"+B+"*\\]",q=":("+j+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+I.replace(3,8)+")*)|.*)\\)|)",R=new RegExp("^"+B+"+|((?:^|[^\\\\])(?:\\\\.)*)"+B+"+$","g"),U=new RegExp("^"+B+"*,"+B+"*"),z=new RegExp("^"+B+"*([>+~]|"+B+")"+B+"*"),W=new RegExp("="+B+"*([^\\]'\"]*?)"+B+"*\\]","g"),X=new RegExp(q),V=new RegExp("^"+F+"$"),$={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),TAG:new RegExp("^("+j.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+B+"*(even|odd|(([+-]|)(\\d*)n|)"+B+"*(?:([+-]|)"+B+"*(\\d+)|))"+B+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+B+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+B+"*((?:-\\d)?\\d*)"+B+"*\\)|)(?=[^-]|$)","i")},J=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,G=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/[+~]/,Z=/'|\\/g,et=new RegExp("\\\\([\\da-f]{1,6}"+B+"?|("+B+")|.)","ig"),tt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{_.apply(A=D.call(b.childNodes),b.childNodes),A[b.childNodes.length].nodeType}catch(nt){_={apply:A.length?function(e,t){M.apply(e,D.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}n=rt.support={},s=rt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},l=rt.setDocument=function(e){var t,i=e?e.ownerDocument||e:b,o=i.defaultView;return i!==c&&9===i.nodeType&&i.documentElement?(c=i,h=i.documentElement,p=!s(i),o&&o!==o.top&&(o.addEventListener?o.addEventListener("unload",function(){l()},!1):o.attachEvent&&o.attachEvent("onunload",function(){l()})),n.attributes=ot(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ot(function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(i.getElementsByClassName)&&ot(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),n.getById=ot(function(e){return h.appendChild(e).id=y,!i.getElementsByName||!i.getElementsByName(y).length}),n.getById?(r.find.ID=function(e,t){if(typeof t.getElementById!==C&&p){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==C&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=n.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==C?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if("*"===e){while(n=s[i++])1===n.nodeType&&r.push(n);return r}return s},r.find.CLASS=n.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==C&&p?t.getElementsByClassName(e):void 0},v=[],d=[],(n.qsa=Q.test(i.querySelectorAll))&&(ot(function(e){e.innerHTML="<select t=''><option selected=''></option></select>",e.querySelectorAll("[t^='']").length&&d.push("[*^$]="+B+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||d.push("\\["+B+"*(?:value|"+H+")"),e.querySelectorAll(":checked").length||d.push(":checked")}),ot(function(e){var t=i.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&d.push("name"+B+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")})),(n.matchesSelector=Q.test(m=h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ot(function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),v.push("!=",q)}),d=d.length&&new RegExp(d.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),g=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&1===r.nodeType&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},N=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===i||e.ownerDocument===b&&g(b,e)?-1:t===i||t.ownerDocument===b&&g(b,t)?1:a?P.call(a,e)-P.call(a,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,s=e.parentNode,o=t.parentNode,u=[e],l=[t];if(!s||!o)return e===i?-1:t===i?1:s?-1:o?1:a?P.call(a,e)-P.call(a,t):0;if(s===o)return at(e,t);n=e;while(n=n.parentNode)u.unshift(n);n=t;while(n=n.parentNode)l.unshift(n);while(u[r]===l[r])r++;return r?at(u[r],l[r]):u[r]===b?-1:l[r]===b?1:0},i):c},rt.matches=function(e,t){return rt(e,null,null,t)},rt.matchesSelector=function(e,t){if((e.ownerDocument||e)!==c&&l(e),t=t.replace(W,"='$1']"),!(!n.matchesSelector||!p||v&&v.test(t)||d&&d.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return rt(t,c,null,[e]).length>0},rt.contains=function(e,t){return(e.ownerDocument||e)!==c&&l(e),g(e,t)},rt.attr=function(e,t){(e.ownerDocument||e)!==c&&l(e);var i=r.attrHandle[t.toLowerCase()],s=i&&L.call(r.attrHandle,t.toLowerCase())?i(e,t,!p):void 0;return void 0!==s?s:n.attributes||!p?e.getAttribute(t):(s=e.getAttributeNode(t))&&s.specified?s.value:null},rt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},rt.uniqueSort=function(e){var t,r=[],i=0,s=0;if(f=!n.detectDuplicates,a=!n.sortStable&&e.slice(0),e.sort(N),f){while(t=e[s++])t===e[s]&&(i=r.push(s));while(i--)e.splice(r[i],1)}return a=null,e},i=rt.getText=function(e){var t,n="",r=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===s||4===s)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},r=rt.selectors={cacheLength:50,createPseudo:st,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||rt.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&rt.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return $.CHILD.test(e[0])?null:(e[3]&&void 0!==e[4]?e[2]=e[4]:n&&X.test(n)&&(t=dt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(et,tt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+B+")"+e+"("+B+"|$)"))&&S(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==C&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=rt.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),b=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v])if(u?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;d=v="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&b){l=m[y]||(m[y]={}),f=l[e]||[],p=f[0]===w&&f[1],h=f[0]===w&&f[2],c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if(1===c.nodeType&&++h&&c===t){l[e]=[w,p,h];break}}else if(b&&(f=(t[y]||(t[y]={}))[e])&&f[0]===w)h=f[1];else while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if((u?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++h&&(b&&((c[y]||(c[y]={}))[e]=[w,h]),c===t))break;return h-=i,h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||rt.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?st(function(e,n){var r,s=i(e,t),o=s.length;while(o--)r=P.call(e,s[o]),e[r]=!(n[r]=s[o])}):function(e){return i(e,0,n)}):i}},pseudos:{not:st(function(e){var t=[],n=[],r=o(e.replace(R,"$1"));return r[y]?st(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)(s=o[u])&&(e[u]=!(t[u]=s))}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:st(function(e){return function(t){return rt(e,t).length>0}}),contains:st(function(e){return function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:st(function(e){return V.test(e||"")||rt.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=p?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===c.activeElement&&(!c.hasFocus||c.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ct(function(){return[0]}),last:ct(function(e,t){return[t-1]}),eq:ct(function(e,t,n){return[0>n?n+t:n]}),even:ct(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:ct(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:ct(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:ct(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},r.pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=ft(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=lt(t);return pt.prototype=r.filters=r.pseudos,r.setFilters=new pt,o=rt.compile=function(e,t){var n,r=[],i=[],s=T[e+" "];if(!s){t||(t=dt(e)),n=t.length;while(n--)s=wt(t[n]),s[y]?r.push(s):i.push(s);s=T(e,Et(i,r))}return s},n.sortStable=y.split("").sort(N).join("")===y,n.detectDuplicates=!!f,l(),n.sortDetached=ot(function(e){return 1&e.compareDocumentPosition(c.createElement("div"))}),ot(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ut("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ot(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ut("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),ot(function(e){return null==e.getAttribute("disabled")})||ut(H,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),rt}(a);o.find=t,o.expr=t.selectors,o.expr[":"]=o.expr.pseudos,o.unique=t.uniqueSort,o.text=t.getText,o.isXMLDoc=t.isXML,o.contains=t.contains;var u=o.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;o.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?o.find.matchesSelector(r,e)?[r]:[]:o.find.matches(e,o.grep(t,function(e){return 1===e.nodeType}))},o.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(o(e).filter(function(){for(t=0;n>t;t++)if(o.contains(i[t],this))return!0}));for(t=0;n>t;t++)o.find(e,i[t],r);return r=this.pushStack(n>1?o.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(x(this,e||[],!1))},not:function(e){return this.pushStack(x(this,e||[],!0))},is:function(e){return!!x(this,"string"==typeof e&&u.test(e)?o(e):e||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=o.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:z.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||y).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof o?t[0]:t,o.merge(this,o.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:m,!0)),v.test(n[1])&&o.isPlainObject(t))for(n in t)o.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=m.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=m,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):o.isFunction(e)?"undefined"!=typeof y.ready?y.ready(e):e(o):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),o.makeArray(e,this))};A.prototype=o.fn,y=o(m);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};o.extend({dir:function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&o(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),o.fn.extend({has:function(e){var t=o(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(o.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,s=[],a=u.test(e)||"string"!=typeof e?o(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&o.find.matchesSelector(n,e))){s.push(n);break}return this.pushStack(s.length>1?o.unique(s):s)},index:function(e){return e?"string"==typeof e?g.call(o(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(o.unique(o.merge(this.get(),o(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),o.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return o.dir(e,"parentNode")},parentsUntil:function(e,t,n){return o.dir(e,"parentNode",n)},next:function(e){return D(e,"nextSibling")},prev:function(e){return D(e,"previousSibling")},nextAll:function(e){return o.dir(e,"nextSibling")},prevAll:function(e){return o.dir(e,"previousSibling")},nextUntil:function(e,t,n){return o.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return o.dir(e,"previousSibling",n)},siblings:function(e){return o.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return o.sibling(e.firstChild)},contents:function(e){return e.contentDocument||o.merge([],e.childNodes)}},function(e,t){o.fn[e]=function(n,r){var i=o.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=o.filter(r,i)),this.length>1&&(C[e]||o.unique(i),B.test(e)&&i.reverse()),this.pushStack(i)}});var E=/\S+/g,F={};o.Callbacks=function(e){e="string"==typeof e?F[e]||G(e):o.extend({},e);var t,n,r,i,s,u,a=[],f=!e.once&&[],l=function(o){for(t=e.memory&&o,n=!0,u=i||0,i=0,s=a.length,r=!0;a&&s>u;u++)if(a[u].apply(o[0],o[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(f?f.length&&l(f.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;!function u(t){o.each(t,function(t,n){var r=o.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&u(n)})}(arguments),r?s=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&o.each(arguments,function(e,t){var n;while((n=o.inArray(t,a,n))>-1)a.splice(n,1),r&&(s>=n&&s--,u>=n&&u--)}),this},has:function(e){return e?o.inArray(e,a)>-1:!!a&&!!a.length},empty:function(){return a=[],s=0,this},disable:function(){return a=f=t=void 0,this},disabled:function(){return!a},lock:function(){return f=void 0,t||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return!a||n&&!f||(t=t||[],t=[e,t.slice?t.slice():t],r?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},o.extend({Deferred:function(e){var t=[["resolve","done",o.Callbacks("once memory"),"resolved"],["reject","fail",o.Callbacks("once memory"),"rejected"],["notify","progress",o.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return o.Deferred(function(n){o.each(t,function(t,s){var u=o.isFunction(e[t])&&e[t];i[s[1]](function(){var e=u&&u.apply(this,arguments);e&&o.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s[0]+"With"](this===r?n.promise():this,u?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?o.extend(e,r):r}},i={};return r.pipe=r.then,o.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[1^e][2].disable,t[2][2].lock),i[s[0]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&o.isFunction(e.promise)?r:0,s=1===i?e:o.Deferred(),u=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},a,f,l;if(r>1)for(a=new Array(r),f=new Array(r),l=new Array(r);r>t;t++)n[t]&&o.isFunction(n[t].promise)?n[t].promise().done(u(t,l,n)).fail(s.reject).progress(u(t,f,a)):--i;return i||s.resolveWith(l,n),s.promise()}});var H;o.fn.ready=function(e){return o.ready.promise().done(e),this},o.extend({isReady:!1,readyWait:1,holdReady:function(e){e?o.readyWait++:o.ready(!0)},ready:function(e){(e===!0?--o.readyWait:o.isReady)||(o.isReady=!0,e!==!0&&--o.readyWait>0||(H.resolveWith(m,[o]),o.fn.trigger&&o(m).trigger("ready").off("ready")))}}),o.ready.promise=function(e){return H||(H=o.Deferred(),"complete"===m.readyState?setTimeout(o.ready):(m.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(e)},o.ready.promise();var J=o.access=function(e,t,n,r,i,s,u){var a=0,f=e.length,l=null==n;if("object"===o.type(n)){i=!0;for(a in n)o.access(e,t,a,n[a],!0,s,u)}else if(void 0!==r&&(i=!0,o.isFunction(r)||(u=!0),l&&(u?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(o(e),n)})),t))for(;f>a;a++)t(e[a],n,u?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):f?t(e[0],n):s};o.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},K.uid=1,K.accepts=o.acceptData,K.prototype={key:function(e){if(!K.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=K.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,o.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),s=this.cache[i];if("string"==typeof t)s[t]=n;else if(o.isEmptyObject(s))o.extend(this.cache[i],t);else for(r in t)s[r]=t[r];return s},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?(r=this.get(e,t),void 0!==r?r:this.get(e,o.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,s=this.key(e),u=this.cache[s];if(void 0===t)this.cache[s]={};else{o.isArray(t)?r=t.concat(t.map(o.camelCase)):(i=o.camelCase(t),t in u?r=[t,i]:(r=i,r=r in u?[r]:r.match(E)||[])),n=r.length;while(n--)delete u[r[n]]}},hasData:function(e){return!o.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;o.extend({hasData:function(e){return M.hasData(e)||L.hasData(e)},data:function(e,t,n){return M.access(e,t,n)},removeData:function(e,t){M.remove(e,t)},_data:function(e,t,n){return L.access(e,t,n)},_removeData:function(e,t){L.remove(e,t)}}),o.fn.extend({data:function(e,t){var n,r,i,s=this[0],u=s&&s.attributes;if(void 0===e){if(this.length&&(i=M.get(s),1===s.nodeType&&!L.get(s,"hasDataAttrs"))){n=u.length;while(n--)r=u[n].name,0===r.indexOf("data-")&&(r=o.camelCase(r.slice(5)),P(s,r,i[r]));L.set(s,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){M.set(this,e)}):J(this,function(t){var n,r=o.camelCase(e);if(s&&void 0===t){if(n=M.get(s,e),void 0!==n)return n;if(n=M.get(s,r),void 0!==n)return n;if(n=P(s,r,void 0),void 0!==n)return n}else this.each(function(){var n=M.get(this,r);M.set(this,r,t),-1!==e.indexOf("-")&&void 0!==n&&M.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){M.remove(this,e)})}}),o.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=L.get(e,t),n&&(!r||o.isArray(n)?r=L.access(e,t,o.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=o.queue(e,t),r=n.length,i=n.shift(),s=o._queueHooks(e,t),u=function(){o.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete s.stop,i.call(e,u,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return L.get(e,n)||L.access(e,n,{empty:o.Callbacks("once memory").add(function(){L.remove(e,[t+"queue",n])})})}}),o.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?o.queue(this[0],e):void 0===t?this:this.each(function(){var n=o.queue(this,e,t);o._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&o.dequeue(this,e)})},dequeue:function(e){return this.each(function(){o.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=o.Deferred(),s=this,u=this.length,a=function(){--r||i.resolveWith(s,[s])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(u--)n=L.get(s[u],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(e,t){return e=t||e,"none"===o.css(e,"display")||!o.contains(e.ownerDocument,e)},T=/^(?:checkbox|radio)$/i;!function(){var e=m.createDocumentFragment(),t=e.appendChild(m.createElement("div"));t.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var U="undefined";l.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;o.event={global:{},add:function(e,t,n,r,i){var s,u,a,f,l,c,h,p,d,v,m,g=L.get(e);if(g){n.handler&&(s=n,n=s.handler,i=s.selector),n.guid||(n.guid=o.guid++),(f=g.events)||(f=g.events={}),(u=g.handle)||(u=g.handle=function(t){return typeof o!==U&&o.event.triggered!==t.type?o.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(E)||[""],l=t.length;while(l--)a=Y.exec(t[l])||[],d=m=a[1],v=(a[2]||"").split(".").sort(),d&&(h=o.event.special[d]||{},d=(i?h.delegateType:h.bindType)||d,h=o.event.special[d]||{},c=o.extend({type:d,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&o.expr.match.needsContext.test(i),namespace:v.join(".")},s),(p=f[d])||(p=f[d]=[],p.delegateCount=0,h.setup&&h.setup.call(e,r,v,u)!==!1||e.addEventListener&&e.addEventListener(d,u,!1)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),o.event.global[d]=!0)}},remove:function(e,t,n,r,i){var s,u,a,f,l,c,h,p,d,v,m,g=L.hasData(e)&&L.get(e);if(g&&(f=g.events)){t=(t||"").match(E)||[""],l=t.length;while(l--)if(a=Y.exec(t[l])||[],d=m=a[1],v=(a[2]||"").split(".").sort(),d){h=o.event.special[d]||{},d=(r?h.delegateType:h.bindType)||d,p=f[d]||[],a=a[2]&&new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=s=p.length;while(s--)c=p[s],!i&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(s,1),c.selector&&p.delegateCount--,h.remove&&h.remove.call(e,c));u&&!p.length&&(h.teardown&&h.teardown.call(e,v,g.handle)!==!1||o.removeEvent(e,d,g.handle),delete f[d])}else for(d in f)o.event.remove(e,d+t[l],n,r,!0);o.isEmptyObject(f)&&(delete g.handle,L.remove(e,"events"))}},trigger:function(e,t,n,r){var i,s,u,f,l,c,h,p=[n||m],d=j.call(e,"type")?e.type:e,v=j.call(e,"namespace")?e.namespace.split("."):[];if(s=u=n=n||m,3!==n.nodeType&&8!==n.nodeType&&!X.test(d+o.event.triggered)&&(d.indexOf(".")>=0&&(v=d.split("."),d=v.shift(),v.sort()),l=d.indexOf(":")<0&&"on"+d,e=e[o.expando]?e:new o.Event(d,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=v.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:o.makeArray(t,[e]),h=o.event.special[d]||{},r||!h.trigger||h.trigger.apply(n,t)!==!1)){if(!r&&!h.noBubble&&!o.isWindow(n)){for(f=h.delegateType||d,X.test(f+d)||(s=s.parentNode);s;s=s.parentNode)p.push(s),u=s;u===(n.ownerDocument||m)&&p.push(u.defaultView||u.parentWindow||a)}i=0;while((s=p[i++])&&!e.isPropagationStopped())e.type=i>1?f:h.bindType||d,c=(L.get(s,"events")||{})[e.type]&&L.get(s,"handle"),c&&c.apply(s,t),c=l&&s[l],c&&c.apply&&o.acceptData(s)&&(e.result=c.apply(s,t),e.result===!1&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||h._default&&h._default.apply(p.pop(),t)!==!1||!o.acceptData(n)||l&&o.isFunction(n[d])&&!o.isWindow(n)&&(u=n[l],u&&(n[l]=null),o.event.triggered=d,n[d](),o.event.triggered=void 0,u&&(n[l]=u)),e.result}},dispatch:function(e){e=o.event.fix(e);var t,n,r,i,s,u=[],a=d.call(arguments),f=(L.get(this,"events")||{})[e.type]||[],l=o.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){u=o.event.handlers.call(this,e,f),t=0;while((i=u[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((s=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(s.namespace))&&(e.handleObj=s,e.data=s.data,r=((o.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,a),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,s,u=[],a=t.delegateCount,f=e.target;if(a&&f.nodeType&&(!e.button||"click"!==e.type))for(;f!==this;f=f.parentNode||this)if(f.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)s=t[n],i=s.selector+" ",void 0===r[i]&&(r[i]=s.needsContext?o(i,this).index(f)>=0:o.find(i,this,null,[f]).length),r[i]&&r.push(s);r.length&&u.push({elem:f,handlers:r})}return a<t.length&&u.push({elem:this,handlers:t.slice(a)}),u},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||m,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===s||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[o.expando])return e;var t,n,r,i=e.type,s=e,u=this.fixHooks[i];u||(this.fixHooks[i]=u=W.test(i)?this.mouseHooks:V.test(i)?this.keyHooks:{}),r=u.props?this.props.concat(u.props):this.props,e=new o.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=m),3===e.target.nodeType&&(e.target=e.target.parentNode),u.filter?u.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&o.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return o.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=o.extend(new o.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?o.event.trigger(i,null,t):o.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},o.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},o.Event=function(e,t){return this instanceof o.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.getPreventDefault&&e.getPreventDefault()?Z:$):this.type=e,t&&o.extend(this,t),this.timeStamp=e&&e.timeStamp||o.now(),void (this[o.expando]=!0)):new o.Event(e,t)},o.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Z,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Z,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z,this.stopPropagation()}},o.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){o.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;return(!i||i!==r&&!o.contains(r,i))&&(e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t),n}}}),l.focusinBubbles||o.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){o.event.simulate(t,e.target,o.event.fix(e),!0)};o.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=L.access(r,t);i||r.addEventListener(e,n,!0),L.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=L.access(r,t)-1;i?L.access(r,t,i):(r.removeEventListener(e,n,!0),L.remove(r,t))}}}),o.fn.extend({on:function(e,t,n,r,i){var s,u;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(u in e)this.on(u,t,n,e[u],i);return this}if(null==n&&null==r?(r=t,n=t=void 0):null==r&&("string"==typeof t?(r=n,n=void 0):(r=n,n=t,t=void 0)),r===!1)r=$;else if(!r)return this;return 1===i&&(s=r,r=function(e){return o().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=o.guid++)),this.each(function(){o.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,o(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=$),this.each(function(){o.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){o.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?o.event.trigger(e,t,n,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td,o.extend({clone:function(e,t,n){var r,i,s,u,a=e.cloneNode(!0),f=o.contains(e.ownerDocument,e);if(!(l.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||o.isXMLDoc(e)))for(u=ob(a),s=ob(e),r=0,i=s.length;i>r;r++)pb(s[r],u[r]);if(t)if(n)for(s=s||ob(e),u=u||ob(a),r=0,i=s.length;i>r;r++)nb(s[r],u[r]);else nb(e,a);return u=ob(a,"script"),u.length>0&&mb(u,!f&&ob(e,"script")),a},buildFragment:function(e,t,n,r){for(var i,s,u,a,f,l,c=t.createDocumentFragment(),h=[],p=0,d=e.length;d>p;p++)if(i=e[p],i||0===i)if("object"===o.type(i))o.merge(h,i.nodeType?[i]:i);else if(cb.test(i)){s=s||c.appendChild(t.createElement("div")),u=(bb.exec(i)||["",""])[1].toLowerCase(),a=ib[u]||ib._default,s.innerHTML=a[1]+i.replace(ab,"<$1></$2>")+a[2],l=a[0];while(l--)s=s.lastChild;o.merge(h,s.childNodes),s=c.firstChild,s.textContent=""}else h.push(t.createTextNode(i));c.textContent="",p=0;while(i=h[p++])if((!r||-1===o.inArray(i,r))&&(f=o.contains(i.ownerDocument,i),s=ob(c.appendChild(i),"script"),f&&mb(s),n)){l=0;while(i=s[l++])fb.test(i.type||"")&&n.push(i)}return c},cleanData:function(e){for(var t,n,r,i,s,u,a=o.event.special,f=0;void 0!==(n=e[f]);f++){if(o.acceptData(n)&&(s=n[L.expando],s&&(t=L.cache[s]))){if(r=Object.keys(t.events||{}),r.length)for(u=0;void 0!==(i=r[u]);u++)a[i]?o.event.remove(n,i):o.removeEvent(n,i,t.handle);L.cache[s]&&delete L.cache[s]}delete M.cache[n[M.expando]]}}}),o.fn.extend({text:function(e){return J(this,function(e){return void 0===e?o.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=jb(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=jb(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?o.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||o.cleanData(ob(n)),n.parentNode&&(t&&o.contains(n.ownerDocument,n)&&mb(ob(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(o.cleanData(ob(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return o.clone(this,e,t)})},html:function(e){return J(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!db.test(e)&&!ib[(bb.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(ab,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(o.cleanData(ob(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,o.cleanData(ob(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(t,n){t=e.apply([],t);var r,i,s,u,a,f,c=0,h=this.length,p=this,d=h-1,v=t[0],m=o.isFunction(v);if(m||h>1&&"string"==typeof v&&!l.checkClone&&eb.test(v))return this.each(function(e){var r=p.eq(e);m&&(t[0]=v.call(this,e,r.html())),r.domManip(t,n)});if(h&&(r=o.buildFragment(t,this[0].ownerDocument,!1,this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(s=o.map(ob(r,"script"),kb),u=s.length;h>c;c++)a=r,c!==d&&(a=o.clone(a,!0,!0),u&&o.merge(s,ob(a,"script"))),n.call(this[c],a,c);if(u)for(f=s[s.length-1].ownerDocument,o.map(s,lb),c=0;u>c;c++)a=s[c],fb.test(a.type||"")&&!L.access(a,"globalEval")&&o.contains(f,a)&&(a.src?o._evalUrl&&o._evalUrl(a.src):o.globalEval(a.textContent.replace(hb,"")))}return this}}),o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){o.fn[e]=function(e){for(var n,r=[],i=o(e),s=i.length-1,u=0;s>=u;u++)n=u===s?this:this.clone(!0),o(i[u])[t](n),f.apply(r,n.get());return this.pushStack(r)}});var qb,rb={},ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};!function(){function u(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",r.appendChild(i);var n=a.getComputedStyle(s,null);e="1%"!==n.top,t="4px"===n.width,r.removeChild(i)}var e,t,n="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",r=m.documentElement,i=m.createElement("div"),s=m.createElement("div");s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===s.style.backgroundClip,i.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",i.appendChild(s),a.getComputedStyle&&o.extend(l,{pixelPosition:function(){return u(),e},boxSizingReliable:function(){return null==t&&u(),t},reliableMarginRight:function(){var e,t=s.appendChild(m.createElement("div"));return t.style.cssText=s.style.cssText=n,t.style.marginRight=t.style.width="0",s.style.width="1px",r.appendChild(i),e=!parseFloat(a.getComputedStyle(t,null).marginRight),r.removeChild(i),s.innerHTML="",e}})}(),o.swap=function(e,t,n,r){var i,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];i=n.apply(e,r||[]);for(s in t)e.style[s]=o[s];return i};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:0,fontWeight:400},Eb=["Webkit","O","Moz","ms"];o.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=xb(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,s,u,a=o.camelCase(t),f=e.style;return t=o.cssProps[a]||(o.cssProps[a]=Fb(f,a)),u=o.cssHooks[t]||o.cssHooks[a],void 0===n?u&&"get"in u&&void 0!==(i=u.get(e,!1,r))?i:f[t]:(s=typeof n,"string"===s&&(i=Bb.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(o.css(e,t)),s="number"),null!=n&&n===n&&("number"!==s||o.cssNumber[a]||(n+="px"),l.clearCloneStyle||""!==n||0!==t.indexOf("background")||(f[t]="inherit"),u&&"set"in u&&void 0===(n=u.set(e,n,r))||(f[t]="",f[t]=n)),void 0)}},css:function(e,t,n,r){var i,s,u,a=o.camelCase(t);return t=o.cssProps[a]||(o.cssProps[a]=Fb(e.style,a)),u=o.cssHooks[t]||o.cssHooks[a],u&&"get"in u&&(i=u.get(e,!0,n)),void 0===i&&(i=xb(e,t,r)),"normal"===i&&t in Db&&(i=Db[t]),""===n||n?(s=parseFloat(i),n===!0||o.isNumeric(s)?s||0:i):i}}),o.each(["height","width"],function(e,t){o.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&zb.test(o.css(e,"display"))?o.swap(e,Cb,function(){return Ib(e,t,r)}):Ib(e,t,r):void 0},set:function(e,n,r){var i=r&&wb(e);return Gb(e,n,r?Hb(e,t,r,"border-box"===o.css(e,"boxSizing",!1,i),i):0)}}}),o.cssHooks.marginRight=yb(l.reliableMarginRight,function(e,t){return t?o.swap(e,{display:"inline-block"},xb,[e,"marginRight"]):void 0}),o.each({margin:"",padding:"",border:"Width"},function(e,t){o.cssHooks[e+t]={expand:function(n){for(var r=0,i={},s="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+R[r]+t]=s[r]||s[r-2]||s[0];return i}},ub.test(e)||(o.cssHooks[e+t].set=Gb)}),o.fn.extend({css:function(e,t){return J(this,function(e,t,n){var r,i,s={},u=0;if(o.isArray(t)){for(r=wb(e),i=t.length;i>u;u++)s[t[u]]=o.css(e,t[u],!1,r);return s}return void 0!==n?o.style(e,t,n):o.css(e,t)},e,t,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){S(this)?o(this).show():o(this).hide()})}}),o.Tween=Kb,Kb.prototype={constructor:Kb,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(o.cssNumber[n]?"":"px")},cur:function(){var e=Kb.propHooks[this.prop];return e&&e.get?e.get(this):Kb.propHooks._default.get(this)},run:function(e){var t,n=Kb.propHooks[this.prop];return this.pos=t=this.options.duration?o.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=o.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){o.fx.step[e.prop]?o.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[o.cssProps[e.prop]]||o.cssHooks[e.prop])?o.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},o.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},o.fx=Kb.prototype.init,o.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Ob.exec(t),s=i&&i[3]||(o.cssNumber[e]?"":"px"),u=(o.cssNumber[e]||"px"!==s&&+r)&&Ob.exec(o.css(n.elem,e)),a=1,f=20;if(u&&u[3]!==s){s=s||u[3],i=i||[],u=+r||1;do a=a||".5",u/=a,o.style(n.elem,e,u+s);while(a!==(a=n.cur()/r)&&1!==a&&--f)}return i&&(u=n.start=+u||+r||0,n.unit=s,n.end=i[1]?u+(i[1]+1)*i[2]:+i[2]),n}]};o.Animation=o.extend(Xb,{tweener:function(e,t){o.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],Rb[n]=Rb[n]||[],Rb[n].unshift(t)},prefilter:function(e,t){t?Qb.unshift(e):Qb.push(e)}}),o.speed=function(e,t,n){var r=e&&"object"==typeof e?o.extend({},e):{complete:n||!n&&t||o.isFunction(e)&&e,duration:e,easing:n&&t||t&&!o.isFunction(t)&&t};return r.duration=o.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in o.fx.speeds?o.fx.speeds[r.duration]:o.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){o.isFunction(r.old)&&r.old.call(this),r.queue&&o.dequeue(this,r.queue)},r},o.fn.extend({fadeTo:function(e,t,n,r){return this.filter(S).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=o.isEmptyObject(e),s=o.speed(t,n,r),u=function(){var t=Xb(this,o.extend({},e),s);(i||L.get(this,"finish"))&&t.stop(!0)};return u.finish=u,i||s.queue===!1?this.each(u):this.queue(s.queue,u)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",s=o.timers,u=L.get(this);if(i)u[i]&&u[i].stop&&r(u[i]);else for(i in u)u[i]&&u[i].stop&&Pb.test(i)&&r(u[i]);for(i=s.length;i--;)s[i].elem!==this||null!=e&&s[i].queue!==e||(s[i].anim.stop(n),t=!1,s.splice(i,1));(t||!n)&&o.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=L.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],s=o.timers,u=r?r.length:0;for(n.finish=!0,o.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;u>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),o.each(["toggle","show","hide"],function(e,t){var n=o.fn[t];o.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(Tb(t,!0),e,r,i)}}),o.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){o.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),o.timers=[],o.fx.tick=function(){var e,t=0,n=o.timers;for(Lb=o.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||o.fx.stop(),Lb=void 0},o.fx.timer=function(e){o.timers.push(e),e()?o.fx.start():o.timers.pop()},o.fx.interval=13,o.fx.start=function(){Mb||(Mb=setInterval(o.fx.tick,o.fx.interval))},o.fx.stop=function(){clearInterval(Mb),Mb=null},o.fx.speeds={slow:600,fast:200,_default:400},o.fn.delay=function(e,t){return e=o.fx?o.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},function(){var e=m.createElement("input"),t=m.createElement("select"),n=t.appendChild(m.createElement("option"));e.type="checkbox",l.checkOn=""!==e.value,l.optSelected=n.selected,t.disabled=!0,l.optDisabled=!n.disabled,e=m.createElement("input"),e.value="t",e.type="radio",l.radioValue="t"===e.value}();var Yb,Zb,$b=o.expr.attrHandle;o.fn.extend({attr:function(e,t){return J(this,o.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){o.removeAttr(this,e)})}}),o.extend({attr:function(e,t,n){var r,i,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===U?o.prop(e,t,n):(1===s&&o.isXMLDoc(e)||(t=t.toLowerCase(),r=o.attrHooks[t]||(o.expr.match.bool.test(t)?Zb:Yb)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=o.find.attr(e,t),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void o.removeAttr(e,t))},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(E);if(s&&1===e.nodeType)while(n=s[i++])r=o.propFix[n]||n,o.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!l.radioValue&&"radio"===t&&o.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),Zb={set:function(e,t,n){return t===!1?o.removeAttr(e,n):e.setAttribute(n,n),n}},o.each(o.expr.match.bool.source.match(/\w+/g),function(e,t){var n=$b[t]||o.find.attr;$b[t]=function(e,t,r){var i,s;return r||(s=$b[t],$b[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,$b[t]=s),i}});var _b=/^(?:input|select|textarea|button)$/i;o.fn.extend({prop:function(e,t){return J(this,o.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[o.propFix[e]||e]})}}),o.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return s=1!==u||!o.isXMLDoc(e),s&&(t=o.propFix[t]||t,i=o.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||_b.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),l.optSelected||(o.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),o.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){o.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;o.fn.extend({addClass:function(e){var t,n,r,i,s,u,a="string"==typeof e&&e,f=0,l=this.length;if(o.isFunction(e))return this.each(function(t){o(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(E)||[];l>f;f++)if(n=this[f],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ac," "):" ")){s=0;while(i=t[s++])r.indexOf(" "+i+" ")<0&&(r+=i+" ");u=o.trim(r),n.className!==u&&(n.className=u)}return this},removeClass:function(e){var t,n,r,i,s,u,a=0===arguments.length||"string"==typeof e&&e,f=0,l=this.length;if(o.isFunction(e))return this.each(function(t){o(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(E)||[];l>f;f++)if(n=this[f],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ac," "):"")){s=0;while(i=t[s++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");u=e?o.trim(r):"",n.className!==u&&(n.className=u)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(o.isFunction(e)?function(n){o(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n){var t,r=0,i=o(this),s=e.match(E)||[];while(t=s[r++])i.hasClass(t)?i.removeClass(t):i.addClass(t)}else(n===U||"boolean"===n)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||e===!1?"":L.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(ac," ").indexOf(t)>=0)return!0;return!1}});var bc=/\r/g;o.fn.extend({val:function(e){var t,n,r,i=this[0];if(arguments.length)return r=o.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,o(this).val()):e,null==i?i="":"number"==typeof i?i+="":o.isArray(i)&&(i=o.map(i,function(e){return null==e?"":e+""})),t=o.valHooks[this.type]||o.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=o.valHooks[i.type]||o.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(bc,""):null==n?"":n)}}),o.extend({valHooks:{select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,s="select-one"===e.type||0>i,u=s?null:[],a=s?i+1:r.length,f=0>i?a:s?i:0;a>f;f++)if(n=r[f],!(!n.selected&&f!==i||(l.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&o.nodeName(n.parentNode,"optgroup"))){if(t=o(n).val(),s)return t;u.push(t)}return u},set:function(e,t){var n,r,i=e.options,s=o.makeArray(t),u=i.length;while(u--)r=i[u],(r.selected=o.inArray(o(r).val(),s)>=0)&&(n=!0);return n||(e.selectedIndex=-1),s}}}}),o.each(["radio","checkbox"],function(){o.valHooks[this]={set:function(e,t){return o.isArray(t)?e.checked=o.inArray(o(e).val(),t)>=0:void 0}},l.checkOn||(o.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),o.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){o.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),o.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var cc=o.now(),dc=/\?/;o.parseJSON=function(e){return JSON.parse(e+"")},o.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&o.error("Invalid XML: "+e),t};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=m.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[],o.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":o.parseJSON,"text xml":o.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?tc(tc(e,o.ajaxSettings),t):tc(o.ajaxSettings,e)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(e,t){function T(e,t,s,a){var l,g,y,w,E,x=t;2!==b&&(b=2,u&&clearTimeout(u),n=void 0,i=a||"",S.readyState=e>0?4:0,l=e>=200&&300>e||304===e,s&&(w=uc(c,S,s)),w=vc(c,w,S,l),l?(c.ifModified&&(E=S.getResponseHeader("Last-Modified"),E&&(o.lastModified[r]=E),E=S.getResponseHeader("etag"),E&&(o.etag[r]=E)),204===e||"HEAD"===c.type?x="nocontent":304===e?x="notmodified":(x=w.state,g=w.data,y=w.error,l=!y)):(y=x,(e||!x)&&(x="error",0>e&&(e=0))),S.status=e,S.statusText=(t||x)+"",l?d.resolveWith(h,[g,x,S]):d.rejectWith(h,[S,x,y]),S.statusCode(m),m=void 0,f&&p.trigger(l?"ajaxSuccess":"ajaxError",[S,c,l?g:y]),v.fireWith(h,[S,x]),f&&(p.trigger("ajaxComplete",[S,c]),--o.active||o.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r,i,s,u,a,f,l,c=o.ajaxSetup({},t),h=c.context||c,p=c.context&&(h.nodeType||h.jquery)?o(h):o.event,d=o.Deferred(),v=o.Callbacks("once memory"),m=c.statusCode||{},g={},y={},b=0,w="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!s){s={};while(t=ic.exec(i))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,g[e]=t),this},overrideMimeType:function(e){return b||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else S.always(e[S.status]);return this},abort:function(e){var t=e||w;return n&&n.abort(t),T(0,t),this}};if(d.promise(S).complete=v.add,S.success=S.done,S.error=S.fail,c.url=((e||c.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=o.trim(c.dataType||"*").toLowerCase().match(E)||[""],null==c.crossDomain&&(a=mc.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ec[1]&&a[2]===ec[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=o.param(c.data,c.traditional)),sc(nc,c,t,S),2===b)return S;f=c.global,f&&0===o.active++&&o.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!kc.test(c.type),r=c.url,c.hasContent||(c.data&&(r=c.url+=(dc.test(r)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=hc.test(r)?r.replace(hc,"$1_="+cc++):r+(dc.test(r)?"&":"?")+"_="+cc++)),c.ifModified&&(o.lastModified[r]&&S.setRequestHeader("If-Modified-Since",o.lastModified[r]),o.etag[r]&&S.setRequestHeader("If-None-Match",o.etag[r])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&S.setRequestHeader("Content-Type",c.contentType),S.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+pc+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)S.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,S,c)!==!1&&2!==b){w="abort";for(l in{success:1,error:1,complete:1})S[l](c[l]);if(n=sc(oc,c,t,S)){S.readyState=1,f&&p.trigger("ajaxSend",[S,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){S.abort("timeout")},c.timeout));try{b=1,n.send(g,T)}catch(x){if(!(2>b))throw x;T(-1,x)}}else T(-1,"No Transport");return S}return S.abort()},getJSON:function(e,t,n){return o.get(e,t,n,"json")},getScript:function(e,t){return o.get(e,void 0,t,"script")}}),o.each(["get","post"],function(e,t){o[t]=function(e,n,r,i){return o.isFunction(n)&&(i=i||r,r=n,n=void 0),o.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),o.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){o.fn[t]=function(e){return this.on(t,e)}}),o._evalUrl=function(e){return o.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},o.fn.extend({wrapAll:function(e){var t;return o.isFunction(e)?this.each(function(t){o(this).wrapAll(e.call(this,t))}):(this[0]&&(t=o(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return this.each(o.isFunction(e)?function(t){o(this).wrapInner(e.call(this,t))}:function(){var t=o(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=o.isFunction(e);return this.each(function(n){o(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){o.nodeName(this,"body")||o(this).replaceWith(this.childNodes)}).end()}}),o.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},o.expr.filters.visible=function(e){return!o.expr.filters.hidden(e)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;o.param=function(e,t){var n,r=[],i=function(e,t){t=o.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=o.ajaxSettings&&o.ajaxSettings.traditional),o.isArray(e)||e.jquery&&!o.isPlainObject(e))o.each(e,function(){i(this.name,this.value)});else for(n in e)Bc(n,e[n],t,i);return r.join("&").replace(wc,"+")},o.fn.extend({serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=o.prop(this,"elements");return e?o.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!o(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(e)&&(this.checked||!T.test(e))}).map(function(e,t){var n=o(this).val();return null==n?null:o.isArray(n)?o.map(n,function(e){return{name:t.name,value:e.replace(yc,"\r\n")}}):{name:t.name,value:n.replace(yc,"\r\n")}}).get()}}),o.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=o.ajaxSettings.xhr();a.ActiveXObject&&o(a).on("unload",function(){for(var e in Dc)Dc[e]()}),l.cors=!!Fc&&"withCredentials"in Fc,l.ajax=Fc=!!Fc,o.ajaxTransport(function(e){var t;return l.cors||Fc&&!e.crossDomain?{send:function(n,r){var i,s=e.xhr(),o=++Cc;if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)s[i]=e.xhrFields[i];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)s.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete Dc[o],t=s.onload=s.onerror=null,"abort"===e?s.abort():"error"===e?r(s.status,s.statusText):r(Ec[s.status]||s.status,s.statusText,"string"==typeof s.responseText?{text:s.responseText}:void 0,s.getAllResponseHeaders()))}},s.onload=t(),s.onerror=t("error"),t=Dc[o]=t("abort"),s.send(e.hasContent&&e.data||null)},abort:function(){t&&t()}}:void 0}),o.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return o.globalEval(e),e}}}),o.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),o.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=o("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),m.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;o.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gc.pop()||o.expando+"_"+cc++;return this[e]=!0,e}}),o.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,s,u=e.jsonp!==!1&&(Hc.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(e.data)&&"data");return u||"jsonp"===e.dataTypes[0]?(r=e.jsonpCallback=o.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,u?e[u]=e[u].replace(Hc,"$1"+r):e.jsonp!==!1&&(e.url+=(dc.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||o.error(r+" was not called"),s[0]},e.dataTypes[0]="json",i=a[r],a[r]=function(){s=arguments},n.always(function(){a[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gc.push(r)),s&&o.isFunction(i)&&i(s[0]),s=i=void 0}),"script"):void 0}),o.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||m;var r=v.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=o.buildFragment([e],t,i),i&&i.length&&o(i).remove(),o.merge([],r.childNodes))};var Ic=o.fn.load;o.fn.load=function(e,t,n){if("string"!=typeof e&&Ic)return Ic.apply(this,arguments);var r,i,s,u=this,a=e.indexOf(" ");return a>=0&&(r=e.slice(a),e=e.slice(0,a)),o.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),u.length>0&&o.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){s=arguments,u.html(r?o("<div>").append(o.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){u.each(n,s||[e.responseText,t,e])}),this},o.expr.filters.animated=function(e){return o.grep(o.timers,function(t){return e===t.elem}).length};var Jc=a.document.documentElement;o.offset={setOffset:function(e,t,n){var r,i,s,u,a,f,l,c=o.css(e,"position"),h=o(e),p={};"static"===c&&(e.style.position="relative"),a=h.offset(),s=o.css(e,"top"),f=o.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(s+f).indexOf("auto")>-1,l?(r=h.position(),u=r.top,i=r.left):(u=parseFloat(s)||0,i=parseFloat(f)||0),o.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(p.top=t.top-a.top+u),null!=t.left&&(p.left=t.left-a.left+i),"using"in t?t.using.call(e,p):h.css(p)}},o.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){o.offset.setOffset(this,e,t)});var t,n,r=this[0],i={top:0,left:0},s=r&&r.ownerDocument;if(s)return t=s.documentElement,o.contains(t,r)?(typeof r.getBoundingClientRect!==U&&(i=r.getBoundingClientRect()),n=Kc(s),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===o.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),o.nodeName(e[0],"html")||(r=e.offset()),r.top+=o.css(e[0],"borderTopWidth",!0),r.left+=o.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-o.css(n,"marginTop",!0),left:t.left-r.left-o.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||Jc;while(e&&!o.nodeName(e,"html")&&"static"===o.css(e,"position"))e=e.offsetParent;return e||Jc})}}),o.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;o.fn[e]=function(r){return J(this,function(e,r,i){var s=Kc(e);return void 0===i?s?s[t]:e[r]:void (s?s.scrollTo(n?a.pageXOffset:i,n?i:a.pageYOffset):e[r]=i)},e,r,arguments.length,null)}}),o.each(["top","left"],function(e,t){o.cssHooks[t]=yb(l.pixelPosition,function(e,n){return n?(n=xb(e,t),vb.test(n)?o(e).position()[t]+"px":n):void 0})}),o.each({Height:"height",Width:"width"},function(e,t){o.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){o.fn[r]=function(r,i){var s=arguments.length&&(n||"boolean"!=typeof r),u=n||(r===!0||i===!0?"margin":"border");return J(this,function(t,n,r){var i;return o.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?o.css(t,n,u):o.style(t,n,r,u)},t,s?r:void 0,s,null)}})}),o.fn.size=function(){return this.length},o.fn.andSelf=o.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return o});var Lc=a.jQuery,Mc=a.$;return o.noConflict=function(e){return a.$===o&&(a.$=Mc),e&&a.jQuery===o&&(a.jQuery=Lc),o},typeof b===U&&(a.jQuery=a.$=o),o}),!function(){function e(e){return null!=e&&!isNaN(e)}function t(e){return e.length}function n(e){for(var t=1;e*t%1;)t*=10;return t}function r(e,t){try{for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}catch(r){e.prototype=t}}function i(){}function s(e){return au+e in this}function o(e){return e=au+e,e in this&&delete this[e]}function u(){var e=[];return this.forEach(function(t){e.push(t)}),e}function a(){var e=0;for(var t in this)t.charCodeAt(0)===fu&&++e;return e}function f(){for(var e in this)if(e.charCodeAt(0)===fu)return!1;return!0}function l(){}function c(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function h(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var n=0,r=lu.length;r>n;++n){var i=lu[n]+t;if(i in e)return i}}function p(){}function d(){}function v(e){function t(){for(var t,r=n,i=-1,s=r.length;++i<s;)(t=r[i].on)&&t.apply(this,arguments);return e}var n=[],r=new i;return t.on=function(t,i){var s,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,n=n.slice(0,s=n.indexOf(o)).concat(n.slice(s+1)),r.remove(t)),i&&n.push(r.set(t,{on:i})),e)},t}function m(){$o.event.preventDefault()}function g(){for(var e,t=$o.event;e=t.sourceEvent;)t=e;return t}function y(e){for(var t=new d,n=0,r=arguments.length;++n<r;)t[arguments[n]]=v(t);return t.of=function(n,r){return function(i){try{var s=i.sourceEvent=$o.event;i.target=e,$o.event=i,t[i.type].apply(n,r)}finally{$o.event=s}}},t}function b(e){return hu(e,gu),e}function w(e){return"function"==typeof e?e:function(){return pu(e,this)}}function E(e){return"function"==typeof e?e:function(){return du(e,this)}}function S(e,t){function n(){this.removeAttribute(e)}function r(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,t)}function s(){this.setAttributeNS(e.space,e.local,t)}function o(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}function u(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=$o.ns.qualify(e),null==t?e.local?r:n:"function"==typeof t?e.local?u:o:e.local?s:i}function x(e){return e.trim().replace(/\s+/g," ")}function T(e){return new RegExp("(?:^|\\s+)"+$o.requote(e)+"(?:\\s+|$)","g")}function N(e){return e.trim().split(/^|\s+/)}function C(e,t){function n(){for(var n=-1;++n<i;)e[n](this,t)}function r(){for(var n=-1,r=t.apply(this,arguments);++n<i;)e[n](this,r)}e=N(e).map(k);var i=e.length;return"function"==typeof t?r:n}function k(e){var t=T(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||n.setAttribute("class",x(i+" "+e))):n.setAttribute("class",x(i.replace(t," ")))}}function L(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function s(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}return null==t?r:"function"==typeof t?s:i}function A(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}return null==t?n:"function"==typeof t?i:r}function O(e){return"function"==typeof e?e:(e=$o.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,e)}}function M(e){return{__data__:e}}function _(e){return function(){return mu(this,e)}}function D(e){return arguments.length||(e=$o.ascending),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function P(e,t){for(var n=0,r=e.length;r>n;n++)for(var i,s=e[n],o=0,u=s.length;u>o;o++)(i=s[o])&&t(i,o,n);return e}function H(e){return hu(e,bu),e}function B(e){var t,n;return function(r,i,s){var o,u=e[s].update,a=u.length;for(s!=n&&(n=s,t=0),i>=t&&(t=i+1);!(o=u[t])&&++t<a;);return o}}function j(){var e=this.__transition__;e&&++e.active}function F(e,t,n){function r(){var t=this[o];t&&(this.removeEventListener(e,t,t.$),delete this[o])}function i(){var i=a(t,Ko(arguments));r.call(this),this.addEventListener(e,this[o]=i,i.$=n),i._=t}function s(){var t,n=new RegExp("^__on([^.]+)"+$o.requote(e)+"$");for(var r in this)if(t=r.match(n)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}var o="__on"+e,u=e.indexOf("."),a=I;u>0&&(e=e.substring(0,u));var f=Eu.get(e);return f&&(e=f,a=q),u?t?i:r:t?p:s}function I(e,t){return function(n){var r=$o.event;$o.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{$o.event=r}}}function q(e,t){var n=I(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function R(){var e=".dragsuppress-"+ ++xu,t="click"+e,n=$o.select(Yo).on("touchmove"+e,m).on("dragstart"+e,m).on("selectstart"+e,m);if(Su){var r=Go.style,i=r[Su];r[Su]="none"}return function(s){function o(){n.on(t,null)}n.on(e,null),Su&&(r[Su]=i),s&&(n.on(t,function(){m(),o()},!0),setTimeout(o,0))}}function U(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(0>Tu&&(Yo.scrollX||Yo.scrollY)){n=$o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=n[0][0].getScreenCTM();Tu=!i.f&&!i.e,n.remove()}return Tu?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function z(e){return e>0?1:0>e?-1:0}function W(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function X(e){return e>1?0:-1>e?Nu:Math.acos(e)}function V(e){return e>1?ku:-1>e?-ku:Math.asin(e)}function $(e){return((e=Math.exp(e))-1/e)/2}function J(e){return((e=Math.exp(e))+1/e)/2}function K(e){return((e=Math.exp(2*e))-1)/(e+1)}function Q(e){return(e=Math.sin(e/2))*e}function G(){}function Y(e,t,n){return new Z(e,t,n)}function Z(e,t,n){this.h=e,this.s=t,this.l=n}function et(e,t,n){function r(e){return e>360?e-=360:0>e&&(e+=360),60>e?s+(o-s)*e/60:180>e?o:240>e?s+(o-s)*(240-e)/60:s}function i(e){return Math.round(255*r(e))}var s,o;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:0>t?0:t>1?1:t,n=0>n?0:n>1?1:n,o=.5>=n?n*(1+t):n+t-n*t,s=2*n-o,pt(i(e+120),i(e),i(e-120))}function tt(e,t,n){return new nt(e,t,n)}function nt(e,t,n){this.h=e,this.c=t,this.l=n}function rt(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),it(n,Math.cos(e*=Ou)*t,Math.sin(e)*t)}function it(e,t,n){return new st(e,t,n)}function st(e,t,n){this.l=e,this.a=t,this.b=n}function ot(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;return i=at(i)*Ru,r=at(r)*Uu,s=at(s)*zu,pt(lt(3.2404542*i-1.5371385*r-.4985314*s),lt(-0.969266*i+1.8760108*r+.041556*s),lt(.0556434*i-.2040259*r+1.0572252*s))}function ut(e,t,n){return e>0?tt(Math.atan2(n,t)*Mu,Math.sqrt(t*t+n*n),e):tt(0/0,0/0,e)}function at(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function ft(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function lt(e){return Math.round(255*(.00304>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ct(e){return pt(e>>16,255&e>>8,255&e)}function ht(e){return ct(e)+""}function pt(e,t,n){return new dt(e,t,n)}function dt(e,t,n){this.r=e,this.g=t,this.b=n}function vt(e){return 16>e?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function mt(e,t,n){var r,i,s,o=0,u=0,a=0;if(r=/([a-z]+)\((.*)\)/i.exec(e))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(wt(i[0]),wt(i[1]),wt(i[2]))}return(s=Vu.get(e))?t(s.r,s.g,s.b):(null!=e&&"#"===e.charAt(0)&&(4===e.length?(o=e.charAt(1),o+=o,u=e.charAt(2),u+=u,a=e.charAt(3),a+=a):7===e.length&&(o=e.substring(1,3),u=e.substring(3,5),a=e.substring(5,7)),o=parseInt(o,16),u=parseInt(u,16),a=parseInt(a,16)),t(o,u,a))}function gt(e,t,n){var r,i,s=Math.min(e/=255,t/=255,n/=255),o=Math.max(e,t,n),u=o-s,a=(o+s)/2;return u?(i=.5>a?u/(o+s):u/(2-o-s),r=e==o?(t-n)/u+(n>t?6:0):t==o?(n-e)/u+2:(e-t)/u+4,r*=60):(r=0/0,i=a>0&&1>a?0:r),Y(r,i,a)}function yt(e,t,n){e=bt(e),t=bt(t),n=bt(n);var r=ft((.4124564*e+.3575761*t+.1804375*n)/Ru),i=ft((.2126729*e+.7151522*t+.072175*n)/Uu),s=ft((.0193339*e+.119192*t+.9503041*n)/zu);return it(116*i-16,500*(r-i),200*(i-s))}function bt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function wt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function Et(e){return"function"==typeof e?e:function(){return e}}function St(e){return e}function xt(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Tt(t,n,e,r)}}function Tt(e,t,n,r){function i(){var e,t=a.status;if(!t&&a.responseText||t>=200&&300>t||304===t){try{e=n.call(s,a)}catch(r){return o.error.call(s,r),void 0}o.load.call(s,e)}else o.error.call(s,a)}var s={},o=$o.dispatch("beforesend","progress","load","error"),u={},a=new XMLHttpRequest,f=null;return!Yo.XDomainRequest||"withCredentials"in a||!/^(http(s)?:)?\/\//.test(e)||(a=new XDomainRequest),"onload"in a?a.onload=a.onerror=i:a.onreadystatechange=function(){a.readyState>3&&i()},a.onprogress=function(e){var t=$o.event;$o.event=e;try{o.progress.call(s,a)}finally{$o.event=t}},s.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?u[e]:(null==t?delete u[e]:u[e]=t+"",s)},s.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",s):t},s.responseType=function(e){return arguments.length?(f=e,s):f},s.response=function(e){return n=e,s},["get","post"].forEach(function(e){s[e]=function(){return s.send.apply(s,[e].concat(Ko(arguments)))}}),s.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),a.open(n,e,!0),null==t||"accept"in u||(u.accept=t+",*/*"),a.setRequestHeader)for(var l in u)a.setRequestHeader(l,u[l]);return null!=t&&a.overrideMimeType&&a.overrideMimeType(t),null!=f&&(a.responseType=f),null!=i&&s.on("error",i).on("load",function(e){i(null,e)}),o.beforesend.call(s,a),a.send(null==r?null:r),s},s.abort=function(){return a.abort(),s},$o.rebind(s,o,"on"),null==r?s:s.get(Nt(r))}function Nt(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function Ct(){var e=kt(),t=Lt()-e;t>24?(isFinite(t)&&(clearTimeout(Qu),Qu=setTimeout(Ct,t)),Ku=0):(Ku=1,Yu(Ct))}function kt(){var e=Date.now();for(Gu=$u;Gu;)e>=Gu.t&&(Gu.f=Gu.c(e-Gu.t)),Gu=Gu.n;return e}function Lt(){for(var e,t=$u,n=1/0;t;)t.f?t=e?e.n=t.n:$u=t.n:(t.t<n&&(n=t.t),t=(e=t).n);return Ju=e,n}function At(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function Ot(e,t){var n=Math.pow(10,3*uu(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Mt(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,s=r?function(e){for(var t=e.length,i=[],s=0,o=r[0];t>0&&o>0;)i.push(e.substring(t-=o,t+o)),o=r[s=(s+1)%r.length];return i.reverse().join(n)}:St;return function(e){var n=ea.exec(e),r=n[1]||" ",o=n[2]||">",u=n[3]||"",a=n[4]||"",f=n[5],l=+n[6],c=n[7],h=n[8],p=n[9],d=1,v="",m="",g=!1;switch(h&&(h=+h.substring(1)),(f||"0"===r&&"="===o)&&(f=r="0",o="=",c&&(l-=Math.floor((l-1)/4))),p){case"n":c=!0,p="g";break;case"%":d=100,m="%",p="f";break;case"p":d=100,m="%",p="r";break;case"b":case"o":case"x":case"X":"#"===a&&(v="0"+p.toLowerCase());case"c":case"d":g=!0,h=0;break;case"s":d=-1,p="r"}"$"===a&&(v=i[0],m=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):("e"==p||"f"==p)&&(h=Math.max(0,Math.min(20,h)))),p=ta.get(p)||_t;var y=f&&c;return function(e){var n=m;if(g&&e%1)return"";var i=0>e||0===e&&0>1/e?(e=-e,"-"):u;if(0>d){var a=$o.formatPrefix(e,h);e=a.scale(e),n=a.symbol+m}else e*=d;e=p(e,h);var b=e.lastIndexOf("."),w=0>b?e:e.substring(0,b),E=0>b?"":t+e.substring(b+1);!f&&c&&(w=s(w));var S=v.length+w.length+E.length+(y?0:i.length),x=l>S?(new Array(S=l-S+1)).join(r):"";return y&&(w=s(x+w)),i+=v,e=w+E,("<"===o?i+e+x:">"===o?x+i+e:"^"===o?x.substring(0,S>>=1)+i+e+x.substring(S):i+(y?e:x+e))+n}}}function _t(e){return e+""}function Dt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Pt(e,t,n){function r(t){var n=e(t),r=s(n,1);return r-t>t-n?n:r}function i(n){return t(n=e(new ra(n-1)),1),n}function s(e,n){return t(e=new ra(+e),n),e}function o(e,r,s){var o=i(e),u=[];if(s>1)for(;r>o;)n(o)%s||u.push(new Date(+o)),t(o,1);else for(;r>o;)u.push(new Date(+o)),t(o,1);return u}function u(e,t,n){try{ra=Dt;var r=new Dt;return r._=e,o(r,t,n)}finally{ra=Date}}e.floor=e,e.round=r,e.ceil=i,e.offset=s,e.range=o;var a=e.utc=Ht(e);return a.floor=a,a.round=Ht(r),a.ceil=Ht(i),a.offset=Ht(s),a.range=u,e}function Ht(e){return function(t,n){try{ra=Dt;var r=new Dt;return r._=t,e(r,n)._}finally{ra=Date}}}function Bt(e){function t(e){function t(t){for(var n,i,s,o=[],u=-1,a=0;++u<r;)37===e.charCodeAt(u)&&(o.push(e.substring(a,u)),null!=(i=sa[n=e.charAt(++u)])&&(n=e.charAt(++u)),(s=L[n])&&(n=s(t,null==i?"e"===n?" ":"0":i)),o.push(n),a=u+1);return o.push(e.substring(a,u)),o.join("")}var r=e.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=n(r,e,t,0);if(i!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var s=null!=r.Z&&ra!==Dt,o=new(s?Dt:ra);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+Math.floor(r.Z/100),r.M+r.Z%100,r.S,r.L),s?o._:o},t.toString=function(){return e},t}function n(e,t,n,r){for(var i,s,o,u=0,a=t.length,f=n.length;a>u;){if(r>=f)return-1;if(i=t.charCodeAt(u++),37===i){if(o=t.charAt(u++),s=A[o in sa?t.charAt(u++):o],!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(e,t,n){S.lastIndex=0;var r=S.exec(t.substring(n));return r?(e.w=x.get(r[0].toLowerCase()),n+r[0].length):-1}function i(e,t,n){w.lastIndex=0;var r=w.exec(t.substring(n));return r?(e.w=E.get(r[0].toLowerCase()),n+r[0].length):-1}function s(e,t,n){C.lastIndex=0;var r=C.exec(t.substring(n));return r?(e.m=k.get(r[0].toLowerCase()),n+r[0].length):-1}function o(e,t,n){T.lastIndex=0;var r=T.exec(t.substring(n));return r?(e.m=N.get(r[0].toLowerCase()),n+r[0].length):-1}function u(e,t,r){return n(e,L.c.toString(),t,r)}function a(e,t,r){return n(e,L.x.toString(),t,r)}function f(e,t,r){return n(e,L.X.toString(),t,r)}function l(e,t,n){var r=b.get(t.substring(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)}var c=e.dateTime,h=e.date,p=e.time,d=e.periods,v=e.days,m=e.shortDays,g=e.months,y=e.shortMonths;t.utc=function(e){function n(e){try{ra=Dt;var t=new ra;return t._=e,r(t)}finally{ra=Date}}var r=t(e);return n.parse=function(e){try{ra=Dt;var t=r.parse(e);return t&&t._}finally{ra=Date}},n.toString=r.toString,n},t.multi=t.utc.multi=nn;var b=$o.map(),w=Ft(v),E=It(v),S=Ft(m),x=It(m),T=Ft(g),N=It(g),C=Ft(y),k=It(y);d.forEach(function(e,t){b.set(e.toLowerCase(),t)});var L={a:function(e){return m[e.getDay()]},A:function(e){return v[e.getDay()]},b:function(e){return y[e.getMonth()]},B:function(e){return g[e.getMonth()]},c:t(c),d:function(e,t){return jt(e.getDate(),t,2)},e:function(e,t){return jt(e.getDate(),t,2)},H:function(e,t){return jt(e.getHours(),t,2)},I:function(e,t){return jt(e.getHours()%12||12,t,2)},j:function(e,t){return jt(1+na.dayOfYear(e),t,3)},L:function(e,t){return jt(e.getMilliseconds(),t,3)},m:function(e,t){return jt(e.getMonth()+1,t,2)},M:function(e,t){return jt(e.getMinutes(),t,2)},p:function(e){return d[+(e.getHours()>=12)]},S:function(e,t){return jt(e.getSeconds(),t,2)},U:function(e,t){return jt(na.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return jt(na.mondayOfYear(e),t,2)},x:t(h),X:t(p),y:function(e,t){return jt(e.getFullYear()%100,t,2)},Y:function(e,t){return jt(e.getFullYear()%1e4,t,4)},Z:en,"%":function(){return"%"}},A={a:r,A:i,b:s,B:o,c:u,d:Jt,e:Jt,H:Qt,I:Qt,j:Kt,L:Zt,m:$t,M:Gt,p:l,S:Yt,U:Rt,w:qt,W:Ut,x:a,X:f,y:Wt,Y:zt,Z:Xt,"%":tn};return t}function jt(e,t,n){var r=0>e?"-":"",i=(r?-e:e)+"",s=i.length;return r+(n>s?(new Array(n-s+1)).join(t)+i:i)}function Ft(e){return new RegExp("^(?:"+e.map($o.requote).join("|")+")","i")}function It(e){for(var t=new i,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function qt(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Rt(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n));return r?(e.U=+r[0],n+r[0].length):-1}function Ut(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n));return r?(e.W=+r[0],n+r[0].length):-1}function zt(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Wt(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n,n+2));return r?(e.y=Vt(+r[0]),n+r[0].length):-1}function Xt(e,t,n){return/^[+-]\d{4}$/.test(t=t.substring(n,n+5))?(e.Z=+t,n+5):-1}function Vt(e){return e+(e>68?1900:2e3)}function $t(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Jt(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Kt(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function Qt(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Gt(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Yt(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Zt(e,t,n){oa.lastIndex=0;var r=oa.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function en(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(uu(t)/60),i=uu(t)%60;return n+jt(r,"0",2)+jt(i,"0",2)}function tn(e,t,n){ua.lastIndex=0;var r=ua.exec(t.substring(n,n+1));return r?n+r[0].length:-1}function nn(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,r=e[n];!r[1](t);)r=e[++n];return r[0](t)}}function rn(){}function sn(e,t,n){var r=n.s=e+t,i=r-e,s=r-i;n.t=e-s+(t-i)}function on(e,t){e&&ca.hasOwnProperty(e.type)&&ca[e.type](e,t)}function un(e,t,n){var r,i=-1,s=e.length-n;for(t.lineStart();++i<s;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function an(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)un(e[n],t,1);t.polygonEnd()}function fn(){function e(e,t){e*=Ou,t=t*Ou/2+Nu/4;var n=e-r,o=n>=0?1:-1,u=o*n,a=Math.cos(t),f=Math.sin(t),l=s*f,c=i*a+l*Math.cos(u),h=l*o*Math.sin(u);pa.add(Math.atan2(h,c)),r=e,i=a,s=f}var t,n,r,i,s;da.point=function(o,u){da.point=e,r=(t=o)*Ou,i=Math.cos(u=(n=u)*Ou/2+Nu/4),s=Math.sin(u)},da.lineEnd=function(){e(t,n)}}function ln(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function cn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function hn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function pn(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function dn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function vn(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function mn(e){return[Math.atan2(e[1],e[0]),V(e[2])]}function gn(e,t){return uu(e[0]-t[0])<Lu&&uu(e[1]-t[1])<Lu}function yn(e,t){e*=Ou;var n=Math.cos(t*=Ou);bn(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function bn(e,t,n){++va,ga+=(e-ga)/va,ya+=(t-ya)/va,ba+=(n-ba)/va}function wn(){function e(e,i){e*=Ou;var s=Math.cos(i*=Ou),o=s*Math.cos(e),u=s*Math.sin(e),a=Math.sin(i),f=Math.atan2(Math.sqrt((f=n*a-r*u)*f+(f=r*o-t*a)*f+(f=t*u-n*o)*f),t*o+n*u+r*a);ma+=f,wa+=f*(t+(t=o)),Ea+=f*(n+(n=u)),Sa+=f*(r+(r=a)),bn(t,n,r)}var t,n,r;Ca.point=function(i,s){i*=Ou;var o=Math.cos(s*=Ou);t=o*Math.cos(i),n=o*Math.sin(i),r=Math.sin(s),Ca.point=e,bn(t,n,r)}}function En(){Ca.point=yn}function Sn(){function e(e,t){e*=Ou;var n=Math.cos(t*=Ou),o=n*Math.cos(e),u=n*Math.sin(e),a=Math.sin(t),f=i*a-s*u,l=s*o-r*a,c=r*u-i*o,h=Math.sqrt(f*f+l*l+c*c),p=r*o+i*u+s*a,d=h&&-X(p)/h,v=Math.atan2(h,p);xa+=d*f,Ta+=d*l,Na+=d*c,ma+=v,wa+=v*(r+(r=o)),Ea+=v*(i+(i=u)),Sa+=v*(s+(s=a)),bn(r,i,s)}var t,n,r,i,s;Ca.point=function(o,u){t=o,n=u,Ca.point=e,o*=Ou;var a=Math.cos(u*=Ou);r=a*Math.cos(o),i=a*Math.sin(o),s=Math.sin(u),bn(r,i,s)},Ca.lineEnd=function(){e(t,n),Ca.lineEnd=En,Ca.point=yn}}function xn(){return!0}function Tn(e,t,n,r,i){var s=[],o=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(gn(n,r)){i.lineStart();for(var u=0;t>u;++u)i.point((n=e[u])[0],n[1]);return i.lineEnd(),void 0}var a=new Cn(n,e,null,!0),f=new Cn(n,null,a,!1);a.o=f,s.push(a),o.push(f),a=new Cn(r,e,null,!1),f=new Cn(r,null,a,!0),a.o=f,s.push(a),o.push(f)}}),o.sort(t),Nn(s),Nn(o),s.length){for(var u=0,a=n,f=o.length;f>u;++u)o[u].e=a=!a;for(var l,c,h=s[0];;){for(var p=h,d=!0;p.v;)if((p=p.n)===h)return;l=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(var u=0,f=l.length;f>u;++u)i.point((c=l[u])[0],c[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(d){l=p.p.z;for(var u=l.length-1;u>=0;--u)i.point((c=l[u])[0],c[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,l=p.z,d=!d}while(!p.v);i.lineEnd()}}}function Nn(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function Cn(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function kn(e,t,n,r){return function(i,s){function o(t,n){var r=i(t,n);e(t=r[0],n=r[1])&&s.point(t,n)}function u(e,t){var n=i(e,t);m.point(n[0],n[1])}function a(){y.point=u,m.lineStart()}function f(){y.point=o,m.lineEnd()}function l(e,t){v.push([e,t]);var n=i(e,t);w.point(n[0],n[1])}function c(){w.lineStart(),v=[]}function h(){l(v[0][0],v[0][1]),w.lineEnd();var e,t=w.clean(),n=b.buffer(),r=n.length;if(v.pop(),d.push(v),v=null,r){if(1&t){e=n[0];var i,r=e.length-1,o=-1;for(s.lineStart();++o<r;)s.point((i=e[o])[0],i[1]);return s.lineEnd(),void 0}r>1&&2&t&&n.push(n.pop().concat(n.shift())),p.push(n.filter(Ln))}}var p,d,v,m=t(s),g=i.invert(r[0],r[1]),y={point:o,lineStart:a,lineEnd:f,polygonStart:function(){y.point=l,y.lineStart=c,y.lineEnd=h,p=[],d=[],s.polygonStart()},polygonEnd:function(){y.point=o,y.lineStart=a,y.lineEnd=f,p=$o.merge(p);var e=Mn(g,d);p.length?Tn(p,On,e,n,s):e&&(s.lineStart(),n(null,null,1,s),s.lineEnd()),s.polygonEnd(),p=d=null},sphere:function(){s.polygonStart(),s.lineStart(),n(null,null,1,s),s.lineEnd(),s.polygonEnd()}},b=An(),w=t(b);return y}}function Ln(e){return e.length>1}function An(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:p,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function On(e,t){return((e=e.x)[0]<0?e[1]-ku-Lu:ku-e[1])-((t=t.x)[0]<0?t[1]-ku-Lu:ku-t[1])}function Mn(e,t){var n=e[0],r=e[1],i=[Math.sin(n),-Math.cos(n),0],s=0,o=0;pa.reset();for(var u=0,a=t.length;a>u;++u){var f=t[u],l=f.length;if(l)for(var c=f[0],h=c[0],p=c[1]/2+Nu/4,d=Math.sin(p),v=Math.cos(p),m=1;;){m===l&&(m=0),e=f[m];var g=e[0],y=e[1]/2+Nu/4,b=Math.sin(y),w=Math.cos(y),E=g-h,S=E>=0?1:-1,x=S*E,T=x>Nu,N=d*b;if(pa.add(Math.atan2(N*S*Math.sin(x),v*w+N*Math.cos(x))),s+=T?E+S*Cu:E,T^h>=n^g>=n){var C=hn(ln(c),ln(e));vn(C);var k=hn(i,C);vn(k);var L=(T^E>=0?-1:1)*V(k[2]);(r>L||r===L&&(C[0]||C[1]))&&(o+=T^E>=0?1:-1)}if(!(m++))break;h=g,d=b,v=w,c=e}}return(-Lu>s||Lu>s&&0>pa)^1&o}function _n(e){var t,n=0/0,r=0/0,i=0/0;return{lineStart:function(){e.lineStart(),t=1},point:function(s,o){var u=s>0?Nu:-Nu,a=uu(s-n);uu(a-Nu)<Lu?(e.point(n,r=(r+o)/2>0?ku:-ku),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(u,r),e.point(s,r),t=0):i!==u&&a>=Nu&&(uu(n-i)<Lu&&(n-=i*Lu),uu(s-u)<Lu&&(s-=u*Lu),r=Dn(n,r,s,o),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(u,r),t=0),e.point(n=s,r=o),i=u},lineEnd:function(){e.lineEnd(),n=r=0/0},clean:function(){return 2-t}}}function Dn(e,t,n,r){var i,s,o=Math.sin(e-n);return uu(o)>Lu?Math.atan((Math.sin(t)*(s=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*s*o)):(t+r)/2}function Pn(e,t,n,r){var i;if(null==e)i=n*ku,r.point(-Nu,i),r.point(0,i),r.point(Nu,i),r.point(Nu,0),r.point(Nu,-i),r.point(0,-i),r.point(-Nu,-i),r.point(-Nu,0),r.point(-Nu,i);else if(uu(e[0]-t[0])>Lu){var s=e[0]<t[0]?Nu:-Nu;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function Hn(e){function t(e,t){return Math.cos(e)*Math.cos(t)>s}function n(e){var n,s,a,f,l;return{lineStart:function(){f=a=!1,l=1},point:function(c,h){var p,d=[c,h],v=t(c,h),m=o?v?0:i(c,h):v?i(c+(0>c?Nu:-Nu),h):0;if(!n&&(f=a=v)&&e.lineStart(),v!==a&&(p=r(n,d),(gn(n,p)||gn(d,p))&&(d[0]+=Lu,d[1]+=Lu,v=t(d[0],d[1]))),v!==a)l=0,v?(e.lineStart(),p=r(d,n),e.point(p[0],p[1])):(p=r(n,d),e.point(p[0],p[1]),e.lineEnd()),n=p;else if(u&&n&&o^v){var g;m&s||!(g=r(d,n,!0))||(l=0,o?(e.lineStart(),e.point(g[0][0],g[0][1]),e.point(g[1][0],g[1][1]),e.lineEnd()):(e.point(g[1][0],g[1][1]),e.lineEnd(),e.lineStart(),e.point(g[0][0],g[0][1])))}!v||n&&gn(n,d)||e.point(d[0],d[1]),n=d,a=v,s=m},lineEnd:function(){a&&e.lineEnd(),n=null},clean:function(){return l|(f&&a)<<1}}}function r(e,t,n){var r=ln(e),i=ln(t),o=[1,0,0],u=hn(r,i),a=cn(u,u),f=u[0],l=a-f*f;if(!l)return!n&&e;var c=s*a/l,h=-s*f/l,p=hn(o,u),d=dn(o,c),v=dn(u,h);pn(d,v);var m=p,g=cn(d,m),y=cn(m,m),b=g*g-y*(cn(d,d)-1);if(!(0>b)){var w=Math.sqrt(b),E=dn(m,(-g-w)/y);if(pn(E,d),E=mn(E),!n)return E;var S,x=e[0],T=t[0],N=e[1],C=t[1];x>T&&(S=x,x=T,T=S);var k=T-x,L=uu(k-Nu)<Lu,A=L||Lu>k;if(!L&&N>C&&(S=N,N=C,C=S),A?L?N+C>0^E[1]<(uu(E[0]-x)<Lu?N:C):N<=E[1]&&E[1]<=C:k>Nu^(x<=E[0]&&E[0]<=T)){var O=dn(m,(-g+w)/y);return pn(O,d),[E,mn(O)]}}}function i(t,n){var r=o?e:Nu-e,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>n?i|=4:n>r&&(i|=8),i}var s=Math.cos(e),o=s>0,u=uu(s)>Lu,a=fr(e,6*Ou);return kn(t,n,a,o?[0,-e]:[-Nu,e-Nu])}function Bn(e,t,n,r){return function(i){var s,o=i.a,u=i.b,a=o.x,f=o.y,l=u.x,c=u.y,h=0,p=1,d=l-a,v=c-f;if(s=e-a,d||!(s>0)){if(s/=d,0>d){if(h>s)return;p>s&&(p=s)}else if(d>0){if(s>p)return;s>h&&(h=s)}if(s=n-a,d||!(0>s)){if(s/=d,0>d){if(s>p)return;s>h&&(h=s)}else if(d>0){if(h>s)return;p>s&&(p=s)}if(s=t-f,v||!(s>0)){if(s/=v,0>v){if(h>s)return;p>s&&(p=s)}else if(v>0){if(s>p)return;s>h&&(h=s)}if(s=r-f,v||!(0>s)){if(s/=v,0>v){if(s>p)return;s>h&&(h=s)}else if(v>0){if(h>s)return;p>s&&(p=s)}return h>0&&(i.a={x:a+h*d,y:f+h*v}),1>p&&(i.b={x:a+p*d,y:f+p*v}),i}}}}}}function jn(e,t,n,r){function i(r,i){return uu(r[0]-e)<Lu?i>0?0:3:uu(r[0]-n)<Lu?i>0?2:1:uu(r[1]-t)<Lu?i>0?1:0:i>0?3:2}function s(e,t){return o(e.x,t.x)}function o(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(u){function a(e){for(var t=0,n=m.length,r=e[1],i=0;n>i;++i)for(var s,o=1,u=m[i],a=u.length,f=u[0];a>o;++o)s=u[o],f[1]<=r?s[1]>r&&W(f,s,e)>0&&++t:s[1]<=r&&W(f,s,e)<0&&--t,f=s;return 0!==t}function f(s,u,a,f){var l=0,c=0;if(null==s||(l=i(s,a))!==(c=i(u,a))||o(s,u)<0^a>0){do f.point(0===l||3===l?e:n,l>1?r:t);while((l=(l+a+4)%4)!==c)}else f.point(u[0],u[1])}function l(i,s){return i>=e&&n>=i&&s>=t&&r>=s}function c(e,t){l(e,t)&&u.point(e,t)}function h(){A.point=d,m&&m.push(g=[]),T=!0,x=!1,E=S=0/0}function p(){v&&(d(y,b),w&&x&&k.rejoin(),v.push(k.buffer())),A.point=c,x&&u.lineEnd()}function d(e,t){e=Math.max(-La,Math.min(La,e)),t=Math.max(-La,Math.min(La,t));var n=l(e,t);if(m&&g.push([e,t]),T)y=e,b=t,w=n,T=!1,n&&(u.lineStart(),u.point(e,t));else if(n&&x)u.point(e,t);else{var r={a:{x:E,y:S},b:{x:e,y:t}};L(r)?(x||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),N=!1):n&&(u.lineStart(),u.point(e,t),N=!1)}E=e,S=t,x=n}var v,m,g,y,b,w,E,S,x,T,N,C=u,k=An(),L=Bn(e,t,n,r),A={point:c,lineStart:h,lineEnd:p,polygonStart:function(){u=k,v=[],m=[],N=!0},polygonEnd:function(){u=C,v=$o.merge(v);var t=a([e,r]),n=N&&t,i=v.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),f(null,null,1,u),u.lineEnd()),i&&Tn(v,s,t,f,u),u.polygonEnd()),v=m=g=null}};return A}}function Fn(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])}),n}function In(e){var t=0,n=Nu/3,r=tr(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*Nu/180,n=e[1]*Nu/180):[180*(t/Nu),180*(n/Nu)]},i}function qn(e,t){function n(e,t){var n=Math.sqrt(s-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),o-n*Math.cos(e)]}var r=Math.sin(e),i=(r+Math.sin(t))/2,s=1+r*(2*i-r),o=Math.sqrt(s)/i;return n.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/i,V((s-(e*e+n*n)*i*i)/(2*i))]},n}function Rn(){function e(e,t){Oa+=i*e-r*t,r=e,i=t}var t,n,r,i;Ha.point=function(s,o){Ha.point=e,t=r=s,n=i=o},Ha.lineEnd=function(){e(t,n)}}function Un(e,t){Ma>e&&(Ma=e),e>Da&&(Da=e),_a>t&&(_a=t),t>Pa&&(Pa=t)}function zn(){function e(e,t){o.push("M",e,",",t,s)}function t(e,t){o.push("M",e,",",t),u.point=n}function n(e,t){o.push("L",e,",",t)}function r(){u.point=e}function i(){o.push("Z")}var s=Wn(4.5),o=[],u={point:e,lineStart:function(){u.point=t},lineEnd:r,polygonStart:function(){u.lineEnd=i},polygonEnd:function(){u.lineEnd=r,u.point=e},pointRadius:function(e){return s=Wn(e),u},result:function(){if(o.length){var e=o.join("");return o=[],e}}};return u}function Wn(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Xn(e,t){ga+=e,ya+=t,++ba}function Vn(){function e(e,r){var i=e-t,s=r-n,o=Math.sqrt(i*i+s*s);wa+=o*(t+e)/2,Ea+=o*(n+r)/2,Sa+=o,Xn(t=e,n=r)}var t,n;ja.point=function(r,i){ja.point=e,Xn(t=r,n=i)}}function $n(){ja.point=Xn}function Jn(){function e(e,t){var n=e-r,s=t-i,o=Math.sqrt(n*n+s*s);wa+=o*(r+e)/2,Ea+=o*(i+t)/2,Sa+=o,o=i*e-r*t,xa+=o*(r+e),Ta+=o*(i+t),Na+=3*o,Xn(r=e,i=t)}var t,n,r,i;ja.point=function(s,o){ja.point=e,Xn(t=r=s,n=i=o)},ja.lineEnd=function(){e(t,n)}}function Kn(e){function t(t,n){e.moveTo(t,n),e.arc(t,n,o,0,Cu)}function n(t,n){e.moveTo(t,n),u.point=r}function r(t,n){e.lineTo(t,n)}function i(){u.point=t}function s(){e.closePath()}var o=4.5,u={point:t,lineStart:function(){u.point=n},lineEnd:i,polygonStart:function(){u.lineEnd=s},polygonEnd:function(){u.lineEnd=i,u.point=t},pointRadius:function(e){return o=e,u},result:p};return u}function Qn(e){function t(e){return(u?r:n)(e)}function n(t){return Zn(t,function(n,r){n=e(n,r),t.point(n[0],n[1])})}function r(t){function n(n,r){n=e(n,r),t.point(n[0],n[1])}function r(){b=0/0,T.point=s,t.lineStart()}function s(n,r){var s=ln([n,r]),o=e(n,r);i(b,w,y,E,S,x,b=o[0],w=o[1],y=n,E=s[0],S=s[1],x=s[2],u,t),t.point(b,w)}function o(){T.point=n,t.lineEnd()}function a(){r(),T.point=f,T.lineEnd=l}function f(e,t){s(c=e,h=t),p=b,d=w,v=E,m=S,g=x,T.point=s}function l(){i(b,w,y,E,S,x,p,d,c,v,m,g,u,t),T.lineEnd=o,o()}var c,h,p,d,v,m,g,y,b,w,E,S,x,T={point:n,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),T.lineStart=a},polygonEnd:function(){t.polygonEnd(),T.lineStart=r}};return T}function i(t,n,r,u,a,f,l,c,h,p,d,v,m,g){var y=l-t,b=c-n,w=y*y+b*b;if(w>4*s&&m--){var E=u+p,S=a+d,x=f+v,T=Math.sqrt(E*E+S*S+x*x),N=Math.asin(x/=T),C=uu(uu(x)-1)<Lu||uu(r-h)<Lu?(r+h)/2:Math.atan2(S,E),k=e(C,N),L=k[0],A=k[1],O=L-t,M=A-n,_=b*O-y*M;(_*_/w>s||uu((y*O+b*M)/w-.5)>.3||o>u*p+a*d+f*v)&&(i(t,n,r,u,a,f,L,A,C,E/=T,S/=T,x,m,g),g.point(L,A),i(L,A,C,E,S,x,l,c,h,p,d,v,m,g))}}var s=.5,o=Math.cos(30*Ou),u=16;return t.precision=function(e){return arguments.length?(u=(s=e*e)>0&&16,t):Math.sqrt(s)},t}function Gn(e){var t=Qn(function(t,n){return e([t*Mu,n*Mu])});return function(e){return nr(t(e))}}function Yn(e){this.stream=e}function Zn(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function er(e){return tr(function(){return e})()}function tr(e){function t(e){return e=u(e[0]*Ou,e[1]*Ou),[e[0]*h+a,f-e[1]*h]}function n(e){return e=u.invert((e[0]-a)/h,(f-e[1])/h),e&&[e[0]*Mu,e[1]*Mu]}function r(){u=Fn(o=sr(g,y,b),s);var e=s(v,m);return a=p-e[0]*h,f=d+e[1]*h,i()}function i(){return l&&(l.valid=!1,l=null),t}var s,o,u,a,f,l,c=Qn(function(e,t){return e=s(e,t),[e[0]*h+a,f-e[1]*h]}),h=150,p=480,d=250,v=0,m=0,g=0,y=0,b=0,w=ka,E=St,S=null,x=null;return t.stream=function(e){return l&&(l.valid=!1),l=nr(w(o,c(E(e)))),l.valid=!0,l},t.clipAngle=function(e){return arguments.length?(w=null==e?(S=e,ka):Hn((S=+e)*Ou),i()):S},t.clipExtent=function(e){return arguments.length?(x=e,E=e?jn(e[0][0],e[0][1],e[1][0],e[1][1]):St,i()):x},t.scale=function(e){return arguments.length?(h=+e,r()):h},t.translate=function(e){return arguments.length?(p=+e[0],d=+e[1],r()):[p,d]},t.center=function(e){return arguments.length?(v=e[0]%360*Ou,m=e[1]%360*Ou,r()):[v*Mu,m*Mu]},t.rotate=function(e){return arguments.length?(g=e[0]%360*Ou,y=e[1]%360*Ou,b=e.length>2?e[2]%360*Ou:0,r()):[g*Mu,y*Mu,b*Mu]},$o.rebind(t,c,"precision"),function(){return s=e.apply(this,arguments),t.invert=s.invert&&n,r()}}function nr(e){return Zn(e,function(t,n){e.point(t*Ou,n*Ou)})}function rr(e,t){return[e,t]}function ir(e,t){return[e>Nu?e-Cu:-Nu>e?e+Cu:e,t]}function sr(e,t,n){return e?t||n?Fn(ur(e),ar(t,n)):ur(e):t||n?ar(t,n):ir}function or(e){return function(t,n){return t+=e,[t>Nu?t-Cu:-Nu>t?t+Cu:t,n]}}function ur(e){var t=or(e);return t.invert=or(-e),t}function ar(e,t){function n(e,t){var n=Math.cos(t),u=Math.cos(e)*n,a=Math.sin(e)*n,f=Math.sin(t),l=f*r+u*i;return[Math.atan2(a*s-l*o,u*r-f*i),V(l*s+a*o)]}var r=Math.cos(e),i=Math.sin(e),s=Math.cos(t),o=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),u=Math.cos(e)*n,a=Math.sin(e)*n,f=Math.sin(t),l=f*s-a*o;return[Math.atan2(a*s+f*o,u*r+l*i),V(l*r-u*i)]},n}function fr(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,s,o,u){var a=o*t;null!=i?(i=lr(n,i),s=lr(n,s),(o>0?s>i:i>s)&&(i+=o*Cu)):(i=e+o*Cu,s=e-.5*a);for(var f,l=i;o>0?l>s:s>l;l-=a)u.point((f=mn([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],f[1])}}function lr(e,t){var n=ln(t);n[0]-=e,vn(n);var r=X(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Lu)%(2*Math.PI)}function cr(e,t,n){var r=$o.range(e,t-Lu,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function hr(e,t,n){var r=$o.range(e,t-Lu,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function pr(e){return e.source}function dr(e){return e.target}function vr(e,t,n,r){var i=Math.cos(t),s=Math.sin(t),o=Math.cos(r),u=Math.sin(r),a=i*Math.cos(e),f=i*Math.sin(e),l=o*Math.cos(n),c=o*Math.sin(n),h=2*Math.asin(Math.sqrt(Q(r-t)+i*o*Q(n-e))),p=1/Math.sin(h),d=h?function(e){var t=Math.sin(e*=h)*p,n=Math.sin(h-e)*p,r=n*a+t*l,i=n*f+t*c,o=n*s+t*u;return[Math.atan2(i,r)*Mu,Math.atan2(o,Math.sqrt(r*r+i*i))*Mu]}:function(){return[e*Mu,t*Mu]};return d.distance=h,d}function mr(){function e(e,i){var s=Math.sin(i*=Ou),o=Math.cos(i),u=uu((e*=Ou)-t),a=Math.cos(u);Fa+=Math.atan2(Math.sqrt((u=o*Math.sin(u))*u+(u=r*s-n*o*a)*u),n*s+r*o*a),t=e,n=s,r=o}var t,n,r;Ia.point=function(i,s){t=i*Ou,n=Math.sin(s*=Ou),r=Math.cos(s),Ia.point=e},Ia.lineEnd=function(){Ia.point=Ia.lineEnd=p}}function gr(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),s=e(r*i);return[s*i*Math.sin(t),s*Math.sin(n)]}return n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),s=Math.sin(i),o=Math.cos(i);return[Math.atan2(e*s,r*o),Math.asin(r&&n*s/r)]},n}function yr(e,t){function n(e,t){var n=uu(uu(t)-ku)<Lu?0:o/Math.pow(i(t),s);return[n*Math.sin(s*e),o-n*Math.cos(s*e)]}var r=Math.cos(e),i=function(e){return Math.tan(Nu/4+e/2)},s=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(i(t)/i(e)),o=r*Math.pow(i(e),s)/s;return s?(n.invert=function(e,t){var n=o-t,r=z(s)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/s,2*Math.atan(Math.pow(o/r,1/s))-ku]},n):wr}function br(e,t){function n(e,t){var n=s-t;return[n*Math.sin(i*e),s-n*Math.cos(i*e)]}var r=Math.cos(e),i=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),s=r/i+e;return uu(i)<Lu?rr:(n.invert=function(e,t){var n=s-t;return[Math.atan2(e,n)/i,s-z(i)*Math.sqrt(e*e+n*n)]},n)}function wr(e,t){return[e,Math.log(Math.tan(Nu/4+t/2))]}function Er(e){var t,n=er(e),r=n.scale,i=n.translate,s=n.clipExtent;return n.scale=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var o=s.apply(n,arguments);if(o===n){if(t=null==e){var u=Nu*r(),a=i();s([[a[0]-u,a[1]-u],[a[0]+u,a[1]+u]])}}else t&&(o=null);return o},n.clipExtent(null)}function Sr(e,t){return[Math.log(Math.tan(Nu/4+t/2)),-e]}function xr(e){return e[0]}function Tr(e){return e[1]}function Nr(e){for(var t=e.length,n=[0,1],r=2,i=2;t>i;i++){for(;r>1&&W(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Cr(e,t){return e[0]-t[0]||e[1]-t[1]}function kr(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Lr(e,t,n,r){var i=e[0],s=n[0],o=t[0]-i,u=r[0]-s,a=e[1],f=n[1],l=t[1]-a,c=r[1]-f,h=(u*(a-f)-c*(i-s))/(c*o-u*l);return[i+h*o,a+h*l]}function Ar(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function Or(){Gr(this),this.edge=this.site=this.circle=null}function Mr(e){var t=Ga.pop()||new Or;return t.site=e,t}function _r(e){Ur(e),Ja.remove(e),Ga.push(e),Gr(e)}function Dr(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},s=e.P,o=e.N,u=[e];_r(e);for(var a=s;a.circle&&uu(n-a.circle.x)<Lu&&uu(r-a.circle.cy)<Lu;)s=a.P,u.unshift(a),_r(a),a=s;u.unshift(a),Ur(a);for(var f=o;f.circle&&uu(n-f.circle.x)<Lu&&uu(r-f.circle.cy)<Lu;)o=f.N,u.push(f),_r(f),f=o;u.push(f),Ur(f);var l,c=u.length;for(l=1;c>l;++l)f=u[l],a=u[l-1],Jr(f.edge,a.site,f.site,i);a=u[0],f=u[c-1],f.edge=Vr(a.site,f.site,null,i),Rr(a),Rr(f)}function Pr(e){for(var t,n,r,i,s=e.x,o=e.y,u=Ja._;u;)if(r=Hr(u,o)-s,r>Lu)u=u.L;else{if(i=s-Br(u,o),!(i>Lu)){r>-Lu?(t=u.P,n=u):i>-Lu?(t=u,n=u.N):t=n=u;break}if(!u.R){t=u;break}u=u.R}var a=Mr(e);if(Ja.insert(t,a),t||n){if(t===n)return Ur(t),n=Mr(t.site),Ja.insert(a,n),a.edge=n.edge=Vr(t.site,a.site),Rr(t),Rr(n),void 0;if(!n)return a.edge=Vr(t.site,a.site),void 0;Ur(t),Ur(n);var f=t.site,l=f.x,c=f.y,h=e.x-l,p=e.y-c,d=n.site,v=d.x-l,m=d.y-c,g=2*(h*m-p*v),y=h*h+p*p,b=v*v+m*m,w={x:(m*y-p*b)/g+l,y:(h*b-v*y)/g+c};Jr(n.edge,f,d,w),a.edge=Vr(f,e,null,w),n.edge=Vr(e,d,null,w),Rr(t),Rr(n)}}function Hr(e,t){var n=e.site,r=n.x,i=n.y,s=i-t;if(!s)return r;var o=e.P;if(!o)return-1/0;n=o.site;var u=n.x,a=n.y,f=a-t;if(!f)return u;var l=u-r,c=1/s-1/f,h=l/f;return c?(-h+Math.sqrt(h*h-2*c*(l*l/(-2*f)-a+f/2+i-s/2)))/c+r:(r+u)/2}function Br(e,t){var n=e.N;if(n)return Hr(n,t);var r=e.site;return r.y===t?r.x:1/0}function jr(e){this.site=e,this.edges=[]}function Fr(e){for(var t,n,r,i,s,o,u,a,f,l,c=e[0][0],h=e[1][0],p=e[0][1],d=e[1][1],v=$a,m=v.length;m--;)if(s=v[m],s&&s.prepare())for(u=s.edges,a=u.length,o=0;a>o;)l=u[o].end(),r=l.x,i=l.y,f=u[++o%a].start(),t=f.x,n=f.y,(uu(r-t)>Lu||uu(i-n)>Lu)&&(u.splice(o,0,new Kr($r(s.site,l,uu(r-c)<Lu&&d-i>Lu?{x:c,y:uu(t-c)<Lu?n:d}:uu(i-d)<Lu&&h-r>Lu?{x:uu(n-d)<Lu?t:h,y:d}:uu(r-h)<Lu&&i-p>Lu?{x:h,y:uu(t-h)<Lu?n:p}:uu(i-p)<Lu&&r-c>Lu?{x:uu(n-p)<Lu?t:c,y:p}:null),s.site,null)),++a)}function Ir(e,t){return t.angle-e.angle}function qr(){Gr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Rr(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,s=n.site;if(r!==s){var o=i.x,u=i.y,a=r.x-o,f=r.y-u,l=s.x-o,c=s.y-u,h=2*(a*c-f*l);if(!(h>=-Au)){var p=a*a+f*f,d=l*l+c*c,v=(c*p-f*d)/h,m=(a*d-l*p)/h,c=m+u,g=Ya.pop()||new qr;g.arc=e,g.site=i,g.x=v+o,g.y=c+Math.sqrt(v*v+m*m),g.cy=c,e.circle=g;for(var y=null,b=Qa._;b;)if(g.y<b.y||g.y===b.y&&g.x<=b.x){if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}Qa.insert(y,g),y||(Ka=g)}}}}function Ur(e){var t=e.circle;t&&(t.P||(Ka=t.N),Qa.remove(t),Ya.push(t),Gr(t),e.circle=null)}function zr(e){for(var t,n=Va,r=Bn(e[0][0],e[0][1],e[1][0],e[1][1]),i=n.length;i--;)t=n[i],(!Wr(t,e)||!r(t)||uu(t.a.x-t.b.x)<Lu&&uu(t.a.y-t.b.y)<Lu)&&(t.a=t.b=null,n.splice(i,1))}function Wr(e,t){var n=e.b;if(n)return!0;var r,i,s=e.a,o=t[0][0],u=t[1][0],a=t[0][1],f=t[1][1],l=e.l,c=e.r,h=l.x,p=l.y,d=c.x,v=c.y,m=(h+d)/2,g=(p+v)/2;if(v===p){if(o>m||m>=u)return;if(h>d){if(s){if(s.y>=f)return}else s={x:m,y:a};n={x:m,y:f}}else{if(s){if(s.y<a)return}else s={x:m,y:f};n={x:m,y:a}}}else if(r=(h-d)/(v-p),i=g-r*m,-1>r||r>1)if(h>d){if(s){if(s.y>=f)return}else s={x:(a-i)/r,y:a};n={x:(f-i)/r,y:f}}else{if(s){if(s.y<a)return}else s={x:(f-i)/r,y:f};n={x:(a-i)/r,y:a}}else if(v>p){if(s){if(s.x>=u)return}else s={x:o,y:r*o+i};n={x:u,y:r*u+i}}else{if(s){if(s.x<o)return}else s={x:u,y:r*u+i};n={x:o,y:r*o+i}}return e.a=s,e.b=n,!0}function Xr(e,t){this.l=e,this.r=t,this.a=this.b=null}function Vr(e,t,n,r){var i=new Xr(e,t);return Va.push(i),n&&Jr(i,e,t,n),r&&Jr(i,t,e,r),$a[e.i].edges.push(new Kr(i,e,t)),$a[t.i].edges.push(new Kr(i,t,e)),i}function $r(e,t,n){var r=new Xr(e,null);return r.a=t,r.b=n,Va.push(r),r}function Jr(e,t,n,r){e.a||e.b?e.l===n?e.b=r:e.a=r:(e.a=r,e.l=t,e.r=n)}function Kr(e,t,n){var r=e.a,i=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function Qr(){this._=null}function Gr(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Yr(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Zr(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function ei(e){for(;e.L;)e=e.L;return e}function ti(e,t){var n,r,i,s=e.sort(ni).pop();for(Va=[],$a=new Array(e.length),Ja=new Qr,Qa=new Qr;;)if(i=Ka,s&&(!i||s.y<i.y||s.y===i.y&&s.x<i.x))(s.x!==n||s.y!==r)&&($a[s.i]=new jr(s),Pr(s),n=s.x,r=s.y),s=e.pop();else{if(!i)break;Dr(i.arc)}t&&(zr(t),Fr(t));var o={cells:$a,edges:Va};return Ja=Qa=Va=$a=null,o}function ni(e,t){return t.y-e.y||t.x-e.x}function ri(e,t,n){return(e.x-n.x)*(t.y-e.y)-(e.x-t.x)*(n.y-e.y)}function ii(e){return e.x}function si(e){return e.y}function oi(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function ui(e,t,n,r,i,s){if(!e(t,n,r,i,s)){var o=.5*(n+i),u=.5*(r+s),a=t.nodes;a[0]&&ui(e,a[0],n,r,o,u),a[1]&&ui(e,a[1],o,r,i,u),a[2]&&ui(e,a[2],n,u,o,s),a[3]&&ui(e,a[3],o,u,i,s)}}function ai(e,t){e=$o.rgb(e),t=$o.rgb(t);var n=e.r,r=e.g,i=e.b,s=t.r-n,o=t.g-r,u=t.b-i;return function(e){return"#"+vt(Math.round(n+s*e))+vt(Math.round(r+o*e))+vt(Math.round(i+u*e))}}function fi(e,t){var n,r={},i={};for(n in e)n in t?r[n]=hi(e[n],t[n]):i[n]=e[n];for(n in t)n in e||(i[n]=t[n]);return function(e){for(n in r)i[n]=r[n](e);return i}}function li(e,t){return t-=e=+e,function(n){return e+t*n}}function ci(e,t){var n,r,i,s,o,u=0,a=0,f=[],l=[];for(e+="",t+="",ef.lastIndex=0,r=0;n=ef.exec(t);++r)n.index&&f.push(t.substring(u,a=n.index)),l.push({i:f.length,x:n[0]}),f.push(null),u=ef.lastIndex;for(u<t.length&&f.push(t.substring(u)),r=0,s=l.length;(n=ef.exec(e))&&s>r;++r)if(o=l[r],o.x==n[0]){if(o.i)if(null==f[o.i+1])for(f[o.i-1]+=o.x,f.splice(o.i,1),i=r+1;s>i;++i)l[i].i--;else for(f[o.i-1]+=o.x+f[o.i+1],f.splice(o.i,2),i=r+1;s>i;++i)l[i].i-=2;else if(null==f[o.i+1])f[o.i]=o.x;else for(f[o.i]=o.x+f[o.i+1],f.splice(o.i+1,1),i=r+1;s>i;++i)l[i].i--;l.splice(r,1),s--,r--}else o.x=li(parseFloat(n[0]),parseFloat(o.x));for(;s>r;)o=l.pop(),null==f[o.i+1]?f[o.i]=o.x:(f[o.i]=o.x+f[o.i+1],f.splice(o.i+1,1)),s--;return 1===f.length?null==f[0]?(o=l[0].x,function(e){return o(e)+""}):function(){return t}:function(e){for(r=0;s>r;++r)f[(o=l[r]).i]=o.x(e);return f.join("")}}function hi(e,t){for(var n,r=$o.interpolators.length;--r>=0&&!(n=$o.interpolators[r](e,t)););return n}function pi(e,t){var n,r=[],i=[],s=e.length,o=t.length,u=Math.min(e.length,t.length);for(n=0;u>n;++n)r.push(hi(e[n],t[n]));for(;s>n;++n)i[n]=e[n];for(;o>n;++n)i[n]=t[n];return function(e){for(n=0;u>n;++n)i[n]=r[n](e);return i}}function di(e){return function(t){return 0>=t?0:t>=1?1:e(t)}}function vi(e){return function(t){return 1-e(1-t)}}function mi(e){return function(t){return.5*(.5>t?e(2*t):2-e(2-2*t))}}function gi(e){return e*e}function yi(e){return e*e*e}function bi(e){if(0>=e)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(.5>e?n:3*(e-t)+n-.75)}function wi(e){return function(t){return Math.pow(t,e)}}function Ei(e){return 1-Math.cos(e*ku)}function Si(e){return Math.pow(2,10*(e-1))}function xi(e){return 1-Math.sqrt(1-e*e)}function Ti(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Cu*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Cu/t)}}function Ni(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Ci(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function ki(e,t){e=$o.hcl(e),t=$o.hcl(t);var n=e.h,r=e.c,i=e.l,s=t.h-n,o=t.c-r,u=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(s)?(s=0,n=isNaN(n)?t.h:n):s>180?s-=360:-180>s&&(s+=360),function(e){return rt(n+s*e,r+o*e,i+u*e)+""}}function Li(e,t){e=$o.hsl(e),t=$o.hsl(t);var n=e.h,r=e.s,i=e.l,s=t.h-n,o=t.s-r,u=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(s)?(s=0,n=isNaN(n)?t.h:n):s>180?s-=360:-180>s&&(s+=360),function(e){return et(n+s*e,r+o*e,i+u*e)+""}}function Ai(e,t){e=$o.lab(e),t=$o.lab(t);var n=e.l,r=e.a,i=e.b,s=t.l-n,o=t.a-r,u=t.b-i;return function(e){return ot(n+s*e,r+o*e,i+u*e)+""}}function Oi(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Mi(e){var t=[e.a,e.b],n=[e.c,e.d],r=Di(t),i=_i(t,n),s=Di(Pi(n,t,-i))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*Mu,this.translate=[e.e,e.f],this.scale=[r,s],this.skew=s?Math.atan2(i,s)*Mu:0}function _i(e,t){return e[0]*t[0]+e[1]*t[1]}function Di(e){var t=Math.sqrt(_i(e,e));return t&&(e[0]/=t,e[1]/=t),t}function Pi(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function Hi(e,t){var n,r=[],i=[],s=$o.transform(e),o=$o.transform(t),u=s.translate,a=o.translate,f=s.rotate,l=o.rotate,c=s.skew,h=o.skew,p=s.scale,d=o.scale;return u[0]!=a[0]||u[1]!=a[1]?(r.push("translate(",null,",",null,")"),i.push({i:1,x:li(u[0],a[0])},{i:3,x:li(u[1],a[1])})):a[0]||a[1]?r.push("translate("+a+")"):r.push(""),f!=l?(f-l>180?l+=360:l-f>180&&(f+=360),i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:li(f,l)})):l&&r.push(r.pop()+"rotate("+l+")"),c!=h?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:li(c,h)}):h&&r.push(r.pop()+"skewX("+h+")"),p[0]!=d[0]||p[1]!=d[1]?(n=r.push(r.pop()+"scale(",null,",",null,")"),i.push({i:n-4,x:li(p[0],d[0])},{i:n-2,x:li(p[1],d[1])})):(1!=d[0]||1!=d[1])&&r.push(r.pop()+"scale("+d+")"),n=i.length,function(e){for(var t,s=-1;++s<n;)r[(t=i[s]).i]=t.x(e);return r.join("")}}function Bi(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return(n-e)*t}}function ji(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function Fi(e){for(var t=e.source,n=e.target,r=qi(t,n),i=[t];t!==r;)t=t.parent,i.push(t);for(var s=i.length;n!==r;)i.splice(s,0,n),n=n.parent;return i}function Ii(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function qi(e,t){if(e===t)return e;for(var n=Ii(e),r=Ii(t),i=n.pop(),s=r.pop(),o=null;i===s;)o=i,i=n.pop(),s=r.pop();return o}function Ri(e){e.fixed|=2}function Ui(e){e.fixed&=-7}function zi(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Wi(e){e.fixed&=-5}function Xi(e,t,n){var r=0,i=0;if(e.charge=0,!e.leaf)for(var s,o=e.nodes,u=o.length,a=-1;++a<u;)s=o[a],null!=s&&(Xi(s,t,n),e.charge+=s.charge,r+=s.charge*s.cx,i+=s.charge*s.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var f=t*n[e.point.index];e.charge+=e.pointCharge=f,r+=f*e.point.x,i+=f*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}function Vi(e,t){return $o.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=Qi,e}function $i(e){return e.children}function Ji(e){return e.value}function Ki(e,t){return t.value-e.value}function Qi(e){return $o.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function Gi(e){return e.x}function Yi(e){return e.y}function Zi(e,t,n){e.y0=t,e.y=n}function es(e){return $o.range(e.length)}function ts(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function ns(e){for(var t,n=1,r=0,i=e[0][1],s=e.length;s>n;++n)(t=e[n][1])>i&&(r=n,i=t);return r}function rs(e){return e.reduce(is,0)}function is(e,t){return e+t[1]}function ss(e,t){return os(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function os(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];++n<=t;)s[n]=i*n+r;return s}function us(e){return[$o.min(e),$o.max(e)]}function as(e,t){return e.parent==t.parent?1:2}function fs(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function ls(e){var t,n=e.children;return n&&(t=n.length)?n[t-1]:e._tree.thread}function cs(e,t){var n=e.children;if(n&&(i=n.length))for(var r,i,s=-1;++s<i;)t(r=cs(n[s],t),e)>0&&(e=r);return e}function hs(e,t){return e.x-t.x}function ps(e,t){return t.x-e.x}function ds(e,t){return e.depth-t.depth}function vs(e,t){function n(e,r){var i=e.children;if(i&&(o=i.length))for(var s,o,u=null,a=-1;++a<o;)s=i[a],n(s,u),u=s;t(e,r)}n(e,null)}function ms(e){for(var t,n=0,r=0,i=e.children,s=i.length;--s>=0;)t=i[s]._tree,t.prelim+=n,t.mod+=n,n+=t.shift+(r+=t.change)}function gs(e,t,n){e=e._tree,t=t._tree;var r=n/(t.number-e.number);e.change+=r,t.change-=r,t.shift+=n,t.prelim+=n,t.mod+=n}function ys(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function bs(e,t){return e.value-t.value}function ws(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Es(e,t){e._pack_next=t,t._pack_prev=e}function Ss(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function xs(e){function t(e){l=Math.min(e.x-e.r,l),c=Math.max(e.x+e.r,c),h=Math.min(e.y-e.r,h),p=Math.max(e.y+e.r,p)}if((n=e.children)&&(f=n.length)){var n,r,i,s,o,u,a,f,l=1/0,c=-1/0,h=1/0,p=-1/0;if(n.forEach(Ts),r=n[0],r.x=-r.r,r.y=0,t(r),f>1&&(i=n[1],i.x=i.r,i.y=0,t(i),f>2))for(s=n[2],ks(r,i,s),t(s),ws(r,s),r._pack_prev=s,ws(s,i),i=r._pack_next,o=3;f>o;o++){ks(r,i,s=n[o]);var d=0,v=1,m=1;for(u=i._pack_next;u!==i;u=u._pack_next,v++)if(Ss(u,s)){d=1;break}if(1==d)for(a=r._pack_prev;a!==u._pack_prev&&!Ss(a,s);a=a._pack_prev,m++);d?(m>v||v==m&&i.r<r.r?Es(r,i=u):Es(r=a,i),o--):(ws(r,s),i=s,t(s))}var g=(l+c)/2,y=(h+p)/2,b=0;for(o=0;f>o;o++)s=n[o],s.x-=g,s.y-=y,b=Math.max(b,s.r+Math.sqrt(s.x*s.x+s.y*s.y));e.r=b,n.forEach(Ns)}}function Ts(e){e._pack_next=e._pack_prev=e}function Ns(e){delete e._pack_next,delete e._pack_prev}function Cs(e,t,n,r){var i=e.children;if(e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r,i)for(var s=-1,o=i.length;++s<o;)Cs(i[s],t,n,r)}function ks(e,t,n){var r=e.r+n.r,i=t.x-e.x,s=t.y-e.y;if(r&&(i||s)){var o=t.r+n.r,u=i*i+s*s;o*=o,r*=r;var a=.5+(r-o)/(2*u),f=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);n.x=e.x+a*i+f*s,n.y=e.y+a*s-f*i}else n.x=e.x+r,n.y=e.y}function Ls(e){return 1+$o.max(e,function(e){return e.y})}function As(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Os(e){var t=e.children;return t&&t.length?Os(t[0]):e}function Ms(e){var t,n=e.children;return n&&(t=n.length)?Ms(n[t-1]):e}function _s(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Ds(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];return 0>i&&(n+=i/2,i=0),0>s&&(r+=s/2,s=0),{x:n,y:r,dx:i,dy:s}}function Ps(e){var t=e[0],n=e[e.length-1];return n>t?[t,n]:[n,t]}function Hs(e){return e.rangeExtent?e.rangeExtent():Ps(e.range())}function Bs(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function js(e,t){var n,r=0,i=e.length-1,s=e[r],o=e[i];return s>o&&(n=r,r=i,i=n,n=s,s=o,o=n),e[r]=t.floor(s),e[i]=t.ceil(o),e}function Fs(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:hf}function Is(e,t,n,r){var i=[],s=[],o=0,u=Math.min(e.length,t.length)-1;for(e[u]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<=u;)i.push(n(e[o-1],e[o])),s.push(r(t[o-1],t[o]));return function(t){var n=$o.bisect(e,t,1,u)-1;return s[n](i[n](t))}}function qs(e,t,n,r){function i(){var i=Math.min(e.length,t.length)>2?Is:Bs,a=r?ji:Bi;return o=i(e,t,a,n),u=i(t,e,a,hi),s}function s(e){return o(e)}var o,u;return s.invert=function(e){return u(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},s.range=function(e){return arguments.length?(t=e,i()):t},s.rangeRound=function(e){return s.range(e).interpolate(Oi)},s.clamp=function(e){return arguments.length?(r=e,i()):r},s.interpolate=function(e){return arguments.length?(n=e,i()):n},s.ticks=function(t){return Ws(e,t)},s.tickFormat=function(t,n){return Xs(e,t,n)},s.nice=function(t){return Us(e,t),i()},s.copy=function(){return qs(e,t,n,r)},i()}function Rs(e,t){return $o.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Us(e,t){return js(e,Fs(zs(e,t)[2]))}function zs(e,t){null==t&&(t=10);var n=Ps(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;return.15>=s?i*=10:.35>=s?i*=5:.75>=s&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function Ws(e,t){return $o.range.apply($o,zs(e,t))}function Xs(e,t,n){var r=zs(e,t);return $o.format(n?n.replace(ea,function(e,t,n,i,s,o,u,a,f,l){return[t,n,i,s,o,u,a,f||"."+$s(l,r),l].join("")}):",."+Vs(r[2])+"f")}function Vs(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function $s(e,t){var n=Vs(t[2]);return e in pf?Math.abs(n-Vs(Math.max(Math.abs(t[0]),Math.abs(t[1]))))+ +("e"!==e):n-2*("%"===e)}function Js(e,t,n,r){function i(e){return(n?Math.log(0>e?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function s(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function o(t){return e(i(t))}return o.invert=function(t){return s(e.invert(t))},o.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),o):r},o.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),o):t},o.nice=function(){var t=js(r.map(i),n?Math:vf);return e.domain(t),r=t.map(s),o},o.ticks=function(){var e=Ps(r),o=[],u=e[0],a=e[1],f=Math.floor(i(u)),l=Math.ceil(i(a)),c=t%1?2:t;if(isFinite(l-f)){if(n){for(;l>f;f++)for(var h=1;c>h;h++)o.push(s(f)*h);o.push(s(f))}else for(o.push(s(f));f++<l;)for(var h=c-1;h>0;h--)o.push(s(f)*h);for(f=0;o[f]<u;f++);for(l=o.length;o[l-1]>a;l--);o=o.slice(f,l)}return o},o.tickFormat=function(e,t){if(!arguments.length)return df;arguments.length<2?t=df:"function"!=typeof t&&(t=$o.format(t));var r,u=Math.max(.1,e/o.ticks().length),a=n?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(e){return e/s(a(i(e)+r))<=u?t(e):""}},o.copy=function(){return Js(e.copy(),t,n,r)},Rs(o,e)}function Ks(e,t,n){function r(t){return e(i(t))}var i=Qs(t),s=Qs(1/t);return r.invert=function(t){return s(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),r):n},r.ticks=function(e){return Ws(n,e)},r.tickFormat=function(e,t){return Xs(n,e,t)},r.nice=function(e){return r.domain(Us(n,e))},r.exponent=function(o){return arguments.length?(i=Qs(t=o),s=Qs(1/t),e.domain(n.map(i)),r):t},r.copy=function(){return Ks(e.copy(),t,n)},Rs(r,e)}function Qs(e){return function(t){return 0>t?-Math.pow(-t,e):Math.pow(t,e)}}function Gs(e,t){function n(n){return o[((s.get(n)||"range"===t.t&&s.set(n,e.push(n)))-1)%o.length]}function r(t,n){return $o.range(e.length).map(function(e){return t+n*e})}var s,o,u;return n.domain=function(r){if(!arguments.length)return e;e=[],s=new i;for(var o,u=-1,a=r.length;++u<a;)s.has(o=r[u])||s.set(o,e.push(o));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(o=e,u=0,t={t:"range",a:arguments},n):o},n.rangePoints=function(i,s){arguments.length<2&&(s=0);var a=i[0],f=i[1],l=(f-a)/(Math.max(1,e.length-1)+s);return o=r(e.length<2?(a+f)/2:a+l*s/2,l),u=0,t={t:"rangePoints",a:arguments},n},n.rangeBands=function(i,s,a){arguments.length<2&&(s=0),arguments.length<3&&(a=s);var f=i[1]<i[0],l=i[f-0],c=i[1-f],h=(c-l)/(e.length-s+2*a);return o=r(l+h*a,h),f&&o.reverse(),u=h*(1-s),t={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(i,s,a){arguments.length<2&&(s=0),arguments.length<3&&(a=s);var f=i[1]<i[0],l=i[f-0],c=i[1-f],h=Math.floor((c-l)/(e.length-s+2*a)),p=c-l-(e.length-s)*h;return o=r(l+Math.round(p/2),h),f&&o.reverse(),u=Math.round(h*(1-s)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return u},n.rangeExtent=function(){return Ps(t.a[0])},n.copy=function(){return Gs(e,t)},n.domain(e)}function Ys(e,t){function n(){var n=0,s=t.length;for(i=[];++n<s;)i[n-1]=$o.quantile(e,n/s);return r}function r(e){return isNaN(e=+e)?void 0:t[$o.bisect(i,e)]}var i;return r.domain=function(t){return arguments.length?(e=t.filter(function(e){return!isNaN(e)}).sort($o.ascending),n()):e},r.range=function(e){return arguments.length?(t=e,n()):t},r.quantiles=function(){return i},r.invertExtent=function(n){return n=t.indexOf(n),0>n?[0/0,0/0]:[n>0?i[n-1]:e[0],n<i.length?i[n]:e[e.length-1]]},r.copy=function(){return Ys(e,t)},n()}function Zs(e,t,n){function r(t){return n[Math.max(0,Math.min(o,Math.floor(s*(t-e))))]}function i(){return s=n.length/(t-e),o=n.length-1,r}var s,o;return r.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],i()):[e,t]},r.range=function(e){return arguments.length?(n=e,i()):n},r.invertExtent=function(t){return t=n.indexOf(t),t=0>t?0/0:t/s+e,[t,t+1/s]},r.copy=function(){return Zs(e,t,n)},i()}function eo(e,t){function n(n){return n>=n?t[$o.bisect(e,n)]:void 0}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.invertExtent=function(n){return n=t.indexOf(n),[e[n-1],e[n]]},n.copy=function(){return eo(e,t)},n}function to(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return Ws(e,t)},t.tickFormat=function(t,n){return Xs(e,t,n)},t.copy=function(){return to(e)},t}function no(e){return e.innerRadius}function ro(e){return e.outerRadius}function io(e){return e.startAngle}function so(e){return e.endAngle}function oo(e){function t(t){function o(){f.push("M",s(e(l),u))}for(var a,f=[],l=[],c=-1,h=t.length,p=Et(n),d=Et(r);++c<h;)i.call(this,a=t[c],c)?l.push([+p.call(this,a,c),+d.call(this,a,c)]):l.length&&(o(),l=[]);return l.length&&o(),f.length?f.join(""):null}var n=xr,r=Tr,i=xn,s=uo,o=s.key,u=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t.defined=function(e){return arguments.length?(i=e,t):i},t.interpolate=function(e){return arguments.length?(o="function"==typeof e?s=e:(s=Sf.get(e)||uo).key,t):o},t.tension=function(e){return arguments.length?(u=e,t):u},t}function uo(e){return e.join("L")}function ao(e){return uo(e)+"Z"}function fo(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r[0]+(r=e[t])[0])/2,"V",r[1]);return n>1&&i.push("H",r[0]),i.join("")}function lo(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function co(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function ho(e,t){return e.length<4?uo(e):e[1]+mo(e.slice(1,e.length-1),go(e,t))}function po(e,t){return e.length<3?uo(e):e[0]+mo((e.push(e[0]),e),go([e[e.length-2]].concat(e,[e[1]]),t))}function vo(e,t){return e.length<3?uo(e):e[0]+mo(e,go(e,t))}function mo(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return uo(e);var n=e.length!=t.length,r="",i=e[0],s=e[1],o=t[0],u=o,a=1;if(n&&(r+="Q"+(s[0]-2*o[0]/3)+","+(s[1]-2*o[1]/3)+","+s[0]+","+s[1],i=e[1],a=2),t.length>1){u=t[1],s=e[a],a++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f<t.length;f++,a++)s=e[a],u=t[f],r+="S"+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1]}if(n){var l=e[a];r+="Q"+(s[0]+2*u[0]/3)+","+(s[1]+2*u[1]/3)+","+l[0]+","+l[1]}return r}function go(e,t){for(var n,r=[],i=(1-t)/2,s=e[0],o=e[1],u=1,a=e.length;++u<a;)n=s,s=o,o=e[u],r.push([i*(o[0]-n[0]),i*(o[1]-n[1])]);return r}function yo(e){if(e.length<3)return uo(e);var t=1,n=e.length,r=e[0],i=r[0],s=r[1],o=[i,i,i,(r=e[1])[0]],u=[s,s,s,r[1]],a=[i,",",s,"L",So(Nf,o),",",So(Nf,u)];for(e.push(e[n-1]);++t<=n;)r=e[t],o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),xo(a,o,u);return e.pop(),a.push("L",r),a.join("")}function bo(e){if(e.length<4)return uo(e);for(var t,n=[],r=-1,i=e.length,s=[0],o=[0];++r<3;)t=e[r],s.push(t[0]),o.push(t[1]);for(n.push(So(Nf,s)+","+So(Nf,o)),--r;++r<i;)t=e[r],s.shift(),s.push(t[0]),o.shift(),o.push(t[1]),xo(n,s,o);return n.join("")}function wo(e){for(var t,n,r=-1,i=e.length,s=i+4,o=[],u=[];++r<4;)n=e[r%i],o.push(n[0]),u.push(n[1]);for(t=[So(Nf,o),",",So(Nf,u)],--r;++r<s;)n=e[r%i],o.shift(),o.push(n[0]),u.shift(),u.push(n[1]),xo(t,o,u);return t.join("")}function Eo(e,t){var n=e.length-1;if(n)for(var r,i,s=e[0][0],o=e[0][1],u=e[n][0]-s,a=e[n][1]-o,f=-1;++f<=n;)r=e[f],i=f/n,r[0]=t*r[0]+(1-t)*(s+i*u),r[1]=t*r[1]+(1-t)*(o+i*a);return yo(e)}function So(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function xo(e,t,n){e.push("C",So(xf,t),",",So(xf,n),",",So(Tf,t),",",So(Tf,n),",",So(Nf,t),",",So(Nf,n))}function To(e,t){return(t[1]-e[1])/(t[0]-e[0])}function No(e){for(var t=0,n=e.length-1,r=[],i=e[0],s=e[1],o=r[0]=To(i,s);++t<n;)r[t]=(o+(o=To(i=s,s=e[t+1])))/2;return r[t]=o,r}function Co(e){for(var t,n,r,i,s=[],o=No(e),u=-1,a=e.length-1;++u<a;)t=To(e[u],e[u+1]),uu(t)<Lu?o[u]=o[u+1]=0:(n=o[u]/t,r=o[u+1]/t,i=n*n+r*r,i>9&&(i=3*t/Math.sqrt(i),o[u]=i*n,o[u+1]=i*r));for(u=-1;++u<=a;)i=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),s.push([i||0,o[u]*i||0]);return s}function ko(e){return e.length<3?uo(e):e[0]+mo(e,Co(e))}function Lo(e){for(var t,n,r,i=-1,s=e.length;++i<s;)t=e[i],n=t[0],r=t[1]+wf,t[0]=n*Math.cos(r),t[1]=n*Math.sin(r);return e}function Ao(e){function t(t){function a(){v.push("M",u(e(g),c),l,f(e(m.reverse()),c),"Z")}for(var h,p,d,v=[],m=[],g=[],y=-1,b=t.length,w=Et(n),E=Et(i),S=n===r?function(){return p}:Et(r),x=i===s?function(){return d}:Et(s);++y<b;)o.call(this,h=t[y],y)?(m.push([p=+w.call(this,h,y),d=+E.call(this,h,y)]),g.push([+S.call(this,h,y),+x.call(this,h,y)])):m.length&&(a(),m=[],g=[]);return m.length&&a(),v.length?v.join(""):null}var n=xr,r=xr,i=0,s=Tr,o=xn,u=uo,a=u.key,f=u,l="L",c=.7;return t.x=function(e){return arguments.length?(n=r=e,t):r},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(r=e,t):r},t.y=function(e){return arguments.length?(i=s=e,t):s},t.y0=function(e){return arguments.length?(i=e,t):i},t.y1=function(e){return arguments.length?(s=e,t):s},t.defined=function(e){return arguments.length?(o=e,t):o},t.interpolate=function(e){return arguments.length?(a="function"==typeof e?u=e:(u=Sf.get(e)||uo).key,f=u.reverse||u,l=u.closed?"M":"L",t):a},t.tension=function(e){return arguments.length?(c=e,t):c},t}function Oo(e){return e.radius}function Mo(e){return[e.x,e.y]}function _o(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+wf;return[n*Math.cos(r),n*Math.sin(r)]}}function Do(){return 64}function Po(){return"circle"}function Ho(e){var t=Math.sqrt(e/Nu);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+ -t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bo(e,t){return hu(e,Mf),e.id=t,e}function jo(e,t,n,r){var i=e.id;return P(e,"function"==typeof n?function(e,s,o){e.__transition__[i].tween.set(t,r(n.call(e,e.__data__,s,o)))}:(n=r(n),function(e){e.__transition__[i].tween.set(t,n)}))}function Fo(e){return null==e&&(e=""),function(){this.textContent=e}}function Io(e,t,n,r){var s=e.__transition__||(e.__transition__={active:0,count:0}),o=s[n];if(!o){var u=r.time;o=s[n]={tween:new i,time:u,ease:r.ease,delay:r.delay,duration:r.duration},++s.count,$o.timer(function(r){function i(r){return s.active>n?f():(s.active=n,o.event&&o.event.start.call(e,l,t),o.tween.forEach(function(n,r){(r=r.call(e,l,t))&&v.push(r)}),$o.timer(function(){return d.c=a(r||1)?xn:a,1},0,u),void 0)}function a(r){if(s.active!==n)return f();for(var i=r/p,u=c(i),a=v.length;a>0;)v[--a].call(e,u);return i>=1?(o.event&&o.event.end.call(e,l,t),f()):void 0}function f(){return--s.count?delete s[n]:delete e.__transition__,1}var l=e.__data__,c=o.ease,h=o.delay,p=o.duration,d=Gu,v=[];return d.t=h+u,r>=h?i(r-h):(d.c=i,void 0)},0,u)}}function qo(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function Ro(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function Uo(e){return e.toISOString()}function zo(e,t,n){function r(t){return e(t)}function i(e,n){var r=e[1]-e[0],i=r/n,s=$o.bisect(qf,i);return s==qf.length?[t.year,zs(e.map(function(e){return e/31536e6}),n)[2]]:s?t[i/qf[s-1]<qf[s]/i?s-1:s]:[zf,zs(e,n)[2]]}return r.invert=function(t){return Wo(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(Wo)},r.nice=function(e,t){function n(n){return!isNaN(n)&&!e.range(n,Wo(+n+1),t).length}var s=r.domain(),o=Ps(s),u=null==e?i(o,10):"number"==typeof e&&i(o,e);return u&&(e=u[0],t=u[1]),r.domain(js(s,t>1?{floor:function(t){for(;n(t=e.floor(t));)t=Wo(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=Wo(+t+1);return t}}:e))},r.ticks=function(e,t){var n=Ps(r.domain()),s=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return s&&(e=s[0],t=s[1]),e.range(n[0],Wo(+n[1]+1),1>t?1:t)},r.tickFormat=function(){return n},r.copy=function(){return zo(e.copy(),t,n)},Rs(r,e)}function Wo(e){return new Date(e)}function Xo(e){return JSON.parse(e.responseText)}function Vo(e){var t=Qo.createRange();return t.selectNode(Qo.body),t.createContextualFragment(e.responseText)}var $o={version:"3.4.3"};Date.now||(Date.now=function(){return+(new Date)});var Jo=[].slice,Ko=function(e){return Jo.call(e)},Qo=document,Go=Qo.documentElement,Yo=window;try{Ko(Go.childNodes)[0].nodeType}catch(Zo){Ko=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}try{Qo.createElement("div").style.setProperty("opacity",0,"")}catch(eu){var tu=Yo.Element.prototype,nu=tu.setAttribute,ru=tu.setAttributeNS,iu=Yo.CSSStyleDeclaration.prototype,su=iu.setProperty;tu.setAttribute=function(e,t){nu.call(this,e,t+"")},tu.setAttributeNS=function(e,t,n){ru.call(this,e,t,n+"")},iu.setProperty=function(e,t,n){su.call(this,e,t+"",n)}}$o.ascending=function(e,t){return t>e?-1:e>t?1:e>=t?0:0/0},$o.descending=function(e,t){return e>t?-1:t>e?1:t>=e?0:0/0},$o.min=function(e,t){var n,r,i=-1,s=e.length;if(1===arguments.length){for(;++i<s&&!(null!=(n=e[i])&&n>=n);)n=void 0;for(;++i<s;)null!=(r=e[i])&&n>r&&(n=r)}else{for(;++i<s&&!(null!=(n=t.call(e,e[i],i))&&n>=n);)n=void 0;for(;++i<s;)null!=(r=t.call(e,e[i],i))&&n>r&&(n=r)}return n},$o.max=function(e,t){var n,r,i=-1,s=e.length;if(1===arguments.length){for(;++i<s&&!(null!=(n=e[i])&&n>=n);)n=void 0;for(;++i<s;)null!=(r=e[i])&&r>n&&(n=r)}else{for(;++i<s&&!(null!=(n=t.call(e,e[i],i))&&n>=n);)n=void 0;for(;++i<s;)null!=(r=t.call(e,e[i],i))&&r>n&&(n=r)}return n},$o.extent=function(e,t){var n,r,i,s=-1,o=e.length;if(1===arguments.length){for(;++s<o&&!(null!=(n=i=e[s])&&n>=n);)n=i=void 0;for(;++s<o;)null!=(r=e[s])&&(n>r&&(n=r),r>i&&(i=r))}else{for(;++s<o&&!(null!=(n=i=t.call(e,e[s],s))&&n>=n);)n=void 0;for(;++s<o;)null!=(r=t.call(e,e[s],s))&&(n>r&&(n=r),r>i&&(i=r))}return[n,i]},$o.sum=function(e,t){var n,r=0,i=e.length,s=-1;if(1===arguments.length)for(;++s<i;)isNaN(n=+e[s])||(r+=n);else for(;++s<i;)isNaN(n=+t.call(e,e[s],s))||(r+=n);return r},$o.mean=function(t,n){var r,i=t.length,s=0,o=-1,u=0;if(1===arguments.length)for(;++o<i;)e(r=t[o])&&(s+=(r-s)/++u);else for(;++o<i;)e(r=n.call(t,t[o],o))&&(s+=(r-s)/++u);return u?s:void 0},$o.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],s=n-r;return s?i+s*(e[r]-i):i},$o.median=function(t,n){return arguments.length>1&&(t=t.map(n)),t=t.filter(e),t.length?$o.quantile(t.sort($o.ascending),.5):void 0},$o.bisector=function(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var s=r+i>>>1;e.call(t,t[s],s)<n?r=s+1:i=s}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var s=r+i>>>1;n<e.call(t,t[s],s)?i=s:r=s+1}return r}}};var ou=$o.bisector(function(e){return e});$o.bisectLeft=ou.left,$o.bisect=$o.bisectRight=ou.right,$o.shuffle=function(e){for(var t,n,r=e.length;r;)n=0|Math.random()*r--,t=e[r],e[r]=e[n],e[n]=t;return e},$o.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},$o.pairs=function(e){for(var t,n=0,r=e.length-1,i=e[0],s=new Array(0>r?0:r);r>n;)s[n]=[t=i,i=e[++n]];return s},$o.zip=function(){if(!(i=arguments.length))return[];for(var e=-1,n=$o.min(arguments,t),r=new Array(n);++e<n;)for(var i,s=-1,o=r[e]=new Array(i);++s<i;)o[s]=arguments[s][e];return r},$o.transpose=function(e){return $o.zip.apply($o,e)},$o.keys=function(e){var t=[];for(var n in e)t.push(n);return t},$o.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},$o.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},$o.merge=function(e){for(var t,n,r,i=e.length,s=-1,o=0;++s<i;)o+=e[s].length;for(n=new Array(o);--i>=0;)for(r=e[i],t=r.length;--t>=0;)n[--o]=r[t];return n};var uu=Math.abs;$o.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),1/0===(t-e)/r)throw new Error("infinite range");var i,s=[],o=n(uu(r)),u=-1;if(e*=o,t*=o,r*=o,0>r)for(;(i=e+r*++u)>t;)s.push(i/o);else for(;(i=e+r*++u)<t;)s.push(i/o);return s},$o.map=function(e){var t=new i;if(e instanceof i)e.forEach(function(e,n){t.set(e,n)});else for(var n in e)t.set(n,e[n]);return t},r(i,{has:s,get:function(e){return this[au+e]},set:function(e,t){return this[au+e]=t},remove:o,keys:u,values:function(){var e=[];return this.forEach(function(t,n){e.push(n)}),e},entries:function(){var e=[];return this.forEach(function(t,n){e.push({key:t,value:n})}),e},size:a,empty:f,forEach:function(e){for(var t in this)t.charCodeAt(0)===fu&&e.call(this,t.substring(1),this[t])}});var au="\0",fu=au.charCodeAt(0);$o.nest=function(){function e(t,u,a){if(a>=o.length)return r?r.call(s,u):n?u.sort(n):u;for(var f,l,c,h,p=-1,d=u.length,v=o[a++],m=new i;++p<d;)(h=m.get(f=v(l=u[p])))?h.push(l):m.set(f,[l]);return t?(l=t(),c=function(n,r){l.set(n,e(t,r,a))}):(l={},c=function(n,r){l[n]=e(t,r,a)}),m.forEach(c),l}function t(e,n){if(n>=o.length)return e;var r=[],i=u[n++];return e.forEach(function(e,i){r.push({key:e,values:t(i,n)})}),i?r.sort(function(e,t){return i(e.key,t.key)}):r}var n,r,s={},o=[],u=[];return s.map=function(t,n){return e(n,t,0)},s.entries=function(n){return t(e($o.map,n,0),0)},s.key=function(e){return o.push(e),s},s.sortKeys=function(e){return u[o.length-1]=e,s},s.sortValues=function(e){return n=e,s},s.rollup=function(e){return r=e,s},s},$o.set=function(e){var t=new l;if(e)for(var n=0,r=e.length;r>n;++n)t.add(e[n]);return t},r(l,{has:s,add:function(e){return this[au+e]=!0,e},remove:function(e){return e=au+e,e in this&&delete this[e]},values:u,size:a,empty:f,forEach:function(e){for(var t in this)t.charCodeAt(0)===fu&&e.call(this,t.substring(1))}}),$o.behavior={},$o.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=c(e,t,t[n]);return e};var lu=["webkit","ms","moz","Moz","o","O"];$o.dispatch=function(){for(var e=new d,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=v(e);return e},d.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.substring(n+1),e=e.substring(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},$o.event=null,$o.requote=function(e){return e.replace(cu,"\\$&")};var cu=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,hu={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},pu=function(e,t){return t.querySelector(e)},du=function(e,t){return t.querySelectorAll(e)},vu=Go[h(Go,"matchesSelector")],mu=function(e,t){return vu.call(e,t)};"function"==typeof Sizzle&&(pu=function(e,t){return Sizzle(e,t)[0]||null},du=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))},mu=Sizzle.matchesSelector),$o.selection=function(){return wu};var gu=$o.selection.prototype=[];gu.select=function(e){var t,n,r,i,s=[];e=w(e);for(var o=-1,u=this.length;++o<u;){s.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var a=-1,f=r.length;++a<f;)(i=r[a])?(t.push(n=e.call(i,i.__data__,a,o)),n&&"__data__"in i&&(n.__data__=i.__data__)):t.push(null)}return b(s)},gu.selectAll=function(e){var t,n,r=[];e=E(e);for(var i=-1,s=this.length;++i<s;)for(var o=this[i],u=-1,a=o.length;++u<a;)(n=o[u])&&(r.push(t=Ko(e.call(n,n.__data__,u,i))),t.parentNode=n);return b(r)};var yu={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};$o.ns={prefix:yu,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.substring(0,t),e=e.substring(t+1)),yu.hasOwnProperty(n)?{space:yu[n],local:e}:e}},gu.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=$o.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(S(t,e[t]));return this}return this.each(S(e,t))},gu.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=N(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else for(t=n.getAttribute("class");++i<r;)if(!T(e[i]).test(t))return!1;return!0}for(t in e)this.each(C(t,e[t]));return this}return this.each(C(e,t))},gu.style=function(e,t,n){var r=arguments.length;if(3>r){if("string"!=typeof e){2>r&&(t="");for(n in e)this.each(L(n,e[n],t));return this}if(2>r)return Yo.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(L(e,t,n))},gu.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(A(t,e[t]));return this}return this.each(A(e,t))},gu.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},gu.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},gu.append=function(e){return e=O(e),this.select(function(){return this.appendChild(e.apply(this,arguments))})},gu.insert=function(e,t){return e=O(e),t=w(t),this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})},gu.remove=function(){return this.each(function(){var e=this.parentNode;e&&e.removeChild(this)})},gu.data=function(e,t){function n(e,n){var r,s,o,u=e.length,c=n.length,h=Math.min(u,c),p=new Array(c),d=new Array(c),v=new Array(u);if(t){var m,g=new i,y=new i,b=[];for(r=-1;++r<u;)m=t.call(s=e[r],s.__data__,r),g.has(m)?v[r]=s:g.set(m,s),b.push(m);for(r=-1;++r<c;)m=t.call(n,o=n[r],r),(s=g.get(m))?(p[r]=s,s.__data__=o):y.has(m)||(d[r]=M(o)),y.set(m,o),g.remove(m);for(r=-1;++r<u;)g.has(b[r])&&(v[r]=e[r])}else{for(r=-1;++r<h;)s=e[r],o=n[r],s?(s.__data__=o,p[r]=s):d[r]=M(o);for(;c>r;++r)d[r]=M(n[r]);for(;u>r;++r)v[r]=e[r]}d.update=p,d.parentNode=p.parentNode=v.parentNode=e.parentNode,a.push(d),f.push(p),l.push(v)}var r,s,o=-1,u=this.length;if(!arguments.length){for(e=new Array(u=(r=this[0]).length);++o<u;)(s=r[o])&&(e[o]=s.__data__);return e}var a=H([]),f=b([]),l=b([]);if("function"==typeof e)for(;++o<u;)n(r=this[o],e.call(r,r.parentNode.__data__,o));else for(;++o<u;)n(r=this[o],e);return f.enter=function(){return a},f.exit=function(){return l},f},gu.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},gu.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=_(e));for(var s=0,o=this.length;o>s;s++){i.push(t=[]),t.parentNode=(n=this[s]).parentNode;for(var u=0,a=n.length;a>u;u++)(r=n[u])&&e.call(r,r.__data__,u,s)&&t.push(r)}return b(i)},gu.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],i=r.length-1,s=r[i];--i>=0;)(n=r[i])&&(s&&s!==n.nextSibling&&s.parentNode.insertBefore(n,s),s=n);return this},gu.sort=function(e){e=D.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},gu.each=function(e){return P(this,function(t,n,r){e.call(t,t.__data__,n,r)})},gu.call=function(e){var t=Ko(arguments);return e.apply(t[0]=this,t),this},gu.empty=function(){return!this.node()},gu.node=function(){for(var e=0,t=this.length;t>e;e++)for(var n=this[e],r=0,i=n.length;i>r;r++){var s=n[r];if(s)return s}return null},gu.size=function(){var e=0;return this.each(function(){++e}),e};var bu=[];$o.selection.enter=H,$o.selection.enter.prototype=bu,bu.append=gu.append,bu.empty=gu.empty,bu.node=gu.node,bu.call=gu.call,bu.size=gu.size,bu.select=function(e){for(var t,n,r,i,s,o=[],u=-1,a=this.length;++u<a;){r=(i=this[u]).update,o.push(t=[]),t.parentNode=i.parentNode;for(var f=-1,l=i.length;++f<l;)(s=i[f])?(t.push(r[f]=n=e.call(i.parentNode,s.__data__,f,u)),n.__data__=s.__data__):t.push(null)}return b(o)},bu.insert=function(e,t){return arguments.length<2&&(t=B(this)),gu.insert.call(this,e,t)},gu.transition=function(){for(var e,t,n=kf||++_f,r=[],i=Lf||{time:Date.now(),ease:bi,delay:0,duration:250},s=-1,o=this.length;++s<o;){r.push(e=[]);for(var u=this[s],a=-1,f=u.length;++a<f;)(t=u[a])&&Io(t,a,n,i),e.push(t)}return Bo(r,n)},gu.interrupt=function(){return this.each(j)},$o.select=function(e){var t=["string"==typeof e?pu(e,Qo):e];return t.parentNode=Go,b([t])},$o.selectAll=function(e){var t=Ko("string"==typeof e?du(e,Qo):e);return t.parentNode=Go,b([t])};var wu=$o.select(Go);gu.on=function(e,t,n){var r=arguments.length;if(3>r){if("string"!=typeof e){2>r&&(t=!1);for(n in e)this.each(F(n,e[n],t));return this}if(2>r)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(F(e,t,n))};var Eu=$o.map({mouseenter:"mouseover",mouseleave:"mouseout"});Eu.forEach(function(e){"on"+e in Qo&&Eu.remove(e)});var Su="onselectstart"in Qo?null:h(Go.style,"userSelect"),xu=0;$o.mouse=function(e){return U(e,g())};var Tu=/WebKit/.test(Yo.navigator.userAgent)?-1:0;$o.touches=function(e,t){return arguments.length<2&&(t=g().touches),t?Ko(t).map(function(t){var n=U(e,t);return n.identifier=t.identifier,n}):[]},$o.behavior.drag=function(){function e(){this.on("mousedown.drag",o).on("touchstart.drag",u)}function t(){return $o.event.changedTouches[0].identifier}function n(e,t){return $o.touches(e).filter(function(e){return e.identifier===t})[0]}function r(e,t,n,r){return function(){function o(){var e=t(l,p),n=e[0]-v[0],r=e[1]-v[1];m|=n|r,v=e,c({type:"drag",x:e[0]+a[0],y:e[1]+a[1],dx:n,dy:r})}function u(){g.on(n+"."+d,null).on(r+"."+d,null),y(m&&$o.event.target===h),c({type:"dragend"})}var a,f=this,l=f.parentNode,c=i.of(f,arguments),h=$o.event.target,p=e(),d=null==p?"drag":"drag-"+p,v=t(l,p),m=0,g=$o.select(Yo).on(n+"."+d,o).on(r+"."+d,u),y=R();s?(a=s.apply(f,arguments),a=[a.x-v[0],a.y-v[1]]):a=[0,0],c({type:"dragstart"})}}var i=y(e,"drag","dragstart","dragend"),s=null,o=r(p,$o.mouse,"mousemove","mouseup"),u=r(t,n,"touchmove","touchend");return e.origin=function(t){return arguments.length?(s=t,e):s},$o.rebind(e,i,"on")};var Nu=Math.PI,Cu=2*Nu,ku=Nu/2,Lu=1e-6,Au=Lu*Lu,Ou=Nu/180,Mu=180/Nu,_u=Math.SQRT2,Du=2,Pu=4;$o.interpolateZoom=function(e,t){function n(e){var t=e*y;if(g){var n=J(v),o=s/(Du*h)*(n*K(_u*t+v)-$(v));return[r+o*f,i+o*l,s*n/J(_u*t+v)]}return[r+e*f,i+e*l,s*Math.exp(_u*t)]}var r=e[0],i=e[1],s=e[2],o=t[0],u=t[1],a=t[2],f=o-r,l=u-i,c=f*f+l*l,h=Math.sqrt(c),p=(a*a-s*s+Pu*c)/(2*s*Du*h),d=(a*a-s*s-Pu*c)/(2*a*Du*h),v=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(d*d+1)-d),g=m-v,y=(g||Math.log(a/s))/_u;return n.duration=1e3*y,n},$o.behavior.zoom=function(){function e(e){e.on(k,f).on(ju+".zoom",c).on(L,h).on("dblclick.zoom",p).on(O,l)}function t(e){return[(e[0]-T.x)/T.k,(e[1]-T.y)/T.k]}function n(e){return[e[0]*T.k+T.x,e[1]*T.k+T.y]}function r(e){T.k=Math.max(C[0],Math.min(C[1],e))}function i(e,t){t=n(t),T.x+=e[0]-t[0],T.y+=e[1]-t[1]}function s(){E&&E.domain(w.range().map(function(e){return(e-T.x)/T.k}).map(w.invert)),x&&x.domain(S.range().map(function(e){return(e-T.y)/T.k}).map(S.invert))}function o(e){e({type:"zoomstart"})}function u(e){s(),e({type:"zoom",scale:T.k,translate:[T.x,T.y]})}function a(e){e({type:"zoomend"})}function f(){function e(){l=1,i($o.mouse(r),p),u(s)}function n(){c.on(L,Yo===r?h:null).on(A,null),d(l&&$o.event.target===f),a(s)}var r=this,s=M.of(r,arguments),f=$o.event.target,l=0,c=$o.select(Yo).on(L,e).on(A,n),p=t($o.mouse(r)),d=R();j.call(r),o(s)}function l(){function e(){var e=$o.touches(p);return h=T.k,e.forEach(function(e){e.identifier in v&&(v[e.identifier]=t(e))}),e}function n(){for(var t=$o.event.changedTouches,n=0,s=t.length;s>n;++n)v[t[n].identifier]=null;var o=e(),a=Date.now();if(1===o.length){if(500>a-b){var f=o[0],l=v[f.identifier];r(2*T.k),i(f,l),m(),u(d)}b=a}else if(o.length>1){var f=o[0],c=o[1],h=f[0]-c[0],p=f[1]-c[1];g=h*h+p*p}}function s(){for(var e,t,n,s,o=$o.touches(p),a=0,f=o.length;f>a;++a,s=null)if(n=o[a],s=v[n.identifier]){if(t)break;e=n,t=s}if(s){var l=(l=n[0]-e[0])*l+(l=n[1]-e[1])*l,c=g&&Math.sqrt(l/g);e=[(e[0]+n[0])/2,(e[1]+n[1])/2],t=[(t[0]+s[0])/2,(t[1]+s[1])/2],r(c*h)}b=null,i(e,t),u(d)}function c(){if($o.event.touches.length){for(var t=$o.event.changedTouches,n=0,r=t.length;r>n;++n)delete v[t[n].identifier];for(var i in v)return void e()}S.on(w,null).on(E,null),x.on(k,f).on(O,l),N(),a(d)}var h,p=this,d=M.of(p,arguments),v={},g=0,y=$o.event.changedTouches[0].identifier,w="touchmove.zoom-"+y,E="touchend.zoom-"+y,S=$o.select(Yo).on(w,s).on(E,c),x=$o.select(p).on(k,null).on(O,n),N=R();j.call(p),n(),o(d)}function c(){var e=M.of(this,arguments);g?clearTimeout(g):(j.call(this),o(e)),g=setTimeout(function(){g=null,a(e)},50),m();var n=v||$o.mouse(this);d||(d=t(n)),r(Math.pow(2,.002*Hu())*T.k),i(n,d),u(e)}function h(){d=null}function p(){var e=M.of(this,arguments),n=$o.mouse(this),s=t(n),f=Math.log(T.k)/Math.LN2;o(e),r(Math.pow(2,$o.event.shiftKey?Math.ceil(f)-1:Math.floor(f)+1)),i(n,s),u(e),a(e)}var d,v,g,b,w,E,S,x,T={x:0,y:0,k:1},N=[960,500],C=Bu,k="mousedown.zoom",L="mousemove.zoom",A="mouseup.zoom",O="touchstart.zoom",M=y(e,"zoomstart","zoom","zoomend");return e.event=function(e){e.each(function(){var e=M.of(this,arguments),t=T;kf?$o.select(this).transition().each("start.zoom",function(){T=this.__chart__||{x:0,y:0,k:1},o(e)}).tween("zoom:zoom",function(){var n=N[0],r=N[1],i=n/2,s=r/2,o=$o.interpolateZoom([(i-T.x)/T.k,(s-T.y)/T.k,n/T.k],[(i-t.x)/t.k,(s-t.y)/t.k,n/t.k]);return function(t){var r=o(t),a=n/r[2];this.__chart__=T={x:i-r[0]*a,y:s-r[1]*a,k:a},u(e)}}).each("end.zoom",function(){a(e)}):(this.__chart__=T,o(e),u(e),a(e))})},e.translate=function(t){return arguments.length?(T={x:+t[0],y:+t[1],k:T.k},s(),e):[T.x,T.y]},e.scale=function(t){return arguments.length?(T={x:T.x,y:T.y,k:+t},s(),e):T.k},e.scaleExtent=function(t){return arguments.length?(C=null==t?Bu:[+t[0],+t[1]],e):C},e.center=function(t){return arguments.length?(v=t&&[+t[0],+t[1]],e):v},e.size=function(t){return arguments.length?(N=t&&[+t[0],+t[1]],e):N},e.x=function(t){return arguments.length?(E=t,w=t.copy(),T={x:0,y:0,k:1},e):E},e.y=function(t){return arguments.length?(x=t,S=t.copy(),T={x:0,y:0,k:1},e):x},$o.rebind(e,M,"on")};var Hu,Bu=[0,1/0],ju="onwheel"in Qo?(Hu=function(){return-$o.event.deltaY*($o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Qo?(Hu=function(){return $o.event.wheelDelta},"mousewheel"):(Hu=function(){return-$o.event.detail},"MozMousePixelScroll");G.prototype.toString=function(){return this.rgb()+""},$o.hsl=function(e,t,n){return 1===arguments.length?e instanceof Z?Y(e.h,e.s,e.l):mt(""+e,gt,Y):Y(+e,+t,+n)};var Fu=Z.prototype=new G;Fu.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),Y(this.h,this.s,this.l/e)},Fu.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),Y(this.h,this.s,e*this.l)},Fu.rgb=function(){return et(this.h,this.s,this.l)},$o.hcl=function(e,t,n){return 1===arguments.length?e instanceof nt?tt(e.h,e.c,e.l):e instanceof st?ut(e.l,e.a,e.b):ut((e=yt((e=$o.rgb(e)).r,e.g,e.b)).l,e.a,e.b):tt(+e,+t,+n)};var Iu=nt.prototype=new G;Iu.brighter=function(e){return tt(this.h,this.c,Math.min(100,this.l+qu*(arguments.length?e:1)))},Iu.darker=function(e){return tt(this.h,this.c,Math.max(0,this.l-qu*(arguments.length?e:1)))},Iu.rgb=function(){return rt(this.h,this.c,this.l).rgb()},$o.lab=function(e,t,n){return 1===arguments.length?e instanceof st?it(e.l,e.a,e.b):e instanceof nt?rt(e.l,e.c,e.h):yt((e=$o.rgb(e)).r,e.g,e.b):it(+e,+t,+n)};var qu=18,Ru=.95047,Uu=1,zu=1.08883,Wu=st.prototype=new G;Wu.brighter=function(e){return it(Math.min(100,this.l+qu*(arguments.length?e:1)),this.a,this.b)},Wu.darker=function(e){return it(Math.max(0,this.l-qu*(arguments.length?e:1)),this.a,this.b)},Wu.rgb=function(){return ot(this.l,this.a,this.b)},$o.rgb=function(e,t,n){return 1===arguments.length?e instanceof dt?pt(e.r,e.g,e.b):mt(""+e,pt,et):pt(~~e,~~t,~~n)};var Xu=dt.prototype=new G;Xu.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&i>t&&(t=i),n&&i>n&&(n=i),r&&i>r&&(r=i),pt(Math.min(255,~~(t/e)),Math.min(255,~~(n/e)),Math.min(255,~~(r/e)))):pt(i,i,i)},Xu.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),pt(~~(e*this.r),~~(e*this.g),~~(e*this.b))},Xu.hsl=function(){return gt(this.r,this.g,this.b)},Xu.toString=function(){return"#"+vt(this.r)+vt(this.g)+vt(this.b)};var Vu=$o.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Vu.forEach(function(e,t){Vu.set(e,ct(t))}),$o.functor=Et,$o.xhr=xt(St),$o.dsv=function(e,t){function n(e,n,s){arguments.length<3&&(s=n,n=null);var o=Tt(e,t,null==n?r:i(n),s);return o.row=function(e){return arguments.length?o.response(null==(n=e)?r:i(e)):n},o}function r(e){return n.parse(e.responseText)}function i(e){return function(t){return n.parse(t.responseText,e)}}function s(t){return t.map(o).join(e)}function o(e){return u.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var u=new RegExp('["'+e+"\n]"),a=e.charCodeAt(0);return n.parse=function(e,t){var r;return n.parseRows(e,function(e,n){if(r)return r(e,n-1);var i=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");r=t?function(e,n){return t(i(e),n)}:i})},n.parseRows=function(e,t){function n(){if(l>=f)return o;if(i)return i=!1,s;var t=l;if(34===e.charCodeAt(t)){for(var n=t;n++<f;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}l=n+2;var r=e.charCodeAt(n+1);return 13===r?(i=!0,10===e.charCodeAt(n+2)&&++l):10===r&&(i=!0),e.substring(t+1,n).replace(/""/g,'"')}for(;f>l;){var r=e.charCodeAt(l++),u=1;if(10===r)i=!0;else if(13===r)i=!0,10===e.charCodeAt(l)&&(++l,++u);else if(r!==a)continue;return e.substring(t,l-u)}return e.substring(t)}for(var r,i,s={},o={},u=[],f=e.length,l=0,c=0;(r=n())!==o;){for(var h=[];r!==s&&r!==o;)h.push(r),r=n();(!t||(h=t(h,c++)))&&u.push(h)}return u},n.format=function(t){if(Array.isArray(t[0]))return n.formatRows(t);var r=new l,i=[];return t.forEach(function(e){for(var t in e)r.has(t)||i.push(r.add(t))}),[i.map(o).join(e)].concat(t.map(function(t){return i.map(function(e){return o(t[e])}).join(e)})).join("\n")},n.formatRows=function(e){return e.map(s).join("\n")},n},$o.csv=$o.dsv(",","text/csv"),$o.tsv=$o.dsv("	","text/tab-separated-values");var $u,Ju,Ku,Qu,Gu,Yu=Yo[h(Yo,"requestAnimationFrame")]||function(e){setTimeout(e,17)};$o.timer=function(e,t,n){var r=arguments.length;2>r&&(t=0),3>r&&(n=Date.now());var i=n+t,s={c:e,t:i,f:!1,n:null};Ju?Ju.n=s:$u=s,Ju=s,Ku||(Qu=clearTimeout(Qu),Ku=1,Yu(Ct))},$o.timer.flush=function(){kt(),Lt()},$o.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var Zu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Ot);$o.formatPrefix=function(e,t){var n=0;return e&&(0>e&&(e*=-1),t&&(e=$o.round(e,At(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((0>=n?n+1:n-1)/3)))),Zu[8+n/3]};var ea=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ta=$o.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=$o.round(e,At(e,t))).toFixed(Math.max(0,Math.min(20,At(e*(1+1e-15),t))))}}),na=$o.time={},ra=Date;Dt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ia.setUTCDate.apply(this._,arguments)},setDay:function(){ia.setUTCDay.apply(this._,arguments)},setFullYear:function(){ia.setUTCFullYear.apply(this._,arguments)},setHours:function(){ia.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ia.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ia.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ia.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ia.setUTCSeconds.apply(this._,arguments)},setTime:function(){ia.setTime.apply(this._,arguments)}};var ia=Date.prototype;na.year=Pt(function(e){return e=na.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),na.years=na.year.range,na.years.utc=na.year.utc.range,na.day=Pt(function(e){var t=new ra(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),na.days=na.day.range,na.days.utc=na.day.utc.range,na.dayOfYear=function(e){var t=na.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=na[e]=Pt(function(e){return(e=na.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=na.year(e).getDay();return Math.floor((na.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});na[e+"s"]=n.range,na[e+"s"].utc=n.utc.range,na[e+"OfYear"]=function(e){var n=na.year(e).getDay();return Math.floor((na.dayOfYear(e)+(n+t)%7)/7)}}),na.week=na.sunday,na.weeks=na.sunday.range,na.weeks.utc=na.sunday.utc.range,na.weekOfYear=na.sundayOfYear;var sa={"-":"",_:" ",0:"0"},oa=/^\s*\d+/,ua=/^%/;$o.locale=function(e){return{numberFormat:Mt(e),timeFormat:Bt(e)}};var aa=$o.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});$o.format=aa.numberFormat,$o.geo={},rn.prototype={s:0,t:0,add:function(e){sn(e,this.t,fa),sn(fa.s,this.s,this),this.s?this.t+=fa.t:this.s=fa.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var fa=new rn;$o.geo.stream=function(e,t){e&&la.hasOwnProperty(e.type)?la[e.type](e,t):on(e,t)};var la={Feature:function(e,t){on(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)on(n[r].geometry,t)}},ca={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){un(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)un(n[r],t,0)},Polygon:function(e,t){an(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)an(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)on(n[r],t)}};$o.geo.area=function(e){return ha=0,$o.geo.stream(e,da),ha};var ha,pa=new rn,da={sphere:function(){ha+=4*Nu},point:p,lineStart:p,lineEnd:p,polygonStart:function(){pa.reset(),da.lineStart=fn},polygonEnd:function(){var e=2*pa;ha+=0>e?4*Nu+e:e,da.lineStart=da.lineEnd=da.point=p}};$o.geo.bounds=function(){function e(e,t){b.push(w=[l=e,h=e]),c>t&&(c=t),t>p&&(p=t)}function t(t,n){var r=ln([t*Ou,n*Ou]);if(g){var i=hn(g,r),s=[i[1],-i[0],0],o=hn(s,i);vn(o),o=mn(o);var a=t-d,f=a>0?1:-1,v=o[0]*Mu*f,m=uu(a)>180;if(m^(v>f*d&&f*t>v)){var y=o[1]*Mu;y>p&&(p=y)}else if(v=(v+360)%360-180,m^(v>f*d&&f*t>v)){var y=-o[1]*Mu;c>y&&(c=y)}else c>n&&(c=n),n>p&&(p=n);m?d>t?u(l,t)>u(l,h)&&(h=t):u(t,h)>u(l,h)&&(l=t):h>=l?(l>t&&(l=t),t>h&&(h=t)):t>d?u(l,t)>u(l,h)&&(h=t):u(t,h)>u(l,h)&&(l=t)}else e(t,n);g=r,d=t}function n(){E.point=t}function r(){w[0]=l,w[1]=h,E.point=e,g=null}function i(e,n){if(g){var r=e-d;y+=uu(r)>180?r+(r>0?360:-360):r}else v=e,m=n;da.point(e,n),t(e,n)}function s(){da.lineStart()}function o(){i(v,m),da.lineEnd(),uu(y)>Lu&&(l=-(h=180)),w[0]=l,w[1]=h,g=null}function u(e,t){return(t-=e)<0?t+360:t}function a(e,t){return e[0]-t[0]}function f(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var l,c,h,p,d,v,m,g,y,b,w,E={point:e,lineStart:n,lineEnd:r,polygonStart:function(){E.point=i,E.lineStart=s,E.lineEnd=o,y=0,da.polygonStart()},polygonEnd:function(){da.polygonEnd(),E.point=e,E.lineStart=n,E.lineEnd=r,0>pa?(l=-(h=180),c=-(p=90)):y>Lu?p=90:-Lu>y&&(c=-90),w[0]=l,w[1]=h}};return function(e){p=h=-(l=c=1/0),b=[],$o.geo.stream(e,E);var t=b.length;if(t){b.sort(a);for(var n,r=1,i=b[0],s=[i];t>r;++r)n=b[r],f(n[0],i)||f(n[1],i)?(u(i[0],n[1])>u(i[0],i[1])&&(i[1]=n[1]),u(n[0],i[1])>u(i[0],i[1])&&(i[0]=n[0])):s.push(i=n);for(var o,n,d=-1/0,t=s.length-1,r=0,i=s[t];t>=r;i=n,++r)n=s[r],(o=u(i[1],n[0]))>d&&(d=o,l=n[0],h=i[1])}return b=w=null,1/0===l||1/0===c?[[0/0,0/0],[0/0,0/0]]:[[l,c],[h,p]]}}(),$o.geo.centroid=function(e){va=ma=ga=ya=ba=wa=Ea=Sa=xa=Ta=Na=0,$o.geo.stream(e,Ca);var t=xa,n=Ta,r=Na,i=t*t+n*n+r*r;return Au>i&&(t=wa,n=Ea,r=Sa,Lu>ma&&(t=ga,n=ya,r=ba),i=t*t+n*n+r*r,Au>i)?[0/0,0/0]:[Math.atan2(n,t)*Mu,V(r/Math.sqrt(i))*Mu]};var va,ma,ga,ya,ba,wa,Ea,Sa,xa,Ta,Na,Ca={sphere:p,point:yn,lineStart:wn,lineEnd:En,polygonStart:function(){Ca.lineStart=Sn},polygonEnd:function(){Ca.lineStart=wn}},ka=kn(xn,_n,Pn,[-Nu,-Nu/2]),La=1e9;$o.geo.clipExtent=function(){var e,t,n,r,i,s,o={stream:function(e){return i&&(i.valid=!1),i=s(e),i.valid=!0,i},extent:function(u){return arguments.length?(s=jn(e=+u[0][0],t=+u[0][1],n=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),o):[[e,t],[n,r]]}};return o.extent([[0,0],[960,500]])},($o.geo.conicEqualArea=function(){return In(qn)}).raw=qn,$o.geo.albers=function(){return $o.geo.conicEqualArea().rotate([96,0]).center([-0.6,38.7]).parallels([29.5,45.5]).scale(1070)},$o.geo.albersUsa=function(){function e(e){var s=e[0],o=e[1];return t=null,n(s,o),t||(r(s,o),t)||i(s,o),t}var t,n,r,i,s=$o.geo.albers(),o=$o.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=$o.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),a={point:function(e,n){t=[e,n]}};return e.invert=function(e){var t=s.scale(),n=s.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&.234>i&&r>=-0.425&&-0.214>r?o:i>=.166&&.234>i&&r>=-0.214&&-0.115>r?u:s).invert(e)},e.stream=function(e){var t=s.stream(e),n=o.stream(e),r=u.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},e.precision=function(t){return arguments.length?(s.precision(t),o.precision(t),u.precision(t),e):s.precision()},e.scale=function(t){return arguments.length?(s.scale(t),o.scale(.35*t),u.scale(t),e.translate(s.translate())):s.scale()},e.translate=function(t){if(!arguments.length)return s.translate();var f=s.scale(),l=+t[0],c=+t[1];return n=s.translate(t).clipExtent([[l-.455*f,c-.238*f],[l+.455*f,c+.238*f]]).stream(a).point,r=o.translate([l-.307*f,c+.201*f]).clipExtent([[l-.425*f+Lu,c+.12*f+Lu],[l-.214*f-Lu,c+.234*f-Lu]]).stream(a).point,i=u.translate([l-.205*f,c+.212*f]).clipExtent([[l-.214*f+Lu,c+.166*f+Lu],[l-.115*f-Lu,c+.234*f-Lu]]).stream(a).point,e},e.scale(1070)};var Aa,Oa,Ma,_a,Da,Pa,Ha={point:p,lineStart:p,lineEnd:p,polygonStart:function(){Oa=0,Ha.lineStart=Rn},polygonEnd:function(){Ha.lineStart=Ha.lineEnd=Ha.point=p,Aa+=uu(Oa/2)}},Ba={point:Un,lineStart:p,lineEnd:p,polygonStart:p,polygonEnd:p},ja={point:Xn,lineStart:Vn,lineEnd:$n,polygonStart:function(){ja.lineStart=Jn},polygonEnd:function(){ja.point=Xn,ja.lineStart=Vn,ja.lineEnd=$n}};$o.geo.path=function(){function e(e){return e&&("function"==typeof u&&s.pointRadius(+u.apply(this,arguments)),o&&o.valid||(o=i(s)),$o.geo.stream(e,o)),s.result()}function t(){return o=null,e}var n,r,i,s,o,u=4.5;return e.area=function(e){return Aa=0,$o.geo.stream(e,i(Ha)),Aa},e.centroid=function(e){return ga=ya=ba=wa=Ea=Sa=xa=Ta=Na=0,$o.geo.stream(e,i(ja)),Na?[xa/Na,Ta/Na]:Sa?[wa/Sa,Ea/Sa]:ba?[ga/ba,ya/ba]:[0/0,0/0]},e.bounds=function(e){return Da=Pa=-(Ma=_a=1/0),$o.geo.stream(e,i(Ba)),[[Ma,_a],[Da,Pa]]},e.projection=function(e){return arguments.length?(i=(n=e)?e.stream||Gn(e):St,t()):n},e.context=function(e){return arguments.length?(s=null==(r=e)?new zn:new Kn(e),"function"!=typeof u&&s.pointRadius(u),t()):r},e.pointRadius=function(t){return arguments.length?(u="function"==typeof t?t:(s.pointRadius(+t),+t),e):u},e.projection($o.geo.albersUsa()).context(null)},$o.geo.transform=function(e){return{stream:function(t){var n=new Yn(t);for(var r in e)n[r]=e[r];return n}}},Yn.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},$o.geo.projection=er,$o.geo.projectionMutator=tr,($o.geo.equirectangular=function(){return er(rr)}).raw=rr.invert=rr,$o.geo.rotation=function(e){function t(t){return t=e(t[0]*Ou,t[1]*Ou),t[0]*=Mu,t[1]*=Mu,t}return e=sr(e[0]%360*Ou,e[1]*Ou,e.length>2?e[2]*Ou:0),t.invert=function(t){return t=e.invert(t[0]*Ou,t[1]*Ou),t[0]*=Mu,t[1]*=Mu,t},t},ir.invert=rr,$o.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=sr(-e[0]*Ou,-e[1]*Ou,0).invert,i=[];return n(null,null,1,{point:function(e,n){i.push(e=t(e,n)),e[0]*=Mu,e[1]*=Mu}}),{type:"Polygon",coordinates:[i]}}var t,n,r=[0,0],i=6;return e.origin=function(t){return arguments.length?(r=t,e):r},e.angle=function(r){return arguments.length?(n=fr((t=+r)*Ou,i*Ou),e):t},e.precision=function(r){return arguments.length?(n=fr(t*Ou,(i=+r)*Ou),e):i},e.angle(90)},$o.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Ou,i=e[1]*Ou,s=t[1]*Ou,o=Math.sin(r),u=Math.cos(r),a=Math.sin(i),f=Math.cos(i),l=Math.sin(s),c=Math.cos(s);return Math.atan2(Math.sqrt((n=c*o)*n+(n=f*l-a*c*u)*n),a*l+f*c*u)},$o.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return $o.range(Math.ceil(s/m)*m,i,m).map(h).concat($o.range(Math.ceil(f/g)*g,a,g).map(p)).concat($o.range(Math.ceil(r/d)*d,n,d).filter(function(e){return uu(e%m)>Lu}).map(l)).concat($o.range(Math.ceil(u/v)*v,o,v).filter(function(e){return uu(e%g)>Lu}).map(c))}var n,r,i,s,o,u,a,f,l,c,h,p,d=10,v=d,m=90,g=360,y=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[h(s).concat(p(a).slice(1),h(i).reverse().slice(1),p(f).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(s=+t[0][0],i=+t[1][0],f=+t[0][1],a=+t[1][1],s>i&&(t=s,s=i,i=t),f>a&&(t=f,f=a,a=t),e.precision(y)):[[s,f],[i,a]]},e.minorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],u=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),u>o&&(t=u,u=o,o=t),e.precision(y)):[[r,u],[n,o]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(m=+t[0],g=+t[1],e):[m,g]},e.minorStep=function(t){return arguments.length?(d=+t[0],v=+t[1],e):[d,v]},e.precision=function(t){return arguments.length?(y=+t,l=cr(u,o,90),c=hr(r,n,y),h=cr(f,a,90),p=hr(s,i,y),e):y},e.majorExtent([[-180,-90+Lu],[180,90-Lu]]).minorExtent([[-180,-80-Lu],[180,80+Lu]])},$o.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||i.apply(this,arguments)]}}var t,n,r=pr,i=dr;return e.distance=function(){return $o.geo.distance(t||r.apply(this,arguments),n||i.apply(this,arguments))},e.source=function(n){return arguments.length?(r=n,t="function"==typeof n?null:n,e):r},e.target=function(t){return arguments.length?(i=t,n="function"==typeof t?null:t,e):i},e.precision=function(){return arguments.length?e:0},e},$o.geo.interpolate=function(e,t){return vr(e[0]*Ou,e[1]*Ou,t[0]*Ou,t[1]*Ou)},$o.geo.length=function(e){return Fa=0,$o.geo.stream(e,Ia),Fa};var Fa,Ia={sphere:p,point:p,lineStart:mr,lineEnd:p,polygonStart:p,polygonEnd:p},qa=gr(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});($o.geo.azimuthalEqualArea=function(){return er(qa)}).raw=qa;var Ra=gr(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},St);($o.geo.azimuthalEquidistant=function(){return er(Ra)}).raw=Ra,($o.geo.conicConformal=function(){return In(yr)}).raw=yr,($o.geo.conicEquidistant=function(){return In(br)}).raw=br;var Ua=gr(function(e){return 1/e},Math.atan);($o.geo.gnomonic=function(){return er(Ua)}).raw=Ua,wr.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-ku]},($o.geo.mercator=function(){return Er(wr)}).raw=wr;var za=gr(function(){return 1},Math.asin);($o.geo.orthographic=function(){return er(za)}).raw=za;var Wa=gr(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});($o.geo.stereographic=function(){return er(Wa)}).raw=Wa,Sr.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-ku]},($o.geo.transverseMercator=function(){var e=Er(Sr),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[-e[1],e[0]])},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},e.rotate([0,0])}).raw=Sr,$o.geom={},$o.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,i=Et(n),s=Et(r),o=e.length,u=[],a=[];for(t=0;o>t;t++)u.push([+i.call(this,e[t],t),+s.call(this,e[t],t),t]);for(u.sort(Cr),t=0;o>t;t++)a.push([u[t][0],-u[t][1]]);var f=Nr(u),l=Nr(a),c=l[0]===f[0],h=l[l.length-1]===f[f.length-1],p=[];for(t=f.length-1;t>=0;--t)p.push(e[u[f[t]][2]]);for(t=+c;t<l.length-h;++t)p.push(e[u[l[t]][2]]);return p}var n=xr,r=Tr;return arguments.length?t(e):(t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t)},$o.geom.polygon=function(e){return hu(e,Xa),e};var Xa=$o.geom.polygon.prototype=[];Xa.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],i=0;++t<n;)e=r,r=this[t],i+=e[1]*r[0]-e[0]*r[1];return.5*i},Xa.centroid=function(e){var t,n,r=-1,i=this.length,s=0,o=0,u=this[i-1];for(arguments.length||(e=-1/(6*this.area()));++r<i;)t=u,u=this[r],n=t[0]*u[1]-u[0]*t[1],s+=(t[0]+u[0])*n,o+=(t[1]+u[1])*n;return[s*e,o*e]},Xa.clip=function(e){for(var t,n,r,i,s,o,u=Ar(e),a=-1,f=this.length-Ar(this),l=this[f-1];++a<f;){for(t=e.slice(),e.length=0,i=this[a],s=t[(r=t.length-u)-1],n=-1;++n<r;)o=t[n],kr(o,l,i)?(kr(s,l,i)||e.push(Lr(s,o,l,i)),e.push(o)):kr(s,l,i)&&e.push(Lr(s,o,l,i)),s=o;u&&e.push(e[0]),l=i}return e};var Va,$a,Ja,Ka,Qa,Ga=[],Ya=[];jr.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)e=t[n].edge,e.b&&e.a||t.splice(n,1);return t.sort(Ir),t.length},Kr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Qr.prototype={insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=ei(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)r=n.U,n===r.L?(i=r.R,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Yr(this,n),e=n,n=e.U),n.C=!1,r.C=!0,Zr(this,r))):(i=r.L,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Zr(this,n),e=n,n=e.U),n.C=!1,r.C=!0,Yr(this,r))),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,i=e.U,s=e.L,o=e.R;if(n=s?o?ei(o):s:o,i?i.L===e?i.L=n:i.R=n:this._=n,s&&o?(r=n.C,n.C=e.C,n.L=s,s.U=n,n!==o?(i=n.U,n.U=e.U,e=n.R,i.L=e,n.R=o,o.U=n):(n.U=i,i=n,e=n.R)):(r=e.C,e=n),e&&(e.U=i),!r){if(e&&e.C)return e.C=!1,void 0;do{if(e===this._)break;if(e===i.L){if(t=i.R,t.C&&(t.C=!1,i.C=!0,Yr(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Zr(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,Yr(this,i),e=this._;break}}else if(t=i.L,t.C&&(t.C=!1,i.C=!0,Zr(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Yr(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,Zr(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}},$o.geom.voronoi=function(e){function t(e){var t=new Array(e.length),r=u[0][0],i=u[0][1],s=u[1][0],o=u[1][1];return ti(n(e),u).cells.forEach(function(n,u){var a=n.edges,f=n.site,l=t[u]=a.length?a.map(function(e){var t=e.start();return[t.x,t.y]}):f.x>=r&&f.x<=s&&f.y>=i&&f.y<=o?[[r,o],[s,o],[s,i],[r,i]]:[];l.point=e[u]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(s(e,t)/Lu)*Lu,y:Math.round(o(e,t)/Lu)*Lu,i:t}})}var r=xr,i=Tr,s=r,o=i,u=Za;return e?t(e):(t.links=function(e){return ti(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return ti(n(e)).cells.forEach(function(n,r){for(var i,s,o=n.site,u=n.edges.sort(Ir),a=-1,f=u.length,l=u[f-1].edge,c=l.l===o?l.r:l.l;++a<f;)i=l,s=c,l=u[a].edge,c=l.l===o?l.r:l.l,r<s.i&&r<c.i&&ri(o,s,c)<0&&t.push([e[r],e[s.i],e[c.i]])}),t},t.x=function(e){return arguments.length?(s=Et(r=e),t):r},t.y=function(e){return arguments.length?(o=Et(i=e),t):i},t.clipExtent=function(e){return arguments.length?(u=null==e?Za:e,t):u===Za?null:u},t.size=function(e){return arguments.length?t.clipExtent(e&&[[0,0],e]):u===Za?null:u&&u[1]},t)};var Za=[[-1e6,-1e6],[1e6,1e6]];$o.geom.delaunay=function(e){return $o.geom.voronoi().triangles(e)},$o.geom.quadtree=function(e,t,n,r,i){function s(e){function s(e,t,n,r,i,s,o,u){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var a=e.x,l=e.y;if(null!=a)if(uu(a-n)+uu(l-r)<.01)f(e,t,n,r,i,s,o,u);else{var c=e.point;e.x=e.y=e.point=null,f(e,c,a,l,i,s,o,u),f(e,t,n,r,i,s,o,u)}else e.x=n,e.y=r,e.point=t}else f(e,t,n,r,i,s,o,u)}function f(e,t,n,r,i,o,u,a){var f=.5*(i+u),l=.5*(o+a),c=n>=f,h=r>=l,p=(h<<1)+c;e.leaf=!1,e=e.nodes[p]||(e.nodes[p]=oi()),c?i=f:u=f,h?o=l:a=l,s(e,t,n,r,i,o,u,a)}var l,c,h,p,d,v,m,g,y,b=Et(u),w=Et(a);if(null!=t)v=t,m=n,g=r,y=i;else if(g=y=-(v=m=1/0),c=[],h=[],d=e.length,o)for(p=0;d>p;++p)l=e[p],l.x<v&&(v=l.x),l.y<m&&(m=l.y),l.x>g&&(g=l.x),l.y>y&&(y=l.y),c.push(l.x),h.push(l.y);else for(p=0;d>p;++p){var E=+b(l=e[p],p),S=+w(l,p);v>E&&(v=E),m>S&&(m=S),E>g&&(g=E),S>y&&(y=S),c.push(E),h.push(S)}var x=g-v,T=y-m;x>T?y=m+x:g=v+T;var N=oi();if(N.add=function(e){s(N,e,+b(e,++p),+w(e,p),v,m,g,y)},N.visit=function(e){ui(e,N,v,m,g,y)},p=-1,null==t){for(;++p<d;)s(N,e[p],c[p],h[p],v,m,g,y);--p}else e.forEach(N.add);return c=h=e=l=null,N}var o,u=xr,a=Tr;return(o=arguments.length)?(u=ii,a=si,3===o&&(i=n,r=t,n=t=0),s(e)):(s.x=function(e){return arguments.length?(u=e,s):u},s.y=function(e){return arguments.length?(a=e,s):a},s.extent=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),s):null==t?null:[[t,n],[r,i]]},s.size=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=n=0,r=+e[0],i=+e[1]),s):null==t?null:[r-t,i-n]},s)},$o.interpolateRgb=ai,$o.interpolateObject=fi,$o.interpolateNumber=li,$o.interpolateString=ci;var ef=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;$o.interpolate=hi,$o.interpolators=[function(e,t){var n=typeof t;return("string"===n?Vu.has(t)||/^(#|rgb\(|hsl\()/.test(t)?ai:ci:t instanceof G?ai:"object"===n?Array.isArray(t)?pi:fi:li)(e,t)}],$o.interpolateArray=pi;var tf=function(){return St},nf=$o.map({linear:tf,poly:wi,quad:function(){return gi},cubic:function(){return yi},sin:function(){return Ei},exp:function(){return Si},circle:function(){return xi},elastic:Ti,back:Ni,bounce:function(){return Ci}}),rf=$o.map({"in":St,out:vi,"in-out":mi,"out-in":function(e){return mi(vi(e))}});$o.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";return n=nf.get(n)||tf,r=rf.get(r)||St,di(r(n.apply(null,Jo.call(arguments,1))))},$o.interpolateHcl=ki,$o.interpolateHsl=Li,$o.interpolateLab=Ai,$o.interpolateRound=Oi,$o.transform=function(e){var t=Qo.createElementNS($o.ns.prefix.svg,"g");return($o.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Mi(n?n.matrix:sf)})(e)},Mi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var sf={a:1,b:0,c:0,d:1,e:0,f:0};$o.interpolateTransform=Hi,$o.layout={},$o.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(Fi(e[n]));return t}},$o.layout.chord=function(){function e(){var e,f,c,h,p,d={},v=[],m=$o.range(s),g=[];for(n=[],r=[],e=0,h=-1;++h<s;){for(f=0,p=-1;++p<s;)f+=i[h][p];v.push(f),g.push($o.range(s)),e+=f}for(o&&m.sort(function(e,t){return o(v[e],v[t])}),u&&g.forEach(function(e,t){e.sort(function(e,n){return u(i[t][e],i[t][n])})}),e=(Cu-l*s)/e,f=0,h=-1;++h<s;){for(c=f,p=-1;++p<s;){var y=m[h],b=g[y][p],w=i[y][b],E=f,S=f+=w*e;d[y+"-"+b]={index:y,subindex:b,startAngle:E,endAngle:S,value:w}}r[y]={index:y,startAngle:c,endAngle:f,value:(f-c)/e},f+=l}for(h=-1;++h<s;)for(p=h-1;++p<s;){var x=d[h+"-"+p],T=d[p+"-"+h];(x.value||T.value)&&n.push(x.value<T.value?{source:T,target:x}:{source:x,target:T})}a&&t()}function t(){n.sort(function(e,t){return a((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n,r,i,s,o,u,a,f={},l=0;return f.matrix=function(e){return arguments.length?(s=(i=e)&&i.length,n=r=null,f):i},f.padding=function(e){return arguments.length?(l=e,n=r=null,f):l},f.sortGroups=function(e){return arguments.length?(o=e,n=r=null,f):o},f.sortSubgroups=function(e){return arguments.length?(u=e,n=null,f):u},f.sortChords=function(e){return arguments.length?(a=e,n&&t(),f):a},f.chords=function(){return n||e(),n},f.groups=function(){return r||e(),r},f},$o.layout.force=function(){function e(e){return function(t,n,r,i){if(t.point!==e){var s=t.cx-e.x,o=t.cy-e.y,u=i-n,a=s*s+o*o;if(a>u*u/m){if(d>a){var f=t.charge/a;e.px-=s*f,e.py-=o*f}return!0}if(t.point&&a&&d>a){var f=t.pointCharge/a;e.px-=s*f,e.py-=o*f}}return!t.charge}}function t(e){e.px=$o.event.x,e.py=$o.event.y,u.resume()}var n,r,i,s,o,u={},a=$o.dispatch("start","tick","end"),f=[1,1],l=.9,c=of,h=uf,p=-30,d=af,v=.1,m=.64,g=[],y=[];return u.tick=function(){if((r*=.99)<.005)return a.end({type:"end",alpha:r=0}),!0;var t,n,u,c,h,d,m,b,w,E=g.length,S=y.length;for(n=0;S>n;++n)u=y[n],c=u.source,h=u.target,b=h.x-c.x,w=h.y-c.y,(d=b*b+w*w)&&(d=r*s[n]*((d=Math.sqrt(d))-i[n])/d,b*=d,w*=d,h.x-=b*(m=c.weight/(h.weight+c.weight)),h.y-=w*m,c.x+=b*(m=1-m),c.y+=w*m);if((m=r*v)&&(b=f[0]/2,w=f[1]/2,n=-1,m))for(;++n<E;)u=g[n],u.x+=(b-u.x)*m,u.y+=(w-u.y)*m;if(p)for(Xi(t=$o.geom.quadtree(g),r,o),n=-1;++n<E;)(u=g[n]).fixed||t.visit(e(u));for(n=-1;++n<E;)u=g[n],u.fixed?(u.x=u.px,u.y=u.py):(u.x-=(u.px-(u.px=u.x))*l,u.y-=(u.py-(u.py=u.y))*l);a.tick({type:"tick",alpha:r})},u.nodes=function(e){return arguments.length?(g=e,u):g},u.links=function(e){return arguments.length?(y=e,u):y},u.size=function(e){return arguments.length?(f=e,u):f},u.linkDistance=function(e){return arguments.length?(c="function"==typeof e?e:+e,u):c},u.distance=u.linkDistance,u.linkStrength=function(e){return arguments.length?(h="function"==typeof e?e:+e,u):h},u.friction=function(e){return arguments.length?(l=+e,u):l},u.charge=function(e){return arguments.length?(p="function"==typeof e?e:+e,u):p},u.chargeDistance=function(e){return arguments.length?(d=e*e,u):Math.sqrt(d)},u.gravity=function(e){return arguments.length?(v=+e,u):v},u.theta=function(e){return arguments.length?(m=e*e,u):Math.sqrt(m)},u.alpha=function(e){return arguments.length?(e=+e,r?r=e>0?e:0:e>0&&(a.start({type:"start",alpha:r=e}),$o.timer(u.tick)),u):r},u.start=function(){function e(e,r){if(!n){for(n=new Array(a),u=0;a>u;++u)n[u]=[];for(u=0;f>u;++u){var i=y[u];n[i.source.index].push(i.target),n[i.target.index].push(i.source)}}for(var s,o=n[t],u=-1,f=o.length;++u<f;)if(!isNaN(s=o[u][e]))return s;return Math.random()*r}var t,n,r,a=g.length,l=y.length,d=f[0],v=f[1];for(t=0;a>t;++t)(r=g[t]).index=t,r.weight=0;for(t=0;l>t;++t)r=y[t],"number"==typeof r.source&&(r.source=g[r.source]),"number"==typeof r.target&&(r.target=g[r.target]),++r.source.weight,++r.target.weight;for(t=0;a>t;++t)r=g[t],isNaN(r.x)&&(r.x=e("x",d)),isNaN(r.y)&&(r.y=e("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof c)for(t=0;l>t;++t)i[t]=+c.call(this,y[t],t);else for(t=0;l>t;++t)i[t]=c;if(s=[],"function"==typeof h)for(t=0;l>t;++t)s[t]=+h.call(this,y[t],t);else for(t=0;l>t;++t)s[t]=h;if(o=[],"function"==typeof p)for(t=0;a>t;++t)o[t]=+p.call(this,g[t],t);else for(t=0;a>t;++t)o[t]=p;return u.resume()},u.resume=function(){return u.alpha(.1)},u.stop=function(){return u.alpha(0)},u.drag=function(){return n||(n=$o.behavior.drag().origin(St).on("dragstart.force",Ri).on("drag.force",t).on("dragend.force",Ui)),arguments.length?(this.on("mouseover.force",zi).on("mouseout.force",Wi).call(n),void 0):n},$o.rebind(u,a,"on")};var of=20,uf=1,af=1/0;$o.layout.hierarchy=function(){function e(t,o,u){var a=i.call(n,t,o);if(t.depth=o,u.push(t),a&&(f=a.length)){for(var f,l,c=-1,h=t.children=new Array(f),p=0,d=o+1;++c<f;)l=h[c]=e(a[c],d,u),l.parent=t,p+=l.value;r&&h.sort(r),s&&(t.value=p)}else delete t.children,s&&(t.value=+s.call(n,t,o)||0);return t}function t(e,r){var i=e.children,o=0;if(i&&(u=i.length))for(var u,a=-1,f=r+1;++a<u;)o+=t(i[a],f);else s&&(o=+s.call(n,e,r)||0);return s&&(e.value=o),o}function n(t){var n=[];return e(t,0,n),n}var r=Ki,i=$i,s=Ji;return n.sort=function(e){return arguments.length?(r=e,n):r},n.children=function(e){return arguments.length?(i=e,n):i},n.value=function(e){return arguments.length?(s=e,n):s},n.revalue=function(e){return t(e,0),e},n},$o.layout.partition=function(){function e(t,n,r,i){var s=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,s&&(o=s.length)){var o,u,a,f=-1;for(r=t.value?r/t.value:0;++f<o;)e(u=s[f],n,a=u.value*r,i),n+=a}}function t(e){var n=e.children,r=0;if(n&&(i=n.length))for(var i,s=-1;++s<i;)r=Math.max(r,t(n[s]));return 1+r}function n(n,s){var o=r.call(this,n,s);return e(o[0],0,i[0],i[1]/t(o[0])),o}var r=$o.layout.hierarchy(),i=[1,1];return n.size=function(e){return arguments.length?(i=e,n):i},Vi(n,r)},$o.layout.pie=function(){function e(s){var o=s.map(function(n,r){return+t.call(e,n,r)}),u=+("function"==typeof r?r.apply(this,arguments):r),a=(("function"==typeof i?i.apply(this,arguments):i)-u)/$o.sum(o),f=$o.range(s.length);null!=n&&f.sort(n===ff?function(e,t){return o[t]-o[e]}:function(e,t){return n(s[e],s[t])});var l=[];return f.forEach(function(e){var t;l[e]={data:s[e],value:t=o[e],startAngle:u,endAngle:u+=t*a}}),l}var t=Number,n=ff,r=0,i=Cu;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(r=t,e):r},e.endAngle=function(t){return arguments.length?(i=t,e):i},e};var ff={};$o.layout.stack=function(){function e(u,a){var f=u.map(function(n,r){return t.call(e,n,r)}),l=f.map(function(t){return t.map(function(t,n){return[s.call(e,t,n),o.call(e,t,n)]})}),c=n.call(e,l,a);f=$o.permute(f,c),l=$o.permute(l,c);var h,p,d,v=r.call(e,l,a),m=f.length,g=f[0].length;for(p=0;g>p;++p)for(i.call(e,f[0][p],d=v[p],l[0][p][1]),h=1;m>h;++h)i.call(e,f[h][p],d+=l[h-1][p][1],l[h][p][1]);return u}var t=St,n=es,r=ts,i=Zi,s=Gi,o=Yi;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n="function"==typeof t?t:lf.get(t)||es,e):n},e.offset=function(t){return arguments.length?(r="function"==typeof t?t:cf.get(t)||ts,e):r},e.x=function(t){return arguments.length?(s=t,e):s},e.y=function(t){return arguments.length?(o=t,e):o},e.out=function(t){return arguments.length?(i=t,e):i},e};var lf=$o.map({"inside-out":function(e){var t,n,r=e.length,i=e.map(ns),s=e.map(rs),o=$o.range(r).sort(function(e,t){return i[e]-i[t]}),u=0,a=0,f=[],l=[];for(t=0;r>t;++t)n=o[t],a>u?(u+=s[n],f.push(n)):(a+=s[n],l.push(n));return l.reverse().concat(f)},reverse:function(e){return $o.range(e.length).reverse()},"default":es}),cf=$o.map({silhouette:function(e){var t,n,r,i=e.length,s=e[0].length,o=[],u=0,a=[];for(n=0;s>n;++n){for(t=0,r=0;i>t;t++)r+=e[t][n][1];r>u&&(u=r),o.push(r)}for(n=0;s>n;++n)a[n]=(u-o[n])/2;return a},wiggle:function(e){var t,n,r,i,s,o,u,a,f,l=e.length,c=e[0],h=c.length,p=[];for(p[0]=a=f=0,n=1;h>n;++n){for(t=0,i=0;l>t;++t)i+=e[t][n][1];for(t=0,s=0,u=c[n][0]-c[n-1][0];l>t;++t){for(r=0,o=(e[t][n][1]-e[t][n-1][1])/(2*u);t>r;++r)o+=(e[r][n][1]-e[r][n-1][1])/u;s+=o*e[t][n][1]}p[n]=a-=i?s/i*u:0,f>a&&(f=a)}for(n=0;h>n;++n)p[n]-=f;return p},expand:function(e){var t,n,r,i=e.length,s=e[0].length,o=1/i,u=[];for(n=0;s>n;++n){for(t=0,r=0;i>t;t++)r+=e[t][n][1];if(r)for(t=0;i>t;t++)e[t][n][1]/=r;else for(t=0;i>t;t++)e[t][n][1]=o}for(n=0;s>n;++n)u[n]=0;return u},zero:ts});$o.layout.histogram=function(){function e(e,s){for(var o,u,a=[],f=e.map(n,this),l=r.call(this,f,s),c=i.call(this,l,f,s),s=-1,h=f.length,p=c.length-1,d=t?1:1/h;++s<p;)o=a[s]=[],o.dx=c[s+1]-(o.x=c[s]),o.y=0;if(p>0)for(s=-1;++s<h;)u=f[s],u>=l[0]&&u<=l[1]&&(o=a[$o.bisect(c,u,1,p)-1],o.y+=d,o.push(e[s]));return a}var t=!0,n=Number,r=us,i=ss;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=Et(t),e):r},e.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return os(e,t)}:Et(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},$o.layout.tree=function(){function e(e,s){function o(e,t){var r=e.children,i=e._tree;if(r&&(s=r.length)){for(var s,u,f,l=r[0],c=l,h=-1;++h<s;)f=r[h],o(f,u),c=a(f,u,c),u=f;ms(e);var p=.5*(l._tree.prelim+f._tree.prelim);t?(i.prelim=t._tree.prelim+n(e,t),i.mod=i.prelim-p):i.prelim=p}else t&&(i.prelim=t._tree.prelim+n(e,t))}function u(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(r=n.length)){var r,i=-1;for(t+=e._tree.mod;++i<r;)u(n[i],t)}}function a(e,t,r){if(t){for(var i,s=e,o=e,u=t,a=e.parent.children[0],f=s._tree.mod,l=o._tree.mod,c=u._tree.mod,h=a._tree.mod;u=ls(u),s=fs(s),u&&s;)a=fs(a),o=ls(o),o._tree.ancestor=e,i=u._tree.prelim+c-s._tree.prelim-f+n(u,s),i>0&&(gs(ys(u,e,r),e,i),f+=i,l+=i),c+=u._tree.mod,f+=s._tree.mod,h+=a._tree.mod,l+=o._tree.mod;u&&!ls(o)&&(o._tree.thread=u,o._tree.mod+=c-l),s&&!fs(a)&&(a._tree.thread=s,a._tree.mod+=f-h,r=e)}return r}var f=t.call(this,e,s),l=f[0];vs(l,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),o(l),u(l,-l._tree.prelim);var c=cs(l,ps),h=cs(l,hs),p=cs(l,ds),d=c.x-n(c,h)/2,v=h.x+n(h,c)/2,m=p.depth||1;return vs(l,i?function(e){e.x*=r[0],e.y=e.depth*r[1],delete e._tree}:function(e){e.x=(e.x-d)/(v-d)*r[0],e.y=e.depth/m*r[1],delete e._tree}),f}var t=$o.layout.hierarchy().sort(null).value(null),n=as,r=[1,1],i=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(i=null==(r=t),e):i?null:r},e.nodeSize=function(t){return arguments.length?(i=null!=(r=t),e):i?r:null},Vi(e,t)},$o.layout.pack=function(){function e(e,s){var o=n.call(this,e,s),u=o[0],a=i[0],f=i[1],l=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(u.x=u.y=0,vs(u,function(e){e.r=+l(e.value)}),vs(u,xs),r){var c=r*(t?1:Math.max(2*u.r/a,2*u.r/f))/2;vs(u,function(e){e.r+=c}),vs(u,xs),vs(u,function(e){e.r-=c})}return Cs(u,a/2,f/2,t?1:1/Math.max(2*u.r/a,2*u.r/f)),o}var t,n=$o.layout.hierarchy().sort(bs),r=0,i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(r=+t,e):r},Vi(e,n)},$o.layout.cluster=function(){function e(e,s){var o,u=t.call(this,e,s),a=u[0],f=0;vs(a,function(e){var t=e.children;t&&t.length?(e.x=As(t),e.y=Ls(t)):(e.x=o?f+=n(e,o):0,e.y=0,o=e)});var l=Os(a),c=Ms(a),h=l.x-n(l,c)/2,p=c.x+n(c,l)/2;return vs(a,i?function(e){e.x=(e.x-a.x)*r[0],e.y=(a.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(p-h)*r[0],e.y=(1-(a.y?e.y/a.y:1))*r[1]}),u}var t=$o.layout.hierarchy().sort(null).value(null),n=as,r=[1,1],i=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(i=null==(r=t),e):i?null:r},e.nodeSize=function(t){return arguments.length?(i=null!=(r=t),e):i?r:null},Vi(e,t)},$o.layout.treemap=function(){function e(e,t){for(var n,r,i=-1,s=e.length;++i<s;)r=(n=e[i]).value*(0>t?0:t),n.area=isNaN(r)||0>=r?0:r}function t(n){var s=n.children;if(s&&s.length){var o,u,a,f=c(n),l=[],h=s.slice(),d=1/0,v="slice"===p?f.dx:"dice"===p?f.dy:"slice-dice"===p?1&n.depth?f.dy:f.dx:Math.min(f.dx,f.dy);for(e(h,f.dx*f.dy/n.value),l.area=0;(a=h.length)>0;)l.push(o=h[a-1]),l.area+=o.area,"squarify"!==p||(u=r(l,v))<=d?(h.pop(),d=u):(l.area-=l.pop().area,i(l,v,f,!1),v=Math.min(f.dx,f.dy),l.length=l.area=0,d=1/0);l.length&&(i(l,v,f,!0),l.length=l.area=0),s.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var s,o=c(t),u=r.slice(),a=[];for(e(u,o.dx*o.dy/t.value),a.area=0;s=u.pop();)a.push(s),a.area+=s.area,null!=s.z&&(i(a,s.z?o.dx:o.dy,o,!u.length),a.length=a.area=0);r.forEach(n)}}function r(e,t){for(var n,r=e.area,i=0,s=1/0,o=-1,u=e.length;++o<u;)(n=e[o].area)&&(s>n&&(s=n),n>i&&(i=n));return r*=r,t*=t,r?Math.max(t*i*d/r,r/(t*s*d)):1/0}function i(e,t,n,r){var i,s=-1,o=e.length,u=n.x,f=n.y,l=t?a(e.area/t):0;if(t==n.dx){for((r||l>n.dy)&&(l=n.dy);++s<o;)i=e[s],i.x=u,i.y=f,i.dy=l,u+=i.dx=Math.min(n.x+n.dx-u,l?a(i.area/l):0);i.z=!0,i.dx+=n.x+n.dx-u,n.y+=l,n.dy-=l}else{for((r||l>n.dx)&&(l=n.dx);++s<o;)i=e[s],i.x=u,i.y=f,i.dx=l,f+=i.dy=Math.min(n.y+n.dy-f,l?a(i.area/l):0);i.z=!1,i.dy+=n.y+n.dy-f,n.x+=l,n.dx-=l}}function s(r){var i=o||u(r),s=i[0];return s.x=0,s.y=0,s.dx=f[0],s.dy=f[1],o&&u.revalue(s),e([s],s.dx*s.dy/s.value),(o?n:t)(s),h&&(o=i),i}var o,u=$o.layout.hierarchy(),a=Math.round,f=[1,1],l=null,c=_s,h=!1,p="squarify",d=.5*(1+Math.sqrt(5));return s.size=function(e){return arguments.length?(f=e,s):f},s.padding=function(e){function t(t){var n=e.call(s,t,t.depth);return null==n?_s(t):Ds(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Ds(t,e)}if(!arguments.length)return l;var r;return c=null==(l=e)?_s:"function"==(r=typeof e)?t:"number"===r?(e=[e,e,e,e],n):n,s},s.round=function(e){return arguments.length?(a=e?Math.round:Number,s):a!=Number},s.sticky=function(e){return arguments.length?(h=e,o=null,s):h},s.ratio=function(e){return arguments.length?(d=e,s):d},s.mode=function(e){return arguments.length?(p=e+"",s):p},Vi(s,u)},$o.random={normal:function(e,t){var n=arguments.length;return 2>n&&(t=1),1>n&&(e=0),function(){var n,r,i;do n=2*Math.random()-1,r=2*Math.random()-1,i=n*n+r*r;while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=$o.random.normal.apply($o,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=$o.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;e>n;n++)t+=Math.random();return t}}},$o.scale={};var hf={floor:St,ceil:St};$o.scale.linear=function(){return qs([0,1],[0,1],hi,!1)};var pf={s:1,g:1,p:1,r:1,e:1};$o.scale.log=function(){return Js($o.scale.linear().domain([0,1]),10,!0,[1,10])};var df=$o.format(".0e"),vf={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};$o.scale.pow=function(){return Ks($o.scale.linear(),1,[0,1])},$o.scale.sqrt=function(){return $o.scale.pow().exponent(.5)},$o.scale.ordinal=function(){return Gs([],{t:"range",a:[[]]})},$o.scale.category10=function(){return $o.scale.ordinal().range(mf)},$o.scale.category20=function(){return $o.scale.ordinal().range(gf)},$o.scale.category20b=function(){return $o.scale.ordinal().range(yf)},$o.scale.category20c=function(){return $o.scale.ordinal().range(bf)};var mf=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ht),gf=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ht),yf=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ht),bf=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ht);$o.scale.quantile=function(){return Ys([],[])},$o.scale.quantize=function(){return Zs(0,1,[0,1])},$o.scale.threshold=function(){return eo([.5],[0,1])},$o.scale.identity=function(){return to([0,1])},$o.svg={},$o.svg.arc=function(){function e(){var e=t.apply(this,arguments),s=n.apply(this,arguments),o=r.apply(this,arguments)+wf,u=i.apply(this,arguments)+wf,a=(o>u&&(a=o,o=u,u=a),u-o),f=Nu>a?"0":"1",l=Math.cos(o),c=Math.sin(o),h=Math.cos(u),p=Math.sin(u);return a>=Ef?e?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+e+"A"+e+","+e+" 0 1,0 0,"+ -e+"A"+e+","+e+" 0 1,0 0,"+e+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":e?"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L"+e*h+","+e*p+"A"+e+","+e+" 0 "+f+",0 "+e*l+","+e*c+"Z":"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L0,0"+"Z"}var t=no,n=ro,r=io,i=so;return e.innerRadius=function(n){return arguments.length?(t=Et(n),e):t},e.outerRadius=function(t){return arguments.length?(n=Et(t),e):n},e.startAngle=function(t){return arguments.length?(r=Et(t),e):r},e.endAngle=function(t){return arguments.length?(i=Et(t),e):i},e.centroid=function(){var e=(t.apply(this,arguments)+n.apply(this,arguments))/2,s=(r.apply(this,arguments)+i.apply(this,arguments))/2+wf;return[Math.cos(s)*e,Math.sin(s)*e]},e};var wf=-ku,Ef=Cu-Lu;$o.svg.line=function(){return oo(St)};var Sf=$o.map({linear:uo,"linear-closed":ao,step:fo,"step-before":lo,"step-after":co,basis:yo,"basis-open":bo,"basis-closed":wo,bundle:Eo,cardinal:vo,"cardinal-open":ho,"cardinal-closed":po,monotone:ko});Sf.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var xf=[0,2/3,1/3,0],Tf=[0,1/3,2/3,0],Nf=[0,1/6,2/3,1/6];$o.svg.line.radial=function(){var e=oo(Lo);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},lo.reverse=co,co.reverse=lo,$o.svg.area=function(){return Ao(St)},$o.svg.area.radial=function(){var e=Ao(Lo);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},$o.svg.chord=function(){function e(e,u){var a=t(this,s,e,u),f=t(this,o,e,u);return"M"+a.p0+r(a.r,a.p1,a.a1-a.a0)+(n(a,f)?i(a.r,a.p1,a.r,a.p0):i(a.r,a.p1,f.r,f.p0)+r(f.r,f.p1,f.a1-f.a0)+i(f.r,f.p1,a.r,a.p0))+"Z"}function t(e,t,n,r){var i=t.call(e,n,r),s=u.call(e,i,r),o=a.call(e,i,r)+wf,l=f.call(e,i,r)+wf;return{r:s,a0:o,a1:l,p0:[s*Math.cos(o),s*Math.sin(o)],p1:[s*Math.cos(l),s*Math.sin(l)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function r(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Nu)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var s=pr,o=dr,u=Oo,a=io,f=so;return e.radius=function(t){return arguments.length?(u=Et(t),e):u},e.source=function(t){return arguments.length?(s=Et(t),e):s},e.target=function(t){return arguments.length?(o=Et(t),e):o},e.startAngle=function(t){return arguments.length?(a=Et(t),e):a},e.endAngle=function(t){return arguments.length?(f=Et(t),e):f},e},$o.svg.diagonal=function(){function e(e,i){var s=t.call(this,e,i),o=n.call(this,e,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];return a=a.map(r),"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var t=pr,n=dr,r=Mo;return e.source=function(n){return arguments.length?(t=Et(n),e):t},e.target=function(t){return arguments.length?(n=Et(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},$o.svg.diagonal.radial=function(){var e=$o.svg.diagonal(),t=Mo,n=e.projection;return e.projection=function(e){return arguments.length?n(_o(t=e)):t},e},$o.svg.symbol=function(){function e(e,r){return(Cf.get(t.call(this,e,r))||Ho)(n.call(this,e,r))}var t=Po,n=Do;return e.type=function(n){return arguments.length?(t=Et(n),e):t},e.size=function(t){return arguments.length?(n=Et(t),e):n},e};var Cf=$o.map({circle:Ho,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+ -3*t+","+ -t+"H"+ -t+"V"+ -3*t+"H"+t+"V"+ -t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+ -t+"V"+t+"H"+ -3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Of)),n=t*Of;return"M0,"+ -t+"L"+n+",0"+" 0,"+t+" "+ -n+",0"+"Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Af),n=t*Af/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Af),n=t*Af/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});$o.svg.symbolTypes=Cf.keys();var kf,Lf,Af=Math.sqrt(3),Of=Math.tan(30*Ou),Mf=[],_f=0;Mf.call=gu.call,Mf.empty=gu.empty,Mf.node=gu.node,Mf.size=gu.size,$o.transition=function(e){return arguments.length?kf?e.transition():e:wu.transition()},$o.transition.prototype=Mf,Mf.select=function(e){var t,n,r,i=this.id,s=[];e=w(e);for(var o=-1,u=this.length;++o<u;){s.push(t=[]);for(var a=this[o],f=-1,l=a.length;++f<l;)(r=a[f])&&(n=e.call(r,r.__data__,f,o))?("__data__"in r&&(n.__data__=r.__data__),Io(n,f,i,r.__transition__[i]),t.push(n)):t.push(null)}return Bo(s,i)},Mf.selectAll=function(e){var t,n,r,i,s,o=this.id,u=[];e=E(e);for(var a=-1,f=this.length;++a<f;)for(var l=this[a],c=-1,h=l.length;++c<h;)if(r=l[c]){s=r.__transition__[o],n=e.call(r,r.__data__,c,a),u.push(t=[]);for(var p=-1,d=n.length;++p<d;)(i=n[p])&&Io(i,p,o,s),t.push(i)}return Bo(u,o)},Mf.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=_(e));for(var s=0,o=this.length;o>s;s++){i.push(t=[]);for(var n=this[s],u=0,a=n.length;a>u;u++)(r=n[u])&&e.call(r,r.__data__,u,s)&&t.push(r)}return Bo(i,this.id)},Mf.tween=function(e,t){var n=this.id;return arguments.length<2?this.node().__transition__[n].tween.get(e):P(this,null==t?function(t){t.__transition__[n].tween.remove(e)}:function(r){r.__transition__[n].tween.set(e,t)})},Mf.attr=function(e,t){function n(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}function i(e){return null==e?n:(e+="",function(){var t,n=this.getAttribute(u);return n!==e&&(t=o(n,e),function(e){this.setAttribute(u,t(e))})})}function s(e){return null==e?r:(e+="",function(){var t,n=this.getAttributeNS(u.space,u.local);return n!==e&&(t=o(n,e),function(e){this.setAttributeNS(u.space,u.local,t(e))})})}if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var o="transform"==e?Hi:hi,u=$o.ns.qualify(e);return jo(this,"attr."+e,t,u.local?s:i)},Mf.attrTween=function(e,t){function n(e,n){var r=t.call(this,e,n,this.getAttribute(i));return r&&function(e){this.setAttribute(i,r(e))}}function r(e,n){var r=t.call(this,e,n,this.getAttributeNS(i.space,i.local));return r&&function(e){this.setAttributeNS(i.space,i.local,r(e))}}var i=$o.ns.qualify(e);return this.tween("attr."+e,i.local?r:n)},Mf.style=function(e,t,n){function r(){this.style.removeProperty(e)}function i(t){return null==t?r:(t+="",function(){var r,i=Yo.getComputedStyle(this,null).getPropertyValue(e);return i!==t&&(r=hi(i,t),function(t){this.style.setProperty(e,r(t),n)})})}var s=arguments.length;if(3>s){if("string"!=typeof e){2>s&&(t="");for(n in e)this.style(n,e[n],t);return this}n=""}return jo(this,"style."+e,t,i)},Mf.styleTween=function(e,t,n){function r(r,i){var s=t.call(this,r,i,Yo.getComputedStyle(this,null).getPropertyValue(e));return s&&function(t){this.style.setProperty(e,s(t),n)}}return arguments.length<3&&(n=""),this.tween("style."+e,r)},Mf.text=function(e){return jo(this,"text",e,Fo)},Mf.remove=function(){return this.each("end.transition",function(){var e;this.__transition__.count<2&&(e=this.parentNode)&&e.removeChild(this)})},Mf.ease=function(e){var t=this.id;return arguments.length<1?this.node().__transition__[t].ease:("function"!=typeof e&&(e=$o.ease.apply($o,arguments)),P(this,function(n){n.__transition__[t].ease=e}))},Mf.delay=function(e){var t=this.id;return P(this,"function"==typeof e?function(n,r,i){n.__transition__[t].delay=+e.call(n,n.__data__,r,i)}:(e=+e,function(n){n.__transition__[t].delay=e}))},Mf.duration=function(e){var t=this.id;return P(this,"function"==typeof e?function(n,r,i){n.__transition__[t].duration=Math.max(1,e.call(n,n.__data__,r,i))}:(e=Math.max(1,e),function(n){n.__transition__[t].duration=e}))},Mf.each=function(e,t){var n=this.id;if(arguments.length<2){var r=Lf,i=kf;kf=n,P(this,function(t,r,i){Lf=t.__transition__[n],e.call(t,t.__data__,r,i)}),Lf=r,kf=i}else P(this,function(r){var i=r.__transition__[n];(i.event||(i.event=$o.dispatch("start","end"))).on(e,t)});return this},Mf.transition=function(){for(var e,t,n,r,i=this.id,s=++_f,o=[],u=0,a=this.length;a>u;u++){o.push(e=[]);for(var t=this[u],f=0,l=t.length;l>f;f++)(n=t[f])&&(r=Object.create(n.__transition__[i]),r.delay+=r.duration,Io(n,f,s,r)),e.push(n)}return Bo(o,s)},$o.svg.axis=function(){function e(e){e.each(function(){var e,f=$o.select(this),l=this.__chart__||n,c=this.__chart__=n.copy(),h=null==a?c.ticks?c.ticks.apply(c,u):c.domain():a,p=null==t?c.tickFormat?c.tickFormat.apply(c,u):St:t,d=f.selectAll(".tick").data(h,c),v=d.enter().insert("g",".domain").attr("class","tick").style("opacity",Lu),m=$o.transition(d.exit()).style("opacity",Lu).remove(),g=$o.transition(d).style("opacity",1),y=Hs(c),b=f.selectAll(".domain").data([0]),w=(b.enter().append("path").attr("class","domain"),$o.transition(b));v.append("line"),v.append("text");var E=v.select("line"),S=g.select("line"),x=d.select("text").text(p),T=v.select("text"),N=g.select("text");switch(r){case"bottom":e=qo,E.attr("y2",i),T.attr("y",Math.max(i,0)+o),S.attr("x2",0).attr("y2",i),N.attr("x",0).attr("y",Math.max(i,0)+o),x.attr("dy",".71em").style("text-anchor","middle"),w.attr("d","M"+y[0]+","+s+"V0H"+y[1]+"V"+s);break;case"top":e=qo,E.attr("y2",-i),T.attr("y",-(Math.max(i,0)+o)),S.attr("x2",0).attr("y2",-i),N.attr("x",0).attr("y",-(Math.max(i,0)+o)),x.attr("dy","0em").style("text-anchor","middle"),w.attr("d","M"+y[0]+","+ -s+"V0H"+y[1]+"V"+ -s);break;case"left":e=Ro,E.attr("x2",-i),T.attr("x",-(Math.max(i,0)+o)),S.attr("x2",-i).attr("y2",0),N.attr("x",-(Math.max(i,0)+o)).attr("y",0),x.attr("dy",".32em").style("text-anchor","end"),w.attr("d","M"+ -s+","+y[0]+"H0V"+y[1]+"H"+ -s);break;case"right":e=Ro,E.attr("x2",i),T.attr("x",Math.max(i,0)+o),S.attr("x2",i).attr("y2",0),N.attr("x",Math.max(i,0)+o).attr("y",0),x.attr("dy",".32em").style("text-anchor","start"),w.attr("d","M"+s+","+y[0]+"H0V"+y[1]+"H"+s)}if(c.rangeBand){var C=c,k=C.rangeBand()/2;l=c=function(e){return C(e)+k}}else l.rangeBand?l=c:m.call(e,c);v.call(e,l),g.call(e,c)})}var t,n=$o.scale.linear(),r=Df,i=6,s=6,o=3,u=[10],a=null;return e.scale=function(t){return arguments.length?(n=t,e):n},e.orient=function(t){return arguments.length?(r=t in Pf?t+"":Df,e):r},e.ticks=function(){return arguments.length?(u=arguments,e):u},e.tickValues=function(t){return arguments.length?(a=t,e):a},e.tickFormat=function(n){return arguments.length?(t=n,e):t},e.tickSize=function(t){var n=arguments.length;return n?(i=+t,s=+arguments[n-1],e):i},e.innerTickSize=function(t){return arguments.length?(i=+t,e):i},e.outerTickSize=function(t){return arguments.length?(s=+t,e):s},e.tickPadding=function(t){return arguments.length?(o=+t,e):o},e.tickSubdivide=function(){return arguments.length&&e},e};var Df="bottom",Pf={top:1,right:1,bottom:1,left:1};$o.svg.brush=function(){function e(s){s.each(function(){var s=$o.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),o=s.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),s.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var u=s.selectAll(".resize").data(d,St);u.exit().remove(),u.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Hf[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),u.style("display",e.empty()?"none":null);var l,c=$o.transition(s),h=$o.transition(o);a&&(l=Hs(a),h.attr("x",l[0]).attr("width",l[1]-l[0]),n(c)),f&&(l=Hs(f),h.attr("y",l[0]).attr("height",l[1]-l[0]),r(c)),t(c)})}function t(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+l[+/e$/.test(e)]+","+c[+/^s/.test(e)]+")"})}function n(e){e.select(".extent").attr("x",l[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function r(e){e.select(".extent").attr("y",c[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",c[1]-c[0])}function i(){function i(){32==$o.event.keyCode&&(L||(b=null,O[0]-=l[1],O[1]-=c[1],L=2),m())}function d(){32==$o.event.keyCode&&2==L&&(O[0]+=l[1],O[1]+=c[1],L=0,m())}function v(){var e=$o.mouse(E),i=!1;w&&(e[0]+=w[0],e[1]+=w[1]),L||($o.event.altKey?(b||(b=[(l[0]+l[1])/2,(c[0]+c[1])/2]),O[0]=l[+(e[0]<b[0])],O[1]=c[+(e[1]<b[1])]):b=null),C&&g(e,a,0)&&(n(T),i=!0),k&&g(e,f,1)&&(r(T),i=!0),i&&(t(T),x({type:"brush",mode:L?"move":"resize"}))}function g(e,t,n){var r,i,u=Hs(t),a=u[0],f=u[1],d=O[n],v=n?c:l,m=v[1]-v[0];return L&&(a-=d,f-=m+d),r=(n?p:h)?Math.max(a,Math.min(f,e[n])):e[n],L?i=(r+=d)+m:(b&&(d=Math.max(a,Math.min(f,2*b[n]-r))),r>d?(i=r,r=d):i=d),v[0]!=r||v[1]!=i?(n?o=null:s=null,v[0]=r,v[1]=i,!0):void 0}function y(){v(),T.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),$o.select("body").style("cursor",null),M.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),A(),x({type:"brushend"})}var b,w,E=this,S=$o.select($o.event.target),x=u.of(E,arguments),T=$o.select(E),N=S.datum(),C=!/^(n|s)$/.test(N)&&a,k=!/^(e|w)$/.test(N)&&f,L=S.classed("extent"),A=R(),O=$o.mouse(E),M=$o.select(Yo).on("keydown.brush",i).on("keyup.brush",d);if($o.event.changedTouches?M.on("touchmove.brush",v).on("touchend.brush",y):M.on("mousemove.brush",v).on("mouseup.brush",y),T.interrupt().selectAll("*").interrupt(),L)O[0]=l[0]-O[0],O[1]=c[0]-O[1];else if(N){var _=+/w$/.test(N),D=+/^n/.test(N);w=[l[1-_]-O[0],c[1-D]-O[1]],O[0]=l[_],O[1]=c[D]}else $o.event.altKey&&(b=O.slice());T.style("pointer-events","none").selectAll(".resize").style("display",null),$o.select("body").style("cursor",S.style("cursor")),x({type:"brushstart"}),v()}var s,o,u=y(e,"brushstart","brush","brushend"),a=null,f=null,l=[0,0],c=[0,0],h=!0,p=!0,d=Bf[0];return e.event=function(e){e.each(function(){var e=u.of(this,arguments),t={x:l,y:c,i:s,j:o},n=this.__chart__||t;this.__chart__=t,kf?$o.select(this).transition().each("start.brush",function(){s=n.i,o=n.j,l=n.x,c=n.y,e({type:"brushstart"})}).tween("brush:brush",function(){var n=pi(l,t.x),r=pi(c,t.y);return s=o=null,function(i){l=t.x=n(i),c=t.y=r(i),e({type:"brush",mode:"resize"})}}).each("end.brush",function(){s=t.i,o=t.j,e({type:"brush",mode:"resize"}),e({type:"brushend"})}):(e({type:"brushstart"}),e({type:"brush",mode:"resize"}),e({type:"brushend"}))})},e.x=function(t){return arguments.length?(a=t,d=Bf[!a<<1|!f],e):a},e.y=function(t){return arguments.length?(f=t,d=Bf[!a<<1|!f],e):f},e.clamp=function(t){return arguments.length?(a&&f?(h=!!t[0],p=!!t[1]):a?h=!!t:f&&(p=!!t),e):a&&f?[h,p]:a?h:f?p:null},e.extent=function(t){var n,r,i,u,h;return arguments.length?(a&&(n=t[0],r=t[1],f&&(n=n[0],r=r[0]),s=[n,r],a.invert&&(n=a(n),r=a(r)),n>r&&(h=n,n=r,r=h),(n!=l[0]||r!=l[1])&&(l=[n,r])),f&&(i=t[0],u=t[1],a&&(i=i[1],u=u[1]),o=[i,u],f.invert&&(i=f(i),u=f(u)),i>u&&(h=i,i=u,u=h),(i!=c[0]||u!=c[1])&&(c=[i,u])),e):(a&&(s?(n=s[0],r=s[1]):(n=l[0],r=l[1],a.invert&&(n=a.invert(n),r=a.invert(r)),n>r&&(h=n,n=r,r=h))),f&&(o?(i=o[0],u=o[1]):(i=c[0],u=c[1],f.invert&&(i=f.invert(i),u=f.invert(u)),i>u&&(h=i,i=u,u=h))),a&&f?[[n,i],[r,u]]:a?[n,r]:f&&[i,u])},e.clear=function(){return e.empty()||(l=[0,0],c=[0,0],s=o=null),e},e.empty=function(){return!!a&&l[0]==l[1]||!!f&&c[0]==c[1]},$o.rebind(e,u,"on")};var Hf={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bf=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],jf=na.format=aa.timeFormat,Ff=jf.utc,If=Ff("%Y-%m-%dT%H:%M:%S.%LZ");jf.iso=Date.prototype.toISOString&&+(new Date("2000-01-01T00:00:00.000Z"))?Uo:If,Uo.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Uo.toString=If.toString,na.second=Pt(function(e){return new ra(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()}),na.seconds=na.second.range,na.seconds.utc=na.second.utc.range,na.minute=Pt(function(e){return new ra(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()}),na.minutes=na.minute.range,na.minutes.utc=na.minute.utc.range,na.hour=Pt(function(e){var t=e.getTimezoneOffset()/60;return new ra(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()}),na.hours=na.hour.range,na.hours.utc=na.hour.utc.range,na.month=Pt(function(e){return e=na.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),na.months=na.month.range,na.months.utc=na.month.utc.range;var qf=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Rf=[[na.second,1],[na.second,5],[na.second,15],[na.second,30],[na.minute,1],[na.minute,5],[na.minute,15],[na.minute,30],[na.hour,1],[na.hour,3],[na.hour,6],[na.hour,12],[na.day,1],[na.day,2],[na.week,1],[na.month,1],[na.month,3],[na.year,1]],Uf=jf.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",xn]]),zf={range:function(e,t,n){return $o.range(+e,+t,n).map(Wo)},floor:St,ceil:St};Rf.year=na.year,na.scale=function(){return zo($o.scale.linear(),Rf,Uf)};var Wf=Rf.map(function(e){return[e[0].utc,e[1]]}),Xf=Ff.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",xn]]);Wf.year=na.year.utc,na.scale.utc=function(){return zo($o.scale.linear(),Wf,Xf)},$o.text=xt(function(e){return e.responseText}),$o.json=function(e,t){return Tt(e,"application/json",Xo,t)},$o.html=function(e,t){return Tt(e,"text/html",Vo,t)},$o.xml=xt(function(e){return e.responseXML}),"function"==typeof define&&define.amd?define("d3",$o):"object"==typeof module&&module.exports?module.exports=$o:this.d3=$o}();var Handlebars=function(){var e=function(){function e(e){this.string=e}var t;return e.prototype.toString=function(){return""+this.string},t=e}(),t=function(e){function t(e){return u[e]||"&amp;"}function n(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function r(e){return e instanceof o?e.toString():e||0===e?(e=""+e,f.test(e)?e.replace(a,t):e):""}function i(e){return e||0===e?h(e)&&0===e.length?!0:!1:!0}var s={},o=e,u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},a=/[&<>"'`]/g,f=/[&<>"'`]/;s.extend=n;var l=Object.prototype.toString;s.toString=l;var c=function(e){return"function"==typeof e};c(/x/)&&(c=function(e){return"function"==typeof e&&"[object Function]"===l.call(e)});var c;s.isFunction=c;var h=Array.isArray||function(e){return e&&"object"==typeof e?"[object Array]"===l.call(e):!1};return s.isArray=h,s.escapeExpression=r,s.isEmpty=i,s}(e),n=function(){function e(e,t){var r;t&&t.firstLine&&(r=t.firstLine,e+=" - "+r+":"+t.firstColumn);for(var i=Error.prototype.constructor.call(this,e),s=0;s<n.length;s++)this[n[s]]=i[n[s]];r&&(this.lineNumber=r,this.column=t.firstColumn)}var t,n=["description","fileName","lineNumber","message","name","number","stack"];return e.prototype=new Error,t=e}(),r=function(e,t){function n(e,t){this.helpers=e||{},this.partials=t||{},r(this)}function r(e){e.registerHelper("helperMissing",function(e){if(2===arguments.length)return void 0;throw new u("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var r=n.inverse||function(){},i=n.fn;return h(t)&&(t=t.call(this)),t===!0?i(this):t===!1||null==t?r(this):c(t)?t.length>0?e.helpers.each(t,n):r(this):i(t)}),e.registerHelper("each",function(e,t){var n,r=t.fn,i=t.inverse,s=0,o="";if(h(e)&&(e=e.call(this)),t.data&&(n=m(t.data)),e&&"object"==typeof e)if(c(e))for(var u=e.length;u>s;s++)n&&(n.index=s,n.first=0===s,n.last=s===e.length-1),o+=r(e[s],{data:n});else for(var a in e)e.hasOwnProperty(a)&&(n&&(n.key=a,n.index=s,n.first=0===s),o+=r(e[a],{data:n}),s++);return 0===s&&(o=i(this)),o}),e.registerHelper("if",function(e,t){return h(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||o.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers["if"].call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}),e.registerHelper("with",function(e,t){return h(e)&&(e=e.call(this)),o.isEmpty(e)?void 0:t.fn(e)}),e.registerHelper("log",function(t,n){var r=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(r,t)})}function i(e,t){v.log(e,t)}var s={},o=e,u=t,a="1.3.0";s.VERSION=a;var f=4;s.COMPILER_REVISION=f;var l={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};s.REVISION_CHANGES=l;var c=o.isArray,h=o.isFunction,p=o.toString,d="[object Object]";s.HandlebarsEnvironment=n,n.prototype={constructor:n,logger:v,log:i,registerHelper:function(e,t,n){if(p.call(e)===d){if(n||t)throw new u("Arg not supported with multiple helpers");o.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){p.call(e)===d?o.extend(this.partials,e):this.partials[e]=t}};var v={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(v.level<=e){var n=v.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};s.logger=v,s.log=i;var m=function(e){var t={};return o.extend(t,e),t};return s.createFrame=m,s}(t,n),i=function(e,t,n){function r(e){var t=e&&e[0]||1,n=h;if(t!==n){if(n>t){var r=p[n],i=p[t];throw new c("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+i+").")}throw new c("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function i(e,t){if(!t)throw new c("No environment passed to template");var n=function(e,n,r,i,s,o){var u=t.VM.invokePartial.apply(this,arguments);if(null!=u)return u;if(t.compile){var a={helpers:i,partials:s,data:o};return s[n]=t.compile(e,{data:void 0!==o},t),s[n](r,a)}throw new c("The partial "+n+" could not be compiled when running in runtime-only mode")},r={escapeExpression:l.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var r=this.programs[e];return n?r=o(e,t,n):r||(r=this.programs[e]=o(e,t)),r},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n={},l.extend(n,t),l.extend(n,e)),n},programWithDepth:t.VM.programWithDepth,noop:t.VM.noop,compilerInfo:null};return function(n,i){i=i||{};var s,o,u=i.partial?i:t;i.partial||(s=i.helpers,o=i.partials);var a=e.call(r,u,n,s,o,i.data);return i.partial||t.VM.checkRevision(r.compilerInfo),a}}function s(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=function(e,i){return i=i||{},t.apply(this,[e,i.data||n].concat(r))};return i.program=e,i.depth=r.length,i}function o(e,t,n){var r=function(e,r){return r=r||{},t(e,r.data||n)};return r.program=e,r.depth=0,r}function u(e,t,n,r,i,s){var o={partial:!0,helpers:r,partials:i,data:s};if(void 0===e)throw new c("The partial "+t+" could not be found");return e instanceof Function?e(n,o):void 0}function a(){return""}var f={},l=e,c=t,h=n.COMPILER_REVISION,p=n.REVISION_CHANGES;return f.checkRevision=r,f.template=i,f.programWithDepth=s,f.program=o,f.invokePartial=u,f.noop=a,f}(t,n,r),s=function(e,t,n,r,i){var s,o=e,u=t,a=n,f=r,l=i,c=function(){var e=new o.HandlebarsEnvironment;return f.extend(e,o),e.SafeString=u,e.Exception=a,e.Utils=f,e.VM=l,e.template=function(t){return l.template(t,e)},e},h=c();return h.create=c,s=h}(r,e,n,t,i),o=function(e){function t(e){e=e||{},this.firstLine=e.first_line,this.firstColumn=e.first_column,this.lastColumn=e.last_column,this.lastLine=e.last_line}var n,r=e,i={ProgramNode:function(e,n,r,s){var o,u;3===arguments.length?(s=r,r=null):2===arguments.length&&(s=n,n=null),t.call(this,s),this.type="program",this.statements=e,this.strip={},r?(u=r[0],u?(o={first_line:u.firstLine,last_line:u.lastLine,last_column:u.lastColumn,first_column:u.firstColumn},this.inverse=new i.ProgramNode(r,n,o)):this.inverse=new i.ProgramNode(r,n),this.strip.right=n.left):n&&(this.strip.left=n.right)},MustacheNode:function(e,n,r,s,o){if(t.call(this,o),this.type="mustache",this.strip=s,null!=r&&r.charAt){var u=r.charAt(3)||r.charAt(2);this.escaped="{"!==u&&"&"!==u}else this.escaped=!!r;this.sexpr=e instanceof i.SexprNode?e:new i.SexprNode(e,n),this.sexpr.isRoot=!0,this.id=this.sexpr.id,this.params=this.sexpr.params,this.hash=this.sexpr.hash,this.eligibleHelper=this.sexpr.eligibleHelper,this.isHelper=this.sexpr.isHelper},SexprNode:function(e,n,r){t.call(this,r),this.type="sexpr",this.hash=n;var i=this.id=e[0],s=this.params=e.slice(1),o=this.eligibleHelper=i.isSimple;this.isHelper=o&&(s.length||n)},PartialNode:function(e,n,r,i){t.call(this,i),this.type="partial",this.partialName=e,this.context=n,this.strip=r},BlockNode:function(e,n,i,s,o){if(t.call(this,o),e.sexpr.id.original!==s.path.original)throw new r(e.sexpr.id.original+" doesn't match "+s.path.original,this);this.type="block",this.mustache=e,this.program=n,this.inverse=i,this.strip={left:e.strip.left,right:s.strip.right},(n||i).strip.left=e.strip.right,(i||n).strip.right=s.strip.left,i&&!n&&(this.isInverse=!0)},ContentNode:function(e,n){t.call(this,n),this.type="content",this.string=e},HashNode:function(e,n){t.call(this,n),this.type="hash",this.pairs=e},IdNode:function(e,n){t.call(this,n),this.type="ID";for(var i="",s=[],o=0,u=0,a=e.length;a>u;u++){var f=e[u].part;if(i+=(e[u].separator||"")+f,".."===f||"."===f||"this"===f){if(s.length>0)throw new r("Invalid path: "+i,this);".."===f?o++:this.isScoped=!0}else s.push(f)}this.original=i,this.parts=s,this.string=s.join("."),this.depth=o,this.isSimple=1===e.length&&!this.isScoped&&0===o,this.stringModeValue=this.string},PartialNameNode:function(e,n){t.call(this,n),this.type="PARTIAL_NAME",this.name=e.original},DataNode:function(e,n){t.call(this,n),this.type="DATA",this.id=e},StringNode:function(e,n){t.call(this,n),this.type="STRING",this.original=this.string=this.stringModeValue=e},IntegerNode:function(e,n){t.call(this,n),this.type="INTEGER",this.original=this.integer=e,this.stringModeValue=Number(e)},BooleanNode:function(e,n){t.call(this,n),this.type="BOOLEAN",this.bool=e,this.stringModeValue="true"===e},CommentNode:function(e,n){t.call(this,n),this.type="comment",this.comment=e}};return n=i}(n),u=function(){var e,t=function(){function e(e,t){return{left:"~"===e.charAt(2),right:"~"===t.charAt(0)||"~"===t.charAt(1)}}function t(){this.yy={}}var n={trace:function(){},yy:{},symbols_:{error:2,root:3,statements:4,EOF:5,program:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,sexpr:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,partial_option0:27,sexpr_repetition0:28,sexpr_option0:29,dataName:30,param:31,STRING:32,INTEGER:33,BOOLEAN:34,OPEN_SEXPR:35,CLOSE_SEXPR:36,hash:37,hash_repetition_plus0:38,hashSegment:39,ID:40,EQUALS:41,DATA:42,pathSegments:43,SEP:44,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},productions_:[0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[37,1],[39,3],[26,1],[26,1],[26,1],[30,2],[21,1],[43,3],[43,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[38,1],[38,2]],performAction:function(t,n,r,i,s,o){var u=o.length-1;switch(s){case 1:return new i.ProgramNode(o[u-1],this._$);case 2:return new i.ProgramNode([],this._$);case 3:this.$=new i.ProgramNode([],o[u-1],o[u],this._$);break;case 4:this.$=new i.ProgramNode(o[u-2],o[u-1],o[u],this._$);break;case 5:this.$=new i.ProgramNode(o[u-1],o[u],[],this._$);break;case 6:this.$=new i.ProgramNode(o[u],this._$);break;case 7:this.$=new i.ProgramNode([],this._$);break;case 8:this.$=new i.ProgramNode([],this._$);break;case 9:this.$=[o[u]];break;case 10:o[u-1].push(o[u]),this.$=o[u-1];break;case 11:this.$=new i.BlockNode(o[u-2],o[u-1].inverse,o[u-1],o[u],this._$);break;case 12:this.$=new i.BlockNode(o[u-2],o[u-1],o[u-1].inverse,o[u],this._$);break;case 13:this.$=o[u];break;case 14:this.$=o[u];break;case 15:this.$=new i.ContentNode(o[u],this._$);break;case 16:this.$=new i.CommentNode(o[u],this._$);break;case 17:this.$=new i.MustacheNode(o[u-1],null,o[u-2],e(o[u-2],o[u]),this._$);break;case 18:this.$=new i.MustacheNode(o[u-1],null,o[u-2],e(o[u-2],o[u]),this._$);break;case 19:this.$={path:o[u-1],strip:e(o[u-2],o[u])};break;case 20:this.$=new i.MustacheNode(o[u-1],null,o[u-2],e(o[u-2],o[u]),this._$);break;case 21:this.$=new i.MustacheNode(o[u-1],null,o[u-2],e(o[u-2],o[u]),this._$);break;case 22:this.$=new i.PartialNode(o[u-2],o[u-1],e(o[u-3],o[u]),this._$);break;case 23:this.$=e(o[u-1],o[u]);break;case 24:this.$=new i.SexprNode([o[u-2]].concat(o[u-1]),o[u],this._$);break;case 25:this.$=new i.SexprNode([o[u]],null,this._$);break;case 26:this.$=o[u];break;case 27:this.$=new i.StringNode(o[u],this._$);break;case 28:this.$=new i.IntegerNode(o[u],this._$);break;case 29:this.$=new i.BooleanNode(o[u],this._$);break;case 30:this.$=o[u];break;case 31:o[u-1].isHelper=!0,this.$=o[u-1];break;case 32:this.$=new i.HashNode(o[u],this._$);break;case 33:this.$=[o[u-2],o[u]];break;case 34:this.$=new i.PartialNameNode(o[u],this._$);break;case 35:this.$=new i.PartialNameNode(new i.StringNode(o[u],this._$),this._$);break;case 36:this.$=new i.PartialNameNode(new i.IntegerNode(o[u],this._$));break;case 37:this.$=new i.DataNode(o[u],this._$);break;case 38:this.$=new i.IdNode(o[u],this._$);break;case 39:o[u-2].push({part:o[u],separator:o[u-1]}),this.$=o[u-2];break;case 40:this.$=[{part:o[u]}];break;case 43:this.$=[];break;case 44:o[u-1].push(o[u]);break;case 47:this.$=[o[u]];break;case 48:o[u-1].push(o[u])}},table:[{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:29,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:30,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:31,21:24,30:25,40:[1,28],42:[1,27],43:26},{21:33,26:32,32:[1,34],33:[1,35],40:[1,28],43:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,40:[1,28],42:[1,27],43:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,43],24:[2,43],28:43,32:[2,43],33:[2,43],34:[2,43],35:[2,43],36:[2,43],40:[2,43],42:[2,43]},{18:[2,25],24:[2,25],36:[2,25]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],40:[2,38],42:[2,38],44:[1,44]},{21:45,40:[1,28],43:26},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],42:[2,40],44:[2,40]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,41],21:50,27:49,40:[1,28],43:26},{18:[2,34],40:[2,34]},{18:[2,35],40:[2,35]},{18:[2,36],40:[2,36]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,40:[1,28],43:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,45],21:56,24:[2,45],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:[1,61],36:[2,45],37:55,38:62,39:63,40:[1,64],42:[1,27],43:26},{40:[1,65]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],35:[2,37],36:[2,37],40:[2,37],42:[2,37]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,66]},{18:[2,42]},{18:[1,67]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24],36:[2,24]},{18:[2,44],24:[2,44],32:[2,44],33:[2,44],34:[2,44],35:[2,44],36:[2,44],40:[2,44],42:[2,44]},{18:[2,46],24:[2,46],36:[2,46]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],40:[2,26],42:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],40:[2,27],42:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],40:[2,28],42:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],40:[2,29],42:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],40:[2,30],42:[2,30]},{17:68,21:24,30:25,40:[1,28],42:[1,27],43:26},{18:[2,32],24:[2,32],36:[2,32],39:69,40:[1,70]},{18:[2,47],24:[2,47],36:[2,47],40:[2,47]},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],41:[1,71],42:[2,40],44:[2,40]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],35:[2,39],36:[2,39],40:[2,39],42:[2,39],44:[2,39]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{36:[1,72]},{18:[2,48],24:[2,48],36:[2,48],40:[2,48]},{41:[1,71]},{21:56,30:60,31:73,32:[1,57],33:[1,58],34:[1,59],35:[1,61],40:[1,28],42:[1,27],43:26},{18:[2,31],24:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],40:[2,31],42:[2,31]},{18:[2,33],24:[2,33],36:[2,33],40:[2,33]}],defaultActions:{3:[2,2],16:[2,1],50:[2,42]},parseError:function(e){throw new Error(e)},parse:function(e){function t(){var e;return e=n.lexer.lex()||1,"number"!=typeof e&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var c=this.lexer.yylloc;s.push(c);var h=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var p,d,v,m,g,y,b,w,E,S={};;){if(v=r[r.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((null===p||"undefined"==typeof p)&&(p=t()),m=o[v]&&o[v][p]),"undefined"==typeof m||!m.length||!m[0]){var x="";if(!l){E=[];for(y in o[v])this.terminals_[y]&&y>2&&E.push("'"+this.terminals_[y]+"'");x=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:c,expected:E})}}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+p);switch(m[0]){case 1:r.push(p),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(m[1]),p=null,d?(p=d,d=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,c=this.lexer.yylloc,l>0&&l--);break;case 2:if(b=this.productions_[m[1]][1],S.$=i[i.length-b],S._$={first_line:s[s.length-(b||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(b||1)].first_column,last_column:s[s.length-1].last_column},h&&(S._$.range=[s[s.length-(b||1)].range[0],s[s.length-1].range[1]]),g=this.performAction.call(S,u,f,a,this.yy,m[1],i,s),"undefined"!=typeof g)return g;b&&(r=r.slice(0,-1*b*2),i=i.slice(0,-1*b),s=s.slice(0,-1*b)),r.push(this.productions_[m[1]][0]),i.push(S.$),s.push(S._$),w=o[r[r.length-2]][r[r.length-1]],r.push(w);break;case 3:return!0}}return!0}},r=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i;this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),o=0;o<s.length&&(n=this._input.match(this.rules[s[o]]),!n||t&&!(n[0].length>t[0].length)||(t=n,r=o,this.options.flex));o++);return t?(i=t[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,s[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e?e:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return"undefined"!=typeof e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,n,r){function i(e,n){return t.yytext=t.yytext.substr(e,t.yyleng-n)}switch(n){case 0:if("\\\\"===t.yytext.slice(-2)?(i(0,1),this.begin("mu")):"\\"===t.yytext.slice(-1)?(i(0,1),this.begin("emu")):this.begin("mu"),t.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return i(0,4),this.popState(),15;case 4:return 35;case 5:return 36;case 6:return 25;case 7:return 16;case 8:return 20;case 9:return 19;case 10:return 19;case 11:return 23;case 12:return 22;case 13:this.popState(),this.begin("com");break;case 14:return i(3,5),this.popState(),15;case 15:return 22;case 16:return 41;case 17:return 40;case 18:return 40;case 19:return 44;case 20:break;case 21:return this.popState(),24;case 22:return this.popState(),18;case 23:return t.yytext=i(1,2).replace(/\\"/g,'"'),32;case 24:return t.yytext=i(1,2).replace(/\\'/g,"'"),32;case 25:return 42;case 26:return 34;case 27:return 34;case 28:return 33;case 29:return 40;case 30:return t.yytext=i(1,2),40;case 31:return"INVALID";case 32:return 5}},e.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],e.conditions={mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[3],inclusive:!1},INITIAL:{rules:[0,1,32],inclusive:!0}},e}();return n.lexer=r,t.prototype=n,n.Parser=t,new t}();return e=t}(),a=function(e,t){function n(e){return e.constructor===s.ProgramNode?e:(i.yy=s,i.parse(e))}var r={},i=e,s=t;return r.parser=i,r.parse=n,r}(u,o),f=function(e){function t(){}function n(e,t,n){if(null==e||"string"!=typeof e&&e.constructor!==n.AST.ProgramNode)throw new s("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0);var r=n.parse(e),i=(new n.Compiler).compile(r,t);return(new n.JavaScriptCompiler).compile(i,t)}function r(e,t,n){function r(){var r=n.parse(e),i=(new n.Compiler).compile(r,t),s=(new n.JavaScriptCompiler).compile(i,t,void 0,!0);return n.template(s)}if(null==e||"string"!=typeof e&&e.constructor!==n.AST.ProgramNode)throw new s("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=t||{},"data"in t||(t.data=!0);var i;return function(e,t){return i||(i=r()),i.call(this,e,t)}}var i={},s=e;return i.Compiler=t,t.prototype={compiler:t,disassemble:function(){for(var e,t,n,r=this.opcodes,i=[],s=0,o=r.length;o>s;s++)if(e=r[s],"DECLARE"===e.opcode)i.push("DECLARE "+e.name+"="+e.value);else{t=[];for(var u=0;u<e.args.length;u++)n=e.args[u],"string"==typeof n&&(n='"'+n.replace("\n","\\n")+'"'),t.push(n);i.push(e.opcode+" "+t.join(" "))}return i.join("\n")},equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var n=0;t>n;n++){var r=this.opcodes[n],i=e.opcodes[n];if(r.opcode!==i.opcode||r.args.length!==i.args.length)return!1;for(var s=0;s<r.args.length;s++)if(r.args[s]!==i.args[s])return!1}if(t=this.children.length,e.children.length!==t)return!1;for(n=0;t>n;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,t){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=t;var n=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0},n)for(var r in n)this.options.knownHelpers[r]=n[r];return this.accept(e)},accept:function(e){var t,n=e.strip||{};return n.left&&this.opcode("strip"),t=this[e.type](e),n.right&&this.opcode("strip"),t},program:function(e){for(var t=e.statements,n=0,r=t.length;r>n;n++)this.accept(t[n]);return this.isSimple=1===r,this.depths.list=this.depths.list.sort(function(e,t){return e-t}),this},compileProgram:function(e){var t,n=(new this.compiler).compile(e,this.options),r=this.guid++;this.usePartial=this.usePartial||n.usePartial,this.children[r]=n;for(var i=0,s=n.depths.list.length;s>i;i++)t=n.depths.list[i],2>t||this.addDepth(t-1);return r},block:function(e){var t=e.mustache,n=e.program,r=e.inverse;n&&(n=this.compileProgram(n)),r&&(r=this.compileProgram(r));var i=t.sexpr,s=this.classifySexpr(i);"helper"===s?this.helperSexpr(i,n,r):"simple"===s?(this.simpleSexpr(i),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue")):(this.ambiguousSexpr(i,n,r),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(e){var t,n,r=e.pairs;this.opcode("pushHash");for(var i=0,s=r.length;s>i;i++)t=r[i],n=t[1],this.options.stringParams?(n.depth&&this.addDepth(n.depth),this.opcode("getContext",n.depth||0),this.opcode("pushStringParam",n.stringModeValue,n.type),"sexpr"===n.type&&this.sexpr(n)):this.accept(n),this.opcode("assignToHash",t[0]);this.opcode("popHash")},partial:function(e){var t=e.partialName;this.usePartial=!0,e.context?this.ID(e.context):this.opcode("push","depth0"),this.opcode("invokePartial",t.name),this.opcode("append")},content:function(e){this.opcode("appendContent",e.string)},mustache:function(e){this.sexpr(e.sexpr),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousSexpr:function(e,t,n){var r=e.id,i=r.parts[0],s=null!=t||null!=n;this.opcode("getContext",r.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("invokeAmbiguous",i,s)},simpleSexpr:function(e){var t=e.id;"DATA"===t.type?this.DATA(t):t.parts.length?this.ID(t):(this.addDepth(t.depth),this.opcode("getContext",t.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,n){var r=this.setupFullMustacheParams(e,t,n),i=e.id.parts[0];if(this.options.knownHelpers[i])this.opcode("invokeKnownHelper",r.length,i);else{if(this.options.knownHelpersOnly)throw new s("You specified knownHelpersOnly, but used the unknown helper "+i,e);this.opcode("invokeHelper",r.length,i,e.isRoot)}},sexpr:function(e){var t=this.classifySexpr(e);"simple"===t?this.simpleSexpr(e):"helper"===t?this.helperSexpr(e):this.ambiguousSexpr(e)},ID:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0];t?this.opcode("lookupOnContext",e.parts[0]):this.opcode("pushContext");for(var n=1,r=e.parts.length;r>n;n++)this.opcode("lookup",e.parts[n])},DATA:function(e){if(this.options.data=!0,e.id.isScoped||e.id.depth)throw new s("Scoped data references are not supported: "+e.original,e);this.opcode("lookupData");for(var t=e.id.parts,n=0,r=t.length;r>n;n++)this.opcode("lookup",t[n])},STRING:function(e){this.opcode("pushString",e.string)},INTEGER:function(e){this.opcode("pushLiteral",e.integer)},BOOLEAN:function(e){this.opcode("pushLiteral",e.bool)},comment:function(){},opcode:function(e){this.opcodes.push({opcode:e,args:[].slice.call(arguments,1)})},declare:function(e,t){this.opcodes.push({opcode:"DECLARE",name:e,value:t})},addDepth:function(e){0!==e&&(this.depths[e]||(this.depths[e]=!0,this.depths.list.push(e)))},classifySexpr:function(e){var t=e.isHelper,n=e.eligibleHelper,r=this.options;if(n&&!t){var i=e.id.parts[0];r.knownHelpers[i]?t=!0:r.knownHelpersOnly&&(n=!1)}return t?"helper":n?"ambiguous":"simple"},pushParams:function(e){for(var t,n=e.length;n--;)t=e[n],this.options.stringParams?(t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",t.stringModeValue,t.type),"sexpr"===t.type&&this.sexpr(t)):this[t.type](t)},setupFullMustacheParams:function(e,t,n){var r=e.params;return this.pushParams(r),this.opcode("pushProgram",t),this.opcode("pushProgram",n),e.hash?this.hash(e.hash):this.opcode("emptyHash"),r}},i.precompile=n,i.compile=r,i}(n),l=function(e,t){function n(e){this.value=e}function r(){}var i,s=e.COMPILER_REVISION,o=e.REVISION_CHANGES,u=e.log,a=t;r.prototype={nameLookup:function(e,t){var n,i;return 0===e.indexOf("depth")&&(n=!0),i=/^[0-9]+$/.test(t)?e+"["+t+"]":r.isValidJavaScriptVariableName(t)?e+"."+t:e+"['"+t+"']",n?"("+e+" && "+i+")":i},compilerInfo:function(){var e=s,t=o[e];return"this.compilerInfo = ["+e+",'"+t+"'];\n"},appendToBuffer:function(e){return this.environment.isSimple?"return "+e+";":{appendToBuffer:!0,content:e,toString:function(){return"buffer += "+e+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(e,t,n,r){this.environment=e,this.options=t||{},u("debug",this.environment.disassemble()+"\n\n"),this.name=this.environment.name,this.isChild=!!n,this.context=n||{programs:[],environments:[],aliases:{}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.compileChildren(e,t);var i,s=e.opcodes;this.i=0;for(var o=s.length;this.i<o;this.i++)i=s[this.i],"DECLARE"===i.opcode?this[i.name]=i.value:this[i.opcode].apply(this,i.args),i.opcode!==this.stripNext&&(this.stripNext=!1);if(this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new a("Compile completed with content left on stack");return this.createFunctionContext(r)},preamble:function(){var e=[];if(this.isChild)e.push("");else{var t=this.namespace,n="helpers = this.merge(helpers, "+t+".helpers);";this.environment.usePartial&&(n=n+" partials = this.merge(partials, "+t+".partials);"),this.options.data&&(n+=" data = data || {};"),e.push(n)}this.environment.isSimple?e.push(""):e.push(", buffer = "+this.initializeBuffer()),this.lastContext=0,this.source=e},createFunctionContext:function(e){var t=this.stackVars.concat(this.registers.list);if(t.length>0&&(this.source[1]=this.source[1]+", "+t.join(", ")),!this.isChild)for(var n in this.context.aliases)this.context.aliases.hasOwnProperty(n)&&(this.source[1]=this.source[1]+", "+n+"="+this.context.aliases[n]);this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+";"),this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n"),this.environment.isSimple||this.pushSource("return buffer;");for(var r=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"],i=0,s=this.environment.depths.list.length;s>i;i++)r.push("depth"+this.environment.depths.list[i]);var o=this.mergeSource();if(this.isChild||(o=this.compilerInfo()+o),e)return r.push(o),Function.apply(this,r);var a="function "+(this.name||"")+"("+r.join(",")+") {\n  "+o+"}";return u("debug",a+"\n\n"),a},mergeSource:function(){for(var e,t="",n=0,r=this.source.length;r>n;n++){var i=this.source[n];i.appendToBuffer?e=e?e+"\n    + "+i.content:i.content:(e&&(t+="buffer += "+e+";\n  ",e=void 0),t+=i+"\n  ")}return t},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var e=["depth0"];this.setupParams(0,e),this.replaceStack(function(t){return e.splice(1,0,t),"blockHelperMissing.call("+e.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var e=["depth0"];this.setupParams(0,e);var t=this.topStack();e.splice(1,0,t),this.pushSource("if (!"+this.lastHelper+") { "+t+" = blockHelperMissing.call("+e.join(", ")+"); }")},appendContent:function(e){this.pendingContent&&(e=this.pendingContent+e),this.stripNext&&(e=e.replace(/^\s+/,"")),this.pendingContent=e},strip:function(){this.pendingContent&&(this.pendingContent=this.pendingContent.replace(/\s+$/,"")),this.stripNext="strip"},append:function(){this.flushInline();var e=this.popStack();this.pushSource("if("+e+" || "+e+" === 0) { "+this.appendToBuffer(e)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(e){this.lastContext!==e&&(this.lastContext=e)},lookupOnContext:function(e){this.push(this.nameLookup("depth"+this.lastContext,e,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"',this.replaceStack(function(e){return"typeof "+e+" === functionType ? "+e+".apply(depth0) : "+e})},lookup:function(e){this.replaceStack(function(t){return t+" == null || "+t+" === false ? "+t+" : "+this.nameLookup(t,e,"context")})},lookupData:function(){this.pushStackLiteral("data")},pushStringParam:function(e,t){this.pushStackLiteral("depth"+this.lastContext),this.pushString(t),"sexpr"!==t&&("string"==typeof e?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(){this.pushStackLiteral("{}"),this.options.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.options.stringParams&&(this.push("{"+e.contexts.join(",")+"}"),this.push("{"+e.types.join(",")+"}")),this.push("{\n    "+e.values.join(",\n    ")+"\n  }")},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},push:function(e){return this.inlineStack.push(e),e},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){null!=e?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},invokeHelper:function(e,t,n){this.context.aliases.helperMissing="helpers.helperMissing",this.useRegister("helper");var r=this.lastHelper=this.setupHelper(e,t,!0),i=this.nameLookup("depth"+this.lastContext,t,"context"),s="helper = "+r.name+" || "+i;r.paramsInit&&(s+=","+r.paramsInit),this.push("("+s+",helper ? helper.call("+r.callParams+") : helperMissing.call("+r.helperMissingParams+"))"),n||this.flushInline()},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(n.name+".call("+n.callParams+")")},invokeAmbiguous:function(e,t){this.context.aliases.functionType='"function"',this.useRegister("helper"),this.emptyHash();var n=this.setupHelper(0,e,t),r=this.lastHelper=this.nameLookup("helpers",e,"helper"),i=this.nameLookup("depth"+this.lastContext,e,"context"),s=this.nextStack();n.paramsInit&&this.pushSource(n.paramsInit),this.pushSource("if (helper = "+r+") { "+s+" = helper.call("+n.callParams+"); }"),this.pushSource("else { helper = "+i+"; "+s+" = typeof helper === functionType ? helper.call("+n.callParams+") : helper; }")},invokePartial:function(e){var t=[this.nameLookup("partials",e,"partial"),"'"+e+"'",this.popStack(),"helpers","partials"];this.options.data&&t.push("data"),this.context.aliases.self="this",this.push("self.invokePartial("+t.join(", ")+")")},assignToHash:function(e){var t,n,r=this.popStack();this.options.stringParams&&(n=this.popStack(),t=this.popStack());var i=this.hash;t&&i.contexts.push("'"+e+"': "+t),n&&i.types.push("'"+e+"': "+n),i.values.push("'"+e+"': ("+r+")")},compiler:r,compileChildren:function(e,t){for(var n,r,i=e.children,s=0,o=i.length;o>s;s++){n=i[s],r=new this.compiler;var u=this.matchExistingProgram(n);null==u?(this.context.programs.push(""),u=this.context.programs.length,n.index=u,n.name="program"+u,this.context.programs[u]=r.compile(n,t,this.context),this.context.environments[u]=n):(n.index=u,n.name="program"+u)}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;n>t;t++){var r=this.context.environments[t];if(r&&r.equals(e))return t}},programExpression:function(e){if(this.context.aliases.self="this",null==e)return"self.noop";for(var t,n=this.environment.children[e],r=n.depths.list,i=[n.index,n.name,"data"],s=0,o=r.length;o>s;s++)t=r[s],1===t?i.push("depth0"):i.push("depth"+(t-1));return(0===r.length?"self.program(":"self.programWithDepth(")+i.join(", ")+")"},register:function(e,t){this.useRegister(e),this.pushSource(e+" = "+t+";")},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},pushStackLiteral:function(e){return this.push(new n(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),e&&this.source.push(e)},pushStack:function(e){this.flushInline();var t=this.incrStack();return e&&this.pushSource(t+" = "+e+";"),this.compileStack.push(t),t},replaceStack:function(e){var t,r,i,s="",o=this.isInline();if(o){var u=this.popStack(!0);if(u instanceof n)t=u.value,i=!0;else{r=!this.stackSlot;var a=r?this.incrStack():this.topStackName();s="("+this.push(a)+" = "+u+"),",t=this.topStack()}}else t=this.topStack();var f=e.call(this,t);return o?(i||this.popStack(),r&&this.stackSlot--,this.push("("+s+f+")")):(/^stack/.test(t)||(t=this.nextStack()),this.pushSource(t+" = ("+s+f+");")),t},nextStack:function(){return this.pushStack()},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;if(e.length){this.inlineStack=[];for(var t=0,r=e.length;r>t;t++){var i=e[t];i instanceof n?this.compileStack.push(i):this.pushStack(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),r=(t?this.inlineStack:this.compileStack).pop();if(!e&&r instanceof n)return r.value;if(!t){if(!this.stackSlot)throw new a("Invalid stack pop");this.stackSlot--}return r},topStack:function(e){var t=this.isInline()?this.inlineStack:this.compileStack,r=t[t.length-1];return!e&&r instanceof n?r.value:r},quotedString:function(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},setupHelper:function(e,t,n){var r=[],i=this.setupParams(e,r,n),s=this.nameLookup("helpers",t,"helper");return{params:r,paramsInit:i,name:s,callParams:["depth0"].concat(r).join(", "),helperMissingParams:n&&["depth0",this.quotedString(t)].concat(r).join(", ")}},setupOptions:function(e,t){var n,r,i,s=[],o=[],u=[];s.push("hash:"+this.popStack()),this.options.stringParams&&(s.push("hashTypes:"+this.popStack()),s.push("hashContexts:"+this.popStack())),r=this.popStack(),i=this.popStack(),(i||r)&&(i||(this.context.aliases.self="this",i="self.noop"),r||(this.context.aliases.self="this",r="self.noop"),s.push("inverse:"+r),s.push("fn:"+i));for(var a=0;e>a;a++)n=this.popStack(),t.push(n),this.options.stringParams&&(u.push(this.popStack()),o.push(this.popStack()));return this.options.stringParams&&(s.push("contexts:["+o.join(",")+"]"),s.push("types:["+u.join(",")+"]")),this.options.data&&s.push("data:data"),s},setupParams:function(e,t,n){var r="{"+this.setupOptions(e,t).join(",")+"}";return n?(this.useRegister("options"),t.push("options"),"options="+r):(t.push(r),"")}};for(var f="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),l=r.RESERVED_WORDS={},c=0,h=f.length;h>c;c++)l[f[c]]=!0;return r.isValidJavaScriptVariableName=function(e){return!r.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)?!0:!1},i=r}(r,n),c=function(e,t,n,r,i){var s,o=e,u=t,a=n.parser,f=n.parse,l=r.Compiler,c=r.compile,h=r.precompile,p=i,d=o.create,v=function(){var e=d();return e.compile=function(t,n){return c(t,n,e)},e.precompile=function(t,n){return h(t,n,e)},e.AST=u,e.Compiler=l,e.JavaScriptCompiler=p,e.Parser=a,e.parse=f,e};return o=v(),o.create=v,s=o}(s,o,a,f,l);return c}();define("handlebars",function(){}),define("text",["module"],function(e){var t,n,r,i,s,o=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],u=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,f="undefined"!=typeof location&&location.href,l=f&&location.protocol&&location.protocol.replace(/\:/,""),c=f&&location.hostname,h=f&&(location.port||void 0),p={},d=e.config&&e.config()||{};return t={version:"2.0.10",strip:function(e){if(e){e=e.replace(u,"");var t=e.match(a);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:d.createXhr||function(){var e,t,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;3>t;t+=1){n=o[t];try{e=new ActiveXObject(n)}catch(r){}if(e){o=[n];break}}return e},parseName:function(e){var t,n,r,i=!1,s=e.indexOf("."),o=0===e.indexOf("./")||0===e.indexOf("../");return-1!==s&&(!o||s>1)?(t=e.substring(0,s),n=e.substring(s+1,e.length)):t=e,r=n||t,s=r.indexOf("!"),-1!==s&&(i="strip"===r.substring(s+1),r=r.substring(0,s),n?n=r:t=r),{moduleName:t,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var s,o,u,a=t.xdRegExp.exec(e);return a?(s=a[2],o=a[3],o=o.split(":"),u=o[1],o=o[0],!(s&&s!==n||o&&o.toLowerCase()!==r.toLowerCase()||(u||o)&&u!==i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,d.isBuild&&(p[e]=r),i(r)},load:function(e,n,r,i){if(i.isBuild&&!i.inlineText)return r(),void 0;d.isBuild=i.isBuild;var s=t.parseName(e),o=s.moduleName+(s.ext?"."+s.ext:""),u=n.toUrl(o),a=d.useXhr||t.useXhr;return 0===u.indexOf("empty:")?(r(),void 0):(!f||a(u,l,c,h)?t.get(u,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([o],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)}),void 0)},write:function(e,n,r){if(p.hasOwnProperty(n)){var i=t.jsEscape(p[n]);r.asModule(e+"!"+n,"define(function () { return '"+i+"';});\n")}},writeFile:function(e,n,r,i,s){var o=t.parseName(n),u=o.ext?"."+o.ext:"",a=o.moduleName+u,f=r.toUrl(o.moduleName+u)+".js";t.load(a,r,function(){var n=function(e){return i(f,e)};n.asModule=function(e,t){return i.asModule(e,f,t)},t.write(e,a,n,s)},s)}},"node"===d.env||!d.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(n=require.nodeRequire("fs"),t.get=function(e,t,r){try{var i=n.readFileSync(e,"utf8");0===i.indexOf("﻿")&&(i=i.substring(1)),t(i)}catch(s){r(s)}}):"xhr"===d.env||!d.env&&t.createXhr()?t.get=function(e,n,r,i){var s,o=t.createXhr();if(o.open("GET",e,!0),i)for(s in i)i.hasOwnProperty(s)&&o.setRequestHeader(s.toLowerCase(),i[s]);d.onXhr&&d.onXhr(o,e),o.onreadystatechange=function(){var t,i;4===o.readyState&&(t=o.status,t>399&&600>t?(i=new Error(e+" HTTP status: "+t),i.xhr=o,r(i)):n(o.responseText),d.onXhrComplete&&d.onXhrComplete(o,e))},o.send(null)}:"rhino"===d.env||!d.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?t.get=function(e,t){var n,r,i="utf-8",s=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),u=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),i)),a="";try{for(n=new java.lang.StringBuffer,r=u.readLine(),r&&r.length()&&65279===r.charAt(0)&&(r=r.substring(1)),null!==r&&n.append(r);null!==(r=u.readLine());)n.append(o),n.append(r);a=String(n.toString())}finally{u.close()}t(a)}:("xpconnect"===d.env||!d.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(r=Components.classes,i=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),s="@mozilla.org/windows-registry-key;1"in r,t.get=function(e,t){var n,o,u,a={};s&&(e=e.replace(/\//g,"\\")),u=new FileUtils.File(e);try{n=r["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream),n.init(u,1,0,!1),o=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream),o.init(n,"utf-8",n.available(),i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),o.readString(n.available(),a),o.close(),n.close(),t(a.value)}catch(f){throw new Error((u&&u.path||"")+": "+f)}}),t});var hex_chr="0123456789abcdef".split("");if(md5("hello")!="5d41402abc4b2a76b9719d911017c592")function add32(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}define("md5",function(){});var CryptoJS=CryptoJS||function(e,t){var n={},r=n.lib={},i=r.Base=function(){function e(){}return{extend:function(t){e.prototype=this;var n=new e;return t&&n.mixIn(t),n.$super=this,n},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.$super.extend(this)}}}(),s=r.WordArray=i.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,e=e.sigBytes;this.clamp();if(r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-8*(i%4)&255)<<24-8*((r+i)%4);else if(65535<n.length)for(i=0;i<e;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-8*(n%4),t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r<t;r+=4)n.push(4294967296*e.random()|0);return s.create(n,t)}}),o=n.enc={},u=o.Hex={stringify:function(e){for(var t=e.words,e=e.sigBytes,n=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-8*(r%4)&255;n.push((i>>>4).toString(16)),n.push((i&15).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-4*(r%8);return s.create(n,t/2)}},a=o.Latin1={stringify:function(e){for(var t=e.words,e=e.sigBytes,n=[],r=0;r<e;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-8*(r%4)&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-8*(r%4);return s.create(n,t)}},f=o.Utf8={stringify:function(e){try{return decodeURIComponent(escape(a.stringify(e)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(e){return a.parse(unescape(encodeURIComponent(e)))}},l=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=s.create(),this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,u=i/(4*o),u=t?e.ceil(u):e.max((u|0)-this._minBufferSize,0),t=u*o,i=e.min(4*t,i);if(t){for(var a=0;a<t;a+=o)this._doProcessBlock(r,a);a=r.splice(0,t),n.sigBytes-=i}return s.create(a,i)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=l.extend({init:function(){this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize(),this._hash},clone:function(){var e=l.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:16,_createHelper:function(e){return function(t,n){return e.create(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return c.HMAC.create(e,n).finalize(t)}}});var c=n.algo={};return n}(Math);(function(e){var t=CryptoJS,n=t.lib,r=n.WordArray,n=n.Hasher,i=t.algo,s=[],o=[];(function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(e|0))|0}for(var r=2,i=0;64>i;)t(r)&&(8>i&&(s[i]=n(e.pow(r,.5))),o[i]=n(e.pow(r,1/3)),i++),r++})();var u=[],i=i.SHA256=n.extend({_doReset:function(){this._hash=r.create(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],f=n[4],l=n[5],c=n[6],h=n[7],p=0;64>p;p++){if(16>p)u[p]=e[t+p]|0;else{var d=u[p-15],v=u[p-2];u[p]=((d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+u[p-7]+((v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10)+u[p-16]}d=h+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&l^~f&c)+o[p]+u[p],v=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&s^i&s),h=c,c=l,l=f,f=a+d|0,a=s,s=i,i=r,r=d+v|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+f|0,n[5]=n[5]+l|0,n[6]=n[6]+c|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+15]=n,e.sigBytes=4*t.length,this._process()}});t.SHA256=n._createHelper(i),t.HmacSHA256=n._createHmacHelper(i)})(Math),define("sha256",function(){}),!function(){var e,t,n,r;!function(){var i={},s={};e=function(e,t,n){i[e]={deps:t,callback:n}},r=n=t=function(e){function n(t){if("."!==t.charAt(0))return t;for(var n=t.split("/"),r=e.split("/").slice(0,-1),i=0,s=n.length;s>i;i++){var o=n[i];if(".."===o)r.pop();else{if("."===o)continue;r.push(o)}}return r.join("/")}if(r._eak_seen=i,s[e])return s[e];if(s[e]={},!i[e])throw new Error("Could not find module "+e);for(var u,a=i[e],f=a.deps,l=a.callback,c=[],h=0,p=f.length;p>h;h++)"exports"===f[h]?c.push(u={}):c.push(t(n(f[h])));var d=l.apply(this,c);return s[e]=u||d}}(),function(){"undefined"==typeof Ember&&(Ember={});var e=(Ember.imports=Ember.imports||this,Ember.exports=Ember.exports||this);Ember.lookup=Ember.lookup||this,e.Em=e.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.4.1+pre.af87bd20",Ember.ENV||(Ember.ENV="undefined"!=typeof EmberENV?EmberENV:"undefined"!=typeof ENV?ENV:{}),Ember.config=Ember.config||{},"undefined"==typeof Ember.ENV.DISABLE_RANGE_API&&(Ember.ENV.DISABLE_RANGE_API=!0),"undefined"==typeof MetamorphENV&&(e.MetamorphENV={}),MetamorphENV.DISABLE_RANGE_API=Ember.ENV.DISABLE_RANGE_API,Ember.FEATURES=Ember.ENV.FEATURES||{},Ember.FEATURES.isEnabled=function(e){var t=Ember.FEATURES[e];return Ember.ENV.ENABLE_ALL_FEATURES?!0:t===!0||t===!1||void 0===t?t:Ember.ENV.ENABLE_OPTIONAL_FEATURES?!0:!1},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.merge=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);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,n){if(t.prototype=e,e=new t,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,r,i=Object.defineProperty;if(i)try{i({},"a",{get:function(){}})}catch(s){i=null}i&&(n=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}(),r=function(){try{return i(document.createElement("div"),"definePropertyOnDOM",{}),!0}catch(e){}return!1}(),n?r||(i=function(e,t,n){var r;return r="object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName,r?e[t]=n.value:Object.defineProperty(e,t,n)}):i=null),e.defineProperty=i,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=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),n=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var r=new Array(n),i=arguments[1],s=0;n>s;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(void 0===this||null===this)throw new TypeError;var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var r=arguments[1],i=0;n>i;i++)i in t&&e.call(r,t[i],i,t)},r=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 n=t,r=this.length;r>n;n++)if(this[n]===e)return n;return-1};Ember.ArrayPolyfills={map:t,forEach:n,indexOf:r},Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=t),Array.prototype.forEach||(Array.prototype.forEach=n),Array.prototype.indexOf||(Array.prototype.indexOf=r))}(),function(){var e=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var t=Error.apply(this,arguments);Error.captureStackTrace&&Error.captureStackTrace(this,Ember.Error);for(var n=0;n<e.length;n++)this[e[n]]=t[e[n]]},Ember.Error.prototype=Ember.create(Error.prototype),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)}}}(),function(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!!e&&"function"==typeof e[t]}Ember.GUID_PREFIX="ember";var n=Ember.platform.defineProperty,r=Ember.create,i="__ember"+ +(new Date),s=0,o=[],u={},a=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=i;var f={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(e,t){t||(t=Ember.GUID_PREFIX);var r=t+s++;return e&&(f.value=r,n(e,i,f)),r},Ember.guidFor=function(e){if(void 0===e)return"(undefined)";if(null===e)return"(null)";var t,r=typeof e;switch(r){case"number":return t=o[e],t||(t=o[e]="nu"+e),t;case"string":return t=u[e],t||(t=u[e]="st"+s++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+s++,f.value=t,n(e,i,f),t)}};var l=Ember.META_DESC={writable:!0,configurable:!1,enumerable:!1,value:null},c=Ember.GUID_KEY+"_meta";Ember.META_KEY=c;var h=Ember.platform.defineProperty.isSimulated;e.prototype={descs:null,deps:null,watching:null,listeners:null,cache:null,source:null,mixins:null,bindings:null,chains:null,chainWatchers:null,values:null,proto:null},h&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){});var p=new e(null);a&&(p.values={}),Ember.EMPTY_META=p,Ember.meta=function(t,i){var s=t[c];return i===!1?s||p:(s?s.source!==t&&(h||n(t,c,l),s=r(s),s.descs=r(s.descs),s.watching=r(s.watching),s.cache={},s.source=t,a&&(s.values=r(s.values)),t[c]=s):(h||n(t,c,l),s=new e(t),a&&(s.values={}),t[c]=s,s.descs.constructor=null),s)},Ember.getMeta=function(e,t){var n=Ember.meta(e,!1);return n[t]},Ember.setMeta=function(e,t,n){var r=Ember.meta(e,!0);return r[t]=n,n},Ember.metaPath=function(e,t,n){for(var i,s,o=Ember.meta(e,n),u=0,a=t.length;a>u;u++){if(i=t[u],s=o[i]){if(s.__ember_source__!==e){if(!n)return void 0;s=o[i]=r(s),s.__ember_source__=e}}else{if(!n)return void 0;s=o[i]={__ember_source__:e}}o=s}return s},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_listens__=e.__ember_listens__,r},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,n,r){return t(e,n)?e[n].apply(e,r||[]):void 0};var d=function(){var e=0;try{try{}finally{throw e++,new Error("needsFinallyFixTest")}}catch(t){}return 1!==e}();Ember.tryFinally=d?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 void 0===i?r:i}:function(e,t,n){var r,i;n=n||this;try{r=e.call(n)}finally{i=t.call(n)}return void 0===i?r:i},Ember.tryCatchFinally=d?function(e,t,n,r){var i,s,o;r=r||this;try{i=e.call(r)}catch(u){i=t.call(r,u)}finally{try{s=n.call(r)}catch(a){o=a}}if(o)throw o;return void 0===s?i:s}: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 void 0===s?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=null===e||void 0===e?String(e):v[g.call(e)]||"object","function"===t?Ember.Object&&Ember.Object.detect(e)&&(t="class"):"object"===t&&(e instanceof Error?t="error":Ember.Object&&e instanceof Ember.Object?t="instance":e instanceof Date&&(t="date")),t},Ember.inspect=function(e){var t=Ember.typeOf(e);if("array"===t)return"["+e+"]";if("object"!==t)return e+"";var n,r=[];for(var i in e)if(e.hasOwnProperty(i)){if(n=e[i],"toString"===n)continue;"function"===Ember.typeOf(n)&&(n="function() { ... }"),r.push(i+": "+n)}return"{"+r.join(", ")+"}"}}(),function(){Ember.Instrumentation={};var e=[],t={},n=function(n){for(var r,i=[],s=0,o=e.length;o>s;s++)r=e[s],r.regex.test(n)&&i.push(r.object);return t[n]=i,i},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 u(){for(d=0,v=h.length;v>d;d++)p=h[d],m[d]=p.before(e,r(),i);return s.call(o)}function a(e){i=i||{},i.exception=e}function f(){for(d=0,v=h.length;v>d;d++)p=h[d],p.after(e,r(),i,m[d]);Ember.STRUCTURED_PROFILE&&console.timeEnd(l)}var l,c,h=t[e];if(Ember.STRUCTURED_PROFILE&&(l=e+": "+i.object,console.time(l)),h||(h=n(e)),0===h.length)return c=s.call(o),Ember.STRUCTURED_PROFILE&&console.timeEnd(l),c;var p,d,v,m=[];return Ember.tryCatchFinally(u,a,f)},Ember.Instrumentation.subscribe=function(n,r){for(var i,s=n.split("."),o=[],u=0,a=s.length;a>u;u++)i=s[u],"*"===i?o.push("[^\\.]*"):o.push(i);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){for(var r,i=0,s=e.length;s>i;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,t,n,r,i;e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,n=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf,i=Array.prototype.filter||Ember.ArrayPolyfills.filter,r=Array.prototype.splice;var s=Ember.EnumerableUtils={map:function(t,n,r){return t.map?t.map.call(t,n,r):e.call(t,n,r)},forEach:function(e,n,r){return e.forEach?e.forEach.call(e,n,r):t.call(e,n,r)},filter:function(e,t,n){return e.filter?e.filter.call(e,t,n):i.call(e,t,n)},indexOf:function(e,t,r){return e.indexOf?e.indexOf.call(e,t,r):n.call(e,t,r)},indexesOf:function(e,t){return void 0===t?[]:s.map(t,function(t){return s.indexOf(e,t)})},addObject:function(e,t){var n=s.indexOf(e,t);-1===n&&e.push(t)},removeObject:function(e,t){var n=s.indexOf(e,t);-1!==n&&e.splice(n,1)},_replace:function(e,t,n,i){for(var s,o,u=[].concat(i),a=[],f=6e4,l=t,c=n;u.length;)o=c>f?f:c,0>=o&&(o=0),s=u.splice(0,f),s=[l,o].concat(s),l+=f,c-=o,a=a.concat(r.apply(e,s));return a},replace:function(e,t,n,r){return e.replace?e.replace(t,n,r):s._replace(e,t,n,r)},intersection:function(e,t){var n=[];return s.forEach(e,function(e){s.indexOf(t,e)>=0&&n.push(e)}),n}}}(),function(){var e,t=Ember.META_KEY,n=Ember.ENV.MANDATORY_SETTER,r=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,i=/^this[\.\*]/,s=/^([^\.\*]+)/;e=function(e,r){if(""===r)return e;if(r||"string"!=typeof e||(r=e,e=null),null===e||-1!==r.indexOf("."))return u(e,r);var i,s=e[t],o=s&&s.descs[r];return o?o.get(e,r):(i=n&&s&&s.watching[r]>0?s.values[r]:e[r],void 0!==i||"object"!=typeof e||r in e||"function"!=typeof e.unknownProperty?i:e.unknownProperty(r))},Ember.config.overrideAccessors&&(Ember.get=e,Ember.config.overrideAccessors(),e=Ember.get);var o=Ember.normalizeTuple=function(t,n){var o,u=i.test(n),a=!u&&r.test(n);if((!t||a)&&(t=Ember.lookup),u&&(n=n.slice(5)),t===Ember.lookup&&(o=n.match(s)[0],t=e(t,o),n=n.slice(o.length+1)),!n||0===n.length)throw new Ember.Error("Path cannot be empty");return[t,n]},u=Ember._getPath=function(t,n){var r,s,u,f,l;if(null===t&&-1===n.indexOf("."))return e(Ember.lookup,n);for(r=i.test(n),(!t||r)&&(u=o(t,n),t=u[0],n=u[1],u.length=0),s=n.split("."),l=s.length,f=0;null!=t&&l>f;f++)if(t=e(t,s[f],!0),t&&t.isDestroyed)return void 0;return t};Ember.getWithDefault=function(t,n,r){var i=e(t,n);return void 0===i?r:i},Ember.get=e}(),function(){function e(e,t,n){for(var r=-1,i=0,s=e.length;s>i;i+=3)if(t===e[i]&&n===e[i+1]){r=i;break}return r}function t(e,t){var n,r=p(e,!0);return r.listeners||(r.listeners={}),r.hasOwnProperty("listeners")||(r.listeners=h(r.listeners)),n=r.listeners[t],n&&!r.listeners.hasOwnProperty(t)?n=r.listeners[t]=r.listeners[t].slice():n||(n=r.listeners[t]=[]),n}function n(t,n,r){var i=t[d],s=i&&i.listeners&&i.listeners[n];if(s)for(var o=s.length-3;o>=0;o-=3){var u=s[o],a=s[o+1],f=s[o+2],l=e(r,u,a);-1===l&&r.push(u,a,f)}}function r(t,n,r){var i=t[d],s=i&&i.listeners&&i.listeners[n],o=[];if(s){for(var u=s.length-3;u>=0;u-=3){var a=s[u],f=s[u+1],l=s[u+2],c=e(r,a,f);-1===c&&(r.push(a,f,l),o.push(a,f,l))}return o}}function i(n,r,i,s,o){s||"function"!=typeof i||(s=i,i=null);var u=t(n,r),a=e(u,i,s),f=0;o&&(f|=m),-1===a&&(u.push(i,s,f),"function"==typeof n.didAddListener&&n.didAddListener(r,i,s))}function s(n,r,i,s){function o(i,s){var o=t(n,r),u=e(o,i,s);-1!==u&&(o.splice(u,3),"function"==typeof n.didRemoveListener&&n.didRemoveListener(r,i,s))}if(s||"function"!=typeof i||(s=i,i=null),s)o(i,s);else{var u=n[d],a=u&&u.listeners&&u.listeners[r];if(!a)return;for(var f=a.length-3;f>=0;f-=3)o(a[f],a[f+1])}}function o(n,r,i,s,o){function u(){return o.call(i)}function a(){-1!==l&&(f[l+2]&=~g)}s||"function"!=typeof i||(s=i,i=null);var f=t(n,r),l=e(f,i,s);return-1!==l&&(f[l+2]|=g),Ember.tryFinally(u,a)}function u(n,r,i,s,o){function u(){return o.call(i)}function a(){for(var e=0,t=p.length;t>e;e++){var n=p[e];d[e][n+2]&=~g}}s||"function"!=typeof i||(s=i,i=null);var f,l,c,h,p=[],d=[];for(c=0,h=r.length;h>c;c++){f=r[c],l=t(n,f);var v=e(l,i,s);-1!==v&&(l[v+2]|=g,p.push(v),d.push(l))}return Ember.tryFinally(u,a)}function a(e){var t=e[d].listeners,n=[];if(t)for(var r in t)t[r]&&n.push(r);return n}function f(e,t,n,r){if(e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,n),!r){var i=e[d];r=i&&i.listeners&&i.listeners[t]}if(r){for(var o=r.length-3;o>=0;o-=3){var u=r[o],a=r[o+1],f=r[o+2];a&&(f&g||(f&m&&s(e,t,u,a),u||(u=e),"string"==typeof a&&(a=u[a]),n?a.apply(u,n):a.call(u)))}return!0}}function l(e,t){var n=e[d],r=n&&n.listeners&&n.listeners[t];return!!r&&!!r.length}function c(e,t){var n=[],r=e[d],i=r&&r.listeners&&r.listeners[t];if(!i)return n;for(var s=0,o=i.length;o>s;s+=3){var u=i[s],a=i[s+1];n.push([u,a])}return n}var h=Ember.create,p=Ember.meta,d=Ember.META_KEY,v=[].slice,m=1,g=2;Ember.on=function(){var e=v.call(arguments,-1)[0],t=v.call(arguments,0,-1);return e.__ember_listens__=t,e},Ember.addListener=i,Ember.removeListener=s,Ember._suspendListener=o,Ember._suspendListeners=u,Ember.sendEvent=f,Ember.hasListeners=l,Ember.watchedEvents=a,Ember.listenersFor=c,Ember.listenersDiff=r,Ember.listenersUnion=n}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,n=Ember._ObserverSet=function(){this.clear()};n.prototype.add=function(t,n,r){var i,s=this.observerSet,o=this.observers,u=e(t),a=s[u];return a||(s[u]=a={}),i=a[n],void 0===i&&(i=o.push({sender:t,keyName:n,eventName:r,listeners:[]})-1,a[n]=i),o[i].listeners},n.prototype.flush=function(){var e,n,r,i,s=this.observers;for(this.clear(),e=0,n=s.length;n>e;++e)r=s[e],i=r.sender,i.isDestroying||i.isDestroyed||t(i,r.eventName,[i,r.keyName],r.listeners)},n.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function e(e,t){var r=e[c],i=r&&r.watching[t]>0||"length"===t,o=r&&r.proto,u=r&&r.descs[t];i&&o!==e&&(u&&u.willChange&&u.willChange(e,t),n(e,t,r),s(e,t,r),f(e,t))}function t(e,t){var n=e[c],i=n&&n.watching[t]>0||"length"===t,s=n&&n.proto,u=n&&n.descs[t];s!==e&&(u&&u.didChange&&u.didChange(e,t),(i||"length"===t)&&(r(e,t,n),o(e,t,n,!1),l(e,t)))}function n(t,n,r){if(!t.isDestroying){var s=E,o=!s;o&&(s=E={}),i(e,t,n,s,r),o&&(E=null)}}function r(e,n,r){if(!e.isDestroying){var s=S,o=!s;o&&(s=S={}),i(t,e,n,s,r),o&&(S=null)}}function i(e,t,n,r,i){var s=h(t);if(r[s]||(r[s]={}),!r[s][n]){r[s][n]=!0;var o=i.deps;if(o=o&&o[n])for(var u in o){var a=i.descs[u];a&&a._suspended===t||e(t,u)}}}function s(t,n,r){if(r.hasOwnProperty("chainWatchers")&&r.chainWatchers[n]){var i,s,o=r.chainWatchers[n],u=[];for(i=0,s=o.length;s>i;i++)o[i].willChange(u);for(i=0,s=u.length;s>i;i+=2)e(u[i],u[i+1])}}function o(e,n,r,i){if(r&&r.hasOwnProperty("chainWatchers")&&r.chainWatchers[n]){var s,o,u=r.chainWatchers[n],a=i?null:[];for(s=0,o=u.length;o>s;s++)u[s].didChange(a);if(!i)for(s=0,o=a.length;o>s;s+=2)t(a[s],a[s+1])}}function u(){w++}function a(){w--,0>=w&&(y.clear(),b.flush())}function f(e,t){if(!e.isDestroying){var n,r,i=t+":before";w?(n=y.add(e,t,i),r=m(e,i,n),d(e,i,[e,t],r)):d(e,i,[e,t])}}function l(e,t){if(!e.isDestroying){var n,r=t+":change";w?(n=b.add(e,t,r),v(e,r,n)):d(e,r,[e,t])}}var c=Ember.META_KEY,h=Ember.guidFor,p=Ember.tryFinally,d=Ember.sendEvent,v=Ember.listenersUnion,m=Ember.listenersDiff,g=Ember._ObserverSet,y=new g,b=new g,w=0;Ember.propertyWillChange=e,Ember.propertyDidChange=t;var E,S;Ember.overrideChains=function(e,t,n){o(e,t,n,!0)},Ember.beginPropertyChanges=u,Ember.endPropertyChanges=a,Ember.changeProperties=function(e,t){u(),p(e,a,t)}}(),function(){function e(e,t,n,s){var o;if(o=t.slice(t.lastIndexOf(".")+1),t=t===o?o:t.slice(0,t.length-(o.length+1)),"this"!==t&&(e=r(e,t)),!o||0===o.length)throw new Ember.Error("Property set failed: You passed an empty path");if(!e){if(s)return;throw new Ember.Error('Property set failed: object in path "'+t+'" could not be found or was destroyed.')}return i(e,o,n)}var t=Ember.META_KEY,n=Ember.ENV.MANDATORY_SETTER,r=Ember._getPath,i=function(r,i,s,o){if("string"==typeof r&&(s=i,i=r,r=null),!r||-1!==i.indexOf("."))return e(r,i,s,o);var u,a,f=r[t],l=f&&f.descs[i];return l?l.set(r,i,s):(u="object"==typeof r&&!(i in r),u&&"function"==typeof r.setUnknownProperty?r.setUnknownProperty(i,s):f&&f.watching[i]>0?(a=n?f.values[i]:r[i],s!==a&&(Ember.propertyWillChange(r,i),n?(void 0!==a||i in r)&&r.propertyIsEnumerable(i)?f.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=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.trySet=function(e,t,n){return i(e,t,n,!0)}}(),function(){var e=Ember.set,t=Ember.guidFor,n=Ember.ArrayPolyfills.indexOf,r=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},i=function(e,t){var n=e.keys.copy(),i=r(e.values);return t.keys=n,t.values=i,t.length=e.length,t},s=Ember.OrderedSet=function(){this.clear()};s.create=function(){return new s},s.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(e){var n=t(e),r=this.presenceSet,i=this.list;n in r||(r[n]=!0,i.push(e))},remove:function(e){var r=t(e),i=this.presenceSet,s=this.list;delete i[r];var o=n.call(s,e);o>-1&&s.splice(o,1)},isEmpty:function(){return 0===this.list.length},has:function(e){var n=t(e),r=this.presenceSet;return n in r},forEach:function(e,t){for(var n=this.toArray(),r=0,i=n.length;i>r;r++)e.call(t,n[r])},toArray:function(){return this.list.slice()},copy:function(){var e=new s;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={length:0,get:function(e){var n=this.values,r=t(e);return n[r]},set:function(n,r){var i=this.keys,s=this.values,o=t(n);i.add(n),s[o]=r,e(this,"length",i.list.length)},remove:function(n){var r=this.keys,i=this.values,s=t(n);return i.hasOwnProperty(s)?(r.remove(n),delete i[s],e(this,"length",r.list.length),!0):!1},has:function(e){var n=this.values,r=t(e);return n.hasOwnProperty(r)},forEach:function(e,n){var r=this.keys,i=this.values;r.forEach(function(r){var s=t(r);e.call(n,r,i[s])})},copy:function(){return i(this,new o)}};var u=Ember.MapWithDefault=function(e){o.call(this),this.defaultValue=e.defaultValue};u.create=function(e){return e?new u(e):new o},u.prototype=Ember.create(o.prototype),u.prototype.get=function(e){var t=this.has(e);if(t)return o.prototype.get.call(this,e);var n=this.defaultValue(e);return this.set(e,n),n},u.prototype.copy=function(){return i(this,new u({defaultValue:this.defaultValue}))}}(),function(){function e(e){var t,n;Ember.imports.console?t=Ember.imports.console:"undefined"!=typeof console&&(t=console);var r="object"==typeof t?t[e]:null;return r?r.apply?(n=function(){r.apply(t,arguments)},n.displayName="console."+e,n):function(){var e=Array.prototype.join.call(arguments,", ");r(e)}:void 0}function t(e,t){if(!e)try{throw new Ember.Error("assertion failed: "+t)}catch(n){setTimeout(function(){throw n},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,assert:e("assert")||t}}(),function(){var e=Ember.META_KEY,t=Ember.meta,n=Ember.platform.defineProperty,r=Ember.ENV.MANDATORY_SETTER;Ember.Descriptor=function(){};var i=Ember.MANDATORY_SETTER_FUNCTION=function(){},s=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var n=this[e];return n&&n.values[t]}};Ember.defineProperty=function(e,u,a,f,l){var c,h,p,d;return l||(l=t(e)),c=l.descs,h=l.descs[u],p=l.watching[u]>0,h instanceof Ember.Descriptor&&h.teardown(e,u),a instanceof Ember.Descriptor?(d=a,c[u]=a,r&&p?n(e,u,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[u]=void 0):(c[u]=void 0,null==a?(d=f,r&&p?(l.values[u]=f,n(e,u,{configurable:!0,enumerable:!0,set:i,get:s(u)})):e[u]=f):(d=a,n(e,u,a))),p&&Ember.overrideChains(e,u,l),e.didDefineProperty&&e.didDefineProperty(e,u,d),this}}(),function(){var e=Ember.get;Ember.getProperties=function(t){var n={},r=arguments,i=1;2===arguments.length&&"array"===Ember.typeOf(arguments[1])&&(i=0,r=arguments[1]);for(var s=r.length;s>i;i++)n[r[i]]=e(t,r[i]);return n}}(),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,o){if("length"!==s||"array"!==t(i)){var u=o||e(i),a=u.watching;a[s]?a[s]=(a[s]||0)+1:(a[s]=1,"function"==typeof i.willWatchProperty&&i.willWatchProperty(s),n&&s in i&&(u.values[s]=i[s],r(i,s,{configurable:!0,enumerable:i.propertyIsEnumerable(s),set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(s)})))}},Ember.unwatchKey=function(t,i,s){var o=s||e(t),u=o.watching;1===u[i]?(u[i]=0,"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),n&&i in t&&r(t,i,{configurable:!0,enumerable:t.propertyIsEnumerable(i),set:function(e){r(t,i,{configurable:!0,writable:!0,enumerable:!0,value:e}),delete o.values[i]},get:Ember.DEFAULT_GETTER_FUNCTION(i)})):u[i]>1&&u[i]--}}(),function(){function e(e){return e.match(l)[0]}function t(e,t,n){if(e&&"object"==typeof e){var i=r(e),s=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(s=i.chainWatchers={}),s[t]||(s[t]=[]),s[t].push(n),a(e,t,i)}}function n(e,t){if(!e)return void 0;var n=e[c];if(n&&n.proto===e)return void 0;if("@each"===t)return i(e,t);var r=n&&n.descs[t];return r&&r._cacheable?t in n.cache?n.cache[t]:void 0:i(e,t)}var r=Ember.meta,i=Ember.get,s=Ember.normalizeTuple,o=Ember.ArrayPolyfills.forEach,u=Ember.warn,a=Ember.watchKey,f=Ember.unwatchKey,l=/^([^\.\*]+)/,c=Ember.META_KEY,h=[];Ember.flushPendingChains=function(){if(0!==h.length){var e=h;h=[],o.call(e,function(e){e[0].add(e[1])}),u("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",0===h.length)}};var p=Ember.removeChainWatcher=function(e,t,n){if(e&&"object"==typeof e){var r=e[c];if(!r||r.hasOwnProperty("chainWatchers")){var i=r&&r.chainWatchers;if(i&&i[t]){i=i[t];for(var s=0,o=i.length;o>s;s++)i[s]===n&&i.splice(s,1)}f(e,t,r)}}},d=Ember._ChainNode=function(e,n,r){this._parent=e,this._key=n,this._watching=void 0===r,this._value=r,this._paths={},this._watching&&(this._object=e.value(),this._object&&t(this._object,this._key,this)),this._parent&&"@each"===this._parent._key&&this.value()},v=d.prototype;v.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=n(e,this._key)}return this._value},v.destroy=function(){if(this._watching){var e=this._object;e&&p(e,this._key,this),this._watching=!1}},v.copy=function(e){var t,n=new d(null,null,e),r=this._paths;for(t in r)r[t]<=0||n.add(t);return n},v.add=function(t){var n,r,i,o,u;if(u=this._paths,u[t]=(u[t]||0)+1,n=this.value(),r=s(n,t),r[0]&&r[0]===n)t=r[1],i=e(t),t=t.slice(i.length+1);else{if(!r[0])return h.push([this,t]),r.length=0,void 0;o=r[0],i=t.slice(0,0-(r[1].length+1)),t=r[1]}r.length=0,this.chain(i,t,o)},v.remove=function(t){var n,r,i,o,u;u=this._paths,u[t]>0&&u[t]--,n=this.value(),r=s(n,t),r[0]===n?(t=r[1],i=e(t),t=t.slice(i.length+1)):(o=r[0],i=t.slice(0,0-(r[1].length+1)),t=r[1]),r.length=0,this.unchain(i,t)},v.count=0,v.chain=function(t,n,r){var i,s=this._chains;s||(s=this._chains={}),i=s[t],i||(i=s[t]=new d(this,t,r)),i.count++,n&&n.length>0&&(t=e(n),n=n.slice(t.length+1),i.chain(t,n))},v.unchain=function(t,n){var r=this._chains,i=r[t];n&&n.length>1&&(t=e(n),n=n.slice(t.length+1),i.unchain(t,n)),i.count--,i.count<=0&&(delete r[i._key],i.destroy())},v.willChange=function(e){var t=this._chains;if(t)for(var n in t)t.hasOwnProperty(n)&&t[n].willChange(e);this._parent&&this._parent.chainWillChange(this,this._key,1,e)},v.chainWillChange=function(e,t,n,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,n+1,r):(n>1&&r.push(this.value(),t),t="this."+t,this._paths[t]>0&&r.push(this.value(),t))},v.chainDidChange=function(e,t,n,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,n+1,r):(n>1&&r.push(this.value(),t),t="this."+t,this._paths[t]>0&&r.push(this.value(),t))},v.didChange=function(e){if(this._watching){var n=this._parent.value();n!==this._object&&(p(this._object,this._key,this),this._object=n,t(n,this._key,this)),this._value=void 0,this._parent&&"@each"===this._parent._key&&this.value()}var r=this._chains;if(r)for(var i in r)r.hasOwnProperty(i)&&r[i].didChange(e);null!==e&&this._parent&&this._parent.chainDidChange(this,this._key,1,e)},Ember.finishChains=function(e){var t=e[c],n=t&&t.chains;n&&(n.value()!==e?r(e).chains=n=n.copy(e):n.didChange(null))}}(),function(){var e=Ember.EnumerableUtils.forEach,t=/^((?:[^\.]*\.)*)\{(.*)\}$/;Ember.expandProperties=function(n,r){var i,s,o;(i=t.exec(n))?(s=i[1],o=i[2],e(o.split(","),function(e){r(s+e)})):r(n)}}(),function(){function e(e,n){var i=n||t(e),s=i.chains;return s?s.value()!==e&&(s=i.chains=s.copy(e)):s=i.chains=new r(null,null,e),s}var t=Ember.meta,n=Ember.typeOf,r=Ember._ChainNode;Ember.watchPath=function(r,i,s){if("length"!==i||"array"!==n(r)){var o=s||t(r),u=o.watching;u[i]?u[i]=(u[i]||0)+1:(u[i]=1,e(r,o).add(i))}},Ember.unwatchPath=function(n,r,i){var s=i||t(n),o=s.watching;1===o[r]?(o[r]=0,e(n,s).remove(r)):o[r]>1&&o[r]--}}(),function(){function e(e){return"*"===e||!l.test(e)}var t=(Ember.meta,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(t,n,r){("length"!==n||"array"!==a(t))&&(e(n)?i(t,n,r):o(t,n,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,n,r){("length"!==n||"array"!==a(t))&&(e(n)?s(t,n,r):u(t,n,r))},Ember.rewatch=function(e){var r=e[n],i=r&&r.chains;t in e&&!e.hasOwnProperty(t)&&f(e),i&&i.value()!==e&&(r.chains=i.copy(e))};var c=[];Ember.destroy=function(e){var t,i,s,o,u=e[n];if(u&&(e[n]=null,t=u.chains))for(c.push(t);c.length>0;){if(t=c.pop(),i=t._chains)for(s in i)i.hasOwnProperty(s)&&c.push(i[s]);t._watching&&(o=t._object,o&&r(o,t._key,t))}}}(),function(){function e(e,t){var n=e[t];return n?e.hasOwnProperty(t)||(n=e[t]=c(n)):n=e[t]={},n}function t(t){return e(t,"deps")}function n(n,r,i,s){var o,u,a,f,l,c=n._dependentKeys;if(c)for(o=t(s),u=0,a=c.length;a>u;u++)f=c[u],l=e(o,f),l[i]=(l[i]||0)+1,p(r,f,s)}function r(n,r,i,s){var o,u,a,f,l,c=n._dependentKeys;if(c)for(o=t(s),u=0,a=c.length;a>u;u++)f=c[u],l=e(o,f),l[i]=(l[i]||0)-1,d(r,f,s)}function i(e,t){this.func=e,this._dependentKeys=t&&t.dependentKeys,this._cacheable=t&&void 0!==t.cacheable?t.cacheable:!0,this._readOnly=t&&(void 0!==t.readOnly||!!t.readOnly)}function s(e){for(var t=0,n=e.length;n>t;t++)e[t].didChange(null)}function o(e,t){for(var n={},r=0;r<t.length;r++)n[t[r]]=u(e,t[r]);return n}var u=Ember.get,a=Ember.set,f=Ember.meta,l=[].slice,c=Ember.create,h=Ember.META_KEY,p=Ember.watch,d=Ember.unwatch,v=Ember.expandProperties;Ember.ComputedProperty=i,i.prototype=new Ember.Descriptor;var m=i.prototype;m.cacheable=function(e){return this._cacheable=e!==!1,this},m.volatile=function(){return this.cacheable(!1)},m.readOnly=function(e){return this._readOnly=void 0===e||!!e,this},m.property=function(){var e,t=function(t){e.push(t)};e=[];for(var n=0,r=arguments.length;r>n;n++)v(arguments[n],t);return this._dependentKeys=e,this},m.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},m.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var n=f(e);t in n.cache&&(delete n.cache[t],r(this,e,t,n))}},m.get=function(e,t){var r,i,o,u;if(this._cacheable){if(o=f(e),i=o.cache,t in i)return i[t];r=i[t]=this.func.call(e,t),u=o.chainWatchers&&o.chainWatchers[t],u&&s(u),n(this,e,t,o)}else r=this.func.call(e,t);return r},m.set=function(e,t,r){var i,s,o,u=this._cacheable,a=this.func,l=f(e,u),c=l.watching[t],h=this._suspended,p=!1,d=l.cache;if(this._readOnly)throw new Ember.Error("Cannot Set: "+t+" on: "+Ember.inspect(e));this._suspended=e;try{if(u&&d.hasOwnProperty(t)&&(s=d[t],p=!0),i=a.wrappedFunction?a.wrappedFunction.length:a.length,3===i)o=a.call(e,t,r,s);else{if(2!==i)return Ember.defineProperty(e,t,null,s),Ember.set(e,t,r),void 0;o=a.call(e,t,r)}if(p&&s===o)return;c&&Ember.propertyWillChange(e,t),p&&delete d[t],u&&(p||n(this,e,t,l),d[t]=o),c&&Ember.propertyDidChange(e,t)}finally{this._suspended=h}return o},m.teardown=function(e,t){var n=f(e);return t in n.cache&&r(this,e,t,n),this._cacheable&&delete n.cache[t],null},Ember.computed=function(e){var t;if(arguments.length>1&&(t=l.call(arguments,0,-1),e=l.call(arguments,-1)[0]),"function"!=typeof e)throw new Ember.Error("Computed Property declared without a property function");var n=new i(e);return t&&n.property.apply(n,t),n},Ember.cacheFor=function(e,t){var n=e[h],r=n&&n.cache;return r&&t in r?r[t]:void 0};var g,y;g=function(e,t){Ember.computed[e]=function(e){var n=l.call(arguments);return Ember.computed(e,function(){return t.apply(this,n)})}},y=function(e,t){Ember.computed[e]=function(){var e=l.call(arguments),n=Ember.computed(function(){return t.apply(this,[o(this,e)])});return n.property.apply(n,e)}},g("empty",function(e){return Ember.isEmpty(u(this,e))}),g("notEmpty",function(e){return!Ember.isEmpty(u(this,e))}),g("none",function(e){return Ember.isNone(u(this,e))}),g("not",function(e){return!u(this,e)}),g("bool",function(e){return!!u(this,e)}),g("match",function(e,t){var n=u(this,e);return"string"==typeof n?t.test(n):!1}),g("equal",function(e,t){return u(this,e)===t}),g("gt",function(e,t){return u(this,e)>t}),g("gte",function(e,t){return u(this,e)>=t}),g("lt",function(e,t){return u(this,e)<t}),g("lte",function(e,t){return u(this,e)<=t}),y("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),y("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),y("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),y("collect",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(e){return Ember.computed(e,function(t,n){return arguments.length>1?(a(this,e,n),n):u(this,e)})},Ember.computed.oneWay=function(e){return Ember.computed(e,function(){return u(this,e)})},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,n,r){return 1===arguments.length?null!=r?r:u(this,e):null!=n?n:u(this,e)})}}(),function(){function e(e){return e+n}function t(e){return e+r}var n=":change",r=":before";Ember.addObserver=function(t,n,r,i){return Ember.addListener(t,e(n),r,i),Ember.watch(t,n),this},Ember.observersFor=function(t,n){return Ember.listenersFor(t,e(n))},Ember.removeObserver=function(t,n,r,i){return Ember.unwatch(t,n),Ember.removeListener(t,e(n),r,i),this},Ember.addBeforeObserver=function(e,n,r,i){return Ember.addListener(e,t(n),r,i),Ember.watch(e,n),this},Ember._suspendBeforeObserver=function(e,n,r,i,s){return Ember._suspendListener(e,t(n),r,i,s)},Ember._suspendObserver=function(t,n,r,i,s){return Ember._suspendListener(t,e(n),r,i,s)};var i=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,n,r,s,o){var u=i.call(n,t);return Ember._suspendListeners(e,u,r,s,o)},Ember._suspendObservers=function(t,n,r,s,o){var u=i.call(n,e);return Ember._suspendListeners(t,u,r,s,o)},Ember.beforeObserversFor=function(e,n){return Ember.listenersFor(e,t(n))},Ember.removeBeforeObserver=function(e,n,r,i){return Ember.unwatch(e,n),Ember.removeListener(e,t(n),r,i),this}}(),function(){e("backburner/queue",["exports"],function(e){function t(e,t,n){this.daq=e,this.name=t,this.options=n,this._queue=[]}t.prototype={daq:null,name:null,options:null,_queue:null,push:function(e,t,n,r){var i=this._queue;return i.push(e,t,n,r),{queue:this,target:e,method:t}},pushUnique:function(e,t,n,r){var i,s,o,u,a=this._queue;for(o=0,u=a.length;u>o;o+=4)if(i=a[o],s=a[o+1],i===e&&s===t)return a[o+2]=n,a[o+3]=r,{queue:this,target:e,method:t};return this._queue.push(e,t,n,r),{queue:this,target:e,method:t}},flush:function(){var e,t,n,r,i,s=this._queue,o=this.options,u=o&&o.before,a=o&&o.after,f=s.length;for(f&&u&&u(),i=0;f>i;i+=4)e=s[i],t=s[i+1],n=s[i+2],r=s[i+3],n&&n.length>0?t.apply(e,n):t.call(e);f&&a&&a(),s.length>f?(this._queue=s.slice(f),this.flush()):this._queue.length=0},cancel:function(e){var t,n,r,i,s=this._queue;for(r=0,i=s.length;i>r;r+=4)if(t=s[r],n=s[r+1],t===e.target&&n===e.method)return s.splice(r,4),!0;if(s=this._queueBeingFlushed)for(r=0,i=s.length;i>r;r+=4)if(t=s[r],n=s[r+1],t===e.target&&n===e.method)return s[r+1]=null,!0}},e.Queue=t}),e("backburner/deferred_action_queues",["backburner/queue","exports"],function(e,t){function n(e,t){var n=this.queues={};this.queueNames=e=e||[];for(var r,s=0,o=e.length;o>s;s++)r=e[s],n[r]=new i(this,r,t[r])}function r(e,t){for(var n,r,i=0,s=t;s>=i;i++)if(n=e.queueNames[i],r=e.queues[n],r._queue.length)return i;return-1}var i=e.Queue;n.prototype={queueNames:null,queues:null,schedule:function(e,t,n,r,i,s){var o=this.queues,u=o[e];if(!u)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist");return i?u.pushUnique(t,n,r,s):u.push(t,n,r,s)},flush:function(){for(var e,t,n,i,s=this.queues,o=this.queueNames,u=0,a=o.length;a>u;){e=o[u],t=s[e],n=t._queueBeingFlushed=t._queue.slice(),t._queue=[];var f,l,c,h,p=t.options,d=p&&p.before,v=p&&p.after,m=0,g=n.length;for(g&&d&&d();g>m;)f=n[m],l=n[m+1],c=n[m+2],h=n[m+3],"string"==typeof l&&(l=f[l]),l&&(c&&c.length>0?l.apply(f,c):l.call(f)),m+=4;t._queueBeingFlushed=null,g&&v&&v(),-1===(i=r(this,u))?u++:u=i}}},t.DeferredActionQueues=n}),e("backburner",["backburner/deferred_action_queues","exports"],function(e,t){function n(e){return"number"==typeof e||b.test(e)}function r(e,t){this.queueNames=e,this.options=t||{},this.options.defaultQueue||(this.options.defaultQueue=e[0]),this.instanceStack=[]}function i(e){e.begin(),f=y.setTimeout(function(){f=null,e.end()})}function s(e,t,n){(!l||c>t)&&(l&&clearTimeout(l),l=y.setTimeout(function(){l=null,c=null,o(e)},n),c=t)}function o(e){var t,n,r,i,o=+(new Date);e.run(function(){for(r=0,i=g.length;i>r&&(t=g[r],!(t>o));r+=2);for(n=g.splice(0,r),r=1,i=n.length;i>r;r+=2)e.schedule(e.options.defaultQueue,null,n[r])}),g.length&&s(e,g[0],g[0]-o)}function u(e,t){for(var n,r=-1,i=0,s=m.length;s>i;i++)if(n=m[i],n[0]===e&&n[1]===t){r=i;break}return r}function a(e,t){for(var n,r=-1,i=0,s=v.length;s>i;i++)if(n=v[i],n[0]===e&&n[1]===t){r=i;break}return r}var f,l,c,h=e.DeferredActionQueues,p=[].slice,d=[].pop,v=[],m=[],g=[],y=this,b=/\d+/;r.prototype={queueNames:null,options:null,currentInstance:null,instanceStack:null,begin:function(){var e=this.options&&this.options.onBegin,t=this.currentInstance;t&&this.instanceStack.push(t),this.currentInstance=new h(this.queueNames,this.options),e&&e(this.currentInstance,t)},end:function(){var e=this.options&&this.options.onEnd,t=this.currentInstance,n=null;try{t.flush()}finally{this.currentInstance=null,this.instanceStack.length&&(n=this.instanceStack.pop(),this.currentInstance=n),e&&e(t,n)}},run:function(e,t){var n;this.begin(),t||(t=e,e=null),"string"==typeof t&&(t=e[t]);var r=!1;try{n=arguments.length>2?t.apply(e,p.call(arguments,2)):t.call(e)}finally{r||(r=!0,this.end())}return n},defer:function(e,t,n){n||(n=t,t=null),"string"==typeof n&&(n=t[n]);var r=this.DEBUG?new Error:void 0,s=arguments.length>3?p.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,n,s,!1,r)},deferOnce:function(e,t,n){n||(n=t,t=null),"string"==typeof n&&(n=t[n]);var r=this.DEBUG?new Error:void 0,s=arguments.length>3?p.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,n,s,!0,r)},setTimeout:function(){function e(){t.apply(i,f)}var t,r,i,o,u,a,f=p.call(arguments),l=f.length,c=this;if(0!==l){if(1===l)t=f.shift(),r=0;else if(2===l)o=f[0],u=f[1],"function"==typeof u||"function"==typeof o[u]?(i=f.shift(),t=f.shift(),r=0):n(u)?(t=f.shift(),r=f.shift()):(t=f.shift(),r=0);else{var h=f[f.length-1];n(h)&&(r=f.pop()),o=f[0],a=f[1],"function"==typeof a||"string"==typeof a&&null!==o&&a in o?(i=f.shift(),t=f.shift()):t=f.shift()}var d=+(new Date)+parseInt(r,10);"string"==typeof t&&(t=i[t]);var v,m;for(v=0,m=g.length;m>v&&!(d<g[v]);v+=2);return g.splice(v,0,d,e),s(c,d,r),e}},throttle:function(e,t){var n,r,i,s=this,o=arguments,u=parseInt(d.call(o),10);return r=a(e,t),r>-1?v[r]:(i=y.setTimeout(function(){s.run.apply(s,o);var n=a(e,t);n>-1&&v.splice(n,1)},u),n=[e,t,i],v.push(n),n)},debounce:function(e,t){var n,r,i,s,o=this,a=arguments,f=d.call(a);return"number"==typeof f||"string"==typeof f?(n=f,f=!1):n=d.call(a),n=parseInt(n,10),r=u(e,t),r>-1&&(i=m[r],m.splice(r,1),clearTimeout(i[2])),s=y.setTimeout(function(){f||o.run.apply(o,a);var n=u(e,t);n>-1&&m.splice(n,1)},n),f&&-1===r&&o.run.apply(o,a),i=[e,t,s],m.push(i),i},cancelTimers:function(){var e,t;for(e=0,t=v.length;t>e;e++)clearTimeout(v[e][2]);for(v=[],e=0,t=m.length;t>e;e++)clearTimeout(m[e][2]);m=[],l&&(clearTimeout(l),l=null),g=[],f&&(clearTimeout(f),f=null)},hasTimers:function(){return!!g.length||f},cancel:function(e){var t=typeof e;if(e&&"object"===t&&e.queue&&e.method)return e.queue.cancel(e);if("function"!==t)return"[object Array]"===Object.prototype.toString.call(e)?this._cancelItem(a,v,e)||this._cancelItem(u,m,e):void 0;for(var n=0,r=g.length;r>n;n+=2)if(g[n+1]===e)return g.splice(n,2),!0},_cancelItem:function(e,t,n){var r,i;return n.length<3?!1:(i=e(n[0],n[1]),i>-1&&(r=t[i],r[2]===n[2])?(t.splice(i,1),clearTimeout(n[2]),!0):!1)}},r.prototype.schedule=r.prototype.defer,r.prototype.scheduleOnce=r.prototype.deferOnce,r.prototype.later=r.prototype.setTimeout,t.Backburner=r})}(),function(){function e(){!Ember.run.currentRunLoop}var n=function(e){Ember.run.currentRunLoop=e},r=function(e,t){Ember.run.currentRunLoop=t},i=t("backburner").Backburner,s=new i(["sync","actions","destroy"],{sync:{before:Ember.beginPropertyChanges,after:Ember.endPropertyChanges},defaultQueue:"actions",onBegin:n,onEnd:r}),o=[].slice;[].concat,Ember.run=function(){var e;if(Ember.onerror)try{e=s.run.apply(s,arguments)}catch(t){Ember.onerror(t)}else e=s.run.apply(s,arguments);return e},Ember.run.join=function(){if(!Ember.run.currentRunLoop)return Ember.run.apply(Ember.run,arguments);var e=o.call(arguments);e.unshift("actions"),Ember.run.schedule.apply(Ember.run,e)},Ember.run.bind=function(){var e=arguments;return function(){return Ember.run.join.apply(Ember.run,e)}},Ember.run.backburner=s,Ember.run,Ember.run.currentRunLoop=null,Ember.run.queues=s.queueNames,Ember.run.begin=function(){s.begin()},Ember.run.end=function(){s.end()},Ember.run.schedule=function(){e(),s.schedule.apply(s,arguments)},Ember.run.hasScheduledTimers=function(){return s.hasTimers()},Ember.run.cancelTimers=function(){s.cancelTimers()},Ember.run.sync=function(){s.currentInstance&&s.currentInstance.queues.sync.flush()},Ember.run.later=function(){return s.later.apply(s,arguments)},Ember.run.once=function(){e();var t=o.call(arguments);return t.unshift("actions"),s.scheduleOnce.apply(s,t)},Ember.run.scheduleOnce=function(){return e(),s.scheduleOnce.apply(s,arguments)},Ember.run.next=function(){var e=o.call(arguments);return e.push(1),s.later.apply(s,e)},Ember.run.cancel=function(e){return s.cancel(e)},Ember.run.debounce=function(){return s.debounce.apply(s,arguments)},Ember.run.throttle=function(){return s.throttle.apply(s,arguments)}}(),function(){function e(e,t){return n(s(t)?Ember.lookup:e,t)}function t(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}Ember.LOG_BINDINGS=!!Ember.ENV.LOG_BINDINGS;var n=Ember.get,r=(Ember.set,Ember.guidFor),i=/^([A-Z$]|([0-9][A-Z$]))/,s=Ember.isGlobalPath=function(e){return i.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<"+r(this)+">("+this._from+" -> "+this._to+")"+e},connect:function(t){var n=this._from,r=this._to;return Ember.trySet(t,r,e(t,n)),Ember.addObserver(t,n,this,this.fromDidChange),this._oneWay||Ember.addObserver(t,r,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)),"back"===r&&"fwd"===t&&n.set(e,"fwd")},_sync:function(t){var r=Ember.LOG_BINDINGS;if(!t.isDestroyed&&this._readyToSync){var i=this._directionMap,s=i.get(t),o=this._from,u=this._to;if(i.remove(t),"fwd"===s){var a=e(t,this._from);r&&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("back"===s){var f=n(t,this._to);r&&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)})}}}},t(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 e(e){var t=O(e,!0),n=t.mixins;return n?t.hasOwnProperty("mixins")||(n=t.mixins=k(n)):n=t.mixins={},n}function t(e,t){return t&&t.length>0&&(e.mixins=x.call(t,function(e){if(e instanceof w)return e;var t=new w;return t.properties=e,t})),e}function n(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function r(e,t){var n;return t instanceof w?(n=A(t),e[n]?D:(e[n]=t,t.properties)):t}function i(e,t,n,r){var i;return i=n[e]||r[e],t[e]&&(i=i?i.concat(t[e]):t[e]),i}function s(e,t,n,r,i){var s;return void 0===r[t]&&(s=i[t]),s=s||e.descs[t],s&&s instanceof Ember.ComputedProperty?(n=k(n),n.func=Ember.wrap(n.func,s.func),n):n}function o(e,t,n,r,i){var s;return void 0===i[t]&&(s=r[t]),s=s||e[t],"function"!=typeof s?n:Ember.wrap(n,s)}function u(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 a(e,t,r,i){var s=i[t]||e[t];if(!s)return r;var u=Ember.merge({},s);for(var a in r)if(r.hasOwnProperty(a)){var f=r[a];u[a]=n(f)?o(e,a,f,s,{}):f}return u}function f(e,t,r,i,f,l,c,h){if(r instanceof Ember.Descriptor){if(r===E&&f[t])return D;r.func&&(r=s(i,t,r,l,f)),f[t]=r,l[t]=void 0}else c&&T.call(c,t)>=0||"concatenatedProperties"===t||"mergedProperties"===t?r=u(e,t,r,l):h&&T.call(h,t)>=0?r=a(e,t,r,l):n(r)&&(r=o(e,t,r,l,f)),f[t]=void 0,l[t]=r}function l(e,t,n,s,o,u){function a(e){delete n[e],delete s[e]}for(var c,h,p,d,v,m,g=0,y=e.length;y>g;g++)if(c=e[g],h=r(t,c),h!==D)if(h){m=O(o),o.willMergeMixin&&o.willMergeMixin(h),d=i("concatenatedProperties",h,s,o),v=i("mergedProperties",h,s,o);for(p in h)h.hasOwnProperty(p)&&(u.push(p),f(o,p,h[p],m,n,s,d,v));h.hasOwnProperty("toString")&&(o.toString=h.toString)}else c.mixins&&(l(c.mixins,t,n,s,o,u),c._without&&N.call(c._without,a))}function c(e,t,n,r){if(P.test(t)){var i=r.bindings;i?r.hasOwnProperty("bindings")||(i=r.bindings=k(r.bindings)):i=r.bindings={},i[t]=n}}function h(e,t){var n,r,i,s=t.bindings;if(s){for(n in s)r=s[n],r&&(i=n.slice(0,-7),r instanceof Ember.Binding?(r=r.copy(),r.to(i)):r=new Ember.Binding(i,r),r.connect(e),e[n]=r);t.bindings={}}}function p(e,t){return h(e,t||O(e)),e}function d(e,t,n,r,i){var s,o=t.methodName;return r[o]||i[o]?(s=i[o],t=r[o]):n.descs[o]?(t=n.descs[o],s=void 0):(t=void 0,s=e[o]),{desc:t,value:s}}function v(e,t,n,r,i){var s=n[r];if(s)for(var o=0,u=s.length;u>o;o++)Ember[i](e,s[o],null,t)}function m(e,t,n){var r=e[t];"function"==typeof r&&(v(e,t,r,"__ember_observesBefore__","removeBeforeObserver"),v(e,t,r,"__ember_observes__","removeObserver"),v(e,t,r,"__ember_listens__","removeListener")),"function"==typeof n&&(v(e,t,n,"__ember_observesBefore__","addBeforeObserver"),v(e,t,n,"__ember_observes__","addObserver"),v(e,t,n,"__ember_listens__","addListener"))}function g(t,n,r){var i,s,o,u={},a={},f=O(t),h=[];l(n,e(t),u,a,t,h);for(var v=0,g=h.length;g>v;v++)if(i=h[v],"constructor"!==i&&a.hasOwnProperty(i)&&(o=u[i],s=a[i],o!==E)){for(;o&&o instanceof S;){var y=d(t,o,f,u,a);o=y.desc,s=y.value}(void 0!==o||void 0!==s)&&(m(t,i,s),c(t,i,s,f),L(t,i,o,s,f))}return r||p(t,f),t}function y(e,t,n){var r=A(e);if(n[r])return!1;if(n[r]=!0,e===t)return!0;for(var i=e.mixins,s=i?i.length:0;--s>=0;)if(y(i[s],t,n))return!0;return!1}function b(e,t,n){if(!n[A(t)])if(n[A(t)]=!0,t.properties){var r=t.properties;for(var i in r)r.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&N.call(t.mixins,function(t){b(e,t,n)})}var w,E,S,x=Ember.ArrayPolyfills.map,T=Ember.ArrayPolyfills.indexOf,N=Ember.ArrayPolyfills.forEach,C=[].slice,k=Ember.create,L=Ember.defineProperty,A=Ember.guidFor,O=Ember.meta,M=Ember.META_KEY,_=Ember.expandProperties,D={},P=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=C.call(arguments,1);return g(e,t,!1),e},Ember.Mixin=function(){return t(this,arguments)},w=Ember.Mixin,w.prototype={properties:null,mixins:null,ownerConstructor:null},w._apply=g,w.applyPartial=function(e){var t=C.call(arguments,1);return g(e,t,!0)},w.finishPartial=p,Ember.anyUnprocessedMixins=!1,w.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var H=w.prototype;H.reopen=function(){var e,t;this.properties?(e=w.create(),e.properties=this.properties,delete this.properties,this.mixins=[e]):this.mixins||(this.mixins=[]);var n,r=arguments.length,i=this.mixins;for(n=0;r>n;n++)e=arguments[n],e instanceof w?i.push(e):(t=w.create(),t.properties=e,i.push(t));return this},H.apply=function(e){return g(e,[this],!1)},H.applyPartial=function(e){return g(e,[this],!0)},H.detect=function(e){if(!e)return!1;if(e instanceof w)return y(e,this,{});var t=e[M],n=t&&t.mixins;return n?!!n[A(this)]:!1},H.without=function(){var e=new w(this);return e._without=C.call(arguments),e},H.keys=function(){var e={},t={},n=[];b(e,this,t);for(var r in e)e.hasOwnProperty(r)&&n.push(r);return n},w.mixins=function(e){var t=e[M],n=t&&t.mixins,r=[];if(!n)return r;for(var i in n){var s=n[i];s.properties||r.push(s)}return r},E=new Ember.Descriptor,E.toString=function(){return"(Required Property)"},Ember.required=function(){return E},S=function(e){this.methodName=e},S.prototype=new Ember.Descriptor,Ember.aliasMethod=function(e){return new S(e)},Ember.observer=function(){var e,t=C.call(arguments,-1)[0],n=function(t){e.push(t)},r=C.call(arguments,0,-1);"function"!=typeof t&&(t=arguments[0],r=C.call(arguments,1)),e=[];for(var i=0;i<r.length;++i)_(r[i],n);if("function"!=typeof t)throw new Ember.Error("Ember.observer called without a function");return t.__ember_observes__=e,t},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++)arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(){var e,t=C.call(arguments,-1)[0],n=function(t){e.push(t)},r=C.call(arguments,0,-1);"function"!=typeof t&&(t=arguments[0],r=C.call(arguments,1)),e=[];for(var i=0;i<r.length;++i)_(r[i],n);if("function"!=typeof t)throw new Ember.Error("Ember.beforeObserver called without a function");return t.__ember_observesBefore__=e,t}}(),function(){var e=Ember.EnumerableUtils.forEach,t=Ember.EnumerableUtils.indexOf;Ember.libraries=function(){var n=[],r=0,i=function(e){for(var t=0;t<n.length;t++)if(n[t].name===e)return n[t]};return n.register=function(e,t){i(e)||n.push({name:e,version:t})},n.registerCoreLibrary=function(e,t){i(e)||n.splice(r++,0,{name:e,version:t})},n.deRegister=function(e){var r=i(e);r&&n.splice(t(n,r),1)},n.each=function(t){e(n,function(e){t(e.name,e.version)})},n}(),Ember.libraries.registerCoreLibrary("Ember",Ember.VERSION)}(),function(){e("rsvp/all",["./promise","exports"],function(e,t){var n=e["default"];t["default"]=function(e,t){return n.all(e,t)}}),e("rsvp/all_settled",["./promise","./utils","exports"],function(e,t,n){function r(e){return{state:"fulfilled",value:e}}function i(e){return{state:"rejected",reason:e}}var s=e["default"],o=t.isArray,u=t.isNonThenable;n["default"]=function(e,t){return new s(function(t){function n(e){return function(t){l(e,r(t))}}function f(e){return function(t){l(e,i(t))}}function l(e,n){p[e]=n,0===--h&&t(p)}if(!o(e))throw new TypeError("You must pass an array to allSettled.");var c,h=e.length;if(0===h)return t([]),void 0;for(var p=new Array(h),d=0;d<e.length;d++)c=e[d],u(c)?l(d,r(c)):s.cast(c).then(n(d),f(d))},t)}}),e("rsvp/config",["./events","exports"],function(e,t){function n(e,t){return"onerror"===e?(i.on("error",t),void 0):2!==arguments.length?i[e]:(i[e]=t,void 0)}var r=e["default"],i={instrument:!1};r.mixin(i),t.config=i,t.configure=n}),e("rsvp/defer",["./promise","exports"],function(e,t){var n=e["default"];t["default"]=function(e){var t={};return t.promise=new n(function(e,n){t.resolve=e,t.reject=n},e),t}}),e("rsvp/events",["exports"],function(e){var t=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},n=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t};e["default"]={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,r){var i,s=n(this);i=s[e],i||(i=s[e]=[]),-1===t(i,r)&&i.push(r)},off:function(e,r){var i,s,o=n(this);return r?(i=o[e],s=t(i,r),-1!==s&&i.splice(s,1),void 0):(o[e]=[],void 0)},trigger:function(e,t){var r,i,s=n(this);if(r=s[e])for(var o=0;o<r.length;o++)(i=r[o])(t)}}}),e("rsvp/filter",["./all","./map","./utils","exports"],function(e,t,n,r){function i(e,t,n){return s(e,n).then(function(r){if(!a(e))throw new TypeError("You must pass an array to filter.");if(!u(t))throw new TypeError("You must pass a function to filter's second argument.");return o(e,t,n).then(function(e){var t,n=r.length,i=[];for(t=0;n>t;t++)e[t]&&i.push(r[t]);return i})})}var s=e["default"],o=t["default"],u=n.isFunction,a=n.isArray;r["default"]=i}),e("rsvp/hash",["./promise","./utils","exports"],function(e,t,n){var r=e["default"],i=t.isNonThenable,s=t.keysOf;n["default"]=function(e){return new r(function(t,n){function u(e){return function(n){c[e]=n,0===--p&&t(c)}}function a(e){p=0,n(e)}var f,l,c={},h=s(e),p=h.length;if(0===p)return t(c),void 0;for(var d=0;d<h.length;d++)l=h[d],f=e[l],i(f)?(c[l]=f,0===--p&&t(c)):r.cast(f).then(u(l),a)})}}),e("rsvp/instrument",["./config","./utils","exports"],function(e,t,n){var r=e.config,i=t.now;n["default"]=function(e,t,n){try{r.trigger(e,{guid:t._guidKey+t._id,eventName:e,detail:t._detail,childGuid:n&&t._guidKey+n._id,label:t._label,timeStamp:i(),stack:(new Error(t._label)).stack})}catch(s){setTimeout(function(){throw s},0)}}}),e("rsvp/map",["./promise","./all","./utils","exports"],function(e,t,n,r){var i=(e["default"],t["default"]),s=n.isArray,o=n.isFunction;r["default"]=function(e,t,n){return i(e,n).then(function(r){if(!s(e))throw new TypeError("You must pass an array to map.");if(!o(t))throw new TypeError("You must pass a function to map's second argument.");var u,f=r.length,l=[];for(u=0;f>u;u++)l.push(t(r[u]));return i(l,n)})}}),e("rsvp/node",["./promise","exports"],function(e,t){function n(e,t){return function(n,r){n?t(n):arguments.length>2?e(i.call(arguments,1)):e(r)}}var r=e["default"],i=Array.prototype.slice;t["default"]=function(e,t){return function(){var s=i.call(arguments),o=this||t;return new r(function(t,i){r.all(s).then(function(r){try{r.push(n(t,i)),e.apply(o,r)}catch(s){i(s)}})})}}}),e("rsvp/promise",["./config","./events","./instrument","./utils","./promise/cast","./promise/all","./promise/race","./promise/resolve","./promise/reject","exports"],function(e,t,n,r,i,s,o,u,a,f){function l(){}function c(e,t){if(!N(e))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof c))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._id=D++,this._label=t,this._subscribers=[],S.instrument&&x("created",this),l!==e&&h(e,this)}function h(e,t){function n(e){g(t,e)}function r(e){b(t,e)}try{e(n,r)}catch(i){r(i)}}function p(e,t,n,r){var i=e._subscribers,s=i.length;i[s]=t,i[s+B]=n,i[s+j]=r}function d(e,t){var n,r,i=e._subscribers,s=e._detail;S.instrument&&x(t===B?"fulfilled":"rejected",e);for(var o=0;o<i.length;o+=3)n=i[o],r=i[o+t],v(t,n,r,s);e._subscribers=null}function v(e,t,n,r){var i,s,o,u,a=N(n);if(a)try{i=n(r),o=!0}catch(f){u=!0,s=f}else i=r,o=!0;m(t,i)||(a&&o?g(t,i):u?b(t,s):e===B?g(t,i):e===j&&b(t,i))}function m(e,t){var n,r=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(T(t)&&(r=t.then,N(r)))return r.call(t,function(r){return n?!0:(n=!0,t!==r?g(e,r):y(e,r),void 0)},function(t){return n?!0:(n=!0,b(e,t),void 0)},"derived from: "+(e._label||" unknown promise")),!0}catch(i){return n?!0:(b(e,i),!0)}return!1}function g(e,t){e===t?y(e,t):m(e,t)||y(e,t)}function y(e,t){e._state===P&&(e._state=H,e._detail=t,S.async(w,e))}function b(e,t){e._state===P&&(e._state=H,e._detail=t,S.async(E,e))}function w(e){d(e,e._state=B)}function E(e){e._onerror&&e._onerror(e._detail),d(e,e._state=j)}var S=e.config,x=(t["default"],n["default"]),T=r.objectOrFunction,N=r.isFunction,C=r.now,k=i["default"],L=s["default"],A=o["default"],O=u["default"],M=a["default"],_="rsvp_"+C()+"-",D=0;f["default"]=c,c.cast=k,c.all=L,c.race=A,c.resolve=O,c.reject=M;var P=void 0,H=0,B=1,j=2;c.prototype={constructor:c,_id:void 0,_guidKey:_,_label:void 0,_state:void 0,_detail:void 0,_subscribers:void 0,_onerror:function(e){S.trigger("error",e)},then:function(e,t,n){var r=this;this._onerror=null;var i=new this.constructor(l,n);if(this._state){var s=arguments;S.async(function(){v(r._state,i,s[r._state-1],r._detail)})}else p(this,i,e,t);return S.instrument&&x("chained",r,i),i},"catch":function(e,t){return this.then(null,e,t)},"finally":function(e,t){var n=this.constructor;return this.then(function(t){return n.cast(e()).then(function(){return t})},function(t){return n.cast(e()).then(function(){throw t})},t)}}}),e("rsvp/promise/all",["../utils","exports"],function(e,t){var n=e.isArray,r=e.isNonThenable;t["default"]=function(e,t){var i=this;return new i(function(t,s){function o(e){return function(n){l[e]=n,0===--f&&t(l)}}function u(e){f=0,s(e)}if(!n(e))throw new TypeError("You must pass an array to all.");var a,f=e.length,l=new Array(f);if(0===f)return t(l),void 0;for(var c=0;c<e.length;c++)a=e[c],r(a)?(l[c]=a,0===--f&&t(l)):i.cast(a).then(o(c),u)},t)}}),e("rsvp/promise/cast",["exports"],function(e){e["default"]=function(e,t){var n=this;return e&&"object"==typeof e&&e.constructor===n?e:new n(function(t){t(e)},t)}}),e("rsvp/promise/race",["../utils","exports"],function(e,t){var n=e.isArray,r=(e.isFunction,e.isNonThenable);t["default"]=function(e,t){var i,s=this;return new s(function(t,u){function a(e){l&&(l=!1,t(e))}function f(e){l&&(l=!1,u(e))}if(!n(e))throw new TypeError("You must pass an array to race.");for(var l=!0,c=0;c<e.length;c++){if(i=e[c],r(i))return l=!1,t(i),void 0;s.cast(i).then(a,f)}},t)}}),e("rsvp/promise/reject",["exports"],function(e){e["default"]=function(e,t){var n=this;return new n(function(t,n){n(e)},t)}}),e("rsvp/promise/resolve",["exports"],function(e){e["default"]=function(e,t){var n=this;return new n(function(t){t(e)},t)}}),e("rsvp/race",["./promise","exports"],function(e,t){var n=e["default"];t["default"]=function(e,t){return n.race(e,t)}}),e("rsvp/reject",["./promise","exports"],function(e,t){var n=e["default"];t["default"]=function(e,t){return n.reject(e,t)}}),e("rsvp/resolve",["./promise","exports"],function(e,t){var n=e["default"];t["default"]=function(e,t){return n.resolve(e,t)}}),e("rsvp/rethrow",["exports"],function(e){e["default"]=function(e){throw setTimeout(function(){throw e}),e}}),e("rsvp/utils",["exports"],function(e){function t(e){return"function"==typeof e||"object"==typeof e&&null!==e}function n(e){return"function"==typeof e}function r(e){return!t(e)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}e.objectOrFunction=t,e.isFunction=n,e.isNonThenable=r,e.isArray=i;var s=Date.now||function(){return(new Date).getTime()};e.now=s;var o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.keysOf=o}),e("rsvp",["./rsvp/promise","./rsvp/events","./rsvp/node","./rsvp/all","./rsvp/all_settled","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/map","./rsvp/resolve","./rsvp/reject","./rsvp/filter","exports"],function(e,t,n,r,i,s,o,u,a,f,l,c,h,p,d){function v(e,t){k.async(e,t)}function m(){k.on.apply(k,arguments)}function g(){k.off.apply(k,arguments)}var y=e["default"],b=t["default"],w=n["default"],E=r["default"],S=i["default"],x=s["default"],T=o["default"],N=u["default"],C=a["default"],k=f.config,L=f.configure,A=l["default"],O=c["default"],M=h["default"],_=p["default"];if("undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){var D=window.__PROMISE_INSTRUMENTATION__;L("instrument",!0);for(var P in D)D.hasOwnProperty(P)&&m(P,D[P])}d.Promise=y,d.EventTarget=b,d.all=E,d.allSettled=S,d.race=x,d.hash=T,d.rethrow=N,d.defer=C,d.denodeify=w,d.configure=L,d.on=m,d.off=g,d.resolve=O,d.reject=M,d.async=v,d.map=A,d.filter=_})}(),function(){Ember.MODEL_FACTORY_INJECTIONS=!!Ember.ENV.MODEL_FACTORY_INJECTIONS,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.factoryCache=new e(t&&t.factoryCache),this.resolveCache=new e(t&&t.resolveCache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this.factoryTypeInjections=new e(t&&t.factoryTypeInjections),this.factoryInjections={},this._options=new e(t&&t._options),this._typeOptions=new e(t&&t._typeOptions)}function n(e,t){return e.cache.has(t)?!0:!!e.resolve(t)}function r(e,t,n){if(n=n||{},e.cache.has(t)&&n.singleton!==!1)return e.cache.get(t);var r=c(e,t);return void 0!==r?(s(e,t)&&n.singleton!==!1&&e.cache.set(t,r),r):void 0}function i(e){throw new Error(e+" is not currently supported on child containers")}function s(e,t){var n=u(e,t,"singleton");return n!==!1}function o(e,t){var n={};if(!t)return n;for(var i,s,o=0,u=t.length;u>o;o++){if(i=t[o],s=r(e,i.fullName),void 0===s)throw new Error("Attempting to inject an unknown injection: `"+i.fullName+"`");n[i.property]=s}return n}function u(e,t,n){var r=e._options.get(t);if(r&&void 0!==r[n])return r[n];var i=t.split(":")[0];return r=e._typeOptions.get(i),r?r[n]:void 0}function a(e,t){var n,r=t,i=e.resolve(r),s=e.factoryCache,o=t.split(":")[0];if(void 0!==i){if(s.has(t))return s.get(t);if(!i||"function"!=typeof i.extend||!Ember.MODEL_FACTORY_INJECTIONS&&"model"===o)return i;var u=f(e,t),a=l(e,t);return a._toString=e.makeToString(i,t),n=i.extend(u),n.reopenClass(a),s.set(t,n),n}}function f(e,t){var n=t.split(":"),r=n[0],i=[];return i=i.concat(e.typeInjections.get(r)||[]),i=i.concat(e.injections[t]||[]),i=o(e,i),i._debugContainerKey=t,i.container=e,i}function l(e,t){var n=t.split(":"),r=n[0],i=[];return i=i.concat(e.factoryTypeInjections.get(r)||[]),i=i.concat(e.factoryInjections[t]||[]),i=o(e,i),i._debugContainerKey=t,i}function c(e,t){var n=a(e,t);return u(e,t,"instantiate")===!1?n:n?"function"==typeof n.extend?n.create():n.create(f(e,t)):void 0}function h(e,t){e.cache.eachLocal(function(n,r){u(e,n,"instantiate")!==!1&&t(r)})}function p(e){e.cache.eachLocal(function(t,n){u(e,t,"instantiate")!==!1&&n.destroy()}),e.cache.dict={}}function d(e,t,n,r){var i=e.get(t);i||(i=[],e.set(t,i)),i.push({property:n,fullName:r})}function v(e){if(!g.test(e))throw new TypeError("Invalid Fullname, expected: `type:name` got: "+e)}function m(e,t,n,r){var i=e[t]=e[t]||[];i.push({property:n,fullName:r})}e.prototype={parent:null,dict:null,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},remove:function(e){delete this.dict[e]},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={parent:null,children:null,resolver:null,registry:null,cache:null,typeInjections:null,injections:null,_options:null,_typeOptions:null,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){if(v(e),void 0===t)throw new TypeError("Attempting to register an unknown factory: `"+e+"`");var r=this.normalize(e);if(this.cache.has(r))throw new Error("Cannot re-register: `"+e+"`, as it has already been looked up.");this.registry.set(r,t),this._options.set(r,n||{})},unregister:function(e){v(e);var t=this.normalize(e);this.registry.remove(t),this.cache.remove(t),this.factoryCache.remove(t),this.resolveCache.remove(t),this._options.remove(t)},resolve:function(e){v(e);var t=this.normalize(e),n=this.resolveCache.get(t);if(n)return n;var r=this.resolver(t)||this.registry.get(t);return this.resolveCache.set(t,r),r},describe:function(e){return e},normalize:function(e){return e},makeToString:function(e){return e.toString()},lookup:function(e,t){return v(e),r(this,this.normalize(e),t)},lookupFactory:function(e){return v(e),a(this,this.normalize(e))},has:function(e){return v(e),n(this,this.normalize(e))},optionsForType:function(e,t){this.parent&&i("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,n){v(n),this.parent&&i("typeInjection"),d(this.typeInjections,e,t,n)},injection:function(e,t,n){this.parent&&i("injection"),v(n);var r=this.normalize(n);if(-1===e.indexOf(":"))return this.typeInjection(e,t,r);v(e);var s=this.normalize(e);m(this.injections,s,t,r)},factoryTypeInjection:function(e,t,n){this.parent&&i("factoryTypeInjection"),d(this.factoryTypeInjections,e,t,this.normalize(n))},factoryInjection:function(e,t,n){this.parent&&i("injection");var r=this.normalize(e),s=this.normalize(n);return v(n),-1===e.indexOf(":")?this.factoryTypeInjection(r,t,s):(v(e),m(this.factoryInjections,r,t,s),void 0)},destroy:function(){for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],h(this,function(e){e.destroy()}),this.parent=void 0,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;t>e;e++)p(this.children[e]);p(this)}};var g=/^[^:]+.+:[^:]+$/;return t})}(),function(){function e(n,r,i,s){var o,u,a;if("object"!=typeof n||null===n)return n;if(r&&(u=t(i,n))>=0)return s[u];if("array"===Ember.typeOf(n)){if(o=n.slice(),r)for(u=o.length;--u>=0;)o[u]=e(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)n.hasOwnProperty(a)&&"__"!==a.substring(0,2)&&(o[a]=r?e(n[a],r,i,s):n[a])}return r&&(i.push(n),s.push(o)),o}var t=Ember.EnumerableUtils.indexOf;if(Ember.compare=function i(e,t){if(e===t)return 0;var n=Ember.typeOf(e),r=Ember.typeOf(t),s=Ember.Comparable;if(s){if("instance"===n&&s.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===r&&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;f>a;++a)o[u[a]]=a;delete Ember.ORDER_DEFINITION}var l=o[n],c=o[r];if(c>l)return-1;if(l>c)return 1;switch(n){case"boolean":case"number":return t>e?-1:e>t?1:0;case"string":var h=e.localeCompare(t);return 0>h?-1:h>0?1:0;case"array":for(var p=e.length,d=t.length,v=Math.min(p,d),m=0,g=0;0===m&&v>g;)m=i(e[g],t[g]),g++;return 0!==m?m:d>p?-1:p>d?1:0;case"instance":return Ember.Comparable&&Ember.Comparable.detect(e)?e.compare(e,t):0;case"date":var y=e.getTime(),b=t.getTime();return b>y?-1:y>b?1:0;default:return 0}},Ember.copy=function(t,n){return"object"!=typeof t||null===t?t:Ember.Copyable&&Ember.Copyable.detect(t)?t.copy(n):e(t,n,n?[]:null,n?[]:null)},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.create.isSimulated){var n=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","valueOf","toLocaleString","toString"],r=function(e,n,r){"__"!==r.substring(0,2)&&"_super"!==r&&(t(n,r)>=0||e.hasOwnProperty(r)&&n.push(r))};Ember.keys=function(e){var t,i=[];for(t in e)r(e,i,t);for(var s=0,o=n.length;o>s;s++)t=n[s],r(e,i,t);return i}}}(),function(){var e=/[ _]/g,t={},n=/([a-z\d])([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,10)-1:n++,e=t[r],null===e?"(null)":void 0===e?"":Ember.inspect(e)})},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,i=t,s=i.hasOwnProperty(n);return s?i[n]:(r=Ember.String.decamelize(n).replace(e,"-"),i[n]=r,r)},camelize:function(e){return e.replace(r,function(e,t,n){return n?n.toUpperCase():""}).replace(/^([A-Z])/,function(e){return e.toLowerCase()})},classify:function(e){for(var t=e.split("."),n=[],r=0,i=t.length;i>r;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;(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=Ember.get,t=Ember.set,n=Array.prototype.slice,r=Ember.getProperties;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){return r.apply(null,[this].concat(n.call(arguments)))},set:function(e,n){return t(this,e,n),this},setProperties:function(e){return Ember.setProperties(this,e)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this},endPropertyChanges:function(){return Ember.endPropertyChanges(),this},propertyWillChange:function(e){return Ember.propertyWillChange(this,e),this},propertyDidChange:function(e){return Ember.propertyDidChange(this,e),this},notifyPropertyChange:function(e){return this.propertyWillChange(e),this.propertyDidChange(e),this},addBeforeObserver:function(e,t,n){Ember.addBeforeObserver(this,e,t,n)},addObserver:function(e,t,n){Ember.addObserver(this,e,t,n)},removeObserver:function(e,t,n){Ember.removeObserver(this,e,t,n)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(n,r){return Ember.isNone(r)&&(r=1),t(this,n,(e(this,n)||0)+r),e(this,n)},decrementProperty:function(n,r){return Ember.isNone(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(){function e(){var e,t,s=!1,o=function(){s||o.proto(),r(this,i,w),r(this,"_super",w);var a=u(this),f=a.proto;if(a.proto=this,e){var h=e;e=null,this.reopen.apply(this,h)}if(t){var p=t;t=null;for(var d=this.concatenatedProperties,v=0,g=p.length;g>v;v++){var E=p[v];if("object"!=typeof E&&void 0!==E)throw new Ember.Error("Ember.Object.create only accepts objects.");if(E)for(var S=Ember.keys(E),x=0,T=S.length;T>x;x++){var N=S[x];if(E.hasOwnProperty(N)){var C=E[N],k=Ember.IS_BINDING;if(k.test(N)){var L=a.bindings;L?a.hasOwnProperty("bindings")||(L=a.bindings=n(a.bindings)):L=a.bindings={},L[N]=C}var A=a.descs[N];if(d&&b(d,N)>=0){var O=this[N];C=O?"function"==typeof O.concat?O.concat(C):Ember.makeArray(O).concat(C):Ember.makeArray(C)}A?A.set(this,N,C):"function"!=typeof this.setUnknownProperty||N in this?y?Ember.defineProperty(this,N,null,C):this[N]=C:this.setUnknownProperty(N,C)}}}}m(this,a),this.init.apply(this,arguments),a.proto=f,l(this),c(this,"init")};return o.toString=d.prototype.toString,o.willReopen=function(){s&&(o.PrototypeMixin=d.create(o.PrototypeMixin)),s=!1},o._initMixins=function(t){e=t},o._initProperties=function(e){t=e},o.proto=function(){var e=o.superclass;return e&&e.proto(),s||(s=!0,o.PrototypeMixin.applyPartial(o.prototype),f(o.prototype)),this.prototype},o}function t(e){return function(){return e}}var n=(Ember.set,Ember.get,Ember.create),r=Ember.platform.defineProperty,i=Ember.GUID_KEY,s=Ember.guidFor,o=Ember.generateGuid,u=Ember.meta,a=Ember.META_KEY,f=Ember.rewatch,l=Ember.finishChains,c=Ember.sendEvent,h=Ember.destroy,p=Ember.run.schedule,d=Ember.Mixin,v=d._apply,m=d.finishPartial,g=d.prototype.reopen,y=Ember.ENV.MANDATORY_SETTER,b=Ember.EnumerableUtils.indexOf,w={configurable:!0,writable:!0,enumerable:!1,value:void 0},E=e();E.toString=function(){return"Ember.CoreObject"},E.PrototypeMixin=d.create({reopen:function(){return v(this,arguments,!0),this},init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this.isDestroying?void 0:(this.isDestroying=!0,p("actions",this,this.willDestroy),p("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.isDestroyed||(h(this),this.isDestroyed=!0)},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,n=e?":"+this.toStringExtension():"",r="<"+this.constructor.toString()+":"+s(this)+n+">";return this.toString=t(r),r}}),E.PrototypeMixin.ownerConstructor=E,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(E.PrototypeMixin),E.__super__=null;var S=d.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,r=e();return r.ClassMixin=d.create(this.ClassMixin),r.PrototypeMixin=d.create(this.PrototypeMixin),r.ClassMixin.ownerConstructor=r,r.PrototypeMixin.ownerConstructor=r,g.apply(r.PrototypeMixin,arguments),r.superclass=this,r.__super__=this.prototype,t=r.prototype=n(this.prototype),t.constructor=r,o(t),u(t).proto=t,r.ClassMixin.apply(r),r},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(),g.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return g.apply(this.ClassMixin,arguments),v(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=this.proto()[a],n=t&&t.descs[e];return n._meta||{}},eachComputedProperty:function(e,t){var n,r=this.proto(),i=u(r).descs,s={};for(var o in i)n=i[o],n instanceof Ember.ComputedProperty&&e.call(t||this,o,n._meta||s)}});S.ownerConstructor=E,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(S),E.ClassMixin=S,S.apply(E),Ember.CoreObject=E}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,n,i){var o=t.length;f[t.join(".")]=n;for(var u in n)if(l.call(n,u)){var a=n[u];if(t[o]=u,a&&a.toString===r)a.toString=s(t.join(".")),a[h]=t.join(".");else if(a&&a.isNamespace){if(i[c(a)])continue;i[c(a)]=!0,e(t,a,i)}}t.length=o}function t(){var e,t,n=Ember.Namespace,r=Ember.lookup;if(!n.PROCESSED)for(var i in r)if("parent"!==i&&"top"!==i&&"frameElement"!==i&&"webkitStorageInfo"!==i&&!("globalStorage"===i&&r.StorageList&&r.globalStorage instanceof r.StorageList||r.hasOwnProperty&&!r.hasOwnProperty(i))){try{e=Ember.lookup[i],t=e&&e.isNamespace}catch(s){continue}t&&(e[h]=i)}}function n(e){var t=e.superclass;return t?t[h]?t[h]:n(t):void 0}function r(){Ember.BOOTED||this[h]||i();var e;if(this[h])e=this[h];else if(this._toString)e=this._toString;else{var t=n(this);e=t?"(subclass of "+t+")":"(unknown mixin)",this.toString=s(e)}return e}function i(){var n=!a.PROCESSED,r=Ember.anyUnprocessedMixins;if(n&&(t(),a.PROCESSED=!0),n||r){for(var i,s=a.NAMESPACES,o=0,u=s.length;u>o;o++)i=s[o],e([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function s(e){return function(){return e}}var o=Ember.get,u=Ember.ArrayPolyfills.indexOf,a=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var e=o(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(u.call(e,this),1),this._super()}});a.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:i,byName:function(e){return Ember.BOOTED||i(),f[e]}});var f=a.NAMESPACES_BY_ID,l={}.hasOwnProperty,c=Ember.guidFor,h=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=r}(),function(){function e(e,t){var n=t.slice(8);n in this||a(this,n)}function t(e,t){var n=t.slice(8);n in this||f(this,n)}var n=Ember.get,r=Ember.set,i=(Ember.String.fmt,Ember.addBeforeObserver),s=Ember.addObserver,o=Ember.removeBeforeObserver,u=Ember.removeObserver,a=Ember.propertyWillChange,f=Ember.propertyDidChange,l=Ember.meta,c=Ember.defineProperty;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer("content",function(){}),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(n){var r="content."+n;i(this,r,null,e),s(this,r,null,t)},didUnwatchProperty:function(n){var r="content."+n;o(this,r,null,e),u(this,r,null,t)},unknownProperty:function(e){var t=n(this,"content");return t?n(t,e):void 0},setUnknownProperty:function(e,t){var i=l(this);if(i.proto===this)return c(this,e,null,t),t;var s=n(this,"content");return r(s,e,t)}})}(),function(){function e(){return 0===u.length?{}:u.pop()}function t(e){return u.push(e),null}function n(e,t){function n(n){var s=r(n,e);return i?t===s:!!s}var i=2===arguments.length;return n}var r=Ember.get,i=Ember.set,s=Array.prototype.slice,o=Ember.EnumerableUtils.indexOf,u=[];Ember.Enumerable=Ember.Mixin.create({nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(0===r(this,"length"))return void 0;var n,i=e();return n=this.nextObject(0,null,i),t(i),n}).property("[]"),lastObject:Ember.computed(function(){var n=r(this,"length");if(0===n)return void 0;var i,s=e(),o=0,u=null;do u=i,i=this.nextObject(o++,u,s);while(void 0!==i);return t(s),u}).property("[]"),contains:function(e){return void 0!==this.find(function(t){return t===e})},forEach:function(n,i){if("function"!=typeof n)throw new TypeError;var s=r(this,"length"),o=null,u=e();void 0===i&&(i=null);for(var a=0;s>a;a++){var f=this.nextObject(a,o,u);n.call(i,f,a,this),o=f}return o=null,u=t(u),this},getEach:function(e){return this.mapBy(e)},setEach:function(e,t){return this.forEach(function(n){i(n,e,t)})},map:function(e,t){var n=Ember.A();return this.forEach(function(r,i,s){n[i]=e.call(t,r,i,s)}),n},mapBy:function(e){return this.map(function(t){return r(t,e)})},mapProperty:Ember.aliasMethod("mapBy"),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)})},filterBy:function(){return this.filter(n.apply(this,arguments))},filterProperty:Ember.aliasMethod("filterBy"),rejectBy:function(e,t){var n=function(n){return r(n,e)===t},i=function(t){return!!r(t,e)},s=2===arguments.length?n:i;return this.reject(s)},rejectProperty:Ember.aliasMethod("rejectBy"),find:function(n,i){var s=r(this,"length");void 0===i&&(i=null);for(var o,u,a=null,f=!1,l=e(),c=0;s>c&&!f;c++)o=this.nextObject(c,a,l),(f=n.call(i,o,c,this))&&(u=o),a=o;return o=a=null,l=t(l),u},findBy:function(){return this.find(n.apply(this,arguments))},findProperty:Ember.aliasMethod("findBy"),every:function(e,t){return!this.find(function(n,r,i){return!e.call(t,n,r,i)})},everyBy:Ember.aliasMethod("isEvery"),everyProperty:Ember.aliasMethod("isEvery"),isEvery:function(){return this.every(n.apply(this,arguments))},any:function(n,i){var s,o,u=r(this,"length"),a=e(),f=!1,l=null;for(void 0===i&&(i=null),o=0;u>o&&!f;o++)s=this.nextObject(o,l,a),f=n.call(i,s,o,this),l=s;return s=l=null,a=t(a),f},some:Ember.aliasMethod("any"),isAny:function(){return this.any(n.apply(this,arguments))},anyBy:Ember.aliasMethod("isAny"),someProperty:Ember.aliasMethod("isAny"),reduce:function(e,t,n){if("function"!=typeof e)throw new TypeError;var r=t;return this.forEach(function(t,i){r=e(r,t,i,this,n)},this),r},invoke:function(e){var t,n=Ember.A();return arguments.length>1&&(t=s.call(arguments,1)),this.forEach(function(r,i){var s=r&&r[e];"function"==typeof s&&(n[i]=t?s.apply(r,t):r[e]())},this),n},toArray:function(){var e=Ember.A();return this.forEach(function(t,n){e[n]=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(n){n!==e&&(t[t.length]=n)}),t},uniq:function(){var e=Ember.A();return this.forEach(function(t){o(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(){return this}),addEnumerableObserver:function(e,t){var n=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",s=r(this,"hasEnumerableObservers");return s||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,n),Ember.addListener(this,"@enumerable:change",e,i),s||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var n=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",s=r(this,"hasEnumerableObservers");return s&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,n),Ember.removeListener(this,"@enumerable:change",e,i),s&&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 n,i,s;return n="number"==typeof e?e:e?r(e,"length"):e=-1,i="number"==typeof t?t:t?r(t,"length"):t=-1,s=0>i||0>n||i-n!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),s&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var n,i,s;return n="number"==typeof e?e:e?r(e,"length"):e=-1,i="number"==typeof t?t:t?r(t,"length"):t=-1,s=0>i||0>n||i-n!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),s&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this},sortBy:function(){var e=arguments;return this.toArray().sort(function(t,n){for(var i=0;i<e.length;i++){var s=e[i],o=r(t,s),u=r(n,s),a=Ember.compare(o,u);if(a)return a}return 0})}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.isNone),n=Ember.EnumerableUtils.map,r=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{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 n(e,function(e){return t.objectAt(e)})},nextObject:function(e){return this.objectAt(e)},"[]":Ember.computed(function(t,n){return void 0!==n&&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(n,r){var i=Ember.A(),s=e(this,"length");for(t(n)&&(n=0),(t(r)||r>s)&&(r=s),0>n&&(n=s+n),0>r&&(r=s+r);r>n;)i[i.length]=this.objectAt(n++);return i},indexOf:function(t,n){var r,i=e(this,"length");for(void 0===n&&(n=0),0>n&&(n+=i),r=n;i>r;r++)if(this.objectAt(r)===t)return r;return-1},lastIndexOf:function(t,n){var r,i=e(this,"length");for((void 0===n||n>=i)&&(n=i-1),0>n&&(n+=i),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){void 0===t?(t=0,n=r=-1):(void 0===n&&(n=-1),void 0===r&&(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;s>o;o++)i.push(this.objectAt(o))}else i=n;return this.enumerableContentWillChange(i,r),this},arrayContentDidChange:function(t,n,i){void 0===t?(t=0,n=i=-1):(void 0===n&&(n=-1),void 0===i&&(i=-1));var s,o;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){s=[],o=t+i;for(var u=t;o>u;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(){function e(e,t){return"@this"===t?e:h(e,t)}function t(e,t,n){this.callbacks=e,this.cp=t,this.instanceMeta=n,this.dependentKeysByGuid={},this.trackedArraysByGuid={},this.suspended=!1,this.changedItems={}}function n(e,t,n){this.dependentArray=e,this.index=t,this.item=e.objectAt(t),this.trackedArray=n,this.beforeObserver=null,this.observer=null,this.destroyed=!1}function r(e,t,n){return 0>e?Math.max(0,t+e):t>e?e:Math.min(t-n,e)}function i(e,t,n){return Math.min(n,t-e)}function s(e,t,n,r,i,s){var o={arrayChanged:e,index:n,item:t,propertyName:r,property:i};return s&&(o.previousValues=s),o}function o(e,t,n,r,i){T(e,function(o,u){i.setValue(t.addedItem.call(this,i.getValue(),o,s(e,o,u,r,n),i.sugarMeta))},this)}function u(e,t){var n;e._callbacks(),e._hasInstanceMeta(this,t)?(n=e._instanceMeta(this,t),n.setValue(e.resetValue(n.getValue()))):n=e._instanceMeta(this,t),e.options.initialize&&e.options.initialize.call(this,n.getValue(),{property:e,propertyName:t},n.sugarMeta)}function a(t,n){if(k.test(n))return!1;var r=e(t,n);return Ember.Array.detect(r)}function f(e,t,n){this.context=e,this.propertyName=t,this.cache=d(e).cache,this.dependentArrays={},this.sugarMeta={},this.initialValue=n}function l(t){var n=this;this.options=t,this._instanceMetas={},this._dependentKeys=null,this._itemPropertyKeys={},this._previousItemPropertyKeys={},this.readOnly(),this.cacheable(),this.recomputeOnce=function(e){Ember.run.once(this,r,e)};var r=function(t){var r=(n._dependentKeys,n._instanceMeta(this,t)),i=n._callbacks();u.call(this,n,t),r.dependentArraysObserver.suspendArrayObservers(function(){T(n._dependentKeys,function(t){if(a(this,t)){var i=e(this,t),s=r.dependentArrays[t];i===s?n._previousItemPropertyKeys[t]&&(delete n._previousItemPropertyKeys[t],r.dependentArraysObserver.setupPropertyObservers(t,n._itemPropertyKeys[t])):(r.dependentArrays[t]=i,s&&r.dependentArraysObserver.teardownObservers(s,t),i&&r.dependentArraysObserver.setupObservers(i,t))}},this)},this),T(n._dependentKeys,function(s){if(a(this,s)){var u=e(this,s);u&&o.call(this,u,i,n,t,r)}},this)};this.func=function(e){return r.call(this,e),n._instanceMeta(this,e).getValue()}}function c(e){return e}var h=Ember.get,p=(Ember.set,Ember.guidFor),d=Ember.meta,v=Ember.propertyWillChange,m=Ember.propertyDidChange,g=Ember.addBeforeObserver,y=Ember.removeBeforeObserver,b=Ember.addObserver,w=Ember.removeObserver,E=Ember.ComputedProperty,S=[].slice,x=Ember.create,T=Ember.EnumerableUtils.forEach,N=/^(.*)\.@each\.(.*)/,C=/(.*\.@each){2,}/,k=/\.\[\]$/,L=Ember.expandProperties;t.prototype={setValue:function(e){this.instanceMeta.setValue(e,!0)},getValue:function(){return this.instanceMeta.getValue()},setupObservers:function(e,t){this.dependentKeysByGuid[p(e)]=t,e.addArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"}),this.cp._itemPropertyKeys[t]&&this.setupPropertyObservers(t,this.cp._itemPropertyKeys[t])},teardownObservers:function(e,t){var n=this.cp._itemPropertyKeys[t]||[];delete this.dependentKeysByGuid[p(e)],this.teardownPropertyObservers(t,n),e.removeArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"})},suspendArrayObservers:function(e,t){var n=this.suspended;this.suspended=!0,e.call(t),this.suspended=n},setupPropertyObservers:function(t,n){var r=e(this.instanceMeta.context,t),i=e(r,"length"),s=new Array(i);this.resetTransformations(t,s),T(r,function(e,i){var o=this.createPropertyObserverContext(r,i,this.trackedArraysByGuid[t]);s[i]=o,T(n,function(t){g(e,t,this,o.beforeObserver),b(e,t,this,o.observer)},this)},this)},teardownPropertyObservers:function(e,t){var n,r,i,s=this,o=this.trackedArraysByGuid[e];o&&o.apply(function(e,o,u){u!==Ember.TrackedArray.DELETE&&T(e,function(e){e.destroyed=!0,n=e.beforeObserver,r=e.observer,i=e.item,T(t,function(e){y(i,e,s,n),w(i,e,s,r)})})})},createPropertyObserverContext:function(e,t,r){var i=new n(e,t,r);return this.createPropertyObserver(i),i},createPropertyObserver:function(e){var t=this;e.beforeObserver=function(n,r){return t.itemPropertyWillChange(n,r,e.dependentArray,e)},e.observer=function(n,r){return t.itemPropertyDidChange(n,r,e.dependentArray,e)}},resetTransformations:function(e,t){this.trackedArraysByGuid[e]=new Ember.TrackedArray(t)},trackAdd:function(e,t,n){var r=this.trackedArraysByGuid[e];r&&r.addItems(t,n)},trackRemove:function(e,t,n){var r=this.trackedArraysByGuid[e];return r?r.removeItems(t,n):[]},updateIndexes:function(t,n){var r=e(n,"length");t.apply(function(e,t,n){n!==Ember.TrackedArray.DELETE&&(n!==Ember.TrackedArray.RETAIN||e.length!==r||0!==t)&&T(e,function(e,n){e.index=n+t})})},dependentArrayWillChange:function(t,n,o){function u(e){h[c].destroyed=!0,y(f,e,this,h[c].beforeObserver),w(f,e,this,h[c].observer)}if(!this.suspended){var a,f,l,c,h,d=this.callbacks.removedItem,v=p(t),m=this.dependentKeysByGuid[v],g=this.cp._itemPropertyKeys[m]||[],b=e(t,"length"),E=r(n,b,0),S=i(E,b,o);for(h=this.trackRemove(m,E,S),c=S-1;c>=0&&(l=E+c,!(l>=b));--c)f=t.objectAt(l),T(g,u,this),a=s(t,f,l,this.instanceMeta.propertyName,this.cp),this.setValue(d.call(this.instanceMeta.context,this.getValue(),f,a,this.instanceMeta.sugarMeta))}},dependentArrayDidChange:function(t,n,i,o){if(!this.suspended){var u,a,f=this.callbacks.addedItem,l=p(t),c=this.dependentKeysByGuid[l],h=new Array(o),d=this.cp._itemPropertyKeys[c],v=e(t,"length"),m=r(n,v,o);T(t.slice(m,m+o),function(e,n){d&&(a=h[n]=this.createPropertyObserverContext(t,m+n,this.trackedArraysByGuid[c]),T(d,function(t){g(e,t,this,a.beforeObserver),b(e,t,this,a.observer)},this)),u=s(t,e,m+n,this.instanceMeta.propertyName,this.cp),this.setValue(f.call(this.instanceMeta.context,this.getValue(),e,u,this.instanceMeta.sugarMeta))},this),this.trackAdd(c,m,h)}},itemPropertyWillChange:function(t,n,r,i){var s=p(t);this.changedItems[s]||(this.changedItems[s]={array:r,observerContext:i,obj:t,previousValues:{}}),this.changedItems[s].previousValues[n]=e(t,n)},itemPropertyDidChange:function(){this.flushChanges()},flushChanges:function(){var e,t,n,r=this.changedItems;for(e in r)t=r[e],t.observerContext.destroyed||(this.updateIndexes(t.observerContext.trackedArray,t.observerContext.dependentArray),n=s(t.array,t.obj,t.observerContext.index,this.instanceMeta.propertyName,this.cp,t.previousValues),this.setValue(this.callbacks.removedItem.call(this.instanceMeta.context,this.getValue(),t.obj,n,this.instanceMeta.sugarMeta)),this.setValue(this.callbacks.addedItem.call(this.instanceMeta.context,this.getValue(),t.obj,n,this.instanceMeta.sugarMeta)));this.changedItems={}}},f.prototype={getValue:function(){return this.propertyName in this.cache?this.cache[this.propertyName]:this.initialValue},setValue:function(e,t){e!==this.cache[this.propertyName]&&(t&&v(this.context,this.propertyName),void 0===e?delete this.cache[this.propertyName]:this.cache[this.propertyName]=e,t&&m(this.context,this.propertyName))}},Ember.ReduceComputedProperty=l,l.prototype=x(E.prototype),l.prototype._callbacks=function(){if(!this.callbacks){var e=this.options;this.callbacks={removedItem:e.removedItem||c,addedItem:e.addedItem||c}}return this.callbacks},l.prototype._hasInstanceMeta=function(e,t){var n=p(e),r=n+":"+t;return!!this._instanceMetas[r]},l.prototype._instanceMeta=function(e,n){var r=p(e),i=r+":"+n,s=this._instanceMetas[i];return s||(s=this._instanceMetas[i]=new f(e,n,this.initialValue()),s.dependentArraysObserver=new t(this._callbacks(),this,s,e,n,s.sugarMeta)),s},l.prototype.initialValue=function(){return"function"==typeof this.options.initialValue?this.options.initialValue():this.options.initialValue},l.prototype.resetValue=function(){return this.initialValue()},l.prototype.itemPropertyKey=function(e,t){this._itemPropertyKeys[e]=this._itemPropertyKeys[e]||[],this._itemPropertyKeys[e].push(t)},l.prototype.clearItemPropertyKeys=function(e){this._itemPropertyKeys[e]&&(this._previousItemPropertyKeys[e]=this._itemPropertyKeys[e],this._itemPropertyKeys[e]=[])},l.prototype.property=function(){var e,t,n=this,r=(S.call(arguments),new Ember.Set);return T(S.call(arguments),function(i){if(C.test(i))throw new Ember.Error("Nested @each properties not supported: "+i);if(e=N.exec(i)){t=e[1];var s=e[2],o=function(e){n.itemPropertyKey(t,e)};L(s,o),r.add(t)}else r.add(i)}),E.prototype.property.apply(this,r.toArray())},Ember.reduceComputed=function(e){var t;if(arguments.length>1&&(t=S.call(arguments,0,-1),e=S.call(arguments,-1)[0]),"object"!=typeof e)throw new Ember.Error("Reduce Computed Property declared without an options hash");if("initialValue"in e){var n=new l(e);return t&&n.property.apply(n,t),n}throw new Ember.Error("Reduce Computed Property declared without an initial value")}}(),function(){function e(){var e=this;return t.apply(this,arguments),this.func=function(t){return function(n){return e._hasInstanceMeta(this,n)||i(e._dependentKeys,function(t){Ember.addObserver(this,t,function(){e.recomputeOnce.call(this,n)})},this),t.apply(this,arguments)}}(this.func),this}var t=Ember.ReduceComputedProperty,n=[].slice,r=Ember.create,i=Ember.EnumerableUtils.forEach;Ember.ArrayComputedProperty=e,e.prototype=r(t.prototype),e.prototype.initialValue=function(){return Ember.A()},e.prototype.resetValue=function(e){return e.clear(),e},e.prototype.didChange=function(){},Ember.arrayComputed=function(t){var r;if(arguments.length>1&&(r=n.call(arguments,0,-1),t=n.call(arguments,-1)[0]),"object"!=typeof t)throw new Ember.Error("Array Computed Property declared without an options hash");var i=new e(t);return r&&i.property.apply(i,r),i}}(),function(){function e(e,i,s,o){function u(e){return t.detectInstance(e)?r(n(e,"content")):r(e)}var a,f,l,c,h;return arguments.length<4&&(o=n(e,"length")),arguments.length<3&&(s=0),s===o?s:(a=s+Math.floor((o-s)/2),f=e.objectAt(a),c=u(f),h=u(i),c===h?a:(l=this.order(f,i),0===l&&(l=h>c?-1:1),0>l?this.binarySearch(e,i,a+1,o):l>0?this.binarySearch(e,i,s,a):a))}var t,n=Ember.get,r=(Ember.set,Ember.guidFor),i=Ember.merge,s=[].slice,o=Ember.EnumerableUtils.forEach,u=Ember.EnumerableUtils.map;Ember.computed.sum=function(e){return Ember.reduceComputed(e,{initialValue:0,addedItem:function(e,t){return e+t},removedItem:function(e,t){return e-t}})},Ember.computed.max=function(e){return Ember.reduceComputed(e,{initialValue:-1/0,addedItem:function(e,t){return Math.max(e,t)},removedItem:function(e,t){return e>t?e:void 0}})},Ember.computed.min=function(e){return Ember.reduceComputed(e,{initialValue:1/0,addedItem:function(e,t){return Math.min(e,t)},removedItem:function(e,t){return t>e?e:void 0}})},Ember.computed.map=function(e,t){var n={addedItem:function(e,n,r){var i=t.call(this,n);return e.insertAt(r.index,i),e},removedItem:function(e,t,n){return e.removeAt(n.index,1),e}};return Ember.arrayComputed(e,n)},Ember.computed.mapBy=function(e,t){var r=function(e){return n(e,t)};return Ember.computed.map(e+".@each."+t,r)},Ember.computed.mapProperty=Ember.computed.mapBy,Ember.computed.filter=function(e,t){var n={initialize:function(e,t,n){n.filteredArrayIndexes=new Ember.SubArray},addedItem:function(e,n,r,i){var s=!!t.call(this,n),o=i.filteredArrayIndexes.addItem(r.index,s);return s&&e.insertAt(o,n),e},removedItem:function(e,t,n,r){var i=r.filteredArrayIndexes.removeItem(n.index);return i>-1&&e.removeAt(i),e}};return Ember.arrayComputed(e,n)},Ember.computed.filterBy=function(e,t,r){var i;return i=2===arguments.length?function(e){return n(e,t)}:function(e){return n(e,t)===r},Ember.computed.filter(e+".@each."+t,i)},Ember.computed.filterProperty=Ember.computed.filterBy,Ember.computed.uniq=function(){var e=s.call(arguments);return e.push({initialize:function(e,t,n){n.itemCounts={}},addedItem:function(e,t,n,i){var s=r(t);return i.itemCounts[s]?++i.itemCounts[s]:i.itemCounts[s]=1,e.addObject(t),e},removedItem:function(e,t,n,i){var s=r(t),o=i.itemCounts;return 0===--o[s]&&e.removeObject(t),e}}),Ember.arrayComputed.apply(null,e)},Ember.computed.union=Ember.computed.uniq,Ember.computed.intersect=function(){var e=function(e){return u(e.property._dependentKeys,function(e){return r(e)})},t=s.call(arguments);return t.push({initialize:function(e,t,n){n.itemCounts={}},addedItem:function(t,n,i,s){var o=r(n),u=(e(i),r(i.arrayChanged)),a=i.property._dependentKeys.length,f=s.itemCounts;return f[o]||(f[o]={}),void 0===f[o][u]&&(f[o][u]=0),1===++f[o][u]&&a===Ember.keys(f[o]).length&&t.addObject(n),t},removedItem:function(t,n,i,s){var o,u=r(n),a=(e(i),r(i.arrayChanged)),f=(i.property._dependentKeys.length,s.itemCounts);return void 0===f[u][a]&&(f[u][a]=0),0===--f[u][a]&&(delete f[u][a],o=Ember.keys(f[u]).length,0===o&&delete f[u],t.removeObject(n)),t}}),Ember.arrayComputed.apply(null,t)},Ember.computed.setDiff=function(e,t){if(2!==arguments.length)throw new Ember.Error("setDiff requires exactly two dependent arrays.");return Ember.arrayComputed(e,t,{addedItem:function(r,i,s){var o=n(this,e),u=n(this,t);return s.arrayChanged===o?u.contains(i)||r.addObject(i):r.removeObject(i),r},removedItem:function(r,i,s){var o=n(this,e),u=n(this,t);return s.arrayChanged===u?o.contains(i)&&r.addObject(i):r.removeObject(i),r}})},t=Ember.ObjectProxy.extend(),Ember.computed.sort=function(r,s){var u,f;return"function"==typeof s?u=function(t,n,r){r.order=s,r.binarySearch=e}:(f=s,u=function(t,i,s){function u(){var e,t,u,c=n(this,f),h=s.sortProperties=[],p=s.sortPropertyAscending={};i.property.clearItemPropertyKeys(r),o(c,function(n){-1!==(t=n.indexOf(":"))?(e=n.substring(0,t),u="desc"!==n.substring(t+1).toLowerCase()):(e=n,u=!0),h.push(e),p[e]=u,i.property.itemPropertyKey(r,e)}),c.addObserver("@each",this,l)}function l(){Ember.run.once(this,c,i.propertyName)}function c(e){u.call(this),i.property.recomputeOnce.call(this,e)}Ember.addObserver(this,f,l),u.call(this),s.order=function(e,t){for(var r,i,s,o=0;o<this.sortProperties.length;++o)if(r=this.sortProperties[o],i=Ember.compare(n(e,r),n(t,r)),0!==i)return s=this.sortPropertyAscending[r],s?i:-1*i;return 0},s.binarySearch=e}),Ember.arrayComputed(r,{initialize:u,addedItem:function(e,t,n,r){var i=r.binarySearch(e,t);return e.insertAt(i,t),e},removedItem:function(e,n,r,s){var o,u,a;return r.previousValues?(o=i({content:n},r.previousValues),a=t.create(o)):a=n,u=s.binarySearch(e,a),e.removeAt(u),e}})}}(),function(){Ember.RSVP=t("rsvp"),Ember.RSVP.onerrorDefault=function(e){if(e instanceof Error)if(Ember.testing){if(!Ember.Test||!Ember.Test.adapter)throw e;Ember.Test.adapter.exception(e)}else Ember.Logger.error(e.stack)},Ember.RSVP.on("error",Ember.RSVP.onerrorDefault)}(),function(){var e=Array.prototype.slice,t=Ember.expandProperties;(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(){for(var e=function(e){n.push(e)},n=[],r=0;r<arguments.length;++r)t(arguments[r],e);return this.__ember_observes__=n,this},Function.prototype.observesImmediately=function(){for(var e=0,t=arguments.length;t>e;e++)arguments[e];return this.observes.apply(this,arguments)},Function.prototype.observesBefore=function(){for(var e=function(e){n.push(e)},n=[],r=0;r<arguments.length;++r)t(arguments[r],e);return this.__ember_observesBefore__=n,this},Function.prototype.on=function(){var t=e.call(arguments);return this.__ember_listens__=t,this})}(),function(){Ember.Comparable=Ember.Mixin.create({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 Ember.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;Ember.set,Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var e=n(this,"length");return 0===e?this:(this.replace(0,e,t),this)},insertAt:function(t,r){if(t>n(this,"length"))throw new Ember.Error(e);return this.replace(t,0,[r]),this},removeAt:function(r,i){if("number"==typeof r){if(0>r||r>=n(this,"length"))throw new Ember.Error(e);void 0===i&&(i=1),this.replace(r,i,t)}return this},pushObject:function(e){return this.insertAt(n(this,"length"),e),e},pushObjects:function(e){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");return this.replace(n(this,"length"),0,e),this},popObject:function(){var e=n(this,"length");if(0===e)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(0===n(this,"length"))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(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=n(this,"length");return this.replace(0,t,e),this},removeObject:function(e){for(var t=n(this,"length")||0;--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;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 n=e(this,t);return void 0===n&&(n=e(Ember.lookup,t)),n}return t}).property("target"),actionContextObject:Ember.computed(function(){var t=e(this,"actionContext");if("string"===Ember.typeOf(t)){var n=e(this,t);return void 0===n&&(n=e(Ember.lookup,t)),n}return t}).property("actionContext"),triggerAction:function(t){function n(e,t){var n=[];return t&&n.push(t),n.concat(e)}t=t||{};var r=t.action||e(this,"action"),i=t.target||e(this,"targetObject"),s=t.actionContext;if("undefined"==typeof s&&(s=e(this,"actionContextObject")||this),i&&r){var o;return o=i.send?i.send.apply(i,n(s,r)):i[r].apply(i,n(s)),o!==!1&&(o=!0),o}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(t=1,n=arguments.length;n>t;t++)r.push(arguments[t]);Ember.sendEvent(this,e,r)},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.configure("async",function(e,t){Ember.run.schedule("actions",t,e,t)}),e.Promise.prototype.fail=function(e,t){return this["catch"](e,t)};var n=Ember.get;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t,r){function i(t){return t===o?e(u):e(t)}var s,o,u;return u=this,s=n(this,"_deferred"),o=s.promise,o.then(e&&i,t,r)},resolve:function(e){var t,r;t=n(this,"_deferred"),r=t.promise,e===this?t.resolve(r):t.resolve(e)},reject:function(e){n(this,"_deferred").reject(e)},_deferred:Ember.computed(function(){return e.defer("Ember: DeferredMixin - "+this)})})}(),function(){var e=Ember.get,t=Ember.typeOf;Ember.ActionHandler=Ember.Mixin.create({mergedProperties:["_actions"],willMergeMixin:function(e){var n;e._actions||("object"===t(e.actions)?n="actions":"object"===t(e.events)&&(n="events"),n&&(e._actions=Ember.merge(e._actions||{},e[n])),delete e[n])},send:function(t){var n,r=[].slice.call(arguments,1);if(this._actions&&this._actions[t]){if(this._actions[t].apply(this,r)!==!0)return}else if(this.deprecatedSend&&this.deprecatedSendHandles&&this.deprecatedSendHandles(t)&&this.deprecatedSend.apply(this,[].slice.call(arguments))!==!0)return;(n=e(this,"target"))&&n.send.apply(n,arguments)}})}(),function(){function e(e,t){return t.then(function(t){return n(e,"isFulfilled",!0),n(e,"content",t),t},function(t){throw n(e,"isRejected",!0),n(e,"reason",t),t},"Ember: PromiseProxy")}function t(e){return function(){var t=r(this,"promise");return t[e].apply(t,arguments)}}var n=Ember.set,r=Ember.get,i=Ember.computed.not,s=Ember.computed.or;Ember.PromiseProxyMixin=Ember.Mixin.create({reason:null,isPending:i("isSettled").readOnly(),isSettled:s("isRejected","isFulfilled").readOnly(),isRejected:!1,isFulfilled:!1,promise:Ember.computed(function(t,n){if(2===arguments.length)return e(this,n);throw new Ember.Error("PromiseProxy's promise must be set")}),then:t("then"),"catch":t("catch"),"finally":t("finally")})}(),function(){function e(e,t,n){this.type=e,this.count=t,this.items=n}function t(e,t,n,r){this.operation=e,this.index=t,this.split=n,this.rangeStart=r}var n=Ember.get,r=Ember.EnumerableUtils.forEach,i="r",s="i",o="d";Ember.TrackedArray=function(t){arguments.length<1&&(t=[]);var r=n(t,"length");this._operations=r?[new e(i,r,t)]:[]},Ember.TrackedArray.RETAIN=i,Ember.TrackedArray.INSERT=s,Ember.TrackedArray.DELETE=o,Ember.TrackedArray.prototype={addItems:function(t,r){var i=n(r,"length");if(!(1>i)){var o,u,a=this._findArrayOperation(t),f=a.operation,l=a.index,c=a.rangeStart;u=new e(s,i,r),f?a.split?(this._split(l,t-c,u),o=l+1):(this._operations.splice(l,0,u),o=l):(this._operations.push(u),o=l),this._composeInsert(o)}},removeItems:function(t,n){if(!(1>n)){var r,i,s=this._findArrayOperation(t),u=(s.operation,s.index),f=s.rangeStart;return r=new e(o,n),s.split?(this._split(u,t-f,r),i=u+1):(this._operations.splice(u,0,r),i=u),this._composeDelete(i)}},apply:function(t){var n=[],s=0;r(this._operations,function(e){t(e.items,s,e.type),e.type!==o&&(s+=e.count,n=n.concat(e.items))}),this._operations=[new e(i,n.length,n)]},_findArrayOperation:function(e){var n,r,i,s,u,f=!1;for(n=s=0,r=this._operations.length;r>n;++n)if(i=this._operations[n],i.type!==o){if(u=s+i.count-1,e===s)break;if(e>s&&u>=e){f=!0;break}s=u+1}return new t(i,n,f,s)},_split:function(t,n,r){var i=this._operations[t],s=i.items.slice(n),o=new e(i.type,s.length,s);i.count=n,i.items=i.items.slice(0,n),this._operations.splice(t+1,0,r,o)},_composeInsert:function(e){var t=this._operations[e],n=this._operations[e-1],r=this._operations[e+1],i=n&&n.type,o=r&&r.type;i===s?(n.count+=t.count,n.items=n.items.concat(t.items),o===s?(n.count+=r.count,n.items=n.items.concat(r.items),this._operations.splice(e,2)):this._operations.splice(e,1)):o===s&&(t.count+=r.count,t.items=t.items.concat(r.items),this._operations.splice(e+1,1))},_composeDelete:function(e){var t,n,r,i=this._operations[e],u=i.count,f=this._operations[e-1],l=f&&f.type,c=!1,h=[];l===o&&(i=f,e-=1);for(var p=e+1;u>0;++p)t=this._operations[p],n=t.type,r=t.count,n!==o?(r>u?(h=h.concat(t.items.splice(0,u)),t.count-=u,p-=1,r=u,u=0):(r===u&&(c=!0),h=h.concat(t.items),u-=r),n===s&&(i.count-=r)):i.count+=r;return i.count>0?this._operations.splice(e+1,p-1-e):this._operations.splice(e,c?2:1),h},toString:function(){var e="";return r(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){function e(e,t){this.type=e,this.count=t}var t=(Ember.get,Ember.EnumerableUtils.forEach),n="r",r="f";Ember.SubArray=function(t){arguments.length<1&&(t=0),this._operations=t>0?[new e(n,t)]:[]},Ember.SubArray.prototype={addItem:function(t,i){var s=-1,o=i?n:r,u=this;return this._findOperation(t,function(r,f,l,c,h){var p,d;o===r.type?++r.count:t===l?u._operations.splice(f,0,new e(o,1)):(p=new e(o,1),d=new e(r.type,c-t+1),r.count=t-l,u._operations.splice(f+1,0,p,d)),i&&(s=r.type===n?h+(t-l):h),u._composeAt(f)},function(t){u._operations.push(new e(o,1)),i&&(s=t),u._composeAt(u._operations.length-1)}),s},removeItem:function(e){var t=-1,r=this;return this._findOperation(e,function(i,s,o,u,a){i.type===n&&(t=a+(e-o)),i.count>1?--i.count:(r._operations.splice(s,1),r._composeAt(s))},function(){throw new Ember.Error("Can't remove an item that has never been added.")}),t},_findOperation:function(e,t,r){var i,s,o,u,a,f=0;for(i=u=0,s=this._operations.length;s>i;u=a+1,++i){if(o=this._operations[i],a=u+o.count-1,e>=u&&a>=e)return t(o,i,u,a,f),void 0;o.type===n&&(f+=o.count)}r(f)},_composeAt:function(e){var t,n=this._operations[e];n&&(e>0&&(t=this._operations[e-1],t.type===n.type&&(n.count+=t.count,this._operations.splice(e-1,1),--e)),e<this._operations.length-1&&(t=this._operations[e+1],t.type===n.type&&(n.count+=t.count,this._operations.splice(e+1,1))))},toString:function(){var e="";return t(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){var e="Index out of range",t=[],n=Ember.get;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("content",function(){this._teardownContent()}),_teardownContent:function(){var e=n(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer("content",function(){n(this,"content"),this._setupContent()}),_setupContent:function(){var e=n(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver("arrangedContent",function(){var e=n(this,"arrangedContent"),t=e?n(e,"length"):0;this.arrangedContentArrayWillChange(this,0,t,void 0),this.arrangedContentWillChange(this),this._teardownArrangedContent(e)}),_arrangedContentDidChange:Ember.observer("arrangedContent",function(){var e=n(this,"arrangedContent"),t=e?n(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)}),_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 Ember.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,o=n(this,"content"),u=n(this,"arrangedContent"),a=[];if(0>r||r>=n(this,"length"))throw new Ember.Error(e);for(void 0===i&&(i=1),s=r;r+i>s;s++)a.push(o.indexOf(u.objectAt(s)));for(a.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),s=0;s<a.length;s++)this._replace(a[s],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(n(this,"content.length"),e),e},pushObjects:function(e){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");return this._replace(n(this,"length"),0,e),this},setObjects:function(e){if(0===e.length)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 e(e,t,n,i,s){var o,u=n._objects;for(u||(u=n._objects={});--s>=i;){var a=e.objectAt(s);a&&(Ember.addBeforeObserver(a,t,n,"contentKeyWillChange"),Ember.addObserver(a,t,n,"contentKeyDidChange"),o=r(a),u[o]||(u[o]=[]),u[o].push(s))}}function t(e,t,n,i,o){var u=n._objects;u||(u=n._objects={});for(var a,f;--o>=i;){var l=e.objectAt(o);l&&(Ember.removeBeforeObserver(l,t,n,"contentKeyWillChange"),Ember.removeObserver(l,t,n,"contentKeyDidChange"),f=r(l),a=u[f],a[s.call(a,o)]=null)}}var n=(Ember.set,Ember.get),r=Ember.guidFor,i=Ember.EnumerableUtils.forEach,s=Ember.ArrayPolyfills.indexOf,o=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 t=this._content.objectAt(e);return t&&n(t,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?n(e,"length"):0})}),u=/^.+:(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,n,r){var i,s,o=this._keys;s=r>0?n+r:-1,Ember.beginPropertyChanges(this);for(i in o)o.hasOwnProperty(i)&&(s>0&&t(e,i,this,n,s),Ember.propertyWillChange(this,i));Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(t,n,r,i){var s,o=this._keys;s=i>0?n+i:-1,Ember.changeProperties(function(){for(var r in o)o.hasOwnProperty(r)&&(s>0&&e(t,r,this,n,s),Ember.propertyDidChange(this,r));Ember.propertyDidChange(this._content,"@each")},this)},didAddListener:function(e){u.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){u.test(e)&&this.stopObservingContentKey(e.slice(0,-7))},beginObservingContentKey:function(t){var r=this._keys;if(r||(r=this._keys={}),r[t])r[t]++;else{r[t]=1;var i=this._content,s=n(i,"length");e(i,t,this,0,s)}},stopObservingContentKey:function(e){var r=this._keys;if(r&&r[e]>0&&--r[e]<=0){var i=this._content,s=n(i,"length");t(i,e,this,0,s)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils._replace),n=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(n,r,i){if(this.isFrozen)throw Ember.FROZEN_ERROR;var s=i?e(i,"length"):0;return this.arrayContentWillChange(n,r,s),0===s?this.splice(n,r):t(this,n,r,i),this.arrayContentDidChange(n,r,s),this},unknownProperty:function(e,t){var n;return void 0!==t&&void 0===n&&(n=this[e]=t),n},indexOf:function(e,t){var n,r=this.length;for(t=void 0===t?0:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=r),n=t;r>n;n++)if(this[n]===e)return n;return-1},lastIndexOf:function(e,t){var n,r=this.length;for(t=void 0===t?r-1:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=r),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 void 0===e&&(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 Ember.Error(Ember.FROZEN_ERROR);var r=e(this,"length");if(0===r)return this;var i;this.enumerableContentWillChange(r,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var s=0;r>s;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;for(;--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 Ember.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 Ember.Error(Ember.FROZEN_ERROR);if(r(i))return this;var s,o=n(i),u=this[o],a=e(this,"length");return u>=0&&a>u&&this[u]===i?this:(s=[i],this.enumerableContentWillChange(null,s),Ember.propertyWillChange(this,"lastObject"),a=e(this,"length"),this[o]=a,this[a]=i,t(this,"length",a+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,s),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);if(r(i))return this;var s,o,u=n(i),a=this[u],f=e(this,"length"),l=0===a,c=a===f-1;return a>=0&&f>a&&this[a]===i&&(o=[i],this.enumerableContentWillChange(o,null),l&&Ember.propertyWillChange(this,"firstObject"),c&&Ember.propertyWillChange(this,"lastObject"),f-1>a&&(s=this[f-1],this[a]=s,this[n(s)]=a),delete this[u],delete this[f-1],t(this,"length",f-1),l&&Ember.propertyDidChange(this,"firstObject"),c&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(o,null)),this},contains:function(e){return this[n(e)]>=0},copy:function(){var r=this.constructor,i=new r,s=e(this,"length");for(t(i,"length",s);--s>=0;)i[s]=this[s],i[n(this[s])]=s;return i},toString:function(){var e,t=this.length,n=[];for(e=0;t>e;e++)n[e]=this[e];return i("Ember.Set<%@>",[n.join(",")])}})}(),function(){var e=Ember.DeferredMixin,t=(Ember.get,Ember.Object.extend(e));t.reopenClass({promise:function(e,n){var r=t.create();return e.call(n,r),r}}),Ember.Deferred=t}(),function(){var e=Ember.ArrayPolyfills.forEach,t=Ember.ENV.EMBER_LOAD_HOOKS||{},n={};Ember.onLoad=function(e,r){var i;t[e]=t[e]||Ember.A(),t[e].pushObject(r),(i=n[e])&&r(i)},Ember.runLoadHooks=function(r,i){n[r]=i,t[r]&&e.call(t[r],function(e){e(i)})}}(),function(){Ember.get,Ember.ControllerMixin=Ember.Mixin.create(Ember.ActionHandler,{isController:!0,target:null,container:null,parentController:null,store:null,model:Ember.computed.alias("content"),deprecatedSendHandles:function(e){return!!this[e]},deprecatedSend:function(e){var t=[].slice.call(arguments,1);this[e].apply(this,t)}}),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,sortFunction:Ember.compare,orderBy:function(n,r){var i=0,s=e(this,"sortProperties"),o=e(this,"sortAscending"),u=e(this,"sortFunction");return t(s,function(t){0===i&&(i=u(e(n,t),e(r,t)),0===i||o||(i=-1*i))}),i},destroy:function(){var n=e(this,"content"),r=e(this,"sortProperties");return n&&r&&t(n,function(e){t(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(){var n=e(this,"content"),r=e(this,"isSorted"),i=e(this,"sortProperties"),s=this;return n&&r?(n=n.slice(),n.sort(function(e,t){return s.orderBy(e,t)}),t(n,function(e){t(i,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(n)):n}),_contentWillChange:Ember.beforeObserver("content",function(){var n=e(this,"content"),r=e(this,"sortProperties");n&&r&&t(n,function(e){t(r,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()}),sortAscendingWillChange:Ember.beforeObserver("sortAscending",function(){this._lastSortAscending=e(this,"sortAscending")}),sortAscendingDidChange:Ember.observer("sortAscending",function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}}),contentArrayWillChange:function(n,r,i,s){var o=e(this,"isSorted");if(o){var u=e(this,"arrangedContent"),a=n.slice(r,r+i),f=e(this,"sortProperties");t(a,function(e){u.removeObject(e),t(f,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(n,r,i,s)},contentArrayDidChange:function(n,r,i,s){var o=e(this,"isSorted"),u=e(this,"sortProperties");if(o){var a=n.slice(r,r+s);t(a,function(e){this.insertItemSorted(e),t(u,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(n,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);(0>o||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),0>o?this._binarySearch(t,i+1,r):o>0?this._binarySearch(t,n,i):i)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach),n=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(){return e(this,"itemController")},objectAtContent:function(t){var n=e(this,"length"),r=e(this,"arrangedContent"),i=r&&r.objectAt(t);if(t>=0&&n>t){var s=this.lookupItemController(i);if(s)return this.controllerAt(t,i,s)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(r,i,s){var o=e(this,"_subControllers"),u=o.slice(r,r+i);t(u,function(e){e&&e.destroy()}),n(o,r,i,new Array(s)),this._super(r,i,s)},init:function(){this._super(),this.set("_subControllers",Ember.A())},content:Ember.computed(function(){return Ember.A()}),_isVirtual:!1,controllerAt:function(t,n,r){var i,s=e(this,"container"),o=e(this,"_subControllers"),u=o[t];if(u)return u;if(i="controller:"+r,!s.has(i))throw new Ember.Error('Could not resolve itemController: "'+r+'"');var a;return this._isVirtual&&(a=e(this,"parentController")),a=a||this,u=s.lookupFactory(i).create({target:this,parentController:a,content:n}),o[t]=u,u},_subControllers:null,_resetSubControllers:function(){var n=e(this,"_subControllers");n&&t(n,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){var e=this&&this.jQuery||Ember.imports&&Ember.imports.jQuery;e||"function"!=typeof n||(e=n("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,n=e.which>1;return!t&&!n}var t="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),n="undefined"!=typeof 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}(),r=function(e,t){if(e.getAttribute("id")===t)return e;var n,i,s,o=e.childNodes.length;for(n=0;o>n;n++)if(i=e.childNodes[n],s=1===i.nodeType&&r(i,t))return s},i=function(e,i){t&&(i="&shy;"+i);var s=[];if(n&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,n,r){return s.push([r,t]),n})),e.innerHTML=i,s.length>0){var o,u=s.length;for(o=0;u>o;o++){var a=r(e,s[o][0]),f=document.createTextNode(s[o][1]);a.parentNode.insertBefore(f,a)}}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))}},s={},o=function(e){if(void 0!==s[e])return s[e];var t=!0;if("select"===e.toLowerCase()){var n=document.createElement("select");i(n,'<option value="test">Test</option>'),t=1===n.options.length}return s[e]=t,t},u=function(e,t){var n=e.tagName;if(o(n))i(e,t);else{var r=e.outerHTML||(new XMLSerializer).serializeToString(e),s=r.match(new RegExp("<"+n+"([^>]*)>","i"))[0],u="</"+n+">",f=document.createElement("div");for(i(f,s+t+u),e=f.firstChild;e.tagName!==n;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:u,isSimpleClick:e}}(),function(){function e(e){return e?r.test(e)?e.replace(i,""):e:e}function t(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},n=function(e){return t[e]||"&amp;"},r=e.toString();return o.test(r)?r.replace(s,n):r}var n=(Ember.get,Ember.set,function(){this.seen={},this.list=[]});n.prototype={add:function(e){e in this.seen||(this.seen[e]=!0,this.list.push(e))},toDOM:function(){return this.list.join(" ")}};var r=/[^a-zA-Z0-9\-]/,i=/[^a-zA-Z0-9\-]/g,s=/&(?!\w+;)|[<>"'`]/g,o=/[&<>"'`]/,u=function(){var e=document.createElement("div"),t=document.createElement("input");return t.setAttribute("name","foo"),e.appendChild(t),!!e.innerHTML.match("foo")}();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.elementClasses=null;var t,n=e.length;for(t=0;n>t;t++)this.addClass(e[t])},id:function(e){return this.elementId=e,this},attr:function(e,t){var n=this.elementAttributes=this.elementAttributes||{};return 1===arguments.length?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 1===arguments.length?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 n=this.currentTagName();if(n){if(this._hasElement&&!this._element&&0===this.buffer.length)return this._element=this.generateElement(),void 0;var r,i,s=this.buffer,o=this.elementId,u=this.classes,a=this.elementAttributes,f=this.elementProperties,l=this.elementStyle;if(s+="<"+e(n),o&&(s+=' id="'+t(o)+'"',this.elementId=null),u&&(s+=' class="'+t(u.join(" "))+'"',this.classes=null,this.elementClasses=null),l){s+=' style="';for(i in l)l.hasOwnProperty(i)&&(s+=i+":"+t(l[i])+";");s+='"',this.elementStyle=null}if(a){for(r in a)a.hasOwnProperty(r)&&(s+=" "+r+'="'+t(a[r])+'"');this.elementAttributes=null}if(f){for(i in f)if(f.hasOwnProperty(i)){var c=f[i];(c||"number"==typeof c)&&(s+=c===!0?" "+i+'="'+i+'"':" "+i+'="'+t(f[i])+'"')}this.elementProperties=null}s+=">",this.buffer=s}},pushClosingTag:function(){var t=this.tagNames.pop();t&&(this.buffer+="</"+e(t)+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var n,r,i,s=this.tagNames.pop(),o=this.elementId,a=this.classes,f=this.elementAttributes,l=this.elementProperties,c=this.elementStyle,h="";i=f&&f.name&&!u?"<"+e(s)+' name="'+t(f.name)+'">':s;var p=document.createElement(i),d=Ember.$(p);if(o&&(d.attr("id",o),this.elementId=null),a&&(d.attr("class",a.join(" ")),this.classes=null,this.elementClasses=null),c){for(r in c)c.hasOwnProperty(r)&&(h+=r+":"+c[r]+";");d.attr("style",h),this.elementStyle=null}if(f){for(n in f)f.hasOwnProperty(n)&&d.attr(n,f[n]);this.elementAttributes=null}if(l){for(r in l)l.hasOwnProperty(r)&&d.prop(r,l[r]);this.elementProperties=null}return p},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}}}(),function(){var e=Ember.get,t=Ember.set;Ember.String.fmt,Ember.EventDispatcher=Ember.Object.extend({events:{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"},rootElement:"body",setup:function(n,r){var i,s=e(this,"events");Ember.$.extend(s,n||{}),Ember.isNone(r)||t(this,"rootElement",r),r=Ember.$(e(this,"rootElement")),r.addClass("ember-application");for(i in s)s.hasOwnProperty(i)&&this.setupHandler(r,i,s[i])},setupHandler:function(e,t,n){var r=this;e.on(t+".ember",".ember-view",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.on(t+".ember","[data-ember-action]",function(e){return Ember.handleErrors(function(){var t=Ember.$(e.currentTarget).attr("data-ember-action"),r=Ember.Handlebars.ActionHelper.registeredActions[t];return r&&r.eventName===n?r.handler(e):void 0},this)})},_findNearestEventManager:function(t,n){for(var r=null;t&&(r=e(t,"eventManager"),!r||!r[n]);)t=e(t,"parentView");return r},_dispatchEvent:function(e,t,n,r){var i=!0,s=e[n];return"function"===Ember.typeOf(s)?(i=Ember.run(function(){return 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).off(".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("model",function(){var n=e(this,"_childContainers");for(var r in n)n.hasOwnProperty(r)&&n[r].destroy();t(this,"_childContainers",{})})})}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var t={},n=Ember.get,r=Ember.set,i=Ember.guidFor,s=Ember.EnumerableUtils.forEach,o=Ember.EnumerableUtils.addObject,u=Ember.meta,a=Ember.computed(function(){var e=this._childViews,t=Ember.A(),r=this;return s(e,function(e){var r;e.isVirtual?(r=n(e,"childViews"))&&t.pushObjects(r):t.push(e)}),t.replace=function(e,t,n){if(r instanceof Ember.ContainerView)return r.replace(e,t,n);throw new Ember.Error("childViews is immutable")},t});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,Ember.ActionHandler,{isView:!0,states:t,init:function(){this._super(),this.transitionTo("preRender")},parentView:Ember.computed(function(){var e=this._parentView;return e&&e.isVirtual?n(e,"parentView"):e}).property("_parentView"),state:null,_parentView:null,concreteView:Ember.computed(function(){return this.isVirtual?n(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){var t=this.tagName;(null===t||void 0===t)&&(t="div");var n=this.buffer=e&&e.begin(t)||Ember.RenderBuffer(t);return this.transitionTo("inBuffer",!1),this.beforeRender(n),this.render(n),this.afterRender(n),n},trigger:function(e){this._super.apply(this,arguments);var t=this[e];if(t){var n,r,i=[];for(n=1,r=arguments.length;r>n;n++)i.push(arguments[n]);return t.apply(this,i)}},deprecatedSendHandles:function(e){return!!this[e]},deprecatedSend:function(e){var t=[].slice.call(arguments,1);this[e].apply(this,t)},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 f=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};f.prototype={length:0,trigger:function(e){for(var t,n=this.views,r=0,i=n.length;i>r;r++)t=n[r],t.trigger&&t.trigger(e)},triggerRecursively:function(e){for(var t=this.views,n=0,r=t.length;r>n;n++)t[n].triggerRecursively(e)},invokeRecursively:function(e){for(var t,n=this.views,r=0,i=n.length;i>r;r++)t=n[r],e(t)},transitionTo:function(e,t){for(var n=this.views,r=0,i=n.length;i>r;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(e){var t=this.views;return s(t,e)},clear:function(){this.length=0,this.views.length=0}};var l=[];Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,template:Ember.computed(function(e,t){if(void 0!==t)return t;var r=n(this,"templateName"),i=this.templateForName(r,"template");return i||n(this,"defaultTemplate")}).property("templateName"),controller:Ember.computed(function(){var e=n(this,"_parentView");return e?n(e,"controller"):null}).property("_parentView"),layout:Ember.computed(function(){var e=n(this,"layoutName"),t=this.templateForName(e,"layout");return t||n(this,"defaultLayout")}).property("layoutName"),_yield:function(e,t){var r=n(this,"template");r&&r(e,t)},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?(r(this,"_context",t),t):n(this,"_context")}).volatile(),_context:Ember.computed(function(){var e,t;return(t=n(this,"controller"))?t:(e=this._parentView,e?n(e,"_context"):null)}),_contextDidChange:Ember.observer("context",function(){this.rerender()}),isVisible:!0,childViews:a,_childViews:l,_childViewsWillChange:Ember.beforeObserver("childViews",function(){if(this.isVirtual){var e=n(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}}),_childViewsDidChange:Ember.observer("childViews",function(){if(this.isVirtual){var e=n(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}}),nearestInstanceOf:function(e){for(var t=n(this,"parentView");t;){if(t instanceof e)return t;t=n(t,"parentView")}},nearestOfType:function(e){for(var t=n(this,"parentView"),r=e instanceof Ember.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};t;){if(r(t))return t;t=n(t,"parentView")}},nearestWithProperty:function(e){for(var t=n(this,"parentView");t;){if(e in t)return t;t=n(t,"parentView")}},nearestChildOf:function(e){for(var t=n(this,"parentView");t;){if(n(t,"parentView")instanceof e)return t;t=n(t,"parentView")}},_parentViewDidChange:Ember.observer("_parentView",function(){this.isDestroying||(this.trigger("parentViewDidChange"),n(this,"parentView.controller")&&!n(this,"controller")&&this.notifyPropertyChange("controller"))}),_controllerDidChange:Ember.observer("controller",function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))}),cloneKeywords:function(){var e=n(this,"templateData"),t=e?Ember.copy(e.keywords):{};return r(t,"view",n(this,"concreteView")),r(t,"_view",this),r(t,"controller",n(this,"controller")),t},render:function(e){var t=n(this,"layout")||n(this,"template");if(t){var r,i=n(this,"context"),s=this.cloneKeywords(),o={view:this,buffer:e,isRenderData:!0,keywords:s,insideGroup:n(this,"templateData.insideGroup")};r=t(i,{data:o}),void 0!==r&&e.push(r)}},rerender:function(){return this.currentState.rerender(this)},clearRenderedChildren:function(){for(var e=this.lengthBeforeRender,t=this.lengthAfterRender,n=this._childViews,r=t-1;r>=e;r--)n[r]&&n[r].destroy()},_applyClassNameBindings:function(e){var t,n,r,i=this.classNames;s(e,function(e){var s,u=Ember.View._parsePropertyPath(e),a=function(){n=this._classStringForProperty(e),t=this.$(),s&&(t.removeClass(s),i.removeObject(s)),n?(t.addClass(n),s=n):s=null};r=this._classStringForProperty(e),r&&(o(i,r),s=r),this.registerObserver(this,u.path,a),this.one("willClearRender",function(){s&&(i.removeObject(s),s=null)})},this)},_applyAttributeBindings:function(e,t){var r,i;s(t,function(t){var s=t.split(":"),o=s[0],u=s[1]||o,a=function(){i=this.$(),r=n(this,o),Ember.View.applyAttributeBindings(i,u,r)};this.registerObserver(this,o,a),r=n(this,o),Ember.View.applyAttributeBindings(e,u,r)},this)},_classStringForProperty:function(e){var t=Ember.View._parsePropertyPath(e),r=t.path,i=n(this,r);return void 0===i&&Ember.isGlobalPath(r)&&(i=n(Ember.lookup,r)),Ember.View._classStringForValue(r,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,n=this._childViews,r=n.length;--r>=0;)t=n[r],e(this,t,r);return this},forEachChildView:function(e){var t=this._childViews;if(!t)return this;var n,r,i=t.length;for(r=0;i>r;r++)n=t[r],e(n);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(n(this,"element"))return this;var e=this.renderToBuffer();return r(this,"element",e.element()),this},willInsertElement:Ember.K,didInsertElement:Ember.K,willClearRender:Ember.K,invokeRecursively:function(e,t){for(var n,r,i,s=t===!1?this._childViews:[this];s.length;){n=s.slice(),s=[];for(var o=0,u=n.length;u>o;o++)r=n[o],i=r._childViews?r._childViews.slice(0):null,e(r),i&&s.push.apply(s,i)}},triggerRecursively:function(e){for(var t,n,r,i=[this];i.length;){t=i.slice(),i=[];for(var s=0,o=t.length;o>s;s++)n=t[s],r=n._childViews?n._childViews.slice(0):null,n.trigger&&n.trigger(e),r&&i.push.apply(i,r)}},viewHierarchyCollection:function(){for(var e,t=new f([this]),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:Ember.K,_notifyWillDestroyElement:function(){var e=this.viewHierarchyCollection();return e.trigger("willClearRender"),e.trigger("willDestroyElement"),e},_elementDidChange:Ember.observer("element",function(){this.forEachChildView(function(e){delete u(e).cache.element})}),parentViewDidChange:Ember.K,instrumentName:"view",instrumentDetails:function(e){e.template=n(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 t=n(this,"classNameBindings");t.length&&this._applyClassNameBindings(t);var r=n(this,"attributeBindings");r.length&&this._applyAttributeBindings(e,r),e.setClasses(this.classNames),e.id(this.elementId);var i=n(this,"ariaRole");i&&e.attr("role",i),n(this,"isVisible")===!1&&e.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:l,attributeBindings:l,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())},appendChild:function(e,t){return this.currentState.appendChild(this,e,t)},removeChild:function(e){if(!this.isDestroying){r(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,r=this._childViews,i=n(this,"parentView"),s=this.viewName;if(this._super()){for(e=r.length,t=e-1;t>=0;t--)r[t].removedFromDOM=!0;for(s&&i&&i.set(s,null),e=r.length,t=e-1;t>=0;t--)r[t].destroy();return this}},createChildView:function(e,t){if(!e)throw new TypeError("createChildViews first argument must exist");if(e.isView&&e._parentView===this&&e.container===this.container)return e;if(t=t||{},t._parentView=this,Ember.CoreView.detect(e))t.templateData=t.templateData||n(this,"templateData"),t.container=this.container,e=e.create(t),e.viewName&&r(n(this,"concreteView"),e.viewName,e);else if("string"==typeof e){var i="view:"+e,s=this.container.lookupFactory(i);t.templateData=n(this,"templateData"),e=s.create(t)}else t.container=this.container,n(e,"templateData")||(t.templateData=n(this,"templateData")),Ember.setProperties(e,t);return e},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer("isVisible",function(){var e=this.$();if(e){var t=n(this,"isVisible");e.toggle(t),this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden())}}),_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(e){var t=n(e,"isVisible");(t||null===t)&&e._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(e){var t=n(e,"isVisible");(t||null===t)&&e._notifyBecameHidden()})},_isAncestorHidden:function(){for(var e=n(this,"parentView");e;){if(n(e,"isVisible")===!1)return!0;e=n(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),"inDOM"===e&&delete Ember.meta(this).cache.element,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){if(r||"function"!=typeof n||(r=n,n=null),e&&"object"==typeof e){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 c={prepend:function(t,n){t.$().prepend(n),e()},after:function(t,n){t.$().after(n),e()},html:function(t,n){t.$().html(n),e()},replace:function(t){var i=n(t,"element");r(t,"element",null),t._insertElementLater(function(){Ember.$(i).replaceWith(n(t,"element")),e()})},remove:function(t){t.$().remove(),e()},empty:function(t){t.$().empty(),e()}};Ember.View.reopen({domManager:c}),Ember.View.reopenClass({_parsePropertyPath:function(e){var t,n,r=e.split(":"),i=r[0],s="";return r.length>1&&(t=r[1],3===r.length&&(n=r[2]),s=":"+t,n&&(s+=":"+n)),{path:i,classNames:s,className:""===t?void 0:t,falsyClassName:n}},_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&&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,n){var r=Ember.typeOf(n);"value"===t||"string"!==r&&("number"!==r||isNaN(n))?"value"===t||"boolean"===r?Ember.isNone(n)||n===!1?(e.removeAttr(t),e.prop(t,"")):n!==e.prop(t)&&e.prop(t,n):n||e.removeAttr(t):n!==e.attr(t)&&e.attr(t,n)},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 n=e.viewHierarchyCollection();n.trigger("willInsertElement"),t.call(e);for(var r=e.get("element");r=r.parentNode;)r===document&&(n.transitionTo("inDOM",!1),n.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(){var e=(Ember.get,Ember.set,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,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(){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,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(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,n,r=e._childViews;if(r)for(t=r.length,n=0;t>n;n++)r[n]._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)}})}(),function(){var e=Ember.View.states.hasElement,t=Ember.View.states.inDOM=Ember.create(e);Ember.merge(t,{enter:function(e){e.isVirtual||(Ember.View.views[e.elementId]=e),e.addBeforeObserver("elementId",function(){throw new Ember.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,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)e.hasOwnProperty(n)&&Ember.merge(t[n],e[n]);return t}}(),function(){function e(e,t,n,r){t.triggerRecursively("willInsertElement"),n?n.domManager.after(n,r.string()):e.domManager.prepend(e,r.string()),t.forEach(function(e){e.transitionTo("inDOM"),e.propertyDidChange("element"),e.triggerRecursively("didInsertElement")})}var t=Ember.View.cloneStates(Ember.View.states),n=Ember.get,r=Ember.set,i=Ember.EnumerableUtils.forEach,s=Ember._ViewCollection;Ember.ContainerView=Ember.View.extend(Ember.MutableArray,{states:t,init:function(){this._super();var e=n(this,"childViews");Ember.defineProperty(this,"childViews",Ember.View.childViewsProperty);var t=this._childViews;i(e,function(e,i){var s;"string"==typeof e?(s=n(this,e),s=this.createChildView(s),r(this,e,s)):s=this.createChildView(e),t[i]=s},this);var s=n(this,"currentView");s&&(t.length||(t=this._childViews=this._childViews.slice()),t.push(this.createChildView(s)))},replace:function(e,t,r){var i=r?n(r,"length"):0;if(this.arrayContentWillChange(e,t,i),this.childViewsWillChange(this._childViews,e,t),0===i)this._childViews.splice(e,t);else{var s=[e,t].concat(r);r.length&&!this._childViews.length&&(this._childViews=this._childViews.slice()),this._childViews.splice.apply(this._childViews,s)}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}).volatile(),render:function(e){this.forEachChildView(function(t){t.renderToBuffer(e)})},instrumentName:"container",childViewsWillChange:function(e,t,n){if(this.propertyWillChange("childViews"),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,t,r,i){if(i>0){var s=e.slice(t,t+i);this.initializeViews(s,this,n(this,"templateData")),this.currentState.childViewsDidChange(this,e,t,i)}this.propertyDidChange("childViews")},initializeViews:function(e,t,s){i(e,function(e){r(e,"_parentView",t),!e.container&&t&&r(e,"container",t.container),n(e,"templateData")||r(e,"templateData",s)})},currentView:null,_currentViewWillChange:Ember.beforeObserver("currentView",function(){var e=n(this,"currentView");e&&e.destroy()}),_currentViewDidChange:Ember.observer("currentView",function(){var e=n(this,"currentView");e&&this.pushObject(e)}),_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 Ember.Error("You cannot modify child views while in the inBuffer state")}}),Ember.merge(t.hasElement,{childViewsWillChange:function(e,t,n,r){for(var i=n;n+r>i;i++)t[i].remove()},childViewsDidChange:function(e){Ember.run.scheduleOnce("render",e,"_ensureChildrenAreInDOM")},ensureChildrenAreInDOM:function(t){var n,r,i,u,a,f=t._childViews,l=new s;for(n=0,r=f.length;r>n;n++)i=f[n],a||(a=Ember.RenderBuffer(),a._hasElement=!1),i.renderToBufferIfNeeded(a)?l.push(i):l.length?(e(t,l,u,a),a=null,u=i,l.clear()):u=i;l.length&&e(t,l,u,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("content",function(){var t=this.get("content");t&&t.removeArrayObserver(this);var n=t?e(t,"length"):0;this.arrayWillChange(t,0,n)}),_contentDidChange:Ember.observer("content",function(){var t=e(this,"content");t&&(this._assertArrayLike(t),t.addArrayObserver(this));var n=t?e(t,"length"):0;this.arrayDidChange(t,0,null,n)}),_assertArrayLike:function(){},destroy:function(){if(this._super()){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,o,u,a=this._childViews;u=this._childViews.length;var f=r===u;for(f&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),o=n+r-1;o>=n;o--)s=a[o],s.destroy()},arrayDidChange:function(n,r,i,s){var o,u,a,f,l,c,h=[];if(f=n?e(n,"length"):0)for(l=e(this,"itemViewClass"),"string"==typeof l&&(l=e(l)||l),a=r;r+s>a;a++)u=n.objectAt(a),o=this.createChildView(l,{content:u,contentIndex:a}),h.push(o);else{if(c=e(this,"emptyView"),!c)return;"string"==typeof c&&(c=e(c)||c),c=this.createChildView(c),h.push(c),t(this,"emptyView",c),Ember.CoreView.detect(c)&&(this._createdEmptyView=c)}this.replace(r,0,h)},createChildView:function(n,r){n=this._super(n,r);var i=e(n,"tagName");return(null===i||void 0===i)&&(i=Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")],t(n,"tagName",i)),n}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){Ember.ComponentTemplateDeprecation=Ember.Mixin.create({willMergeMixin:function(e){this._super.apply(this,arguments);var t,n,r=e.layoutName||e.layout;e.templateName&&!r&&(t="templateName",n="layoutName",e.layoutName=e.templateName,delete e.templateName),e.template&&!r&&(t="template",n="layout",e.layout=e.template,delete e.template)}})}(),function(){var e=Ember.get,t=Ember.set,n=(Ember.isNone,Array.prototype.slice);Ember.Component=Ember.View.extend(Ember.TargetActionSupport,Ember.ComponentTemplateDeprecation,{init:function(){this._super(),t(this,"context",this),t(this,"controller",this)},defaultLayout:function(e,t){Ember.Handlebars.helpers.yield.call(e,t)},template:Ember.computed(function(t,n){if(void 0!==n)return n;var r=e(this,"templateName"),i=this.templateForName(r,"template");return i||e(this,"defaultTemplate")}).property("templateName"),templateName:null,cloneKeywords:function(){return{view:this,controller:this}},_yield:function(t,n){var r=n.data.view,i=this._parentView,s=e(this,"template");s&&r.appendChild(Ember.View,{isVirtual:!0,tagName:"",_contextView:i,template:s,context:e(i,"context"),controller:e(i,"controller"),templateData:{keywords:i.cloneKeywords()}})},targetObject:Ember.computed(function(){var t=e(this,"_parentView");return t?e(t,"controller"):null}).property("_parentView"),sendAction:function(t){var r,i=n.call(arguments,1);r=void 0===t?e(this,"action"):e(this,t),void 0!==r&&this.triggerAction({action:r,actionContext:i})}})}(),function(){Ember.ViewTargetActionSupport=Ember.Mixin.create(Ember.TargetActionSupport,{target:Ember.computed.alias("controller"),actionContext:Ember.computed.alias("context")})}(),function(){e("metamorph",[],function(){var e=function(){},t=0,n=function(){return"undefined"!=typeof MetamorphENV?MetamorphENV.DISABLE_RANGE_API:"undefined"!==ENV?ENV.DISABLE_RANGE_API:!1}(),r=!n&&"undefined"!=typeof document&&"createRange"in document&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,i="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),s=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}(),o=function(n){var r;r=this instanceof o?this: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;if(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>"},r)u=function(e,t){var n=document.createRange(),r=document.getElementById(e.start),i=document.getElementById(e.end);return t?(n.setStartBefore(r),n.setEndAfter(i)):(n.setStartAfter(r),n.setEndBefore(i)),n},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=document.createRange();t.setStart(e),t.collapse(!1);var n=t.createContextualFragment(this.outerHTML());e.appendChild(n)},h=function(e){var t=document.createRange(),n=document.getElementById(this.end);t.setStartAfter(n),t.setEndAfter(n);var r=t.createContextualFragment(e);t.insertNode(r)},p=function(e){var t=document.createRange(),n=document.getElementById(this.start);t.setStartAfter(n),t.setEndAfter(n);var r=t.createContextualFragment(e);t.insertNode(r)};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,r,i,s=e.childNodes.length;for(n=0;s>n;n++)if(r=e.childNodes[n],i=1===r.nodeType&&g(r,t))return i},y=function(e,t){var n=[];if(s&&(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 r,i=n.length;for(r=0;i>r;r++){var o=g(e,n[r][0]),u=document.createTextNode(n[r][1]);o.parentNode.insertBefore(u,o)}}},b=function(e,t){var n=m[e.tagName.toLowerCase()]||m._default,r=n[0],s=n[1],o=n[2];i&&(t="&shy;"+t);var u=document.createElement("div");y(u,s+t+o);for(var a=0;r>=a;a++)u=u.firstChild;if(i){for(var f=u;1===f.nodeType&&!f.nodeName;)f=f.firstChild;3===f.nodeType&&"Â­"===f.nodeValue.charAt(0)&&(f.nodeValue=f.nodeValue.slice(1))}return u},w=function(e){for(;""===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 n,r,i,s=w(document.getElementById(this.start)),o=document.getElementById(this.end),u=o.parentNode;for(E(s,o),n=s.nextSibling;n;){if(r=n.nextSibling,i=n===o){if(!t)break;o=n.nextSibling}if(n.parentNode.removeChild(n),i)break;n=r}for(n=b(s.parentNode,e),t&&s.parentNode.removeChild(s);n;)r=n.nextSibling,u.insertBefore(n,o),n=r},f=function(){var e=w(document.getElementById(this.start)),t=document.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},c=function(e){for(var t,n=b(e,this.outerHTML());n;)t=n.nextSibling,e.appendChild(n),n=t},h=function(e){var t,n,r=document.getElementById(this.end),i=r.nextSibling,s=r.parentNode;for(n=b(s,e);n;)t=n.nextSibling,s.insertBefore(n,i),n=t},p=function(e){var t,n,r=document.getElementById(this.start),i=r.parentNode;n=b(i,e);for(var s=r.nextSibling;n;)t=n.nextSibling,i.insertBefore(n,s),n=t}}return o.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(a.call(this,e),this.innerHTML=e,void 0)},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=document.getElementById(this.start),t=document.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=Ember.imports&&Ember.imports.Handlebars||this&&this.Handlebars;t||"function"!=typeof n||(t=n("handlebars")),Ember.Handlebars=e(t),Ember.Handlebars.helper=function(e,t){Ember.View.detect(t)?Ember.Handlebars.registerHelper(e,Ember.Handlebars.makeViewHelper(t)):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.makeViewHelper=function(e){return function(t){return Ember.Handlebars.helpers.view.call(this,e,t)}},Ember.Handlebars.helpers=e(t.helpers),Ember.Handlebars.Compiler=function(){},t.Compiler&&(Ember.Handlebars.Compiler.prototype=e(t.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},t.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=e(t.JavaScriptCompiler.prototype),Ember.Handlebars.JavaScriptCompiler.prototype.compiler=Ember.Handlebars.JavaScriptCompiler),Ember.Handlebars.JavaScriptCompiler.prototype.namespace="Ember.Handlebars",Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(e){return"data.buffer.push("+e+");"};var r=/helpers\.(.*?)\)/,i=/helpers\['(.*?)'/,s=/(.*blockHelperMissing\.call\(.*)(stack[0-9]+)(,.*)/;Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation=function(e){var t=e[e.length-1],n=(r.exec(t)||i.exec(t))[1],o=s.exec(t);e[e.length-1]=o[1]+"'"+n+"'"+o[3]};var o=Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation,u=Ember.Handlebars.JavaScriptCompiler.prototype.blockValue;Ember.Handlebars.JavaScriptCompiler.prototype.blockValue=function(){u.apply(this,arguments),o(this.source)};var a=Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue;Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue=function(){a.apply(this,arguments),o(this.source)};var f="ember"+ +(new Date),l=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&"control"===e.id.string)e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["controlID",new t.AST.StringNode(f+l++)]);else if(!e.params.length&&!e.hash){var n=new t.AST.IdNode([{part:"_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([n].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,"bind-attr":!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,void 0,!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,void 0,!0),o=Ember.Handlebars.template(s);return o.isMethod=!1,o})}(),function(){function e(e,n,r,i){var s,o,u,a,f,l=[],c=i.hash,h=c.boundOptions,p=t.call(i.types,1);for(f in h)h.hasOwnProperty(f)&&(c[f]=Ember.Handlebars.get(e,h[f],i));for(s=0,o=r.length;o>s;++s)u=r[s],a=p[s],"ID"===a?l.push(Ember.Handlebars.get(u.root,u.path,i)):l.push(u.path);return l.push(i),n.apply(e,l)}var t=Array.prototype.slice,n=Ember.Handlebars.template,r=Ember.Handlebars.normalizePath=function(e,t,n){var r,i,s=n&&n.keywords||{};return r=t.split(".",1)[0],s.hasOwnProperty(r)&&(e=s[r],i=!0,t=t===r?"":t.substr(r.length+1)),{root:e,path:t,isKeyword:i}},i=Ember.Handlebars.get=function(e,t,n){var i,s=n&&n.data,o=r(e,t,s);return e=o.root,t=o.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t)),i};Ember.Handlebars.getEscaped=function(e,t,n){var r=i(e,t,n);return null===r||void 0===r?r="":r instanceof Handlebars.SafeString||(r=String(r)),n.hash.unescaped||(r=Handlebars.Utils.escapeExpression(r)),r},Ember.Handlebars.resolveParams=function(e,t,n){for(var r,s,o=[],u=n.types,a=0,f=t.length;f>a;a++)r=t[a],s=u[a],"ID"===s?o.push(i(e,r,n)):o.push(r);return o},Ember.Handlebars.resolveHash=function(e,t,n){var r,s={},o=n.hashTypes;for(var u in t)t.hasOwnProperty(u)&&(r=o[u],s[u]="ID"===r?i(e,t[u],n):t[u]);return s},Ember.Handlebars.registerHelper("helperMissing",function(e){var n,r="",i=arguments[arguments.length-1],s=Ember.Handlebars.resolveHelper(i.data.view.container,e);if(s)return s.apply(this,t.call(arguments,1));throw n="%@ Handlebars error: Could not find property '%@' on object %@.",i.data&&(r=i.data.view),new Ember.Error(Ember.String.fmt(n,[r,e,this]))}),Ember.Handlebars.registerHelper("blockHelperMissing",function(e){var n=arguments[arguments.length-1],r=Ember.Handlebars.resolveHelper(n.data.view.container,e);return r?r.apply(this,t.call(arguments,1)):Handlebars.helpers.helperMissing.call(this,e)}),Ember.Handlebars.registerBoundHelper=function(e){var n=t.call(arguments,1),r=Ember.Handlebars.makeBoundHelper.apply(this,n);Ember.Handlebars.registerHelper(e,r)},Ember.Handlebars.makeBoundHelper=function(n){function i(){var i,u,a,f,l,c=t.call(arguments,0,-1),h=c.length,p=arguments[arguments.length-1],d=[],v=p.data,m=v.isUnbound?t.call(p.types,1):p.types,g=p.hash,y=v.view,b=p.contexts,w=b&&b.length?b[0]:this,E="",S=Ember._SimpleHandlebarsView.prototype.normalizedValue,x=g.boundOptions={};for(a in g)Ember.IS_BINDING.test(a)&&(x[a.slice(0,-7)]=g[a]);var T=[];for(v.properties=[],i=0;h>i;++i)if(v.properties.push(c[i]),"ID"===m[i]){var N=r(w,c[i],v);d.push(N),T.push(N)}else v.isUnbound?d.push({path:c[i]}):d.push(null);if(v.isUnbound)return e(this,n,d,p);var C=new Ember._SimpleHandlebarsView(null,null,!p.hash.unescaped,p.data);C.normalizedValue=function(){var e,t=[];for(e in x)x.hasOwnProperty(e)&&(l=r(w,x[e],v),C.path=l.path,C.pathRoot=l.root,g[e]=S.call(C));for(i=0;h>i;++i)l=d[i],l?(C.path=l.path,C.pathRoot=l.root,t.push(S.call(C))):t.push(c[i]);return t.push(p),n.apply(w,t)},y.appendChild(C);for(f in x)x.hasOwnProperty(f)&&T.push(r(w,x[f],v));for(i=0,u=T.length;u>i;++i)l=T[i],y.registerObserver(l.root,l.path,C,C.rerender);if("ID"===m[0]&&0!==d.length){var k=d[0],L=k.root,A=k.path;Ember.isEmpty(A)||(E=A+".");for(var O=0,M=s.length;M>O;O++)y.registerObserver(L,E+s[O],C,C.rerender)}}var s=t.call(arguments,1);return i._rawFunction=n,i},Ember.Handlebars.template=function(e){var t=n(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=[],n=e.contexts,r=e.roots,i=e.data,s=0,o=n.length;o>s;s++)t.push(Ember.Handlebars.get(r[s],n[s],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var n=(Ember.set,Ember.get,t("metamorph")),r={remove:function(t){t.morph.remove(),e()},prepend:function(t,n){t.morph.prepend(n),e()},after:function(t,n){t.morph.after(n),e()},html:function(t,n){t.morph.html(n),e()},replace:function(t){var n=t.morph;t.transitionTo("preRender"),Ember.run.schedule("render",this,function(){if(!t.isDestroying){t.clearRenderedChildren();var r=t.renderToBuffer();t.invokeRecursively(function(e){e.propertyWillChange("element")}),t.triggerRecursively("willInsertElement"),n.replaceWith(r.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=n()},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:r}),Ember._MetamorphView=Ember.View.extend(Ember._Metamorph),Ember._SimpleMetamorphView=Ember.CoreView.extend(Ember._Metamorph)}(),function(){function e(e,t,n,r){this.path=e,this.pathRoot=t,this.isEscaped=n,this.templateData=r,this.morph=s(),this.state="preRender",this.updateId=null,this._parentView=null,this.buffer=null}var n=Ember.get,r=Ember.set,i=Ember.Handlebars.get,s=t("metamorph");Ember._SimpleHandlebarsView=e,e.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this._parentView&&this._parentView.removeChild(this),this.morph=null,this.state="destroyed"},propertyWillChange:Ember.K,propertyDidChange:Ember.K,normalizedValue:function(){var e,t,n=this.path,r=this.pathRoot;return""===n?e=r:(t=this.templateData,e=i(r,n,{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"destroyed":break;case"inBuffer":throw new Ember.Error("Something you did tried to replace an {{expression}} before it was inserted into the DOM.");case"hasElement":case"inDOM":this.updateId=Ember.run.scheduleOnce("render",this,"update")}return this},update:function(){this.updateId=null,this.morph.html(this.render())},transitionTo:function(e){this.state=e}};var o=Ember.View.cloneStates(Ember.View.states),u=Ember.merge;u(o._default,{rerenderIfNeeded:Ember.K}),u(o.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"boundHandlebars",states:o,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,r=n(this,"path"),s=n(this,"pathRoot"),o=n(this,"valueNormalizerFunc");return""===r?e=s:(t=n(this,"templateData"),e=i(s,r,{data:t})),o?o(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t=n(this,"isEscaped"),i=n(this,"shouldDisplayFunc"),s=n(this,"preserveContext"),o=n(this,"previousContext"),u=n(this,"_contextController"),a=n(this,"inverseTemplate"),f=n(this,"displayTemplate"),l=this.normalizedValue();if(this._lastNormalizedValue=l,i(l))if(r(this,"template",f),s)r(this,"_context",o);else{if(!f)return null===l||void 0===l?l="":l instanceof Handlebars.SafeString||(l=String(l)),t&&(l=Handlebars.Utils.escapeExpression(l)),e.push(l),void 0;u&&(r(u,"content",l),l=u),r(this,"_context",l)}else a?(r(this,"template",a),s?r(this,"_context",o):r(this,"_context",l)):r(this,"template",function(){return""});return this._super(e)}})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,n,r,i,a){var f,l,c,h=t.data,p=t.fn,d=t.inverse,v=h.view,m=this;if(f=o(m,e,h),"object"==typeof this){if(h.insideGroup){l=function(){Ember.run.once(v,"rerender")};var g,y,b=s(m,e,t);b=i?i(b):b,y=n?m:b,r(b)?g=p:d&&(g=d),g(y,{data:t.data})}else{var w=v.createChildView(Ember._HandlebarsBoundView,{preserveContext:n,shouldDisplayFunc:r,valueNormalizerFunc:i,displayTemplate:p,inverseTemplate:d,path:e,pathRoot:m,previousContext:m,isEscaped:!t.hash.unescaped,templateData:t.data});t.hash.controller&&w.set("_contextController",this.container.lookupFactory("controller:"+t.hash.controller).create({container:m.container,parentController:m,target:m})),v.appendChild(w),l=function(){Ember.run.scheduleOnce("render",w,"rerenderIfNeeded")}}if(""!==f.path&&(v.registerObserver(f.root,f.path,l),a))for(c=0;c<a.length;c++)v.registerObserver(f.root,f.path+"."+a[c],l)}else h.buffer.push(u(m,e,t))}function n(e,t,n){var r,i,s,a,f=n.data,l=f.view;if(r=o(e,t,f),s=r.root,s&&"object"==typeof s){if(f.insideGroup)i=function(){Ember.run.once(l,"rerender")},a=u(e,t,n),f.buffer.push(a);else{var c=new Ember._SimpleHandlebarsView(t,e,!n.hash.unescaped,n.data);c._parentView=l,l.appendChild(c),i=function(){Ember.run.scheduleOnce("render",c,"rerender")}}""!==r.path&&l.registerObserver(r.root,r.path,i)}else a=u(e,t,n),f.buffer.push(a)}function r(e){var t=e&&i(e,"isTruthy");return"boolean"==typeof t?t:Ember.isArray(e)?0!==i(e,"length"):!!e}var i=Ember.get,s=(Ember.set,Ember.String.fmt,Ember.Handlebars.get),o=Ember.Handlebars.normalizePath,u=Ember.Handlebars.getEscaped,a=Ember.ArrayPolyfills.forEach,f=Ember.create,l=Ember.Handlebars,c=l.helpers;l.bind=t,l.registerHelper("_triageMustache",function(e,t){if(c[e])return c[e].call(this,t);var n=Ember.Handlebars.resolveHelper(t.data.view.container,e);return n?n.call(this,t):c.bind.call(this,e,t)}),Ember.Handlebars.resolveHelper=function(e,t){if(e&&-1!==t.indexOf("-")){var n=e.lookup("helper:"+t);if(!n){var r=e.lookup("component-lookup:main"),i=r.lookupFactory(t,e);i&&(n=l.makeViewHelper(i),e.register("helper:"+t,n))}return n}},l.registerHelper("bind",function(r,i){var s=i.contexts&&i.contexts.length?i.contexts[0]:this;return i.fn?t.call(s,r,i,!1,e):n(s,r,i)}),l.registerHelper("boundIf",function(e,n){var i=n.contexts&&n.contexts.length?n.contexts[0]:this;return t.call(i,e,n,!0,r,r,["isTruthy","length"])}),l.registerHelper("unboundIf",function(e,t){var n,i,u=t.contexts&&t.contexts.length?t.contexts[0]:this,a=t.data,f=t.fn,l=t.inverse;n=o(u,e,a),i=s(u,e,t),r(i)||(f=l),f(u,{data:a})}),l.registerHelper("with",function(n,r){if(4===arguments.length){var i,s,u,a,l;r=arguments[3],i=arguments[2],s=arguments[0];var p=f(r);if(p.data=f(r.data),p.data.keywords=f(r.data.keywords||{}),Ember.isGlobalPath(s))l=s;else{a=o(this,s,r.data),s=a.path,u=a.root;var d=Ember.$.expando+Ember.guidFor(u);p.data.keywords[d]=u,l=s?d+"."+s:d}return Ember.bind(p.data.keywords,i,l),t.call(this,s,p,!0,e)}return c.bind.call(r.contexts[0],n,r)}),l.registerHelper("if",function(e,t){return t.data.isUnbound?c.unboundIf.call(t.contexts[0],e,t):c.boundIf.call(t.contexts[0],e,t)}),l.registerHelper("unless",function(e,t){var n=t.fn,r=t.inverse;return t.fn=r,t.inverse=n,t.data.isUnbound?c.unboundIf.call(t.contexts[0],e,t):c.boundIf.call(t.contexts[0],e,t)}),l.registerHelper("bind-attr",function(e){var t=e.hash,n=e.data.view,r=[],i=this,u=++Ember.uuid,f=t["class"];if(null!=f){var c=l.bindClasses(this,f,n,u,e);r.push('class="'+Handlebars.Utils.escapeExpression(c.join(" "))+'"'),delete t["class"]}var h=Ember.keys(t);return a.call(h,function(a){var f,l=t[a];f=o(i,l,e.data);var c,h,p="this"===l?f.root:s(i,l,e),d=Ember.typeOf(p);c=function(){var t=s(i,l,e),r=n.$("[data-bindattr-"+u+"='"+u+"']");return r&&0!==r.length?(Ember.View.applyAttributeBindings(r,a,t),void 0):(Ember.removeObserver(f.root,f.path,h),void 0)},"this"===l||f.isKeyword&&""===f.path||n.registerObserver(f.root,f.path,c),"string"===d||"number"===d&&!isNaN(p)?r.push(a+'="'+Handlebars.Utils.escapeExpression(p)+'"'):p&&"boolean"===d&&r.push(a+'="'+a+'"')},this),r.push("data-bindattr-"+u+'="'+u+'"'),new l.SafeString(r.join(" "))}),l.registerHelper("bindAttr",function(){return l.helpers["bind-attr"].apply(this,arguments)}),l.bindClasses=function(e,t,n,r,i){var u,f,l,c=[],h=function(e,t,n){var r,i=t.path;return r="this"===i?e:""===i?!0:s(e,i,n),Ember.View._classStringForValue(i,r,t.className,t.falsyClassName)};return a.call(t.split(" "),function(t){var s,a,p,d,v=Ember.View._parsePropertyPath(t),g=v.path,y=e;""!==g&&"this"!==g&&(d=o(e,g,i.data),y=d.root,g=d.path),a=function(){u=h(e,v,i),l=r?n.$("[data-bindattr-"+r+"='"+r+"']"):n.$(),l&&0!==l.length?(s&&l.removeClass(s),u?(l.addClass(u),s=u):s=null):Ember.removeObserver(y,g,p)},""!==g&&"this"!==g&&n.registerObserver(y,g,a),f=h(e,v,i),f&&(c.push(f),s=f)}),c}}(),function(){function e(e,n){var r=n.hash,i=n.hashTypes;for(var s in r)if("ID"===i[s]){var o=r[s];Ember.IS_BINDING.test(s)||(r[s+"Binding"]=o,i[s+"Binding"]="STRING",delete r[s],delete i[s])}r.hasOwnProperty("idBinding")&&(r.id=t.get(e,r.idBinding,n),i.id="STRING",delete r.idBinding,delete i.idBinding)}var t=(Ember.get,Ember.set,Ember.Handlebars),n=/^[a-z]/,r=/^view\./;t.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e){var t=e.hash,n=e.data,r={},i=t["class"],s=!1;t.id&&(r.elementId=t.id,s=!0),t.tag&&(r.tagName=t.tag,s=!0),i&&(i=i.split(" "),r.classNames=i,s=!0),t.classBinding&&(r.classNameBindings=t.classBinding.split(" "),s=!0),t.classNameBindings&&(void 0===r.classNameBindings&&(r.classNameBindings=[]),r.classNameBindings=r.classNameBindings.concat(t.classNameBindings.split(" ")),s=!0),t.attributeBindings&&(r.attributeBindings=null,s=!0),s&&(t=Ember.$.extend({},t),delete t.id,delete t.tag,delete t["class"],delete t.classBinding);var o;for(var u in t)t.hasOwnProperty(u)&&Ember.IS_BINDING.test(u)&&"string"==typeof t[u]&&(o=this.contextualizeBindingPath(t[u],n),o&&(t[u]=o));if(r.classNameBindings)for(var a in r.classNameBindings){var f=r.classNameBindings[a];if("string"==typeof f){var l=Ember.View._parsePropertyPath(f);o=this.contextualizeBindingPath(l.path,n),o&&(r.classNameBindings[a]=o+l.classNames)}}return Ember.$.extend(t,r)},contextualizeBindingPath:function(e,t){var n=Ember.Handlebars.normalizePath(null,e,t);return n.isKeyword?"templateData.keywords."+e:Ember.isGlobalPath(e)?null:"this"===e||""===e?"_parentView.context":"_parentView.context."+e},helper:function(i,s,o){var u,a=o.data,f=o.fn;e(i,o),u="string"==typeof s?"STRING"===o.types[0]&&n.test(s)&&!r.test(s)?a.view.container.lookupFactory("view:"+s):t.get(i,s,o):s;var l=this.propertiesFromHTMLOptions(o,i),c=a.view;l.templateData=a;var h=u.proto?u.proto():u;f&&(l.template=f),h.controller||h.controllerBinding||l.controller||l.controllerBinding||(l._context=i),c.appendChild(u,l)}}),t.registerHelper("view",function(e,n){return e&&e.data&&e.data.isRenderData&&(n=e,e="Ember.View"),t.ViewHelper.helper(this,e,n)})}(),function(){var e=Ember.get,t=Ember.Handlebars.get;Ember.String.fmt,Ember.Handlebars.registerHelper("collection",function(n,r){n&&n.data&&n.data.isRenderData&&(r=n,n=void 0);var i,s,o,u=r.fn,a=r.data,f=r.inverse;r.data.view,n?(i=a.keywords.controller,s=i&&i.container,o=t(this,n,r)||s.lookupFactory("view:"+n)):o=Ember.CollectionView;var l,c,h=r.hash,p={},d=o.proto();h.itemView?(i=a.keywords.controller,s=i.container,c=s.lookupFactory("view:"+h.itemView)):c=h.itemViewClass?t(d,h.itemViewClass,r):d.itemViewClass,delete h.itemViewClass,delete h.itemView;for(var v in h)h.hasOwnProperty(v)&&(l=v.match(/^item(.)(.*)$/),l&&"itemController"!==v&&(p[l[1].toLowerCase()+l[2]]=h[v],delete h[v]));u&&(p.template=u,delete r.fn);var m;f&&f!==Ember.Handlebars.VM.noop?(m=e(d,"emptyViewClass"),m=m.extend({template:f,tagName:p.tagName})):h.emptyViewClass&&(m=t(this,h.emptyViewClass,r)),m&&(h.emptyView=m),h.keyword||(p._context=Ember.computed.alias("content"));var g=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:a,hash:p},this);return h.itemViewClass=c.extend(g),Ember.Handlebars.helpers.view.call(this,o,r)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,n){var r,i,s,o=arguments[arguments.length-1];return arguments.length>2?(o.data.isUnbound=!0,r=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helpers.helperMissing,s=r.apply(this,Array.prototype.slice.call(arguments,1)),delete o.data.isUnbound,s):(i=n.contexts&&n.contexts.length?n.contexts[0]:this,e(i,t,n))})}(),function(){var e=(Ember.get,Ember.Handlebars.get),t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(n,r){var i=r.contexts&&r.contexts.length?r.contexts[0]:this,s=t(i,n,r.data),o=s.root,u=s.path,a="this"===u?o:e(o,u,r);Ember.Logger.log(a)}),Ember.Handlebars.registerHelper("debugger",function(){var e=this;Ember.inspect(e)})}(),function(){var e=Ember.get,t=Ember.set;Ember.String.fmt,Ember.Handlebars.EachView=Ember.CollectionView.extend(Ember._Metamorph,{init:function(){var n,r=e(this,"itemController");if(r){var i=e(this,"controller.container").lookupFactory("controller:array").create({_isVirtual:!0,parentController:e(this,"controller"),itemController:r,target:e(this,"controller"),_eachView:this});this.disableContentObservers(function(){t(this,"content",i),n=(new Ember.Binding("content","_eachView.dataSource")).oneWay(),n.connect(i)}),t(this,"_arrayController",i)}else this.disableContentObservers(function(){n=(new Ember.Binding("content","dataSource")).oneWay(),n.connect(this)});return this._super()},_assertArrayLike:function(){},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()){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&&this.content.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},removeArrayObservers:function(){this.content&&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(){if(this.content){var t=this.content,n=e(t,"length"),r=this.options.data,i=this.template;r.insideEach=!0;for(var s=0;n>s;s++)i(t.objectAt(s),{data:r})}},rerenderContainingView:function(){var e=this;Ember.run.scheduleOnce("render",this,function(){e.destroyed||e.containingView.rerender()})},destroy:function(){this.removeContentObservers(),this.content&&this.removeArrayObservers(),this.destroyed=!0}},Ember.Handlebars.registerHelper("each",function(e,t){if(4===arguments.length){var n=arguments[0];t=arguments[3],e=arguments[2],""===e&&(e="this"),t.hash.keyword=n}return 1===arguments.length&&(t=e,e="this"),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(){return Ember.Handlebars.helpers.partial.apply(this,arguments)})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,n){var r=t.split("/"),i=r[r.length-1];r[r.length-1]="_"+i;var s=n.data.view,o=r.join("/"),u=s.templateForName(o),a=!u&&s.templateForName(t);(u=u||a)(e,{data:n.data})}Ember.Handlebars.registerHelper("partial",function(n,r){var i=r.contexts&&r.contexts.length?r.contexts[0]:this;return"ID"===r.types[0]?(r.fn=function(e,r){var i=Ember.Handlebars.get(e,n,r);t(e,i,r)},Ember.Handlebars.bind.call(i,n,r,!0,e)):(t(i,n,r),void 0)})}(),function(){var e=Ember.get;Ember.set,Ember.Handlebars.registerHelper("yield",function(t){for(var n=t.data.view;n&&!e(n,"layout");)n=n._contextView?n._contextView:e(n,"parentView");n._yield(this,t)})}(),function(){Ember.Handlebars.registerHelper("loc",function(e){return Ember.String.loc(e)})}(),function(){var e=Ember.set;Ember.get,Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","indeterminate","disabled","tabindex","name"],type:"checkbox",checked:!1,disabled:!1,indeterminate:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},didInsertElement:function(){this._super(),this.get("element").indeterminate=!!this.get("indeterminate")},_updateElementValue:function(){e(this,"checked",this.$().prop("checked"))}})}(),function(){function e(e,n,r){var i=t(n,e),s=t(n,"onEvent"),o=t(n,"value");(s===e||"keyPress"===s&&"key-press"===e)&&n.sendAction("action",o),n.sendAction(e,o),(i||s===e)&&(t(n,"bubbles")||r.stopPropagation())}var t=Ember.get,n=Ember.set;Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex","readonly"],placeholder:null,disabled:!1,maxlength:null,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)},action:null,onEvent:"enter",bubbles:!1,interpretKeyEvents:function(e){var t=Ember.TextSupport.KEY_EVENTS,n=t[e.keyCode];return this._elementValueDidChange(),n?this[n](e):void 0},_elementValueDidChange:function(){n(this,"value",this.$().val())},insertNewline:function(t){e("enter",this,t),e("insert-newline",this,t)},cancel:function(t){e("escape-press",this,t)},focusIn:function(t){e("focus-in",this,t)},focusOut:function(t){e("focus-out",this,t)},keyPress:function(t){e("key-press",this,t)}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){Ember.get,Ember.set,Ember.TextField=Ember.Component.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern","name","min","max"],value:"",type:"text",size:null,pattern:null,min:null,max:null})}(),function(){var e=Ember.get;Ember.set,Ember.TextArea=Ember.Component.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols","name"],rows:null,cols:null,_updateElementValue:Ember.observer("value",function(){var t=e(this,"value"),n=this.$();n&&t!==n.val()&&n.val(t)}),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.forEach,s=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"),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("parentView.optionLabelPath",function(){var e=t(this,"parentView.optionLabelPath");e&&Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))}),valuePathDidChange:Ember.observer("parentView.optionValuePath",function(){var e=t(this,"parentView.optionValuePath");e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))})}),Ember.SelectOptgroup=Ember.CollectionView.extend({tagName:"optgroup",attributeBindings:["label"],selectionBinding:"parentView.selection",multipleBinding:"parentView.multiple",optionLabelPathBinding:"parentView.optionLabelPath",optionValuePathBinding:"parentView.optionValuePath",itemViewClassBinding:"parentView.optionView"}),Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(e,t,n,r,i){function s(e,t){var r,i="";return t.buffer.push('<option value="">'),r=n._triageMustache.call(e,"view.prompt",{hash:{},hashTypes:{},hashContexts:{},contexts:[e],types:["ID"],data:t}),(r||0===r)&&t.buffer.push(r),t.buffer.push("</option>"),i}function o(e,t){var r;r=n.each.call(e,"view.groupedContent",{hash:{},hashTypes:{},hashContexts:{},inverse:p.noop,fn:p.program(4,u,t),contexts:[e],types:["ID"],data:t}),r||0===r?t.buffer.push(r):t.buffer.push("")}function u(e,t){t.buffer.push(h(n.view.call(e,"view.groupView",{hash:{content:"content",label:"label"},hashTypes:{content:"ID",label:"ID"},hashContexts:{content:e,label:e},contexts:[e],types:["ID"],data:t})))}function a(e,t){var r;r=n.each.call(e,"view.content",{hash:{},hashTypes:{},hashContexts:{},inverse:p.noop,fn:p.program(7,f,t),contexts:[e],types:["ID"],data:t}),r||0===r?t.buffer.push(r):t.buffer.push("")}function f(e,t){t.buffer.push(h(n.view.call(e,"view.optionView",{hash:{content:""},hashTypes:{content:"ID"},hashContexts:{content:e},contexts:[e],types:["ID"],data:t})))}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,Ember.Handlebars.helpers),i=i||{};var l,c="",h=this.escapeExpression,p=this;return l=n["if"].call(t,"view.prompt",{hash:{},hashTypes:{},hashContexts:{},inverse:p.noop,fn:p.program(1,s,i),contexts:[t],types:["ID"],data:i}),(l||0===l)&&i.buffer.push(l),l=n["if"].call(t,"view.optionGroupPath",{hash:{},hashTypes:{},hashContexts:{},inverse:p.program(6,a,i),fn:p.program(3,o,i),contexts:[t],types:["ID"],data:i}),(l||0===l)&&i.buffer.push(l),c}),attributeBindings:["multiple","disabled","tabindex","name"],multiple:!1,disabled:!1,content:null,selection:null,value:Ember.computed(function(e,n){if(2===arguments.length)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",optionGroupPath:null,groupView:Ember.SelectOptgroup,groupedContent:Ember.computed(function(){var e=t(this,"optionGroupPath"),n=Ember.A(),r=t(this,"content")||[];return i(r,function(r){var i=t(r,e);t(n,"lastObject.label")!==i&&n.pushObject({label:i,content:Ember.A()}),t(n,"lastObject.content").push(r)}),n}).property("optionGroupPath","content.@each"),optionView:Ember.SelectOption,_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer("selection.@each",function(){var n=t(this,"selection");if(t(this,"multiple")){if(!o(n))return e(this,"selection",Ember.A([n])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()}),valueDidChange:Ember.observer("value",function(){var e,n=t(this,"content"),r=t(this,"value"),i=t(this,"optionValuePath").replace(/^content\.?/,""),s=i?t(this,"selection."+i):t(this,"selection");r!==s&&(e=n?n.find(function(e){return r===(i?t(e,i):e)}):null,this.set("selection",e))}),_triggerChange:function(){var e=t(this,"selection"),n=t(this,"value");Ember.isNone(e)||this.selectionDidChange(),Ember.isNone(n)||this.valueDidChange(),this._change()},_changeSingle:function(){var n=this.$()[0].selectedIndex,r=t(this,"content"),i=t(this,"prompt");if(r&&t(r,"length")){if(i&&0===n)return e(this,"selection",null),void 0;i&&(n-=1),e(this,"selection",r.objectAt(n))}},_changeMultiple:function(){var n=this.$("option:selected"),r=t(this,"prompt"),i=r?1:0,u=t(this,"content"),f=t(this,"selection");if(u&&n){var l=n.map(function(){return this.index-i}).toArray(),c=u.objectsAt(l);o(f)?s(f,0,t(f,"length"),c):e(this,"selection",c)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(e){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,i=t(this,"content"),s=t(this,"selection"),o=i?r(i,s):[-1],u=t(this,"prompt"),a=u?1:0,f=this.$("option");f&&f.each(function(){e=this.index>-1?this.index-a:-1,this.selected=n(o,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){Ember.Handlebars.registerHelper("input",function(e){var t=e.hash,n=(e.hashTypes,t.type),r=t.on;return delete t.type,delete t.on,"checkbox"===n?Ember.Handlebars.helpers.view.call(this,Ember.Checkbox,e):(n&&(t.type=n),t.onEvent=r||"enter",Ember.Handlebars.helpers.view.call(this,Ember.TextField,e))}),Ember.Handlebars.registerHelper("textarea",function(e){return e.hash,e.hashTypes,Ember.Handlebars.helpers.view.call(this,Ember.TextArea,e)})}(),function(){Ember.ComponentLookup=Ember.Object.extend({lookupFactory:function(e,t){t=t||this.container;var n="component:"+e,r="template:components/"+e,i=t&&t.has(r);i&&t.injection(n,"layout",r);var s=t.lookupFactory(n);return i||s?(s||(t.register(n,Ember.Component),s=t.lookupFactory(n)),s):void 0}})}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}function t(e){e.register("component-lookup:main",Ember.ComponentLookup)}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),n=e.attr("data-template-name")||e.attr("id")||"application",r=t(e.html());if(void 0!==Ember.TEMPLATES[n])throw new Ember.Error('Template named "'+n+'" already exists.');Ember.TEMPLATES[n]=r,e.remove()})},Ember.onLoad("Ember.Application",function(n){n.initializer({name:"domTemplates",initialize:e}),n.initializer({name:"registerComponentLookup",after:"domTemplates",initialize:t})})}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){e("route-recognizer",["exports"],function(e){function t(e){this.string=e}function n(e){this.name=e}function r(e){this.name=e}function i(){}function s(e,s,o){"/"===e.charAt(0)&&(e=e.substr(1));for(var u=e.split("/"),a=[],f=0,l=u.length;l>f;f++){var c,h=u[f];(c=h.match(/^:([^\/]+)$/))?(a.push(new n(c[1])),s.push(c[1]),o.dynamics++):(c=h.match(/^\*([^\/]+)$/))?(a.push(new r(c[1])),s.push(c[1]),o.stars++):""===h?a.push(new i):(a.push(new t(h)),o.statics++)}return a}function o(e){this.charSpec=e,this.nextStates=[]}function u(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?t.types.statics-e.types.statics:0})}function a(e,t){for(var n=[],r=0,i=e.length;i>r;r++){var s=e[r];n=n.concat(s.match(t))}return n}function f(e){this.queryParams=e||{}}function l(e,t,n){for(var r=e.handlers,i=e.regex,s=t.match(i),o=1,u=new f(n),a=0,l=r.length;l>a;a++){for(var c=r[a],h=c.names,p={},d=0,v=h.length;v>d;d++)p[h[d]]=s[o++];u.push({handler:c.handler,params:p,isDynamic:!!h.length})}return u}function c(e,t){return t.eachChar(function(t){e=e.put(t)}),e}function h(e,t,n){this.path=e,this.matcher=t,this.delegate=n}function p(e){this.routes={},this.children={},this.target=e}function d(e,t,n){return function(r,i){var s=e+r;return i?(i(d(s,t,n)),void 0):new h(e+r,t,n)}}function v(e,t,n){for(var r=0,i=0,s=e.length;s>i;i++)r+=e[i].path.length;t=t.substr(r);var o={path:t,handler:n};e.push(o)}function m(e,t,n,r){var i=t.routes;for(var s in i)if(i.hasOwnProperty(s)){var o=e.slice();v(o,s,i[s]),t.children[s]?m(o,t.children[s],n,r):n.call(r,o)}}var g=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],y=new RegExp("(\\"+g.join("|\\")+")","g");t.prototype={eachChar:function(e){for(var t,n=this.string,r=0,i=n.length;i>r;r++)t=n.charAt(r),e({validChars:t})},regex:function(){return this.string.replace(y,"\\$1")},generate:function(){return this.string}},n.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]}},i.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},o.prototype={get:function(e){for(var t=this.nextStates,n=0,r=t.length;r>n;n++){var i=t[n],s=i.charSpec.validChars===e.validChars;if(s=s&&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,n,r,i=this.nextStates,s=[],o=0,u=i.length;u>o;o++)t=i[o],n=t.charSpec,"undefined"!=typeof (r=n.validChars)?-1!==r.indexOf(e)&&s.push(t):"undefined"!=typeof (r=n.invalidChars)&&-1===r.indexOf(e)&&s.push(t);return s}};var b=Object.create||function(e){function t(){}return t.prototype=e,new t};f.prototype=b({splice:Array.prototype.splice,slice:Array.prototype.slice,push:Array.prototype.push,length:0,queryParams:null});var w=function(){this.rootState=new o,this.names={}};w.prototype={add:function(e,t){for(var n,r=this.rootState,o="^",u={statics:0,dynamics:0,stars:0},a=[],f=[],l=!0,h=0,p=e.length;p>h;h++){var d=e[h],v=[],m=s(d.path,v,u);f=f.concat(m);for(var g=0,y=m.length;y>g;g++){var b=m[g];b instanceof i||(l=!1,r=r.put({validChars:"/"}),o+="/",r=c(r,b),o+=b.regex())}var w={handler:d.handler,names:v};a.push(w)}l&&(r=r.put({validChars:"/"}),o+="/"),r.handlers=a,r.regex=new RegExp(o+"$"),r.types=u,(n=t&&t.as)&&(this.names[n]={segments:f,handlers:a})},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;i>r;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);for(var s=n.segments,o=0,u=s.length;u>o;o++){var a=s[o];a instanceof i||(r+="/",r+=a.generate(t))}return"/"!==r.charAt(0)&&(r="/"+r),t&&t.queryParams&&(r+=this.generateQueryString(t.queryParams,n.handlers)),r},generateQueryString:function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(r===!1||null==r)continue;var i=n;if(Array.isArray(r))for(var s=0,o=r.length;o>s;s++){var u=n+"[]="+encodeURIComponent(r[s]);t.push(u)}else r!==!0?(i+="="+encodeURIComponent(r),t.push(i)):t.push(i)}return 0===t.length?"":"?"+t.join("&")},parseQueryString:function(e){for(var t=e.split("&"),n={},r=0;r<t.length;r++){var i,s=t[r].split("="),o=decodeURIComponent(s[0]),u=o.length,a=!1;1===s.length?i=!0:(u>2&&"[]"===o.slice(u-2)&&(a=!0,o=o.slice(0,u-2),n[o]||(n[o]=[])),i=s[1]?decodeURIComponent(s[1]):""),a?n[o].push(i):n[o]=i}return n},recognize:function(e){var t,n,r,i,s=[this.rootState],o={},f=!1;if(i=e.indexOf("?"),-1!==i){var c=e.substr(i+1,e.length);e=e.substr(0,i),o=this.parseQueryString(c)}for("/"!==e.charAt(0)&&(e="/"+e),t=e.length,t>1&&"/"===e.charAt(t-1)&&(e=e.substr(0,t-1),f=!0),n=0,r=e.length;r>n&&(s=a(s,e.charAt(n)),s.length);n++);var h=[];for(n=0,r=s.length;r>n;n++)s[n].handlers&&h.push(s[n]);s=u(h);var p=h[0];return p&&p.handlers?(f&&"(.+)$"===p.regex.source.slice(-5)&&(e+="/"),l(p,e,o)):void 0}},e["default"]=w,h.prototype={to:function(e,t){var n=this.delegate;if(n&&n.willAddRoute&&(e=n.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)}return this}},p.prototype={add:function(e,t){this.routes[e]=t},addChild:function(e,t,n,r){var i=new p(t);this.children[e]=i;var s=d(e,i,r);r&&r.contextEntered&&r.contextEntered(t,s),n(s)}},w.prototype.map=function(e,t){var n=new p;e(d("",n,this.delegate)),m([],n,function(e){t?t(this,e):this.add(e)},this)}})}(),function(){e("router/handler-info",["./utils","rsvp","exports"],function(e,t,n){function r(e){e&&f(this,e)}function i(e){r.call(this,e)}function s(e){r.call(this,e),this.params=this.params||{}}function o(e){r.call(this,e)}function u(e,t){if(!e^!t)return!1;if(!e)return!0;for(var n in e)if(e.hasOwnProperty(n)&&e[n]!==t[n])return!1;return!0}var a=e.bind,f=e.merge,l=e.oCreate,c=e.serialize,h=t.resolve;r.prototype={name:null,handler:null,params:null,context:null,log:function(e,t){e.log&&e.log(this.name+": "+t)},resolve:function(e,t,n){var r=a(this.checkForAbort,this,t),i=a(this.runBeforeModelHook,this,e,n),s=a(this.getModel,this,e,n),o=a(this.runAfterModelHook,this,e,n),u=a(this.becomeResolved,this,n);return h().then(r).then(i).then(r).then(s).then(r).then(o).then(r).then(u)},runBeforeModelHook:function(e,t){return t.trigger&&t.trigger(!0,"willResolveModel",t,this.handler),this.runSharedModelHook(e,t,"beforeModel",[])},runAfterModelHook:function(e,t,n){var r=this.name;return this.stashResolvedModel(t,n),this.runSharedModelHook(e,t,"afterModel",[n]).then(function(){return t.resolvedModels[r]})},runSharedModelHook:function(e,t,n,r){this.log(t,"calling "+n+" hook"),this.queryParams&&r.push(this.queryParams),r.push(t);var i=this.handler;return e(function(){return i[n]&&i[n].apply(i,r)})},getModel:function(){throw new Error("This should be overridden by a subclass of HandlerInfo")},checkForAbort:function(e,t){return h(e()).then(function(){return t})},stashResolvedModel:function(e,t){e.resolvedModels=e.resolvedModels||{},e.resolvedModels[this.name]=t},becomeResolved:function(e,t){var n=this.params||c(this.handler,t,this.names);return e&&(this.stashResolvedModel(e,t),e.params=e.params||{},e.params[this.name]=n),new i({context:t,name:this.name,handler:this.handler,params:n})},shouldSupercede:function(e){if(!e)return!0;var t=e.context===this.context;return e.name!==this.name||this.hasOwnProperty("context")&&!t||this.hasOwnProperty("params")&&!u(this.params,e.params)}},i.prototype=l(r.prototype),i.prototype.resolve=function(e,t,n){return n&&n.resolvedModels&&(n.resolvedModels[this.name]=this.context),h(this)},s.prototype=l(r.prototype),s.prototype.getModel=function(e,t){var n=this.params;t&&t.queryParams&&(n={},f(n,this.params),n.queryParams=t.queryParams);var r="function"==typeof this.handler.deserialize?"deserialize":"model";return this.runSharedModelHook(e,t,r,[n])},o.prototype=l(r.prototype),o.prototype.getModel=function(e,t){return this.log(t,this.name+": resolving provided model"),h(this.context)},n.HandlerInfo=r,n.ResolvedHandlerInfo=i,n.UnresolvedHandlerInfoByParam=s,n.UnresolvedHandlerInfoByObject=o}),e("router/router",["route-recognizer","rsvp","./utils","./transition-state","./transition","./transition-intent/named-transition-intent","./transition-intent/url-transition-intent","exports"],function(e,t,n,r,i,s,o,u){function a(){this.recognizer=new g,this.reset()}function f(e,t,n){var r=c(e.state,t);x(r.exited,function(e){var t=e.handler;delete t.context,t.exit&&t.exit()});var i=e.oldState=e.state;e.state=t;var s=e.currentHandlerInfos=r.unchanged.slice();try{x(r.updatedContext,function(e){return l(s,e,!1,n)}),x(r.entered,function(e){return l(s,e,!0,n)})}catch(o){throw e.state=i,e.currentHandlerInfos=i.handlerInfos,o}e.state.queryParams=m(e,s,t.queryParams)}function l(e,t,n,r){var i=t.handler,s=t.context;if(n&&i.enter&&i.enter(r),r&&r.isAborted)throw new M;if(i.context=s,i.contextDidChange&&i.contextDidChange(),i.setup&&i.setup(s,r),r&&r.isAborted)throw new M;return e.push(t),!0}function c(e,t){var n,r,i,s,o,u=e.handlerInfos,a=t.handlerInfos,f={updatedContext:[],exited:[],entered:[],unchanged:[]};for(s=0,o=a.length;o>s;s++){var l=u[s],c=a[s];l&&l.handler===c.handler||(n=!0),n?(f.entered.push(c),l&&f.exited.unshift(l)):r||l.context!==c.context||i?(r=!0,f.updatedContext.push(c)):f.unchanged.push(l)}for(s=a.length,o=u.length;o>s;s++)f.exited.unshift(u[s]);return f}function h(e,t,n){var r=e.urlMethod;if(r){for(var i=e.router,s=t.handlerInfos,o=s[s.length-1].name,u={},a=s.length-1;a>=0;--a){var f=s[a];T(u,f.params),f.handler.inaccessibleByURL&&(r=null)}if(r){u.queryParams=t.queryParams;var l=i.recognizer.generate(o,u);"replaceQuery"===r?l!==n&&i.replaceURL(l):"replace"===r?i.replaceURL(l):i.updateURL(l)}}}function p(e,t){try{E(e.router,e.sequence,"Resolved all models on destination route; finalizing transition.");var n=e.router,r=t.handlerInfos;return e.sequence,f(n,t,e),e.isAborted?(n.state.handlerInfos=n.currentHandlerInfos,y(A(e))):(h(e,t,e.intent.url),e.isActive=!1,n.activeTransition=null,w(n,n.currentHandlerInfos,!0,["didTransition"]),n.didTransition&&n.didTransition(n.currentHandlerInfos),E(n,e.sequence,"TRANSITION COMPLETE."),r[r.length-1].handler)}catch(i){if(!(i instanceof M)){var s=e.state.handlerInfos;e.trigger(!0,"error",i,e,s[s.length-1]),e.abort()}throw i}}function d(e,t,n){var r=t[0]||"/",i=t[t.length-1],s={};i&&i.hasOwnProperty("queryParams")&&(s=P.call(t).queryParams);var o;if(0===t.length){E(e,"Updating query params");var u=e.state.handlerInfos;o=new _({name:u[u.length-1].name,contexts:[],queryParams:s})}else"/"===r.charAt(0)?(E(e,"Attempting URL transition to "+r),o=new D({url:r})):(E(e,"Attempting transition to "+r),o=new _({name:t[0],contexts:S.call(t,1),queryParams:s}));return e.transitionByIntent(o,n)}function v(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;r>n;++n)if(e[n]!==t[n])return!1;return!0}function m(e,t,n){var r=[];w(e,t,!0,["finalizeQueryParamChange",n,r]);for(var i={},s=0,o=r.length;o>s;++s){var u=r[s];i[u.key]=u.value}return i}var g=e["default"],y=(t.resolve,t.reject),b=(t.async,t.Promise),w=n.trigger,E=n.log,S=n.slice,x=n.forEach,T=n.merge,N=n.serialize,C=n.extractQueryParams,k=n.getChangelist,L=r.TransitionState,A=i.logAbort,O=i.Transition,M=i.TransitionAborted,_=s.NamedTransitionIntent,D=o.URLTransitionIntent,P=Array.prototype.pop;a.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)},transitionByIntent:function(e,t){var n,r=!!this.activeTransition,i=r?this.activeTransition.state:this.state,s=this;try{var o=e.applyToState(i,this.recognizer,this.getHandler,t);if(v(o.handlerInfos,i.handlerInfos)){var u=k(i.queryParams,o.queryParams);return u?(this._changedQueryParams=u.changed,w(this,o.handlerInfos,!0,["queryParamsDidChange",u.changed,u.all,u.removed]),this._changedQueryParams=null,!r&&this.activeTransition?this.activeTransition:(i.queryParams=m(this,o.handlerInfos,o.queryParams),n=new O(this),n.urlMethod="replace",n.promise=n.promise.then(function(e){return h(n,i,!0),s.didTransition&&s.didTransition(s.currentHandlerInfos),e}),n)):new O(this)}return t?(f(this,o),void 0):(n=new O(this,e,o),this.activeTransition&&this.activeTransition.abort(),this.activeTransition=n,n.promise=n.promise.then(function(e){return s.async(function(){return p(n,e.state)})}),r||w(this,this.state.handlerInfos,!0,["willTransition",n]),n)}catch(a){return new O(this,e,null,a)}},reset:function(){this.state&&x(this.state.handlerInfos,function(e){var t=e.handler;t.exit&&t.exit()}),this.state=new L,this.currentHandlerInfos=null},activeTransition:null,handleURL:function(e){var t=S.call(arguments);return"/"!==e.charAt(0)&&(t[0]="/"+e),d(this,t).method("replaceQuery")},updateURL:function(){throw new Error("updateURL is not implemented")},replaceURL:function(e){this.updateURL(e)},transitionTo:function(){return d(this,arguments)},intermediateTransitionTo:function(){d(this,arguments,!0)},refresh:function(e){for(var t=this.activeTransition?this.activeTransition.state:this.state,n=t.handlerInfos,r={},i=0,s=n.length;s>i;++i){var o=n[i];r[o.name]=o.params||{}}E(this,"Starting a refresh transition");var u=new _({name:n[n.length-1].name,pivotHandler:e||n[0].handler,contexts:[],queryParams:this._changedQueryParams||t.queryParams||{}});return this.transitionByIntent(u,!1)},replaceWith:function(){return d(this,arguments).method("replace")},generate:function(e){for(var t=C(S.call(arguments,1)),n=t[0],r=t[1],i=new _({name:e,contexts:n}),s=i.applyToState(this.state,this.recognizer,this.getHandler),o={},u=0,a=s.handlerInfos.length;a>u;++u){var f=s.handlerInfos[u],l=f.params||N(f.handler,f.context,f.names);T(o,l)}return o.queryParams=r,this.recognizer.generate(e,o)},isActive:function(e){var t,n,r=C(S.call(arguments,1)),i=r[0],s=r[1],o=this.state.queryParams,u=this.state.handlerInfos;if(!u.length)return!1;var a=u[u.length-1].name,f=this.recognizer.handlersFor(a),l=0;for(n=f.length;n>l&&(t=u[l],t.name!==e);++l);if(l===f.length)return!1;var c=new L;c.handlerInfos=u.slice(0,l+1),f=f.slice(0,l+1);var h=new _({name:a,contexts:i}),p=h.applyToHandlers(c,f,this.getHandler,a,!0,!0);return v(p.handlerInfos,c.handlerInfos)&&!k(o,s)},trigger:function(){var e=S.call(arguments);w(this,this.currentHandlerInfos,!1,e)},async:function(e){return new b(function(t){t(e())})},log:null},u.Router=a}),e("router/transition-intent",["./utils","exports"],function(e,t){function n(e){e&&r(this,e),this.data=this.data||{}}var r=e.merge;n.prototype.applyToState=function(e){return e},t.TransitionIntent=n}),e("router/transition-intent/named-transition-intent",["../transition-intent","../transition-state","../handler-info","../utils","exports"],function(e,t,n,r,i){function s(e){o.call(this,e)}var o=e.TransitionIntent,u=t.TransitionState,a=n.UnresolvedHandlerInfoByParam,f=n.UnresolvedHandlerInfoByObject,l=r.isParam,c=r.forEach,h=r.extractQueryParams,p=r.oCreate,d=r.merge;s.prototype=p(o.prototype),s.prototype.applyToState=function(e,t,n,r){var i=h([this.name].concat(this.contexts)),s=i[0],o=(i[1],t.handlersFor(s[0])),u=o[o.length-1].handler;return this.applyToHandlers(e,o,n,u,r)},s.prototype.applyToHandlers=function(e,t,n,r,i,s){var o,a=new u,f=this.contexts.slice(0),l=t.length,c=[];if(this.pivotHandler)for(o=0;o<t.length;++o)if(n(t[o].handler)===this.pivotHandler){l=o;break}!this.pivotHandler;for(o=t.length-1;o>=0;--o){var h=t[o],p=h.handler,v=n(p),m=e.handlerInfos[o],g=null;if(h.names.length>0?g=o>=l?this.createParamHandlerInfo(p,v,h.names,f,m):this.getHandlerInfoForDynamicSegment(p,v,h.names,f,m,r):(g=this.createParamHandlerInfo(p,v,h.names,f,m),c.unshift(o)),s){g=g.becomeResolved(null,g.context);var y=m&&m.context;h.names.length>0&&g.context===y&&(g.params=m&&m.params),g.context=y}var b=m;(o>=l||g.shouldSupercede(m))&&(l=Math.min(o,l),b=g),i&&!s&&(b=b.becomeResolved(null,b.context)),a.handlerInfos.unshift(b)}if(f.length>0)throw new Error("More context objects were passed than there are dynamic segments for the route: "+r);return i||this.invalidateNonDynamicHandlers(a.handlerInfos,c,l),d(a.queryParams,e.queryParams),d(a.queryParams,this.queryParams||{}),a},s.prototype.invalidateNonDynamicHandlers=function(e,t,n){c(t,function(t){if(t>=n){var r=e[t];e[t]=new a({name:r.name,handler:r.handler,params:{}})}})},s.prototype.getHandlerInfoForDynamicSegment=function(e,t,n,r,i){var s;return n.length,r.length>0?(s=r[r.length-1],l(s)?this.createParamHandlerInfo(e,t,n,r,i):(r.pop(),new f({name:e,handler:t,context:s,names:n}))):i&&i.name===e?i:i},s.prototype.createParamHandlerInfo=function(e,t,n,r,i){for(var s={},o=n.length;o--;){var u=i&&e===i.name&&i.params||{},f=r[r.length-1],c=n[o];if(l(f))s[c]=""+r.pop();else{if(!u.hasOwnProperty(c))throw new Error("You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route "+e);s[c]=u[c]}}return new a({name:e,handler:t,params:s})},i.NamedTransitionIntent=s}),e("router/transition-intent/url-transition-intent",["../transition-intent","../transition-state","../handler-info","../utils","exports"],function(e,t,n,r,i){function s(e){u.call(this,e)}function o(e){this.message=e||"UnrecognizedURLError",this.name="UnrecognizedURLError"}var u=e.TransitionIntent,a=t.TransitionState,f=n.UnresolvedHandlerInfoByParam,l=r.oCreate,c=r.merge;s.prototype=l(u.prototype),s.prototype.applyToState=function(e,t,n){var r,i,s=new a,u=t.recognize(this.url);if(!u)throw new o(this.url);var l=!1;for(r=0,i=u.length;i>r;++r){var p=u[r],d=p.handler,v=n(d);if(v.inaccessibleByURL)throw new o(this.url);var m=new f({name:d,handler:v,params:p.params}),g=e.handlerInfos[r];l||m.shouldSupercede(g)?(l=!0,s.handlerInfos[r]=m):s.handlerInfos[r]=g}return c(s.queryParams,u.queryParams),s},i.URLTransitionIntent=s}),e("router/transition-state",["./handler-info","./utils","rsvp","exports"],function(e,t,n,r){function i(){this.handlerInfos=[],this.queryParams={},this.params={}}var s=(e.ResolvedHandlerInfo,t.forEach),o=n.resolve;i.prototype={handlerInfos:null,queryParams:null,params:null,resolve:function(e,t,n){function r(){return o(t())["catch"](function(e){throw h=!0,e})}function i(e){throw{error:e,handlerWithError:c.handlerInfos[n.resolveIndex].handler,wasAborted:h,state:c}}function u(e){c.handlerInfos[n.resolveIndex++]=e;var t=e.handler;return t&&t.redirect&&t.redirect(e.context,n),r().then(f)}function f(){if(n.resolveIndex===c.handlerInfos.length)return{error:null,state:c};var t=c.handlerInfos[n.resolveIndex];return t.resolve(e,r,n).then(u)}var l=this.params;s(this.handlerInfos,function(e){l[e.name]=e.params||{}}),n=n||{},n.resolveIndex=0;var c=this,h=!1;return o().then(f)["catch"](i)}},r.TransitionState=i}),e("router/transition",["rsvp","./handler-info","./utils","exports"],function(e,t,n,r){function i(e,t,n,r){function o(){return l.isAborted?u():void 0}var l=this;if(this.state=n||e.state,this.intent=t,this.router=e,this.data=this.intent&&this.intent.data||{},this.resolvedModels={},this.queryParams={},r)return this.promise=u(r),void 0;if(n){this.params=n.params,this.queryParams=n.queryParams;var c=n.handlerInfos.length;c&&(this.targetName=n.handlerInfos[n.handlerInfos.length-1].name);for(var h=0;c>h;++h){var p=n.handlerInfos[h];if(!(p instanceof f))break;this.pivotHandler=p.handler}this.sequence=i.currentSequence++,this.promise=n.resolve(e.async,o,this)["catch"](function(e){throw e.wasAborted?s(l):(l.trigger("error",e.error,l,e.handlerWithError),l.abort(),e.error)})}else this.promise=a(this.state),this.params={}}function s(e){return h(e.router,e.sequence,"detected abort."),new o}function o(e){this.message=e||"TransitionAborted",this.name="TransitionAborted"}var u=e.reject,a=e.resolve,f=t.ResolvedHandlerInfo,l=n.trigger,c=n.slice,h=n.log;i.currentSequence=0,i.prototype={targetName:null,urlMethod:"update",intent:null,params:null,pivotHandler:null,resolveIndex:0,handlerInfos:null,resolvedModels:null,isActive:!0,state:null,promise:null,data:null,then:function(e,t){return this.promise.then(e,t)},abort:function(){return this.isAborted?this:(h(this.router,this.sequence,this.targetName+": transition was aborted"),this.isAborted=!0,this.isActive=!1,this.router.activeTransition=null,this)},retry:function(){return this.abort(),this.router.transitionByIntent(this.intent,!1)},method:function(e){return this.urlMethod=e,this},trigger:function(e){var t=c.call(arguments);"boolean"==typeof e?t.shift():e=!1,l(this.router,this.state.handlerInfos.slice(0,this.resolveIndex+1),e,t)},followRedirects:function(){var e=this.router;return this.promise["catch"](function(t){if(e.activeTransition)return e.activeTransition.followRedirects();throw t})},toString:function(){return"Transition (sequence "+this.sequence+")"},log:function(e){h(this.router,this.sequence,e)}},i.prototype.send=i.prototype.trigger,r.Transition=i,r.logAbort=s,r.TransitionAborted=o}),e("router/utils",["exports"],function(e){function t(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function n(e){var t,n,r=e&&e.length;return r&&r>0&&e[r-1]&&e[r-1].hasOwnProperty("queryParams")?(n=e[r-1].queryParams,t=l.call(e,0,r-1),[t,n]):[e,null]}function r(e,t,n){e.log&&(3===arguments.length?e.log("Transition #"+t+": "+n):(n=t,e.log(n)))}function i(e,t){var n=arguments;return function(r){var i=l.call(n,2);return i.push(r),e.apply(t,i)}}function s(e){return"string"==typeof e||e instanceof String||"number"==typeof e||e instanceof Number}function o(e,t){for(var n=0,r=e.length;r>n&&!1!==t(e[n]);n++);}function u(e,t,n){var r={};if(s(t))return r[n[0]]=t,r;if(e.serialize)return e.serialize(t,n);if(1===n.length){var i=n[0];return r[i]=/_id$/.test(i)?t.id:t,r}}function a(e,t,n,r){if(e.triggerEvent)return e.triggerEvent(t,n,r),void 0;var i=r.shift();if(!t){if(n)return;throw new Error("Could not trigger event '"+i+"'. There are no active handlers")}for(var s=!1,o=t.length-1;o>=0;o--){var u=t[o],a=u.handler;if(a.events&&a.events[i]){if(a.events[i].apply(a,r)!==!0)return;s=!0}}if(!s&&!n)throw new Error("Nothing handled the event '"+i+"'.")}function f(e,n){var r,i={all:{},changed:{},removed:{}};t(i.all,n);var s=!1;for(r in e)e.hasOwnProperty(r)&&(n.hasOwnProperty(r)||(s=!0,i.removed[r]=e[r]));for(r in n)n.hasOwnProperty(r)&&e[r]!==n[r]&&(i.changed[r]=n[r],s=!0);return s&&i}var l=Array.prototype.slice,c=Object.create||function(e){function t(){}return t.prototype=e,new t};e.trigger=a,e.log=r,e.oCreate=c,e.merge=t,e.extractQueryParams=n,e.bind=i,e.isParam=s,e.forEach=o,e.slice=l,e.serialize=u,e.getChangelist=f}),e("router",["./router/router","exports"],function(e,t){var n=e.Router;t.Router=n})}(),function(){function e(e){this.parent=e,this.matches=[]}function t(e,t,n){n=n||{},"string"!=typeof n.path&&(n.path="/"+t),e.parent&&"application"!==e.parent&&(t=e.parent+"."+t),e.push(n.path,t,null,n.queryParams)}e.prototype={resource:function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r={}),1===arguments.length&&(r={}),"string"!=typeof r.path&&(r.path="/"+n),i){var s=new e(n);t(s,"loading"),t(s,"error",{path:"/_unused_dummy_error_path_route_"+n+"/:error"}),i.call(s),this.push(r.path,n,s.generate(),r.queryParams)}else this.push(r.path,n,null,r.queryParams)},push:function(e,t,n,r){var i=t.split(".");(""===e||"/"===e||"index"===i[i.length-1])&&(this.explicitIndex=!0),this.matches.push([e,t,n,r])},route:function(e,n){t(this,e,n)},generate:function(){var e=this.matches;return this.explicitIndex||this.route("index",{path:"/"}),function(t){for(var n=0,r=e.length;r>n;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(){var e=Ember.get;Ember.controllerFor=function(e,t,n){return e.lookup("controller:"+t,n)},Ember.generateControllerFactory=function(e,t,n){var r,i,s,o;return o=n&&Ember.isArray(n)?"array":n?"object":"basic",s="controller:"+o,r=e.lookupFactory(s).extend({isGenerated:!0,toString:function(){return"(generated "+t+" controller)"}}),i="controller:"+t,e.register(i,r),r},Ember.generateController=function(t,n,r){Ember.generateControllerFactory(t,n,r);var i="controller:"+n,s=t.lookup(i);return e(s,"namespace.LOG_ACTIVE_GENERATION"),s}}(),function(){function e(e,t){var n=e.controllerName||e.routeName,r=e.controllerFor(n,!0);r&&r.queryParams&&p(r.queryParams,function(e){var r,i=e.split(":");r=i.length>1?i[1]:"application"!==n?n+"["+e+"]":e;var s=n+":"+e;t.queryParams[s]=r,t.translations[i[0]]=s})}function n(e,t,n){for(var r=t.state.handlerInfos,i=!1,s=r.length-1;s>=0;--s){var o=r[s],u=o.handler;if(i){if(n(u,r[s+1].handler)!==!0)return!1}else e===u&&(i=!0)}return!0}function r(e,t,n){var r,s=e.router,o=(t.routeName.split(".").pop(),"application"===e.routeName?"":e.routeName+".");return r=o+n,i(s,r)?r:void 0}function i(e,t){var n=e.container;return e.hasRoute(t)&&(n.has("template:"+t)||n.has("route:"+t))}function s(e,t,n){var r=n.shift();if(!e){if(t)return;throw new Ember.Error("Can't trigger action '"+r+"' because your app hasn't finished transitioning into its first route. To trigger an action on destination routes during a transition, you can call `.send()` on the `Transition` object passed to the `model/beforeModel/afterModel` hooks.")}for(var i=!1,s=e.length-1;s>=0;s--){var o=e[s],u=o.handler;if(u._actions&&u._actions[r]){if(u._actions[r].apply(u,n)!==!0)return;i=!0}}if(v[r])return v[r].apply(null,n),void 0;if(!i&&!t)throw new Ember.Error("Nothing handled the action '"+r+"'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.")}function o(e){var t=e.container.lookup("controller:application");if(t){var n=e.router.currentHandlerInfos,r=Ember.Router._routePath(n);"currentPath"in t||c(t,"currentPath"),l(t,"currentPath",r),"currentRouteName"in t||c(t,"currentRouteName"),l(t,"currentRouteName",n[n.length-1].name)}}var u=t("router"),a=u.Router,f=(u.Transition,Ember.get),l=Ember.set,c=(Ember.String.fmt,Ember.defineProperty),h=Array.prototype.slice,p=Ember.EnumerableUtils.forEach,d=Ember._MetamorphView;Ember.Router=Ember.Object.extend(Ember.Evented,{location:"hash",init:function(){this.router=this.constructor.router||this.constructor.map(Ember.K),this._activeViews={},this._setupLocation(),f(this,"namespace.LOG_TRANSITIONS_INTERNAL")&&(this.router.log=Ember.Logger.debug)},url:Ember.computed(function(){return f(this,"location").getURL()}),startRouting:function(){this.router=this.router||this.constructor.map(Ember.K);var e=this.router,t=f(this,"location"),n=this.container,r=this,i=f(this,"initialURL");this._setupRouter(e,t),n.register("view:default",d),n.register("view:toplevel",Ember.View.extend()),t.onUpdateURL(function(e){r.handleURL(e)}),"undefined"==typeof i&&(i=t.getURL()),this.handleURL(i)},didTransition:function(e){o(this),this._cancelLoadingEvent(),this.notifyPropertyChange("url"),Ember.run.once(this,this.trigger,"didTransition"),f(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Transitioned into '"+Ember.Router._routePath(e)+"'")},handleURL:function(e){return this._doTransition("handleURL",[e])},transitionTo:function(){return this._doTransition("transitionTo",arguments)},intermediateTransitionTo:function(){this.router.intermediateTransitionTo.apply(this.router,arguments),o(this);var e=this.router.currentHandlerInfos;f(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Intermediate-transitioned into '"+Ember.Router._routePath(e)+"'")},replaceWith:function(){return this._doTransition("replaceWith",arguments)},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)},reset:function(){this.router.reset()},_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)},_setupLocation:function(){var e=f(this,"location"),t=f(this,"rootURL");if("string"==typeof e&&this.container){var n=this.container.lookup("location:"+e);if("undefined"!=typeof n)e=l(this,"location",n);else{var r={implementation:e};e=l(this,"location",Ember.Location.create(r))}}"string"==typeof t&&(e.rootURL=t),"function"==typeof e.initState&&e.initState()},_getHandlerFunction:function(){var e={},t=this.container,n=t.lookupFactory("route:basic"),r=this;return function(i){var s="route:"+i,o=t.lookup(s);return e[i]?o:(e[i]=!0,o||(t.register(s,n.extend()),o=t.lookup(s),f(r,"namespace.LOG_ACTIVE_GENERATION")),o.routeName=i,o)}},_setupRouter:function(e,t){var n,r=this;e.getHandler=this._getHandlerFunction();var i=function(){t.setURL(n)};if(e.updateURL=function(e){n=e,Ember.run.once(i)},t.replaceURL){var s=function(){t.replaceURL(n)};e.replaceURL=function(e){n=e,Ember.run.once(s)}}e.didTransition=function(e){r.didTransition(e)}},_doTransition:function(e,t){t=h.call(t),t[0]=t[0]||"/";var n,r,i=t[0],s=!1;if(s||"/"===i.charAt(0)||(n=this.router.hasRoute(i)?i:t[0]=i+".index"),r){if(!n){var o=this.router.activeTransition?this.router.activeTransition.state.handlerInfos:this.router.state.handlerInfos;n=o[o.length-1].name,t.unshift(n)}var u=this._queryParamNamesFor(n);Ember.Router._translateQueryParams(r,u.translations,n);for(var a in r)if(a in u.queryParams){var f=r[a];delete r[a],r[u.queryParams[a]]=f}}var l=this.router[e].apply(this.router,t);return l.then(null,function(e){"UnrecognizedURLError"===e.name},"Ember: Check for Router unrecognized URL error"),l},_scheduleLoadingEvent:function(e,t){this._cancelLoadingEvent(),this._loadingStateTimer=Ember.run.scheduleOnce("routerTransitions",this,"_fireLoadingEvent",e,t)},_fireLoadingEvent:function(e,t){this.router.activeTransition&&e.trigger(!0,"loading",e,t)},_cancelLoadingEvent:function(){this._loadingStateTimer&&Ember.run.cancel(this._loadingStateTimer),this._loadingStateTimer=null},_queryParamNamesFor:function(t){t=this.router.hasRoute(t)?t:t+".index";var n=this.router.recognizer.handlersFor(t),r={queryParams:Ember.create(null),translations:Ember.create(null)},i=this.router;return p(n,function(t){var n=i.getHandler(t.handler);e(n,r)}),r},_queryParamNamesForSingle:function(t){var n={queryParams:Ember.create(null),translations:Ember.create(null)},r=this.router.getHandler(t);return e(r,n),n},_queryParamOverrides:function(e,t,n){for(var r in t){var i=r.split(":"),s=this.container.lookup("controller:"+i[0]);e[t[r]]=f(s,i[1]),n&&n(r,t[r],r)}}});var v={willResolveModel:function(e,t){t.router._scheduleLoadingEvent(e,t)},error:function(e,t,s){var o=s.router,u=n(s,t,function(t,n){var i=r(t,n,"error");return i?(o.intermediateTransitionTo(i,e),void 0):!0});return u?i(s.router,"application_error")?(o.intermediateTransitionTo("application_error",e),void 0):(Ember.Logger.error("Error while loading route: "+e.stack),void 0):void 0},loading:function(e,t){var s=t.router,o=n(t,e,function(t,n){var i=r(t,n,"loading");return i?(s.intermediateTransitionTo(i),void 0):e.pivotHandler!==t?!0:void 0});return o&&i(t.router,"application_loading")?(s.intermediateTransitionTo("application_loading"),void 0):void 0}};Ember.Router.reopenClass({router:null,map:function(e){var t=this.router;t||(t=new a,t.callbacks=[],t.triggerEvent=s,this.reopenClass({router:t}));var n=Ember.RouterDSL.map(function(){this.resource("application",{path:"/"},function(){for(var n=0;n<t.callbacks.length;n++)t.callbacks[n].call(this);e.call(this)})});return t.callbacks.push(e),t.map(n.generate()),t},_routePath:function(e){function t(e,t){for(var n=0,r=e.length;r>n;++n)if(e[n]!==t[n])return!1;return!0}for(var n=[],r=1,i=e.length;i>r;r++){for(var s=e[r].name,o=s.split("."),u=h.call(n);u.length&&!t(u,o);)u.shift();n.push.apply(n,o.slice(u.length))}return n.join(".")},_translateQueryParams:function(e,t){for(var n in e)e.hasOwnProperty(n)&&n in t&&(e[t[n]]=e[n],delete e[n])}})}(),function(){function e(e){var t=e.router.router.state.handlerInfos;if(t)for(var n,r,i=0,s=t.length;s>i;i++){if(r=t[i].handler,r===e)return n;n=r}}function t(n){var r,i=e(n);if(i)return(r=i.lastRenderedTemplate)?r:t(i)}function n(e,n,r,i){i=i||{},i.into=i.into?i.into.replace(/\//g,"."):t(e),i.outlet=i.outlet||"main",i.name=n,i.template=r,i.LOG_VIEW_LOOKUPS=u(e.router,"namespace.LOG_VIEW_LOOKUPS");var s,o=i.controller;if(o=i.controller?i.controller:(s=e.container.lookup("controller:"+n))?s:e.controllerName||e.routeName,"string"==typeof o){var a=o;if(o=e.container.lookup("controller:"+a),!o)throw new Ember.Error("You passed `controller: '"+a+"'` into the `render` method, but no such controller could be found.")}return i.controller=o,i}function r(e,t,n){if(e)n.LOG_VIEW_LOOKUPS;else{var r=n.into?"view:default":"view:toplevel";e=t.lookup(r),n.LOG_VIEW_LOOKUPS}return u(e,"templateName")||(a(e,"template",n.template),a(e,"_debugTemplateName",n.name)),a(e,"renderedName",n.name),a(e,"controller",n.controller),e}function i(e,t,n){if(n.into){var r=e.router._lookupActiveView(n.into),i=o(r,n.outlet);e.teardownOutletViews||(e.teardownOutletViews=[]),c(e.teardownOutletViews,0,0,[i]),r.connectOutlet(n.outlet,t)}else{var a=u(e,"router.namespace.rootElement");e.teardownTopLevelView&&e.teardownTopLevelView(),e.router._connectActiveView(n.name,t),e.teardownTopLevelView=s(t),t.appendTo(a)}}function s(e){return function(){e.destroy()}}function o(e,t){return function(){e.disconnectOutlet(t)}}var u=Ember.get,a=Ember.set,f=Ember.getProperties,l=(Ember.String.classify,Ember.String.fmt,Ember.EnumerableUtils.forEach),c=Ember.EnumerableUtils.replace;Ember.Route=Ember.Object.extend(Ember.ActionHandler,{exit:function(){this.deactivate(),this.teardownViews()},enter:function(){this.activate()},viewName:null,templateName:null,controllerName:null,_actions:{finalizeQueryParamChange:function(){}},events:null,mergedProperties:["events"],deactivate:Ember.K,activate:Ember.K,transitionTo:function(){var e=this.router;return e.transitionTo.apply(e,arguments)},intermediateTransitionTo:function(){var e=this.router;e.intermediateTransitionTo.apply(e,arguments)},refresh:function(){return this.router.router.refresh(this).method("replace")},replaceWith:function(){var e=this.router;return e.replaceWith.apply(e,arguments)},send:function(){return this.router.send.apply(this.router,arguments)},setup:function(e){var t=this.controllerName||this.routeName,n=this.controllerFor(t,!0);n||(n=this.generateController(t,e)),this.controller=n,this.setupControllers?this.setupControllers(n,e):this.setupController(n,e),this.renderTemplates?this.renderTemplates(e):this.renderTemplate(n,e)},beforeModel:Ember.K,afterModel:Ember.K,redirect:Ember.K,contextDidChange:function(){this.currentModel=this.context},model:function(e){var t,n,r,i;for(var s in e)"queryParams"!==s&&((t=s.match(/^(.*)_id$/))&&(n=t[1],i=e[s]),r=!0);if(!n&&r)return e;if(n)return this.findModel(n,i)},deserialize:function(e,t){return this.model(e,t)},findModel:function(){var e=u(this,"store");return e.find.apply(e,arguments)},store:Ember.computed(function(){var e=this.container;return this.routeName,u(this,"router.namespace"),{find:function(t,n){var r=e.lookupFactory("model:"+t);if(r)return r.find(n)}}}),serialize:function(e,t){if(!(t.length<1)&&e){var n=t[0],r={};return/_id$/.test(n)&&1===t.length?r[n]=u(e,"id"):r=f(e,t),r}},setupController:function(e,t){e&&void 0!==t&&a(e,"model",t)},controllerFor:function(e){var t,n=this.container,r=n.lookup("route:"+e);return r&&r.controllerName&&(e=r.controllerName),t=n.lookup("controller:"+e)},generateController:function(e,t){var n=this.container;return t=t||this.modelFor(e),Ember.generateController(n,e,t)},modelFor:function(e){var t=this.container.lookup("route:"+e),n=this.router.router.activeTransition;if(n){var r=t&&t.routeName||e;if(n.resolvedModels.hasOwnProperty(r))return n.resolvedModels[r]}return t&&t.currentModel},renderTemplate:function(){this.render()},render:function(e,t){"object"!=typeof e||t||(t=e,e=this.routeName),t=t||{};var s;e?(e=e.replace(/\//g,"."),s=e):(e=this.routeName,s=this.templateName||e);var o=t.view||this.viewName||e,a=this.container,f=a.lookup("view:"+o),l=f?f.get("template"):null;return l||(l=a.lookup("template:"+s)),f||l?(t=n(this,e,l,t),f=r(f,a,t),"main"===t.outlet&&(this.lastRenderedTemplate=e),i(this,f,t),void 0):(u(this.router,"namespace.LOG_VIEW_LOOKUPS"),void 0)},disconnectOutlet:function(e){e=e||{},e.parentView=e.parentView?e.parentView.replace(/\//g,"."):t(this),e.outlet=e.outlet||"main";var n=this.router._lookupActiveView(e.parentView);n&&n.disconnectOutlet(e.outlet)},willDestroy:function(){this.teardownViews()},teardownViews:function(){this.teardownTopLevelView&&this.teardownTopLevelView();var e=this.teardownOutletViews||[];l(e,function(e){e()}),delete this.teardownTopLevelView,delete this.teardownOutletViews,delete this.lastRenderedTemplate}})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,n,i){return r.call(t(e,n,i),function(t,r){return null===t?n[r]:s(e,t,i)})}function t(e,t,s){function o(e,t){return"controller"===t?t:Ember.ControllerMixin.detect(e)?o(i(e,"model"),t?t+".model":"model"):t}var u=n(e,t,s),a=s.types;return r.call(u,function(e,n){return"ID"===a[n]?o(e,t[n]):null})}var n=Ember.Handlebars.resolveParams,r=Ember.ArrayPolyfills.map,i=Ember.get,s=Ember.Handlebars.get;Ember.Router.resolveParams=e,Ember.Router.resolvePaths=t})}(),function(){var e=Ember.get,t=(Ember.set,Ember.String.fmt,Array.prototype.slice);Ember.onLoad("Ember.Handlebars",function(){function n(e,t){var n;return e.hasRoute(t)||(n=t+".index",t=n),t}function r(e){var t=e.options.types,n=e.options.data;return u(e.context,e.params,{types:t,data:n})}var i=Ember.Object.extend({values:null}),s=Ember.Router.resolveParams,o=Ember.Router._translateQueryParams,u=Ember.Router.resolvePaths,a=Ember.ViewUtils.isSimpleClick,f=Ember.LinkView=Ember.View.extend({tagName:"a",currentWhen:null,title:null,rel:null,activeClass:"active",loadingClass:"loading",disabledClass:"disabled",_isDisabled:!1,replace:!1,attributeBindings:["href","title","rel"],classNameBindings:["active","loading","disabled"],eventName:"click",init:function(){this._super.apply(this,arguments);var t=e(this,"eventName");this.on(t,this,this._invoke)},_paramsChanged:function(){this.notifyPropertyChange("resolvedParams")},_setupPathObservers:function(){var e,t,n,i=this.parameters,s=i.options.linkTextPath,o=r(i),u=o.length;for(s&&(n=Ember.Handlebars.normalizePath(i.context,s,i.options.data),this.registerObserver(n.root,n.path,this,this.rerender)),t=0;u>t;t++)e=o[t],null!==e&&(n=Ember.Handlebars.normalizePath(i.context,e,i.options.data),this.registerObserver(n.root,n.path,this,this._paramsChanged));var a=this.queryParamsObject;if(a){var f=a.values;for(var l in f)f.hasOwnProperty(l)&&"ID"===a.types[l]&&(n=Ember.Handlebars.normalizePath(i.context,f[l],i.options.data),this.registerObserver(n.root,n.path,this,this._paramsChanged))}},afterRender:function(){this._super.apply(this,arguments),this._setupPathObservers()},concreteView:Ember.computed(function(){return e(this,"parentView")}).property("parentView"),disabled:Ember.computed(function(t,n){return void 0!==n&&this.set("_isDisabled",n),n?e(this,"disabledClass"):!1}),active:Ember.computed(function(){if(e(this,"loading"))return!1;var t=e(this,"router"),n=e(this,"routeArgs"),r=n.slice(1),i=e(this,"resolvedParams"),s=this.currentWhen||i[0],o=s+".index",u=t.isActive.apply(t,[s].concat(r))||t.isActive.apply(t,[o].concat(r));return u?e(this,"activeClass"):void 0}).property("resolvedParams","routeArgs"),loading:Ember.computed(function(){return e(this,"routeArgs")?void 0:e(this,"loadingClass")}).property("routeArgs"),router:Ember.computed(function(){return e(this,"controller").container.lookup("router:main")}),_invoke:function(t){if(!a(t))return!0;if(this.preventDefault!==!1&&t.preventDefault(),this.bubbles===!1&&t.stopPropagation(),e(this,"_isDisabled"))return!1;if(e(this,"loading"))return Ember.Logger.warn("This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid."),!1;var n=e(this,"router"),r=e(this,"routeArgs");e(this,"replace")?n.replaceWith.apply(n,r):n.transitionTo.apply(n,r)},resolvedParams:Ember.computed(function(){var t=this.parameters,n=t.options,r=n.types,i=n.data;if(0===t.params.length){var o=this.container.lookup("controller:application");return[e(o,"currentRouteName")]}return s(t.context,t.params,{types:r,data:i})}).property("router.url"),routeArgs:Ember.computed(function(){var t=e(this,"resolvedParams").slice(0),r=e(this,"router"),i=t[0];if(i){i=n(r,i),t[0]=i;for(var s=1,o=t.length;o>s;++s){var u=t[s];if(null===u||"undefined"==typeof u)return}return t}}).property("resolvedParams","queryParams"),queryParamsObject:null,queryParams:Ember.computed(function(){var t=e(this,"queryParamsObject"),n={};t&&Ember.merge(n,t.values);var r=e(this,"resolvedParams"),i=e(this,"router"),s=r[0],u=i._queryParamNamesFor(s),a=u.queryParams,f=u.translations,l={};o(n,f,s);var c=this.parameters;return i._queryParamOverrides(l,a,function(e,r){if(e in n){var i,s=e.split(":"),o=t.types[s[1]];if("ID"===o){var u=Ember.Handlebars.normalizePath(c.context,n[e],c.options.data);i=Ember.Handlebars.get(u.root,u.path,c.options)}else i=n[e];delete n[e],l[r]=i}}),l}).property("resolvedParams.[]"),href:Ember.computed(function(){if("a"===e(this,"tagName")){var t=e(this,"router"),n=e(this,"routeArgs");return n?t.generate.apply(t,n):e(this,"loadingHref")}}).property("routeArgs"),loadingHref:"#"});f.toString=function(){return"LinkView"},Ember.Handlebars.registerHelper("link-to",function(){var e=t.call(arguments,-1)[0],n=t.call(arguments,0,-1),r=e.hash;if(n[n.length-1]instanceof i&&(r.queryParamsObject=n.pop()),r.disabledBinding=r.disabledWhen,!e.fn){var s=n.shift(),o=e.types.shift(),u=this;"ID"===o?(e.linkTextPath=s,e.fn=function(){return Ember.Handlebars.getEscaped(u,s,e)}):e.fn=function(){return s}}return r.parameters={context:this,options:e,params:n},Ember.Handlebars.helpers.view.call(this,f,e)}),Ember.Handlebars.registerHelper("linkTo",function(){return Ember.Handlebars.helpers["link-to"].apply(this,arguments)})})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,n){var r,i,s,o,u;for(t&&t.data&&t.data.isRenderData&&(n=t,t="main"),i=n.data.view.container,r=n.data.view;!r.get("template.isTop");)r=r.get("_parentView");return s=n.hash.view,s&&(u="view:"+s),o=s?i.lookupFactory(u):n.hash.viewClass||e.OutletView,n.data.view.set("outletSource",r),n.hash.currentViewBinding="_view.outletSource._outlets."+t,e.helpers.view.call(this,o,n)})})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(){Ember.Handlebars.registerHelper("render",function(e,t,n){var r,i,s,o,u,a=arguments.length;if(r=(n||t).data.keywords.controller.container,i=r.lookup("router:main"),2===a)n=t,t=void 0;else{if(3!==a)throw Ember.Error("You must pass a templateName to render");u=Ember.Handlebars.get(n.contexts[1],t,n)}e=e.replace(/\//g,"."),o=r.lookup("view:"+e)||r.lookup("view:default");var f=n.hash.controller||e,l="controller:"+f;n.hash.controller;var c=n.data.keywords.controller;if(a>2){var h=r.lookupFactory(l)||Ember.generateControllerFactory(r,f,u);s=h.create({model:u,parentController:c,target:c})}else s=r.lookup(l)||Ember.generateController(r,f),s.setProperties({target:c,parentController:c});var p=n.contexts[1];p&&o.registerObserver(p,t,function(){s.set("model",Ember.Handlebars.get(p,t,n))}),n.hash.viewName=Ember.String.camelize(e);var d="template:"+e;n.hash.template=r.lookup(d),n.hash.controller=s,i&&!u&&i._connectActiveView(e,o),Ember.Handlebars.helpers.view.call(this,o,n)})})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(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.ArrayPolyfills.forEach,u=(Ember.get,Array.prototype.slice),a=r.ActionHelper={registeredActions:{}},f=["alt","shift","meta","ctrl"],l=/^click|mouse|touch/,c=function(e,t){if("undefined"==typeof t){if(l.test(e.type))return n(e);t=""}if(t.indexOf("any")>=0)return!0;var r=!0;return o.call(f,function(n){e[n+"Key"]&&-1===t.indexOf(n)&&(r=!1)}),r};a.registerAction=function(t,n,r){var s=(++Ember.uuid).toString();return a.registeredActions[s]={eventName:n.eventName,handler:function(s){if(!c(s,r))return!0;n.preventDefault!==!1&&s.preventDefault(),n.bubbles===!1&&s.stopPropagation();var o=n.target;o=o.target?i(o.root,o.target,o.options):o.root,n.boundProperty,Ember.run(function(){o.send?o.send.apply(o,e(n.parameters,t)):o[t].apply(o,e(n.parameters))})}},n.view.on("willClearRender",function(){delete a.registeredActions[s]}),s},r.registerHelper("action",function(e){var t,n=arguments[arguments.length-1],r=u.call(arguments,1,-1),i=n.hash,o={eventName:i.on||"click"};o.parameters={context:this,options:n,params:r},o.view=n.data.view;var f,l;i.target?(f=this,l=i.target):(t=n.data.keywords.controller)&&(f=t),o.target={root:f,target:l,options:n},o.bubbles=i.bubbles,o.preventDefault=i.preventDefault,o.boundProperty="ID"===n.types[0];var c=a.registerAction(e,o,i.allowedKeys);return new s('data-ember-action="'+c+'"')})})}(),function(){var e=Ember.get;Ember.set,Ember.EnumerableUtils.map,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){if(this._pendingDisconnections&&delete this._pendingDisconnections[n],this._hasEquivalentView(n,r))return r.destroy(),void 0;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)},_hasEquivalentView:function(t,n){var r=e(this,"_outlets."+t);return r&&r.constructor===n.constructor&&r.get("template")===n.get("template")&&r.get("context")===n.get("context")},disconnectOutlet:function(e){this._pendingDisconnections||(this._pendingDisconnections={}),this._pendingDisconnections[e]=!0,Ember.run.once(this,"_finishDisconnections")},_finishDisconnections:function(){if(!this.isDestroyed){var n=e(this,"_outlets"),r=this._pendingDisconnections;this._pendingDisconnections=null;for(var i in r)t(n,i,null)}}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+1,0,"routerTransitions")}(),function(){Ember.get,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:{},getHash:function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substr(t)}}}(),function(){var e=Ember.get,t=Ember.set;Ember.NoneLocation=Ember.Object.extend({implementation:"none",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}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.Location.getHash;Ember.HashLocation=Ember.Object.extend({implementation:"hash",init:function(){t(this,"location",e(this,"location")||window.location)},getURL:function(){return n().substr(1)},setURL:function(n){e(this,"location").hash=n,t(this,"lastSetURL",n)},replaceURL:function(n){e(this,"location").replace("#"+n),t(this,"lastSetURL",n)},onUpdateURL:function(n){var r=this,i=Ember.guidFor(this);Ember.$(window).on("hashchange.ember-location-"+i,function(){Ember.run(function(){var i=r.getURL();e(r,"lastSetURL")!==i&&(t(r,"lastSetURL",null),n(i))})})},formatURL:function(e){return"#"+e},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("hashchange.ember-location-"+e)}})}(),function(){var e=Ember.get,t=Ember.set,n=!1,r=window.history&&"state"in window.history;Ember.HistoryLocation=Ember.Object.extend({implementation:"history",init:function(){t(this,"location",e(this,"location")||window.location),t(this,"baseURL",Ember.$("base").attr("href")||"")},initState:function(){t(this,"history",e(this,"history")||window.history),this.replaceState(this.formatURL(this.getURL()))},rootURL:"/",getURL:function(){var t=e(this,"rootURL"),n=e(this,"location"),r=n.pathname,i=e(this,"baseURL");t=t.replace(/\/$/,""),i=i.replace(/\/$/,"");var s=r.replace(i,"").replace(t,"");return s},setURL:function(e){var t=this.getState();e=this.formatURL(e),t&&t.path!==e&&this.pushState(e)},replaceURL:function(e){var t=this.getState();e=this.formatURL(e),t&&t.path!==e&&this.replaceState(e)},getState:function(){return r?e(this,"history").state:this._historyState},pushState:function(t){var n={path:t};e(this,"history").pushState(n,null,t),r||(this._historyState=n),this._previousURL=this.getURL()},replaceState:function(t){var n={path:t};e(this,"history").replaceState(n,null,t),r||(this._historyState=n),this._previousURL=this.getURL()},onUpdateURL:function(e){var t=Ember.guidFor(this),r=this;Ember.$(window).on("popstate.ember-location-"+t,function(){(n||(n=!0,r.getURL()!==r._previousURL))&&e(r.getURL())})},formatURL:function(t){var n=e(this,"rootURL"),r=e(this,"baseURL");return""!==t?(n=n.replace(/\/$/,""),r=r.replace(/\/$/,"")):r.match(/^\//)&&n.match(/^\//)&&(r=r.replace(/\/$/,"")),r+n+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("popstate.ember-location-"+e)}})}(),function(){function e(t,n,r,i){var s,o=t.name,u=t.incoming,a=t.incomingNames,f=a.length;if(r||(r={}),i||(i=[]),!r.hasOwnProperty(o)){for(i.push(o),r[o]=!0,s=0;f>s;s++)e(u[a[s]],n,r,i);n(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,n){function r(e,t){if(e.name===n)throw new Ember.Error("cycle detected: "+n+" <- "+t.join(" <- "))}if(t&&n&&t!==n){var i=this.add(t),s=this.add(n);s.incoming.hasOwnProperty(t)||(e(i,r),i.hasOutgoing=!0,s.incoming[t]=i,s.incomingNames.push(t))}},t.prototype.topsort=function(t){var n,r,i={},s=this.vertices,o=this.names,u=o.length;for(n=0;u>n;n++)r=s[o[n]],r.hasOutgoing||e(r,t,i)},t.prototype.addEdges=function(e,t,n,r){var i;if(this.map(e,t),n)if("string"==typeof n)this.addEdge(e,n);else for(i=0;i<n.length;i++)this.addEdge(e,n[i]);if(r)if("string"==typeof r)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,normalize:function(e){var t=e.split(":",2),n=t[0],r=t[1];if("template"!==n){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},resolve:function(e){var t=this.parseName(e),n=this[t.resolveMethodName];if(!t.name||!t.type)throw new TypeError("Invalid fullName: `"+e+"`, must be of the form `type:name` ");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("template"!==s&&-1!==u.indexOf("/")){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,"/");return Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:(t=r(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)},resolveHelper:function(e){return this.resolveOther(e)||Ember.Handlebars.helpers[e.fullNameWithoutType]},resolveModel:function(n){var r=t(n.name),i=e(n.root,r);return i?i:void 0},resolveOther:function(n){var r=t(n.name)+t(n.type),i=e(n.root,r);return i?i:void 0},lookupDescription:function(e){var n=this.parseName(e);if("template"===n.type)return"template at "+n.fullNameWithoutType.replace(/\./g,"/");var r=n.root+"."+t(n.name);return"model"!==n.type&&(r+=t(n.type)),r},makeToString:function(e){return e.toString()}})}(),function(){function e(e){this._container=e}function t(e){function t(e){return r.resolve(e)}e.get("resolver");var n=e.get("resolver")||e.get("Resolver")||Ember.DefaultResolver,r=n.create({namespace:e});return t.describe=function(e){return r.lookupDescription(e)},t.makeToString=function(e,t){return r.makeToString(e,t)},t.normalize=function(e){return r.normalize?r.normalize(e):e},t}var n=Ember.get,r=Ember.set;e.deprecate=function(e){return function(){var t=this._container;return t[e].apply(t,arguments)}},e.prototype={_container:null,lookup:e.deprecate("lookup"),resolve:e.deprecate("resolve"),register:e.deprecate("register")};var i=Ember.Application=Ember.Namespace.extend(Ember.DeferredMixin,{rootElement:"body",eventDispatcher:null,customEvents:null,_readinessDeferrals:1,init:function(){if(this.$||(this.$=Ember.$),this.__container__=this.buildContainer(),this.Router=this.defaultRouter(),this._super(),this.scheduleInitialize(),Ember.libraries.registerCoreLibrary("Handlebars",Ember.Handlebars.VERSION),Ember.libraries.registerCoreLibrary("jQuery",Ember.$().jquery),Ember.LOG_VERSION){Ember.LOG_VERSION=!1;var e=Math.max.apply(this,Ember.A(Ember.libraries).mapBy("name.length"));Ember.libraries.each(function(t){(new Array(e-t.length+1)).join(" ")})}},buildContainer:function(){var e=this.__container__=i.buildContainer(this);return e},defaultRouter:function(){if(this.Router!==!1){var e=this.__container__;return this.Router&&(e.unregister("router:main"),e.register("router:main",this.Router)),e.lookupFactory("router:main")}},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(){if(!this.isDestroyed){if(this.Router){var e=this.__container__;e.unregister("router:main"),e.register("router:main",this.Router)}return this.runInitializers(),Ember.runLoadHooks("application",this),this.advanceReadiness(),this}},reset:function(){function e(){var e=this.__container__.lookup("router:main");e.reset(),Ember.run(this.__container__,"destroy"),this.buildContainer(),Ember.run.schedule("actions",this,function(){this._initialize()})}this._readinessDeferrals=1,Ember.run.join(this,e)},runInitializers:function(){var e,t,r=n(this.constructor,"initializers"),i=this.__container__,s=new Ember.DAG,o=this;for(e in r)t=r[e],s.addEdges(t.name,t.initialize,t.before,t.after);s.topsort(function(e){var t=e.value;t(i,o)})},didBecomeReady:function(){this.setupEventDispatcher(),this.ready(),this.startRouting(),Ember.testing||(Ember.Namespace.processAll(),Ember.BOOTED=!0),this.resolve(this)},setupEventDispatcher:function(){var e=n(this,"customEvents"),t=n(this,"rootElement"),i=this.__container__.lookup("event_dispatcher:main");r(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,Resolver:null,willDestroy:function(){Ember.BOOTED=!1,this.__container__.lookup("router:main").reset(),this.__container__.destroy()},initializer:function(e){this.constructor.initializer(e)}});Ember.Application.reopenClass({initializers:{},initializer:function(e){void 0!==this.superclass.initializers&&this.superclass.initializers===this.initializers&&this.reopenClass({initializers:Ember.create(this.initializers)}),this.initializers[e.name]=e},buildContainer:function(n){var r=new Ember.Container;return Ember.Container.defaultContainer=new e(r),r.set=Ember.set,r.resolver=t(n),r.normalize=r.resolver.normalize,r.describe=r.resolver.describe,r.makeToString=r.resolver.makeToString,r.optionsForType("component",{singleton:!1}),r.optionsForType("view",{singleton:!1}),r.optionsForType("template",{instantiate:!1}),r.optionsForType("helper",{instantiate:!1}),r.register("application:main",n,{instantiate:!1}),r.register("controller:basic",Ember.Controller,{instantiate:!1}),r.register("controller:object",Ember.ObjectController,{instantiate:!1}),r.register("controller:array",Ember.ArrayController,{instantiate:!1}),r.register("route:basic",Ember.Route,{instantiate:!1}),r.register("event_dispatcher:main",Ember.EventDispatcher),r.register("router:main",Ember.Router),r.injection("router:main","namespace","application:main"),r.register("location:hash",Ember.HashLocation),r.register("location:history",Ember.HistoryLocation),r.register("location:none",Ember.NoneLocation),r.injection("controller","target","router:main"),r.injection("controller","namespace","application:main"),r.injection("route","router","router:main"),r}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){function e(e,t,n){var r,i,s,o=[];for(i=0,s=n.length;s>i;i++)r=n[i],-1===r.indexOf(":")&&(r="controller:"+r),t.has(r)||o.push(r);if(o.length)throw new Ember.Error(Ember.inspect(e)+" needs [ "+o.join(", ")+" ] but "+(o.length>1?"they":"it")+" could not be found")}var t=Ember.get,n=(Ember.set,Ember.computed(function(){var e=this;return{needs:t(e,"needs"),container:t(e,"container"),unknownProperty:function(t){var n,r,i,s=this.needs;for(r=0,i=s.length;i>r;r++)if(n=s[r],n===t)return this.container.lookup("controller:"+t);var o=Ember.inspect(e)+"#needs does not include `"+t+"`. To access the "+t+" controller from "+Ember.inspect(e)+", "+Ember.inspect(e)+" should have a `needs` property that is an array of the controllers it has access to.";throw new ReferenceError(o)},setUnknownProperty:function(t){throw new Error("You cannot overwrite the value of `controllers."+t+"` of "+Ember.inspect(e))}}}));Ember.ControllerMixin.reopen({concatenatedProperties:["needs"],needs:[],init:function(){var n=t(this,"needs"),r=t(n,"length");r>0&&(this.container&&e(this,this.container,n),t(this,"controllers")),this._super.apply(this,arguments)},controllerFor:function(e){return Ember.controllerFor(t(this,"container"),e)},controllers:n})}(),function(){Ember.DataAdapter=Ember.Object.extend({init:function(){this._super(),this.releaseMethods=Ember.A()},container:null,attributeLimit:3,releaseMethods:Ember.A(),getFilters:function(){return Ember.A()},watchModelTypes:function(e,t){var n,r=this.getModelTypes(),i=this,s=Ember.A();n=r.map(function(e){var n=i.wrapModelType(e);return s.push(i.observeModelType(e,t)),n}),e(n);var o=function(){s.forEach(function(e){e()}),i.releaseMethods.removeObject(o)};return this.releaseMethods.pushObject(o),o},watchRecords:function(e,t,n,r){var i,s=this,o=Ember.A(),u=this.getRecords(e),a=function(e){n([e])},f=u.map(function(e){return o.push(s.observeRecord(e,a)),s.wrapRecord(e)}),l=function(e,n,i,u){for(var f=n;n+u>f;f++){var l=e.objectAt(f),c=s.wrapRecord(l);o.push(s.observeRecord(l,a)),t([c])}i&&r(n,i)},c={didChange:l,willChange:Ember.K};return u.addArrayObserver(s,c),i=function(){o.forEach(function(e){e()}),u.removeArrayObserver(s,c),s.releaseMethods.removeObject(i)},t(f),this.releaseMethods.pushObject(i),i},willDestroy:function(){this._super(),this.releaseMethods.forEach(function(e){e()})},detect:function(){return!1},columnsForType:function(){return Ember.A()},observeModelType:function(e,t){var n=this,r=this.getRecords(e),i=function(){t([n.wrapModelType(e)])},s={didChange:function(){Ember.run.scheduleOnce("actions",this,i)},willChange:Ember.K};r.addArrayObserver(this,s);var o=function(){r.removeArrayObserver(n,s)};return o},wrapModelType:function(e){var t,n=this.getRecords(e);return t={name:e.toString(),count:Ember.get(n,"length"),columns:this.columnsForType(e),object:e}},getModelTypes:function(){var e=Ember.A(Ember.Namespace.NAMESPACES),t=Ember.A(),n=this;return e.forEach(function(e){for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];n.detect(i)&&t.push(i)}}),t},getRecords:function(){return Ember.A()},wrapRecord:function(e){var t={object:e};return t.columnValues=this.getRecordColumnValues(e),t.searchKeywords=this.getRecordKeywords(e),t.filterValues=this.getRecordFilterValues(e),t.color=this.getRecordColor(e),t},getRecordColumnValues:function(){return{}},getRecordKeywords:function(){return Ember.A()},getRecordFilterValues:function(){return{}},getRecordColor:function(){return null},observeRecord:function(){return function(){}}})}()}(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||Ember.Logger.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."),define("ember",["handlebars","text","jquery","md5","sha256"],function(){}),define("app/templates/templates",["ember"],function(){if(!JS_BUILD){require(["text!app/templates/backend_add.html","text!app/templates/backend_edit.html","text!app/templates/confirmation_dialog.html","text!app/templates/file_upload.html","text!app/templates/home.html","text!app/templates/image_list.html","text!app/templates/image_list_item.html","text!app/templates/key.html","text!app/templates/key_add.html","text!app/templates/key_edit.html","text!app/templates/key_list.html","text!app/templates/key_list_item.html","text!app/templates/login.html","text!app/templates/machine.html","text!app/templates/machine_add.html","text!app/templates/machine_keys.html","text!app/templates/machine_keys_list_item.html","text!app/templates/machine_list.html","text!app/templates/machine_list_item.html","text!app/templates/machine_manual_monitoring.html","text!app/templates/machine_power.html","text!app/templates/machine_shell.html","text!app/templates/machine_shell_list_item.html","text!app/templates/machine_tags.html","text!app/templates/machine_tags_list_item.html","text!app/templates/messagebox.html","text!app/templates/monitoring.html","text!app/templates/rule.html","text!app/templates/user_menu.html","ember"],function(){Ember.TEMPLATES["backend_add/html"]=Ember.Handlebars.compile(arguments[0]),Ember.TEMPLATES["backend_edit/html"]=Ember.Handlebars.compile(arguments[1]),Ember.TEMPLATES["confirmation_dialog/html"]=Ember.Handlebars.compile(arguments[2]),Ember.TEMPLATES["file_upload/html"]=Ember.Handlebars.compile(arguments[3]),Ember.TEMPLATES["home/html"]=Ember.Handlebars.compile(arguments[4]),Ember.TEMPLATES["image_list/html"]=Ember.Handlebars.compile(arguments[5]),Ember.TEMPLATES["image_list_item/html"]=Ember.Handlebars.compile(arguments[6]),Ember.TEMPLATES["key/html"]=Ember.Handlebars.compile(arguments[7]),Ember.TEMPLATES["key_add/html"]=Ember.Handlebars.compile(arguments[8]),Ember.TEMPLATES["key_edit/html"]=Ember.Handlebars.compile(arguments[9]),Ember.TEMPLATES["key_list/html"]=Ember.Handlebars.compile(arguments[10]),Ember.TEMPLATES["key_list_item/html"]=Ember.Handlebars.compile(arguments[11]),Ember.TEMPLATES["login/html"]=Ember.Handlebars.compile(arguments[12]),Ember.TEMPLATES["machine/html"]=Ember.Handlebars.compile(arguments[13]),Ember.TEMPLATES["machine_add/html"]=Ember.Handlebars.compile(arguments[14]),Ember.TEMPLATES["machine_keys/html"]=Ember.Handlebars.compile(arguments[15]),Ember.TEMPLATES["machine_keys_list_item/html"]=Ember.Handlebars.compile(arguments[16]),Ember.TEMPLATES["machine_list/html"]=Ember.Handlebars.compile(arguments[17]),Ember.TEMPLATES["machine_list_item/html"]=Ember.Handlebars.compile(arguments[18]),Ember.TEMPLATES["machine_manual_monitoring/html"]=Ember.Handlebars.compile(arguments[19]),Ember.TEMPLATES["machine_power/html"]=Ember.Handlebars.compile(arguments[20]),Ember.TEMPLATES["machine_shell/html"]=Ember.Handlebars.compile(arguments[21]),Ember.TEMPLATES["machine_shell_list_item/html"]=Ember.Handlebars.compile(arguments[22]),Ember.TEMPLATES["machine_tags/html"]=Ember.Handlebars.compile(arguments[23]),Ember.TEMPLATES["machine_tags_list_item/html"]=Ember.Handlebars.compile(arguments[24]),Ember.TEMPLATES["messagebox/html"]=Ember.Handlebars.compile(arguments[25]),Ember.TEMPLATES["monitoring/html"]=Ember.Handlebars.compile(arguments[26]),Ember.TEMPLATES["rule/html"]=Ember.Handlebars.compile(arguments[27]),Ember.TEMPLATES["user_menu/html"]=Ember.Handlebars.compile(arguments[28])});return}Ember.TEMPLATES["backend_add/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){var n="",i,s;return t.buffer.push('\n                <li data-icon="false">\n                    <a '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"selectProvider","",{hash:{target:"view"},contexts:[e,e],types:["STRING","ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">"),s={},i={},t.buffer.push(l(r._triageMustache.call(e,"title",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("</a>\n                </li>\n                "),n}function p(e,t){var n="",i,s;return t.buffer.push('\n                <label for="new-backend-second-field">3. '),i={},s={},t.buffer.push(l(r._triageMustache.call(e,"view.secondFieldLabel",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:i,data:t}))),t.buffer.push(":</label>\n                "),s={type:e,id:e,"data-theme":e,valueBinding:e},i={type:"STRING",id:"STRING","data-theme":"STRING",valueBinding:"STRING"},t.buffer.push(l(r.view.call(e,"Mist.TextField",{hash:{type:"password",id:"new-backend-second-field","data-theme":"a",valueBinding:"Mist.backendAddController.newBackendSecondField"},contexts:[e],types:["ID"],hashContexts:s,hashTypes:i,data:t}))),t.buffer.push("\n            "),n}function d(e,t){var n="",i,s;return t.buffer.push('\n                        <li data-icon="false" data-theme="a">\n                            <a '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"selectKey","",{hash:{target:"view"},contexts:[e,e],types:["STRING","ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">"),s={},i={},t.buffer.push(l(r._triageMustache.call(e,"id",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("</a>\n                        </li>\n                    "),n}function v(e,t){t.buffer.push('\n        <div class="ajax-loader"></div>\n        ')}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="add-backend-panel"\n     data-swipe-close="false"\n     class="side-panel"\n     data-role="panel"\n     data-position="right"\n     data-display="overlay"\n     data-theme="b">\n\n    <div data-role="header">\n        <h1>Add backend</h1>\n        <a class="ui-btn-right" data-icon="info" data-iconpos="notext" data-theme="b"\n            target="_blank" href="https://mistio.zendesk.com/hc/en-us"></a>\n    </div>\n\n    <div data-role="content" data-theme="b">\n\n        <label>1. Provider:</label>\n        <div id="new-backend-provider"\n             class="mist-select"\n             data-role="collapsible"\n             data-collapsed-icon="carat-d"\n             data-expanded-icon="carat-u"\n             data-iconpos="right"\n             data-theme="a">\n            <h2>'),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"Mist.backendAddController.newBackendProvider.title",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('</h2>\n            <ul class="select-listmenu" data-role="listview" data-theme="a">\n                '),a={},f={},u=r.each.call(n,"Mist.backendsController.providerList",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n            </ul>\n        </div>\n        <div data-theme="a">\n            <label for="new-backend-first-field">2. '),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"view.firstFieldLabel",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(":</label>\n            "),f={id:n,"data-theme":n,valueBinding:n},a={id:"STRING","data-theme":"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"new-backend-first-field","data-theme":"a",valueBinding:"Mist.backendAddController.newBackendFirstField"},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n\n            "),a={},f={},u=r["if"].call(n,"view.secondFieldLabel",{hash:{},inverse:c.noop,fn:c.program(3,p,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n\n        </div>\n\n        <div id="openstack-bundle" data-theme="a">\n            <label for="new-backend-openstack-url">4. Auth URL:</label>\n            '),f={id:n,"data-theme":n,valueBinding:n},a={id:"STRING","data-theme":"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"new-backend-openstack-url","data-theme":"a",valueBinding:"Mist.backendAddController.newBackendOpenStackURL"},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n            <label for="new-backend-openstack-tenant">5. Tenant Name:</label>\n            '),f={id:n,"data-theme":n,valueBinding:n},a={id:"STRING","data-theme":"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"new-backend-openstack-tenant","data-theme":"a",valueBinding:"Mist.backendAddController.newBackendOpenStackTenant"},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n            <div id="opentack-advanced-wrapper">\n                <select id="openstack-advanced" data-role="slider" data-theme="a"\n                '),f={target:n,on:n},a={target:"STRING",on:"STRING"},s.buffer.push(l(r.action.call(n,"advancedToggled",{hash:{target:"view",on:"change"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>\n                   <option value="0">Basic settings</option>\n                    <option value="1">Advanced settings</option>\n                </select>\n            </div>\n\n            <div id="non-hp-cloud">\n\n                <label for="new-backend-openstack-region">6. Region:</label>\n                '),f={id:n,"data-theme":n,valueBinding:n},a={id:"STRING","data-theme":"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"new-backend-openstack-region","data-theme":"a",valueBinding:"Mist.backendAddController.newBackendOpenStackRegion"},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n                <label for="new-backend-openstack-endpoint">7. Compute Endpoint:</label>\n                '),f={id:n,"data-theme":n,valueBinding:n},a={id:"STRING","data-theme":"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"new-backend-openstack-endpoint","data-theme":"a",valueBinding:"Mist.backendAddController.newBackendOpenStackComputeEndpoint"},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n            </div>\n        </div>\n\n        <div id="gce-bundle">\n\n            <label for ="new-backend-key">3. Private key:</label>\n\n            <!-- Value is sent to newBackendSecondField -->\n            <a class="ui-btn ui-btn-a ui-corner-all"\n              '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"privateKeyClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>\n                Add key\n            </a>\n\n            <label for="new-backend-port">4. Project ID:</label>\n            '),f={id:n,"data-theme":n,valueBinding:n},a={id:"STRING","data-theme":"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"new-backend-project-name","data-theme":"a",valueBinding:"Mist.backendAddController.newBackendProjectName"},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n        </div>\n\n        <div id="baremetal-bundle">\n            <label for="new-backend-port">4. Port:</label>\n            '),f={id:n,"data-theme":n,valueBinding:n},a={id:"STRING","data-theme":"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"new-backend-port","data-theme":"a",valueBinding:"Mist.backendAddController.newBackendPort"},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n            <label>5. SSH Key:</label>\n            <div id="new-backend-key"\n                 class="mist-select"\n                 data-role="collapsible"\n                 data-iconpos="right"\n                 data-collapsed-icon="carat-d"\n                 data-expanded-icon="carat-u"\n                 data-theme="a">\n                <h2>'),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"Mist.backendAddController.newBackendKey.id",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('</h2>\n                <ul data-role="listview">\n                    '),a={},f={},u=r.each.call(n,"Mist.keysController.content",{hash:{},inverse:c.noop,fn:c.program(5,d,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n                    <li data-icon="false" data-theme="d">\n                        <a '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"createKeyClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">Add Key</a>\n                    </li>\n                </ul>\n            </div>\n        </div>\n\n        "),a={},f={},u=r["if"].call(n,"Mist.backendsController.addingBackend",{hash:{},inverse:c.noop,fn:c.program(7,v,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n\n        <div class="ok-cancel" data-role="controlgroup" data-type="horizontal">\n            <a data-role="button" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(' data-theme="a">Back</a>\n            <button id="new-backend-ok" data-theme="d" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"addClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">Add</a>\n        </div>\n    </div>\n</div>\n\n"),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.keyAddView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n\n"),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.fileUploadView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n"),o}),Ember.TEMPLATES["backend_edit/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){t.buffer.push('\n        <div class="ajax-loader"></div>\n        ')}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="edit-backend-popup" \n     class="mid-popup" \n     data-role="popup" \n     data-theme="a" \n     data-overlay-theme="b"\n     data-transition="pop">\n\n    <div data-role="header" data-theme="b">\n        <h1>Edit backend</h1>\n    </div>\n\n    <div data-role="content" data-theme="a">\n\n        '),a={valueBinding:n},f={valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{valueBinding:"Mist.backendEditController.newBackendTitle"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n\n        <div data-role="fieldcontain">\n            <select id="backend-toggle" data-role="slider" '),a={target:n,on:n},f={target:"STRING",on:"STRING"},s.buffer.push(l(r.action.call(n,"stateToggleSwitched",{hash:{target:"view",on:"change"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>\n                <option value="0">Disabled</option>\n                <option value="1">Enabled</option>\n            </select>\n            <span class="state">'),f={},a={},s.buffer.push(l(r._triageMustache.call(n,"Mist.backendEditController.backend.state",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('</span>\n        </div>\n\n        <input type="button" value="Delete" '),a={target:n,on:n},f={target:"STRING",on:"STRING"},s.buffer.push(l(r.action.call(n,"deleteClicked",{hash:{target:"view",on:"click"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(' />\n\n        <div id="backend-delete-confirm">\n            <label>Confirm backend removal?</label>\n            <label id="monitoring-message">There are monitored machines.<br />Monitoring for these will be disabled</label>\n            <div class="ok-cancel" data-role="controlgroup" data-type="horizontal">\n                <a data-role="button" id="button-confirm-disable" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"yesClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Yes</a>\n                <a data-role="button" data-theme="d" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"noClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">No</a>\n            </div>\n        </div>\n\n        "),f={},a={},u=r["if"].call(n,"Mist.backendsController.deletingBackend",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n\n        <a href="#" data-role="button" class="button-back" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">Back</a>\n    </div>\n</div>\n"),o}),Ember.TEMPLATES["confirmation_dialog/html"]=Ember.Handlebars.template(function(t,n,r,i,s){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f=this.escapeExpression;return s.buffer.push('<div id="confirmation-popup" data-role="popup" data-overlay-theme="b" data-transition="flip">\n\n    <div data-role="header" data-theme="b">\n        <h1>'),u={},a={},s.buffer.push(f(r._triageMustache.call(n,"Mist.confirmationController.title",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push('</h1>\n    </div>\n\n    <div data-role="content" data-theme="a">\n        <p>'),u={},a={},s.buffer.push(f(r._triageMustache.call(n,"Mist.confirmationController.text",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push('</p>\n        <div class="ok-cancel" data-role="controlgroup" data-type="horizontal">\n            <button data-theme="d" '),a={target:n},u={target:"STRING"},s.buffer.push(f(r.action.call(n,"noClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push(">No</button>\n            <button "),a={target:n},u={target:"STRING"},s.buffer.push(f(r.action.call(n,"yesClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push(">Yes</button>\n        </div>\n    </div>\n\n</div>\n"),o}),Ember.TEMPLATES["file_upload/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){t.buffer.push('\n                <div class="ajax-loader add-key-loader"></div>\n            ')}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="file-upload" class="large-popup" data-role="popup" data-overlay-theme="b" data-transition="flip">\n\n    <div data-role="header" data-theme="b">\n        <h1>'),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"Mist.fileUploadController.title",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('</h1>\n    </div>\n\n    <div data-role="content" data-theme="a">\n\n        <label for="textarea-private-key">'),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"Mist.fileUploadController.label",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(":\n            "),a={},f={},u=r["if"].call(n,"Mist.fileUploadController.uploadingFile",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n        </label>\n        "),f={id:n,valueBinding:n},a={id:"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Ember.TextArea",{hash:{id:"upload-area",valueBinding:"Mist.fileUploadController.file"},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n        <a class="ui-btn ui-corner-all ui-btn-a ui-btn-icon-right ui-icon-arrow-u"\n            '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"uploadClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Upload</a>\n\n        <input id="file-upload-input" type="file" name="file" '),f={on:n,target:n},a={on:"STRING",target:"STRING"},s.buffer.push(l(r.action.call(n,"uploadInputChanged",{hash:{on:"change",target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('/>\n\n        <div class="ok-cancel" data-role="controlgroup" data-type="horizontal">\n            <a class="ui-btn ui-corner-all ui-btn-a" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Back</a>\n            <a id="file-upload-ok" class="ui-btn ui-corner-all ui-btn-d ui-state-disabled"\n                '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"doneClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">Done</a>\n        </div>\n    </div>\n</div>\n"),o}),Ember.TEMPLATES["home/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function v(e,t){var n="",i,s;return t.buffer.push("\n                "),i={backendBinding:e,classBinding:e,"data-icon":e},s={backendBinding:"STRING",classBinding:"STRING","data-icon":"STRING"},t.buffer.push(h(r.view.call(e,"Mist.backendButtonView",{hash:{backendBinding:"this",classBinding:"state","data-icon":"check"},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("\n            "),n}function m(e,t){var n="",i,s,o;return t.buffer.push("Machines\n                    "),s={},o={},i=r["if"].call(e,"Mist.backendsController.loadingMachines",{hash:{},inverse:p.noop,fn:p.program(4,g,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push('\n                    <span class="ui-li-count">'),s={},o={},t.buffer.push(h(r._triageMustache.call(e,"Mist.backendsController.machineCount",{hash:{},contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}))),t.buffer.push("</span>\n                "),n}function g(e,t){t.buffer.push('\n                    <div class="ajax-loader"></div>\n                    ')}function y(e,t){var n="",i,s,o;return t.buffer.push("Images\n                    "),s={},o={},i=r["if"].call(e,"Mist.backendsController.loadingImages",{hash:{},inverse:p.noop,fn:p.program(4,g,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push('\n                    <span class="ui-li-count">'),s={},o={},t.buffer.push(h(r._triageMustache.call(e,"Mist.backendsController.imageCount",{hash:{},contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}))),t.buffer.push("</span>\n                "),n}function b(e,t){var n="",i,s,o;return t.buffer.push("Keys\n                    "),s={},o={},i=r["if"].call(e,"Mist.keysController.loading",{hash:{},inverse:p.noop,fn:p.program(4,g,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push('\n                    <span class="ui-li-count">'),s={},o={},t.buffer.push(h(r._triageMustache.call(e,"Mist.keysController.content.length",{hash:{},contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}))),t.buffer.push("</span>\n                "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l,c,h=this.escapeExpression,p=this,d=r.helperMissing;return s.buffer.push('<div id="home-page" data-role="page" class="ui-page-active" data-theme="c">\n\n    <div data-role="header" data-theme="b">\n\n        <h1>mist.io</h1>\n        '),f={},l={},s.buffer.push(h(r.view.call(n,"Mist.userMenuView",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push('\n\n    </div>\n\n    <div data-role="content" data-theme="c">\n\n        <a id="add-backend-btn"\n           data-role="button"\n           data-iconpos="right"\n           data-icon="plus"\n           data-theme="d"\n           '),l={target:n},f={target:"STRING"},s.buffer.push(h(r.action.call(n,"addBackend",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push('>Add backend</a>\n\n        <div id="backend-buttons" data-role="controlgroup" data-type="horizontal">\n            '),f={},l={},u=r.each.call(n,"Mist.backendsController.content",{hash:{},inverse:p.noop,fn:p.program(1,v,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n        </div>\n\n        <ul data-role="listview" data-inset="true">\n            <li>\n                '),f={},l={},c={hash:{},inverse:p.noop,fn:p.program(3,m,s),contexts:[n],types:["STRING"],hashContexts:l,hashTypes:f,data:s},a=(u=r["link-to"]||n&&n["link-to"],u?u.call(n,"machines",c):d.call(n,"link-to","machines",c)),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n            </li>\n            \n            <li>\n                "),f={},l={},c={hash:{},inverse:p.noop,fn:p.program(6,y,s),contexts:[n],types:["STRING"],hashContexts:l,hashTypes:f,data:s},a=(u=r["link-to"]||n&&n["link-to"],u?u.call(n,"images",c):d.call(n,"link-to","images",c)),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n            </li>\n\n            <li>\n                "),f={},l={},c={hash:{},inverse:p.noop,fn:p.program(8,b,s),contexts:[n],types:["STRING"],hashContexts:l,hashTypes:f,data:s},a=(u=r["link-to"]||n&&n["link-to"],u?u.call(n,"keys",c):d.call(n,"link-to","keys",c)),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n            </li>\n        </ul>\n    </div>\n\n    "),f={},l={},s.buffer.push(h(r.view.call(n,"Mist.backendAddView",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push("\n\n    "),f={},l={},s.buffer.push(h(r.view.call(n,"Mist.backendEditView",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push("\n\n</div>\n"),o}),Ember.TEMPLATES["image_list/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){t.buffer.push('\n            <div class="ajax-loader"></div>\n        ')}function p(e,t){var n="",i,s;return t.buffer.push("\n                "),i={imageBinding:e,"class":e},s={imageBinding:"STRING","class":"STRING"},t.buffer.push(l(r.view.call(e,"Mist.imageListItemView",{hash:{imageBinding:"this","class":"checkbox-link"},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("\n            "),n}function d(e,t){t.buffer.push("\n                    Please wait...\n                ")}function v(e,t){t.buffer.push("\n                    Continue search on server...\n                ")}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="image-list-page" data-role="page" class="ui-page-active" data-theme="c">\n\n    <div data-role="header" data-theme="b">\n\n        <a href="#" class="responsive-button" data-icon="home">Home</a>\n\n        <h1>Images</h1>\n\n        '),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.userMenuView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n    </div>\n\n    <div data-role="content" data-theme="c">\n\n        '),a={},f={},u=r["if"].call(n,"Mist.backendsController.loadingImages",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n\n        "),f={id:n,placeholder:n,valueBinding:n},a={id:"STRING",placeholder:"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"search-term-input",placeholder:"Search images ...",valueBinding:"Mist.imageSearchController.searchTerm"},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n\n        "),a={},f={},u=r["if"].call(n,"Mist.imageSearchController.isSearching",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n\n        <ul id="image-list"\n            data-role="listview"\n            data-inset="true"\n            class="checkbox-list">\n            '),a={},f={},u=r.each.call(n,"view.renderedImages",{hash:{},inverse:c.noop,fn:c.program(3,p,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n        </ul>\n\n        "),a={},f={},u=r["if"].call(n,"view.renderingMoreImages",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n\n        <button id="images-advanced-search" data-theme="b" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"searchClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">\n            <span>\n                "),a={},f={},u=r["if"].call(n,"view.searchingImages",{hash:{},inverse:c.program(7,v,s),fn:c.program(5,d,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n            </span>\n        </button>\n\n        <div class="small-padding"></div>\n\n    </div>\n\n    '),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.machineAddView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n\n</div>"),o}),Ember.TEMPLATES["image_list_item/html"]=Ember.Handlebars.template(function(t,n,r,i,s){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f=this.escapeExpression;return s.buffer.push("<label "),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"toggleImageStar",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push(">\n	"),u={checkedBinding:n},a={checkedBinding:"STRING"},s.buffer.push(f(r.view.call(n,"Mist.Checkbox",{hash:{checkedBinding:"view.image.star"},contexts:[n],types:["ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push("\n</label>\n\n<a "),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"launchImage",{hash:{target:"view"},contexts:[n],types:["ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push(">\n    <h3>"),a={},u={},s.buffer.push(f(r._triageMustache.call(n,"view.image.name",{hash:{},contexts:[n],types:["ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('</h3>\n    <p class="tag">'),a={},u={},s.buffer.push(f(r._triageMustache.call(n,"view.image.id",{hash:{},contexts:[n],types:["ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('</p>\n    <p class="tag">'),a={},u={},s.buffer.push(f(r._triageMustache.call(n,"view.image.backend.title",{hash:{},contexts:[n],types:["ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push("</p>\n</a>\n"),o}),Ember.TEMPLATES["key/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){t.buffer.push('\n        <div class="ajax-loader"></div>\n        ')}function p(e,t){t.buffer.push('\n                <div class="ajax-loader"></div>\n                ')}function d(e,t){var n="",i,s,o;return t.buffer.push('\n        <div id="single-key-machines" data-role="collapsible">\n\n            <h3>Machines\n                '),s={},o={},i=r["if"].call(e,"Mist.backendsController.loadingMachines",{hash:{},inverse:c.noop,fn:c.program(3,p,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push('\n            </h3>\n            <ul data-role="listview" class="checkbox-list" data-inset="true">\n                '),s={},o={},i=r.each.call(e,"view.machines",{hash:{},inverse:c.noop,fn:c.program(6,v,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n            </ul>\n        </div>\n        "),n}function v(e,t){var n="",i,s;return t.buffer.push("\n                    "),i={machineBinding:e,"class":e},s={machineBinding:"STRING","class":"STRING"},t.buffer.push(l(r.view.call(e,"Mist.machineListItemView",{hash:{machineBinding:"this","class":"checkbox-link"},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("\n                "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="single-key-page" data-role="page" class="ui-page-active" data-theme="c">\n\n    <div data-role="header" data-theme="b">\n\n        <a href="#/keys" class="responsive-button" data-icon="arrow-l">Keys</a>\n\n        <h1>'),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"id",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("</h1>\n\n        "),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.userMenuView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n    </div>\n\n    <div data-role="content" data-theme="c">\n\n        '),a={},f={},u=r["if"].call(n,"Mist.keysController.loading",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n\n         <div data-role="collapsible" data-collapsed="false">\n            <h3>Public Key\n                '),a={},f={},u=r["if"].call(n,"Mist.keysController.gettingPublicKey",{hash:{},inverse:c.noop,fn:c.program(3,p,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n            </h3>\n            <input id="public-key" type="text" readonly="readonly" onclick="this.focus();this.select()"/>\n        </div>\n\n        <div data-role="collapsible">\n            <h3>Private key\n                '),a={},f={},u=r["if"].call(n,"Mist.keysController.gettingPrivateKey",{hash:{},inverse:c.noop,fn:c.program(3,p,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n            </h3>\n            <a data-role="button" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"displayClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">Display</a>\n        </div>\n\n        "),a={},f={},u=r["if"].call(n,"machines",{hash:{},inverse:c.noop,fn:c.program(5,d,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n\n        <div class="large-padding"></div>\n\n    </div>\n\n    '),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.keyEditView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n\n    "),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.confirmationDialog",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n\n    <!--\n     Since the private key is very sensitive information, it should be\n     erased as soon as the popup is closed. We set the data-dismissible\n     attribute to false to make sure that user will click the "Back" button\n     to leave the popup (which will remove the private key from the textarea)\n    -->\n    <div id="private-key-popup"\n         class="medium-popup"\n         data-role="popup"\n         data-overlay-theme="b"\n         data-transition="flip"\n         data-dismissible="false">\n        <div data-role="header" data-theme="b">\n            <h1>Private Key</h1>\n        </div>\n        <div data-role="content">\n            <textarea id="private-key" readonly="readonly" onclick="this.focus();this.select()"></textarea>\n            <a data-role="button" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Back</a>\n        </div>\n    </div>\n\n    <div class="dual-action-footer" data-role="footer" data-theme="b">\n        <table><tbody><tr><td>\n            <a data-role="button" data-icon="edit" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"renameClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Rename</a>\n        </td><td>\n            <a data-role="button" data-icon="delete" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"deleteClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">Delete</a>\n        </td></tr></tbody></table>\n    </div>\n\n</div>\n"),o}),Ember.TEMPLATES["key_add/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){t.buffer.push('\n                <div class="ajax-loader add-key-loader"></div>\n            ')}function p(e,t){t.buffer.push('\n        <div class="ajax-loader"></div>\n        ')}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="add-key-popup" class="large-popup" data-role="popup" data-overlay-theme="b" data-transition="flip">\n\n    <div data-role="header" data-theme="b">\n        <h1>Add key</h1>\n    </div>\n\n    <div data-role="content" data-theme="a">\n\n        <label for="add-key-id">Name:</label>\n        '),a={id:n,valueBinding:n},f={id:"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"add-key-id",valueBinding:"Mist.keyAddController.newKeyId"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n\n        <label for="textarea-private-key">Private Key:\n            '),f={},a={},u=r["if"].call(n,"Mist.keysController.generatingKey",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n            "),f={},a={},u=r["if"].call(n,"Mist.keyAddController.uploadingKey",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n        </label>\n        "),a={id:n,valueBinding:n},f={id:"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Ember.TextArea",{hash:{id:"add-key-private",valueBinding:"Mist.keyAddController.newKeyPrivate"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n\n        <div class="generate-upload" data-role="controlgroup" data-type="horizontal" data-theme="a">\n            <button data-icon="gear" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"generateClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Generate</button>\n            <button data-icon="arrow-u"\n                    data-iconpos="right"\n                    '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"uploadClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Upload</button>\n        </div>\n\n        <input id="add-key-upload" type="file" name="file" '),a={on:n,target:n},f={on:"STRING",target:"STRING"},s.buffer.push(l(r.action.call(n,"uploadInputChanged",{hash:{on:"change",target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push("/>\n\n        "),f={},a={},u=r["if"].call(n,"Mist.keysController.addingKey",{hash:{},inverse:c.noop,fn:c.program(3,p,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n\n        <div class="ok-cancel" data-role="controlgroup" data-type="horizontal">\n            <a data-role="button" data-theme="a" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Back</a>\n            <button id="add-key-ok" data-theme="d" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"addClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">Add</button>\n        </div>\n    </div>\n</div>\n"),o}),Ember.TEMPLATES["key_edit/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){t.buffer.push('\n        <div class="ajax-loader"></div>\n        ')}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="rename-key-popup" \n     class="small-popup" \n     data-role="popup" \n     data-overlay-theme="b" \n     data-transition="slideup">\n\n    <div data-role="header" data-theme="b">\n        <h1>Rename key</h1>\n    </div>\n\n    <div data-role="content">\n\n        <label for="new-key-name">New name:</label>\n        '),a={id:n,valueBinding:n},f={id:"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"new-key-name",valueBinding:"Mist.keyEditController.newKeyId"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push("\n\n        "),f={},a={},u=r["if"].call(n,"Mist.keysController.renamingKey",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n\n        <div class="ok-cancel" data-role="controlgroup" data-type="horizontal">\n            <a data-role="button" data-theme="a" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Back</a>\n            <button id="rename-key-ok" data-theme="d" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"saveClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">Save</button>\n        </div>\n\n    </div>\n\n</div>\n"),o}),Ember.TEMPLATES["key_list/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){var n="",i,s;return t.buffer.push("\n                "),i={keyBinding:e,"class":e},s={keyBinding:"STRING","class":"STRING"},t.buffer.push(l(r.view.call(e,"Mist.keyListItemView",{hash:{keyBinding:"this","class":"checkbox-link"},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("\n            "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="key-list-page" data-role="page" class="ui-page-active" data-theme="c">\n\n    <div data-role="header" data-theme="b">\n\n        <a href="#" class="responsive-button" data-icon="home">Home</a>\n\n        <h1>Keys</h1>\n\n        '),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.userMenuView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n    </div>\n\n    <div data-role="content" data-theme="c">\n\n        <a id="select-keys-btn"\n           class="responsive-button"\n           data-role="button"\n           data-icon="arrow-d"\n           '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"selectClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Select</a>\n\n        <a id="add-key-btn"\n           class="responsive-button"\n           data-role="button"\n           data-icon="plus"\n           data-iconpos="right"\n           data-theme="d"\n           '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"addClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Add</a>\n\n        <ul data-role="listview" \n            data-filter="true" \n            data-inset="true" \n            data-filter-placeholder="Filter..."\n            class="checkbox-list">\n            '),a={},f={},u=r.each.call(n,"Mist.keysController.content",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n        </ul>\n\n        <div class="mid-padding"></div>\n\n    </div>\n\n    '),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.keyAddView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n\n    "),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.keyEditView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n\n    "),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.confirmationDialog",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n    <div id="select-keys-popup" data-role="popup" data-transition="flip" data-position-to="#select-keys-btn">\n        <ul data-role=\'listview\'>\n            <li data-icon="false">\n                <a '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"selectionModeClicked",!0,{hash:{target:"view"},contexts:[n,n],types:["STRING","BOOLEAN"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>All</a>\n            </li>\n            <li data-icon="false">\n                <a '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"selectionModeClicked",!1,{hash:{target:"view"},contexts:[n,n],types:["STRING","BOOLEAN"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>None</a>\n            </li>\n        </ul>\n    </div>\n\n    <div class="tri-action-footer" data-role="footer" data-theme="b">\n        <table><tbody><tr><td>\n            <a data-role="button" data-icon="edit" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"renameClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Rename</a>\n        </td><td>\n            <a data-role="button" data-icon="delete" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"deleteClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Delete</a>\n        </td><td>\n            <a data-role="button" data-icon="gear" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"setDefaultClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">Set default</a>\n        </td></tr></tbody></table>\n    </div>\n\n</div>\n"),o}),Ember.TEMPLATES["key_list_item/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function v(e,t){var n="",i,s,o;return t.buffer.push('\n\n    <div class="ui-grid-b">\n        <div class="ui-block-a key-name">'),s={},o={},t.buffer.push(h(r._triageMustache.call(e,"view.key.id",{hash:{},contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}))),t.buffer.push('</div>\n        <div class="ui-block-b"></div>\n        <div class="ui-block-c key-tags">\n            '),s={},o={},i=r["if"].call(e,"view.key.isDefault",{hash:{},inverse:p.noop,fn:p.program(2,m,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n        </div>\n    </div>\n\n"),n}function m(e,t){t.buffer.push('\n             <span class="tag">default</span>\n            ')}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l,c,h=this.escapeExpression,p=this,d=r.helperMissing;return s.buffer.push("<label>"),f={checkedBinding:n},l={checkedBinding:"STRING"},s.buffer.push(h(r.view.call(n,"Mist.Checkbox",{hash:{checkedBinding:"view.key.selected"},contexts:[n],types:["ID"],hashContexts:f,hashTypes:l,data:s}))),s.buffer.push("</label>\n\n"),l={},f={},c={hash:{},inverse:p.noop,fn:p.program(1,v,s),contexts:[n,n],types:["STRING","ID"],hashContexts:f,hashTypes:l,data:s},a=(u=r["link-to"]||n&&n["link-to"],u?u.call(n,"key","view.key",c):d.call(n,"link-to","key","view.key",c)),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n"),o}),Ember.TEMPLATES["login/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){t.buffer.push('\n        <div class="ajax-loader"></div>\n        ')}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="login-popup" class="mid-popup" data-role="popup" data-overlay-theme="b" data-transition="flip">\n\n    <div data-role="header" data-theme="b">\n        <h1>Login to mist.io</h1>\n    </div>\n\n    <div data-role="content">\n        <label for="email">Email:</label>\n        '),a={id:n,valueBinding:n},f={id:"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"email",valueBinding:"Mist.loginController.email"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n\n        <label for="password">Password:</label>\n        '),a={id:n,type:n,valueBinding:n},f={id:"STRING",type:"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"password",type:"password",valueBinding:"Mist.loginController.password"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push("\n\n        "),f={},a={},u=r["if"].call(n,"Mist.loginController.loggingIn",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n        <a "),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"forgot",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(' target="_new">Forgot your password?</a>\n        <div class="ok-cancel" data-role="controlgroup" data-type="horizontal">\n            <a data-role="button" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Back</a>\n            <button id="login-ok" data-theme="d" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"loginClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">Log in</button>\n        </div>\n\n    </div>\n\n</div>\n"),o}),Ember.TEMPLATES["machine/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function v(e,t){var n="",i,s,o;return t.buffer.push("\n            "),s={},o={},i=r["if"].call(e,"Mist.backendsController.loadingMachines",{hash:{},inverse:h.noop,fn:h.program(2,m,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n        "),n}function m(e,t){t.buffer.push('\n                <div class="ajax-loader"></div>\n            ')}function g(e,t){t.buffer.push('\n                <a class="ui-state-disabled" data-role="button" data-icon="plus" data-iconpos="right">Add key</a>\n            ')}function y(e,t){var n="",i,s,o;return t.buffer.push(" "),s={},o={},i=r["if"].call(e,"keysCount",{hash:{},inverse:h.program(9,w,t),fn:h.program(7,b,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),n}function b(e,t){var n="",i,s;return t.buffer.push('\n                <a data-role="button" '),i={target:e},s={target:"STRING"},t.buffer.push(p(r.action.call(e,"manageKeysClicked",{hash:{target:"view"},contexts:[e],types:["STRING"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">"),s={},i={},t.buffer.push(p(r._triageMustache.call(e,"keysCount",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(" keys</a>\n            "),n}function w(e,t){var n="",i,s;return t.buffer.push('\n                <a data-role="button"\n                   data-theme="d"\n                   data-icon="plus"\n                   data-iconpos="right"\n                   data-mini="false"\n                   '),i={target:e},s={target:"STRING"},t.buffer.push(p(r.action.call(e,"addKeyClicked",{hash:{target:"view"},contexts:[e],types:["STRING"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">Add key</a>\n            "),n}function E(e,t){var n="",i,s,o;return t.buffer.push("\n        "),s={},o={},i=r.unless.call(e,"pendingMonitoring",{hash:{},inverse:h.noop,fn:h.program(12,S,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n        "),n}function S(e,t){t.buffer.push('\n        <div class="single-machine-loader ui-loader ui-corner-all ui-body-a ui-loader-verbose">\n            <span class="ui-icon ui-icon-loading"></span>\n            <h1>Enabling monitoring. Please wait</h1>\n        </div>\n        ')}function x(e,t){t.buffer.push('\n        <div class="single-machine-loader ui-loader ui-corner-all ui-body-a ui-loader-verbose">\n            <span class="ui-icon ui-icon-loading"></span>\n            <h1>Disabling monitoring. Please wait</h1>\n        </div>\n        ')}function T(e,t){t.buffer.push('\n        <div class="single-machine-loader ui-loader ui-corner-all ui-body-a ui-loader-verbose">\n            <span class="ui-icon ui-icon-loading"></span>\n            <h1>Fetching stats...</h1>\n        </div>\n        ')}function N(e,t){var n="",i,s,o;return t.buffer.push("\n\n            "),s={},o={},i=r.unless.call(e,"pendingMonitoring",{hash:{},inverse:h.noop,fn:h.program(19,C,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n\n            "),n}function C(e,t){var n="",i,s,o;return t.buffer.push("\n\n                "),s={},o={},i=r["if"].call(e,"pendingFirstData",{hash:{},inverse:h.noop,fn:h.program(20,k,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n\n                "),s={},o={},t.buffer.push(p(r.view.call(e,"Mist.monitoringView",{hash:{},contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}))),t.buffer.push('\n\n                <div class="rules-container" data-role="listview">\n                    '),s={},o={},i=r.each.call(e,"view.rules",{hash:{},inverse:h.noop,fn:h.program(22,L,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n\n                    "),s={},o={},i=r["if"].call(e,"Mist.rulesController.creationPending",{hash:{},inverse:h.noop,fn:h.program(24,A,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push('\n                </div>\n\n                <div id="monitoring-bottom-btns">\n                <div data-rule="ui-grid-a">\n                    <div class="ui-block-a">\n                        <a id="add-rule-button"\n                            class="ui-btn ui-corner-all ui-btn-d ui-btn-icon-left ui-icon-plus"\n                            '),o={target:e},s={target:"STRING"},t.buffer.push(p(r.action.call(e,"addRuleClicked",{hash:{target:"view"},contexts:[e],types:["STRING"],hashContexts:o,hashTypes:s,data:t}))),t.buffer.push('>Add Rule</a>\n                    </div>\n                    <div class="ui-block-b">\n                        <a id="disable-monitor-btn"\n                        class="ui-btn ui-corner-all ui-btn-b ui-btn-icon-left ui-icon-delete"\n                            '),o={target:e},s={target:"STRING"},t.buffer.push(p(r.action.call(e,"disableMonitoringClicked",{hash:{target:"view"},contexts:[e],types:["STRING"],hashContexts:o,hashTypes:s,data:t}))),t.buffer.push(">Disable</a>\n                    </div>\n                </div>\n                </div>\n\n            "),n}function k(e,t){t.buffer.push('\n                <div class="single-machine-loader ui-loader ui-corner-all ui-body-a ui-loader-verbose">\n                    <span class="ui-icon ui-icon-loading"></span>\n                    <h1>Waiting for data</h1>\n                </div>\n                ')}function L(e,t){var n="",i,s;return t.buffer.push("\n                        "),i={ruleBinding:e},s={ruleBinding:"STRING"},t.buffer.push(p(r.view.call(e,"Mist.ruleView",{hash:{ruleBinding:"this"},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("\n                    "),n}function A(e,t){t.buffer.push('\n                    <div class="rule-box" id="creation-rule">\n                        <div class="ajax-loader"></div>\n                    </div>\n                    ')}function O(e,t){var n="",i,s,o;return t.buffer.push('\n\n                <div class="monitoring-dialog-container" id="monitoring-disabled">\n\n                    <div id="enable-monitoring-bundle">\n                        <div>Monitoring is currently disabled</div>\n\n                        <a id="enable-monitor-btn"\n                           class="ui-btn ui-corner-all ui-btn-d ui-btn-icon-left ui-icon-star"\n                           '),s={target:e},o={target:"STRING"},t.buffer.push(p(r.action.call(e,"enableMonitoringClicked",{hash:{target:"view"},contexts:[e],types:["STRING"],hashContexts:s,hashTypes:o,data:t}))),t.buffer.push(">Enable</a>\n\n                       "),o={},s={},i=r["if"].call(e,"Mist.machineManualMonitoringController.gettingCommand",{hash:{},inverse:h.noop,fn:h.program(27,M,t),contexts:[e],types:["ID"],hashContexts:s,hashTypes:o,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n                    </div>\n\n                </div>\n\n            "),n}function M(e,t){t.buffer.push('\n                            <div class="ajax-loader"></div>\n                       ')}function _(e,t){t.buffer.push('\n                             probing... <div class="ajax-loader"></div>\n                         ')}function D(e,t){var n="",i,s;return t.buffer.push("\n                             "),i={},s={},t.buffer.push(p(r._triageMustache.call(e,"view.lastProbe",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:i,data:t}))),t.buffer.push('\n                             <button id="machine-probe-btn"\n                                    data-theme="a"\n                                    data-mini="true"\n                                    '),s={target:e},i={target:"STRING"},t.buffer.push(p(r.action.call(e,"probeClicked",{hash:{target:"view"},contexts:[e],types:["STRING"],hashContexts:s,hashTypes:i,data:t}))),t.buffer.push(">Probe</button>\n                         "),n}function P(e,t){var n="",i,s;return t.buffer.push("\n                <tr>\n                    <td>Up and running for</td>\n                    <td>"),i={},s={},t.buffer.push(p(r._triageMustache.call(e,"view.upFor",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:i,data:t}))),t.buffer.push("</td>\n                </tr>\n                "),n}function H(e,t){var n="",i,s,o,u;return t.buffer.push('\n                <tr>\n                    <td>Load</td>\n                    <td>\n                        <div class="loadleds">\n\n                            <div '),s={"class":e},o={"class":"STRING"},u={hash:{"class":"loadavg15 :led"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(p((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):d.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div>\n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"loadavg5 :led"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(p((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):d.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div>\n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"loadavg1 :led"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(p((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):d.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div>\n                        </div>\n                        "),o={},s={},t.buffer.push(p(r._triageMustache.call(e,"loadavg",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:o,data:t}))),t.buffer.push(" - "),o={},s={},t.buffer.push(p(r._triageMustache.call(e,"loadavg5",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:o,data:t}))),t.buffer.push("\n                    </td>\n                </tr>\n                "),n}function B(e,t){var n="",i,s,o,u;return t.buffer.push("\n                <tr>\n                    <td>Latency</td>\n                    <td>\n                        <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":":netleds"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(p((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):d.call(e,"bind-attr",u)))),t.buffer.push(">\n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"netled4 :netled1"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(p((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):d.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div>\n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"netled3 :netled2"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(p((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):d.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div>\n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"netled2 :netled3"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(p((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):d.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div>\n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"netled1 :netled4"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(p((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):d.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div>\n                        </div>\n                        "),o={},s={},t.buffer.push(p(r._triageMustache.call(e,"latency",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:o,data:t}))),t.buffer.push("ms</td>\n                </tr>\n                "),n}function j(e,t){var n="",i,s;return t.buffer.push("\n                <tr>\n                    <td>Packet loss</td>\n                    <td>"),i={},s={},t.buffer.push(p(r._triageMustache.call(e,"loss",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:i,data:t}))),t.buffer.push("</td>\n                </tr>\n                "),n}function F(e,t){var n="",i,s,o;return t.buffer.push("\n                <tr>\n                    <td>Tags</td>\n                    <td>\n                        "),s={},o={},i=r.each.call(e,"tags",{hash:{},inverse:h.noop,fn:h.program(42,I,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n                    </td>\n                </tr>\n                "),n}function I(e,t){var n="",i,s;return t.buffer.push('\n                        <span class="tag">'),i={},s={},t.buffer.push(p(r._triageMustache.call(e,"",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:i,data:t}))),t.buffer.push("</span>\n                        "),n}function q(e,t){var n="",i,s;return t.buffer.push("\n                <tr>\n                    <td>"),i={},s={},t.buffer.push(p(r._triageMustache.call(e,"key",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:i,data:t}))),t.buffer.push("</td>\n                    <td>"),i={},s={},t.buffer.push(p(r._triageMustache.call(e,"value",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:i,data:t}))),t.buffer.push("</td>\n                </tr>\n                "),n}function R(e,t){var n="",i,s,o;return t.buffer.push('\n        <div id="single-machine-metadata" data-role="collapsible">\n\n            <h3>Full metadata list</h3>\n\n            <table class="info-table">\n                '),s={},o={},i=r.each.call(e,"view.metadata",{hash:{},inverse:h.noop,fn:h.program(44,q,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n            </table>\n\n        </div>\n        "),n}function U(e,t){var n="",i,s,o,u;return t.buffer.push('\n            <li data-icon="false">\n                <a '),s={title:e},o={title:"STRING"},u={hash:{title:"this"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(p((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):d.call(e,"bind-attr",u)))),t.buffer.push(">"),o={},s={},t.buffer.push(p(r._triageMustache.call(e,"",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:o,data:t}))),t.buffer.push("</a>\n            </li>\n            "),n}function z(e,t){var n="",i,s,o,u;return t.buffer.push('\n            <li data-icon="false">\n                <a '),s={title:e},o={title:"STRING"},u={hash:{title:"this.title"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(p((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):d.call(e,"bind-attr",u)))),t.buffer.push(">"),o={},s={},t.buffer.push(p(r._triageMustache.call(e,"symbol",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:o,data:t}))),t.buffer.push("</a>\n            </li>\n            "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l,c,h=this,p=this.escapeExpression,d=r.helperMissing;return s.buffer.push('<div id="single-machine-page" data-role="page" class="ui-page-active" data-theme="c">\n\n    <div data-role="header" data-theme="b">\n\n        <a href="#/machines" class="responsive-button" data-icon="arrow-l">Machines</a>\n\n        <h1>'),f={},l={},s.buffer.push(p(r._triageMustache.call(n,"name",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push("</h1>\n\n        "),f={},l={},s.buffer.push(p(r.view.call(n,"Mist.userMenuView",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push('\n\n    </div>\n\n    <div data-role="header" data-theme="a" class="single-machine-header">\n\n        <span class="single-view-icon-wrapper">\n            <span id="single-view-provider-icon" '),l={"class":n},f={"class":"STRING"},c={hash:{"class":"view.providerIconClass"},contexts:[],types:[],hashContexts:l,hashTypes:f,data:s},s.buffer.push(p((u=r["bind-attr"]||n&&n["bind-attr"],u?u.call(n,c):d.call(n,"bind-attr",c)))),s.buffer.push("></span>\n        </span>\n        <span "),l={"class":n},f={"class":"STRING"},c={hash:{"class":":single-view-icon-wrapper image.type"},contexts:[],types:[],hashContexts:l,hashTypes:f,data:s},s.buffer.push(p((u=r["bind-attr"]||n&&n["bind-attr"],u?u.call(n,c):d.call(n,"bind-attr",c)))),s.buffer.push('>\n            <span id="single-view-image-icon"></span>\n        </span>\n\n        <h1 '),l={"class":n},f={"class":"STRING"},c={hash:{"class":"view.machine.state"},contexts:[],types:[],hashContexts:l,hashTypes:f,data:s},s.buffer.push(p((u=r["bind-attr"]||n&&n["bind-attr"],u?u.call(n,c):d.call(n,"bind-attr",c)))),s.buffer.push(">"),f={},l={},s.buffer.push(p(r._triageMustache.call(n,"state",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push("</h1>\n\n        "),f={},l={},a=r.unless.call(n,"view.machine.id",{hash:{},inverse:h.noop,fn:h.program(1,v,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push('\n\n        <span class="ui-btn-right" id="mist-manage-keys">\n            '),f={},l={},a=r["if"].call(n,"pendingCreation",{hash:{},inverse:h.program(6,y,s),fn:h.program(4,g,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push('\n        </span>\n    </div>\n\n    <div data-role="content" data-theme="c">\n\n        <!--\n\n             Info popups\n\n        -->\n\n\n        '),f={},l={},a=r["if"].call(n,"enablingMonitoring",{hash:{},inverse:h.noop,fn:h.program(11,E,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n\n        "),f={},l={},a=r["if"].call(n,"disablingMonitoring",{hash:{},inverse:h.noop,fn:h.program(14,x,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n\n        "),f={},l={},a=r["if"].call(n,"pendingStats",{hash:{},inverse:h.noop,fn:h.program(16,T,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push('\n\n        <!--\n\n             Monitoring collapsible\n\n        -->\n\n        <div data-role="collapsible" id="monitoring-collapsible" data-collapsed="false">\n\n            <h3>Monitoring</h3>\n\n            '),f={},l={},a=r["if"].call(n,"hasMonitoring",{hash:{},inverse:h.program(26,O,s),fn:h.program(18,N,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push('\n\n        </div>\n\n        <!--\n\n             Information collapsibles\n\n        -->\n\n        <div data-role="collapsible" data-collapsed="false">\n\n            <h3>Basic Info</h3>\n\n            <table class="info-table">\n                <tr>\n                    <td>Last probed</td>\n                    <td> '),f={},l={},a=r["if"].call(n,"probing",{hash:{},inverse:h.program(31,D,s),fn:h.program(29,_,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n                    </td>\n                </tr>\n                </tr>\n                "),f={},l={},a=r["if"].call(n,"probed",{hash:{},inverse:h.noop,fn:h.program(33,P,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n                "),f={},l={},a=r["if"].call(n,"loadavg",{hash:{},inverse:h.noop,fn:h.program(35,H,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n                "),f={},l={},a=r["if"].call(n,"latency",{hash:{},inverse:h.noop,fn:h.program(37,B,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n                "),f={},l={},a=r["if"].call(n,"loss",{hash:{},inverse:h.noop,fn:h.program(39,j,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n                "),f={},l={},a=r["if"].call(n,"tags",{hash:{},inverse:h.noop,fn:h.program(41,F,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n\n                "),f={},l={},a=r.each.call(n,"view.basicInfo",{hash:{},inverse:h.noop,fn:h.program(44,q,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push("\n            </table>\n        </div>\n\n        "),f={},l={},a=r["if"].call(n,"view.metadata",{hash:{},inverse:h.noop,fn:h.program(46,R,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push('\n\n        <div class="mid-padding"></div>\n\n    </div>\n\n    '),f={},l={},s.buffer.push(p(r.view.call(n,"Mist.messageboxView",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push("\n\n    "),f={},l={},s.buffer.push(p(r.view.call(n,"Mist.machineKeysView",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push("\n\n    "),f={},l={},s.buffer.push(p(r.view.call(n,"Mist.machineTagsView",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push("\n\n    "),f={},l={},s.buffer.push(p(r.view.call(n,"Mist.machineShellView",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push("\n\n    "),f={},l={},s.buffer.push(p(r.view.call(n,"Mist.machinePowerView",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push("\n\n    "),f={},l={},s.buffer.push(p(r.view.call(n,"Mist.confirmationDialog",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push("\n\n    "),f={},l={},s.buffer.push(p(r.view.call(n,"Mist.machineManualMonitoringView",{hash:{},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push('\n\n    <div id="manual-monitoring-popup" class="mid-popup" data-role="popup" data-transition="popp"\n         data-overlay-theme="b" data-disimissible="false">\n\n        <div data-role="header" data-theme="b">\n            <h1>Manual collectd installation</h1>\n        </div>\n\n        <div data-role="content" data-theme="c">\n\n            <p>Run these commands on your server:</p>\n            <textarea>Command here...</textarea>\n            <a data-role="button" '),l={target:n},f={target:"STRING"},s.buffer.push(p(r.action.call(n,"closeManualMonitoringPopup",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push('>Back</a>\n        </div>\n    </div>\n\n    <!--\n       TODO: These should be in monitoring view\n    -->\n\n    <div class="rule-metric-popup"data-role="popup">\n        <ul data-role="listview">\n            '),f={},l={},a=r.each.call(n,"Mist.rulesController.metricList",{hash:{},inverse:h.noop,fn:h.program(48,U,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push('\n        </ul>\n    </div>\n\n    <div class="rule-operator-popup" data-role="popup">\n        <ul data-role="listview">\n            '),f={},l={},a=r.each.call(n,"Mist.rulesController.operatorList",{hash:{},inverse:h.noop,fn:h.program(50,z,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push('\n        </ul>\n    </div>\n\n    <div class="rule-action-popup" data-role="popup">\n        <ul data-role="listview">\n            '),f={},l={},a=r.each.call(n,"Mist.rulesController.actionList",{hash:{},inverse:h.noop,fn:h.program(48,U,s),contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}),(a||a===0)&&s.buffer.push(a),s.buffer.push('\n            <li class="ui-state-disabled" data-icon="false">\n                <a>launch</a>\n            </li>\n        </ul>\n    </div>\n\n    <div class="rule-command-popup large-popup" data-role="popup">\n        <div data-role="header">\n            <h1>Command</h1>\n        </div>\n        <div data-role="content">\n            '),l={valueBinding:n,name:n},f={valueBinding:"STRING",name:"STRING"},s.buffer.push(p(r.view.call(n,"Ember.TextArea",{hash:{valueBinding:"Mist.rulesController.command",name:"rule-command-content"},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push('\n            <div data-role="controlgroup" class="btn-full ok-cancel" data-type="horizontal">\n                <a data-role="button" data-theme="c" data-rel="back">Back</a>\n                <a data-role="button" data-theme="b" '),l={target:n},f={target:"STRING"},s.buffer.push(p(r.action.call(n,"saveCommand",{hash:{target:"Mist.rulesController"},contexts:[n],types:["ID"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push('>Save</a>\n            </div>\n        </div>\n    </div>\n\n    <!--\n       These ^^^^^^^\n    -->\n\n    <div class="tri-action-footer" data-role="footer" data-theme="b">\n        <table><tbody><tr><td>\n            <a id="single-machine-tags-btn" data-role="button" data-icon="grid"'),l={target:n},f={target:"STRING"},s.buffer.push(p(r.action.call(n,"tagsClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push('>Tags</a>\n        </td><td>\n            <a id="single-machine-shell-btn" data-role="button" data-icon="gear" '),l={target:n},f={target:"STRING"},s.buffer.push(p(r.action.call(n,"shellClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push('>Shell</a>\n        </td><td>\n            <a id="single-machine-power-btn" data-role="button" data-icon="power" '),l={target:n},f={target:"STRING"},s.buffer.push(p(r.action.call(n,"powerClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:l,hashTypes:f,data:s}))),s.buffer.push(">Power</a>\n        </td></tr></tbody></table>\n    </div>\n\n</div>\n"),o}),Ember.TEMPLATES["machine_add/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){var n="",i,s,o;return t.buffer.push("\n                    "),s={},o={},i=r["if"].call(e,"enabled",{hash:{},inverse:c.noop,fn:c.program(2,p,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n                "),n}function p(e,t){var n="",i,s,o;return t.buffer.push("\n                        "),s={},o={},i=r.unless.call(e,"isBareMetal",{hash:{},inverse:c.noop,fn:c.program(3,d,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n                    "),n}function d(e,t){var n="",i,s;return t.buffer.push('\n                            <li data-icon="false">\n                                <a '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"selectProvider","",{hash:{target:"view"},contexts:[e,e],types:["STRING","ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">"),s={},i={},t.buffer.push(l(r._triageMustache.call(e,"title",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("</a>\n                            </li>\n                        "),n}function v(e,t){var n="",i,s,o;return t.buffer.push("\n                    "),s={},o={},i=r.unless.call(e,"Mist.machineAddController.newMachineProvider.images.hasStarred",{hash:{},inverse:c.program(8,g,t),fn:c.program(6,m,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n                "),n}function m(e,t){var n="",i,s;return t.buffer.push('\n                        <li data-icon="false">\n                            <a '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"selectImage","",{hash:{target:"view"},contexts:[e,e],types:["STRING","ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">"),s={},i={},t.buffer.push(l(r._triageMustache.call(e,"name",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("</a>\n                        </li>\n                    "),n}function g(e,t){var n="",i,s,o;return t.buffer.push(" "),s={},o={},i=r["if"].call(e,"star",{hash:{},inverse:c.noop,fn:c.program(6,m,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push(" "),n}function y(e,t){var n="",i,s;return t.buffer.push('\n                <li data-icon="false">\n                    <a '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"selectSize","",{hash:{target:"view"},contexts:[e,e],types:["STRING","ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">"),s={},i={},t.buffer.push(l(r._triageMustache.call(e,"name",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push('\n                        <span class="size-decription">\n                         - disk:'),s={},i={},t.buffer.push(l(r._triageMustache.call(e,"disk",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(", ram:"),s={},i={},t.buffer.push(l(r._triageMustache.call(e,"ram",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("\n                        </span>\n                    </a>\n                </li>\n                "),n}function b(e,t){var n="",i,s;return t.buffer.push('\n                <li data-icon="false">\n                    <a '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"selectLocation","",{hash:{target:"view"},contexts:[e,e],types:["STRING","ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">"),s={},i={},t.buffer.push(l(r._triageMustache.call(e,"name",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("</a>\n                </li>\n                "),n}function w(e,t){var n="",i,s;return t.buffer.push('\n                    <li data-icon="false">\n                        <a '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"selectKey","",{hash:{target:"view"},contexts:[e,e],types:["STRING","ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">"),s={},i={},t.buffer.push(l(r._triageMustache.call(e,"id",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("</a>\n                    </li>\n                "),n}function E(e,t){var n="",i,s;return t.buffer.push("\n            Estimated price:\n            <span>"),i={},s={},t.buffer.push(l(r._triageMustache.call(e,"view.price",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:i,data:t}))),t.buffer.push("</span>\n        "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="create-machine-panel"\n     data-swipe-close="false"\n     class="side-panel"\n     data-role="panel"\n     data-position="right"\n     data-display="overlay"\n     data-theme="b">\n\n    <div data-role="header">\n        <h1>Create Machine</h1>\n    </div>\n\n    <div data-role="content" data-theme="b">\n\n        <!-- Select Name -->\n\n        <label for="create-machine-name">1. Name:</label>\n        '),a={id:n,"data-theme":n,valueBinding:n},f={id:"STRING","data-theme":"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"create-machine-name","data-theme":"a",valueBinding:"Mist.machineAddController.newMachineName"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n\n        <!-- Select Provider -->\n\n        <label>2. Provider:</label>\n        <div id="create-machine-provider"\n             data-role="collapsible"\n             data-iconpos="right"\n             data-collapsed-icon="arrow-d"\n             data-expanded-icon="arrow-u"\n             data-theme="a"\n             class="mist-select">\n            <h2>'),f={},a={},s.buffer.push(l(r._triageMustache.call(n,"Mist.machineAddController.newMachineProvider.title",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('</h2>\n            <ul data-role="listview" data-theme="a">\n                '),f={},a={},u=r.each.call(n,"Mist.backendsController.content",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n            </ul>\n        </div>\n\n        <!-- Select Image -->\n\n        <label>3. Image:</label>\n        <div id="create-machine-image"\n             data-role="collapsible"\n             data-iconpos="right"\n             data-collapsed-icon="arrow-d"\n             data-expanded-icon="arrow-u"\n             data-theme="a"\n             class="mist-select">\n            <h2>'),f={},a={},s.buffer.push(l(r._triageMustache.call(n,"Mist.machineAddController.newMachineImage.name",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('</h2>\n            <ul data-role="listview" data-theme="a">\n                '),f={},a={},u=r.each.call(n,"Mist.machineAddController.newMachineProvider.images",{hash:{},inverse:c.noop,fn:c.program(5,v,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n            </ul>\n        </div>\n\n        <!-- Select Size -->\n\n        <label>4. Size:</label>\n        <div id="create-machine-size"\n             data-role="collapsible"\n             data-iconpos="right"\n             data-collapsed-icon="arrow-d"\n             data-expanded-icon="arrow-u"\n             data-theme="a"\n             class="mist-select">\n            <h2>'),f={},a={},s.buffer.push(l(r._triageMustache.call(n,"Mist.machineAddController.newMachineSize.name",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('</h2>\n            <ul data-role="listview" data-theme="a">\n                '),f={},a={},u=r.each.call(n,"Mist.machineAddController.newMachineProvider.sizes",{hash:{},inverse:c.noop,fn:c.program(10,y,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n            </ul>\n        </div>\n\n        <!-- Select Location -->\n\n        <label>5. Location:</label>\n        <div id="create-machine-location"\n             data-role="collapsible"\n             data-iconpos="right"\n             data-collapsed-icon="arrow-d"\n             data-expanded-icon="arrow-u"\n             data-theme="a"\n             class="mist-select">\n            <h2>'),f={},a={},s.buffer.push(l(r._triageMustache.call(n,"Mist.machineAddController.newMachineLocation.name",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('</h2>\n            <ul data-role="listview" data-theme="a">\n                '),f={},a={},u=r.each.call(n,"Mist.machineAddController.newMachineProvider.locations",{hash:{},inverse:c.noop,fn:c.program(12,b,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n            </ul>\n        </div>\n\n        <!-- Select Key -->\n\n        <label>6. Key:</label>\n        <div id="create-machine-key"\n             data-role="collapsible"\n             data-iconpos="right"\n             data-collapsed-icon="arrow-d"\n             data-expanded-icon="arrow-u"\n             data-theme="a"\n             class="mist-select">\n            <h2>'),f={},a={},s.buffer.push(l(r._triageMustache.call(n,"Mist.machineAddController.newMachineKey.id",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('</h2>\n            <ul data-role="listview" data-theme="a">\n                '),f={},a={},u=r.each.call(n,"Mist.keysController.content",{hash:{},inverse:c.noop,fn:c.program(14,w,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n                <li data-icon="false" data-theme="d">\n                    <a '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"createKeyClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Add Key</a>\n                </li>\n            </ul>\n        </div>\n\n        <!-- Select Script -->\n\n        <label for="create-machine-script">7.Script:</label>\n        '),a={id:n,"data-theme":n,valueBinding:n},f={id:"STRING","data-theme":"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"create-machine-script","data-theme":"a",valueBinding:"Mist.machineAddController.newMachineScript"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n\n        <div id="create-machine-cost">\n        '),f={},a={},u=r["if"].call(n,"view.price",{hash:{},inverse:c.noop,fn:c.program(16,E,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n        </div>\n\n        <div class="ok-cancel" data-role="ui-grid-a" >\n            <div class="ui-block-a">\n                <a data-role="button"\n                   data-theme="a"\n                   '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Back</a>\n            </div>\n            <div class="ui-block-b">\n                <button id="create-machine-ok"\n                        data-theme="d"\n                        '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"launchClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">Launch!</button>\n            </div>\n        </div>\n    </div>\n</div>\n\n"),f={},a={},s.buffer.push(l(r.view.call(n,"Mist.keyAddView",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push("\n"),o}),Ember.TEMPLATES["machine_keys/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){var n="",i,s,o;return t.buffer.push('\n        <ul id="machine-keys" data-role="listview">\n            '),s={},o={},i=r.each.call(e,"Mist.machineKeysController.associatedKeys",{hash:{},inverse:c.noop,fn:c.program(2,p,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n        </ul>\n        "),n}function p(e,t){var n="",i,s;return t.buffer.push("\n                "),i={keyBinding:e},s={keyBinding:"STRING"},t.buffer.push(l(r.view.call(e,"Mist.machineKeysListItemView",{hash:{keyBinding:"this"},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("\n            "),n}function d(e,t){t.buffer.push('\n            <div class="ajax-loader"></div>\n        ')}function v(e,t){var n="",i,s,o;return t.buffer.push(" "),s={},o={},i=r["if"].call(e,"Mist.keysController.disassociatingKey",{hash:{},inverse:c.noop,fn:c.program(4,d,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push(" "),n}function m(e,t){var n="",i,s;return t.buffer.push('\n        <li data-icon="false">\n            <a '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"nonAssociatedKeyClicked","",{hash:{target:"view"},contexts:[e,e],types:["STRING","ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">"),s={},i={},t.buffer.push(l(r._triageMustache.call(e,"id",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("</a>\n        </li>\n        "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="machine-keys-panel"\n    data-swipe-close="false"\n    class="side-panel"\n    data-role="panel"\n    data-position="right"\n    data-display="overlay"\n    data-theme="b">\n\n    <div data-role="header">\n        <h1>Manage Keys</h1>\n    </div>\n\n    <div data-role="content" data-theme="b">\n\n        <a id="associate-btn"\n           data-role="button"\n           data-theme="d"\n           '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"associateClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">Associate</a>\n\n        "),f={},a={},u=r["if"].call(n,"Mist.machineKeysController.associatedKeys",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n\n        "),f={},a={},u=r["if"].call(n,"Mist.keysController.associatingKey",{hash:{},inverse:c.program(6,v,s),fn:c.program(4,d,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n\n        <a data-role="button" data-theme="a" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">Back</a>\n\n    </div>\n\n</div>\n\n"),f={},a={},s.buffer.push(l(r.view.call(n,"Mist.keyAddView",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n\n<div id="key-actions-popup" class="tiny-popup" data-role="popup" data-overlay-theme="b" data-transition="flip"\n                                                                                        data-position-to="#machine-keys"\n                                                                                        data-theme="b">\n    <div data-role="header">\n        <h1>Actions</h1>\n    </div>\n\n    <div data-role="content">\n        <button data-theme="a" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"removeClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Remove</button>\n        <button data-theme="a" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"probeClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Probe</button>\n        <button data-theme="a" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"cancelClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Cancel</button>\n    </div>\n</div>\n\n<div id="non-associated-keys-popup" class="tiny-popup" data-role="popup" data-overlay-theme="b" data-transition="flip"\n                                                                                        data-position-to="#associate-btn">\n    <ul data-role="listview">\n        '),f={},a={},u=r.each.call(n,"Mist.machineKeysController.nonAssociatedKeys",{hash:{},inverse:c.noop,fn:c.program(8,m,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n        <li data-icon="false" data-theme="d">\n            <a '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"newKeyClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>New key</a>\n        </li>\n    </ul>\n</div>\n<!-- data-position-to="#machine-keys-panel" -->\n<div id="machine-userPort-popup" class="large-popup" data-role="popup" data-overlay-theme="b" data-position-to="#machine-keys-panel"  data-transition="pop">\n\n    <div data-role="header" data-theme="b">\n        <h2 class=\'title\'>SSH user & port</h2>\n    </div>\n\n    <div data-role="content">\n        <div class="message">\n            Cannot connect as root on port 22\n        </div>\n        <label for="user">User:</label>\n        '),a={id:n,placeholder:n,valueBinding:n},f={id:"STRING",placeholder:"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"user",placeholder:"root",valueBinding:"Mist.machineKeysController.user"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n\n        <label for="port">Port:</label>\n        '),a={id:n,placeholder:n,valueBinding:n},f={id:"STRING",placeholder:"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{id:"port",placeholder:"22",valueBinding:"Mist.machineKeysController.port"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n\n        <div class="ok-cancel" data-role="controlgroup" data-type="horizontal">\n            <a data-role="button" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"closeSSH_Details",{hash:{target:"Mist.machineKeysController"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Cancel</a>\n            <a id="tryAssociate" data-role="button" data-theme="d" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"customAssociateClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">Retry</a>\n        </div>\n\n    </div>\n\n</div>\n"),o}),Ember.TEMPLATES["machine_keys_list_item/html"]=Ember.Handlebars.template(function(t,n,r,i,s){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l,c=this.escapeExpression,h=r.helperMissing;return s.buffer.push('<span class="small-list-item" '),a={on:n,target:n},f={on:"STRING",target:"STRING"},s.buffer.push(c(r.action.call(n,"associatedKeyClicked","",{hash:{on:"click",target:"view"},contexts:[n,n],types:["STRING","ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">\n\n    <p "),a={"class":n},f={"class":"STRING"},l={hash:{"class":"view.keyIcon"},contexts:[],types:[],hashContexts:a,hashTypes:f,data:s},s.buffer.push(c((u=r["bind-attr"]||n&&n["bind-attr"],u?u.call(n,l):h.call(n,"bind-attr",l)))),s.buffer.push(">"),f={},a={},s.buffer.push(c(r._triageMustache.call(n,"id",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push("</p>\n\n</span>\n"),o}),Ember.TEMPLATES["machine_list/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){var n="",i,s,o;return t.buffer.push("\n                "),s={},o={},i=r.each.call(e,"machines",{hash:{},inverse:c.noop,fn:c.program(2,p,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n            "),n}function p(e,t){var n="",i,s;return t.buffer.push("\n                    "),i={machineBinding:e,"class":e},s={machineBinding:"STRING","class":"STRING"},t.buffer.push(l(r.view.call(e,"Mist.machineListItemView",{hash:{machineBinding:"this","class":"checkbox-link"},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("\n                "),n}function d(e,t){var n="",i,s;return t.buffer.push('\n            <li data-icon="false">\n                <a '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"selectionModeClicked","title",{hash:{target:"view"},contexts:[e,e],types:["STRING","ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">"),s={},i={},t.buffer.push(l(r._triageMustache.call(e,"title",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("</a>\n            </li>\n            "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="machine-list-page" data-role="page" class="ui-page-active" data-theme="c">\n\n    <div data-role="header" data-theme="b">\n\n        <a href="#" class="responsive-button" data-icon="home">Home</a>\n\n        <h1>Machines</h1>\n\n        '),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.userMenuView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n    </div>\n\n    <div data-role="content" data-theme="c">\n\n        <a id="create-machine-btn"\n           class="responsive-button"\n           data-role="button"\n           data-icon="plus"\n           data-iconpos="right"\n           data-theme="d"\n           '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"createClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Create</a>\n          \n        <a id="select-machines-btn"\n           class="responsive-button"\n           data-role="button"\n           data-icon="arrow-d"\n           '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"selectClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Select</a>\n\n        <ul id="machines" \n            data-role="listview" \n            data-inset="true" \n            data-filter="true" \n            data-filter-placeholder="Filter..."\n            data-theme="c"\n            class="checkbox-list">\n            '),a={},f={},u=r.each.call(n,"Mist.backendsController",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n        </ul>\n\n        <div class="mid-padding"></div>\n\n    </div>\n\n    '),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.machineAddView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n\n    "),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.machineTagsView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n\n    "),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.machineShellView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n\n    "),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.machinePowerView",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("\n\n    "),a={},f={},s.buffer.push(l(r.view.call(n,"Mist.confirmationDialog",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n\n    <div id="select-machines-popup" data-role="popup" data-overlay-theme="b" data-transition="flip" data-position-to="#select-machines-btn">\n        <ul data-role="listview">\n            <li data-icon="false">\n                <a '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"selectionModeClicked","all",{hash:{target:"view"},contexts:[n,n],types:["STRING","STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>All</a>\n            </li>\n            <li data-icon="false">\n                <a '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"selectionModeClicked","none",{hash:{target:"view"},contexts:[n,n],types:["STRING","STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">None</a>\n            </li>\n            "),a={},f={},u=r.each.call(n,"Mist.backendsController.content",{hash:{},inverse:c.noop,fn:c.program(4,d,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n        </ul>\n    </div>\n\n    <div class="tri-action-footer" data-role="footer" data-theme="b">\n        <table><tbody><tr><td>\n            <a id="machines-tags-btn" data-role="button" data-icon="grid" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"tagsClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Tags</a>\n        </td><td>\n            <a id="machines-shell-btn" data-role="button" data-icon="gear" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"shellClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('>Shell</a>\n        </td><td>\n            <a id="machines-power-btn" data-role="button" data-icon="power" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"powerClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">Power</a>\n        </td></tr></tbody></table>\n    </div>\n\n</div>\n"),o}),Ember.TEMPLATES["machine_list_item/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function p(e,t){var n="",i,s,o,u,a;return t.buffer.push("\n\n    <label>"),o={checkedBinding:e},u={checkedBinding:"STRING"},t.buffer.push(h(r.view.call(e,"Mist.Checkbox",{hash:{checkedBinding:"view.machine.selected"},contexts:[e],types:["ID"],hashContexts:o,hashTypes:u,data:t}))),t.buffer.push("</label>\n    "),o={classBinding:e},u={classBinding:"STRING"},a={hash:{classBinding:"view.machine.hasMonitoring"},inverse:l.noop,fn:l.program(2,d,t),contexts:[e,e],types:["STRING","ID"],hashContexts:o,hashTypes:u,data:t},s=(i=r["link-to"]||e&&e["link-to"],i?i.call(e,"machine","view.machine",a):c.call(e,"link-to","machine","view.machine",a)),(s||s===0)&&t.buffer.push(s),t.buffer.push("\n    \n"),n}function d(e,t){var n="",i,s,o,u,a;return t.buffer.push('\n    \n        <div class="ui-grid-b">\n            <div class="ui-block-a machine-name">'),o={},u={},t.buffer.push(h(r._triageMustache.call(e,"view.machine.name",{hash:{},contexts:[e],types:["ID"],hashContexts:u,hashTypes:o,data:t}))),t.buffer.push('</div>\n    \n            <span class="ui-block-b machine-state">\n                <span '),u={"class":e},o={"class":"STRING"},a={hash:{"class":"view.machine.state"},contexts:[],types:[],hashContexts:u,hashTypes:o,data:t},t.buffer.push(h((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,a):c.call(e,"bind-attr",a)))),t.buffer.push(">\n                "),o={},u={},t.buffer.push(h(r._triageMustache.call(e,"view.machine.state",{hash:{},contexts:[e],types:["ID"],hashContexts:u,hashTypes:o,data:t}))),t.buffer.push("\n\n                "),o={},u={},s=r["if"].call(e,"pendingCreation",{hash:{},inverse:l.program(5,m,t),fn:l.program(3,v,t),contexts:[e],types:["ID"],hashContexts:u,hashTypes:o,data:t}),(s||s===0)&&t.buffer.push(s),t.buffer.push('\n                </span>\n            </span>\n\n            <div class="ui-block-c machine-leds">\n                <span>\n                    '),o={},u={},s=r["if"].call(e,"view.machine.hasMonitoring",{hash:{},inverse:l.noop,fn:l.program(7,g,t),contexts:[e],types:["ID"],hashContexts:u,hashTypes:o,data:t}),(s||s===0)&&t.buffer.push(s),t.buffer.push("\n                </span>\n                "),o={},u={},s=r.unless.call(e,"pendingCreation",{hash:{},inverse:l.noop,fn:l.program(9,y,t),contexts:[e],types:["ID"],hashContexts:u,hashTypes:o,data:t}),(s||s===0)&&t.buffer.push(s),t.buffer.push('\n                \n            </div>\n            \n            <div class="ui-block-c machine-tags">              \n                <span class="tag">'),o={},u={},t.buffer.push(h(r._triageMustache.call(e,"view.machine.backend.title",{hash:{},contexts:[e],types:["ID"],hashContexts:u,hashTypes:o,data:t}))),t.buffer.push("</span>\n                "),o={},u={},s=r.each.call(e,"view.machine.tags",{hash:{},inverse:l.noop,fn:l.program(11,b,t),contexts:[e],types:["ID"],hashContexts:u,hashTypes:o,data:t}),(s||s===0)&&t.buffer.push(s),t.buffer.push("             \n            </div>    \n                                \n        </div>\n    "),n}function v(e,t){t.buffer.push("\n                    <div class='ajax-loader'></div>\n                ")}function m(e,t){var n="",i,s,o;return t.buffer.push(" "),s={},o={},i=r["if"].call(e,"waitState",{hash:{},inverse:l.noop,fn:l.program(3,v,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push(" "),n}function g(e,t){t.buffer.push("\n                        <span></span>\n                    ")}function y(e,t){var n="",i,s,o,u;return t.buffer.push("\n                    <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"probing probed"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(h((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):c.call(e,"bind-attr",u)))),t.buffer.push('>\n                        <div class="loadleds">                                                                      \n                            <div '),s={"class":e},o={"class":"STRING"},u={hash:{"class":"loadavg15 :led"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(h((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):c.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div>                \n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"loadavg5 :led"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(h((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):c.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div> \n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"loadavg1 :led"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(h((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):c.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div>\n                        </div>\n                        <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":":netleds"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(h((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):c.call(e,"bind-attr",u)))),t.buffer.push(">\n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"netled4 :netled1"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(h((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):c.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div> \n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"netled3 :netled2"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(h((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):c.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div> \n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"netled2 :netled3"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(h((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):c.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div> \n                            <div "),s={"class":e},o={"class":"STRING"},u={hash:{"class":"netled1 :netled4"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(h((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):c.call(e,"bind-attr",u)))),t.buffer.push(">\n                            </div>\n                        </div>\n                                                 \n                    </div>\n                "),n}function b(e,t){var n="",i,s;return t.buffer.push('\n                <span class="tag">'),i={},s={},t.buffer.push(h(r._triageMustache.call(e,"",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:i,data:t}))),t.buffer.push("</span>\n                "),n}function w(e,t){var n="",i,s,o,u;return t.buffer.push('\n\n    <a class="ui-icon-delete" '),s={target:e},o={target:"STRING"},t.buffer.push(h(r.action.call(e,"disassociateGhostMachine",{hash:{target:"view"},contexts:[e],types:["ID"],hashContexts:s,hashTypes:o,data:t}))),t.buffer.push('>\n        \n        <div class="ui-grid-b">\n            <div class="ui-block-a machine-name">'),o={},s={},t.buffer.push(h(r._triageMustache.call(e,"view.machine.name",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:o,data:t}))),t.buffer.push('</div>\n    \n            <span class="ui-block-b machine-state">\n                <span '),s={"class":e},o={"class":"STRING"},u={hash:{"class":"view.machine.state"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(h((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):c.call(e,"bind-attr",u)))),t.buffer.push(">\n                    "),o={},s={},t.buffer.push(h(r._triageMustache.call(e,"view.machine.state",{hash:{},contexts:[e],types:["ID"],hashContexts:s,hashTypes:o,data:t}))),t.buffer.push("\n                </span>\n            </span> \n                                \n        </div>\n\n    </a>\n    \n"),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this,c=r.helperMissing,h=this.escapeExpression;return a={},f={},u=r.unless.call(n,"view.machine.isGhost",{hash:{},inverse:l.program(13,w,s),fn:l.program(1,p,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n"),o}),Ember.TEMPLATES["machine_manual_monitoring/html"]=Ember.Handlebars.template(function(t,n,r,i,s){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f=this.escapeExpression;return s.buffer.push('<div id="manual-monitoring-popup"\n     class="large-popup"\n     data-role="popup"\n     data-overlay-theme="b"\n     data-transition="flip"\n     data-dismissible="false">\n\n    <div data-role="header" data-theme="b">\n        <h3>Enable Monitoring</h3>\n    </div>\n\n    <div data-role="content">\n\n        <p>Automatic installation of monitoring requires a valid key.</p>\n        <p> Run this command on your server for manual install: </p>\n\n        <div id="manual-monitoring-command" '),u={on:n,target:n},a={on:"STRING",target:"STRING"},s.buffer.push(f(r.action.call(n,"selectCommandText",{hash:{on:"click",target:"view"},contexts:[n],types:["STRING"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push(">\n\n            "),a={},u={},s.buffer.push(f(r._triageMustache.call(n,"Mist.machineManualMonitoringController.command",{hash:{},contexts:[n],types:["ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('\n\n        </div>\n\n        <div class="ok-cancel" data-role="controlgroup" data-type="horizontal">\n            <a class="ui-btn ui-corner-all" '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"cancelClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>Cancel</a>\n            <a class="ui-btn ui-btn-d ui-corner-all" '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"doneClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push(">Done</a>\n        </div>\n    </div>\n</div>\n"),o}),Ember.TEMPLATES["machine_power/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){var n="",i,s;return t.buffer.push('\n        <a data-role="button" data-theme="d" '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"actionClicked","start",{hash:{target:"view"},contexts:[e,e],types:["STRING","STRING"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">Start</a>\n        "),n}function p(e,t){var n="",i,s;return t.buffer.push('\n        <a data-role="button" data-theme="d" '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"actionClicked","shutdown",{hash:{target:"view"},contexts:[e,e],types:["STRING","STRING"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">Shutdown</a>\n        "),n}function d(e,t){var n="",i,s;return t.buffer.push('\n        <a data-role="button" data-theme="d" '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"actionClicked","reboot",{hash:{target:"view"},contexts:[e,e],types:["STRING","STRING"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">Reboot</a>\n        "),n}function v(e,t){var n="",i,s;return t.buffer.push('\n        <a data-role="button" data-theme="b" '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"actionClicked","destroy",{hash:{target:"view"},contexts:[e,e],types:["STRING","STRING"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">Destroy</a>\n        "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="machine-power-popup" \n     class="tiny-popup" \n     data-role="popup" \n     data-overlay-theme="b" \n     data-transition="slideup"\n     data-position-to="#machines-power-btn">\n\n    <div data-role="header" data-theme="b">\n        <h1>Power</h1>\n    </div>\n\n    <div data-role="content">\n        '),a={},f={},u=r["if"].call(n,"Mist.machinePowerController.canStart",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n        "),a={},f={},u=r["if"].call(n,"Mist.machinePowerController.canShutdown",{hash:{},inverse:c.noop,fn:c.program(3,p,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n        "),a={},f={},u=r["if"].call(n,"Mist.machinePowerController.canReboot",{hash:{},inverse:c.noop,fn:c.program(5,d,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n        "),a={},f={},u=r["if"].call(n,"Mist.machinePowerController.canDestroy",{hash:{},inverse:c.noop,fn:c.program(7,v,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n        <a data-role="button" '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">Back</a>\n    </div>\n</div>\n"),o}),Ember.TEMPLATES["machine_shell/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){var n="",i,s;return t.buffer.push("\n            "),i={commandBinding:e},s={commandBinding:"STRING"},t.buffer.push(l(r.view.call(e,"Mist.machineShellListItemView",{hash:{commandBinding:"this"},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("\n        "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="machine-shell-popup"\n     class="huge-popup" \n     data-role="popup"\n     data-theme="b"\n     data-overlay-theme="b" \n     data-transition="slideup">\n\n    <div data-role="header">\n        <h1>'),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"Mist.machineShellController.machine.user",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("@\n            "),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"Mist.machineShellController.machine.name",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('</h1>\n    </div>\n\n    <div data-role="content">\n        <table id="shell-input">\n            <tr>\n                <td>\n                    '),f={"data-theme":n,valueBinding:n},a={"data-theme":"STRING",valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.ShellTextField",{hash:{"data-theme":"a",valueBinding:"Mist.machineShellController.command"},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n                </td>\n                <td id="shell-submit">\n                    <button data-theme="d" \n                        data-icon="shell-return" \n                        '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"submitClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('></button>\n                </td>\n            </tr>\n        </table>\n        <div id="shell-return" data-theme="a">\n        '),a={},f={},u=r.each.call(n,"Mist.machineShellController.machine.commandHistory",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n        </div>\n        <div class="ui-grid-a shell-back">\n            <a data-role="button" \n               data-theme="a" \n               '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">Back</a>\n        </div>\n        \n    </div>\n</div>\n"),o}),Ember.TEMPLATES["machine_shell_list_item/html"]=Ember.Handlebars.template(function(t,n,r,i,s){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l,c=r.helperMissing,h=this.escapeExpression;return s.buffer.push("<h3 "),a={id:n,"class":n},f={id:"STRING","class":"STRING"},l={hash:{id:"view.command.id","class":":command :ui-alt-icon view.command.pendingResponse"},contexts:[],types:[],hashContexts:a,hashTypes:f,data:s},s.buffer.push(h((u=r["bind-attr"]||n&&n["bind-attr"],u?u.call(n,l):c.call(n,"bind-attr",l)))),s.buffer.push("\n    "),a={target:n},f={target:"STRING"},s.buffer.push(h(r.action.call(n,"toggleCommand",{hash:{target:"view"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n    data-theme="c">\n    # '),f={},a={},s.buffer.push(h(r._triageMustache.call(n,"view.command.command",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n    <div class="shell-li-arrow ui-icon-carat-d ui-btn-icon-notext"></div>\n</h3>\n<div class="output">\n    <pre>'),f={},a={},s.buffer.push(h(r._triageMustache.call(n,"view.command.response",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push("</pre>\n</div>"),o}),Ember.TEMPLATES["machine_tags/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){var n="",i,s;return t.buffer.push("\n                "),i={tagBinding:e},s={tagBinding:"STRING"},t.buffer.push(l(r.view.call(e,"Mist.machineTagsListItemView",{hash:{tagBinding:"this"},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push("\n            "),n}function p(e,t){t.buffer.push('\n            <div class="ajax-loader"></div>\n        ')}function d(e,t){var n="",i,s,o;return t.buffer.push(" "),s={},o={},i=r["if"].call(e,"Mist.machineTagsController.deletingTag",{hash:{},inverse:c.noop,fn:c.program(3,p,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push(" "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div id="machine-tags-popup" \n     class="large-popup" \n     data-role="popup" \n     data-overlay-theme="b" \n     data-transition="flip">\n\n    <div data-role="header" data-theme="b">\n        <h1>Manage Tags</h1>\n    </div>\n\n    <div data-role="content" data-theme="a">\n\n        '),a={valueBinding:n},f={valueBinding:"STRING"},s.buffer.push(l(r.view.call(n,"Mist.TextField",{hash:{valueBinding:"Mist.machineTagsController.newTag"},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('\n\n        <a id="add-tag-ok" data-role="button" data-theme="d" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"addClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('>Add</a>\n\n        <ul data-role="listview">\n            '),f={},a={},u=r.each.call(n,"Mist.machineTagsController.machine.tags",{hash:{},inverse:c.noop,fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n        </ul>\n\n        "),f={},a={},u=r["if"].call(n,"Mist.machineTagsController.addingTag",{hash:{},inverse:c.program(5,d,s),fn:c.program(3,p,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n\n        <a id="add-tag-back" data-role="button" '),a={target:n},f={target:"STRING"},s.buffer.push(l(r.action.call(n,"backClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">Back</a>\n\n    </div>\n\n</div>\n"),o}),Ember.TEMPLATES["machine_tags_list_item/html"]=Ember.Handlebars.template(function(t,n,r,i,s){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f=this.escapeExpression;return s.buffer.push('<span class="small-list-item">\n\n    <p>'),u={},a={},s.buffer.push(f(r._triageMustache.call(n,"",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push('</p>\n\n    <button data-icon="delete" data-iconpos="notext" '),a={target:n},u={target:"STRING"},s.buffer.push(f(r.action.call(n,"deleteClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push("></button>\n\n</span>"),o}),Ember.TEMPLATES["messagebox/html"]=Ember.Handlebars.template(function(t,n,r,i,s){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f=this.escapeExpression;return s.buffer.push('\n    <div id="message-box-popup" class="large-popup" data-role="popup" data-overlay-theme="a" data-transition="flip"\n                                                                                            data-dismissible="false">\n        <div data-role="header">\n            <h1>'),u={},a={},s.buffer.push(f(r._triageMustache.call(n,"Mist.notificationController.msgHeader",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push('</h1>\n        </div>\n        <div data-role="content" data-theme="c">\n            <p>'),u={},a={},s.buffer.push(f(r._triageMustache.call(n,"Mist.notificationController.msgPart1",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push("</p>\n            <p>"),u={},a={},s.buffer.push(f(r._triageMustache.call(n,"Mist.notificationController.msgPart2",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push("</p>\n            <p>"),u={},a={},s.buffer.push(f(r._triageMustache.call(n,"Mist.notificationController.msgPart3",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push('</p>\n            <p id="message-ps">'),u={},a={},s.buffer.push(f(r._triageMustache.call(n,"Mist.notificationController.msgPart4",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push('</p>\n            <a id="message-link" target="_blank">\n                '),u={},a={},s.buffer.push(f(r._triageMustache.call(n,"Mist.notificationController.msgLink",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push("\n            </a>\n        </div>\n        <button "),a={target:n},u={target:"STRING"},s.buffer.push(f(r.action.call(n,"closeMessage",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:u,data:s}))),s.buffer.push(">OK</button>\n    </div>"),o}),Ember.TEMPLATES["monitoring/html"]=Ember.Handlebars.template(function(t,n,r,i,s){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f=this.escapeExpression;return s.buffer.push("<div class=\"graphControls\">\n\n    <div class=\"graphZoomer\">\n        <select id='zoomSelect' data-inline='true' onChange=\"Mist.monitoringController.UI.zoomChange()\">\n            <option value='0' selected='true'>Last 10 Minutes</option>\n            <option value='1' >Last 1 Hour</option>\n            <option value='2' >Last 1 Day</option>\n            <option value='3' >Last 1 Week</option>\n            <option value='4' >Last 1 Month</option>\n        </select> \n    </div>\n\n    <div class=\"graphMover\">\n        <a id='graphsGoBack' href=\"#\" data-role=\"button\" data-inline=\"true\" \n           "),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"goBack",{hash:{target:"Mist.monitoringController.history"},contexts:[n],types:["STRING"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>&lt;&lt;</a>\n                          \n        <a id=\'graphsResetHistory\' href="#" data-role="button" data-theme="b" data-inline="true" \n            '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"disable",{hash:{target:"Mist.monitoringController.history"},contexts:[n],types:["STRING"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>Reset</a>\n        <a id=\'graphsGoForward\' href="#" data-role="button" data-inline="true" \n            '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"goForward",{hash:{target:"Mist.monitoringController.history"},contexts:[n],types:["STRING"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>&gt;&gt;</a>\n    </div>\n   \n</div>\n\n<div id="GraphsArea">\n  \n    <div class="valuePopUp"></div>\n        \n    <!-- Graphs -->\n    <div id="cpuGraph" class="graph">\n        <div class=\'header\'>\n          <div class="title">CPU</div>\n          <div class=\'closeBtn\' '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"collapsePressed","view.graphs.cpu.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>-</div>\n        </div>\n    </div>\n    <div id="loadGraph" class="graph">\n        <div class=\'header\'>\n          <div class="title">Load</div>\n          <div class=\'closeBtn\' '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"collapsePressed","view.graphs.load.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>-</div>\n        </div>\n    </div>\n    <div id="memoryGraph" class="graph">\n        <div class=\'header\'>\n          <div class="title">Memory</div>\n          <div class=\'closeBtn\' '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"collapsePressed","view.graphs.memory.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>-</div>\n        </div>\n    </div>\n    <div id="diskReadGraph" class="graph">\n        <div class=\'header\'>\n          <div class="title">Disk Read (B/s)</div>\n          <div class=\'closeBtn\' '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"collapsePressed","view.graphs.diskRead.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>-</div>\n        </div>\n    </div>\n    <div id="diskWriteGraph" class="graph">\n        <div class=\'header\'>\n          <div class="title">Disk Write (B/s)</div>\n          <div class=\'closeBtn\' '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"collapsePressed","view.graphs.diskWrite.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>-</div>\n        </div>\n    </div>\n\n    <div id="networkTXGraph" class="graph">\n        <div class=\'header\'>\n          <div class="title">Network Tx (B/s)</div>\n          <div class=\'closeBtn\' '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"collapsePressed","view.graphs.networkTX.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>-</div>\n        </div>\n    </div>\n\n    <div id="networkRXGraph" class="graph">\n        <div class=\'header\'>\n          <div class="title">Network Rx (B/s)</div>\n          <div class=\'closeBtn\' '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"collapsePressed","view.graphs.networkRX.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>-</div>\n        </div>\n    </div>\n\n\n    <!-- Graph Buttons -->\n    <div id="graphBar">\n        <div id="cpuGraphBtn" class="graphBtn">\n            <button data-icon="carat-u" data-theme="c" \n                '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"expandPressed","view.graphs.cpu.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>CPU</button>\n        </div>\n\n        <div id="loadGraphBtn" class="graphBtn">\n            <button data-icon="carat-u" data-theme="c"\n                '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"expandPressed","view.graphs.load.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>Load</button>\n        </div>\n    \n        <div id="memoryGraphBtn" class="graphBtn">\n            <button data-icon="carat-u" data-theme="c"\n                '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"expandPressed","view.graphs.memory.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>Memory</button>\n        </div>\n    \n        <div id="diskReadGraphBtn" class="graphBtn">\n            <button data-icon="carat-u" data-theme="c"\n                '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"expandPressed","view.graphs.diskRead.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>Disk Read</button>\n        </div>\n    \n        <div id="diskWriteGraphBtn" class="graphBtn">\n            <button data-icon="carat-u" data-theme="c"\n                '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"expandPressed","view.graphs.diskWrite.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>Disk Write</button>\n        </div>\n    \n        <div id="networkTXGraphBtn" class="graphBtn">\n            <button data-icon="carat-u" data-theme="c"\n                '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"expandPressed","view.graphs.networkTX.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push('>Network Tx</button>\n        </div>\n    \n        <div  id="networkRXGraphBtn" class="graphBtn">\n            <button data-icon="carat-u" data-theme="c"\n                '),u={target:n},a={target:"STRING"},s.buffer.push(f(r.action.call(n,"expandPressed","view.graphs.networkRX.name",{hash:{target:"Mist.monitoringController.UI"},contexts:[n,n],types:["STRING","ID"],hashContexts:u,hashTypes:a,data:s}))),s.buffer.push(">Network Rx</button>\n        </div>\n    </div>\n</div>"),o}),Ember.TEMPLATES["rule/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function h(e,t){t.buffer.push('\n    <div class="ajax-loader"></div>\n    ')}function p(e,t){var n="",i,s;return t.buffer.push('\n    <div class="delete-rule-container">\n        <button class="delete-rule-button"\n                data-role="button"\n                data-icon="delete"\n                data-iconpos="notext"\n                data-mini="true"\n                '),i={target:e},s={target:"STRING"},t.buffer.push(l(r.action.call(e,"deleteRuleClicked",{hash:{target:"view"},contexts:[e],types:["ID"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">&nbsp;</button>\n    </div>\n    "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=this.escapeExpression,c=this;return s.buffer.push('<div class="rule-box" id="'),a={},f={},s.buffer.push(l(r.unbound.call(n,"id",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('">\n    <div class="rule-if">if</div>\n\n    <a href="#"\n        class="rule-button metric"\n        data-role="button"\n        data-iconpos="right"\n        data-inline="true"\n        '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"openMetricPopup",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">"),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"metric",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('</a>\n\n    <a href="#"\n        class="rule-button operator"\n        data-role="button"\n        data-icon="false"\n        data-inline="true"\n        '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"openOperatorPopup",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">"),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"operator.symbol",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('</a>\n\n    <div class="rule-unit">'),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"unit",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('</div>\n    <input type="number"\n        data-type="range"\n        data-highlight="true"\n        class="rule-value"\n        '),f={value:n},a={value:"STRING"},s.buffer.push(l(r.bindAttr.call(n,{hash:{value:"value"},contexts:[],types:[],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push('\n        min="0"\n        '),f={max:n},a={max:"STRING"},s.buffer.push(l(r.bindAttr.call(n,{hash:{max:"maxValue"},contexts:[],types:[],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(' />\n\n    <div class="rule-then">then</div>\n\n    <a href="#"\n        class="rule-button action"\n        data-role="button"\n        data-icon="false"\n        data-inline="true"\n        '),f={target:n},a={target:"STRING"},s.buffer.push(l(r.action.call(n,"openActionPopup",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push(">"),a={},f={},s.buffer.push(l(r._triageMustache.call(n,"actionToTake",{hash:{},contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}))),s.buffer.push("</a>\n\n    "),a={},f={},u=r["if"].call(n,"pendingAction",{hash:{},inverse:c.program(3,p,s),fn:c.program(1,h,s),contexts:[n],types:["ID"],hashContexts:f,hashTypes:a,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n\n</div>\n"),o}),Ember.TEMPLATES["user_menu/html"]=Ember.Handlebars.template(function(t,n,r,i,s){function p(e,t){var n="",i,s,o,u;return t.buffer.push('\n        <img class="gravatar-image" '),s={src:e},o={src:"STRING"},u={hash:{src:"view.gravatarURL"},contexts:[],types:[],hashContexts:s,hashTypes:o,data:t},t.buffer.push(c((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,u):l.call(e,"bind-attr",u)))),t.buffer.push("/>\n    "),n}function d(e,t){t.buffer.push('\n        <img class="gravatar-image" src="resources/images/user.png" />\n\n    ')}function v(e,t){var n="",i,s,o,u,a;return t.buffer.push('\n\n            <a data-role="button" data-mini="true"\n               '),o={href:e},u={href:"STRING"},a={hash:{href:"view.accountUrl"},contexts:[],types:[],hashContexts:o,hashTypes:u,data:t},t.buffer.push(c((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,a):l.call(e,"bind-attr",a)))),t.buffer.push("\n               "),o={target:e},u={target:"STRING"},a={hash:{target:"view.isNotCore"},contexts:[],types:[],hashContexts:o,hashTypes:u,data:t},t.buffer.push(c((i=r["bind-attr"]||e&&e["bind-attr"],i?i.call(e,a):l.call(e,"bind-attr",a)))),t.buffer.push(">Account</a>\n\n            "),u={},o={},s=r["if"].call(e,"Mist.isCore",{hash:{},inverse:h.noop,fn:h.program(6,m,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:u,data:t}),(s||s===0)&&t.buffer.push(s),t.buffer.push("\n        "),n}function m(e,t){var n="",i,s;return t.buffer.push('\n                <button data-mini="true" '),i={target:e},s={target:"STRING"},t.buffer.push(c(r.action.call(e,"logoutClicked",{hash:{target:"view"},contexts:[e],types:["STRING"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">Logout</a>\n            "),n}function g(e,t){var n="",i,s,o;return t.buffer.push("\n            "),s={},o={},i=r.unless.call(e,"Mist.isCore",{hash:{},inverse:h.noop,fn:h.program(9,y,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:s,data:t}),(i||i===0)&&t.buffer.push(i),t.buffer.push("\n        "),n}function y(e,t){var n="",i,s;return t.buffer.push('\n                <button data-mini="true" '),i={target:e},s={target:"STRING"},t.buffer.push(c(r.action.call(e,"loginClicked",{hash:{target:"view"},contexts:[e],types:["STRING"],hashContexts:i,hashTypes:s,data:t}))),t.buffer.push(">Login</a>\n            "),n}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),s=s||{};var o="",u,a,f,l=r.helperMissing,c=this.escapeExpression,h=this;return s.buffer.push('<a id="me-btn"\n   class="ui-btn-right"\n   data-role="button"\n   '),a={target:n},f={target:"STRING"},s.buffer.push(c(r.action.call(n,"meClicked",{hash:{target:"view"},contexts:[n],types:["STRING"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push(">\n    "),f={},a={},u=r["if"].call(n,"view.gravatarURL",{hash:{},inverse:h.program(3,d,s),fn:h.program(1,p,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push('\n    &nbsp;</a>\n\n<div id="user-menu-popup" data-role="popup" data-position-to="#me-btn" data-theme="b" data-overlay-theme="b" data-transition="flip">\n\n    <div data-role="content">\n\n        <div>'),f={},a={},s.buffer.push(c(r._triageMustache.call(n,"EMAIL",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),s.buffer.push('</div>\n\n        <a href="https://mistio.zendesk.com/access/login"\n           target="_blank"\n           data-role="button"\n           data-mini="true">Support</a>\n\n        '),f={},a={},u=r["if"].call(n,"Mist.authenticated",{hash:{},inverse:h.program(8,g,s),fn:h.program(5,v,s),contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}),(u||u===0)&&s.buffer.push(u),s.buffer.push("\n\n    </div>\n\n</div>\n\n"),f={},a={},s.buffer.push(c(r.view.call(n,"Mist.loginView",{hash:{},contexts:[n],types:["ID"],hashContexts:a,hashTypes:f,data:s}))),o})}),define("app/controllers/login",["ember"],function(){return Ember.Object.extend({email:null,password:null,callback:null,loggingIn:null,open:function(e){$("#login-popup").popup("open"),this._clear(),this._updateFormReady(),this.set("callback",e)},close:function(){$("#login-popup").popup("close"),this._clear()},login:function(){var e=this;this.set("loggingIn",!0),Mist.ajax.POST("/auth",{email:this.email,password:this.password}).success(function(e){Ember.run.next(function(){window.location.reload()})}).error(function(e){Mist.notificationController.notify("Authentication error: "+e)}).complete(function(t,n){e.set("loggingIn",!1),e._giveCallback(t,n)})},logout:function(){window.location="/logout"},_clear:function(){this.set("email",null),this.set("password",null),this.set("callback",null)},_updateFormReady:function(){this.set("formReady",this.email&&this.password)},_giveCallback:function(e,t){this.callback&&this.callback(e,t)},formObserver:function(){Ember.run.once(this,"_updateFormReady")}.observes("email","password")})}),define("app/models/machine",["ember"],function(){return Ember.Object.extend({id:null,name:null,probed:null,keysCount:0,probing:null,backend:null,selected:null,hasMonitoring:null,probeInterval:3e4,pendingCreation:null,isDestroying:!1,state:"stopped",prevState:null,waitState:null,lockState:null,stats:{cpu:[],load:[],disk:[]},graphdata:{},commandHistory:null,loss:null,latency:null,loadavg:null,loadavg1:null,loadavg5:null,loadavg15:null,netled1:function(){if(this.latency>0&&this.latency<1e3)return"on"}.property("latency"),netled2:function(){if(this.latency>0&&this.latency<500)return"on"}.property("latency"),netled3:function(){if(this.latency>0&&this.latency<250)return"on"}.property("latency"),netled4:function(){if(this.latency>0&&this.latency<100)return"on"}.property("latency"),netled4:function(){if(this.latency>0&&this.latency<40)return"on"}.property("latency"),lossled:function(){if(this.loss>.5)return"high-loss";if(this.loss>15)return"low-loss"},image:function(){return this.backend.images.getImage(this.imageId)}.property("imageId"),load:function(){this.set("commandHistory",[]),this.probe()}.on("init"),shutdown:function(e){this.backend.shutdownMachine(this.id,e)},destroy:function(e){this.backend.destroyMachine(this.id,e)},reboot:function(e){this.backend.rebootMachine(this.id,e)},start:function(e){this.backend.startMachine(this.id,e)},waitFor:function(e){this.set("waitState",e)},lockOn:function(e){this.set("prevState",this.state),this.set("lockState",e),this.set("state",e)},restoreState:function(){this.set("waitState",null),this.set("state",this.prevState)},getHost:function(){if(this.extra&&this.extra.dns_name)return this.extra.dns_name;try{var e=[];return this.public_ips.forEach(function(t){t.search(":")==-1&&e.push(t)}),e[0]}catch(t){return null}},probe:function(e,t){if(!this.backend.enabled)return;if(this.state!="running")return;if($.active>4){Ember.run.later(this,function(){this.probe(e,t)},1e3);return}var n=this;Mist.backendsController.probeMachine(n,e,function(r){t?t(r):r?Ember.run.later(function(){n.probe(e)},1e5):Ember.run.later(function(){n.probe(e),n.set("probeInterval",n.probeInterval*2)},n.probeInterval)})},stateObserver:function(){this.waitState&&(this.waitState!=this.state?this.set("state",this.lockState):(this.set("waitState",null),this.state=="running"&&Mist.backendsController.probeMachine(this)))}.observes("state")})}),define("app/controllers/machines",["app/models/machine"],function(e){return Ember.ArrayController.extend(Ember.Evented,{content:[],loading:null,backend:null,failCounter:null,addingMachine:null,startingMachine:null,rebootingMachine:null,destroyingMachine:null,shutingdownMachine:null,sortAscending:!0,sortProperties:["hasMonitoring","probed"],load:function(){if(!this.backend.enabled)return;var e=this;this.set("loading",!0),Mist.ajax.GET("/backends/"+this.backend.id+"/machines",{}).success(function(t){if(!e.backend.enabled)return;e.set("failCounter",0),e._updateContent(t),e._reload()}).error(function(){if(!e.backend.enabled)return;Mist.notificationController.notify("Failed to load machines for "+e.backend.title),e.set("failCounter",e.failCounter+1),e.failCounter==5?(e.set("failCounter",0),e.backend.set("enabled",!1)):e._reload()}).complete(function(t){if(!e.backend.enabled)return;e.set("loading",!1),e.trigger("onLoad")})},newMachine:function(t,n,r,i,s,o){var u=e.create({state:"pending",backend:this.backend,name:t,image:n,id:-1,pendingCreation:!0});this.addObject(u);var a=this;this.set("addingMachine",!0),Mist.ajax.POST("backends/"+this.backend.id+"/machines",{name:t,key:s.id,size:r.id,script:o,image:n.id,location:i.id,disk:r.disk,image_extra:n.extra,size_name:r.name,image_name:n.name,location_name:i.name}).success(function(e){a._createMachine(e,s)}).error(function(e){a.removeObject(u),Mist.notificationController.timeNotify("Failed to create machine: "+e,5e3)}).complete(function(e,t){a.set("addingMachine",!1),a.set("onMachineAdd")})},shutdownMachine:function(e,t){var n=this,r=this.getMachine(e);r.waitFor("stopped"),r.lockOn("pending"),this.set("shutingdownMachine",!0),Mist.ajax.POST("/backends/"+this.backend.id+"/machines/"+e,{action:"stop"}).success(function(){}).error(function(){r.restoreState(),Mist.notificationController.notify("Failed to shutdown machine")}).complete(function(e){n.set("shutingdownMachine",!1),n.trigger("onMachineShutdown"),t&&t(e)})},destroyMachine:function(e,t){var n=this,r=this.getMachine(e);r.waitFor("terminated"),r.lockOn("pending"),this.set("destroyingMachine",!0),r.set("beingDestroyed",!0),Mist.ajax.POST("/backends/"+this.backend.id+"/machines/"+e,{action:"destroy"}).success(function(){}).error(function(){r.restoreState(),Mist.notificationController.notify("Failed to destory machine")}).complete(function(e){n.set("destroyingMachine",!1),r.set("beingDestroyed",!1),n.trigger("onMachineDestroy"),t&&t(e)})},rebootMachine:function(e,t){var n=this,r=this.getMachine(e);r.waitFor("running"),r.lockOn("rebooting"),this.set("rebootingMachine",!0),Mist.ajax.POST("/backends/"+this.backend.id+"/machines/"+e,{action:"reboot"}).success(function(){}).error(function(){r.restoreState(),Mist.notificationController.notify("Failed to reboot machine")}).complete(function(e){n.set("rebootingMachine",!1),n.trigger("onMachineReboot"),t&&t(e)})},startMachine:function(e,t){var n=this,r=this.getMachine(e);r.waitFor("running"),r.lockOn("pending"),this.set("startingMachine",!0),Mist.ajax.POST("/backends/"+this.backend.id+"/machines/"+e,{action:"start"}).success(function(){}).error(function(){r.restoreState(),Mist.notificationController.notify("Failed to start machine")}).complete(function(e){n.set("startingMachine",!1),n.trigger("onMachineStart"),t&&t(e)})},clear:function(){Ember.run(this,function(){this.set("content",[]),this.set("loading",!1),this.trigger("onMachineListChange")})},getMachine:function(e){return this.content.findBy("id",e)},machineExists:function(e){return!!this.getMachine(e)},_reload:function(){Ember.run.later(this,function(){this.load()},this.backend.poll_interval)},_updateContent:function(t){var n=this;Ember.run(function(){var r=n.content.filterBy("id",-1);r.forEach(function(e){var n=t.findBy("name",e.name);if(n)for(attr in n)e.set(attr,n[attr])}),n.content.forEach(function(e){t.findBy("id",e.id)||e.id!=-1&&n.content.removeObject(e)}),t.forEach(function(t){if(n.machineExists(t.id)){var r=n.getMachine(t.id);for(attr in t)r.set(attr,t[attr])}else t.backend=n.backend,n.content.pushObject(e.create(t))}),n._updateMonitoredMachines(),n.trigger("onMachineListChange")})},_createMachine:function(e,t){var e=this.getMachine(e.id);Ember.run(this,function(){e.set("pendingCreation",!1),Mist.keysController._associateKey(t.id,e),e.probe(t.id),this.trigger("onMachineListChange")})},_updateSelectedMachines:function(){Ember.run(this,function(){var e=[];this.content.forEach(function(t){t.selected&&e.push(t)}),this.set("selectedMachines",e),this.trigger("onSelectedMachinesChange")})},_updateMonitoredMachines:function(){var e=this;Mist.monitored_machines&&e.content.forEach(function(t){Mist.monitored_machines.some(function(n){backend_id=n[0],machine_id=n[1];if(t.backend.id==backend_id&&t.id==machine_id&&!t.hasMonitoring)return e.getMachine(machine_id,backend_id).set("hasMonitoring",!0),!0}),Mist.rulesController.content.forEach(function(e){e.machine.id||e.machine==t.id&&e.backend==t.backend.id&&e.set("machine",t)})})},selectedMachinesObserver:function(){Ember.run.once(this,"_updateSelectedMachines")}.observes("content.@each.selected")})}),define("app/models/image",["ember"],function(){return Ember.Object.extend({TYPES:{rhel:"RedHat Enterprise Linux",ubuntu:"Ubuntu",ibm:"IBM",canonical:"Canonical",sles:"SUSE Linux Enterprise Server",oracle_linux:"Oracle Linux",karmic:"Karmic",opensolaris:"Open Solaris",windows:"Windows",gentoo:"Gentoo",opensuse:"openSUSE",fedora:"Fedora",centos:"CentOS",debian:"Debian",amazon:"Amazon"},id:null,star:null,name:null,extra:null,type:function(){for(type in this.TYPES)if(this.name!=null&&this.name.toLowerCase().search(type)!=-1)return type;return"generic"}.property("id"),toggle:function(e){this.backend.toggleImageStar(this,e)}})}),define("app/controllers/images",["app/models/image"],function(e){return Ember.ArrayController.extend(Ember.Evented,{content:[],loading:null,backend:null,hasStarred:function(){return!!this.content.findBy("star",!0)}.property("content.@each.star"),load:function(){if(!this.backend.enabled)return;var e=this;this.set("loading",!0),Mist.ajax.GET("/backends/"+this.backend.id+"/images",{}).success(function(t){if(!e.backend.enabled)return;e._setContent(t||[])}).error(function(){if(!e.backend.enabled)return;Mist.notificationController.notify("Failed to load images for "+e.backend.title),e.backend.set("enabled",!1)}).complete(function(t){if(!e.backend.enabled)return;e.set("loading",!1),e.trigger("onLoad")})},searchImages:function(t,n){var r=this;Mist.ajax.POST("/backends/"+this.backend.id+"/images",{search_term:t}).success(function(e){}).error(function(){Mist.notificationController.notify("Failed to search images on "+r.backend.title)}).complete(function(t,i){var s=[];t&&i.forEach(function(t){t.backend=r.backend,s.push(e.create(t))}),n&&n(t,s)})},toggleImageStar:function(e,t){var n=this;Mist.ajax.POST("/backends/"+this.backend.id+"/images/"+e.id,{}).success(function(t){n.imageExists(e.id)||n._addImage(e),n._toggleImageStar(e.id,t)}).error(function(){Mist.notificationController.notify("Failed to (un)star image")}).complete(function(e,n){t&&t(e,n)})},clear:function(){Ember.run(this,function(){this.set("content",[]),this.set("loading",!1),this.trigger("onImageListChange")})},getImage:function(e){return this.content.findBy("id",e)},imageExists:function(e){return!!this.getImage(e)},_addImage:function(t){Ember.run(this,function(){this.content.pushObject(e.create(t)),this.trigger("onImageListChange")})},_setContent:function(t){var n=this;Ember.run(function(){n.set("content",[]),t.forEach(function(t){t.backend=n.backend,n.content.pushObject(e.create(t))}),n.trigger("onImageListChange")})},_toggleImageStar:function(e,t){Ember.run(this,function(){this.getImage(e).set("star",t),this.trigger("onImageStarToggle")})}})}),define("app/models/size",["ember"],function(){return Ember.Object.extend({id:null,ram:null,name:null,disk:null,price:null,driver:null,bandwidth:null})}),define("app/controllers/sizes",["app/models/size"],function(e){return Ember.ArrayController.extend(Ember.Evented,{content:[],loading:null,backend:null,load:function(){if(!this.backend.enabled)return;var e=this;this.set("loading",!0),Mist.ajax.GET("/backends/"+this.backend.id+"/sizes",{}).success(function(t){if(!e.backend.enabled)return;e._setContent(t||[])}).error(function(){if(!e.backend.enabled)return;Mist.notificationController.notify("Failed to load sizes for "+e.backend.title),e.backend.set("enabled",!1)}).complete(function(t){if(!e.backend.enabled)return;e.set("loading",!1),e.trigger("onLoad")})},clear:function(){Ember.run(this,function(){this.set("content",[]),this.set("loading",!1),this.trigger("onSizeListChange")})},getSize:function(e){return this.content.findBy("id",e)},_setContent:function(t){var n=this;Ember.run(function(){n.set("content",[]),t.forEach(function(t){n.content.pushObject(e.create(t))}),n.trigger("onSizeListChange")})}})}),define("app/models/location",["ember"],function(){return Ember.Object.extend({id:null,name:null,country:null})}),define("app/controllers/locations",["app/models/location"],function(e){return Ember.ArrayController.extend(Ember.Evented,{content:[],loading:null,backend:null,load:function(){if(!this.backend.enabled)return;var e=this;this.set("loading",!0),Mist.ajax.GET("/backends/"+this.backend.id+"/locations",{}).success(function(t){if(!e.backend.enabled)return;e._setContent(t||[])}).error(function(){if(!e.backend.enabled)return;Mist.notificationController.notify("Failed to load locations for "+e.backend.title),e.backend.set("enabled",!1)}).complete(function(t){if(!e.backend.enabled)return;e.set("loading",!1),e.trigger("onLoad")})},clear:function(){Ember.run(this,function(){this.set("content",[]),this.set("loading",!1),this.trigger("onLocationListChange")})},getLocation:function(e){return this.content.findBy("id",e)},_setContent:function(t){var n=this;Ember.run(function(){n.set("content",[]),t.forEach(function(t){t.name==""&&(t.name="Default"),n.content.pushObject(e.create(t))}),n.trigger("onLocationListChange")})}})}),define("app/models/backend",["app/controllers/machines","app/controllers/images","app/controllers/sizes","app/controllers/locations","ember"],function(e,t,n,r){return Ember.Object.extend(Ember.Evented,{id:null,host:null,state:null,title:null,apikey:null,enabled:null,provider:null,poll_interval:null,create_pending:null,selectedMachines:[],sizes:null,images:null,machines:null,locations:null,sizeCount:0,imageCount:0,machineCount:0,locationCoount:0,loadingSizes:null,loadingImages:null,loadingMachines:null,loadingLocations:null,load:function(){Ember.run(this,function(){this.sizes=n.create({backend:this,content:[]}),this.images=t.create({backend:this,content:[]}),this.machines=e.create({backend:this,content:[]}),this.locations=r.create({backend:this,content:[]}),this.sizes.on("onSizeListChange",this,"_updateSizeCount"),this.images.on("onImageListChange",this,"_updateImageCount"),this.machines.on("onMachineListChange",this,"_updateMachineCount"),this.locations.on("onLocationListChange",this,"_updateLocationCount"),this.machines.on("onSelectedMachinesChange",this,"_updateSelectedMachines"),this.sizes.addObserver("loading",this,function(){Ember.run.once(this,"loadingSizesObserver")}),this.images.addObserver("loading",this,function(){Ember.run.once(this,"loadingImagesObserver")}),this.machines.addObserver("loading",this,function(){Ember.run.once(this,"loadingMachinesObserver")}),this.locations.addObserver("loading",this,function(){Ember.run.once(this,"loadingLocationsObserver")}),this.sizes.load(),this.images.load(),this.machines.load(),this.locations.load()})}.on("init"),getSize:function(e){return this.sizes.getSize(e)},getImage:function(e){return this.images.getImage(e)},getMachine:function(e){return this.machines.getMachine(e)},getLocation:function(e){return this.locations.getLocation(e)},getMonitoredMachines:function(){return this.machines.getMonitoredMachines()},shutdownMachine:function(e,t){this.machines.shutdownMachine(e,t)},destroyMachine:function(e,t){this.machines.destroyMachine(e,t)},rebootMachine:function(e,t){this.machines.rebootMachine(e,t)},startMachine:function(e,t){this.machines.startMachine(e,t)},searchImages:function(e,t){this.images.searchImages(e,t)},toggleImageStar:function(e,t){this.images.toggleImageStar(e,t)},_toggle:function(){this.enabled?(this.sizes.load(),this.images.load(),this.machines.load(),this.locations.load()):(this.sizes.clear(),this.images.clear(),this.machines.clear(),this.locations.clear())},_updateSizeCount:function(){Ember.run(this,function(){this.set("sizeCount",this.sizes.content.length),this.trigger("onSizeListChange")})},_updateImageCount:function(){Ember.run(this,function(){this.set("imageCount",this.images.content.length),this.trigger("onImageListChange")})},_updateMachineCount:function(){Ember.run(this,function(){this.set("machineCount",this.machines.content.length),this.trigger("onMachineListChange")})},_updateLocationCount:function(){Ember.run(this,function(){this.set("locationCount",this.locations.content.length),this.trigger("onLocationListChange")})},_updateSelectedMachines:function(){Ember.run(this,function(){this.set("selectedMachines",this.machines.selectedMachines),this.trigger("onSelectedMachinesChange")})},_updateState:function(){this.enabled?this.loadingMachines||this.loadingImages||this.loadingSizes||this.loadingLocations?this.set("state","waiting"):this.set("state","online"):this.set("state","offline")},enabledObserver:function(){Ember.run.once(this,"_toggle")}.observes("enabled"),loadingSizesObserver:function(){this.set("loadingSizes",this.sizes.loading)},loadingImagesObserver:function(){this.set("loadingImages",this.images.loading)},loadingMachinesObserver:function(){this.set("loadingMachines",this.machines.loading)},loadingLocationsObserver:function(){this.set("loadingLocations",this.locations.loading)},stateObserver:function(){Ember.run.once(this,"_updateState")}.observes("loadingMachines","loadingImages","loadingSizes","loadingLocations","enabled")})}),define("app/models/rule",["ember"],function(){return Ember.Object.extend({id:null,unit:null,value:null,metric:null,cycles:null,command:null,machine:null,operator:null,maxValue:null,machineKey:null,machineName:null,machineSize:null,actionToTake:null,machineImage:null,machineScript:null,pendingAction:!1,machineBackend:null,machineLocation:null})}),define("app/controllers/backends",["app/models/backend","app/models/rule","ember"],function(e,t){return Ember.ArrayController.extend(Ember.Evented,{content:[],imageCount:0,machineCount:0,selectedMachines:[],machineRequest:!1,addingBackend:!1,deletingBackend:!1,togglingBackend:!1,checkedMonitoring:!1,checkingMonitoring:!1,loading:!1,loadingImages:!1,loadingMachines:!1,load:function(){var e=this;this.set("loading",!0),Mist.ajax.GET("/backends",{}).success(function(t){e._setContent(t)}).error(function(){e._reload()}).complete(function(){e.set("loading",!1),e.trigger("onLoad")})}.on("init"),addBackend:function(e,t,n,r,i,s,o,u,a,f,l){var c=this;this.set("addingBackend",!0),Mist.ajax.POST("/backends",{title:e,provider:t,apikey:n,apisecret:r,apiurl:i,tenant_name:o,region:s,machine_key:f,compute_endpoint:u,machine_port:a,machine_ip:n,machine_user:r}).success(function(e){c._addBackend(e,f)}).error(function(e){Mist.notificationController.notify("Failed to add backend: "+e)}).complete(function(e,t){c.set("addingBackend",!1),l&&l(e,t)})},renameBackend:function(e,t,n){var r=this;this.set("renamingBackend",!0),Mist.ajax.PUT("/backends/"+e,{new_name:t}).success(function(){r._renameBackend(e,t)}).error(function(){Mist.notificationController.notify("Failed to rename backend")}).complete(function(e){r.set("renamingBackend",!1),n&&n(e)})},deleteBackend:function(e,t){var n=this;this.set("deletingBackend",!0),Mist.ajax.DELETE("/backends/"+e,{}).success(function(){n._deleteBackend(e)}).error(function(){Mist.notificationController.notify("Failed to delete backend")}).complete(function(e){n.set("deletingBackend",!1),t&&t(e)})},toggleBackend:function(e,t,n){var r=this;this.set("togglingBackend",!0),Mist.ajax.POST("/backends/"+e,{new_state:t?"1":"0"}).success(function(){r._toggleBackend(e,t)}).error(function(){Mist.notificationController.notify("Failed to change backend's state"),r._toggleBackend(e,!t)}).complete(function(e){r.set("togglingBackend",!1),n&&n(e)})},probeMachine:function(e,t,n){function r(e,t){var n=e/t;return n>1.2?"hot":n>.8?"warm":n>.4?"eco":n>.1?"cool":"cold"}if(!e.id||e.id==-1)return;if(!e.state=="running")return;var i=e.getHost();if(!i)return;var s=Mist.keysController.getKey(t);s?(e.set("probing",t),s.set("probing",e)):e.set("probing",!0);var o=this,u=null;Mist.ajax.POST("/backends/"+e.backend.id+"/machines/"+e.id+"/probe",{host:i,key:t}).success(function(n){if(!e.backend||!e.backend.enabled)return;n.uptime?(u=parseFloat(n.uptime.split(" ")[0])*1e3,e.set("uptimeChecked",Date.now()),e.set("uptimeFromServer",u),e.set("probed",!0)):e.set("uptimeChecked",-Date.now()),e.set("cores",n.cores),e.set("users",n.users),n.loadavg&&(e.set("loadavg1",r(n.loadavg[0],n.cores)),e.set("loadavg5",r(n.loadavg[1],n.cores)),e.set("loadavg15",r(n.loadavg[2],n.cores))),e.set("loadavg",n.loadavg),e.set("loss",n.packets_loss),e.set("latency",Math.floor(n.rtt_avg)),o.trigger("onMachineProbe",e,t)}).error(function(t){if(!e.backend||!e.backend.enabled)return;s&&Mist.notificationController.notify(t)}).complete(function(t,r){if(!e.backend||!e.backend.enabled)return;s&&s.set("probing",!1),e.set("probing",!1),o.trigger("onMachineProbe"),n&&n(!!u,r)})},updateMachineCount:function(){var e=0,t=this.content,n=this.content.length;for(var r=0;r<n;++r)e+=t[r].machines.content.length;this.set("machineCount",e),this.trigger("updateMachines")}.observes("content.length"),updateImageCount:function(){var e=0;this.content.forEach(function(t){e+=t.images.content.length}),this.set("imageCount",e)}.observes("content.length"),providerList:function(){return SUPPORTED_PROVIDERS}.property("providerList"),getRequestedMachine:function(){if(this.machineRequest)return this.getMachine(this.machineRequest)},getBackend:function(e){return this.content.findBy("id",e)},getMachine:function(e,t){if(t){var n=this.getBackend(t);return n?n.getMachine(e):null}var r=null;return this.content.some(function(t){return r=t.getMachine(e)}),r},machineExists:function(e,t){return!!this.getMachine(e,t)},backendExists:function(e){return!!this.getBackend(e)},_reload:function(){Ember.run.later(this,function(){this.load()},2e3)},_setContent:function(t){var n=this;Ember.run(function(){n.set("content",[]),t.forEach(function(t){t.provider=="bare_metal"&&(t.isBareMetal=!0),n.content.pushObject(e.create(t))}),n.trigger("onBackendListChange")})},_addBackend:function(t,n){Ember.run(this,function(){var r=e.create(t);this.content.pushObject(r),r.one("onMachineListChange",function(){r.provider=="bare_metal"&&(r.set("isBareMetal",!0),Mist.keysController._associateKey(n,r.machines.content[0]))}),this.trigger("onBackendListChange"),this.trigger("onBackendAdd")})},_deleteBackend:function(e){Ember.run(this,function(){this.content.removeObject(this.getBackend(e)),this.trigger("onBackendListChange"),this.trigger("onBackendDelete")})},_renameBackend:function(e,t){Ember.run(this,function(){this.getBackend(e).set("title",t),this.trigger("onBackendRename")})},_toggleBackend:function(e,t){Ember.run(this,function(){this.getBackend(e).set("enabled",t),this.trigger("onBackendToggle")})},_updateImageCount:function(){Ember.run(this,function(){var e=0;this.content.forEach(function(t){t.enabled&&(e+=t.imageCount)}),this.set("imageCount",e),this.trigger("onImageListChange")})},_updateMachineCount:function(){Ember.run(this,function(){var e=0;this.content.forEach(function(t){t.enabled&&(e+=t.machineCount)}),this.set("machineCount",e),this.trigger("onMachineListChange")})},_updateLoadingImages:function(){Ember.run(this,function(){var e=!1;this.content.some(function(t){if(t.loadingImages)return e=!0}),this.set("loadingImages",e)})},_updateLoadingMachines:function(){Ember.run(this,function(){var e=!1;this.content.some(function(t){if(t.loadingMachines)return e=!0}),this.set("loadingMachines",e)})},_updateSelectedMachines:function(){Ember.run(this,function(){var e=[];this.content.forEach(function(t){e=e.concat(t.selectedMachines)}),this.set("selectedMachines",e),this.trigger("onSelectedMachinesChange")})},imageCountObserver:function(){Ember.run.once(this,"_updateImageCount")}.observes("content.@each.imageCount"),mahcineCountObserver:function(){Ember.run.once(this,"_updateMachineCount")}.observes("content.@each.machineCount"),loadingImagesObserver:function(){Ember.run.once(this,"_updateLoadingImages")}.observes("content.@each.loadingImages"),loadingMachinesObserver:function(){Ember.run.once(this,"_updateLoadingMachines")}.observes("content.@each.loadingMachines"),selectedMachinesObserver:function(){Ember.run.once(this,"_updateSelectedMachines")}.observes("content.@each.selectedMachines")})}),define("app/controllers/confirmation",["ember"],function(){return Ember.Object.extend({show:function(){$("#confirmation-popup").popup("open")},confirm:function(){$("#confirmation-popup").popup("close"),this.callback(),this.set("callback",function(){})},setUp:function(e,t,n){this.set("title",e).set("text",t).set("callback",n).show()}})}),define("app/controllers/notification",["ember"],function(){return Ember.Object.extend({timeout:null,notify:function(e){$("#notification-popup h1").text(e),$("#notification-popup").show(),Ember.run.later(function(){$("#notification-popup").hide()},this.timeout?this.timeout:2e3)},timeNotify:function(e,t){$("#notification-popup h1").text(e),$("#notification-popup").show(),Ember.run.later(function(){$("#notification-popup").hide()},t)},showMessagebox:function(){$("#message-box-popup").popup("open").popup("reposition",{positionTo:"window"}),Ember.run.next(function(){$("#message-box-popup").popup("reposition",{positionTo:"window"}),Ember.run.later(function(){$("#message-box-popup").popup("reposition",{positionTo:"window"})},300)})}})}),define("app/controllers/backend_add",["app/models/backend","ember"],function(e){return Ember.Object.extend({callback:null,formReady:null,newBackendKey:null,newBackendPort:null,newBackendProvider:null,newBackendFirstField:null,newBackendSecondField:null,newBackendProjectName:null,newBackendOpenStackURL:null,newBackendOpenStackRegion:null,newBackendOpenStackTenant:null,newBackendOpenStackComputeEndpoint:null,open:function(e){this._clear(),this._updateFormReady(),this.set("callback",e),$("#add-backend-panel").panel("open"),Ember.run.next(function(){$(".ui-page-active").height($(".ui-panel-open").height()),$("body").css("overflow","auto"),$("#openstack-advanced").val("0").slider("refresh"),$("#non-hp-cloud").hide()})},close:function(){$("#add-backend-panel").panel("close"),this._clear()},add:function(){var e=this,t=this.newBackendOpenStackTenant||this.newBackendProjectName;Mist.backendsController.addBackend(this.newBackendProvider.title,this.newBackendProvider.provider,this.newBackendFirstField,this.newBackendSecondField,this.newBackendOpenStackURL,this.newBackendOpenStackRegion,t,this.newBackendOpenStackComputeEndpoint,this.newBackendPort,this.newBackendKey.id,function(t,n){e._giveCallback(t,n),t&&e.close()})},_clear:function(){this.set("callback",null).set("newBackendPort",null).set("newBackendFirstField",null).set("newBackendSecondField",null).set("newBackendOpenStackURL",null).set("newBackendOpenStackRegion",null).set("newBackendOpenStackTenant",null).set("newBackendOpenStackComputeEndpoint",null).set("newBackendKey",{id:"Select SSH Key"}).set("newBackendProvider",{title:"Select provider"}),$("#new-backend-key").collapsible("collapse").collapsible("option","collapsedIcon","carat-d"),$("#new-backend-provider").collapsible("collapse").collapsible("option","collapsedIcon","carat-d")},_updateFormReady:function(){var e=!1;if("provider"in this.newBackendProvider&&this.newBackendFirstField&&this.newBackendSecondField){e=!0;if(this.newBackendProvider.provider=="openstack")this.newBackendOpenStackURL||(e=!1);else if(this.newBackendProvider.provider.indexOf("openstack")>-1){if(!this.newBackendOpenStackURL||!this.newBackendOpenStackTenant)e=!1}else this.newBackendProvider.provider=="bare_metal"?Mist.keysController.keyExists(this.newBackendKey.id)||(e=!1):this.newBackendProvider.provider=="gce"&&(this.newBackendProjectName||(e=!1))}this.set("formReady",e)},_giveCallback:function(e,t){this.callback&&this.callback(e,t)},formObserver:function(){Ember.run.once(this,"_updateFormReady")}.observes("newBackendKey","newBackendProvider","newBackendFirstField","newBackendSecondField","newBackendProjectName","newBackendOpenStackURL","newBackendOpenStackTenant")})}),define("app/controllers/backend_edit",["ember"],function(){return Ember.Object.extend({backend:null,callback:null,newBackendTitle:null,open:function(e,t){this.set("backend",e),this.set("callback",t),this.set("newBackendTitle",e.title),$("#monitoring-message").hide(),$("#backend-delete-confirm").hide(),$("#backend-toggle option[value=1]")[0].selected=e.enabled,$("#backend-toggle").slider("refresh"),$("#edit-backend-popup").popup("open",{transition:"pop"})},close:function(){},_clear:function(){this.set("backend",null),this.set("callback",null),this.set("newBackendTitle",null)},rename:function(){if(!this.newBackendTitle)return;Mist.backendsController.renameBackend(this.backend.id,this.newBackendTitle,this.callback)},deleteBackend:function(e){Mist.backendsController.deleteBackend(this.backend.id,e)},toggleBackend:function(e){var t=$("#backend-toggle").val()=="1"?!0:!1;Mist.backendsController.toggleBackend(this.backend.id,t,e)},backendTitleOBserver:function(){Ember.run.once(this,"rename")}.observes("newBackendTitle")})}),define("app/controllers/machine_add",["ember"],function(){return Ember.Object.extend({callback:null,formReady:null,newMachineKey:null,newMachineName:null,newMachineSize:null,newMachineImage:null,newMachineScript:null,newMachineLocation:null,newMachineProvider:null,open:function(e){$(".ui-page-active").animate({scrollTop:0},"slow"),$("#create-machine-panel .ui-panel-inner").animate({scrollTop:0},"slow"),$("#create-machine-panel").panel("open"),$(".ui-panel-dismiss-position-right").css("right",$(".ui-panel-position-right.ui-panel-open").width()),Ember.run.next(function(){var e=$(".ui-panel-open").height(),t=$(".ui-page-active").height();e>t&&$(".ui-page-active").height(e)}),$("#create-machine-location").addClass("ui-state-disabled"),$("#create-machine-image").addClass("ui-state-disabled"),$("#create-machine-size").addClass("ui-state-disabled"),$("#create-machine-key").addClass("ui-state-disabled"),this._clear(),this._updateFormReady(),this.set("callback",e)},close:function(){$("#create-machine-panel").panel("close"),this._clear()},add:function(){var e=this.newMachineProvider.title,t=this.newMachineSize.name,n=this.newMachineImage.name,r=this.newMachineName;if(e=="NephoScale"){var i=/^[0-9a-zA-Z-_]*$/;if(r.length>64||!i.test(r)){Mist.notificationController.timeNotify("Server name in NephoScale must start with a letter, can contain mixed alpha-numeric characters, hyphen ('-') and underscore ('_') characters, cannot exceed 64 characters, and can end with a letter or a number.",7e3);return}if(t.indexOf("CS025")>-1&&n!="Linux Ubuntu Server 10.04 LTS 64-bit"&&n!="Linux CentOS 6.2 64-bit"){Mist.notificationController.timeNotify("On CS025 size you can only create one of the two images: Linux Ubuntu Server 10.04 LTS 64-bit or Linux CentOS 6.2 64-bit",7e3);return}}if(e=="DigitalOcean"){var i=/^[0-9a-zA-Z-.]*$/;if(!i.test(r)){Mist.notificationController.timeNotify("Characters allowed are a-z, A-Z, 0-9, . and -",7e3);return}}if(e=="Google Compute Engine"){var i=/^[0-9a-z-]*$/;if(!i.test(r)){Mist.notificationController.timeNotify("Name must be lowercase letters, numbers, and hyphens",7e3);return}}if(e=="Linode"){var i=/^[0-9a-zA-Z-_]*$/;if(!i.test(r)){Mist.notificationController.timeNotify("A Linode label may only contain ASCII letters or numbers, dashes and underscores. Must begin and end with letters or numbers, and be at least 3 characters long",7e3);return}}if(e=="SoftLayer"){var i=/^[0-9a-zA-Z.-]*$/;if(r.length>253||!i.test(r)){Mist.notificationController.timeNotify("Server name in Softlayer must be an alphanumeric string, that may contain period ('.') and dash ('-') special characters.",7e3);return}}var s=this;this.newMachineProvider.machines.newMachine(this.newMachineName,this.newMachineImage,this.newMachineSize,this.newMachineLocation,this.newMachineKey,this.newMachineScript,function(e,t){s._giveCallback(e,t)}),this.close(),$("#image-list-page").length&&Mist.Router.router.transitionTo("machines")},_clear:function(){this.set("callback",null).set("newMachineName","").set("newMachineScript","").set("newMachineKey",{id:"Select Key"}).set("newMachineSize",{name:"Select Size"}).set("newMachineImage",{name:"Select Image"}).set("newMachineLocation",{name:"Select Location"}).set("newMachineProvider",{title:"Select Provider"})},_updateFormReady:function(){var e=!1;this.newMachineName&&this.newMachineSize.id&&this.newMachineImage.id&&this.newMachineLocation.id&&this.newMachineProvider.id&&Mist.keysController.keyExists(this.newMachineKey.id)&&(e=!0),this.set("formReady",e)},_giveCallback:function(e,t){this.callback&&this.callback(e,t)},formObserver:function(){Ember.run.once(this,"_updateFormReady")}.observes("newMachineKey","newMachineName","newMachineSize","newMachineImage","newMachineScript","newMachineLocation","newMachineProvider")})}),define("app/controllers/machine_keys",["ember"],function(){return Ember.Object.extend(Ember.Evented,{user:null,port:null,view:null,machine:null,callback:null,lastAssocKey:null,load:function(){Mist.keysController.on("onKeyListChange",this,"_updateKeys"),Mist.keysController.on("onKeyAssociate",this,"_updateKeys"),Mist.keysController.on("onKeyDisassociate",this,"_updateKeys")}.on("init"),open:function(e,t){$("#machine-keys-panel").panel("open"),this._clear(),this.set("machine",e),this.set("callback",t)},openKeyList:function(e,t){this.set("machine",e),this.set("callback",t),this.view._actions.associateClicked()},openSSH_Details:function(){var e=this.user?this.user:"root",t=this.port?this.port:"22";$("#machine-userPort-popup .message").text("Cannot connect as "+e+" on port "+t),$("#machine-userPort-popup").find("#user").val(""),$("#machine-userPort-popup").find("#port").val(""),$("#machine-userPort-popup").popup("open")},closeSSH_Details:function(){this._cleanSSH_UserPortPopup(),$("#machine-userPort-popup").popup("close")},close:function(){$("#machine-keys-panel").panel("close"),this._clear()},associate:function(e,t,n,r){this.set("lastAssocKey",e),e.associate(this.machine,t,n,r)},probe:function(e,t){this.machine.probe(e.id,t)},disassociate:function(e,t){if(Mist.keysController.getMachineKeysCount(this.machine)==1){var n=this.machine;Mist.confirmationController.set("title","Disassociate key"),Mist.confirmationController.set("text",'You are about to remove the last key associated with "'+n.name+"\" machine and you won't be able to access it anymore. Are you sure "+"you want to proceed?"),Mist.confirmationController.set("callback",function(){e.disassociate(n,t)}),Ember.run.later(function(){Mist.confirmationController.show()},300)}else e.disassociate(this.machine,t)},_clear:function(){Ember.run(this,function(){this.set("machine",null),this.set("callback",null),this._cleanSSH_UserPortPopup()})},_updateKeys:function(){if(!this.machine)return;var e=this;Ember.run(function(){var t=!1,n=[],r=[];Mist.keysController.content.forEach(function(i){t=!1,i.machines.some(function(r){if(e.machine.id==r[1]&&e.machine.backend.id==r[0])return n.push(i),t=!0}),t||r.push(i)}),e.set("associatedKeys",n),e.set("nonAssociatedKeys",r)})},_giveCallback:function(e,t){this.callback&&this.callback(e,t)},_cleanSSH_UserPortPopup:function(){this.set("lastAssocKey",null),this.set("user",null),this.set("port",null),$("#machine-userPort-popup").find("#user").val(""),$("#machine-userPort-popup").find("#port").val("")},machineObserver:function(){Ember.run.once(this,"_updateKeys")}.observes("machine"),portFieldObserver:function(){this.port&&this.set("port",this.port.replace(/\D/g,""))}.observes("port")})}),define("app/controllers/machine_power",["ember"],function(){return Ember.Object.extend(Ember.Evented,{machines:[],callback:null,canStart:null,canReboot:null,canDestroy:null,canShutdown:null,open:function(e,t){this._clear(),this.set("callback",t),this.set("machines",e instanceof Array?e:[e]),Ember.run.next(function(){$("#machine-power-popup").popup("open")})},close:function(){$("#machine-power-popup").popup("close"),this._clear()},act:function(e){$("#machine-power-popup").popup("close");var t=Mist.arrayToListString(this.machines,"name"),n=this;Ember.run.later(function(){Mist.confirmationController.setUp("Machine action","Are you sure you want to "+e+" these machines: "+t+" ?",function(){n._act(e)})},500)},_clear:function(){Ember.run(this,function(){this.set("machines",[]),this.set("callback",null),this.set("canStart",null),this.set("canReboot",null),this.set("canDestroy",null),this.set("canShutdown",null)})},_updateActions:function(){Ember.run(this,function(){this.set("canStart",!this.machines.findBy("can_start",!1)),this.set("canReboot",!this.machines.findBy("can_reboot",!1)),this.set("canDestroy",!this.machines.findBy("can_destroy",!1)),this.set("canShutdown",!this.machines.findBy("can_stop",!1)),this.trigger("onActionsChange")})},_giveCallback:function(e,t){this.callback&&this.callback(e,t)},_act:function(e){this.machines.forEach(function(t){e=="shutdown"?t.shutdown():e=="destroy"?t.destroy():e=="reboot"?t.reboot():e=="start"&&t.start()})},machinesObserver:function(){Ember.run.once(this,"_updateActions")}.observes("machines")})}),define("app/controllers/monitoring",["ember"],function(){return Ember.Object.extend(Ember.Evented,{load:function(e){if(!Mist.authenticated){Mist.backendsController.set("checkedMonitoring",!0);return}var t=this;this.checkingMonitoring=!0,Mist.ajax.GET("/monitoring",{}).success(function(e){t._updateMonitoringData(e)}).error(function(){Mist.notificationController.notify("Failed to get monitoring data")}).complete(function(n,r){t.checkingMonitoring=!1,Mist.backendsController.set("checkedMonitoring",!0),t.trigger("onMonitoringDataUpdate"),e&&e(n,r)})}.on("init"),enableMonitoring:function(e,t,n){var r=this;e.set("enablingMonitoring",!0),Mist.ajax.POST("/backends/"+e.backend.id+"/machines/"+e.id+"/monitoring",{action:"enable",dns_name:e.extra.dns_name?e.extra.dns_name:"n/a",public_ips:e.public_ips?e.public_ips:[],name:e.name?e.name:e.id,no_ssh:n||!1}).success(function(t){Mist.set("authenticated",!0),e.set("hasMonitoring",!0),e.set("pendingFirstData",!0),e.set("enablingMonitoring",!1)}).error(function(t,n){e.set("enablingMonitoring",!1),n==402?Mist.notificationController.timeNotify(t,5e3):Mist.notificationController.notify("Error when changing monitoring to "+e.name)}).complete(function(e,n){t&&t(e,n)})},disableMonitoring:function(e,t){var n=this;e.set("disablingMonitoring",!0),Mist.ajax.POST("/backends/"+e.backend.id+"/machines/"+e.id+"/monitoring",{action:"disable",dns_name:e.extra.dns_name?e.extra.dns_name:"n/a",public_ips:e.public_ips?e.public_ips:[],name:e.name?e.name:e.id}).success(function(t){e.set("hasMonitoring",!1),Mist.monitored_machines.some(function(t){t[1]==e.id&&t[0]==e.backend.id&&Mist.monitored_machines.removeObject(t)}),e.set("disablingMonitoring",!1),Mist.set("authenticated",!0)}).error(function(t,n){e.set("disablingMonitoring",!1),n==402?Mist.notificationController.timeNotify(t,5e3):Mist.notificationController.notify("Error when changing monitoring to "+e.name)}).complete(function(e,n){t&&t(e,n)})},changeMonitoring:function(e,t){e.hasMonitoring?this.disableMonitoring(e,t):this.enableMonitoring(e,t)},_updateMonitoringData:function(e){Mist.set("monitored_machines",e.machines),Mist.set("current_plan",e.current_plan),Mist.rulesController.setContent(e.rules),e.machines.forEach(function(e){var t=Mist.backendsController.getMachine(e[1],e[0]);t&&t.set("hasMonitoring",!0)}),Mist.backendsController.content.forEach(function(e){e.machines._updateMonitoredMachines()})},initialize:function(e){var t=this;this.reset(),this.graphs.instances=e.graphs;var n=this.cookies.getCollapsedMetrics();if(n!=null)this.graphs.collapse(n,0);else{var r=this.graphs.instances,i=[];for(var s in r){if(s=="load")continue;i.push(s)}this.graphs.collapse(i,0)}this.request.create({machine:e.machineModel,timeWindow:6e5,step:1e4,updateInterval:1e4,updatesEnabled:!0,timeGap:60,callback:function(e){e.status=="success"&&t.graphs.updateData(e.data)}}),e.machineModel.addObserver("beingDestroyed",function(){t.request.machine&&t.request.machine.beingDestroyed&&t.request.disableUpdates(!1)}),this.request.start()},reset:function(){this.request.reset(),this.history.reset(),this.graphs.reset(),this.zoom.reset()},request:{create:function(e){this.reset();var t=this,n=Mist.monitoringController;this.step=e.step,this.timeWindow=e.timeWindow,this.updateInterval=e.updateInterval,this.machine=e.machine,this.updateData=e.updatesEnabled,this.step=e.step,this.callback="callback"in e?e.callback:null,this.timeGap=e.timeGap,this.timeStop=Math.floor(((new Date).getTime()-this.timeGap*1e3)/1e3);var r=(new Date(this.timeStop*1e3)).getSeconds()%10;this.timeStop-=r,this.timeStart=Math.floor(this.timeStop-this.timeWindow/1e3),this.lastMetrictime=new Date(this.timeStart*1e3)},start:function(){var e=this;this.locked=!0;if(this.initialized&&!this.running){this.timeStart=Math.floor(this.lastMetrictime.getTime()/1e3),this.timeStop=Math.floor(((new Date).getTime()-this.timeGap*1e3)/1e3);var t=(this.timeStop-this.timeStart)%(this.step/1e3);this.timeStop=this.timeStop-t}else this.initialized=!0;return this.machine.set("pendingStats",!0),this.requestID++,this.receiveData(this.timeStart,this.timeStop,this.step,this.callback),this.updateData&&!this.running&&(window.monitoringInterval=window.setInterval(function(){e.updateData||window.clearInterval(window.monitoringInterval),e.locked=!0,e.timeStart=Math.floor(e.lastMetrictime.getTime()/1e3),e.timeStop=Math.floor(((new Date).getTime()-e.timeGap*1e3)/1e3);var t=(e.timeStop-e.timeStart)%(e.step/1e3);e.timeStop=e.timeStop-t,this.requestID++,e.receiveData(e.timeStart,e.timeStop,e.step,e.callback)},this.step)),this.running=!0,this.requestID},stop:function(){this.running=!1,window.clearInterval(window.monitoringInterval)},reload:function(e){var t=this,n=function(){if(!t.locked)return t.stop(),e=typeof e=="undefined"?"manualReload":e,!t.updateData&&Mist.monitoringController.graphs.animationEnabled?Mist.monitoringController.graphs.disableAnimation():t.updateData&&!Mist.monitoringController.graphs.animationEnabled&&Mist.monitoringController.graphs.enableAnimation(),Mist.monitoringController.graphs.clearData(),t.create({machine:t.machine,timeWindow:t.timeWindow,step:t.step,updateInterval:t.updateInterval,updatesEnabled:t.updateData,timeGap:t.timeGap,callback:t.callback}),t.start();window.setTimeout(n,1e3)};return n()},custom:function(e){this.stopDataUpdates(),this.machine.set("pendingStats",!0);var t=this,n=function(){if(t.locked)window.setTimeout(n,1e3);else{var r=t.timeWindow,i=t.step,s=Math.floor((new Date).getTime()/1e3),o=Math.floor(s-r/1e3),u=null;e&&("stop"in e&&(s=Math.floor(e.stop),o=Math.floor(s-r/1e3)),"step"in e&&(i=e.step),"timeWindow"in e&&(timeWindowSize=e.timeWindow),"callback"in e&&(u=e.callback)),t.locked=!0,t.machine.set("pendingStats",!0),Mist.monitoringController.graphs.animationEnabled&&Mist.monitoringController.graphs.disableAnimation(),t.receiveData(o,s,i,u)}};n()},customReset:function(){Mist.monitoringController.graphs.enableAnimation(),this.reload("customRequestReset")},changeStep:function(e,t){this.step=e,reload=typeof t=="undefined"?!0:t,reload&&this.reload("stepChanged")},changeTimeWindow:function(e,t){this.timeWindow=e,reload=typeof t=="undefined"?!0:t,reload&&this.reload("timeWindowChanged")},enableUpdates:function(e){reload=typeof e=="undefined"?!0:e,this.updateData=!0,reload&&this.reload("updatesEnabled")},disableUpdates:function(e){reload=typeof e=="undefined"?!0:e,this.updateData=!1,reload&&this.reload("updatesDisabled")}.observes("machine.isDestroying"),stopDataUpdates:function(){window.clearInterval(window.monitoringInterval)},receiveData:function(e,t,n,r){var i=this.requestID,s=Mist.monitoringController,o=this;r==null&&(r=function(){}),$.ajax({url:"/backends/"+o.machine.backend.id+"/machines/"+o.machine.id+"/stats",type:"GET",async:!0,dataType:"json",data:{start:e,stop:t,step:n/1e3},timeout:8e3,success:function(e,t,n){try{if(e.load.length==0)throw"No Data Received";e.load.some(function(e){if(e[1]!=null)return o.machine.set("pendingFirstData",!1),!0});var s=[],u=[];for(disk in e.disk.read)s.push(disk);for(netInterface in e.network)u.push(netInterface);var a={cpuCores:0,cpu:[],load:[],memory:[],diskRead:[],diskWrite:[],networkRX:[],networkTX:[]};a.cpuCores=e.cpu.cores,e.cpu.utilization.forEach(function(e){var t={time:new Date(e[0]*1e3),value:e[1]};a.cpu.push(t)}),e.load.forEach(function(e){var t={time:new Date(e[0]*1e3),value:e[1]};a.load.push(t)}),e.memory.forEach(function(e){var t={time:new Date(e[0]*1e3),value:e[1]};a.memory.push(t)}),e.disk.read[s[0]].disk_octets.forEach(function(e){var t={time:new Date(e[0]*1e3),value:e[1]};a.diskRead.push(t)}),e.disk.write[s[0]].disk_octets.forEach(function(e){var t={time:new Date(e[0]*1e3),value:e[1]};a.diskWrite.push(t)}),e.network[u[0]].rx.forEach(function(e){var t={time:new Date(e[0]*1e3),value:e[1]};a.networkRX.push(t)}),e.network[u[0]].tx.forEach(function(e){var t={time:new Date(e[0]*1e3),value:e[1]};a.networkTX.push(t)}),o.lastMetrictime=a.load[a.load.length-1].time,r({status:"success",data:a}),$(document).trigger("finishedFetching",[i,"success"])}catch(f){error(f),r({status:"error",error:f}),$(document).trigger("finishedFetching",[i,"failure"])}o.machine.set("pendingStats",!1),o.locked=!1},error:function(e,t,n){n=="timeout"?o.machine.hasMonitoring&&Mist.notificationController.timeNotify("Data request timed out. Network connection is down or server doesn't respond",4e3):error(t),r({status:"error",error:n}),$(document).trigger("finishedFetching",[i,"failure"]),o.machine.set("pendingStats",!1),o.locked=!1}})},printInfo:function(){console.log("Time Window    : "+this.timeWindow/1e3+" seconds"),console.log("Last Metric    : "+this.lastMetrictime),console.log("Start          : "+new Date(this.timeStart*1e3)),console.log("Stop           : "+new Date(this.timeStop*1e3)),console.log("Step           : "+this.step/1e3+" seconds"),console.log("Update Interval: "+this.updateInterval)},reset:function(){this.machine=null,this.lastMetrictime=null,this.callback=null,this.timeWindow=0,this.timeStart=0,this.timeStop=0,this.timeGap=0,this.step=0,this.updateData=!1,this.updateInterval=0,this.locked=!1,this.running=!1,this.initialized=!1,this.requestID=0},machine:null,lastMetrictime:null,callback:null,timeWindow:0,timeStart:0,timeStop:0,step:0,timeGap:0,updateInterval:0,updateData:!1,locked:!1,running:!1,initialized:!1,requestID:0},UI:{collapsePressed:function(e){Mist.monitoringController.graphs.collapse([e])},expandPressed:function(e){Mist.monitoringController.graphs.expand([e])},zoomChange:function(){var e=$("#zoomSelect :selected").val();Mist.monitoringController.zoom.toIndex(e)}},graphs:{enableAnimation:function(){for(metric in this.instances)this.instances[metric].enableAnimation();this.animationEnabled=!0},disableAnimation:function(e){e=typeof e=="undefined"?!0:e;for(metric in this.instances)this.instances[metric].disableAnimation(e);this.animationEnabled=!1},changeTimeWindow:function(e){for(metric in this.instances)this.instances[metric].changeTimeWindow(e)},updateData:function(e){var t=this.updateActions.before.length;for(var n=0;n<t;n++){var r=this.updateActions.before.shift();r()}delete e.cpuCores;for(metric in e)this.instances[metric].updateData(e[metric]);var t=this.updateActions.after.length;for(var n=0;n<t;n++){var r=this.updateActions.after.shift();r()}},clearData:function(){for(metric in this.instances)this.instances[metric].clearData()},collapse:function(e,t){var n=typeof t=="undefined"?400:t;Mist.isClientMobile&&(n=0),e.forEach(function(e){$("#"+e+"GraphBtn").insertAfter($(".graphBtn").last()),$("#"+e+"Graph").hide(n,function(){$("#"+e+"GraphBtn").show(0,function(){var e=[];$(".graphBtn").toArray().forEach(function(t){$(t).css("display")!="none"&&e.push($(t).attr("id").replace("GraphBtn","").replace("#",""))}),Mist.monitoringController.cookies.setCollapsedMetrics(e)})})})},expand:function(e,t){var n=typeof t=="undefined"?400:t;Mist.isClientMobile&&(n=0),e.forEach(function(e){$("#"+e+"Graph").insertAfter($(".graph").last()),$("#"+e+"GraphBtn").hide(0),$("#"+e+"Graph").show(n,function(){var e=[];$(".graphBtn").toArray().forEach(function(t){$(t).css("display")!="none"&&e.push($(t).attr("id").replace("GraphBtn","").replace("#",""))}),Mist.monitoringController.cookies.setCollapsedMetrics(e)})})},addNextUpdateAction:function(e,t){e=="before"?this.updateActions.before.push(t):this.updateActions.after.push(t)},clearNextUpdateActions:function(){this.updateActions.before=[],this.updateActions.after=[]},reset:function(){this.instances=null,this.animationEnabled=!0,this.updateActions={before:[],after:[]}},instances:null,animationEnabled:!0,updateActions:{before:[],after:[]}},cookies:{getCollapsedMetrics:function(){if(document.cookie.indexOf("collapsedGraphs")==-1)return null;var e="",t=[],n=document.cookie.split("collapsedGraphs=");return n.length==2&&(e=n.pop().split(";").shift()),e.length>0&&(t=e.split("|")),t},setCollapsedMetrics:function(e){var t=[],n=[],r=new Date;r.setFullYear(r.getFullYear()+2),document.cookie="collapsedGraphs="+e.join("|")+"; "+"expires="+r.toUTCString()+"; "+"path=/"},getCurrentTimeWindow:function(){if(document.cookie.indexOf("collapsedGraphs")==-1)return console.log("No Time Window saved"),null},setCurrentTimeWindow:function(e){}},zoom:{"in":function(){this.zoomIndex>0&&(this.zoomIndex--,this.to(this.zoomValues[this.zoomIndex].value*6e4))},out:function(){this.zoomIndex<this.zoomValues.length-1&&(this.zoomIndex++,this.to(this.zoomValues[this.zoomIndex].value*6e4))},toIndex:function(e){e!=this.zoomIndex&&(this.prevZoomIndex=this.zoomIndex,this.zoomIndex=e,this.to(this.zoomValues[e].value*6e4,"to"))},to:function(e,t){var n=Mist.monitoringController,r=this;t=typeof t=="undefined"?null:t;var i=function(){if(n.request.locked)window.setTimeout(i,1e3);else{var s=function(){n.graphs.changeTimeWindow(e)};n.graphs.addNextUpdateAction("before",s);var o=60;timeWindowInMinutes=e/6e4,newStep=Math.round(timeWindowInMinutes*60/o*1e3),n.request.changeStep(newStep,!1),n.request.changeTimeWindow(e,!1),timeWindowInMinutes>10?n.request.disableUpdates(!1):n.request.enableUpdates(!1);var u=n.request.reload();$(document).one("finishedFetching",function(e,n,i){u==n&&r.enable(),i!="success"&&(t=="in"?r.zoomIndex++:t=="out"?r.zoomIndex--:t=="to"&&(r.zoomIndex=r.prevZoomIndex),r.setZoomUI(r.zoomIndex)),r.enable(),Mist.monitoringController.history.enableControls()})}};n.request.stop(),Mist.monitoringController.request.machine.set("pendingStats",!0),this.disable(),Mist.monitoringController.history.disableControls(),i()},setZoomUI:function(e){document.getElementById("zoomSelect").options[this.zoomIndex].selected="selected",$("#zoomSelect-button").find("span").text($("#zoomSelect").find(":selected").text())},disable:function(){$("#zoomSelect-button *").addClass("ui-disabled")},enable:function(){$("#zoomSelect-button *").removeClass("ui-disabled")},reset:function(){this.zoomIndex=0,this.prevZoomIndex=0,this.setZoomUI(this.zoomIndex)},zoomValues:[{label:"10 minutes",value:10},{label:"1 hour    ",value:60},{label:"1 day     ",value:1440},{label:"1 week    ",value:10080},{label:"1 month   ",value:43200}],zoomIndex:0,prevZoomIndex:0},history:{goBack:function(){var e=this,t=Mist.monitoringController.request;this.isEnabled?this.currentStopTime=new Date(this.currentStopTime-this.timeWindow):this.enable(),t.custom({stop:+this.currentStopTime/1e3,callback:function(t){t.status=="success"?Mist.monitoringController.graphs.updateData(t.data):(e.currentStopTime=new Date(+e.currentStopTime+e.timeWindow),e.currentStopTime.getTime()==e.lastMetrictime.getTime()&&e.disable())}})},goForward:function(){var e=this,t=Mist.monitoringController.request;this.isEnabled&&(this.currentStopTime=new Date(+this.currentStopTime+this.timeWindow),+this.currentStopTime>+this.lastMetrictime?this.disable():t.custom({stop:+this.currentStopTime/1e3,callback:function(t){t.status=="success"?Mist.monitoringController.graphs.updateData(t.data):e.currentStopTime=new Date(+e.currentStopTime-e.timeWindow)}}))},enable:function(){var e=this,t=Mist.monitoringController.request;this.isEnabled||(this.isEnabled=!0,this.timeWindow=t.timeWindow,this.lastMetrictime=t.lastMetrictime,this.currentStopTime=new Date(this.lastMetrictime.getTime()-this.timeWindow),$("#graphsGoForward").removeClass("ui-disabled"),$("#graphsResetHistory").removeClass("ui-disabled"),Mist.monitoringController.zoom.disable())},disable:function(){this.isEnabled=!1,Mist.monitoringController.request.customReset(),$("#graphsGoForward").addClass("ui-disabled"),$("#graphsResetHistory").addClass("ui-disabled"),Mist.monitoringController.zoom.enable()},disableControls:function(){$("#graphsGoBack").addClass("ui-disabled"),$("#graphsGoForward").addClass("ui-disabled"),$("#graphsResetHistory").addClass("ui-disabled")},enableControls:function(){$("#graphsGoBack").removeClass("ui-disabled"),this.isEnabled&&($("#graphsGoForward").removeClass("ui-disabled"),$("#graphsResetHistory").removeClass("ui-disabled"))},reset:function(){this.isEnabled=!1,this.lastMetrictime=null,this.timeWindow=0,this.currentStopTime=null},isEnabled:!1,lastMetrictime:null,timeWindow:0,currentStopTime:null}})}),define("app/controllers/key_add",["ember"],function(){return Ember.Object.extend({newKeyId:null,callback:null,formReady:null,uploadingKey:null,newKeyPrivate:null,open:function(e){$("#add-key-popup").popup("open"),this._clear(),this._updateFormReady(),this.set("callback",e)},close:function(){$("#add-key-popup").popup("close"),this._clear()},add:function(){if(Mist.keysController.keyExists(this.newKeyId)){Mist.notificationController.notify("Key name exists already"),this._giveCallback(!1);return}var e=this;Mist.keysController.addKey(this.newKeyId,this.newKeyPrivate,function(t,n){e._giveCallback(t,n),t&&e.close()})},uploadKey:function(e){var t=this,n=new FileReader;n.onloadend=function(e){e.target.readyState==FileReader.DONE?t.set("newKeyPrivate",e.target.result):Mist.notificationsController.notify("Failed to upload file"),t.set("uploadingKey",!1)},this.set("uploadingKey",!0),n.readAsText(e,"UTF-8")},_clear:function(){this.set("callback",null).set("newKeyId",null).set("formReady",null).set("newKeyPrivate",null)},_giveCallback:function(e,t){this.callback&&this.callback(e,t)},_updateFormReady:function(){this.newKeyId&&this.set("newKeyId",this.newKeyId.replace(/\W/g,"")),this.newKeyPrivate&&this.set("newKeyPrivate",this.newKeyPrivate.trim()),this.set("formReady",!!this.newKeyId&&!!this.newKeyPrivate)},formObserver:function(){Ember.run.once(this,"_updateFormReady")}.observes("newKeyId","newKeyPrivate")})}),define("app/controllers/key_edit",["ember"],function(){return Ember.Object.extend({keyId:null,newKeyId:null,callback:null,formReady:!1,open:function(e,t){$("#rename-key-popup").popup("open"),this._clear(),this.set("keyId",e).set("newKeyId",e).set("callback",t)},close:function(){$("#rename-key-popup").popup("close"),this._clear()},save:function(){if(this.keyId==this.newKeyId){this._giveCallback(!0,this.newKeyId),this.close();return}if(Mist.keysController.keyExists(this.newKeyId)){Mist.notificationController.notify("Key name exists already"),this._giveCallback(!1);return}var e=this;Mist.keysController.renameKey(this.keyId,this.newKeyId,function(t,n){e._giveCallback(t,n),t&&e.close()})},_clear:function(){this.set("keyId",null).set("newKeyId",null).set("callback",null)},_updateFormReady:function(){this.newKeyId&&this.set("newKeyId",this.newKeyId.replace(/\W/g,"")),this.set("formReady",!!this.newKeyId)},_giveCallback:function(e,t){this.callback&&this.callback(e,t)},formObserver:function(){Ember.run.once(this,"_updateFormReady")}.observes("newKeyId")})}),define("app/models/key",["ember"],function(){return Ember.Object.extend({id:null,probing:null,machines:null,selected:null,isDefault:null,associate:function(e,t,n,r){Mist.keysController.associateKey(this.id,e,t,n,r)},disassociate:function(e,t){Mist.keysController.disassociateKey(this.id,e,null,t)}})}),define("app/controllers/keys",["app/models/key"],function(e){return Ember.ArrayController.extend(Ember.Evented,{content:[],selectedKeys:[],loading:!1,addingKey:!1,keyRequest:!1,renamingKey:!1,associatingKey:!1,gettingPublicKey:!1,gettingPrivateKey:!1,disassociatingKey:!1,settingDefaultKey:!1,load:function(){var e=this;this.set("loading",!0),Mist.ajax.GET("/keys",{}).success(function(t){e._setContent(t)}).error(function(){e._reload()}).complete(function(t){e.set("loading",!1),e.trigger("onLoad")})}.on("init"),addKey:function(e,t,n){var r=this;this.set("addingKey",!0),Mist.ajax.PUT("/keys",{id:e,priv:t}).success(function(e){r._addKey(e)}).error(function(e){Mist.notificationController.notify(e)}).complete(function(e,t){r.set("addingKey",!1),n&&n(e,t)}),t=null},renameKey:function(e,t,n){var r=this;this.set("renamingKey",!0),Mist.ajax.PUT("/keys/"+e,{new_id:t}).success(function(){r._renameKey(e,t)}).error(function(){Mist.notificationController.notify("Failed to rename key")}).complete(function(e){r.set("renamingKey",!1),n&&n(e)})},deleteKey:function(e,t){var n=this;this.set("deletingKey",!0),Mist.ajax.DELETE("/keys/"+e,{}).success(function(){n._deleteKey(e)}).error(function(){Mist.notificationController.notify("Failed to delete key")}).complete(function(e){n.set("deletingKey",!1),t&&t(e)})},setDefaultKey:function(e,t){var n=this;this.set("settingDefaultKey",!0),Mist.ajax.POST("/keys/"+e,{}).success(function(){n._setDefaultKey(e)}).error(function(){Mist.notificationController.notify("Failed to set default key")}).complete(function(e){n.set("settingDefaultKey",!1),t&&t(e)})},associateKey:function(e,t,n,r,i){var s=this;this.set("associatingKey",!0),Mist.ajax.PUT("/backends/"+t.backend.id+"/machines/"+t.id+"/keys/"+e,{host:t.getHost(),user:r,port:i}).success(function(){s._associateKey(e,t)}).error(function(){Mist.machineKeysController.openSSH_Details()}).complete(function(r){s.set("associatingKey",!1),n&&n(r,t,e)})},disassociateKey:function(e,t,n,r){var i=t.backend.id?t.backend.id:t.backend,s=this;this.set("disassociatingKey",!0),Mist.ajax.DELETE("/backends/"+i+"/machines/"+t.id+"/keys/"+e,{host:t.getHost()}).success(function(){s._disassociateKey(e,t)}).error(function(){Mist.notificationController.notify("Failed to disassociate key")}).complete(function(e){s.set("disassociatingKey",!1),r&&r(e)})},generateKey:function(e){var t=this;this.set("generatingKey",!0),Mist.ajax.POST("/keys",{}).error(function(){Mist.notificationController.notify("Failed to generate key")}).complete(function(n,r){t.set("generatingKey",!1),e&&e(n,r.priv)})},getPrivateKey:function(e,t){var n=this;this.set("gettingPrivateKey",!0),Mist.ajax.GET("/keys/"+e+"/private",{}).error(function(){Mist.notificationController.notify("Failed to get private key")}).complete(function(e,r){n.set("gettingPrivateKey",!1),t&&t(e,r)})},getPublicKey:function(e,t){var n=this;this.set("gettingPublicKey",!0),Mist.ajax.GET("/keys/"+e+"/public",{}).error(function(){Mist.notificationController.notify("Failed to get public key")}).complete(function(e,r){n.set("gettingPublicKey",!1),t&&t(e,r)})},getKey:function(e){return this.content.findBy("id",e)},getRequestedKey:function(){if(this.keyRequest)return this.getKey(this.keyRequest)},keyExists:function(e){return!!this.getKey(e)},getMachineKeysCount:function(e){var t=0;return this.content.forEach(function(n){n.machines.some(function(n){if(n[1]==e.id&&n[0]==e.backend.id)return++t})}),t},_reload:function(){Ember.run.later(this,function(){this.load()},2e3)},_setContent:function(t){var n=this;Ember.run(function(){n.set("content",[]),t.forEach(function(t){n.content.pushObject(e.create(t))}),n.trigger("onKeyListChange")})},_addKey:function(t){Ember.run(this,function(){this.content.pushObject(e.create(t)),this.trigger("onKeyListChange"),this.trigger("onKeyAdd")})},_deleteKey:function(e){Ember.run(this,function(){this.content.removeObject(this.getKey(e)),this.trigger("onKeyListChange"),this.trigger("onKeyDelete")})},_renameKey:function(e,t){Ember.run(this,function(){this.getKey(e).set("id",t),this.trigger("onKeyRename")})},_setDefaultKey:function(e){Ember.run(this,function(){this.content.forEach(function(t){t.set("isDefault",t.id==e)}),this.trigger("onDefaultKeySet")})},_associateKey:function(e,t){Ember.run(this,function(){this.getKey(e).machines.pushObject([t.backend.id,t.id]),t.set("keysCount",this.getMachineKeysCount(t)),t.set("probed",!0),t.probe(e),this.trigger("onKeyAssociate")})},_disassociateKey:function(e,t){Ember.run(this,function(){var n=this.getKey(e);n.machines.some(function(e){if(e[1]==t.id&&(e[0]==t.backend.id||e[0]==t.backend))return n.machines.removeObject(e),!0}),t.set("keysCount",this.getMachineKeysCount(t)),t.set("probed",!!t.keysCount),this.trigger("onKeyDisassociate")})},_updateSelectedKeys:function(){Ember.run(this,function(){var e=[];this.content.forEach(function(t){t.selected&&e.push(t)}),this.set("selectedKeys",e),this.trigger("onSelectedKeysChange")})},selectedKeysObserver:function(){Ember.run.once(this,"_updateSelectedKeys")}.observes("content.@each.selected")})}),define("app/controllers/machine_tags",["ember"],function(){return Ember.Object.extend({newTag:null,machine:null,callback:null,addingTag:null,deletingTag:null,open:function(e,t){this._clear(),this.set("machine",e),this.set("callback",t),Ember.run.next(function(){$("#machine-tags-popup").popup("open")})},close:function(){$("#machine-tags-popup").popup("close"),this._clear()},add:function(){var e=this,t=this.newTag,n=this.machine;this.set("addingTag",!0),Mist.ajax.POST("backends/"+n.backend.id+"/machines/"+n.id+"/metadata",{tag:t}).success(function(){n.tags.pushObject(t)}).error(function(){Mist.notificationController.notify("Failed to add tag :"+t)}).complete(function(n){e.set("addingTag",!1),e.callback&&e.callback(n,t)})},deleteTag:function(e){var t=this,n=this.machine;this.set("deletingTag",!0),Mist.ajax.DELETE("backends/"+n.backend.id+"/machines/"+n.id+"/metadata",{tag:e}).success(function(){n.tags.removeObject(e)}).error(function(){Mist.notificationController.notify("Failed to delete tag :"+e)}).complete(function(n){t.set("deletingTag",!1),t.callback&&t.callback(n,e)})},_clear:function(){this.set("machine",null),this.set("callback",null)}})}),define("app/models/command",["ember"],function(){return Ember.Object.extend({id:null,command:null,response:null,pendingResponse:null})}),define("app/controllers/machine_shell",["app/models/command","ember"],function(e){return Ember.Object.extend(Ember.Evented,{command:null,machine:null,commandHistoryIndex:-1,open:function(e){this._clear(),this.set("machine",e),$("#machine-shell-popup").on("popupafteropen",function(){var e=navigator.userAgent.toLowerCase(),t=e.indexOf("android")>-1;t||$("#shell-input input").focus()}).popup("option","dismissible",!1).popup("open"),$(window).on("resize",function(){return $("#shell-return").css({height:$(window).height()-290+"px"}),!0}),$(window).trigger("resize"),Ember.run.next(function(){$("#shell-input input").focus()})},close:function(){$("#machine-shell-popup").popup("close"),$(window).off("resize"),this._clear()},submit:function(t){function a(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}var n=this.machine;if(!n||!n.probed||!this.command)return;var r=n.commandHistory,i=e.create({id:n.backend.id+n.id+r.length,command:this.command,response:"",pendingResponse:!0,"data-collapsed":!1});r.unshiftObject(i);var s="/backends/"+n.backend.id+"/machines/"+n.id+"/shell",o=n.getHost(),u={host:o,command:i.command,command_id:i.id};t&&(u.timeout=t),s=s+"?"+a(u),$("#hidden-shell").append('<iframe id="'+i.id+'" src="'+s+'"></iframe>'),this.set("command",""),this.set("commandHistoryIndex",-1)},_clear:function(){Ember.run(this,function(){this.set("machine",null)})},_giveCallback:function(e,t){this.callback&&this.callback(e,t)},machinesObserver:function(){Ember.run.once(this,"_updateActions")}.observes("machines")})}),define("app/controllers/machine_manual_monitoring",["ember"],function(){return Ember.Object.extend({machine:null,callback:null,command:null,open:function(e,t){this._clear(),this.set("machine",e),this.set("callback",t);var n=this;this.getMonitoringCommand(this.machine,function(e,t){e&&(n.set("command",t.command),$("#manual-monitoring-popup").popup("open"))})},close:function(){this._clear(),$("#manual-monitoring-popup").popup("close")},_clear:function(){this.set("machine",null).set("callback",null).set("command",null)},getMonitoringCommand:function(e,t){var n=this;this.set("gettingCommand",!0),Mist.ajax.POST("/backends/"+e.backend.id+"/machines/"+e.id+"/monitoring",{action:"enable",dns_name:e.extra.dns_name?e.extra.dns_name:"n/a",public_ips:e.public_ips?e.public_ips:[],name:e.name?e.name:e.id,no_ssh:!0,dry:!0}).success(function(e){n.set("command",e.command)}).error(function(e){Mist.notificationController.notify("Failed to enable monitoring: "+e)}).complete(function(e,r){n.set("gettingCommand",!1),t&&t(e,r)})},machineProbedObserver:function(){if(this.machine&&this.machine.probed&&!this.machine.enablingMonitoring){var e=this.machine;Mist.confirmationController.set("title","Enable monitoring"),Mist.confirmationController.set("text","Are you sure you want to enable monitoring for this machine?"),Mist.confirmationController.set("callback",function(){Mist.monitoringController.enableMonitoring(e)}),this.close(),Ember.run.later(function(){Mist.confirmationController.show()},300)}}.observes("machine.probed")})}),define("app/controllers/image_search",["ember"],function(){return Ember.ArrayController.extend(Ember.Evented,{images:null,searchTerm:null,isSearching:null,searchResults:null,pendingSearchCancelation:null,scheduleNewSearch:function(e){var t=this;this.cancelSearch(function(){t.search(e)})},cancelSearch:function(e){this.trigger("beforeSearchCancel");if(this.isSearching){var t=this;this.set("pendingSearchCancelation",function(){t.set("pendingSearchCancelation",null),t.trigger("onSearchCancel"),e&&e()})}else e&&e()},search:function(e){if(!this.searchTerm){this.set("searchResults",[]),this.trigger("onSearchEnd");return}this.trigger("beforeSearchStart",this.searchTerm),this.set("isSearching",!0),this.set("searchResults",[]),this.trigger("onSearchStart",this.searchTerm);if(e)this.searchOnServer();else{var t=Math.ceil(this.images.length/10);this.recursiveChunkSearch(this.searchTerm.toLowerCase(),0,t)}},endSearch:function(){this.set("isSearching",!1),this.pendingSearchCancelation?this.pendingSearchCancelation():this.trigger("onSearchEnd")},recursiveChunkSearch:function(e,t,n){Ember.run.later(this,function(){var r=this.images,i=r.length;if(this.pendingSearchCancelation||t>=i){this.endSearch();return}for(var s=t,o=0;s<i&&o<n;s++,o++)if(r[s].id.toLowerCase().indexOf(e)>-1||r[s].name.toLowerCase().indexOf(e)>-1)r[s].star?this.searchResults.unshiftObject(r[s]):this.searchResults.pushObject(r[s]);this.recursiveChunkSearch(e,t+n,n)},60)},searchOnServer:function(){var e=this,t=[];Mist.backendsController.content.forEach(function(n,r){if(!n.enabled)return;if(n.isBareMetal)return;t.push(r),n.searchImages(e.searchTerm,function(n,i){n&&e.searchResults.addObjects(i),t.removeObject(r),t.length||e.endSearch()})})},searchTermObserver:function(){Ember.run.once(this,"scheduleNewSearch")}.observes("searchTerm")})}),define("app/controllers/rules",["app/models/rule","ember"],function(e){return Ember.ArrayController.extend({content:[],command:null,commandRule:null,creationPending:!1,metricList:["load","cpu","ram","disk-write","network-tx"],operatorList:[{title:"gt",symbol:">"},{title:"lt",symbol:"<"}],actionList:["alert","reboot","destroy","command"],setContent:function(t){if(!t)return;var n=this;Ember.run(function(){for(ruleId in t){var r=t[ruleId];r.id=ruleId,r.maxValue=t[ruleId].max_value,r.actionToTake=t[ruleId].action,r.operator=n.getOperatorByTitle(t[ruleId].operator),r.machine=Mist.backendsController.getMachine(r.machine,r.backend)||r.machine,n.content.pushObject(e.create(r))}})},getRuleById:function(e){for(var t=0;t<this.content.length;t++)if(this.content[t].id==e)return this.content[t];return null},getOperatorByTitle:function(e){var t=null;return this.operatorList.forEach(function(n){n.title==e&&(t=n)}),t},creationPendingObserver:function(){this.creatingPending?$("#add-rule-button").addClass("ui-state-disabled"):$("#add-rule-button").removeClass("ui-state-disabled")}.observes("creationPending"),newRule:function(t,n,r,i,s){this.set("creationPending",!0);var o=this;Mist.ajax.POST("/rules",{backendId:t.backend.id,machineId:t.id,metric:n,operator:r.title,value:i,action:s}).success(function(u){info("Successfully created rule ",u.id),o.set("creationPending",!1);var a=e.create({id:u.id,value:i,metric:n,machine:t,operator:r,maxValue:u.max_value,actionToTake:s});o.pushObject(a),o.redrawRules()}).error(function(e){Mist.notificationController.notify("Error while creating rule: "+e),o.set("creationPending",!1)})},updateRule:function(e,t,n,r,i,s){var o=this.getRuleById(e);if(!o)return!1;r||(r=o.value),t||(t=o.metric),s||(s=o.command),n||(n=o.operator),i||(i=o.actionToTake);if(r==o.value&&t==o.metric&&s==o.command&&i==o.actionToTake&&n.title==o.operator.title)return!1;t!="network-tx"&&t!="disk-write"&&r>100&&(r=100),o.set("pendingAction",!0),Mist.ajax.POST("/rules",{id:e,value:r,metric:t,command:s,operator:n.title,action:i}).success(function(u){info("Successfully updated rule ",e),o.set("pendingAction",!1),o.set("value",r),o.set("metric",t),o.set("command",s),o.set("operator",n),o.set("actionToTake",i),o.set("maxValue",u.max_value);var a=parseInt(o.maxValue),f=parseInt(o.value);f>a&&o.set("value",a)}).error(function(e){Mist.notificationController.notify("Error while updating rule: "+e),o.set("pendingAction",!1)})},saveCommand:function(){$(".rule-command-popup").popup("close"),this.updateRule(this.commandRule.id,null,null,null,"command",this.command)},changeRuleValue:function(e){var t=$(e.currentTarget).attr("id"),n=$(e.currentTarget).find(".ui-slider-handle").attr("aria-valuenow");this.updateRule(t,null,null,n)},setSliderEventHandlers:function(){function e(e){$(e.currentTarget).addClass("open"),$(e.currentTarget).find(".ui-slider-track").fadeIn()}function t(e){$(e.currentTarget).find(".ui-slider-track").fadeOut(),$(e.currentTarget).find(".ui-slider").removeClass("open"),Mist.rulesController.changeRuleValue(e)}$(".rules-container .ui-slider").on("tap",e),$(".rules-container .ui-slider").on("click",e),$(".rules-container .ui-slider").on("mouseover",e),$("#single-machine").on("tap",t),$(".rules-container .rule-box").on("mouseleave",t)},removeSliderEventHandlers:function(){$(".rules-container .ui-slider").off("tap"),$(".rules-container .ui-slider").off("click"),$(".rules-container .ui-slider").off("mouseover"),$("#single-machine").off("tap"),$(".rules-container .rule-box").off("mouseleave")},redrawRules:function(){var e=this;Ember.run.next(function(){e.removeSliderEventHandlers(),$(".rule-box").trigger("create"),e.setSliderEventHandlers()})}})}),define("app/controllers/file_upload",["ember"],function(){return Ember.Object.extend({file:null,title:null,label:null,callback:null,uploadingFile:null,open:function(e,t,n){this.set("title",e).set("label",t).set("callback",n),$("#file-upload").popup("open")},close:function(){this.clear(),$("#file-upload").popup("close")},clear:function(){this.set("title",null).set("label",null).set("callback",null)},confirmUpload:function(){this.callback&&this.callback(this.file),this.close()},uploadFile:function(e){var t=this,n=new FileReader;n.onloadend=function(e){e.target.readyState==FileReader.DONE?t.set("file",e.target.result):Mist.notificationsController.notify("Failed to upload file"),t.set("uploadingFile",!1)},this.set("uploadingFile",!0),n.readAsText(e,"UTF-8")}})}),define("app/views/templated",["ember"],function(){return Ember.View.extend({init:function(){this._super();var e=this.name;if(!e){var t=this.constructor.toString().split(".")[1].split("View")[0];e=t.replace(/([a-z])([A-Z])/g,function(e,t){return t+"_"+e.slice(1).toLowerCase()})}this.set("template",Ember.TEMPLATES[e+"/html"])}})}),define("app/views/mistscreen",["app/views/templated","ember"],function(e){return e.extend({didInsertElement:function(){$(".ui-page-active").page&&$(".ui-page-active").page()}})}),define("app/views/home",["app/views/mistscreen","ember"],function(e){return e.extend({load:function(){Ember.run.next(function(){document.title="mist.io - home"})}.on("didInsertElement"),actions:{addBackend:function(){Mist.backendAddController.open()}}})}),define("app/views/login",["app/views/templated","ember"],function(e){return e.extend({updateLoginButton:function(){Mist.loginController.loggingIn||!Mist.loginController.formReady?$("#login-ok").addClass("ui-state-disabled"):$("#login-ok").removeClass("ui-state-disabled")},keyUp:function(e){e.keyCode==13&&Mist.loginController.formReady&&Mist.loginController.login()},actions:{backClicked:function(){Mist.loginController.close()},loginClicked:function(){Mist.loginController.login()}},updateLoginButtonObserver:function(){Ember.run.once(this,"updateLoginButton")}.observes("Mist.loginController.formReady","Mist.loginController.loggingIn")})}),define("app/views/backend_button",["ember"],function(){return Ember.View.extend({tagName:"a",backend:null,attributeBindings:["data-role","data-icon"],template:Ember.Handlebars.compile("{{title}}"),renderButton:function(){var e=$("#"+this.elementId);e.button?(e.button(),$("#backend-buttons").controlgroup&&$("#backend-buttons").controlgroup("refresh"),this.stateObserver()):Ember.run.later(this,function(){this.renderButton()},100)}.on("didInsertElement"),destroyButton:function(){Ember.run.next(function(){$("#backend-buttons").controlgroup&&$("#backend-buttons").controlgroup("refresh")})}.on("willDestroyElement"),click:function(){$("#edit-backend-popup").popup("option","positionTo","#"+this.elementId),Mist.backendEditController.open(this.backend)},stateObserver:function(){$("#"+this.elementId).parent().removeClass("ui-icon-check ui-icon-offline ui-icon-waiting"),this.backend.state=="online"?$("#"+this.elementId).parent().addClass("ui-icon-check"):this.backend.state=="offline"?$("#"+this.elementId).parent().addClass("ui-icon-offline"):this.backend.state=="waiting"&&$("#"+this.elementId).parent().addClass("ui-icon-waiting")}.observes("backend.state")})}),define("app/views/backend_add",["app/views/templated","ember"],function(e){return e.extend({firstFieldLabel:"API Key",secondFieldLabel:"API Secret",updateAddButton:function(){Mist.backendsController.addingBackend||!Mist.backendAddController.formReady?$("#new-backend-ok").addClass("ui-state-disabled"):$("#new-backend-ok").removeClass("ui-state-disabled")},clear:function(){$("#gce-bundle").hide(),$("#non-hp-cloud").hide(),$("#baremetal-bundle").hide(),$("#openstack-bundle").hide(),$("#new-backend-provider").collapsible("collapse"),$("#new-backend-second-field").attr("type","password"),$("#gce-bundle a").removeClass("ui-icon-check").addClass("ui-icon-carat-u"),Ember.run.next(function(){$("#add-backend-panel").trigger("create")})},actions:{selectProvider:function(e){Mist.backendAddController._clear(),this.clear(),$("#new-backend-second-field").attr("type","password"),$("#new-backend-provider").collapsible("collapse"),$("#opentack-advanced-wrapper").hide(),$("#openstack-bundle").hide(),$("#baremetal-bundle").hide(),$("#non-hp-cloud").hide(),e.provider.indexOf("rackspace")>-1||e.provider.indexOf("linode")>-1?(this.set("firstFieldLabel","Username"),this.set("secondFieldLabel","API Key")):e.provider.indexOf("nephoscale")>-1?(this.set("firstFieldLabel","Username"),this.set("secondFieldLabel","Password")):e.provider.indexOf("digitalocean")>-1?(this.set("firstFieldLabel","Client ID"),this.set("secondFieldLabel","API Key")):e.provider.indexOf("gce")>-1?(this.set("firstFieldLabel","Email address"),this.set("secondFieldLabel",""),$("#gce-bundle").show()):e.provider.indexOf("openstack")>-1?(this.set("firstFieldLabel","Username"),this.set("secondFieldLabel","Password"),e.provider.indexOf("region-")>-1?Mist.backendAddController.set("newBackendOpenStackURL","https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens"):$("#opentack-advanced-wrapper").show(),$("#openstack-bundle").show()):e.provider.indexOf("bare_metal")>-1?(this.set("firstFieldLabel","Hostname"),this.set("secondFieldLabel","User"),Mist.backendAddController.set("newBackendSecondField","root"),Mist.backendAddController.set("newBackendPort",22),Ember.run.next(function(){$("#new-backend-key .ui-listview").listview("refresh"),$("#new-backend-second-field").attr("type",""),$("#baremetal-bundle").show()})):(this.set("firstFieldLabel","API Key"),this.set("secondFieldLabel","API Secret")),Mist.backendAddController.set("newBackendProvider",e),$("#new-backend-provider").collapsible("option","collapsedIcon","check"),Mist.backendsController.content.some(function(t){if(e.provider.split("_")[0]=="ec2"&&t.provider.split("_")[0]=="ec2"||e.provider.substr(0,9)=="rackspace"&&t.provider.substr(0,9)=="rackspace")return Mist.backendAddController.set("newBackendFirstField",t.apikey),Mist.backendAddController.set("newBackendSecondField","getsecretfromdb"),!0})},selectKey:function(e){$("#new-backend-key").collapsible("collapse"),Mist.backendAddController.set("newBackendKey",e)},privateKeyClicked:function(){Mist.fileUploadController.open("Upload private key","Key",function(e){Mist.backendAddController.set("newBackendSecondField",e),e?$("#gce-bundle a").addClass("ui-icon-check").removeClass("ui-icon-carat-u"):$("#gce-bundle a").removeClass("ui-icon-check").addClass("ui-icon-carat-u")})},createKeyClicked:function(){Mist.keyAddController.open(function(e,t){e&&(Mist.backendAddController.set("newBackendKey",t),$("#new-backend-key").collapsible("collapse"),$("#new-backend-key .ui-listview").listview("refresh"))})},backClicked:function(){Mist.backendAddController.close()},addClicked:function(){Mist.backendAddController.add()},advancedToggled:function(){var e=$("#non-hp-cloud");e.css("display")=="none"?e.slideDown():e.slideUp()}},updateDoneButtonObserver:function(){Ember.run.once(this,"updateAddButton")}.observes("Mist.backendsController.addingBackend","Mist.backendAddController.formReady")})}),define("app/views/backend_edit",["app/views/templated","ember"],function(e){return e.extend({updateEnabledState:function(){if($("#backend-toggle").slider&&Mist.backendEditController.backend){var e=$("#backend-toggle").val(),t=Mist.backendEditController.backend.enabled?"1":"0";e!=t&&$("#backend-toggle").val(t).slider("refresh")}},stateObserver:function(){Ember.run.once(this,"updateEnabledState")}.observes("Mist.backendsController.togglingBackend","Mist.backendEditController.backend.state"),actions:{stateToggleSwitched:function(){Mist.backendEditController.toggleBackend()},deleteClicked:function(){Mist.backendEditController.backend.getMonitoredMachines.length?$("#monitoring-message").show():$("#monitoring-message").hide(),$("#backend-delete-confirm").slideDown()},backClicked:function(){$("#backend-delete-confirm").slideUp(),$("#edit-backend-popup").popup("close")},yesClicked:function(){$("#button-confirm-disable").addClass("ui-state-disabled"),Mist.backendEditController.deleteBackend(function(e){e&&($("#edit-backend-popup").popup("close"),$("#backend-delete-confirm").slideUp()),$("#button-confirm-disable").removeClass("ui-state-disabled")})},noClicked:function(){$("#backend-delete-confirm").slideUp()}}})}),define("app/views/monitoring",["app/views/templated","ember"],function(e){return e.extend({graphs:{cpu:null,load:null,memory:null,diskRead:null,diskWrite:null,networkTX:null,networkRX:null},viewRendered:!1,graphsCreated:!1,init:function(){this._super(),this.setUpGraphs()},didInsertElement:function(){this._super(),this.set("viewRendered",!0)},willDestroyElement:function(){this._super(),Mist.monitoringController.request.stop(),this.graphs.cpu.isAppended&&Mist.monitoringController.graphs.disableAnimation(),Mist.monitoringController.reset(),Em.run.next(function(){$(".monitoring-button").button()})},setUpGraphs:function(){var e=this.get("controller").get("model");if(e.id!=" "&&this.viewRendered&&!e.hasMonitoring)Mist.monitoringController.request.stop();else if(this.viewRendered&&e.hasMonitoring&&!this.graphsCreated&&e.id!=" "){var t=this,n=Mist.monitoringController,r=function(){Mist.isJQMInitialized?Em.run.next(function(){t.redrawJQMComponents(),$(".graphBtn").hide(0),t.createGraphs(6e5),n.initialize({machineModel:e,graphs:t.graphs}),$(window).resize(function(){var e=$("#GraphsArea").width()-2;for(metric in t.graphs)t.graphs[metric].changeWidth(e)})}):window.setTimeout(r,1e3)};r(),Mist.rulesController.redrawRules()}}.observes("controller.model.hasMonitoring","viewRendered"),redrawJQMComponents:function(){$(".monitoring-button").trigger("create"),$("#add-rule-button").trigger("create"),$("#monitoring-dialog").trigger("create"),$("#graphBar").trigger("create"),$(".graphControls").trigger("create"),$("#graphsGoForward").addClass("ui-disabled"),$("#graphsResetHistory").addClass("ui-disabled")},createGraphs:function(e){var t=$("#GraphsArea").width()-2;this.graphs.cpu=new this.Graph("cpuGraph",t,e,"%"),this.graphs.load=new this.Graph("loadGraph",t,e),this.graphs.memory=new this.Graph("memoryGraph",t,e,"%"),this.graphs.diskRead=new this.Graph("diskReadGraph",t,e),this.graphs.diskWrite=new this.Graph("diskWriteGraph",t,e),this.graphs.networkRX=new this.Graph("networkRXGraph",t,e),this.graphs.networkTX=new this.Graph("networkTXGraph",t,e),self.graphsCreated=!0},Graph:function(e,t,n,r){function T(e){function t(){this.d3Selector=null,this.fps=null,this.duration=null,this.data=null,this.before=null,this.after=null,this.stopFlag=!1,this.startPoint=0,this.stopPoint=0,this.start=function(){this.before&&this.before(this.data);var e=this,t=1e3/this.fps,n=0,i=o.transform("translate("+this.startPoint.x+","+this.startPoint.y+")"),s=o.transform("translate("+this.stopPoint.x+","+this.stopPoint.y+")"),u=o.interpolateTransform(i,s);this.d3Selector.attr("transform",u(0));var a=window.setInterval(function(){n++;var t=u(n/(e.fps*e.duration));e.d3Selector.attr("transform",t);if(n>=e.fps*e.duration||e.stopFlag){window.clearInterval(a),f();return}},t),f=function(){e.stopFlag=!1,e.after&&e.after(e.data),r.nextAnimation()}},this.stop=function(){this.stopFlag=!0}}function n(e){var t=[];return t.maxLength=e?e:3,t.pushAnimation=function(e){this.push(e),this.length==1?this[0].start():this.length>this.maxLength&&this[0].stop()},t.nextAnimation=function(){this.splice(0,1),this.length>0&&this[0].start()},t}this.select=function(e){return i.d3Selector=e,this},this.fps=function(e){return i.fps=e,this},this.duration=function(e){return i.duration=e,this},this.points=function(e,t,n,r){return i.startPoint={x:e,y:t},i.stopPoint={x:n,y:r},this},this.data=function(e){return i.data=e,this},this.before=function(e){return i.before=e,this},this.after=function(e){return i.after=e,this},this.push=function(){r.pushAnimation(i),i=new t},this.clearBuffer=function(t){(typeof t=="undefined"||t)&&r.length>0&&r[0].stop(),r=n(e)};var r=new n(e),i=new t}function N(e,t,n){d=o.select("#"+e).append("svg").attr("width",t).attr("height",n),v=o.select("#"+e).select("svg").append("g").attr("class","grid-x").attr("transform","translate("+a.left+","+n+")"),m=o.select("#"+e).select("svg").append("g").attr("class","grid-y").attr("transform","translate("+a.left+","+a.top+")"),y=d.append("g").attr("class","valueArea").attr("transform","translate("+a.left+","+a.top+")").append("path"),g=d.append("g").attr("class","valueLine").attr("transform","translate("+a.left+","+a.top+")").append("path"),b=d.append("g").attr("class","x-axis").attr("transform","translate("+a.left+","+(n-a.bottom+2)+")"),w=d.append("rect").attr("class","hideAnimeLine").attr("width",a.left-1).attr("height",n+a.top),E=d.append("line").attr("class","axisLine").attr("x1",""+a.left).attr("y1",""+(n-a.bottom+2)).attr("x2",t+a.left+a.right).attr("y2",""+(n-a.bottom+2)),S=d.append("line").attr("class","axisLine").attr("x1",""+a.left).attr("y1","0").attr("x2",""+a.left).attr("y2",""+(n-a.bottom+3)),x=d.append("g").attr("class","y-axis").attr("transform","translate("+a.left+","+a.top+")")}function C(){g.animation=new T,y.animation=new T,b.animation=new T,v.animation=new T}function k(){var e=d.append("line").attr("class","selectorLine").attr("x1",""+a.left).attr("y1","0").attr("x2",""+a.left).attr("y2",""+(f.height-a.bottom+3)).style("display","none"),t=0,n=0,r=!1,i,s=function(e){if($($("#"+f.id).selector+":hover").length<=0){u();return}if(t>a.left){r||($(e).find(".selectorLine").show(0),$("#GraphsArea").find(".valuePopUp").show(0),r=!0);var n=t-a.left,i=0;f.animationEnabled&&(i=$("#"+f.id).find(".valueLine > path").attr("transform"),i=+i.slice(10,i.indexOf(",")));var s=0,o=0;for(var l=0;l<f.xCordinates.length;l++){if(f.xCordinates[l]+i>n)break;s=l}if(f.displayedData.length==0||f.displayedData[s].value==null||f.displayedData[s+1].value==null){$("#GraphsArea").children(".valuePopUp").text("No Data");return}var c=f.displayedData[s+1].value-f.displayedData[s].value,h=(n-(f.xCordinates[s]+i))/f.valuesDistance;o=f.displayedData[s].value+c*h,o<0?0:o;var p="";o>=1073741824?p=(o/1073741824).toFixed(2)+"G":o>=1048576?p=(o/1048576).toFixed(2)+"M":o>=1024?p=(o/1024).toFixed(2)+"K":f.yAxisValueFormat=="%"?p=o.toFixed(2)+"%":p=o.toFixed(2),$("#GraphsArea").children(".valuePopUp").text(p)}else r&&($(e).find(".selectorLine").hide(0),$("#GraphsArea").find(".valuePopUp").hide(0),r=!1)},o=function(r){t=r.pageX-$("#"+f.id).children("svg").offset().left,n=r.pageY-$("#"+f.id).children("svg").offset().top,e.attr("x1",""+t).attr("x2",""+t);var i=$("#GraphsArea").children(".valuePopUp").width(),o=r.pageX+i>=window.innerWidth-25?-(i+15):15;$("#GraphsArea").children(".valuePopUp").css("left",r.clientX+o+"px"),$("#GraphsArea").children(".valuePopUp").css("top",r.clientY-35+"px"),s(this)},u=function(){r=!1;var e=$(this).find(".selectorLine");$(e).css("display")!="none"&&$(e).hide(0),$("#GraphsArea").find(".valuePopUp").hide(0),window.clearInterval(i)};$("#"+f.id).children("svg").mouseenter(function(){i=window.setInterval(s,500)}),$("#"+f.id).children("svg").mouseleave(u),$("#"+f.id).children("svg").mousemove(o)}function L(){d.select(".selectorLine").attr("y2",""+(f.height-a.bottom+3))}function A(){C(),k()}var i=60,s=60,o=require("d3"),u=t*.125,a={top:10,right:0,bottom:24,left:52};this.id=e,this.name=e.replace("Graph",""),this.width=t,this.height=u<85?85:u,this.data=[],this.timeDisplayed=n/1e3,this.animationEnabled=!0,this.yAxisValueFormat=r,this.isAppended=!1,this.displayedData=[],this.xCordinates=[],this.clearAnimPending=!1,this.valuesDistance=0;var f=this;t=this.width-a.left-a.right,height=this.height-a.top-a.bottom;var l=o.time.scale().range([0,t]),c=o.scale.linear().range([height,0]),h=o.svg.line().x(function(e){return l(e.time)}).y(function(e){return c(e.value)}).defined(function(e){return e.value!=null}),p=o.svg.area().x(function(e){return l(e.time)}).y1(function(e){return c(e.value)}).y0(height).defined(function(e){return e.value!=null}),d,v,m,g,y,b,w,E,S,x;this.updateData=function(e){e.length>0&&this.data.length>0&&e[0].time<=this.data[this.data.length-1].time&&(e=e.slice(1)),this.isAppended||(N(this.id,this.width,this.height),this.isAppended=!0,A()),this.data=this.data.concat(e);if(this.data.length>s){var t=this.data.length-s;this.data=this.data.slice(t)}this.updateView()},this.clearData=function(){this.data=[]},this.updateView=function(){var e=this,t=function(t,n){var r;return e.timeDisplayed<=600?t.ticks(o.time.minutes,2):e.timeDisplayed<=3600?t.ticks(o.time.minutes,12):e.timeDisplayed<=86400?t.ticks(o.time.hours,6):e.timeDisplayed<=604800?t.ticks(o.time.days,1):e.timeDisplayed<=18144e3&&t.ticks(o.time.days,7),typeof n!="undefined"&&t.tickFormat(o.time.format(n)),t};this.displayedData=[],this.xCordinates=[];var n=60;this.data.length>n?this.displayedData=this.data.slice(this.data.length-n):this.displayedData=this.data;var i=o.max(this.displayedData,function(e){return e.value}),s=i==0?1:i;l.domain(o.extent(this.displayedData,function(e){return e.time})),c.domain([0,s]),this.calcValueDistance(),this.animationEnabled?l.range([-this.valuesDistance,this.width-a.left-a.right]):l.range([0,this.width-a.left-a.right]),this.displayedData.forEach(function(t){e.xCordinates.push(l(t.time))});var u=o.svg.axis().scale(l).orient("bottom"),f=o.svg.axis().scale(l).orient("bottom").tickSize(-this.height,0,0).tickFormat(""),d=o.svg.axis().scale(c).orient("left").ticks(5).tickSize(-this.width,0,0).tickFormat(""),w=o.svg.axis().scale(c).orient("left").ticks(5).tickFormat(function(e){return e>=1073741824?(e/1073741824).toFixed(1)+"G":e>=1048576?(e/1048576).toFixed(1)+"M":e>=1024?(e/1024).toFixed(1)+"K":r=="%"?e+"%":e}),E="%I:%M%p";this.width<=700&&this.timeDisplayed==604800||this.width<=521&&this.timeDisplayed==2592e3?E="%d-%b":this.width<=560&&this.timeDisplayed==86400?E="%I:%M%p":this.timeDisplayed>=86400&&(E="%d-%m | %I:%M%p"),valueLinePath=h(this.displayedData),valueAreaPath=p(this.displayedData),valueLinePath||(valueLinePath="M 0 0",valueAreaPath="M 0 0");if(this.animationEnabled&&!this.clearAnimPending){var S=12,T=10;g.animation.select(g).fps(S).duration(T).points(this.valuesDistance,0,0,0).data(valueLinePath).before(function(e){this.d3Selector.attr("d",e)}).push(),y.animation.select(y).fps(S).duration(T).points(this.valuesDistance,0,0,0).data(valueAreaPath).before(function(e){this.d3Selector.attr("d",e)}).push(),b.animation.select(b).fps(S).duration(T).points(a.left+this.valuesDistance,this.height-a.bottom+2,a.left,this.height-a.bottom+2).data({modelX:u,modelY:w,labelFormat:E}).before(function(e){this.d3Selector.call(t(e.modelX,e.labelFormat)),this.d3Selector.selectAll("text").style("text-anchor","end").attr("x","-10"),x.call(e.modelY)}).push(),v.animation.select(v).fps(S).duration(T).points(a.left+this.valuesDistance,this.height,a.left,this.height).data({modelX:f,modelY:d}).before(function(e){this.d3Selector.call(t(e.modelX)),m.call(e.modelY)}).push()}else g.attr("d",valueLinePath),y.attr("d",valueAreaPath),b.call(t(u,E)),b.selectAll("text").style("text-anchor","end").attr("x","-10"),x.call(w),v.call(t(f)),m.call(d),this.clearAnimPending&&window.setTimeout(function(){g.attr("transform","translate(0)"),y.attr("transform","translate(0)"),b.attr("transform","translate("+a.left+","+(e.height-a.bottom+2)+")"),v.attr("transform","translate("+a.left+","+e.height+")"),e.clearAnimPending=!1},50)},this.changeWidth=function(e){if(!d)return;var t=e*.125;this.height=t<85?85:t,this.width=e,d.attr("width",this.width).attr("height",this.height),p.y0(this.height-a.top-a.bottom),c=o.scale.linear().range([this.height-a.top-a.bottom,0]),l=o.time.scale().range([0,this.width-a.left-a.right]),b.attr("transform","translate(0,"+(this.height-a.bottom)+")"),E.attr("y1",""+(this.height-a.bottom+2)).attr("y2",""+(this.height-a.bottom+2)).attr("x2",""+(this.width+a.left+a.right)),S.attr("y2",""+(this.height-a.bottom+3)),L(),this.clearAnimation(!0),this.updateView()},this.enableAnimation=function(){this.animationEnabled=!0},this.disableAnimation=function(e){this.animationEnabled=!1,this.clearAnimation(e)},this.clearAnimation=function(e){g.animation.clearBuffer(e),y.animation.clearBuffer(e),b.animation.clearBuffer(e),v.animation.clearBuffer(e),e&&(this.clearAnimPending=!0)},this.getLastMeasurementTime=function(){if(this.data.length==0)return null;var e=this.data[this.data.length-1];return e.time},this.getTimeWindow=function(){return this.timeDisplayed},this.getLastValue=function(){return this.data?this.data[this.data.length-1]:null},this.getLastDisplayedValue=function(){if(this.data&&this.data.length>2){var e=$("#"+this.id).find(".valueLine > path").attr("transform");e=+e.slice(10,e.indexOf(","));if(e==0)return this.data[this.data.length-1].value;if(e==this.valuesDistance)return this.data[this.data.length-2].value;var t=this.data[this.data.length-1].value-this.data[this.data.length-2].value;return this.data[this.data.length-2].value+t*(this.valuesDistance-e)/this.valuesDistance}return null},this.calcValueDistance=function(){if(this.data.length>=2){var e=l(this.data[this.data.length-2].time),t=l(this.data[this.data.length-1].time);this.valuesDistance=t-e}},this.changeTimeWindow=function(e){this.timeDisplayed=e/1e3,this.clearData()}}})}),define("app/views/list_item",["app/views/templated","ember"],function(e){return e.extend({tagName:"li",renderListItem:function(){var e=$("#"+this.elementId).hide();Ember.run.next(this,function(){try{e.trigger("create").show().parent().listview("refresh")}catch(t){}})}.on("didInsertElement")})}),define("app/views/machine_list_item",["app/views/list_item"],function(e){return e.extend({machine:null,updateCheckbox:function(){var e=$("#"+this.elementId+" input.ember-checkbox");Ember.run.next(this,function(){e.checkboxradio&&e.checkboxradio().checkboxradio("refresh")})},actions:{disassociateGhostMachine:function(){var e=this.get("parentView").get("key").get("id"),t=this.machine;Mist.confirmationController.set("title","Disassociate machine"),Mist.confirmationController.set("text","Are you sure you want to disassociate "+t.name+" ?"),Mist.confirmationController.set("callback",function(){Mist.keysController.disassociateKey(e,t)}),Mist.confirmationController.show()}},machineSelectedObserver:function(){Ember.run.once(this,"updateCheckbox")}.observes("machine.selected")})}),define("app/views/image_list_item",["app/views/list_item"],function(e){return e.extend({image:null,actions:{toggleImageStar:function(){var e=this;this.image.toggle(function(t,n){t||e.image.set("star",!e.image.star)})},launchImage:function(){this.image.backend.images.content.addObject(this.image),Mist.machineAddController.open(),Ember.run.next(this,function(){Mist.machineAddController.view._actions.selectProvider(this.image.backend),Mist.machineAddController.view._actions.selectImage(this.image)})}}})}),define("app/views/machine_add",["app/views/templated","ember"],function(e){return e.extend({price:function(){var e=Mist.machineAddController.newMachineImage,t=Mist.machineAddController.newMachineSize,n=Mist.machineAddController.newMachineProvider,r=Mist.machineAddController.newMachineLocation;if(!e||!e.id||!t||!t.id||!n||!n.id)return 0;try{return n.provider.indexOf("ec2")>-1?e.name.indexOf("SUSE Linux Enterprise")>-1?t.price.sles:e.name.indexOf("Red Hat")>-1?t.price.rhel:t.price.linux:n.provider.indexOf("rackspace")>-1?e.name.indexOf("Red Hat")>-1?t.price.rhel:e.name.indexOf("Vyatta")>-1?t.price.vyatta:t.price.linux:n.provider.indexOf("gce")>-1?r.name.indexOf("europe-")>-1?t.price.eu:r.name.indexOf("us-")>-1?t.price.us:t.price.eu:t.price}catch(i){return 0}}.property("Mist.machineAddController.newMachineProvider","Mist.machineAddController.newMachineImage","Mist.machineAddController.newMachineSize","Mist.machineAddController.newMachineLocation"),load:function(){Mist.keysController.on("onKeyListChange",this,"renderFields");var e=$("#create-machine-panel").parent().attr("id");Mist.machineAddController.set("view",Ember.View.views[e])}.on("didInsertElement"),unload:function(){Mist.keysController.off("onKeyListChange",this,"renderFields")}.on("willDestroyElement"),fieldIsReady:function(e){$("#create-machine-"+e).collapsible("option","collapsedIcon","check").collapsible("collapse")},renderFields:function(){Ember.run.next(function(){$(".ui-collapsible").collapsible&&$(".ui-collapsible").collapsible(),$(".ui-listview").listview&&$(".ui-listview").listview().listview("refresh")})},updateLaunchButton:function(){Mist.machineAddController.formReady?$("#create-machine-ok").removeClass("ui-state-disabled"):$("#create-machine-ok").addClass("ui-state-disabled")},actions:{selectProvider:function(e){this.fieldIsReady&&this.fieldIsReady("provider"),Mist.machineAddController.set("newMachineLocation",{name:"Select Location"}).set("newMachineImage",{name:"Select Image"}).set("newMachineSize",{name:"Select Size"}).set("newMachineProvider",e),$("#create-machine-image").removeClass("ui-state-disabled"),$("#create-machine-location").addClass("ui-state-disabled"),$("#create-machine-size").addClass("ui-state-disabled"),$("#create-machine-key").addClass("ui-state-disabled")},selectImage:function(e){this.fieldIsReady&&this.fieldIsReady("image"),Mist.machineAddController.set("newMachineLocation",{name:"Select Location"}).set("newMachineSize",{name:"Select Size"}).set("newMachineImage",e),$("#create-machine-location").addClass("ui-state-disabled"),$("#create-machine-size").removeClass("ui-state-disabled"),$("#create-machine-key").addClass("ui-state-disabled")},selectSize:function(e){this.fieldIsReady("size"),Mist.machineAddController.set("newMachineLocation",{name:"Select Location"}).set("newMachineSize",e),$("#create-machine-location").removeClass("ui-state-disabled"),$("#create-machine-key").addClass("ui-state-disabled")},selectLocation:function(e){this.fieldIsReady("location"),Mist.machineAddController.set("newMachineLocation",e),$("#create-machine-key").removeClass("ui-state-disabled")},selectKey:function(e){this.fieldIsReady("key"),Mist.machineAddController.set("newMachineKey",e)},createKeyClicked:function(){var e=this;Mist.keyAddController.open(function(t,n){e.fieldIsReady("key"),Mist.machineAddController.set("newMachineKey",n)})},backClicked:function(){Mist.machineAddController.close()},launchClicked:function(){Mist.machineAddController.add()}},bindingsObserver:function(){Ember.run.once(this,"renderFields")}.observes("Mist.machineAddController.newMachineSize","Mist.machineAddController.newMachineImage","Mist.machineAddController.newMachineProvider","Mist.machineAddController.newMachineLocation"),formReadyObserver:function(){Ember.run.once(this,"updateLaunchButton")}.observes("Mist.machineAddController.formReady")})}),define("app/views/machine",["app/views/mistscreen"],function(e){return e.extend({rules:[],machine:null,providerIconClass:function(){return!this.machine||!this.machine.backend?"":"provider-"+this.machine.backend.provider}.property("machine"),load:function(){Mist.backendsController.on("onMachineListChange",this,"load"),Ember.run(this,function(){this.updateCurrentMachine(),this.machine.id&&(this.updateUptime(),this.updateFooter())})}.on("didInsertElement"),unload:function(){Mist.backendsController.off("onMachineListChange",this,"load")}.on("willDestroyElement"),updateCurrentMachine:function(){Ember.run(this,function(){var e=Mist.backendsController.getRequestedMachine();e&&this.get("controller").set("model",e),this.set("machine",this.get("controller").get("model")),this.machine.id&&this.machine.set("keysCount",Mist.keysController.getMachineKeysCount(this.machine))})},updateFooter:function(){this.machine.can_tag?$("#single-machine-page #single-machine-tags-btn").removeClass("ui-state-disabled"):$("#single-machine-page #single-machine-tags-btn").addClass("ui-state-disabled"),this.machine.probed&&this.machine.state=="running"?$("#single-machine-page #single-machine-shell-btn").removeClass("ui-state-disabled"):$("#single-machine-page #single-machine-shell-btn").addClass("ui-state-disabled"),this.machine.id?$("#single-machine-page #single-machine-power-btn").removeClass("ui-state-disabled"):$("#single-machine-page #single-machine-power-btn").addClass("ui-state-disabled")},renderMachine:function(){var e=this.get("controller").get("model");e.id!=" "&&this.setGraph()},renderKeysButton:function(){Ember.run.next(this,function(){$("#mist-manage-keys").trigger("create"),this.machine.state=="running"?$("#mist-manage-keys").removeClass("ui-state-disabled"):$("#mist-manage-keys").addClass("ui-state-disabled")})},renderMonitoringButtons:function(){Ember.run.next(this,function(){$("#add-rule-button").parent().trigger("create"),$("#disable-monitor-btn").parent().trigger("create")})},updateEnableButton:function(){Ember.run.next(this,function(){this.machine.id&&this.machine.state=="running"?$("#enable-monitor-btn").removeClass("ui-state-disabled"):$("#enable-monitor-btn").addClass("ui-state-disabled")})},updateMonitoringCollapsible:function(){Ember.run.next(this,function(){Mist.backendsController.checkedMonitoring&&this.machine.id?$("#monitoring-collapsible").show():$("#monitoring-collapsible").hide()})},updateChangeMonitoringButton:function(){Ember.run.next(this,function(){$("#enable-monitor-btn").addClass("ui-state-disabled"),this.machine.disablingMonitoring?$("#disable-monitor-btn").addClass("ui-state-disabled"):this.machine.pendingMonitoring||($("#disable-monitor-btn").removeClass("ui-state-disabled"),this.machine.enablingMonitoring||$("#enable-monitor-btn").removeClass("ui-state-disabled"))})},rulesObserver:function(){var e=Ember.ArrayController.create(),t=this.get("controller").get("model");Mist.rulesController.forEach(function(n){n.machine==t&&e.pushObject(n)}),this.set("rules",e)}.observes("Mist.rulesController.@each","Mist.rulesController.@each.machine","machine"),stopPolling:function(){"context"in Mist&&Mist.context.stop()}.observes("controller.model.hasMonitoring"),updateUptime:function(){if($("#single-machine-page").length){Ember.run.later(this,function(){this.updateUptime()},1e3);var e=this.machine;if(!e)return 0;if(!e.uptimeChecked)return 0;if(!e.uptimeFromServer)return 0;e.set("uptime",e.uptimeFromServer+(Date.now()-e.uptimeChecked))}},backClicked:function(){this.stopPolling(),Mist.Router.router.transitionTo("machines")},actions:{manageKeysClicked:function(){Mist.machineKeysController.open(this.machine)},addKeyClicked:function(){Mist.machineKeysController.openKeyList(this.machine)},tagsClicked:function(){Mist.machineTagsController.open(this.machine)},powerClicked:function(){Mist.machinePowerController.open(this.machine)},shellClicked:function(){Mist.machineShellController.open(this.machine)},enableMonitoringClicked:function(){if(Mist.authenticated)if(Mist.current_plan)if(this.machine.probed){var e=this.machine;Mist.confirmationController.set("title","Enable monitoring"),Mist.confirmationController.set("text","Are you sure you want to enable monitoring for this machine?"),Mist.confirmationController.set("callback",function(){Mist.monitoringController.changeMonitoring(e)}),Mist.confirmationController.show()}else Mist.machineManualMonitoringController.open(this.machine);else Mist.notificationController.set("msgHeader","No plan"),Mist.notificationController.set("msgPart1","In order to use our monitoring service you have to purchase a plan"),Mist.notificationController.set("msgPart2","You can do that in the Account page, which can be accessed from the menu button on the top right corner"),Mist.notificationController.showMessagebox();else Mist.loginController.open()},disableMonitoringClicked:function(){var e=this.machine;Mist.confirmationController.set("title","Disable monitoring"),Mist.confirmationController.set("text","Are you sure you want to disable monitoring for this machine?"),Mist.confirmationController.set("callback",function(){Mist.monitoringController.changeMonitoring(e)}),Mist.confirmationController.show()},addRuleClicked:function(){var e=this.machine,t="load",n={title:"gt",symbol:">"},r=5,i="alert";Mist.rulesController.newRule(e,t,n,r,i)},buttonBackMonitoring:function(){$("#monitoring-dialog").popup("close")},buttonChangeMonitoring:function(){var e=this.get("controller").get("model");e.changeMonitoring(),$("#monitoring-dialog").popup("close")},probeClicked:function(){this.machine.probe(null,function(e){e||Mist.notificationController.notify("Failed to probe machine")})},closeManualMonitoringPopup:function(){$("#manual-monitoring-popup").popup("close")}},upFor:function(){var e="";if(this.machine&&this.machine.uptime){var t=Math.floor(this.machine.uptime/1e3),n=t%60;t=Math.floor(t/60);var r=t%60;t=Math.floor(t/60);var i=t%24;t=Math.floor(t/24);var s=t;s&&(e=e+s+" days, "),i&&(e=e+i+" hours, "),r&&(e=e+r+" minutes, "),n?e=e+n+" seconds":e+="0 seconds"}return e}.property("machine.uptime"),lastProbe:function(){var e="never";if(this.machine&&this.machine.uptimeChecked>0){var t=(Date.now()-this.machine.uptimeChecked)/1e3,n=Math.floor(t/60);n>1?e=n+" minutes ago":n==1?e="1 minute ago":e="just now"}return e}.property("machine.uptime"),basicInfo:function(){if(!this.machine)return;var e={};this.machine.public_ips instanceof Array?e["Public IPs"]=this.machine.public_ips.join():typeof this.machine.public_ips=="string"&&(e["Public IPs"]=this.machine.public_ips),this.machine.private_ips instanceof Array?e["Private IPs"]=this.machine.private_ips.join():typeof this.machine.private_ips=="string"&&(e["Private IPs"]=this.machine.private_ips),this.machine.extra&&(this.machine.extra.dns_name&&(e["DNS Name"]=this.machine.extra.dns_name),this.machine.extra.launchdatetime&&(e["Launch Date"]=this.machine.extra.launchdatetime)),this.machine.image&&this.machine.image.name&&(e.image=this.machine.image.name);var t=[];for(item in e)typeof e[item]=="string"&&t.push({key:item,value:e[item]});return t}.property("machine"),metadata:function(){if(!this.machine||!this.machine.extra)return;var e=[];for(item in this.machine.extra){var t=this.machine.extra[item];(typeof t=="string"||typeof t=="number")&&e.push({key:item,value:t})}return Ember.run.next(function(){$("#single-machine-metadata").collapsible&&$("#single-machine-metadata").collapsible()}),e}.property("machine","machine.extra"),rules:function(){var e=Ember.ArrayController.create(),t=this.machine;return Mist.rulesController.forEach(function(n){n.machine==t&&e.pushObject(n)}),e}.property("Mist.rulesController.@each","Mist.rulesController.@each.machine"),modelObserver:function(){Ember.run.once(this,"load"),Ember.run.once(this,"updateEnableButton")}.observes("controller.model"),probingObserver:function(){Ember.run.next(function(){$("#machine-probe-btn").parent().trigger("create")})}.observes("machine.probing"),footerObserver:function(){Ember.run.once(this,"updateFooter")}.observes("machine.probed","machine.can_tag"),keysCountObserver:function(){Ember.run.once(this,"renderKeysButton")}.observes("machine.keysCount"),stateObserver:function(){Ember.run.once(this,"renderKeysButton"),Ember.run.once(this,"updateEnableButton")}.observes("machine.state"),hasMonitoringObserver:function(){Ember.run.once(this,"renderMonitoringButtons")}.observes("machine.hasMonitoring"),changeMonitoringObserver:function(){Ember.run.once(this,"updateChangeMonitoringButton")}.observes("machine.disablingMonitoring","machine.enablingMonitoring","machine.pendingMonitoring"),checkedMonitoringObserver:function(){Ember.run.once(this,"updateMonitoringCollapsible")}.observes("Mist.backendsController.checkedMonitoring","machine")})}),define("app/views/messagebox",["app/views/templated","ember"],function(e){return e.extend({actions:{closeMessage:function(){$("#message-box-popup").popup("close");var e=Mist.notificationController;e.msgCallback&&e.msgCallback(),e.set("msgHeader",""),e.set("msgPart1",""),e.set("msgPart2",""),e.set("msgPart3",""),e.set("msgPart4",""),e.set("msgLink",""),e.set("msgHref",""),e.set("msgCallback",null)}},hrefObserver:function(){$("#message-box-popup #message-link").attr("href",Mist.notificationController.msgHref)}.observes("Mist.notificationController.msgHref")})}),define("app/views/machine_list",["app/views/mistscreen"],function(e){return e.extend({load:function(){Mist.backendsController.on("onMachineProbe",this,"updateFooter"),Mist.backendsController.on("onSelectedMachinesChange",this,"updateFooter")}.on("didInsertElement"),unload:function(){Mist.backendsController.off("onMachineProbe",this,"updateFooter"),Mist.backendsController.off("onSelectedMachinesChange",this,"updateFooter")}.on("willDestroyElement"),updateFooter:function(){switch(Mist.backendsController.selectedMachines.length){case 0:$("#machine-list-page .ui-footer").slideUp();break;case 1:var e=Mist.backendsController.selectedMachines[0];$("#machine-list-page .ui-footer").slideDown(),e.can_tag?$("#machine-list-page #machines-tags-btn").removeClass("ui-state-disabled"):$("#machine-list-page #machines-tags-btn").addClass("ui-state-disabled"),e.probed&&e.state=="running"?$("#machine-list-page #machines-shell-btn").removeClass("ui-state-disabled"):$("#machine-list-page #machines-shell-btn").addClass("ui-state-disabled");break;default:$("#machine-list-page .ui-footer").slideDown(),$("#machine-list-page #machines-tags-btn").addClass("ui-state-disabled"),$("#machine-list-page #machines-shell-btn").addClass("ui-state-disabled")}},actions:{createClicked:function(){Mist.machineAddController.open()},tagsClicked:function(){Mist.machineTagsController.open(Mist.backendsController.selectedMachines[0])},powerClicked:function(){Mist.machinePowerController.open(Mist.backendsController.selectedMachines)},shellClicked:function(){Mist.machineShellController.open(Mist.backendsController.selectedMachines[0])},selectClicked:function(){$("#select-machines-popup").popup("open").find(".ui-listview").listview("refresh")},selectionModeClicked:function(e){$("#select-machines-popup").popup("close"),Mist.backendsController.content.forEach(function(t){t.machines.content.forEach(function(n){n.set("selected",e=="all"||e==t.title)})})}}})}),define("app/views/confirmation_dialog",["app/views/templated","ember"],function(e){return e.extend({attributeBindings:["data-role"],actions:{yesClicked:function(){Mist.confirmationController.confirm()},noClicked:function(){$("#confirmation-popup").popup("close")}}})}),define("app/views/machine_shell",["app/views/templated","ember"],function(e){return e.extend({openCommand:function(e){var t=$("#shell-return .ember-view");for(var n=0;n<t.length;++n)t.eq(n).attr("id")!=e.attr("id")&&(t.eq(n).find(".output").slideUp(200),t.eq(n).find(".shell-li-arrow").removeClass("ui-icon-carat-u").addClass("ui-icon-carat-d"))},actions:{submitClicked:function(){Mist.machineShellController.submit()},backClicked:function(){Mist.machineShellController.close()}}})}),define("app/views/machine_shell_list_item",["app/views/list_item"],function(e){return e.extend({command:{},tagName:"span",load:function(){var e=$("#"+this.elementId);this.get("parentView").openCommand(e)}.on("didInsertElement"),actions:{toggleCommand:function(){var e=$("#"+this.elementId),t=e.find(".shell-li-arrow"),n=e.find(".output");n.css("display")=="none"?(this.get("parentView").openCommand(e),n.slideDown(200),t.removeClass("ui-icon-carat-r").addClass("ui-icon-carat-d")):(n.slideUp(200),t.removeClass("ui-icon-carat-d").addClass("ui-icon-carat-r")),this.get("parentView").openCommand(e)}}})}),define("app/views/image_list",["app/views/mistscreen"],function(e,t){return e.extend({baseImages:[],defaultImages:[],renderedImages:[],renderingMoreImages:null,load:function(){Mist.imageSearchController.on("onSearchEnd",this,"updateBaseImages"),Mist.backendsController.on("onImageListChange",this,"updateDefaultImages");var e=this;Ember.run.later(function(){$(window).on("scroll",function(t){e.set("pageYOffset",window.pageYOffset)})},500),this.updateDefaultImages()}.on("didInsertElement"),unload:function(){var e=this;Mist.backendsController.content.forEach(function(t){t.off("onImageListChange",e,"updateBaseImages")}),Mist.imageSearchController.off("onSearchEnd",this,"updateBaseImages"),$(window).off("scroll")}.on("willDestroyElement"),updateRenderedImages:function(){this.set("renderedImages",this.baseImages.slice(0,25))},updateBaseImages:function(){Mist.imageSearchController.searchTerm?this.set("baseImages",Mist.imageSearchController.searchResults):this.set("baseImages",this.defaultImages),this.updateRenderedImages()},updateDefaultImages:function(){var e=[];Mist.backendsController.content.forEach(function(t){t.images.content.forEach(function(t){t.star?e.unshift(t):e.push(t)})}),Mist.imageSearchController.set("images",e),this.set("defaultImages",e),this.updateBaseImages()},renderMoreImages:function(){if(this.renderedImages.length==this.baseImages.length)return;this.set("renderingMoreImages",!0),this.renderedImages.addObjects(this.baseImages.slice(this.renderedImages.length,this.renderedImages.length+25)),Ember.run.next(this,function(){this.set("renderingMoreImages",!1)})},windowScrolled:function(){Mist.isScrolledToBottom()&&this.renderMoreImages()},actions:{searchClicked:function(){Mist.imageSearchController.search(!0)}},scrollObserver:function(){Ember.run.once(this,"windowScrolled")}.observes("pageYOffset")})}),define("app/views/machine_power",["app/views/templated","ember"],function(e){return e.extend({load:function(){Mist.machinePowerController.on("onActionsChange",this,"renderActions")}.on("didInsertElement"),unload:function(){Mist.machinePowerController.off("onActionsChange",this,"renderActions")}.on("willDestroyElement"),renderActions:function(){Ember.run.next(function(){$("#machine-power-popup").trigger("create")})},actions:{actionClicked:function(e){Mist.machinePowerController.act(e)},backClicked:function(){Mist.machinePowerController.close()}}})}),define("app/views/machine_tags",["app/views/templated","ember"],function(e){return e.extend({actions:{addClicked:function(){Mist.machineTagsController.add()},backClicked:function(){Mist.machineTagsController.close()}}})}),define("app/views/machine_keys",["app/views/templated","ember"],function(e){return e.extend({selectedKey:null,load:function(){var e=$("#machine-keys-panel").parent().attr("id");Mist.machineKeysController.set("view",Ember.View.views[e])}.on("didInsertElement"),unload:function(){Mist.machineKeysController.set("view",null)}.on("willDestroyElement"),renderNonAssocatedKeys:function(){Ember.run.next(function(){$("#non-associated-keys-popup .ui-listview").listview("refresh")})},actions:{associateClicked:function(){$("#non-associated-keys-popup").popup("open")},customAssociateClicked:function(){var e=Mist.machineKeysController;$("#machine-userPort-popup").popup("close"),e.associate(e.lastAssocKey,null,e.user,e.port)},nonAssociatedKeyClicked:function(e){$("#non-associated-keys-popup").popup("close"),Mist.machineKeysController.associate(e),$("#machine-keys-panel").panel("open")},newKeyClicked:function(){$("#non-associated-keys-popup").popup("close"),Ember.run.later(function(){Mist.keyAddController.open(function(e,t){e&&(Mist.machineKeysController.associate(Mist.keysController.getKey(t.id)),$("#machine-keys-panel").panel("open"))})},300)},removeClicked:function(){Mist.machineKeysController.disassociate(this.selectedKey),$("#key-actions-popup").popup("close")},probeClicked:function(){Mist.machineKeysController.probe(this.selectedKey),$("#key-actions-popup").popup("close")},cancelClicked:function(){this.set("selectedKey",null),$("#key-actions-popup").popup("close")},backClicked:function(){Mist.machineKeysController.close()}},nonAssociatedKeysObserver:function(){Ember.run.once(this,"renderNonAssocatedKeys")}.observes("Mist.machineKeysController.nonAssociatedKeys")})}),define("app/views/machine_keys_list_item",["app/views/list_item"],function(e){return e.extend({tagName:"span",keyIcon:null,load:function(){this.keyObserver()}.on("didInsertElement"),keyObserver:function(){var e=this.key.probing?this.key.probing:Mist.machineKeysController.get("machine");if(!e)return;var t=this;this.key.machines.some(function(n){if(n[1]==e.id&&n[0]==e.backend.id)return t.key.probing?t.set("keyIcon","probing"):n[2]>0?t.set("keyIcon","probed"):t.set("keyIcon","unprobed"),!0})}.observes("this.key.probing","this.key.machines"),actions:{associatedKeyClicked:function(e){this.get("parentView").set("selectedKey",e),$("#key-actions-popup").popup("open")}}})}),define("app/views/machine_tags_list_item",["app/views/list_item"],function(e){return e.extend({tag:null,tagName:"span",actions:{deleteClicked:function(){Mist.machineTagsController.deleteTag(this.tag)}}})}),define("app/views/machine_manual_monitoring",["app/views/templated","ember"],function(e){return e.extend({actions:{selectCommandText:function(){Mist.selectElementContents("manual-monitoring-command")},cancelClicked:function(){Mist.machineManualMonitoringController.close()},doneClicked:function(){Mist.monitoringController.enableMonitoring(Mist.machineManualMonitoringController.machine,null,!0),Mist.machineManualMonitoringController.close()}}})}),define("app/views/key_list_item",["app/views/list_item"],function(e){return e.extend({key:null,updateCheckbox:function(){var e=$("#"+this.elementId+" input.ember-checkbox");Ember.run.next(this,function(){e.checkboxradio&&e.checkboxradio().checkboxradio("refresh")})},keySelectedObserver:function(){Ember.run.once(this,"updateCheckbox")}.observes("key.selected")})}),define("app/views/key_list",["app/views/mistscreen"],function(e){return e.extend({load:function(){Mist.keysController.on("onSelectedKeysChange",this,"updateFooter"),this.updateFooter()}.on("didInsertElement"),unload:function(){Mist.keysController.off("onSelectedKeysChange",this,"updateFooter")}.on("willDestroyElement"),updateFooter:function(){switch(Mist.keysController.selectedKeys.length){case 0:$("#key-list-page .ui-footer").slideUp();break;case 1:$("#key-list-page .ui-footer").slideDown().find("a").removeClass("ui-state-disabled");break;default:$("#key-list-page .ui-footer").slideDown().find("a").addClass("ui-state-disabled")}},actions:{addClicked:function(){$("#create-key-popup").popup("option","positionTo","#add-key-btn"),Mist.keyAddController.open()},renameClicked:function(){Mist.keyEditController.open(Mist.keysController.selectedKeys[0].id)},setDefaultClicked:function(){Mist.keysController.setDefaultKey(Mist.keysController.selectedKeys[0].id)},selectClicked:function(){$("#select-keys-popup").popup("open")},selectionModeClicked:function(e){$("#select-keys-popup").popup("close"),Ember.run(function(){Mist.keysController.content.forEach(function(t){t.set("selected",e)})})},deleteClicked:function(){var e=Mist.keysController.selectedKeys[0].id;Mist.confirmationController.set("title","Delete key"),Mist.confirmationController.set("text",'Are you sure you want to delete "'+e+'" ?'),Mist.confirmationController.set("callback",function(){Mist.keysController.deleteKey(e)}),Mist.confirmationController.show()}}})}),define("app/views/key",["app/views/mistscreen","app/models/machine"],function(e,t){return e.extend({key:null,machines:[],load:function(){Mist.keysController.on("onKeyListChange",this,"updateView"),Mist.keysController.on("onKeyDisassociate",this,"updateMachines"),Mist.backendsController.on("onMachineListChange",this,"updateMachines"),this.updateView()}.on("didInsertElement"),unload:function(){Mist.keysController.off("onKeyListChange",this,"updateView"),Mist.keysController.off("onKeyDisassociate",this,"updateMachines"),Mist.backendsController.off("onMachineListChange",this,"updateMachines")}.on("willDestroyElement"),updateView:function(){this.updateModel(),this.key.id&&(this.updateMachines(),Ember.run.next(this,"showPublicKey"))},updateModel:function(){var e=Mist.keysController.getRequestedKey();e&&this.get("controller").set("model",e),this.set("key",this.get("controller").get("model"))},updateMachines:function(){var e=[];this.key.machines.forEach(function(n){var r=Mist.backendsController.getMachine(n[1],n[0]);if(!r){var i=Mist.backendsController.getBackend(n[0]);r=t.create({id:n[1],name:n[1],state:i?"terminated":"unknown",backend:i?i:n[0],isGhost:!0})}e.push(r)}),this.set("machines",e)},renderMachines:function(){Ember.run.next(function(){$("#single-key-machines").collapsible&&$("#single-key-machines").collapsible().trigger("create")})},showPublicKey:function(){Mist.keysController.getPublicKey(this.key.id,function(e,t){e&&$("#public-key").val(t)})},actions:{displayClicked:function(){Mist.keysController.getPrivateKey(this.key.id,function(e,t){e&&($("#private-key-popup").popup("open"),$("#private-key").val(t))})},backClicked:function(){$("#private-key-popup").popup("close"),$("#private-key").val("")},renameClicked:function(){var e=this.key;Mist.keyEditController.open(e.id,function(t){t&&Mist.Router.router.transitionTo("key",e)})},deleteClicked:function(){var e=this.key.id;Mist.confirmationController.set("title","Delete key"),Mist.confirmationController.set("text",'Are you sure you want to delete "'+e+'" ?'),Mist.confirmationController.set("callback",function(){Mist.keysController.deleteKey(e,function(e){Ember.run.later(function(){e&&Mist.Router.router.transitionTo("keys")},300)})}),Mist.confirmationController.show()}},modelObserver:function(){Ember.run.once(this,"updateView")}.observes("controller.model"),modelMachinesObserver:function(){Ember.run.once(this,"updateMachines")}.observes("key.machines"),viewMachinesObserver:function(){Ember.run.once(this,"renderMachines")}.observes("machines")})}),define("app/views/key_add",["app/views/templated","ember"],function(e){return e.extend({updateAddButton:function(){Mist.keysController.addingKey||!Mist.keyAddController.formReady?$("#add-key-ok").addClass("ui-state-disabled"):$("#add-key-ok").removeClass("ui-state-disabled")},actions:{generateClicked:function(){Mist.keysController.generateKey(function(e,t){e&&Mist.keyAddController.set("newKeyPrivate",t)})},uploadClicked:function(){window.File&&window.FileReader&&window.FileList?$("#add-key-upload").click():Mist.notificationController.notify("Your browser does not support the HTML5 file API")},uploadInputChanged:function(){Mist.keyAddController.uploadKey($("#add-key-upload")[0].files[0])},backClicked:function(){Mist.keyAddController.close()},addClicked:function(){Mist.keyAddController.add()}},updateDoneButtonObserver:function(){Ember.run.once(this,"updateAddButton")}.observes("Mist.keysController.addingKey","Mist.keyAddController.formReady")})}),define("app/views/key_edit",["app/views/templated","ember"],function(e){return e.extend({updateSaveButton:function(){Mist.keysController.renamingKey||!Mist.keyEditController.formReady?$("#rename-key-ok").addClass("ui-state-disabled"):$("#rename-key-ok").removeClass("ui-state-disabled")},actions:{backClicked:function(){Mist.keyEditController.close()},saveClicked:function(){Mist.keyEditController.save()}},updateSaveButtonObserver:function(){Ember.run.once(this,"updateSaveButton")}.observes("Mist.keyEditController.formReady","Mist.keysController.renamingKey")})}),define("app/views/rule",["app/views/templated","ember"],function(e){return e.extend({didInsertElement:function(){Ember.run.next(this,function(){this.metricObserver(),$("#"+this.elementId).find(".ui-slider-track").hide()})},valueObserver:function(){$("#"+this.rule.id+" .rule-value").val(this.rule.value),$("#"+this.rule.id+" .rule-value").slider("refresh")}.observes("this.rule.value"),metricObserver:function(){var e=this.rule.metric;e=="network-tx"||e=="disk-write"?this.rule.set("unit","KB/s"):e=="cpu"||e=="ram"?this.rule.set("unit","%"):this.rule.set("unit","")}.observes("this.rule.metric"),pendingActionObserver:function(){Ember.run.next(function(){$(".delete-rule-container").trigger("create")})}.observes("this.rule.pendingAction"),selectMetric:function(e){return $(".rule-metric-popup").popup("close"),$(".rule-metric-popup li a").off("click"),info(e.data.id),info(this.title),Mist.rulesController.updateRule(e.data.id,this.title),!1},selectOperator:function(e){$(".rule-operator-popup").popup("close"),$(".rule-operator-popup li a").off("click");var t={title:this.title,symbol:this.text};return Mist.rulesController.updateRule(e.data.id,null,t),!1},actions:{openMetricPopup:function(){$(".rule-metric-popup").popup("option","positionTo","#"+this.rule.id+" .rule-button.metric").popup("open"),$(".rule-metric-popup li a").on("click",this.rule,this.selectMetric)},openOperatorPopup:function(){$(".rule-operator-popup").popup("option","positionTo","#"+this.rule.id+" .rule-button.operator").popup("open"),$(".rule-operator-popup li a").on("click",this.rule,this.selectOperator)},openActionPopup:function(){$(".rule-action-popup").popup("option","positionTo","#"+this.rule.id+" .rule-button.action").popup("open"),$(".rule-action-popup li a").on("click",this.rule,this.selectAction)},deleteRuleClicked:function(){this.rule.set("pendingAction",!0);var e=this;Mist.ajax.DELETE("/rules/"+e.rule.id,{}).success(function(){info("Successfully deleted rule ",e.rule.id),Mist.rulesController.removeObject(e.rule),Mist.rulesController.redrawRules(),e.rule.set("pendingAction",!1)}).error(function(t){Mist.notificationController.notify("Error while deleting rule: "+t),e.rule.set("pendingAction",!1)})}},selectAction:function(e){$(".rule-action-popup").popup("close"),$(".rule-action-popup li a").off("click");var t=e.data,n=this.title;return n=="command"?(Mist.rulesController.set("commandRule",t),Mist.rulesController.set("command",t.command),$(".rule-command-popup textarea").val(t.command),$(".rule-command-popup").css("width",.7*$(window).width()),$(".rule-command-popup").popup("open"),!1):(Mist.rulesController.updateRule(t.id,null,null,null,n),!1)}})}),define("app/views/user_menu",["app/views/templated","ember"],function(e){return e.extend({isNotCore:!IS_CORE,accountUrl:URL_PREFIX+"/account",gravatarURL:EMAIL&&"https://www.gravatar.com/avatar/"+md5(EMAIL)+"?d="+encodeURIComponent("https://mist.io/resources/images/user.png")+"&s=36",actions:{meClicked:function(){$("#user-menu-popup").popup("open")},loginClicked:function(){$("#user-menu-popup").popup("close"),Ember.run.later(function(){Mist.loginController.open()},300)},logoutClicked:function(){Mist.loginController.logout()}}})}),define("app/views/file_upload",["app/views/templated","ember"],function(e){return e.extend({actions:{uploadClicked:function(){window.File&&window.FileReader&&window.FileList?$("#file-upload-input").click():Mist.notificationController.notify("Your browser does not support the HTML5 file API")},uploadInputChanged:function(){Mist.fileUploadController.uploadFile($("#file-upload-input")[0].files[0])},backClicked:function(){Mist.fileUploadController.close()},doneClicked:function(){Mist.fileUploadController.confirmUpload()}},fileObserver:function(){Mist.fileUploadController.file?$("#file-upload-ok").removeClass("ui-state-disabled"):$("#file-upload-ok").addClass("ui-state-disabled")}.observes("Mist.fileUploadController.file")})}),require.config({baseUrl:"resources/js/",waitSeconds:200,paths:{text:"lib/require/text",ember:"lib/ember-1.4.1.min",jquery:"lib/jquery-2.1.0.min",mobile:"lib/jquery.mobile-1.4.1.min",handlebars:"lib/handlebars-1.3.0.min",md5:"lib/md5",d3:"lib/d3.min",sha256:"lib/sha256"},shim:{ember:{deps:["handlebars","text","jquery","md5","sha256"]},d3:{deps:["jquery"]}}}),define("app",["jquery","d3","app/templates/templates","app/controllers/login","app/controllers/backends","app/controllers/confirmation","app/controllers/notification","app/controllers/backend_add","app/controllers/backend_edit","app/controllers/machine_add","app/controllers/machine_keys","app/controllers/machine_power","app/controllers/monitoring","app/controllers/key_add","app/controllers/key_edit","app/controllers/keys","app/controllers/machine_tags","app/controllers/machine_shell","app/controllers/machine_manual_monitoring","app/controllers/image_search","app/controllers/rules","app/controllers/file_upload","app/views/templated","app/views/home","app/views/login","app/views/backend_button","app/views/backend_add","app/views/backend_edit","app/views/monitoring","app/views/machine_list_item","app/views/image_list_item","app/views/machine_add","app/views/machine","app/views/messagebox","app/views/machine_list","app/views/confirmation_dialog","app/views/machine_shell","app/views/machine_shell_list_item","app/views/image_list","app/views/machine_power","app/views/machine_tags","app/views/machine_keys","app/views/machine_keys_list_item","app/views/machine_tags_list_item","app/views/machine_manual_monitoring","app/views/key_list_item","app/views/key_list","app/views/key","app/views/key_add","app/views/key_edit","app/views/rule","app/views/user_menu","app/views/list_item","app/views/file_upload","ember"],function(e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X,V,$,J,K,Q,G,Y,Z){function et(){return e(document).bind("mobileinit",function(){e("#splash").fadeOut(650),e.mobile.ajaxEnabled=!1,e.mobile.pushStateEnabled=!1,e.mobile.linkBindingEnabled=!1,e.mobile.hashListeningEnabled=!1,e.mobile.panel.prototype._bindUpdateLayout=function(){},e("body").css("overflow","auto"),App.set("isJQMInitialized",!0)}),window.onbeforeunload=function(){e(".ui-loader").hide()},App=Ember.Application.create({ready:function(){require(["mobile"])}}),App.set("isCore",!!IS_CORE),App.set("authenticated",AUTH||IS_CORE),App.set("ajax",new tt(CSRF_TOKEN)),App.set("email",EMAIL),App.set("password",""),App.set("isClientMobile",/iPhone|iPod|iPad|Android|BlackBerry|Windows Phone/.test(navigator.userAgent)),App.set("isJQMInitialized",!1),window.Mist=App,CSRF_TOKEN=null,App.Router.map(function(){this.route("machines"),this.route("images"),this.route("machine",{path:"/machines/:machine_id"}),this.route("keys"),this.route("key",{path:"/keys/:key_id"})}),App.ImagesRoute=Ember.Route.extend({activate:function(){Ember.run.next(function(){document.title="mist.io - images"})}}),App.MachinesRoute=Ember.Route.extend({activate:function(){Ember.run.next(function(){document.title="mist.io - machines"})},exit:function(){Mist.backendsController.forEach(function(e){e.machines.forEach(function(e){e.set("selected",!1)})})}}),App.MachineRoute=Ember.Route.extend({activate:function(){Ember.run.next(function(){var e=Mist.getMachineIdByUrl(),t=Mist.backendsController.getMachine(e);document.title="mist.io - "+(t?t.name:e)})},redirect:function(){Mist.backendsController.set("machineRequest",Mist.getMachineIdByUrl())},model:function(){return Mist.backendsController.loading||Mist.backendsController.loadingMachines?{id:""}:Mist.backendsController.getMachine(Mist.getMachineIdByUrl())}}),App.KeysRoute=Ember.Route.extend({activate:function(){Ember.run.next(function(){document.title="mist.io - keys"})},exit:function(){Mist.keysController.content.forEach(function(e){e.set("selected",!1)})}}),App.KeyRoute=Ember.Route.extend({activate:function(){Ember.run.next(function(){document.title="mist.io - "+Mist.getKeyIdByUrl()})},redirect:function(){Mist.keysController.set("keyRequest",Mist.getKeyIdByUrl())},model:function(){return Mist.keysController.loading?{machines:[]}:Mist.keysController.getKey(Mist.getKeyIdByUrl())}}),App.set("homeView",x),App.set("ruleView",Q),App.set("loginView",T),App.set("keyAddView",J),App.set("keyView",$),App.set("keyListView",V),App.set("listItemView",Y),App.set("userMenuView",G),App.set("keyEditView",K),App.set("backendAddView",C),App.set("backendEditView",k),App.set("imageListView",F),App.set("fileUploadView",Z),App.set("messageboxView",D),App.set("monitoringView",L),App.set("machineView",_),App.set("machineKeysView",R),App.set("machineTagsView",q),App.set("keyListItemView",X),App.set("machineListView",P),App.set("imageListItemView",O),App.set("machineAddView",M),App.set("backendButtonView",N),App.set("machinePowerView",I),App.set("machineShellView",B),App.set("machineListItemView",A),App.set("confirmationDialog",H),App.set("machineKeysListItemView",U),App.set("machineTagsListItemView",z),App.set("machineShellListItemView",j),App.set("machineManualMonitoringView",W),App.set("keysController",v.create()),App.set("loginController",r.create()),App.set("rulesController",w.create()),App.set("keyAddController",p.create()),App.set("keyEditController",d.create()),App.set("backendsController",i.create()),App.set("fileUploadController",E.create()),App.set("machineAddController",f.create()),App.set("backendAddController",u.create()),App.set("monitoringController",h.create()),App.set("backendEditController",a.create()),App.set("machineTagsController",m.create()),App.set("machineKeysController",l.create()),App.set("imageSearchController",b.create()),App.set("machineShellController",g.create()),App.set("confirmationController",s.create()),App.set("notificationController",o.create()),App.set("machinePowerController",c.create()),App.set("machineManualMonitoringController",y.create()),App.Select=Ember.Select.extend({attributeBindings:["name","data-theme","data-icon","data-native-menu","disabled"]}),App.Checkbox=Ember.Checkbox,App.TextField=Ember.TextField.extend({autocapitalize:"off",attributeBindings:["data-theme","autocapitalize"],keyUp:function(e){this.get("parentView").keyUp&&this.get("parentView").keyUp(e)},click:function(e){this.get("parentView").inputClicked&&this.get("parentView").inputClicked(e)},focusIn:function(e){this.get("parentView").inputClicked&&this.get("parentView").inputClicked(e)}}),App.ShellTextField=App.TextField.extend({keyDown:function(e,t){var n=e.keyCode,r=Mist.machineShellController.commandHistoryIndex,i=Mist.machineShellController.machine.commandHistory;switch(n){case 38:r<i.length-1&&r++,Mist.machineShellController.set("command",i[r].command),Mist.machineShellController.set("commandHistoryIndex",r);break;case 40:r>=0&&r--,r>=0?Mist.machineShellController.set("command",i[r].command):r==-1&&Mist.machineShellController.set("command",""),Mist.machineShellController.set("commandHistoryIndex",r);break;case 13:Mist.machineShellController.submit()}(n==38||n==40&&e.preventDefault)&&e.preventDefault()}}),App.isScrolledToBottom=function(){var t=e(document).height()-e(window).height(),n=e(document).scrollTop();return t-n<20},App.selectElementContents=function(e){var t=document.getElementById(e),n=document.createRange();n.selectNodeContents(t);var r=window.getSelection();r.removeAllRanges(),r.addRange(n)},App.getKeyIdByUrl=function(){return window.location.href.split("/")[5]},App.getMachineIdByUrl=function(){return window.location.href.split("/")[5]},App.arrayToListString=function(e,t){if(!e instanceof Array)return"";var n="";return e.forEach(function(r,i){n+=r[t],i<e.length-1&&(n+=", ")}),n},App}function tt(t){this.GET=function(e,t){return this.ajax("GET",e,t)},this.PUT=function(e,t){return this.ajax("PUT",e,t)},this.POST=function(e,t){return this.ajax("POST",e,t)},this.DELETE=function(e,t){return this.ajax("DELETE",e,t)},this.ajax=function(n,r,i){var s={},o={};return o.success=function(e){return s.success=e,o},o.error=function(e){return s.error=e,o},o.complete=function(e){return s.complete=e,o},o.ajax=function(){var u={url:r,type:n,headers:{"Csrf-Token":t},data:JSON.stringify(i),complete:function(e){e.status==200?s.success&&s.success(e.responseJSON):s.error&&s.error(e.responseText,e.status),s.complete&&s.complete(e.status==200,e.responseJSON)}};return Object.keys(i).length===0&&delete u.data,e.ajax(u),o},o.ajax()}}function st(e,t){var n=!1,r=[],i=[],s,o=e.length;while(o--){var u="";if(t&&t[o])s=t[o];else{var a=e[o].href?e[o].href:"window.location.href",f=a.split("/");f.pop(),s=f.join("/"),s&&(s+="/")}if(e[o].cssRules||e[o].rules){it=e[o].cssRules?e[o].cssRules:e[o].rules;var l=it.length;while(l--)if(it[l].style&&it[l].style.cssText){var c=it[l].style.cssText;c.toLowerCase().indexOf("url")!=-1&&(u+=c)}else it[l].styleSheet&&(r.push(it[l].styleSheet),n=!0)}var h=u.match(/[^\("]+\.(gif|jpg|jpeg|png)/g);if(h){var p=h.length;while(p--){var d=h[p].charAt(0)=="/"||h[p].match("://")?h[p]:s+h[p];jQuery.inArray(d,rt)==-1&&rt.push(d)}}if(!n&&e[o].imports&&e[o].imports.length)for(var v=0,m=e[o].imports.length;v<m;v++){var g=e[o].imports[v].href;g=g.split("/"),g.pop(),g=g.join("/"),g&&(g+="/");var y=g.charAt(0)=="/"||g.match("://")?g:s+g;i.push(y),r.push(e[o].imports[v])}}if(r.length)return st(r,i),!1}function ot(e){var t=[];st([document.styleSheets[0]]);var n,r=rt.length;for(var i=0;i<rt.length;i++)n=new Image,n.onload=function(){--r,r<=0&&e()},n.src=rt[i],t.push(n)}var nt=[],rt=[],it;ot(et)});var collectd_install_target=!1,collectd_uninstall_target=!1,collectd_lastlog="";