handlebars_assets 0.20.2 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/handlebars_assets.gemspec +1 -1
- data/lib/handlebars_assets/version.rb +1 -1
- data/vendor/assets/javascripts/handlebars.js +4580 -3722
- data/vendor/assets/javascripts/handlebars.runtime.js +1215 -702
- metadata +3 -2
@@ -1,8 +1,8 @@
|
|
1
1
|
/*!
|
2
2
|
|
3
|
-
handlebars
|
3
|
+
handlebars v4.0.2
|
4
4
|
|
5
|
-
Copyright (C) 2011-
|
5
|
+
Copyright (C) 2011-2015 by Yehuda Katz
|
6
6
|
|
7
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -24,703 +24,1216 @@ THE SOFTWARE.
|
|
24
24
|
|
25
25
|
@license
|
26
26
|
*/
|
27
|
-
|
28
|
-
(
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
}(this, function
|
37
|
-
//
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
var
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
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__(17);
|
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__(18);
|
111
|
+
|
112
|
+
var runtime = _interopRequireWildcard(_handlebarsRuntime);
|
113
|
+
|
114
|
+
var _handlebarsNoConflict = __webpack_require__(19);
|
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__(6);
|
203
|
+
|
204
|
+
var _decorators = __webpack_require__(14);
|
205
|
+
|
206
|
+
var _logger = __webpack_require__(16);
|
207
|
+
|
208
|
+
var _logger2 = _interopRequireDefault(_logger);
|
209
|
+
|
210
|
+
var VERSION = '4.0.2';
|
211
|
+
exports.VERSION = VERSION;
|
212
|
+
var COMPILER_REVISION = 7;
|
213
|
+
|
214
|
+
exports.COMPILER_REVISION = COMPILER_REVISION;
|
215
|
+
var REVISION_CHANGES = {
|
216
|
+
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
|
217
|
+
2: '== 1.0.0-rc.3',
|
218
|
+
3: '== 1.0.0-rc.4',
|
219
|
+
4: '== 1.x.x',
|
220
|
+
5: '== 2.0.0-alpha.x',
|
221
|
+
6: '>= 2.0.0-beta.1',
|
222
|
+
7: '>= 4.0.0'
|
223
|
+
};
|
224
|
+
|
225
|
+
exports.REVISION_CHANGES = REVISION_CHANGES;
|
226
|
+
var objectType = '[object Object]';
|
227
|
+
|
228
|
+
function HandlebarsEnvironment(helpers, partials, decorators) {
|
229
|
+
this.helpers = helpers || {};
|
230
|
+
this.partials = partials || {};
|
231
|
+
this.decorators = decorators || {};
|
232
|
+
|
233
|
+
_helpers.registerDefaultHelpers(this);
|
234
|
+
_decorators.registerDefaultDecorators(this);
|
235
|
+
}
|
236
|
+
|
237
|
+
HandlebarsEnvironment.prototype = {
|
238
|
+
constructor: HandlebarsEnvironment,
|
239
|
+
|
240
|
+
logger: _logger2['default'],
|
241
|
+
log: _logger2['default'].log,
|
242
|
+
|
243
|
+
registerHelper: function registerHelper(name, fn) {
|
244
|
+
if (_utils.toString.call(name) === objectType) {
|
245
|
+
if (fn) {
|
246
|
+
throw new _exception2['default']('Arg not supported with multiple helpers');
|
247
|
+
}
|
248
|
+
_utils.extend(this.helpers, name);
|
249
|
+
} else {
|
250
|
+
this.helpers[name] = fn;
|
251
|
+
}
|
252
|
+
},
|
253
|
+
unregisterHelper: function unregisterHelper(name) {
|
254
|
+
delete this.helpers[name];
|
255
|
+
},
|
256
|
+
|
257
|
+
registerPartial: function registerPartial(name, partial) {
|
258
|
+
if (_utils.toString.call(name) === objectType) {
|
259
|
+
_utils.extend(this.partials, name);
|
260
|
+
} else {
|
261
|
+
if (typeof partial === 'undefined') {
|
262
|
+
throw new _exception2['default']('Attempting to register a partial as undefined');
|
263
|
+
}
|
264
|
+
this.partials[name] = partial;
|
265
|
+
}
|
266
|
+
},
|
267
|
+
unregisterPartial: function unregisterPartial(name) {
|
268
|
+
delete this.partials[name];
|
269
|
+
},
|
270
|
+
|
271
|
+
registerDecorator: function registerDecorator(name, fn) {
|
272
|
+
if (_utils.toString.call(name) === objectType) {
|
273
|
+
if (fn) {
|
274
|
+
throw new _exception2['default']('Arg not supported with multiple decorators');
|
275
|
+
}
|
276
|
+
_utils.extend(this.decorators, name);
|
277
|
+
} else {
|
278
|
+
this.decorators[name] = fn;
|
279
|
+
}
|
280
|
+
},
|
281
|
+
unregisterDecorator: function unregisterDecorator(name) {
|
282
|
+
delete this.decorators[name];
|
283
|
+
}
|
284
|
+
};
|
285
|
+
|
286
|
+
var log = _logger2['default'].log;
|
287
|
+
|
288
|
+
exports.log = log;
|
289
|
+
exports.createFrame = _utils.createFrame;
|
290
|
+
exports.logger = _logger2['default'];
|
291
|
+
|
292
|
+
/***/ },
|
293
|
+
/* 4 */
|
294
|
+
/***/ function(module, exports) {
|
295
|
+
|
296
|
+
'use strict';
|
297
|
+
|
298
|
+
exports.__esModule = true;
|
299
|
+
exports.extend = extend;
|
300
|
+
exports.indexOf = indexOf;
|
301
|
+
exports.escapeExpression = escapeExpression;
|
302
|
+
exports.isEmpty = isEmpty;
|
303
|
+
exports.createFrame = createFrame;
|
304
|
+
exports.blockParams = blockParams;
|
305
|
+
exports.appendContextPath = appendContextPath;
|
306
|
+
var escape = {
|
307
|
+
'&': '&',
|
308
|
+
'<': '<',
|
309
|
+
'>': '>',
|
310
|
+
'"': '"',
|
311
|
+
"'": ''',
|
312
|
+
'`': '`',
|
313
|
+
'=': '='
|
314
|
+
};
|
315
|
+
|
316
|
+
var badChars = /[&<>"'`=]/g,
|
317
|
+
possible = /[&<>"'`=]/;
|
318
|
+
|
319
|
+
function escapeChar(chr) {
|
320
|
+
return escape[chr];
|
321
|
+
}
|
322
|
+
|
323
|
+
function extend(obj /* , ...source */) {
|
324
|
+
for (var i = 1; i < arguments.length; i++) {
|
325
|
+
for (var key in arguments[i]) {
|
326
|
+
if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
|
327
|
+
obj[key] = arguments[i][key];
|
328
|
+
}
|
329
|
+
}
|
330
|
+
}
|
331
|
+
|
332
|
+
return obj;
|
333
|
+
}
|
334
|
+
|
335
|
+
var toString = Object.prototype.toString;
|
336
|
+
|
337
|
+
exports.toString = toString;
|
338
|
+
// Sourced from lodash
|
339
|
+
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
|
340
|
+
/* eslint-disable func-style */
|
341
|
+
var isFunction = function isFunction(value) {
|
342
|
+
return typeof value === 'function';
|
343
|
+
};
|
344
|
+
// fallback for older versions of Chrome and Safari
|
345
|
+
/* istanbul ignore next */
|
346
|
+
if (isFunction(/x/)) {
|
347
|
+
exports.isFunction = isFunction = function (value) {
|
348
|
+
return typeof value === 'function' && toString.call(value) === '[object Function]';
|
349
|
+
};
|
350
|
+
}
|
351
|
+
exports.isFunction = isFunction;
|
352
|
+
|
353
|
+
/* eslint-enable func-style */
|
354
|
+
|
355
|
+
/* istanbul ignore next */
|
356
|
+
var isArray = Array.isArray || function (value) {
|
357
|
+
return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
|
358
|
+
};
|
359
|
+
|
360
|
+
exports.isArray = isArray;
|
361
|
+
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
|
362
|
+
|
363
|
+
function indexOf(array, value) {
|
364
|
+
for (var i = 0, len = array.length; i < len; i++) {
|
365
|
+
if (array[i] === value) {
|
366
|
+
return i;
|
367
|
+
}
|
368
|
+
}
|
369
|
+
return -1;
|
370
|
+
}
|
371
|
+
|
372
|
+
function escapeExpression(string) {
|
373
|
+
if (typeof string !== 'string') {
|
374
|
+
// don't escape SafeStrings, since they're already safe
|
375
|
+
if (string && string.toHTML) {
|
376
|
+
return string.toHTML();
|
377
|
+
} else if (string == null) {
|
378
|
+
return '';
|
379
|
+
} else if (!string) {
|
380
|
+
return string + '';
|
381
|
+
}
|
382
|
+
|
383
|
+
// Force a string conversion as this will be done by the append regardless and
|
384
|
+
// the regex test will do this transparently behind the scenes, causing issues if
|
385
|
+
// an object's to string has escaped characters in it.
|
386
|
+
string = '' + string;
|
387
|
+
}
|
388
|
+
|
389
|
+
if (!possible.test(string)) {
|
390
|
+
return string;
|
391
|
+
}
|
392
|
+
return string.replace(badChars, escapeChar);
|
393
|
+
}
|
394
|
+
|
395
|
+
function isEmpty(value) {
|
396
|
+
if (!value && value !== 0) {
|
397
|
+
return true;
|
398
|
+
} else if (isArray(value) && value.length === 0) {
|
399
|
+
return true;
|
400
|
+
} else {
|
401
|
+
return false;
|
402
|
+
}
|
403
|
+
}
|
404
|
+
|
405
|
+
function createFrame(object) {
|
406
|
+
var frame = extend({}, object);
|
407
|
+
frame._parent = object;
|
408
|
+
return frame;
|
409
|
+
}
|
410
|
+
|
411
|
+
function blockParams(params, ids) {
|
412
|
+
params.path = ids;
|
413
|
+
return params;
|
414
|
+
}
|
415
|
+
|
416
|
+
function appendContextPath(contextPath, id) {
|
417
|
+
return (contextPath ? contextPath + '.' : '') + id;
|
418
|
+
}
|
419
|
+
|
420
|
+
/***/ },
|
421
|
+
/* 5 */
|
422
|
+
/***/ function(module, exports) {
|
423
|
+
|
424
|
+
'use strict';
|
425
|
+
|
426
|
+
exports.__esModule = true;
|
427
|
+
|
428
|
+
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
429
|
+
|
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;
|
437
|
+
|
438
|
+
message += ' - ' + line + ':' + column;
|
439
|
+
}
|
440
|
+
|
441
|
+
var tmp = Error.prototype.constructor.call(this, message);
|
442
|
+
|
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
|
+
}
|
447
|
+
|
448
|
+
/* istanbul ignore else */
|
449
|
+
if (Error.captureStackTrace) {
|
450
|
+
Error.captureStackTrace(this, Exception);
|
451
|
+
}
|
452
|
+
|
453
|
+
if (loc) {
|
454
|
+
this.lineNumber = line;
|
455
|
+
this.column = column;
|
456
|
+
}
|
457
|
+
}
|
458
|
+
|
459
|
+
Exception.prototype = new Error();
|
460
|
+
|
461
|
+
exports['default'] = Exception;
|
462
|
+
module.exports = exports['default'];
|
463
|
+
|
464
|
+
/***/ },
|
465
|
+
/* 6 */
|
466
|
+
/***/ function(module, exports, __webpack_require__) {
|
467
|
+
|
468
|
+
'use strict';
|
469
|
+
|
470
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
471
|
+
|
472
|
+
exports.__esModule = true;
|
473
|
+
exports.registerDefaultHelpers = registerDefaultHelpers;
|
474
|
+
|
475
|
+
var _helpersBlockHelperMissing = __webpack_require__(7);
|
476
|
+
|
477
|
+
var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
|
478
|
+
|
479
|
+
var _helpersEach = __webpack_require__(8);
|
480
|
+
|
481
|
+
var _helpersEach2 = _interopRequireDefault(_helpersEach);
|
482
|
+
|
483
|
+
var _helpersHelperMissing = __webpack_require__(9);
|
484
|
+
|
485
|
+
var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
|
486
|
+
|
487
|
+
var _helpersIf = __webpack_require__(10);
|
488
|
+
|
489
|
+
var _helpersIf2 = _interopRequireDefault(_helpersIf);
|
490
|
+
|
491
|
+
var _helpersLog = __webpack_require__(11);
|
492
|
+
|
493
|
+
var _helpersLog2 = _interopRequireDefault(_helpersLog);
|
494
|
+
|
495
|
+
var _helpersLookup = __webpack_require__(12);
|
496
|
+
|
497
|
+
var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
|
498
|
+
|
499
|
+
var _helpersWith = __webpack_require__(13);
|
500
|
+
|
501
|
+
var _helpersWith2 = _interopRequireDefault(_helpersWith);
|
502
|
+
|
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);
|
511
|
+
}
|
512
|
+
|
513
|
+
/***/ },
|
514
|
+
/* 7 */
|
515
|
+
/***/ function(module, exports, __webpack_require__) {
|
516
|
+
|
517
|
+
'use strict';
|
518
|
+
|
519
|
+
exports.__esModule = true;
|
520
|
+
|
521
|
+
var _utils = __webpack_require__(4);
|
522
|
+
|
523
|
+
exports['default'] = function (instance) {
|
524
|
+
instance.registerHelper('blockHelperMissing', function (context, options) {
|
525
|
+
var inverse = options.inverse,
|
526
|
+
fn = options.fn;
|
527
|
+
|
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
|
+
}
|
537
|
+
|
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 };
|
547
|
+
}
|
548
|
+
|
549
|
+
return fn(context, options);
|
550
|
+
}
|
551
|
+
});
|
552
|
+
};
|
553
|
+
|
554
|
+
module.exports = exports['default'];
|
555
|
+
|
556
|
+
/***/ },
|
557
|
+
/* 8 */
|
558
|
+
/***/ function(module, exports, __webpack_require__) {
|
559
|
+
|
560
|
+
'use strict';
|
561
|
+
|
562
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
563
|
+
|
564
|
+
exports.__esModule = true;
|
565
|
+
|
566
|
+
var _utils = __webpack_require__(4);
|
567
|
+
|
568
|
+
var _exception = __webpack_require__(5);
|
569
|
+
|
570
|
+
var _exception2 = _interopRequireDefault(_exception);
|
571
|
+
|
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
|
+
}
|
577
|
+
|
578
|
+
var fn = options.fn,
|
579
|
+
inverse = options.inverse,
|
580
|
+
i = 0,
|
581
|
+
ret = '',
|
582
|
+
data = undefined,
|
583
|
+
contextPath = undefined;
|
584
|
+
|
585
|
+
if (options.data && options.ids) {
|
586
|
+
contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
587
|
+
}
|
588
|
+
|
589
|
+
if (_utils.isFunction(context)) {
|
590
|
+
context = context.call(this);
|
591
|
+
}
|
592
|
+
|
593
|
+
if (options.data) {
|
594
|
+
data = _utils.createFrame(options.data);
|
595
|
+
}
|
596
|
+
|
597
|
+
function execIteration(field, index, last) {
|
598
|
+
// Don't iterate over undefined values since we can't execute blocks against them
|
599
|
+
// in non-strict (js) mode.
|
600
|
+
if (context[field] == null) {
|
601
|
+
return;
|
602
|
+
}
|
603
|
+
|
604
|
+
if (data) {
|
605
|
+
data.key = field;
|
606
|
+
data.index = index;
|
607
|
+
data.first = index === 0;
|
608
|
+
data.last = !!last;
|
609
|
+
|
610
|
+
if (contextPath) {
|
611
|
+
data.contextPath = contextPath + field;
|
612
|
+
}
|
613
|
+
}
|
614
|
+
|
615
|
+
ret = ret + fn(context[field], {
|
616
|
+
data: data,
|
617
|
+
blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
|
618
|
+
});
|
619
|
+
}
|
620
|
+
|
621
|
+
if (context && typeof context === 'object') {
|
622
|
+
if (_utils.isArray(context)) {
|
623
|
+
for (var j = context.length; i < j; i++) {
|
624
|
+
execIteration(i, i, i === context.length - 1);
|
625
|
+
}
|
626
|
+
} else {
|
627
|
+
var priorKey = undefined;
|
628
|
+
|
629
|
+
for (var key in context) {
|
630
|
+
if (context.hasOwnProperty(key)) {
|
631
|
+
// We're running the iterations one step out of sync so we can detect
|
632
|
+
// the last iteration without have to scan the object twice and create
|
633
|
+
// an itermediate keys array.
|
634
|
+
if (priorKey !== undefined) {
|
635
|
+
execIteration(priorKey, i - 1);
|
636
|
+
}
|
637
|
+
priorKey = key;
|
638
|
+
i++;
|
639
|
+
}
|
640
|
+
}
|
641
|
+
if (priorKey !== undefined) {
|
642
|
+
execIteration(priorKey, i - 1, true);
|
643
|
+
}
|
644
|
+
}
|
645
|
+
}
|
646
|
+
|
647
|
+
if (i === 0) {
|
648
|
+
ret = inverse(this);
|
649
|
+
}
|
650
|
+
|
651
|
+
return ret;
|
652
|
+
});
|
653
|
+
};
|
654
|
+
|
655
|
+
module.exports = exports['default'];
|
656
|
+
|
657
|
+
/***/ },
|
658
|
+
/* 9 */
|
659
|
+
/***/ function(module, exports, __webpack_require__) {
|
660
|
+
|
661
|
+
'use strict';
|
662
|
+
|
663
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
664
|
+
|
665
|
+
exports.__esModule = true;
|
666
|
+
|
667
|
+
var _exception = __webpack_require__(5);
|
668
|
+
|
669
|
+
var _exception2 = _interopRequireDefault(_exception);
|
670
|
+
|
671
|
+
exports['default'] = function (instance) {
|
672
|
+
instance.registerHelper('helperMissing', function () /* [args, ]options */{
|
673
|
+
if (arguments.length === 1) {
|
674
|
+
// A missing field in a {{foo}} construct.
|
675
|
+
return undefined;
|
676
|
+
} else {
|
677
|
+
// Someone is actually trying to call something, blow up.
|
678
|
+
throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
679
|
+
}
|
680
|
+
});
|
681
|
+
};
|
682
|
+
|
683
|
+
module.exports = exports['default'];
|
684
|
+
|
685
|
+
/***/ },
|
686
|
+
/* 10 */
|
687
|
+
/***/ function(module, exports, __webpack_require__) {
|
688
|
+
|
689
|
+
'use strict';
|
690
|
+
|
691
|
+
exports.__esModule = true;
|
692
|
+
|
693
|
+
var _utils = __webpack_require__(4);
|
694
|
+
|
695
|
+
exports['default'] = function (instance) {
|
696
|
+
instance.registerHelper('if', function (conditional, options) {
|
697
|
+
if (_utils.isFunction(conditional)) {
|
698
|
+
conditional = conditional.call(this);
|
699
|
+
}
|
700
|
+
|
701
|
+
// Default behavior is to render the positive path if the value is truthy and not empty.
|
702
|
+
// The `includeZero` option may be set to treat the condtional as purely not empty based on the
|
703
|
+
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
|
704
|
+
if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
|
705
|
+
return options.inverse(this);
|
706
|
+
} else {
|
707
|
+
return options.fn(this);
|
708
|
+
}
|
709
|
+
});
|
710
|
+
|
711
|
+
instance.registerHelper('unless', function (conditional, options) {
|
712
|
+
return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
|
713
|
+
});
|
714
|
+
};
|
715
|
+
|
716
|
+
module.exports = exports['default'];
|
717
|
+
|
718
|
+
/***/ },
|
719
|
+
/* 11 */
|
720
|
+
/***/ function(module, exports) {
|
721
|
+
|
722
|
+
'use strict';
|
723
|
+
|
724
|
+
exports.__esModule = true;
|
725
|
+
|
726
|
+
exports['default'] = function (instance) {
|
727
|
+
instance.registerHelper('log', function () /* message, options */{
|
728
|
+
var args = [undefined],
|
729
|
+
options = arguments[arguments.length - 1];
|
730
|
+
for (var i = 0; i < arguments.length - 1; i++) {
|
731
|
+
args.push(arguments[i]);
|
732
|
+
}
|
733
|
+
|
734
|
+
var level = 1;
|
735
|
+
if (options.hash.level != null) {
|
736
|
+
level = options.hash.level;
|
737
|
+
} else if (options.data && options.data.level != null) {
|
738
|
+
level = options.data.level;
|
739
|
+
}
|
740
|
+
args[0] = level;
|
741
|
+
|
742
|
+
instance.log.apply(instance, args);
|
743
|
+
});
|
744
|
+
};
|
745
|
+
|
746
|
+
module.exports = exports['default'];
|
747
|
+
|
748
|
+
/***/ },
|
749
|
+
/* 12 */
|
750
|
+
/***/ function(module, exports) {
|
751
|
+
|
752
|
+
'use strict';
|
753
|
+
|
754
|
+
exports.__esModule = true;
|
755
|
+
|
756
|
+
exports['default'] = function (instance) {
|
757
|
+
instance.registerHelper('lookup', function (obj, field) {
|
758
|
+
return obj && obj[field];
|
759
|
+
});
|
760
|
+
};
|
761
|
+
|
762
|
+
module.exports = exports['default'];
|
763
|
+
|
764
|
+
/***/ },
|
765
|
+
/* 13 */
|
766
|
+
/***/ function(module, exports, __webpack_require__) {
|
767
|
+
|
768
|
+
'use strict';
|
769
|
+
|
770
|
+
exports.__esModule = true;
|
771
|
+
|
772
|
+
var _utils = __webpack_require__(4);
|
773
|
+
|
774
|
+
exports['default'] = function (instance) {
|
775
|
+
instance.registerHelper('with', function (context, options) {
|
776
|
+
if (_utils.isFunction(context)) {
|
777
|
+
context = context.call(this);
|
778
|
+
}
|
779
|
+
|
780
|
+
var fn = options.fn;
|
781
|
+
|
782
|
+
if (!_utils.isEmpty(context)) {
|
783
|
+
var data = options.data;
|
784
|
+
if (options.data && options.ids) {
|
785
|
+
data = _utils.createFrame(options.data);
|
786
|
+
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
|
787
|
+
}
|
788
|
+
|
789
|
+
return fn(context, {
|
790
|
+
data: data,
|
791
|
+
blockParams: _utils.blockParams([context], [data && data.contextPath])
|
792
|
+
});
|
793
|
+
} else {
|
794
|
+
return options.inverse(this);
|
795
|
+
}
|
796
|
+
});
|
797
|
+
};
|
798
|
+
|
799
|
+
module.exports = exports['default'];
|
800
|
+
|
801
|
+
/***/ },
|
802
|
+
/* 14 */
|
803
|
+
/***/ function(module, exports, __webpack_require__) {
|
804
|
+
|
805
|
+
'use strict';
|
806
|
+
|
807
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
808
|
+
|
809
|
+
exports.__esModule = true;
|
810
|
+
exports.registerDefaultDecorators = registerDefaultDecorators;
|
811
|
+
|
812
|
+
var _decoratorsInline = __webpack_require__(15);
|
813
|
+
|
814
|
+
var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
|
815
|
+
|
816
|
+
function registerDefaultDecorators(instance) {
|
817
|
+
_decoratorsInline2['default'](instance);
|
818
|
+
}
|
819
|
+
|
820
|
+
/***/ },
|
821
|
+
/* 15 */
|
822
|
+
/***/ function(module, exports, __webpack_require__) {
|
823
|
+
|
824
|
+
'use strict';
|
825
|
+
|
826
|
+
exports.__esModule = true;
|
827
|
+
|
828
|
+
var _utils = __webpack_require__(4);
|
829
|
+
|
830
|
+
exports['default'] = function (instance) {
|
831
|
+
instance.registerDecorator('inline', function (fn, props, container, options) {
|
832
|
+
var ret = fn;
|
833
|
+
if (!props.partials) {
|
834
|
+
props.partials = {};
|
835
|
+
ret = function (context, options) {
|
836
|
+
// Create a new partials stack frame prior to exec.
|
837
|
+
var original = container.partials;
|
838
|
+
container.partials = _utils.extend({}, original, props.partials);
|
839
|
+
var ret = fn(context, options);
|
840
|
+
container.partials = original;
|
841
|
+
return ret;
|
842
|
+
};
|
843
|
+
}
|
844
|
+
|
845
|
+
props.partials[options.args[0]] = options.fn;
|
846
|
+
|
847
|
+
return ret;
|
848
|
+
});
|
849
|
+
};
|
850
|
+
|
851
|
+
module.exports = exports['default'];
|
852
|
+
|
853
|
+
/***/ },
|
854
|
+
/* 16 */
|
855
|
+
/***/ function(module, exports) {
|
856
|
+
|
857
|
+
'use strict';
|
858
|
+
|
859
|
+
exports.__esModule = true;
|
860
|
+
var logger = {
|
861
|
+
methodMap: ['debug', 'info', 'warn', 'error'],
|
862
|
+
level: 'info',
|
863
|
+
|
864
|
+
// Maps a given level value to the `methodMap` indexes above.
|
865
|
+
lookupLevel: function lookupLevel(level) {
|
866
|
+
if (typeof level === 'string') {
|
867
|
+
var levelMap = logger.methodMap.indexOf(level.toLowerCase());
|
868
|
+
if (levelMap >= 0) {
|
869
|
+
level = levelMap;
|
870
|
+
} else {
|
871
|
+
level = parseInt(level, 10);
|
872
|
+
}
|
873
|
+
}
|
874
|
+
|
875
|
+
return level;
|
876
|
+
},
|
877
|
+
|
878
|
+
// Can be overridden in the host environment
|
879
|
+
log: function log(level) {
|
880
|
+
level = logger.lookupLevel(level);
|
881
|
+
|
882
|
+
if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
|
883
|
+
var method = logger.methodMap[level];
|
884
|
+
if (!console[method]) {
|
885
|
+
// eslint-disable-line no-console
|
886
|
+
method = 'log';
|
887
|
+
}
|
888
|
+
|
889
|
+
for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
890
|
+
message[_key - 1] = arguments[_key];
|
891
|
+
}
|
892
|
+
|
893
|
+
console[method].apply(console, message); // eslint-disable-line no-console
|
894
|
+
}
|
895
|
+
}
|
896
|
+
};
|
897
|
+
|
898
|
+
exports['default'] = logger;
|
899
|
+
module.exports = exports['default'];
|
900
|
+
|
901
|
+
/***/ },
|
902
|
+
/* 17 */
|
903
|
+
/***/ function(module, exports) {
|
904
|
+
|
905
|
+
// Build out our basic SafeString type
|
906
|
+
'use strict';
|
907
|
+
|
908
|
+
exports.__esModule = true;
|
909
|
+
function SafeString(string) {
|
910
|
+
this.string = string;
|
911
|
+
}
|
912
|
+
|
913
|
+
SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
914
|
+
return '' + this.string;
|
915
|
+
};
|
916
|
+
|
917
|
+
exports['default'] = SafeString;
|
918
|
+
module.exports = exports['default'];
|
919
|
+
|
920
|
+
/***/ },
|
921
|
+
/* 18 */
|
922
|
+
/***/ function(module, exports, __webpack_require__) {
|
923
|
+
|
924
|
+
'use strict';
|
925
|
+
|
926
|
+
var _interopRequireWildcard = __webpack_require__(1)['default'];
|
927
|
+
|
928
|
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
929
|
+
|
930
|
+
exports.__esModule = true;
|
931
|
+
exports.checkRevision = checkRevision;
|
932
|
+
exports.template = template;
|
933
|
+
exports.wrapProgram = wrapProgram;
|
934
|
+
exports.resolvePartial = resolvePartial;
|
935
|
+
exports.invokePartial = invokePartial;
|
936
|
+
exports.noop = noop;
|
937
|
+
|
938
|
+
var _utils = __webpack_require__(4);
|
939
|
+
|
940
|
+
var Utils = _interopRequireWildcard(_utils);
|
941
|
+
|
942
|
+
var _exception = __webpack_require__(5);
|
943
|
+
|
944
|
+
var _exception2 = _interopRequireDefault(_exception);
|
945
|
+
|
946
|
+
var _base = __webpack_require__(3);
|
947
|
+
|
948
|
+
function checkRevision(compilerInfo) {
|
949
|
+
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
950
|
+
currentRevision = _base.COMPILER_REVISION;
|
951
|
+
|
952
|
+
if (compilerRevision !== currentRevision) {
|
953
|
+
if (compilerRevision < currentRevision) {
|
954
|
+
var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
|
955
|
+
compilerVersions = _base.REVISION_CHANGES[compilerRevision];
|
956
|
+
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 + ').');
|
957
|
+
} else {
|
958
|
+
// Use the embedded version info since the runtime doesn't know about this revision yet
|
959
|
+
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] + ').');
|
960
|
+
}
|
961
|
+
}
|
962
|
+
}
|
963
|
+
|
964
|
+
function template(templateSpec, env) {
|
965
|
+
/* istanbul ignore next */
|
966
|
+
if (!env) {
|
967
|
+
throw new _exception2['default']('No environment passed to template');
|
968
|
+
}
|
969
|
+
if (!templateSpec || !templateSpec.main) {
|
970
|
+
throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
|
971
|
+
}
|
972
|
+
|
973
|
+
templateSpec.main.decorator = templateSpec.main_d;
|
974
|
+
|
975
|
+
// Note: Using env.VM references rather than local var references throughout this section to allow
|
976
|
+
// for external users to override these as psuedo-supported APIs.
|
977
|
+
env.VM.checkRevision(templateSpec.compiler);
|
978
|
+
|
979
|
+
function invokePartialWrapper(partial, context, options) {
|
980
|
+
if (options.hash) {
|
981
|
+
context = Utils.extend({}, context, options.hash);
|
982
|
+
if (options.ids) {
|
983
|
+
options.ids[0] = true;
|
984
|
+
}
|
985
|
+
}
|
986
|
+
|
987
|
+
partial = env.VM.resolvePartial.call(this, partial, context, options);
|
988
|
+
var result = env.VM.invokePartial.call(this, partial, context, options);
|
989
|
+
|
990
|
+
if (result == null && env.compile) {
|
991
|
+
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
992
|
+
result = options.partials[options.name](context, options);
|
993
|
+
}
|
994
|
+
if (result != null) {
|
995
|
+
if (options.indent) {
|
996
|
+
var lines = result.split('\n');
|
997
|
+
for (var i = 0, l = lines.length; i < l; i++) {
|
998
|
+
if (!lines[i] && i + 1 === l) {
|
999
|
+
break;
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
lines[i] = options.indent + lines[i];
|
1003
|
+
}
|
1004
|
+
result = lines.join('\n');
|
1005
|
+
}
|
1006
|
+
return result;
|
1007
|
+
} else {
|
1008
|
+
throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
1009
|
+
}
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
// Just add water
|
1013
|
+
var container = {
|
1014
|
+
strict: function strict(obj, name) {
|
1015
|
+
if (!(name in obj)) {
|
1016
|
+
throw new _exception2['default']('"' + name + '" not defined in ' + obj);
|
1017
|
+
}
|
1018
|
+
return obj[name];
|
1019
|
+
},
|
1020
|
+
lookup: function lookup(depths, name) {
|
1021
|
+
var len = depths.length;
|
1022
|
+
for (var i = 0; i < len; i++) {
|
1023
|
+
if (depths[i] && depths[i][name] != null) {
|
1024
|
+
return depths[i][name];
|
1025
|
+
}
|
1026
|
+
}
|
1027
|
+
},
|
1028
|
+
lambda: function lambda(current, context) {
|
1029
|
+
return typeof current === 'function' ? current.call(context) : current;
|
1030
|
+
},
|
1031
|
+
|
1032
|
+
escapeExpression: Utils.escapeExpression,
|
1033
|
+
invokePartial: invokePartialWrapper,
|
1034
|
+
|
1035
|
+
fn: function fn(i) {
|
1036
|
+
var ret = templateSpec[i];
|
1037
|
+
ret.decorator = templateSpec[i + '_d'];
|
1038
|
+
return ret;
|
1039
|
+
},
|
1040
|
+
|
1041
|
+
programs: [],
|
1042
|
+
program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
1043
|
+
var programWrapper = this.programs[i],
|
1044
|
+
fn = this.fn(i);
|
1045
|
+
if (data || depths || blockParams || declaredBlockParams) {
|
1046
|
+
programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
1047
|
+
} else if (!programWrapper) {
|
1048
|
+
programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
1049
|
+
}
|
1050
|
+
return programWrapper;
|
1051
|
+
},
|
1052
|
+
|
1053
|
+
data: function data(value, depth) {
|
1054
|
+
while (value && depth--) {
|
1055
|
+
value = value._parent;
|
1056
|
+
}
|
1057
|
+
return value;
|
1058
|
+
},
|
1059
|
+
merge: function merge(param, common) {
|
1060
|
+
var obj = param || common;
|
1061
|
+
|
1062
|
+
if (param && common && param !== common) {
|
1063
|
+
obj = Utils.extend({}, common, param);
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
return obj;
|
1067
|
+
},
|
1068
|
+
|
1069
|
+
noop: env.VM.noop,
|
1070
|
+
compilerInfo: templateSpec.compiler
|
1071
|
+
};
|
1072
|
+
|
1073
|
+
function ret(context) {
|
1074
|
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
1075
|
+
|
1076
|
+
var data = options.data;
|
1077
|
+
|
1078
|
+
ret._setup(options);
|
1079
|
+
if (!options.partial && templateSpec.useData) {
|
1080
|
+
data = initData(context, data);
|
1081
|
+
}
|
1082
|
+
var depths = undefined,
|
1083
|
+
blockParams = templateSpec.useBlockParams ? [] : undefined;
|
1084
|
+
if (templateSpec.useDepths) {
|
1085
|
+
if (options.depths) {
|
1086
|
+
depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths;
|
1087
|
+
} else {
|
1088
|
+
depths = [context];
|
1089
|
+
}
|
1090
|
+
}
|
1091
|
+
|
1092
|
+
function main(context /*, options*/) {
|
1093
|
+
return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
|
1094
|
+
}
|
1095
|
+
main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
|
1096
|
+
return main(context, options);
|
1097
|
+
}
|
1098
|
+
ret.isTop = true;
|
1099
|
+
|
1100
|
+
ret._setup = function (options) {
|
1101
|
+
if (!options.partial) {
|
1102
|
+
container.helpers = container.merge(options.helpers, env.helpers);
|
1103
|
+
|
1104
|
+
if (templateSpec.usePartial) {
|
1105
|
+
container.partials = container.merge(options.partials, env.partials);
|
1106
|
+
}
|
1107
|
+
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
1108
|
+
container.decorators = container.merge(options.decorators, env.decorators);
|
1109
|
+
}
|
1110
|
+
} else {
|
1111
|
+
container.helpers = options.helpers;
|
1112
|
+
container.partials = options.partials;
|
1113
|
+
container.decorators = options.decorators;
|
1114
|
+
}
|
1115
|
+
};
|
1116
|
+
|
1117
|
+
ret._child = function (i, data, blockParams, depths) {
|
1118
|
+
if (templateSpec.useBlockParams && !blockParams) {
|
1119
|
+
throw new _exception2['default']('must pass block params');
|
1120
|
+
}
|
1121
|
+
if (templateSpec.useDepths && !depths) {
|
1122
|
+
throw new _exception2['default']('must pass parent depths');
|
1123
|
+
}
|
1124
|
+
|
1125
|
+
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
1126
|
+
};
|
1127
|
+
return ret;
|
1128
|
+
}
|
1129
|
+
|
1130
|
+
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
1131
|
+
function prog(context) {
|
1132
|
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
1133
|
+
|
1134
|
+
var currentDepths = depths;
|
1135
|
+
if (depths && context !== depths[0]) {
|
1136
|
+
currentDepths = [context].concat(depths);
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
|
1140
|
+
}
|
1141
|
+
|
1142
|
+
prog = executeDecorators(fn, prog, container, depths, data, blockParams);
|
1143
|
+
|
1144
|
+
prog.program = i;
|
1145
|
+
prog.depth = depths ? depths.length : 0;
|
1146
|
+
prog.blockParams = declaredBlockParams || 0;
|
1147
|
+
return prog;
|
1148
|
+
}
|
1149
|
+
|
1150
|
+
function resolvePartial(partial, context, options) {
|
1151
|
+
if (!partial) {
|
1152
|
+
if (options.name === '@partial-block') {
|
1153
|
+
partial = options.data['partial-block'];
|
1154
|
+
} else {
|
1155
|
+
partial = options.partials[options.name];
|
1156
|
+
}
|
1157
|
+
} else if (!partial.call && !options.name) {
|
1158
|
+
// This is a dynamic partial that returned a string
|
1159
|
+
options.name = partial;
|
1160
|
+
partial = options.partials[partial];
|
1161
|
+
}
|
1162
|
+
return partial;
|
1163
|
+
}
|
1164
|
+
|
1165
|
+
function invokePartial(partial, context, options) {
|
1166
|
+
options.partial = true;
|
1167
|
+
if (options.ids) {
|
1168
|
+
options.data.contextPath = options.ids[0] || options.data.contextPath;
|
1169
|
+
}
|
1170
|
+
|
1171
|
+
var partialBlock = undefined;
|
1172
|
+
if (options.fn && options.fn !== noop) {
|
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
|
+
};
|
1231
|
+
};
|
1232
|
+
|
1233
|
+
module.exports = exports['default'];
|
1234
|
+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
1235
|
+
|
1236
|
+
/***/ }
|
1237
|
+
/******/ ])
|
1238
|
+
});
|
1239
|
+
;
|