// lib/handlebars/base.js /*jshint eqnull:true*/this.Handlebars={},function(){Handlebars.VERSION="1.0.rc.1",Handlebars.helpers={},Handlebars.partials={},Handlebars.registerHelper=function(a,b,c){c&&(b.not=c),this.helpers[a]=b},Handlebars.registerPartial=function(a,b){this.partials[a]=b},Handlebars.registerHelper("helperMissing",function(a){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+a+"'")});var a=Object.prototype.toString,b="[object Function]";Handlebars.registerHelper("blockHelperMissing",function(c,d){var e=d.inverse||function(){},f=d.fn,g="",h=a.call(c);h===b&&(c=c.call(this));if(c===!0)return f(this);if(c===!1||c==null)return e(this);if(h==="[object Array]"){if(c.length>0)for(var i=0,j=c.length;i0)for(var f=0,g=a.length;f":">",'"':""","'":"'","`":"`"},b=/&(?!\w+;)|[<>"'`]/g,c=/[&<>"'`]/,d=function(b){return a[b]||"&"};Handlebars.Utils={escapeExpression:function(a){return a instanceof Handlebars.SafeString?a.toString():a==null||a===!1?"":c.test(a)?a.replace(b,d):a},isEmpty:function(a){return typeof a=="undefined"?!0:a===null?!0:a===!1?!0:Object.prototype.toString.call(a)==="[object Array]"&&a.length===0?!0:!1}}}(),Handlebars.VM={template:function(a){var b={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(a,b,c){var d=this.programs[a];return c?Handlebars.VM.program(b,c):d?d:(d=this.programs[a]=Handlebars.VM.program(b),d)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(c,d){return d=d||{},a.call(b,Handlebars,c,d.helpers,d.partials,d.data)}},programWithDepth:function(a,b,c){var d=Array.prototype.slice.call(arguments,2);return function(c,e){return e=e||{},a.apply(this,[c,e.data||b].concat(d))}},program:function(a,b){return function(c,d){return d=d||{},a(c,d.data||b)}},noop:function(){return""},invokePartial:function(a,b,c,d,e,f){var g={helpers:d,partials:e,data:f};if(a===undefined)throw new Handlebars.Exception("The partial "+b+" could not be found");if(a instanceof Function)return a(c,g);if(!Handlebars.compile)throw new Handlebars.Exception("The partial "+b+" could not be compiled when running in runtime-only mode");return e[b]=Handlebars.compile(a),e[b](c,g)}},Handlebars.template=Handlebars.VM.template;