| 1 |
/**! |
| 2 |
|
| 3 |
@license |
| 4 |
handlebars v4.7.7 |
| 5 |
|
| 6 |
Copyright (C) 2011-2019 by Yehuda Katz |
| 7 |
|
| 8 |
Permission is hereby granted, free of charge, to any person obtaining a copy |
| 9 |
of this software and associated documentation files (the "Software"), to deal |
| 10 |
in the Software without restriction, including without limitation the rights |
| 11 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 12 |
copies of the Software, and to permit persons to whom the Software is |
| 13 |
furnished to do so, subject to the following conditions: |
| 14 |
|
| 15 |
The above copyright notice and this permission notice shall be included in |
| 16 |
all copies or substantial portions of the Software. |
| 17 |
|
| 18 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 19 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 20 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 21 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 22 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 23 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 24 |
THE SOFTWARE. |
| 25 |
|
| 26 |
*/ |
| 27 |
(function webpackUniversalModuleDefinition(root, factory) { |
| 28 |
if(typeof exports === 'object' && typeof module === 'object') |
| 29 |
module.exports = factory(); |
| 30 |
else if(typeof define === 'function' && define.amd) |
| 31 |
define([], factory); |
| 32 |
else if(typeof exports === 'object') |
| 33 |
exports["Handlebars"] = factory(); |
| 34 |
else |
| 35 |
root["Handlebars"] = factory(); |
| 36 |
})(this, function() { |
| 37 |
return /******/ (function(modules) { // webpackBootstrap |
| 38 |
/******/ // The module cache |
| 39 |
/******/ var installedModules = {}; |
| 40 |
|
| 41 |
/******/ // The require function |
| 42 |
/******/ function __webpack_require__(moduleId) { |
| 43 |
|
| 44 |
/******/ // Check if module is in cache |
| 45 |
/******/ if(installedModules[moduleId]) |
| 46 |
/******/ return installedModules[moduleId].exports; |
| 47 |
|
| 48 |
/******/ // Create a new module (and put it into the cache) |
| 49 |
/******/ var module = installedModules[moduleId] = { |
| 50 |
/******/ exports: {}, |
| 51 |
/******/ id: moduleId, |
| 52 |
/******/ loaded: false |
| 53 |
/******/ }; |
| 54 |
|
| 55 |
/******/ // Execute the module function |
| 56 |
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
| 57 |
|
| 58 |
/******/ // Flag the module as loaded |
| 59 |
/******/ module.loaded = true; |
| 60 |
|
| 61 |
/******/ // Return the exports of the module |
| 62 |
/******/ return module.exports; |
| 63 |
/******/ } |
| 64 |
|
| 65 |
|
| 66 |
/******/ // expose the modules object (__webpack_modules__) |
| 67 |
/******/ __webpack_require__.m = modules; |
| 68 |
|
| 69 |
/******/ // expose the module cache |
| 70 |
/******/ __webpack_require__.c = installedModules; |
| 71 |
|
| 72 |
/******/ // __webpack_public_path__ |
| 73 |
/******/ __webpack_require__.p = ""; |
| 74 |
|
| 75 |
/******/ // Load entry module and return exports |
| 76 |
/******/ return __webpack_require__(0); |
| 77 |
/******/ }) |
| 78 |
/************************************************************************/ |
| 79 |
/******/ ([ |
| 80 |
/* 0 */ |
| 81 |
/***/ (function(module, exports, __webpack_require__) { |
| 82 |
|
| 83 |
'use strict'; |
| 84 |
|
| 85 |
var _interopRequireWildcard = __webpack_require__(1)['default']; |
| 86 |
|
| 87 |
var _interopRequireDefault = __webpack_require__(2)['default']; |
| 88 |
|
| 89 |
exports.__esModule = true; |
| 90 |
|
| 91 |
var _handlebarsBase = __webpack_require__(3); |
| 92 |
|
| 93 |
var base = _interopRequireWildcard(_handlebarsBase); |
| 94 |
|
| 95 |
// Each of these augment the Handlebars object. No need to setup here. |
| 96 |
// (This is done to easily share code between commonjs and browse envs) |
| 97 |
|
| 98 |
var _handlebarsSafeString = __webpack_require__(36); |
| 99 |
|
| 100 |
var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); |
| 101 |
|
| 102 |
var _handlebarsException = __webpack_require__(5); |
| 103 |
|
| 104 |
var _handlebarsException2 = _interopRequireDefault(_handlebarsException); |
| 105 |
|
| 106 |
var _handlebarsUtils = __webpack_require__(4); |
| 107 |
|
| 108 |
var Utils = _interopRequireWildcard(_handlebarsUtils); |
| 109 |
|
| 110 |
var _handlebarsRuntime = __webpack_require__(37); |
| 111 |
|
| 112 |
var runtime = _interopRequireWildcard(_handlebarsRuntime); |
| 113 |
|
| 114 |
var _handlebarsNoConflict = __webpack_require__(43); |
| 115 |
|
| 116 |
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); |
| 117 |
|
| 118 |
// For compatibility and usage outside of module systems, make the Handlebars object a namespace |
| 119 |
function create() { |
| 120 |
var hb = new base.HandlebarsEnvironment(); |
| 121 |
|
| 122 |
Utils.extend(hb, base); |
| 123 |
hb.SafeString = _handlebarsSafeString2['default']; |
| 124 |
hb.Exception = _handlebarsException2['default']; |
| 125 |
hb.Utils = Utils; |
| 126 |
hb.escapeExpression = Utils.escapeExpression; |
| 127 |
|
| 128 |
hb.VM = runtime; |
| 129 |
hb.template = function (spec) { |
| 130 |
return runtime.template(spec, hb); |
| 131 |
}; |
| 132 |
|
| 133 |
return hb; |
| 134 |
} |
| 135 |
|
| 136 |
var inst = create(); |
| 137 |
inst.create = create; |
| 138 |
|
| 139 |
_handlebarsNoConflict2['default'](inst); |
| 140 |
|
| 141 |
inst['default'] = inst; |
| 142 |
|
| 143 |
exports['default'] = inst; |
| 144 |
module.exports = exports['default']; |
| 145 |
|
| 146 |
/***/ }), |
| 147 |
/* 1 */ |
| 148 |
/***/ (function(module, exports) { |
| 149 |
|
| 150 |
"use strict"; |
| 151 |
|
| 152 |
exports["default"] = function (obj) { |
| 153 |
if (obj && obj.__esModule) { |
| 154 |
return obj; |
| 155 |
} else { |
| 156 |
var newObj = {}; |
| 157 |
|
| 158 |
if (obj != null) { |
| 159 |
for (var key in obj) { |
| 160 |
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; |
| 161 |
} |
| 162 |
} |
| 163 |
|
| 164 |
newObj["default"] = obj; |
| 165 |
return newObj; |
| 166 |
} |
| 167 |
}; |
| 168 |
|
| 169 |
exports.__esModule = true; |
| 170 |
|
| 171 |
/***/ }), |
| 172 |
/* 2 */ |
| 173 |
/***/ (function(module, exports) { |
| 174 |
|
| 175 |
"use strict"; |
| 176 |
|
| 177 |
exports["default"] = function (obj) { |
| 178 |
return obj && obj.__esModule ? obj : { |
| 179 |
"default": obj |
| 180 |
}; |
| 181 |
}; |
| 182 |
|
| 183 |
exports.__esModule = true; |
| 184 |
|
| 185 |
/***/ }), |
| 186 |
/* 3 */ |
| 187 |
/***/ (function(module, exports, __webpack_require__) { |
| 188 |
|
| 189 |
'use strict'; |
| 190 |
|
| 191 |
var _interopRequireDefault = __webpack_require__(2)['default']; |
| 192 |
|
| 193 |
exports.__esModule = true; |
| 194 |
exports.HandlebarsEnvironment = HandlebarsEnvironment; |
| 195 |
|
| 196 |
var _utils = __webpack_require__(4); |
| 197 |
|
| 198 |
var _exception = __webpack_require__(5); |
| 199 |
|
| 200 |
var _exception2 = _interopRequireDefault(_exception); |
| 201 |
|
| 202 |
var _helpers = __webpack_require__(9); |
| 203 |
|
| 204 |
var _decorators = __webpack_require__(29); |
| 205 |
|
| 206 |
var _logger = __webpack_require__(31); |
| 207 |
|
| 208 |
var _logger2 = _interopRequireDefault(_logger); |
| 209 |
|
| 210 |
var _internalProtoAccess = __webpack_require__(32); |
| 211 |
|
| 212 |
var VERSION = '4.7.7'; |
| 213 |
exports.VERSION = VERSION; |
| 214 |
var COMPILER_REVISION = 8; |
| 215 |
exports.COMPILER_REVISION = COMPILER_REVISION; |
| 216 |
var LAST_COMPATIBLE_COMPILER_REVISION = 7; |
| 217 |
|
| 218 |
exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; |
| 219 |
var REVISION_CHANGES = { |
| 220 |
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it |
| 221 |
2: '== 1.0.0-rc.3', |
| 222 |
3: '== 1.0.0-rc.4', |
| 223 |
4: '== 1.x.x', |
| 224 |
5: '== 2.0.0-alpha.x', |
| 225 |
6: '>= 2.0.0-beta.1', |
| 226 |
7: '>= 4.0.0 <4.3.0', |
| 227 |
8: '>= 4.3.0' |
| 228 |
}; |
| 229 |
|
| 230 |
exports.REVISION_CHANGES = REVISION_CHANGES; |
| 231 |
var objectType = '[object Object]'; |
| 232 |
|
| 233 |
function HandlebarsEnvironment(helpers, partials, decorators) { |
| 234 |
this.helpers = helpers || {}; |
| 235 |
this.partials = partials || {}; |
| 236 |
this.decorators = decorators || {}; |
| 237 |
|
| 238 |
_helpers.registerDefaultHelpers(this); |
| 239 |
_decorators.registerDefaultDecorators(this); |
| 240 |
} |
| 241 |
|
| 242 |
HandlebarsEnvironment.prototype = { |
| 243 |
constructor: HandlebarsEnvironment, |
| 244 |
|
| 245 |
logger: _logger2['default'], |
| 246 |
log: _logger2['default'].log, |
| 247 |
|
| 248 |
registerHelper: function registerHelper(name, fn) { |
| 249 |
if (_utils.toString.call(name) === objectType) { |
| 250 |
if (fn) { |
| 251 |
throw new _exception2['default']('Arg not supported with multiple helpers'); |
| 252 |
} |
| 253 |
_utils.extend(this.helpers, name); |
| 254 |
} else { |
| 255 |
this.helpers[name] = fn; |
| 256 |
} |
| 257 |
}, |
| 258 |
unregisterHelper: function unregisterHelper(name) { |
| 259 |
delete this.helpers[name]; |
| 260 |
}, |
| 261 |
|
| 262 |
registerPartial: function registerPartial(name, partial) { |
| 263 |
if (_utils.toString.call(name) === objectType) { |
| 264 |
_utils.extend(this.partials, name); |
| 265 |
} else { |
| 266 |
if (typeof partial === 'undefined') { |
| 267 |
throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); |
| 268 |
} |
| 269 |
this.partials[name] = partial; |
| 270 |
} |
| 271 |
}, |
| 272 |
unregisterPartial: function unregisterPartial(name) { |
| 273 |
delete this.partials[name]; |
| 274 |
}, |
| 275 |
|
| 276 |
registerDecorator: function registerDecorator(name, fn) { |
| 277 |
if (_utils.toString.call(name) === objectType) { |
| 278 |
if (fn) { |
| 279 |
throw new _exception2['default']('Arg not supported with multiple decorators'); |
| 280 |
} |
| 281 |
_utils.extend(this.decorators, name); |
| 282 |
} else { |
| 283 |
this.decorators[name] = fn; |
| 284 |
} |
| 285 |
}, |
| 286 |
unregisterDecorator: function unregisterDecorator(name) { |
| 287 |
delete this.decorators[name]; |
| 288 |
}, |
| 289 |
/** |
| 290 |
* Reset the memory of illegal property accesses that have already been logged. |
| 291 |
* @deprecated should only be used in handlebars test-cases |
| 292 |
*/ |
| 293 |
resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { |
| 294 |
_internalProtoAccess.resetLoggedProperties(); |
| 295 |
} |
| 296 |
}; |
| 297 |
|
| 298 |
var log = _logger2['default'].log; |
| 299 |
|
| 300 |
exports.log = log; |
| 301 |
exports.createFrame = _utils.createFrame; |
| 302 |
exports.logger = _logger2['default']; |
| 303 |
|
| 304 |
/***/ }), |
| 305 |
/* 4 */ |
| 306 |
/***/ (function(module, exports) { |
| 307 |
|
| 308 |
'use strict'; |
| 309 |
|
| 310 |
exports.__esModule = true; |
| 311 |
exports.extend = extend; |
| 312 |
exports.indexOf = indexOf; |
| 313 |
exports.escapeExpression = escapeExpression; |
| 314 |
exports.isEmpty = isEmpty; |
| 315 |
exports.createFrame = createFrame; |
| 316 |
exports.blockParams = blockParams; |
| 317 |
exports.appendContextPath = appendContextPath; |
| 318 |
var escape = { |
| 319 |
'&': '&', |
| 320 |
'<': '<', |
| 321 |
'>': '>', |
| 322 |
'"': '"', |
| 323 |
"'": ''', |
| 324 |
'`': '`', |
| 325 |
'=': '=' |
| 326 |
}; |
| 327 |
|
| 328 |
var badChars = /[&<>"'`=]/g, |
| 329 |
possible = /[&<>"'`=]/; |
| 330 |
|
| 331 |
function escapeChar(chr) { |
| 332 |
return escape[chr]; |
| 333 |
} |
| 334 |
|
| 335 |
function extend(obj /* , ...source */) { |
| 336 |
for (var i = 1; i < arguments.length; i++) { |
| 337 |
for (var key in arguments[i]) { |
| 338 |
if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { |
| 339 |
obj[key] = arguments[i][key]; |
| 340 |
} |
| 341 |
} |
| 342 |
} |
| 343 |
|
| 344 |
return obj; |
| 345 |
} |
| 346 |
|
| 347 |
var toString = Object.prototype.toString; |
| 348 |
|
| 349 |
exports.toString = toString; |
| 350 |
// Sourced from lodash |
| 351 |
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt |
| 352 |
/* eslint-disable func-style */ |
| 353 |
var isFunction = function isFunction(value) { |
| 354 |
return typeof value === 'function'; |
| 355 |
}; |
| 356 |
// fallback for older versions of Chrome and Safari |
| 357 |
/* istanbul ignore next */ |
| 358 |
if (isFunction(/x/)) { |
| 359 |
exports.isFunction = isFunction = function (value) { |
| 360 |
return typeof value === 'function' && toString.call(value) === '[object Function]'; |
| 361 |
}; |
| 362 |
} |
| 363 |
exports.isFunction = isFunction; |
| 364 |
|
| 365 |
/* eslint-enable func-style */ |
| 366 |
|
| 367 |
/* istanbul ignore next */ |
| 368 |
var isArray = Array.isArray || function (value) { |
| 369 |
return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; |
| 370 |
}; |
| 371 |
|
| 372 |
exports.isArray = isArray; |
| 373 |
// Older IE versions do not directly support indexOf so we must implement our own, sadly. |
| 374 |
|
| 375 |
function indexOf(array, value) { |
| 376 |
for (var i = 0, len = array.length; i < len; i++) { |
| 377 |
if (array[i] === value) { |
| 378 |
return i; |
| 379 |
} |
| 380 |
} |
| 381 |
return -1; |
| 382 |
} |
| 383 |
|
| 384 |
function escapeExpression(string) { |
| 385 |
if (typeof string !== 'string') { |
| 386 |
// don't escape SafeStrings, since they're already safe |
| 387 |
if (string && string.toHTML) { |
| 388 |
return string.toHTML(); |
| 389 |
} else if (string == null) { |
| 390 |
return ''; |
| 391 |
} else if (!string) { |
| 392 |
return string + ''; |
| 393 |
} |
| 394 |
|
| 395 |
// Force a string conversion as this will be done by the append regardless and |
| 396 |
// the regex test will do this transparently behind the scenes, causing issues if |
| 397 |
// an object's to string has escaped characters in it. |
| 398 |
string = '' + string; |
| 399 |
} |
| 400 |
|
| 401 |
if (!possible.test(string)) { |
| 402 |
return string; |
| 403 |
} |
| 404 |
return string.replace(badChars, escapeChar); |
| 405 |
} |
| 406 |
|
| 407 |
function isEmpty(value) { |
| 408 |
if (!value && value !== 0) { |
| 409 |
return true; |
| 410 |
} else if (isArray(value) && value.length === 0) { |
| 411 |
return true; |
| 412 |
} else { |
| 413 |
return false; |
| 414 |
} |
| 415 |
} |
| 416 |
|
| 417 |
function createFrame(object) { |
| 418 |
var frame = extend({}, object); |
| 419 |
frame._parent = object; |
| 420 |
return frame; |
| 421 |
} |
| 422 |
|
| 423 |
function blockParams(params, ids) { |
| 424 |
params.path = ids; |
| 425 |
return params; |
| 426 |
} |
| 427 |
|
| 428 |
function appendContextPath(contextPath, id) { |
| 429 |
return (contextPath ? contextPath + '.' : '') + id; |
| 430 |
} |
| 431 |
|
| 432 |
/***/ }), |
| 433 |
/* 5 */ |
| 434 |
/***/ (function(module, exports, __webpack_require__) { |
| 435 |
|
| 436 |
'use strict'; |
| 437 |
|
| 438 |
var _Object$defineProperty = __webpack_require__(6)['default']; |
| 439 |
|
| 440 |
exports.__esModule = true; |
| 441 |
var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; |
| 442 |
|
| 443 |
function Exception(message, node) { |
| 444 |
var loc = node && node.loc, |
| 445 |
line = undefined, |
| 446 |
endLineNumber = undefined, |
| 447 |
column = undefined, |
| 448 |
endColumn = undefined; |
| 449 |
|
| 450 |
if (loc) { |
| 451 |
line = loc.start.line; |
| 452 |
endLineNumber = loc.end.line; |
| 453 |
column = loc.start.column; |
| 454 |
endColumn = loc.end.column; |
| 455 |
|
| 456 |
message += ' - ' + line + ':' + column; |
| 457 |
} |
| 458 |
|
| 459 |
var tmp = Error.prototype.constructor.call(this, message); |
| 460 |
|
| 461 |
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. |
| 462 |
for (var idx = 0; idx < errorProps.length; idx++) { |
| 463 |
this[errorProps[idx]] = tmp[errorProps[idx]]; |
| 464 |
} |
| 465 |
|
| 466 |
/* istanbul ignore else */ |
| 467 |
if (Error.captureStackTrace) { |
| 468 |
Error.captureStackTrace(this, Exception); |
| 469 |
} |
| 470 |
|
| 471 |
try { |
| 472 |
if (loc) { |
| 473 |
this.lineNumber = line; |
| 474 |
this.endLineNumber = endLineNumber; |
| 475 |
|
| 476 |
// Work around issue under safari where we can't directly set the column value |
| 477 |
/* istanbul ignore next */ |
| 478 |
if (_Object$defineProperty) { |
| 479 |
Object.defineProperty(this, 'column', { |
| 480 |
value: column, |
| 481 |
enumerable: true |
| 482 |
}); |
| 483 |
Object.defineProperty(this, 'endColumn', { |
| 484 |
value: endColumn, |
| 485 |
enumerable: true |
| 486 |
}); |
| 487 |
} else { |
| 488 |
this.column = column; |
| 489 |
this.endColumn = endColumn; |
| 490 |
} |
| 491 |
} |
| 492 |
} catch (nop) { |
| 493 |
/* Ignore if the browser is very particular */ |
| 494 |
} |
| 495 |
} |
| 496 |
|
| 497 |
Exception.prototype = new Error(); |
| 498 |
|
| 499 |
exports['default'] = Exception; |
| 500 |
module.exports = exports['default']; |
| 501 |
|
| 502 |
/***/ }), |
| 503 |
/* 6 */ |
| 504 |
/***/ (function(module, exports, __webpack_require__) { |
| 505 |
|
| 506 |
module.exports = { "default": __webpack_require__(7), __esModule: true }; |
| 507 |
|
| 508 |
/***/ }), |
| 509 |
/* 7 */ |
| 510 |
/***/ (function(module, exports, __webpack_require__) { |
| 511 |
|
| 512 |
var $ = __webpack_require__(8); |
| 513 |
module.exports = function defineProperty(it, key, desc){ |
| 514 |
return $.setDesc(it, key, desc); |
| 515 |
}; |
| 516 |
|
| 517 |
/***/ }), |
| 518 |
/* 8 */ |
| 519 |
/***/ (function(module, exports) { |
| 520 |
|
| 521 |
var $Object = Object; |
| 522 |
module.exports = { |
| 523 |
create: $Object.create, |
| 524 |
getProto: $Object.getPrototypeOf, |
| 525 |
isEnum: {}.propertyIsEnumerable, |
| 526 |
getDesc: $Object.getOwnPropertyDescriptor, |
| 527 |
setDesc: $Object.defineProperty, |
| 528 |
setDescs: $Object.defineProperties, |
| 529 |
getKeys: $Object.keys, |
| 530 |
getNames: $Object.getOwnPropertyNames, |
| 531 |
getSymbols: $Object.getOwnPropertySymbols, |
| 532 |
each: [].forEach |
| 533 |
}; |
| 534 |
|
| 535 |
/***/ }), |
| 536 |
/* 9 */ |
| 537 |
/***/ (function(module, exports, __webpack_require__) { |
| 538 |
|
| 539 |
'use strict'; |
| 540 |
|
| 541 |
var _interopRequireDefault = __webpack_require__(2)['default']; |
| 542 |
|
| 543 |
exports.__esModule = true; |
| 544 |
exports.registerDefaultHelpers = registerDefaultHelpers; |
| 545 |
exports.moveHelperToHooks = moveHelperToHooks; |
| 546 |
|
| 547 |
var _helpersBlockHelperMissing = __webpack_require__(10); |
| 548 |
|
| 549 |
var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); |
| 550 |
|
| 551 |
var _helpersEach = __webpack_require__(11); |
| 552 |
|
| 553 |
var _helpersEach2 = _interopRequireDefault(_helpersEach); |
| 554 |
|
| 555 |
var _helpersHelperMissing = __webpack_require__(24); |
| 556 |
|
| 557 |
var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); |
| 558 |
|
| 559 |
var _helpersIf = __webpack_require__(25); |
| 560 |
|
| 561 |
var _helpersIf2 = _interopRequireDefault(_helpersIf); |
| 562 |
|
| 563 |
var _helpersLog = __webpack_require__(26); |
| 564 |
|
| 565 |
var _helpersLog2 = _interopRequireDefault(_helpersLog); |
| 566 |
|
| 567 |
var _helpersLookup = __webpack_require__(27); |
| 568 |
|
| 569 |
var _helpersLookup2 = _interopRequireDefault(_helpersLookup); |
| 570 |
|
| 571 |
var _helpersWith = __webpack_require__(28); |
| 572 |
|
| 573 |
var _helpersWith2 = _interopRequireDefault(_helpersWith); |
| 574 |
|
| 575 |
function registerDefaultHelpers(instance) { |
| 576 |
_helpersBlockHelperMissing2['default'](instance); |
| 577 |
_helpersEach2['default'](instance); |
| 578 |
_helpersHelperMissing2['default'](instance); |
| 579 |
_helpersIf2['default'](instance); |
| 580 |
_helpersLog2['default'](instance); |
| 581 |
_helpersLookup2['default'](instance); |
| 582 |
_helpersWith2['default'](instance); |
| 583 |
} |
| 584 |
|
| 585 |
function moveHelperToHooks(instance, helperName, keepHelper) { |
| 586 |
if (instance.helpers[helperName]) { |
| 587 |
instance.hooks[helperName] = instance.helpers[helperName]; |
| 588 |
if (!keepHelper) { |
| 589 |
delete instance.helpers[helperName]; |
| 590 |
} |
| 591 |
} |
| 592 |
} |
| 593 |
|
| 594 |
/***/ }), |
| 595 |
/* 10 */ |
| 596 |
/***/ (function(module, exports, __webpack_require__) { |
| 597 |
|
| 598 |
'use strict'; |
| 599 |
|
| 600 |
exports.__esModule = true; |
| 601 |
|
| 602 |
var _utils = __webpack_require__(4); |
| 603 |
|
| 604 |
exports['default'] = function (instance) { |
| 605 |
instance.registerHelper('blockHelperMissing', function (context, options) { |
| 606 |
var inverse = options.inverse, |
| 607 |
fn = options.fn; |
| 608 |
|
| 609 |
if (context === true) { |
| 610 |
return fn(this); |
| 611 |
} else if (context === false || context == null) { |
| 612 |
return inverse(this); |
| 613 |
} else if (_utils.isArray(context)) { |
| 614 |
if (context.length > 0) { |
| 615 |
if (options.ids) { |
| 616 |
options.ids = [options.name]; |
| 617 |
} |
| 618 |
|
| 619 |
return instance.helpers.each(context, options); |
| 620 |
} else { |
| 621 |
return inverse(this); |
| 622 |
} |
| 623 |
} else { |
| 624 |
if (options.data && options.ids) { |
| 625 |
var data = _utils.createFrame(options.data); |
| 626 |
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); |
| 627 |
options = { data: data }; |
| 628 |
} |
| 629 |
|
| 630 |
return fn(context, options); |
| 631 |
} |
| 632 |
}); |
| 633 |
}; |
| 634 |
|
| 635 |
module.exports = exports['default']; |
| 636 |
|
| 637 |
/***/ }), |
| 638 |
/* 11 */ |
| 639 |
/***/ (function(module, exports, __webpack_require__) { |
| 640 |
|
| 641 |
/* WEBPACK VAR INJECTION */(function(global) {'use strict'; |
| 642 |
|
| 643 |
var _Object$keys = __webpack_require__(12)['default']; |
| 644 |
|
| 645 |
var _interopRequireDefault = __webpack_require__(2)['default']; |
| 646 |
|
| 647 |
exports.__esModule = true; |
| 648 |
|
| 649 |
var _utils = __webpack_require__(4); |
| 650 |
|
| 651 |
var _exception = __webpack_require__(5); |
| 652 |
|
| 653 |
var _exception2 = _interopRequireDefault(_exception); |
| 654 |
|
| 655 |
exports['default'] = function (instance) { |
| 656 |
instance.registerHelper('each', function (context, options) { |
| 657 |
if (!options) { |
| 658 |
throw new _exception2['default']('Must pass iterator to #each'); |
| 659 |
} |
| 660 |
|
| 661 |
var fn = options.fn, |
| 662 |
inverse = options.inverse, |
| 663 |
i = 0, |
| 664 |
ret = '', |
| 665 |
data = undefined, |
| 666 |
contextPath = undefined; |
| 667 |
|
| 668 |
if (options.data && options.ids) { |
| 669 |
contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; |
| 670 |
} |
| 671 |
|
| 672 |
if (_utils.isFunction(context)) { |
| 673 |
context = context.call(this); |
| 674 |
} |
| 675 |
|
| 676 |
if (options.data) { |
| 677 |
data = _utils.createFrame(options.data); |
| 678 |
} |
| 679 |
|
| 680 |
function execIteration(field, index, last) { |
| 681 |
if (data) { |
| 682 |
data.key = field; |
| 683 |
data.index = index; |
| 684 |
data.first = index === 0; |
| 685 |
data.last = !!last; |
| 686 |
|
| 687 |
if (contextPath) { |
| 688 |
data.contextPath = contextPath + field; |
| 689 |
} |
| 690 |
} |
| 691 |
|
| 692 |
ret = ret + fn(context[field], { |
| 693 |
data: data, |
| 694 |
blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) |
| 695 |
}); |
| 696 |
} |
| 697 |
|
| 698 |
if (context && typeof context === 'object') { |
| 699 |
if (_utils.isArray(context)) { |
| 700 |
for (var j = context.length; i < j; i++) { |
| 701 |
if (i in context) { |
| 702 |
execIteration(i, i, i === context.length - 1); |
| 703 |
} |
| 704 |
} |
| 705 |
} else if (global.Symbol && context[global.Symbol.iterator]) { |
| 706 |
var newContext = []; |
| 707 |
var iterator = context[global.Symbol.iterator](); |
| 708 |
for (var it = iterator.next(); !it.done; it = iterator.next()) { |
| 709 |
newContext.push(it.value); |
| 710 |
} |
| 711 |
context = newContext; |
| 712 |
for (var j = context.length; i < j; i++) { |
| 713 |
execIteration(i, i, i === context.length - 1); |
| 714 |
} |
| 715 |
} else { |
| 716 |
(function () { |
| 717 |
var priorKey = undefined; |
| 718 |
|
| 719 |
_Object$keys(context).forEach(function (key) { |
| 720 |
// We're running the iterations one step out of sync so we can detect |
| 721 |
// the last iteration without have to scan the object twice and create |
| 722 |
// an itermediate keys array. |
| 723 |
if (priorKey !== undefined) { |
| 724 |
execIteration(priorKey, i - 1); |
| 725 |
} |
| 726 |
priorKey = key; |
| 727 |
i++; |
| 728 |
}); |
| 729 |
if (priorKey !== undefined) { |
| 730 |
execIteration(priorKey, i - 1, true); |
| 731 |
} |
| 732 |
})(); |
| 733 |
} |
| 734 |
} |
| 735 |
|
| 736 |
if (i === 0) { |
| 737 |
ret = inverse(this); |
| 738 |
} |
| 739 |
|
| 740 |
return ret; |
| 741 |
}); |
| 742 |
}; |
| 743 |
|
| 744 |
module.exports = exports['default']; |
| 745 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) |
| 746 |
|
| 747 |
/***/ }), |
| 748 |
/* 12 */ |
| 749 |
/***/ (function(module, exports, __webpack_require__) { |
| 750 |
|
| 751 |
module.exports = { "default": __webpack_require__(13), __esModule: true }; |
| 752 |
|
| 753 |
/***/ }), |
| 754 |
/* 13 */ |
| 755 |
/***/ (function(module, exports, __webpack_require__) { |
| 756 |
|
| 757 |
__webpack_require__(14); |
| 758 |
module.exports = __webpack_require__(20).Object.keys; |
| 759 |
|
| 760 |
/***/ }), |
| 761 |
/* 14 */ |
| 762 |
/***/ (function(module, exports, __webpack_require__) { |
| 763 |
|
| 764 |
// 19.1.2.14 Object.keys(O) |
| 765 |
var toObject = __webpack_require__(15); |
| 766 |
|
| 767 |
__webpack_require__(17)('keys', function($keys){ |
| 768 |
return function keys(it){ |
| 769 |
return $keys(toObject(it)); |
| 770 |
}; |
| 771 |
}); |
| 772 |
|
| 773 |
/***/ }), |
| 774 |
/* 15 */ |
| 775 |
/***/ (function(module, exports, __webpack_require__) { |
| 776 |
|
| 777 |
// 7.1.13 ToObject(argument) |
| 778 |
var defined = __webpack_require__(16); |
| 779 |
module.exports = function(it){ |
| 780 |
return Object(defined(it)); |
| 781 |
}; |
| 782 |
|
| 783 |
/***/ }), |
| 784 |
/* 16 */ |
| 785 |
/***/ (function(module, exports) { |
| 786 |
|
| 787 |
// 7.2.1 RequireObjectCoercible(argument) |
| 788 |
module.exports = function(it){ |
| 789 |
if(it == undefined)throw TypeError("Can't call method on " + it); |
| 790 |
return it; |
| 791 |
}; |
| 792 |
|
| 793 |
/***/ }), |
| 794 |
/* 17 */ |
| 795 |
/***/ (function(module, exports, __webpack_require__) { |
| 796 |
|
| 797 |
// most Object methods by ES6 should accept primitives |
| 798 |
var $export = __webpack_require__(18) |
| 799 |
, core = __webpack_require__(20) |
| 800 |
, fails = __webpack_require__(23); |
| 801 |
module.exports = function(KEY, exec){ |
| 802 |
var fn = (core.Object || {})[KEY] || Object[KEY] |
| 803 |
, exp = {}; |
| 804 |
exp[KEY] = exec(fn); |
| 805 |
$export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); |
| 806 |
}; |
| 807 |
|
| 808 |
/***/ }), |
| 809 |
/* 18 */ |
| 810 |
/***/ (function(module, exports, __webpack_require__) { |
| 811 |
|
| 812 |
var global = __webpack_require__(19) |
| 813 |
, core = __webpack_require__(20) |
| 814 |
, ctx = __webpack_require__(21) |
| 815 |
, PROTOTYPE = 'prototype'; |
| 816 |
|
| 817 |
var $export = function(type, name, source){ |
| 818 |
var IS_FORCED = type & $export.F |
| 819 |
, IS_GLOBAL = type & $export.G |
| 820 |
, IS_STATIC = type & $export.S |
| 821 |
, IS_PROTO = type & $export.P |
| 822 |
, IS_BIND = type & $export.B |
| 823 |
, IS_WRAP = type & $export.W |
| 824 |
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) |
| 825 |
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] |
| 826 |
, key, own, out; |
| 827 |
if(IS_GLOBAL)source = name; |
| 828 |
for(key in source){ |
| 829 |
// contains in native |
| 830 |
own = !IS_FORCED && target && key in target; |
| 831 |
if(own && key in exports)continue; |
| 832 |
// export native or passed |
| 833 |
out = own ? target[key] : source[key]; |
| 834 |
// prevent global pollution for namespaces |
| 835 |
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] |
| 836 |
// bind timers to global for call from export context |
| 837 |
: IS_BIND && own ? ctx(out, global) |
| 838 |
// wrap global constructors for prevent change them in library |
| 839 |
: IS_WRAP && target[key] == out ? (function(C){ |
| 840 |
var F = function(param){ |
| 841 |
return this instanceof C ? new C(param) : C(param); |
| 842 |
}; |
| 843 |
F[PROTOTYPE] = C[PROTOTYPE]; |
| 844 |
return F; |
| 845 |
// make static versions for prototype methods |
| 846 |
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; |
| 847 |
if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; |
| 848 |
} |
| 849 |
}; |
| 850 |
// type bitmap |
| 851 |
$export.F = 1; // forced |
| 852 |
$export.G = 2; // global |
| 853 |
$export.S = 4; // static |
| 854 |
$export.P = 8; // proto |
| 855 |
$export.B = 16; // bind |
| 856 |
$export.W = 32; // wrap |
| 857 |
module.exports = $export; |
| 858 |
|
| 859 |
/***/ }), |
| 860 |
/* 19 */ |
| 861 |
/***/ (function(module, exports) { |
| 862 |
|
| 863 |
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 |
| 864 |
var global = module.exports = typeof window != 'undefined' && window.Math == Math |
| 865 |
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); |
| 866 |
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef |
| 867 |
|
| 868 |
/***/ }), |
| 869 |
/* 20 */ |
| 870 |
/***/ (function(module, exports) { |
| 871 |
|
| 872 |
var core = module.exports = {version: '1.2.6'}; |
| 873 |
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef |
| 874 |
|
| 875 |
/***/ }), |
| 876 |
/* 21 */ |
| 877 |
/***/ (function(module, exports, __webpack_require__) { |
| 878 |
|
| 879 |
// optional / simple context binding |
| 880 |
var aFunction = __webpack_require__(22); |
| 881 |
module.exports = function(fn, that, length){ |
| 882 |
aFunction(fn); |
| 883 |
if(that === undefined)return fn; |
| 884 |
switch(length){ |
| 885 |
case 1: return function(a){ |
| 886 |
return fn.call(that, a); |
| 887 |
}; |
| 888 |
case 2: return function(a, b){ |
| 889 |
return fn.call(that, a, b); |
| 890 |
}; |
| 891 |
case 3: return function(a, b, c){ |
| 892 |
return fn.call(that, a, b, c); |
| 893 |
}; |
| 894 |
} |
| 895 |
return function(/* ...args */){ |
| 896 |
return fn.apply(that, arguments); |
| 897 |
}; |
| 898 |
}; |
| 899 |
|
| 900 |
/***/ }), |
| 901 |
/* 22 */ |
| 902 |
/***/ (function(module, exports) { |
| 903 |
|
| 904 |
module.exports = function(it){ |
| 905 |
if(typeof it != 'function')throw TypeError(it + ' is not a function!'); |
| 906 |
return it; |
| 907 |
}; |
| 908 |
|
| 909 |
/***/ }), |
| 910 |
/* 23 */ |
| 911 |
/***/ (function(module, exports) { |
| 912 |
|
| 913 |
module.exports = function(exec){ |
| 914 |
try { |
| 915 |
return !!exec(); |
| 916 |
} catch(e){ |
| 917 |
return true; |
| 918 |
} |
| 919 |
}; |
| 920 |
|
| 921 |
/***/ }), |
| 922 |
/* 24 */ |
| 923 |
/***/ (function(module, exports, __webpack_require__) { |
| 924 |
|
| 925 |
'use strict'; |
| 926 |
|
| 927 |
var _interopRequireDefault = __webpack_require__(2)['default']; |
| 928 |
|
| 929 |
exports.__esModule = true; |
| 930 |
|
| 931 |
var _exception = __webpack_require__(5); |
| 932 |
|
| 933 |
var _exception2 = _interopRequireDefault(_exception); |
| 934 |
|
| 935 |
exports['default'] = function (instance) { |
| 936 |
instance.registerHelper('helperMissing', function () /* [args, ]options */{ |
| 937 |
if (arguments.length === 1) { |
| 938 |
// A missing field in a {{foo}} construct. |
| 939 |
return undefined; |
| 940 |
} else { |
| 941 |
// Someone is actually trying to call something, blow up. |
| 942 |
throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); |
| 943 |
} |
| 944 |
}); |
| 945 |
}; |
| 946 |
|
| 947 |
module.exports = exports['default']; |
| 948 |
|
| 949 |
/***/ }), |
| 950 |
/* 25 */ |
| 951 |
/***/ (function(module, exports, __webpack_require__) { |
| 952 |
|
| 953 |
'use strict'; |
| 954 |
|
| 955 |
var _interopRequireDefault = __webpack_require__(2)['default']; |
| 956 |
|
| 957 |
exports.__esModule = true; |
| 958 |
|
| 959 |
var _utils = __webpack_require__(4); |
| 960 |
|
| 961 |
var _exception = __webpack_require__(5); |
| 962 |
|
| 963 |
var _exception2 = _interopRequireDefault(_exception); |
| 964 |
|
| 965 |
exports['default'] = function (instance) { |
| 966 |
instance.registerHelper('if', function (conditional, options) { |
| 967 |
if (arguments.length != 2) { |
| 968 |
throw new _exception2['default']('#if requires exactly one argument'); |
| 969 |
} |
| 970 |
if (_utils.isFunction(conditional)) { |
| 971 |
conditional = conditional.call(this); |
| 972 |
} |
| 973 |
|
| 974 |
// Default behavior is to render the positive path if the value is truthy and not empty. |
| 975 |
// The `includeZero` option may be set to treat the condtional as purely not empty based on the |
| 976 |
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. |
| 977 |
if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { |
| 978 |
return options.inverse(this); |
| 979 |
} else { |
| 980 |
return options.fn(this); |
| 981 |
} |
| 982 |
}); |
| 983 |
|
| 984 |
instance.registerHelper('unless', function (conditional, options) { |
| 985 |
if (arguments.length != 2) { |
| 986 |
throw new _exception2['default']('#unless requires exactly one argument'); |
| 987 |
} |
| 988 |
return instance.helpers['if'].call(this, conditional, { |
| 989 |
fn: options.inverse, |
| 990 |
inverse: options.fn, |
| 991 |
hash: options.hash |
| 992 |
}); |
| 993 |
}); |
| 994 |
}; |
| 995 |
|
| 996 |
module.exports = exports['default']; |
| 997 |
|
| 998 |
/***/ }), |
| 999 |
/* 26 */ |
| 1000 |
/***/ (function(module, exports) { |
| 1001 |
|
| 1002 |
'use strict'; |
| 1003 |
|
| 1004 |
exports.__esModule = true; |
| 1005 |
|
| 1006 |
exports['default'] = function (instance) { |
| 1007 |
instance.registerHelper('log', function () /* message, options */{ |
| 1008 |
var args = [undefined], |
| 1009 |
options = arguments[arguments.length - 1]; |
| 1010 |
for (var i = 0; i < arguments.length - 1; i++) { |
| 1011 |
args.push(arguments[i]); |
| 1012 |
} |
| 1013 |
|
| 1014 |
var level = 1; |
| 1015 |
if (options.hash.level != null) { |
| 1016 |
level = options.hash.level; |
| 1017 |
} else if (options.data && options.data.level != null) { |
| 1018 |
level = options.data.level; |
| 1019 |
} |
| 1020 |
args[0] = level; |
| 1021 |
|
| 1022 |
instance.log.apply(instance, args); |
| 1023 |
}); |
| 1024 |
}; |
| 1025 |
|
| 1026 |
module.exports = exports['default']; |
| 1027 |
|
| 1028 |
/***/ }), |
| 1029 |
/* 27 */ |
| 1030 |
/***/ (function(module, exports) { |
| 1031 |
|
| 1032 |
'use strict'; |
| 1033 |
|
| 1034 |
exports.__esModule = true; |
| 1035 |
|
| 1036 |
exports['default'] = function (instance) { |
| 1037 |
instance.registerHelper('lookup', function (obj, field, options) { |
| 1038 |
if (!obj) { |
| 1039 |
// Note for 5.0: Change to "obj == null" in 5.0 |
| 1040 |
return obj; |
| 1041 |
} |
| 1042 |
return options.lookupProperty(obj, field); |
| 1043 |
}); |
| 1044 |
}; |
| 1045 |
|
| 1046 |
module.exports = exports['default']; |
| 1047 |
|
| 1048 |
/***/ }), |
| 1049 |
/* 28 */ |
| 1050 |
/***/ (function(module, exports, __webpack_require__) { |
| 1051 |
|
| 1052 |
'use strict'; |
| 1053 |
|
| 1054 |
var _interopRequireDefault = __webpack_require__(2)['default']; |
| 1055 |
|
| 1056 |
exports.__esModule = true; |
| 1057 |
|
| 1058 |
var _utils = __webpack_require__(4); |
| 1059 |
|
| 1060 |
var _exception = __webpack_require__(5); |
| 1061 |
|
| 1062 |
var _exception2 = _interopRequireDefault(_exception); |
| 1063 |
|
| 1064 |
exports['default'] = function (instance) { |
| 1065 |
instance.registerHelper('with', function (context, options) { |
| 1066 |
if (arguments.length != 2) { |
| 1067 |
throw new _exception2['default']('#with requires exactly one argument'); |
| 1068 |
} |
| 1069 |
if (_utils.isFunction(context)) { |
| 1070 |
context = context.call(this); |
| 1071 |
} |
| 1072 |
|
| 1073 |
var fn = options.fn; |
| 1074 |
|
| 1075 |
if (!_utils.isEmpty(context)) { |
| 1076 |
var data = options.data; |
| 1077 |
if (options.data && options.ids) { |
| 1078 |
data = _utils.createFrame(options.data); |
| 1079 |
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); |
| 1080 |
} |
| 1081 |
|
| 1082 |
return fn(context, { |
| 1083 |
data: data, |
| 1084 |
blockParams: _utils.blockParams([context], [data && data.contextPath]) |
| 1085 |
}); |
| 1086 |
} else { |
| 1087 |
return options.inverse(this); |
| 1088 |
} |
| 1089 |
}); |
| 1090 |
}; |
| 1091 |
|
| 1092 |
module.exports = exports['default']; |
| 1093 |
|
| 1094 |
/***/ }), |
| 1095 |
/* 29 */ |
| 1096 |
/***/ (function(module, exports, __webpack_require__) { |
| 1097 |
|
| 1098 |
'use strict'; |
| 1099 |
|
| 1100 |
var _interopRequireDefault = __webpack_require__(2)['default']; |
| 1101 |
|
| 1102 |
exports.__esModule = true; |
| 1103 |
exports.registerDefaultDecorators = registerDefaultDecorators; |
| 1104 |
|
| 1105 |
var _decoratorsInline = __webpack_require__(30); |
| 1106 |
|
| 1107 |
var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); |
| 1108 |
|
| 1109 |
function registerDefaultDecorators(instance) { |
| 1110 |
_decoratorsInline2['default'](instance); |
| 1111 |
} |
| 1112 |
|
| 1113 |
/***/ }), |
| 1114 |
/* 30 */ |
| 1115 |
/***/ (function(module, exports, __webpack_require__) { |
| 1116 |
|
| 1117 |
'use strict'; |
| 1118 |
|
| 1119 |
exports.__esModule = true; |
| 1120 |
|
| 1121 |
var _utils = __webpack_require__(4); |
| 1122 |
|
| 1123 |
exports['default'] = function (instance) { |
| 1124 |
instance.registerDecorator('inline', function (fn, props, container, options) { |
| 1125 |
var ret = fn; |
| 1126 |
if (!props.partials) { |
| 1127 |
props.partials = {}; |
| 1128 |
ret = function (context, options) { |
| 1129 |
// Create a new partials stack frame prior to exec. |
| 1130 |
var original = container.partials; |
| 1131 |
container.partials = _utils.extend({}, original, props.partials); |
| 1132 |
var ret = fn(context, options); |
| 1133 |
container.partials = original; |
| 1134 |
return ret; |
| 1135 |
}; |
| 1136 |
} |
| 1137 |
|
| 1138 |
props.partials[options.args[0]] = options.fn; |
| 1139 |
|
| 1140 |
return ret; |
| 1141 |
}); |
| 1142 |
}; |
| 1143 |
|
| 1144 |
module.exports = exports['default']; |
| 1145 |
|
| 1146 |
/***/ }), |
| 1147 |
/* 31 */ |
| 1148 |
/***/ (function(module, exports, __webpack_require__) { |
| 1149 |
|
| 1150 |
'use strict'; |
| 1151 |
|
| 1152 |
exports.__esModule = true; |
| 1153 |
|
| 1154 |
var _utils = __webpack_require__(4); |
| 1155 |
|
| 1156 |
var logger = { |
| 1157 |
methodMap: ['debug', 'info', 'warn', 'error'], |
| 1158 |
level: 'info', |
| 1159 |
|
| 1160 |
// Maps a given level value to the `methodMap` indexes above. |
| 1161 |
lookupLevel: function lookupLevel(level) { |
| 1162 |
if (typeof level === 'string') { |
| 1163 |
var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); |
| 1164 |
if (levelMap >= 0) { |
| 1165 |
level = levelMap; |
| 1166 |
} else { |
| 1167 |
level = parseInt(level, 10); |
| 1168 |
} |
| 1169 |
} |
| 1170 |
|
| 1171 |
return level; |
| 1172 |
}, |
| 1173 |
|
| 1174 |
// Can be overridden in the host environment |
| 1175 |
log: function log(level) { |
| 1176 |
level = logger.lookupLevel(level); |
| 1177 |
|
| 1178 |
if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { |
| 1179 |
var method = logger.methodMap[level]; |
| 1180 |
// eslint-disable-next-line no-console |
| 1181 |
if (!console[method]) { |
| 1182 |
method = 'log'; |
| 1183 |
} |
| 1184 |
|
| 1185 |
for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { |
| 1186 |
message[_key - 1] = arguments[_key]; |
| 1187 |
} |
| 1188 |
|
| 1189 |
console[method].apply(console, message); // eslint-disable-line no-console |
| 1190 |
} |
| 1191 |
} |
| 1192 |
}; |
| 1193 |
|
| 1194 |
exports['default'] = logger; |
| 1195 |
module.exports = exports['default']; |
| 1196 |
|
| 1197 |
/***/ }), |
| 1198 |
/* 32 */ |
| 1199 |
/***/ (function(module, exports, __webpack_require__) { |
| 1200 |
|
| 1201 |
'use strict'; |
| 1202 |
|
| 1203 |
var _Object$create = __webpack_require__(33)['default']; |
| 1204 |
|
| 1205 |
var _Object$keys = __webpack_require__(12)['default']; |
| 1206 |
|
| 1207 |
var _interopRequireWildcard = __webpack_require__(1)['default']; |
| 1208 |
|
| 1209 |
exports.__esModule = true; |
| 1210 |
exports.createProtoAccessControl = createProtoAccessControl; |
| 1211 |
exports.resultIsAllowed = resultIsAllowed; |
| 1212 |
exports.resetLoggedProperties = resetLoggedProperties; |
| 1213 |
|
| 1214 |
var _createNewLookupObject = __webpack_require__(35); |
| 1215 |
|
| 1216 |
var _logger = __webpack_require__(31); |
| 1217 |
|
| 1218 |
var logger = _interopRequireWildcard(_logger); |
| 1219 |
|
| 1220 |
var loggedProperties = _Object$create(null); |
| 1221 |
|
| 1222 |
function createProtoAccessControl(runtimeOptions) { |
| 1223 |
var defaultMethodWhiteList = _Object$create(null); |
| 1224 |
defaultMethodWhiteList['constructor'] = false; |
| 1225 |
defaultMethodWhiteList['__defineGetter__'] = false; |
| 1226 |
defaultMethodWhiteList['__defineSetter__'] = false; |
| 1227 |
defaultMethodWhiteList['__lookupGetter__'] = false; |
| 1228 |
|
| 1229 |
var defaultPropertyWhiteList = _Object$create(null); |
| 1230 |
// eslint-disable-next-line no-proto |
| 1231 |
defaultPropertyWhiteList['__proto__'] = false; |
| 1232 |
|
| 1233 |
return { |
| 1234 |
properties: { |
| 1235 |
whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), |
| 1236 |
defaultValue: runtimeOptions.allowProtoPropertiesByDefault |
| 1237 |
}, |
| 1238 |
methods: { |
| 1239 |
whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), |
| 1240 |
defaultValue: runtimeOptions.allowProtoMethodsByDefault |
| 1241 |
} |
| 1242 |
}; |
| 1243 |
} |
| 1244 |
|
| 1245 |
function resultIsAllowed(result, protoAccessControl, propertyName) { |
| 1246 |
if (typeof result === 'function') { |
| 1247 |
return checkWhiteList(protoAccessControl.methods, propertyName); |
| 1248 |
} else { |
| 1249 |
return checkWhiteList(protoAccessControl.properties, propertyName); |
| 1250 |
} |
| 1251 |
} |
| 1252 |
|
| 1253 |
function checkWhiteList(protoAccessControlForType, propertyName) { |
| 1254 |
if (protoAccessControlForType.whitelist[propertyName] !== undefined) { |
| 1255 |
return protoAccessControlForType.whitelist[propertyName] === true; |
| 1256 |
} |
| 1257 |
if (protoAccessControlForType.defaultValue !== undefined) { |
| 1258 |
return protoAccessControlForType.defaultValue; |
| 1259 |
} |
| 1260 |
logUnexpecedPropertyAccessOnce(propertyName); |
| 1261 |
return false; |
| 1262 |
} |
| 1263 |
|
| 1264 |
function logUnexpecedPropertyAccessOnce(propertyName) { |
| 1265 |
if (loggedProperties[propertyName] !== true) { |
| 1266 |
loggedProperties[propertyName] = true; |
| 1267 |
logger.log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); |
| 1268 |
} |
| 1269 |
} |
| 1270 |
|
| 1271 |
function resetLoggedProperties() { |
| 1272 |
_Object$keys(loggedProperties).forEach(function (propertyName) { |
| 1273 |
delete loggedProperties[propertyName]; |
| 1274 |
}); |
| 1275 |
} |
| 1276 |
|
| 1277 |
/***/ }), |
| 1278 |
/* 33 */ |
| 1279 |
/***/ (function(module, exports, __webpack_require__) { |
| 1280 |
|
| 1281 |
module.exports = { "default": __webpack_require__(34), __esModule: true }; |
| 1282 |
|
| 1283 |
/***/ }), |
| 1284 |
/* 34 */ |
| 1285 |
/***/ (function(module, exports, __webpack_require__) { |
| 1286 |
|
| 1287 |
var $ = __webpack_require__(8); |
| 1288 |
module.exports = function create(P, D){ |
| 1289 |
return $.create(P, D); |
| 1290 |
}; |
| 1291 |
|
| 1292 |
/***/ }), |
| 1293 |
/* 35 */ |
| 1294 |
/***/ (function(module, exports, __webpack_require__) { |
| 1295 |
|
| 1296 |
'use strict'; |
| 1297 |
|
| 1298 |
var _Object$create = __webpack_require__(33)['default']; |
| 1299 |
|
| 1300 |
exports.__esModule = true; |
| 1301 |
exports.createNewLookupObject = createNewLookupObject; |
| 1302 |
|
| 1303 |
var _utils = __webpack_require__(4); |
| 1304 |
|
| 1305 |
/** |
| 1306 |
* Create a new object with "null"-prototype to avoid truthy results on prototype properties. |
| 1307 |
* The resulting object can be used with "object[property]" to check if a property exists |
| 1308 |
* @param {...object} sources a varargs parameter of source objects that will be merged |
| 1309 |
* @returns {object} |
| 1310 |
*/ |
| 1311 |
|
| 1312 |
function createNewLookupObject() { |
| 1313 |
for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { |
| 1314 |
sources[_key] = arguments[_key]; |
| 1315 |
} |
| 1316 |
|
| 1317 |
return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources)); |
| 1318 |
} |
| 1319 |
|
| 1320 |
/***/ }), |
| 1321 |
/* 36 */ |
| 1322 |
/***/ (function(module, exports) { |
| 1323 |
|
| 1324 |
// Build out our basic SafeString type |
| 1325 |
'use strict'; |
| 1326 |
|
| 1327 |
exports.__esModule = true; |
| 1328 |
function SafeString(string) { |
| 1329 |
this.string = string; |
| 1330 |
} |
| 1331 |
|
| 1332 |
SafeString.prototype.toString = SafeString.prototype.toHTML = function () { |
| 1333 |
return '' + this.string; |
| 1334 |
}; |
| 1335 |
|
| 1336 |
exports['default'] = SafeString; |
| 1337 |
module.exports = exports['default']; |
| 1338 |
|
| 1339 |
/***/ }), |
| 1340 |
/* 37 */ |
| 1341 |
/***/ (function(module, exports, __webpack_require__) { |
| 1342 |
|
| 1343 |
'use strict'; |
| 1344 |
|
| 1345 |
var _Object$seal = __webpack_require__(38)['default']; |
| 1346 |
|
| 1347 |
var _Object$keys = __webpack_require__(12)['default']; |
| 1348 |
|
| 1349 |
var _interopRequireWildcard = __webpack_require__(1)['default']; |
| 1350 |
|
| 1351 |
var _interopRequireDefault = __webpack_require__(2)['default']; |
| 1352 |
|
| 1353 |
exports.__esModule = true; |
| 1354 |
exports.checkRevision = checkRevision; |
| 1355 |
exports.template = template; |
| 1356 |
exports.wrapProgram = wrapProgram; |
| 1357 |
exports.resolvePartial = resolvePartial; |
| 1358 |
exports.invokePartial = invokePartial; |
| 1359 |
exports.noop = noop; |
| 1360 |
|
| 1361 |
var _utils = __webpack_require__(4); |
| 1362 |
|
| 1363 |
var Utils = _interopRequireWildcard(_utils); |
| 1364 |
|
| 1365 |
var _exception = __webpack_require__(5); |
| 1366 |
|
| 1367 |
var _exception2 = _interopRequireDefault(_exception); |
| 1368 |
|
| 1369 |
var _base = __webpack_require__(3); |
| 1370 |
|
| 1371 |
var _helpers = __webpack_require__(9); |
| 1372 |
|
| 1373 |
var _internalWrapHelper = __webpack_require__(42); |
| 1374 |
|
| 1375 |
var _internalProtoAccess = __webpack_require__(32); |
| 1376 |
|
| 1377 |
function checkRevision(compilerInfo) { |
| 1378 |
var compilerRevision = compilerInfo && compilerInfo[0] || 1, |
| 1379 |
currentRevision = _base.COMPILER_REVISION; |
| 1380 |
|
| 1381 |
if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { |
| 1382 |
return; |
| 1383 |
} |
| 1384 |
|
| 1385 |
if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { |
| 1386 |
var runtimeVersions = _base.REVISION_CHANGES[currentRevision], |
| 1387 |
compilerVersions = _base.REVISION_CHANGES[compilerRevision]; |
| 1388 |
throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); |
| 1389 |
} else { |
| 1390 |
// Use the embedded version info since the runtime doesn't know about this revision yet |
| 1391 |
throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); |
| 1392 |
} |
| 1393 |
} |
| 1394 |
|
| 1395 |
function template(templateSpec, env) { |
| 1396 |
/* istanbul ignore next */ |
| 1397 |
if (!env) { |
| 1398 |
throw new _exception2['default']('No environment passed to template'); |
| 1399 |
} |
| 1400 |
if (!templateSpec || !templateSpec.main) { |
| 1401 |
throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); |
| 1402 |
} |
| 1403 |
|
| 1404 |
templateSpec.main.decorator = templateSpec.main_d; |
| 1405 |
|
| 1406 |
// Note: Using env.VM references rather than local var references throughout this section to allow |
| 1407 |
// for external users to override these as pseudo-supported APIs. |
| 1408 |
env.VM.checkRevision(templateSpec.compiler); |
| 1409 |
|
| 1410 |
// backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) |
| 1411 |
var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; |
| 1412 |
|
| 1413 |
function invokePartialWrapper(partial, context, options) { |
| 1414 |
if (options.hash) { |
| 1415 |
context = Utils.extend({}, context, options.hash); |
| 1416 |
if (options.ids) { |
| 1417 |
options.ids[0] = true; |
| 1418 |
} |
| 1419 |
} |
| 1420 |
partial = env.VM.resolvePartial.call(this, partial, context, options); |
| 1421 |
|
| 1422 |
var extendedOptions = Utils.extend({}, options, { |
| 1423 |
hooks: this.hooks, |
| 1424 |
protoAccessControl: this.protoAccessControl |
| 1425 |
}); |
| 1426 |
|
| 1427 |
var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); |
| 1428 |
|
| 1429 |
if (result == null && env.compile) { |
| 1430 |
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); |
| 1431 |
result = options.partials[options.name](context, extendedOptions); |
| 1432 |
} |
| 1433 |
if (result != null) { |
| 1434 |
if (options.indent) { |
| 1435 |
var lines = result.split('\n'); |
| 1436 |
for (var i = 0, l = lines.length; i < l; i++) { |
| 1437 |
if (!lines[i] && i + 1 === l) { |
| 1438 |
break; |
| 1439 |
} |
| 1440 |
|
| 1441 |
lines[i] = options.indent + lines[i]; |
| 1442 |
} |
| 1443 |
result = lines.join('\n'); |
| 1444 |
} |
| 1445 |
return result; |
| 1446 |
} else { |
| 1447 |
throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); |
| 1448 |
} |
| 1449 |
} |
| 1450 |
|
| 1451 |
// Just add water |
| 1452 |
var container = { |
| 1453 |
strict: function strict(obj, name, loc) { |
| 1454 |
if (!obj || !(name in obj)) { |
| 1455 |
throw new _exception2['default']('"' + name + '" not defined in ' + obj, { |
| 1456 |
loc: loc |
| 1457 |
}); |
| 1458 |
} |
| 1459 |
return container.lookupProperty(obj, name); |
| 1460 |
}, |
| 1461 |
lookupProperty: function lookupProperty(parent, propertyName) { |
| 1462 |
var result = parent[propertyName]; |
| 1463 |
if (result == null) { |
| 1464 |
return result; |
| 1465 |
} |
| 1466 |
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { |
| 1467 |
return result; |
| 1468 |
} |
| 1469 |
|
| 1470 |
if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { |
| 1471 |
return result; |
| 1472 |
} |
| 1473 |
return undefined; |
| 1474 |
}, |
| 1475 |
lookup: function lookup(depths, name) { |
| 1476 |
var len = depths.length; |
| 1477 |
for (var i = 0; i < len; i++) { |
| 1478 |
var result = depths[i] && container.lookupProperty(depths[i], name); |
| 1479 |
if (result != null) { |
| 1480 |
return depths[i][name]; |
| 1481 |
} |
| 1482 |
} |
| 1483 |
}, |
| 1484 |
lambda: function lambda(current, context) { |
| 1485 |
return typeof current === 'function' ? current.call(context) : current; |
| 1486 |
}, |
| 1487 |
|
| 1488 |
escapeExpression: Utils.escapeExpression, |
| 1489 |
invokePartial: invokePartialWrapper, |
| 1490 |
|
| 1491 |
fn: function fn(i) { |
| 1492 |
var ret = templateSpec[i]; |
| 1493 |
ret.decorator = templateSpec[i + '_d']; |
| 1494 |
return ret; |
| 1495 |
}, |
| 1496 |
|
| 1497 |
programs: [], |
| 1498 |
program: function program(i, data, declaredBlockParams, blockParams, depths) { |
| 1499 |
var programWrapper = this.programs[i], |
| 1500 |
fn = this.fn(i); |
| 1501 |
if (data || depths || blockParams || declaredBlockParams) { |
| 1502 |
programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); |
| 1503 |
} else if (!programWrapper) { |
| 1504 |
programWrapper = this.programs[i] = wrapProgram(this, i, fn); |
| 1505 |
} |
| 1506 |
return programWrapper; |
| 1507 |
}, |
| 1508 |
|
| 1509 |
data: function data(value, depth) { |
| 1510 |
while (value && depth--) { |
| 1511 |
value = value._parent; |
| 1512 |
} |
| 1513 |
return value; |
| 1514 |
}, |
| 1515 |
mergeIfNeeded: function mergeIfNeeded(param, common) { |
| 1516 |
var obj = param || common; |
| 1517 |
|
| 1518 |
if (param && common && param !== common) { |
| 1519 |
obj = Utils.extend({}, common, param); |
| 1520 |
} |
| 1521 |
|
| 1522 |
return obj; |
| 1523 |
}, |
| 1524 |
// An empty object to use as replacement for null-contexts |
| 1525 |
nullContext: _Object$seal({}), |
| 1526 |
|
| 1527 |
noop: env.VM.noop, |
| 1528 |
compilerInfo: templateSpec.compiler |
| 1529 |
}; |
| 1530 |
|
| 1531 |
function ret(context) { |
| 1532 |
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; |
| 1533 |
|
| 1534 |
var data = options.data; |
| 1535 |
|
| 1536 |
ret._setup(options); |
| 1537 |
if (!options.partial && templateSpec.useData) { |
| 1538 |
data = initData(context, data); |
| 1539 |
} |
| 1540 |
var depths = undefined, |
| 1541 |
blockParams = templateSpec.useBlockParams ? [] : undefined; |
| 1542 |
if (templateSpec.useDepths) { |
| 1543 |
if (options.depths) { |
| 1544 |
depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; |
| 1545 |
} else { |
| 1546 |
depths = [context]; |
| 1547 |
} |
| 1548 |
} |
| 1549 |
|
| 1550 |
function main(context /*, options*/) { |
| 1551 |
return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); |
| 1552 |
} |
| 1553 |
|
| 1554 |
main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); |
| 1555 |
return main(context, options); |
| 1556 |
} |
| 1557 |
|
| 1558 |
ret.isTop = true; |
| 1559 |
|
| 1560 |
ret._setup = function (options) { |
| 1561 |
if (!options.partial) { |
| 1562 |
var mergedHelpers = Utils.extend({}, env.helpers, options.helpers); |
| 1563 |
wrapHelpersToPassLookupProperty(mergedHelpers, container); |
| 1564 |
container.helpers = mergedHelpers; |
| 1565 |
|
| 1566 |
if (templateSpec.usePartial) { |
| 1567 |
// Use mergeIfNeeded here to prevent compiling global partials multiple times |
| 1568 |
container.partials = container.mergeIfNeeded(options.partials, env.partials); |
| 1569 |
} |
| 1570 |
if (templateSpec.usePartial || templateSpec.useDecorators) { |
| 1571 |
container.decorators = Utils.extend({}, env.decorators, options.decorators); |
| 1572 |
} |
| 1573 |
|
| 1574 |
container.hooks = {}; |
| 1575 |
container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options); |
| 1576 |
|
| 1577 |
var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; |
| 1578 |
_helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); |
| 1579 |
_helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); |
| 1580 |
} else { |
| 1581 |
container.protoAccessControl = options.protoAccessControl; // internal option |
| 1582 |
container.helpers = options.helpers; |
| 1583 |
container.partials = options.partials; |
| 1584 |
container.decorators = options.decorators; |
| 1585 |
container.hooks = options.hooks; |
| 1586 |
} |
| 1587 |
}; |
| 1588 |
|
| 1589 |
ret._child = function (i, data, blockParams, depths) { |
| 1590 |
if (templateSpec.useBlockParams && !blockParams) { |
| 1591 |
throw new _exception2['default']('must pass block params'); |
| 1592 |
} |
| 1593 |
if (templateSpec.useDepths && !depths) { |
| 1594 |
throw new _exception2['default']('must pass parent depths'); |
| 1595 |
} |
| 1596 |
|
| 1597 |
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); |
| 1598 |
}; |
| 1599 |
return ret; |
| 1600 |
} |
| 1601 |
|
| 1602 |
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { |
| 1603 |
function prog(context) { |
| 1604 |
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; |
| 1605 |
|
| 1606 |
var currentDepths = depths; |
| 1607 |
if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { |
| 1608 |
currentDepths = [context].concat(depths); |
| 1609 |
} |
| 1610 |
|
| 1611 |
return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); |
| 1612 |
} |
| 1613 |
|
| 1614 |
prog = executeDecorators(fn, prog, container, depths, data, blockParams); |
| 1615 |
|
| 1616 |
prog.program = i; |
| 1617 |
prog.depth = depths ? depths.length : 0; |
| 1618 |
prog.blockParams = declaredBlockParams || 0; |
| 1619 |
return prog; |
| 1620 |
} |
| 1621 |
|
| 1622 |
/** |
| 1623 |
* This is currently part of the official API, therefore implementation details should not be changed. |
| 1624 |
*/ |
| 1625 |
|
| 1626 |
function resolvePartial(partial, context, options) { |
| 1627 |
if (!partial) { |
| 1628 |
if (options.name === '@partial-block') { |
| 1629 |
partial = options.data['partial-block']; |
| 1630 |
} else { |
| 1631 |
partial = options.partials[options.name]; |
| 1632 |
} |
| 1633 |
} else if (!partial.call && !options.name) { |
| 1634 |
// This is a dynamic partial that returned a string |
| 1635 |
options.name = partial; |
| 1636 |
partial = options.partials[partial]; |
| 1637 |
} |
| 1638 |
return partial; |
| 1639 |
} |
| 1640 |
|
| 1641 |
function invokePartial(partial, context, options) { |
| 1642 |
// Use the current closure context to save the partial-block if this partial |
| 1643 |
var currentPartialBlock = options.data && options.data['partial-block']; |
| 1644 |
options.partial = true; |
| 1645 |
if (options.ids) { |
| 1646 |
options.data.contextPath = options.ids[0] || options.data.contextPath; |
| 1647 |
} |
| 1648 |
|
| 1649 |
var partialBlock = undefined; |
| 1650 |
if (options.fn && options.fn !== noop) { |
| 1651 |
(function () { |
| 1652 |
options.data = _base.createFrame(options.data); |
| 1653 |
// Wrapper function to get access to currentPartialBlock from the closure |
| 1654 |
var fn = options.fn; |
| 1655 |
partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { |
| 1656 |
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; |
| 1657 |
|
| 1658 |
// Restore the partial-block from the closure for the execution of the block |
| 1659 |
// i.e. the part inside the block of the partial call. |
| 1660 |
options.data = _base.createFrame(options.data); |
| 1661 |
options.data['partial-block'] = currentPartialBlock; |
| 1662 |
return fn(context, options); |
| 1663 |
}; |
| 1664 |
if (fn.partials) { |
| 1665 |
options.partials = Utils.extend({}, options.partials, fn.partials); |
| 1666 |
} |
| 1667 |
})(); |
| 1668 |
} |
| 1669 |
|
| 1670 |
if (partial === undefined && partialBlock) { |
| 1671 |
partial = partialBlock; |
| 1672 |
} |
| 1673 |
|
| 1674 |
if (partial === undefined) { |
| 1675 |
throw new _exception2['default']('The partial ' + options.name + ' could not be found'); |
| 1676 |
} else if (partial instanceof Function) { |
| 1677 |
return partial(context, options); |
| 1678 |
} |
| 1679 |
} |
| 1680 |
|
| 1681 |
function noop() { |
| 1682 |
return ''; |
| 1683 |
} |
| 1684 |
|
| 1685 |
function initData(context, data) { |
| 1686 |
if (!data || !('root' in data)) { |
| 1687 |
data = data ? _base.createFrame(data) : {}; |
| 1688 |
data.root = context; |
| 1689 |
} |
| 1690 |
return data; |
| 1691 |
} |
| 1692 |
|
| 1693 |
function executeDecorators(fn, prog, container, depths, data, blockParams) { |
| 1694 |
if (fn.decorator) { |
| 1695 |
var props = {}; |
| 1696 |
prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); |
| 1697 |
Utils.extend(prog, props); |
| 1698 |
} |
| 1699 |
return prog; |
| 1700 |
} |
| 1701 |
|
| 1702 |
function wrapHelpersToPassLookupProperty(mergedHelpers, container) { |
| 1703 |
_Object$keys(mergedHelpers).forEach(function (helperName) { |
| 1704 |
var helper = mergedHelpers[helperName]; |
| 1705 |
mergedHelpers[helperName] = passLookupPropertyOption(helper, container); |
| 1706 |
}); |
| 1707 |
} |
| 1708 |
|
| 1709 |
function passLookupPropertyOption(helper, container) { |
| 1710 |
var lookupProperty = container.lookupProperty; |
| 1711 |
return _internalWrapHelper.wrapHelper(helper, function (options) { |
| 1712 |
return Utils.extend({ lookupProperty: lookupProperty }, options); |
| 1713 |
}); |
| 1714 |
} |
| 1715 |
|
| 1716 |
/***/ }), |
| 1717 |
/* 38 */ |
| 1718 |
/***/ (function(module, exports, __webpack_require__) { |
| 1719 |
|
| 1720 |
module.exports = { "default": __webpack_require__(39), __esModule: true }; |
| 1721 |
|
| 1722 |
/***/ }), |
| 1723 |
/* 39 */ |
| 1724 |
/***/ (function(module, exports, __webpack_require__) { |
| 1725 |
|
| 1726 |
__webpack_require__(40); |
| 1727 |
module.exports = __webpack_require__(20).Object.seal; |
| 1728 |
|
| 1729 |
/***/ }), |
| 1730 |
/* 40 */ |
| 1731 |
/***/ (function(module, exports, __webpack_require__) { |
| 1732 |
|
| 1733 |
// 19.1.2.17 Object.seal(O) |
| 1734 |
var isObject = __webpack_require__(41); |
| 1735 |
|
| 1736 |
__webpack_require__(17)('seal', function($seal){ |
| 1737 |
return function seal(it){ |
| 1738 |
return $seal && isObject(it) ? $seal(it) : it; |
| 1739 |
}; |
| 1740 |
}); |
| 1741 |
|
| 1742 |
/***/ }), |
| 1743 |
/* 41 */ |
| 1744 |
/***/ (function(module, exports) { |
| 1745 |
|
| 1746 |
module.exports = function(it){ |
| 1747 |
return typeof it === 'object' ? it !== null : typeof it === 'function'; |
| 1748 |
}; |
| 1749 |
|
| 1750 |
/***/ }), |
| 1751 |
/* 42 */ |
| 1752 |
/***/ (function(module, exports) { |
| 1753 |
|
| 1754 |
'use strict'; |
| 1755 |
|
| 1756 |
exports.__esModule = true; |
| 1757 |
exports.wrapHelper = wrapHelper; |
| 1758 |
|
| 1759 |
function wrapHelper(helper, transformOptionsFn) { |
| 1760 |
if (typeof helper !== 'function') { |
| 1761 |
// This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 |
| 1762 |
// We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. |
| 1763 |
return helper; |
| 1764 |
} |
| 1765 |
var wrapper = function wrapper() /* dynamic arguments */{ |
| 1766 |
var options = arguments[arguments.length - 1]; |
| 1767 |
arguments[arguments.length - 1] = transformOptionsFn(options); |
| 1768 |
return helper.apply(this, arguments); |
| 1769 |
}; |
| 1770 |
return wrapper; |
| 1771 |
} |
| 1772 |
|
| 1773 |
/***/ }), |
| 1774 |
/* 43 */ |
| 1775 |
/***/ (function(module, exports) { |
| 1776 |
|
| 1777 |
/* WEBPACK VAR INJECTION */(function(global) {'use strict'; |
| 1778 |
|
| 1779 |
exports.__esModule = true; |
| 1780 |
|
| 1781 |
exports['default'] = function (Handlebars) { |
| 1782 |
/* istanbul ignore next */ |
| 1783 |
var root = typeof global !== 'undefined' ? global : window, |
| 1784 |
$Handlebars = root.Handlebars; |
| 1785 |
/* istanbul ignore next */ |
| 1786 |
Handlebars.noConflict = function () { |
| 1787 |
if (root.Handlebars === Handlebars) { |
| 1788 |
root.Handlebars = $Handlebars; |
| 1789 |
} |
| 1790 |
return Handlebars; |
| 1791 |
}; |
| 1792 |
}; |
| 1793 |
|
| 1794 |
module.exports = exports['default']; |
| 1795 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) |
| 1796 |
|
| 1797 |
/***/ }) |
| 1798 |
/******/ ]) |
| 1799 |
}); |
| 1800 |
; |