handlebars-source 4.0.4 → 4.0.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handlebars-source might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/handlebars.js +3663 -3663
- data/handlebars.runtime.js +584 -584
- metadata +3 -3
data/handlebars.runtime.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
|
3
|
-
handlebars v4.0.
|
3
|
+
handlebars v4.0.5
|
4
4
|
|
5
5
|
Copyright (C) 2011-2015 by Yehuda Katz
|
6
6
|
|
@@ -28,7 +28,7 @@ THE SOFTWARE.
|
|
28
28
|
if(typeof exports === 'object' && typeof module === 'object')
|
29
29
|
module.exports = factory();
|
30
30
|
else if(typeof define === 'function' && define.amd)
|
31
|
-
define(factory);
|
31
|
+
define([], factory);
|
32
32
|
else if(typeof exports === 'object')
|
33
33
|
exports["Handlebars"] = factory();
|
34
34
|
else
|
@@ -82,24 +82,24 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
82
82
|
|
83
83
|
'use strict';
|
84
84
|
|
85
|
-
var _interopRequireWildcard = __webpack_require__(
|
85
|
+
var _interopRequireWildcard = __webpack_require__(1)['default'];
|
86
86
|
|
87
|
-
var _interopRequireDefault = __webpack_require__(
|
87
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
88
88
|
|
89
89
|
exports.__esModule = true;
|
90
90
|
|
91
|
-
var _handlebarsBase = __webpack_require__(
|
91
|
+
var _handlebarsBase = __webpack_require__(3);
|
92
|
+
|
93
|
+
var base = _interopRequireWildcard(_handlebarsBase);
|
92
94
|
|
93
95
|
// Each of these augment the Handlebars object. No need to setup here.
|
94
96
|
// (This is done to easily share code between commonjs and browse envs)
|
95
97
|
|
96
|
-
var
|
97
|
-
|
98
|
-
var _handlebarsSafeString = __webpack_require__(2);
|
98
|
+
var _handlebarsSafeString = __webpack_require__(17);
|
99
99
|
|
100
100
|
var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
|
101
101
|
|
102
|
-
var _handlebarsException = __webpack_require__(
|
102
|
+
var _handlebarsException = __webpack_require__(5);
|
103
103
|
|
104
104
|
var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
|
105
105
|
|
@@ -107,16 +107,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
107
107
|
|
108
108
|
var Utils = _interopRequireWildcard(_handlebarsUtils);
|
109
109
|
|
110
|
-
var _handlebarsRuntime = __webpack_require__(
|
110
|
+
var _handlebarsRuntime = __webpack_require__(18);
|
111
111
|
|
112
112
|
var runtime = _interopRequireWildcard(_handlebarsRuntime);
|
113
113
|
|
114
|
-
var _handlebarsNoConflict = __webpack_require__(
|
115
|
-
|
116
|
-
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
114
|
+
var _handlebarsNoConflict = __webpack_require__(19);
|
117
115
|
|
118
116
|
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
119
117
|
|
118
|
+
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
120
119
|
function create() {
|
121
120
|
var hb = new base.HandlebarsEnvironment();
|
122
121
|
|
@@ -146,30 +145,69 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
146
145
|
|
147
146
|
/***/ },
|
148
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 */
|
149
187
|
/***/ function(module, exports, __webpack_require__) {
|
150
188
|
|
151
189
|
'use strict';
|
152
190
|
|
153
|
-
var _interopRequireDefault = __webpack_require__(
|
191
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
154
192
|
|
155
193
|
exports.__esModule = true;
|
156
194
|
exports.HandlebarsEnvironment = HandlebarsEnvironment;
|
157
195
|
|
158
196
|
var _utils = __webpack_require__(4);
|
159
197
|
|
160
|
-
var _exception = __webpack_require__(
|
198
|
+
var _exception = __webpack_require__(5);
|
161
199
|
|
162
200
|
var _exception2 = _interopRequireDefault(_exception);
|
163
201
|
|
164
|
-
var _helpers = __webpack_require__(
|
202
|
+
var _helpers = __webpack_require__(6);
|
165
203
|
|
166
|
-
var _decorators = __webpack_require__(
|
204
|
+
var _decorators = __webpack_require__(14);
|
167
205
|
|
168
|
-
var _logger = __webpack_require__(
|
206
|
+
var _logger = __webpack_require__(16);
|
169
207
|
|
170
208
|
var _logger2 = _interopRequireDefault(_logger);
|
171
209
|
|
172
|
-
var VERSION = '4.0.
|
210
|
+
var VERSION = '4.0.5';
|
173
211
|
exports.VERSION = VERSION;
|
174
212
|
var COMPILER_REVISION = 7;
|
175
213
|
|
@@ -251,72 +289,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
251
289
|
exports.createFrame = _utils.createFrame;
|
252
290
|
exports.logger = _logger2['default'];
|
253
291
|
|
254
|
-
/***/ },
|
255
|
-
/* 2 */
|
256
|
-
/***/ function(module, exports, __webpack_require__) {
|
257
|
-
|
258
|
-
// Build out our basic SafeString type
|
259
|
-
'use strict';
|
260
|
-
|
261
|
-
exports.__esModule = true;
|
262
|
-
function SafeString(string) {
|
263
|
-
this.string = string;
|
264
|
-
}
|
265
|
-
|
266
|
-
SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
267
|
-
return '' + this.string;
|
268
|
-
};
|
269
|
-
|
270
|
-
exports['default'] = SafeString;
|
271
|
-
module.exports = exports['default'];
|
272
|
-
|
273
|
-
/***/ },
|
274
|
-
/* 3 */
|
275
|
-
/***/ function(module, exports, __webpack_require__) {
|
276
|
-
|
277
|
-
'use strict';
|
278
|
-
|
279
|
-
exports.__esModule = true;
|
280
|
-
|
281
|
-
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
282
|
-
|
283
|
-
function Exception(message, node) {
|
284
|
-
var loc = node && node.loc,
|
285
|
-
line = undefined,
|
286
|
-
column = undefined;
|
287
|
-
if (loc) {
|
288
|
-
line = loc.start.line;
|
289
|
-
column = loc.start.column;
|
290
|
-
|
291
|
-
message += ' - ' + line + ':' + column;
|
292
|
-
}
|
293
|
-
|
294
|
-
var tmp = Error.prototype.constructor.call(this, message);
|
295
|
-
|
296
|
-
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
|
297
|
-
for (var idx = 0; idx < errorProps.length; idx++) {
|
298
|
-
this[errorProps[idx]] = tmp[errorProps[idx]];
|
299
|
-
}
|
300
|
-
|
301
|
-
/* istanbul ignore else */
|
302
|
-
if (Error.captureStackTrace) {
|
303
|
-
Error.captureStackTrace(this, Exception);
|
304
|
-
}
|
305
|
-
|
306
|
-
if (loc) {
|
307
|
-
this.lineNumber = line;
|
308
|
-
this.column = column;
|
309
|
-
}
|
310
|
-
}
|
311
|
-
|
312
|
-
Exception.prototype = new Error();
|
313
|
-
|
314
|
-
exports['default'] = Exception;
|
315
|
-
module.exports = exports['default'];
|
316
|
-
|
317
292
|
/***/ },
|
318
293
|
/* 4 */
|
319
|
-
/***/ function(module, exports
|
294
|
+
/***/ function(module, exports) {
|
320
295
|
|
321
296
|
'use strict';
|
322
297
|
|
@@ -359,10 +334,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
359
334
|
|
360
335
|
var toString = Object.prototype.toString;
|
361
336
|
|
337
|
+
exports.toString = toString;
|
362
338
|
// Sourced from lodash
|
363
339
|
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
|
364
340
|
/* eslint-disable func-style */
|
365
|
-
exports.toString = toString;
|
366
341
|
var isFunction = function isFunction(value) {
|
367
342
|
return typeof value === 'function';
|
368
343
|
};
|
@@ -382,8 +357,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
382
357
|
return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
|
383
358
|
};
|
384
359
|
|
385
|
-
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
|
386
360
|
exports.isArray = isArray;
|
361
|
+
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
|
387
362
|
|
388
363
|
function indexOf(array, value) {
|
389
364
|
for (var i = 0, len = array.length; i < len; i++) {
|
@@ -444,562 +419,180 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
444
419
|
|
445
420
|
/***/ },
|
446
421
|
/* 5 */
|
447
|
-
/***/ function(module, exports
|
422
|
+
/***/ function(module, exports) {
|
448
423
|
|
449
424
|
'use strict';
|
450
425
|
|
451
|
-
var _interopRequireWildcard = __webpack_require__(7)['default'];
|
452
|
-
|
453
|
-
var _interopRequireDefault = __webpack_require__(8)['default'];
|
454
|
-
|
455
426
|
exports.__esModule = true;
|
456
|
-
exports.checkRevision = checkRevision;
|
457
|
-
exports.template = template;
|
458
|
-
exports.wrapProgram = wrapProgram;
|
459
|
-
exports.resolvePartial = resolvePartial;
|
460
|
-
exports.invokePartial = invokePartial;
|
461
|
-
exports.noop = noop;
|
462
427
|
|
463
|
-
var
|
428
|
+
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
464
429
|
|
465
|
-
|
430
|
+
function Exception(message, node) {
|
431
|
+
var loc = node && node.loc,
|
432
|
+
line = undefined,
|
433
|
+
column = undefined;
|
434
|
+
if (loc) {
|
435
|
+
line = loc.start.line;
|
436
|
+
column = loc.start.column;
|
466
437
|
|
467
|
-
|
438
|
+
message += ' - ' + line + ':' + column;
|
439
|
+
}
|
468
440
|
|
469
|
-
|
441
|
+
var tmp = Error.prototype.constructor.call(this, message);
|
470
442
|
|
471
|
-
|
443
|
+
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
|
444
|
+
for (var idx = 0; idx < errorProps.length; idx++) {
|
445
|
+
this[errorProps[idx]] = tmp[errorProps[idx]];
|
446
|
+
}
|
472
447
|
|
473
|
-
|
474
|
-
|
475
|
-
|
448
|
+
/* istanbul ignore else */
|
449
|
+
if (Error.captureStackTrace) {
|
450
|
+
Error.captureStackTrace(this, Exception);
|
451
|
+
}
|
476
452
|
|
477
|
-
if (
|
478
|
-
|
479
|
-
|
480
|
-
compilerVersions = _base.REVISION_CHANGES[compilerRevision];
|
481
|
-
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 + ').');
|
482
|
-
} else {
|
483
|
-
// Use the embedded version info since the runtime doesn't know about this revision yet
|
484
|
-
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] + ').');
|
485
|
-
}
|
453
|
+
if (loc) {
|
454
|
+
this.lineNumber = line;
|
455
|
+
this.column = column;
|
486
456
|
}
|
487
457
|
}
|
488
458
|
|
489
|
-
|
490
|
-
/* istanbul ignore next */
|
491
|
-
if (!env) {
|
492
|
-
throw new _exception2['default']('No environment passed to template');
|
493
|
-
}
|
494
|
-
if (!templateSpec || !templateSpec.main) {
|
495
|
-
throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
|
496
|
-
}
|
459
|
+
Exception.prototype = new Error();
|
497
460
|
|
498
|
-
|
461
|
+
exports['default'] = Exception;
|
462
|
+
module.exports = exports['default'];
|
499
463
|
|
500
|
-
|
501
|
-
|
502
|
-
|
464
|
+
/***/ },
|
465
|
+
/* 6 */
|
466
|
+
/***/ function(module, exports, __webpack_require__) {
|
503
467
|
|
504
|
-
|
505
|
-
if (options.hash) {
|
506
|
-
context = Utils.extend({}, context, options.hash);
|
507
|
-
if (options.ids) {
|
508
|
-
options.ids[0] = true;
|
509
|
-
}
|
510
|
-
}
|
468
|
+
'use strict';
|
511
469
|
|
512
|
-
|
513
|
-
var result = env.VM.invokePartial.call(this, partial, context, options);
|
470
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
514
471
|
|
515
|
-
|
516
|
-
|
517
|
-
result = options.partials[options.name](context, options);
|
518
|
-
}
|
519
|
-
if (result != null) {
|
520
|
-
if (options.indent) {
|
521
|
-
var lines = result.split('\n');
|
522
|
-
for (var i = 0, l = lines.length; i < l; i++) {
|
523
|
-
if (!lines[i] && i + 1 === l) {
|
524
|
-
break;
|
525
|
-
}
|
472
|
+
exports.__esModule = true;
|
473
|
+
exports.registerDefaultHelpers = registerDefaultHelpers;
|
526
474
|
|
527
|
-
|
528
|
-
}
|
529
|
-
result = lines.join('\n');
|
530
|
-
}
|
531
|
-
return result;
|
532
|
-
} else {
|
533
|
-
throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
534
|
-
}
|
535
|
-
}
|
475
|
+
var _helpersBlockHelperMissing = __webpack_require__(7);
|
536
476
|
|
537
|
-
|
538
|
-
var container = {
|
539
|
-
strict: function strict(obj, name) {
|
540
|
-
if (!(name in obj)) {
|
541
|
-
throw new _exception2['default']('"' + name + '" not defined in ' + obj);
|
542
|
-
}
|
543
|
-
return obj[name];
|
544
|
-
},
|
545
|
-
lookup: function lookup(depths, name) {
|
546
|
-
var len = depths.length;
|
547
|
-
for (var i = 0; i < len; i++) {
|
548
|
-
if (depths[i] && depths[i][name] != null) {
|
549
|
-
return depths[i][name];
|
550
|
-
}
|
551
|
-
}
|
552
|
-
},
|
553
|
-
lambda: function lambda(current, context) {
|
554
|
-
return typeof current === 'function' ? current.call(context) : current;
|
555
|
-
},
|
477
|
+
var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
|
556
478
|
|
557
|
-
|
558
|
-
invokePartial: invokePartialWrapper,
|
479
|
+
var _helpersEach = __webpack_require__(8);
|
559
480
|
|
560
|
-
|
561
|
-
var ret = templateSpec[i];
|
562
|
-
ret.decorator = templateSpec[i + '_d'];
|
563
|
-
return ret;
|
564
|
-
},
|
481
|
+
var _helpersEach2 = _interopRequireDefault(_helpersEach);
|
565
482
|
|
566
|
-
|
567
|
-
program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
568
|
-
var programWrapper = this.programs[i],
|
569
|
-
fn = this.fn(i);
|
570
|
-
if (data || depths || blockParams || declaredBlockParams) {
|
571
|
-
programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
572
|
-
} else if (!programWrapper) {
|
573
|
-
programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
574
|
-
}
|
575
|
-
return programWrapper;
|
576
|
-
},
|
483
|
+
var _helpersHelperMissing = __webpack_require__(9);
|
577
484
|
|
578
|
-
|
579
|
-
while (value && depth--) {
|
580
|
-
value = value._parent;
|
581
|
-
}
|
582
|
-
return value;
|
583
|
-
},
|
584
|
-
merge: function merge(param, common) {
|
585
|
-
var obj = param || common;
|
485
|
+
var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
|
586
486
|
|
587
|
-
|
588
|
-
obj = Utils.extend({}, common, param);
|
589
|
-
}
|
590
|
-
|
591
|
-
return obj;
|
592
|
-
},
|
593
|
-
|
594
|
-
noop: env.VM.noop,
|
595
|
-
compilerInfo: templateSpec.compiler
|
596
|
-
};
|
597
|
-
|
598
|
-
function ret(context) {
|
599
|
-
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
600
|
-
|
601
|
-
var data = options.data;
|
602
|
-
|
603
|
-
ret._setup(options);
|
604
|
-
if (!options.partial && templateSpec.useData) {
|
605
|
-
data = initData(context, data);
|
606
|
-
}
|
607
|
-
var depths = undefined,
|
608
|
-
blockParams = templateSpec.useBlockParams ? [] : undefined;
|
609
|
-
if (templateSpec.useDepths) {
|
610
|
-
if (options.depths) {
|
611
|
-
depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths;
|
612
|
-
} else {
|
613
|
-
depths = [context];
|
614
|
-
}
|
615
|
-
}
|
616
|
-
|
617
|
-
function main(context /*, options*/) {
|
618
|
-
return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
|
619
|
-
}
|
620
|
-
main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
|
621
|
-
return main(context, options);
|
622
|
-
}
|
623
|
-
ret.isTop = true;
|
624
|
-
|
625
|
-
ret._setup = function (options) {
|
626
|
-
if (!options.partial) {
|
627
|
-
container.helpers = container.merge(options.helpers, env.helpers);
|
628
|
-
|
629
|
-
if (templateSpec.usePartial) {
|
630
|
-
container.partials = container.merge(options.partials, env.partials);
|
631
|
-
}
|
632
|
-
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
633
|
-
container.decorators = container.merge(options.decorators, env.decorators);
|
634
|
-
}
|
635
|
-
} else {
|
636
|
-
container.helpers = options.helpers;
|
637
|
-
container.partials = options.partials;
|
638
|
-
container.decorators = options.decorators;
|
639
|
-
}
|
640
|
-
};
|
641
|
-
|
642
|
-
ret._child = function (i, data, blockParams, depths) {
|
643
|
-
if (templateSpec.useBlockParams && !blockParams) {
|
644
|
-
throw new _exception2['default']('must pass block params');
|
645
|
-
}
|
646
|
-
if (templateSpec.useDepths && !depths) {
|
647
|
-
throw new _exception2['default']('must pass parent depths');
|
648
|
-
}
|
649
|
-
|
650
|
-
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
651
|
-
};
|
652
|
-
return ret;
|
653
|
-
}
|
654
|
-
|
655
|
-
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
656
|
-
function prog(context) {
|
657
|
-
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
658
|
-
|
659
|
-
var currentDepths = depths;
|
660
|
-
if (depths && context !== depths[0]) {
|
661
|
-
currentDepths = [context].concat(depths);
|
662
|
-
}
|
663
|
-
|
664
|
-
return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
|
665
|
-
}
|
666
|
-
|
667
|
-
prog = executeDecorators(fn, prog, container, depths, data, blockParams);
|
668
|
-
|
669
|
-
prog.program = i;
|
670
|
-
prog.depth = depths ? depths.length : 0;
|
671
|
-
prog.blockParams = declaredBlockParams || 0;
|
672
|
-
return prog;
|
673
|
-
}
|
674
|
-
|
675
|
-
function resolvePartial(partial, context, options) {
|
676
|
-
if (!partial) {
|
677
|
-
if (options.name === '@partial-block') {
|
678
|
-
partial = options.data['partial-block'];
|
679
|
-
} else {
|
680
|
-
partial = options.partials[options.name];
|
681
|
-
}
|
682
|
-
} else if (!partial.call && !options.name) {
|
683
|
-
// This is a dynamic partial that returned a string
|
684
|
-
options.name = partial;
|
685
|
-
partial = options.partials[partial];
|
686
|
-
}
|
687
|
-
return partial;
|
688
|
-
}
|
487
|
+
var _helpersIf = __webpack_require__(10);
|
689
488
|
|
690
|
-
|
691
|
-
options.partial = true;
|
692
|
-
if (options.ids) {
|
693
|
-
options.data.contextPath = options.ids[0] || options.data.contextPath;
|
694
|
-
}
|
489
|
+
var _helpersIf2 = _interopRequireDefault(_helpersIf);
|
695
490
|
|
696
|
-
|
697
|
-
if (options.fn && options.fn !== noop) {
|
698
|
-
options.data = _base.createFrame(options.data);
|
699
|
-
partialBlock = options.data['partial-block'] = options.fn;
|
491
|
+
var _helpersLog = __webpack_require__(11);
|
700
492
|
|
701
|
-
|
702
|
-
options.partials = Utils.extend({}, options.partials, partialBlock.partials);
|
703
|
-
}
|
704
|
-
}
|
493
|
+
var _helpersLog2 = _interopRequireDefault(_helpersLog);
|
705
494
|
|
706
|
-
|
707
|
-
partial = partialBlock;
|
708
|
-
}
|
495
|
+
var _helpersLookup = __webpack_require__(12);
|
709
496
|
|
710
|
-
|
711
|
-
throw new _exception2['default']('The partial ' + options.name + ' could not be found');
|
712
|
-
} else if (partial instanceof Function) {
|
713
|
-
return partial(context, options);
|
714
|
-
}
|
715
|
-
}
|
497
|
+
var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
|
716
498
|
|
717
|
-
|
718
|
-
return '';
|
719
|
-
}
|
499
|
+
var _helpersWith = __webpack_require__(13);
|
720
500
|
|
721
|
-
|
722
|
-
if (!data || !('root' in data)) {
|
723
|
-
data = data ? _base.createFrame(data) : {};
|
724
|
-
data.root = context;
|
725
|
-
}
|
726
|
-
return data;
|
727
|
-
}
|
501
|
+
var _helpersWith2 = _interopRequireDefault(_helpersWith);
|
728
502
|
|
729
|
-
function
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
503
|
+
function registerDefaultHelpers(instance) {
|
504
|
+
_helpersBlockHelperMissing2['default'](instance);
|
505
|
+
_helpersEach2['default'](instance);
|
506
|
+
_helpersHelperMissing2['default'](instance);
|
507
|
+
_helpersIf2['default'](instance);
|
508
|
+
_helpersLog2['default'](instance);
|
509
|
+
_helpersLookup2['default'](instance);
|
510
|
+
_helpersWith2['default'](instance);
|
736
511
|
}
|
737
512
|
|
738
513
|
/***/ },
|
739
|
-
/*
|
514
|
+
/* 7 */
|
740
515
|
/***/ function(module, exports, __webpack_require__) {
|
741
516
|
|
742
|
-
/* WEBPACK VAR INJECTION */(function(global) {/* global window */
|
743
517
|
'use strict';
|
744
518
|
|
745
519
|
exports.__esModule = true;
|
746
520
|
|
747
|
-
|
748
|
-
/* istanbul ignore next */
|
749
|
-
var root = typeof global !== 'undefined' ? global : window,
|
750
|
-
$Handlebars = root.Handlebars;
|
751
|
-
/* istanbul ignore next */
|
752
|
-
Handlebars.noConflict = function () {
|
753
|
-
if (root.Handlebars === Handlebars) {
|
754
|
-
root.Handlebars = $Handlebars;
|
755
|
-
}
|
756
|
-
};
|
757
|
-
};
|
758
|
-
|
759
|
-
module.exports = exports['default'];
|
760
|
-
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
761
|
-
|
762
|
-
/***/ },
|
763
|
-
/* 7 */
|
764
|
-
/***/ function(module, exports, __webpack_require__) {
|
521
|
+
var _utils = __webpack_require__(4);
|
765
522
|
|
766
|
-
|
523
|
+
exports['default'] = function (instance) {
|
524
|
+
instance.registerHelper('blockHelperMissing', function (context, options) {
|
525
|
+
var inverse = options.inverse,
|
526
|
+
fn = options.fn;
|
767
527
|
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
528
|
+
if (context === true) {
|
529
|
+
return fn(this);
|
530
|
+
} else if (context === false || context == null) {
|
531
|
+
return inverse(this);
|
532
|
+
} else if (_utils.isArray(context)) {
|
533
|
+
if (context.length > 0) {
|
534
|
+
if (options.ids) {
|
535
|
+
options.ids = [options.name];
|
536
|
+
}
|
773
537
|
|
774
|
-
|
775
|
-
|
776
|
-
|
538
|
+
return instance.helpers.each(context, options);
|
539
|
+
} else {
|
540
|
+
return inverse(this);
|
541
|
+
}
|
542
|
+
} else {
|
543
|
+
if (options.data && options.ids) {
|
544
|
+
var data = _utils.createFrame(options.data);
|
545
|
+
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
|
546
|
+
options = { data: data };
|
777
547
|
}
|
778
|
-
}
|
779
548
|
|
780
|
-
|
781
|
-
|
782
|
-
}
|
549
|
+
return fn(context, options);
|
550
|
+
}
|
551
|
+
});
|
783
552
|
};
|
784
553
|
|
785
|
-
exports
|
554
|
+
module.exports = exports['default'];
|
786
555
|
|
787
556
|
/***/ },
|
788
557
|
/* 8 */
|
789
|
-
/***/ function(module, exports, __webpack_require__) {
|
790
|
-
|
791
|
-
"use strict";
|
792
|
-
|
793
|
-
exports["default"] = function (obj) {
|
794
|
-
return obj && obj.__esModule ? obj : {
|
795
|
-
"default": obj
|
796
|
-
};
|
797
|
-
};
|
798
|
-
|
799
|
-
exports.__esModule = true;
|
800
|
-
|
801
|
-
/***/ },
|
802
|
-
/* 9 */
|
803
558
|
/***/ function(module, exports, __webpack_require__) {
|
804
559
|
|
805
560
|
'use strict';
|
806
561
|
|
807
|
-
var _interopRequireDefault = __webpack_require__(
|
562
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
808
563
|
|
809
564
|
exports.__esModule = true;
|
810
|
-
exports.registerDefaultHelpers = registerDefaultHelpers;
|
811
565
|
|
812
|
-
var
|
566
|
+
var _utils = __webpack_require__(4);
|
813
567
|
|
814
|
-
var
|
568
|
+
var _exception = __webpack_require__(5);
|
815
569
|
|
816
|
-
var
|
570
|
+
var _exception2 = _interopRequireDefault(_exception);
|
817
571
|
|
818
|
-
|
572
|
+
exports['default'] = function (instance) {
|
573
|
+
instance.registerHelper('each', function (context, options) {
|
574
|
+
if (!options) {
|
575
|
+
throw new _exception2['default']('Must pass iterator to #each');
|
576
|
+
}
|
819
577
|
|
820
|
-
|
578
|
+
var fn = options.fn,
|
579
|
+
inverse = options.inverse,
|
580
|
+
i = 0,
|
581
|
+
ret = '',
|
582
|
+
data = undefined,
|
583
|
+
contextPath = undefined;
|
821
584
|
|
822
|
-
|
585
|
+
if (options.data && options.ids) {
|
586
|
+
contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
587
|
+
}
|
823
588
|
|
824
|
-
|
589
|
+
if (_utils.isFunction(context)) {
|
590
|
+
context = context.call(this);
|
591
|
+
}
|
825
592
|
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
var _helpersLog2 = _interopRequireDefault(_helpersLog);
|
831
|
-
|
832
|
-
var _helpersLookup = __webpack_require__(17);
|
833
|
-
|
834
|
-
var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
|
835
|
-
|
836
|
-
var _helpersWith = __webpack_require__(18);
|
837
|
-
|
838
|
-
var _helpersWith2 = _interopRequireDefault(_helpersWith);
|
839
|
-
|
840
|
-
function registerDefaultHelpers(instance) {
|
841
|
-
_helpersBlockHelperMissing2['default'](instance);
|
842
|
-
_helpersEach2['default'](instance);
|
843
|
-
_helpersHelperMissing2['default'](instance);
|
844
|
-
_helpersIf2['default'](instance);
|
845
|
-
_helpersLog2['default'](instance);
|
846
|
-
_helpersLookup2['default'](instance);
|
847
|
-
_helpersWith2['default'](instance);
|
848
|
-
}
|
849
|
-
|
850
|
-
/***/ },
|
851
|
-
/* 10 */
|
852
|
-
/***/ function(module, exports, __webpack_require__) {
|
853
|
-
|
854
|
-
'use strict';
|
855
|
-
|
856
|
-
var _interopRequireDefault = __webpack_require__(8)['default'];
|
857
|
-
|
858
|
-
exports.__esModule = true;
|
859
|
-
exports.registerDefaultDecorators = registerDefaultDecorators;
|
860
|
-
|
861
|
-
var _decoratorsInline = __webpack_require__(19);
|
862
|
-
|
863
|
-
var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
|
864
|
-
|
865
|
-
function registerDefaultDecorators(instance) {
|
866
|
-
_decoratorsInline2['default'](instance);
|
867
|
-
}
|
868
|
-
|
869
|
-
/***/ },
|
870
|
-
/* 11 */
|
871
|
-
/***/ function(module, exports, __webpack_require__) {
|
872
|
-
|
873
|
-
'use strict';
|
874
|
-
|
875
|
-
exports.__esModule = true;
|
876
|
-
|
877
|
-
var _utils = __webpack_require__(4);
|
878
|
-
|
879
|
-
var logger = {
|
880
|
-
methodMap: ['debug', 'info', 'warn', 'error'],
|
881
|
-
level: 'info',
|
882
|
-
|
883
|
-
// Maps a given level value to the `methodMap` indexes above.
|
884
|
-
lookupLevel: function lookupLevel(level) {
|
885
|
-
if (typeof level === 'string') {
|
886
|
-
var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
|
887
|
-
if (levelMap >= 0) {
|
888
|
-
level = levelMap;
|
889
|
-
} else {
|
890
|
-
level = parseInt(level, 10);
|
891
|
-
}
|
892
|
-
}
|
893
|
-
|
894
|
-
return level;
|
895
|
-
},
|
896
|
-
|
897
|
-
// Can be overridden in the host environment
|
898
|
-
log: function log(level) {
|
899
|
-
level = logger.lookupLevel(level);
|
900
|
-
|
901
|
-
if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
|
902
|
-
var method = logger.methodMap[level];
|
903
|
-
if (!console[method]) {
|
904
|
-
// eslint-disable-line no-console
|
905
|
-
method = 'log';
|
906
|
-
}
|
907
|
-
|
908
|
-
for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
909
|
-
message[_key - 1] = arguments[_key];
|
910
|
-
}
|
911
|
-
|
912
|
-
console[method].apply(console, message); // eslint-disable-line no-console
|
913
|
-
}
|
914
|
-
}
|
915
|
-
};
|
916
|
-
|
917
|
-
exports['default'] = logger;
|
918
|
-
module.exports = exports['default'];
|
919
|
-
|
920
|
-
/***/ },
|
921
|
-
/* 12 */
|
922
|
-
/***/ function(module, exports, __webpack_require__) {
|
923
|
-
|
924
|
-
'use strict';
|
925
|
-
|
926
|
-
exports.__esModule = true;
|
927
|
-
|
928
|
-
var _utils = __webpack_require__(4);
|
929
|
-
|
930
|
-
exports['default'] = function (instance) {
|
931
|
-
instance.registerHelper('blockHelperMissing', function (context, options) {
|
932
|
-
var inverse = options.inverse,
|
933
|
-
fn = options.fn;
|
934
|
-
|
935
|
-
if (context === true) {
|
936
|
-
return fn(this);
|
937
|
-
} else if (context === false || context == null) {
|
938
|
-
return inverse(this);
|
939
|
-
} else if (_utils.isArray(context)) {
|
940
|
-
if (context.length > 0) {
|
941
|
-
if (options.ids) {
|
942
|
-
options.ids = [options.name];
|
943
|
-
}
|
944
|
-
|
945
|
-
return instance.helpers.each(context, options);
|
946
|
-
} else {
|
947
|
-
return inverse(this);
|
948
|
-
}
|
949
|
-
} else {
|
950
|
-
if (options.data && options.ids) {
|
951
|
-
var data = _utils.createFrame(options.data);
|
952
|
-
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
|
953
|
-
options = { data: data };
|
954
|
-
}
|
955
|
-
|
956
|
-
return fn(context, options);
|
957
|
-
}
|
958
|
-
});
|
959
|
-
};
|
960
|
-
|
961
|
-
module.exports = exports['default'];
|
962
|
-
|
963
|
-
/***/ },
|
964
|
-
/* 13 */
|
965
|
-
/***/ function(module, exports, __webpack_require__) {
|
966
|
-
|
967
|
-
'use strict';
|
968
|
-
|
969
|
-
var _interopRequireDefault = __webpack_require__(8)['default'];
|
970
|
-
|
971
|
-
exports.__esModule = true;
|
972
|
-
|
973
|
-
var _utils = __webpack_require__(4);
|
974
|
-
|
975
|
-
var _exception = __webpack_require__(3);
|
976
|
-
|
977
|
-
var _exception2 = _interopRequireDefault(_exception);
|
978
|
-
|
979
|
-
exports['default'] = function (instance) {
|
980
|
-
instance.registerHelper('each', function (context, options) {
|
981
|
-
if (!options) {
|
982
|
-
throw new _exception2['default']('Must pass iterator to #each');
|
983
|
-
}
|
984
|
-
|
985
|
-
var fn = options.fn,
|
986
|
-
inverse = options.inverse,
|
987
|
-
i = 0,
|
988
|
-
ret = '',
|
989
|
-
data = undefined,
|
990
|
-
contextPath = undefined;
|
991
|
-
|
992
|
-
if (options.data && options.ids) {
|
993
|
-
contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
994
|
-
}
|
995
|
-
|
996
|
-
if (_utils.isFunction(context)) {
|
997
|
-
context = context.call(this);
|
998
|
-
}
|
999
|
-
|
1000
|
-
if (options.data) {
|
1001
|
-
data = _utils.createFrame(options.data);
|
1002
|
-
}
|
593
|
+
if (options.data) {
|
594
|
+
data = _utils.createFrame(options.data);
|
595
|
+
}
|
1003
596
|
|
1004
597
|
function execIteration(field, index, last) {
|
1005
598
|
if (data) {
|
@@ -1058,16 +651,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1058
651
|
module.exports = exports['default'];
|
1059
652
|
|
1060
653
|
/***/ },
|
1061
|
-
/*
|
654
|
+
/* 9 */
|
1062
655
|
/***/ function(module, exports, __webpack_require__) {
|
1063
656
|
|
1064
657
|
'use strict';
|
1065
658
|
|
1066
|
-
var _interopRequireDefault = __webpack_require__(
|
659
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
1067
660
|
|
1068
661
|
exports.__esModule = true;
|
1069
662
|
|
1070
|
-
var _exception = __webpack_require__(
|
663
|
+
var _exception = __webpack_require__(5);
|
1071
664
|
|
1072
665
|
var _exception2 = _interopRequireDefault(_exception);
|
1073
666
|
|
@@ -1086,7 +679,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1086
679
|
module.exports = exports['default'];
|
1087
680
|
|
1088
681
|
/***/ },
|
1089
|
-
/*
|
682
|
+
/* 10 */
|
1090
683
|
/***/ function(module, exports, __webpack_require__) {
|
1091
684
|
|
1092
685
|
'use strict';
|
@@ -1119,8 +712,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1119
712
|
module.exports = exports['default'];
|
1120
713
|
|
1121
714
|
/***/ },
|
1122
|
-
/*
|
1123
|
-
/***/ function(module, exports
|
715
|
+
/* 11 */
|
716
|
+
/***/ function(module, exports) {
|
1124
717
|
|
1125
718
|
'use strict';
|
1126
719
|
|
@@ -1149,8 +742,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1149
742
|
module.exports = exports['default'];
|
1150
743
|
|
1151
744
|
/***/ },
|
1152
|
-
/*
|
1153
|
-
/***/ function(module, exports
|
745
|
+
/* 12 */
|
746
|
+
/***/ function(module, exports) {
|
1154
747
|
|
1155
748
|
'use strict';
|
1156
749
|
|
@@ -1165,7 +758,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1165
758
|
module.exports = exports['default'];
|
1166
759
|
|
1167
760
|
/***/ },
|
1168
|
-
/*
|
761
|
+
/* 13 */
|
1169
762
|
/***/ function(module, exports, __webpack_require__) {
|
1170
763
|
|
1171
764
|
'use strict';
|
@@ -1202,7 +795,26 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1202
795
|
module.exports = exports['default'];
|
1203
796
|
|
1204
797
|
/***/ },
|
1205
|
-
/*
|
798
|
+
/* 14 */
|
799
|
+
/***/ function(module, exports, __webpack_require__) {
|
800
|
+
|
801
|
+
'use strict';
|
802
|
+
|
803
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
804
|
+
|
805
|
+
exports.__esModule = true;
|
806
|
+
exports.registerDefaultDecorators = registerDefaultDecorators;
|
807
|
+
|
808
|
+
var _decoratorsInline = __webpack_require__(15);
|
809
|
+
|
810
|
+
var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
|
811
|
+
|
812
|
+
function registerDefaultDecorators(instance) {
|
813
|
+
_decoratorsInline2['default'](instance);
|
814
|
+
}
|
815
|
+
|
816
|
+
/***/ },
|
817
|
+
/* 15 */
|
1206
818
|
/***/ function(module, exports, __webpack_require__) {
|
1207
819
|
|
1208
820
|
'use strict';
|
@@ -1234,6 +846,394 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1234
846
|
|
1235
847
|
module.exports = exports['default'];
|
1236
848
|
|
849
|
+
/***/ },
|
850
|
+
/* 16 */
|
851
|
+
/***/ function(module, exports, __webpack_require__) {
|
852
|
+
|
853
|
+
'use strict';
|
854
|
+
|
855
|
+
exports.__esModule = true;
|
856
|
+
|
857
|
+
var _utils = __webpack_require__(4);
|
858
|
+
|
859
|
+
var logger = {
|
860
|
+
methodMap: ['debug', 'info', 'warn', 'error'],
|
861
|
+
level: 'info',
|
862
|
+
|
863
|
+
// Maps a given level value to the `methodMap` indexes above.
|
864
|
+
lookupLevel: function lookupLevel(level) {
|
865
|
+
if (typeof level === 'string') {
|
866
|
+
var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
|
867
|
+
if (levelMap >= 0) {
|
868
|
+
level = levelMap;
|
869
|
+
} else {
|
870
|
+
level = parseInt(level, 10);
|
871
|
+
}
|
872
|
+
}
|
873
|
+
|
874
|
+
return level;
|
875
|
+
},
|
876
|
+
|
877
|
+
// Can be overridden in the host environment
|
878
|
+
log: function log(level) {
|
879
|
+
level = logger.lookupLevel(level);
|
880
|
+
|
881
|
+
if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
|
882
|
+
var method = logger.methodMap[level];
|
883
|
+
if (!console[method]) {
|
884
|
+
// eslint-disable-line no-console
|
885
|
+
method = 'log';
|
886
|
+
}
|
887
|
+
|
888
|
+
for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
889
|
+
message[_key - 1] = arguments[_key];
|
890
|
+
}
|
891
|
+
|
892
|
+
console[method].apply(console, message); // eslint-disable-line no-console
|
893
|
+
}
|
894
|
+
}
|
895
|
+
};
|
896
|
+
|
897
|
+
exports['default'] = logger;
|
898
|
+
module.exports = exports['default'];
|
899
|
+
|
900
|
+
/***/ },
|
901
|
+
/* 17 */
|
902
|
+
/***/ function(module, exports) {
|
903
|
+
|
904
|
+
// Build out our basic SafeString type
|
905
|
+
'use strict';
|
906
|
+
|
907
|
+
exports.__esModule = true;
|
908
|
+
function SafeString(string) {
|
909
|
+
this.string = string;
|
910
|
+
}
|
911
|
+
|
912
|
+
SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
913
|
+
return '' + this.string;
|
914
|
+
};
|
915
|
+
|
916
|
+
exports['default'] = SafeString;
|
917
|
+
module.exports = exports['default'];
|
918
|
+
|
919
|
+
/***/ },
|
920
|
+
/* 18 */
|
921
|
+
/***/ function(module, exports, __webpack_require__) {
|
922
|
+
|
923
|
+
'use strict';
|
924
|
+
|
925
|
+
var _interopRequireWildcard = __webpack_require__(1)['default'];
|
926
|
+
|
927
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
928
|
+
|
929
|
+
exports.__esModule = true;
|
930
|
+
exports.checkRevision = checkRevision;
|
931
|
+
exports.template = template;
|
932
|
+
exports.wrapProgram = wrapProgram;
|
933
|
+
exports.resolvePartial = resolvePartial;
|
934
|
+
exports.invokePartial = invokePartial;
|
935
|
+
exports.noop = noop;
|
936
|
+
|
937
|
+
var _utils = __webpack_require__(4);
|
938
|
+
|
939
|
+
var Utils = _interopRequireWildcard(_utils);
|
940
|
+
|
941
|
+
var _exception = __webpack_require__(5);
|
942
|
+
|
943
|
+
var _exception2 = _interopRequireDefault(_exception);
|
944
|
+
|
945
|
+
var _base = __webpack_require__(3);
|
946
|
+
|
947
|
+
function checkRevision(compilerInfo) {
|
948
|
+
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
949
|
+
currentRevision = _base.COMPILER_REVISION;
|
950
|
+
|
951
|
+
if (compilerRevision !== currentRevision) {
|
952
|
+
if (compilerRevision < currentRevision) {
|
953
|
+
var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
|
954
|
+
compilerVersions = _base.REVISION_CHANGES[compilerRevision];
|
955
|
+
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 + ').');
|
956
|
+
} else {
|
957
|
+
// Use the embedded version info since the runtime doesn't know about this revision yet
|
958
|
+
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] + ').');
|
959
|
+
}
|
960
|
+
}
|
961
|
+
}
|
962
|
+
|
963
|
+
function template(templateSpec, env) {
|
964
|
+
/* istanbul ignore next */
|
965
|
+
if (!env) {
|
966
|
+
throw new _exception2['default']('No environment passed to template');
|
967
|
+
}
|
968
|
+
if (!templateSpec || !templateSpec.main) {
|
969
|
+
throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
|
970
|
+
}
|
971
|
+
|
972
|
+
templateSpec.main.decorator = templateSpec.main_d;
|
973
|
+
|
974
|
+
// Note: Using env.VM references rather than local var references throughout this section to allow
|
975
|
+
// for external users to override these as psuedo-supported APIs.
|
976
|
+
env.VM.checkRevision(templateSpec.compiler);
|
977
|
+
|
978
|
+
function invokePartialWrapper(partial, context, options) {
|
979
|
+
if (options.hash) {
|
980
|
+
context = Utils.extend({}, context, options.hash);
|
981
|
+
if (options.ids) {
|
982
|
+
options.ids[0] = true;
|
983
|
+
}
|
984
|
+
}
|
985
|
+
|
986
|
+
partial = env.VM.resolvePartial.call(this, partial, context, options);
|
987
|
+
var result = env.VM.invokePartial.call(this, partial, context, options);
|
988
|
+
|
989
|
+
if (result == null && env.compile) {
|
990
|
+
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
991
|
+
result = options.partials[options.name](context, options);
|
992
|
+
}
|
993
|
+
if (result != null) {
|
994
|
+
if (options.indent) {
|
995
|
+
var lines = result.split('\n');
|
996
|
+
for (var i = 0, l = lines.length; i < l; i++) {
|
997
|
+
if (!lines[i] && i + 1 === l) {
|
998
|
+
break;
|
999
|
+
}
|
1000
|
+
|
1001
|
+
lines[i] = options.indent + lines[i];
|
1002
|
+
}
|
1003
|
+
result = lines.join('\n');
|
1004
|
+
}
|
1005
|
+
return result;
|
1006
|
+
} else {
|
1007
|
+
throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
1008
|
+
}
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
// Just add water
|
1012
|
+
var container = {
|
1013
|
+
strict: function strict(obj, name) {
|
1014
|
+
if (!(name in obj)) {
|
1015
|
+
throw new _exception2['default']('"' + name + '" not defined in ' + obj);
|
1016
|
+
}
|
1017
|
+
return obj[name];
|
1018
|
+
},
|
1019
|
+
lookup: function lookup(depths, name) {
|
1020
|
+
var len = depths.length;
|
1021
|
+
for (var i = 0; i < len; i++) {
|
1022
|
+
if (depths[i] && depths[i][name] != null) {
|
1023
|
+
return depths[i][name];
|
1024
|
+
}
|
1025
|
+
}
|
1026
|
+
},
|
1027
|
+
lambda: function lambda(current, context) {
|
1028
|
+
return typeof current === 'function' ? current.call(context) : current;
|
1029
|
+
},
|
1030
|
+
|
1031
|
+
escapeExpression: Utils.escapeExpression,
|
1032
|
+
invokePartial: invokePartialWrapper,
|
1033
|
+
|
1034
|
+
fn: function fn(i) {
|
1035
|
+
var ret = templateSpec[i];
|
1036
|
+
ret.decorator = templateSpec[i + '_d'];
|
1037
|
+
return ret;
|
1038
|
+
},
|
1039
|
+
|
1040
|
+
programs: [],
|
1041
|
+
program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
1042
|
+
var programWrapper = this.programs[i],
|
1043
|
+
fn = this.fn(i);
|
1044
|
+
if (data || depths || blockParams || declaredBlockParams) {
|
1045
|
+
programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
1046
|
+
} else if (!programWrapper) {
|
1047
|
+
programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
1048
|
+
}
|
1049
|
+
return programWrapper;
|
1050
|
+
},
|
1051
|
+
|
1052
|
+
data: function data(value, depth) {
|
1053
|
+
while (value && depth--) {
|
1054
|
+
value = value._parent;
|
1055
|
+
}
|
1056
|
+
return value;
|
1057
|
+
},
|
1058
|
+
merge: function merge(param, common) {
|
1059
|
+
var obj = param || common;
|
1060
|
+
|
1061
|
+
if (param && common && param !== common) {
|
1062
|
+
obj = Utils.extend({}, common, param);
|
1063
|
+
}
|
1064
|
+
|
1065
|
+
return obj;
|
1066
|
+
},
|
1067
|
+
|
1068
|
+
noop: env.VM.noop,
|
1069
|
+
compilerInfo: templateSpec.compiler
|
1070
|
+
};
|
1071
|
+
|
1072
|
+
function ret(context) {
|
1073
|
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
1074
|
+
|
1075
|
+
var data = options.data;
|
1076
|
+
|
1077
|
+
ret._setup(options);
|
1078
|
+
if (!options.partial && templateSpec.useData) {
|
1079
|
+
data = initData(context, data);
|
1080
|
+
}
|
1081
|
+
var depths = undefined,
|
1082
|
+
blockParams = templateSpec.useBlockParams ? [] : undefined;
|
1083
|
+
if (templateSpec.useDepths) {
|
1084
|
+
if (options.depths) {
|
1085
|
+
depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths;
|
1086
|
+
} else {
|
1087
|
+
depths = [context];
|
1088
|
+
}
|
1089
|
+
}
|
1090
|
+
|
1091
|
+
function main(context /*, options*/) {
|
1092
|
+
return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
|
1093
|
+
}
|
1094
|
+
main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
|
1095
|
+
return main(context, options);
|
1096
|
+
}
|
1097
|
+
ret.isTop = true;
|
1098
|
+
|
1099
|
+
ret._setup = function (options) {
|
1100
|
+
if (!options.partial) {
|
1101
|
+
container.helpers = container.merge(options.helpers, env.helpers);
|
1102
|
+
|
1103
|
+
if (templateSpec.usePartial) {
|
1104
|
+
container.partials = container.merge(options.partials, env.partials);
|
1105
|
+
}
|
1106
|
+
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
1107
|
+
container.decorators = container.merge(options.decorators, env.decorators);
|
1108
|
+
}
|
1109
|
+
} else {
|
1110
|
+
container.helpers = options.helpers;
|
1111
|
+
container.partials = options.partials;
|
1112
|
+
container.decorators = options.decorators;
|
1113
|
+
}
|
1114
|
+
};
|
1115
|
+
|
1116
|
+
ret._child = function (i, data, blockParams, depths) {
|
1117
|
+
if (templateSpec.useBlockParams && !blockParams) {
|
1118
|
+
throw new _exception2['default']('must pass block params');
|
1119
|
+
}
|
1120
|
+
if (templateSpec.useDepths && !depths) {
|
1121
|
+
throw new _exception2['default']('must pass parent depths');
|
1122
|
+
}
|
1123
|
+
|
1124
|
+
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
1125
|
+
};
|
1126
|
+
return ret;
|
1127
|
+
}
|
1128
|
+
|
1129
|
+
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
1130
|
+
function prog(context) {
|
1131
|
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
1132
|
+
|
1133
|
+
var currentDepths = depths;
|
1134
|
+
if (depths && context !== depths[0]) {
|
1135
|
+
currentDepths = [context].concat(depths);
|
1136
|
+
}
|
1137
|
+
|
1138
|
+
return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
|
1139
|
+
}
|
1140
|
+
|
1141
|
+
prog = executeDecorators(fn, prog, container, depths, data, blockParams);
|
1142
|
+
|
1143
|
+
prog.program = i;
|
1144
|
+
prog.depth = depths ? depths.length : 0;
|
1145
|
+
prog.blockParams = declaredBlockParams || 0;
|
1146
|
+
return prog;
|
1147
|
+
}
|
1148
|
+
|
1149
|
+
function resolvePartial(partial, context, options) {
|
1150
|
+
if (!partial) {
|
1151
|
+
if (options.name === '@partial-block') {
|
1152
|
+
partial = options.data['partial-block'];
|
1153
|
+
} else {
|
1154
|
+
partial = options.partials[options.name];
|
1155
|
+
}
|
1156
|
+
} else if (!partial.call && !options.name) {
|
1157
|
+
// This is a dynamic partial that returned a string
|
1158
|
+
options.name = partial;
|
1159
|
+
partial = options.partials[partial];
|
1160
|
+
}
|
1161
|
+
return partial;
|
1162
|
+
}
|
1163
|
+
|
1164
|
+
function invokePartial(partial, context, options) {
|
1165
|
+
options.partial = true;
|
1166
|
+
if (options.ids) {
|
1167
|
+
options.data.contextPath = options.ids[0] || options.data.contextPath;
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
var partialBlock = undefined;
|
1171
|
+
if (options.fn && options.fn !== noop) {
|
1172
|
+
options.data = _base.createFrame(options.data);
|
1173
|
+
partialBlock = options.data['partial-block'] = options.fn;
|
1174
|
+
|
1175
|
+
if (partialBlock.partials) {
|
1176
|
+
options.partials = Utils.extend({}, options.partials, partialBlock.partials);
|
1177
|
+
}
|
1178
|
+
}
|
1179
|
+
|
1180
|
+
if (partial === undefined && partialBlock) {
|
1181
|
+
partial = partialBlock;
|
1182
|
+
}
|
1183
|
+
|
1184
|
+
if (partial === undefined) {
|
1185
|
+
throw new _exception2['default']('The partial ' + options.name + ' could not be found');
|
1186
|
+
} else if (partial instanceof Function) {
|
1187
|
+
return partial(context, options);
|
1188
|
+
}
|
1189
|
+
}
|
1190
|
+
|
1191
|
+
function noop() {
|
1192
|
+
return '';
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
function initData(context, data) {
|
1196
|
+
if (!data || !('root' in data)) {
|
1197
|
+
data = data ? _base.createFrame(data) : {};
|
1198
|
+
data.root = context;
|
1199
|
+
}
|
1200
|
+
return data;
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
function executeDecorators(fn, prog, container, depths, data, blockParams) {
|
1204
|
+
if (fn.decorator) {
|
1205
|
+
var props = {};
|
1206
|
+
prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
|
1207
|
+
Utils.extend(prog, props);
|
1208
|
+
}
|
1209
|
+
return prog;
|
1210
|
+
}
|
1211
|
+
|
1212
|
+
/***/ },
|
1213
|
+
/* 19 */
|
1214
|
+
/***/ function(module, exports) {
|
1215
|
+
|
1216
|
+
/* WEBPACK VAR INJECTION */(function(global) {/* global window */
|
1217
|
+
'use strict';
|
1218
|
+
|
1219
|
+
exports.__esModule = true;
|
1220
|
+
|
1221
|
+
exports['default'] = function (Handlebars) {
|
1222
|
+
/* istanbul ignore next */
|
1223
|
+
var root = typeof global !== 'undefined' ? global : window,
|
1224
|
+
$Handlebars = root.Handlebars;
|
1225
|
+
/* istanbul ignore next */
|
1226
|
+
Handlebars.noConflict = function () {
|
1227
|
+
if (root.Handlebars === Handlebars) {
|
1228
|
+
root.Handlebars = $Handlebars;
|
1229
|
+
}
|
1230
|
+
return Handlebars;
|
1231
|
+
};
|
1232
|
+
};
|
1233
|
+
|
1234
|
+
module.exports = exports['default'];
|
1235
|
+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
1236
|
+
|
1237
1237
|
/***/ }
|
1238
1238
|
/******/ ])
|
1239
1239
|
});
|