Copyright (C) 2011-2019 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
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
else if(typeof exports === 'object')
exports["Handlebars"] = factory();
root["Handlebars"] = factory();
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
var _interopRequireDefault = __webpack_require__(1)['default'];
exports.__esModule = true;
var _handlebarsRuntime = __webpack_require__(2);
var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
var _handlebarsCompilerAst = __webpack_require__(45);
var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
var _handlebarsCompilerBase = __webpack_require__(46);
var _handlebarsCompilerCompiler = __webpack_require__(51);
var _handlebarsCompilerJavascriptCompiler = __webpack_require__(52);
var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
var _handlebarsCompilerVisitor = __webpack_require__(49);
var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
var _handlebarsNoConflict = __webpack_require__(44);
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
var _create = _handlebarsRuntime2['default'].create;
hb.compile = function (input, options) {
return _handlebarsCompilerCompiler.compile(input, options, hb);
hb.precompile = function (input, options) {
return _handlebarsCompilerCompiler.precompile(input, options, hb);
hb.AST = _handlebarsCompilerAst2['default'];
hb.Compiler = _handlebarsCompilerCompiler.Compiler;
hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default'];
hb.Parser = _handlebarsCompilerBase.parser;
hb.parse = _handlebarsCompilerBase.parse;
hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing;
_handlebarsNoConflict2['default'](inst);
inst.Visitor = _handlebarsCompilerVisitor2['default'];
exports['default'] = inst;
module.exports = exports['default'];
/***/ (function(module, exports) {
exports["default"] = function (obj) {
return obj && obj.__esModule ? obj : {
exports.__esModule = true;
/***/ (function(module, exports, __webpack_require__) {
var _interopRequireWildcard = __webpack_require__(3)['default'];
var _interopRequireDefault = __webpack_require__(1)['default'];
exports.__esModule = true;
var _handlebarsBase = __webpack_require__(4);
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__(37);
var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
var _handlebarsException = __webpack_require__(6);
var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
var _handlebarsUtils = __webpack_require__(5);
var Utils = _interopRequireWildcard(_handlebarsUtils);
var _handlebarsRuntime = __webpack_require__(38);
var runtime = _interopRequireWildcard(_handlebarsRuntime);
var _handlebarsNoConflict = __webpack_require__(44);
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
var hb = new base.HandlebarsEnvironment();
hb.SafeString = _handlebarsSafeString2['default'];
hb.Exception = _handlebarsException2['default'];
hb.escapeExpression = Utils.escapeExpression;
hb.template = function (spec) {
return runtime.template(spec, hb);
_handlebarsNoConflict2['default'](inst);
exports['default'] = inst;
module.exports = exports['default'];
/***/ (function(module, exports) {
exports["default"] = function (obj) {
if (obj && obj.__esModule) {
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
exports.__esModule = true;
/***/ (function(module, exports, __webpack_require__) {
var _interopRequireDefault = __webpack_require__(1)['default'];
exports.__esModule = true;
exports.HandlebarsEnvironment = HandlebarsEnvironment;
var _utils = __webpack_require__(5);
var _exception = __webpack_require__(6);
var _exception2 = _interopRequireDefault(_exception);
var _helpers = __webpack_require__(10);
var _decorators = __webpack_require__(30);
var _logger = __webpack_require__(32);
var _logger2 = _interopRequireDefault(_logger);
var _internalProtoAccess = __webpack_require__(33);
exports.VERSION = VERSION;
var COMPILER_REVISION = 8;
exports.COMPILER_REVISION = COMPILER_REVISION;
var LAST_COMPATIBLE_COMPILER_REVISION = 7;
exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
exports.REVISION_CHANGES = REVISION_CHANGES;
var objectType = '[object Object]';
function HandlebarsEnvironment(helpers, partials, decorators) {
this.helpers = helpers || {};
this.partials = partials || {};
this.decorators = decorators || {};
_helpers.registerDefaultHelpers(this);
_decorators.registerDefaultDecorators(this);
HandlebarsEnvironment.prototype = {
constructor: HandlebarsEnvironment,
logger: _logger2['default'],
log: _logger2['default'].log,
registerHelper: function registerHelper(name, fn) {
if (_utils.toString.call(name) === objectType) {
throw new _exception2['default']('Arg not supported with multiple helpers');
_utils.extend(this.helpers, name);
unregisterHelper: function unregisterHelper(name) {
delete this.helpers[name];
registerPartial: function registerPartial(name, partial) {
if (_utils.toString.call(name) === objectType) {
_utils.extend(this.partials, name);
if (typeof partial === 'undefined') {
throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
this.partials[name] = partial;
unregisterPartial: function unregisterPartial(name) {
delete this.partials[name];
registerDecorator: function registerDecorator(name, fn) {
if (_utils.toString.call(name) === objectType) {
throw new _exception2['default']('Arg not supported with multiple decorators');
_utils.extend(this.decorators, name);
this.decorators[name] = fn;
unregisterDecorator: function unregisterDecorator(name) {
delete this.decorators[name];
* Reset the memory of illegal property accesses that have already been logged.
* @deprecated should only be used in handlebars test-cases
resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {
_internalProtoAccess.resetLoggedProperties();
var log = _logger2['default'].log;
exports.createFrame = _utils.createFrame;
exports.logger = _logger2['default'];
/***/ (function(module, exports) {
exports.__esModule = true;
exports.indexOf = indexOf;
exports.escapeExpression = escapeExpression;
exports.isEmpty = isEmpty;
exports.createFrame = createFrame;
exports.blockParams = blockParams;
exports.appendContextPath = appendContextPath;
var badChars = /[&<>"'`=]/g,
function escapeChar(chr) {
function extend(obj /* , ...source */) {
for (var i = 1; i < arguments.length; i++) {
for (var key in arguments[i]) {
if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
obj[key] = arguments[i][key];
var toString = Object.prototype.toString;
exports.toString = toString;
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
/* eslint-disable func-style */
var isFunction = function isFunction(value) {
return typeof value === 'function';
// fallback for older versions of Chrome and Safari
/* istanbul ignore next */
exports.isFunction = isFunction = function (value) {
return typeof value === 'function' && toString.call(value) === '[object Function]';
exports.isFunction = isFunction;
/* eslint-enable func-style */
/* istanbul ignore next */
var isArray = Array.isArray || function (value) {
return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
exports.isArray = isArray;
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
function indexOf(array, value) {
for (var i = 0, len = array.length; i < len; i++) {
if (array[i] === value) {
function escapeExpression(string) {
if (typeof string !== 'string') {
// don't escape SafeStrings, since they're already safe
if (string && string.toHTML) {
} else if (string == null) {
// Force a string conversion as this will be done by the append regardless and
// the regex test will do this transparently behind the scenes, causing issues if
// an object's to string has escaped characters in it.
if (!possible.test(string)) {
return string.replace(badChars, escapeChar);
function isEmpty(value) {
if (!value && value !== 0) {
} else if (isArray(value) && value.length === 0) {
function createFrame(object) {
var frame = extend({}, object);
function blockParams(params, ids) {
function appendContextPath(contextPath, id) {
return (contextPath ? contextPath + '.' : '') + id;