lib/steering/handlebars.runtime.js in steering-source-1.0.beta.6 vs lib/steering/handlebars.runtime.js in steering-source-1.0.rc.1

- old
+ new

@@ -1 +1 @@ -var Handlebars={};Handlebars.VERSION="1.0.beta.6";Handlebars.helpers={};Handlebars.partials={};Handlebars.registerHelper=function(a,b,c){if(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}else{throw new Error("Could not find property '"+a+"'")}});var toString=Object.prototype.toString,functionType="[object Function]";Handlebars.registerHelper("blockHelperMissing",function(a,b){var c=b.inverse||function(){},d=b.fn;var e="";var f=toString.call(a);if(f===functionType){a=a.call(this)}if(a===true){return d(this)}else if(a===false||a==null){return c(this)}else if(f==="[object Array]"){if(a.length>0){for(var g=0,h=a.length;g<h;g++){e=e+d(a[g])}}else{e=c(this)}return e}else{return d(a)}});Handlebars.registerHelper("each",function(a,b){var c=b.fn,d=b.inverse;var e="";if(a&&a.length>0){for(var f=0,g=a.length;f<g;f++){e=e+c(a[f])}}else{e=d(this)}return e});Handlebars.registerHelper("if",function(a,b){var c=toString.call(a);if(c===functionType){a=a.call(this)}if(!a||Handlebars.Utils.isEmpty(a)){return b.inverse(this)}else{return b.fn(this)}});Handlebars.registerHelper("unless",function(a,b){var c=b.fn,d=b.inverse;b.fn=d;b.inverse=c;return Handlebars.helpers["if"].call(this,a,b)});Handlebars.registerHelper("with",function(a,b){return b.fn(a)});Handlebars.registerHelper("log",function(a){Handlebars.log(a)});Handlebars.Exception=function(a){var b=Error.prototype.constructor.apply(this,arguments);for(var c in b){if(b.hasOwnProperty(c)){this[c]=b[c]}}this.message=b.message};Handlebars.Exception.prototype=new Error;Handlebars.SafeString=function(a){this.string=a};Handlebars.SafeString.prototype.toString=function(){return this.string.toString()};(function(){var a={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};var b=/&(?!\w+;)|[<>"'`]/g;var c=/[&<>"'`]/;var d=function(b){return a[b]||"&amp;"};Handlebars.Utils={escapeExpression:function(a){if(a instanceof Handlebars.SafeString){return a.toString()}else if(a==null||a===false){return""}if(!c.test(a)){return a}return a.replace(b,d)},isEmpty:function(a){if(typeof a==="undefined"){return true}else if(a===null){return true}else if(a===false){return true}else if(Object.prototype.toString.call(a)==="[object Array]"&&a.length===0){return true}else{return false}}}})();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];if(c){return Handlebars.VM.program(b,c)}else if(d){return d}else{d=this.programs[a]=Handlebars.VM.program(b);return d}},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(c,d){d=d||{};return 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){e=e||{};return a.apply(this,[c,e.data||b].concat(d))}},program:function(a,b){return function(c,d){d=d||{};return a(c,d.data||b)}},noop:function(){return""},invokePartial:function(a,b,c,d,e,f){options={helpers:d,partials:e,data:f};if(a===undefined){throw new Handlebars.Exception("The partial "+b+" could not be found")}else if(a instanceof Function){return a(c,options)}else if(!Handlebars.compile){throw new Handlebars.Exception("The partial "+b+" could not be compiled when running in runtime-only mode")}else{e[b]=Handlebars.compile(a);return e[b](c,options)}}};Handlebars.template=Handlebars.VM.template; +this.Handlebars={},function(e){e.VERSION="1.0.rc.1",e.helpers={},e.partials={},e.registerHelper=function(e,t,n){n&&(t.not=n),this.helpers[e]=t},e.registerPartial=function(e,t){this.partials[e]=t},e.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+e+"'")});var t=Object.prototype.toString,n="[object Function]";e.registerHelper("blockHelperMissing",function(r,i){var s=i.inverse||function(){},o=i.fn,u="",a=t.call(r);return a===n&&(r=r.call(this)),r===!0?o(this):r===!1||r==null?s(this):a==="[object Array]"?r.length>0?e.helpers.each(r,i):s(this):o(r)}),e.K=function(){},e.createFrame=Object.create||function(t){e.K.prototype=t;var n=new e.K;return e.K.prototype=null,n},e.registerHelper("each",function(t,n){var r=n.fn,i=n.inverse,s="",o;n.data&&(o=e.createFrame(n.data));if(t&&t.length>0)for(var u=0,a=t.length;u<a;u++)o&&(o.index=u),s+=r(t[u],{data:o});else s=i(this);return s}),e.registerHelper("if",function(r,i){var s=t.call(r);return s===n&&(r=r.call(this)),!r||e.Utils.isEmpty(r)?i.inverse(this):i.fn(this)}),e.registerHelper("unless",function(t,n){var r=n.fn,i=n.inverse;return n.fn=i,n.inverse=r,e.helpers["if"].call(this,t,n)}),e.registerHelper("with",function(e,t){return t.fn(e)}),e.registerHelper("log",function(t){e.log(t)})}(this.Handlebars),Handlebars.Exception=function(e){var t=Error.prototype.constructor.apply(this,arguments);for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);this.message=t.message},Handlebars.Exception.prototype=new Error,Handlebars.SafeString=function(e){this.string=e},Handlebars.SafeString.prototype.toString=function(){return this.string.toString()},function(){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},t=/[&<>"'`]/g,n=/[&<>"'`]/,r=function(t){return e[t]||"&amp;"};Handlebars.Utils={escapeExpression:function(e){return e instanceof Handlebars.SafeString?e.toString():e==null||e===!1?"":n.test(e)?e.replace(t,r):e},isEmpty:function(e){return typeof e=="undefined"?!0:e===null?!0:e===!1?!0:Object.prototype.toString.call(e)==="[object Array]"&&e.length===0?!0:!1}}}(),Handlebars.VM={template:function(e){var t={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(e,t,n){var r=this.programs[e];return n?Handlebars.VM.program(t,n):r?r:(r=this.programs[e]=Handlebars.VM.program(t),r)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(n,r){return r=r||{},e.call(t,Handlebars,n,r.helpers,r.partials,r.data)}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,2);return function(n,i){return i=i||{},e.apply(this,[n,i.data||t].concat(r))}},program:function(e,t){return function(n,r){return r=r||{},e(n,r.data||t)}},noop:function(){return""},invokePartial:function(e,t,n,r,i,s){var o={helpers:r,partials:i,data:s};if(e===undefined)throw new Handlebars.Exception("The partial "+t+" could not be found");if(e instanceof Function)return e(n,o);if(!Handlebars.compile)throw new Handlebars.Exception("The partial "+t+" could not be compiled when running in runtime-only mode");return i[t]=Handlebars.compile(e,{data:s!==undefined}),i[t](n,o)}},Handlebars.template=Handlebars.VM.template \ No newline at end of file