vendor/assets/javascripts/handlebars.js in handlebars_assets-0.23.2 vs vendor/assets/javascripts/handlebars.js in handlebars_assets-0.23.3
- old
+ new
@@ -1,10 +1,11 @@
-/*!
+/**!
- handlebars v4.0.5
+ @license
+ handlebars v4.1.0
-Copyright (C) 2011-2015 by Yehuda Katz
+Copyright (C) 2011-2017 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
@@ -20,11 +21,10 @@
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
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
@@ -76,11 +76,11 @@
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
var _interopRequireDefault = __webpack_require__(1)['default'];
@@ -90,27 +90,27 @@
var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
// Compiler imports
- var _handlebarsCompilerAst = __webpack_require__(21);
+ var _handlebarsCompilerAst = __webpack_require__(35);
var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
- var _handlebarsCompilerBase = __webpack_require__(22);
+ var _handlebarsCompilerBase = __webpack_require__(36);
- var _handlebarsCompilerCompiler = __webpack_require__(27);
+ var _handlebarsCompilerCompiler = __webpack_require__(41);
- var _handlebarsCompilerJavascriptCompiler = __webpack_require__(28);
+ var _handlebarsCompilerJavascriptCompiler = __webpack_require__(42);
var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
- var _handlebarsCompilerVisitor = __webpack_require__(25);
+ var _handlebarsCompilerVisitor = __webpack_require__(39);
var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
- var _handlebarsNoConflict = __webpack_require__(20);
+ var _handlebarsNoConflict = __webpack_require__(34);
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
var _create = _handlebarsRuntime2['default'].create;
function create() {
@@ -142,13 +142,13 @@
inst['default'] = inst;
exports['default'] = inst;
module.exports = exports['default'];
-/***/ },
+/***/ }),
/* 1 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
"use strict";
exports["default"] = function (obj) {
return obj && obj.__esModule ? obj : {
@@ -156,13 +156,13 @@
};
};
exports.__esModule = true;
-/***/ },
+/***/ }),
/* 2 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
var _interopRequireWildcard = __webpack_require__(3)['default'];
@@ -175,11 +175,11 @@
var base = _interopRequireWildcard(_handlebarsBase);
// Each of these augment the Handlebars object. No need to setup here.
// (This is done to easily share code between commonjs and browse envs)
- var _handlebarsSafeString = __webpack_require__(18);
+ var _handlebarsSafeString = __webpack_require__(21);
var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
var _handlebarsException = __webpack_require__(6);
@@ -187,15 +187,15 @@
var _handlebarsUtils = __webpack_require__(5);
var Utils = _interopRequireWildcard(_handlebarsUtils);
- var _handlebarsRuntime = __webpack_require__(19);
+ var _handlebarsRuntime = __webpack_require__(22);
var runtime = _interopRequireWildcard(_handlebarsRuntime);
- var _handlebarsNoConflict = __webpack_require__(20);
+ var _handlebarsNoConflict = __webpack_require__(34);
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
function create() {
@@ -223,13 +223,13 @@
inst['default'] = inst;
exports['default'] = inst;
module.exports = exports['default'];
-/***/ },
+/***/ }),
/* 3 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
"use strict";
exports["default"] = function (obj) {
if (obj && obj.__esModule) {
@@ -248,13 +248,13 @@
}
};
exports.__esModule = true;
-/***/ },
+/***/ }),
/* 4 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
var _interopRequireDefault = __webpack_require__(1)['default'];
@@ -265,19 +265,19 @@
var _exception = __webpack_require__(6);
var _exception2 = _interopRequireDefault(_exception);
- var _helpers = __webpack_require__(7);
+ var _helpers = __webpack_require__(10);
- var _decorators = __webpack_require__(15);
+ var _decorators = __webpack_require__(18);
- var _logger = __webpack_require__(17);
+ var _logger = __webpack_require__(20);
var _logger2 = _interopRequireDefault(_logger);
- var VERSION = '4.0.5';
+ var VERSION = '4.1.0';
exports.VERSION = VERSION;
var COMPILER_REVISION = 7;
exports.COMPILER_REVISION = COMPILER_REVISION;
var REVISION_CHANGES = {
@@ -355,13 +355,13 @@
exports.log = log;
exports.createFrame = _utils.createFrame;
exports.logger = _logger2['default'];
-/***/ },
+/***/ }),
/* 5 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
'use strict';
exports.__esModule = true;
exports.extend = extend;
@@ -483,16 +483,18 @@
function appendContextPath(contextPath, id) {
return (contextPath ? contextPath + '.' : '') + id;
}
-/***/ },
+/***/ }),
/* 6 */
-/***/ function(module, exports) {
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
+ var _Object$defineProperty = __webpack_require__(7)['default'];
+
exports.__esModule = true;
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
function Exception(message, node) {
@@ -516,57 +518,104 @@
/* istanbul ignore else */
if (Error.captureStackTrace) {
Error.captureStackTrace(this, Exception);
}
- if (loc) {
- this.lineNumber = line;
- this.column = column;
+ try {
+ if (loc) {
+ this.lineNumber = line;
+
+ // Work around issue under safari where we can't directly set the column value
+ /* istanbul ignore next */
+ if (_Object$defineProperty) {
+ Object.defineProperty(this, 'column', {
+ value: column,
+ enumerable: true
+ });
+ } else {
+ this.column = column;
+ }
+ }
+ } catch (nop) {
+ /* Ignore if the browser is very particular */
}
}
Exception.prototype = new Error();
exports['default'] = Exception;
module.exports = exports['default'];
-/***/ },
+/***/ }),
/* 7 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
+ module.exports = { "default": __webpack_require__(8), __esModule: true };
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var $ = __webpack_require__(9);
+ module.exports = function defineProperty(it, key, desc){
+ return $.setDesc(it, key, desc);
+ };
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
+ var $Object = Object;
+ module.exports = {
+ create: $Object.create,
+ getProto: $Object.getPrototypeOf,
+ isEnum: {}.propertyIsEnumerable,
+ getDesc: $Object.getOwnPropertyDescriptor,
+ setDesc: $Object.defineProperty,
+ setDescs: $Object.defineProperties,
+ getKeys: $Object.keys,
+ getNames: $Object.getOwnPropertyNames,
+ getSymbols: $Object.getOwnPropertySymbols,
+ each: [].forEach
+ };
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
'use strict';
var _interopRequireDefault = __webpack_require__(1)['default'];
exports.__esModule = true;
exports.registerDefaultHelpers = registerDefaultHelpers;
- var _helpersBlockHelperMissing = __webpack_require__(8);
+ var _helpersBlockHelperMissing = __webpack_require__(11);
var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
- var _helpersEach = __webpack_require__(9);
+ var _helpersEach = __webpack_require__(12);
var _helpersEach2 = _interopRequireDefault(_helpersEach);
- var _helpersHelperMissing = __webpack_require__(10);
+ var _helpersHelperMissing = __webpack_require__(13);
var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
- var _helpersIf = __webpack_require__(11);
+ var _helpersIf = __webpack_require__(14);
var _helpersIf2 = _interopRequireDefault(_helpersIf);
- var _helpersLog = __webpack_require__(12);
+ var _helpersLog = __webpack_require__(15);
var _helpersLog2 = _interopRequireDefault(_helpersLog);
- var _helpersLookup = __webpack_require__(13);
+ var _helpersLookup = __webpack_require__(16);
var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
- var _helpersWith = __webpack_require__(14);
+ var _helpersWith = __webpack_require__(17);
var _helpersWith2 = _interopRequireDefault(_helpersWith);
function registerDefaultHelpers(instance) {
_helpersBlockHelperMissing2['default'](instance);
@@ -576,13 +625,13 @@
_helpersLog2['default'](instance);
_helpersLookup2['default'](instance);
_helpersWith2['default'](instance);
}
-/***/ },
-/* 8 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 11 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
@@ -619,13 +668,13 @@
});
};
module.exports = exports['default'];
-/***/ },
-/* 9 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
var _interopRequireDefault = __webpack_require__(1)['default'];
@@ -716,13 +765,13 @@
});
};
module.exports = exports['default'];
-/***/ },
-/* 10 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 13 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
var _interopRequireDefault = __webpack_require__(1)['default'];
@@ -744,13 +793,13 @@
});
};
module.exports = exports['default'];
-/***/ },
-/* 11 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 14 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
@@ -777,13 +826,13 @@
});
};
module.exports = exports['default'];
-/***/ },
-/* 12 */
-/***/ function(module, exports) {
+/***/ }),
+/* 15 */
+/***/ (function(module, exports) {
'use strict';
exports.__esModule = true;
@@ -807,13 +856,13 @@
});
};
module.exports = exports['default'];
-/***/ },
-/* 13 */
-/***/ function(module, exports) {
+/***/ }),
+/* 16 */
+/***/ (function(module, exports) {
'use strict';
exports.__esModule = true;
@@ -823,13 +872,13 @@
});
};
module.exports = exports['default'];
-/***/ },
-/* 14 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 17 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
@@ -860,32 +909,32 @@
});
};
module.exports = exports['default'];
-/***/ },
-/* 15 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 18 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
var _interopRequireDefault = __webpack_require__(1)['default'];
exports.__esModule = true;
exports.registerDefaultDecorators = registerDefaultDecorators;
- var _decoratorsInline = __webpack_require__(16);
+ var _decoratorsInline = __webpack_require__(19);
var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
function registerDefaultDecorators(instance) {
_decoratorsInline2['default'](instance);
}
-/***/ },
-/* 16 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 19 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
@@ -912,13 +961,13 @@
});
};
module.exports = exports['default'];
-/***/ },
-/* 17 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 20 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
@@ -963,13 +1012,13 @@
};
exports['default'] = logger;
module.exports = exports['default'];
-/***/ },
-/* 18 */
-/***/ function(module, exports) {
+/***/ }),
+/* 21 */
+/***/ (function(module, exports) {
// Build out our basic SafeString type
'use strict';
exports.__esModule = true;
@@ -982,16 +1031,18 @@
};
exports['default'] = SafeString;
module.exports = exports['default'];
-/***/ },
-/* 19 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 22 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
+ var _Object$seal = __webpack_require__(23)['default'];
+
var _interopRequireWildcard = __webpack_require__(3)['default'];
var _interopRequireDefault = __webpack_require__(1)['default'];
exports.__esModule = true;
@@ -1130,10 +1181,12 @@
obj = Utils.extend({}, common, param);
}
return obj;
},
+ // An empty object to use as replacement for null-contexts
+ nullContext: _Object$seal({}),
noop: env.VM.noop,
compilerInfo: templateSpec.compiler
};
@@ -1148,11 +1201,11 @@
}
var depths = undefined,
blockParams = templateSpec.useBlockParams ? [] : undefined;
if (templateSpec.useDepths) {
if (options.depths) {
- depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths;
+ depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
} else {
depths = [context];
}
}
@@ -1197,11 +1250,11 @@
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
function prog(context) {
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var currentDepths = depths;
- if (depths && context !== depths[0]) {
+ if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
currentDepths = [context].concat(depths);
}
return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
}
@@ -1228,23 +1281,36 @@
}
return partial;
}
function invokePartial(partial, context, options) {
+ // Use the current closure context to save the partial-block if this partial
+ var currentPartialBlock = options.data && options.data['partial-block'];
options.partial = true;
if (options.ids) {
options.data.contextPath = options.ids[0] || options.data.contextPath;
}
var partialBlock = undefined;
if (options.fn && options.fn !== noop) {
- options.data = _base.createFrame(options.data);
- partialBlock = options.data['partial-block'] = options.fn;
+ (function () {
+ options.data = _base.createFrame(options.data);
+ // Wrapper function to get access to currentPartialBlock from the closure
+ var fn = options.fn;
+ partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
+ var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- if (partialBlock.partials) {
- options.partials = Utils.extend({}, options.partials, partialBlock.partials);
- }
+ // Restore the partial-block from the closure for the execution of the block
+ // i.e. the part inside the block of the partial call.
+ options.data = _base.createFrame(options.data);
+ options.data['partial-block'] = currentPartialBlock;
+ return fn(context, options);
+ };
+ if (fn.partials) {
+ options.partials = Utils.extend({}, options.partials, fn.partials);
+ }
+ })();
}
if (partial === undefined && partialBlock) {
partial = partialBlock;
}
@@ -1275,14 +1341,176 @@
Utils.extend(prog, props);
}
return prog;
}
-/***/ },
-/* 20 */
-/***/ function(module, exports) {
+/***/ }),
+/* 23 */
+/***/ (function(module, exports, __webpack_require__) {
+ module.exports = { "default": __webpack_require__(24), __esModule: true };
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ __webpack_require__(25);
+ module.exports = __webpack_require__(30).Object.seal;
+
+/***/ }),
+/* 25 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // 19.1.2.17 Object.seal(O)
+ var isObject = __webpack_require__(26);
+
+ __webpack_require__(27)('seal', function($seal){
+ return function seal(it){
+ return $seal && isObject(it) ? $seal(it) : it;
+ };
+ });
+
+/***/ }),
+/* 26 */
+/***/ (function(module, exports) {
+
+ module.exports = function(it){
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+ };
+
+/***/ }),
+/* 27 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // most Object methods by ES6 should accept primitives
+ var $export = __webpack_require__(28)
+ , core = __webpack_require__(30)
+ , fails = __webpack_require__(33);
+ module.exports = function(KEY, exec){
+ var fn = (core.Object || {})[KEY] || Object[KEY]
+ , exp = {};
+ exp[KEY] = exec(fn);
+ $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
+ };
+
+/***/ }),
+/* 28 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(29)
+ , core = __webpack_require__(30)
+ , ctx = __webpack_require__(31)
+ , PROTOTYPE = 'prototype';
+
+ var $export = function(type, name, source){
+ var IS_FORCED = type & $export.F
+ , IS_GLOBAL = type & $export.G
+ , IS_STATIC = type & $export.S
+ , IS_PROTO = type & $export.P
+ , IS_BIND = type & $export.B
+ , IS_WRAP = type & $export.W
+ , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
+ , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
+ , key, own, out;
+ if(IS_GLOBAL)source = name;
+ for(key in source){
+ // contains in native
+ own = !IS_FORCED && target && key in target;
+ if(own && key in exports)continue;
+ // export native or passed
+ out = own ? target[key] : source[key];
+ // prevent global pollution for namespaces
+ exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
+ // bind timers to global for call from export context
+ : IS_BIND && own ? ctx(out, global)
+ // wrap global constructors for prevent change them in library
+ : IS_WRAP && target[key] == out ? (function(C){
+ var F = function(param){
+ return this instanceof C ? new C(param) : C(param);
+ };
+ F[PROTOTYPE] = C[PROTOTYPE];
+ return F;
+ // make static versions for prototype methods
+ })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+ if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
+ }
+ };
+ // type bitmap
+ $export.F = 1; // forced
+ $export.G = 2; // global
+ $export.S = 4; // static
+ $export.P = 8; // proto
+ $export.B = 16; // bind
+ $export.W = 32; // wrap
+ module.exports = $export;
+
+/***/ }),
+/* 29 */
+/***/ (function(module, exports) {
+
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+ if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+
+/***/ }),
+/* 30 */
+/***/ (function(module, exports) {
+
+ var core = module.exports = {version: '1.2.6'};
+ if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
+
+/***/ }),
+/* 31 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // optional / simple context binding
+ var aFunction = __webpack_require__(32);
+ module.exports = function(fn, that, length){
+ aFunction(fn);
+ if(that === undefined)return fn;
+ switch(length){
+ case 1: return function(a){
+ return fn.call(that, a);
+ };
+ case 2: return function(a, b){
+ return fn.call(that, a, b);
+ };
+ case 3: return function(a, b, c){
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function(/* ...args */){
+ return fn.apply(that, arguments);
+ };
+ };
+
+/***/ }),
+/* 32 */
+/***/ (function(module, exports) {
+
+ module.exports = function(it){
+ if(typeof it != 'function')throw TypeError(it + ' is not a function!');
+ return it;
+ };
+
+/***/ }),
+/* 33 */
+/***/ (function(module, exports) {
+
+ module.exports = function(exec){
+ try {
+ return !!exec();
+ } catch(e){
+ return true;
+ }
+ };
+
+/***/ }),
+/* 34 */
+/***/ (function(module, exports) {
+
/* WEBPACK VAR INJECTION */(function(global) {/* global window */
'use strict';
exports.__esModule = true;
@@ -1300,13 +1528,13 @@
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
-/***/ },
-/* 21 */
-/***/ function(module, exports) {
+/***/ }),
+/* 35 */
+/***/ (function(module, exports) {
'use strict';
exports.__esModule = true;
var AST = {
@@ -1335,32 +1563,32 @@
// Must be exported as an object rather than the root of the module as the jison lexer
// must modify the object to operate properly.
exports['default'] = AST;
module.exports = exports['default'];
-/***/ },
-/* 22 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 36 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
var _interopRequireDefault = __webpack_require__(1)['default'];
var _interopRequireWildcard = __webpack_require__(3)['default'];
exports.__esModule = true;
exports.parse = parse;
- var _parser = __webpack_require__(23);
+ var _parser = __webpack_require__(37);
var _parser2 = _interopRequireDefault(_parser);
- var _whitespaceControl = __webpack_require__(24);
+ var _whitespaceControl = __webpack_require__(38);
var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
- var _helpers = __webpack_require__(26);
+ var _helpers = __webpack_require__(40);
var Helpers = _interopRequireWildcard(_helpers);
var _utils = __webpack_require__(5);
@@ -1384,26 +1612,26 @@
var strip = new _whitespaceControl2['default'](options);
return strip.accept(_parser2['default'].parse(input));
}
-/***/ },
-/* 23 */
-/***/ function(module, exports) {
+/***/ }),
+/* 37 */
+/***/ (function(module, exports) {
- /* istanbul ignore next */
+ // File ignored in coverage tests via setting in .istanbul.yml
/* Jison generated parser */
"use strict";
+ exports.__esModule = true;
var handlebars = (function () {
var parser = { trace: function trace() {},
yy: {},
symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
- performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$
- /**/) {
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
var $0 = $$.length - 1;
switch (yystate) {
case 1:
return $$[$0 - 1];
@@ -1936,12 +2164,11 @@
},
pushState: function begin(condition) {
this.begin(condition);
} };
lexer.options = {};
- lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START
- /**/) {
+ lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
function strip(start, end) {
return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end);
}
@@ -2114,33 +2341,33 @@
case 44:
return 5;
break;
}
};
- lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
+ lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
lexer.conditions = { "mu": { "rules": [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, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
return lexer;
})();
parser.lexer = lexer;
function Parser() {
this.yy = {};
}Parser.prototype = parser;parser.Parser = Parser;
return new Parser();
- })();exports.__esModule = true;
- exports['default'] = handlebars;
+ })();exports["default"] = handlebars;
+ module.exports = exports["default"];
-/***/ },
-/* 24 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 38 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
var _interopRequireDefault = __webpack_require__(1)['default'];
exports.__esModule = true;
- var _visitor = __webpack_require__(25);
+ var _visitor = __webpack_require__(39);
var _visitor2 = _interopRequireDefault(_visitor);
function WhitespaceControl() {
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
@@ -2350,13 +2577,13 @@
}
exports['default'] = WhitespaceControl;
module.exports = exports['default'];
-/***/ },
-/* 25 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 39 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
var _interopRequireDefault = __webpack_require__(1)['default'];
@@ -2493,13 +2720,13 @@
}
exports['default'] = Visitor;
module.exports = exports['default'];
-/***/ },
-/* 26 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 40 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
var _interopRequireDefault = __webpack_require__(1)['default'];
@@ -2555,20 +2782,19 @@
close: close.charAt(close.length - 3) === '~'
};
}
function stripComment(comment) {
- return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, '');
+ return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, '');
}
function preparePath(data, parts, loc) {
loc = this.locInfo(loc);
var original = data ? '@' : '',
dig = [],
- depth = 0,
- depthString = '';
+ depth = 0;
for (var i = 0, l = parts.length; i < l; i++) {
var part = parts[i].part,
// If we have [] syntax then we do not treat path references as operators,
@@ -2579,11 +2805,10 @@
if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
if (dig.length > 0) {
throw new _exception2['default']('Invalid path: ' + original, { loc: loc });
} else if (part === '..') {
depth++;
- depthString += '../';
}
} else {
dig.push(part);
}
}
@@ -2726,13 +2951,13 @@
closeStrip: close && close.strip,
loc: this.locInfo(locInfo)
};
}
-/***/ },
-/* 27 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 41 */
+/***/ (function(module, exports, __webpack_require__) {
/* eslint-disable new-cap */
'use strict';
@@ -2747,11 +2972,11 @@
var _exception2 = _interopRequireDefault(_exception);
var _utils = __webpack_require__(5);
- var _ast = __webpack_require__(21);
+ var _ast = __webpack_require__(35);
var _ast2 = _interopRequireDefault(_ast);
var slice = [].slice;
@@ -2814,15 +3039,15 @@
'with': true,
'log': true,
'lookup': true
};
if (knownHelpers) {
+ // the next line should use "Object.keys", but the code has been like this a long time and changing it, might
+ // cause backwards-compatibility issues... It's an old library...
+ // eslint-disable-next-line guard-for-in
for (var _name in knownHelpers) {
- /* istanbul ignore else */
- if (_name in knownHelpers) {
- options.knownHelpers[_name] = knownHelpers[_name];
- }
+ this.options.knownHelpers[_name] = knownHelpers[_name];
}
}
return this.accept(program);
},
@@ -3232,10 +3457,11 @@
if (input == null || typeof input !== 'string' && input.type !== 'Program') {
throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
}
+ options = _utils.extend({}, options);
if (!('data' in options)) {
options.data = true;
}
if (options.compat) {
options.useDepths = true;
@@ -3301,13 +3527,13 @@
loc: literal.loc
};
}
}
-/***/ },
-/* 28 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 42 */
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
var _interopRequireDefault = __webpack_require__(1)['default'];
@@ -3319,11 +3545,11 @@
var _exception2 = _interopRequireDefault(_exception);
var _utils = __webpack_require__(5);
- var _codeGen = __webpack_require__(29);
+ var _codeGen = __webpack_require__(43);
var _codeGen2 = _interopRequireDefault(_codeGen);
function Literal(value) {
this.value = value;
@@ -3333,10 +3559,13 @@
JavaScriptCompiler.prototype = {
// PUBLIC API: You can override these methods in a subclass to provide
// alternative compiled forms for name lookup and buffering semantics
nameLookup: function nameLookup(parent, name /* , type*/) {
+ if (name === 'constructor') {
+ return ['(', parent, '.propertyIsEnumerable(\'constructor\') ? ', parent, '.constructor : undefined', ')'];
+ }
if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
return [parent, '.', name];
} else {
return [parent, '[', JSON.stringify(name), ']'];
}
@@ -4090,37 +4319,39 @@
for (var i = 0, l = children.length; i < l; i++) {
child = children[i];
compiler = new this.compiler(); // eslint-disable-line new-cap
- var index = this.matchExistingProgram(child);
+ var existing = this.matchExistingProgram(child);
- if (index == null) {
+ if (existing == null) {
this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children
- index = this.context.programs.length;
+ var index = this.context.programs.length;
child.index = index;
child.name = 'program' + index;
this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
this.context.decorators[index] = compiler.decorators;
this.context.environments[index] = child;
this.useDepths = this.useDepths || compiler.useDepths;
this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
+ child.useDepths = this.useDepths;
+ child.useBlockParams = this.useBlockParams;
} else {
- child.index = index;
- child.name = 'program' + index;
+ child.index = existing.index;
+ child.name = 'program' + existing.index;
- this.useDepths = this.useDepths || child.useDepths;
- this.useBlockParams = this.useBlockParams || child.useBlockParams;
+ this.useDepths = this.useDepths || existing.useDepths;
+ this.useBlockParams = this.useBlockParams || existing.useBlockParams;
}
}
},
matchExistingProgram: function matchExistingProgram(child) {
for (var i = 0, len = this.context.environments.length; i < len; i++) {
var environment = this.context.environments[i];
if (environment && environment.equals(child)) {
- return i;
+ return environment;
}
}
},
programExpression: function programExpression(guid) {
@@ -4298,11 +4529,11 @@
setupHelper: function setupHelper(paramSize, name, blockHelper) {
var params = [],
paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
var foundHelper = this.nameLookup('helpers', name, 'helper'),
- callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : {}');
+ callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})');
return {
params: params,
paramsInit: paramsInit,
name: foundHelper,
@@ -4430,13 +4661,13 @@
}
exports['default'] = JavaScriptCompiler;
module.exports = exports['default'];
-/***/ },
-/* 29 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ }),
+/* 43 */
+/***/ (function(module, exports, __webpack_require__) {
/* global define */
'use strict';
exports.__esModule = true;
@@ -4600,9 +4831,9 @@
};
exports['default'] = CodeGen;
module.exports = exports['default'];
-/***/ }
+/***/ })
/******/ ])
});
;
\ No newline at end of file