You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
phantomjs/vendor/handlebars/handlebars.runtime.amd.min.js

27 lines
9.6 KiB
JavaScript

/*!
handlebars v3.0.2
Copyright (C) 2011-2014 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
*/
define("handlebars/utils",["exports"],function(a){function b(a){return i[a]}function c(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function d(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}function e(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return k.test(a)?a.replace(j,b):a}function f(a){return a||0===a?n(a)&&0===a.length?!0:!1:!0}function g(a,b){return a.path=b,a}function h(a,b){return(a?a+".":"")+b}a.__esModule=!0,a.extend=c,a.indexOf=d,a.escapeExpression=e,a.isEmpty=f,a.blockParams=g,a.appendContextPath=h;var i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},j=/[&<>"'`]/g,k=/[&<>"'`]/,l=Object.prototype.toString;a.toString=l;var m=function(a){return"function"==typeof a};m(/x/)&&(a.isFunction=m=function(a){return"function"==typeof a&&"[object Function]"===l.call(a)});var m;a.isFunction=m;var n=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===l.call(a):!1};a.isArray=n}),define("handlebars/exception",["exports","module"],function(a,b){function c(a,b){var e=b&&b.loc,f=void 0,g=void 0;e&&(f=e.start.line,g=e.start.column,a+=" - "+f+":"+g);for(var h=Error.prototype.constructor.call(this,a),i=0;i<d.length;i++)this[d[i]]=h[d[i]];Error.captureStackTrace&&Error.captureStackTrace(this,c),e&&(this.lineNumber=f,this.column=g)}var d=["description","fileName","lineNumber","message","name","number","stack"];c.prototype=new Error,b.exports=c}),define("handlebars/base",["exports","./utils","./exception"],function(a,b,c){function d(a,b){this.helpers=a||{},this.partials=b||{},e(this)}function e(a){a.registerHelper("helperMissing",function(){if(1===arguments.length)return void 0;throw new h('Missing helper: "'+arguments[arguments.length-1].name+'"')}),a.registerHelper("blockHelperMissing",function(c,d){var e=d.inverse,g=d.fn;if(c===!0)return g(this);if(c===!1||null==c)return e(this);if(l(c))return c.length>0?(d.ids&&(d.ids=[d.name]),a.helpers.each(c,d)):e(this);if(d.data&&d.ids){var h=f(d.data);h.contextPath=b.appendContextPath(d.data.contextPath,d.name),d={data:h}}return g(c,d)}),a.registerHelper("each",function(a,c){function d(c,d,f){k&&(k.key=c,k.index=d,k.first=0===d,k.last=!!f,n&&(k.contextPath=n+c)),j+=e(a[c],{data:k,blockParams:b.blockParams([a[c],c],[n+c,null])})}if(!c)throw new h("Must pass iterator to #each");var e=c.fn,g=c.inverse,i=0,j="",k=void 0,n=void 0;if(c.data&&c.ids&&(n=b.appendContextPath(c.data.contextPath,c.ids[0])+"."),m(a)&&(a=a.call(this)),c.data&&(k=f(c.data)),a&&"object"==typeof a)if(l(a))for(var o=a.length;o>i;i++)d(i,i,i===a.length-1);else{var p=void 0;for(var q in a)a.hasOwnProperty(q)&&(p&&d(p,i-1),p=q,i++);p&&d(p,i-1,!0)}return 0===i&&(j=g(this)),j}),a.registerHelper("if",function(a,c){return m(a)&&(a=a.call(this)),!c.hash.includeZero&&!a||b.isEmpty(a)?c.inverse(this):c.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,c){m(a)&&(a=a.call(this));var d=c.fn;if(b.isEmpty(a))return c.inverse(this);if(c.data&&c.ids){var e=f(c.data);e.contextPath=b.appendContextPath(c.data.contextPath,c.ids[0]),c={data:e}}return d(a,c)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)}),a.registerHelper("lookup",function(a,b){return a&&a[b]})}function f(a){var c=b.extend({},a);return c._parent=a,c}var g=function(a){return a&&a.__esModule?a["default"]:a};a.__esModule=!0,a.HandlebarsEnvironment=d,a.createFrame=f;var h=g(c),i="3.0.1";a.VERSION=i;var j=6;a.COMPILER_REVISION=j;var k={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};a.REVISION_CHANGES=k;var l=b.isArray,m=b.isFunction,n=b.toString,o="[object Object]";d.prototype={constructor:d,logger:p,log:q,registerHelper:function(a,c){if(n.call(a)===o){if(c)throw new h("Arg not supported with multiple helpers");b.extend