1 | (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, (function(modules) {
|
2 |
|
3 | var installedModules = {};
|
4 |
|
5 |
|
6 | function __webpack_require__(moduleId) {
|
7 |
|
8 |
|
9 | if(installedModules[moduleId]) {
|
10 | return installedModules[moduleId].exports;
|
11 | }
|
12 |
|
13 | var module = installedModules[moduleId] = {
|
14 | i: moduleId,
|
15 | l: false,
|
16 | exports: {}
|
17 | };
|
18 |
|
19 |
|
20 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
|
22 |
|
23 | module.l = true;
|
24 |
|
25 |
|
26 | return module.exports;
|
27 | }
|
28 |
|
29 |
|
30 |
|
31 | __webpack_require__.m = modules;
|
32 |
|
33 |
|
34 | __webpack_require__.c = installedModules;
|
35 |
|
36 |
|
37 | __webpack_require__.d = function(exports, name, getter) {
|
38 | if(!__webpack_require__.o(exports, name)) {
|
39 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 | }
|
41 | };
|
42 |
|
43 |
|
44 | __webpack_require__.r = function(exports) {
|
45 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 | }
|
48 | Object.defineProperty(exports, '__esModule', { value: true });
|
49 | };
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 | __webpack_require__.t = function(value, mode) {
|
57 | if(mode & 1) value = __webpack_require__(value);
|
58 | if(mode & 8) return value;
|
59 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 | var ns = Object.create(null);
|
61 | __webpack_require__.r(ns);
|
62 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 | return ns;
|
65 | };
|
66 |
|
67 |
|
68 | __webpack_require__.n = function(module) {
|
69 | var getter = module && module.__esModule ?
|
70 | function getDefault() { return module['default']; } :
|
71 | function getModuleExports() { return module; };
|
72 | __webpack_require__.d(getter, 'a', getter);
|
73 | return getter;
|
74 | };
|
75 |
|
76 |
|
77 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
|
79 |
|
80 | __webpack_require__.p = "";
|
81 |
|
82 |
|
83 |
|
84 | return __webpack_require__(__webpack_require__.s = 4);
|
85 | })
|
86 |
|
87 | ([
|
88 |
|
89 | (function(module, exports, __webpack_require__) {
|
90 |
|
91 | "use strict";
|
92 |
|
93 | Object.defineProperty(exports, "__esModule", { value: true });
|
94 | function isExternal(value) {
|
95 | return value.includes('#');
|
96 | }
|
97 | function parseMapper(mapper) {
|
98 | if (isExternal(mapper)) {
|
99 | var _a = mapper.split('#'), source = _a[0], type = _a[1];
|
100 | return {
|
101 | isExternal: true,
|
102 | source: source,
|
103 | type: type
|
104 | };
|
105 | }
|
106 | return {
|
107 | isExternal: false,
|
108 | type: mapper
|
109 | };
|
110 | }
|
111 | exports.parseMapper = parseMapper;
|
112 | function pickMapper(entity, map, options) {
|
113 | var mapper = map[entity];
|
114 | return mapper ? parseMapper(mapper) : undefined;
|
115 | }
|
116 | exports.pickMapper = pickMapper;
|
117 | function useDefaultMapper(entity, options) {
|
118 | var config = options.data.root.config || {};
|
119 | var defaultMapper = config.defaultMapper;
|
120 | return defaultMapper && canUseDefault(entity) ? parseMapper(defaultMapper) : undefined;
|
121 | }
|
122 | exports.useDefaultMapper = useDefaultMapper;
|
123 | function canUseDefault(entity) {
|
124 | if (isField(entity)) {
|
125 | return entity.isUnion || entity.isType || entity.isInterface;
|
126 | }
|
127 | return true;
|
128 | }
|
129 | function isField(field) {
|
130 | return typeof field.fieldType !== 'undefined';
|
131 | }
|
132 |
|
133 |
|
134 | }),
|
135 |
|
136 | (function(module, exports, __webpack_require__) {
|
137 |
|
138 | (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, (function(modules) {
|
139 |
|
140 | var installedModules = {};
|
141 |
|
142 |
|
143 | function __webpack_require__(moduleId) {
|
144 |
|
145 |
|
146 | if(installedModules[moduleId]) {
|
147 | return installedModules[moduleId].exports;
|
148 | }
|
149 |
|
150 | var module = installedModules[moduleId] = {
|
151 | i: moduleId,
|
152 | l: false,
|
153 | exports: {}
|
154 | };
|
155 |
|
156 |
|
157 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
158 |
|
159 |
|
160 | module.l = true;
|
161 |
|
162 |
|
163 | return module.exports;
|
164 | }
|
165 |
|
166 |
|
167 |
|
168 | __webpack_require__.m = modules;
|
169 |
|
170 |
|
171 | __webpack_require__.c = installedModules;
|
172 |
|
173 |
|
174 | __webpack_require__.d = function(exports, name, getter) {
|
175 | if(!__webpack_require__.o(exports, name)) {
|
176 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
177 | }
|
178 | };
|
179 |
|
180 |
|
181 | __webpack_require__.r = function(exports) {
|
182 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
183 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
184 | }
|
185 | Object.defineProperty(exports, '__esModule', { value: true });
|
186 | };
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 | __webpack_require__.t = function(value, mode) {
|
194 | if(mode & 1) value = __webpack_require__(value);
|
195 | if(mode & 8) return value;
|
196 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
197 | var ns = Object.create(null);
|
198 | __webpack_require__.r(ns);
|
199 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
200 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
201 | return ns;
|
202 | };
|
203 |
|
204 |
|
205 | __webpack_require__.n = function(module) {
|
206 | var getter = module && module.__esModule ?
|
207 | function getDefault() { return module['default']; } :
|
208 | function getModuleExports() { return module; };
|
209 | __webpack_require__.d(getter, 'a', getter);
|
210 | return getter;
|
211 | };
|
212 |
|
213 |
|
214 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
215 |
|
216 |
|
217 | __webpack_require__.p = "";
|
218 |
|
219 |
|
220 |
|
221 | return __webpack_require__(__webpack_require__.s = 8);
|
222 | })
|
223 |
|
224 | ([
|
225 |
|
226 | (function(module, exports, __webpack_require__) {
|
227 |
|
228 | var lowerCase = __webpack_require__(2)
|
229 |
|
230 | var NON_WORD_REGEXP = __webpack_require__(16)
|
231 | var CAMEL_CASE_REGEXP = __webpack_require__(17)
|
232 | var CAMEL_CASE_UPPER_REGEXP = __webpack_require__(18)
|
233 |
|
234 |
|
235 |
|
236 |
|
237 |
|
238 |
|
239 |
|
240 |
|
241 |
|
242 | module.exports = function (str, locale, replacement) {
|
243 | if (str == null) {
|
244 | return ''
|
245 | }
|
246 |
|
247 | replacement = typeof replacement !== 'string' ? ' ' : replacement
|
248 |
|
249 | function replace (match, index, value) {
|
250 | if (index === 0 || index === (value.length - match.length)) {
|
251 | return ''
|
252 | }
|
253 |
|
254 | return replacement
|
255 | }
|
256 |
|
257 | str = String(str)
|
258 |
|
259 | .replace(CAMEL_CASE_REGEXP, '$1 $2')
|
260 |
|
261 | .replace(CAMEL_CASE_UPPER_REGEXP, '$1 $2')
|
262 |
|
263 | .replace(NON_WORD_REGEXP, replace)
|
264 |
|
265 |
|
266 | return lowerCase(str, locale)
|
267 | }
|
268 |
|
269 |
|
270 | }),
|
271 |
|
272 | (function(module, exports) {
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 | var LANGUAGES = {
|
282 | tr: {
|
283 | regexp: /[\u0069]/g,
|
284 | map: {
|
285 | '\u0069': '\u0130'
|
286 | }
|
287 | },
|
288 | az: {
|
289 | regexp: /[\u0069]/g,
|
290 | map: {
|
291 | '\u0069': '\u0130'
|
292 | }
|
293 | },
|
294 | lt: {
|
295 | regexp: /[\u0069\u006A\u012F]\u0307|\u0069\u0307[\u0300\u0301\u0303]/g,
|
296 | map: {
|
297 | '\u0069\u0307': '\u0049',
|
298 | '\u006A\u0307': '\u004A',
|
299 | '\u012F\u0307': '\u012E',
|
300 | '\u0069\u0307\u0300': '\u00CC',
|
301 | '\u0069\u0307\u0301': '\u00CD',
|
302 | '\u0069\u0307\u0303': '\u0128'
|
303 | }
|
304 | }
|
305 | }
|
306 |
|
307 |
|
308 |
|
309 |
|
310 |
|
311 |
|
312 |
|
313 | module.exports = function (str, locale) {
|
314 | var lang = LANGUAGES[locale]
|
315 |
|
316 | str = str == null ? '' : String(str)
|
317 |
|
318 | if (lang) {
|
319 | str = str.replace(lang.regexp, function (m) { return lang.map[m] })
|
320 | }
|
321 |
|
322 | return str.toUpperCase()
|
323 | }
|
324 |
|
325 |
|
326 | }),
|
327 |
|
328 | (function(module, exports) {
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 | var LANGUAGES = {
|
338 | tr: {
|
339 | regexp: /\u0130|\u0049|\u0049\u0307/g,
|
340 | map: {
|
341 | '\u0130': '\u0069',
|
342 | '\u0049': '\u0131',
|
343 | '\u0049\u0307': '\u0069'
|
344 | }
|
345 | },
|
346 | az: {
|
347 | regexp: /[\u0130]/g,
|
348 | map: {
|
349 | '\u0130': '\u0069',
|
350 | '\u0049': '\u0131',
|
351 | '\u0049\u0307': '\u0069'
|
352 | }
|
353 | },
|
354 | lt: {
|
355 | regexp: /[\u0049\u004A\u012E\u00CC\u00CD\u0128]/g,
|
356 | map: {
|
357 | '\u0049': '\u0069\u0307',
|
358 | '\u004A': '\u006A\u0307',
|
359 | '\u012E': '\u012F\u0307',
|
360 | '\u00CC': '\u0069\u0307\u0300',
|
361 | '\u00CD': '\u0069\u0307\u0301',
|
362 | '\u0128': '\u0069\u0307\u0303'
|
363 | }
|
364 | }
|
365 | }
|
366 |
|
367 |
|
368 |
|
369 |
|
370 |
|
371 |
|
372 |
|
373 | module.exports = function (str, locale) {
|
374 | var lang = LANGUAGES[locale]
|
375 |
|
376 | str = str == null ? '' : String(str)
|
377 |
|
378 | if (lang) {
|
379 | str = str.replace(lang.regexp, function (m) { return lang.map[m] })
|
380 | }
|
381 |
|
382 | return str.toLowerCase()
|
383 | }
|
384 |
|
385 |
|
386 | }),
|
387 |
|
388 | (function(module, exports, __webpack_require__) {
|
389 |
|
390 | var upperCase = __webpack_require__(1)
|
391 |
|
392 |
|
393 |
|
394 |
|
395 |
|
396 |
|
397 |
|
398 | module.exports = function (str, locale) {
|
399 | if (str == null) {
|
400 | return ''
|
401 | }
|
402 |
|
403 | str = String(str)
|
404 |
|
405 | return upperCase(str.charAt(0), locale) + str.substr(1)
|
406 | }
|
407 |
|
408 |
|
409 | }),
|
410 |
|
411 | (function(module, exports, __webpack_require__) {
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 |
|
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 |
|
439 | (function webpackUniversalModuleDefinition(root, factory) {
|
440 | if(true)
|
441 | module.exports = factory();
|
442 | else {}
|
443 | })(this, function() {
|
444 | return (function(modules) {
|
445 |
|
446 | var installedModules = {};
|
447 |
|
448 |
|
449 | function __webpack_require__(moduleId) {
|
450 |
|
451 |
|
452 | if(installedModules[moduleId])
|
453 | return installedModules[moduleId].exports;
|
454 |
|
455 |
|
456 | var module = installedModules[moduleId] = {
|
457 | exports: {},
|
458 | id: moduleId,
|
459 | loaded: false
|
460 | };
|
461 |
|
462 |
|
463 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
464 |
|
465 |
|
466 | module.loaded = true;
|
467 |
|
468 |
|
469 | return module.exports;
|
470 | }
|
471 |
|
472 |
|
473 |
|
474 | __webpack_require__.m = modules;
|
475 |
|
476 |
|
477 | __webpack_require__.c = installedModules;
|
478 |
|
479 |
|
480 | __webpack_require__.p = "";
|
481 |
|
482 |
|
483 | return __webpack_require__(0);
|
484 | })
|
485 |
|
486 | ([
|
487 |
|
488 | (function(module, exports, __webpack_require__) {
|
489 |
|
490 | 'use strict';
|
491 |
|
492 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
493 |
|
494 | exports.__esModule = true;
|
495 |
|
496 | var _handlebarsRuntime = __webpack_require__(2);
|
497 |
|
498 | var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
|
499 |
|
500 |
|
501 |
|
502 | var _handlebarsCompilerAst = __webpack_require__(35);
|
503 |
|
504 | var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
|
505 |
|
506 | var _handlebarsCompilerBase = __webpack_require__(36);
|
507 |
|
508 | var _handlebarsCompilerCompiler = __webpack_require__(41);
|
509 |
|
510 | var _handlebarsCompilerJavascriptCompiler = __webpack_require__(42);
|
511 |
|
512 | var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
|
513 |
|
514 | var _handlebarsCompilerVisitor = __webpack_require__(39);
|
515 |
|
516 | var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
|
517 |
|
518 | var _handlebarsNoConflict = __webpack_require__(34);
|
519 |
|
520 | var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
521 |
|
522 | var _create = _handlebarsRuntime2['default'].create;
|
523 | function create() {
|
524 | var hb = _create();
|
525 |
|
526 | hb.compile = function (input, options) {
|
527 | return _handlebarsCompilerCompiler.compile(input, options, hb);
|
528 | };
|
529 | hb.precompile = function (input, options) {
|
530 | return _handlebarsCompilerCompiler.precompile(input, options, hb);
|
531 | };
|
532 |
|
533 | hb.AST = _handlebarsCompilerAst2['default'];
|
534 | hb.Compiler = _handlebarsCompilerCompiler.Compiler;
|
535 | hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default'];
|
536 | hb.Parser = _handlebarsCompilerBase.parser;
|
537 | hb.parse = _handlebarsCompilerBase.parse;
|
538 |
|
539 | return hb;
|
540 | }
|
541 |
|
542 | var inst = create();
|
543 | inst.create = create;
|
544 |
|
545 | _handlebarsNoConflict2['default'](inst);
|
546 |
|
547 | inst.Visitor = _handlebarsCompilerVisitor2['default'];
|
548 |
|
549 | inst['default'] = inst;
|
550 |
|
551 | exports['default'] = inst;
|
552 | module.exports = exports['default'];
|
553 |
|
554 | }),
|
555 |
|
556 | (function(module, exports) {
|
557 |
|
558 | "use strict";
|
559 |
|
560 | exports["default"] = function (obj) {
|
561 | return obj && obj.__esModule ? obj : {
|
562 | "default": obj
|
563 | };
|
564 | };
|
565 |
|
566 | exports.__esModule = true;
|
567 |
|
568 | }),
|
569 |
|
570 | (function(module, exports, __webpack_require__) {
|
571 |
|
572 | 'use strict';
|
573 |
|
574 | var _interopRequireWildcard = __webpack_require__(3)['default'];
|
575 |
|
576 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
577 |
|
578 | exports.__esModule = true;
|
579 |
|
580 | var _handlebarsBase = __webpack_require__(4);
|
581 |
|
582 | var base = _interopRequireWildcard(_handlebarsBase);
|
583 |
|
584 |
|
585 |
|
586 |
|
587 | var _handlebarsSafeString = __webpack_require__(21);
|
588 |
|
589 | var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
|
590 |
|
591 | var _handlebarsException = __webpack_require__(6);
|
592 |
|
593 | var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
|
594 |
|
595 | var _handlebarsUtils = __webpack_require__(5);
|
596 |
|
597 | var Utils = _interopRequireWildcard(_handlebarsUtils);
|
598 |
|
599 | var _handlebarsRuntime = __webpack_require__(22);
|
600 |
|
601 | var runtime = _interopRequireWildcard(_handlebarsRuntime);
|
602 |
|
603 | var _handlebarsNoConflict = __webpack_require__(34);
|
604 |
|
605 | var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
606 |
|
607 |
|
608 | function create() {
|
609 | var hb = new base.HandlebarsEnvironment();
|
610 |
|
611 | Utils.extend(hb, base);
|
612 | hb.SafeString = _handlebarsSafeString2['default'];
|
613 | hb.Exception = _handlebarsException2['default'];
|
614 | hb.Utils = Utils;
|
615 | hb.escapeExpression = Utils.escapeExpression;
|
616 |
|
617 | hb.VM = runtime;
|
618 | hb.template = function (spec) {
|
619 | return runtime.template(spec, hb);
|
620 | };
|
621 |
|
622 | return hb;
|
623 | }
|
624 |
|
625 | var inst = create();
|
626 | inst.create = create;
|
627 |
|
628 | _handlebarsNoConflict2['default'](inst);
|
629 |
|
630 | inst['default'] = inst;
|
631 |
|
632 | exports['default'] = inst;
|
633 | module.exports = exports['default'];
|
634 |
|
635 | }),
|
636 |
|
637 | (function(module, exports) {
|
638 |
|
639 | "use strict";
|
640 |
|
641 | exports["default"] = function (obj) {
|
642 | if (obj && obj.__esModule) {
|
643 | return obj;
|
644 | } else {
|
645 | var newObj = {};
|
646 |
|
647 | if (obj != null) {
|
648 | for (var key in obj) {
|
649 | if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
|
650 | }
|
651 | }
|
652 |
|
653 | newObj["default"] = obj;
|
654 | return newObj;
|
655 | }
|
656 | };
|
657 |
|
658 | exports.__esModule = true;
|
659 |
|
660 | }),
|
661 |
|
662 | (function(module, exports, __webpack_require__) {
|
663 |
|
664 | 'use strict';
|
665 |
|
666 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
667 |
|
668 | exports.__esModule = true;
|
669 | exports.HandlebarsEnvironment = HandlebarsEnvironment;
|
670 |
|
671 | var _utils = __webpack_require__(5);
|
672 |
|
673 | var _exception = __webpack_require__(6);
|
674 |
|
675 | var _exception2 = _interopRequireDefault(_exception);
|
676 |
|
677 | var _helpers = __webpack_require__(10);
|
678 |
|
679 | var _decorators = __webpack_require__(18);
|
680 |
|
681 | var _logger = __webpack_require__(20);
|
682 |
|
683 | var _logger2 = _interopRequireDefault(_logger);
|
684 |
|
685 | var VERSION = '4.0.12';
|
686 | exports.VERSION = VERSION;
|
687 | var COMPILER_REVISION = 7;
|
688 |
|
689 | exports.COMPILER_REVISION = COMPILER_REVISION;
|
690 | var REVISION_CHANGES = {
|
691 | 1: '<= 1.0.rc.2',
|
692 | 2: '== 1.0.0-rc.3',
|
693 | 3: '== 1.0.0-rc.4',
|
694 | 4: '== 1.x.x',
|
695 | 5: '== 2.0.0-alpha.x',
|
696 | 6: '>= 2.0.0-beta.1',
|
697 | 7: '>= 4.0.0'
|
698 | };
|
699 |
|
700 | exports.REVISION_CHANGES = REVISION_CHANGES;
|
701 | var objectType = '[object Object]';
|
702 |
|
703 | function HandlebarsEnvironment(helpers, partials, decorators) {
|
704 | this.helpers = helpers || {};
|
705 | this.partials = partials || {};
|
706 | this.decorators = decorators || {};
|
707 |
|
708 | _helpers.registerDefaultHelpers(this);
|
709 | _decorators.registerDefaultDecorators(this);
|
710 | }
|
711 |
|
712 | HandlebarsEnvironment.prototype = {
|
713 | constructor: HandlebarsEnvironment,
|
714 |
|
715 | logger: _logger2['default'],
|
716 | log: _logger2['default'].log,
|
717 |
|
718 | registerHelper: function registerHelper(name, fn) {
|
719 | if (_utils.toString.call(name) === objectType) {
|
720 | if (fn) {
|
721 | throw new _exception2['default']('Arg not supported with multiple helpers');
|
722 | }
|
723 | _utils.extend(this.helpers, name);
|
724 | } else {
|
725 | this.helpers[name] = fn;
|
726 | }
|
727 | },
|
728 | unregisterHelper: function unregisterHelper(name) {
|
729 | delete this.helpers[name];
|
730 | },
|
731 |
|
732 | registerPartial: function registerPartial(name, partial) {
|
733 | if (_utils.toString.call(name) === objectType) {
|
734 | _utils.extend(this.partials, name);
|
735 | } else {
|
736 | if (typeof partial === 'undefined') {
|
737 | throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
|
738 | }
|
739 | this.partials[name] = partial;
|
740 | }
|
741 | },
|
742 | unregisterPartial: function unregisterPartial(name) {
|
743 | delete this.partials[name];
|
744 | },
|
745 |
|
746 | registerDecorator: function registerDecorator(name, fn) {
|
747 | if (_utils.toString.call(name) === objectType) {
|
748 | if (fn) {
|
749 | throw new _exception2['default']('Arg not supported with multiple decorators');
|
750 | }
|
751 | _utils.extend(this.decorators, name);
|
752 | } else {
|
753 | this.decorators[name] = fn;
|
754 | }
|
755 | },
|
756 | unregisterDecorator: function unregisterDecorator(name) {
|
757 | delete this.decorators[name];
|
758 | }
|
759 | };
|
760 |
|
761 | var log = _logger2['default'].log;
|
762 |
|
763 | exports.log = log;
|
764 | exports.createFrame = _utils.createFrame;
|
765 | exports.logger = _logger2['default'];
|
766 |
|
767 | }),
|
768 |
|
769 | (function(module, exports) {
|
770 |
|
771 | 'use strict';
|
772 |
|
773 | exports.__esModule = true;
|
774 | exports.extend = extend;
|
775 | exports.indexOf = indexOf;
|
776 | exports.escapeExpression = escapeExpression;
|
777 | exports.isEmpty = isEmpty;
|
778 | exports.createFrame = createFrame;
|
779 | exports.blockParams = blockParams;
|
780 | exports.appendContextPath = appendContextPath;
|
781 | var escape = {
|
782 | '&': '&',
|
783 | '<': '<',
|
784 | '>': '>',
|
785 | '"': '"',
|
786 | "'": ''',
|
787 | '`': '`',
|
788 | '=': '='
|
789 | };
|
790 |
|
791 | var badChars = /[&<>"'`=]/g,
|
792 | possible = /[&<>"'`=]/;
|
793 |
|
794 | function escapeChar(chr) {
|
795 | return escape[chr];
|
796 | }
|
797 |
|
798 | function extend(obj /* , ...source */) {
|
799 | for (var i = 1; i < arguments.length; i++) {
|
800 | for (var key in arguments[i]) {
|
801 | if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
|
802 | obj[key] = arguments[i][key];
|
803 | }
|
804 | }
|
805 | }
|
806 |
|
807 | return obj;
|
808 | }
|
809 |
|
810 | var toString = Object.prototype.toString;
|
811 |
|
812 | exports.toString = toString;
|
813 |
|
814 |
|
815 |
|
816 | var isFunction = function isFunction(value) {
|
817 | return typeof value === 'function';
|
818 | };
|
819 |
|
820 |
|
821 | if (isFunction(/x/)) {
|
822 | exports.isFunction = isFunction = function (value) {
|
823 | return typeof value === 'function' && toString.call(value) === '[object Function]';
|
824 | };
|
825 | }
|
826 | exports.isFunction = isFunction;
|
827 |
|
828 |
|
829 |
|
830 |
|
831 | var isArray = Array.isArray || function (value) {
|
832 | return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
|
833 | };
|
834 |
|
835 | exports.isArray = isArray;
|
836 |
|
837 |
|
838 | function indexOf(array, value) {
|
839 | for (var i = 0, len = array.length; i < len; i++) {
|
840 | if (array[i] === value) {
|
841 | return i;
|
842 | }
|
843 | }
|
844 | return -1;
|
845 | }
|
846 |
|
847 | function escapeExpression(string) {
|
848 | if (typeof string !== 'string') {
|
849 |
|
850 | if (string && string.toHTML) {
|
851 | return string.toHTML();
|
852 | } else if (string == null) {
|
853 | return '';
|
854 | } else if (!string) {
|
855 | return string + '';
|
856 | }
|
857 |
|
858 |
|
859 |
|
860 |
|
861 | string = '' + string;
|
862 | }
|
863 |
|
864 | if (!possible.test(string)) {
|
865 | return string;
|
866 | }
|
867 | return string.replace(badChars, escapeChar);
|
868 | }
|
869 |
|
870 | function isEmpty(value) {
|
871 | if (!value && value !== 0) {
|
872 | return true;
|
873 | } else if (isArray(value) && value.length === 0) {
|
874 | return true;
|
875 | } else {
|
876 | return false;
|
877 | }
|
878 | }
|
879 |
|
880 | function createFrame(object) {
|
881 | var frame = extend({}, object);
|
882 | frame._parent = object;
|
883 | return frame;
|
884 | }
|
885 |
|
886 | function blockParams(params, ids) {
|
887 | params.path = ids;
|
888 | return params;
|
889 | }
|
890 |
|
891 | function appendContextPath(contextPath, id) {
|
892 | return (contextPath ? contextPath + '.' : '') + id;
|
893 | }
|
894 |
|
895 | }),
|
896 |
|
897 | (function(module, exports, __webpack_require__) {
|
898 |
|
899 | 'use strict';
|
900 |
|
901 | var _Object$defineProperty = __webpack_require__(7)['default'];
|
902 |
|
903 | exports.__esModule = true;
|
904 |
|
905 | var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
906 |
|
907 | function Exception(message, node) {
|
908 | var loc = node && node.loc,
|
909 | line = undefined,
|
910 | column = undefined;
|
911 | if (loc) {
|
912 | line = loc.start.line;
|
913 | column = loc.start.column;
|
914 |
|
915 | message += ' - ' + line + ':' + column;
|
916 | }
|
917 |
|
918 | var tmp = Error.prototype.constructor.call(this, message);
|
919 |
|
920 |
|
921 | for (var idx = 0; idx < errorProps.length; idx++) {
|
922 | this[errorProps[idx]] = tmp[errorProps[idx]];
|
923 | }
|
924 |
|
925 |
|
926 | if (Error.captureStackTrace) {
|
927 | Error.captureStackTrace(this, Exception);
|
928 | }
|
929 |
|
930 | try {
|
931 | if (loc) {
|
932 | this.lineNumber = line;
|
933 |
|
934 |
|
935 |
|
936 | if (_Object$defineProperty) {
|
937 | Object.defineProperty(this, 'column', {
|
938 | value: column,
|
939 | enumerable: true
|
940 | });
|
941 | } else {
|
942 | this.column = column;
|
943 | }
|
944 | }
|
945 | } catch (nop) {
|
946 |
|
947 | }
|
948 | }
|
949 |
|
950 | Exception.prototype = new Error();
|
951 |
|
952 | exports['default'] = Exception;
|
953 | module.exports = exports['default'];
|
954 |
|
955 | }),
|
956 |
|
957 | (function(module, exports, __webpack_require__) {
|
958 |
|
959 | module.exports = { "default": __webpack_require__(8), __esModule: true };
|
960 |
|
961 | }),
|
962 |
|
963 | (function(module, exports, __webpack_require__) {
|
964 |
|
965 | var $ = __webpack_require__(9);
|
966 | module.exports = function defineProperty(it, key, desc){
|
967 | return $.setDesc(it, key, desc);
|
968 | };
|
969 |
|
970 | }),
|
971 |
|
972 | (function(module, exports) {
|
973 |
|
974 | var $Object = Object;
|
975 | module.exports = {
|
976 | create: $Object.create,
|
977 | getProto: $Object.getPrototypeOf,
|
978 | isEnum: {}.propertyIsEnumerable,
|
979 | getDesc: $Object.getOwnPropertyDescriptor,
|
980 | setDesc: $Object.defineProperty,
|
981 | setDescs: $Object.defineProperties,
|
982 | getKeys: $Object.keys,
|
983 | getNames: $Object.getOwnPropertyNames,
|
984 | getSymbols: $Object.getOwnPropertySymbols,
|
985 | each: [].forEach
|
986 | };
|
987 |
|
988 | }),
|
989 |
|
990 | (function(module, exports, __webpack_require__) {
|
991 |
|
992 | 'use strict';
|
993 |
|
994 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
995 |
|
996 | exports.__esModule = true;
|
997 | exports.registerDefaultHelpers = registerDefaultHelpers;
|
998 |
|
999 | var _helpersBlockHelperMissing = __webpack_require__(11);
|
1000 |
|
1001 | var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
|
1002 |
|
1003 | var _helpersEach = __webpack_require__(12);
|
1004 |
|
1005 | var _helpersEach2 = _interopRequireDefault(_helpersEach);
|
1006 |
|
1007 | var _helpersHelperMissing = __webpack_require__(13);
|
1008 |
|
1009 | var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
|
1010 |
|
1011 | var _helpersIf = __webpack_require__(14);
|
1012 |
|
1013 | var _helpersIf2 = _interopRequireDefault(_helpersIf);
|
1014 |
|
1015 | var _helpersLog = __webpack_require__(15);
|
1016 |
|
1017 | var _helpersLog2 = _interopRequireDefault(_helpersLog);
|
1018 |
|
1019 | var _helpersLookup = __webpack_require__(16);
|
1020 |
|
1021 | var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
|
1022 |
|
1023 | var _helpersWith = __webpack_require__(17);
|
1024 |
|
1025 | var _helpersWith2 = _interopRequireDefault(_helpersWith);
|
1026 |
|
1027 | function registerDefaultHelpers(instance) {
|
1028 | _helpersBlockHelperMissing2['default'](instance);
|
1029 | _helpersEach2['default'](instance);
|
1030 | _helpersHelperMissing2['default'](instance);
|
1031 | _helpersIf2['default'](instance);
|
1032 | _helpersLog2['default'](instance);
|
1033 | _helpersLookup2['default'](instance);
|
1034 | _helpersWith2['default'](instance);
|
1035 | }
|
1036 |
|
1037 | }),
|
1038 |
|
1039 | (function(module, exports, __webpack_require__) {
|
1040 |
|
1041 | 'use strict';
|
1042 |
|
1043 | exports.__esModule = true;
|
1044 |
|
1045 | var _utils = __webpack_require__(5);
|
1046 |
|
1047 | exports['default'] = function (instance) {
|
1048 | instance.registerHelper('blockHelperMissing', function (context, options) {
|
1049 | var inverse = options.inverse,
|
1050 | fn = options.fn;
|
1051 |
|
1052 | if (context === true) {
|
1053 | return fn(this);
|
1054 | } else if (context === false || context == null) {
|
1055 | return inverse(this);
|
1056 | } else if (_utils.isArray(context)) {
|
1057 | if (context.length > 0) {
|
1058 | if (options.ids) {
|
1059 | options.ids = [options.name];
|
1060 | }
|
1061 |
|
1062 | return instance.helpers.each(context, options);
|
1063 | } else {
|
1064 | return inverse(this);
|
1065 | }
|
1066 | } else {
|
1067 | if (options.data && options.ids) {
|
1068 | var data = _utils.createFrame(options.data);
|
1069 | data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
|
1070 | options = { data: data };
|
1071 | }
|
1072 |
|
1073 | return fn(context, options);
|
1074 | }
|
1075 | });
|
1076 | };
|
1077 |
|
1078 | module.exports = exports['default'];
|
1079 |
|
1080 | }),
|
1081 |
|
1082 | (function(module, exports, __webpack_require__) {
|
1083 |
|
1084 | 'use strict';
|
1085 |
|
1086 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
1087 |
|
1088 | exports.__esModule = true;
|
1089 |
|
1090 | var _utils = __webpack_require__(5);
|
1091 |
|
1092 | var _exception = __webpack_require__(6);
|
1093 |
|
1094 | var _exception2 = _interopRequireDefault(_exception);
|
1095 |
|
1096 | exports['default'] = function (instance) {
|
1097 | instance.registerHelper('each', function (context, options) {
|
1098 | if (!options) {
|
1099 | throw new _exception2['default']('Must pass iterator to #each');
|
1100 | }
|
1101 |
|
1102 | var fn = options.fn,
|
1103 | inverse = options.inverse,
|
1104 | i = 0,
|
1105 | ret = '',
|
1106 | data = undefined,
|
1107 | contextPath = undefined;
|
1108 |
|
1109 | if (options.data && options.ids) {
|
1110 | contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
1111 | }
|
1112 |
|
1113 | if (_utils.isFunction(context)) {
|
1114 | context = context.call(this);
|
1115 | }
|
1116 |
|
1117 | if (options.data) {
|
1118 | data = _utils.createFrame(options.data);
|
1119 | }
|
1120 |
|
1121 | function execIteration(field, index, last) {
|
1122 | if (data) {
|
1123 | data.key = field;
|
1124 | data.index = index;
|
1125 | data.first = index === 0;
|
1126 | data.last = !!last;
|
1127 |
|
1128 | if (contextPath) {
|
1129 | data.contextPath = contextPath + field;
|
1130 | }
|
1131 | }
|
1132 |
|
1133 | ret = ret + fn(context[field], {
|
1134 | data: data,
|
1135 | blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
|
1136 | });
|
1137 | }
|
1138 |
|
1139 | if (context && typeof context === 'object') {
|
1140 | if (_utils.isArray(context)) {
|
1141 | for (var j = context.length; i < j; i++) {
|
1142 | if (i in context) {
|
1143 | execIteration(i, i, i === context.length - 1);
|
1144 | }
|
1145 | }
|
1146 | } else {
|
1147 | var priorKey = undefined;
|
1148 |
|
1149 | for (var key in context) {
|
1150 | if (context.hasOwnProperty(key)) {
|
1151 |
|
1152 |
|
1153 |
|
1154 | if (priorKey !== undefined) {
|
1155 | execIteration(priorKey, i - 1);
|
1156 | }
|
1157 | priorKey = key;
|
1158 | i++;
|
1159 | }
|
1160 | }
|
1161 | if (priorKey !== undefined) {
|
1162 | execIteration(priorKey, i - 1, true);
|
1163 | }
|
1164 | }
|
1165 | }
|
1166 |
|
1167 | if (i === 0) {
|
1168 | ret = inverse(this);
|
1169 | }
|
1170 |
|
1171 | return ret;
|
1172 | });
|
1173 | };
|
1174 |
|
1175 | module.exports = exports['default'];
|
1176 |
|
1177 | }),
|
1178 |
|
1179 | (function(module, exports, __webpack_require__) {
|
1180 |
|
1181 | 'use strict';
|
1182 |
|
1183 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
1184 |
|
1185 | exports.__esModule = true;
|
1186 |
|
1187 | var _exception = __webpack_require__(6);
|
1188 |
|
1189 | var _exception2 = _interopRequireDefault(_exception);
|
1190 |
|
1191 | exports['default'] = function (instance) {
|
1192 | instance.registerHelper('helperMissing', function () /* [args, ]options */{
|
1193 | if (arguments.length === 1) {
|
1194 |
|
1195 | return undefined;
|
1196 | } else {
|
1197 |
|
1198 | throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
1199 | }
|
1200 | });
|
1201 | };
|
1202 |
|
1203 | module.exports = exports['default'];
|
1204 |
|
1205 | }),
|
1206 |
|
1207 | (function(module, exports, __webpack_require__) {
|
1208 |
|
1209 | 'use strict';
|
1210 |
|
1211 | exports.__esModule = true;
|
1212 |
|
1213 | var _utils = __webpack_require__(5);
|
1214 |
|
1215 | exports['default'] = function (instance) {
|
1216 | instance.registerHelper('if', function (conditional, options) {
|
1217 | if (_utils.isFunction(conditional)) {
|
1218 | conditional = conditional.call(this);
|
1219 | }
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 | if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
|
1225 | return options.inverse(this);
|
1226 | } else {
|
1227 | return options.fn(this);
|
1228 | }
|
1229 | });
|
1230 |
|
1231 | instance.registerHelper('unless', function (conditional, options) {
|
1232 | return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
|
1233 | });
|
1234 | };
|
1235 |
|
1236 | module.exports = exports['default'];
|
1237 |
|
1238 | }),
|
1239 |
|
1240 | (function(module, exports) {
|
1241 |
|
1242 | 'use strict';
|
1243 |
|
1244 | exports.__esModule = true;
|
1245 |
|
1246 | exports['default'] = function (instance) {
|
1247 | instance.registerHelper('log', function () /* message, options */{
|
1248 | var args = [undefined],
|
1249 | options = arguments[arguments.length - 1];
|
1250 | for (var i = 0; i < arguments.length - 1; i++) {
|
1251 | args.push(arguments[i]);
|
1252 | }
|
1253 |
|
1254 | var level = 1;
|
1255 | if (options.hash.level != null) {
|
1256 | level = options.hash.level;
|
1257 | } else if (options.data && options.data.level != null) {
|
1258 | level = options.data.level;
|
1259 | }
|
1260 | args[0] = level;
|
1261 |
|
1262 | instance.log.apply(instance, args);
|
1263 | });
|
1264 | };
|
1265 |
|
1266 | module.exports = exports['default'];
|
1267 |
|
1268 | }),
|
1269 |
|
1270 | (function(module, exports) {
|
1271 |
|
1272 | 'use strict';
|
1273 |
|
1274 | exports.__esModule = true;
|
1275 |
|
1276 | exports['default'] = function (instance) {
|
1277 | instance.registerHelper('lookup', function (obj, field) {
|
1278 | return obj && obj[field];
|
1279 | });
|
1280 | };
|
1281 |
|
1282 | module.exports = exports['default'];
|
1283 |
|
1284 | }),
|
1285 |
|
1286 | (function(module, exports, __webpack_require__) {
|
1287 |
|
1288 | 'use strict';
|
1289 |
|
1290 | exports.__esModule = true;
|
1291 |
|
1292 | var _utils = __webpack_require__(5);
|
1293 |
|
1294 | exports['default'] = function (instance) {
|
1295 | instance.registerHelper('with', function (context, options) {
|
1296 | if (_utils.isFunction(context)) {
|
1297 | context = context.call(this);
|
1298 | }
|
1299 |
|
1300 | var fn = options.fn;
|
1301 |
|
1302 | if (!_utils.isEmpty(context)) {
|
1303 | var data = options.data;
|
1304 | if (options.data && options.ids) {
|
1305 | data = _utils.createFrame(options.data);
|
1306 | data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
|
1307 | }
|
1308 |
|
1309 | return fn(context, {
|
1310 | data: data,
|
1311 | blockParams: _utils.blockParams([context], [data && data.contextPath])
|
1312 | });
|
1313 | } else {
|
1314 | return options.inverse(this);
|
1315 | }
|
1316 | });
|
1317 | };
|
1318 |
|
1319 | module.exports = exports['default'];
|
1320 |
|
1321 | }),
|
1322 |
|
1323 | (function(module, exports, __webpack_require__) {
|
1324 |
|
1325 | 'use strict';
|
1326 |
|
1327 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
1328 |
|
1329 | exports.__esModule = true;
|
1330 | exports.registerDefaultDecorators = registerDefaultDecorators;
|
1331 |
|
1332 | var _decoratorsInline = __webpack_require__(19);
|
1333 |
|
1334 | var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
|
1335 |
|
1336 | function registerDefaultDecorators(instance) {
|
1337 | _decoratorsInline2['default'](instance);
|
1338 | }
|
1339 |
|
1340 | }),
|
1341 |
|
1342 | (function(module, exports, __webpack_require__) {
|
1343 |
|
1344 | 'use strict';
|
1345 |
|
1346 | exports.__esModule = true;
|
1347 |
|
1348 | var _utils = __webpack_require__(5);
|
1349 |
|
1350 | exports['default'] = function (instance) {
|
1351 | instance.registerDecorator('inline', function (fn, props, container, options) {
|
1352 | var ret = fn;
|
1353 | if (!props.partials) {
|
1354 | props.partials = {};
|
1355 | ret = function (context, options) {
|
1356 |
|
1357 | var original = container.partials;
|
1358 | container.partials = _utils.extend({}, original, props.partials);
|
1359 | var ret = fn(context, options);
|
1360 | container.partials = original;
|
1361 | return ret;
|
1362 | };
|
1363 | }
|
1364 |
|
1365 | props.partials[options.args[0]] = options.fn;
|
1366 |
|
1367 | return ret;
|
1368 | });
|
1369 | };
|
1370 |
|
1371 | module.exports = exports['default'];
|
1372 |
|
1373 | }),
|
1374 |
|
1375 | (function(module, exports, __webpack_require__) {
|
1376 |
|
1377 | 'use strict';
|
1378 |
|
1379 | exports.__esModule = true;
|
1380 |
|
1381 | var _utils = __webpack_require__(5);
|
1382 |
|
1383 | var logger = {
|
1384 | methodMap: ['debug', 'info', 'warn', 'error'],
|
1385 | level: 'info',
|
1386 |
|
1387 |
|
1388 | lookupLevel: function lookupLevel(level) {
|
1389 | if (typeof level === 'string') {
|
1390 | var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
|
1391 | if (levelMap >= 0) {
|
1392 | level = levelMap;
|
1393 | } else {
|
1394 | level = parseInt(level, 10);
|
1395 | }
|
1396 | }
|
1397 |
|
1398 | return level;
|
1399 | },
|
1400 |
|
1401 |
|
1402 | log: function log(level) {
|
1403 | level = logger.lookupLevel(level);
|
1404 |
|
1405 | if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
|
1406 | var method = logger.methodMap[level];
|
1407 | if (!console[method]) {
|
1408 |
|
1409 | method = 'log';
|
1410 | }
|
1411 |
|
1412 | for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
1413 | message[_key - 1] = arguments[_key];
|
1414 | }
|
1415 |
|
1416 | console[method].apply(console, message);
|
1417 | }
|
1418 | }
|
1419 | };
|
1420 |
|
1421 | exports['default'] = logger;
|
1422 | module.exports = exports['default'];
|
1423 |
|
1424 | }),
|
1425 |
|
1426 | (function(module, exports) {
|
1427 |
|
1428 |
|
1429 | 'use strict';
|
1430 |
|
1431 | exports.__esModule = true;
|
1432 | function SafeString(string) {
|
1433 | this.string = string;
|
1434 | }
|
1435 |
|
1436 | SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
1437 | return '' + this.string;
|
1438 | };
|
1439 |
|
1440 | exports['default'] = SafeString;
|
1441 | module.exports = exports['default'];
|
1442 |
|
1443 | }),
|
1444 |
|
1445 | (function(module, exports, __webpack_require__) {
|
1446 |
|
1447 | 'use strict';
|
1448 |
|
1449 | var _Object$seal = __webpack_require__(23)['default'];
|
1450 |
|
1451 | var _interopRequireWildcard = __webpack_require__(3)['default'];
|
1452 |
|
1453 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
1454 |
|
1455 | exports.__esModule = true;
|
1456 | exports.checkRevision = checkRevision;
|
1457 | exports.template = template;
|
1458 | exports.wrapProgram = wrapProgram;
|
1459 | exports.resolvePartial = resolvePartial;
|
1460 | exports.invokePartial = invokePartial;
|
1461 | exports.noop = noop;
|
1462 |
|
1463 | var _utils = __webpack_require__(5);
|
1464 |
|
1465 | var Utils = _interopRequireWildcard(_utils);
|
1466 |
|
1467 | var _exception = __webpack_require__(6);
|
1468 |
|
1469 | var _exception2 = _interopRequireDefault(_exception);
|
1470 |
|
1471 | var _base = __webpack_require__(4);
|
1472 |
|
1473 | function checkRevision(compilerInfo) {
|
1474 | var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
1475 | currentRevision = _base.COMPILER_REVISION;
|
1476 |
|
1477 | if (compilerRevision !== currentRevision) {
|
1478 | if (compilerRevision < currentRevision) {
|
1479 | var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
|
1480 | compilerVersions = _base.REVISION_CHANGES[compilerRevision];
|
1481 | 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 + ').');
|
1482 | } else {
|
1483 |
|
1484 | 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] + ').');
|
1485 | }
|
1486 | }
|
1487 | }
|
1488 |
|
1489 | function template(templateSpec, env) {
|
1490 |
|
1491 | if (!env) {
|
1492 | throw new _exception2['default']('No environment passed to template');
|
1493 | }
|
1494 | if (!templateSpec || !templateSpec.main) {
|
1495 | throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
|
1496 | }
|
1497 |
|
1498 | templateSpec.main.decorator = templateSpec.main_d;
|
1499 |
|
1500 |
|
1501 |
|
1502 | env.VM.checkRevision(templateSpec.compiler);
|
1503 |
|
1504 | function invokePartialWrapper(partial, context, options) {
|
1505 | if (options.hash) {
|
1506 | context = Utils.extend({}, context, options.hash);
|
1507 | if (options.ids) {
|
1508 | options.ids[0] = true;
|
1509 | }
|
1510 | }
|
1511 |
|
1512 | partial = env.VM.resolvePartial.call(this, partial, context, options);
|
1513 | var result = env.VM.invokePartial.call(this, partial, context, options);
|
1514 |
|
1515 | if (result == null && env.compile) {
|
1516 | options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
1517 | result = options.partials[options.name](context, options);
|
1518 | }
|
1519 | if (result != null) {
|
1520 | if (options.indent) {
|
1521 | var lines = result.split('\n');
|
1522 | for (var i = 0, l = lines.length; i < l; i++) {
|
1523 | if (!lines[i] && i + 1 === l) {
|
1524 | break;
|
1525 | }
|
1526 |
|
1527 | lines[i] = options.indent + lines[i];
|
1528 | }
|
1529 | result = lines.join('\n');
|
1530 | }
|
1531 | return result;
|
1532 | } else {
|
1533 | throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
1534 | }
|
1535 | }
|
1536 |
|
1537 |
|
1538 | var container = {
|
1539 | strict: function strict(obj, name) {
|
1540 | if (!(name in obj)) {
|
1541 | throw new _exception2['default']('"' + name + '" not defined in ' + obj);
|
1542 | }
|
1543 | return obj[name];
|
1544 | },
|
1545 | lookup: function lookup(depths, name) {
|
1546 | var len = depths.length;
|
1547 | for (var i = 0; i < len; i++) {
|
1548 | if (depths[i] && depths[i][name] != null) {
|
1549 | return depths[i][name];
|
1550 | }
|
1551 | }
|
1552 | },
|
1553 | lambda: function lambda(current, context) {
|
1554 | return typeof current === 'function' ? current.call(context) : current;
|
1555 | },
|
1556 |
|
1557 | escapeExpression: Utils.escapeExpression,
|
1558 | invokePartial: invokePartialWrapper,
|
1559 |
|
1560 | fn: function fn(i) {
|
1561 | var ret = templateSpec[i];
|
1562 | ret.decorator = templateSpec[i + '_d'];
|
1563 | return ret;
|
1564 | },
|
1565 |
|
1566 | programs: [],
|
1567 | program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
1568 | var programWrapper = this.programs[i],
|
1569 | fn = this.fn(i);
|
1570 | if (data || depths || blockParams || declaredBlockParams) {
|
1571 | programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
1572 | } else if (!programWrapper) {
|
1573 | programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
1574 | }
|
1575 | return programWrapper;
|
1576 | },
|
1577 |
|
1578 | data: function data(value, depth) {
|
1579 | while (value && depth--) {
|
1580 | value = value._parent;
|
1581 | }
|
1582 | return value;
|
1583 | },
|
1584 | merge: function merge(param, common) {
|
1585 | var obj = param || common;
|
1586 |
|
1587 | if (param && common && param !== common) {
|
1588 | obj = Utils.extend({}, common, param);
|
1589 | }
|
1590 |
|
1591 | return obj;
|
1592 | },
|
1593 |
|
1594 | nullContext: _Object$seal({}),
|
1595 |
|
1596 | noop: env.VM.noop,
|
1597 | compilerInfo: templateSpec.compiler
|
1598 | };
|
1599 |
|
1600 | function ret(context) {
|
1601 | var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
1602 |
|
1603 | var data = options.data;
|
1604 |
|
1605 | ret._setup(options);
|
1606 | if (!options.partial && templateSpec.useData) {
|
1607 | data = initData(context, data);
|
1608 | }
|
1609 | var depths = undefined,
|
1610 | blockParams = templateSpec.useBlockParams ? [] : undefined;
|
1611 | if (templateSpec.useDepths) {
|
1612 | if (options.depths) {
|
1613 | depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
|
1614 | } else {
|
1615 | depths = [context];
|
1616 | }
|
1617 | }
|
1618 |
|
1619 | function main(context /*, options*/) {
|
1620 | return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
|
1621 | }
|
1622 | main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
|
1623 | return main(context, options);
|
1624 | }
|
1625 | ret.isTop = true;
|
1626 |
|
1627 | ret._setup = function (options) {
|
1628 | if (!options.partial) {
|
1629 | container.helpers = container.merge(options.helpers, env.helpers);
|
1630 |
|
1631 | if (templateSpec.usePartial) {
|
1632 | container.partials = container.merge(options.partials, env.partials);
|
1633 | }
|
1634 | if (templateSpec.usePartial || templateSpec.useDecorators) {
|
1635 | container.decorators = container.merge(options.decorators, env.decorators);
|
1636 | }
|
1637 | } else {
|
1638 | container.helpers = options.helpers;
|
1639 | container.partials = options.partials;
|
1640 | container.decorators = options.decorators;
|
1641 | }
|
1642 | };
|
1643 |
|
1644 | ret._child = function (i, data, blockParams, depths) {
|
1645 | if (templateSpec.useBlockParams && !blockParams) {
|
1646 | throw new _exception2['default']('must pass block params');
|
1647 | }
|
1648 | if (templateSpec.useDepths && !depths) {
|
1649 | throw new _exception2['default']('must pass parent depths');
|
1650 | }
|
1651 |
|
1652 | return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
1653 | };
|
1654 | return ret;
|
1655 | }
|
1656 |
|
1657 | function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
1658 | function prog(context) {
|
1659 | var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
1660 |
|
1661 | var currentDepths = depths;
|
1662 | if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
|
1663 | currentDepths = [context].concat(depths);
|
1664 | }
|
1665 |
|
1666 | return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
|
1667 | }
|
1668 |
|
1669 | prog = executeDecorators(fn, prog, container, depths, data, blockParams);
|
1670 |
|
1671 | prog.program = i;
|
1672 | prog.depth = depths ? depths.length : 0;
|
1673 | prog.blockParams = declaredBlockParams || 0;
|
1674 | return prog;
|
1675 | }
|
1676 |
|
1677 | function resolvePartial(partial, context, options) {
|
1678 | if (!partial) {
|
1679 | if (options.name === '@partial-block') {
|
1680 | partial = options.data['partial-block'];
|
1681 | } else {
|
1682 | partial = options.partials[options.name];
|
1683 | }
|
1684 | } else if (!partial.call && !options.name) {
|
1685 |
|
1686 | options.name = partial;
|
1687 | partial = options.partials[partial];
|
1688 | }
|
1689 | return partial;
|
1690 | }
|
1691 |
|
1692 | function invokePartial(partial, context, options) {
|
1693 |
|
1694 | var currentPartialBlock = options.data && options.data['partial-block'];
|
1695 | options.partial = true;
|
1696 | if (options.ids) {
|
1697 | options.data.contextPath = options.ids[0] || options.data.contextPath;
|
1698 | }
|
1699 |
|
1700 | var partialBlock = undefined;
|
1701 | if (options.fn && options.fn !== noop) {
|
1702 | (function () {
|
1703 | options.data = _base.createFrame(options.data);
|
1704 |
|
1705 | var fn = options.fn;
|
1706 | partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
|
1707 | var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
1708 |
|
1709 |
|
1710 |
|
1711 | options.data = _base.createFrame(options.data);
|
1712 | options.data['partial-block'] = currentPartialBlock;
|
1713 | return fn(context, options);
|
1714 | };
|
1715 | if (fn.partials) {
|
1716 | options.partials = Utils.extend({}, options.partials, fn.partials);
|
1717 | }
|
1718 | })();
|
1719 | }
|
1720 |
|
1721 | if (partial === undefined && partialBlock) {
|
1722 | partial = partialBlock;
|
1723 | }
|
1724 |
|
1725 | if (partial === undefined) {
|
1726 | throw new _exception2['default']('The partial ' + options.name + ' could not be found');
|
1727 | } else if (partial instanceof Function) {
|
1728 | return partial(context, options);
|
1729 | }
|
1730 | }
|
1731 |
|
1732 | function noop() {
|
1733 | return '';
|
1734 | }
|
1735 |
|
1736 | function initData(context, data) {
|
1737 | if (!data || !('root' in data)) {
|
1738 | data = data ? _base.createFrame(data) : {};
|
1739 | data.root = context;
|
1740 | }
|
1741 | return data;
|
1742 | }
|
1743 |
|
1744 | function executeDecorators(fn, prog, container, depths, data, blockParams) {
|
1745 | if (fn.decorator) {
|
1746 | var props = {};
|
1747 | prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
|
1748 | Utils.extend(prog, props);
|
1749 | }
|
1750 | return prog;
|
1751 | }
|
1752 |
|
1753 | }),
|
1754 |
|
1755 | (function(module, exports, __webpack_require__) {
|
1756 |
|
1757 | module.exports = { "default": __webpack_require__(24), __esModule: true };
|
1758 |
|
1759 | }),
|
1760 |
|
1761 | (function(module, exports, __webpack_require__) {
|
1762 |
|
1763 | __webpack_require__(25);
|
1764 | module.exports = __webpack_require__(30).Object.seal;
|
1765 |
|
1766 | }),
|
1767 |
|
1768 | (function(module, exports, __webpack_require__) {
|
1769 |
|
1770 |
|
1771 | var isObject = __webpack_require__(26);
|
1772 |
|
1773 | __webpack_require__(27)('seal', function($seal){
|
1774 | return function seal(it){
|
1775 | return $seal && isObject(it) ? $seal(it) : it;
|
1776 | };
|
1777 | });
|
1778 |
|
1779 | }),
|
1780 |
|
1781 | (function(module, exports) {
|
1782 |
|
1783 | module.exports = function(it){
|
1784 | return typeof it === 'object' ? it !== null : typeof it === 'function';
|
1785 | };
|
1786 |
|
1787 | }),
|
1788 |
|
1789 | (function(module, exports, __webpack_require__) {
|
1790 |
|
1791 |
|
1792 | var $export = __webpack_require__(28)
|
1793 | , core = __webpack_require__(30)
|
1794 | , fails = __webpack_require__(33);
|
1795 | module.exports = function(KEY, exec){
|
1796 | var fn = (core.Object || {})[KEY] || Object[KEY]
|
1797 | , exp = {};
|
1798 | exp[KEY] = exec(fn);
|
1799 | $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
|
1800 | };
|
1801 |
|
1802 | }),
|
1803 |
|
1804 | (function(module, exports, __webpack_require__) {
|
1805 |
|
1806 | var global = __webpack_require__(29)
|
1807 | , core = __webpack_require__(30)
|
1808 | , ctx = __webpack_require__(31)
|
1809 | , PROTOTYPE = 'prototype';
|
1810 |
|
1811 | var $export = function(type, name, source){
|
1812 | var IS_FORCED = type & $export.F
|
1813 | , IS_GLOBAL = type & $export.G
|
1814 | , IS_STATIC = type & $export.S
|
1815 | , IS_PROTO = type & $export.P
|
1816 | , IS_BIND = type & $export.B
|
1817 | , IS_WRAP = type & $export.W
|
1818 | , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
1819 | , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
|
1820 | , key, own, out;
|
1821 | if(IS_GLOBAL)source = name;
|
1822 | for(key in source){
|
1823 |
|
1824 | own = !IS_FORCED && target && key in target;
|
1825 | if(own && key in exports)continue;
|
1826 |
|
1827 | out = own ? target[key] : source[key];
|
1828 |
|
1829 | exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
1830 |
|
1831 | : IS_BIND && own ? ctx(out, global)
|
1832 |
|
1833 | : IS_WRAP && target[key] == out ? (function(C){
|
1834 | var F = function(param){
|
1835 | return this instanceof C ? new C(param) : C(param);
|
1836 | };
|
1837 | F[PROTOTYPE] = C[PROTOTYPE];
|
1838 | return F;
|
1839 |
|
1840 | })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
1841 | if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
|
1842 | }
|
1843 | };
|
1844 |
|
1845 | $export.F = 1;
|
1846 | $export.G = 2;
|
1847 | $export.S = 4;
|
1848 | $export.P = 8;
|
1849 | $export.B = 16;
|
1850 | $export.W = 32;
|
1851 | module.exports = $export;
|
1852 |
|
1853 | }),
|
1854 |
|
1855 | (function(module, exports) {
|
1856 |
|
1857 |
|
1858 | var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
1859 | ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
1860 | if(typeof __g == 'number')__g = global;
|
1861 |
|
1862 | }),
|
1863 |
|
1864 | (function(module, exports) {
|
1865 |
|
1866 | var core = module.exports = {version: '1.2.6'};
|
1867 | if(typeof __e == 'number')__e = core;
|
1868 |
|
1869 | }),
|
1870 |
|
1871 | (function(module, exports, __webpack_require__) {
|
1872 |
|
1873 |
|
1874 | var aFunction = __webpack_require__(32);
|
1875 | module.exports = function(fn, that, length){
|
1876 | aFunction(fn);
|
1877 | if(that === undefined)return fn;
|
1878 | switch(length){
|
1879 | case 1: return function(a){
|
1880 | return fn.call(that, a);
|
1881 | };
|
1882 | case 2: return function(a, b){
|
1883 | return fn.call(that, a, b);
|
1884 | };
|
1885 | case 3: return function(a, b, c){
|
1886 | return fn.call(that, a, b, c);
|
1887 | };
|
1888 | }
|
1889 | return function(/* ...args */){
|
1890 | return fn.apply(that, arguments);
|
1891 | };
|
1892 | };
|
1893 |
|
1894 | }),
|
1895 |
|
1896 | (function(module, exports) {
|
1897 |
|
1898 | module.exports = function(it){
|
1899 | if(typeof it != 'function')throw TypeError(it + ' is not a function!');
|
1900 | return it;
|
1901 | };
|
1902 |
|
1903 | }),
|
1904 |
|
1905 | (function(module, exports) {
|
1906 |
|
1907 | module.exports = function(exec){
|
1908 | try {
|
1909 | return !!exec();
|
1910 | } catch(e){
|
1911 | return true;
|
1912 | }
|
1913 | };
|
1914 |
|
1915 | }),
|
1916 |
|
1917 | (function(module, exports) {
|
1918 |
|
1919 | (function(global) {
|
1920 | 'use strict';
|
1921 |
|
1922 | exports.__esModule = true;
|
1923 |
|
1924 | exports['default'] = function (Handlebars) {
|
1925 |
|
1926 | var root = typeof global !== 'undefined' ? global : window,
|
1927 | $Handlebars = root.Handlebars;
|
1928 |
|
1929 | Handlebars.noConflict = function () {
|
1930 | if (root.Handlebars === Handlebars) {
|
1931 | root.Handlebars = $Handlebars;
|
1932 | }
|
1933 | return Handlebars;
|
1934 | };
|
1935 | };
|
1936 |
|
1937 | module.exports = exports['default'];
|
1938 | }.call(exports, (function() { return this; }())))
|
1939 |
|
1940 | }),
|
1941 |
|
1942 | (function(module, exports) {
|
1943 |
|
1944 | 'use strict';
|
1945 |
|
1946 | exports.__esModule = true;
|
1947 | var AST = {
|
1948 |
|
1949 | helpers: {
|
1950 |
|
1951 |
|
1952 |
|
1953 | helperExpression: function helperExpression(node) {
|
1954 | return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash);
|
1955 | },
|
1956 |
|
1957 | scopedId: function scopedId(path) {
|
1958 | return (/^\.|this\b/.test(path.original)
|
1959 | );
|
1960 | },
|
1961 |
|
1962 |
|
1963 |
|
1964 | simpleId: function simpleId(path) {
|
1965 | return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
|
1966 | }
|
1967 | }
|
1968 | };
|
1969 |
|
1970 |
|
1971 |
|
1972 | exports['default'] = AST;
|
1973 | module.exports = exports['default'];
|
1974 |
|
1975 | }),
|
1976 |
|
1977 | (function(module, exports, __webpack_require__) {
|
1978 |
|
1979 | 'use strict';
|
1980 |
|
1981 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
1982 |
|
1983 | var _interopRequireWildcard = __webpack_require__(3)['default'];
|
1984 |
|
1985 | exports.__esModule = true;
|
1986 | exports.parse = parse;
|
1987 |
|
1988 | var _parser = __webpack_require__(37);
|
1989 |
|
1990 | var _parser2 = _interopRequireDefault(_parser);
|
1991 |
|
1992 | var _whitespaceControl = __webpack_require__(38);
|
1993 |
|
1994 | var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
|
1995 |
|
1996 | var _helpers = __webpack_require__(40);
|
1997 |
|
1998 | var Helpers = _interopRequireWildcard(_helpers);
|
1999 |
|
2000 | var _utils = __webpack_require__(5);
|
2001 |
|
2002 | exports.parser = _parser2['default'];
|
2003 |
|
2004 | var yy = {};
|
2005 | _utils.extend(yy, Helpers);
|
2006 |
|
2007 | function parse(input, options) {
|
2008 |
|
2009 | if (input.type === 'Program') {
|
2010 | return input;
|
2011 | }
|
2012 |
|
2013 | _parser2['default'].yy = yy;
|
2014 |
|
2015 |
|
2016 | yy.locInfo = function (locInfo) {
|
2017 | return new yy.SourceLocation(options && options.srcName, locInfo);
|
2018 | };
|
2019 |
|
2020 | var strip = new _whitespaceControl2['default'](options);
|
2021 | return strip.accept(_parser2['default'].parse(input));
|
2022 | }
|
2023 |
|
2024 | }),
|
2025 |
|
2026 | (function(module, exports) {
|
2027 |
|
2028 |
|
2029 |
|
2030 | "use strict";
|
2031 |
|
2032 | exports.__esModule = true;
|
2033 | var handlebars = (function () {
|
2034 | var parser = { trace: function trace() {},
|
2035 | yy: {},
|
2036 | symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
|
2037 | terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
|
2038 | productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
|
2039 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$
|
2040 | /*``*/) {
|
2041 |
|
2042 | var $0 = $$.length - 1;
|
2043 | switch (yystate) {
|
2044 | case 1:
|
2045 | return $$[$0 - 1];
|
2046 | break;
|
2047 | case 2:
|
2048 | this.$ = yy.prepareProgram($$[$0]);
|
2049 | break;
|
2050 | case 3:
|
2051 | this.$ = $$[$0];
|
2052 | break;
|
2053 | case 4:
|
2054 | this.$ = $$[$0];
|
2055 | break;
|
2056 | case 5:
|
2057 | this.$ = $$[$0];
|
2058 | break;
|
2059 | case 6:
|
2060 | this.$ = $$[$0];
|
2061 | break;
|
2062 | case 7:
|
2063 | this.$ = $$[$0];
|
2064 | break;
|
2065 | case 8:
|
2066 | this.$ = $$[$0];
|
2067 | break;
|
2068 | case 9:
|
2069 | this.$ = {
|
2070 | type: 'CommentStatement',
|
2071 | value: yy.stripComment($$[$0]),
|
2072 | strip: yy.stripFlags($$[$0], $$[$0]),
|
2073 | loc: yy.locInfo(this._$)
|
2074 | };
|
2075 |
|
2076 | break;
|
2077 | case 10:
|
2078 | this.$ = {
|
2079 | type: 'ContentStatement',
|
2080 | original: $$[$0],
|
2081 | value: $$[$0],
|
2082 | loc: yy.locInfo(this._$)
|
2083 | };
|
2084 |
|
2085 | break;
|
2086 | case 11:
|
2087 | this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
|
2088 | break;
|
2089 | case 12:
|
2090 | this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
|
2091 | break;
|
2092 | case 13:
|
2093 | this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
|
2094 | break;
|
2095 | case 14:
|
2096 | this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
|
2097 | break;
|
2098 | case 15:
|
2099 | this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
2100 | break;
|
2101 | case 16:
|
2102 | this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
2103 | break;
|
2104 | case 17:
|
2105 | this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
2106 | break;
|
2107 | case 18:
|
2108 | this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
|
2109 | break;
|
2110 | case 19:
|
2111 | var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
|
2112 | program = yy.prepareProgram([inverse], $$[$0 - 1].loc);
|
2113 | program.chained = true;
|
2114 |
|
2115 | this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true };
|
2116 |
|
2117 | break;
|
2118 | case 20:
|
2119 | this.$ = $$[$0];
|
2120 | break;
|
2121 | case 21:
|
2122 | this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
|
2123 | break;
|
2124 | case 22:
|
2125 | this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
|
2126 | break;
|
2127 | case 23:
|
2128 | this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
|
2129 | break;
|
2130 | case 24:
|
2131 | this.$ = {
|
2132 | type: 'PartialStatement',
|
2133 | name: $$[$0 - 3],
|
2134 | params: $$[$0 - 2],
|
2135 | hash: $$[$0 - 1],
|
2136 | indent: '',
|
2137 | strip: yy.stripFlags($$[$0 - 4], $$[$0]),
|
2138 | loc: yy.locInfo(this._$)
|
2139 | };
|
2140 |
|
2141 | break;
|
2142 | case 25:
|
2143 | this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
|
2144 | break;
|
2145 | case 26:
|
2146 | this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
|
2147 | break;
|
2148 | case 27:
|
2149 | this.$ = $$[$0];
|
2150 | break;
|
2151 | case 28:
|
2152 | this.$ = $$[$0];
|
2153 | break;
|
2154 | case 29:
|
2155 | this.$ = {
|
2156 | type: 'SubExpression',
|
2157 | path: $$[$0 - 3],
|
2158 | params: $$[$0 - 2],
|
2159 | hash: $$[$0 - 1],
|
2160 | loc: yy.locInfo(this._$)
|
2161 | };
|
2162 |
|
2163 | break;
|
2164 | case 30:
|
2165 | this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) };
|
2166 | break;
|
2167 | case 31:
|
2168 | this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
|
2169 | break;
|
2170 | case 32:
|
2171 | this.$ = yy.id($$[$0 - 1]);
|
2172 | break;
|
2173 | case 33:
|
2174 | this.$ = $$[$0];
|
2175 | break;
|
2176 | case 34:
|
2177 | this.$ = $$[$0];
|
2178 | break;
|
2179 | case 35:
|
2180 | this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
|
2181 | break;
|
2182 | case 36:
|
2183 | this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
|
2184 | break;
|
2185 | case 37:
|
2186 | this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) };
|
2187 | break;
|
2188 | case 38:
|
2189 | this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) };
|
2190 | break;
|
2191 | case 39:
|
2192 | this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) };
|
2193 | break;
|
2194 | case 40:
|
2195 | this.$ = $$[$0];
|
2196 | break;
|
2197 | case 41:
|
2198 | this.$ = $$[$0];
|
2199 | break;
|
2200 | case 42:
|
2201 | this.$ = yy.preparePath(true, $$[$0], this._$);
|
2202 | break;
|
2203 | case 43:
|
2204 | this.$ = yy.preparePath(false, $$[$0], this._$);
|
2205 | break;
|
2206 | case 44:
|
2207 | $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2];
|
2208 | break;
|
2209 | case 45:
|
2210 | this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
|
2211 | break;
|
2212 | case 46:
|
2213 | this.$ = [];
|
2214 | break;
|
2215 | case 47:
|
2216 | $$[$0 - 1].push($$[$0]);
|
2217 | break;
|
2218 | case 48:
|
2219 | this.$ = [$$[$0]];
|
2220 | break;
|
2221 | case 49:
|
2222 | $$[$0 - 1].push($$[$0]);
|
2223 | break;
|
2224 | case 50:
|
2225 | this.$ = [];
|
2226 | break;
|
2227 | case 51:
|
2228 | $$[$0 - 1].push($$[$0]);
|
2229 | break;
|
2230 | case 58:
|
2231 | this.$ = [];
|
2232 | break;
|
2233 | case 59:
|
2234 | $$[$0 - 1].push($$[$0]);
|
2235 | break;
|
2236 | case 64:
|
2237 | this.$ = [];
|
2238 | break;
|
2239 | case 65:
|
2240 | $$[$0 - 1].push($$[$0]);
|
2241 | break;
|
2242 | case 70:
|
2243 | this.$ = [];
|
2244 | break;
|
2245 | case 71:
|
2246 | $$[$0 - 1].push($$[$0]);
|
2247 | break;
|
2248 | case 78:
|
2249 | this.$ = [];
|
2250 | break;
|
2251 | case 79:
|
2252 | $$[$0 - 1].push($$[$0]);
|
2253 | break;
|
2254 | case 82:
|
2255 | this.$ = [];
|
2256 | break;
|
2257 | case 83:
|
2258 | $$[$0 - 1].push($$[$0]);
|
2259 | break;
|
2260 | case 86:
|
2261 | this.$ = [];
|
2262 | break;
|
2263 | case 87:
|
2264 | $$[$0 - 1].push($$[$0]);
|
2265 | break;
|
2266 | case 90:
|
2267 | this.$ = [];
|
2268 | break;
|
2269 | case 91:
|
2270 | $$[$0 - 1].push($$[$0]);
|
2271 | break;
|
2272 | case 94:
|
2273 | this.$ = [];
|
2274 | break;
|
2275 | case 95:
|
2276 | $$[$0 - 1].push($$[$0]);
|
2277 | break;
|
2278 | case 98:
|
2279 | this.$ = [$$[$0]];
|
2280 | break;
|
2281 | case 99:
|
2282 | $$[$0 - 1].push($$[$0]);
|
2283 | break;
|
2284 | case 100:
|
2285 | this.$ = [$$[$0]];
|
2286 | break;
|
2287 | case 101:
|
2288 | $$[$0 - 1].push($$[$0]);
|
2289 | break;
|
2290 | }
|
2291 | },
|
2292 | table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }],
|
2293 | defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] },
|
2294 | parseError: function parseError(str, hash) {
|
2295 | throw new Error(str);
|
2296 | },
|
2297 | parse: function parse(input) {
|
2298 | var self = this,
|
2299 | stack = [0],
|
2300 | vstack = [null],
|
2301 | lstack = [],
|
2302 | table = this.table,
|
2303 | yytext = "",
|
2304 | yylineno = 0,
|
2305 | yyleng = 0,
|
2306 | recovering = 0,
|
2307 | TERROR = 2,
|
2308 | EOF = 1;
|
2309 | this.lexer.setInput(input);
|
2310 | this.lexer.yy = this.yy;
|
2311 | this.yy.lexer = this.lexer;
|
2312 | this.yy.parser = this;
|
2313 | if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
|
2314 | var yyloc = this.lexer.yylloc;
|
2315 | lstack.push(yyloc);
|
2316 | var ranges = this.lexer.options && this.lexer.options.ranges;
|
2317 | if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
|
2318 | function popStack(n) {
|
2319 | stack.length = stack.length - 2 * n;
|
2320 | vstack.length = vstack.length - n;
|
2321 | lstack.length = lstack.length - n;
|
2322 | }
|
2323 | function lex() {
|
2324 | var token;
|
2325 | token = self.lexer.lex() || 1;
|
2326 | if (typeof token !== "number") {
|
2327 | token = self.symbols_[token] || token;
|
2328 | }
|
2329 | return token;
|
2330 | }
|
2331 | var symbol,
|
2332 | preErrorSymbol,
|
2333 | state,
|
2334 | action,
|
2335 | a,
|
2336 | r,
|
2337 | yyval = {},
|
2338 | p,
|
2339 | len,
|
2340 | newState,
|
2341 | expected;
|
2342 | while (true) {
|
2343 | state = stack[stack.length - 1];
|
2344 | if (this.defaultActions[state]) {
|
2345 | action = this.defaultActions[state];
|
2346 | } else {
|
2347 | if (symbol === null || typeof symbol == "undefined") {
|
2348 | symbol = lex();
|
2349 | }
|
2350 | action = table[state] && table[state][symbol];
|
2351 | }
|
2352 | if (typeof action === "undefined" || !action.length || !action[0]) {
|
2353 | var errStr = "";
|
2354 | if (!recovering) {
|
2355 | expected = [];
|
2356 | for (p in table[state]) if (this.terminals_[p] && p > 2) {
|
2357 | expected.push("'" + this.terminals_[p] + "'");
|
2358 | }
|
2359 | if (this.lexer.showPosition) {
|
2360 | errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
2361 | } else {
|
2362 | errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
2363 | }
|
2364 | this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
|
2365 | }
|
2366 | }
|
2367 | if (action[0] instanceof Array && action.length > 1) {
|
2368 | throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
2369 | }
|
2370 | switch (action[0]) {
|
2371 | case 1:
|
2372 | stack.push(symbol);
|
2373 | vstack.push(this.lexer.yytext);
|
2374 | lstack.push(this.lexer.yylloc);
|
2375 | stack.push(action[1]);
|
2376 | symbol = null;
|
2377 | if (!preErrorSymbol) {
|
2378 | yyleng = this.lexer.yyleng;
|
2379 | yytext = this.lexer.yytext;
|
2380 | yylineno = this.lexer.yylineno;
|
2381 | yyloc = this.lexer.yylloc;
|
2382 | if (recovering > 0) recovering--;
|
2383 | } else {
|
2384 | symbol = preErrorSymbol;
|
2385 | preErrorSymbol = null;
|
2386 | }
|
2387 | break;
|
2388 | case 2:
|
2389 | len = this.productions_[action[1]][1];
|
2390 | yyval.$ = vstack[vstack.length - len];
|
2391 | yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
|
2392 | if (ranges) {
|
2393 | yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
2394 | }
|
2395 | r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
|
2396 | if (typeof r !== "undefined") {
|
2397 | return r;
|
2398 | }
|
2399 | if (len) {
|
2400 | stack = stack.slice(0, -1 * len * 2);
|
2401 | vstack = vstack.slice(0, -1 * len);
|
2402 | lstack = lstack.slice(0, -1 * len);
|
2403 | }
|
2404 | stack.push(this.productions_[action[1]][0]);
|
2405 | vstack.push(yyval.$);
|
2406 | lstack.push(yyval._$);
|
2407 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
2408 | stack.push(newState);
|
2409 | break;
|
2410 | case 3:
|
2411 | return true;
|
2412 | }
|
2413 | }
|
2414 | return true;
|
2415 | }
|
2416 | };
|
2417 |
|
2418 | var lexer = (function () {
|
2419 | var lexer = { EOF: 1,
|
2420 | parseError: function parseError(str, hash) {
|
2421 | if (this.yy.parser) {
|
2422 | this.yy.parser.parseError(str, hash);
|
2423 | } else {
|
2424 | throw new Error(str);
|
2425 | }
|
2426 | },
|
2427 | setInput: function setInput(input) {
|
2428 | this._input = input;
|
2429 | this._more = this._less = this.done = false;
|
2430 | this.yylineno = this.yyleng = 0;
|
2431 | this.yytext = this.matched = this.match = '';
|
2432 | this.conditionStack = ['INITIAL'];
|
2433 | this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
|
2434 | if (this.options.ranges) this.yylloc.range = [0, 0];
|
2435 | this.offset = 0;
|
2436 | return this;
|
2437 | },
|
2438 | input: function input() {
|
2439 | var ch = this._input[0];
|
2440 | this.yytext += ch;
|
2441 | this.yyleng++;
|
2442 | this.offset++;
|
2443 | this.match += ch;
|
2444 | this.matched += ch;
|
2445 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
2446 | if (lines) {
|
2447 | this.yylineno++;
|
2448 | this.yylloc.last_line++;
|
2449 | } else {
|
2450 | this.yylloc.last_column++;
|
2451 | }
|
2452 | if (this.options.ranges) this.yylloc.range[1]++;
|
2453 |
|
2454 | this._input = this._input.slice(1);
|
2455 | return ch;
|
2456 | },
|
2457 | unput: function unput(ch) {
|
2458 | var len = ch.length;
|
2459 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
2460 |
|
2461 | this._input = ch + this._input;
|
2462 | this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
|
2463 |
|
2464 | this.offset -= len;
|
2465 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
2466 | this.match = this.match.substr(0, this.match.length - 1);
|
2467 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
2468 |
|
2469 | if (lines.length - 1) this.yylineno -= lines.length - 1;
|
2470 | var r = this.yylloc.range;
|
2471 |
|
2472 | this.yylloc = { first_line: this.yylloc.first_line,
|
2473 | last_line: this.yylineno + 1,
|
2474 | first_column: this.yylloc.first_column,
|
2475 | last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
2476 | };
|
2477 |
|
2478 | if (this.options.ranges) {
|
2479 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
2480 | }
|
2481 | return this;
|
2482 | },
|
2483 | more: function more() {
|
2484 | this._more = true;
|
2485 | return this;
|
2486 | },
|
2487 | less: function less(n) {
|
2488 | this.unput(this.match.slice(n));
|
2489 | },
|
2490 | pastInput: function pastInput() {
|
2491 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
2492 | return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
|
2493 | },
|
2494 | upcomingInput: function upcomingInput() {
|
2495 | var next = this.match;
|
2496 | if (next.length < 20) {
|
2497 | next += this._input.substr(0, 20 - next.length);
|
2498 | }
|
2499 | return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
2500 | },
|
2501 | showPosition: function showPosition() {
|
2502 | var pre = this.pastInput();
|
2503 | var c = new Array(pre.length + 1).join("-");
|
2504 | return pre + this.upcomingInput() + "\n" + c + "^";
|
2505 | },
|
2506 | next: function next() {
|
2507 | if (this.done) {
|
2508 | return this.EOF;
|
2509 | }
|
2510 | if (!this._input) this.done = true;
|
2511 |
|
2512 | var token, match, tempMatch, index, col, lines;
|
2513 | if (!this._more) {
|
2514 | this.yytext = '';
|
2515 | this.match = '';
|
2516 | }
|
2517 | var rules = this._currentRules();
|
2518 | for (var i = 0; i < rules.length; i++) {
|
2519 | tempMatch = this._input.match(this.rules[rules[i]]);
|
2520 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
2521 | match = tempMatch;
|
2522 | index = i;
|
2523 | if (!this.options.flex) break;
|
2524 | }
|
2525 | }
|
2526 | if (match) {
|
2527 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
2528 | if (lines) this.yylineno += lines.length;
|
2529 | this.yylloc = { first_line: this.yylloc.last_line,
|
2530 | last_line: this.yylineno + 1,
|
2531 | first_column: this.yylloc.last_column,
|
2532 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length };
|
2533 | this.yytext += match[0];
|
2534 | this.match += match[0];
|
2535 | this.matches = match;
|
2536 | this.yyleng = this.yytext.length;
|
2537 | if (this.options.ranges) {
|
2538 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
2539 | }
|
2540 | this._more = false;
|
2541 | this._input = this._input.slice(match[0].length);
|
2542 | this.matched += match[0];
|
2543 | token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
|
2544 | if (this.done && this._input) this.done = false;
|
2545 | if (token) return token;else return;
|
2546 | }
|
2547 | if (this._input === "") {
|
2548 | return this.EOF;
|
2549 | } else {
|
2550 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno });
|
2551 | }
|
2552 | },
|
2553 | lex: function lex() {
|
2554 | var r = this.next();
|
2555 | if (typeof r !== 'undefined') {
|
2556 | return r;
|
2557 | } else {
|
2558 | return this.lex();
|
2559 | }
|
2560 | },
|
2561 | begin: function begin(condition) {
|
2562 | this.conditionStack.push(condition);
|
2563 | },
|
2564 | popState: function popState() {
|
2565 | return this.conditionStack.pop();
|
2566 | },
|
2567 | _currentRules: function _currentRules() {
|
2568 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
2569 | },
|
2570 | topState: function topState() {
|
2571 | return this.conditionStack[this.conditionStack.length - 2];
|
2572 | },
|
2573 | pushState: function begin(condition) {
|
2574 | this.begin(condition);
|
2575 | } };
|
2576 | lexer.options = {};
|
2577 | lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START
|
2578 | /*``*/) {
|
2579 |
|
2580 | function strip(start, end) {
|
2581 | return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end);
|
2582 | }
|
2583 |
|
2584 | var YYSTATE = YY_START;
|
2585 | switch ($avoiding_name_collisions) {
|
2586 | case 0:
|
2587 | if (yy_.yytext.slice(-2) === "\\\\") {
|
2588 | strip(0, 1);
|
2589 | this.begin("mu");
|
2590 | } else if (yy_.yytext.slice(-1) === "\\") {
|
2591 | strip(0, 1);
|
2592 | this.begin("emu");
|
2593 | } else {
|
2594 | this.begin("mu");
|
2595 | }
|
2596 | if (yy_.yytext) return 15;
|
2597 |
|
2598 | break;
|
2599 | case 1:
|
2600 | return 15;
|
2601 | break;
|
2602 | case 2:
|
2603 | this.popState();
|
2604 | return 15;
|
2605 |
|
2606 | break;
|
2607 | case 3:
|
2608 | this.begin('raw');return 15;
|
2609 | break;
|
2610 | case 4:
|
2611 | this.popState();
|
2612 |
|
2613 |
|
2614 |
|
2615 | if (this.conditionStack[this.conditionStack.length - 1] === 'raw') {
|
2616 | return 15;
|
2617 | } else {
|
2618 | yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9);
|
2619 | return 'END_RAW_BLOCK';
|
2620 | }
|
2621 |
|
2622 | break;
|
2623 | case 5:
|
2624 | return 15;
|
2625 | break;
|
2626 | case 6:
|
2627 | this.popState();
|
2628 | return 14;
|
2629 |
|
2630 | break;
|
2631 | case 7:
|
2632 | return 65;
|
2633 | break;
|
2634 | case 8:
|
2635 | return 68;
|
2636 | break;
|
2637 | case 9:
|
2638 | return 19;
|
2639 | break;
|
2640 | case 10:
|
2641 | this.popState();
|
2642 | this.begin('raw');
|
2643 | return 23;
|
2644 |
|
2645 | break;
|
2646 | case 11:
|
2647 | return 55;
|
2648 | break;
|
2649 | case 12:
|
2650 | return 60;
|
2651 | break;
|
2652 | case 13:
|
2653 | return 29;
|
2654 | break;
|
2655 | case 14:
|
2656 | return 47;
|
2657 | break;
|
2658 | case 15:
|
2659 | this.popState();return 44;
|
2660 | break;
|
2661 | case 16:
|
2662 | this.popState();return 44;
|
2663 | break;
|
2664 | case 17:
|
2665 | return 34;
|
2666 | break;
|
2667 | case 18:
|
2668 | return 39;
|
2669 | break;
|
2670 | case 19:
|
2671 | return 51;
|
2672 | break;
|
2673 | case 20:
|
2674 | return 48;
|
2675 | break;
|
2676 | case 21:
|
2677 | this.unput(yy_.yytext);
|
2678 | this.popState();
|
2679 | this.begin('com');
|
2680 |
|
2681 | break;
|
2682 | case 22:
|
2683 | this.popState();
|
2684 | return 14;
|
2685 |
|
2686 | break;
|
2687 | case 23:
|
2688 | return 48;
|
2689 | break;
|
2690 | case 24:
|
2691 | return 73;
|
2692 | break;
|
2693 | case 25:
|
2694 | return 72;
|
2695 | break;
|
2696 | case 26:
|
2697 | return 72;
|
2698 | break;
|
2699 | case 27:
|
2700 | return 87;
|
2701 | break;
|
2702 | case 28:
|
2703 |
|
2704 | break;
|
2705 | case 29:
|
2706 | this.popState();return 54;
|
2707 | break;
|
2708 | case 30:
|
2709 | this.popState();return 33;
|
2710 | break;
|
2711 | case 31:
|
2712 | yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80;
|
2713 | break;
|
2714 | case 32:
|
2715 | yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80;
|
2716 | break;
|
2717 | case 33:
|
2718 | return 85;
|
2719 | break;
|
2720 | case 34:
|
2721 | return 82;
|
2722 | break;
|
2723 | case 35:
|
2724 | return 82;
|
2725 | break;
|
2726 | case 36:
|
2727 | return 83;
|
2728 | break;
|
2729 | case 37:
|
2730 | return 84;
|
2731 | break;
|
2732 | case 38:
|
2733 | return 81;
|
2734 | break;
|
2735 | case 39:
|
2736 | return 75;
|
2737 | break;
|
2738 | case 40:
|
2739 | return 77;
|
2740 | break;
|
2741 | case 41:
|
2742 | return 72;
|
2743 | break;
|
2744 | case 42:
|
2745 | yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;
|
2746 | break;
|
2747 | case 43:
|
2748 | return 'INVALID';
|
2749 | break;
|
2750 | case 44:
|
2751 | return 5;
|
2752 | break;
|
2753 | }
|
2754 | };
|
2755 | lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
|
2756 | lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
|
2757 | return lexer;
|
2758 | })();
|
2759 | parser.lexer = lexer;
|
2760 | function Parser() {
|
2761 | this.yy = {};
|
2762 | }Parser.prototype = parser;parser.Parser = Parser;
|
2763 | return new Parser();
|
2764 | })();exports["default"] = handlebars;
|
2765 | module.exports = exports["default"];
|
2766 |
|
2767 | }),
|
2768 |
|
2769 | (function(module, exports, __webpack_require__) {
|
2770 |
|
2771 | 'use strict';
|
2772 |
|
2773 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
2774 |
|
2775 | exports.__esModule = true;
|
2776 |
|
2777 | var _visitor = __webpack_require__(39);
|
2778 |
|
2779 | var _visitor2 = _interopRequireDefault(_visitor);
|
2780 |
|
2781 | function WhitespaceControl() {
|
2782 | var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
2783 |
|
2784 | this.options = options;
|
2785 | }
|
2786 | WhitespaceControl.prototype = new _visitor2['default']();
|
2787 |
|
2788 | WhitespaceControl.prototype.Program = function (program) {
|
2789 | var doStandalone = !this.options.ignoreStandalone;
|
2790 |
|
2791 | var isRoot = !this.isRootSeen;
|
2792 | this.isRootSeen = true;
|
2793 |
|
2794 | var body = program.body;
|
2795 | for (var i = 0, l = body.length; i < l; i++) {
|
2796 | var current = body[i],
|
2797 | strip = this.accept(current);
|
2798 |
|
2799 | if (!strip) {
|
2800 | continue;
|
2801 | }
|
2802 |
|
2803 | var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),
|
2804 | _isNextWhitespace = isNextWhitespace(body, i, isRoot),
|
2805 | openStandalone = strip.openStandalone && _isPrevWhitespace,
|
2806 | closeStandalone = strip.closeStandalone && _isNextWhitespace,
|
2807 | inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
|
2808 |
|
2809 | if (strip.close) {
|
2810 | omitRight(body, i, true);
|
2811 | }
|
2812 | if (strip.open) {
|
2813 | omitLeft(body, i, true);
|
2814 | }
|
2815 |
|
2816 | if (doStandalone && inlineStandalone) {
|
2817 | omitRight(body, i);
|
2818 |
|
2819 | if (omitLeft(body, i)) {
|
2820 |
|
2821 | if (current.type === 'PartialStatement') {
|
2822 |
|
2823 | current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
|
2824 | }
|
2825 | }
|
2826 | }
|
2827 | if (doStandalone && openStandalone) {
|
2828 | omitRight((current.program || current.inverse).body);
|
2829 |
|
2830 |
|
2831 | omitLeft(body, i);
|
2832 | }
|
2833 | if (doStandalone && closeStandalone) {
|
2834 |
|
2835 | omitRight(body, i);
|
2836 |
|
2837 | omitLeft((current.inverse || current.program).body);
|
2838 | }
|
2839 | }
|
2840 |
|
2841 | return program;
|
2842 | };
|
2843 |
|
2844 | WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) {
|
2845 | this.accept(block.program);
|
2846 | this.accept(block.inverse);
|
2847 |
|
2848 |
|
2849 | var program = block.program || block.inverse,
|
2850 | inverse = block.program && block.inverse,
|
2851 | firstInverse = inverse,
|
2852 | lastInverse = inverse;
|
2853 |
|
2854 | if (inverse && inverse.chained) {
|
2855 | firstInverse = inverse.body[0].program;
|
2856 |
|
2857 |
|
2858 | while (lastInverse.chained) {
|
2859 | lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
|
2860 | }
|
2861 | }
|
2862 |
|
2863 | var strip = {
|
2864 | open: block.openStrip.open,
|
2865 | close: block.closeStrip.close,
|
2866 |
|
2867 |
|
2868 |
|
2869 | openStandalone: isNextWhitespace(program.body),
|
2870 | closeStandalone: isPrevWhitespace((firstInverse || program).body)
|
2871 | };
|
2872 |
|
2873 | if (block.openStrip.close) {
|
2874 | omitRight(program.body, null, true);
|
2875 | }
|
2876 |
|
2877 | if (inverse) {
|
2878 | var inverseStrip = block.inverseStrip;
|
2879 |
|
2880 | if (inverseStrip.open) {
|
2881 | omitLeft(program.body, null, true);
|
2882 | }
|
2883 |
|
2884 | if (inverseStrip.close) {
|
2885 | omitRight(firstInverse.body, null, true);
|
2886 | }
|
2887 | if (block.closeStrip.open) {
|
2888 | omitLeft(lastInverse.body, null, true);
|
2889 | }
|
2890 |
|
2891 |
|
2892 | if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
|
2893 | omitLeft(program.body);
|
2894 | omitRight(firstInverse.body);
|
2895 | }
|
2896 | } else if (block.closeStrip.open) {
|
2897 | omitLeft(program.body, null, true);
|
2898 | }
|
2899 |
|
2900 | return strip;
|
2901 | };
|
2902 |
|
2903 | WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) {
|
2904 | return mustache.strip;
|
2905 | };
|
2906 |
|
2907 | WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) {
|
2908 |
|
2909 | var strip = node.strip || {};
|
2910 | return {
|
2911 | inlineStandalone: true,
|
2912 | open: strip.open,
|
2913 | close: strip.close
|
2914 | };
|
2915 | };
|
2916 |
|
2917 | function isPrevWhitespace(body, i, isRoot) {
|
2918 | if (i === undefined) {
|
2919 | i = body.length;
|
2920 | }
|
2921 |
|
2922 |
|
2923 |
|
2924 | var prev = body[i - 1],
|
2925 | sibling = body[i - 2];
|
2926 | if (!prev) {
|
2927 | return isRoot;
|
2928 | }
|
2929 |
|
2930 | if (prev.type === 'ContentStatement') {
|
2931 | return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
|
2932 | }
|
2933 | }
|
2934 | function isNextWhitespace(body, i, isRoot) {
|
2935 | if (i === undefined) {
|
2936 | i = -1;
|
2937 | }
|
2938 |
|
2939 | var next = body[i + 1],
|
2940 | sibling = body[i + 2];
|
2941 | if (!next) {
|
2942 | return isRoot;
|
2943 | }
|
2944 |
|
2945 | if (next.type === 'ContentStatement') {
|
2946 | return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
|
2947 | }
|
2948 | }
|
2949 |
|
2950 |
|
2951 |
|
2952 |
|
2953 |
|
2954 |
|
2955 |
|
2956 |
|
2957 | function omitRight(body, i, multiple) {
|
2958 | var current = body[i == null ? 0 : i + 1];
|
2959 | if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) {
|
2960 | return;
|
2961 | }
|
2962 |
|
2963 | var original = current.value;
|
2964 | current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, '');
|
2965 | current.rightStripped = current.value !== original;
|
2966 | }
|
2967 |
|
2968 |
|
2969 |
|
2970 |
|
2971 |
|
2972 |
|
2973 |
|
2974 |
|
2975 | function omitLeft(body, i, multiple) {
|
2976 | var current = body[i == null ? body.length - 1 : i - 1];
|
2977 | if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) {
|
2978 | return;
|
2979 | }
|
2980 |
|
2981 |
|
2982 | var original = current.value;
|
2983 | current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, '');
|
2984 | current.leftStripped = current.value !== original;
|
2985 | return current.leftStripped;
|
2986 | }
|
2987 |
|
2988 | exports['default'] = WhitespaceControl;
|
2989 | module.exports = exports['default'];
|
2990 |
|
2991 | }),
|
2992 |
|
2993 | (function(module, exports, __webpack_require__) {
|
2994 |
|
2995 | 'use strict';
|
2996 |
|
2997 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
2998 |
|
2999 | exports.__esModule = true;
|
3000 |
|
3001 | var _exception = __webpack_require__(6);
|
3002 |
|
3003 | var _exception2 = _interopRequireDefault(_exception);
|
3004 |
|
3005 | function Visitor() {
|
3006 | this.parents = [];
|
3007 | }
|
3008 |
|
3009 | Visitor.prototype = {
|
3010 | constructor: Visitor,
|
3011 | mutating: false,
|
3012 |
|
3013 | // Visits a given value. If mutating, will replace the value if necessary.
|
3014 | acceptKey: function acceptKey(node, name) {
|
3015 | var value = this.accept(node[name]);
|
3016 | if (this.mutating) {
|
3017 |
|
3018 |
|
3019 | if (value && !Visitor.prototype[value.type]) {
|
3020 | throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
|
3021 | }
|
3022 | node[name] = value;
|
3023 | }
|
3024 | },
|
3025 |
|
3026 |
|
3027 |
|
3028 | acceptRequired: function acceptRequired(node, name) {
|
3029 | this.acceptKey(node, name);
|
3030 |
|
3031 | if (!node[name]) {
|
3032 | throw new _exception2['default'](node.type + ' requires ' + name);
|
3033 | }
|
3034 | },
|
3035 |
|
3036 |
|
3037 |
|
3038 | acceptArray: function acceptArray(array) {
|
3039 | for (var i = 0, l = array.length; i < l; i++) {
|
3040 | this.acceptKey(array, i);
|
3041 |
|
3042 | if (!array[i]) {
|
3043 | array.splice(i, 1);
|
3044 | i--;
|
3045 | l--;
|
3046 | }
|
3047 | }
|
3048 | },
|
3049 |
|
3050 | accept: function accept(object) {
|
3051 | if (!object) {
|
3052 | return;
|
3053 | }
|
3054 |
|
3055 |
|
3056 | if (!this[object.type]) {
|
3057 | throw new _exception2['default']('Unknown type: ' + object.type, object);
|
3058 | }
|
3059 |
|
3060 | if (this.current) {
|
3061 | this.parents.unshift(this.current);
|
3062 | }
|
3063 | this.current = object;
|
3064 |
|
3065 | var ret = this[object.type](object);
|
3066 |
|
3067 | this.current = this.parents.shift();
|
3068 |
|
3069 | if (!this.mutating || ret) {
|
3070 | return ret;
|
3071 | } else if (ret !== false) {
|
3072 | return object;
|
3073 | }
|
3074 | },
|
3075 |
|
3076 | Program: function Program(program) {
|
3077 | this.acceptArray(program.body);
|
3078 | },
|
3079 |
|
3080 | MustacheStatement: visitSubExpression,
|
3081 | Decorator: visitSubExpression,
|
3082 |
|
3083 | BlockStatement: visitBlock,
|
3084 | DecoratorBlock: visitBlock,
|
3085 |
|
3086 | PartialStatement: visitPartial,
|
3087 | PartialBlockStatement: function PartialBlockStatement(partial) {
|
3088 | visitPartial.call(this, partial);
|
3089 |
|
3090 | this.acceptKey(partial, 'program');
|
3091 | },
|
3092 |
|
3093 | ContentStatement: function ContentStatement() /* content */{},
|
3094 | CommentStatement: function CommentStatement() /* comment */{},
|
3095 |
|
3096 | SubExpression: visitSubExpression,
|
3097 |
|
3098 | PathExpression: function PathExpression() /* path */{},
|
3099 |
|
3100 | StringLiteral: function StringLiteral() /* string */{},
|
3101 | NumberLiteral: function NumberLiteral() /* number */{},
|
3102 | BooleanLiteral: function BooleanLiteral() /* bool */{},
|
3103 | UndefinedLiteral: function UndefinedLiteral() /* literal */{},
|
3104 | NullLiteral: function NullLiteral() /* literal */{},
|
3105 |
|
3106 | Hash: function Hash(hash) {
|
3107 | this.acceptArray(hash.pairs);
|
3108 | },
|
3109 | HashPair: function HashPair(pair) {
|
3110 | this.acceptRequired(pair, 'value');
|
3111 | }
|
3112 | };
|
3113 |
|
3114 | function visitSubExpression(mustache) {
|
3115 | this.acceptRequired(mustache, 'path');
|
3116 | this.acceptArray(mustache.params);
|
3117 | this.acceptKey(mustache, 'hash');
|
3118 | }
|
3119 | function visitBlock(block) {
|
3120 | visitSubExpression.call(this, block);
|
3121 |
|
3122 | this.acceptKey(block, 'program');
|
3123 | this.acceptKey(block, 'inverse');
|
3124 | }
|
3125 | function visitPartial(partial) {
|
3126 | this.acceptRequired(partial, 'name');
|
3127 | this.acceptArray(partial.params);
|
3128 | this.acceptKey(partial, 'hash');
|
3129 | }
|
3130 |
|
3131 | exports['default'] = Visitor;
|
3132 | module.exports = exports['default'];
|
3133 |
|
3134 | }),
|
3135 |
|
3136 | (function(module, exports, __webpack_require__) {
|
3137 |
|
3138 | 'use strict';
|
3139 |
|
3140 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
3141 |
|
3142 | exports.__esModule = true;
|
3143 | exports.SourceLocation = SourceLocation;
|
3144 | exports.id = id;
|
3145 | exports.stripFlags = stripFlags;
|
3146 | exports.stripComment = stripComment;
|
3147 | exports.preparePath = preparePath;
|
3148 | exports.prepareMustache = prepareMustache;
|
3149 | exports.prepareRawBlock = prepareRawBlock;
|
3150 | exports.prepareBlock = prepareBlock;
|
3151 | exports.prepareProgram = prepareProgram;
|
3152 | exports.preparePartialBlock = preparePartialBlock;
|
3153 |
|
3154 | var _exception = __webpack_require__(6);
|
3155 |
|
3156 | var _exception2 = _interopRequireDefault(_exception);
|
3157 |
|
3158 | function validateClose(open, close) {
|
3159 | close = close.path ? close.path.original : close;
|
3160 |
|
3161 | if (open.path.original !== close) {
|
3162 | var errorNode = { loc: open.path.loc };
|
3163 |
|
3164 | throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode);
|
3165 | }
|
3166 | }
|
3167 |
|
3168 | function SourceLocation(source, locInfo) {
|
3169 | this.source = source;
|
3170 | this.start = {
|
3171 | line: locInfo.first_line,
|
3172 | column: locInfo.first_column
|
3173 | };
|
3174 | this.end = {
|
3175 | line: locInfo.last_line,
|
3176 | column: locInfo.last_column
|
3177 | };
|
3178 | }
|
3179 |
|
3180 | function id(token) {
|
3181 | if (/^\[.*\]$/.test(token)) {
|
3182 | return token.substr(1, token.length - 2);
|
3183 | } else {
|
3184 | return token;
|
3185 | }
|
3186 | }
|
3187 |
|
3188 | function stripFlags(open, close) {
|
3189 | return {
|
3190 | open: open.charAt(2) === '~',
|
3191 | close: close.charAt(close.length - 3) === '~'
|
3192 | };
|
3193 | }
|
3194 |
|
3195 | function stripComment(comment) {
|
3196 | return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, '');
|
3197 | }
|
3198 |
|
3199 | function preparePath(data, parts, loc) {
|
3200 | loc = this.locInfo(loc);
|
3201 |
|
3202 | var original = data ? '@' : '',
|
3203 | dig = [],
|
3204 | depth = 0;
|
3205 |
|
3206 | for (var i = 0, l = parts.length; i < l; i++) {
|
3207 | var part = parts[i].part,
|
3208 |
|
3209 |
|
3210 |
|
3211 | isLiteral = parts[i].original !== part;
|
3212 | original += (parts[i].separator || '') + part;
|
3213 |
|
3214 | if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
|
3215 | if (dig.length > 0) {
|
3216 | throw new _exception2['default']('Invalid path: ' + original, { loc: loc });
|
3217 | } else if (part === '..') {
|
3218 | depth++;
|
3219 | }
|
3220 | } else {
|
3221 | dig.push(part);
|
3222 | }
|
3223 | }
|
3224 |
|
3225 | return {
|
3226 | type: 'PathExpression',
|
3227 | data: data,
|
3228 | depth: depth,
|
3229 | parts: dig,
|
3230 | original: original,
|
3231 | loc: loc
|
3232 | };
|
3233 | }
|
3234 |
|
3235 | function prepareMustache(path, params, hash, open, strip, locInfo) {
|
3236 |
|
3237 | var escapeFlag = open.charAt(3) || open.charAt(2),
|
3238 | escaped = escapeFlag !== '{' && escapeFlag !== '&';
|
3239 |
|
3240 | var decorator = /\*/.test(open);
|
3241 | return {
|
3242 | type: decorator ? 'Decorator' : 'MustacheStatement',
|
3243 | path: path,
|
3244 | params: params,
|
3245 | hash: hash,
|
3246 | escaped: escaped,
|
3247 | strip: strip,
|
3248 | loc: this.locInfo(locInfo)
|
3249 | };
|
3250 | }
|
3251 |
|
3252 | function prepareRawBlock(openRawBlock, contents, close, locInfo) {
|
3253 | validateClose(openRawBlock, close);
|
3254 |
|
3255 | locInfo = this.locInfo(locInfo);
|
3256 | var program = {
|
3257 | type: 'Program',
|
3258 | body: contents,
|
3259 | strip: {},
|
3260 | loc: locInfo
|
3261 | };
|
3262 |
|
3263 | return {
|
3264 | type: 'BlockStatement',
|
3265 | path: openRawBlock.path,
|
3266 | params: openRawBlock.params,
|
3267 | hash: openRawBlock.hash,
|
3268 | program: program,
|
3269 | openStrip: {},
|
3270 | inverseStrip: {},
|
3271 | closeStrip: {},
|
3272 | loc: locInfo
|
3273 | };
|
3274 | }
|
3275 |
|
3276 | function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
|
3277 | if (close && close.path) {
|
3278 | validateClose(openBlock, close);
|
3279 | }
|
3280 |
|
3281 | var decorator = /\*/.test(openBlock.open);
|
3282 |
|
3283 | program.blockParams = openBlock.blockParams;
|
3284 |
|
3285 | var inverse = undefined,
|
3286 | inverseStrip = undefined;
|
3287 |
|
3288 | if (inverseAndProgram) {
|
3289 | if (decorator) {
|
3290 | throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram);
|
3291 | }
|
3292 |
|
3293 | if (inverseAndProgram.chain) {
|
3294 | inverseAndProgram.program.body[0].closeStrip = close.strip;
|
3295 | }
|
3296 |
|
3297 | inverseStrip = inverseAndProgram.strip;
|
3298 | inverse = inverseAndProgram.program;
|
3299 | }
|
3300 |
|
3301 | if (inverted) {
|
3302 | inverted = inverse;
|
3303 | inverse = program;
|
3304 | program = inverted;
|
3305 | }
|
3306 |
|
3307 | return {
|
3308 | type: decorator ? 'DecoratorBlock' : 'BlockStatement',
|
3309 | path: openBlock.path,
|
3310 | params: openBlock.params,
|
3311 | hash: openBlock.hash,
|
3312 | program: program,
|
3313 | inverse: inverse,
|
3314 | openStrip: openBlock.strip,
|
3315 | inverseStrip: inverseStrip,
|
3316 | closeStrip: close && close.strip,
|
3317 | loc: this.locInfo(locInfo)
|
3318 | };
|
3319 | }
|
3320 |
|
3321 | function prepareProgram(statements, loc) {
|
3322 | if (!loc && statements.length) {
|
3323 | var firstLoc = statements[0].loc,
|
3324 | lastLoc = statements[statements.length - 1].loc;
|
3325 |
|
3326 |
|
3327 | if (firstLoc && lastLoc) {
|
3328 | loc = {
|
3329 | source: firstLoc.source,
|
3330 | start: {
|
3331 | line: firstLoc.start.line,
|
3332 | column: firstLoc.start.column
|
3333 | },
|
3334 | end: {
|
3335 | line: lastLoc.end.line,
|
3336 | column: lastLoc.end.column
|
3337 | }
|
3338 | };
|
3339 | }
|
3340 | }
|
3341 |
|
3342 | return {
|
3343 | type: 'Program',
|
3344 | body: statements,
|
3345 | strip: {},
|
3346 | loc: loc
|
3347 | };
|
3348 | }
|
3349 |
|
3350 | function preparePartialBlock(open, program, close, locInfo) {
|
3351 | validateClose(open, close);
|
3352 |
|
3353 | return {
|
3354 | type: 'PartialBlockStatement',
|
3355 | name: open.path,
|
3356 | params: open.params,
|
3357 | hash: open.hash,
|
3358 | program: program,
|
3359 | openStrip: open.strip,
|
3360 | closeStrip: close && close.strip,
|
3361 | loc: this.locInfo(locInfo)
|
3362 | };
|
3363 | }
|
3364 |
|
3365 | }),
|
3366 |
|
3367 | (function(module, exports, __webpack_require__) {
|
3368 |
|
3369 |
|
3370 |
|
3371 | 'use strict';
|
3372 |
|
3373 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
3374 |
|
3375 | exports.__esModule = true;
|
3376 | exports.Compiler = Compiler;
|
3377 | exports.precompile = precompile;
|
3378 | exports.compile = compile;
|
3379 |
|
3380 | var _exception = __webpack_require__(6);
|
3381 |
|
3382 | var _exception2 = _interopRequireDefault(_exception);
|
3383 |
|
3384 | var _utils = __webpack_require__(5);
|
3385 |
|
3386 | var _ast = __webpack_require__(35);
|
3387 |
|
3388 | var _ast2 = _interopRequireDefault(_ast);
|
3389 |
|
3390 | var slice = [].slice;
|
3391 |
|
3392 | function Compiler() {}
|
3393 |
|
3394 |
|
3395 |
|
3396 |
|
3397 |
|
3398 |
|
3399 | Compiler.prototype = {
|
3400 | compiler: Compiler,
|
3401 |
|
3402 | equals: function equals(other) {
|
3403 | var len = this.opcodes.length;
|
3404 | if (other.opcodes.length !== len) {
|
3405 | return false;
|
3406 | }
|
3407 |
|
3408 | for (var i = 0; i < len; i++) {
|
3409 | var opcode = this.opcodes[i],
|
3410 | otherOpcode = other.opcodes[i];
|
3411 | if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
|
3412 | return false;
|
3413 | }
|
3414 | }
|
3415 |
|
3416 |
|
3417 |
|
3418 | len = this.children.length;
|
3419 | for (var i = 0; i < len; i++) {
|
3420 | if (!this.children[i].equals(other.children[i])) {
|
3421 | return false;
|
3422 | }
|
3423 | }
|
3424 |
|
3425 | return true;
|
3426 | },
|
3427 |
|
3428 | guid: 0,
|
3429 |
|
3430 | compile: function compile(program, options) {
|
3431 | this.sourceNode = [];
|
3432 | this.opcodes = [];
|
3433 | this.children = [];
|
3434 | this.options = options;
|
3435 | this.stringParams = options.stringParams;
|
3436 | this.trackIds = options.trackIds;
|
3437 |
|
3438 | options.blockParams = options.blockParams || [];
|
3439 |
|
3440 |
|
3441 | var knownHelpers = options.knownHelpers;
|
3442 | options.knownHelpers = {
|
3443 | 'helperMissing': true,
|
3444 | 'blockHelperMissing': true,
|
3445 | 'each': true,
|
3446 | 'if': true,
|
3447 | 'unless': true,
|
3448 | 'with': true,
|
3449 | 'log': true,
|
3450 | 'lookup': true
|
3451 | };
|
3452 | if (knownHelpers) {
|
3453 |
|
3454 |
|
3455 |
|
3456 | for (var _name in knownHelpers) {
|
3457 | this.options.knownHelpers[_name] = knownHelpers[_name];
|
3458 | }
|
3459 | }
|
3460 |
|
3461 | return this.accept(program);
|
3462 | },
|
3463 |
|
3464 | compileProgram: function compileProgram(program) {
|
3465 | var childCompiler = new this.compiler(),
|
3466 |
|
3467 | result = childCompiler.compile(program, this.options),
|
3468 | guid = this.guid++;
|
3469 |
|
3470 | this.usePartial = this.usePartial || result.usePartial;
|
3471 |
|
3472 | this.children[guid] = result;
|
3473 | this.useDepths = this.useDepths || result.useDepths;
|
3474 |
|
3475 | return guid;
|
3476 | },
|
3477 |
|
3478 | accept: function accept(node) {
|
3479 |
|
3480 | if (!this[node.type]) {
|
3481 | throw new _exception2['default']('Unknown type: ' + node.type, node);
|
3482 | }
|
3483 |
|
3484 | this.sourceNode.unshift(node);
|
3485 | var ret = this[node.type](node);
|
3486 | this.sourceNode.shift();
|
3487 | return ret;
|
3488 | },
|
3489 |
|
3490 | Program: function Program(program) {
|
3491 | this.options.blockParams.unshift(program.blockParams);
|
3492 |
|
3493 | var body = program.body,
|
3494 | bodyLength = body.length;
|
3495 | for (var i = 0; i < bodyLength; i++) {
|
3496 | this.accept(body[i]);
|
3497 | }
|
3498 |
|
3499 | this.options.blockParams.shift();
|
3500 |
|
3501 | this.isSimple = bodyLength === 1;
|
3502 | this.blockParams = program.blockParams ? program.blockParams.length : 0;
|
3503 |
|
3504 | return this;
|
3505 | },
|
3506 |
|
3507 | BlockStatement: function BlockStatement(block) {
|
3508 | transformLiteralToPath(block);
|
3509 |
|
3510 | var program = block.program,
|
3511 | inverse = block.inverse;
|
3512 |
|
3513 | program = program && this.compileProgram(program);
|
3514 | inverse = inverse && this.compileProgram(inverse);
|
3515 |
|
3516 | var type = this.classifySexpr(block);
|
3517 |
|
3518 | if (type === 'helper') {
|
3519 | this.helperSexpr(block, program, inverse);
|
3520 | } else if (type === 'simple') {
|
3521 | this.simpleSexpr(block);
|
3522 |
|
3523 |
|
3524 |
|
3525 | this.opcode('pushProgram', program);
|
3526 | this.opcode('pushProgram', inverse);
|
3527 | this.opcode('emptyHash');
|
3528 | this.opcode('blockValue', block.path.original);
|
3529 | } else {
|
3530 | this.ambiguousSexpr(block, program, inverse);
|
3531 |
|
3532 |
|
3533 |
|
3534 | this.opcode('pushProgram', program);
|
3535 | this.opcode('pushProgram', inverse);
|
3536 | this.opcode('emptyHash');
|
3537 | this.opcode('ambiguousBlockValue');
|
3538 | }
|
3539 |
|
3540 | this.opcode('append');
|
3541 | },
|
3542 |
|
3543 | DecoratorBlock: function DecoratorBlock(decorator) {
|
3544 | var program = decorator.program && this.compileProgram(decorator.program);
|
3545 | var params = this.setupFullMustacheParams(decorator, program, undefined),
|
3546 | path = decorator.path;
|
3547 |
|
3548 | this.useDecorators = true;
|
3549 | this.opcode('registerDecorator', params.length, path.original);
|
3550 | },
|
3551 |
|
3552 | PartialStatement: function PartialStatement(partial) {
|
3553 | this.usePartial = true;
|
3554 |
|
3555 | var program = partial.program;
|
3556 | if (program) {
|
3557 | program = this.compileProgram(partial.program);
|
3558 | }
|
3559 |
|
3560 | var params = partial.params;
|
3561 | if (params.length > 1) {
|
3562 | throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);
|
3563 | } else if (!params.length) {
|
3564 | if (this.options.explicitPartialContext) {
|
3565 | this.opcode('pushLiteral', 'undefined');
|
3566 | } else {
|
3567 | params.push({ type: 'PathExpression', parts: [], depth: 0 });
|
3568 | }
|
3569 | }
|
3570 |
|
3571 | var partialName = partial.name.original,
|
3572 | isDynamic = partial.name.type === 'SubExpression';
|
3573 | if (isDynamic) {
|
3574 | this.accept(partial.name);
|
3575 | }
|
3576 |
|
3577 | this.setupFullMustacheParams(partial, program, undefined, true);
|
3578 |
|
3579 | var indent = partial.indent || '';
|
3580 | if (this.options.preventIndent && indent) {
|
3581 | this.opcode('appendContent', indent);
|
3582 | indent = '';
|
3583 | }
|
3584 |
|
3585 | this.opcode('invokePartial', isDynamic, partialName, indent);
|
3586 | this.opcode('append');
|
3587 | },
|
3588 | PartialBlockStatement: function PartialBlockStatement(partialBlock) {
|
3589 | this.PartialStatement(partialBlock);
|
3590 | },
|
3591 |
|
3592 | MustacheStatement: function MustacheStatement(mustache) {
|
3593 | this.SubExpression(mustache);
|
3594 |
|
3595 | if (mustache.escaped && !this.options.noEscape) {
|
3596 | this.opcode('appendEscaped');
|
3597 | } else {
|
3598 | this.opcode('append');
|
3599 | }
|
3600 | },
|
3601 | Decorator: function Decorator(decorator) {
|
3602 | this.DecoratorBlock(decorator);
|
3603 | },
|
3604 |
|
3605 | ContentStatement: function ContentStatement(content) {
|
3606 | if (content.value) {
|
3607 | this.opcode('appendContent', content.value);
|
3608 | }
|
3609 | },
|
3610 |
|
3611 | CommentStatement: function CommentStatement() {},
|
3612 |
|
3613 | SubExpression: function SubExpression(sexpr) {
|
3614 | transformLiteralToPath(sexpr);
|
3615 | var type = this.classifySexpr(sexpr);
|
3616 |
|
3617 | if (type === 'simple') {
|
3618 | this.simpleSexpr(sexpr);
|
3619 | } else if (type === 'helper') {
|
3620 | this.helperSexpr(sexpr);
|
3621 | } else {
|
3622 | this.ambiguousSexpr(sexpr);
|
3623 | }
|
3624 | },
|
3625 | ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
|
3626 | var path = sexpr.path,
|
3627 | name = path.parts[0],
|
3628 | isBlock = program != null || inverse != null;
|
3629 |
|
3630 | this.opcode('getContext', path.depth);
|
3631 |
|
3632 | this.opcode('pushProgram', program);
|
3633 | this.opcode('pushProgram', inverse);
|
3634 |
|
3635 | path.strict = true;
|
3636 | this.accept(path);
|
3637 |
|
3638 | this.opcode('invokeAmbiguous', name, isBlock);
|
3639 | },
|
3640 |
|
3641 | simpleSexpr: function simpleSexpr(sexpr) {
|
3642 | var path = sexpr.path;
|
3643 | path.strict = true;
|
3644 | this.accept(path);
|
3645 | this.opcode('resolvePossibleLambda');
|
3646 | },
|
3647 |
|
3648 | helperSexpr: function helperSexpr(sexpr, program, inverse) {
|
3649 | var params = this.setupFullMustacheParams(sexpr, program, inverse),
|
3650 | path = sexpr.path,
|
3651 | name = path.parts[0];
|
3652 |
|
3653 | if (this.options.knownHelpers[name]) {
|
3654 | this.opcode('invokeKnownHelper', params.length, name);
|
3655 | } else if (this.options.knownHelpersOnly) {
|
3656 | throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
|
3657 | } else {
|
3658 | path.strict = true;
|
3659 | path.falsy = true;
|
3660 |
|
3661 | this.accept(path);
|
3662 | this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path));
|
3663 | }
|
3664 | },
|
3665 |
|
3666 | PathExpression: function PathExpression(path) {
|
3667 | this.addDepth(path.depth);
|
3668 | this.opcode('getContext', path.depth);
|
3669 |
|
3670 | var name = path.parts[0],
|
3671 | scoped = _ast2['default'].helpers.scopedId(path),
|
3672 | blockParamId = !path.depth && !scoped && this.blockParamIndex(name);
|
3673 |
|
3674 | if (blockParamId) {
|
3675 | this.opcode('lookupBlockParam', blockParamId, path.parts);
|
3676 | } else if (!name) {
|
3677 |
|
3678 | this.opcode('pushContext');
|
3679 | } else if (path.data) {
|
3680 | this.options.data = true;
|
3681 | this.opcode('lookupData', path.depth, path.parts, path.strict);
|
3682 | } else {
|
3683 | this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped);
|
3684 | }
|
3685 | },
|
3686 |
|
3687 | StringLiteral: function StringLiteral(string) {
|
3688 | this.opcode('pushString', string.value);
|
3689 | },
|
3690 |
|
3691 | NumberLiteral: function NumberLiteral(number) {
|
3692 | this.opcode('pushLiteral', number.value);
|
3693 | },
|
3694 |
|
3695 | BooleanLiteral: function BooleanLiteral(bool) {
|
3696 | this.opcode('pushLiteral', bool.value);
|
3697 | },
|
3698 |
|
3699 | UndefinedLiteral: function UndefinedLiteral() {
|
3700 | this.opcode('pushLiteral', 'undefined');
|
3701 | },
|
3702 |
|
3703 | NullLiteral: function NullLiteral() {
|
3704 | this.opcode('pushLiteral', 'null');
|
3705 | },
|
3706 |
|
3707 | Hash: function Hash(hash) {
|
3708 | var pairs = hash.pairs,
|
3709 | i = 0,
|
3710 | l = pairs.length;
|
3711 |
|
3712 | this.opcode('pushHash');
|
3713 |
|
3714 | for (; i < l; i++) {
|
3715 | this.pushParam(pairs[i].value);
|
3716 | }
|
3717 | while (i--) {
|
3718 | this.opcode('assignToHash', pairs[i].key);
|
3719 | }
|
3720 | this.opcode('popHash');
|
3721 | },
|
3722 |
|
3723 |
|
3724 | opcode: function opcode(name) {
|
3725 | this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc });
|
3726 | },
|
3727 |
|
3728 | addDepth: function addDepth(depth) {
|
3729 | if (!depth) {
|
3730 | return;
|
3731 | }
|
3732 |
|
3733 | this.useDepths = true;
|
3734 | },
|
3735 |
|
3736 | classifySexpr: function classifySexpr(sexpr) {
|
3737 | var isSimple = _ast2['default'].helpers.simpleId(sexpr.path);
|
3738 |
|
3739 | var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
|
3740 |
|
3741 |
|
3742 |
|
3743 | var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr);
|
3744 |
|
3745 |
|
3746 |
|
3747 |
|
3748 | var isEligible = !isBlockParam && (isHelper || isSimple);
|
3749 |
|
3750 |
|
3751 |
|
3752 | if (isEligible && !isHelper) {
|
3753 | var _name2 = sexpr.path.parts[0],
|
3754 | options = this.options;
|
3755 |
|
3756 | if (options.knownHelpers[_name2]) {
|
3757 | isHelper = true;
|
3758 | } else if (options.knownHelpersOnly) {
|
3759 | isEligible = false;
|
3760 | }
|
3761 | }
|
3762 |
|
3763 | if (isHelper) {
|
3764 | return 'helper';
|
3765 | } else if (isEligible) {
|
3766 | return 'ambiguous';
|
3767 | } else {
|
3768 | return 'simple';
|
3769 | }
|
3770 | },
|
3771 |
|
3772 | pushParams: function pushParams(params) {
|
3773 | for (var i = 0, l = params.length; i < l; i++) {
|
3774 | this.pushParam(params[i]);
|
3775 | }
|
3776 | },
|
3777 |
|
3778 | pushParam: function pushParam(val) {
|
3779 | var value = val.value != null ? val.value : val.original || '';
|
3780 |
|
3781 | if (this.stringParams) {
|
3782 | if (value.replace) {
|
3783 | value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
|
3784 | }
|
3785 |
|
3786 | if (val.depth) {
|
3787 | this.addDepth(val.depth);
|
3788 | }
|
3789 | this.opcode('getContext', val.depth || 0);
|
3790 | this.opcode('pushStringParam', value, val.type);
|
3791 |
|
3792 | if (val.type === 'SubExpression') {
|
3793 |
|
3794 |
|
3795 | this.accept(val);
|
3796 | }
|
3797 | } else {
|
3798 | if (this.trackIds) {
|
3799 | var blockParamIndex = undefined;
|
3800 | if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) {
|
3801 | blockParamIndex = this.blockParamIndex(val.parts[0]);
|
3802 | }
|
3803 | if (blockParamIndex) {
|
3804 | var blockParamChild = val.parts.slice(1).join('.');
|
3805 | this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
|
3806 | } else {
|
3807 | value = val.original || value;
|
3808 | if (value.replace) {
|
3809 | value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, '');
|
3810 | }
|
3811 |
|
3812 | this.opcode('pushId', val.type, value);
|
3813 | }
|
3814 | }
|
3815 | this.accept(val);
|
3816 | }
|
3817 | },
|
3818 |
|
3819 | setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
|
3820 | var params = sexpr.params;
|
3821 | this.pushParams(params);
|
3822 |
|
3823 | this.opcode('pushProgram', program);
|
3824 | this.opcode('pushProgram', inverse);
|
3825 |
|
3826 | if (sexpr.hash) {
|
3827 | this.accept(sexpr.hash);
|
3828 | } else {
|
3829 | this.opcode('emptyHash', omitEmpty);
|
3830 | }
|
3831 |
|
3832 | return params;
|
3833 | },
|
3834 |
|
3835 | blockParamIndex: function blockParamIndex(name) {
|
3836 | for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
|
3837 | var blockParams = this.options.blockParams[depth],
|
3838 | param = blockParams && _utils.indexOf(blockParams, name);
|
3839 | if (blockParams && param >= 0) {
|
3840 | return [depth, param];
|
3841 | }
|
3842 | }
|
3843 | }
|
3844 | };
|
3845 |
|
3846 | function precompile(input, options, env) {
|
3847 | if (input == null || typeof input !== 'string' && input.type !== 'Program') {
|
3848 | throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
|
3849 | }
|
3850 |
|
3851 | options = options || {};
|
3852 | if (!('data' in options)) {
|
3853 | options.data = true;
|
3854 | }
|
3855 | if (options.compat) {
|
3856 | options.useDepths = true;
|
3857 | }
|
3858 |
|
3859 | var ast = env.parse(input, options),
|
3860 | environment = new env.Compiler().compile(ast, options);
|
3861 | return new env.JavaScriptCompiler().compile(environment, options);
|
3862 | }
|
3863 |
|
3864 | function compile(input, options, env) {
|
3865 | if (options === undefined) options = {};
|
3866 |
|
3867 | if (input == null || typeof input !== 'string' && input.type !== 'Program') {
|
3868 | throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
|
3869 | }
|
3870 |
|
3871 | options = _utils.extend({}, options);
|
3872 | if (!('data' in options)) {
|
3873 | options.data = true;
|
3874 | }
|
3875 | if (options.compat) {
|
3876 | options.useDepths = true;
|
3877 | }
|
3878 |
|
3879 | var compiled = undefined;
|
3880 |
|
3881 | function compileInput() {
|
3882 | var ast = env.parse(input, options),
|
3883 | environment = new env.Compiler().compile(ast, options),
|
3884 | templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
|
3885 | return env.template(templateSpec);
|
3886 | }
|
3887 |
|
3888 |
|
3889 | function ret(context, execOptions) {
|
3890 | if (!compiled) {
|
3891 | compiled = compileInput();
|
3892 | }
|
3893 | return compiled.call(this, context, execOptions);
|
3894 | }
|
3895 | ret._setup = function (setupOptions) {
|
3896 | if (!compiled) {
|
3897 | compiled = compileInput();
|
3898 | }
|
3899 | return compiled._setup(setupOptions);
|
3900 | };
|
3901 | ret._child = function (i, data, blockParams, depths) {
|
3902 | if (!compiled) {
|
3903 | compiled = compileInput();
|
3904 | }
|
3905 | return compiled._child(i, data, blockParams, depths);
|
3906 | };
|
3907 | return ret;
|
3908 | }
|
3909 |
|
3910 | function argEquals(a, b) {
|
3911 | if (a === b) {
|
3912 | return true;
|
3913 | }
|
3914 |
|
3915 | if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) {
|
3916 | for (var i = 0; i < a.length; i++) {
|
3917 | if (!argEquals(a[i], b[i])) {
|
3918 | return false;
|
3919 | }
|
3920 | }
|
3921 | return true;
|
3922 | }
|
3923 | }
|
3924 |
|
3925 | function transformLiteralToPath(sexpr) {
|
3926 | if (!sexpr.path.parts) {
|
3927 | var literal = sexpr.path;
|
3928 |
|
3929 |
|
3930 | sexpr.path = {
|
3931 | type: 'PathExpression',
|
3932 | data: false,
|
3933 | depth: 0,
|
3934 | parts: [literal.original + ''],
|
3935 | original: literal.original + '',
|
3936 | loc: literal.loc
|
3937 | };
|
3938 | }
|
3939 | }
|
3940 |
|
3941 | }),
|
3942 |
|
3943 | (function(module, exports, __webpack_require__) {
|
3944 |
|
3945 | 'use strict';
|
3946 |
|
3947 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
3948 |
|
3949 | exports.__esModule = true;
|
3950 |
|
3951 | var _base = __webpack_require__(4);
|
3952 |
|
3953 | var _exception = __webpack_require__(6);
|
3954 |
|
3955 | var _exception2 = _interopRequireDefault(_exception);
|
3956 |
|
3957 | var _utils = __webpack_require__(5);
|
3958 |
|
3959 | var _codeGen = __webpack_require__(43);
|
3960 |
|
3961 | var _codeGen2 = _interopRequireDefault(_codeGen);
|
3962 |
|
3963 | function Literal(value) {
|
3964 | this.value = value;
|
3965 | }
|
3966 |
|
3967 | function JavaScriptCompiler() {}
|
3968 |
|
3969 | JavaScriptCompiler.prototype = {
|
3970 |
|
3971 |
|
3972 | nameLookup: function nameLookup(parent, name /* , type*/) {
|
3973 | if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
|
3974 | return [parent, '.', name];
|
3975 | } else {
|
3976 | return [parent, '[', JSON.stringify(name), ']'];
|
3977 | }
|
3978 | },
|
3979 | depthedLookup: function depthedLookup(name) {
|
3980 | return [this.aliasable('container.lookup'), '(depths, "', name, '")'];
|
3981 | },
|
3982 |
|
3983 | compilerInfo: function compilerInfo() {
|
3984 | var revision = _base.COMPILER_REVISION,
|
3985 | versions = _base.REVISION_CHANGES[revision];
|
3986 | return [revision, versions];
|
3987 | },
|
3988 |
|
3989 | appendToBuffer: function appendToBuffer(source, location, explicit) {
|
3990 |
|
3991 | if (!_utils.isArray(source)) {
|
3992 | source = [source];
|
3993 | }
|
3994 | source = this.source.wrap(source, location);
|
3995 |
|
3996 | if (this.environment.isSimple) {
|
3997 | return ['return ', source, ';'];
|
3998 | } else if (explicit) {
|
3999 |
|
4000 |
|
4001 |
|
4002 | return ['buffer += ', source, ';'];
|
4003 | } else {
|
4004 | source.appendToBuffer = true;
|
4005 | return source;
|
4006 | }
|
4007 | },
|
4008 |
|
4009 | initializeBuffer: function initializeBuffer() {
|
4010 | return this.quotedString('');
|
4011 | },
|
4012 |
|
4013 |
|
4014 | compile: function compile(environment, options, context, asObject) {
|
4015 | this.environment = environment;
|
4016 | this.options = options;
|
4017 | this.stringParams = this.options.stringParams;
|
4018 | this.trackIds = this.options.trackIds;
|
4019 | this.precompile = !asObject;
|
4020 |
|
4021 | this.name = this.environment.name;
|
4022 | this.isChild = !!context;
|
4023 | this.context = context || {
|
4024 | decorators: [],
|
4025 | programs: [],
|
4026 | environments: []
|
4027 | };
|
4028 |
|
4029 | this.preamble();
|
4030 |
|
4031 | this.stackSlot = 0;
|
4032 | this.stackVars = [];
|
4033 | this.aliases = {};
|
4034 | this.registers = { list: [] };
|
4035 | this.hashes = [];
|
4036 | this.compileStack = [];
|
4037 | this.inlineStack = [];
|
4038 | this.blockParams = [];
|
4039 |
|
4040 | this.compileChildren(environment, options);
|
4041 |
|
4042 | this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;
|
4043 | this.useBlockParams = this.useBlockParams || environment.useBlockParams;
|
4044 |
|
4045 | var opcodes = environment.opcodes,
|
4046 | opcode = undefined,
|
4047 | firstLoc = undefined,
|
4048 | i = undefined,
|
4049 | l = undefined;
|
4050 |
|
4051 | for (i = 0, l = opcodes.length; i < l; i++) {
|
4052 | opcode = opcodes[i];
|
4053 |
|
4054 | this.source.currentLocation = opcode.loc;
|
4055 | firstLoc = firstLoc || opcode.loc;
|
4056 | this[opcode.opcode].apply(this, opcode.args);
|
4057 | }
|
4058 |
|
4059 |
|
4060 | this.source.currentLocation = firstLoc;
|
4061 | this.pushSource('');
|
4062 |
|
4063 |
|
4064 | if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
|
4065 | throw new _exception2['default']('Compile completed with content left on stack');
|
4066 | }
|
4067 |
|
4068 | if (!this.decorators.isEmpty()) {
|
4069 | this.useDecorators = true;
|
4070 |
|
4071 | this.decorators.prepend('var decorators = container.decorators;\n');
|
4072 | this.decorators.push('return fn;');
|
4073 |
|
4074 | if (asObject) {
|
4075 | this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]);
|
4076 | } else {
|
4077 | this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n');
|
4078 | this.decorators.push('}\n');
|
4079 | this.decorators = this.decorators.merge();
|
4080 | }
|
4081 | } else {
|
4082 | this.decorators = undefined;
|
4083 | }
|
4084 |
|
4085 | var fn = this.createFunctionContext(asObject);
|
4086 | if (!this.isChild) {
|
4087 | var ret = {
|
4088 | compiler: this.compilerInfo(),
|
4089 | main: fn
|
4090 | };
|
4091 |
|
4092 | if (this.decorators) {
|
4093 | ret.main_d = this.decorators;
|
4094 | ret.useDecorators = true;
|
4095 | }
|
4096 |
|
4097 | var _context = this.context;
|
4098 | var programs = _context.programs;
|
4099 | var decorators = _context.decorators;
|
4100 |
|
4101 | for (i = 0, l = programs.length; i < l; i++) {
|
4102 | if (programs[i]) {
|
4103 | ret[i] = programs[i];
|
4104 | if (decorators[i]) {
|
4105 | ret[i + '_d'] = decorators[i];
|
4106 | ret.useDecorators = true;
|
4107 | }
|
4108 | }
|
4109 | }
|
4110 |
|
4111 | if (this.environment.usePartial) {
|
4112 | ret.usePartial = true;
|
4113 | }
|
4114 | if (this.options.data) {
|
4115 | ret.useData = true;
|
4116 | }
|
4117 | if (this.useDepths) {
|
4118 | ret.useDepths = true;
|
4119 | }
|
4120 | if (this.useBlockParams) {
|
4121 | ret.useBlockParams = true;
|
4122 | }
|
4123 | if (this.options.compat) {
|
4124 | ret.compat = true;
|
4125 | }
|
4126 |
|
4127 | if (!asObject) {
|
4128 | ret.compiler = JSON.stringify(ret.compiler);
|
4129 |
|
4130 | this.source.currentLocation = { start: { line: 1, column: 0 } };
|
4131 | ret = this.objectLiteral(ret);
|
4132 |
|
4133 | if (options.srcName) {
|
4134 | ret = ret.toStringWithSourceMap({ file: options.destName });
|
4135 | ret.map = ret.map && ret.map.toString();
|
4136 | } else {
|
4137 | ret = ret.toString();
|
4138 | }
|
4139 | } else {
|
4140 | ret.compilerOptions = this.options;
|
4141 | }
|
4142 |
|
4143 | return ret;
|
4144 | } else {
|
4145 | return fn;
|
4146 | }
|
4147 | },
|
4148 |
|
4149 | preamble: function preamble() {
|
4150 |
|
4151 |
|
4152 | this.lastContext = 0;
|
4153 | this.source = new _codeGen2['default'](this.options.srcName);
|
4154 | this.decorators = new _codeGen2['default'](this.options.srcName);
|
4155 | },
|
4156 |
|
4157 | createFunctionContext: function createFunctionContext(asObject) {
|
4158 | var varDeclarations = '';
|
4159 |
|
4160 | var locals = this.stackVars.concat(this.registers.list);
|
4161 | if (locals.length > 0) {
|
4162 | varDeclarations += ', ' + locals.join(', ');
|
4163 | }
|
4164 |
|
4165 |
|
4166 |
|
4167 |
|
4168 |
|
4169 |
|
4170 |
|
4171 | var aliasCount = 0;
|
4172 | for (var alias in this.aliases) {
|
4173 |
|
4174 | var node = this.aliases[alias];
|
4175 |
|
4176 | if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) {
|
4177 | varDeclarations += ', alias' + ++aliasCount + '=' + alias;
|
4178 | node.children[0] = 'alias' + aliasCount;
|
4179 | }
|
4180 | }
|
4181 |
|
4182 | var params = ['container', 'depth0', 'helpers', 'partials', 'data'];
|
4183 |
|
4184 | if (this.useBlockParams || this.useDepths) {
|
4185 | params.push('blockParams');
|
4186 | }
|
4187 | if (this.useDepths) {
|
4188 | params.push('depths');
|
4189 | }
|
4190 |
|
4191 |
|
4192 | var source = this.mergeSource(varDeclarations);
|
4193 |
|
4194 | if (asObject) {
|
4195 | params.push(source);
|
4196 |
|
4197 | return Function.apply(this, params);
|
4198 | } else {
|
4199 | return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']);
|
4200 | }
|
4201 | },
|
4202 | mergeSource: function mergeSource(varDeclarations) {
|
4203 | var isSimple = this.environment.isSimple,
|
4204 | appendOnly = !this.forceBuffer,
|
4205 | appendFirst = undefined,
|
4206 | sourceSeen = undefined,
|
4207 | bufferStart = undefined,
|
4208 | bufferEnd = undefined;
|
4209 | this.source.each(function (line) {
|
4210 | if (line.appendToBuffer) {
|
4211 | if (bufferStart) {
|
4212 | line.prepend(' + ');
|
4213 | } else {
|
4214 | bufferStart = line;
|
4215 | }
|
4216 | bufferEnd = line;
|
4217 | } else {
|
4218 | if (bufferStart) {
|
4219 | if (!sourceSeen) {
|
4220 | appendFirst = true;
|
4221 | } else {
|
4222 | bufferStart.prepend('buffer += ');
|
4223 | }
|
4224 | bufferEnd.add(';');
|
4225 | bufferStart = bufferEnd = undefined;
|
4226 | }
|
4227 |
|
4228 | sourceSeen = true;
|
4229 | if (!isSimple) {
|
4230 | appendOnly = false;
|
4231 | }
|
4232 | }
|
4233 | });
|
4234 |
|
4235 | if (appendOnly) {
|
4236 | if (bufferStart) {
|
4237 | bufferStart.prepend('return ');
|
4238 | bufferEnd.add(';');
|
4239 | } else if (!sourceSeen) {
|
4240 | this.source.push('return "";');
|
4241 | }
|
4242 | } else {
|
4243 | varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());
|
4244 |
|
4245 | if (bufferStart) {
|
4246 | bufferStart.prepend('return buffer + ');
|
4247 | bufferEnd.add(';');
|
4248 | } else {
|
4249 | this.source.push('return buffer;');
|
4250 | }
|
4251 | }
|
4252 |
|
4253 | if (varDeclarations) {
|
4254 | this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n'));
|
4255 | }
|
4256 |
|
4257 | return this.source.merge();
|
4258 | },
|
4259 |
|
4260 |
|
4261 |
|
4262 |
|
4263 |
|
4264 |
|
4265 |
|
4266 |
|
4267 |
|
4268 |
|
4269 | blockValue: function blockValue(name) {
|
4270 | var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
|
4271 | params = [this.contextName(0)];
|
4272 | this.setupHelperArgs(name, 0, params);
|
4273 |
|
4274 | var blockName = this.popStack();
|
4275 | params.splice(1, 0, blockName);
|
4276 |
|
4277 | this.push(this.source.functionCall(blockHelperMissing, 'call', params));
|
4278 | },
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 |
|
4284 |
|
4285 |
|
4286 | ambiguousBlockValue: function ambiguousBlockValue() {
|
4287 |
|
4288 | var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
|
4289 | params = [this.contextName(0)];
|
4290 | this.setupHelperArgs('', 0, params, true);
|
4291 |
|
4292 | this.flushInline();
|
4293 |
|
4294 | var current = this.topStack();
|
4295 | params.splice(1, 0, current);
|
4296 |
|
4297 | this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']);
|
4298 | },
|
4299 |
|
4300 |
|
4301 |
|
4302 |
|
4303 |
|
4304 |
|
4305 |
|
4306 | appendContent: function appendContent(content) {
|
4307 | if (this.pendingContent) {
|
4308 | content = this.pendingContent + content;
|
4309 | } else {
|
4310 | this.pendingLocation = this.source.currentLocation;
|
4311 | }
|
4312 |
|
4313 | this.pendingContent = content;
|
4314 | },
|
4315 |
|
4316 |
|
4317 |
|
4318 |
|
4319 |
|
4320 |
|
4321 |
|
4322 |
|
4323 |
|
4324 |
|
4325 | append: function append() {
|
4326 | if (this.isInline()) {
|
4327 | this.replaceStack(function (current) {
|
4328 | return [' != null ? ', current, ' : ""'];
|
4329 | });
|
4330 |
|
4331 | this.pushSource(this.appendToBuffer(this.popStack()));
|
4332 | } else {
|
4333 | var local = this.popStack();
|
4334 | this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']);
|
4335 | if (this.environment.isSimple) {
|
4336 | this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']);
|
4337 | }
|
4338 | }
|
4339 | },
|
4340 |
|
4341 |
|
4342 |
|
4343 |
|
4344 |
|
4345 |
|
4346 |
|
4347 | appendEscaped: function appendEscaped() {
|
4348 | this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')']));
|
4349 | },
|
4350 |
|
4351 |
|
4352 |
|
4353 |
|
4354 |
|
4355 |
|
4356 |
|
4357 |
|
4358 | getContext: function getContext(depth) {
|
4359 | this.lastContext = depth;
|
4360 | },
|
4361 |
|
4362 |
|
4363 |
|
4364 |
|
4365 |
|
4366 |
|
4367 |
|
4368 | pushContext: function pushContext() {
|
4369 | this.pushStackLiteral(this.contextName(this.lastContext));
|
4370 | },
|
4371 |
|
4372 |
|
4373 |
|
4374 |
|
4375 |
|
4376 |
|
4377 |
|
4378 |
|
4379 | lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {
|
4380 | var i = 0;
|
4381 |
|
4382 | if (!scoped && this.options.compat && !this.lastContext) {
|
4383 |
|
4384 |
|
4385 | this.push(this.depthedLookup(parts[i++]));
|
4386 | } else {
|
4387 | this.pushContext();
|
4388 | }
|
4389 |
|
4390 | this.resolvePath('context', parts, i, falsy, strict);
|
4391 | },
|
4392 |
|
4393 |
|
4394 |
|
4395 |
|
4396 |
|
4397 |
|
4398 |
|
4399 |
|
4400 | lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
|
4401 | this.useBlockParams = true;
|
4402 |
|
4403 | this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
|
4404 | this.resolvePath('context', parts, 1);
|
4405 | },
|
4406 |
|
4407 |
|
4408 |
|
4409 |
|
4410 |
|
4411 |
|
4412 |
|
4413 | lookupData: function lookupData(depth, parts, strict) {
|
4414 | if (!depth) {
|
4415 | this.pushStackLiteral('data');
|
4416 | } else {
|
4417 | this.pushStackLiteral('container.data(data, ' + depth + ')');
|
4418 | }
|
4419 |
|
4420 | this.resolvePath('data', parts, 0, true, strict);
|
4421 | },
|
4422 |
|
4423 | resolvePath: function resolvePath(type, parts, i, falsy, strict) {
|
4424 |
|
4425 |
|
4426 | var _this = this;
|
4427 |
|
4428 | if (this.options.strict || this.options.assumeObjects) {
|
4429 | this.push(strictLookup(this.options.strict && strict, this, parts, type));
|
4430 | return;
|
4431 | }
|
4432 |
|
4433 | var len = parts.length;
|
4434 | for (; i < len; i++) {
|
4435 |
|
4436 | this.replaceStack(function (current) {
|
4437 | var lookup = _this.nameLookup(current, parts[i], type);
|
4438 |
|
4439 |
|
4440 | if (!falsy) {
|
4441 | return [' != null ? ', lookup, ' : ', current];
|
4442 | } else {
|
4443 |
|
4444 | return [' && ', lookup];
|
4445 | }
|
4446 | });
|
4447 |
|
4448 | }
|
4449 | },
|
4450 |
|
4451 |
|
4452 |
|
4453 |
|
4454 |
|
4455 |
|
4456 |
|
4457 |
|
4458 | resolvePossibleLambda: function resolvePossibleLambda() {
|
4459 | this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
|
4460 | },
|
4461 |
|
4462 |
|
4463 |
|
4464 |
|
4465 |
|
4466 |
|
4467 |
|
4468 |
|
4469 |
|
4470 | pushStringParam: function pushStringParam(string, type) {
|
4471 | this.pushContext();
|
4472 | this.pushString(type);
|
4473 |
|
4474 |
|
4475 |
|
4476 | if (type !== 'SubExpression') {
|
4477 | if (typeof string === 'string') {
|
4478 | this.pushString(string);
|
4479 | } else {
|
4480 | this.pushStackLiteral(string);
|
4481 | }
|
4482 | }
|
4483 | },
|
4484 |
|
4485 | emptyHash: function emptyHash(omitEmpty) {
|
4486 | if (this.trackIds) {
|
4487 | this.push('{}');
|
4488 | }
|
4489 | if (this.stringParams) {
|
4490 | this.push('{}');
|
4491 | this.push('{}');
|
4492 | }
|
4493 | this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');
|
4494 | },
|
4495 | pushHash: function pushHash() {
|
4496 | if (this.hash) {
|
4497 | this.hashes.push(this.hash);
|
4498 | }
|
4499 | this.hash = { values: [], types: [], contexts: [], ids: [] };
|
4500 | },
|
4501 | popHash: function popHash() {
|
4502 | var hash = this.hash;
|
4503 | this.hash = this.hashes.pop();
|
4504 |
|
4505 | if (this.trackIds) {
|
4506 | this.push(this.objectLiteral(hash.ids));
|
4507 | }
|
4508 | if (this.stringParams) {
|
4509 | this.push(this.objectLiteral(hash.contexts));
|
4510 | this.push(this.objectLiteral(hash.types));
|
4511 | }
|
4512 |
|
4513 | this.push(this.objectLiteral(hash.values));
|
4514 | },
|
4515 |
|
4516 |
|
4517 |
|
4518 |
|
4519 |
|
4520 |
|
4521 |
|
4522 | pushString: function pushString(string) {
|
4523 | this.pushStackLiteral(this.quotedString(string));
|
4524 | },
|
4525 |
|
4526 |
|
4527 |
|
4528 |
|
4529 |
|
4530 |
|
4531 |
|
4532 |
|
4533 |
|
4534 | pushLiteral: function pushLiteral(value) {
|
4535 | this.pushStackLiteral(value);
|
4536 | },
|
4537 |
|
4538 |
|
4539 |
|
4540 |
|
4541 |
|
4542 |
|
4543 |
|
4544 |
|
4545 |
|
4546 | pushProgram: function pushProgram(guid) {
|
4547 | if (guid != null) {
|
4548 | this.pushStackLiteral(this.programExpression(guid));
|
4549 | } else {
|
4550 | this.pushStackLiteral(null);
|
4551 | }
|
4552 | },
|
4553 |
|
4554 |
|
4555 |
|
4556 |
|
4557 |
|
4558 |
|
4559 |
|
4560 |
|
4561 | registerDecorator: function registerDecorator(paramSize, name) {
|
4562 | var foundDecorator = this.nameLookup('decorators', name, 'decorator'),
|
4563 | options = this.setupHelperArgs(name, paramSize);
|
4564 |
|
4565 | this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']);
|
4566 | },
|
4567 |
|
4568 |
|
4569 |
|
4570 |
|
4571 |
|
4572 |
|
4573 |
|
4574 |
|
4575 |
|
4576 |
|
4577 | invokeHelper: function invokeHelper(paramSize, name, isSimple) {
|
4578 | var nonHelper = this.popStack(),
|
4579 | helper = this.setupHelper(paramSize, name),
|
4580 | simple = isSimple ? [helper.name, ' || '] : '';
|
4581 |
|
4582 | var lookup = ['('].concat(simple, nonHelper);
|
4583 | if (!this.options.strict) {
|
4584 | lookup.push(' || ', this.aliasable('helpers.helperMissing'));
|
4585 | }
|
4586 | lookup.push(')');
|
4587 |
|
4588 | this.push(this.source.functionCall(lookup, 'call', helper.callParams));
|
4589 | },
|
4590 |
|
4591 |
|
4592 |
|
4593 |
|
4594 |
|
4595 |
|
4596 |
|
4597 |
|
4598 | invokeKnownHelper: function invokeKnownHelper(paramSize, name) {
|
4599 | var helper = this.setupHelper(paramSize, name);
|
4600 | this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
|
4601 | },
|
4602 |
|
4603 |
|
4604 |
|
4605 |
|
4606 |
|
4607 |
|
4608 |
|
4609 |
|
4610 |
|
4611 |
|
4612 |
|
4613 |
|
4614 |
|
4615 | invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
|
4616 | this.useRegister('helper');
|
4617 |
|
4618 | var nonHelper = this.popStack();
|
4619 |
|
4620 | this.emptyHash();
|
4621 | var helper = this.setupHelper(0, name, helperCall);
|
4622 |
|
4623 | var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
|
4624 |
|
4625 | var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];
|
4626 | if (!this.options.strict) {
|
4627 | lookup[0] = '(helper = ';
|
4628 | lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing'));
|
4629 | }
|
4630 |
|
4631 | this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']);
|
4632 | },
|
4633 |
|
4634 |
|
4635 |
|
4636 |
|
4637 |
|
4638 |
|
4639 |
|
4640 |
|
4641 | invokePartial: function invokePartial(isDynamic, name, indent) {
|
4642 | var params = [],
|
4643 | options = this.setupParams(name, 1, params);
|
4644 |
|
4645 | if (isDynamic) {
|
4646 | name = this.popStack();
|
4647 | delete options.name;
|
4648 | }
|
4649 |
|
4650 | if (indent) {
|
4651 | options.indent = JSON.stringify(indent);
|
4652 | }
|
4653 | options.helpers = 'helpers';
|
4654 | options.partials = 'partials';
|
4655 | options.decorators = 'container.decorators';
|
4656 |
|
4657 | if (!isDynamic) {
|
4658 | params.unshift(this.nameLookup('partials', name, 'partial'));
|
4659 | } else {
|
4660 | params.unshift(name);
|
4661 | }
|
4662 |
|
4663 | if (this.options.compat) {
|
4664 | options.depths = 'depths';
|
4665 | }
|
4666 | options = this.objectLiteral(options);
|
4667 | params.push(options);
|
4668 |
|
4669 | this.push(this.source.functionCall('container.invokePartial', '', params));
|
4670 | },
|
4671 |
|
4672 |
|
4673 |
|
4674 |
|
4675 |
|
4676 |
|
4677 |
|
4678 | assignToHash: function assignToHash(key) {
|
4679 | var value = this.popStack(),
|
4680 | context = undefined,
|
4681 | type = undefined,
|
4682 | id = undefined;
|
4683 |
|
4684 | if (this.trackIds) {
|
4685 | id = this.popStack();
|
4686 | }
|
4687 | if (this.stringParams) {
|
4688 | type = this.popStack();
|
4689 | context = this.popStack();
|
4690 | }
|
4691 |
|
4692 | var hash = this.hash;
|
4693 | if (context) {
|
4694 | hash.contexts[key] = context;
|
4695 | }
|
4696 | if (type) {
|
4697 | hash.types[key] = type;
|
4698 | }
|
4699 | if (id) {
|
4700 | hash.ids[key] = id;
|
4701 | }
|
4702 | hash.values[key] = value;
|
4703 | },
|
4704 |
|
4705 | pushId: function pushId(type, name, child) {
|
4706 | if (type === 'BlockParam') {
|
4707 | this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : ''));
|
4708 | } else if (type === 'PathExpression') {
|
4709 | this.pushString(name);
|
4710 | } else if (type === 'SubExpression') {
|
4711 | this.pushStackLiteral('true');
|
4712 | } else {
|
4713 | this.pushStackLiteral('null');
|
4714 | }
|
4715 | },
|
4716 |
|
4717 |
|
4718 |
|
4719 | compiler: JavaScriptCompiler,
|
4720 |
|
4721 | compileChildren: function compileChildren(environment, options) {
|
4722 | var children = environment.children,
|
4723 | child = undefined,
|
4724 | compiler = undefined;
|
4725 |
|
4726 | for (var i = 0, l = children.length; i < l; i++) {
|
4727 | child = children[i];
|
4728 | compiler = new this.compiler();
|
4729 |
|
4730 | var existing = this.matchExistingProgram(child);
|
4731 |
|
4732 | if (existing == null) {
|
4733 | this.context.programs.push('');
|
4734 | var index = this.context.programs.length;
|
4735 | child.index = index;
|
4736 | child.name = 'program' + index;
|
4737 | this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
|
4738 | this.context.decorators[index] = compiler.decorators;
|
4739 | this.context.environments[index] = child;
|
4740 |
|
4741 | this.useDepths = this.useDepths || compiler.useDepths;
|
4742 | this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
|
4743 | child.useDepths = this.useDepths;
|
4744 | child.useBlockParams = this.useBlockParams;
|
4745 | } else {
|
4746 | child.index = existing.index;
|
4747 | child.name = 'program' + existing.index;
|
4748 |
|
4749 | this.useDepths = this.useDepths || existing.useDepths;
|
4750 | this.useBlockParams = this.useBlockParams || existing.useBlockParams;
|
4751 | }
|
4752 | }
|
4753 | },
|
4754 | matchExistingProgram: function matchExistingProgram(child) {
|
4755 | for (var i = 0, len = this.context.environments.length; i < len; i++) {
|
4756 | var environment = this.context.environments[i];
|
4757 | if (environment && environment.equals(child)) {
|
4758 | return environment;
|
4759 | }
|
4760 | }
|
4761 | },
|
4762 |
|
4763 | programExpression: function programExpression(guid) {
|
4764 | var child = this.environment.children[guid],
|
4765 | programParams = [child.index, 'data', child.blockParams];
|
4766 |
|
4767 | if (this.useBlockParams || this.useDepths) {
|
4768 | programParams.push('blockParams');
|
4769 | }
|
4770 | if (this.useDepths) {
|
4771 | programParams.push('depths');
|
4772 | }
|
4773 |
|
4774 | return 'container.program(' + programParams.join(', ') + ')';
|
4775 | },
|
4776 |
|
4777 | useRegister: function useRegister(name) {
|
4778 | if (!this.registers[name]) {
|
4779 | this.registers[name] = true;
|
4780 | this.registers.list.push(name);
|
4781 | }
|
4782 | },
|
4783 |
|
4784 | push: function push(expr) {
|
4785 | if (!(expr instanceof Literal)) {
|
4786 | expr = this.source.wrap(expr);
|
4787 | }
|
4788 |
|
4789 | this.inlineStack.push(expr);
|
4790 | return expr;
|
4791 | },
|
4792 |
|
4793 | pushStackLiteral: function pushStackLiteral(item) {
|
4794 | this.push(new Literal(item));
|
4795 | },
|
4796 |
|
4797 | pushSource: function pushSource(source) {
|
4798 | if (this.pendingContent) {
|
4799 | this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
|
4800 | this.pendingContent = undefined;
|
4801 | }
|
4802 |
|
4803 | if (source) {
|
4804 | this.source.push(source);
|
4805 | }
|
4806 | },
|
4807 |
|
4808 | replaceStack: function replaceStack(callback) {
|
4809 | var prefix = ['('],
|
4810 | stack = undefined,
|
4811 | createdStack = undefined,
|
4812 | usedLiteral = undefined;
|
4813 |
|
4814 |
|
4815 | if (!this.isInline()) {
|
4816 | throw new _exception2['default']('replaceStack on non-inline');
|
4817 | }
|
4818 |
|
4819 |
|
4820 | var top = this.popStack(true);
|
4821 |
|
4822 | if (top instanceof Literal) {
|
4823 |
|
4824 | stack = [top.value];
|
4825 | prefix = ['(', stack];
|
4826 | usedLiteral = true;
|
4827 | } else {
|
4828 |
|
4829 | createdStack = true;
|
4830 | var _name = this.incrStack();
|
4831 |
|
4832 | prefix = ['((', this.push(_name), ' = ', top, ')'];
|
4833 | stack = this.topStack();
|
4834 | }
|
4835 |
|
4836 | var item = callback.call(this, stack);
|
4837 |
|
4838 | if (!usedLiteral) {
|
4839 | this.popStack();
|
4840 | }
|
4841 | if (createdStack) {
|
4842 | this.stackSlot--;
|
4843 | }
|
4844 | this.push(prefix.concat(item, ')'));
|
4845 | },
|
4846 |
|
4847 | incrStack: function incrStack() {
|
4848 | this.stackSlot++;
|
4849 | if (this.stackSlot > this.stackVars.length) {
|
4850 | this.stackVars.push('stack' + this.stackSlot);
|
4851 | }
|
4852 | return this.topStackName();
|
4853 | },
|
4854 | topStackName: function topStackName() {
|
4855 | return 'stack' + this.stackSlot;
|
4856 | },
|
4857 | flushInline: function flushInline() {
|
4858 | var inlineStack = this.inlineStack;
|
4859 | this.inlineStack = [];
|
4860 | for (var i = 0, len = inlineStack.length; i < len; i++) {
|
4861 | var entry = inlineStack[i];
|
4862 |
|
4863 | if (entry instanceof Literal) {
|
4864 | this.compileStack.push(entry);
|
4865 | } else {
|
4866 | var stack = this.incrStack();
|
4867 | this.pushSource([stack, ' = ', entry, ';']);
|
4868 | this.compileStack.push(stack);
|
4869 | }
|
4870 | }
|
4871 | },
|
4872 | isInline: function isInline() {
|
4873 | return this.inlineStack.length;
|
4874 | },
|
4875 |
|
4876 | popStack: function popStack(wrapped) {
|
4877 | var inline = this.isInline(),
|
4878 | item = (inline ? this.inlineStack : this.compileStack).pop();
|
4879 |
|
4880 | if (!wrapped && item instanceof Literal) {
|
4881 | return item.value;
|
4882 | } else {
|
4883 | if (!inline) {
|
4884 |
|
4885 | if (!this.stackSlot) {
|
4886 | throw new _exception2['default']('Invalid stack pop');
|
4887 | }
|
4888 | this.stackSlot--;
|
4889 | }
|
4890 | return item;
|
4891 | }
|
4892 | },
|
4893 |
|
4894 | topStack: function topStack() {
|
4895 | var stack = this.isInline() ? this.inlineStack : this.compileStack,
|
4896 | item = stack[stack.length - 1];
|
4897 |
|
4898 |
|
4899 | if (item instanceof Literal) {
|
4900 | return item.value;
|
4901 | } else {
|
4902 | return item;
|
4903 | }
|
4904 | },
|
4905 |
|
4906 | contextName: function contextName(context) {
|
4907 | if (this.useDepths && context) {
|
4908 | return 'depths[' + context + ']';
|
4909 | } else {
|
4910 | return 'depth' + context;
|
4911 | }
|
4912 | },
|
4913 |
|
4914 | quotedString: function quotedString(str) {
|
4915 | return this.source.quotedString(str);
|
4916 | },
|
4917 |
|
4918 | objectLiteral: function objectLiteral(obj) {
|
4919 | return this.source.objectLiteral(obj);
|
4920 | },
|
4921 |
|
4922 | aliasable: function aliasable(name) {
|
4923 | var ret = this.aliases[name];
|
4924 | if (ret) {
|
4925 | ret.referenceCount++;
|
4926 | return ret;
|
4927 | }
|
4928 |
|
4929 | ret = this.aliases[name] = this.source.wrap(name);
|
4930 | ret.aliasable = true;
|
4931 | ret.referenceCount = 1;
|
4932 |
|
4933 | return ret;
|
4934 | },
|
4935 |
|
4936 | setupHelper: function setupHelper(paramSize, name, blockHelper) {
|
4937 | var params = [],
|
4938 | paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
|
4939 | var foundHelper = this.nameLookup('helpers', name, 'helper'),
|
4940 | callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})');
|
4941 |
|
4942 | return {
|
4943 | params: params,
|
4944 | paramsInit: paramsInit,
|
4945 | name: foundHelper,
|
4946 | callParams: [callContext].concat(params)
|
4947 | };
|
4948 | },
|
4949 |
|
4950 | setupParams: function setupParams(helper, paramSize, params) {
|
4951 | var options = {},
|
4952 | contexts = [],
|
4953 | types = [],
|
4954 | ids = [],
|
4955 | objectArgs = !params,
|
4956 | param = undefined;
|
4957 |
|
4958 | if (objectArgs) {
|
4959 | params = [];
|
4960 | }
|
4961 |
|
4962 | options.name = this.quotedString(helper);
|
4963 | options.hash = this.popStack();
|
4964 |
|
4965 | if (this.trackIds) {
|
4966 | options.hashIds = this.popStack();
|
4967 | }
|
4968 | if (this.stringParams) {
|
4969 | options.hashTypes = this.popStack();
|
4970 | options.hashContexts = this.popStack();
|
4971 | }
|
4972 |
|
4973 | var inverse = this.popStack(),
|
4974 | program = this.popStack();
|
4975 |
|
4976 |
|
4977 |
|
4978 | if (program || inverse) {
|
4979 | options.fn = program || 'container.noop';
|
4980 | options.inverse = inverse || 'container.noop';
|
4981 | }
|
4982 |
|
4983 |
|
4984 |
|
4985 | var i = paramSize;
|
4986 | while (i--) {
|
4987 | param = this.popStack();
|
4988 | params[i] = param;
|
4989 |
|
4990 | if (this.trackIds) {
|
4991 | ids[i] = this.popStack();
|
4992 | }
|
4993 | if (this.stringParams) {
|
4994 | types[i] = this.popStack();
|
4995 | contexts[i] = this.popStack();
|
4996 | }
|
4997 | }
|
4998 |
|
4999 | if (objectArgs) {
|
5000 | options.args = this.source.generateArray(params);
|
5001 | }
|
5002 |
|
5003 | if (this.trackIds) {
|
5004 | options.ids = this.source.generateArray(ids);
|
5005 | }
|
5006 | if (this.stringParams) {
|
5007 | options.types = this.source.generateArray(types);
|
5008 | options.contexts = this.source.generateArray(contexts);
|
5009 | }
|
5010 |
|
5011 | if (this.options.data) {
|
5012 | options.data = 'data';
|
5013 | }
|
5014 | if (this.useBlockParams) {
|
5015 | options.blockParams = 'blockParams';
|
5016 | }
|
5017 | return options;
|
5018 | },
|
5019 |
|
5020 | setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
|
5021 | var options = this.setupParams(helper, paramSize, params);
|
5022 | options = this.objectLiteral(options);
|
5023 | if (useRegister) {
|
5024 | this.useRegister('options');
|
5025 | params.push('options');
|
5026 | return ['options=', options];
|
5027 | } else if (params) {
|
5028 | params.push(options);
|
5029 | return '';
|
5030 | } else {
|
5031 | return options;
|
5032 | }
|
5033 | }
|
5034 | };
|
5035 |
|
5036 | (function () {
|
5037 | var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' ');
|
5038 |
|
5039 | var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
|
5040 |
|
5041 | for (var i = 0, l = reservedWords.length; i < l; i++) {
|
5042 | compilerWords[reservedWords[i]] = true;
|
5043 | }
|
5044 | })();
|
5045 |
|
5046 | JavaScriptCompiler.isValidJavaScriptVariableName = function (name) {
|
5047 | return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
|
5048 | };
|
5049 |
|
5050 | function strictLookup(requireTerminal, compiler, parts, type) {
|
5051 | var stack = compiler.popStack(),
|
5052 | i = 0,
|
5053 | len = parts.length;
|
5054 | if (requireTerminal) {
|
5055 | len--;
|
5056 | }
|
5057 |
|
5058 | for (; i < len; i++) {
|
5059 | stack = compiler.nameLookup(stack, parts[i], type);
|
5060 | }
|
5061 |
|
5062 | if (requireTerminal) {
|
5063 | return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')'];
|
5064 | } else {
|
5065 | return stack;
|
5066 | }
|
5067 | }
|
5068 |
|
5069 | exports['default'] = JavaScriptCompiler;
|
5070 | module.exports = exports['default'];
|
5071 |
|
5072 | }),
|
5073 |
|
5074 | (function(module, exports, __webpack_require__) {
|
5075 |
|
5076 |
|
5077 | 'use strict';
|
5078 |
|
5079 | exports.__esModule = true;
|
5080 |
|
5081 | var _utils = __webpack_require__(5);
|
5082 |
|
5083 | var SourceNode = undefined;
|
5084 |
|
5085 | try {
|
5086 |
|
5087 | if (false) { var SourceMap; }
|
5088 | } catch (err) {}
|
5089 |
|
5090 |
|
5091 |
|
5092 | if (!SourceNode) {
|
5093 | SourceNode = function (line, column, srcFile, chunks) {
|
5094 | this.src = '';
|
5095 | if (chunks) {
|
5096 | this.add(chunks);
|
5097 | }
|
5098 | };
|
5099 |
|
5100 | SourceNode.prototype = {
|
5101 | add: function add(chunks) {
|
5102 | if (_utils.isArray(chunks)) {
|
5103 | chunks = chunks.join('');
|
5104 | }
|
5105 | this.src += chunks;
|
5106 | },
|
5107 | prepend: function prepend(chunks) {
|
5108 | if (_utils.isArray(chunks)) {
|
5109 | chunks = chunks.join('');
|
5110 | }
|
5111 | this.src = chunks + this.src;
|
5112 | },
|
5113 | toStringWithSourceMap: function toStringWithSourceMap() {
|
5114 | return { code: this.toString() };
|
5115 | },
|
5116 | toString: function toString() {
|
5117 | return this.src;
|
5118 | }
|
5119 | };
|
5120 | }
|
5121 |
|
5122 | function castChunk(chunk, codeGen, loc) {
|
5123 | if (_utils.isArray(chunk)) {
|
5124 | var ret = [];
|
5125 |
|
5126 | for (var i = 0, len = chunk.length; i < len; i++) {
|
5127 | ret.push(codeGen.wrap(chunk[i], loc));
|
5128 | }
|
5129 | return ret;
|
5130 | } else if (typeof chunk === 'boolean' || typeof chunk === 'number') {
|
5131 |
|
5132 | return chunk + '';
|
5133 | }
|
5134 | return chunk;
|
5135 | }
|
5136 |
|
5137 | function CodeGen(srcFile) {
|
5138 | this.srcFile = srcFile;
|
5139 | this.source = [];
|
5140 | }
|
5141 |
|
5142 | CodeGen.prototype = {
|
5143 | isEmpty: function isEmpty() {
|
5144 | return !this.source.length;
|
5145 | },
|
5146 | prepend: function prepend(source, loc) {
|
5147 | this.source.unshift(this.wrap(source, loc));
|
5148 | },
|
5149 | push: function push(source, loc) {
|
5150 | this.source.push(this.wrap(source, loc));
|
5151 | },
|
5152 |
|
5153 | merge: function merge() {
|
5154 | var source = this.empty();
|
5155 | this.each(function (line) {
|
5156 | source.add([' ', line, '\n']);
|
5157 | });
|
5158 | return source;
|
5159 | },
|
5160 |
|
5161 | each: function each(iter) {
|
5162 | for (var i = 0, len = this.source.length; i < len; i++) {
|
5163 | iter(this.source[i]);
|
5164 | }
|
5165 | },
|
5166 |
|
5167 | empty: function empty() {
|
5168 | var loc = this.currentLocation || { start: {} };
|
5169 | return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
|
5170 | },
|
5171 | wrap: function wrap(chunk) {
|
5172 | var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];
|
5173 |
|
5174 | if (chunk instanceof SourceNode) {
|
5175 | return chunk;
|
5176 | }
|
5177 |
|
5178 | chunk = castChunk(chunk, this, loc);
|
5179 |
|
5180 | return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
|
5181 | },
|
5182 |
|
5183 | functionCall: function functionCall(fn, type, params) {
|
5184 | params = this.generateList(params);
|
5185 | return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);
|
5186 | },
|
5187 |
|
5188 | quotedString: function quotedString(str) {
|
5189 | return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028')
|
5190 | .replace(/\u2029/g, '\\u2029') + '"';
|
5191 | },
|
5192 |
|
5193 | objectLiteral: function objectLiteral(obj) {
|
5194 | var pairs = [];
|
5195 |
|
5196 | for (var key in obj) {
|
5197 | if (obj.hasOwnProperty(key)) {
|
5198 | var value = castChunk(obj[key], this);
|
5199 | if (value !== 'undefined') {
|
5200 | pairs.push([this.quotedString(key), ':', value]);
|
5201 | }
|
5202 | }
|
5203 | }
|
5204 |
|
5205 | var ret = this.generateList(pairs);
|
5206 | ret.prepend('{');
|
5207 | ret.add('}');
|
5208 | return ret;
|
5209 | },
|
5210 |
|
5211 | generateList: function generateList(entries) {
|
5212 | var ret = this.empty();
|
5213 |
|
5214 | for (var i = 0, len = entries.length; i < len; i++) {
|
5215 | if (i) {
|
5216 | ret.add(',');
|
5217 | }
|
5218 |
|
5219 | ret.add(castChunk(entries[i], this));
|
5220 | }
|
5221 |
|
5222 | return ret;
|
5223 | },
|
5224 |
|
5225 | generateArray: function generateArray(entries) {
|
5226 | var ret = this.generateList(entries);
|
5227 | ret.prepend('[');
|
5228 | ret.add(']');
|
5229 |
|
5230 | return ret;
|
5231 | }
|
5232 | };
|
5233 |
|
5234 | exports['default'] = CodeGen;
|
5235 | module.exports = exports['default'];
|
5236 |
|
5237 | })
|
5238 | ])
|
5239 | });
|
5240 | ;
|
5241 |
|
5242 | }),
|
5243 |
|
5244 | (function(module, exports, __webpack_require__) {
|
5245 |
|
5246 | var upperCase = __webpack_require__(1)
|
5247 | var noCase = __webpack_require__(0)
|
5248 |
|
5249 |
|
5250 |
|
5251 |
|
5252 |
|
5253 |
|
5254 |
|
5255 |
|
5256 | module.exports = function (value, locale, mergeNumbers) {
|
5257 | var result = noCase(value, locale)
|
5258 |
|
5259 |
|
5260 | if (!mergeNumbers) {
|
5261 | result = result.replace(/ (?=\d)/g, '_')
|
5262 | }
|
5263 |
|
5264 |
|
5265 | return result.replace(/ (.)/g, function (m, $1) {
|
5266 | return upperCase($1, locale)
|
5267 | })
|
5268 | }
|
5269 |
|
5270 |
|
5271 | }),
|
5272 |
|
5273 | (function(module, exports, __webpack_require__) {
|
5274 |
|
5275 | var noCase = __webpack_require__(0)
|
5276 |
|
5277 |
|
5278 |
|
5279 |
|
5280 |
|
5281 |
|
5282 |
|
5283 |
|
5284 | module.exports = function (value, locale) {
|
5285 | return noCase(value, locale, '_')
|
5286 | }
|
5287 |
|
5288 |
|
5289 | }),
|
5290 |
|
5291 | (function(module, exports, __webpack_require__) {
|
5292 |
|
5293 | "use strict";
|
5294 |
|
5295 | Object.defineProperty(exports, "__esModule", { value: true });
|
5296 | var handlebars_1 = __webpack_require__(4);
|
5297 | function defineMaybe(options) {
|
5298 | var config = options.data.root.config || {};
|
5299 | var optionalType = config.optionalType || 'null';
|
5300 | return "export type Maybe<T> = T | " + optionalType + ";";
|
5301 | }
|
5302 | exports.defineMaybe = defineMaybe;
|
5303 | function useMaybe(type) {
|
5304 | return "Maybe<" + type + ">";
|
5305 | }
|
5306 | exports.useMaybe = useMaybe;
|
5307 | function getScalarType(type, options) {
|
5308 | var config = options.data.root.config || {};
|
5309 | if (config.scalars && type in config.scalars) {
|
5310 | return config.scalars[type];
|
5311 | }
|
5312 | else {
|
5313 | return 'any';
|
5314 | }
|
5315 | }
|
5316 | exports.getScalarType = getScalarType;
|
5317 | function getEnumValue(type, name, options) {
|
5318 | var config = options.data.root.config || {};
|
5319 | if (config.enums && type in config.enums && name in config.enums[type]) {
|
5320 | return config.enums[type][name];
|
5321 | }
|
5322 | else {
|
5323 | return "\"" + name + "\"";
|
5324 | }
|
5325 | }
|
5326 | exports.getEnumValue = getEnumValue;
|
5327 | function getFieldType(field, realType, options) {
|
5328 | var config = options.data.root.config || {};
|
5329 | var useImmutable = !!config.immutableTypes;
|
5330 | function extendType(type) {
|
5331 | return field.hasDefaultValue ? type : useMaybe(type);
|
5332 | }
|
5333 | if (field.isArray) {
|
5334 | var result = realType;
|
5335 | var dimension = field.dimensionOfArray + 1;
|
5336 | if (field.isNullableArray && !config.noNamespaces) {
|
5337 | result = useImmutable ? useMaybe(realType) : "(" + useMaybe(realType) + ")";
|
5338 | }
|
5339 | if (useImmutable) {
|
5340 | result = "" + new Array(dimension).join('ReadonlyArray<') + result + new Array(dimension).join('>');
|
5341 | }
|
5342 | else {
|
5343 | result = "" + result + new Array(dimension).join('[]');
|
5344 | }
|
5345 | if (!field.isRequired) {
|
5346 | result = extendType(result);
|
5347 | }
|
5348 | return result;
|
5349 | }
|
5350 | else {
|
5351 | if (field.isRequired) {
|
5352 | return realType;
|
5353 | }
|
5354 | else {
|
5355 | return extendType(realType);
|
5356 | }
|
5357 | }
|
5358 | }
|
5359 | exports.getFieldType = getFieldType;
|
5360 | function getOptionals(type, options) {
|
5361 | var config = options.data.root.config || {};
|
5362 | if (config.avoidOptionals === '1' ||
|
5363 | config.avoidOptionals === 'true' ||
|
5364 | config.avoidOptionals === true ||
|
5365 | config.avoidOptionals === 1) {
|
5366 | return '';
|
5367 | }
|
5368 | if (!type.isRequired) {
|
5369 | return '?';
|
5370 | }
|
5371 | return '';
|
5372 | }
|
5373 | exports.getOptionals = getOptionals;
|
5374 | exports.getType = function (convert) { return function (type, options) {
|
5375 | if (!type) {
|
5376 | return '';
|
5377 | }
|
5378 | var result = convertedType(type, options, convert);
|
5379 | return new handlebars_1.SafeString(result);
|
5380 | }; };
|
5381 | function convertedType(type, options, convert, skipConversion) {
|
5382 | if (skipConversion === void 0) { skipConversion = false; }
|
5383 | var baseType = type.type;
|
5384 | var config = options.data.root.config || {};
|
5385 | var realType = options.data.root.primitives[baseType] ||
|
5386 | "" + (type.isScalar ? '' : config.interfacePrefix || '') + (skipConversion ? baseType : convert(baseType));
|
5387 | return getFieldType(type, realType, options);
|
5388 | }
|
5389 | exports.convertedType = convertedType;
|
5390 |
|
5391 |
|
5392 | }),
|
5393 |
|
5394 | (function(module, exports, __webpack_require__) {
|
5395 |
|
5396 | "use strict";
|
5397 |
|
5398 | var __assign = (this && this.__assign) || function () {
|
5399 | __assign = Object.assign || function(t) {
|
5400 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5401 | s = arguments[i];
|
5402 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
5403 | t[p] = s[p];
|
5404 | }
|
5405 | return t;
|
5406 | };
|
5407 | return __assign.apply(this, arguments);
|
5408 | };
|
5409 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
5410 | return new (P || (P = Promise))(function (resolve, reject) {
|
5411 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5412 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
5413 | function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
5414 | step((generator = generator.apply(thisArg, _arguments || [])).next());
|
5415 | });
|
5416 | };
|
5417 | var __generator = (this && this.__generator) || function (thisArg, body) {
|
5418 | var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
5419 | return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
5420 | function verb(n) { return function (v) { return step([n, v]); }; }
|
5421 | function step(op) {
|
5422 | if (f) throw new TypeError("Generator is already executing.");
|
5423 | while (_) try {
|
5424 | if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
5425 | if (y = 0, t) op = [op[0] & 2, t.value];
|
5426 | switch (op[0]) {
|
5427 | case 0: case 1: t = op; break;
|
5428 | case 4: _.label++; return { value: op[1], done: false };
|
5429 | case 5: _.label++; y = op[1]; op = [0]; continue;
|
5430 | case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
5431 | default:
|
5432 | if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
5433 | if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
5434 | if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
5435 | if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
5436 | if (t[2]) _.ops.pop();
|
5437 | _.trys.pop(); continue;
|
5438 | }
|
5439 | op = body.call(thisArg, _);
|
5440 | } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
5441 | if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
5442 | }
|
5443 | };
|
5444 | function __export(m) {
|
5445 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
5446 | }
|
5447 | var _this = this;
|
5448 | Object.defineProperty(exports, "__esModule", { value: true });
|
5449 | var graphql_codegen_core_1 = __webpack_require__(9);
|
5450 | var graphql_codegen_plugin_handlebars_helpers_1 = __webpack_require__(10);
|
5451 | var graphql_codegen_plugin_helpers_1 = __webpack_require__(11);
|
5452 | var enumTemplate = __webpack_require__(12);
|
5453 | var type = __webpack_require__(13);
|
5454 | var rootTemplate = __webpack_require__(14);
|
5455 | var Handlebars = __webpack_require__(4);
|
5456 | var change_case_1 = __webpack_require__(15);
|
5457 | var helpers_1 = __webpack_require__(7);
|
5458 | __export(__webpack_require__(7));
|
5459 | exports.DEFAULT_SCALARS = {
|
5460 | String: 'string',
|
5461 | Int: 'number',
|
5462 | Float: 'number',
|
5463 | Boolean: 'boolean',
|
5464 | ID: 'string'
|
5465 | };
|
5466 | function initCommonTemplate(hbs, schema, config) {
|
5467 | var scalars = __assign({}, exports.DEFAULT_SCALARS, (config.scalars || {}));
|
5468 | var baseConvertFn = config.namingConvention ? graphql_codegen_plugin_helpers_1.resolveExternalModuleAndFn(config.namingConvention) : change_case_1.pascalCase;
|
5469 | var convert = function (str) {
|
5470 | if (str.charAt(0) === '_') {
|
5471 | var after = str.replace(/^(_*)(.*)/, function (_match, underscorePrefix, typeName) { return "" + underscorePrefix + baseConvertFn(typeName || ''); });
|
5472 | return after;
|
5473 | }
|
5474 | return baseConvertFn(str);
|
5475 | };
|
5476 | hbs.registerPartial('enum', enumTemplate);
|
5477 | hbs.registerPartial('type', type);
|
5478 | hbs.registerHelper('defineMaybe', helpers_1.defineMaybe);
|
5479 | hbs.registerHelper('blockComment', graphql_codegen_plugin_handlebars_helpers_1.helpers.blockComment);
|
5480 | hbs.registerHelper('blockCommentIf', graphql_codegen_plugin_handlebars_helpers_1.helpers.blockCommentIf);
|
5481 | hbs.registerHelper('toComment', graphql_codegen_plugin_handlebars_helpers_1.helpers.toComment);
|
5482 | hbs.registerHelper('convert', convert);
|
5483 | hbs.registerHelper('getOptionals', helpers_1.getOptionals);
|
5484 | hbs.registerHelper('getEnumValue', helpers_1.getEnumValue);
|
5485 | hbs.registerHelper('convertedType', helpers_1.getType(convert));
|
5486 | hbs.registerHelper('toLowerCase', graphql_codegen_plugin_handlebars_helpers_1.helpers.toLowerCase);
|
5487 | hbs.registerHelper('toUpperCase', graphql_codegen_plugin_handlebars_helpers_1.helpers.toUpperCase);
|
5488 | hbs.registerHelper('times', graphql_codegen_plugin_handlebars_helpers_1.helpers.times);
|
5489 | hbs.registerHelper('stringify', graphql_codegen_plugin_handlebars_helpers_1.helpers.stringify);
|
5490 | hbs.registerHelper('ifDirective', graphql_codegen_plugin_handlebars_helpers_1.helpers.ifDirective);
|
5491 | hbs.registerHelper('ifCond', graphql_codegen_plugin_handlebars_helpers_1.helpers.ifCond);
|
5492 | hbs.registerHelper('getScalarType', helpers_1.getScalarType);
|
5493 | hbs.registerHelper('unlessDirective', graphql_codegen_plugin_handlebars_helpers_1.helpers.unlessDirective);
|
5494 | hbs.registerHelper('toPrimitive', function (type) { return scalars[type] || type || ''; });
|
5495 | var templateContext = graphql_codegen_core_1.schemaToTemplateContext(schema);
|
5496 | return {
|
5497 | templateContext: __assign({}, templateContext, { config: config, primitives: scalars }),
|
5498 | convert: convert,
|
5499 | scalars: scalars
|
5500 | };
|
5501 | }
|
5502 | exports.initCommonTemplate = initCommonTemplate;
|
5503 | exports.plugin = function (schema, documents, config) { return __awaiter(_this, void 0, void 0, function () {
|
5504 | var templateContext;
|
5505 | return __generator(this, function (_a) {
|
5506 | templateContext = initCommonTemplate(Handlebars, schema, config).templateContext;
|
5507 | return [2 , Handlebars.compile(rootTemplate)(templateContext)];
|
5508 | });
|
5509 | }); };
|
5510 |
|
5511 |
|
5512 | }),
|
5513 |
|
5514 | (function(module, exports) {
|
5515 |
|
5516 | module.exports = __webpack_require__(5);
|
5517 |
|
5518 | }),
|
5519 |
|
5520 | (function(module, exports, __webpack_require__) {
|
5521 |
|
5522 | (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, (function(modules) {
|
5523 |
|
5524 | var installedModules = {};
|
5525 |
|
5526 |
|
5527 | function __webpack_require__(moduleId) {
|
5528 |
|
5529 |
|
5530 | if(installedModules[moduleId]) {
|
5531 | return installedModules[moduleId].exports;
|
5532 | }
|
5533 |
|
5534 | var module = installedModules[moduleId] = {
|
5535 | i: moduleId,
|
5536 | l: false,
|
5537 | exports: {}
|
5538 | };
|
5539 |
|
5540 |
|
5541 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
5542 |
|
5543 |
|
5544 | module.l = true;
|
5545 |
|
5546 |
|
5547 | return module.exports;
|
5548 | }
|
5549 |
|
5550 |
|
5551 |
|
5552 | __webpack_require__.m = modules;
|
5553 |
|
5554 |
|
5555 | __webpack_require__.c = installedModules;
|
5556 |
|
5557 |
|
5558 | __webpack_require__.d = function(exports, name, getter) {
|
5559 | if(!__webpack_require__.o(exports, name)) {
|
5560 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
5561 | }
|
5562 | };
|
5563 |
|
5564 |
|
5565 | __webpack_require__.r = function(exports) {
|
5566 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
5567 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
5568 | }
|
5569 | Object.defineProperty(exports, '__esModule', { value: true });
|
5570 | };
|
5571 |
|
5572 |
|
5573 |
|
5574 |
|
5575 |
|
5576 |
|
5577 | __webpack_require__.t = function(value, mode) {
|
5578 | if(mode & 1) value = __webpack_require__(value);
|
5579 | if(mode & 8) return value;
|
5580 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
5581 | var ns = Object.create(null);
|
5582 | __webpack_require__.r(ns);
|
5583 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
5584 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
5585 | return ns;
|
5586 | };
|
5587 |
|
5588 |
|
5589 | __webpack_require__.n = function(module) {
|
5590 | var getter = module && module.__esModule ?
|
5591 | function getDefault() { return module['default']; } :
|
5592 | function getModuleExports() { return module; };
|
5593 | __webpack_require__.d(getter, 'a', getter);
|
5594 | return getter;
|
5595 | };
|
5596 |
|
5597 |
|
5598 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
5599 |
|
5600 |
|
5601 | __webpack_require__.p = "";
|
5602 |
|
5603 |
|
5604 |
|
5605 | return __webpack_require__(__webpack_require__.s = 9);
|
5606 | })
|
5607 |
|
5608 | ([
|
5609 |
|
5610 | (function(module, exports, __webpack_require__) {
|
5611 |
|
5612 | "use strict";
|
5613 |
|
5614 |
|
5615 | Object.defineProperty(exports, "__esModule", {
|
5616 | value: true
|
5617 | });
|
5618 | exports.default = undefined;
|
5619 |
|
5620 | var _TemplateTag = __webpack_require__(12);
|
5621 |
|
5622 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
5623 |
|
5624 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5625 |
|
5626 | exports.default = _TemplateTag2.default;
|
5627 | module.exports = exports['default'];
|
5628 |
|
5629 |
|
5630 | }),
|
5631 |
|
5632 | (function(module, exports, __webpack_require__) {
|
5633 |
|
5634 | "use strict";
|
5635 |
|
5636 |
|
5637 | Object.defineProperty(exports, "__esModule", {
|
5638 | value: true
|
5639 | });
|
5640 | exports.default = undefined;
|
5641 |
|
5642 | var _trimResultTransformer = __webpack_require__(13);
|
5643 |
|
5644 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
5645 |
|
5646 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5647 |
|
5648 | exports.default = _trimResultTransformer2.default;
|
5649 | module.exports = exports['default'];
|
5650 |
|
5651 |
|
5652 | }),
|
5653 |
|
5654 | (function(module, exports, __webpack_require__) {
|
5655 |
|
5656 | "use strict";
|
5657 |
|
5658 |
|
5659 | Object.defineProperty(exports, "__esModule", {
|
5660 | value: true
|
5661 | });
|
5662 | exports.default = undefined;
|
5663 |
|
5664 | var _inlineArrayTransformer = __webpack_require__(19);
|
5665 |
|
5666 | var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer);
|
5667 |
|
5668 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5669 |
|
5670 | exports.default = _inlineArrayTransformer2.default;
|
5671 | module.exports = exports['default'];
|
5672 |
|
5673 |
|
5674 | }),
|
5675 |
|
5676 | (function(module, exports, __webpack_require__) {
|
5677 |
|
5678 | "use strict";
|
5679 |
|
5680 |
|
5681 | Object.defineProperty(exports, "__esModule", {
|
5682 | value: true
|
5683 | });
|
5684 | exports.default = undefined;
|
5685 |
|
5686 | var _stripIndentTransformer = __webpack_require__(14);
|
5687 |
|
5688 | var _stripIndentTransformer2 = _interopRequireDefault(_stripIndentTransformer);
|
5689 |
|
5690 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5691 |
|
5692 | exports.default = _stripIndentTransformer2.default;
|
5693 | module.exports = exports['default'];
|
5694 |
|
5695 |
|
5696 | }),
|
5697 |
|
5698 | (function(module, exports, __webpack_require__) {
|
5699 |
|
5700 | "use strict";
|
5701 |
|
5702 |
|
5703 | Object.defineProperty(exports, "__esModule", {
|
5704 | value: true
|
5705 | });
|
5706 | exports.default = undefined;
|
5707 |
|
5708 | var _replaceResultTransformer = __webpack_require__(15);
|
5709 |
|
5710 | var _replaceResultTransformer2 = _interopRequireDefault(_replaceResultTransformer);
|
5711 |
|
5712 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5713 |
|
5714 | exports.default = _replaceResultTransformer2.default;
|
5715 | module.exports = exports['default'];
|
5716 |
|
5717 |
|
5718 | }),
|
5719 |
|
5720 | (function(module, exports, __webpack_require__) {
|
5721 |
|
5722 | "use strict";
|
5723 |
|
5724 |
|
5725 | Object.defineProperty(exports, "__esModule", {
|
5726 | value: true
|
5727 | });
|
5728 | exports.default = undefined;
|
5729 |
|
5730 | var _splitStringTransformer = __webpack_require__(20);
|
5731 |
|
5732 | var _splitStringTransformer2 = _interopRequireDefault(_splitStringTransformer);
|
5733 |
|
5734 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5735 |
|
5736 | exports.default = _splitStringTransformer2.default;
|
5737 | module.exports = exports['default'];
|
5738 |
|
5739 |
|
5740 | }),
|
5741 |
|
5742 | (function(module, exports, __webpack_require__) {
|
5743 |
|
5744 | "use strict";
|
5745 |
|
5746 |
|
5747 | Object.defineProperty(exports, "__esModule", {
|
5748 | value: true
|
5749 | });
|
5750 | exports.default = undefined;
|
5751 |
|
5752 | var _html = __webpack_require__(28);
|
5753 |
|
5754 | var _html2 = _interopRequireDefault(_html);
|
5755 |
|
5756 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5757 |
|
5758 | exports.default = _html2.default;
|
5759 | module.exports = exports['default'];
|
5760 |
|
5761 |
|
5762 | }),
|
5763 |
|
5764 | (function(module, exports, __webpack_require__) {
|
5765 |
|
5766 | "use strict";
|
5767 |
|
5768 |
|
5769 | Object.defineProperty(exports, "__esModule", {
|
5770 | value: true
|
5771 | });
|
5772 | exports.default = undefined;
|
5773 |
|
5774 | var _replaceSubstitutionTransformer = __webpack_require__(16);
|
5775 |
|
5776 | var _replaceSubstitutionTransformer2 = _interopRequireDefault(_replaceSubstitutionTransformer);
|
5777 |
|
5778 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5779 |
|
5780 | exports.default = _replaceSubstitutionTransformer2.default;
|
5781 | module.exports = exports['default'];
|
5782 |
|
5783 |
|
5784 | }),
|
5785 |
|
5786 | (function(module, exports, __webpack_require__) {
|
5787 |
|
5788 | "use strict";
|
5789 |
|
5790 |
|
5791 | Object.defineProperty(exports, "__esModule", {
|
5792 | value: true
|
5793 | });
|
5794 | exports.default = undefined;
|
5795 |
|
5796 | var _removeNonPrintingValuesTransformer = __webpack_require__(21);
|
5797 |
|
5798 | var _removeNonPrintingValuesTransformer2 = _interopRequireDefault(_removeNonPrintingValuesTransformer);
|
5799 |
|
5800 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5801 |
|
5802 | exports.default = _removeNonPrintingValuesTransformer2.default;
|
5803 | module.exports = exports['default'];
|
5804 |
|
5805 |
|
5806 | }),
|
5807 |
|
5808 | (function(module, exports, __webpack_require__) {
|
5809 |
|
5810 | "use strict";
|
5811 |
|
5812 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
5813 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
5814 | return cooked;
|
5815 | };
|
5816 | var __assign = (this && this.__assign) || function () {
|
5817 | __assign = Object.assign || function(t) {
|
5818 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5819 | s = arguments[i];
|
5820 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
5821 | t[p] = s[p];
|
5822 | }
|
5823 | return t;
|
5824 | };
|
5825 | return __assign.apply(this, arguments);
|
5826 | };
|
5827 | Object.defineProperty(exports, "__esModule", { value: true });
|
5828 | var handlebars_1 = __webpack_require__(10);
|
5829 | var common_tags_1 = __webpack_require__(11);
|
5830 | function blockComment(str) {
|
5831 | if (!str || str === '') {
|
5832 | return '';
|
5833 | }
|
5834 | return new handlebars_1.SafeString([
|
5835 | '\n',
|
5836 | '// ====================================================',
|
5837 | '// ' + common_tags_1.oneLine(templateObject_1 || (templateObject_1 = __makeTemplateObject(["", ""], ["", ""])), str || ''),
|
5838 | '// ====================================================',
|
5839 | '\n'
|
5840 | ].join('\n'));
|
5841 | }
|
5842 | exports.helpers = {
|
5843 | for: function (from, to, incr, block) {
|
5844 | var accum = '';
|
5845 | for (var i = from; i < to; i += incr) {
|
5846 | accum += block.fn(i);
|
5847 | }
|
5848 | return accum;
|
5849 | },
|
5850 | ifCond: function (v1, operator, v2, options) {
|
5851 | switch (operator) {
|
5852 | case '==':
|
5853 | return v1 === v2 ? options.fn(this) : options.inverse(this);
|
5854 | case '===':
|
5855 | return v1 === v2 ? options.fn(this) : options.inverse(this);
|
5856 | case '!=':
|
5857 | return v1 !== v2 ? options.fn(this) : options.inverse(this);
|
5858 | case '!==':
|
5859 | return v1 !== v2 ? options.fn(this) : options.inverse(this);
|
5860 | case '<':
|
5861 | return v1 < v2 ? options.fn(this) : options.inverse(this);
|
5862 | case '<=':
|
5863 | return v1 <= v2 ? options.fn(this) : options.inverse(this);
|
5864 | case '>':
|
5865 | return v1 > v2 ? options.fn(this) : options.inverse(this);
|
5866 | case '>=':
|
5867 | return v1 >= v2 ? options.fn(this) : options.inverse(this);
|
5868 | case '&&':
|
5869 | return v1 && v2 ? options.fn(this) : options.inverse(this);
|
5870 | case '||':
|
5871 | return v1 || v2 ? options.fn(this) : options.inverse(this);
|
5872 | default:
|
5873 | return options.inverse(this);
|
5874 | }
|
5875 | },
|
5876 | toScalar: function (scalars) { return function (type) {
|
5877 | return scalars[type] || type || '';
|
5878 | }; },
|
5879 | blockCommentIf: function (str, list) {
|
5880 | if (list === void 0) { list = []; }
|
5881 | if (list && list.length > 0) {
|
5882 | return blockComment(str);
|
5883 | }
|
5884 | return '';
|
5885 | },
|
5886 | blockComment: blockComment,
|
5887 | toComment: function (str) {
|
5888 | if (!str || str === '') {
|
5889 | return '';
|
5890 | }
|
5891 | return new handlebars_1.SafeString('/** ' + common_tags_1.oneLine(templateObject_2 || (templateObject_2 = __makeTemplateObject(["", ""], ["", ""])), str || '') + ' */');
|
5892 | },
|
5893 | toLowerCase: function (str) {
|
5894 | return (str || '').toLowerCase();
|
5895 | },
|
5896 | toUpperCase: function (str) {
|
5897 | return (str || '').toUpperCase();
|
5898 | },
|
5899 | stringify: function (obj) {
|
5900 | return new handlebars_1.SafeString(JSON.stringify(obj));
|
5901 | },
|
5902 | times: function (n, block) {
|
5903 | var accum = '';
|
5904 | for (var i = 0; i < n; ++i) {
|
5905 | accum += block.fn(i);
|
5906 | }
|
5907 | return accum;
|
5908 | },
|
5909 | ifDirective: function (context, directiveName, options) {
|
5910 | if (context && context['directives'] && directiveName && typeof directiveName === 'string') {
|
5911 | var directives = context['directives'];
|
5912 | var directiveValue = directives[directiveName];
|
5913 | if (directiveValue) {
|
5914 | return options && options.fn ? options.fn(__assign({}, (directiveValue || {}), context)) : '';
|
5915 | }
|
5916 | else {
|
5917 | return options && options.inverse ? options.inverse(context) : '';
|
5918 | }
|
5919 | }
|
5920 | return options && options.inverse ? options.inverse(context) : '';
|
5921 | },
|
5922 | unlessDirective: function (context, directiveName, options) {
|
5923 | if (context && context['directives'] && directiveName && typeof directiveName === 'string') {
|
5924 | var directives = context['directives'];
|
5925 | var directiveValue = directives[directiveName];
|
5926 | if (!directiveValue) {
|
5927 | return options && options.fn ? options.fn(__assign({}, (directiveValue || {}), context)) : '';
|
5928 | }
|
5929 | else {
|
5930 | return options && options.inverse ? options.inverse(context) : '';
|
5931 | }
|
5932 | }
|
5933 | return options && options.inverse ? options.inverse(context) : '';
|
5934 | }
|
5935 | };
|
5936 | var templateObject_1, templateObject_2;
|
5937 |
|
5938 |
|
5939 | }),
|
5940 |
|
5941 | (function(module, exports, __webpack_require__) {
|
5942 |
|
5943 |
|
5944 |
|
5945 |
|
5946 |
|
5947 |
|
5948 |
|
5949 |
|
5950 |
|
5951 |
|
5952 |
|
5953 |
|
5954 |
|
5955 |
|
5956 |
|
5957 |
|
5958 |
|
5959 |
|
5960 |
|
5961 |
|
5962 |
|
5963 |
|
5964 |
|
5965 |
|
5966 |
|
5967 |
|
5968 |
|
5969 | (function webpackUniversalModuleDefinition(root, factory) {
|
5970 | if(true)
|
5971 | module.exports = factory();
|
5972 | else {}
|
5973 | })(this, function() {
|
5974 | return (function(modules) {
|
5975 |
|
5976 | var installedModules = {};
|
5977 |
|
5978 |
|
5979 | function __webpack_require__(moduleId) {
|
5980 |
|
5981 |
|
5982 | if(installedModules[moduleId])
|
5983 | return installedModules[moduleId].exports;
|
5984 |
|
5985 |
|
5986 | var module = installedModules[moduleId] = {
|
5987 | exports: {},
|
5988 | id: moduleId,
|
5989 | loaded: false
|
5990 | };
|
5991 |
|
5992 |
|
5993 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
5994 |
|
5995 |
|
5996 | module.loaded = true;
|
5997 |
|
5998 |
|
5999 | return module.exports;
|
6000 | }
|
6001 |
|
6002 |
|
6003 |
|
6004 | __webpack_require__.m = modules;
|
6005 |
|
6006 |
|
6007 | __webpack_require__.c = installedModules;
|
6008 |
|
6009 |
|
6010 | __webpack_require__.p = "";
|
6011 |
|
6012 |
|
6013 | return __webpack_require__(0);
|
6014 | })
|
6015 |
|
6016 | ([
|
6017 |
|
6018 | (function(module, exports, __webpack_require__) {
|
6019 |
|
6020 | 'use strict';
|
6021 |
|
6022 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
6023 |
|
6024 | exports.__esModule = true;
|
6025 |
|
6026 | var _handlebarsRuntime = __webpack_require__(2);
|
6027 |
|
6028 | var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
|
6029 |
|
6030 |
|
6031 |
|
6032 | var _handlebarsCompilerAst = __webpack_require__(35);
|
6033 |
|
6034 | var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
|
6035 |
|
6036 | var _handlebarsCompilerBase = __webpack_require__(36);
|
6037 |
|
6038 | var _handlebarsCompilerCompiler = __webpack_require__(41);
|
6039 |
|
6040 | var _handlebarsCompilerJavascriptCompiler = __webpack_require__(42);
|
6041 |
|
6042 | var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
|
6043 |
|
6044 | var _handlebarsCompilerVisitor = __webpack_require__(39);
|
6045 |
|
6046 | var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
|
6047 |
|
6048 | var _handlebarsNoConflict = __webpack_require__(34);
|
6049 |
|
6050 | var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
6051 |
|
6052 | var _create = _handlebarsRuntime2['default'].create;
|
6053 | function create() {
|
6054 | var hb = _create();
|
6055 |
|
6056 | hb.compile = function (input, options) {
|
6057 | return _handlebarsCompilerCompiler.compile(input, options, hb);
|
6058 | };
|
6059 | hb.precompile = function (input, options) {
|
6060 | return _handlebarsCompilerCompiler.precompile(input, options, hb);
|
6061 | };
|
6062 |
|
6063 | hb.AST = _handlebarsCompilerAst2['default'];
|
6064 | hb.Compiler = _handlebarsCompilerCompiler.Compiler;
|
6065 | hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default'];
|
6066 | hb.Parser = _handlebarsCompilerBase.parser;
|
6067 | hb.parse = _handlebarsCompilerBase.parse;
|
6068 |
|
6069 | return hb;
|
6070 | }
|
6071 |
|
6072 | var inst = create();
|
6073 | inst.create = create;
|
6074 |
|
6075 | _handlebarsNoConflict2['default'](inst);
|
6076 |
|
6077 | inst.Visitor = _handlebarsCompilerVisitor2['default'];
|
6078 |
|
6079 | inst['default'] = inst;
|
6080 |
|
6081 | exports['default'] = inst;
|
6082 | module.exports = exports['default'];
|
6083 |
|
6084 | }),
|
6085 |
|
6086 | (function(module, exports) {
|
6087 |
|
6088 | "use strict";
|
6089 |
|
6090 | exports["default"] = function (obj) {
|
6091 | return obj && obj.__esModule ? obj : {
|
6092 | "default": obj
|
6093 | };
|
6094 | };
|
6095 |
|
6096 | exports.__esModule = true;
|
6097 |
|
6098 | }),
|
6099 |
|
6100 | (function(module, exports, __webpack_require__) {
|
6101 |
|
6102 | 'use strict';
|
6103 |
|
6104 | var _interopRequireWildcard = __webpack_require__(3)['default'];
|
6105 |
|
6106 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
6107 |
|
6108 | exports.__esModule = true;
|
6109 |
|
6110 | var _handlebarsBase = __webpack_require__(4);
|
6111 |
|
6112 | var base = _interopRequireWildcard(_handlebarsBase);
|
6113 |
|
6114 |
|
6115 |
|
6116 |
|
6117 | var _handlebarsSafeString = __webpack_require__(21);
|
6118 |
|
6119 | var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
|
6120 |
|
6121 | var _handlebarsException = __webpack_require__(6);
|
6122 |
|
6123 | var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
|
6124 |
|
6125 | var _handlebarsUtils = __webpack_require__(5);
|
6126 |
|
6127 | var Utils = _interopRequireWildcard(_handlebarsUtils);
|
6128 |
|
6129 | var _handlebarsRuntime = __webpack_require__(22);
|
6130 |
|
6131 | var runtime = _interopRequireWildcard(_handlebarsRuntime);
|
6132 |
|
6133 | var _handlebarsNoConflict = __webpack_require__(34);
|
6134 |
|
6135 | var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
6136 |
|
6137 |
|
6138 | function create() {
|
6139 | var hb = new base.HandlebarsEnvironment();
|
6140 |
|
6141 | Utils.extend(hb, base);
|
6142 | hb.SafeString = _handlebarsSafeString2['default'];
|
6143 | hb.Exception = _handlebarsException2['default'];
|
6144 | hb.Utils = Utils;
|
6145 | hb.escapeExpression = Utils.escapeExpression;
|
6146 |
|
6147 | hb.VM = runtime;
|
6148 | hb.template = function (spec) {
|
6149 | return runtime.template(spec, hb);
|
6150 | };
|
6151 |
|
6152 | return hb;
|
6153 | }
|
6154 |
|
6155 | var inst = create();
|
6156 | inst.create = create;
|
6157 |
|
6158 | _handlebarsNoConflict2['default'](inst);
|
6159 |
|
6160 | inst['default'] = inst;
|
6161 |
|
6162 | exports['default'] = inst;
|
6163 | module.exports = exports['default'];
|
6164 |
|
6165 | }),
|
6166 |
|
6167 | (function(module, exports) {
|
6168 |
|
6169 | "use strict";
|
6170 |
|
6171 | exports["default"] = function (obj) {
|
6172 | if (obj && obj.__esModule) {
|
6173 | return obj;
|
6174 | } else {
|
6175 | var newObj = {};
|
6176 |
|
6177 | if (obj != null) {
|
6178 | for (var key in obj) {
|
6179 | if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
|
6180 | }
|
6181 | }
|
6182 |
|
6183 | newObj["default"] = obj;
|
6184 | return newObj;
|
6185 | }
|
6186 | };
|
6187 |
|
6188 | exports.__esModule = true;
|
6189 |
|
6190 | }),
|
6191 |
|
6192 | (function(module, exports, __webpack_require__) {
|
6193 |
|
6194 | 'use strict';
|
6195 |
|
6196 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
6197 |
|
6198 | exports.__esModule = true;
|
6199 | exports.HandlebarsEnvironment = HandlebarsEnvironment;
|
6200 |
|
6201 | var _utils = __webpack_require__(5);
|
6202 |
|
6203 | var _exception = __webpack_require__(6);
|
6204 |
|
6205 | var _exception2 = _interopRequireDefault(_exception);
|
6206 |
|
6207 | var _helpers = __webpack_require__(10);
|
6208 |
|
6209 | var _decorators = __webpack_require__(18);
|
6210 |
|
6211 | var _logger = __webpack_require__(20);
|
6212 |
|
6213 | var _logger2 = _interopRequireDefault(_logger);
|
6214 |
|
6215 | var VERSION = '4.0.12';
|
6216 | exports.VERSION = VERSION;
|
6217 | var COMPILER_REVISION = 7;
|
6218 |
|
6219 | exports.COMPILER_REVISION = COMPILER_REVISION;
|
6220 | var REVISION_CHANGES = {
|
6221 | 1: '<= 1.0.rc.2',
|
6222 | 2: '== 1.0.0-rc.3',
|
6223 | 3: '== 1.0.0-rc.4',
|
6224 | 4: '== 1.x.x',
|
6225 | 5: '== 2.0.0-alpha.x',
|
6226 | 6: '>= 2.0.0-beta.1',
|
6227 | 7: '>= 4.0.0'
|
6228 | };
|
6229 |
|
6230 | exports.REVISION_CHANGES = REVISION_CHANGES;
|
6231 | var objectType = '[object Object]';
|
6232 |
|
6233 | function HandlebarsEnvironment(helpers, partials, decorators) {
|
6234 | this.helpers = helpers || {};
|
6235 | this.partials = partials || {};
|
6236 | this.decorators = decorators || {};
|
6237 |
|
6238 | _helpers.registerDefaultHelpers(this);
|
6239 | _decorators.registerDefaultDecorators(this);
|
6240 | }
|
6241 |
|
6242 | HandlebarsEnvironment.prototype = {
|
6243 | constructor: HandlebarsEnvironment,
|
6244 |
|
6245 | logger: _logger2['default'],
|
6246 | log: _logger2['default'].log,
|
6247 |
|
6248 | registerHelper: function registerHelper(name, fn) {
|
6249 | if (_utils.toString.call(name) === objectType) {
|
6250 | if (fn) {
|
6251 | throw new _exception2['default']('Arg not supported with multiple helpers');
|
6252 | }
|
6253 | _utils.extend(this.helpers, name);
|
6254 | } else {
|
6255 | this.helpers[name] = fn;
|
6256 | }
|
6257 | },
|
6258 | unregisterHelper: function unregisterHelper(name) {
|
6259 | delete this.helpers[name];
|
6260 | },
|
6261 |
|
6262 | registerPartial: function registerPartial(name, partial) {
|
6263 | if (_utils.toString.call(name) === objectType) {
|
6264 | _utils.extend(this.partials, name);
|
6265 | } else {
|
6266 | if (typeof partial === 'undefined') {
|
6267 | throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
|
6268 | }
|
6269 | this.partials[name] = partial;
|
6270 | }
|
6271 | },
|
6272 | unregisterPartial: function unregisterPartial(name) {
|
6273 | delete this.partials[name];
|
6274 | },
|
6275 |
|
6276 | registerDecorator: function registerDecorator(name, fn) {
|
6277 | if (_utils.toString.call(name) === objectType) {
|
6278 | if (fn) {
|
6279 | throw new _exception2['default']('Arg not supported with multiple decorators');
|
6280 | }
|
6281 | _utils.extend(this.decorators, name);
|
6282 | } else {
|
6283 | this.decorators[name] = fn;
|
6284 | }
|
6285 | },
|
6286 | unregisterDecorator: function unregisterDecorator(name) {
|
6287 | delete this.decorators[name];
|
6288 | }
|
6289 | };
|
6290 |
|
6291 | var log = _logger2['default'].log;
|
6292 |
|
6293 | exports.log = log;
|
6294 | exports.createFrame = _utils.createFrame;
|
6295 | exports.logger = _logger2['default'];
|
6296 |
|
6297 | }),
|
6298 |
|
6299 | (function(module, exports) {
|
6300 |
|
6301 | 'use strict';
|
6302 |
|
6303 | exports.__esModule = true;
|
6304 | exports.extend = extend;
|
6305 | exports.indexOf = indexOf;
|
6306 | exports.escapeExpression = escapeExpression;
|
6307 | exports.isEmpty = isEmpty;
|
6308 | exports.createFrame = createFrame;
|
6309 | exports.blockParams = blockParams;
|
6310 | exports.appendContextPath = appendContextPath;
|
6311 | var escape = {
|
6312 | '&': '&',
|
6313 | '<': '<',
|
6314 | '>': '>',
|
6315 | '"': '"',
|
6316 | "'": ''',
|
6317 | '`': '`',
|
6318 | '=': '='
|
6319 | };
|
6320 |
|
6321 | var badChars = /[&<>"'`=]/g,
|
6322 | possible = /[&<>"'`=]/;
|
6323 |
|
6324 | function escapeChar(chr) {
|
6325 | return escape[chr];
|
6326 | }
|
6327 |
|
6328 | function extend(obj /* , ...source */) {
|
6329 | for (var i = 1; i < arguments.length; i++) {
|
6330 | for (var key in arguments[i]) {
|
6331 | if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
|
6332 | obj[key] = arguments[i][key];
|
6333 | }
|
6334 | }
|
6335 | }
|
6336 |
|
6337 | return obj;
|
6338 | }
|
6339 |
|
6340 | var toString = Object.prototype.toString;
|
6341 |
|
6342 | exports.toString = toString;
|
6343 |
|
6344 |
|
6345 |
|
6346 | var isFunction = function isFunction(value) {
|
6347 | return typeof value === 'function';
|
6348 | };
|
6349 |
|
6350 |
|
6351 | if (isFunction(/x/)) {
|
6352 | exports.isFunction = isFunction = function (value) {
|
6353 | return typeof value === 'function' && toString.call(value) === '[object Function]';
|
6354 | };
|
6355 | }
|
6356 | exports.isFunction = isFunction;
|
6357 |
|
6358 |
|
6359 |
|
6360 |
|
6361 | var isArray = Array.isArray || function (value) {
|
6362 | return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
|
6363 | };
|
6364 |
|
6365 | exports.isArray = isArray;
|
6366 |
|
6367 |
|
6368 | function indexOf(array, value) {
|
6369 | for (var i = 0, len = array.length; i < len; i++) {
|
6370 | if (array[i] === value) {
|
6371 | return i;
|
6372 | }
|
6373 | }
|
6374 | return -1;
|
6375 | }
|
6376 |
|
6377 | function escapeExpression(string) {
|
6378 | if (typeof string !== 'string') {
|
6379 |
|
6380 | if (string && string.toHTML) {
|
6381 | return string.toHTML();
|
6382 | } else if (string == null) {
|
6383 | return '';
|
6384 | } else if (!string) {
|
6385 | return string + '';
|
6386 | }
|
6387 |
|
6388 |
|
6389 |
|
6390 |
|
6391 | string = '' + string;
|
6392 | }
|
6393 |
|
6394 | if (!possible.test(string)) {
|
6395 | return string;
|
6396 | }
|
6397 | return string.replace(badChars, escapeChar);
|
6398 | }
|
6399 |
|
6400 | function isEmpty(value) {
|
6401 | if (!value && value !== 0) {
|
6402 | return true;
|
6403 | } else if (isArray(value) && value.length === 0) {
|
6404 | return true;
|
6405 | } else {
|
6406 | return false;
|
6407 | }
|
6408 | }
|
6409 |
|
6410 | function createFrame(object) {
|
6411 | var frame = extend({}, object);
|
6412 | frame._parent = object;
|
6413 | return frame;
|
6414 | }
|
6415 |
|
6416 | function blockParams(params, ids) {
|
6417 | params.path = ids;
|
6418 | return params;
|
6419 | }
|
6420 |
|
6421 | function appendContextPath(contextPath, id) {
|
6422 | return (contextPath ? contextPath + '.' : '') + id;
|
6423 | }
|
6424 |
|
6425 | }),
|
6426 |
|
6427 | (function(module, exports, __webpack_require__) {
|
6428 |
|
6429 | 'use strict';
|
6430 |
|
6431 | var _Object$defineProperty = __webpack_require__(7)['default'];
|
6432 |
|
6433 | exports.__esModule = true;
|
6434 |
|
6435 | var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
6436 |
|
6437 | function Exception(message, node) {
|
6438 | var loc = node && node.loc,
|
6439 | line = undefined,
|
6440 | column = undefined;
|
6441 | if (loc) {
|
6442 | line = loc.start.line;
|
6443 | column = loc.start.column;
|
6444 |
|
6445 | message += ' - ' + line + ':' + column;
|
6446 | }
|
6447 |
|
6448 | var tmp = Error.prototype.constructor.call(this, message);
|
6449 |
|
6450 |
|
6451 | for (var idx = 0; idx < errorProps.length; idx++) {
|
6452 | this[errorProps[idx]] = tmp[errorProps[idx]];
|
6453 | }
|
6454 |
|
6455 |
|
6456 | if (Error.captureStackTrace) {
|
6457 | Error.captureStackTrace(this, Exception);
|
6458 | }
|
6459 |
|
6460 | try {
|
6461 | if (loc) {
|
6462 | this.lineNumber = line;
|
6463 |
|
6464 |
|
6465 |
|
6466 | if (_Object$defineProperty) {
|
6467 | Object.defineProperty(this, 'column', {
|
6468 | value: column,
|
6469 | enumerable: true
|
6470 | });
|
6471 | } else {
|
6472 | this.column = column;
|
6473 | }
|
6474 | }
|
6475 | } catch (nop) {
|
6476 |
|
6477 | }
|
6478 | }
|
6479 |
|
6480 | Exception.prototype = new Error();
|
6481 |
|
6482 | exports['default'] = Exception;
|
6483 | module.exports = exports['default'];
|
6484 |
|
6485 | }),
|
6486 |
|
6487 | (function(module, exports, __webpack_require__) {
|
6488 |
|
6489 | module.exports = { "default": __webpack_require__(8), __esModule: true };
|
6490 |
|
6491 | }),
|
6492 |
|
6493 | (function(module, exports, __webpack_require__) {
|
6494 |
|
6495 | var $ = __webpack_require__(9);
|
6496 | module.exports = function defineProperty(it, key, desc){
|
6497 | return $.setDesc(it, key, desc);
|
6498 | };
|
6499 |
|
6500 | }),
|
6501 |
|
6502 | (function(module, exports) {
|
6503 |
|
6504 | var $Object = Object;
|
6505 | module.exports = {
|
6506 | create: $Object.create,
|
6507 | getProto: $Object.getPrototypeOf,
|
6508 | isEnum: {}.propertyIsEnumerable,
|
6509 | getDesc: $Object.getOwnPropertyDescriptor,
|
6510 | setDesc: $Object.defineProperty,
|
6511 | setDescs: $Object.defineProperties,
|
6512 | getKeys: $Object.keys,
|
6513 | getNames: $Object.getOwnPropertyNames,
|
6514 | getSymbols: $Object.getOwnPropertySymbols,
|
6515 | each: [].forEach
|
6516 | };
|
6517 |
|
6518 | }),
|
6519 |
|
6520 | (function(module, exports, __webpack_require__) {
|
6521 |
|
6522 | 'use strict';
|
6523 |
|
6524 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
6525 |
|
6526 | exports.__esModule = true;
|
6527 | exports.registerDefaultHelpers = registerDefaultHelpers;
|
6528 |
|
6529 | var _helpersBlockHelperMissing = __webpack_require__(11);
|
6530 |
|
6531 | var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
|
6532 |
|
6533 | var _helpersEach = __webpack_require__(12);
|
6534 |
|
6535 | var _helpersEach2 = _interopRequireDefault(_helpersEach);
|
6536 |
|
6537 | var _helpersHelperMissing = __webpack_require__(13);
|
6538 |
|
6539 | var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
|
6540 |
|
6541 | var _helpersIf = __webpack_require__(14);
|
6542 |
|
6543 | var _helpersIf2 = _interopRequireDefault(_helpersIf);
|
6544 |
|
6545 | var _helpersLog = __webpack_require__(15);
|
6546 |
|
6547 | var _helpersLog2 = _interopRequireDefault(_helpersLog);
|
6548 |
|
6549 | var _helpersLookup = __webpack_require__(16);
|
6550 |
|
6551 | var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
|
6552 |
|
6553 | var _helpersWith = __webpack_require__(17);
|
6554 |
|
6555 | var _helpersWith2 = _interopRequireDefault(_helpersWith);
|
6556 |
|
6557 | function registerDefaultHelpers(instance) {
|
6558 | _helpersBlockHelperMissing2['default'](instance);
|
6559 | _helpersEach2['default'](instance);
|
6560 | _helpersHelperMissing2['default'](instance);
|
6561 | _helpersIf2['default'](instance);
|
6562 | _helpersLog2['default'](instance);
|
6563 | _helpersLookup2['default'](instance);
|
6564 | _helpersWith2['default'](instance);
|
6565 | }
|
6566 |
|
6567 | }),
|
6568 |
|
6569 | (function(module, exports, __webpack_require__) {
|
6570 |
|
6571 | 'use strict';
|
6572 |
|
6573 | exports.__esModule = true;
|
6574 |
|
6575 | var _utils = __webpack_require__(5);
|
6576 |
|
6577 | exports['default'] = function (instance) {
|
6578 | instance.registerHelper('blockHelperMissing', function (context, options) {
|
6579 | var inverse = options.inverse,
|
6580 | fn = options.fn;
|
6581 |
|
6582 | if (context === true) {
|
6583 | return fn(this);
|
6584 | } else if (context === false || context == null) {
|
6585 | return inverse(this);
|
6586 | } else if (_utils.isArray(context)) {
|
6587 | if (context.length > 0) {
|
6588 | if (options.ids) {
|
6589 | options.ids = [options.name];
|
6590 | }
|
6591 |
|
6592 | return instance.helpers.each(context, options);
|
6593 | } else {
|
6594 | return inverse(this);
|
6595 | }
|
6596 | } else {
|
6597 | if (options.data && options.ids) {
|
6598 | var data = _utils.createFrame(options.data);
|
6599 | data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
|
6600 | options = { data: data };
|
6601 | }
|
6602 |
|
6603 | return fn(context, options);
|
6604 | }
|
6605 | });
|
6606 | };
|
6607 |
|
6608 | module.exports = exports['default'];
|
6609 |
|
6610 | }),
|
6611 |
|
6612 | (function(module, exports, __webpack_require__) {
|
6613 |
|
6614 | 'use strict';
|
6615 |
|
6616 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
6617 |
|
6618 | exports.__esModule = true;
|
6619 |
|
6620 | var _utils = __webpack_require__(5);
|
6621 |
|
6622 | var _exception = __webpack_require__(6);
|
6623 |
|
6624 | var _exception2 = _interopRequireDefault(_exception);
|
6625 |
|
6626 | exports['default'] = function (instance) {
|
6627 | instance.registerHelper('each', function (context, options) {
|
6628 | if (!options) {
|
6629 | throw new _exception2['default']('Must pass iterator to #each');
|
6630 | }
|
6631 |
|
6632 | var fn = options.fn,
|
6633 | inverse = options.inverse,
|
6634 | i = 0,
|
6635 | ret = '',
|
6636 | data = undefined,
|
6637 | contextPath = undefined;
|
6638 |
|
6639 | if (options.data && options.ids) {
|
6640 | contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
6641 | }
|
6642 |
|
6643 | if (_utils.isFunction(context)) {
|
6644 | context = context.call(this);
|
6645 | }
|
6646 |
|
6647 | if (options.data) {
|
6648 | data = _utils.createFrame(options.data);
|
6649 | }
|
6650 |
|
6651 | function execIteration(field, index, last) {
|
6652 | if (data) {
|
6653 | data.key = field;
|
6654 | data.index = index;
|
6655 | data.first = index === 0;
|
6656 | data.last = !!last;
|
6657 |
|
6658 | if (contextPath) {
|
6659 | data.contextPath = contextPath + field;
|
6660 | }
|
6661 | }
|
6662 |
|
6663 | ret = ret + fn(context[field], {
|
6664 | data: data,
|
6665 | blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
|
6666 | });
|
6667 | }
|
6668 |
|
6669 | if (context && typeof context === 'object') {
|
6670 | if (_utils.isArray(context)) {
|
6671 | for (var j = context.length; i < j; i++) {
|
6672 | if (i in context) {
|
6673 | execIteration(i, i, i === context.length - 1);
|
6674 | }
|
6675 | }
|
6676 | } else {
|
6677 | var priorKey = undefined;
|
6678 |
|
6679 | for (var key in context) {
|
6680 | if (context.hasOwnProperty(key)) {
|
6681 |
|
6682 |
|
6683 |
|
6684 | if (priorKey !== undefined) {
|
6685 | execIteration(priorKey, i - 1);
|
6686 | }
|
6687 | priorKey = key;
|
6688 | i++;
|
6689 | }
|
6690 | }
|
6691 | if (priorKey !== undefined) {
|
6692 | execIteration(priorKey, i - 1, true);
|
6693 | }
|
6694 | }
|
6695 | }
|
6696 |
|
6697 | if (i === 0) {
|
6698 | ret = inverse(this);
|
6699 | }
|
6700 |
|
6701 | return ret;
|
6702 | });
|
6703 | };
|
6704 |
|
6705 | module.exports = exports['default'];
|
6706 |
|
6707 | }),
|
6708 |
|
6709 | (function(module, exports, __webpack_require__) {
|
6710 |
|
6711 | 'use strict';
|
6712 |
|
6713 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
6714 |
|
6715 | exports.__esModule = true;
|
6716 |
|
6717 | var _exception = __webpack_require__(6);
|
6718 |
|
6719 | var _exception2 = _interopRequireDefault(_exception);
|
6720 |
|
6721 | exports['default'] = function (instance) {
|
6722 | instance.registerHelper('helperMissing', function () /* [args, ]options */{
|
6723 | if (arguments.length === 1) {
|
6724 |
|
6725 | return undefined;
|
6726 | } else {
|
6727 |
|
6728 | throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
6729 | }
|
6730 | });
|
6731 | };
|
6732 |
|
6733 | module.exports = exports['default'];
|
6734 |
|
6735 | }),
|
6736 |
|
6737 | (function(module, exports, __webpack_require__) {
|
6738 |
|
6739 | 'use strict';
|
6740 |
|
6741 | exports.__esModule = true;
|
6742 |
|
6743 | var _utils = __webpack_require__(5);
|
6744 |
|
6745 | exports['default'] = function (instance) {
|
6746 | instance.registerHelper('if', function (conditional, options) {
|
6747 | if (_utils.isFunction(conditional)) {
|
6748 | conditional = conditional.call(this);
|
6749 | }
|
6750 |
|
6751 |
|
6752 |
|
6753 |
|
6754 | if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
|
6755 | return options.inverse(this);
|
6756 | } else {
|
6757 | return options.fn(this);
|
6758 | }
|
6759 | });
|
6760 |
|
6761 | instance.registerHelper('unless', function (conditional, options) {
|
6762 | return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
|
6763 | });
|
6764 | };
|
6765 |
|
6766 | module.exports = exports['default'];
|
6767 |
|
6768 | }),
|
6769 |
|
6770 | (function(module, exports) {
|
6771 |
|
6772 | 'use strict';
|
6773 |
|
6774 | exports.__esModule = true;
|
6775 |
|
6776 | exports['default'] = function (instance) {
|
6777 | instance.registerHelper('log', function () /* message, options */{
|
6778 | var args = [undefined],
|
6779 | options = arguments[arguments.length - 1];
|
6780 | for (var i = 0; i < arguments.length - 1; i++) {
|
6781 | args.push(arguments[i]);
|
6782 | }
|
6783 |
|
6784 | var level = 1;
|
6785 | if (options.hash.level != null) {
|
6786 | level = options.hash.level;
|
6787 | } else if (options.data && options.data.level != null) {
|
6788 | level = options.data.level;
|
6789 | }
|
6790 | args[0] = level;
|
6791 |
|
6792 | instance.log.apply(instance, args);
|
6793 | });
|
6794 | };
|
6795 |
|
6796 | module.exports = exports['default'];
|
6797 |
|
6798 | }),
|
6799 |
|
6800 | (function(module, exports) {
|
6801 |
|
6802 | 'use strict';
|
6803 |
|
6804 | exports.__esModule = true;
|
6805 |
|
6806 | exports['default'] = function (instance) {
|
6807 | instance.registerHelper('lookup', function (obj, field) {
|
6808 | return obj && obj[field];
|
6809 | });
|
6810 | };
|
6811 |
|
6812 | module.exports = exports['default'];
|
6813 |
|
6814 | }),
|
6815 |
|
6816 | (function(module, exports, __webpack_require__) {
|
6817 |
|
6818 | 'use strict';
|
6819 |
|
6820 | exports.__esModule = true;
|
6821 |
|
6822 | var _utils = __webpack_require__(5);
|
6823 |
|
6824 | exports['default'] = function (instance) {
|
6825 | instance.registerHelper('with', function (context, options) {
|
6826 | if (_utils.isFunction(context)) {
|
6827 | context = context.call(this);
|
6828 | }
|
6829 |
|
6830 | var fn = options.fn;
|
6831 |
|
6832 | if (!_utils.isEmpty(context)) {
|
6833 | var data = options.data;
|
6834 | if (options.data && options.ids) {
|
6835 | data = _utils.createFrame(options.data);
|
6836 | data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
|
6837 | }
|
6838 |
|
6839 | return fn(context, {
|
6840 | data: data,
|
6841 | blockParams: _utils.blockParams([context], [data && data.contextPath])
|
6842 | });
|
6843 | } else {
|
6844 | return options.inverse(this);
|
6845 | }
|
6846 | });
|
6847 | };
|
6848 |
|
6849 | module.exports = exports['default'];
|
6850 |
|
6851 | }),
|
6852 |
|
6853 | (function(module, exports, __webpack_require__) {
|
6854 |
|
6855 | 'use strict';
|
6856 |
|
6857 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
6858 |
|
6859 | exports.__esModule = true;
|
6860 | exports.registerDefaultDecorators = registerDefaultDecorators;
|
6861 |
|
6862 | var _decoratorsInline = __webpack_require__(19);
|
6863 |
|
6864 | var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
|
6865 |
|
6866 | function registerDefaultDecorators(instance) {
|
6867 | _decoratorsInline2['default'](instance);
|
6868 | }
|
6869 |
|
6870 | }),
|
6871 |
|
6872 | (function(module, exports, __webpack_require__) {
|
6873 |
|
6874 | 'use strict';
|
6875 |
|
6876 | exports.__esModule = true;
|
6877 |
|
6878 | var _utils = __webpack_require__(5);
|
6879 |
|
6880 | exports['default'] = function (instance) {
|
6881 | instance.registerDecorator('inline', function (fn, props, container, options) {
|
6882 | var ret = fn;
|
6883 | if (!props.partials) {
|
6884 | props.partials = {};
|
6885 | ret = function (context, options) {
|
6886 |
|
6887 | var original = container.partials;
|
6888 | container.partials = _utils.extend({}, original, props.partials);
|
6889 | var ret = fn(context, options);
|
6890 | container.partials = original;
|
6891 | return ret;
|
6892 | };
|
6893 | }
|
6894 |
|
6895 | props.partials[options.args[0]] = options.fn;
|
6896 |
|
6897 | return ret;
|
6898 | });
|
6899 | };
|
6900 |
|
6901 | module.exports = exports['default'];
|
6902 |
|
6903 | }),
|
6904 |
|
6905 | (function(module, exports, __webpack_require__) {
|
6906 |
|
6907 | 'use strict';
|
6908 |
|
6909 | exports.__esModule = true;
|
6910 |
|
6911 | var _utils = __webpack_require__(5);
|
6912 |
|
6913 | var logger = {
|
6914 | methodMap: ['debug', 'info', 'warn', 'error'],
|
6915 | level: 'info',
|
6916 |
|
6917 |
|
6918 | lookupLevel: function lookupLevel(level) {
|
6919 | if (typeof level === 'string') {
|
6920 | var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
|
6921 | if (levelMap >= 0) {
|
6922 | level = levelMap;
|
6923 | } else {
|
6924 | level = parseInt(level, 10);
|
6925 | }
|
6926 | }
|
6927 |
|
6928 | return level;
|
6929 | },
|
6930 |
|
6931 |
|
6932 | log: function log(level) {
|
6933 | level = logger.lookupLevel(level);
|
6934 |
|
6935 | if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
|
6936 | var method = logger.methodMap[level];
|
6937 | if (!console[method]) {
|
6938 |
|
6939 | method = 'log';
|
6940 | }
|
6941 |
|
6942 | for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
6943 | message[_key - 1] = arguments[_key];
|
6944 | }
|
6945 |
|
6946 | console[method].apply(console, message);
|
6947 | }
|
6948 | }
|
6949 | };
|
6950 |
|
6951 | exports['default'] = logger;
|
6952 | module.exports = exports['default'];
|
6953 |
|
6954 | }),
|
6955 |
|
6956 | (function(module, exports) {
|
6957 |
|
6958 |
|
6959 | 'use strict';
|
6960 |
|
6961 | exports.__esModule = true;
|
6962 | function SafeString(string) {
|
6963 | this.string = string;
|
6964 | }
|
6965 |
|
6966 | SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
6967 | return '' + this.string;
|
6968 | };
|
6969 |
|
6970 | exports['default'] = SafeString;
|
6971 | module.exports = exports['default'];
|
6972 |
|
6973 | }),
|
6974 |
|
6975 | (function(module, exports, __webpack_require__) {
|
6976 |
|
6977 | 'use strict';
|
6978 |
|
6979 | var _Object$seal = __webpack_require__(23)['default'];
|
6980 |
|
6981 | var _interopRequireWildcard = __webpack_require__(3)['default'];
|
6982 |
|
6983 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
6984 |
|
6985 | exports.__esModule = true;
|
6986 | exports.checkRevision = checkRevision;
|
6987 | exports.template = template;
|
6988 | exports.wrapProgram = wrapProgram;
|
6989 | exports.resolvePartial = resolvePartial;
|
6990 | exports.invokePartial = invokePartial;
|
6991 | exports.noop = noop;
|
6992 |
|
6993 | var _utils = __webpack_require__(5);
|
6994 |
|
6995 | var Utils = _interopRequireWildcard(_utils);
|
6996 |
|
6997 | var _exception = __webpack_require__(6);
|
6998 |
|
6999 | var _exception2 = _interopRequireDefault(_exception);
|
7000 |
|
7001 | var _base = __webpack_require__(4);
|
7002 |
|
7003 | function checkRevision(compilerInfo) {
|
7004 | var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
7005 | currentRevision = _base.COMPILER_REVISION;
|
7006 |
|
7007 | if (compilerRevision !== currentRevision) {
|
7008 | if (compilerRevision < currentRevision) {
|
7009 | var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
|
7010 | compilerVersions = _base.REVISION_CHANGES[compilerRevision];
|
7011 | 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 + ').');
|
7012 | } else {
|
7013 |
|
7014 | 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] + ').');
|
7015 | }
|
7016 | }
|
7017 | }
|
7018 |
|
7019 | function template(templateSpec, env) {
|
7020 |
|
7021 | if (!env) {
|
7022 | throw new _exception2['default']('No environment passed to template');
|
7023 | }
|
7024 | if (!templateSpec || !templateSpec.main) {
|
7025 | throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
|
7026 | }
|
7027 |
|
7028 | templateSpec.main.decorator = templateSpec.main_d;
|
7029 |
|
7030 |
|
7031 |
|
7032 | env.VM.checkRevision(templateSpec.compiler);
|
7033 |
|
7034 | function invokePartialWrapper(partial, context, options) {
|
7035 | if (options.hash) {
|
7036 | context = Utils.extend({}, context, options.hash);
|
7037 | if (options.ids) {
|
7038 | options.ids[0] = true;
|
7039 | }
|
7040 | }
|
7041 |
|
7042 | partial = env.VM.resolvePartial.call(this, partial, context, options);
|
7043 | var result = env.VM.invokePartial.call(this, partial, context, options);
|
7044 |
|
7045 | if (result == null && env.compile) {
|
7046 | options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
7047 | result = options.partials[options.name](context, options);
|
7048 | }
|
7049 | if (result != null) {
|
7050 | if (options.indent) {
|
7051 | var lines = result.split('\n');
|
7052 | for (var i = 0, l = lines.length; i < l; i++) {
|
7053 | if (!lines[i] && i + 1 === l) {
|
7054 | break;
|
7055 | }
|
7056 |
|
7057 | lines[i] = options.indent + lines[i];
|
7058 | }
|
7059 | result = lines.join('\n');
|
7060 | }
|
7061 | return result;
|
7062 | } else {
|
7063 | throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
7064 | }
|
7065 | }
|
7066 |
|
7067 |
|
7068 | var container = {
|
7069 | strict: function strict(obj, name) {
|
7070 | if (!(name in obj)) {
|
7071 | throw new _exception2['default']('"' + name + '" not defined in ' + obj);
|
7072 | }
|
7073 | return obj[name];
|
7074 | },
|
7075 | lookup: function lookup(depths, name) {
|
7076 | var len = depths.length;
|
7077 | for (var i = 0; i < len; i++) {
|
7078 | if (depths[i] && depths[i][name] != null) {
|
7079 | return depths[i][name];
|
7080 | }
|
7081 | }
|
7082 | },
|
7083 | lambda: function lambda(current, context) {
|
7084 | return typeof current === 'function' ? current.call(context) : current;
|
7085 | },
|
7086 |
|
7087 | escapeExpression: Utils.escapeExpression,
|
7088 | invokePartial: invokePartialWrapper,
|
7089 |
|
7090 | fn: function fn(i) {
|
7091 | var ret = templateSpec[i];
|
7092 | ret.decorator = templateSpec[i + '_d'];
|
7093 | return ret;
|
7094 | },
|
7095 |
|
7096 | programs: [],
|
7097 | program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
7098 | var programWrapper = this.programs[i],
|
7099 | fn = this.fn(i);
|
7100 | if (data || depths || blockParams || declaredBlockParams) {
|
7101 | programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
7102 | } else if (!programWrapper) {
|
7103 | programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
7104 | }
|
7105 | return programWrapper;
|
7106 | },
|
7107 |
|
7108 | data: function data(value, depth) {
|
7109 | while (value && depth--) {
|
7110 | value = value._parent;
|
7111 | }
|
7112 | return value;
|
7113 | },
|
7114 | merge: function merge(param, common) {
|
7115 | var obj = param || common;
|
7116 |
|
7117 | if (param && common && param !== common) {
|
7118 | obj = Utils.extend({}, common, param);
|
7119 | }
|
7120 |
|
7121 | return obj;
|
7122 | },
|
7123 |
|
7124 | nullContext: _Object$seal({}),
|
7125 |
|
7126 | noop: env.VM.noop,
|
7127 | compilerInfo: templateSpec.compiler
|
7128 | };
|
7129 |
|
7130 | function ret(context) {
|
7131 | var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
7132 |
|
7133 | var data = options.data;
|
7134 |
|
7135 | ret._setup(options);
|
7136 | if (!options.partial && templateSpec.useData) {
|
7137 | data = initData(context, data);
|
7138 | }
|
7139 | var depths = undefined,
|
7140 | blockParams = templateSpec.useBlockParams ? [] : undefined;
|
7141 | if (templateSpec.useDepths) {
|
7142 | if (options.depths) {
|
7143 | depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
|
7144 | } else {
|
7145 | depths = [context];
|
7146 | }
|
7147 | }
|
7148 |
|
7149 | function main(context /*, options*/) {
|
7150 | return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
|
7151 | }
|
7152 | main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
|
7153 | return main(context, options);
|
7154 | }
|
7155 | ret.isTop = true;
|
7156 |
|
7157 | ret._setup = function (options) {
|
7158 | if (!options.partial) {
|
7159 | container.helpers = container.merge(options.helpers, env.helpers);
|
7160 |
|
7161 | if (templateSpec.usePartial) {
|
7162 | container.partials = container.merge(options.partials, env.partials);
|
7163 | }
|
7164 | if (templateSpec.usePartial || templateSpec.useDecorators) {
|
7165 | container.decorators = container.merge(options.decorators, env.decorators);
|
7166 | }
|
7167 | } else {
|
7168 | container.helpers = options.helpers;
|
7169 | container.partials = options.partials;
|
7170 | container.decorators = options.decorators;
|
7171 | }
|
7172 | };
|
7173 |
|
7174 | ret._child = function (i, data, blockParams, depths) {
|
7175 | if (templateSpec.useBlockParams && !blockParams) {
|
7176 | throw new _exception2['default']('must pass block params');
|
7177 | }
|
7178 | if (templateSpec.useDepths && !depths) {
|
7179 | throw new _exception2['default']('must pass parent depths');
|
7180 | }
|
7181 |
|
7182 | return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
7183 | };
|
7184 | return ret;
|
7185 | }
|
7186 |
|
7187 | function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
7188 | function prog(context) {
|
7189 | var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
7190 |
|
7191 | var currentDepths = depths;
|
7192 | if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
|
7193 | currentDepths = [context].concat(depths);
|
7194 | }
|
7195 |
|
7196 | return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
|
7197 | }
|
7198 |
|
7199 | prog = executeDecorators(fn, prog, container, depths, data, blockParams);
|
7200 |
|
7201 | prog.program = i;
|
7202 | prog.depth = depths ? depths.length : 0;
|
7203 | prog.blockParams = declaredBlockParams || 0;
|
7204 | return prog;
|
7205 | }
|
7206 |
|
7207 | function resolvePartial(partial, context, options) {
|
7208 | if (!partial) {
|
7209 | if (options.name === '@partial-block') {
|
7210 | partial = options.data['partial-block'];
|
7211 | } else {
|
7212 | partial = options.partials[options.name];
|
7213 | }
|
7214 | } else if (!partial.call && !options.name) {
|
7215 |
|
7216 | options.name = partial;
|
7217 | partial = options.partials[partial];
|
7218 | }
|
7219 | return partial;
|
7220 | }
|
7221 |
|
7222 | function invokePartial(partial, context, options) {
|
7223 |
|
7224 | var currentPartialBlock = options.data && options.data['partial-block'];
|
7225 | options.partial = true;
|
7226 | if (options.ids) {
|
7227 | options.data.contextPath = options.ids[0] || options.data.contextPath;
|
7228 | }
|
7229 |
|
7230 | var partialBlock = undefined;
|
7231 | if (options.fn && options.fn !== noop) {
|
7232 | (function () {
|
7233 | options.data = _base.createFrame(options.data);
|
7234 |
|
7235 | var fn = options.fn;
|
7236 | partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
|
7237 | var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
7238 |
|
7239 |
|
7240 |
|
7241 | options.data = _base.createFrame(options.data);
|
7242 | options.data['partial-block'] = currentPartialBlock;
|
7243 | return fn(context, options);
|
7244 | };
|
7245 | if (fn.partials) {
|
7246 | options.partials = Utils.extend({}, options.partials, fn.partials);
|
7247 | }
|
7248 | })();
|
7249 | }
|
7250 |
|
7251 | if (partial === undefined && partialBlock) {
|
7252 | partial = partialBlock;
|
7253 | }
|
7254 |
|
7255 | if (partial === undefined) {
|
7256 | throw new _exception2['default']('The partial ' + options.name + ' could not be found');
|
7257 | } else if (partial instanceof Function) {
|
7258 | return partial(context, options);
|
7259 | }
|
7260 | }
|
7261 |
|
7262 | function noop() {
|
7263 | return '';
|
7264 | }
|
7265 |
|
7266 | function initData(context, data) {
|
7267 | if (!data || !('root' in data)) {
|
7268 | data = data ? _base.createFrame(data) : {};
|
7269 | data.root = context;
|
7270 | }
|
7271 | return data;
|
7272 | }
|
7273 |
|
7274 | function executeDecorators(fn, prog, container, depths, data, blockParams) {
|
7275 | if (fn.decorator) {
|
7276 | var props = {};
|
7277 | prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
|
7278 | Utils.extend(prog, props);
|
7279 | }
|
7280 | return prog;
|
7281 | }
|
7282 |
|
7283 | }),
|
7284 |
|
7285 | (function(module, exports, __webpack_require__) {
|
7286 |
|
7287 | module.exports = { "default": __webpack_require__(24), __esModule: true };
|
7288 |
|
7289 | }),
|
7290 |
|
7291 | (function(module, exports, __webpack_require__) {
|
7292 |
|
7293 | __webpack_require__(25);
|
7294 | module.exports = __webpack_require__(30).Object.seal;
|
7295 |
|
7296 | }),
|
7297 |
|
7298 | (function(module, exports, __webpack_require__) {
|
7299 |
|
7300 |
|
7301 | var isObject = __webpack_require__(26);
|
7302 |
|
7303 | __webpack_require__(27)('seal', function($seal){
|
7304 | return function seal(it){
|
7305 | return $seal && isObject(it) ? $seal(it) : it;
|
7306 | };
|
7307 | });
|
7308 |
|
7309 | }),
|
7310 |
|
7311 | (function(module, exports) {
|
7312 |
|
7313 | module.exports = function(it){
|
7314 | return typeof it === 'object' ? it !== null : typeof it === 'function';
|
7315 | };
|
7316 |
|
7317 | }),
|
7318 |
|
7319 | (function(module, exports, __webpack_require__) {
|
7320 |
|
7321 |
|
7322 | var $export = __webpack_require__(28)
|
7323 | , core = __webpack_require__(30)
|
7324 | , fails = __webpack_require__(33);
|
7325 | module.exports = function(KEY, exec){
|
7326 | var fn = (core.Object || {})[KEY] || Object[KEY]
|
7327 | , exp = {};
|
7328 | exp[KEY] = exec(fn);
|
7329 | $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
|
7330 | };
|
7331 |
|
7332 | }),
|
7333 |
|
7334 | (function(module, exports, __webpack_require__) {
|
7335 |
|
7336 | var global = __webpack_require__(29)
|
7337 | , core = __webpack_require__(30)
|
7338 | , ctx = __webpack_require__(31)
|
7339 | , PROTOTYPE = 'prototype';
|
7340 |
|
7341 | var $export = function(type, name, source){
|
7342 | var IS_FORCED = type & $export.F
|
7343 | , IS_GLOBAL = type & $export.G
|
7344 | , IS_STATIC = type & $export.S
|
7345 | , IS_PROTO = type & $export.P
|
7346 | , IS_BIND = type & $export.B
|
7347 | , IS_WRAP = type & $export.W
|
7348 | , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
7349 | , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
|
7350 | , key, own, out;
|
7351 | if(IS_GLOBAL)source = name;
|
7352 | for(key in source){
|
7353 |
|
7354 | own = !IS_FORCED && target && key in target;
|
7355 | if(own && key in exports)continue;
|
7356 |
|
7357 | out = own ? target[key] : source[key];
|
7358 |
|
7359 | exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
7360 |
|
7361 | : IS_BIND && own ? ctx(out, global)
|
7362 |
|
7363 | : IS_WRAP && target[key] == out ? (function(C){
|
7364 | var F = function(param){
|
7365 | return this instanceof C ? new C(param) : C(param);
|
7366 | };
|
7367 | F[PROTOTYPE] = C[PROTOTYPE];
|
7368 | return F;
|
7369 |
|
7370 | })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
7371 | if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
|
7372 | }
|
7373 | };
|
7374 |
|
7375 | $export.F = 1;
|
7376 | $export.G = 2;
|
7377 | $export.S = 4;
|
7378 | $export.P = 8;
|
7379 | $export.B = 16;
|
7380 | $export.W = 32;
|
7381 | module.exports = $export;
|
7382 |
|
7383 | }),
|
7384 |
|
7385 | (function(module, exports) {
|
7386 |
|
7387 |
|
7388 | var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
7389 | ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
7390 | if(typeof __g == 'number')__g = global;
|
7391 |
|
7392 | }),
|
7393 |
|
7394 | (function(module, exports) {
|
7395 |
|
7396 | var core = module.exports = {version: '1.2.6'};
|
7397 | if(typeof __e == 'number')__e = core;
|
7398 |
|
7399 | }),
|
7400 |
|
7401 | (function(module, exports, __webpack_require__) {
|
7402 |
|
7403 |
|
7404 | var aFunction = __webpack_require__(32);
|
7405 | module.exports = function(fn, that, length){
|
7406 | aFunction(fn);
|
7407 | if(that === undefined)return fn;
|
7408 | switch(length){
|
7409 | case 1: return function(a){
|
7410 | return fn.call(that, a);
|
7411 | };
|
7412 | case 2: return function(a, b){
|
7413 | return fn.call(that, a, b);
|
7414 | };
|
7415 | case 3: return function(a, b, c){
|
7416 | return fn.call(that, a, b, c);
|
7417 | };
|
7418 | }
|
7419 | return function(/* ...args */){
|
7420 | return fn.apply(that, arguments);
|
7421 | };
|
7422 | };
|
7423 |
|
7424 | }),
|
7425 |
|
7426 | (function(module, exports) {
|
7427 |
|
7428 | module.exports = function(it){
|
7429 | if(typeof it != 'function')throw TypeError(it + ' is not a function!');
|
7430 | return it;
|
7431 | };
|
7432 |
|
7433 | }),
|
7434 |
|
7435 | (function(module, exports) {
|
7436 |
|
7437 | module.exports = function(exec){
|
7438 | try {
|
7439 | return !!exec();
|
7440 | } catch(e){
|
7441 | return true;
|
7442 | }
|
7443 | };
|
7444 |
|
7445 | }),
|
7446 |
|
7447 | (function(module, exports) {
|
7448 |
|
7449 | (function(global) {
|
7450 | 'use strict';
|
7451 |
|
7452 | exports.__esModule = true;
|
7453 |
|
7454 | exports['default'] = function (Handlebars) {
|
7455 |
|
7456 | var root = typeof global !== 'undefined' ? global : window,
|
7457 | $Handlebars = root.Handlebars;
|
7458 |
|
7459 | Handlebars.noConflict = function () {
|
7460 | if (root.Handlebars === Handlebars) {
|
7461 | root.Handlebars = $Handlebars;
|
7462 | }
|
7463 | return Handlebars;
|
7464 | };
|
7465 | };
|
7466 |
|
7467 | module.exports = exports['default'];
|
7468 | }.call(exports, (function() { return this; }())))
|
7469 |
|
7470 | }),
|
7471 |
|
7472 | (function(module, exports) {
|
7473 |
|
7474 | 'use strict';
|
7475 |
|
7476 | exports.__esModule = true;
|
7477 | var AST = {
|
7478 |
|
7479 | helpers: {
|
7480 |
|
7481 |
|
7482 |
|
7483 | helperExpression: function helperExpression(node) {
|
7484 | return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash);
|
7485 | },
|
7486 |
|
7487 | scopedId: function scopedId(path) {
|
7488 | return (/^\.|this\b/.test(path.original)
|
7489 | );
|
7490 | },
|
7491 |
|
7492 |
|
7493 |
|
7494 | simpleId: function simpleId(path) {
|
7495 | return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
|
7496 | }
|
7497 | }
|
7498 | };
|
7499 |
|
7500 |
|
7501 |
|
7502 | exports['default'] = AST;
|
7503 | module.exports = exports['default'];
|
7504 |
|
7505 | }),
|
7506 |
|
7507 | (function(module, exports, __webpack_require__) {
|
7508 |
|
7509 | 'use strict';
|
7510 |
|
7511 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
7512 |
|
7513 | var _interopRequireWildcard = __webpack_require__(3)['default'];
|
7514 |
|
7515 | exports.__esModule = true;
|
7516 | exports.parse = parse;
|
7517 |
|
7518 | var _parser = __webpack_require__(37);
|
7519 |
|
7520 | var _parser2 = _interopRequireDefault(_parser);
|
7521 |
|
7522 | var _whitespaceControl = __webpack_require__(38);
|
7523 |
|
7524 | var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
|
7525 |
|
7526 | var _helpers = __webpack_require__(40);
|
7527 |
|
7528 | var Helpers = _interopRequireWildcard(_helpers);
|
7529 |
|
7530 | var _utils = __webpack_require__(5);
|
7531 |
|
7532 | exports.parser = _parser2['default'];
|
7533 |
|
7534 | var yy = {};
|
7535 | _utils.extend(yy, Helpers);
|
7536 |
|
7537 | function parse(input, options) {
|
7538 |
|
7539 | if (input.type === 'Program') {
|
7540 | return input;
|
7541 | }
|
7542 |
|
7543 | _parser2['default'].yy = yy;
|
7544 |
|
7545 |
|
7546 | yy.locInfo = function (locInfo) {
|
7547 | return new yy.SourceLocation(options && options.srcName, locInfo);
|
7548 | };
|
7549 |
|
7550 | var strip = new _whitespaceControl2['default'](options);
|
7551 | return strip.accept(_parser2['default'].parse(input));
|
7552 | }
|
7553 |
|
7554 | }),
|
7555 |
|
7556 | (function(module, exports) {
|
7557 |
|
7558 |
|
7559 |
|
7560 | "use strict";
|
7561 |
|
7562 | exports.__esModule = true;
|
7563 | var handlebars = (function () {
|
7564 | var parser = { trace: function trace() {},
|
7565 | yy: {},
|
7566 | symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
|
7567 | terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
|
7568 | productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
|
7569 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$
|
7570 | /*``*/) {
|
7571 |
|
7572 | var $0 = $$.length - 1;
|
7573 | switch (yystate) {
|
7574 | case 1:
|
7575 | return $$[$0 - 1];
|
7576 | break;
|
7577 | case 2:
|
7578 | this.$ = yy.prepareProgram($$[$0]);
|
7579 | break;
|
7580 | case 3:
|
7581 | this.$ = $$[$0];
|
7582 | break;
|
7583 | case 4:
|
7584 | this.$ = $$[$0];
|
7585 | break;
|
7586 | case 5:
|
7587 | this.$ = $$[$0];
|
7588 | break;
|
7589 | case 6:
|
7590 | this.$ = $$[$0];
|
7591 | break;
|
7592 | case 7:
|
7593 | this.$ = $$[$0];
|
7594 | break;
|
7595 | case 8:
|
7596 | this.$ = $$[$0];
|
7597 | break;
|
7598 | case 9:
|
7599 | this.$ = {
|
7600 | type: 'CommentStatement',
|
7601 | value: yy.stripComment($$[$0]),
|
7602 | strip: yy.stripFlags($$[$0], $$[$0]),
|
7603 | loc: yy.locInfo(this._$)
|
7604 | };
|
7605 |
|
7606 | break;
|
7607 | case 10:
|
7608 | this.$ = {
|
7609 | type: 'ContentStatement',
|
7610 | original: $$[$0],
|
7611 | value: $$[$0],
|
7612 | loc: yy.locInfo(this._$)
|
7613 | };
|
7614 |
|
7615 | break;
|
7616 | case 11:
|
7617 | this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
|
7618 | break;
|
7619 | case 12:
|
7620 | this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
|
7621 | break;
|
7622 | case 13:
|
7623 | this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
|
7624 | break;
|
7625 | case 14:
|
7626 | this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
|
7627 | break;
|
7628 | case 15:
|
7629 | this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
7630 | break;
|
7631 | case 16:
|
7632 | this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
7633 | break;
|
7634 | case 17:
|
7635 | this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
7636 | break;
|
7637 | case 18:
|
7638 | this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
|
7639 | break;
|
7640 | case 19:
|
7641 | var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
|
7642 | program = yy.prepareProgram([inverse], $$[$0 - 1].loc);
|
7643 | program.chained = true;
|
7644 |
|
7645 | this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true };
|
7646 |
|
7647 | break;
|
7648 | case 20:
|
7649 | this.$ = $$[$0];
|
7650 | break;
|
7651 | case 21:
|
7652 | this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
|
7653 | break;
|
7654 | case 22:
|
7655 | this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
|
7656 | break;
|
7657 | case 23:
|
7658 | this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
|
7659 | break;
|
7660 | case 24:
|
7661 | this.$ = {
|
7662 | type: 'PartialStatement',
|
7663 | name: $$[$0 - 3],
|
7664 | params: $$[$0 - 2],
|
7665 | hash: $$[$0 - 1],
|
7666 | indent: '',
|
7667 | strip: yy.stripFlags($$[$0 - 4], $$[$0]),
|
7668 | loc: yy.locInfo(this._$)
|
7669 | };
|
7670 |
|
7671 | break;
|
7672 | case 25:
|
7673 | this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
|
7674 | break;
|
7675 | case 26:
|
7676 | this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
|
7677 | break;
|
7678 | case 27:
|
7679 | this.$ = $$[$0];
|
7680 | break;
|
7681 | case 28:
|
7682 | this.$ = $$[$0];
|
7683 | break;
|
7684 | case 29:
|
7685 | this.$ = {
|
7686 | type: 'SubExpression',
|
7687 | path: $$[$0 - 3],
|
7688 | params: $$[$0 - 2],
|
7689 | hash: $$[$0 - 1],
|
7690 | loc: yy.locInfo(this._$)
|
7691 | };
|
7692 |
|
7693 | break;
|
7694 | case 30:
|
7695 | this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) };
|
7696 | break;
|
7697 | case 31:
|
7698 | this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
|
7699 | break;
|
7700 | case 32:
|
7701 | this.$ = yy.id($$[$0 - 1]);
|
7702 | break;
|
7703 | case 33:
|
7704 | this.$ = $$[$0];
|
7705 | break;
|
7706 | case 34:
|
7707 | this.$ = $$[$0];
|
7708 | break;
|
7709 | case 35:
|
7710 | this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
|
7711 | break;
|
7712 | case 36:
|
7713 | this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
|
7714 | break;
|
7715 | case 37:
|
7716 | this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) };
|
7717 | break;
|
7718 | case 38:
|
7719 | this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) };
|
7720 | break;
|
7721 | case 39:
|
7722 | this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) };
|
7723 | break;
|
7724 | case 40:
|
7725 | this.$ = $$[$0];
|
7726 | break;
|
7727 | case 41:
|
7728 | this.$ = $$[$0];
|
7729 | break;
|
7730 | case 42:
|
7731 | this.$ = yy.preparePath(true, $$[$0], this._$);
|
7732 | break;
|
7733 | case 43:
|
7734 | this.$ = yy.preparePath(false, $$[$0], this._$);
|
7735 | break;
|
7736 | case 44:
|
7737 | $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2];
|
7738 | break;
|
7739 | case 45:
|
7740 | this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
|
7741 | break;
|
7742 | case 46:
|
7743 | this.$ = [];
|
7744 | break;
|
7745 | case 47:
|
7746 | $$[$0 - 1].push($$[$0]);
|
7747 | break;
|
7748 | case 48:
|
7749 | this.$ = [$$[$0]];
|
7750 | break;
|
7751 | case 49:
|
7752 | $$[$0 - 1].push($$[$0]);
|
7753 | break;
|
7754 | case 50:
|
7755 | this.$ = [];
|
7756 | break;
|
7757 | case 51:
|
7758 | $$[$0 - 1].push($$[$0]);
|
7759 | break;
|
7760 | case 58:
|
7761 | this.$ = [];
|
7762 | break;
|
7763 | case 59:
|
7764 | $$[$0 - 1].push($$[$0]);
|
7765 | break;
|
7766 | case 64:
|
7767 | this.$ = [];
|
7768 | break;
|
7769 | case 65:
|
7770 | $$[$0 - 1].push($$[$0]);
|
7771 | break;
|
7772 | case 70:
|
7773 | this.$ = [];
|
7774 | break;
|
7775 | case 71:
|
7776 | $$[$0 - 1].push($$[$0]);
|
7777 | break;
|
7778 | case 78:
|
7779 | this.$ = [];
|
7780 | break;
|
7781 | case 79:
|
7782 | $$[$0 - 1].push($$[$0]);
|
7783 | break;
|
7784 | case 82:
|
7785 | this.$ = [];
|
7786 | break;
|
7787 | case 83:
|
7788 | $$[$0 - 1].push($$[$0]);
|
7789 | break;
|
7790 | case 86:
|
7791 | this.$ = [];
|
7792 | break;
|
7793 | case 87:
|
7794 | $$[$0 - 1].push($$[$0]);
|
7795 | break;
|
7796 | case 90:
|
7797 | this.$ = [];
|
7798 | break;
|
7799 | case 91:
|
7800 | $$[$0 - 1].push($$[$0]);
|
7801 | break;
|
7802 | case 94:
|
7803 | this.$ = [];
|
7804 | break;
|
7805 | case 95:
|
7806 | $$[$0 - 1].push($$[$0]);
|
7807 | break;
|
7808 | case 98:
|
7809 | this.$ = [$$[$0]];
|
7810 | break;
|
7811 | case 99:
|
7812 | $$[$0 - 1].push($$[$0]);
|
7813 | break;
|
7814 | case 100:
|
7815 | this.$ = [$$[$0]];
|
7816 | break;
|
7817 | case 101:
|
7818 | $$[$0 - 1].push($$[$0]);
|
7819 | break;
|
7820 | }
|
7821 | },
|
7822 | table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }],
|
7823 | defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] },
|
7824 | parseError: function parseError(str, hash) {
|
7825 | throw new Error(str);
|
7826 | },
|
7827 | parse: function parse(input) {
|
7828 | var self = this,
|
7829 | stack = [0],
|
7830 | vstack = [null],
|
7831 | lstack = [],
|
7832 | table = this.table,
|
7833 | yytext = "",
|
7834 | yylineno = 0,
|
7835 | yyleng = 0,
|
7836 | recovering = 0,
|
7837 | TERROR = 2,
|
7838 | EOF = 1;
|
7839 | this.lexer.setInput(input);
|
7840 | this.lexer.yy = this.yy;
|
7841 | this.yy.lexer = this.lexer;
|
7842 | this.yy.parser = this;
|
7843 | if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
|
7844 | var yyloc = this.lexer.yylloc;
|
7845 | lstack.push(yyloc);
|
7846 | var ranges = this.lexer.options && this.lexer.options.ranges;
|
7847 | if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
|
7848 | function popStack(n) {
|
7849 | stack.length = stack.length - 2 * n;
|
7850 | vstack.length = vstack.length - n;
|
7851 | lstack.length = lstack.length - n;
|
7852 | }
|
7853 | function lex() {
|
7854 | var token;
|
7855 | token = self.lexer.lex() || 1;
|
7856 | if (typeof token !== "number") {
|
7857 | token = self.symbols_[token] || token;
|
7858 | }
|
7859 | return token;
|
7860 | }
|
7861 | var symbol,
|
7862 | preErrorSymbol,
|
7863 | state,
|
7864 | action,
|
7865 | a,
|
7866 | r,
|
7867 | yyval = {},
|
7868 | p,
|
7869 | len,
|
7870 | newState,
|
7871 | expected;
|
7872 | while (true) {
|
7873 | state = stack[stack.length - 1];
|
7874 | if (this.defaultActions[state]) {
|
7875 | action = this.defaultActions[state];
|
7876 | } else {
|
7877 | if (symbol === null || typeof symbol == "undefined") {
|
7878 | symbol = lex();
|
7879 | }
|
7880 | action = table[state] && table[state][symbol];
|
7881 | }
|
7882 | if (typeof action === "undefined" || !action.length || !action[0]) {
|
7883 | var errStr = "";
|
7884 | if (!recovering) {
|
7885 | expected = [];
|
7886 | for (p in table[state]) if (this.terminals_[p] && p > 2) {
|
7887 | expected.push("'" + this.terminals_[p] + "'");
|
7888 | }
|
7889 | if (this.lexer.showPosition) {
|
7890 | errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
7891 | } else {
|
7892 | errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
7893 | }
|
7894 | this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
|
7895 | }
|
7896 | }
|
7897 | if (action[0] instanceof Array && action.length > 1) {
|
7898 | throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
7899 | }
|
7900 | switch (action[0]) {
|
7901 | case 1:
|
7902 | stack.push(symbol);
|
7903 | vstack.push(this.lexer.yytext);
|
7904 | lstack.push(this.lexer.yylloc);
|
7905 | stack.push(action[1]);
|
7906 | symbol = null;
|
7907 | if (!preErrorSymbol) {
|
7908 | yyleng = this.lexer.yyleng;
|
7909 | yytext = this.lexer.yytext;
|
7910 | yylineno = this.lexer.yylineno;
|
7911 | yyloc = this.lexer.yylloc;
|
7912 | if (recovering > 0) recovering--;
|
7913 | } else {
|
7914 | symbol = preErrorSymbol;
|
7915 | preErrorSymbol = null;
|
7916 | }
|
7917 | break;
|
7918 | case 2:
|
7919 | len = this.productions_[action[1]][1];
|
7920 | yyval.$ = vstack[vstack.length - len];
|
7921 | yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
|
7922 | if (ranges) {
|
7923 | yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
7924 | }
|
7925 | r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
|
7926 | if (typeof r !== "undefined") {
|
7927 | return r;
|
7928 | }
|
7929 | if (len) {
|
7930 | stack = stack.slice(0, -1 * len * 2);
|
7931 | vstack = vstack.slice(0, -1 * len);
|
7932 | lstack = lstack.slice(0, -1 * len);
|
7933 | }
|
7934 | stack.push(this.productions_[action[1]][0]);
|
7935 | vstack.push(yyval.$);
|
7936 | lstack.push(yyval._$);
|
7937 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
7938 | stack.push(newState);
|
7939 | break;
|
7940 | case 3:
|
7941 | return true;
|
7942 | }
|
7943 | }
|
7944 | return true;
|
7945 | }
|
7946 | };
|
7947 |
|
7948 | var lexer = (function () {
|
7949 | var lexer = { EOF: 1,
|
7950 | parseError: function parseError(str, hash) {
|
7951 | if (this.yy.parser) {
|
7952 | this.yy.parser.parseError(str, hash);
|
7953 | } else {
|
7954 | throw new Error(str);
|
7955 | }
|
7956 | },
|
7957 | setInput: function setInput(input) {
|
7958 | this._input = input;
|
7959 | this._more = this._less = this.done = false;
|
7960 | this.yylineno = this.yyleng = 0;
|
7961 | this.yytext = this.matched = this.match = '';
|
7962 | this.conditionStack = ['INITIAL'];
|
7963 | this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
|
7964 | if (this.options.ranges) this.yylloc.range = [0, 0];
|
7965 | this.offset = 0;
|
7966 | return this;
|
7967 | },
|
7968 | input: function input() {
|
7969 | var ch = this._input[0];
|
7970 | this.yytext += ch;
|
7971 | this.yyleng++;
|
7972 | this.offset++;
|
7973 | this.match += ch;
|
7974 | this.matched += ch;
|
7975 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
7976 | if (lines) {
|
7977 | this.yylineno++;
|
7978 | this.yylloc.last_line++;
|
7979 | } else {
|
7980 | this.yylloc.last_column++;
|
7981 | }
|
7982 | if (this.options.ranges) this.yylloc.range[1]++;
|
7983 |
|
7984 | this._input = this._input.slice(1);
|
7985 | return ch;
|
7986 | },
|
7987 | unput: function unput(ch) {
|
7988 | var len = ch.length;
|
7989 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
7990 |
|
7991 | this._input = ch + this._input;
|
7992 | this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
|
7993 |
|
7994 | this.offset -= len;
|
7995 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
7996 | this.match = this.match.substr(0, this.match.length - 1);
|
7997 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
7998 |
|
7999 | if (lines.length - 1) this.yylineno -= lines.length - 1;
|
8000 | var r = this.yylloc.range;
|
8001 |
|
8002 | this.yylloc = { first_line: this.yylloc.first_line,
|
8003 | last_line: this.yylineno + 1,
|
8004 | first_column: this.yylloc.first_column,
|
8005 | last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
8006 | };
|
8007 |
|
8008 | if (this.options.ranges) {
|
8009 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
8010 | }
|
8011 | return this;
|
8012 | },
|
8013 | more: function more() {
|
8014 | this._more = true;
|
8015 | return this;
|
8016 | },
|
8017 | less: function less(n) {
|
8018 | this.unput(this.match.slice(n));
|
8019 | },
|
8020 | pastInput: function pastInput() {
|
8021 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
8022 | return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
|
8023 | },
|
8024 | upcomingInput: function upcomingInput() {
|
8025 | var next = this.match;
|
8026 | if (next.length < 20) {
|
8027 | next += this._input.substr(0, 20 - next.length);
|
8028 | }
|
8029 | return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
8030 | },
|
8031 | showPosition: function showPosition() {
|
8032 | var pre = this.pastInput();
|
8033 | var c = new Array(pre.length + 1).join("-");
|
8034 | return pre + this.upcomingInput() + "\n" + c + "^";
|
8035 | },
|
8036 | next: function next() {
|
8037 | if (this.done) {
|
8038 | return this.EOF;
|
8039 | }
|
8040 | if (!this._input) this.done = true;
|
8041 |
|
8042 | var token, match, tempMatch, index, col, lines;
|
8043 | if (!this._more) {
|
8044 | this.yytext = '';
|
8045 | this.match = '';
|
8046 | }
|
8047 | var rules = this._currentRules();
|
8048 | for (var i = 0; i < rules.length; i++) {
|
8049 | tempMatch = this._input.match(this.rules[rules[i]]);
|
8050 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
8051 | match = tempMatch;
|
8052 | index = i;
|
8053 | if (!this.options.flex) break;
|
8054 | }
|
8055 | }
|
8056 | if (match) {
|
8057 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
8058 | if (lines) this.yylineno += lines.length;
|
8059 | this.yylloc = { first_line: this.yylloc.last_line,
|
8060 | last_line: this.yylineno + 1,
|
8061 | first_column: this.yylloc.last_column,
|
8062 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length };
|
8063 | this.yytext += match[0];
|
8064 | this.match += match[0];
|
8065 | this.matches = match;
|
8066 | this.yyleng = this.yytext.length;
|
8067 | if (this.options.ranges) {
|
8068 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
8069 | }
|
8070 | this._more = false;
|
8071 | this._input = this._input.slice(match[0].length);
|
8072 | this.matched += match[0];
|
8073 | token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
|
8074 | if (this.done && this._input) this.done = false;
|
8075 | if (token) return token;else return;
|
8076 | }
|
8077 | if (this._input === "") {
|
8078 | return this.EOF;
|
8079 | } else {
|
8080 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno });
|
8081 | }
|
8082 | },
|
8083 | lex: function lex() {
|
8084 | var r = this.next();
|
8085 | if (typeof r !== 'undefined') {
|
8086 | return r;
|
8087 | } else {
|
8088 | return this.lex();
|
8089 | }
|
8090 | },
|
8091 | begin: function begin(condition) {
|
8092 | this.conditionStack.push(condition);
|
8093 | },
|
8094 | popState: function popState() {
|
8095 | return this.conditionStack.pop();
|
8096 | },
|
8097 | _currentRules: function _currentRules() {
|
8098 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
8099 | },
|
8100 | topState: function topState() {
|
8101 | return this.conditionStack[this.conditionStack.length - 2];
|
8102 | },
|
8103 | pushState: function begin(condition) {
|
8104 | this.begin(condition);
|
8105 | } };
|
8106 | lexer.options = {};
|
8107 | lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START
|
8108 | /*``*/) {
|
8109 |
|
8110 | function strip(start, end) {
|
8111 | return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end);
|
8112 | }
|
8113 |
|
8114 | var YYSTATE = YY_START;
|
8115 | switch ($avoiding_name_collisions) {
|
8116 | case 0:
|
8117 | if (yy_.yytext.slice(-2) === "\\\\") {
|
8118 | strip(0, 1);
|
8119 | this.begin("mu");
|
8120 | } else if (yy_.yytext.slice(-1) === "\\") {
|
8121 | strip(0, 1);
|
8122 | this.begin("emu");
|
8123 | } else {
|
8124 | this.begin("mu");
|
8125 | }
|
8126 | if (yy_.yytext) return 15;
|
8127 |
|
8128 | break;
|
8129 | case 1:
|
8130 | return 15;
|
8131 | break;
|
8132 | case 2:
|
8133 | this.popState();
|
8134 | return 15;
|
8135 |
|
8136 | break;
|
8137 | case 3:
|
8138 | this.begin('raw');return 15;
|
8139 | break;
|
8140 | case 4:
|
8141 | this.popState();
|
8142 |
|
8143 |
|
8144 |
|
8145 | if (this.conditionStack[this.conditionStack.length - 1] === 'raw') {
|
8146 | return 15;
|
8147 | } else {
|
8148 | yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9);
|
8149 | return 'END_RAW_BLOCK';
|
8150 | }
|
8151 |
|
8152 | break;
|
8153 | case 5:
|
8154 | return 15;
|
8155 | break;
|
8156 | case 6:
|
8157 | this.popState();
|
8158 | return 14;
|
8159 |
|
8160 | break;
|
8161 | case 7:
|
8162 | return 65;
|
8163 | break;
|
8164 | case 8:
|
8165 | return 68;
|
8166 | break;
|
8167 | case 9:
|
8168 | return 19;
|
8169 | break;
|
8170 | case 10:
|
8171 | this.popState();
|
8172 | this.begin('raw');
|
8173 | return 23;
|
8174 |
|
8175 | break;
|
8176 | case 11:
|
8177 | return 55;
|
8178 | break;
|
8179 | case 12:
|
8180 | return 60;
|
8181 | break;
|
8182 | case 13:
|
8183 | return 29;
|
8184 | break;
|
8185 | case 14:
|
8186 | return 47;
|
8187 | break;
|
8188 | case 15:
|
8189 | this.popState();return 44;
|
8190 | break;
|
8191 | case 16:
|
8192 | this.popState();return 44;
|
8193 | break;
|
8194 | case 17:
|
8195 | return 34;
|
8196 | break;
|
8197 | case 18:
|
8198 | return 39;
|
8199 | break;
|
8200 | case 19:
|
8201 | return 51;
|
8202 | break;
|
8203 | case 20:
|
8204 | return 48;
|
8205 | break;
|
8206 | case 21:
|
8207 | this.unput(yy_.yytext);
|
8208 | this.popState();
|
8209 | this.begin('com');
|
8210 |
|
8211 | break;
|
8212 | case 22:
|
8213 | this.popState();
|
8214 | return 14;
|
8215 |
|
8216 | break;
|
8217 | case 23:
|
8218 | return 48;
|
8219 | break;
|
8220 | case 24:
|
8221 | return 73;
|
8222 | break;
|
8223 | case 25:
|
8224 | return 72;
|
8225 | break;
|
8226 | case 26:
|
8227 | return 72;
|
8228 | break;
|
8229 | case 27:
|
8230 | return 87;
|
8231 | break;
|
8232 | case 28:
|
8233 |
|
8234 | break;
|
8235 | case 29:
|
8236 | this.popState();return 54;
|
8237 | break;
|
8238 | case 30:
|
8239 | this.popState();return 33;
|
8240 | break;
|
8241 | case 31:
|
8242 | yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80;
|
8243 | break;
|
8244 | case 32:
|
8245 | yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80;
|
8246 | break;
|
8247 | case 33:
|
8248 | return 85;
|
8249 | break;
|
8250 | case 34:
|
8251 | return 82;
|
8252 | break;
|
8253 | case 35:
|
8254 | return 82;
|
8255 | break;
|
8256 | case 36:
|
8257 | return 83;
|
8258 | break;
|
8259 | case 37:
|
8260 | return 84;
|
8261 | break;
|
8262 | case 38:
|
8263 | return 81;
|
8264 | break;
|
8265 | case 39:
|
8266 | return 75;
|
8267 | break;
|
8268 | case 40:
|
8269 | return 77;
|
8270 | break;
|
8271 | case 41:
|
8272 | return 72;
|
8273 | break;
|
8274 | case 42:
|
8275 | yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;
|
8276 | break;
|
8277 | case 43:
|
8278 | return 'INVALID';
|
8279 | break;
|
8280 | case 44:
|
8281 | return 5;
|
8282 | break;
|
8283 | }
|
8284 | };
|
8285 | lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
|
8286 | lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
|
8287 | return lexer;
|
8288 | })();
|
8289 | parser.lexer = lexer;
|
8290 | function Parser() {
|
8291 | this.yy = {};
|
8292 | }Parser.prototype = parser;parser.Parser = Parser;
|
8293 | return new Parser();
|
8294 | })();exports["default"] = handlebars;
|
8295 | module.exports = exports["default"];
|
8296 |
|
8297 | }),
|
8298 |
|
8299 | (function(module, exports, __webpack_require__) {
|
8300 |
|
8301 | 'use strict';
|
8302 |
|
8303 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
8304 |
|
8305 | exports.__esModule = true;
|
8306 |
|
8307 | var _visitor = __webpack_require__(39);
|
8308 |
|
8309 | var _visitor2 = _interopRequireDefault(_visitor);
|
8310 |
|
8311 | function WhitespaceControl() {
|
8312 | var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
8313 |
|
8314 | this.options = options;
|
8315 | }
|
8316 | WhitespaceControl.prototype = new _visitor2['default']();
|
8317 |
|
8318 | WhitespaceControl.prototype.Program = function (program) {
|
8319 | var doStandalone = !this.options.ignoreStandalone;
|
8320 |
|
8321 | var isRoot = !this.isRootSeen;
|
8322 | this.isRootSeen = true;
|
8323 |
|
8324 | var body = program.body;
|
8325 | for (var i = 0, l = body.length; i < l; i++) {
|
8326 | var current = body[i],
|
8327 | strip = this.accept(current);
|
8328 |
|
8329 | if (!strip) {
|
8330 | continue;
|
8331 | }
|
8332 |
|
8333 | var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),
|
8334 | _isNextWhitespace = isNextWhitespace(body, i, isRoot),
|
8335 | openStandalone = strip.openStandalone && _isPrevWhitespace,
|
8336 | closeStandalone = strip.closeStandalone && _isNextWhitespace,
|
8337 | inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
|
8338 |
|
8339 | if (strip.close) {
|
8340 | omitRight(body, i, true);
|
8341 | }
|
8342 | if (strip.open) {
|
8343 | omitLeft(body, i, true);
|
8344 | }
|
8345 |
|
8346 | if (doStandalone && inlineStandalone) {
|
8347 | omitRight(body, i);
|
8348 |
|
8349 | if (omitLeft(body, i)) {
|
8350 |
|
8351 | if (current.type === 'PartialStatement') {
|
8352 |
|
8353 | current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
|
8354 | }
|
8355 | }
|
8356 | }
|
8357 | if (doStandalone && openStandalone) {
|
8358 | omitRight((current.program || current.inverse).body);
|
8359 |
|
8360 |
|
8361 | omitLeft(body, i);
|
8362 | }
|
8363 | if (doStandalone && closeStandalone) {
|
8364 |
|
8365 | omitRight(body, i);
|
8366 |
|
8367 | omitLeft((current.inverse || current.program).body);
|
8368 | }
|
8369 | }
|
8370 |
|
8371 | return program;
|
8372 | };
|
8373 |
|
8374 | WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) {
|
8375 | this.accept(block.program);
|
8376 | this.accept(block.inverse);
|
8377 |
|
8378 |
|
8379 | var program = block.program || block.inverse,
|
8380 | inverse = block.program && block.inverse,
|
8381 | firstInverse = inverse,
|
8382 | lastInverse = inverse;
|
8383 |
|
8384 | if (inverse && inverse.chained) {
|
8385 | firstInverse = inverse.body[0].program;
|
8386 |
|
8387 |
|
8388 | while (lastInverse.chained) {
|
8389 | lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
|
8390 | }
|
8391 | }
|
8392 |
|
8393 | var strip = {
|
8394 | open: block.openStrip.open,
|
8395 | close: block.closeStrip.close,
|
8396 |
|
8397 |
|
8398 |
|
8399 | openStandalone: isNextWhitespace(program.body),
|
8400 | closeStandalone: isPrevWhitespace((firstInverse || program).body)
|
8401 | };
|
8402 |
|
8403 | if (block.openStrip.close) {
|
8404 | omitRight(program.body, null, true);
|
8405 | }
|
8406 |
|
8407 | if (inverse) {
|
8408 | var inverseStrip = block.inverseStrip;
|
8409 |
|
8410 | if (inverseStrip.open) {
|
8411 | omitLeft(program.body, null, true);
|
8412 | }
|
8413 |
|
8414 | if (inverseStrip.close) {
|
8415 | omitRight(firstInverse.body, null, true);
|
8416 | }
|
8417 | if (block.closeStrip.open) {
|
8418 | omitLeft(lastInverse.body, null, true);
|
8419 | }
|
8420 |
|
8421 |
|
8422 | if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
|
8423 | omitLeft(program.body);
|
8424 | omitRight(firstInverse.body);
|
8425 | }
|
8426 | } else if (block.closeStrip.open) {
|
8427 | omitLeft(program.body, null, true);
|
8428 | }
|
8429 |
|
8430 | return strip;
|
8431 | };
|
8432 |
|
8433 | WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) {
|
8434 | return mustache.strip;
|
8435 | };
|
8436 |
|
8437 | WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) {
|
8438 |
|
8439 | var strip = node.strip || {};
|
8440 | return {
|
8441 | inlineStandalone: true,
|
8442 | open: strip.open,
|
8443 | close: strip.close
|
8444 | };
|
8445 | };
|
8446 |
|
8447 | function isPrevWhitespace(body, i, isRoot) {
|
8448 | if (i === undefined) {
|
8449 | i = body.length;
|
8450 | }
|
8451 |
|
8452 |
|
8453 |
|
8454 | var prev = body[i - 1],
|
8455 | sibling = body[i - 2];
|
8456 | if (!prev) {
|
8457 | return isRoot;
|
8458 | }
|
8459 |
|
8460 | if (prev.type === 'ContentStatement') {
|
8461 | return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
|
8462 | }
|
8463 | }
|
8464 | function isNextWhitespace(body, i, isRoot) {
|
8465 | if (i === undefined) {
|
8466 | i = -1;
|
8467 | }
|
8468 |
|
8469 | var next = body[i + 1],
|
8470 | sibling = body[i + 2];
|
8471 | if (!next) {
|
8472 | return isRoot;
|
8473 | }
|
8474 |
|
8475 | if (next.type === 'ContentStatement') {
|
8476 | return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
|
8477 | }
|
8478 | }
|
8479 |
|
8480 |
|
8481 |
|
8482 |
|
8483 |
|
8484 |
|
8485 |
|
8486 |
|
8487 | function omitRight(body, i, multiple) {
|
8488 | var current = body[i == null ? 0 : i + 1];
|
8489 | if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) {
|
8490 | return;
|
8491 | }
|
8492 |
|
8493 | var original = current.value;
|
8494 | current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, '');
|
8495 | current.rightStripped = current.value !== original;
|
8496 | }
|
8497 |
|
8498 |
|
8499 |
|
8500 |
|
8501 |
|
8502 |
|
8503 |
|
8504 |
|
8505 | function omitLeft(body, i, multiple) {
|
8506 | var current = body[i == null ? body.length - 1 : i - 1];
|
8507 | if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) {
|
8508 | return;
|
8509 | }
|
8510 |
|
8511 |
|
8512 | var original = current.value;
|
8513 | current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, '');
|
8514 | current.leftStripped = current.value !== original;
|
8515 | return current.leftStripped;
|
8516 | }
|
8517 |
|
8518 | exports['default'] = WhitespaceControl;
|
8519 | module.exports = exports['default'];
|
8520 |
|
8521 | }),
|
8522 |
|
8523 | (function(module, exports, __webpack_require__) {
|
8524 |
|
8525 | 'use strict';
|
8526 |
|
8527 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
8528 |
|
8529 | exports.__esModule = true;
|
8530 |
|
8531 | var _exception = __webpack_require__(6);
|
8532 |
|
8533 | var _exception2 = _interopRequireDefault(_exception);
|
8534 |
|
8535 | function Visitor() {
|
8536 | this.parents = [];
|
8537 | }
|
8538 |
|
8539 | Visitor.prototype = {
|
8540 | constructor: Visitor,
|
8541 | mutating: false,
|
8542 |
|
8543 | // Visits a given value. If mutating, will replace the value if necessary.
|
8544 | acceptKey: function acceptKey(node, name) {
|
8545 | var value = this.accept(node[name]);
|
8546 | if (this.mutating) {
|
8547 |
|
8548 |
|
8549 | if (value && !Visitor.prototype[value.type]) {
|
8550 | throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
|
8551 | }
|
8552 | node[name] = value;
|
8553 | }
|
8554 | },
|
8555 |
|
8556 |
|
8557 |
|
8558 | acceptRequired: function acceptRequired(node, name) {
|
8559 | this.acceptKey(node, name);
|
8560 |
|
8561 | if (!node[name]) {
|
8562 | throw new _exception2['default'](node.type + ' requires ' + name);
|
8563 | }
|
8564 | },
|
8565 |
|
8566 |
|
8567 |
|
8568 | acceptArray: function acceptArray(array) {
|
8569 | for (var i = 0, l = array.length; i < l; i++) {
|
8570 | this.acceptKey(array, i);
|
8571 |
|
8572 | if (!array[i]) {
|
8573 | array.splice(i, 1);
|
8574 | i--;
|
8575 | l--;
|
8576 | }
|
8577 | }
|
8578 | },
|
8579 |
|
8580 | accept: function accept(object) {
|
8581 | if (!object) {
|
8582 | return;
|
8583 | }
|
8584 |
|
8585 |
|
8586 | if (!this[object.type]) {
|
8587 | throw new _exception2['default']('Unknown type: ' + object.type, object);
|
8588 | }
|
8589 |
|
8590 | if (this.current) {
|
8591 | this.parents.unshift(this.current);
|
8592 | }
|
8593 | this.current = object;
|
8594 |
|
8595 | var ret = this[object.type](object);
|
8596 |
|
8597 | this.current = this.parents.shift();
|
8598 |
|
8599 | if (!this.mutating || ret) {
|
8600 | return ret;
|
8601 | } else if (ret !== false) {
|
8602 | return object;
|
8603 | }
|
8604 | },
|
8605 |
|
8606 | Program: function Program(program) {
|
8607 | this.acceptArray(program.body);
|
8608 | },
|
8609 |
|
8610 | MustacheStatement: visitSubExpression,
|
8611 | Decorator: visitSubExpression,
|
8612 |
|
8613 | BlockStatement: visitBlock,
|
8614 | DecoratorBlock: visitBlock,
|
8615 |
|
8616 | PartialStatement: visitPartial,
|
8617 | PartialBlockStatement: function PartialBlockStatement(partial) {
|
8618 | visitPartial.call(this, partial);
|
8619 |
|
8620 | this.acceptKey(partial, 'program');
|
8621 | },
|
8622 |
|
8623 | ContentStatement: function ContentStatement() /* content */{},
|
8624 | CommentStatement: function CommentStatement() /* comment */{},
|
8625 |
|
8626 | SubExpression: visitSubExpression,
|
8627 |
|
8628 | PathExpression: function PathExpression() /* path */{},
|
8629 |
|
8630 | StringLiteral: function StringLiteral() /* string */{},
|
8631 | NumberLiteral: function NumberLiteral() /* number */{},
|
8632 | BooleanLiteral: function BooleanLiteral() /* bool */{},
|
8633 | UndefinedLiteral: function UndefinedLiteral() /* literal */{},
|
8634 | NullLiteral: function NullLiteral() /* literal */{},
|
8635 |
|
8636 | Hash: function Hash(hash) {
|
8637 | this.acceptArray(hash.pairs);
|
8638 | },
|
8639 | HashPair: function HashPair(pair) {
|
8640 | this.acceptRequired(pair, 'value');
|
8641 | }
|
8642 | };
|
8643 |
|
8644 | function visitSubExpression(mustache) {
|
8645 | this.acceptRequired(mustache, 'path');
|
8646 | this.acceptArray(mustache.params);
|
8647 | this.acceptKey(mustache, 'hash');
|
8648 | }
|
8649 | function visitBlock(block) {
|
8650 | visitSubExpression.call(this, block);
|
8651 |
|
8652 | this.acceptKey(block, 'program');
|
8653 | this.acceptKey(block, 'inverse');
|
8654 | }
|
8655 | function visitPartial(partial) {
|
8656 | this.acceptRequired(partial, 'name');
|
8657 | this.acceptArray(partial.params);
|
8658 | this.acceptKey(partial, 'hash');
|
8659 | }
|
8660 |
|
8661 | exports['default'] = Visitor;
|
8662 | module.exports = exports['default'];
|
8663 |
|
8664 | }),
|
8665 |
|
8666 | (function(module, exports, __webpack_require__) {
|
8667 |
|
8668 | 'use strict';
|
8669 |
|
8670 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
8671 |
|
8672 | exports.__esModule = true;
|
8673 | exports.SourceLocation = SourceLocation;
|
8674 | exports.id = id;
|
8675 | exports.stripFlags = stripFlags;
|
8676 | exports.stripComment = stripComment;
|
8677 | exports.preparePath = preparePath;
|
8678 | exports.prepareMustache = prepareMustache;
|
8679 | exports.prepareRawBlock = prepareRawBlock;
|
8680 | exports.prepareBlock = prepareBlock;
|
8681 | exports.prepareProgram = prepareProgram;
|
8682 | exports.preparePartialBlock = preparePartialBlock;
|
8683 |
|
8684 | var _exception = __webpack_require__(6);
|
8685 |
|
8686 | var _exception2 = _interopRequireDefault(_exception);
|
8687 |
|
8688 | function validateClose(open, close) {
|
8689 | close = close.path ? close.path.original : close;
|
8690 |
|
8691 | if (open.path.original !== close) {
|
8692 | var errorNode = { loc: open.path.loc };
|
8693 |
|
8694 | throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode);
|
8695 | }
|
8696 | }
|
8697 |
|
8698 | function SourceLocation(source, locInfo) {
|
8699 | this.source = source;
|
8700 | this.start = {
|
8701 | line: locInfo.first_line,
|
8702 | column: locInfo.first_column
|
8703 | };
|
8704 | this.end = {
|
8705 | line: locInfo.last_line,
|
8706 | column: locInfo.last_column
|
8707 | };
|
8708 | }
|
8709 |
|
8710 | function id(token) {
|
8711 | if (/^\[.*\]$/.test(token)) {
|
8712 | return token.substr(1, token.length - 2);
|
8713 | } else {
|
8714 | return token;
|
8715 | }
|
8716 | }
|
8717 |
|
8718 | function stripFlags(open, close) {
|
8719 | return {
|
8720 | open: open.charAt(2) === '~',
|
8721 | close: close.charAt(close.length - 3) === '~'
|
8722 | };
|
8723 | }
|
8724 |
|
8725 | function stripComment(comment) {
|
8726 | return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, '');
|
8727 | }
|
8728 |
|
8729 | function preparePath(data, parts, loc) {
|
8730 | loc = this.locInfo(loc);
|
8731 |
|
8732 | var original = data ? '@' : '',
|
8733 | dig = [],
|
8734 | depth = 0;
|
8735 |
|
8736 | for (var i = 0, l = parts.length; i < l; i++) {
|
8737 | var part = parts[i].part,
|
8738 |
|
8739 |
|
8740 |
|
8741 | isLiteral = parts[i].original !== part;
|
8742 | original += (parts[i].separator || '') + part;
|
8743 |
|
8744 | if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
|
8745 | if (dig.length > 0) {
|
8746 | throw new _exception2['default']('Invalid path: ' + original, { loc: loc });
|
8747 | } else if (part === '..') {
|
8748 | depth++;
|
8749 | }
|
8750 | } else {
|
8751 | dig.push(part);
|
8752 | }
|
8753 | }
|
8754 |
|
8755 | return {
|
8756 | type: 'PathExpression',
|
8757 | data: data,
|
8758 | depth: depth,
|
8759 | parts: dig,
|
8760 | original: original,
|
8761 | loc: loc
|
8762 | };
|
8763 | }
|
8764 |
|
8765 | function prepareMustache(path, params, hash, open, strip, locInfo) {
|
8766 |
|
8767 | var escapeFlag = open.charAt(3) || open.charAt(2),
|
8768 | escaped = escapeFlag !== '{' && escapeFlag !== '&';
|
8769 |
|
8770 | var decorator = /\*/.test(open);
|
8771 | return {
|
8772 | type: decorator ? 'Decorator' : 'MustacheStatement',
|
8773 | path: path,
|
8774 | params: params,
|
8775 | hash: hash,
|
8776 | escaped: escaped,
|
8777 | strip: strip,
|
8778 | loc: this.locInfo(locInfo)
|
8779 | };
|
8780 | }
|
8781 |
|
8782 | function prepareRawBlock(openRawBlock, contents, close, locInfo) {
|
8783 | validateClose(openRawBlock, close);
|
8784 |
|
8785 | locInfo = this.locInfo(locInfo);
|
8786 | var program = {
|
8787 | type: 'Program',
|
8788 | body: contents,
|
8789 | strip: {},
|
8790 | loc: locInfo
|
8791 | };
|
8792 |
|
8793 | return {
|
8794 | type: 'BlockStatement',
|
8795 | path: openRawBlock.path,
|
8796 | params: openRawBlock.params,
|
8797 | hash: openRawBlock.hash,
|
8798 | program: program,
|
8799 | openStrip: {},
|
8800 | inverseStrip: {},
|
8801 | closeStrip: {},
|
8802 | loc: locInfo
|
8803 | };
|
8804 | }
|
8805 |
|
8806 | function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
|
8807 | if (close && close.path) {
|
8808 | validateClose(openBlock, close);
|
8809 | }
|
8810 |
|
8811 | var decorator = /\*/.test(openBlock.open);
|
8812 |
|
8813 | program.blockParams = openBlock.blockParams;
|
8814 |
|
8815 | var inverse = undefined,
|
8816 | inverseStrip = undefined;
|
8817 |
|
8818 | if (inverseAndProgram) {
|
8819 | if (decorator) {
|
8820 | throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram);
|
8821 | }
|
8822 |
|
8823 | if (inverseAndProgram.chain) {
|
8824 | inverseAndProgram.program.body[0].closeStrip = close.strip;
|
8825 | }
|
8826 |
|
8827 | inverseStrip = inverseAndProgram.strip;
|
8828 | inverse = inverseAndProgram.program;
|
8829 | }
|
8830 |
|
8831 | if (inverted) {
|
8832 | inverted = inverse;
|
8833 | inverse = program;
|
8834 | program = inverted;
|
8835 | }
|
8836 |
|
8837 | return {
|
8838 | type: decorator ? 'DecoratorBlock' : 'BlockStatement',
|
8839 | path: openBlock.path,
|
8840 | params: openBlock.params,
|
8841 | hash: openBlock.hash,
|
8842 | program: program,
|
8843 | inverse: inverse,
|
8844 | openStrip: openBlock.strip,
|
8845 | inverseStrip: inverseStrip,
|
8846 | closeStrip: close && close.strip,
|
8847 | loc: this.locInfo(locInfo)
|
8848 | };
|
8849 | }
|
8850 |
|
8851 | function prepareProgram(statements, loc) {
|
8852 | if (!loc && statements.length) {
|
8853 | var firstLoc = statements[0].loc,
|
8854 | lastLoc = statements[statements.length - 1].loc;
|
8855 |
|
8856 |
|
8857 | if (firstLoc && lastLoc) {
|
8858 | loc = {
|
8859 | source: firstLoc.source,
|
8860 | start: {
|
8861 | line: firstLoc.start.line,
|
8862 | column: firstLoc.start.column
|
8863 | },
|
8864 | end: {
|
8865 | line: lastLoc.end.line,
|
8866 | column: lastLoc.end.column
|
8867 | }
|
8868 | };
|
8869 | }
|
8870 | }
|
8871 |
|
8872 | return {
|
8873 | type: 'Program',
|
8874 | body: statements,
|
8875 | strip: {},
|
8876 | loc: loc
|
8877 | };
|
8878 | }
|
8879 |
|
8880 | function preparePartialBlock(open, program, close, locInfo) {
|
8881 | validateClose(open, close);
|
8882 |
|
8883 | return {
|
8884 | type: 'PartialBlockStatement',
|
8885 | name: open.path,
|
8886 | params: open.params,
|
8887 | hash: open.hash,
|
8888 | program: program,
|
8889 | openStrip: open.strip,
|
8890 | closeStrip: close && close.strip,
|
8891 | loc: this.locInfo(locInfo)
|
8892 | };
|
8893 | }
|
8894 |
|
8895 | }),
|
8896 |
|
8897 | (function(module, exports, __webpack_require__) {
|
8898 |
|
8899 |
|
8900 |
|
8901 | 'use strict';
|
8902 |
|
8903 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
8904 |
|
8905 | exports.__esModule = true;
|
8906 | exports.Compiler = Compiler;
|
8907 | exports.precompile = precompile;
|
8908 | exports.compile = compile;
|
8909 |
|
8910 | var _exception = __webpack_require__(6);
|
8911 |
|
8912 | var _exception2 = _interopRequireDefault(_exception);
|
8913 |
|
8914 | var _utils = __webpack_require__(5);
|
8915 |
|
8916 | var _ast = __webpack_require__(35);
|
8917 |
|
8918 | var _ast2 = _interopRequireDefault(_ast);
|
8919 |
|
8920 | var slice = [].slice;
|
8921 |
|
8922 | function Compiler() {}
|
8923 |
|
8924 |
|
8925 |
|
8926 |
|
8927 |
|
8928 |
|
8929 | Compiler.prototype = {
|
8930 | compiler: Compiler,
|
8931 |
|
8932 | equals: function equals(other) {
|
8933 | var len = this.opcodes.length;
|
8934 | if (other.opcodes.length !== len) {
|
8935 | return false;
|
8936 | }
|
8937 |
|
8938 | for (var i = 0; i < len; i++) {
|
8939 | var opcode = this.opcodes[i],
|
8940 | otherOpcode = other.opcodes[i];
|
8941 | if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
|
8942 | return false;
|
8943 | }
|
8944 | }
|
8945 |
|
8946 |
|
8947 |
|
8948 | len = this.children.length;
|
8949 | for (var i = 0; i < len; i++) {
|
8950 | if (!this.children[i].equals(other.children[i])) {
|
8951 | return false;
|
8952 | }
|
8953 | }
|
8954 |
|
8955 | return true;
|
8956 | },
|
8957 |
|
8958 | guid: 0,
|
8959 |
|
8960 | compile: function compile(program, options) {
|
8961 | this.sourceNode = [];
|
8962 | this.opcodes = [];
|
8963 | this.children = [];
|
8964 | this.options = options;
|
8965 | this.stringParams = options.stringParams;
|
8966 | this.trackIds = options.trackIds;
|
8967 |
|
8968 | options.blockParams = options.blockParams || [];
|
8969 |
|
8970 |
|
8971 | var knownHelpers = options.knownHelpers;
|
8972 | options.knownHelpers = {
|
8973 | 'helperMissing': true,
|
8974 | 'blockHelperMissing': true,
|
8975 | 'each': true,
|
8976 | 'if': true,
|
8977 | 'unless': true,
|
8978 | 'with': true,
|
8979 | 'log': true,
|
8980 | 'lookup': true
|
8981 | };
|
8982 | if (knownHelpers) {
|
8983 |
|
8984 |
|
8985 |
|
8986 | for (var _name in knownHelpers) {
|
8987 | this.options.knownHelpers[_name] = knownHelpers[_name];
|
8988 | }
|
8989 | }
|
8990 |
|
8991 | return this.accept(program);
|
8992 | },
|
8993 |
|
8994 | compileProgram: function compileProgram(program) {
|
8995 | var childCompiler = new this.compiler(),
|
8996 |
|
8997 | result = childCompiler.compile(program, this.options),
|
8998 | guid = this.guid++;
|
8999 |
|
9000 | this.usePartial = this.usePartial || result.usePartial;
|
9001 |
|
9002 | this.children[guid] = result;
|
9003 | this.useDepths = this.useDepths || result.useDepths;
|
9004 |
|
9005 | return guid;
|
9006 | },
|
9007 |
|
9008 | accept: function accept(node) {
|
9009 |
|
9010 | if (!this[node.type]) {
|
9011 | throw new _exception2['default']('Unknown type: ' + node.type, node);
|
9012 | }
|
9013 |
|
9014 | this.sourceNode.unshift(node);
|
9015 | var ret = this[node.type](node);
|
9016 | this.sourceNode.shift();
|
9017 | return ret;
|
9018 | },
|
9019 |
|
9020 | Program: function Program(program) {
|
9021 | this.options.blockParams.unshift(program.blockParams);
|
9022 |
|
9023 | var body = program.body,
|
9024 | bodyLength = body.length;
|
9025 | for (var i = 0; i < bodyLength; i++) {
|
9026 | this.accept(body[i]);
|
9027 | }
|
9028 |
|
9029 | this.options.blockParams.shift();
|
9030 |
|
9031 | this.isSimple = bodyLength === 1;
|
9032 | this.blockParams = program.blockParams ? program.blockParams.length : 0;
|
9033 |
|
9034 | return this;
|
9035 | },
|
9036 |
|
9037 | BlockStatement: function BlockStatement(block) {
|
9038 | transformLiteralToPath(block);
|
9039 |
|
9040 | var program = block.program,
|
9041 | inverse = block.inverse;
|
9042 |
|
9043 | program = program && this.compileProgram(program);
|
9044 | inverse = inverse && this.compileProgram(inverse);
|
9045 |
|
9046 | var type = this.classifySexpr(block);
|
9047 |
|
9048 | if (type === 'helper') {
|
9049 | this.helperSexpr(block, program, inverse);
|
9050 | } else if (type === 'simple') {
|
9051 | this.simpleSexpr(block);
|
9052 |
|
9053 |
|
9054 |
|
9055 | this.opcode('pushProgram', program);
|
9056 | this.opcode('pushProgram', inverse);
|
9057 | this.opcode('emptyHash');
|
9058 | this.opcode('blockValue', block.path.original);
|
9059 | } else {
|
9060 | this.ambiguousSexpr(block, program, inverse);
|
9061 |
|
9062 |
|
9063 |
|
9064 | this.opcode('pushProgram', program);
|
9065 | this.opcode('pushProgram', inverse);
|
9066 | this.opcode('emptyHash');
|
9067 | this.opcode('ambiguousBlockValue');
|
9068 | }
|
9069 |
|
9070 | this.opcode('append');
|
9071 | },
|
9072 |
|
9073 | DecoratorBlock: function DecoratorBlock(decorator) {
|
9074 | var program = decorator.program && this.compileProgram(decorator.program);
|
9075 | var params = this.setupFullMustacheParams(decorator, program, undefined),
|
9076 | path = decorator.path;
|
9077 |
|
9078 | this.useDecorators = true;
|
9079 | this.opcode('registerDecorator', params.length, path.original);
|
9080 | },
|
9081 |
|
9082 | PartialStatement: function PartialStatement(partial) {
|
9083 | this.usePartial = true;
|
9084 |
|
9085 | var program = partial.program;
|
9086 | if (program) {
|
9087 | program = this.compileProgram(partial.program);
|
9088 | }
|
9089 |
|
9090 | var params = partial.params;
|
9091 | if (params.length > 1) {
|
9092 | throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);
|
9093 | } else if (!params.length) {
|
9094 | if (this.options.explicitPartialContext) {
|
9095 | this.opcode('pushLiteral', 'undefined');
|
9096 | } else {
|
9097 | params.push({ type: 'PathExpression', parts: [], depth: 0 });
|
9098 | }
|
9099 | }
|
9100 |
|
9101 | var partialName = partial.name.original,
|
9102 | isDynamic = partial.name.type === 'SubExpression';
|
9103 | if (isDynamic) {
|
9104 | this.accept(partial.name);
|
9105 | }
|
9106 |
|
9107 | this.setupFullMustacheParams(partial, program, undefined, true);
|
9108 |
|
9109 | var indent = partial.indent || '';
|
9110 | if (this.options.preventIndent && indent) {
|
9111 | this.opcode('appendContent', indent);
|
9112 | indent = '';
|
9113 | }
|
9114 |
|
9115 | this.opcode('invokePartial', isDynamic, partialName, indent);
|
9116 | this.opcode('append');
|
9117 | },
|
9118 | PartialBlockStatement: function PartialBlockStatement(partialBlock) {
|
9119 | this.PartialStatement(partialBlock);
|
9120 | },
|
9121 |
|
9122 | MustacheStatement: function MustacheStatement(mustache) {
|
9123 | this.SubExpression(mustache);
|
9124 |
|
9125 | if (mustache.escaped && !this.options.noEscape) {
|
9126 | this.opcode('appendEscaped');
|
9127 | } else {
|
9128 | this.opcode('append');
|
9129 | }
|
9130 | },
|
9131 | Decorator: function Decorator(decorator) {
|
9132 | this.DecoratorBlock(decorator);
|
9133 | },
|
9134 |
|
9135 | ContentStatement: function ContentStatement(content) {
|
9136 | if (content.value) {
|
9137 | this.opcode('appendContent', content.value);
|
9138 | }
|
9139 | },
|
9140 |
|
9141 | CommentStatement: function CommentStatement() {},
|
9142 |
|
9143 | SubExpression: function SubExpression(sexpr) {
|
9144 | transformLiteralToPath(sexpr);
|
9145 | var type = this.classifySexpr(sexpr);
|
9146 |
|
9147 | if (type === 'simple') {
|
9148 | this.simpleSexpr(sexpr);
|
9149 | } else if (type === 'helper') {
|
9150 | this.helperSexpr(sexpr);
|
9151 | } else {
|
9152 | this.ambiguousSexpr(sexpr);
|
9153 | }
|
9154 | },
|
9155 | ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
|
9156 | var path = sexpr.path,
|
9157 | name = path.parts[0],
|
9158 | isBlock = program != null || inverse != null;
|
9159 |
|
9160 | this.opcode('getContext', path.depth);
|
9161 |
|
9162 | this.opcode('pushProgram', program);
|
9163 | this.opcode('pushProgram', inverse);
|
9164 |
|
9165 | path.strict = true;
|
9166 | this.accept(path);
|
9167 |
|
9168 | this.opcode('invokeAmbiguous', name, isBlock);
|
9169 | },
|
9170 |
|
9171 | simpleSexpr: function simpleSexpr(sexpr) {
|
9172 | var path = sexpr.path;
|
9173 | path.strict = true;
|
9174 | this.accept(path);
|
9175 | this.opcode('resolvePossibleLambda');
|
9176 | },
|
9177 |
|
9178 | helperSexpr: function helperSexpr(sexpr, program, inverse) {
|
9179 | var params = this.setupFullMustacheParams(sexpr, program, inverse),
|
9180 | path = sexpr.path,
|
9181 | name = path.parts[0];
|
9182 |
|
9183 | if (this.options.knownHelpers[name]) {
|
9184 | this.opcode('invokeKnownHelper', params.length, name);
|
9185 | } else if (this.options.knownHelpersOnly) {
|
9186 | throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
|
9187 | } else {
|
9188 | path.strict = true;
|
9189 | path.falsy = true;
|
9190 |
|
9191 | this.accept(path);
|
9192 | this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path));
|
9193 | }
|
9194 | },
|
9195 |
|
9196 | PathExpression: function PathExpression(path) {
|
9197 | this.addDepth(path.depth);
|
9198 | this.opcode('getContext', path.depth);
|
9199 |
|
9200 | var name = path.parts[0],
|
9201 | scoped = _ast2['default'].helpers.scopedId(path),
|
9202 | blockParamId = !path.depth && !scoped && this.blockParamIndex(name);
|
9203 |
|
9204 | if (blockParamId) {
|
9205 | this.opcode('lookupBlockParam', blockParamId, path.parts);
|
9206 | } else if (!name) {
|
9207 |
|
9208 | this.opcode('pushContext');
|
9209 | } else if (path.data) {
|
9210 | this.options.data = true;
|
9211 | this.opcode('lookupData', path.depth, path.parts, path.strict);
|
9212 | } else {
|
9213 | this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped);
|
9214 | }
|
9215 | },
|
9216 |
|
9217 | StringLiteral: function StringLiteral(string) {
|
9218 | this.opcode('pushString', string.value);
|
9219 | },
|
9220 |
|
9221 | NumberLiteral: function NumberLiteral(number) {
|
9222 | this.opcode('pushLiteral', number.value);
|
9223 | },
|
9224 |
|
9225 | BooleanLiteral: function BooleanLiteral(bool) {
|
9226 | this.opcode('pushLiteral', bool.value);
|
9227 | },
|
9228 |
|
9229 | UndefinedLiteral: function UndefinedLiteral() {
|
9230 | this.opcode('pushLiteral', 'undefined');
|
9231 | },
|
9232 |
|
9233 | NullLiteral: function NullLiteral() {
|
9234 | this.opcode('pushLiteral', 'null');
|
9235 | },
|
9236 |
|
9237 | Hash: function Hash(hash) {
|
9238 | var pairs = hash.pairs,
|
9239 | i = 0,
|
9240 | l = pairs.length;
|
9241 |
|
9242 | this.opcode('pushHash');
|
9243 |
|
9244 | for (; i < l; i++) {
|
9245 | this.pushParam(pairs[i].value);
|
9246 | }
|
9247 | while (i--) {
|
9248 | this.opcode('assignToHash', pairs[i].key);
|
9249 | }
|
9250 | this.opcode('popHash');
|
9251 | },
|
9252 |
|
9253 |
|
9254 | opcode: function opcode(name) {
|
9255 | this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc });
|
9256 | },
|
9257 |
|
9258 | addDepth: function addDepth(depth) {
|
9259 | if (!depth) {
|
9260 | return;
|
9261 | }
|
9262 |
|
9263 | this.useDepths = true;
|
9264 | },
|
9265 |
|
9266 | classifySexpr: function classifySexpr(sexpr) {
|
9267 | var isSimple = _ast2['default'].helpers.simpleId(sexpr.path);
|
9268 |
|
9269 | var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
|
9270 |
|
9271 |
|
9272 |
|
9273 | var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr);
|
9274 |
|
9275 |
|
9276 |
|
9277 |
|
9278 | var isEligible = !isBlockParam && (isHelper || isSimple);
|
9279 |
|
9280 |
|
9281 |
|
9282 | if (isEligible && !isHelper) {
|
9283 | var _name2 = sexpr.path.parts[0],
|
9284 | options = this.options;
|
9285 |
|
9286 | if (options.knownHelpers[_name2]) {
|
9287 | isHelper = true;
|
9288 | } else if (options.knownHelpersOnly) {
|
9289 | isEligible = false;
|
9290 | }
|
9291 | }
|
9292 |
|
9293 | if (isHelper) {
|
9294 | return 'helper';
|
9295 | } else if (isEligible) {
|
9296 | return 'ambiguous';
|
9297 | } else {
|
9298 | return 'simple';
|
9299 | }
|
9300 | },
|
9301 |
|
9302 | pushParams: function pushParams(params) {
|
9303 | for (var i = 0, l = params.length; i < l; i++) {
|
9304 | this.pushParam(params[i]);
|
9305 | }
|
9306 | },
|
9307 |
|
9308 | pushParam: function pushParam(val) {
|
9309 | var value = val.value != null ? val.value : val.original || '';
|
9310 |
|
9311 | if (this.stringParams) {
|
9312 | if (value.replace) {
|
9313 | value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
|
9314 | }
|
9315 |
|
9316 | if (val.depth) {
|
9317 | this.addDepth(val.depth);
|
9318 | }
|
9319 | this.opcode('getContext', val.depth || 0);
|
9320 | this.opcode('pushStringParam', value, val.type);
|
9321 |
|
9322 | if (val.type === 'SubExpression') {
|
9323 |
|
9324 |
|
9325 | this.accept(val);
|
9326 | }
|
9327 | } else {
|
9328 | if (this.trackIds) {
|
9329 | var blockParamIndex = undefined;
|
9330 | if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) {
|
9331 | blockParamIndex = this.blockParamIndex(val.parts[0]);
|
9332 | }
|
9333 | if (blockParamIndex) {
|
9334 | var blockParamChild = val.parts.slice(1).join('.');
|
9335 | this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
|
9336 | } else {
|
9337 | value = val.original || value;
|
9338 | if (value.replace) {
|
9339 | value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, '');
|
9340 | }
|
9341 |
|
9342 | this.opcode('pushId', val.type, value);
|
9343 | }
|
9344 | }
|
9345 | this.accept(val);
|
9346 | }
|
9347 | },
|
9348 |
|
9349 | setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
|
9350 | var params = sexpr.params;
|
9351 | this.pushParams(params);
|
9352 |
|
9353 | this.opcode('pushProgram', program);
|
9354 | this.opcode('pushProgram', inverse);
|
9355 |
|
9356 | if (sexpr.hash) {
|
9357 | this.accept(sexpr.hash);
|
9358 | } else {
|
9359 | this.opcode('emptyHash', omitEmpty);
|
9360 | }
|
9361 |
|
9362 | return params;
|
9363 | },
|
9364 |
|
9365 | blockParamIndex: function blockParamIndex(name) {
|
9366 | for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
|
9367 | var blockParams = this.options.blockParams[depth],
|
9368 | param = blockParams && _utils.indexOf(blockParams, name);
|
9369 | if (blockParams && param >= 0) {
|
9370 | return [depth, param];
|
9371 | }
|
9372 | }
|
9373 | }
|
9374 | };
|
9375 |
|
9376 | function precompile(input, options, env) {
|
9377 | if (input == null || typeof input !== 'string' && input.type !== 'Program') {
|
9378 | throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
|
9379 | }
|
9380 |
|
9381 | options = options || {};
|
9382 | if (!('data' in options)) {
|
9383 | options.data = true;
|
9384 | }
|
9385 | if (options.compat) {
|
9386 | options.useDepths = true;
|
9387 | }
|
9388 |
|
9389 | var ast = env.parse(input, options),
|
9390 | environment = new env.Compiler().compile(ast, options);
|
9391 | return new env.JavaScriptCompiler().compile(environment, options);
|
9392 | }
|
9393 |
|
9394 | function compile(input, options, env) {
|
9395 | if (options === undefined) options = {};
|
9396 |
|
9397 | if (input == null || typeof input !== 'string' && input.type !== 'Program') {
|
9398 | throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
|
9399 | }
|
9400 |
|
9401 | options = _utils.extend({}, options);
|
9402 | if (!('data' in options)) {
|
9403 | options.data = true;
|
9404 | }
|
9405 | if (options.compat) {
|
9406 | options.useDepths = true;
|
9407 | }
|
9408 |
|
9409 | var compiled = undefined;
|
9410 |
|
9411 | function compileInput() {
|
9412 | var ast = env.parse(input, options),
|
9413 | environment = new env.Compiler().compile(ast, options),
|
9414 | templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
|
9415 | return env.template(templateSpec);
|
9416 | }
|
9417 |
|
9418 |
|
9419 | function ret(context, execOptions) {
|
9420 | if (!compiled) {
|
9421 | compiled = compileInput();
|
9422 | }
|
9423 | return compiled.call(this, context, execOptions);
|
9424 | }
|
9425 | ret._setup = function (setupOptions) {
|
9426 | if (!compiled) {
|
9427 | compiled = compileInput();
|
9428 | }
|
9429 | return compiled._setup(setupOptions);
|
9430 | };
|
9431 | ret._child = function (i, data, blockParams, depths) {
|
9432 | if (!compiled) {
|
9433 | compiled = compileInput();
|
9434 | }
|
9435 | return compiled._child(i, data, blockParams, depths);
|
9436 | };
|
9437 | return ret;
|
9438 | }
|
9439 |
|
9440 | function argEquals(a, b) {
|
9441 | if (a === b) {
|
9442 | return true;
|
9443 | }
|
9444 |
|
9445 | if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) {
|
9446 | for (var i = 0; i < a.length; i++) {
|
9447 | if (!argEquals(a[i], b[i])) {
|
9448 | return false;
|
9449 | }
|
9450 | }
|
9451 | return true;
|
9452 | }
|
9453 | }
|
9454 |
|
9455 | function transformLiteralToPath(sexpr) {
|
9456 | if (!sexpr.path.parts) {
|
9457 | var literal = sexpr.path;
|
9458 |
|
9459 |
|
9460 | sexpr.path = {
|
9461 | type: 'PathExpression',
|
9462 | data: false,
|
9463 | depth: 0,
|
9464 | parts: [literal.original + ''],
|
9465 | original: literal.original + '',
|
9466 | loc: literal.loc
|
9467 | };
|
9468 | }
|
9469 | }
|
9470 |
|
9471 | }),
|
9472 |
|
9473 | (function(module, exports, __webpack_require__) {
|
9474 |
|
9475 | 'use strict';
|
9476 |
|
9477 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
9478 |
|
9479 | exports.__esModule = true;
|
9480 |
|
9481 | var _base = __webpack_require__(4);
|
9482 |
|
9483 | var _exception = __webpack_require__(6);
|
9484 |
|
9485 | var _exception2 = _interopRequireDefault(_exception);
|
9486 |
|
9487 | var _utils = __webpack_require__(5);
|
9488 |
|
9489 | var _codeGen = __webpack_require__(43);
|
9490 |
|
9491 | var _codeGen2 = _interopRequireDefault(_codeGen);
|
9492 |
|
9493 | function Literal(value) {
|
9494 | this.value = value;
|
9495 | }
|
9496 |
|
9497 | function JavaScriptCompiler() {}
|
9498 |
|
9499 | JavaScriptCompiler.prototype = {
|
9500 |
|
9501 |
|
9502 | nameLookup: function nameLookup(parent, name /* , type*/) {
|
9503 | if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
|
9504 | return [parent, '.', name];
|
9505 | } else {
|
9506 | return [parent, '[', JSON.stringify(name), ']'];
|
9507 | }
|
9508 | },
|
9509 | depthedLookup: function depthedLookup(name) {
|
9510 | return [this.aliasable('container.lookup'), '(depths, "', name, '")'];
|
9511 | },
|
9512 |
|
9513 | compilerInfo: function compilerInfo() {
|
9514 | var revision = _base.COMPILER_REVISION,
|
9515 | versions = _base.REVISION_CHANGES[revision];
|
9516 | return [revision, versions];
|
9517 | },
|
9518 |
|
9519 | appendToBuffer: function appendToBuffer(source, location, explicit) {
|
9520 |
|
9521 | if (!_utils.isArray(source)) {
|
9522 | source = [source];
|
9523 | }
|
9524 | source = this.source.wrap(source, location);
|
9525 |
|
9526 | if (this.environment.isSimple) {
|
9527 | return ['return ', source, ';'];
|
9528 | } else if (explicit) {
|
9529 |
|
9530 |
|
9531 |
|
9532 | return ['buffer += ', source, ';'];
|
9533 | } else {
|
9534 | source.appendToBuffer = true;
|
9535 | return source;
|
9536 | }
|
9537 | },
|
9538 |
|
9539 | initializeBuffer: function initializeBuffer() {
|
9540 | return this.quotedString('');
|
9541 | },
|
9542 |
|
9543 |
|
9544 | compile: function compile(environment, options, context, asObject) {
|
9545 | this.environment = environment;
|
9546 | this.options = options;
|
9547 | this.stringParams = this.options.stringParams;
|
9548 | this.trackIds = this.options.trackIds;
|
9549 | this.precompile = !asObject;
|
9550 |
|
9551 | this.name = this.environment.name;
|
9552 | this.isChild = !!context;
|
9553 | this.context = context || {
|
9554 | decorators: [],
|
9555 | programs: [],
|
9556 | environments: []
|
9557 | };
|
9558 |
|
9559 | this.preamble();
|
9560 |
|
9561 | this.stackSlot = 0;
|
9562 | this.stackVars = [];
|
9563 | this.aliases = {};
|
9564 | this.registers = { list: [] };
|
9565 | this.hashes = [];
|
9566 | this.compileStack = [];
|
9567 | this.inlineStack = [];
|
9568 | this.blockParams = [];
|
9569 |
|
9570 | this.compileChildren(environment, options);
|
9571 |
|
9572 | this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;
|
9573 | this.useBlockParams = this.useBlockParams || environment.useBlockParams;
|
9574 |
|
9575 | var opcodes = environment.opcodes,
|
9576 | opcode = undefined,
|
9577 | firstLoc = undefined,
|
9578 | i = undefined,
|
9579 | l = undefined;
|
9580 |
|
9581 | for (i = 0, l = opcodes.length; i < l; i++) {
|
9582 | opcode = opcodes[i];
|
9583 |
|
9584 | this.source.currentLocation = opcode.loc;
|
9585 | firstLoc = firstLoc || opcode.loc;
|
9586 | this[opcode.opcode].apply(this, opcode.args);
|
9587 | }
|
9588 |
|
9589 |
|
9590 | this.source.currentLocation = firstLoc;
|
9591 | this.pushSource('');
|
9592 |
|
9593 |
|
9594 | if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
|
9595 | throw new _exception2['default']('Compile completed with content left on stack');
|
9596 | }
|
9597 |
|
9598 | if (!this.decorators.isEmpty()) {
|
9599 | this.useDecorators = true;
|
9600 |
|
9601 | this.decorators.prepend('var decorators = container.decorators;\n');
|
9602 | this.decorators.push('return fn;');
|
9603 |
|
9604 | if (asObject) {
|
9605 | this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]);
|
9606 | } else {
|
9607 | this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n');
|
9608 | this.decorators.push('}\n');
|
9609 | this.decorators = this.decorators.merge();
|
9610 | }
|
9611 | } else {
|
9612 | this.decorators = undefined;
|
9613 | }
|
9614 |
|
9615 | var fn = this.createFunctionContext(asObject);
|
9616 | if (!this.isChild) {
|
9617 | var ret = {
|
9618 | compiler: this.compilerInfo(),
|
9619 | main: fn
|
9620 | };
|
9621 |
|
9622 | if (this.decorators) {
|
9623 | ret.main_d = this.decorators;
|
9624 | ret.useDecorators = true;
|
9625 | }
|
9626 |
|
9627 | var _context = this.context;
|
9628 | var programs = _context.programs;
|
9629 | var decorators = _context.decorators;
|
9630 |
|
9631 | for (i = 0, l = programs.length; i < l; i++) {
|
9632 | if (programs[i]) {
|
9633 | ret[i] = programs[i];
|
9634 | if (decorators[i]) {
|
9635 | ret[i + '_d'] = decorators[i];
|
9636 | ret.useDecorators = true;
|
9637 | }
|
9638 | }
|
9639 | }
|
9640 |
|
9641 | if (this.environment.usePartial) {
|
9642 | ret.usePartial = true;
|
9643 | }
|
9644 | if (this.options.data) {
|
9645 | ret.useData = true;
|
9646 | }
|
9647 | if (this.useDepths) {
|
9648 | ret.useDepths = true;
|
9649 | }
|
9650 | if (this.useBlockParams) {
|
9651 | ret.useBlockParams = true;
|
9652 | }
|
9653 | if (this.options.compat) {
|
9654 | ret.compat = true;
|
9655 | }
|
9656 |
|
9657 | if (!asObject) {
|
9658 | ret.compiler = JSON.stringify(ret.compiler);
|
9659 |
|
9660 | this.source.currentLocation = { start: { line: 1, column: 0 } };
|
9661 | ret = this.objectLiteral(ret);
|
9662 |
|
9663 | if (options.srcName) {
|
9664 | ret = ret.toStringWithSourceMap({ file: options.destName });
|
9665 | ret.map = ret.map && ret.map.toString();
|
9666 | } else {
|
9667 | ret = ret.toString();
|
9668 | }
|
9669 | } else {
|
9670 | ret.compilerOptions = this.options;
|
9671 | }
|
9672 |
|
9673 | return ret;
|
9674 | } else {
|
9675 | return fn;
|
9676 | }
|
9677 | },
|
9678 |
|
9679 | preamble: function preamble() {
|
9680 |
|
9681 |
|
9682 | this.lastContext = 0;
|
9683 | this.source = new _codeGen2['default'](this.options.srcName);
|
9684 | this.decorators = new _codeGen2['default'](this.options.srcName);
|
9685 | },
|
9686 |
|
9687 | createFunctionContext: function createFunctionContext(asObject) {
|
9688 | var varDeclarations = '';
|
9689 |
|
9690 | var locals = this.stackVars.concat(this.registers.list);
|
9691 | if (locals.length > 0) {
|
9692 | varDeclarations += ', ' + locals.join(', ');
|
9693 | }
|
9694 |
|
9695 |
|
9696 |
|
9697 |
|
9698 |
|
9699 |
|
9700 |
|
9701 | var aliasCount = 0;
|
9702 | for (var alias in this.aliases) {
|
9703 |
|
9704 | var node = this.aliases[alias];
|
9705 |
|
9706 | if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) {
|
9707 | varDeclarations += ', alias' + ++aliasCount + '=' + alias;
|
9708 | node.children[0] = 'alias' + aliasCount;
|
9709 | }
|
9710 | }
|
9711 |
|
9712 | var params = ['container', 'depth0', 'helpers', 'partials', 'data'];
|
9713 |
|
9714 | if (this.useBlockParams || this.useDepths) {
|
9715 | params.push('blockParams');
|
9716 | }
|
9717 | if (this.useDepths) {
|
9718 | params.push('depths');
|
9719 | }
|
9720 |
|
9721 |
|
9722 | var source = this.mergeSource(varDeclarations);
|
9723 |
|
9724 | if (asObject) {
|
9725 | params.push(source);
|
9726 |
|
9727 | return Function.apply(this, params);
|
9728 | } else {
|
9729 | return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']);
|
9730 | }
|
9731 | },
|
9732 | mergeSource: function mergeSource(varDeclarations) {
|
9733 | var isSimple = this.environment.isSimple,
|
9734 | appendOnly = !this.forceBuffer,
|
9735 | appendFirst = undefined,
|
9736 | sourceSeen = undefined,
|
9737 | bufferStart = undefined,
|
9738 | bufferEnd = undefined;
|
9739 | this.source.each(function (line) {
|
9740 | if (line.appendToBuffer) {
|
9741 | if (bufferStart) {
|
9742 | line.prepend(' + ');
|
9743 | } else {
|
9744 | bufferStart = line;
|
9745 | }
|
9746 | bufferEnd = line;
|
9747 | } else {
|
9748 | if (bufferStart) {
|
9749 | if (!sourceSeen) {
|
9750 | appendFirst = true;
|
9751 | } else {
|
9752 | bufferStart.prepend('buffer += ');
|
9753 | }
|
9754 | bufferEnd.add(';');
|
9755 | bufferStart = bufferEnd = undefined;
|
9756 | }
|
9757 |
|
9758 | sourceSeen = true;
|
9759 | if (!isSimple) {
|
9760 | appendOnly = false;
|
9761 | }
|
9762 | }
|
9763 | });
|
9764 |
|
9765 | if (appendOnly) {
|
9766 | if (bufferStart) {
|
9767 | bufferStart.prepend('return ');
|
9768 | bufferEnd.add(';');
|
9769 | } else if (!sourceSeen) {
|
9770 | this.source.push('return "";');
|
9771 | }
|
9772 | } else {
|
9773 | varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());
|
9774 |
|
9775 | if (bufferStart) {
|
9776 | bufferStart.prepend('return buffer + ');
|
9777 | bufferEnd.add(';');
|
9778 | } else {
|
9779 | this.source.push('return buffer;');
|
9780 | }
|
9781 | }
|
9782 |
|
9783 | if (varDeclarations) {
|
9784 | this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n'));
|
9785 | }
|
9786 |
|
9787 | return this.source.merge();
|
9788 | },
|
9789 |
|
9790 |
|
9791 |
|
9792 |
|
9793 |
|
9794 |
|
9795 |
|
9796 |
|
9797 |
|
9798 |
|
9799 | blockValue: function blockValue(name) {
|
9800 | var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
|
9801 | params = [this.contextName(0)];
|
9802 | this.setupHelperArgs(name, 0, params);
|
9803 |
|
9804 | var blockName = this.popStack();
|
9805 | params.splice(1, 0, blockName);
|
9806 |
|
9807 | this.push(this.source.functionCall(blockHelperMissing, 'call', params));
|
9808 | },
|
9809 |
|
9810 |
|
9811 |
|
9812 |
|
9813 |
|
9814 |
|
9815 |
|
9816 | ambiguousBlockValue: function ambiguousBlockValue() {
|
9817 |
|
9818 | var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
|
9819 | params = [this.contextName(0)];
|
9820 | this.setupHelperArgs('', 0, params, true);
|
9821 |
|
9822 | this.flushInline();
|
9823 |
|
9824 | var current = this.topStack();
|
9825 | params.splice(1, 0, current);
|
9826 |
|
9827 | this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']);
|
9828 | },
|
9829 |
|
9830 |
|
9831 |
|
9832 |
|
9833 |
|
9834 |
|
9835 |
|
9836 | appendContent: function appendContent(content) {
|
9837 | if (this.pendingContent) {
|
9838 | content = this.pendingContent + content;
|
9839 | } else {
|
9840 | this.pendingLocation = this.source.currentLocation;
|
9841 | }
|
9842 |
|
9843 | this.pendingContent = content;
|
9844 | },
|
9845 |
|
9846 |
|
9847 |
|
9848 |
|
9849 |
|
9850 |
|
9851 |
|
9852 |
|
9853 |
|
9854 |
|
9855 | append: function append() {
|
9856 | if (this.isInline()) {
|
9857 | this.replaceStack(function (current) {
|
9858 | return [' != null ? ', current, ' : ""'];
|
9859 | });
|
9860 |
|
9861 | this.pushSource(this.appendToBuffer(this.popStack()));
|
9862 | } else {
|
9863 | var local = this.popStack();
|
9864 | this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']);
|
9865 | if (this.environment.isSimple) {
|
9866 | this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']);
|
9867 | }
|
9868 | }
|
9869 | },
|
9870 |
|
9871 |
|
9872 |
|
9873 |
|
9874 |
|
9875 |
|
9876 |
|
9877 | appendEscaped: function appendEscaped() {
|
9878 | this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')']));
|
9879 | },
|
9880 |
|
9881 |
|
9882 |
|
9883 |
|
9884 |
|
9885 |
|
9886 |
|
9887 |
|
9888 | getContext: function getContext(depth) {
|
9889 | this.lastContext = depth;
|
9890 | },
|
9891 |
|
9892 |
|
9893 |
|
9894 |
|
9895 |
|
9896 |
|
9897 |
|
9898 | pushContext: function pushContext() {
|
9899 | this.pushStackLiteral(this.contextName(this.lastContext));
|
9900 | },
|
9901 |
|
9902 |
|
9903 |
|
9904 |
|
9905 |
|
9906 |
|
9907 |
|
9908 |
|
9909 | lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {
|
9910 | var i = 0;
|
9911 |
|
9912 | if (!scoped && this.options.compat && !this.lastContext) {
|
9913 |
|
9914 |
|
9915 | this.push(this.depthedLookup(parts[i++]));
|
9916 | } else {
|
9917 | this.pushContext();
|
9918 | }
|
9919 |
|
9920 | this.resolvePath('context', parts, i, falsy, strict);
|
9921 | },
|
9922 |
|
9923 |
|
9924 |
|
9925 |
|
9926 |
|
9927 |
|
9928 |
|
9929 |
|
9930 | lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
|
9931 | this.useBlockParams = true;
|
9932 |
|
9933 | this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
|
9934 | this.resolvePath('context', parts, 1);
|
9935 | },
|
9936 |
|
9937 |
|
9938 |
|
9939 |
|
9940 |
|
9941 |
|
9942 |
|
9943 | lookupData: function lookupData(depth, parts, strict) {
|
9944 | if (!depth) {
|
9945 | this.pushStackLiteral('data');
|
9946 | } else {
|
9947 | this.pushStackLiteral('container.data(data, ' + depth + ')');
|
9948 | }
|
9949 |
|
9950 | this.resolvePath('data', parts, 0, true, strict);
|
9951 | },
|
9952 |
|
9953 | resolvePath: function resolvePath(type, parts, i, falsy, strict) {
|
9954 |
|
9955 |
|
9956 | var _this = this;
|
9957 |
|
9958 | if (this.options.strict || this.options.assumeObjects) {
|
9959 | this.push(strictLookup(this.options.strict && strict, this, parts, type));
|
9960 | return;
|
9961 | }
|
9962 |
|
9963 | var len = parts.length;
|
9964 | for (; i < len; i++) {
|
9965 |
|
9966 | this.replaceStack(function (current) {
|
9967 | var lookup = _this.nameLookup(current, parts[i], type);
|
9968 |
|
9969 |
|
9970 | if (!falsy) {
|
9971 | return [' != null ? ', lookup, ' : ', current];
|
9972 | } else {
|
9973 |
|
9974 | return [' && ', lookup];
|
9975 | }
|
9976 | });
|
9977 |
|
9978 | }
|
9979 | },
|
9980 |
|
9981 |
|
9982 |
|
9983 |
|
9984 |
|
9985 |
|
9986 |
|
9987 |
|
9988 | resolvePossibleLambda: function resolvePossibleLambda() {
|
9989 | this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
|
9990 | },
|
9991 |
|
9992 |
|
9993 |
|
9994 |
|
9995 |
|
9996 |
|
9997 |
|
9998 |
|
9999 |
|
10000 | pushStringParam: function pushStringParam(string, type) {
|
10001 | this.pushContext();
|
10002 | this.pushString(type);
|
10003 |
|
10004 |
|
10005 |
|
10006 | if (type !== 'SubExpression') {
|
10007 | if (typeof string === 'string') {
|
10008 | this.pushString(string);
|
10009 | } else {
|
10010 | this.pushStackLiteral(string);
|
10011 | }
|
10012 | }
|
10013 | },
|
10014 |
|
10015 | emptyHash: function emptyHash(omitEmpty) {
|
10016 | if (this.trackIds) {
|
10017 | this.push('{}');
|
10018 | }
|
10019 | if (this.stringParams) {
|
10020 | this.push('{}');
|
10021 | this.push('{}');
|
10022 | }
|
10023 | this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');
|
10024 | },
|
10025 | pushHash: function pushHash() {
|
10026 | if (this.hash) {
|
10027 | this.hashes.push(this.hash);
|
10028 | }
|
10029 | this.hash = { values: [], types: [], contexts: [], ids: [] };
|
10030 | },
|
10031 | popHash: function popHash() {
|
10032 | var hash = this.hash;
|
10033 | this.hash = this.hashes.pop();
|
10034 |
|
10035 | if (this.trackIds) {
|
10036 | this.push(this.objectLiteral(hash.ids));
|
10037 | }
|
10038 | if (this.stringParams) {
|
10039 | this.push(this.objectLiteral(hash.contexts));
|
10040 | this.push(this.objectLiteral(hash.types));
|
10041 | }
|
10042 |
|
10043 | this.push(this.objectLiteral(hash.values));
|
10044 | },
|
10045 |
|
10046 |
|
10047 |
|
10048 |
|
10049 |
|
10050 |
|
10051 |
|
10052 | pushString: function pushString(string) {
|
10053 | this.pushStackLiteral(this.quotedString(string));
|
10054 | },
|
10055 |
|
10056 |
|
10057 |
|
10058 |
|
10059 |
|
10060 |
|
10061 |
|
10062 |
|
10063 |
|
10064 | pushLiteral: function pushLiteral(value) {
|
10065 | this.pushStackLiteral(value);
|
10066 | },
|
10067 |
|
10068 |
|
10069 |
|
10070 |
|
10071 |
|
10072 |
|
10073 |
|
10074 |
|
10075 |
|
10076 | pushProgram: function pushProgram(guid) {
|
10077 | if (guid != null) {
|
10078 | this.pushStackLiteral(this.programExpression(guid));
|
10079 | } else {
|
10080 | this.pushStackLiteral(null);
|
10081 | }
|
10082 | },
|
10083 |
|
10084 |
|
10085 |
|
10086 |
|
10087 |
|
10088 |
|
10089 |
|
10090 |
|
10091 | registerDecorator: function registerDecorator(paramSize, name) {
|
10092 | var foundDecorator = this.nameLookup('decorators', name, 'decorator'),
|
10093 | options = this.setupHelperArgs(name, paramSize);
|
10094 |
|
10095 | this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']);
|
10096 | },
|
10097 |
|
10098 |
|
10099 |
|
10100 |
|
10101 |
|
10102 |
|
10103 |
|
10104 |
|
10105 |
|
10106 |
|
10107 | invokeHelper: function invokeHelper(paramSize, name, isSimple) {
|
10108 | var nonHelper = this.popStack(),
|
10109 | helper = this.setupHelper(paramSize, name),
|
10110 | simple = isSimple ? [helper.name, ' || '] : '';
|
10111 |
|
10112 | var lookup = ['('].concat(simple, nonHelper);
|
10113 | if (!this.options.strict) {
|
10114 | lookup.push(' || ', this.aliasable('helpers.helperMissing'));
|
10115 | }
|
10116 | lookup.push(')');
|
10117 |
|
10118 | this.push(this.source.functionCall(lookup, 'call', helper.callParams));
|
10119 | },
|
10120 |
|
10121 |
|
10122 |
|
10123 |
|
10124 |
|
10125 |
|
10126 |
|
10127 |
|
10128 | invokeKnownHelper: function invokeKnownHelper(paramSize, name) {
|
10129 | var helper = this.setupHelper(paramSize, name);
|
10130 | this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
|
10131 | },
|
10132 |
|
10133 |
|
10134 |
|
10135 |
|
10136 |
|
10137 |
|
10138 |
|
10139 |
|
10140 |
|
10141 |
|
10142 |
|
10143 |
|
10144 |
|
10145 | invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
|
10146 | this.useRegister('helper');
|
10147 |
|
10148 | var nonHelper = this.popStack();
|
10149 |
|
10150 | this.emptyHash();
|
10151 | var helper = this.setupHelper(0, name, helperCall);
|
10152 |
|
10153 | var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
|
10154 |
|
10155 | var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];
|
10156 | if (!this.options.strict) {
|
10157 | lookup[0] = '(helper = ';
|
10158 | lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing'));
|
10159 | }
|
10160 |
|
10161 | this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']);
|
10162 | },
|
10163 |
|
10164 |
|
10165 |
|
10166 |
|
10167 |
|
10168 |
|
10169 |
|
10170 |
|
10171 | invokePartial: function invokePartial(isDynamic, name, indent) {
|
10172 | var params = [],
|
10173 | options = this.setupParams(name, 1, params);
|
10174 |
|
10175 | if (isDynamic) {
|
10176 | name = this.popStack();
|
10177 | delete options.name;
|
10178 | }
|
10179 |
|
10180 | if (indent) {
|
10181 | options.indent = JSON.stringify(indent);
|
10182 | }
|
10183 | options.helpers = 'helpers';
|
10184 | options.partials = 'partials';
|
10185 | options.decorators = 'container.decorators';
|
10186 |
|
10187 | if (!isDynamic) {
|
10188 | params.unshift(this.nameLookup('partials', name, 'partial'));
|
10189 | } else {
|
10190 | params.unshift(name);
|
10191 | }
|
10192 |
|
10193 | if (this.options.compat) {
|
10194 | options.depths = 'depths';
|
10195 | }
|
10196 | options = this.objectLiteral(options);
|
10197 | params.push(options);
|
10198 |
|
10199 | this.push(this.source.functionCall('container.invokePartial', '', params));
|
10200 | },
|
10201 |
|
10202 |
|
10203 |
|
10204 |
|
10205 |
|
10206 |
|
10207 |
|
10208 | assignToHash: function assignToHash(key) {
|
10209 | var value = this.popStack(),
|
10210 | context = undefined,
|
10211 | type = undefined,
|
10212 | id = undefined;
|
10213 |
|
10214 | if (this.trackIds) {
|
10215 | id = this.popStack();
|
10216 | }
|
10217 | if (this.stringParams) {
|
10218 | type = this.popStack();
|
10219 | context = this.popStack();
|
10220 | }
|
10221 |
|
10222 | var hash = this.hash;
|
10223 | if (context) {
|
10224 | hash.contexts[key] = context;
|
10225 | }
|
10226 | if (type) {
|
10227 | hash.types[key] = type;
|
10228 | }
|
10229 | if (id) {
|
10230 | hash.ids[key] = id;
|
10231 | }
|
10232 | hash.values[key] = value;
|
10233 | },
|
10234 |
|
10235 | pushId: function pushId(type, name, child) {
|
10236 | if (type === 'BlockParam') {
|
10237 | this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : ''));
|
10238 | } else if (type === 'PathExpression') {
|
10239 | this.pushString(name);
|
10240 | } else if (type === 'SubExpression') {
|
10241 | this.pushStackLiteral('true');
|
10242 | } else {
|
10243 | this.pushStackLiteral('null');
|
10244 | }
|
10245 | },
|
10246 |
|
10247 |
|
10248 |
|
10249 | compiler: JavaScriptCompiler,
|
10250 |
|
10251 | compileChildren: function compileChildren(environment, options) {
|
10252 | var children = environment.children,
|
10253 | child = undefined,
|
10254 | compiler = undefined;
|
10255 |
|
10256 | for (var i = 0, l = children.length; i < l; i++) {
|
10257 | child = children[i];
|
10258 | compiler = new this.compiler();
|
10259 |
|
10260 | var existing = this.matchExistingProgram(child);
|
10261 |
|
10262 | if (existing == null) {
|
10263 | this.context.programs.push('');
|
10264 | var index = this.context.programs.length;
|
10265 | child.index = index;
|
10266 | child.name = 'program' + index;
|
10267 | this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
|
10268 | this.context.decorators[index] = compiler.decorators;
|
10269 | this.context.environments[index] = child;
|
10270 |
|
10271 | this.useDepths = this.useDepths || compiler.useDepths;
|
10272 | this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
|
10273 | child.useDepths = this.useDepths;
|
10274 | child.useBlockParams = this.useBlockParams;
|
10275 | } else {
|
10276 | child.index = existing.index;
|
10277 | child.name = 'program' + existing.index;
|
10278 |
|
10279 | this.useDepths = this.useDepths || existing.useDepths;
|
10280 | this.useBlockParams = this.useBlockParams || existing.useBlockParams;
|
10281 | }
|
10282 | }
|
10283 | },
|
10284 | matchExistingProgram: function matchExistingProgram(child) {
|
10285 | for (var i = 0, len = this.context.environments.length; i < len; i++) {
|
10286 | var environment = this.context.environments[i];
|
10287 | if (environment && environment.equals(child)) {
|
10288 | return environment;
|
10289 | }
|
10290 | }
|
10291 | },
|
10292 |
|
10293 | programExpression: function programExpression(guid) {
|
10294 | var child = this.environment.children[guid],
|
10295 | programParams = [child.index, 'data', child.blockParams];
|
10296 |
|
10297 | if (this.useBlockParams || this.useDepths) {
|
10298 | programParams.push('blockParams');
|
10299 | }
|
10300 | if (this.useDepths) {
|
10301 | programParams.push('depths');
|
10302 | }
|
10303 |
|
10304 | return 'container.program(' + programParams.join(', ') + ')';
|
10305 | },
|
10306 |
|
10307 | useRegister: function useRegister(name) {
|
10308 | if (!this.registers[name]) {
|
10309 | this.registers[name] = true;
|
10310 | this.registers.list.push(name);
|
10311 | }
|
10312 | },
|
10313 |
|
10314 | push: function push(expr) {
|
10315 | if (!(expr instanceof Literal)) {
|
10316 | expr = this.source.wrap(expr);
|
10317 | }
|
10318 |
|
10319 | this.inlineStack.push(expr);
|
10320 | return expr;
|
10321 | },
|
10322 |
|
10323 | pushStackLiteral: function pushStackLiteral(item) {
|
10324 | this.push(new Literal(item));
|
10325 | },
|
10326 |
|
10327 | pushSource: function pushSource(source) {
|
10328 | if (this.pendingContent) {
|
10329 | this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
|
10330 | this.pendingContent = undefined;
|
10331 | }
|
10332 |
|
10333 | if (source) {
|
10334 | this.source.push(source);
|
10335 | }
|
10336 | },
|
10337 |
|
10338 | replaceStack: function replaceStack(callback) {
|
10339 | var prefix = ['('],
|
10340 | stack = undefined,
|
10341 | createdStack = undefined,
|
10342 | usedLiteral = undefined;
|
10343 |
|
10344 |
|
10345 | if (!this.isInline()) {
|
10346 | throw new _exception2['default']('replaceStack on non-inline');
|
10347 | }
|
10348 |
|
10349 |
|
10350 | var top = this.popStack(true);
|
10351 |
|
10352 | if (top instanceof Literal) {
|
10353 |
|
10354 | stack = [top.value];
|
10355 | prefix = ['(', stack];
|
10356 | usedLiteral = true;
|
10357 | } else {
|
10358 |
|
10359 | createdStack = true;
|
10360 | var _name = this.incrStack();
|
10361 |
|
10362 | prefix = ['((', this.push(_name), ' = ', top, ')'];
|
10363 | stack = this.topStack();
|
10364 | }
|
10365 |
|
10366 | var item = callback.call(this, stack);
|
10367 |
|
10368 | if (!usedLiteral) {
|
10369 | this.popStack();
|
10370 | }
|
10371 | if (createdStack) {
|
10372 | this.stackSlot--;
|
10373 | }
|
10374 | this.push(prefix.concat(item, ')'));
|
10375 | },
|
10376 |
|
10377 | incrStack: function incrStack() {
|
10378 | this.stackSlot++;
|
10379 | if (this.stackSlot > this.stackVars.length) {
|
10380 | this.stackVars.push('stack' + this.stackSlot);
|
10381 | }
|
10382 | return this.topStackName();
|
10383 | },
|
10384 | topStackName: function topStackName() {
|
10385 | return 'stack' + this.stackSlot;
|
10386 | },
|
10387 | flushInline: function flushInline() {
|
10388 | var inlineStack = this.inlineStack;
|
10389 | this.inlineStack = [];
|
10390 | for (var i = 0, len = inlineStack.length; i < len; i++) {
|
10391 | var entry = inlineStack[i];
|
10392 |
|
10393 | if (entry instanceof Literal) {
|
10394 | this.compileStack.push(entry);
|
10395 | } else {
|
10396 | var stack = this.incrStack();
|
10397 | this.pushSource([stack, ' = ', entry, ';']);
|
10398 | this.compileStack.push(stack);
|
10399 | }
|
10400 | }
|
10401 | },
|
10402 | isInline: function isInline() {
|
10403 | return this.inlineStack.length;
|
10404 | },
|
10405 |
|
10406 | popStack: function popStack(wrapped) {
|
10407 | var inline = this.isInline(),
|
10408 | item = (inline ? this.inlineStack : this.compileStack).pop();
|
10409 |
|
10410 | if (!wrapped && item instanceof Literal) {
|
10411 | return item.value;
|
10412 | } else {
|
10413 | if (!inline) {
|
10414 |
|
10415 | if (!this.stackSlot) {
|
10416 | throw new _exception2['default']('Invalid stack pop');
|
10417 | }
|
10418 | this.stackSlot--;
|
10419 | }
|
10420 | return item;
|
10421 | }
|
10422 | },
|
10423 |
|
10424 | topStack: function topStack() {
|
10425 | var stack = this.isInline() ? this.inlineStack : this.compileStack,
|
10426 | item = stack[stack.length - 1];
|
10427 |
|
10428 |
|
10429 | if (item instanceof Literal) {
|
10430 | return item.value;
|
10431 | } else {
|
10432 | return item;
|
10433 | }
|
10434 | },
|
10435 |
|
10436 | contextName: function contextName(context) {
|
10437 | if (this.useDepths && context) {
|
10438 | return 'depths[' + context + ']';
|
10439 | } else {
|
10440 | return 'depth' + context;
|
10441 | }
|
10442 | },
|
10443 |
|
10444 | quotedString: function quotedString(str) {
|
10445 | return this.source.quotedString(str);
|
10446 | },
|
10447 |
|
10448 | objectLiteral: function objectLiteral(obj) {
|
10449 | return this.source.objectLiteral(obj);
|
10450 | },
|
10451 |
|
10452 | aliasable: function aliasable(name) {
|
10453 | var ret = this.aliases[name];
|
10454 | if (ret) {
|
10455 | ret.referenceCount++;
|
10456 | return ret;
|
10457 | }
|
10458 |
|
10459 | ret = this.aliases[name] = this.source.wrap(name);
|
10460 | ret.aliasable = true;
|
10461 | ret.referenceCount = 1;
|
10462 |
|
10463 | return ret;
|
10464 | },
|
10465 |
|
10466 | setupHelper: function setupHelper(paramSize, name, blockHelper) {
|
10467 | var params = [],
|
10468 | paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
|
10469 | var foundHelper = this.nameLookup('helpers', name, 'helper'),
|
10470 | callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})');
|
10471 |
|
10472 | return {
|
10473 | params: params,
|
10474 | paramsInit: paramsInit,
|
10475 | name: foundHelper,
|
10476 | callParams: [callContext].concat(params)
|
10477 | };
|
10478 | },
|
10479 |
|
10480 | setupParams: function setupParams(helper, paramSize, params) {
|
10481 | var options = {},
|
10482 | contexts = [],
|
10483 | types = [],
|
10484 | ids = [],
|
10485 | objectArgs = !params,
|
10486 | param = undefined;
|
10487 |
|
10488 | if (objectArgs) {
|
10489 | params = [];
|
10490 | }
|
10491 |
|
10492 | options.name = this.quotedString(helper);
|
10493 | options.hash = this.popStack();
|
10494 |
|
10495 | if (this.trackIds) {
|
10496 | options.hashIds = this.popStack();
|
10497 | }
|
10498 | if (this.stringParams) {
|
10499 | options.hashTypes = this.popStack();
|
10500 | options.hashContexts = this.popStack();
|
10501 | }
|
10502 |
|
10503 | var inverse = this.popStack(),
|
10504 | program = this.popStack();
|
10505 |
|
10506 |
|
10507 |
|
10508 | if (program || inverse) {
|
10509 | options.fn = program || 'container.noop';
|
10510 | options.inverse = inverse || 'container.noop';
|
10511 | }
|
10512 |
|
10513 |
|
10514 |
|
10515 | var i = paramSize;
|
10516 | while (i--) {
|
10517 | param = this.popStack();
|
10518 | params[i] = param;
|
10519 |
|
10520 | if (this.trackIds) {
|
10521 | ids[i] = this.popStack();
|
10522 | }
|
10523 | if (this.stringParams) {
|
10524 | types[i] = this.popStack();
|
10525 | contexts[i] = this.popStack();
|
10526 | }
|
10527 | }
|
10528 |
|
10529 | if (objectArgs) {
|
10530 | options.args = this.source.generateArray(params);
|
10531 | }
|
10532 |
|
10533 | if (this.trackIds) {
|
10534 | options.ids = this.source.generateArray(ids);
|
10535 | }
|
10536 | if (this.stringParams) {
|
10537 | options.types = this.source.generateArray(types);
|
10538 | options.contexts = this.source.generateArray(contexts);
|
10539 | }
|
10540 |
|
10541 | if (this.options.data) {
|
10542 | options.data = 'data';
|
10543 | }
|
10544 | if (this.useBlockParams) {
|
10545 | options.blockParams = 'blockParams';
|
10546 | }
|
10547 | return options;
|
10548 | },
|
10549 |
|
10550 | setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
|
10551 | var options = this.setupParams(helper, paramSize, params);
|
10552 | options = this.objectLiteral(options);
|
10553 | if (useRegister) {
|
10554 | this.useRegister('options');
|
10555 | params.push('options');
|
10556 | return ['options=', options];
|
10557 | } else if (params) {
|
10558 | params.push(options);
|
10559 | return '';
|
10560 | } else {
|
10561 | return options;
|
10562 | }
|
10563 | }
|
10564 | };
|
10565 |
|
10566 | (function () {
|
10567 | var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' ');
|
10568 |
|
10569 | var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
|
10570 |
|
10571 | for (var i = 0, l = reservedWords.length; i < l; i++) {
|
10572 | compilerWords[reservedWords[i]] = true;
|
10573 | }
|
10574 | })();
|
10575 |
|
10576 | JavaScriptCompiler.isValidJavaScriptVariableName = function (name) {
|
10577 | return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
|
10578 | };
|
10579 |
|
10580 | function strictLookup(requireTerminal, compiler, parts, type) {
|
10581 | var stack = compiler.popStack(),
|
10582 | i = 0,
|
10583 | len = parts.length;
|
10584 | if (requireTerminal) {
|
10585 | len--;
|
10586 | }
|
10587 |
|
10588 | for (; i < len; i++) {
|
10589 | stack = compiler.nameLookup(stack, parts[i], type);
|
10590 | }
|
10591 |
|
10592 | if (requireTerminal) {
|
10593 | return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')'];
|
10594 | } else {
|
10595 | return stack;
|
10596 | }
|
10597 | }
|
10598 |
|
10599 | exports['default'] = JavaScriptCompiler;
|
10600 | module.exports = exports['default'];
|
10601 |
|
10602 | }),
|
10603 |
|
10604 | (function(module, exports, __webpack_require__) {
|
10605 |
|
10606 |
|
10607 | 'use strict';
|
10608 |
|
10609 | exports.__esModule = true;
|
10610 |
|
10611 | var _utils = __webpack_require__(5);
|
10612 |
|
10613 | var SourceNode = undefined;
|
10614 |
|
10615 | try {
|
10616 |
|
10617 | if (false) { var SourceMap; }
|
10618 | } catch (err) {}
|
10619 |
|
10620 |
|
10621 |
|
10622 | if (!SourceNode) {
|
10623 | SourceNode = function (line, column, srcFile, chunks) {
|
10624 | this.src = '';
|
10625 | if (chunks) {
|
10626 | this.add(chunks);
|
10627 | }
|
10628 | };
|
10629 |
|
10630 | SourceNode.prototype = {
|
10631 | add: function add(chunks) {
|
10632 | if (_utils.isArray(chunks)) {
|
10633 | chunks = chunks.join('');
|
10634 | }
|
10635 | this.src += chunks;
|
10636 | },
|
10637 | prepend: function prepend(chunks) {
|
10638 | if (_utils.isArray(chunks)) {
|
10639 | chunks = chunks.join('');
|
10640 | }
|
10641 | this.src = chunks + this.src;
|
10642 | },
|
10643 | toStringWithSourceMap: function toStringWithSourceMap() {
|
10644 | return { code: this.toString() };
|
10645 | },
|
10646 | toString: function toString() {
|
10647 | return this.src;
|
10648 | }
|
10649 | };
|
10650 | }
|
10651 |
|
10652 | function castChunk(chunk, codeGen, loc) {
|
10653 | if (_utils.isArray(chunk)) {
|
10654 | var ret = [];
|
10655 |
|
10656 | for (var i = 0, len = chunk.length; i < len; i++) {
|
10657 | ret.push(codeGen.wrap(chunk[i], loc));
|
10658 | }
|
10659 | return ret;
|
10660 | } else if (typeof chunk === 'boolean' || typeof chunk === 'number') {
|
10661 |
|
10662 | return chunk + '';
|
10663 | }
|
10664 | return chunk;
|
10665 | }
|
10666 |
|
10667 | function CodeGen(srcFile) {
|
10668 | this.srcFile = srcFile;
|
10669 | this.source = [];
|
10670 | }
|
10671 |
|
10672 | CodeGen.prototype = {
|
10673 | isEmpty: function isEmpty() {
|
10674 | return !this.source.length;
|
10675 | },
|
10676 | prepend: function prepend(source, loc) {
|
10677 | this.source.unshift(this.wrap(source, loc));
|
10678 | },
|
10679 | push: function push(source, loc) {
|
10680 | this.source.push(this.wrap(source, loc));
|
10681 | },
|
10682 |
|
10683 | merge: function merge() {
|
10684 | var source = this.empty();
|
10685 | this.each(function (line) {
|
10686 | source.add([' ', line, '\n']);
|
10687 | });
|
10688 | return source;
|
10689 | },
|
10690 |
|
10691 | each: function each(iter) {
|
10692 | for (var i = 0, len = this.source.length; i < len; i++) {
|
10693 | iter(this.source[i]);
|
10694 | }
|
10695 | },
|
10696 |
|
10697 | empty: function empty() {
|
10698 | var loc = this.currentLocation || { start: {} };
|
10699 | return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
|
10700 | },
|
10701 | wrap: function wrap(chunk) {
|
10702 | var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];
|
10703 |
|
10704 | if (chunk instanceof SourceNode) {
|
10705 | return chunk;
|
10706 | }
|
10707 |
|
10708 | chunk = castChunk(chunk, this, loc);
|
10709 |
|
10710 | return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
|
10711 | },
|
10712 |
|
10713 | functionCall: function functionCall(fn, type, params) {
|
10714 | params = this.generateList(params);
|
10715 | return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);
|
10716 | },
|
10717 |
|
10718 | quotedString: function quotedString(str) {
|
10719 | return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028')
|
10720 | .replace(/\u2029/g, '\\u2029') + '"';
|
10721 | },
|
10722 |
|
10723 | objectLiteral: function objectLiteral(obj) {
|
10724 | var pairs = [];
|
10725 |
|
10726 | for (var key in obj) {
|
10727 | if (obj.hasOwnProperty(key)) {
|
10728 | var value = castChunk(obj[key], this);
|
10729 | if (value !== 'undefined') {
|
10730 | pairs.push([this.quotedString(key), ':', value]);
|
10731 | }
|
10732 | }
|
10733 | }
|
10734 |
|
10735 | var ret = this.generateList(pairs);
|
10736 | ret.prepend('{');
|
10737 | ret.add('}');
|
10738 | return ret;
|
10739 | },
|
10740 |
|
10741 | generateList: function generateList(entries) {
|
10742 | var ret = this.empty();
|
10743 |
|
10744 | for (var i = 0, len = entries.length; i < len; i++) {
|
10745 | if (i) {
|
10746 | ret.add(',');
|
10747 | }
|
10748 |
|
10749 | ret.add(castChunk(entries[i], this));
|
10750 | }
|
10751 |
|
10752 | return ret;
|
10753 | },
|
10754 |
|
10755 | generateArray: function generateArray(entries) {
|
10756 | var ret = this.generateList(entries);
|
10757 | ret.prepend('[');
|
10758 | ret.add(']');
|
10759 |
|
10760 | return ret;
|
10761 | }
|
10762 | };
|
10763 |
|
10764 | exports['default'] = CodeGen;
|
10765 | module.exports = exports['default'];
|
10766 |
|
10767 | })
|
10768 | ])
|
10769 | });
|
10770 | ;
|
10771 |
|
10772 | }),
|
10773 |
|
10774 | (function(module, exports, __webpack_require__) {
|
10775 |
|
10776 | "use strict";
|
10777 |
|
10778 |
|
10779 | Object.defineProperty(exports, "__esModule", {
|
10780 | value: true
|
10781 | });
|
10782 | exports.stripIndents = exports.stripIndent = exports.oneLineInlineLists = exports.inlineLists = exports.oneLineCommaListsAnd = exports.oneLineCommaListsOr = exports.oneLineCommaLists = exports.oneLineTrim = exports.oneLine = exports.safeHtml = exports.source = exports.codeBlock = exports.html = exports.commaListsOr = exports.commaListsAnd = exports.commaLists = exports.removeNonPrintingValuesTransformer = exports.splitStringTransformer = exports.inlineArrayTransformer = exports.replaceStringTransformer = exports.replaceSubstitutionTransformer = exports.replaceResultTransformer = exports.stripIndentTransformer = exports.trimResultTransformer = exports.TemplateTag = undefined;
|
10783 |
|
10784 | var _TemplateTag2 = __webpack_require__(0);
|
10785 |
|
10786 | var _TemplateTag3 = _interopRequireDefault(_TemplateTag2);
|
10787 |
|
10788 | var _trimResultTransformer2 = __webpack_require__(1);
|
10789 |
|
10790 | var _trimResultTransformer3 = _interopRequireDefault(_trimResultTransformer2);
|
10791 |
|
10792 | var _stripIndentTransformer2 = __webpack_require__(3);
|
10793 |
|
10794 | var _stripIndentTransformer3 = _interopRequireDefault(_stripIndentTransformer2);
|
10795 |
|
10796 | var _replaceResultTransformer2 = __webpack_require__(4);
|
10797 |
|
10798 | var _replaceResultTransformer3 = _interopRequireDefault(_replaceResultTransformer2);
|
10799 |
|
10800 | var _replaceSubstitutionTransformer2 = __webpack_require__(7);
|
10801 |
|
10802 | var _replaceSubstitutionTransformer3 = _interopRequireDefault(_replaceSubstitutionTransformer2);
|
10803 |
|
10804 | var _replaceStringTransformer2 = __webpack_require__(17);
|
10805 |
|
10806 | var _replaceStringTransformer3 = _interopRequireDefault(_replaceStringTransformer2);
|
10807 |
|
10808 | var _inlineArrayTransformer2 = __webpack_require__(2);
|
10809 |
|
10810 | var _inlineArrayTransformer3 = _interopRequireDefault(_inlineArrayTransformer2);
|
10811 |
|
10812 | var _splitStringTransformer2 = __webpack_require__(5);
|
10813 |
|
10814 | var _splitStringTransformer3 = _interopRequireDefault(_splitStringTransformer2);
|
10815 |
|
10816 | var _removeNonPrintingValuesTransformer2 = __webpack_require__(8);
|
10817 |
|
10818 | var _removeNonPrintingValuesTransformer3 = _interopRequireDefault(_removeNonPrintingValuesTransformer2);
|
10819 |
|
10820 | var _commaLists2 = __webpack_require__(22);
|
10821 |
|
10822 | var _commaLists3 = _interopRequireDefault(_commaLists2);
|
10823 |
|
10824 | var _commaListsAnd2 = __webpack_require__(24);
|
10825 |
|
10826 | var _commaListsAnd3 = _interopRequireDefault(_commaListsAnd2);
|
10827 |
|
10828 | var _commaListsOr2 = __webpack_require__(26);
|
10829 |
|
10830 | var _commaListsOr3 = _interopRequireDefault(_commaListsOr2);
|
10831 |
|
10832 | var _html2 = __webpack_require__(6);
|
10833 |
|
10834 | var _html3 = _interopRequireDefault(_html2);
|
10835 |
|
10836 | var _codeBlock2 = __webpack_require__(29);
|
10837 |
|
10838 | var _codeBlock3 = _interopRequireDefault(_codeBlock2);
|
10839 |
|
10840 | var _source2 = __webpack_require__(30);
|
10841 |
|
10842 | var _source3 = _interopRequireDefault(_source2);
|
10843 |
|
10844 | var _safeHtml2 = __webpack_require__(31);
|
10845 |
|
10846 | var _safeHtml3 = _interopRequireDefault(_safeHtml2);
|
10847 |
|
10848 | var _oneLine2 = __webpack_require__(33);
|
10849 |
|
10850 | var _oneLine3 = _interopRequireDefault(_oneLine2);
|
10851 |
|
10852 | var _oneLineTrim2 = __webpack_require__(35);
|
10853 |
|
10854 | var _oneLineTrim3 = _interopRequireDefault(_oneLineTrim2);
|
10855 |
|
10856 | var _oneLineCommaLists2 = __webpack_require__(37);
|
10857 |
|
10858 | var _oneLineCommaLists3 = _interopRequireDefault(_oneLineCommaLists2);
|
10859 |
|
10860 | var _oneLineCommaListsOr2 = __webpack_require__(39);
|
10861 |
|
10862 | var _oneLineCommaListsOr3 = _interopRequireDefault(_oneLineCommaListsOr2);
|
10863 |
|
10864 | var _oneLineCommaListsAnd2 = __webpack_require__(41);
|
10865 |
|
10866 | var _oneLineCommaListsAnd3 = _interopRequireDefault(_oneLineCommaListsAnd2);
|
10867 |
|
10868 | var _inlineLists2 = __webpack_require__(43);
|
10869 |
|
10870 | var _inlineLists3 = _interopRequireDefault(_inlineLists2);
|
10871 |
|
10872 | var _oneLineInlineLists2 = __webpack_require__(45);
|
10873 |
|
10874 | var _oneLineInlineLists3 = _interopRequireDefault(_oneLineInlineLists2);
|
10875 |
|
10876 | var _stripIndent2 = __webpack_require__(47);
|
10877 |
|
10878 | var _stripIndent3 = _interopRequireDefault(_stripIndent2);
|
10879 |
|
10880 | var _stripIndents2 = __webpack_require__(49);
|
10881 |
|
10882 | var _stripIndents3 = _interopRequireDefault(_stripIndents2);
|
10883 |
|
10884 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10885 |
|
10886 | exports.TemplateTag = _TemplateTag3.default;
|
10887 |
|
10888 |
|
10889 |
|
10890 |
|
10891 | exports.trimResultTransformer = _trimResultTransformer3.default;
|
10892 | exports.stripIndentTransformer = _stripIndentTransformer3.default;
|
10893 | exports.replaceResultTransformer = _replaceResultTransformer3.default;
|
10894 | exports.replaceSubstitutionTransformer = _replaceSubstitutionTransformer3.default;
|
10895 | exports.replaceStringTransformer = _replaceStringTransformer3.default;
|
10896 | exports.inlineArrayTransformer = _inlineArrayTransformer3.default;
|
10897 | exports.splitStringTransformer = _splitStringTransformer3.default;
|
10898 | exports.removeNonPrintingValuesTransformer = _removeNonPrintingValuesTransformer3.default;
|
10899 |
|
10900 |
|
10901 |
|
10902 | exports.commaLists = _commaLists3.default;
|
10903 | exports.commaListsAnd = _commaListsAnd3.default;
|
10904 | exports.commaListsOr = _commaListsOr3.default;
|
10905 | exports.html = _html3.default;
|
10906 | exports.codeBlock = _codeBlock3.default;
|
10907 | exports.source = _source3.default;
|
10908 | exports.safeHtml = _safeHtml3.default;
|
10909 | exports.oneLine = _oneLine3.default;
|
10910 | exports.oneLineTrim = _oneLineTrim3.default;
|
10911 | exports.oneLineCommaLists = _oneLineCommaLists3.default;
|
10912 | exports.oneLineCommaListsOr = _oneLineCommaListsOr3.default;
|
10913 | exports.oneLineCommaListsAnd = _oneLineCommaListsAnd3.default;
|
10914 | exports.inlineLists = _inlineLists3.default;
|
10915 | exports.oneLineInlineLists = _oneLineInlineLists3.default;
|
10916 | exports.stripIndent = _stripIndent3.default;
|
10917 | exports.stripIndents = _stripIndents3.default;
|
10918 |
|
10919 |
|
10920 | }),
|
10921 |
|
10922 | (function(module, exports, __webpack_require__) {
|
10923 |
|
10924 | "use strict";
|
10925 |
|
10926 |
|
10927 | Object.defineProperty(exports, "__esModule", {
|
10928 | value: true
|
10929 | });
|
10930 |
|
10931 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10932 |
|
10933 | var _templateObject = _taggedTemplateLiteral(['', ''], ['', '']);
|
10934 |
|
10935 | function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
10936 |
|
10937 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10938 |
|
10939 |
|
10940 |
|
10941 |
|
10942 |
|
10943 | var TemplateTag = function () {
|
10944 | |
10945 |
|
10946 |
|
10947 |
|
10948 |
|
10949 |
|
10950 | function TemplateTag() {
|
10951 | var _this = this;
|
10952 |
|
10953 | for (var _len = arguments.length, transformers = Array(_len), _key = 0; _key < _len; _key++) {
|
10954 | transformers[_key] = arguments[_key];
|
10955 | }
|
10956 |
|
10957 | _classCallCheck(this, TemplateTag);
|
10958 |
|
10959 | this.tag = function (strings) {
|
10960 | for (var _len2 = arguments.length, expressions = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
10961 | expressions[_key2 - 1] = arguments[_key2];
|
10962 | }
|
10963 |
|
10964 | if (typeof strings === 'function') {
|
10965 |
|
10966 |
|
10967 |
|
10968 | return _this.interimTag.bind(_this, strings);
|
10969 | }
|
10970 |
|
10971 | if (typeof strings === 'string') {
|
10972 |
|
10973 | return _this.transformEndResult(strings);
|
10974 | }
|
10975 |
|
10976 |
|
10977 | strings = strings.map(_this.transformString.bind(_this));
|
10978 | return _this.transformEndResult(strings.reduce(_this.processSubstitutions.bind(_this, expressions)));
|
10979 | };
|
10980 |
|
10981 |
|
10982 | if (transformers.length > 0 && Array.isArray(transformers[0])) {
|
10983 | transformers = transformers[0];
|
10984 | }
|
10985 |
|
10986 |
|
10987 | this.transformers = transformers.map(function (transformer) {
|
10988 | return typeof transformer === 'function' ? transformer() : transformer;
|
10989 | });
|
10990 |
|
10991 |
|
10992 | return this.tag;
|
10993 | }
|
10994 |
|
10995 | |
10996 |
|
10997 |
|
10998 |
|
10999 |
|
11000 |
|
11001 |
|
11002 |
|
11003 |
|
11004 |
|
11005 | _createClass(TemplateTag, [{
|
11006 | key: 'interimTag',
|
11007 |
|
11008 |
|
11009 | |
11010 |
|
11011 |
|
11012 |
|
11013 |
|
11014 |
|
11015 |
|
11016 |
|
11017 | value: function interimTag(previousTag, template) {
|
11018 | for (var _len3 = arguments.length, substitutions = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
|
11019 | substitutions[_key3 - 2] = arguments[_key3];
|
11020 | }
|
11021 |
|
11022 | return this.tag(_templateObject, previousTag.apply(undefined, [template].concat(substitutions)));
|
11023 | }
|
11024 |
|
11025 | |
11026 |
|
11027 |
|
11028 |
|
11029 |
|
11030 |
|
11031 |
|
11032 |
|
11033 |
|
11034 | }, {
|
11035 | key: 'processSubstitutions',
|
11036 | value: function processSubstitutions(substitutions, resultSoFar, remainingPart) {
|
11037 | var substitution = this.transformSubstitution(substitutions.shift(), resultSoFar);
|
11038 | return ''.concat(resultSoFar, substitution, remainingPart);
|
11039 | }
|
11040 |
|
11041 | |
11042 |
|
11043 |
|
11044 |
|
11045 |
|
11046 |
|
11047 |
|
11048 | }, {
|
11049 | key: 'transformString',
|
11050 | value: function transformString(str) {
|
11051 | var cb = function cb(res, transform) {
|
11052 | return transform.onString ? transform.onString(res) : res;
|
11053 | };
|
11054 | return this.transformers.reduce(cb, str);
|
11055 | }
|
11056 |
|
11057 | |
11058 |
|
11059 |
|
11060 |
|
11061 |
|
11062 |
|
11063 |
|
11064 |
|
11065 | }, {
|
11066 | key: 'transformSubstitution',
|
11067 | value: function transformSubstitution(substitution, resultSoFar) {
|
11068 | var cb = function cb(res, transform) {
|
11069 | return transform.onSubstitution ? transform.onSubstitution(res, resultSoFar) : res;
|
11070 | };
|
11071 | return this.transformers.reduce(cb, substitution);
|
11072 | }
|
11073 |
|
11074 | |
11075 |
|
11076 |
|
11077 |
|
11078 |
|
11079 |
|
11080 |
|
11081 | }, {
|
11082 | key: 'transformEndResult',
|
11083 | value: function transformEndResult(endResult) {
|
11084 | var cb = function cb(res, transform) {
|
11085 | return transform.onEndResult ? transform.onEndResult(res) : res;
|
11086 | };
|
11087 | return this.transformers.reduce(cb, endResult);
|
11088 | }
|
11089 | }]);
|
11090 |
|
11091 | return TemplateTag;
|
11092 | }();
|
11093 |
|
11094 | exports.default = TemplateTag;
|
11095 | module.exports = exports['default'];
|
11096 |
|
11097 |
|
11098 | }),
|
11099 |
|
11100 | (function(module, exports, __webpack_require__) {
|
11101 |
|
11102 | "use strict";
|
11103 |
|
11104 |
|
11105 | Object.defineProperty(exports, "__esModule", {
|
11106 | value: true
|
11107 | });
|
11108 |
|
11109 |
|
11110 |
|
11111 |
|
11112 |
|
11113 | var trimResultTransformer = function trimResultTransformer() {
|
11114 | var side = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
11115 | return {
|
11116 | onEndResult: function onEndResult(endResult) {
|
11117 | if (side === '') {
|
11118 | return endResult.trim();
|
11119 | }
|
11120 |
|
11121 | side = side.toLowerCase();
|
11122 |
|
11123 | if (side === 'start' || side === 'left') {
|
11124 | return endResult.replace(/^\s*/, '');
|
11125 | }
|
11126 |
|
11127 | if (side === 'end' || side === 'right') {
|
11128 | return endResult.replace(/\s*$/, '');
|
11129 | }
|
11130 |
|
11131 | throw new Error('Side not supported: ' + side);
|
11132 | }
|
11133 | };
|
11134 | };
|
11135 |
|
11136 | exports.default = trimResultTransformer;
|
11137 | module.exports = exports['default'];
|
11138 |
|
11139 |
|
11140 | }),
|
11141 |
|
11142 | (function(module, exports, __webpack_require__) {
|
11143 |
|
11144 | "use strict";
|
11145 |
|
11146 |
|
11147 | Object.defineProperty(exports, "__esModule", {
|
11148 | value: true
|
11149 | });
|
11150 |
|
11151 | function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
11152 |
|
11153 |
|
11154 |
|
11155 |
|
11156 |
|
11157 |
|
11158 | var stripIndentTransformer = function stripIndentTransformer() {
|
11159 | var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'initial';
|
11160 | return {
|
11161 | onEndResult: function onEndResult(endResult) {
|
11162 | if (type === 'initial') {
|
11163 |
|
11164 | var match = endResult.match(/^[^\S\n]*(?=\S)/gm);
|
11165 | var indent = match && Math.min.apply(Math, _toConsumableArray(match.map(function (el) {
|
11166 | return el.length;
|
11167 | })));
|
11168 | if (indent) {
|
11169 | var regexp = new RegExp('^.{' + indent + '}', 'gm');
|
11170 | return endResult.replace(regexp, '');
|
11171 | }
|
11172 | return endResult;
|
11173 | }
|
11174 | if (type === 'all') {
|
11175 |
|
11176 | return endResult.replace(/^[^\S\n]+/gm, '');
|
11177 | }
|
11178 | throw new Error('Unknown type: ' + type);
|
11179 | }
|
11180 | };
|
11181 | };
|
11182 |
|
11183 | exports.default = stripIndentTransformer;
|
11184 | module.exports = exports['default'];
|
11185 |
|
11186 |
|
11187 | }),
|
11188 |
|
11189 | (function(module, exports, __webpack_require__) {
|
11190 |
|
11191 | "use strict";
|
11192 |
|
11193 |
|
11194 | Object.defineProperty(exports, "__esModule", {
|
11195 | value: true
|
11196 | });
|
11197 |
|
11198 |
|
11199 |
|
11200 |
|
11201 |
|
11202 |
|
11203 | var replaceResultTransformer = function replaceResultTransformer(replaceWhat, replaceWith) {
|
11204 | return {
|
11205 | onEndResult: function onEndResult(endResult) {
|
11206 | if (replaceWhat == null || replaceWith == null) {
|
11207 | throw new Error('replaceResultTransformer requires at least 2 arguments.');
|
11208 | }
|
11209 | return endResult.replace(replaceWhat, replaceWith);
|
11210 | }
|
11211 | };
|
11212 | };
|
11213 |
|
11214 | exports.default = replaceResultTransformer;
|
11215 | module.exports = exports['default'];
|
11216 |
|
11217 |
|
11218 | }),
|
11219 |
|
11220 | (function(module, exports, __webpack_require__) {
|
11221 |
|
11222 | "use strict";
|
11223 |
|
11224 |
|
11225 | Object.defineProperty(exports, "__esModule", {
|
11226 | value: true
|
11227 | });
|
11228 | var replaceSubstitutionTransformer = function replaceSubstitutionTransformer(replaceWhat, replaceWith) {
|
11229 | return {
|
11230 | onSubstitution: function onSubstitution(substitution, resultSoFar) {
|
11231 | if (replaceWhat == null || replaceWith == null) {
|
11232 | throw new Error('replaceSubstitutionTransformer requires at least 2 arguments.');
|
11233 | }
|
11234 |
|
11235 |
|
11236 | if (substitution == null) {
|
11237 | return substitution;
|
11238 | } else {
|
11239 | return substitution.toString().replace(replaceWhat, replaceWith);
|
11240 | }
|
11241 | }
|
11242 | };
|
11243 | };
|
11244 |
|
11245 | exports.default = replaceSubstitutionTransformer;
|
11246 | module.exports = exports['default'];
|
11247 |
|
11248 |
|
11249 | }),
|
11250 |
|
11251 | (function(module, exports, __webpack_require__) {
|
11252 |
|
11253 | "use strict";
|
11254 |
|
11255 |
|
11256 | Object.defineProperty(exports, "__esModule", {
|
11257 | value: true
|
11258 | });
|
11259 | exports.default = undefined;
|
11260 |
|
11261 | var _replaceStringTransformer = __webpack_require__(18);
|
11262 |
|
11263 | var _replaceStringTransformer2 = _interopRequireDefault(_replaceStringTransformer);
|
11264 |
|
11265 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11266 |
|
11267 | exports.default = _replaceStringTransformer2.default;
|
11268 | module.exports = exports['default'];
|
11269 |
|
11270 |
|
11271 | }),
|
11272 |
|
11273 | (function(module, exports, __webpack_require__) {
|
11274 |
|
11275 | "use strict";
|
11276 |
|
11277 |
|
11278 | Object.defineProperty(exports, "__esModule", {
|
11279 | value: true
|
11280 | });
|
11281 | var replaceStringTransformer = function replaceStringTransformer(replaceWhat, replaceWith) {
|
11282 | return {
|
11283 | onString: function onString(str) {
|
11284 | if (replaceWhat == null || replaceWith == null) {
|
11285 | throw new Error('replaceStringTransformer requires at least 2 arguments.');
|
11286 | }
|
11287 |
|
11288 | return str.replace(replaceWhat, replaceWith);
|
11289 | }
|
11290 | };
|
11291 | };
|
11292 |
|
11293 | exports.default = replaceStringTransformer;
|
11294 | module.exports = exports['default'];
|
11295 |
|
11296 |
|
11297 | }),
|
11298 |
|
11299 | (function(module, exports, __webpack_require__) {
|
11300 |
|
11301 | "use strict";
|
11302 |
|
11303 |
|
11304 | Object.defineProperty(exports, "__esModule", {
|
11305 | value: true
|
11306 | });
|
11307 | var defaults = {
|
11308 | separator: '',
|
11309 | conjunction: '',
|
11310 | serial: false
|
11311 | };
|
11312 |
|
11313 |
|
11314 |
|
11315 |
|
11316 |
|
11317 |
|
11318 |
|
11319 |
|
11320 |
|
11321 | var inlineArrayTransformer = function inlineArrayTransformer() {
|
11322 | var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaults;
|
11323 | return {
|
11324 | onSubstitution: function onSubstitution(substitution, resultSoFar) {
|
11325 |
|
11326 | if (Array.isArray(substitution)) {
|
11327 | var arrayLength = substitution.length;
|
11328 | var separator = opts.separator;
|
11329 | var conjunction = opts.conjunction;
|
11330 | var serial = opts.serial;
|
11331 |
|
11332 |
|
11333 | var indent = resultSoFar.match(/(\n?[^\S\n]+)$/);
|
11334 | if (indent) {
|
11335 | substitution = substitution.join(separator + indent[1]);
|
11336 | } else {
|
11337 | substitution = substitution.join(separator + ' ');
|
11338 | }
|
11339 |
|
11340 | if (conjunction && arrayLength > 1) {
|
11341 | var separatorIndex = substitution.lastIndexOf(separator);
|
11342 | substitution = substitution.slice(0, separatorIndex) + (serial ? separator : '') + ' ' + conjunction + substitution.slice(separatorIndex + 1);
|
11343 | }
|
11344 | }
|
11345 | return substitution;
|
11346 | }
|
11347 | };
|
11348 | };
|
11349 |
|
11350 | exports.default = inlineArrayTransformer;
|
11351 | module.exports = exports['default'];
|
11352 |
|
11353 |
|
11354 | }),
|
11355 |
|
11356 | (function(module, exports, __webpack_require__) {
|
11357 |
|
11358 | "use strict";
|
11359 |
|
11360 |
|
11361 | Object.defineProperty(exports, "__esModule", {
|
11362 | value: true
|
11363 | });
|
11364 | var splitStringTransformer = function splitStringTransformer(splitBy) {
|
11365 | return {
|
11366 | onSubstitution: function onSubstitution(substitution, resultSoFar) {
|
11367 | if (splitBy != null && typeof splitBy === 'string') {
|
11368 | if (typeof substitution === 'string' && substitution.includes(splitBy)) {
|
11369 | substitution = substitution.split(splitBy);
|
11370 | }
|
11371 | } else {
|
11372 | throw new Error('You need to specify a string character to split by.');
|
11373 | }
|
11374 | return substitution;
|
11375 | }
|
11376 | };
|
11377 | };
|
11378 |
|
11379 | exports.default = splitStringTransformer;
|
11380 | module.exports = exports['default'];
|
11381 |
|
11382 |
|
11383 | }),
|
11384 |
|
11385 | (function(module, exports, __webpack_require__) {
|
11386 |
|
11387 | "use strict";
|
11388 |
|
11389 |
|
11390 | Object.defineProperty(exports, "__esModule", {
|
11391 | value: true
|
11392 | });
|
11393 | var isValidValue = function isValidValue(x) {
|
11394 | return x != null && !Number.isNaN(x) && typeof x !== 'boolean';
|
11395 | };
|
11396 |
|
11397 | var removeNonPrintingValuesTransformer = function removeNonPrintingValuesTransformer() {
|
11398 | return {
|
11399 | onSubstitution: function onSubstitution(substitution) {
|
11400 | if (Array.isArray(substitution)) {
|
11401 | return substitution.filter(isValidValue);
|
11402 | }
|
11403 | if (isValidValue(substitution)) {
|
11404 | return substitution;
|
11405 | }
|
11406 | return '';
|
11407 | }
|
11408 | };
|
11409 | };
|
11410 |
|
11411 | exports.default = removeNonPrintingValuesTransformer;
|
11412 | module.exports = exports['default'];
|
11413 |
|
11414 |
|
11415 | }),
|
11416 |
|
11417 | (function(module, exports, __webpack_require__) {
|
11418 |
|
11419 | "use strict";
|
11420 |
|
11421 |
|
11422 | Object.defineProperty(exports, "__esModule", {
|
11423 | value: true
|
11424 | });
|
11425 | exports.default = undefined;
|
11426 |
|
11427 | var _commaLists = __webpack_require__(23);
|
11428 |
|
11429 | var _commaLists2 = _interopRequireDefault(_commaLists);
|
11430 |
|
11431 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11432 |
|
11433 | exports.default = _commaLists2.default;
|
11434 | module.exports = exports['default'];
|
11435 |
|
11436 |
|
11437 | }),
|
11438 |
|
11439 | (function(module, exports, __webpack_require__) {
|
11440 |
|
11441 | "use strict";
|
11442 |
|
11443 |
|
11444 | Object.defineProperty(exports, "__esModule", {
|
11445 | value: true
|
11446 | });
|
11447 |
|
11448 | var _TemplateTag = __webpack_require__(0);
|
11449 |
|
11450 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
11451 |
|
11452 | var _stripIndentTransformer = __webpack_require__(3);
|
11453 |
|
11454 | var _stripIndentTransformer2 = _interopRequireDefault(_stripIndentTransformer);
|
11455 |
|
11456 | var _inlineArrayTransformer = __webpack_require__(2);
|
11457 |
|
11458 | var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer);
|
11459 |
|
11460 | var _trimResultTransformer = __webpack_require__(1);
|
11461 |
|
11462 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
11463 |
|
11464 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11465 |
|
11466 | var commaLists = new _TemplateTag2.default((0, _inlineArrayTransformer2.default)({ separator: ',' }), _stripIndentTransformer2.default, _trimResultTransformer2.default);
|
11467 |
|
11468 | exports.default = commaLists;
|
11469 | module.exports = exports['default'];
|
11470 |
|
11471 |
|
11472 | }),
|
11473 |
|
11474 | (function(module, exports, __webpack_require__) {
|
11475 |
|
11476 | "use strict";
|
11477 |
|
11478 |
|
11479 | Object.defineProperty(exports, "__esModule", {
|
11480 | value: true
|
11481 | });
|
11482 | exports.default = undefined;
|
11483 |
|
11484 | var _commaListsAnd = __webpack_require__(25);
|
11485 |
|
11486 | var _commaListsAnd2 = _interopRequireDefault(_commaListsAnd);
|
11487 |
|
11488 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11489 |
|
11490 | exports.default = _commaListsAnd2.default;
|
11491 | module.exports = exports['default'];
|
11492 |
|
11493 |
|
11494 | }),
|
11495 |
|
11496 | (function(module, exports, __webpack_require__) {
|
11497 |
|
11498 | "use strict";
|
11499 |
|
11500 |
|
11501 | Object.defineProperty(exports, "__esModule", {
|
11502 | value: true
|
11503 | });
|
11504 |
|
11505 | var _TemplateTag = __webpack_require__(0);
|
11506 |
|
11507 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
11508 |
|
11509 | var _stripIndentTransformer = __webpack_require__(3);
|
11510 |
|
11511 | var _stripIndentTransformer2 = _interopRequireDefault(_stripIndentTransformer);
|
11512 |
|
11513 | var _inlineArrayTransformer = __webpack_require__(2);
|
11514 |
|
11515 | var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer);
|
11516 |
|
11517 | var _trimResultTransformer = __webpack_require__(1);
|
11518 |
|
11519 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
11520 |
|
11521 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11522 |
|
11523 | var commaListsAnd = new _TemplateTag2.default((0, _inlineArrayTransformer2.default)({ separator: ',', conjunction: 'and' }), _stripIndentTransformer2.default, _trimResultTransformer2.default);
|
11524 |
|
11525 | exports.default = commaListsAnd;
|
11526 | module.exports = exports['default'];
|
11527 |
|
11528 |
|
11529 | }),
|
11530 |
|
11531 | (function(module, exports, __webpack_require__) {
|
11532 |
|
11533 | "use strict";
|
11534 |
|
11535 |
|
11536 | Object.defineProperty(exports, "__esModule", {
|
11537 | value: true
|
11538 | });
|
11539 | exports.default = undefined;
|
11540 |
|
11541 | var _commaListsOr = __webpack_require__(27);
|
11542 |
|
11543 | var _commaListsOr2 = _interopRequireDefault(_commaListsOr);
|
11544 |
|
11545 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11546 |
|
11547 | exports.default = _commaListsOr2.default;
|
11548 | module.exports = exports['default'];
|
11549 |
|
11550 |
|
11551 | }),
|
11552 |
|
11553 | (function(module, exports, __webpack_require__) {
|
11554 |
|
11555 | "use strict";
|
11556 |
|
11557 |
|
11558 | Object.defineProperty(exports, "__esModule", {
|
11559 | value: true
|
11560 | });
|
11561 |
|
11562 | var _TemplateTag = __webpack_require__(0);
|
11563 |
|
11564 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
11565 |
|
11566 | var _stripIndentTransformer = __webpack_require__(3);
|
11567 |
|
11568 | var _stripIndentTransformer2 = _interopRequireDefault(_stripIndentTransformer);
|
11569 |
|
11570 | var _inlineArrayTransformer = __webpack_require__(2);
|
11571 |
|
11572 | var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer);
|
11573 |
|
11574 | var _trimResultTransformer = __webpack_require__(1);
|
11575 |
|
11576 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
11577 |
|
11578 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11579 |
|
11580 | var commaListsOr = new _TemplateTag2.default((0, _inlineArrayTransformer2.default)({ separator: ',', conjunction: 'or' }), _stripIndentTransformer2.default, _trimResultTransformer2.default);
|
11581 |
|
11582 | exports.default = commaListsOr;
|
11583 | module.exports = exports['default'];
|
11584 |
|
11585 |
|
11586 | }),
|
11587 |
|
11588 | (function(module, exports, __webpack_require__) {
|
11589 |
|
11590 | "use strict";
|
11591 |
|
11592 |
|
11593 | Object.defineProperty(exports, "__esModule", {
|
11594 | value: true
|
11595 | });
|
11596 |
|
11597 | var _TemplateTag = __webpack_require__(0);
|
11598 |
|
11599 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
11600 |
|
11601 | var _stripIndentTransformer = __webpack_require__(3);
|
11602 |
|
11603 | var _stripIndentTransformer2 = _interopRequireDefault(_stripIndentTransformer);
|
11604 |
|
11605 | var _inlineArrayTransformer = __webpack_require__(2);
|
11606 |
|
11607 | var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer);
|
11608 |
|
11609 | var _trimResultTransformer = __webpack_require__(1);
|
11610 |
|
11611 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
11612 |
|
11613 | var _splitStringTransformer = __webpack_require__(5);
|
11614 |
|
11615 | var _splitStringTransformer2 = _interopRequireDefault(_splitStringTransformer);
|
11616 |
|
11617 | var _removeNonPrintingValuesTransformer = __webpack_require__(8);
|
11618 |
|
11619 | var _removeNonPrintingValuesTransformer2 = _interopRequireDefault(_removeNonPrintingValuesTransformer);
|
11620 |
|
11621 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11622 |
|
11623 | var html = new _TemplateTag2.default((0, _splitStringTransformer2.default)('\n'), _removeNonPrintingValuesTransformer2.default, _inlineArrayTransformer2.default, _stripIndentTransformer2.default, _trimResultTransformer2.default);
|
11624 |
|
11625 | exports.default = html;
|
11626 | module.exports = exports['default'];
|
11627 |
|
11628 |
|
11629 | }),
|
11630 |
|
11631 | (function(module, exports, __webpack_require__) {
|
11632 |
|
11633 | "use strict";
|
11634 |
|
11635 |
|
11636 | Object.defineProperty(exports, "__esModule", {
|
11637 | value: true
|
11638 | });
|
11639 | exports.default = undefined;
|
11640 |
|
11641 | var _html = __webpack_require__(6);
|
11642 |
|
11643 | var _html2 = _interopRequireDefault(_html);
|
11644 |
|
11645 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11646 |
|
11647 | exports.default = _html2.default;
|
11648 | module.exports = exports['default'];
|
11649 |
|
11650 |
|
11651 | }),
|
11652 |
|
11653 | (function(module, exports, __webpack_require__) {
|
11654 |
|
11655 | "use strict";
|
11656 |
|
11657 |
|
11658 | Object.defineProperty(exports, "__esModule", {
|
11659 | value: true
|
11660 | });
|
11661 | exports.default = undefined;
|
11662 |
|
11663 | var _html = __webpack_require__(6);
|
11664 |
|
11665 | var _html2 = _interopRequireDefault(_html);
|
11666 |
|
11667 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11668 |
|
11669 | exports.default = _html2.default;
|
11670 | module.exports = exports['default'];
|
11671 |
|
11672 |
|
11673 | }),
|
11674 |
|
11675 | (function(module, exports, __webpack_require__) {
|
11676 |
|
11677 | "use strict";
|
11678 |
|
11679 |
|
11680 | Object.defineProperty(exports, "__esModule", {
|
11681 | value: true
|
11682 | });
|
11683 | exports.default = undefined;
|
11684 |
|
11685 | var _safeHtml = __webpack_require__(32);
|
11686 |
|
11687 | var _safeHtml2 = _interopRequireDefault(_safeHtml);
|
11688 |
|
11689 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11690 |
|
11691 | exports.default = _safeHtml2.default;
|
11692 | module.exports = exports['default'];
|
11693 |
|
11694 |
|
11695 | }),
|
11696 |
|
11697 | (function(module, exports, __webpack_require__) {
|
11698 |
|
11699 | "use strict";
|
11700 |
|
11701 |
|
11702 | Object.defineProperty(exports, "__esModule", {
|
11703 | value: true
|
11704 | });
|
11705 |
|
11706 | var _TemplateTag = __webpack_require__(0);
|
11707 |
|
11708 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
11709 |
|
11710 | var _stripIndentTransformer = __webpack_require__(3);
|
11711 |
|
11712 | var _stripIndentTransformer2 = _interopRequireDefault(_stripIndentTransformer);
|
11713 |
|
11714 | var _inlineArrayTransformer = __webpack_require__(2);
|
11715 |
|
11716 | var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer);
|
11717 |
|
11718 | var _trimResultTransformer = __webpack_require__(1);
|
11719 |
|
11720 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
11721 |
|
11722 | var _splitStringTransformer = __webpack_require__(5);
|
11723 |
|
11724 | var _splitStringTransformer2 = _interopRequireDefault(_splitStringTransformer);
|
11725 |
|
11726 | var _replaceSubstitutionTransformer = __webpack_require__(7);
|
11727 |
|
11728 | var _replaceSubstitutionTransformer2 = _interopRequireDefault(_replaceSubstitutionTransformer);
|
11729 |
|
11730 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11731 |
|
11732 | var safeHtml = new _TemplateTag2.default((0, _splitStringTransformer2.default)('\n'), _inlineArrayTransformer2.default, _stripIndentTransformer2.default, _trimResultTransformer2.default, (0, _replaceSubstitutionTransformer2.default)(/&/g, '&'), (0, _replaceSubstitutionTransformer2.default)(/</g, '<'), (0, _replaceSubstitutionTransformer2.default)(/>/g, '>'), (0, _replaceSubstitutionTransformer2.default)(/"/g, '"'), (0, _replaceSubstitutionTransformer2.default)(/'/g, '''), (0, _replaceSubstitutionTransformer2.default)(/`/g, '`'));
|
11733 |
|
11734 | exports.default = safeHtml;
|
11735 | module.exports = exports['default'];
|
11736 |
|
11737 |
|
11738 | }),
|
11739 |
|
11740 | (function(module, exports, __webpack_require__) {
|
11741 |
|
11742 | "use strict";
|
11743 |
|
11744 |
|
11745 | Object.defineProperty(exports, "__esModule", {
|
11746 | value: true
|
11747 | });
|
11748 | exports.default = undefined;
|
11749 |
|
11750 | var _oneLine = __webpack_require__(34);
|
11751 |
|
11752 | var _oneLine2 = _interopRequireDefault(_oneLine);
|
11753 |
|
11754 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11755 |
|
11756 | exports.default = _oneLine2.default;
|
11757 | module.exports = exports['default'];
|
11758 |
|
11759 |
|
11760 | }),
|
11761 |
|
11762 | (function(module, exports, __webpack_require__) {
|
11763 |
|
11764 | "use strict";
|
11765 |
|
11766 |
|
11767 | Object.defineProperty(exports, "__esModule", {
|
11768 | value: true
|
11769 | });
|
11770 |
|
11771 | var _TemplateTag = __webpack_require__(0);
|
11772 |
|
11773 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
11774 |
|
11775 | var _trimResultTransformer = __webpack_require__(1);
|
11776 |
|
11777 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
11778 |
|
11779 | var _replaceResultTransformer = __webpack_require__(4);
|
11780 |
|
11781 | var _replaceResultTransformer2 = _interopRequireDefault(_replaceResultTransformer);
|
11782 |
|
11783 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11784 |
|
11785 | var oneLine = new _TemplateTag2.default((0, _replaceResultTransformer2.default)(/(?:\n(?:\s*))+/g, ' '), _trimResultTransformer2.default);
|
11786 |
|
11787 | exports.default = oneLine;
|
11788 | module.exports = exports['default'];
|
11789 |
|
11790 |
|
11791 | }),
|
11792 |
|
11793 | (function(module, exports, __webpack_require__) {
|
11794 |
|
11795 | "use strict";
|
11796 |
|
11797 |
|
11798 | Object.defineProperty(exports, "__esModule", {
|
11799 | value: true
|
11800 | });
|
11801 | exports.default = undefined;
|
11802 |
|
11803 | var _oneLineTrim = __webpack_require__(36);
|
11804 |
|
11805 | var _oneLineTrim2 = _interopRequireDefault(_oneLineTrim);
|
11806 |
|
11807 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11808 |
|
11809 | exports.default = _oneLineTrim2.default;
|
11810 | module.exports = exports['default'];
|
11811 |
|
11812 |
|
11813 | }),
|
11814 |
|
11815 | (function(module, exports, __webpack_require__) {
|
11816 |
|
11817 | "use strict";
|
11818 |
|
11819 |
|
11820 | Object.defineProperty(exports, "__esModule", {
|
11821 | value: true
|
11822 | });
|
11823 |
|
11824 | var _TemplateTag = __webpack_require__(0);
|
11825 |
|
11826 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
11827 |
|
11828 | var _trimResultTransformer = __webpack_require__(1);
|
11829 |
|
11830 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
11831 |
|
11832 | var _replaceResultTransformer = __webpack_require__(4);
|
11833 |
|
11834 | var _replaceResultTransformer2 = _interopRequireDefault(_replaceResultTransformer);
|
11835 |
|
11836 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11837 |
|
11838 | var oneLineTrim = new _TemplateTag2.default((0, _replaceResultTransformer2.default)(/(?:\n\s*)/g, ''), _trimResultTransformer2.default);
|
11839 |
|
11840 | exports.default = oneLineTrim;
|
11841 | module.exports = exports['default'];
|
11842 |
|
11843 |
|
11844 | }),
|
11845 |
|
11846 | (function(module, exports, __webpack_require__) {
|
11847 |
|
11848 | "use strict";
|
11849 |
|
11850 |
|
11851 | Object.defineProperty(exports, "__esModule", {
|
11852 | value: true
|
11853 | });
|
11854 | exports.default = undefined;
|
11855 |
|
11856 | var _oneLineCommaLists = __webpack_require__(38);
|
11857 |
|
11858 | var _oneLineCommaLists2 = _interopRequireDefault(_oneLineCommaLists);
|
11859 |
|
11860 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11861 |
|
11862 | exports.default = _oneLineCommaLists2.default;
|
11863 | module.exports = exports['default'];
|
11864 |
|
11865 |
|
11866 | }),
|
11867 |
|
11868 | (function(module, exports, __webpack_require__) {
|
11869 |
|
11870 | "use strict";
|
11871 |
|
11872 |
|
11873 | Object.defineProperty(exports, "__esModule", {
|
11874 | value: true
|
11875 | });
|
11876 |
|
11877 | var _TemplateTag = __webpack_require__(0);
|
11878 |
|
11879 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
11880 |
|
11881 | var _inlineArrayTransformer = __webpack_require__(2);
|
11882 |
|
11883 | var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer);
|
11884 |
|
11885 | var _trimResultTransformer = __webpack_require__(1);
|
11886 |
|
11887 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
11888 |
|
11889 | var _replaceResultTransformer = __webpack_require__(4);
|
11890 |
|
11891 | var _replaceResultTransformer2 = _interopRequireDefault(_replaceResultTransformer);
|
11892 |
|
11893 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11894 |
|
11895 | var oneLineCommaLists = new _TemplateTag2.default((0, _inlineArrayTransformer2.default)({ separator: ',' }), (0, _replaceResultTransformer2.default)(/(?:\s+)/g, ' '), _trimResultTransformer2.default);
|
11896 |
|
11897 | exports.default = oneLineCommaLists;
|
11898 | module.exports = exports['default'];
|
11899 |
|
11900 |
|
11901 | }),
|
11902 |
|
11903 | (function(module, exports, __webpack_require__) {
|
11904 |
|
11905 | "use strict";
|
11906 |
|
11907 |
|
11908 | Object.defineProperty(exports, "__esModule", {
|
11909 | value: true
|
11910 | });
|
11911 | exports.default = undefined;
|
11912 |
|
11913 | var _oneLineCommaListsOr = __webpack_require__(40);
|
11914 |
|
11915 | var _oneLineCommaListsOr2 = _interopRequireDefault(_oneLineCommaListsOr);
|
11916 |
|
11917 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11918 |
|
11919 | exports.default = _oneLineCommaListsOr2.default;
|
11920 | module.exports = exports['default'];
|
11921 |
|
11922 |
|
11923 | }),
|
11924 |
|
11925 | (function(module, exports, __webpack_require__) {
|
11926 |
|
11927 | "use strict";
|
11928 |
|
11929 |
|
11930 | Object.defineProperty(exports, "__esModule", {
|
11931 | value: true
|
11932 | });
|
11933 |
|
11934 | var _TemplateTag = __webpack_require__(0);
|
11935 |
|
11936 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
11937 |
|
11938 | var _inlineArrayTransformer = __webpack_require__(2);
|
11939 |
|
11940 | var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer);
|
11941 |
|
11942 | var _trimResultTransformer = __webpack_require__(1);
|
11943 |
|
11944 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
11945 |
|
11946 | var _replaceResultTransformer = __webpack_require__(4);
|
11947 |
|
11948 | var _replaceResultTransformer2 = _interopRequireDefault(_replaceResultTransformer);
|
11949 |
|
11950 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11951 |
|
11952 | var oneLineCommaListsOr = new _TemplateTag2.default((0, _inlineArrayTransformer2.default)({ separator: ',', conjunction: 'or' }), (0, _replaceResultTransformer2.default)(/(?:\s+)/g, ' '), _trimResultTransformer2.default);
|
11953 |
|
11954 | exports.default = oneLineCommaListsOr;
|
11955 | module.exports = exports['default'];
|
11956 |
|
11957 |
|
11958 | }),
|
11959 |
|
11960 | (function(module, exports, __webpack_require__) {
|
11961 |
|
11962 | "use strict";
|
11963 |
|
11964 |
|
11965 | Object.defineProperty(exports, "__esModule", {
|
11966 | value: true
|
11967 | });
|
11968 | exports.default = undefined;
|
11969 |
|
11970 | var _oneLineCommaListsAnd = __webpack_require__(42);
|
11971 |
|
11972 | var _oneLineCommaListsAnd2 = _interopRequireDefault(_oneLineCommaListsAnd);
|
11973 |
|
11974 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11975 |
|
11976 | exports.default = _oneLineCommaListsAnd2.default;
|
11977 | module.exports = exports['default'];
|
11978 |
|
11979 |
|
11980 | }),
|
11981 |
|
11982 | (function(module, exports, __webpack_require__) {
|
11983 |
|
11984 | "use strict";
|
11985 |
|
11986 |
|
11987 | Object.defineProperty(exports, "__esModule", {
|
11988 | value: true
|
11989 | });
|
11990 |
|
11991 | var _TemplateTag = __webpack_require__(0);
|
11992 |
|
11993 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
11994 |
|
11995 | var _inlineArrayTransformer = __webpack_require__(2);
|
11996 |
|
11997 | var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer);
|
11998 |
|
11999 | var _trimResultTransformer = __webpack_require__(1);
|
12000 |
|
12001 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
12002 |
|
12003 | var _replaceResultTransformer = __webpack_require__(4);
|
12004 |
|
12005 | var _replaceResultTransformer2 = _interopRequireDefault(_replaceResultTransformer);
|
12006 |
|
12007 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12008 |
|
12009 | var oneLineCommaListsAnd = new _TemplateTag2.default((0, _inlineArrayTransformer2.default)({ separator: ',', conjunction: 'and' }), (0, _replaceResultTransformer2.default)(/(?:\s+)/g, ' '), _trimResultTransformer2.default);
|
12010 |
|
12011 | exports.default = oneLineCommaListsAnd;
|
12012 | module.exports = exports['default'];
|
12013 |
|
12014 |
|
12015 | }),
|
12016 |
|
12017 | (function(module, exports, __webpack_require__) {
|
12018 |
|
12019 | "use strict";
|
12020 |
|
12021 |
|
12022 | Object.defineProperty(exports, "__esModule", {
|
12023 | value: true
|
12024 | });
|
12025 | exports.default = undefined;
|
12026 |
|
12027 | var _inlineLists = __webpack_require__(44);
|
12028 |
|
12029 | var _inlineLists2 = _interopRequireDefault(_inlineLists);
|
12030 |
|
12031 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12032 |
|
12033 | exports.default = _inlineLists2.default;
|
12034 | module.exports = exports['default'];
|
12035 |
|
12036 |
|
12037 | }),
|
12038 |
|
12039 | (function(module, exports, __webpack_require__) {
|
12040 |
|
12041 | "use strict";
|
12042 |
|
12043 |
|
12044 | Object.defineProperty(exports, "__esModule", {
|
12045 | value: true
|
12046 | });
|
12047 |
|
12048 | var _TemplateTag = __webpack_require__(0);
|
12049 |
|
12050 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
12051 |
|
12052 | var _stripIndentTransformer = __webpack_require__(3);
|
12053 |
|
12054 | var _stripIndentTransformer2 = _interopRequireDefault(_stripIndentTransformer);
|
12055 |
|
12056 | var _inlineArrayTransformer = __webpack_require__(2);
|
12057 |
|
12058 | var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer);
|
12059 |
|
12060 | var _trimResultTransformer = __webpack_require__(1);
|
12061 |
|
12062 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
12063 |
|
12064 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12065 |
|
12066 | var inlineLists = new _TemplateTag2.default(_inlineArrayTransformer2.default, _stripIndentTransformer2.default, _trimResultTransformer2.default);
|
12067 |
|
12068 | exports.default = inlineLists;
|
12069 | module.exports = exports['default'];
|
12070 |
|
12071 |
|
12072 | }),
|
12073 |
|
12074 | (function(module, exports, __webpack_require__) {
|
12075 |
|
12076 | "use strict";
|
12077 |
|
12078 |
|
12079 | Object.defineProperty(exports, "__esModule", {
|
12080 | value: true
|
12081 | });
|
12082 | exports.default = undefined;
|
12083 |
|
12084 | var _oneLineInlineLists = __webpack_require__(46);
|
12085 |
|
12086 | var _oneLineInlineLists2 = _interopRequireDefault(_oneLineInlineLists);
|
12087 |
|
12088 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12089 |
|
12090 | exports.default = _oneLineInlineLists2.default;
|
12091 | module.exports = exports['default'];
|
12092 |
|
12093 |
|
12094 | }),
|
12095 |
|
12096 | (function(module, exports, __webpack_require__) {
|
12097 |
|
12098 | "use strict";
|
12099 |
|
12100 |
|
12101 | Object.defineProperty(exports, "__esModule", {
|
12102 | value: true
|
12103 | });
|
12104 |
|
12105 | var _TemplateTag = __webpack_require__(0);
|
12106 |
|
12107 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
12108 |
|
12109 | var _inlineArrayTransformer = __webpack_require__(2);
|
12110 |
|
12111 | var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer);
|
12112 |
|
12113 | var _trimResultTransformer = __webpack_require__(1);
|
12114 |
|
12115 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
12116 |
|
12117 | var _replaceResultTransformer = __webpack_require__(4);
|
12118 |
|
12119 | var _replaceResultTransformer2 = _interopRequireDefault(_replaceResultTransformer);
|
12120 |
|
12121 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12122 |
|
12123 | var oneLineInlineLists = new _TemplateTag2.default(_inlineArrayTransformer2.default, (0, _replaceResultTransformer2.default)(/(?:\s+)/g, ' '), _trimResultTransformer2.default);
|
12124 |
|
12125 | exports.default = oneLineInlineLists;
|
12126 | module.exports = exports['default'];
|
12127 |
|
12128 |
|
12129 | }),
|
12130 |
|
12131 | (function(module, exports, __webpack_require__) {
|
12132 |
|
12133 | "use strict";
|
12134 |
|
12135 |
|
12136 | Object.defineProperty(exports, "__esModule", {
|
12137 | value: true
|
12138 | });
|
12139 | exports.default = undefined;
|
12140 |
|
12141 | var _stripIndent = __webpack_require__(48);
|
12142 |
|
12143 | var _stripIndent2 = _interopRequireDefault(_stripIndent);
|
12144 |
|
12145 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12146 |
|
12147 | exports.default = _stripIndent2.default;
|
12148 | module.exports = exports['default'];
|
12149 |
|
12150 |
|
12151 | }),
|
12152 |
|
12153 | (function(module, exports, __webpack_require__) {
|
12154 |
|
12155 | "use strict";
|
12156 |
|
12157 |
|
12158 | Object.defineProperty(exports, "__esModule", {
|
12159 | value: true
|
12160 | });
|
12161 |
|
12162 | var _TemplateTag = __webpack_require__(0);
|
12163 |
|
12164 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
12165 |
|
12166 | var _stripIndentTransformer = __webpack_require__(3);
|
12167 |
|
12168 | var _stripIndentTransformer2 = _interopRequireDefault(_stripIndentTransformer);
|
12169 |
|
12170 | var _trimResultTransformer = __webpack_require__(1);
|
12171 |
|
12172 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
12173 |
|
12174 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12175 |
|
12176 | var stripIndent = new _TemplateTag2.default(_stripIndentTransformer2.default, _trimResultTransformer2.default);
|
12177 |
|
12178 | exports.default = stripIndent;
|
12179 | module.exports = exports['default'];
|
12180 |
|
12181 |
|
12182 | }),
|
12183 |
|
12184 | (function(module, exports, __webpack_require__) {
|
12185 |
|
12186 | "use strict";
|
12187 |
|
12188 |
|
12189 | Object.defineProperty(exports, "__esModule", {
|
12190 | value: true
|
12191 | });
|
12192 | exports.default = undefined;
|
12193 |
|
12194 | var _stripIndents = __webpack_require__(50);
|
12195 |
|
12196 | var _stripIndents2 = _interopRequireDefault(_stripIndents);
|
12197 |
|
12198 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12199 |
|
12200 | exports.default = _stripIndents2.default;
|
12201 | module.exports = exports['default'];
|
12202 |
|
12203 |
|
12204 | }),
|
12205 |
|
12206 | (function(module, exports, __webpack_require__) {
|
12207 |
|
12208 | "use strict";
|
12209 |
|
12210 |
|
12211 | Object.defineProperty(exports, "__esModule", {
|
12212 | value: true
|
12213 | });
|
12214 |
|
12215 | var _TemplateTag = __webpack_require__(0);
|
12216 |
|
12217 | var _TemplateTag2 = _interopRequireDefault(_TemplateTag);
|
12218 |
|
12219 | var _stripIndentTransformer = __webpack_require__(3);
|
12220 |
|
12221 | var _stripIndentTransformer2 = _interopRequireDefault(_stripIndentTransformer);
|
12222 |
|
12223 | var _trimResultTransformer = __webpack_require__(1);
|
12224 |
|
12225 | var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer);
|
12226 |
|
12227 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12228 |
|
12229 | var stripIndents = new _TemplateTag2.default((0, _stripIndentTransformer2.default)('all'), _trimResultTransformer2.default);
|
12230 |
|
12231 | exports.default = stripIndents;
|
12232 | module.exports = exports['default'];
|
12233 |
|
12234 |
|
12235 | })
|
12236 | ])));
|
12237 |
|
12238 |
|
12239 | }),
|
12240 |
|
12241 | (function(module, exports) {
|
12242 |
|
12243 | module.exports = __webpack_require__(6);
|
12244 |
|
12245 | }),
|
12246 |
|
12247 | (function(module, exports) {
|
12248 |
|
12249 | module.exports = "{{{ toComment description }}}\n{{#if @root.config.enumsAsTypes }}\nexport type {{@root.config.interfacePrefix}}{{ convert name }} = {{#each values }}{{{ getEnumValue ../name value }}}{{#unless @last}} | {{/unless}}{{/each}};\n{{else}}\nexport {{#if @root.config.constEnums }}const {{/if}}enum {{@root.config.interfacePrefix}}{{ convert name }} {\n{{#each values }}\n {{ convert value }} = {{{ getEnumValue ../name value }}},\n{{/each}}\n}\n{{/if}}\n"
|
12250 |
|
12251 | }),
|
12252 |
|
12253 | (function(module, exports) {
|
12254 |
|
12255 | module.exports = "{{ toComment description }}\nexport interface {{@root.config.interfacePrefix}}{{ convert name }}{{#if hasInterfaces}} extends {{#each interfaces}}{{@root.config.interfacePrefix}}{{ convert this }}{{#unless @last}},{{/unless}}{{/each}}{{/if}} {\n{{#each fields}}\n {{ toComment description }}\n {{#if @root.config.immutableTypes }}readonly {{/if}}{{ name }}{{ getOptionals this }}: {{ convertedType this }};\n{{/each}}\n}\n"
|
12256 |
|
12257 | }),
|
12258 |
|
12259 | (function(module, exports) {
|
12260 |
|
12261 | module.exports = "{{{ defineMaybe }}}\n\n{{#each inputTypes}}\n {{~> type }}\n{{/each}}\n{{#each enums}}\n {{~> enum }}\n{{/each}}\n{{#each scalars}}\n\n{{ toComment description }}\n{{#ifCond (convert name) \"!==\" (getScalarType name) }}export type {{ convert name }} = {{ getScalarType name }};{{/ifCond}}\n{{/each}}"
|
12262 |
|
12263 | }),
|
12264 |
|
12265 | (function(module, exports, __webpack_require__) {
|
12266 |
|
12267 | exports.no = exports.noCase = __webpack_require__(0)
|
12268 | exports.dot = exports.dotCase = __webpack_require__(19)
|
12269 | exports.swap = exports.swapCase = __webpack_require__(20)
|
12270 | exports.path = exports.pathCase = __webpack_require__(21)
|
12271 | exports.upper = exports.upperCase = __webpack_require__(1)
|
12272 | exports.lower = exports.lowerCase = __webpack_require__(2)
|
12273 | exports.camel = exports.camelCase = __webpack_require__(5)
|
12274 | exports.snake = exports.snakeCase = __webpack_require__(6)
|
12275 | exports.title = exports.titleCase = __webpack_require__(22)
|
12276 | exports.param = exports.paramCase = __webpack_require__(23)
|
12277 | exports.header = exports.headerCase = __webpack_require__(24)
|
12278 | exports.pascal = exports.pascalCase = __webpack_require__(25)
|
12279 | exports.constant = exports.constantCase = __webpack_require__(26)
|
12280 | exports.sentence = exports.sentenceCase = __webpack_require__(27)
|
12281 | exports.isUpper = exports.isUpperCase = __webpack_require__(28)
|
12282 | exports.isLower = exports.isLowerCase = __webpack_require__(29)
|
12283 | exports.ucFirst = exports.upperCaseFirst = __webpack_require__(3)
|
12284 | exports.lcFirst = exports.lowerCaseFirst = __webpack_require__(30)
|
12285 |
|
12286 |
|
12287 | }),
|
12288 |
|
12289 | (function(module, exports) {
|
12290 |
|
12291 | module.exports = /[^A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]+/g
|
12292 |
|
12293 |
|
12294 | }),
|
12295 |
|
12296 | (function(module, exports) {
|
12297 |
|
12298 | module.exports = /([a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A])/g
|
12299 |
|
12300 |
|
12301 | }),
|
12302 |
|
12303 | (function(module, exports) {
|
12304 |
|
12305 | module.exports = /([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A])([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A][a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A])/g
|
12306 |
|
12307 |
|
12308 | }),
|
12309 |
|
12310 | (function(module, exports, __webpack_require__) {
|
12311 |
|
12312 | var noCase = __webpack_require__(0)
|
12313 |
|
12314 |
|
12315 |
|
12316 |
|
12317 |
|
12318 |
|
12319 |
|
12320 |
|
12321 | module.exports = function (value, locale) {
|
12322 | return noCase(value, locale, '.')
|
12323 | }
|
12324 |
|
12325 |
|
12326 | }),
|
12327 |
|
12328 | (function(module, exports, __webpack_require__) {
|
12329 |
|
12330 | var upperCase = __webpack_require__(1)
|
12331 | var lowerCase = __webpack_require__(2)
|
12332 |
|
12333 |
|
12334 |
|
12335 |
|
12336 |
|
12337 |
|
12338 |
|
12339 |
|
12340 |
|
12341 | module.exports = function (str, locale) {
|
12342 | if (str == null) {
|
12343 | return ''
|
12344 | }
|
12345 |
|
12346 | var result = ''
|
12347 |
|
12348 | for (var i = 0; i < str.length; i++) {
|
12349 | var c = str[i]
|
12350 | var u = upperCase(c, locale)
|
12351 |
|
12352 | result += u === c ? lowerCase(c, locale) : u
|
12353 | }
|
12354 |
|
12355 | return result
|
12356 | }
|
12357 |
|
12358 |
|
12359 | }),
|
12360 |
|
12361 | (function(module, exports, __webpack_require__) {
|
12362 |
|
12363 | var noCase = __webpack_require__(0)
|
12364 |
|
12365 |
|
12366 |
|
12367 |
|
12368 |
|
12369 |
|
12370 |
|
12371 |
|
12372 | module.exports = function (value, locale) {
|
12373 | return noCase(value, locale, '/')
|
12374 | }
|
12375 |
|
12376 |
|
12377 | }),
|
12378 |
|
12379 | (function(module, exports, __webpack_require__) {
|
12380 |
|
12381 | var noCase = __webpack_require__(0)
|
12382 | var upperCase = __webpack_require__(1)
|
12383 |
|
12384 |
|
12385 |
|
12386 |
|
12387 |
|
12388 |
|
12389 |
|
12390 |
|
12391 | module.exports = function (value, locale) {
|
12392 | return noCase(value, locale).replace(/^.| ./g, function (m) {
|
12393 | return upperCase(m, locale)
|
12394 | })
|
12395 | }
|
12396 |
|
12397 |
|
12398 | }),
|
12399 |
|
12400 | (function(module, exports, __webpack_require__) {
|
12401 |
|
12402 | var noCase = __webpack_require__(0)
|
12403 |
|
12404 |
|
12405 |
|
12406 |
|
12407 |
|
12408 |
|
12409 |
|
12410 |
|
12411 | module.exports = function (value, locale) {
|
12412 | return noCase(value, locale, '-')
|
12413 | }
|
12414 |
|
12415 |
|
12416 | }),
|
12417 |
|
12418 | (function(module, exports, __webpack_require__) {
|
12419 |
|
12420 | var noCase = __webpack_require__(0)
|
12421 | var upperCase = __webpack_require__(1)
|
12422 |
|
12423 |
|
12424 |
|
12425 |
|
12426 |
|
12427 |
|
12428 |
|
12429 |
|
12430 | module.exports = function (value, locale) {
|
12431 | return noCase(value, locale, '-').replace(/^.|-./g, function (m) {
|
12432 | return upperCase(m, locale)
|
12433 | })
|
12434 | }
|
12435 |
|
12436 |
|
12437 | }),
|
12438 |
|
12439 | (function(module, exports, __webpack_require__) {
|
12440 |
|
12441 | var camelCase = __webpack_require__(5)
|
12442 | var upperCaseFirst = __webpack_require__(3)
|
12443 |
|
12444 |
|
12445 |
|
12446 |
|
12447 |
|
12448 |
|
12449 |
|
12450 |
|
12451 |
|
12452 | module.exports = function (value, locale, mergeNumbers) {
|
12453 | return upperCaseFirst(camelCase(value, locale, mergeNumbers), locale)
|
12454 | }
|
12455 |
|
12456 |
|
12457 | }),
|
12458 |
|
12459 | (function(module, exports, __webpack_require__) {
|
12460 |
|
12461 | var upperCase = __webpack_require__(1)
|
12462 | var snakeCase = __webpack_require__(6)
|
12463 |
|
12464 |
|
12465 |
|
12466 |
|
12467 |
|
12468 |
|
12469 |
|
12470 |
|
12471 | module.exports = function (value, locale) {
|
12472 | return upperCase(snakeCase(value, locale), locale)
|
12473 | }
|
12474 |
|
12475 |
|
12476 | }),
|
12477 |
|
12478 | (function(module, exports, __webpack_require__) {
|
12479 |
|
12480 | var noCase = __webpack_require__(0)
|
12481 | var upperCaseFirst = __webpack_require__(3)
|
12482 |
|
12483 |
|
12484 |
|
12485 |
|
12486 |
|
12487 |
|
12488 |
|
12489 |
|
12490 | module.exports = function (value, locale) {
|
12491 | return upperCaseFirst(noCase(value, locale), locale)
|
12492 | }
|
12493 |
|
12494 |
|
12495 | }),
|
12496 |
|
12497 | (function(module, exports, __webpack_require__) {
|
12498 |
|
12499 | var upperCase = __webpack_require__(1)
|
12500 |
|
12501 |
|
12502 |
|
12503 |
|
12504 |
|
12505 |
|
12506 |
|
12507 |
|
12508 | module.exports = function (string, locale) {
|
12509 | return upperCase(string, locale) === string
|
12510 | }
|
12511 |
|
12512 |
|
12513 | }),
|
12514 |
|
12515 | (function(module, exports, __webpack_require__) {
|
12516 |
|
12517 | var lowerCase = __webpack_require__(2)
|
12518 |
|
12519 |
|
12520 |
|
12521 |
|
12522 |
|
12523 |
|
12524 |
|
12525 |
|
12526 | module.exports = function (string, locale) {
|
12527 | return lowerCase(string, locale) === string
|
12528 | }
|
12529 |
|
12530 |
|
12531 | }),
|
12532 |
|
12533 | (function(module, exports, __webpack_require__) {
|
12534 |
|
12535 | var lowerCase = __webpack_require__(2)
|
12536 |
|
12537 |
|
12538 |
|
12539 |
|
12540 |
|
12541 |
|
12542 |
|
12543 | module.exports = function (str, locale) {
|
12544 | if (str == null) {
|
12545 | return ''
|
12546 | }
|
12547 |
|
12548 | str = String(str)
|
12549 |
|
12550 | return lowerCase(str.charAt(0), locale) + str.substr(1)
|
12551 | }
|
12552 |
|
12553 |
|
12554 | })
|
12555 | ])));
|
12556 |
|
12557 |
|
12558 | }),
|
12559 |
|
12560 | (function(module, exports, __webpack_require__) {
|
12561 |
|
12562 |
|
12563 |
|
12564 |
|
12565 |
|
12566 |
|
12567 |
|
12568 |
|
12569 |
|
12570 |
|
12571 |
|
12572 |
|
12573 |
|
12574 |
|
12575 |
|
12576 |
|
12577 |
|
12578 |
|
12579 |
|
12580 |
|
12581 |
|
12582 |
|
12583 |
|
12584 |
|
12585 |
|
12586 |
|
12587 |
|
12588 | (function webpackUniversalModuleDefinition(root, factory) {
|
12589 | if(true)
|
12590 | module.exports = factory();
|
12591 | else {}
|
12592 | })(this, function() {
|
12593 | return (function(modules) {
|
12594 |
|
12595 | var installedModules = {};
|
12596 |
|
12597 |
|
12598 | function __webpack_require__(moduleId) {
|
12599 |
|
12600 |
|
12601 | if(installedModules[moduleId])
|
12602 | return installedModules[moduleId].exports;
|
12603 |
|
12604 |
|
12605 | var module = installedModules[moduleId] = {
|
12606 | exports: {},
|
12607 | id: moduleId,
|
12608 | loaded: false
|
12609 | };
|
12610 |
|
12611 |
|
12612 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
12613 |
|
12614 |
|
12615 | module.loaded = true;
|
12616 |
|
12617 |
|
12618 | return module.exports;
|
12619 | }
|
12620 |
|
12621 |
|
12622 |
|
12623 | __webpack_require__.m = modules;
|
12624 |
|
12625 |
|
12626 | __webpack_require__.c = installedModules;
|
12627 |
|
12628 |
|
12629 | __webpack_require__.p = "";
|
12630 |
|
12631 |
|
12632 | return __webpack_require__(0);
|
12633 | })
|
12634 |
|
12635 | ([
|
12636 |
|
12637 | (function(module, exports, __webpack_require__) {
|
12638 |
|
12639 | 'use strict';
|
12640 |
|
12641 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
12642 |
|
12643 | exports.__esModule = true;
|
12644 |
|
12645 | var _handlebarsRuntime = __webpack_require__(2);
|
12646 |
|
12647 | var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
|
12648 |
|
12649 |
|
12650 |
|
12651 | var _handlebarsCompilerAst = __webpack_require__(35);
|
12652 |
|
12653 | var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
|
12654 |
|
12655 | var _handlebarsCompilerBase = __webpack_require__(36);
|
12656 |
|
12657 | var _handlebarsCompilerCompiler = __webpack_require__(41);
|
12658 |
|
12659 | var _handlebarsCompilerJavascriptCompiler = __webpack_require__(42);
|
12660 |
|
12661 | var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
|
12662 |
|
12663 | var _handlebarsCompilerVisitor = __webpack_require__(39);
|
12664 |
|
12665 | var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
|
12666 |
|
12667 | var _handlebarsNoConflict = __webpack_require__(34);
|
12668 |
|
12669 | var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
12670 |
|
12671 | var _create = _handlebarsRuntime2['default'].create;
|
12672 | function create() {
|
12673 | var hb = _create();
|
12674 |
|
12675 | hb.compile = function (input, options) {
|
12676 | return _handlebarsCompilerCompiler.compile(input, options, hb);
|
12677 | };
|
12678 | hb.precompile = function (input, options) {
|
12679 | return _handlebarsCompilerCompiler.precompile(input, options, hb);
|
12680 | };
|
12681 |
|
12682 | hb.AST = _handlebarsCompilerAst2['default'];
|
12683 | hb.Compiler = _handlebarsCompilerCompiler.Compiler;
|
12684 | hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default'];
|
12685 | hb.Parser = _handlebarsCompilerBase.parser;
|
12686 | hb.parse = _handlebarsCompilerBase.parse;
|
12687 |
|
12688 | return hb;
|
12689 | }
|
12690 |
|
12691 | var inst = create();
|
12692 | inst.create = create;
|
12693 |
|
12694 | _handlebarsNoConflict2['default'](inst);
|
12695 |
|
12696 | inst.Visitor = _handlebarsCompilerVisitor2['default'];
|
12697 |
|
12698 | inst['default'] = inst;
|
12699 |
|
12700 | exports['default'] = inst;
|
12701 | module.exports = exports['default'];
|
12702 |
|
12703 | }),
|
12704 |
|
12705 | (function(module, exports) {
|
12706 |
|
12707 | "use strict";
|
12708 |
|
12709 | exports["default"] = function (obj) {
|
12710 | return obj && obj.__esModule ? obj : {
|
12711 | "default": obj
|
12712 | };
|
12713 | };
|
12714 |
|
12715 | exports.__esModule = true;
|
12716 |
|
12717 | }),
|
12718 |
|
12719 | (function(module, exports, __webpack_require__) {
|
12720 |
|
12721 | 'use strict';
|
12722 |
|
12723 | var _interopRequireWildcard = __webpack_require__(3)['default'];
|
12724 |
|
12725 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
12726 |
|
12727 | exports.__esModule = true;
|
12728 |
|
12729 | var _handlebarsBase = __webpack_require__(4);
|
12730 |
|
12731 | var base = _interopRequireWildcard(_handlebarsBase);
|
12732 |
|
12733 |
|
12734 |
|
12735 |
|
12736 | var _handlebarsSafeString = __webpack_require__(21);
|
12737 |
|
12738 | var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
|
12739 |
|
12740 | var _handlebarsException = __webpack_require__(6);
|
12741 |
|
12742 | var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
|
12743 |
|
12744 | var _handlebarsUtils = __webpack_require__(5);
|
12745 |
|
12746 | var Utils = _interopRequireWildcard(_handlebarsUtils);
|
12747 |
|
12748 | var _handlebarsRuntime = __webpack_require__(22);
|
12749 |
|
12750 | var runtime = _interopRequireWildcard(_handlebarsRuntime);
|
12751 |
|
12752 | var _handlebarsNoConflict = __webpack_require__(34);
|
12753 |
|
12754 | var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
12755 |
|
12756 |
|
12757 | function create() {
|
12758 | var hb = new base.HandlebarsEnvironment();
|
12759 |
|
12760 | Utils.extend(hb, base);
|
12761 | hb.SafeString = _handlebarsSafeString2['default'];
|
12762 | hb.Exception = _handlebarsException2['default'];
|
12763 | hb.Utils = Utils;
|
12764 | hb.escapeExpression = Utils.escapeExpression;
|
12765 |
|
12766 | hb.VM = runtime;
|
12767 | hb.template = function (spec) {
|
12768 | return runtime.template(spec, hb);
|
12769 | };
|
12770 |
|
12771 | return hb;
|
12772 | }
|
12773 |
|
12774 | var inst = create();
|
12775 | inst.create = create;
|
12776 |
|
12777 | _handlebarsNoConflict2['default'](inst);
|
12778 |
|
12779 | inst['default'] = inst;
|
12780 |
|
12781 | exports['default'] = inst;
|
12782 | module.exports = exports['default'];
|
12783 |
|
12784 | }),
|
12785 |
|
12786 | (function(module, exports) {
|
12787 |
|
12788 | "use strict";
|
12789 |
|
12790 | exports["default"] = function (obj) {
|
12791 | if (obj && obj.__esModule) {
|
12792 | return obj;
|
12793 | } else {
|
12794 | var newObj = {};
|
12795 |
|
12796 | if (obj != null) {
|
12797 | for (var key in obj) {
|
12798 | if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
|
12799 | }
|
12800 | }
|
12801 |
|
12802 | newObj["default"] = obj;
|
12803 | return newObj;
|
12804 | }
|
12805 | };
|
12806 |
|
12807 | exports.__esModule = true;
|
12808 |
|
12809 | }),
|
12810 |
|
12811 | (function(module, exports, __webpack_require__) {
|
12812 |
|
12813 | 'use strict';
|
12814 |
|
12815 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
12816 |
|
12817 | exports.__esModule = true;
|
12818 | exports.HandlebarsEnvironment = HandlebarsEnvironment;
|
12819 |
|
12820 | var _utils = __webpack_require__(5);
|
12821 |
|
12822 | var _exception = __webpack_require__(6);
|
12823 |
|
12824 | var _exception2 = _interopRequireDefault(_exception);
|
12825 |
|
12826 | var _helpers = __webpack_require__(10);
|
12827 |
|
12828 | var _decorators = __webpack_require__(18);
|
12829 |
|
12830 | var _logger = __webpack_require__(20);
|
12831 |
|
12832 | var _logger2 = _interopRequireDefault(_logger);
|
12833 |
|
12834 | var VERSION = '4.0.12';
|
12835 | exports.VERSION = VERSION;
|
12836 | var COMPILER_REVISION = 7;
|
12837 |
|
12838 | exports.COMPILER_REVISION = COMPILER_REVISION;
|
12839 | var REVISION_CHANGES = {
|
12840 | 1: '<= 1.0.rc.2',
|
12841 | 2: '== 1.0.0-rc.3',
|
12842 | 3: '== 1.0.0-rc.4',
|
12843 | 4: '== 1.x.x',
|
12844 | 5: '== 2.0.0-alpha.x',
|
12845 | 6: '>= 2.0.0-beta.1',
|
12846 | 7: '>= 4.0.0'
|
12847 | };
|
12848 |
|
12849 | exports.REVISION_CHANGES = REVISION_CHANGES;
|
12850 | var objectType = '[object Object]';
|
12851 |
|
12852 | function HandlebarsEnvironment(helpers, partials, decorators) {
|
12853 | this.helpers = helpers || {};
|
12854 | this.partials = partials || {};
|
12855 | this.decorators = decorators || {};
|
12856 |
|
12857 | _helpers.registerDefaultHelpers(this);
|
12858 | _decorators.registerDefaultDecorators(this);
|
12859 | }
|
12860 |
|
12861 | HandlebarsEnvironment.prototype = {
|
12862 | constructor: HandlebarsEnvironment,
|
12863 |
|
12864 | logger: _logger2['default'],
|
12865 | log: _logger2['default'].log,
|
12866 |
|
12867 | registerHelper: function registerHelper(name, fn) {
|
12868 | if (_utils.toString.call(name) === objectType) {
|
12869 | if (fn) {
|
12870 | throw new _exception2['default']('Arg not supported with multiple helpers');
|
12871 | }
|
12872 | _utils.extend(this.helpers, name);
|
12873 | } else {
|
12874 | this.helpers[name] = fn;
|
12875 | }
|
12876 | },
|
12877 | unregisterHelper: function unregisterHelper(name) {
|
12878 | delete this.helpers[name];
|
12879 | },
|
12880 |
|
12881 | registerPartial: function registerPartial(name, partial) {
|
12882 | if (_utils.toString.call(name) === objectType) {
|
12883 | _utils.extend(this.partials, name);
|
12884 | } else {
|
12885 | if (typeof partial === 'undefined') {
|
12886 | throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
|
12887 | }
|
12888 | this.partials[name] = partial;
|
12889 | }
|
12890 | },
|
12891 | unregisterPartial: function unregisterPartial(name) {
|
12892 | delete this.partials[name];
|
12893 | },
|
12894 |
|
12895 | registerDecorator: function registerDecorator(name, fn) {
|
12896 | if (_utils.toString.call(name) === objectType) {
|
12897 | if (fn) {
|
12898 | throw new _exception2['default']('Arg not supported with multiple decorators');
|
12899 | }
|
12900 | _utils.extend(this.decorators, name);
|
12901 | } else {
|
12902 | this.decorators[name] = fn;
|
12903 | }
|
12904 | },
|
12905 | unregisterDecorator: function unregisterDecorator(name) {
|
12906 | delete this.decorators[name];
|
12907 | }
|
12908 | };
|
12909 |
|
12910 | var log = _logger2['default'].log;
|
12911 |
|
12912 | exports.log = log;
|
12913 | exports.createFrame = _utils.createFrame;
|
12914 | exports.logger = _logger2['default'];
|
12915 |
|
12916 | }),
|
12917 |
|
12918 | (function(module, exports) {
|
12919 |
|
12920 | 'use strict';
|
12921 |
|
12922 | exports.__esModule = true;
|
12923 | exports.extend = extend;
|
12924 | exports.indexOf = indexOf;
|
12925 | exports.escapeExpression = escapeExpression;
|
12926 | exports.isEmpty = isEmpty;
|
12927 | exports.createFrame = createFrame;
|
12928 | exports.blockParams = blockParams;
|
12929 | exports.appendContextPath = appendContextPath;
|
12930 | var escape = {
|
12931 | '&': '&',
|
12932 | '<': '<',
|
12933 | '>': '>',
|
12934 | '"': '"',
|
12935 | "'": ''',
|
12936 | '`': '`',
|
12937 | '=': '='
|
12938 | };
|
12939 |
|
12940 | var badChars = /[&<>"'`=]/g,
|
12941 | possible = /[&<>"'`=]/;
|
12942 |
|
12943 | function escapeChar(chr) {
|
12944 | return escape[chr];
|
12945 | }
|
12946 |
|
12947 | function extend(obj /* , ...source */) {
|
12948 | for (var i = 1; i < arguments.length; i++) {
|
12949 | for (var key in arguments[i]) {
|
12950 | if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
|
12951 | obj[key] = arguments[i][key];
|
12952 | }
|
12953 | }
|
12954 | }
|
12955 |
|
12956 | return obj;
|
12957 | }
|
12958 |
|
12959 | var toString = Object.prototype.toString;
|
12960 |
|
12961 | exports.toString = toString;
|
12962 |
|
12963 |
|
12964 |
|
12965 | var isFunction = function isFunction(value) {
|
12966 | return typeof value === 'function';
|
12967 | };
|
12968 |
|
12969 |
|
12970 | if (isFunction(/x/)) {
|
12971 | exports.isFunction = isFunction = function (value) {
|
12972 | return typeof value === 'function' && toString.call(value) === '[object Function]';
|
12973 | };
|
12974 | }
|
12975 | exports.isFunction = isFunction;
|
12976 |
|
12977 |
|
12978 |
|
12979 |
|
12980 | var isArray = Array.isArray || function (value) {
|
12981 | return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
|
12982 | };
|
12983 |
|
12984 | exports.isArray = isArray;
|
12985 |
|
12986 |
|
12987 | function indexOf(array, value) {
|
12988 | for (var i = 0, len = array.length; i < len; i++) {
|
12989 | if (array[i] === value) {
|
12990 | return i;
|
12991 | }
|
12992 | }
|
12993 | return -1;
|
12994 | }
|
12995 |
|
12996 | function escapeExpression(string) {
|
12997 | if (typeof string !== 'string') {
|
12998 |
|
12999 | if (string && string.toHTML) {
|
13000 | return string.toHTML();
|
13001 | } else if (string == null) {
|
13002 | return '';
|
13003 | } else if (!string) {
|
13004 | return string + '';
|
13005 | }
|
13006 |
|
13007 |
|
13008 |
|
13009 |
|
13010 | string = '' + string;
|
13011 | }
|
13012 |
|
13013 | if (!possible.test(string)) {
|
13014 | return string;
|
13015 | }
|
13016 | return string.replace(badChars, escapeChar);
|
13017 | }
|
13018 |
|
13019 | function isEmpty(value) {
|
13020 | if (!value && value !== 0) {
|
13021 | return true;
|
13022 | } else if (isArray(value) && value.length === 0) {
|
13023 | return true;
|
13024 | } else {
|
13025 | return false;
|
13026 | }
|
13027 | }
|
13028 |
|
13029 | function createFrame(object) {
|
13030 | var frame = extend({}, object);
|
13031 | frame._parent = object;
|
13032 | return frame;
|
13033 | }
|
13034 |
|
13035 | function blockParams(params, ids) {
|
13036 | params.path = ids;
|
13037 | return params;
|
13038 | }
|
13039 |
|
13040 | function appendContextPath(contextPath, id) {
|
13041 | return (contextPath ? contextPath + '.' : '') + id;
|
13042 | }
|
13043 |
|
13044 | }),
|
13045 |
|
13046 | (function(module, exports, __webpack_require__) {
|
13047 |
|
13048 | 'use strict';
|
13049 |
|
13050 | var _Object$defineProperty = __webpack_require__(7)['default'];
|
13051 |
|
13052 | exports.__esModule = true;
|
13053 |
|
13054 | var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
13055 |
|
13056 | function Exception(message, node) {
|
13057 | var loc = node && node.loc,
|
13058 | line = undefined,
|
13059 | column = undefined;
|
13060 | if (loc) {
|
13061 | line = loc.start.line;
|
13062 | column = loc.start.column;
|
13063 |
|
13064 | message += ' - ' + line + ':' + column;
|
13065 | }
|
13066 |
|
13067 | var tmp = Error.prototype.constructor.call(this, message);
|
13068 |
|
13069 |
|
13070 | for (var idx = 0; idx < errorProps.length; idx++) {
|
13071 | this[errorProps[idx]] = tmp[errorProps[idx]];
|
13072 | }
|
13073 |
|
13074 |
|
13075 | if (Error.captureStackTrace) {
|
13076 | Error.captureStackTrace(this, Exception);
|
13077 | }
|
13078 |
|
13079 | try {
|
13080 | if (loc) {
|
13081 | this.lineNumber = line;
|
13082 |
|
13083 |
|
13084 |
|
13085 | if (_Object$defineProperty) {
|
13086 | Object.defineProperty(this, 'column', {
|
13087 | value: column,
|
13088 | enumerable: true
|
13089 | });
|
13090 | } else {
|
13091 | this.column = column;
|
13092 | }
|
13093 | }
|
13094 | } catch (nop) {
|
13095 |
|
13096 | }
|
13097 | }
|
13098 |
|
13099 | Exception.prototype = new Error();
|
13100 |
|
13101 | exports['default'] = Exception;
|
13102 | module.exports = exports['default'];
|
13103 |
|
13104 | }),
|
13105 |
|
13106 | (function(module, exports, __webpack_require__) {
|
13107 |
|
13108 | module.exports = { "default": __webpack_require__(8), __esModule: true };
|
13109 |
|
13110 | }),
|
13111 |
|
13112 | (function(module, exports, __webpack_require__) {
|
13113 |
|
13114 | var $ = __webpack_require__(9);
|
13115 | module.exports = function defineProperty(it, key, desc){
|
13116 | return $.setDesc(it, key, desc);
|
13117 | };
|
13118 |
|
13119 | }),
|
13120 |
|
13121 | (function(module, exports) {
|
13122 |
|
13123 | var $Object = Object;
|
13124 | module.exports = {
|
13125 | create: $Object.create,
|
13126 | getProto: $Object.getPrototypeOf,
|
13127 | isEnum: {}.propertyIsEnumerable,
|
13128 | getDesc: $Object.getOwnPropertyDescriptor,
|
13129 | setDesc: $Object.defineProperty,
|
13130 | setDescs: $Object.defineProperties,
|
13131 | getKeys: $Object.keys,
|
13132 | getNames: $Object.getOwnPropertyNames,
|
13133 | getSymbols: $Object.getOwnPropertySymbols,
|
13134 | each: [].forEach
|
13135 | };
|
13136 |
|
13137 | }),
|
13138 |
|
13139 | (function(module, exports, __webpack_require__) {
|
13140 |
|
13141 | 'use strict';
|
13142 |
|
13143 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
13144 |
|
13145 | exports.__esModule = true;
|
13146 | exports.registerDefaultHelpers = registerDefaultHelpers;
|
13147 |
|
13148 | var _helpersBlockHelperMissing = __webpack_require__(11);
|
13149 |
|
13150 | var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
|
13151 |
|
13152 | var _helpersEach = __webpack_require__(12);
|
13153 |
|
13154 | var _helpersEach2 = _interopRequireDefault(_helpersEach);
|
13155 |
|
13156 | var _helpersHelperMissing = __webpack_require__(13);
|
13157 |
|
13158 | var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
|
13159 |
|
13160 | var _helpersIf = __webpack_require__(14);
|
13161 |
|
13162 | var _helpersIf2 = _interopRequireDefault(_helpersIf);
|
13163 |
|
13164 | var _helpersLog = __webpack_require__(15);
|
13165 |
|
13166 | var _helpersLog2 = _interopRequireDefault(_helpersLog);
|
13167 |
|
13168 | var _helpersLookup = __webpack_require__(16);
|
13169 |
|
13170 | var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
|
13171 |
|
13172 | var _helpersWith = __webpack_require__(17);
|
13173 |
|
13174 | var _helpersWith2 = _interopRequireDefault(_helpersWith);
|
13175 |
|
13176 | function registerDefaultHelpers(instance) {
|
13177 | _helpersBlockHelperMissing2['default'](instance);
|
13178 | _helpersEach2['default'](instance);
|
13179 | _helpersHelperMissing2['default'](instance);
|
13180 | _helpersIf2['default'](instance);
|
13181 | _helpersLog2['default'](instance);
|
13182 | _helpersLookup2['default'](instance);
|
13183 | _helpersWith2['default'](instance);
|
13184 | }
|
13185 |
|
13186 | }),
|
13187 |
|
13188 | (function(module, exports, __webpack_require__) {
|
13189 |
|
13190 | 'use strict';
|
13191 |
|
13192 | exports.__esModule = true;
|
13193 |
|
13194 | var _utils = __webpack_require__(5);
|
13195 |
|
13196 | exports['default'] = function (instance) {
|
13197 | instance.registerHelper('blockHelperMissing', function (context, options) {
|
13198 | var inverse = options.inverse,
|
13199 | fn = options.fn;
|
13200 |
|
13201 | if (context === true) {
|
13202 | return fn(this);
|
13203 | } else if (context === false || context == null) {
|
13204 | return inverse(this);
|
13205 | } else if (_utils.isArray(context)) {
|
13206 | if (context.length > 0) {
|
13207 | if (options.ids) {
|
13208 | options.ids = [options.name];
|
13209 | }
|
13210 |
|
13211 | return instance.helpers.each(context, options);
|
13212 | } else {
|
13213 | return inverse(this);
|
13214 | }
|
13215 | } else {
|
13216 | if (options.data && options.ids) {
|
13217 | var data = _utils.createFrame(options.data);
|
13218 | data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
|
13219 | options = { data: data };
|
13220 | }
|
13221 |
|
13222 | return fn(context, options);
|
13223 | }
|
13224 | });
|
13225 | };
|
13226 |
|
13227 | module.exports = exports['default'];
|
13228 |
|
13229 | }),
|
13230 |
|
13231 | (function(module, exports, __webpack_require__) {
|
13232 |
|
13233 | 'use strict';
|
13234 |
|
13235 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
13236 |
|
13237 | exports.__esModule = true;
|
13238 |
|
13239 | var _utils = __webpack_require__(5);
|
13240 |
|
13241 | var _exception = __webpack_require__(6);
|
13242 |
|
13243 | var _exception2 = _interopRequireDefault(_exception);
|
13244 |
|
13245 | exports['default'] = function (instance) {
|
13246 | instance.registerHelper('each', function (context, options) {
|
13247 | if (!options) {
|
13248 | throw new _exception2['default']('Must pass iterator to #each');
|
13249 | }
|
13250 |
|
13251 | var fn = options.fn,
|
13252 | inverse = options.inverse,
|
13253 | i = 0,
|
13254 | ret = '',
|
13255 | data = undefined,
|
13256 | contextPath = undefined;
|
13257 |
|
13258 | if (options.data && options.ids) {
|
13259 | contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
13260 | }
|
13261 |
|
13262 | if (_utils.isFunction(context)) {
|
13263 | context = context.call(this);
|
13264 | }
|
13265 |
|
13266 | if (options.data) {
|
13267 | data = _utils.createFrame(options.data);
|
13268 | }
|
13269 |
|
13270 | function execIteration(field, index, last) {
|
13271 | if (data) {
|
13272 | data.key = field;
|
13273 | data.index = index;
|
13274 | data.first = index === 0;
|
13275 | data.last = !!last;
|
13276 |
|
13277 | if (contextPath) {
|
13278 | data.contextPath = contextPath + field;
|
13279 | }
|
13280 | }
|
13281 |
|
13282 | ret = ret + fn(context[field], {
|
13283 | data: data,
|
13284 | blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
|
13285 | });
|
13286 | }
|
13287 |
|
13288 | if (context && typeof context === 'object') {
|
13289 | if (_utils.isArray(context)) {
|
13290 | for (var j = context.length; i < j; i++) {
|
13291 | if (i in context) {
|
13292 | execIteration(i, i, i === context.length - 1);
|
13293 | }
|
13294 | }
|
13295 | } else {
|
13296 | var priorKey = undefined;
|
13297 |
|
13298 | for (var key in context) {
|
13299 | if (context.hasOwnProperty(key)) {
|
13300 |
|
13301 |
|
13302 |
|
13303 | if (priorKey !== undefined) {
|
13304 | execIteration(priorKey, i - 1);
|
13305 | }
|
13306 | priorKey = key;
|
13307 | i++;
|
13308 | }
|
13309 | }
|
13310 | if (priorKey !== undefined) {
|
13311 | execIteration(priorKey, i - 1, true);
|
13312 | }
|
13313 | }
|
13314 | }
|
13315 |
|
13316 | if (i === 0) {
|
13317 | ret = inverse(this);
|
13318 | }
|
13319 |
|
13320 | return ret;
|
13321 | });
|
13322 | };
|
13323 |
|
13324 | module.exports = exports['default'];
|
13325 |
|
13326 | }),
|
13327 |
|
13328 | (function(module, exports, __webpack_require__) {
|
13329 |
|
13330 | 'use strict';
|
13331 |
|
13332 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
13333 |
|
13334 | exports.__esModule = true;
|
13335 |
|
13336 | var _exception = __webpack_require__(6);
|
13337 |
|
13338 | var _exception2 = _interopRequireDefault(_exception);
|
13339 |
|
13340 | exports['default'] = function (instance) {
|
13341 | instance.registerHelper('helperMissing', function () /* [args, ]options */{
|
13342 | if (arguments.length === 1) {
|
13343 |
|
13344 | return undefined;
|
13345 | } else {
|
13346 |
|
13347 | throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
13348 | }
|
13349 | });
|
13350 | };
|
13351 |
|
13352 | module.exports = exports['default'];
|
13353 |
|
13354 | }),
|
13355 |
|
13356 | (function(module, exports, __webpack_require__) {
|
13357 |
|
13358 | 'use strict';
|
13359 |
|
13360 | exports.__esModule = true;
|
13361 |
|
13362 | var _utils = __webpack_require__(5);
|
13363 |
|
13364 | exports['default'] = function (instance) {
|
13365 | instance.registerHelper('if', function (conditional, options) {
|
13366 | if (_utils.isFunction(conditional)) {
|
13367 | conditional = conditional.call(this);
|
13368 | }
|
13369 |
|
13370 |
|
13371 |
|
13372 |
|
13373 | if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
|
13374 | return options.inverse(this);
|
13375 | } else {
|
13376 | return options.fn(this);
|
13377 | }
|
13378 | });
|
13379 |
|
13380 | instance.registerHelper('unless', function (conditional, options) {
|
13381 | return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
|
13382 | });
|
13383 | };
|
13384 |
|
13385 | module.exports = exports['default'];
|
13386 |
|
13387 | }),
|
13388 |
|
13389 | (function(module, exports) {
|
13390 |
|
13391 | 'use strict';
|
13392 |
|
13393 | exports.__esModule = true;
|
13394 |
|
13395 | exports['default'] = function (instance) {
|
13396 | instance.registerHelper('log', function () /* message, options */{
|
13397 | var args = [undefined],
|
13398 | options = arguments[arguments.length - 1];
|
13399 | for (var i = 0; i < arguments.length - 1; i++) {
|
13400 | args.push(arguments[i]);
|
13401 | }
|
13402 |
|
13403 | var level = 1;
|
13404 | if (options.hash.level != null) {
|
13405 | level = options.hash.level;
|
13406 | } else if (options.data && options.data.level != null) {
|
13407 | level = options.data.level;
|
13408 | }
|
13409 | args[0] = level;
|
13410 |
|
13411 | instance.log.apply(instance, args);
|
13412 | });
|
13413 | };
|
13414 |
|
13415 | module.exports = exports['default'];
|
13416 |
|
13417 | }),
|
13418 |
|
13419 | (function(module, exports) {
|
13420 |
|
13421 | 'use strict';
|
13422 |
|
13423 | exports.__esModule = true;
|
13424 |
|
13425 | exports['default'] = function (instance) {
|
13426 | instance.registerHelper('lookup', function (obj, field) {
|
13427 | return obj && obj[field];
|
13428 | });
|
13429 | };
|
13430 |
|
13431 | module.exports = exports['default'];
|
13432 |
|
13433 | }),
|
13434 |
|
13435 | (function(module, exports, __webpack_require__) {
|
13436 |
|
13437 | 'use strict';
|
13438 |
|
13439 | exports.__esModule = true;
|
13440 |
|
13441 | var _utils = __webpack_require__(5);
|
13442 |
|
13443 | exports['default'] = function (instance) {
|
13444 | instance.registerHelper('with', function (context, options) {
|
13445 | if (_utils.isFunction(context)) {
|
13446 | context = context.call(this);
|
13447 | }
|
13448 |
|
13449 | var fn = options.fn;
|
13450 |
|
13451 | if (!_utils.isEmpty(context)) {
|
13452 | var data = options.data;
|
13453 | if (options.data && options.ids) {
|
13454 | data = _utils.createFrame(options.data);
|
13455 | data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
|
13456 | }
|
13457 |
|
13458 | return fn(context, {
|
13459 | data: data,
|
13460 | blockParams: _utils.blockParams([context], [data && data.contextPath])
|
13461 | });
|
13462 | } else {
|
13463 | return options.inverse(this);
|
13464 | }
|
13465 | });
|
13466 | };
|
13467 |
|
13468 | module.exports = exports['default'];
|
13469 |
|
13470 | }),
|
13471 |
|
13472 | (function(module, exports, __webpack_require__) {
|
13473 |
|
13474 | 'use strict';
|
13475 |
|
13476 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
13477 |
|
13478 | exports.__esModule = true;
|
13479 | exports.registerDefaultDecorators = registerDefaultDecorators;
|
13480 |
|
13481 | var _decoratorsInline = __webpack_require__(19);
|
13482 |
|
13483 | var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
|
13484 |
|
13485 | function registerDefaultDecorators(instance) {
|
13486 | _decoratorsInline2['default'](instance);
|
13487 | }
|
13488 |
|
13489 | }),
|
13490 |
|
13491 | (function(module, exports, __webpack_require__) {
|
13492 |
|
13493 | 'use strict';
|
13494 |
|
13495 | exports.__esModule = true;
|
13496 |
|
13497 | var _utils = __webpack_require__(5);
|
13498 |
|
13499 | exports['default'] = function (instance) {
|
13500 | instance.registerDecorator('inline', function (fn, props, container, options) {
|
13501 | var ret = fn;
|
13502 | if (!props.partials) {
|
13503 | props.partials = {};
|
13504 | ret = function (context, options) {
|
13505 |
|
13506 | var original = container.partials;
|
13507 | container.partials = _utils.extend({}, original, props.partials);
|
13508 | var ret = fn(context, options);
|
13509 | container.partials = original;
|
13510 | return ret;
|
13511 | };
|
13512 | }
|
13513 |
|
13514 | props.partials[options.args[0]] = options.fn;
|
13515 |
|
13516 | return ret;
|
13517 | });
|
13518 | };
|
13519 |
|
13520 | module.exports = exports['default'];
|
13521 |
|
13522 | }),
|
13523 |
|
13524 | (function(module, exports, __webpack_require__) {
|
13525 |
|
13526 | 'use strict';
|
13527 |
|
13528 | exports.__esModule = true;
|
13529 |
|
13530 | var _utils = __webpack_require__(5);
|
13531 |
|
13532 | var logger = {
|
13533 | methodMap: ['debug', 'info', 'warn', 'error'],
|
13534 | level: 'info',
|
13535 |
|
13536 |
|
13537 | lookupLevel: function lookupLevel(level) {
|
13538 | if (typeof level === 'string') {
|
13539 | var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
|
13540 | if (levelMap >= 0) {
|
13541 | level = levelMap;
|
13542 | } else {
|
13543 | level = parseInt(level, 10);
|
13544 | }
|
13545 | }
|
13546 |
|
13547 | return level;
|
13548 | },
|
13549 |
|
13550 |
|
13551 | log: function log(level) {
|
13552 | level = logger.lookupLevel(level);
|
13553 |
|
13554 | if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
|
13555 | var method = logger.methodMap[level];
|
13556 | if (!console[method]) {
|
13557 |
|
13558 | method = 'log';
|
13559 | }
|
13560 |
|
13561 | for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
13562 | message[_key - 1] = arguments[_key];
|
13563 | }
|
13564 |
|
13565 | console[method].apply(console, message);
|
13566 | }
|
13567 | }
|
13568 | };
|
13569 |
|
13570 | exports['default'] = logger;
|
13571 | module.exports = exports['default'];
|
13572 |
|
13573 | }),
|
13574 |
|
13575 | (function(module, exports) {
|
13576 |
|
13577 |
|
13578 | 'use strict';
|
13579 |
|
13580 | exports.__esModule = true;
|
13581 | function SafeString(string) {
|
13582 | this.string = string;
|
13583 | }
|
13584 |
|
13585 | SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
13586 | return '' + this.string;
|
13587 | };
|
13588 |
|
13589 | exports['default'] = SafeString;
|
13590 | module.exports = exports['default'];
|
13591 |
|
13592 | }),
|
13593 |
|
13594 | (function(module, exports, __webpack_require__) {
|
13595 |
|
13596 | 'use strict';
|
13597 |
|
13598 | var _Object$seal = __webpack_require__(23)['default'];
|
13599 |
|
13600 | var _interopRequireWildcard = __webpack_require__(3)['default'];
|
13601 |
|
13602 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
13603 |
|
13604 | exports.__esModule = true;
|
13605 | exports.checkRevision = checkRevision;
|
13606 | exports.template = template;
|
13607 | exports.wrapProgram = wrapProgram;
|
13608 | exports.resolvePartial = resolvePartial;
|
13609 | exports.invokePartial = invokePartial;
|
13610 | exports.noop = noop;
|
13611 |
|
13612 | var _utils = __webpack_require__(5);
|
13613 |
|
13614 | var Utils = _interopRequireWildcard(_utils);
|
13615 |
|
13616 | var _exception = __webpack_require__(6);
|
13617 |
|
13618 | var _exception2 = _interopRequireDefault(_exception);
|
13619 |
|
13620 | var _base = __webpack_require__(4);
|
13621 |
|
13622 | function checkRevision(compilerInfo) {
|
13623 | var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
13624 | currentRevision = _base.COMPILER_REVISION;
|
13625 |
|
13626 | if (compilerRevision !== currentRevision) {
|
13627 | if (compilerRevision < currentRevision) {
|
13628 | var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
|
13629 | compilerVersions = _base.REVISION_CHANGES[compilerRevision];
|
13630 | 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 + ').');
|
13631 | } else {
|
13632 |
|
13633 | 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] + ').');
|
13634 | }
|
13635 | }
|
13636 | }
|
13637 |
|
13638 | function template(templateSpec, env) {
|
13639 |
|
13640 | if (!env) {
|
13641 | throw new _exception2['default']('No environment passed to template');
|
13642 | }
|
13643 | if (!templateSpec || !templateSpec.main) {
|
13644 | throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
|
13645 | }
|
13646 |
|
13647 | templateSpec.main.decorator = templateSpec.main_d;
|
13648 |
|
13649 |
|
13650 |
|
13651 | env.VM.checkRevision(templateSpec.compiler);
|
13652 |
|
13653 | function invokePartialWrapper(partial, context, options) {
|
13654 | if (options.hash) {
|
13655 | context = Utils.extend({}, context, options.hash);
|
13656 | if (options.ids) {
|
13657 | options.ids[0] = true;
|
13658 | }
|
13659 | }
|
13660 |
|
13661 | partial = env.VM.resolvePartial.call(this, partial, context, options);
|
13662 | var result = env.VM.invokePartial.call(this, partial, context, options);
|
13663 |
|
13664 | if (result == null && env.compile) {
|
13665 | options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
13666 | result = options.partials[options.name](context, options);
|
13667 | }
|
13668 | if (result != null) {
|
13669 | if (options.indent) {
|
13670 | var lines = result.split('\n');
|
13671 | for (var i = 0, l = lines.length; i < l; i++) {
|
13672 | if (!lines[i] && i + 1 === l) {
|
13673 | break;
|
13674 | }
|
13675 |
|
13676 | lines[i] = options.indent + lines[i];
|
13677 | }
|
13678 | result = lines.join('\n');
|
13679 | }
|
13680 | return result;
|
13681 | } else {
|
13682 | throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
13683 | }
|
13684 | }
|
13685 |
|
13686 |
|
13687 | var container = {
|
13688 | strict: function strict(obj, name) {
|
13689 | if (!(name in obj)) {
|
13690 | throw new _exception2['default']('"' + name + '" not defined in ' + obj);
|
13691 | }
|
13692 | return obj[name];
|
13693 | },
|
13694 | lookup: function lookup(depths, name) {
|
13695 | var len = depths.length;
|
13696 | for (var i = 0; i < len; i++) {
|
13697 | if (depths[i] && depths[i][name] != null) {
|
13698 | return depths[i][name];
|
13699 | }
|
13700 | }
|
13701 | },
|
13702 | lambda: function lambda(current, context) {
|
13703 | return typeof current === 'function' ? current.call(context) : current;
|
13704 | },
|
13705 |
|
13706 | escapeExpression: Utils.escapeExpression,
|
13707 | invokePartial: invokePartialWrapper,
|
13708 |
|
13709 | fn: function fn(i) {
|
13710 | var ret = templateSpec[i];
|
13711 | ret.decorator = templateSpec[i + '_d'];
|
13712 | return ret;
|
13713 | },
|
13714 |
|
13715 | programs: [],
|
13716 | program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
13717 | var programWrapper = this.programs[i],
|
13718 | fn = this.fn(i);
|
13719 | if (data || depths || blockParams || declaredBlockParams) {
|
13720 | programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
13721 | } else if (!programWrapper) {
|
13722 | programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
13723 | }
|
13724 | return programWrapper;
|
13725 | },
|
13726 |
|
13727 | data: function data(value, depth) {
|
13728 | while (value && depth--) {
|
13729 | value = value._parent;
|
13730 | }
|
13731 | return value;
|
13732 | },
|
13733 | merge: function merge(param, common) {
|
13734 | var obj = param || common;
|
13735 |
|
13736 | if (param && common && param !== common) {
|
13737 | obj = Utils.extend({}, common, param);
|
13738 | }
|
13739 |
|
13740 | return obj;
|
13741 | },
|
13742 |
|
13743 | nullContext: _Object$seal({}),
|
13744 |
|
13745 | noop: env.VM.noop,
|
13746 | compilerInfo: templateSpec.compiler
|
13747 | };
|
13748 |
|
13749 | function ret(context) {
|
13750 | var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
13751 |
|
13752 | var data = options.data;
|
13753 |
|
13754 | ret._setup(options);
|
13755 | if (!options.partial && templateSpec.useData) {
|
13756 | data = initData(context, data);
|
13757 | }
|
13758 | var depths = undefined,
|
13759 | blockParams = templateSpec.useBlockParams ? [] : undefined;
|
13760 | if (templateSpec.useDepths) {
|
13761 | if (options.depths) {
|
13762 | depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
|
13763 | } else {
|
13764 | depths = [context];
|
13765 | }
|
13766 | }
|
13767 |
|
13768 | function main(context /*, options*/) {
|
13769 | return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
|
13770 | }
|
13771 | main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
|
13772 | return main(context, options);
|
13773 | }
|
13774 | ret.isTop = true;
|
13775 |
|
13776 | ret._setup = function (options) {
|
13777 | if (!options.partial) {
|
13778 | container.helpers = container.merge(options.helpers, env.helpers);
|
13779 |
|
13780 | if (templateSpec.usePartial) {
|
13781 | container.partials = container.merge(options.partials, env.partials);
|
13782 | }
|
13783 | if (templateSpec.usePartial || templateSpec.useDecorators) {
|
13784 | container.decorators = container.merge(options.decorators, env.decorators);
|
13785 | }
|
13786 | } else {
|
13787 | container.helpers = options.helpers;
|
13788 | container.partials = options.partials;
|
13789 | container.decorators = options.decorators;
|
13790 | }
|
13791 | };
|
13792 |
|
13793 | ret._child = function (i, data, blockParams, depths) {
|
13794 | if (templateSpec.useBlockParams && !blockParams) {
|
13795 | throw new _exception2['default']('must pass block params');
|
13796 | }
|
13797 | if (templateSpec.useDepths && !depths) {
|
13798 | throw new _exception2['default']('must pass parent depths');
|
13799 | }
|
13800 |
|
13801 | return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
13802 | };
|
13803 | return ret;
|
13804 | }
|
13805 |
|
13806 | function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
13807 | function prog(context) {
|
13808 | var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
13809 |
|
13810 | var currentDepths = depths;
|
13811 | if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
|
13812 | currentDepths = [context].concat(depths);
|
13813 | }
|
13814 |
|
13815 | return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
|
13816 | }
|
13817 |
|
13818 | prog = executeDecorators(fn, prog, container, depths, data, blockParams);
|
13819 |
|
13820 | prog.program = i;
|
13821 | prog.depth = depths ? depths.length : 0;
|
13822 | prog.blockParams = declaredBlockParams || 0;
|
13823 | return prog;
|
13824 | }
|
13825 |
|
13826 | function resolvePartial(partial, context, options) {
|
13827 | if (!partial) {
|
13828 | if (options.name === '@partial-block') {
|
13829 | partial = options.data['partial-block'];
|
13830 | } else {
|
13831 | partial = options.partials[options.name];
|
13832 | }
|
13833 | } else if (!partial.call && !options.name) {
|
13834 |
|
13835 | options.name = partial;
|
13836 | partial = options.partials[partial];
|
13837 | }
|
13838 | return partial;
|
13839 | }
|
13840 |
|
13841 | function invokePartial(partial, context, options) {
|
13842 |
|
13843 | var currentPartialBlock = options.data && options.data['partial-block'];
|
13844 | options.partial = true;
|
13845 | if (options.ids) {
|
13846 | options.data.contextPath = options.ids[0] || options.data.contextPath;
|
13847 | }
|
13848 |
|
13849 | var partialBlock = undefined;
|
13850 | if (options.fn && options.fn !== noop) {
|
13851 | (function () {
|
13852 | options.data = _base.createFrame(options.data);
|
13853 |
|
13854 | var fn = options.fn;
|
13855 | partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
|
13856 | var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
13857 |
|
13858 |
|
13859 |
|
13860 | options.data = _base.createFrame(options.data);
|
13861 | options.data['partial-block'] = currentPartialBlock;
|
13862 | return fn(context, options);
|
13863 | };
|
13864 | if (fn.partials) {
|
13865 | options.partials = Utils.extend({}, options.partials, fn.partials);
|
13866 | }
|
13867 | })();
|
13868 | }
|
13869 |
|
13870 | if (partial === undefined && partialBlock) {
|
13871 | partial = partialBlock;
|
13872 | }
|
13873 |
|
13874 | if (partial === undefined) {
|
13875 | throw new _exception2['default']('The partial ' + options.name + ' could not be found');
|
13876 | } else if (partial instanceof Function) {
|
13877 | return partial(context, options);
|
13878 | }
|
13879 | }
|
13880 |
|
13881 | function noop() {
|
13882 | return '';
|
13883 | }
|
13884 |
|
13885 | function initData(context, data) {
|
13886 | if (!data || !('root' in data)) {
|
13887 | data = data ? _base.createFrame(data) : {};
|
13888 | data.root = context;
|
13889 | }
|
13890 | return data;
|
13891 | }
|
13892 |
|
13893 | function executeDecorators(fn, prog, container, depths, data, blockParams) {
|
13894 | if (fn.decorator) {
|
13895 | var props = {};
|
13896 | prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
|
13897 | Utils.extend(prog, props);
|
13898 | }
|
13899 | return prog;
|
13900 | }
|
13901 |
|
13902 | }),
|
13903 |
|
13904 | (function(module, exports, __webpack_require__) {
|
13905 |
|
13906 | module.exports = { "default": __webpack_require__(24), __esModule: true };
|
13907 |
|
13908 | }),
|
13909 |
|
13910 | (function(module, exports, __webpack_require__) {
|
13911 |
|
13912 | __webpack_require__(25);
|
13913 | module.exports = __webpack_require__(30).Object.seal;
|
13914 |
|
13915 | }),
|
13916 |
|
13917 | (function(module, exports, __webpack_require__) {
|
13918 |
|
13919 |
|
13920 | var isObject = __webpack_require__(26);
|
13921 |
|
13922 | __webpack_require__(27)('seal', function($seal){
|
13923 | return function seal(it){
|
13924 | return $seal && isObject(it) ? $seal(it) : it;
|
13925 | };
|
13926 | });
|
13927 |
|
13928 | }),
|
13929 |
|
13930 | (function(module, exports) {
|
13931 |
|
13932 | module.exports = function(it){
|
13933 | return typeof it === 'object' ? it !== null : typeof it === 'function';
|
13934 | };
|
13935 |
|
13936 | }),
|
13937 |
|
13938 | (function(module, exports, __webpack_require__) {
|
13939 |
|
13940 |
|
13941 | var $export = __webpack_require__(28)
|
13942 | , core = __webpack_require__(30)
|
13943 | , fails = __webpack_require__(33);
|
13944 | module.exports = function(KEY, exec){
|
13945 | var fn = (core.Object || {})[KEY] || Object[KEY]
|
13946 | , exp = {};
|
13947 | exp[KEY] = exec(fn);
|
13948 | $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
|
13949 | };
|
13950 |
|
13951 | }),
|
13952 |
|
13953 | (function(module, exports, __webpack_require__) {
|
13954 |
|
13955 | var global = __webpack_require__(29)
|
13956 | , core = __webpack_require__(30)
|
13957 | , ctx = __webpack_require__(31)
|
13958 | , PROTOTYPE = 'prototype';
|
13959 |
|
13960 | var $export = function(type, name, source){
|
13961 | var IS_FORCED = type & $export.F
|
13962 | , IS_GLOBAL = type & $export.G
|
13963 | , IS_STATIC = type & $export.S
|
13964 | , IS_PROTO = type & $export.P
|
13965 | , IS_BIND = type & $export.B
|
13966 | , IS_WRAP = type & $export.W
|
13967 | , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
13968 | , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
|
13969 | , key, own, out;
|
13970 | if(IS_GLOBAL)source = name;
|
13971 | for(key in source){
|
13972 |
|
13973 | own = !IS_FORCED && target && key in target;
|
13974 | if(own && key in exports)continue;
|
13975 |
|
13976 | out = own ? target[key] : source[key];
|
13977 |
|
13978 | exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
13979 |
|
13980 | : IS_BIND && own ? ctx(out, global)
|
13981 |
|
13982 | : IS_WRAP && target[key] == out ? (function(C){
|
13983 | var F = function(param){
|
13984 | return this instanceof C ? new C(param) : C(param);
|
13985 | };
|
13986 | F[PROTOTYPE] = C[PROTOTYPE];
|
13987 | return F;
|
13988 |
|
13989 | })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
13990 | if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
|
13991 | }
|
13992 | };
|
13993 |
|
13994 | $export.F = 1;
|
13995 | $export.G = 2;
|
13996 | $export.S = 4;
|
13997 | $export.P = 8;
|
13998 | $export.B = 16;
|
13999 | $export.W = 32;
|
14000 | module.exports = $export;
|
14001 |
|
14002 | }),
|
14003 |
|
14004 | (function(module, exports) {
|
14005 |
|
14006 |
|
14007 | var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
14008 | ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
14009 | if(typeof __g == 'number')__g = global;
|
14010 |
|
14011 | }),
|
14012 |
|
14013 | (function(module, exports) {
|
14014 |
|
14015 | var core = module.exports = {version: '1.2.6'};
|
14016 | if(typeof __e == 'number')__e = core;
|
14017 |
|
14018 | }),
|
14019 |
|
14020 | (function(module, exports, __webpack_require__) {
|
14021 |
|
14022 |
|
14023 | var aFunction = __webpack_require__(32);
|
14024 | module.exports = function(fn, that, length){
|
14025 | aFunction(fn);
|
14026 | if(that === undefined)return fn;
|
14027 | switch(length){
|
14028 | case 1: return function(a){
|
14029 | return fn.call(that, a);
|
14030 | };
|
14031 | case 2: return function(a, b){
|
14032 | return fn.call(that, a, b);
|
14033 | };
|
14034 | case 3: return function(a, b, c){
|
14035 | return fn.call(that, a, b, c);
|
14036 | };
|
14037 | }
|
14038 | return function(/* ...args */){
|
14039 | return fn.apply(that, arguments);
|
14040 | };
|
14041 | };
|
14042 |
|
14043 | }),
|
14044 |
|
14045 | (function(module, exports) {
|
14046 |
|
14047 | module.exports = function(it){
|
14048 | if(typeof it != 'function')throw TypeError(it + ' is not a function!');
|
14049 | return it;
|
14050 | };
|
14051 |
|
14052 | }),
|
14053 |
|
14054 | (function(module, exports) {
|
14055 |
|
14056 | module.exports = function(exec){
|
14057 | try {
|
14058 | return !!exec();
|
14059 | } catch(e){
|
14060 | return true;
|
14061 | }
|
14062 | };
|
14063 |
|
14064 | }),
|
14065 |
|
14066 | (function(module, exports) {
|
14067 |
|
14068 | (function(global) {
|
14069 | 'use strict';
|
14070 |
|
14071 | exports.__esModule = true;
|
14072 |
|
14073 | exports['default'] = function (Handlebars) {
|
14074 |
|
14075 | var root = typeof global !== 'undefined' ? global : window,
|
14076 | $Handlebars = root.Handlebars;
|
14077 |
|
14078 | Handlebars.noConflict = function () {
|
14079 | if (root.Handlebars === Handlebars) {
|
14080 | root.Handlebars = $Handlebars;
|
14081 | }
|
14082 | return Handlebars;
|
14083 | };
|
14084 | };
|
14085 |
|
14086 | module.exports = exports['default'];
|
14087 | }.call(exports, (function() { return this; }())))
|
14088 |
|
14089 | }),
|
14090 |
|
14091 | (function(module, exports) {
|
14092 |
|
14093 | 'use strict';
|
14094 |
|
14095 | exports.__esModule = true;
|
14096 | var AST = {
|
14097 |
|
14098 | helpers: {
|
14099 |
|
14100 |
|
14101 |
|
14102 | helperExpression: function helperExpression(node) {
|
14103 | return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash);
|
14104 | },
|
14105 |
|
14106 | scopedId: function scopedId(path) {
|
14107 | return (/^\.|this\b/.test(path.original)
|
14108 | );
|
14109 | },
|
14110 |
|
14111 |
|
14112 |
|
14113 | simpleId: function simpleId(path) {
|
14114 | return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
|
14115 | }
|
14116 | }
|
14117 | };
|
14118 |
|
14119 |
|
14120 |
|
14121 | exports['default'] = AST;
|
14122 | module.exports = exports['default'];
|
14123 |
|
14124 | }),
|
14125 |
|
14126 | (function(module, exports, __webpack_require__) {
|
14127 |
|
14128 | 'use strict';
|
14129 |
|
14130 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
14131 |
|
14132 | var _interopRequireWildcard = __webpack_require__(3)['default'];
|
14133 |
|
14134 | exports.__esModule = true;
|
14135 | exports.parse = parse;
|
14136 |
|
14137 | var _parser = __webpack_require__(37);
|
14138 |
|
14139 | var _parser2 = _interopRequireDefault(_parser);
|
14140 |
|
14141 | var _whitespaceControl = __webpack_require__(38);
|
14142 |
|
14143 | var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
|
14144 |
|
14145 | var _helpers = __webpack_require__(40);
|
14146 |
|
14147 | var Helpers = _interopRequireWildcard(_helpers);
|
14148 |
|
14149 | var _utils = __webpack_require__(5);
|
14150 |
|
14151 | exports.parser = _parser2['default'];
|
14152 |
|
14153 | var yy = {};
|
14154 | _utils.extend(yy, Helpers);
|
14155 |
|
14156 | function parse(input, options) {
|
14157 |
|
14158 | if (input.type === 'Program') {
|
14159 | return input;
|
14160 | }
|
14161 |
|
14162 | _parser2['default'].yy = yy;
|
14163 |
|
14164 |
|
14165 | yy.locInfo = function (locInfo) {
|
14166 | return new yy.SourceLocation(options && options.srcName, locInfo);
|
14167 | };
|
14168 |
|
14169 | var strip = new _whitespaceControl2['default'](options);
|
14170 | return strip.accept(_parser2['default'].parse(input));
|
14171 | }
|
14172 |
|
14173 | }),
|
14174 |
|
14175 | (function(module, exports) {
|
14176 |
|
14177 |
|
14178 |
|
14179 | "use strict";
|
14180 |
|
14181 | exports.__esModule = true;
|
14182 | var handlebars = (function () {
|
14183 | var parser = { trace: function trace() {},
|
14184 | yy: {},
|
14185 | symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
|
14186 | terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
|
14187 | productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
|
14188 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$
|
14189 | /*``*/) {
|
14190 |
|
14191 | var $0 = $$.length - 1;
|
14192 | switch (yystate) {
|
14193 | case 1:
|
14194 | return $$[$0 - 1];
|
14195 | break;
|
14196 | case 2:
|
14197 | this.$ = yy.prepareProgram($$[$0]);
|
14198 | break;
|
14199 | case 3:
|
14200 | this.$ = $$[$0];
|
14201 | break;
|
14202 | case 4:
|
14203 | this.$ = $$[$0];
|
14204 | break;
|
14205 | case 5:
|
14206 | this.$ = $$[$0];
|
14207 | break;
|
14208 | case 6:
|
14209 | this.$ = $$[$0];
|
14210 | break;
|
14211 | case 7:
|
14212 | this.$ = $$[$0];
|
14213 | break;
|
14214 | case 8:
|
14215 | this.$ = $$[$0];
|
14216 | break;
|
14217 | case 9:
|
14218 | this.$ = {
|
14219 | type: 'CommentStatement',
|
14220 | value: yy.stripComment($$[$0]),
|
14221 | strip: yy.stripFlags($$[$0], $$[$0]),
|
14222 | loc: yy.locInfo(this._$)
|
14223 | };
|
14224 |
|
14225 | break;
|
14226 | case 10:
|
14227 | this.$ = {
|
14228 | type: 'ContentStatement',
|
14229 | original: $$[$0],
|
14230 | value: $$[$0],
|
14231 | loc: yy.locInfo(this._$)
|
14232 | };
|
14233 |
|
14234 | break;
|
14235 | case 11:
|
14236 | this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
|
14237 | break;
|
14238 | case 12:
|
14239 | this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
|
14240 | break;
|
14241 | case 13:
|
14242 | this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
|
14243 | break;
|
14244 | case 14:
|
14245 | this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
|
14246 | break;
|
14247 | case 15:
|
14248 | this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
14249 | break;
|
14250 | case 16:
|
14251 | this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
14252 | break;
|
14253 | case 17:
|
14254 | this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
14255 | break;
|
14256 | case 18:
|
14257 | this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
|
14258 | break;
|
14259 | case 19:
|
14260 | var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
|
14261 | program = yy.prepareProgram([inverse], $$[$0 - 1].loc);
|
14262 | program.chained = true;
|
14263 |
|
14264 | this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true };
|
14265 |
|
14266 | break;
|
14267 | case 20:
|
14268 | this.$ = $$[$0];
|
14269 | break;
|
14270 | case 21:
|
14271 | this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
|
14272 | break;
|
14273 | case 22:
|
14274 | this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
|
14275 | break;
|
14276 | case 23:
|
14277 | this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
|
14278 | break;
|
14279 | case 24:
|
14280 | this.$ = {
|
14281 | type: 'PartialStatement',
|
14282 | name: $$[$0 - 3],
|
14283 | params: $$[$0 - 2],
|
14284 | hash: $$[$0 - 1],
|
14285 | indent: '',
|
14286 | strip: yy.stripFlags($$[$0 - 4], $$[$0]),
|
14287 | loc: yy.locInfo(this._$)
|
14288 | };
|
14289 |
|
14290 | break;
|
14291 | case 25:
|
14292 | this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
|
14293 | break;
|
14294 | case 26:
|
14295 | this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
|
14296 | break;
|
14297 | case 27:
|
14298 | this.$ = $$[$0];
|
14299 | break;
|
14300 | case 28:
|
14301 | this.$ = $$[$0];
|
14302 | break;
|
14303 | case 29:
|
14304 | this.$ = {
|
14305 | type: 'SubExpression',
|
14306 | path: $$[$0 - 3],
|
14307 | params: $$[$0 - 2],
|
14308 | hash: $$[$0 - 1],
|
14309 | loc: yy.locInfo(this._$)
|
14310 | };
|
14311 |
|
14312 | break;
|
14313 | case 30:
|
14314 | this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) };
|
14315 | break;
|
14316 | case 31:
|
14317 | this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
|
14318 | break;
|
14319 | case 32:
|
14320 | this.$ = yy.id($$[$0 - 1]);
|
14321 | break;
|
14322 | case 33:
|
14323 | this.$ = $$[$0];
|
14324 | break;
|
14325 | case 34:
|
14326 | this.$ = $$[$0];
|
14327 | break;
|
14328 | case 35:
|
14329 | this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
|
14330 | break;
|
14331 | case 36:
|
14332 | this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
|
14333 | break;
|
14334 | case 37:
|
14335 | this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) };
|
14336 | break;
|
14337 | case 38:
|
14338 | this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) };
|
14339 | break;
|
14340 | case 39:
|
14341 | this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) };
|
14342 | break;
|
14343 | case 40:
|
14344 | this.$ = $$[$0];
|
14345 | break;
|
14346 | case 41:
|
14347 | this.$ = $$[$0];
|
14348 | break;
|
14349 | case 42:
|
14350 | this.$ = yy.preparePath(true, $$[$0], this._$);
|
14351 | break;
|
14352 | case 43:
|
14353 | this.$ = yy.preparePath(false, $$[$0], this._$);
|
14354 | break;
|
14355 | case 44:
|
14356 | $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2];
|
14357 | break;
|
14358 | case 45:
|
14359 | this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
|
14360 | break;
|
14361 | case 46:
|
14362 | this.$ = [];
|
14363 | break;
|
14364 | case 47:
|
14365 | $$[$0 - 1].push($$[$0]);
|
14366 | break;
|
14367 | case 48:
|
14368 | this.$ = [$$[$0]];
|
14369 | break;
|
14370 | case 49:
|
14371 | $$[$0 - 1].push($$[$0]);
|
14372 | break;
|
14373 | case 50:
|
14374 | this.$ = [];
|
14375 | break;
|
14376 | case 51:
|
14377 | $$[$0 - 1].push($$[$0]);
|
14378 | break;
|
14379 | case 58:
|
14380 | this.$ = [];
|
14381 | break;
|
14382 | case 59:
|
14383 | $$[$0 - 1].push($$[$0]);
|
14384 | break;
|
14385 | case 64:
|
14386 | this.$ = [];
|
14387 | break;
|
14388 | case 65:
|
14389 | $$[$0 - 1].push($$[$0]);
|
14390 | break;
|
14391 | case 70:
|
14392 | this.$ = [];
|
14393 | break;
|
14394 | case 71:
|
14395 | $$[$0 - 1].push($$[$0]);
|
14396 | break;
|
14397 | case 78:
|
14398 | this.$ = [];
|
14399 | break;
|
14400 | case 79:
|
14401 | $$[$0 - 1].push($$[$0]);
|
14402 | break;
|
14403 | case 82:
|
14404 | this.$ = [];
|
14405 | break;
|
14406 | case 83:
|
14407 | $$[$0 - 1].push($$[$0]);
|
14408 | break;
|
14409 | case 86:
|
14410 | this.$ = [];
|
14411 | break;
|
14412 | case 87:
|
14413 | $$[$0 - 1].push($$[$0]);
|
14414 | break;
|
14415 | case 90:
|
14416 | this.$ = [];
|
14417 | break;
|
14418 | case 91:
|
14419 | $$[$0 - 1].push($$[$0]);
|
14420 | break;
|
14421 | case 94:
|
14422 | this.$ = [];
|
14423 | break;
|
14424 | case 95:
|
14425 | $$[$0 - 1].push($$[$0]);
|
14426 | break;
|
14427 | case 98:
|
14428 | this.$ = [$$[$0]];
|
14429 | break;
|
14430 | case 99:
|
14431 | $$[$0 - 1].push($$[$0]);
|
14432 | break;
|
14433 | case 100:
|
14434 | this.$ = [$$[$0]];
|
14435 | break;
|
14436 | case 101:
|
14437 | $$[$0 - 1].push($$[$0]);
|
14438 | break;
|
14439 | }
|
14440 | },
|
14441 | table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }],
|
14442 | defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] },
|
14443 | parseError: function parseError(str, hash) {
|
14444 | throw new Error(str);
|
14445 | },
|
14446 | parse: function parse(input) {
|
14447 | var self = this,
|
14448 | stack = [0],
|
14449 | vstack = [null],
|
14450 | lstack = [],
|
14451 | table = this.table,
|
14452 | yytext = "",
|
14453 | yylineno = 0,
|
14454 | yyleng = 0,
|
14455 | recovering = 0,
|
14456 | TERROR = 2,
|
14457 | EOF = 1;
|
14458 | this.lexer.setInput(input);
|
14459 | this.lexer.yy = this.yy;
|
14460 | this.yy.lexer = this.lexer;
|
14461 | this.yy.parser = this;
|
14462 | if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
|
14463 | var yyloc = this.lexer.yylloc;
|
14464 | lstack.push(yyloc);
|
14465 | var ranges = this.lexer.options && this.lexer.options.ranges;
|
14466 | if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
|
14467 | function popStack(n) {
|
14468 | stack.length = stack.length - 2 * n;
|
14469 | vstack.length = vstack.length - n;
|
14470 | lstack.length = lstack.length - n;
|
14471 | }
|
14472 | function lex() {
|
14473 | var token;
|
14474 | token = self.lexer.lex() || 1;
|
14475 | if (typeof token !== "number") {
|
14476 | token = self.symbols_[token] || token;
|
14477 | }
|
14478 | return token;
|
14479 | }
|
14480 | var symbol,
|
14481 | preErrorSymbol,
|
14482 | state,
|
14483 | action,
|
14484 | a,
|
14485 | r,
|
14486 | yyval = {},
|
14487 | p,
|
14488 | len,
|
14489 | newState,
|
14490 | expected;
|
14491 | while (true) {
|
14492 | state = stack[stack.length - 1];
|
14493 | if (this.defaultActions[state]) {
|
14494 | action = this.defaultActions[state];
|
14495 | } else {
|
14496 | if (symbol === null || typeof symbol == "undefined") {
|
14497 | symbol = lex();
|
14498 | }
|
14499 | action = table[state] && table[state][symbol];
|
14500 | }
|
14501 | if (typeof action === "undefined" || !action.length || !action[0]) {
|
14502 | var errStr = "";
|
14503 | if (!recovering) {
|
14504 | expected = [];
|
14505 | for (p in table[state]) if (this.terminals_[p] && p > 2) {
|
14506 | expected.push("'" + this.terminals_[p] + "'");
|
14507 | }
|
14508 | if (this.lexer.showPosition) {
|
14509 | errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
14510 | } else {
|
14511 | errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
14512 | }
|
14513 | this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
|
14514 | }
|
14515 | }
|
14516 | if (action[0] instanceof Array && action.length > 1) {
|
14517 | throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
14518 | }
|
14519 | switch (action[0]) {
|
14520 | case 1:
|
14521 | stack.push(symbol);
|
14522 | vstack.push(this.lexer.yytext);
|
14523 | lstack.push(this.lexer.yylloc);
|
14524 | stack.push(action[1]);
|
14525 | symbol = null;
|
14526 | if (!preErrorSymbol) {
|
14527 | yyleng = this.lexer.yyleng;
|
14528 | yytext = this.lexer.yytext;
|
14529 | yylineno = this.lexer.yylineno;
|
14530 | yyloc = this.lexer.yylloc;
|
14531 | if (recovering > 0) recovering--;
|
14532 | } else {
|
14533 | symbol = preErrorSymbol;
|
14534 | preErrorSymbol = null;
|
14535 | }
|
14536 | break;
|
14537 | case 2:
|
14538 | len = this.productions_[action[1]][1];
|
14539 | yyval.$ = vstack[vstack.length - len];
|
14540 | yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
|
14541 | if (ranges) {
|
14542 | yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
14543 | }
|
14544 | r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
|
14545 | if (typeof r !== "undefined") {
|
14546 | return r;
|
14547 | }
|
14548 | if (len) {
|
14549 | stack = stack.slice(0, -1 * len * 2);
|
14550 | vstack = vstack.slice(0, -1 * len);
|
14551 | lstack = lstack.slice(0, -1 * len);
|
14552 | }
|
14553 | stack.push(this.productions_[action[1]][0]);
|
14554 | vstack.push(yyval.$);
|
14555 | lstack.push(yyval._$);
|
14556 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
14557 | stack.push(newState);
|
14558 | break;
|
14559 | case 3:
|
14560 | return true;
|
14561 | }
|
14562 | }
|
14563 | return true;
|
14564 | }
|
14565 | };
|
14566 |
|
14567 | var lexer = (function () {
|
14568 | var lexer = { EOF: 1,
|
14569 | parseError: function parseError(str, hash) {
|
14570 | if (this.yy.parser) {
|
14571 | this.yy.parser.parseError(str, hash);
|
14572 | } else {
|
14573 | throw new Error(str);
|
14574 | }
|
14575 | },
|
14576 | setInput: function setInput(input) {
|
14577 | this._input = input;
|
14578 | this._more = this._less = this.done = false;
|
14579 | this.yylineno = this.yyleng = 0;
|
14580 | this.yytext = this.matched = this.match = '';
|
14581 | this.conditionStack = ['INITIAL'];
|
14582 | this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
|
14583 | if (this.options.ranges) this.yylloc.range = [0, 0];
|
14584 | this.offset = 0;
|
14585 | return this;
|
14586 | },
|
14587 | input: function input() {
|
14588 | var ch = this._input[0];
|
14589 | this.yytext += ch;
|
14590 | this.yyleng++;
|
14591 | this.offset++;
|
14592 | this.match += ch;
|
14593 | this.matched += ch;
|
14594 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
14595 | if (lines) {
|
14596 | this.yylineno++;
|
14597 | this.yylloc.last_line++;
|
14598 | } else {
|
14599 | this.yylloc.last_column++;
|
14600 | }
|
14601 | if (this.options.ranges) this.yylloc.range[1]++;
|
14602 |
|
14603 | this._input = this._input.slice(1);
|
14604 | return ch;
|
14605 | },
|
14606 | unput: function unput(ch) {
|
14607 | var len = ch.length;
|
14608 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
14609 |
|
14610 | this._input = ch + this._input;
|
14611 | this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
|
14612 |
|
14613 | this.offset -= len;
|
14614 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
14615 | this.match = this.match.substr(0, this.match.length - 1);
|
14616 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
14617 |
|
14618 | if (lines.length - 1) this.yylineno -= lines.length - 1;
|
14619 | var r = this.yylloc.range;
|
14620 |
|
14621 | this.yylloc = { first_line: this.yylloc.first_line,
|
14622 | last_line: this.yylineno + 1,
|
14623 | first_column: this.yylloc.first_column,
|
14624 | last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
14625 | };
|
14626 |
|
14627 | if (this.options.ranges) {
|
14628 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
14629 | }
|
14630 | return this;
|
14631 | },
|
14632 | more: function more() {
|
14633 | this._more = true;
|
14634 | return this;
|
14635 | },
|
14636 | less: function less(n) {
|
14637 | this.unput(this.match.slice(n));
|
14638 | },
|
14639 | pastInput: function pastInput() {
|
14640 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
14641 | return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
|
14642 | },
|
14643 | upcomingInput: function upcomingInput() {
|
14644 | var next = this.match;
|
14645 | if (next.length < 20) {
|
14646 | next += this._input.substr(0, 20 - next.length);
|
14647 | }
|
14648 | return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
14649 | },
|
14650 | showPosition: function showPosition() {
|
14651 | var pre = this.pastInput();
|
14652 | var c = new Array(pre.length + 1).join("-");
|
14653 | return pre + this.upcomingInput() + "\n" + c + "^";
|
14654 | },
|
14655 | next: function next() {
|
14656 | if (this.done) {
|
14657 | return this.EOF;
|
14658 | }
|
14659 | if (!this._input) this.done = true;
|
14660 |
|
14661 | var token, match, tempMatch, index, col, lines;
|
14662 | if (!this._more) {
|
14663 | this.yytext = '';
|
14664 | this.match = '';
|
14665 | }
|
14666 | var rules = this._currentRules();
|
14667 | for (var i = 0; i < rules.length; i++) {
|
14668 | tempMatch = this._input.match(this.rules[rules[i]]);
|
14669 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
14670 | match = tempMatch;
|
14671 | index = i;
|
14672 | if (!this.options.flex) break;
|
14673 | }
|
14674 | }
|
14675 | if (match) {
|
14676 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
14677 | if (lines) this.yylineno += lines.length;
|
14678 | this.yylloc = { first_line: this.yylloc.last_line,
|
14679 | last_line: this.yylineno + 1,
|
14680 | first_column: this.yylloc.last_column,
|
14681 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length };
|
14682 | this.yytext += match[0];
|
14683 | this.match += match[0];
|
14684 | this.matches = match;
|
14685 | this.yyleng = this.yytext.length;
|
14686 | if (this.options.ranges) {
|
14687 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
14688 | }
|
14689 | this._more = false;
|
14690 | this._input = this._input.slice(match[0].length);
|
14691 | this.matched += match[0];
|
14692 | token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
|
14693 | if (this.done && this._input) this.done = false;
|
14694 | if (token) return token;else return;
|
14695 | }
|
14696 | if (this._input === "") {
|
14697 | return this.EOF;
|
14698 | } else {
|
14699 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno });
|
14700 | }
|
14701 | },
|
14702 | lex: function lex() {
|
14703 | var r = this.next();
|
14704 | if (typeof r !== 'undefined') {
|
14705 | return r;
|
14706 | } else {
|
14707 | return this.lex();
|
14708 | }
|
14709 | },
|
14710 | begin: function begin(condition) {
|
14711 | this.conditionStack.push(condition);
|
14712 | },
|
14713 | popState: function popState() {
|
14714 | return this.conditionStack.pop();
|
14715 | },
|
14716 | _currentRules: function _currentRules() {
|
14717 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
14718 | },
|
14719 | topState: function topState() {
|
14720 | return this.conditionStack[this.conditionStack.length - 2];
|
14721 | },
|
14722 | pushState: function begin(condition) {
|
14723 | this.begin(condition);
|
14724 | } };
|
14725 | lexer.options = {};
|
14726 | lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START
|
14727 | /*``*/) {
|
14728 |
|
14729 | function strip(start, end) {
|
14730 | return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end);
|
14731 | }
|
14732 |
|
14733 | var YYSTATE = YY_START;
|
14734 | switch ($avoiding_name_collisions) {
|
14735 | case 0:
|
14736 | if (yy_.yytext.slice(-2) === "\\\\") {
|
14737 | strip(0, 1);
|
14738 | this.begin("mu");
|
14739 | } else if (yy_.yytext.slice(-1) === "\\") {
|
14740 | strip(0, 1);
|
14741 | this.begin("emu");
|
14742 | } else {
|
14743 | this.begin("mu");
|
14744 | }
|
14745 | if (yy_.yytext) return 15;
|
14746 |
|
14747 | break;
|
14748 | case 1:
|
14749 | return 15;
|
14750 | break;
|
14751 | case 2:
|
14752 | this.popState();
|
14753 | return 15;
|
14754 |
|
14755 | break;
|
14756 | case 3:
|
14757 | this.begin('raw');return 15;
|
14758 | break;
|
14759 | case 4:
|
14760 | this.popState();
|
14761 |
|
14762 |
|
14763 |
|
14764 | if (this.conditionStack[this.conditionStack.length - 1] === 'raw') {
|
14765 | return 15;
|
14766 | } else {
|
14767 | yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9);
|
14768 | return 'END_RAW_BLOCK';
|
14769 | }
|
14770 |
|
14771 | break;
|
14772 | case 5:
|
14773 | return 15;
|
14774 | break;
|
14775 | case 6:
|
14776 | this.popState();
|
14777 | return 14;
|
14778 |
|
14779 | break;
|
14780 | case 7:
|
14781 | return 65;
|
14782 | break;
|
14783 | case 8:
|
14784 | return 68;
|
14785 | break;
|
14786 | case 9:
|
14787 | return 19;
|
14788 | break;
|
14789 | case 10:
|
14790 | this.popState();
|
14791 | this.begin('raw');
|
14792 | return 23;
|
14793 |
|
14794 | break;
|
14795 | case 11:
|
14796 | return 55;
|
14797 | break;
|
14798 | case 12:
|
14799 | return 60;
|
14800 | break;
|
14801 | case 13:
|
14802 | return 29;
|
14803 | break;
|
14804 | case 14:
|
14805 | return 47;
|
14806 | break;
|
14807 | case 15:
|
14808 | this.popState();return 44;
|
14809 | break;
|
14810 | case 16:
|
14811 | this.popState();return 44;
|
14812 | break;
|
14813 | case 17:
|
14814 | return 34;
|
14815 | break;
|
14816 | case 18:
|
14817 | return 39;
|
14818 | break;
|
14819 | case 19:
|
14820 | return 51;
|
14821 | break;
|
14822 | case 20:
|
14823 | return 48;
|
14824 | break;
|
14825 | case 21:
|
14826 | this.unput(yy_.yytext);
|
14827 | this.popState();
|
14828 | this.begin('com');
|
14829 |
|
14830 | break;
|
14831 | case 22:
|
14832 | this.popState();
|
14833 | return 14;
|
14834 |
|
14835 | break;
|
14836 | case 23:
|
14837 | return 48;
|
14838 | break;
|
14839 | case 24:
|
14840 | return 73;
|
14841 | break;
|
14842 | case 25:
|
14843 | return 72;
|
14844 | break;
|
14845 | case 26:
|
14846 | return 72;
|
14847 | break;
|
14848 | case 27:
|
14849 | return 87;
|
14850 | break;
|
14851 | case 28:
|
14852 |
|
14853 | break;
|
14854 | case 29:
|
14855 | this.popState();return 54;
|
14856 | break;
|
14857 | case 30:
|
14858 | this.popState();return 33;
|
14859 | break;
|
14860 | case 31:
|
14861 | yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80;
|
14862 | break;
|
14863 | case 32:
|
14864 | yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80;
|
14865 | break;
|
14866 | case 33:
|
14867 | return 85;
|
14868 | break;
|
14869 | case 34:
|
14870 | return 82;
|
14871 | break;
|
14872 | case 35:
|
14873 | return 82;
|
14874 | break;
|
14875 | case 36:
|
14876 | return 83;
|
14877 | break;
|
14878 | case 37:
|
14879 | return 84;
|
14880 | break;
|
14881 | case 38:
|
14882 | return 81;
|
14883 | break;
|
14884 | case 39:
|
14885 | return 75;
|
14886 | break;
|
14887 | case 40:
|
14888 | return 77;
|
14889 | break;
|
14890 | case 41:
|
14891 | return 72;
|
14892 | break;
|
14893 | case 42:
|
14894 | yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;
|
14895 | break;
|
14896 | case 43:
|
14897 | return 'INVALID';
|
14898 | break;
|
14899 | case 44:
|
14900 | return 5;
|
14901 | break;
|
14902 | }
|
14903 | };
|
14904 | lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
|
14905 | lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
|
14906 | return lexer;
|
14907 | })();
|
14908 | parser.lexer = lexer;
|
14909 | function Parser() {
|
14910 | this.yy = {};
|
14911 | }Parser.prototype = parser;parser.Parser = Parser;
|
14912 | return new Parser();
|
14913 | })();exports["default"] = handlebars;
|
14914 | module.exports = exports["default"];
|
14915 |
|
14916 | }),
|
14917 |
|
14918 | (function(module, exports, __webpack_require__) {
|
14919 |
|
14920 | 'use strict';
|
14921 |
|
14922 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
14923 |
|
14924 | exports.__esModule = true;
|
14925 |
|
14926 | var _visitor = __webpack_require__(39);
|
14927 |
|
14928 | var _visitor2 = _interopRequireDefault(_visitor);
|
14929 |
|
14930 | function WhitespaceControl() {
|
14931 | var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
14932 |
|
14933 | this.options = options;
|
14934 | }
|
14935 | WhitespaceControl.prototype = new _visitor2['default']();
|
14936 |
|
14937 | WhitespaceControl.prototype.Program = function (program) {
|
14938 | var doStandalone = !this.options.ignoreStandalone;
|
14939 |
|
14940 | var isRoot = !this.isRootSeen;
|
14941 | this.isRootSeen = true;
|
14942 |
|
14943 | var body = program.body;
|
14944 | for (var i = 0, l = body.length; i < l; i++) {
|
14945 | var current = body[i],
|
14946 | strip = this.accept(current);
|
14947 |
|
14948 | if (!strip) {
|
14949 | continue;
|
14950 | }
|
14951 |
|
14952 | var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),
|
14953 | _isNextWhitespace = isNextWhitespace(body, i, isRoot),
|
14954 | openStandalone = strip.openStandalone && _isPrevWhitespace,
|
14955 | closeStandalone = strip.closeStandalone && _isNextWhitespace,
|
14956 | inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
|
14957 |
|
14958 | if (strip.close) {
|
14959 | omitRight(body, i, true);
|
14960 | }
|
14961 | if (strip.open) {
|
14962 | omitLeft(body, i, true);
|
14963 | }
|
14964 |
|
14965 | if (doStandalone && inlineStandalone) {
|
14966 | omitRight(body, i);
|
14967 |
|
14968 | if (omitLeft(body, i)) {
|
14969 |
|
14970 | if (current.type === 'PartialStatement') {
|
14971 |
|
14972 | current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
|
14973 | }
|
14974 | }
|
14975 | }
|
14976 | if (doStandalone && openStandalone) {
|
14977 | omitRight((current.program || current.inverse).body);
|
14978 |
|
14979 |
|
14980 | omitLeft(body, i);
|
14981 | }
|
14982 | if (doStandalone && closeStandalone) {
|
14983 |
|
14984 | omitRight(body, i);
|
14985 |
|
14986 | omitLeft((current.inverse || current.program).body);
|
14987 | }
|
14988 | }
|
14989 |
|
14990 | return program;
|
14991 | };
|
14992 |
|
14993 | WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) {
|
14994 | this.accept(block.program);
|
14995 | this.accept(block.inverse);
|
14996 |
|
14997 |
|
14998 | var program = block.program || block.inverse,
|
14999 | inverse = block.program && block.inverse,
|
15000 | firstInverse = inverse,
|
15001 | lastInverse = inverse;
|
15002 |
|
15003 | if (inverse && inverse.chained) {
|
15004 | firstInverse = inverse.body[0].program;
|
15005 |
|
15006 |
|
15007 | while (lastInverse.chained) {
|
15008 | lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
|
15009 | }
|
15010 | }
|
15011 |
|
15012 | var strip = {
|
15013 | open: block.openStrip.open,
|
15014 | close: block.closeStrip.close,
|
15015 |
|
15016 |
|
15017 |
|
15018 | openStandalone: isNextWhitespace(program.body),
|
15019 | closeStandalone: isPrevWhitespace((firstInverse || program).body)
|
15020 | };
|
15021 |
|
15022 | if (block.openStrip.close) {
|
15023 | omitRight(program.body, null, true);
|
15024 | }
|
15025 |
|
15026 | if (inverse) {
|
15027 | var inverseStrip = block.inverseStrip;
|
15028 |
|
15029 | if (inverseStrip.open) {
|
15030 | omitLeft(program.body, null, true);
|
15031 | }
|
15032 |
|
15033 | if (inverseStrip.close) {
|
15034 | omitRight(firstInverse.body, null, true);
|
15035 | }
|
15036 | if (block.closeStrip.open) {
|
15037 | omitLeft(lastInverse.body, null, true);
|
15038 | }
|
15039 |
|
15040 |
|
15041 | if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
|
15042 | omitLeft(program.body);
|
15043 | omitRight(firstInverse.body);
|
15044 | }
|
15045 | } else if (block.closeStrip.open) {
|
15046 | omitLeft(program.body, null, true);
|
15047 | }
|
15048 |
|
15049 | return strip;
|
15050 | };
|
15051 |
|
15052 | WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) {
|
15053 | return mustache.strip;
|
15054 | };
|
15055 |
|
15056 | WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) {
|
15057 |
|
15058 | var strip = node.strip || {};
|
15059 | return {
|
15060 | inlineStandalone: true,
|
15061 | open: strip.open,
|
15062 | close: strip.close
|
15063 | };
|
15064 | };
|
15065 |
|
15066 | function isPrevWhitespace(body, i, isRoot) {
|
15067 | if (i === undefined) {
|
15068 | i = body.length;
|
15069 | }
|
15070 |
|
15071 |
|
15072 |
|
15073 | var prev = body[i - 1],
|
15074 | sibling = body[i - 2];
|
15075 | if (!prev) {
|
15076 | return isRoot;
|
15077 | }
|
15078 |
|
15079 | if (prev.type === 'ContentStatement') {
|
15080 | return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
|
15081 | }
|
15082 | }
|
15083 | function isNextWhitespace(body, i, isRoot) {
|
15084 | if (i === undefined) {
|
15085 | i = -1;
|
15086 | }
|
15087 |
|
15088 | var next = body[i + 1],
|
15089 | sibling = body[i + 2];
|
15090 | if (!next) {
|
15091 | return isRoot;
|
15092 | }
|
15093 |
|
15094 | if (next.type === 'ContentStatement') {
|
15095 | return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
|
15096 | }
|
15097 | }
|
15098 |
|
15099 |
|
15100 |
|
15101 |
|
15102 |
|
15103 |
|
15104 |
|
15105 |
|
15106 | function omitRight(body, i, multiple) {
|
15107 | var current = body[i == null ? 0 : i + 1];
|
15108 | if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) {
|
15109 | return;
|
15110 | }
|
15111 |
|
15112 | var original = current.value;
|
15113 | current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, '');
|
15114 | current.rightStripped = current.value !== original;
|
15115 | }
|
15116 |
|
15117 |
|
15118 |
|
15119 |
|
15120 |
|
15121 |
|
15122 |
|
15123 |
|
15124 | function omitLeft(body, i, multiple) {
|
15125 | var current = body[i == null ? body.length - 1 : i - 1];
|
15126 | if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) {
|
15127 | return;
|
15128 | }
|
15129 |
|
15130 |
|
15131 | var original = current.value;
|
15132 | current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, '');
|
15133 | current.leftStripped = current.value !== original;
|
15134 | return current.leftStripped;
|
15135 | }
|
15136 |
|
15137 | exports['default'] = WhitespaceControl;
|
15138 | module.exports = exports['default'];
|
15139 |
|
15140 | }),
|
15141 |
|
15142 | (function(module, exports, __webpack_require__) {
|
15143 |
|
15144 | 'use strict';
|
15145 |
|
15146 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
15147 |
|
15148 | exports.__esModule = true;
|
15149 |
|
15150 | var _exception = __webpack_require__(6);
|
15151 |
|
15152 | var _exception2 = _interopRequireDefault(_exception);
|
15153 |
|
15154 | function Visitor() {
|
15155 | this.parents = [];
|
15156 | }
|
15157 |
|
15158 | Visitor.prototype = {
|
15159 | constructor: Visitor,
|
15160 | mutating: false,
|
15161 |
|
15162 | // Visits a given value. If mutating, will replace the value if necessary.
|
15163 | acceptKey: function acceptKey(node, name) {
|
15164 | var value = this.accept(node[name]);
|
15165 | if (this.mutating) {
|
15166 |
|
15167 |
|
15168 | if (value && !Visitor.prototype[value.type]) {
|
15169 | throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
|
15170 | }
|
15171 | node[name] = value;
|
15172 | }
|
15173 | },
|
15174 |
|
15175 |
|
15176 |
|
15177 | acceptRequired: function acceptRequired(node, name) {
|
15178 | this.acceptKey(node, name);
|
15179 |
|
15180 | if (!node[name]) {
|
15181 | throw new _exception2['default'](node.type + ' requires ' + name);
|
15182 | }
|
15183 | },
|
15184 |
|
15185 |
|
15186 |
|
15187 | acceptArray: function acceptArray(array) {
|
15188 | for (var i = 0, l = array.length; i < l; i++) {
|
15189 | this.acceptKey(array, i);
|
15190 |
|
15191 | if (!array[i]) {
|
15192 | array.splice(i, 1);
|
15193 | i--;
|
15194 | l--;
|
15195 | }
|
15196 | }
|
15197 | },
|
15198 |
|
15199 | accept: function accept(object) {
|
15200 | if (!object) {
|
15201 | return;
|
15202 | }
|
15203 |
|
15204 |
|
15205 | if (!this[object.type]) {
|
15206 | throw new _exception2['default']('Unknown type: ' + object.type, object);
|
15207 | }
|
15208 |
|
15209 | if (this.current) {
|
15210 | this.parents.unshift(this.current);
|
15211 | }
|
15212 | this.current = object;
|
15213 |
|
15214 | var ret = this[object.type](object);
|
15215 |
|
15216 | this.current = this.parents.shift();
|
15217 |
|
15218 | if (!this.mutating || ret) {
|
15219 | return ret;
|
15220 | } else if (ret !== false) {
|
15221 | return object;
|
15222 | }
|
15223 | },
|
15224 |
|
15225 | Program: function Program(program) {
|
15226 | this.acceptArray(program.body);
|
15227 | },
|
15228 |
|
15229 | MustacheStatement: visitSubExpression,
|
15230 | Decorator: visitSubExpression,
|
15231 |
|
15232 | BlockStatement: visitBlock,
|
15233 | DecoratorBlock: visitBlock,
|
15234 |
|
15235 | PartialStatement: visitPartial,
|
15236 | PartialBlockStatement: function PartialBlockStatement(partial) {
|
15237 | visitPartial.call(this, partial);
|
15238 |
|
15239 | this.acceptKey(partial, 'program');
|
15240 | },
|
15241 |
|
15242 | ContentStatement: function ContentStatement() /* content */{},
|
15243 | CommentStatement: function CommentStatement() /* comment */{},
|
15244 |
|
15245 | SubExpression: visitSubExpression,
|
15246 |
|
15247 | PathExpression: function PathExpression() /* path */{},
|
15248 |
|
15249 | StringLiteral: function StringLiteral() /* string */{},
|
15250 | NumberLiteral: function NumberLiteral() /* number */{},
|
15251 | BooleanLiteral: function BooleanLiteral() /* bool */{},
|
15252 | UndefinedLiteral: function UndefinedLiteral() /* literal */{},
|
15253 | NullLiteral: function NullLiteral() /* literal */{},
|
15254 |
|
15255 | Hash: function Hash(hash) {
|
15256 | this.acceptArray(hash.pairs);
|
15257 | },
|
15258 | HashPair: function HashPair(pair) {
|
15259 | this.acceptRequired(pair, 'value');
|
15260 | }
|
15261 | };
|
15262 |
|
15263 | function visitSubExpression(mustache) {
|
15264 | this.acceptRequired(mustache, 'path');
|
15265 | this.acceptArray(mustache.params);
|
15266 | this.acceptKey(mustache, 'hash');
|
15267 | }
|
15268 | function visitBlock(block) {
|
15269 | visitSubExpression.call(this, block);
|
15270 |
|
15271 | this.acceptKey(block, 'program');
|
15272 | this.acceptKey(block, 'inverse');
|
15273 | }
|
15274 | function visitPartial(partial) {
|
15275 | this.acceptRequired(partial, 'name');
|
15276 | this.acceptArray(partial.params);
|
15277 | this.acceptKey(partial, 'hash');
|
15278 | }
|
15279 |
|
15280 | exports['default'] = Visitor;
|
15281 | module.exports = exports['default'];
|
15282 |
|
15283 | }),
|
15284 |
|
15285 | (function(module, exports, __webpack_require__) {
|
15286 |
|
15287 | 'use strict';
|
15288 |
|
15289 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
15290 |
|
15291 | exports.__esModule = true;
|
15292 | exports.SourceLocation = SourceLocation;
|
15293 | exports.id = id;
|
15294 | exports.stripFlags = stripFlags;
|
15295 | exports.stripComment = stripComment;
|
15296 | exports.preparePath = preparePath;
|
15297 | exports.prepareMustache = prepareMustache;
|
15298 | exports.prepareRawBlock = prepareRawBlock;
|
15299 | exports.prepareBlock = prepareBlock;
|
15300 | exports.prepareProgram = prepareProgram;
|
15301 | exports.preparePartialBlock = preparePartialBlock;
|
15302 |
|
15303 | var _exception = __webpack_require__(6);
|
15304 |
|
15305 | var _exception2 = _interopRequireDefault(_exception);
|
15306 |
|
15307 | function validateClose(open, close) {
|
15308 | close = close.path ? close.path.original : close;
|
15309 |
|
15310 | if (open.path.original !== close) {
|
15311 | var errorNode = { loc: open.path.loc };
|
15312 |
|
15313 | throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode);
|
15314 | }
|
15315 | }
|
15316 |
|
15317 | function SourceLocation(source, locInfo) {
|
15318 | this.source = source;
|
15319 | this.start = {
|
15320 | line: locInfo.first_line,
|
15321 | column: locInfo.first_column
|
15322 | };
|
15323 | this.end = {
|
15324 | line: locInfo.last_line,
|
15325 | column: locInfo.last_column
|
15326 | };
|
15327 | }
|
15328 |
|
15329 | function id(token) {
|
15330 | if (/^\[.*\]$/.test(token)) {
|
15331 | return token.substr(1, token.length - 2);
|
15332 | } else {
|
15333 | return token;
|
15334 | }
|
15335 | }
|
15336 |
|
15337 | function stripFlags(open, close) {
|
15338 | return {
|
15339 | open: open.charAt(2) === '~',
|
15340 | close: close.charAt(close.length - 3) === '~'
|
15341 | };
|
15342 | }
|
15343 |
|
15344 | function stripComment(comment) {
|
15345 | return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, '');
|
15346 | }
|
15347 |
|
15348 | function preparePath(data, parts, loc) {
|
15349 | loc = this.locInfo(loc);
|
15350 |
|
15351 | var original = data ? '@' : '',
|
15352 | dig = [],
|
15353 | depth = 0;
|
15354 |
|
15355 | for (var i = 0, l = parts.length; i < l; i++) {
|
15356 | var part = parts[i].part,
|
15357 |
|
15358 |
|
15359 |
|
15360 | isLiteral = parts[i].original !== part;
|
15361 | original += (parts[i].separator || '') + part;
|
15362 |
|
15363 | if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
|
15364 | if (dig.length > 0) {
|
15365 | throw new _exception2['default']('Invalid path: ' + original, { loc: loc });
|
15366 | } else if (part === '..') {
|
15367 | depth++;
|
15368 | }
|
15369 | } else {
|
15370 | dig.push(part);
|
15371 | }
|
15372 | }
|
15373 |
|
15374 | return {
|
15375 | type: 'PathExpression',
|
15376 | data: data,
|
15377 | depth: depth,
|
15378 | parts: dig,
|
15379 | original: original,
|
15380 | loc: loc
|
15381 | };
|
15382 | }
|
15383 |
|
15384 | function prepareMustache(path, params, hash, open, strip, locInfo) {
|
15385 |
|
15386 | var escapeFlag = open.charAt(3) || open.charAt(2),
|
15387 | escaped = escapeFlag !== '{' && escapeFlag !== '&';
|
15388 |
|
15389 | var decorator = /\*/.test(open);
|
15390 | return {
|
15391 | type: decorator ? 'Decorator' : 'MustacheStatement',
|
15392 | path: path,
|
15393 | params: params,
|
15394 | hash: hash,
|
15395 | escaped: escaped,
|
15396 | strip: strip,
|
15397 | loc: this.locInfo(locInfo)
|
15398 | };
|
15399 | }
|
15400 |
|
15401 | function prepareRawBlock(openRawBlock, contents, close, locInfo) {
|
15402 | validateClose(openRawBlock, close);
|
15403 |
|
15404 | locInfo = this.locInfo(locInfo);
|
15405 | var program = {
|
15406 | type: 'Program',
|
15407 | body: contents,
|
15408 | strip: {},
|
15409 | loc: locInfo
|
15410 | };
|
15411 |
|
15412 | return {
|
15413 | type: 'BlockStatement',
|
15414 | path: openRawBlock.path,
|
15415 | params: openRawBlock.params,
|
15416 | hash: openRawBlock.hash,
|
15417 | program: program,
|
15418 | openStrip: {},
|
15419 | inverseStrip: {},
|
15420 | closeStrip: {},
|
15421 | loc: locInfo
|
15422 | };
|
15423 | }
|
15424 |
|
15425 | function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
|
15426 | if (close && close.path) {
|
15427 | validateClose(openBlock, close);
|
15428 | }
|
15429 |
|
15430 | var decorator = /\*/.test(openBlock.open);
|
15431 |
|
15432 | program.blockParams = openBlock.blockParams;
|
15433 |
|
15434 | var inverse = undefined,
|
15435 | inverseStrip = undefined;
|
15436 |
|
15437 | if (inverseAndProgram) {
|
15438 | if (decorator) {
|
15439 | throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram);
|
15440 | }
|
15441 |
|
15442 | if (inverseAndProgram.chain) {
|
15443 | inverseAndProgram.program.body[0].closeStrip = close.strip;
|
15444 | }
|
15445 |
|
15446 | inverseStrip = inverseAndProgram.strip;
|
15447 | inverse = inverseAndProgram.program;
|
15448 | }
|
15449 |
|
15450 | if (inverted) {
|
15451 | inverted = inverse;
|
15452 | inverse = program;
|
15453 | program = inverted;
|
15454 | }
|
15455 |
|
15456 | return {
|
15457 | type: decorator ? 'DecoratorBlock' : 'BlockStatement',
|
15458 | path: openBlock.path,
|
15459 | params: openBlock.params,
|
15460 | hash: openBlock.hash,
|
15461 | program: program,
|
15462 | inverse: inverse,
|
15463 | openStrip: openBlock.strip,
|
15464 | inverseStrip: inverseStrip,
|
15465 | closeStrip: close && close.strip,
|
15466 | loc: this.locInfo(locInfo)
|
15467 | };
|
15468 | }
|
15469 |
|
15470 | function prepareProgram(statements, loc) {
|
15471 | if (!loc && statements.length) {
|
15472 | var firstLoc = statements[0].loc,
|
15473 | lastLoc = statements[statements.length - 1].loc;
|
15474 |
|
15475 |
|
15476 | if (firstLoc && lastLoc) {
|
15477 | loc = {
|
15478 | source: firstLoc.source,
|
15479 | start: {
|
15480 | line: firstLoc.start.line,
|
15481 | column: firstLoc.start.column
|
15482 | },
|
15483 | end: {
|
15484 | line: lastLoc.end.line,
|
15485 | column: lastLoc.end.column
|
15486 | }
|
15487 | };
|
15488 | }
|
15489 | }
|
15490 |
|
15491 | return {
|
15492 | type: 'Program',
|
15493 | body: statements,
|
15494 | strip: {},
|
15495 | loc: loc
|
15496 | };
|
15497 | }
|
15498 |
|
15499 | function preparePartialBlock(open, program, close, locInfo) {
|
15500 | validateClose(open, close);
|
15501 |
|
15502 | return {
|
15503 | type: 'PartialBlockStatement',
|
15504 | name: open.path,
|
15505 | params: open.params,
|
15506 | hash: open.hash,
|
15507 | program: program,
|
15508 | openStrip: open.strip,
|
15509 | closeStrip: close && close.strip,
|
15510 | loc: this.locInfo(locInfo)
|
15511 | };
|
15512 | }
|
15513 |
|
15514 | }),
|
15515 |
|
15516 | (function(module, exports, __webpack_require__) {
|
15517 |
|
15518 |
|
15519 |
|
15520 | 'use strict';
|
15521 |
|
15522 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
15523 |
|
15524 | exports.__esModule = true;
|
15525 | exports.Compiler = Compiler;
|
15526 | exports.precompile = precompile;
|
15527 | exports.compile = compile;
|
15528 |
|
15529 | var _exception = __webpack_require__(6);
|
15530 |
|
15531 | var _exception2 = _interopRequireDefault(_exception);
|
15532 |
|
15533 | var _utils = __webpack_require__(5);
|
15534 |
|
15535 | var _ast = __webpack_require__(35);
|
15536 |
|
15537 | var _ast2 = _interopRequireDefault(_ast);
|
15538 |
|
15539 | var slice = [].slice;
|
15540 |
|
15541 | function Compiler() {}
|
15542 |
|
15543 |
|
15544 |
|
15545 |
|
15546 |
|
15547 |
|
15548 | Compiler.prototype = {
|
15549 | compiler: Compiler,
|
15550 |
|
15551 | equals: function equals(other) {
|
15552 | var len = this.opcodes.length;
|
15553 | if (other.opcodes.length !== len) {
|
15554 | return false;
|
15555 | }
|
15556 |
|
15557 | for (var i = 0; i < len; i++) {
|
15558 | var opcode = this.opcodes[i],
|
15559 | otherOpcode = other.opcodes[i];
|
15560 | if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
|
15561 | return false;
|
15562 | }
|
15563 | }
|
15564 |
|
15565 |
|
15566 |
|
15567 | len = this.children.length;
|
15568 | for (var i = 0; i < len; i++) {
|
15569 | if (!this.children[i].equals(other.children[i])) {
|
15570 | return false;
|
15571 | }
|
15572 | }
|
15573 |
|
15574 | return true;
|
15575 | },
|
15576 |
|
15577 | guid: 0,
|
15578 |
|
15579 | compile: function compile(program, options) {
|
15580 | this.sourceNode = [];
|
15581 | this.opcodes = [];
|
15582 | this.children = [];
|
15583 | this.options = options;
|
15584 | this.stringParams = options.stringParams;
|
15585 | this.trackIds = options.trackIds;
|
15586 |
|
15587 | options.blockParams = options.blockParams || [];
|
15588 |
|
15589 |
|
15590 | var knownHelpers = options.knownHelpers;
|
15591 | options.knownHelpers = {
|
15592 | 'helperMissing': true,
|
15593 | 'blockHelperMissing': true,
|
15594 | 'each': true,
|
15595 | 'if': true,
|
15596 | 'unless': true,
|
15597 | 'with': true,
|
15598 | 'log': true,
|
15599 | 'lookup': true
|
15600 | };
|
15601 | if (knownHelpers) {
|
15602 |
|
15603 |
|
15604 |
|
15605 | for (var _name in knownHelpers) {
|
15606 | this.options.knownHelpers[_name] = knownHelpers[_name];
|
15607 | }
|
15608 | }
|
15609 |
|
15610 | return this.accept(program);
|
15611 | },
|
15612 |
|
15613 | compileProgram: function compileProgram(program) {
|
15614 | var childCompiler = new this.compiler(),
|
15615 |
|
15616 | result = childCompiler.compile(program, this.options),
|
15617 | guid = this.guid++;
|
15618 |
|
15619 | this.usePartial = this.usePartial || result.usePartial;
|
15620 |
|
15621 | this.children[guid] = result;
|
15622 | this.useDepths = this.useDepths || result.useDepths;
|
15623 |
|
15624 | return guid;
|
15625 | },
|
15626 |
|
15627 | accept: function accept(node) {
|
15628 |
|
15629 | if (!this[node.type]) {
|
15630 | throw new _exception2['default']('Unknown type: ' + node.type, node);
|
15631 | }
|
15632 |
|
15633 | this.sourceNode.unshift(node);
|
15634 | var ret = this[node.type](node);
|
15635 | this.sourceNode.shift();
|
15636 | return ret;
|
15637 | },
|
15638 |
|
15639 | Program: function Program(program) {
|
15640 | this.options.blockParams.unshift(program.blockParams);
|
15641 |
|
15642 | var body = program.body,
|
15643 | bodyLength = body.length;
|
15644 | for (var i = 0; i < bodyLength; i++) {
|
15645 | this.accept(body[i]);
|
15646 | }
|
15647 |
|
15648 | this.options.blockParams.shift();
|
15649 |
|
15650 | this.isSimple = bodyLength === 1;
|
15651 | this.blockParams = program.blockParams ? program.blockParams.length : 0;
|
15652 |
|
15653 | return this;
|
15654 | },
|
15655 |
|
15656 | BlockStatement: function BlockStatement(block) {
|
15657 | transformLiteralToPath(block);
|
15658 |
|
15659 | var program = block.program,
|
15660 | inverse = block.inverse;
|
15661 |
|
15662 | program = program && this.compileProgram(program);
|
15663 | inverse = inverse && this.compileProgram(inverse);
|
15664 |
|
15665 | var type = this.classifySexpr(block);
|
15666 |
|
15667 | if (type === 'helper') {
|
15668 | this.helperSexpr(block, program, inverse);
|
15669 | } else if (type === 'simple') {
|
15670 | this.simpleSexpr(block);
|
15671 |
|
15672 |
|
15673 |
|
15674 | this.opcode('pushProgram', program);
|
15675 | this.opcode('pushProgram', inverse);
|
15676 | this.opcode('emptyHash');
|
15677 | this.opcode('blockValue', block.path.original);
|
15678 | } else {
|
15679 | this.ambiguousSexpr(block, program, inverse);
|
15680 |
|
15681 |
|
15682 |
|
15683 | this.opcode('pushProgram', program);
|
15684 | this.opcode('pushProgram', inverse);
|
15685 | this.opcode('emptyHash');
|
15686 | this.opcode('ambiguousBlockValue');
|
15687 | }
|
15688 |
|
15689 | this.opcode('append');
|
15690 | },
|
15691 |
|
15692 | DecoratorBlock: function DecoratorBlock(decorator) {
|
15693 | var program = decorator.program && this.compileProgram(decorator.program);
|
15694 | var params = this.setupFullMustacheParams(decorator, program, undefined),
|
15695 | path = decorator.path;
|
15696 |
|
15697 | this.useDecorators = true;
|
15698 | this.opcode('registerDecorator', params.length, path.original);
|
15699 | },
|
15700 |
|
15701 | PartialStatement: function PartialStatement(partial) {
|
15702 | this.usePartial = true;
|
15703 |
|
15704 | var program = partial.program;
|
15705 | if (program) {
|
15706 | program = this.compileProgram(partial.program);
|
15707 | }
|
15708 |
|
15709 | var params = partial.params;
|
15710 | if (params.length > 1) {
|
15711 | throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);
|
15712 | } else if (!params.length) {
|
15713 | if (this.options.explicitPartialContext) {
|
15714 | this.opcode('pushLiteral', 'undefined');
|
15715 | } else {
|
15716 | params.push({ type: 'PathExpression', parts: [], depth: 0 });
|
15717 | }
|
15718 | }
|
15719 |
|
15720 | var partialName = partial.name.original,
|
15721 | isDynamic = partial.name.type === 'SubExpression';
|
15722 | if (isDynamic) {
|
15723 | this.accept(partial.name);
|
15724 | }
|
15725 |
|
15726 | this.setupFullMustacheParams(partial, program, undefined, true);
|
15727 |
|
15728 | var indent = partial.indent || '';
|
15729 | if (this.options.preventIndent && indent) {
|
15730 | this.opcode('appendContent', indent);
|
15731 | indent = '';
|
15732 | }
|
15733 |
|
15734 | this.opcode('invokePartial', isDynamic, partialName, indent);
|
15735 | this.opcode('append');
|
15736 | },
|
15737 | PartialBlockStatement: function PartialBlockStatement(partialBlock) {
|
15738 | this.PartialStatement(partialBlock);
|
15739 | },
|
15740 |
|
15741 | MustacheStatement: function MustacheStatement(mustache) {
|
15742 | this.SubExpression(mustache);
|
15743 |
|
15744 | if (mustache.escaped && !this.options.noEscape) {
|
15745 | this.opcode('appendEscaped');
|
15746 | } else {
|
15747 | this.opcode('append');
|
15748 | }
|
15749 | },
|
15750 | Decorator: function Decorator(decorator) {
|
15751 | this.DecoratorBlock(decorator);
|
15752 | },
|
15753 |
|
15754 | ContentStatement: function ContentStatement(content) {
|
15755 | if (content.value) {
|
15756 | this.opcode('appendContent', content.value);
|
15757 | }
|
15758 | },
|
15759 |
|
15760 | CommentStatement: function CommentStatement() {},
|
15761 |
|
15762 | SubExpression: function SubExpression(sexpr) {
|
15763 | transformLiteralToPath(sexpr);
|
15764 | var type = this.classifySexpr(sexpr);
|
15765 |
|
15766 | if (type === 'simple') {
|
15767 | this.simpleSexpr(sexpr);
|
15768 | } else if (type === 'helper') {
|
15769 | this.helperSexpr(sexpr);
|
15770 | } else {
|
15771 | this.ambiguousSexpr(sexpr);
|
15772 | }
|
15773 | },
|
15774 | ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
|
15775 | var path = sexpr.path,
|
15776 | name = path.parts[0],
|
15777 | isBlock = program != null || inverse != null;
|
15778 |
|
15779 | this.opcode('getContext', path.depth);
|
15780 |
|
15781 | this.opcode('pushProgram', program);
|
15782 | this.opcode('pushProgram', inverse);
|
15783 |
|
15784 | path.strict = true;
|
15785 | this.accept(path);
|
15786 |
|
15787 | this.opcode('invokeAmbiguous', name, isBlock);
|
15788 | },
|
15789 |
|
15790 | simpleSexpr: function simpleSexpr(sexpr) {
|
15791 | var path = sexpr.path;
|
15792 | path.strict = true;
|
15793 | this.accept(path);
|
15794 | this.opcode('resolvePossibleLambda');
|
15795 | },
|
15796 |
|
15797 | helperSexpr: function helperSexpr(sexpr, program, inverse) {
|
15798 | var params = this.setupFullMustacheParams(sexpr, program, inverse),
|
15799 | path = sexpr.path,
|
15800 | name = path.parts[0];
|
15801 |
|
15802 | if (this.options.knownHelpers[name]) {
|
15803 | this.opcode('invokeKnownHelper', params.length, name);
|
15804 | } else if (this.options.knownHelpersOnly) {
|
15805 | throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
|
15806 | } else {
|
15807 | path.strict = true;
|
15808 | path.falsy = true;
|
15809 |
|
15810 | this.accept(path);
|
15811 | this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path));
|
15812 | }
|
15813 | },
|
15814 |
|
15815 | PathExpression: function PathExpression(path) {
|
15816 | this.addDepth(path.depth);
|
15817 | this.opcode('getContext', path.depth);
|
15818 |
|
15819 | var name = path.parts[0],
|
15820 | scoped = _ast2['default'].helpers.scopedId(path),
|
15821 | blockParamId = !path.depth && !scoped && this.blockParamIndex(name);
|
15822 |
|
15823 | if (blockParamId) {
|
15824 | this.opcode('lookupBlockParam', blockParamId, path.parts);
|
15825 | } else if (!name) {
|
15826 |
|
15827 | this.opcode('pushContext');
|
15828 | } else if (path.data) {
|
15829 | this.options.data = true;
|
15830 | this.opcode('lookupData', path.depth, path.parts, path.strict);
|
15831 | } else {
|
15832 | this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped);
|
15833 | }
|
15834 | },
|
15835 |
|
15836 | StringLiteral: function StringLiteral(string) {
|
15837 | this.opcode('pushString', string.value);
|
15838 | },
|
15839 |
|
15840 | NumberLiteral: function NumberLiteral(number) {
|
15841 | this.opcode('pushLiteral', number.value);
|
15842 | },
|
15843 |
|
15844 | BooleanLiteral: function BooleanLiteral(bool) {
|
15845 | this.opcode('pushLiteral', bool.value);
|
15846 | },
|
15847 |
|
15848 | UndefinedLiteral: function UndefinedLiteral() {
|
15849 | this.opcode('pushLiteral', 'undefined');
|
15850 | },
|
15851 |
|
15852 | NullLiteral: function NullLiteral() {
|
15853 | this.opcode('pushLiteral', 'null');
|
15854 | },
|
15855 |
|
15856 | Hash: function Hash(hash) {
|
15857 | var pairs = hash.pairs,
|
15858 | i = 0,
|
15859 | l = pairs.length;
|
15860 |
|
15861 | this.opcode('pushHash');
|
15862 |
|
15863 | for (; i < l; i++) {
|
15864 | this.pushParam(pairs[i].value);
|
15865 | }
|
15866 | while (i--) {
|
15867 | this.opcode('assignToHash', pairs[i].key);
|
15868 | }
|
15869 | this.opcode('popHash');
|
15870 | },
|
15871 |
|
15872 |
|
15873 | opcode: function opcode(name) {
|
15874 | this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc });
|
15875 | },
|
15876 |
|
15877 | addDepth: function addDepth(depth) {
|
15878 | if (!depth) {
|
15879 | return;
|
15880 | }
|
15881 |
|
15882 | this.useDepths = true;
|
15883 | },
|
15884 |
|
15885 | classifySexpr: function classifySexpr(sexpr) {
|
15886 | var isSimple = _ast2['default'].helpers.simpleId(sexpr.path);
|
15887 |
|
15888 | var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
|
15889 |
|
15890 |
|
15891 |
|
15892 | var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr);
|
15893 |
|
15894 |
|
15895 |
|
15896 |
|
15897 | var isEligible = !isBlockParam && (isHelper || isSimple);
|
15898 |
|
15899 |
|
15900 |
|
15901 | if (isEligible && !isHelper) {
|
15902 | var _name2 = sexpr.path.parts[0],
|
15903 | options = this.options;
|
15904 |
|
15905 | if (options.knownHelpers[_name2]) {
|
15906 | isHelper = true;
|
15907 | } else if (options.knownHelpersOnly) {
|
15908 | isEligible = false;
|
15909 | }
|
15910 | }
|
15911 |
|
15912 | if (isHelper) {
|
15913 | return 'helper';
|
15914 | } else if (isEligible) {
|
15915 | return 'ambiguous';
|
15916 | } else {
|
15917 | return 'simple';
|
15918 | }
|
15919 | },
|
15920 |
|
15921 | pushParams: function pushParams(params) {
|
15922 | for (var i = 0, l = params.length; i < l; i++) {
|
15923 | this.pushParam(params[i]);
|
15924 | }
|
15925 | },
|
15926 |
|
15927 | pushParam: function pushParam(val) {
|
15928 | var value = val.value != null ? val.value : val.original || '';
|
15929 |
|
15930 | if (this.stringParams) {
|
15931 | if (value.replace) {
|
15932 | value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
|
15933 | }
|
15934 |
|
15935 | if (val.depth) {
|
15936 | this.addDepth(val.depth);
|
15937 | }
|
15938 | this.opcode('getContext', val.depth || 0);
|
15939 | this.opcode('pushStringParam', value, val.type);
|
15940 |
|
15941 | if (val.type === 'SubExpression') {
|
15942 |
|
15943 |
|
15944 | this.accept(val);
|
15945 | }
|
15946 | } else {
|
15947 | if (this.trackIds) {
|
15948 | var blockParamIndex = undefined;
|
15949 | if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) {
|
15950 | blockParamIndex = this.blockParamIndex(val.parts[0]);
|
15951 | }
|
15952 | if (blockParamIndex) {
|
15953 | var blockParamChild = val.parts.slice(1).join('.');
|
15954 | this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
|
15955 | } else {
|
15956 | value = val.original || value;
|
15957 | if (value.replace) {
|
15958 | value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, '');
|
15959 | }
|
15960 |
|
15961 | this.opcode('pushId', val.type, value);
|
15962 | }
|
15963 | }
|
15964 | this.accept(val);
|
15965 | }
|
15966 | },
|
15967 |
|
15968 | setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
|
15969 | var params = sexpr.params;
|
15970 | this.pushParams(params);
|
15971 |
|
15972 | this.opcode('pushProgram', program);
|
15973 | this.opcode('pushProgram', inverse);
|
15974 |
|
15975 | if (sexpr.hash) {
|
15976 | this.accept(sexpr.hash);
|
15977 | } else {
|
15978 | this.opcode('emptyHash', omitEmpty);
|
15979 | }
|
15980 |
|
15981 | return params;
|
15982 | },
|
15983 |
|
15984 | blockParamIndex: function blockParamIndex(name) {
|
15985 | for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
|
15986 | var blockParams = this.options.blockParams[depth],
|
15987 | param = blockParams && _utils.indexOf(blockParams, name);
|
15988 | if (blockParams && param >= 0) {
|
15989 | return [depth, param];
|
15990 | }
|
15991 | }
|
15992 | }
|
15993 | };
|
15994 |
|
15995 | function precompile(input, options, env) {
|
15996 | if (input == null || typeof input !== 'string' && input.type !== 'Program') {
|
15997 | throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
|
15998 | }
|
15999 |
|
16000 | options = options || {};
|
16001 | if (!('data' in options)) {
|
16002 | options.data = true;
|
16003 | }
|
16004 | if (options.compat) {
|
16005 | options.useDepths = true;
|
16006 | }
|
16007 |
|
16008 | var ast = env.parse(input, options),
|
16009 | environment = new env.Compiler().compile(ast, options);
|
16010 | return new env.JavaScriptCompiler().compile(environment, options);
|
16011 | }
|
16012 |
|
16013 | function compile(input, options, env) {
|
16014 | if (options === undefined) options = {};
|
16015 |
|
16016 | if (input == null || typeof input !== 'string' && input.type !== 'Program') {
|
16017 | throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
|
16018 | }
|
16019 |
|
16020 | options = _utils.extend({}, options);
|
16021 | if (!('data' in options)) {
|
16022 | options.data = true;
|
16023 | }
|
16024 | if (options.compat) {
|
16025 | options.useDepths = true;
|
16026 | }
|
16027 |
|
16028 | var compiled = undefined;
|
16029 |
|
16030 | function compileInput() {
|
16031 | var ast = env.parse(input, options),
|
16032 | environment = new env.Compiler().compile(ast, options),
|
16033 | templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
|
16034 | return env.template(templateSpec);
|
16035 | }
|
16036 |
|
16037 |
|
16038 | function ret(context, execOptions) {
|
16039 | if (!compiled) {
|
16040 | compiled = compileInput();
|
16041 | }
|
16042 | return compiled.call(this, context, execOptions);
|
16043 | }
|
16044 | ret._setup = function (setupOptions) {
|
16045 | if (!compiled) {
|
16046 | compiled = compileInput();
|
16047 | }
|
16048 | return compiled._setup(setupOptions);
|
16049 | };
|
16050 | ret._child = function (i, data, blockParams, depths) {
|
16051 | if (!compiled) {
|
16052 | compiled = compileInput();
|
16053 | }
|
16054 | return compiled._child(i, data, blockParams, depths);
|
16055 | };
|
16056 | return ret;
|
16057 | }
|
16058 |
|
16059 | function argEquals(a, b) {
|
16060 | if (a === b) {
|
16061 | return true;
|
16062 | }
|
16063 |
|
16064 | if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) {
|
16065 | for (var i = 0; i < a.length; i++) {
|
16066 | if (!argEquals(a[i], b[i])) {
|
16067 | return false;
|
16068 | }
|
16069 | }
|
16070 | return true;
|
16071 | }
|
16072 | }
|
16073 |
|
16074 | function transformLiteralToPath(sexpr) {
|
16075 | if (!sexpr.path.parts) {
|
16076 | var literal = sexpr.path;
|
16077 |
|
16078 |
|
16079 | sexpr.path = {
|
16080 | type: 'PathExpression',
|
16081 | data: false,
|
16082 | depth: 0,
|
16083 | parts: [literal.original + ''],
|
16084 | original: literal.original + '',
|
16085 | loc: literal.loc
|
16086 | };
|
16087 | }
|
16088 | }
|
16089 |
|
16090 | }),
|
16091 |
|
16092 | (function(module, exports, __webpack_require__) {
|
16093 |
|
16094 | 'use strict';
|
16095 |
|
16096 | var _interopRequireDefault = __webpack_require__(1)['default'];
|
16097 |
|
16098 | exports.__esModule = true;
|
16099 |
|
16100 | var _base = __webpack_require__(4);
|
16101 |
|
16102 | var _exception = __webpack_require__(6);
|
16103 |
|
16104 | var _exception2 = _interopRequireDefault(_exception);
|
16105 |
|
16106 | var _utils = __webpack_require__(5);
|
16107 |
|
16108 | var _codeGen = __webpack_require__(43);
|
16109 |
|
16110 | var _codeGen2 = _interopRequireDefault(_codeGen);
|
16111 |
|
16112 | function Literal(value) {
|
16113 | this.value = value;
|
16114 | }
|
16115 |
|
16116 | function JavaScriptCompiler() {}
|
16117 |
|
16118 | JavaScriptCompiler.prototype = {
|
16119 |
|
16120 |
|
16121 | nameLookup: function nameLookup(parent, name /* , type*/) {
|
16122 | if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
|
16123 | return [parent, '.', name];
|
16124 | } else {
|
16125 | return [parent, '[', JSON.stringify(name), ']'];
|
16126 | }
|
16127 | },
|
16128 | depthedLookup: function depthedLookup(name) {
|
16129 | return [this.aliasable('container.lookup'), '(depths, "', name, '")'];
|
16130 | },
|
16131 |
|
16132 | compilerInfo: function compilerInfo() {
|
16133 | var revision = _base.COMPILER_REVISION,
|
16134 | versions = _base.REVISION_CHANGES[revision];
|
16135 | return [revision, versions];
|
16136 | },
|
16137 |
|
16138 | appendToBuffer: function appendToBuffer(source, location, explicit) {
|
16139 |
|
16140 | if (!_utils.isArray(source)) {
|
16141 | source = [source];
|
16142 | }
|
16143 | source = this.source.wrap(source, location);
|
16144 |
|
16145 | if (this.environment.isSimple) {
|
16146 | return ['return ', source, ';'];
|
16147 | } else if (explicit) {
|
16148 |
|
16149 |
|
16150 |
|
16151 | return ['buffer += ', source, ';'];
|
16152 | } else {
|
16153 | source.appendToBuffer = true;
|
16154 | return source;
|
16155 | }
|
16156 | },
|
16157 |
|
16158 | initializeBuffer: function initializeBuffer() {
|
16159 | return this.quotedString('');
|
16160 | },
|
16161 |
|
16162 |
|
16163 | compile: function compile(environment, options, context, asObject) {
|
16164 | this.environment = environment;
|
16165 | this.options = options;
|
16166 | this.stringParams = this.options.stringParams;
|
16167 | this.trackIds = this.options.trackIds;
|
16168 | this.precompile = !asObject;
|
16169 |
|
16170 | this.name = this.environment.name;
|
16171 | this.isChild = !!context;
|
16172 | this.context = context || {
|
16173 | decorators: [],
|
16174 | programs: [],
|
16175 | environments: []
|
16176 | };
|
16177 |
|
16178 | this.preamble();
|
16179 |
|
16180 | this.stackSlot = 0;
|
16181 | this.stackVars = [];
|
16182 | this.aliases = {};
|
16183 | this.registers = { list: [] };
|
16184 | this.hashes = [];
|
16185 | this.compileStack = [];
|
16186 | this.inlineStack = [];
|
16187 | this.blockParams = [];
|
16188 |
|
16189 | this.compileChildren(environment, options);
|
16190 |
|
16191 | this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;
|
16192 | this.useBlockParams = this.useBlockParams || environment.useBlockParams;
|
16193 |
|
16194 | var opcodes = environment.opcodes,
|
16195 | opcode = undefined,
|
16196 | firstLoc = undefined,
|
16197 | i = undefined,
|
16198 | l = undefined;
|
16199 |
|
16200 | for (i = 0, l = opcodes.length; i < l; i++) {
|
16201 | opcode = opcodes[i];
|
16202 |
|
16203 | this.source.currentLocation = opcode.loc;
|
16204 | firstLoc = firstLoc || opcode.loc;
|
16205 | this[opcode.opcode].apply(this, opcode.args);
|
16206 | }
|
16207 |
|
16208 |
|
16209 | this.source.currentLocation = firstLoc;
|
16210 | this.pushSource('');
|
16211 |
|
16212 |
|
16213 | if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
|
16214 | throw new _exception2['default']('Compile completed with content left on stack');
|
16215 | }
|
16216 |
|
16217 | if (!this.decorators.isEmpty()) {
|
16218 | this.useDecorators = true;
|
16219 |
|
16220 | this.decorators.prepend('var decorators = container.decorators;\n');
|
16221 | this.decorators.push('return fn;');
|
16222 |
|
16223 | if (asObject) {
|
16224 | this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]);
|
16225 | } else {
|
16226 | this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n');
|
16227 | this.decorators.push('}\n');
|
16228 | this.decorators = this.decorators.merge();
|
16229 | }
|
16230 | } else {
|
16231 | this.decorators = undefined;
|
16232 | }
|
16233 |
|
16234 | var fn = this.createFunctionContext(asObject);
|
16235 | if (!this.isChild) {
|
16236 | var ret = {
|
16237 | compiler: this.compilerInfo(),
|
16238 | main: fn
|
16239 | };
|
16240 |
|
16241 | if (this.decorators) {
|
16242 | ret.main_d = this.decorators;
|
16243 | ret.useDecorators = true;
|
16244 | }
|
16245 |
|
16246 | var _context = this.context;
|
16247 | var programs = _context.programs;
|
16248 | var decorators = _context.decorators;
|
16249 |
|
16250 | for (i = 0, l = programs.length; i < l; i++) {
|
16251 | if (programs[i]) {
|
16252 | ret[i] = programs[i];
|
16253 | if (decorators[i]) {
|
16254 | ret[i + '_d'] = decorators[i];
|
16255 | ret.useDecorators = true;
|
16256 | }
|
16257 | }
|
16258 | }
|
16259 |
|
16260 | if (this.environment.usePartial) {
|
16261 | ret.usePartial = true;
|
16262 | }
|
16263 | if (this.options.data) {
|
16264 | ret.useData = true;
|
16265 | }
|
16266 | if (this.useDepths) {
|
16267 | ret.useDepths = true;
|
16268 | }
|
16269 | if (this.useBlockParams) {
|
16270 | ret.useBlockParams = true;
|
16271 | }
|
16272 | if (this.options.compat) {
|
16273 | ret.compat = true;
|
16274 | }
|
16275 |
|
16276 | if (!asObject) {
|
16277 | ret.compiler = JSON.stringify(ret.compiler);
|
16278 |
|
16279 | this.source.currentLocation = { start: { line: 1, column: 0 } };
|
16280 | ret = this.objectLiteral(ret);
|
16281 |
|
16282 | if (options.srcName) {
|
16283 | ret = ret.toStringWithSourceMap({ file: options.destName });
|
16284 | ret.map = ret.map && ret.map.toString();
|
16285 | } else {
|
16286 | ret = ret.toString();
|
16287 | }
|
16288 | } else {
|
16289 | ret.compilerOptions = this.options;
|
16290 | }
|
16291 |
|
16292 | return ret;
|
16293 | } else {
|
16294 | return fn;
|
16295 | }
|
16296 | },
|
16297 |
|
16298 | preamble: function preamble() {
|
16299 |
|
16300 |
|
16301 | this.lastContext = 0;
|
16302 | this.source = new _codeGen2['default'](this.options.srcName);
|
16303 | this.decorators = new _codeGen2['default'](this.options.srcName);
|
16304 | },
|
16305 |
|
16306 | createFunctionContext: function createFunctionContext(asObject) {
|
16307 | var varDeclarations = '';
|
16308 |
|
16309 | var locals = this.stackVars.concat(this.registers.list);
|
16310 | if (locals.length > 0) {
|
16311 | varDeclarations += ', ' + locals.join(', ');
|
16312 | }
|
16313 |
|
16314 |
|
16315 |
|
16316 |
|
16317 |
|
16318 |
|
16319 |
|
16320 | var aliasCount = 0;
|
16321 | for (var alias in this.aliases) {
|
16322 |
|
16323 | var node = this.aliases[alias];
|
16324 |
|
16325 | if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) {
|
16326 | varDeclarations += ', alias' + ++aliasCount + '=' + alias;
|
16327 | node.children[0] = 'alias' + aliasCount;
|
16328 | }
|
16329 | }
|
16330 |
|
16331 | var params = ['container', 'depth0', 'helpers', 'partials', 'data'];
|
16332 |
|
16333 | if (this.useBlockParams || this.useDepths) {
|
16334 | params.push('blockParams');
|
16335 | }
|
16336 | if (this.useDepths) {
|
16337 | params.push('depths');
|
16338 | }
|
16339 |
|
16340 |
|
16341 | var source = this.mergeSource(varDeclarations);
|
16342 |
|
16343 | if (asObject) {
|
16344 | params.push(source);
|
16345 |
|
16346 | return Function.apply(this, params);
|
16347 | } else {
|
16348 | return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']);
|
16349 | }
|
16350 | },
|
16351 | mergeSource: function mergeSource(varDeclarations) {
|
16352 | var isSimple = this.environment.isSimple,
|
16353 | appendOnly = !this.forceBuffer,
|
16354 | appendFirst = undefined,
|
16355 | sourceSeen = undefined,
|
16356 | bufferStart = undefined,
|
16357 | bufferEnd = undefined;
|
16358 | this.source.each(function (line) {
|
16359 | if (line.appendToBuffer) {
|
16360 | if (bufferStart) {
|
16361 | line.prepend(' + ');
|
16362 | } else {
|
16363 | bufferStart = line;
|
16364 | }
|
16365 | bufferEnd = line;
|
16366 | } else {
|
16367 | if (bufferStart) {
|
16368 | if (!sourceSeen) {
|
16369 | appendFirst = true;
|
16370 | } else {
|
16371 | bufferStart.prepend('buffer += ');
|
16372 | }
|
16373 | bufferEnd.add(';');
|
16374 | bufferStart = bufferEnd = undefined;
|
16375 | }
|
16376 |
|
16377 | sourceSeen = true;
|
16378 | if (!isSimple) {
|
16379 | appendOnly = false;
|
16380 | }
|
16381 | }
|
16382 | });
|
16383 |
|
16384 | if (appendOnly) {
|
16385 | if (bufferStart) {
|
16386 | bufferStart.prepend('return ');
|
16387 | bufferEnd.add(';');
|
16388 | } else if (!sourceSeen) {
|
16389 | this.source.push('return "";');
|
16390 | }
|
16391 | } else {
|
16392 | varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());
|
16393 |
|
16394 | if (bufferStart) {
|
16395 | bufferStart.prepend('return buffer + ');
|
16396 | bufferEnd.add(';');
|
16397 | } else {
|
16398 | this.source.push('return buffer;');
|
16399 | }
|
16400 | }
|
16401 |
|
16402 | if (varDeclarations) {
|
16403 | this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n'));
|
16404 | }
|
16405 |
|
16406 | return this.source.merge();
|
16407 | },
|
16408 |
|
16409 |
|
16410 |
|
16411 |
|
16412 |
|
16413 |
|
16414 |
|
16415 |
|
16416 |
|
16417 |
|
16418 | blockValue: function blockValue(name) {
|
16419 | var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
|
16420 | params = [this.contextName(0)];
|
16421 | this.setupHelperArgs(name, 0, params);
|
16422 |
|
16423 | var blockName = this.popStack();
|
16424 | params.splice(1, 0, blockName);
|
16425 |
|
16426 | this.push(this.source.functionCall(blockHelperMissing, 'call', params));
|
16427 | },
|
16428 |
|
16429 |
|
16430 |
|
16431 |
|
16432 |
|
16433 |
|
16434 |
|
16435 | ambiguousBlockValue: function ambiguousBlockValue() {
|
16436 |
|
16437 | var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
|
16438 | params = [this.contextName(0)];
|
16439 | this.setupHelperArgs('', 0, params, true);
|
16440 |
|
16441 | this.flushInline();
|
16442 |
|
16443 | var current = this.topStack();
|
16444 | params.splice(1, 0, current);
|
16445 |
|
16446 | this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']);
|
16447 | },
|
16448 |
|
16449 |
|
16450 |
|
16451 |
|
16452 |
|
16453 |
|
16454 |
|
16455 | appendContent: function appendContent(content) {
|
16456 | if (this.pendingContent) {
|
16457 | content = this.pendingContent + content;
|
16458 | } else {
|
16459 | this.pendingLocation = this.source.currentLocation;
|
16460 | }
|
16461 |
|
16462 | this.pendingContent = content;
|
16463 | },
|
16464 |
|
16465 |
|
16466 |
|
16467 |
|
16468 |
|
16469 |
|
16470 |
|
16471 |
|
16472 |
|
16473 |
|
16474 | append: function append() {
|
16475 | if (this.isInline()) {
|
16476 | this.replaceStack(function (current) {
|
16477 | return [' != null ? ', current, ' : ""'];
|
16478 | });
|
16479 |
|
16480 | this.pushSource(this.appendToBuffer(this.popStack()));
|
16481 | } else {
|
16482 | var local = this.popStack();
|
16483 | this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']);
|
16484 | if (this.environment.isSimple) {
|
16485 | this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']);
|
16486 | }
|
16487 | }
|
16488 | },
|
16489 |
|
16490 |
|
16491 |
|
16492 |
|
16493 |
|
16494 |
|
16495 |
|
16496 | appendEscaped: function appendEscaped() {
|
16497 | this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')']));
|
16498 | },
|
16499 |
|
16500 |
|
16501 |
|
16502 |
|
16503 |
|
16504 |
|
16505 |
|
16506 |
|
16507 | getContext: function getContext(depth) {
|
16508 | this.lastContext = depth;
|
16509 | },
|
16510 |
|
16511 |
|
16512 |
|
16513 |
|
16514 |
|
16515 |
|
16516 |
|
16517 | pushContext: function pushContext() {
|
16518 | this.pushStackLiteral(this.contextName(this.lastContext));
|
16519 | },
|
16520 |
|
16521 |
|
16522 |
|
16523 |
|
16524 |
|
16525 |
|
16526 |
|
16527 |
|
16528 | lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {
|
16529 | var i = 0;
|
16530 |
|
16531 | if (!scoped && this.options.compat && !this.lastContext) {
|
16532 |
|
16533 |
|
16534 | this.push(this.depthedLookup(parts[i++]));
|
16535 | } else {
|
16536 | this.pushContext();
|
16537 | }
|
16538 |
|
16539 | this.resolvePath('context', parts, i, falsy, strict);
|
16540 | },
|
16541 |
|
16542 |
|
16543 |
|
16544 |
|
16545 |
|
16546 |
|
16547 |
|
16548 |
|
16549 | lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
|
16550 | this.useBlockParams = true;
|
16551 |
|
16552 | this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
|
16553 | this.resolvePath('context', parts, 1);
|
16554 | },
|
16555 |
|
16556 |
|
16557 |
|
16558 |
|
16559 |
|
16560 |
|
16561 |
|
16562 | lookupData: function lookupData(depth, parts, strict) {
|
16563 | if (!depth) {
|
16564 | this.pushStackLiteral('data');
|
16565 | } else {
|
16566 | this.pushStackLiteral('container.data(data, ' + depth + ')');
|
16567 | }
|
16568 |
|
16569 | this.resolvePath('data', parts, 0, true, strict);
|
16570 | },
|
16571 |
|
16572 | resolvePath: function resolvePath(type, parts, i, falsy, strict) {
|
16573 |
|
16574 |
|
16575 | var _this = this;
|
16576 |
|
16577 | if (this.options.strict || this.options.assumeObjects) {
|
16578 | this.push(strictLookup(this.options.strict && strict, this, parts, type));
|
16579 | return;
|
16580 | }
|
16581 |
|
16582 | var len = parts.length;
|
16583 | for (; i < len; i++) {
|
16584 |
|
16585 | this.replaceStack(function (current) {
|
16586 | var lookup = _this.nameLookup(current, parts[i], type);
|
16587 |
|
16588 |
|
16589 | if (!falsy) {
|
16590 | return [' != null ? ', lookup, ' : ', current];
|
16591 | } else {
|
16592 |
|
16593 | return [' && ', lookup];
|
16594 | }
|
16595 | });
|
16596 |
|
16597 | }
|
16598 | },
|
16599 |
|
16600 |
|
16601 |
|
16602 |
|
16603 |
|
16604 |
|
16605 |
|
16606 |
|
16607 | resolvePossibleLambda: function resolvePossibleLambda() {
|
16608 | this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
|
16609 | },
|
16610 |
|
16611 |
|
16612 |
|
16613 |
|
16614 |
|
16615 |
|
16616 |
|
16617 |
|
16618 |
|
16619 | pushStringParam: function pushStringParam(string, type) {
|
16620 | this.pushContext();
|
16621 | this.pushString(type);
|
16622 |
|
16623 |
|
16624 |
|
16625 | if (type !== 'SubExpression') {
|
16626 | if (typeof string === 'string') {
|
16627 | this.pushString(string);
|
16628 | } else {
|
16629 | this.pushStackLiteral(string);
|
16630 | }
|
16631 | }
|
16632 | },
|
16633 |
|
16634 | emptyHash: function emptyHash(omitEmpty) {
|
16635 | if (this.trackIds) {
|
16636 | this.push('{}');
|
16637 | }
|
16638 | if (this.stringParams) {
|
16639 | this.push('{}');
|
16640 | this.push('{}');
|
16641 | }
|
16642 | this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');
|
16643 | },
|
16644 | pushHash: function pushHash() {
|
16645 | if (this.hash) {
|
16646 | this.hashes.push(this.hash);
|
16647 | }
|
16648 | this.hash = { values: [], types: [], contexts: [], ids: [] };
|
16649 | },
|
16650 | popHash: function popHash() {
|
16651 | var hash = this.hash;
|
16652 | this.hash = this.hashes.pop();
|
16653 |
|
16654 | if (this.trackIds) {
|
16655 | this.push(this.objectLiteral(hash.ids));
|
16656 | }
|
16657 | if (this.stringParams) {
|
16658 | this.push(this.objectLiteral(hash.contexts));
|
16659 | this.push(this.objectLiteral(hash.types));
|
16660 | }
|
16661 |
|
16662 | this.push(this.objectLiteral(hash.values));
|
16663 | },
|
16664 |
|
16665 |
|
16666 |
|
16667 |
|
16668 |
|
16669 |
|
16670 |
|
16671 | pushString: function pushString(string) {
|
16672 | this.pushStackLiteral(this.quotedString(string));
|
16673 | },
|
16674 |
|
16675 |
|
16676 |
|
16677 |
|
16678 |
|
16679 |
|
16680 |
|
16681 |
|
16682 |
|
16683 | pushLiteral: function pushLiteral(value) {
|
16684 | this.pushStackLiteral(value);
|
16685 | },
|
16686 |
|
16687 |
|
16688 |
|
16689 |
|
16690 |
|
16691 |
|
16692 |
|
16693 |
|
16694 |
|
16695 | pushProgram: function pushProgram(guid) {
|
16696 | if (guid != null) {
|
16697 | this.pushStackLiteral(this.programExpression(guid));
|
16698 | } else {
|
16699 | this.pushStackLiteral(null);
|
16700 | }
|
16701 | },
|
16702 |
|
16703 |
|
16704 |
|
16705 |
|
16706 |
|
16707 |
|
16708 |
|
16709 |
|
16710 | registerDecorator: function registerDecorator(paramSize, name) {
|
16711 | var foundDecorator = this.nameLookup('decorators', name, 'decorator'),
|
16712 | options = this.setupHelperArgs(name, paramSize);
|
16713 |
|
16714 | this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']);
|
16715 | },
|
16716 |
|
16717 |
|
16718 |
|
16719 |
|
16720 |
|
16721 |
|
16722 |
|
16723 |
|
16724 |
|
16725 |
|
16726 | invokeHelper: function invokeHelper(paramSize, name, isSimple) {
|
16727 | var nonHelper = this.popStack(),
|
16728 | helper = this.setupHelper(paramSize, name),
|
16729 | simple = isSimple ? [helper.name, ' || '] : '';
|
16730 |
|
16731 | var lookup = ['('].concat(simple, nonHelper);
|
16732 | if (!this.options.strict) {
|
16733 | lookup.push(' || ', this.aliasable('helpers.helperMissing'));
|
16734 | }
|
16735 | lookup.push(')');
|
16736 |
|
16737 | this.push(this.source.functionCall(lookup, 'call', helper.callParams));
|
16738 | },
|
16739 |
|
16740 |
|
16741 |
|
16742 |
|
16743 |
|
16744 |
|
16745 |
|
16746 |
|
16747 | invokeKnownHelper: function invokeKnownHelper(paramSize, name) {
|
16748 | var helper = this.setupHelper(paramSize, name);
|
16749 | this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
|
16750 | },
|
16751 |
|
16752 |
|
16753 |
|
16754 |
|
16755 |
|
16756 |
|
16757 |
|
16758 |
|
16759 |
|
16760 |
|
16761 |
|
16762 |
|
16763 |
|
16764 | invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
|
16765 | this.useRegister('helper');
|
16766 |
|
16767 | var nonHelper = this.popStack();
|
16768 |
|
16769 | this.emptyHash();
|
16770 | var helper = this.setupHelper(0, name, helperCall);
|
16771 |
|
16772 | var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
|
16773 |
|
16774 | var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];
|
16775 | if (!this.options.strict) {
|
16776 | lookup[0] = '(helper = ';
|
16777 | lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing'));
|
16778 | }
|
16779 |
|
16780 | this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']);
|
16781 | },
|
16782 |
|
16783 |
|
16784 |
|
16785 |
|
16786 |
|
16787 |
|
16788 |
|
16789 |
|
16790 | invokePartial: function invokePartial(isDynamic, name, indent) {
|
16791 | var params = [],
|
16792 | options = this.setupParams(name, 1, params);
|
16793 |
|
16794 | if (isDynamic) {
|
16795 | name = this.popStack();
|
16796 | delete options.name;
|
16797 | }
|
16798 |
|
16799 | if (indent) {
|
16800 | options.indent = JSON.stringify(indent);
|
16801 | }
|
16802 | options.helpers = 'helpers';
|
16803 | options.partials = 'partials';
|
16804 | options.decorators = 'container.decorators';
|
16805 |
|
16806 | if (!isDynamic) {
|
16807 | params.unshift(this.nameLookup('partials', name, 'partial'));
|
16808 | } else {
|
16809 | params.unshift(name);
|
16810 | }
|
16811 |
|
16812 | if (this.options.compat) {
|
16813 | options.depths = 'depths';
|
16814 | }
|
16815 | options = this.objectLiteral(options);
|
16816 | params.push(options);
|
16817 |
|
16818 | this.push(this.source.functionCall('container.invokePartial', '', params));
|
16819 | },
|
16820 |
|
16821 |
|
16822 |
|
16823 |
|
16824 |
|
16825 |
|
16826 |
|
16827 | assignToHash: function assignToHash(key) {
|
16828 | var value = this.popStack(),
|
16829 | context = undefined,
|
16830 | type = undefined,
|
16831 | id = undefined;
|
16832 |
|
16833 | if (this.trackIds) {
|
16834 | id = this.popStack();
|
16835 | }
|
16836 | if (this.stringParams) {
|
16837 | type = this.popStack();
|
16838 | context = this.popStack();
|
16839 | }
|
16840 |
|
16841 | var hash = this.hash;
|
16842 | if (context) {
|
16843 | hash.contexts[key] = context;
|
16844 | }
|
16845 | if (type) {
|
16846 | hash.types[key] = type;
|
16847 | }
|
16848 | if (id) {
|
16849 | hash.ids[key] = id;
|
16850 | }
|
16851 | hash.values[key] = value;
|
16852 | },
|
16853 |
|
16854 | pushId: function pushId(type, name, child) {
|
16855 | if (type === 'BlockParam') {
|
16856 | this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : ''));
|
16857 | } else if (type === 'PathExpression') {
|
16858 | this.pushString(name);
|
16859 | } else if (type === 'SubExpression') {
|
16860 | this.pushStackLiteral('true');
|
16861 | } else {
|
16862 | this.pushStackLiteral('null');
|
16863 | }
|
16864 | },
|
16865 |
|
16866 |
|
16867 |
|
16868 | compiler: JavaScriptCompiler,
|
16869 |
|
16870 | compileChildren: function compileChildren(environment, options) {
|
16871 | var children = environment.children,
|
16872 | child = undefined,
|
16873 | compiler = undefined;
|
16874 |
|
16875 | for (var i = 0, l = children.length; i < l; i++) {
|
16876 | child = children[i];
|
16877 | compiler = new this.compiler();
|
16878 |
|
16879 | var existing = this.matchExistingProgram(child);
|
16880 |
|
16881 | if (existing == null) {
|
16882 | this.context.programs.push('');
|
16883 | var index = this.context.programs.length;
|
16884 | child.index = index;
|
16885 | child.name = 'program' + index;
|
16886 | this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
|
16887 | this.context.decorators[index] = compiler.decorators;
|
16888 | this.context.environments[index] = child;
|
16889 |
|
16890 | this.useDepths = this.useDepths || compiler.useDepths;
|
16891 | this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
|
16892 | child.useDepths = this.useDepths;
|
16893 | child.useBlockParams = this.useBlockParams;
|
16894 | } else {
|
16895 | child.index = existing.index;
|
16896 | child.name = 'program' + existing.index;
|
16897 |
|
16898 | this.useDepths = this.useDepths || existing.useDepths;
|
16899 | this.useBlockParams = this.useBlockParams || existing.useBlockParams;
|
16900 | }
|
16901 | }
|
16902 | },
|
16903 | matchExistingProgram: function matchExistingProgram(child) {
|
16904 | for (var i = 0, len = this.context.environments.length; i < len; i++) {
|
16905 | var environment = this.context.environments[i];
|
16906 | if (environment && environment.equals(child)) {
|
16907 | return environment;
|
16908 | }
|
16909 | }
|
16910 | },
|
16911 |
|
16912 | programExpression: function programExpression(guid) {
|
16913 | var child = this.environment.children[guid],
|
16914 | programParams = [child.index, 'data', child.blockParams];
|
16915 |
|
16916 | if (this.useBlockParams || this.useDepths) {
|
16917 | programParams.push('blockParams');
|
16918 | }
|
16919 | if (this.useDepths) {
|
16920 | programParams.push('depths');
|
16921 | }
|
16922 |
|
16923 | return 'container.program(' + programParams.join(', ') + ')';
|
16924 | },
|
16925 |
|
16926 | useRegister: function useRegister(name) {
|
16927 | if (!this.registers[name]) {
|
16928 | this.registers[name] = true;
|
16929 | this.registers.list.push(name);
|
16930 | }
|
16931 | },
|
16932 |
|
16933 | push: function push(expr) {
|
16934 | if (!(expr instanceof Literal)) {
|
16935 | expr = this.source.wrap(expr);
|
16936 | }
|
16937 |
|
16938 | this.inlineStack.push(expr);
|
16939 | return expr;
|
16940 | },
|
16941 |
|
16942 | pushStackLiteral: function pushStackLiteral(item) {
|
16943 | this.push(new Literal(item));
|
16944 | },
|
16945 |
|
16946 | pushSource: function pushSource(source) {
|
16947 | if (this.pendingContent) {
|
16948 | this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
|
16949 | this.pendingContent = undefined;
|
16950 | }
|
16951 |
|
16952 | if (source) {
|
16953 | this.source.push(source);
|
16954 | }
|
16955 | },
|
16956 |
|
16957 | replaceStack: function replaceStack(callback) {
|
16958 | var prefix = ['('],
|
16959 | stack = undefined,
|
16960 | createdStack = undefined,
|
16961 | usedLiteral = undefined;
|
16962 |
|
16963 |
|
16964 | if (!this.isInline()) {
|
16965 | throw new _exception2['default']('replaceStack on non-inline');
|
16966 | }
|
16967 |
|
16968 |
|
16969 | var top = this.popStack(true);
|
16970 |
|
16971 | if (top instanceof Literal) {
|
16972 |
|
16973 | stack = [top.value];
|
16974 | prefix = ['(', stack];
|
16975 | usedLiteral = true;
|
16976 | } else {
|
16977 |
|
16978 | createdStack = true;
|
16979 | var _name = this.incrStack();
|
16980 |
|
16981 | prefix = ['((', this.push(_name), ' = ', top, ')'];
|
16982 | stack = this.topStack();
|
16983 | }
|
16984 |
|
16985 | var item = callback.call(this, stack);
|
16986 |
|
16987 | if (!usedLiteral) {
|
16988 | this.popStack();
|
16989 | }
|
16990 | if (createdStack) {
|
16991 | this.stackSlot--;
|
16992 | }
|
16993 | this.push(prefix.concat(item, ')'));
|
16994 | },
|
16995 |
|
16996 | incrStack: function incrStack() {
|
16997 | this.stackSlot++;
|
16998 | if (this.stackSlot > this.stackVars.length) {
|
16999 | this.stackVars.push('stack' + this.stackSlot);
|
17000 | }
|
17001 | return this.topStackName();
|
17002 | },
|
17003 | topStackName: function topStackName() {
|
17004 | return 'stack' + this.stackSlot;
|
17005 | },
|
17006 | flushInline: function flushInline() {
|
17007 | var inlineStack = this.inlineStack;
|
17008 | this.inlineStack = [];
|
17009 | for (var i = 0, len = inlineStack.length; i < len; i++) {
|
17010 | var entry = inlineStack[i];
|
17011 |
|
17012 | if (entry instanceof Literal) {
|
17013 | this.compileStack.push(entry);
|
17014 | } else {
|
17015 | var stack = this.incrStack();
|
17016 | this.pushSource([stack, ' = ', entry, ';']);
|
17017 | this.compileStack.push(stack);
|
17018 | }
|
17019 | }
|
17020 | },
|
17021 | isInline: function isInline() {
|
17022 | return this.inlineStack.length;
|
17023 | },
|
17024 |
|
17025 | popStack: function popStack(wrapped) {
|
17026 | var inline = this.isInline(),
|
17027 | item = (inline ? this.inlineStack : this.compileStack).pop();
|
17028 |
|
17029 | if (!wrapped && item instanceof Literal) {
|
17030 | return item.value;
|
17031 | } else {
|
17032 | if (!inline) {
|
17033 |
|
17034 | if (!this.stackSlot) {
|
17035 | throw new _exception2['default']('Invalid stack pop');
|
17036 | }
|
17037 | this.stackSlot--;
|
17038 | }
|
17039 | return item;
|
17040 | }
|
17041 | },
|
17042 |
|
17043 | topStack: function topStack() {
|
17044 | var stack = this.isInline() ? this.inlineStack : this.compileStack,
|
17045 | item = stack[stack.length - 1];
|
17046 |
|
17047 |
|
17048 | if (item instanceof Literal) {
|
17049 | return item.value;
|
17050 | } else {
|
17051 | return item;
|
17052 | }
|
17053 | },
|
17054 |
|
17055 | contextName: function contextName(context) {
|
17056 | if (this.useDepths && context) {
|
17057 | return 'depths[' + context + ']';
|
17058 | } else {
|
17059 | return 'depth' + context;
|
17060 | }
|
17061 | },
|
17062 |
|
17063 | quotedString: function quotedString(str) {
|
17064 | return this.source.quotedString(str);
|
17065 | },
|
17066 |
|
17067 | objectLiteral: function objectLiteral(obj) {
|
17068 | return this.source.objectLiteral(obj);
|
17069 | },
|
17070 |
|
17071 | aliasable: function aliasable(name) {
|
17072 | var ret = this.aliases[name];
|
17073 | if (ret) {
|
17074 | ret.referenceCount++;
|
17075 | return ret;
|
17076 | }
|
17077 |
|
17078 | ret = this.aliases[name] = this.source.wrap(name);
|
17079 | ret.aliasable = true;
|
17080 | ret.referenceCount = 1;
|
17081 |
|
17082 | return ret;
|
17083 | },
|
17084 |
|
17085 | setupHelper: function setupHelper(paramSize, name, blockHelper) {
|
17086 | var params = [],
|
17087 | paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
|
17088 | var foundHelper = this.nameLookup('helpers', name, 'helper'),
|
17089 | callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})');
|
17090 |
|
17091 | return {
|
17092 | params: params,
|
17093 | paramsInit: paramsInit,
|
17094 | name: foundHelper,
|
17095 | callParams: [callContext].concat(params)
|
17096 | };
|
17097 | },
|
17098 |
|
17099 | setupParams: function setupParams(helper, paramSize, params) {
|
17100 | var options = {},
|
17101 | contexts = [],
|
17102 | types = [],
|
17103 | ids = [],
|
17104 | objectArgs = !params,
|
17105 | param = undefined;
|
17106 |
|
17107 | if (objectArgs) {
|
17108 | params = [];
|
17109 | }
|
17110 |
|
17111 | options.name = this.quotedString(helper);
|
17112 | options.hash = this.popStack();
|
17113 |
|
17114 | if (this.trackIds) {
|
17115 | options.hashIds = this.popStack();
|
17116 | }
|
17117 | if (this.stringParams) {
|
17118 | options.hashTypes = this.popStack();
|
17119 | options.hashContexts = this.popStack();
|
17120 | }
|
17121 |
|
17122 | var inverse = this.popStack(),
|
17123 | program = this.popStack();
|
17124 |
|
17125 |
|
17126 |
|
17127 | if (program || inverse) {
|
17128 | options.fn = program || 'container.noop';
|
17129 | options.inverse = inverse || 'container.noop';
|
17130 | }
|
17131 |
|
17132 |
|
17133 |
|
17134 | var i = paramSize;
|
17135 | while (i--) {
|
17136 | param = this.popStack();
|
17137 | params[i] = param;
|
17138 |
|
17139 | if (this.trackIds) {
|
17140 | ids[i] = this.popStack();
|
17141 | }
|
17142 | if (this.stringParams) {
|
17143 | types[i] = this.popStack();
|
17144 | contexts[i] = this.popStack();
|
17145 | }
|
17146 | }
|
17147 |
|
17148 | if (objectArgs) {
|
17149 | options.args = this.source.generateArray(params);
|
17150 | }
|
17151 |
|
17152 | if (this.trackIds) {
|
17153 | options.ids = this.source.generateArray(ids);
|
17154 | }
|
17155 | if (this.stringParams) {
|
17156 | options.types = this.source.generateArray(types);
|
17157 | options.contexts = this.source.generateArray(contexts);
|
17158 | }
|
17159 |
|
17160 | if (this.options.data) {
|
17161 | options.data = 'data';
|
17162 | }
|
17163 | if (this.useBlockParams) {
|
17164 | options.blockParams = 'blockParams';
|
17165 | }
|
17166 | return options;
|
17167 | },
|
17168 |
|
17169 | setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
|
17170 | var options = this.setupParams(helper, paramSize, params);
|
17171 | options = this.objectLiteral(options);
|
17172 | if (useRegister) {
|
17173 | this.useRegister('options');
|
17174 | params.push('options');
|
17175 | return ['options=', options];
|
17176 | } else if (params) {
|
17177 | params.push(options);
|
17178 | return '';
|
17179 | } else {
|
17180 | return options;
|
17181 | }
|
17182 | }
|
17183 | };
|
17184 |
|
17185 | (function () {
|
17186 | var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' ');
|
17187 |
|
17188 | var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
|
17189 |
|
17190 | for (var i = 0, l = reservedWords.length; i < l; i++) {
|
17191 | compilerWords[reservedWords[i]] = true;
|
17192 | }
|
17193 | })();
|
17194 |
|
17195 | JavaScriptCompiler.isValidJavaScriptVariableName = function (name) {
|
17196 | return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
|
17197 | };
|
17198 |
|
17199 | function strictLookup(requireTerminal, compiler, parts, type) {
|
17200 | var stack = compiler.popStack(),
|
17201 | i = 0,
|
17202 | len = parts.length;
|
17203 | if (requireTerminal) {
|
17204 | len--;
|
17205 | }
|
17206 |
|
17207 | for (; i < len; i++) {
|
17208 | stack = compiler.nameLookup(stack, parts[i], type);
|
17209 | }
|
17210 |
|
17211 | if (requireTerminal) {
|
17212 | return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')'];
|
17213 | } else {
|
17214 | return stack;
|
17215 | }
|
17216 | }
|
17217 |
|
17218 | exports['default'] = JavaScriptCompiler;
|
17219 | module.exports = exports['default'];
|
17220 |
|
17221 | }),
|
17222 |
|
17223 | (function(module, exports, __webpack_require__) {
|
17224 |
|
17225 |
|
17226 | 'use strict';
|
17227 |
|
17228 | exports.__esModule = true;
|
17229 |
|
17230 | var _utils = __webpack_require__(5);
|
17231 |
|
17232 | var SourceNode = undefined;
|
17233 |
|
17234 | try {
|
17235 |
|
17236 | if (false) { var SourceMap; }
|
17237 | } catch (err) {}
|
17238 |
|
17239 |
|
17240 |
|
17241 | if (!SourceNode) {
|
17242 | SourceNode = function (line, column, srcFile, chunks) {
|
17243 | this.src = '';
|
17244 | if (chunks) {
|
17245 | this.add(chunks);
|
17246 | }
|
17247 | };
|
17248 |
|
17249 | SourceNode.prototype = {
|
17250 | add: function add(chunks) {
|
17251 | if (_utils.isArray(chunks)) {
|
17252 | chunks = chunks.join('');
|
17253 | }
|
17254 | this.src += chunks;
|
17255 | },
|
17256 | prepend: function prepend(chunks) {
|
17257 | if (_utils.isArray(chunks)) {
|
17258 | chunks = chunks.join('');
|
17259 | }
|
17260 | this.src = chunks + this.src;
|
17261 | },
|
17262 | toStringWithSourceMap: function toStringWithSourceMap() {
|
17263 | return { code: this.toString() };
|
17264 | },
|
17265 | toString: function toString() {
|
17266 | return this.src;
|
17267 | }
|
17268 | };
|
17269 | }
|
17270 |
|
17271 | function castChunk(chunk, codeGen, loc) {
|
17272 | if (_utils.isArray(chunk)) {
|
17273 | var ret = [];
|
17274 |
|
17275 | for (var i = 0, len = chunk.length; i < len; i++) {
|
17276 | ret.push(codeGen.wrap(chunk[i], loc));
|
17277 | }
|
17278 | return ret;
|
17279 | } else if (typeof chunk === 'boolean' || typeof chunk === 'number') {
|
17280 |
|
17281 | return chunk + '';
|
17282 | }
|
17283 | return chunk;
|
17284 | }
|
17285 |
|
17286 | function CodeGen(srcFile) {
|
17287 | this.srcFile = srcFile;
|
17288 | this.source = [];
|
17289 | }
|
17290 |
|
17291 | CodeGen.prototype = {
|
17292 | isEmpty: function isEmpty() {
|
17293 | return !this.source.length;
|
17294 | },
|
17295 | prepend: function prepend(source, loc) {
|
17296 | this.source.unshift(this.wrap(source, loc));
|
17297 | },
|
17298 | push: function push(source, loc) {
|
17299 | this.source.push(this.wrap(source, loc));
|
17300 | },
|
17301 |
|
17302 | merge: function merge() {
|
17303 | var source = this.empty();
|
17304 | this.each(function (line) {
|
17305 | source.add([' ', line, '\n']);
|
17306 | });
|
17307 | return source;
|
17308 | },
|
17309 |
|
17310 | each: function each(iter) {
|
17311 | for (var i = 0, len = this.source.length; i < len; i++) {
|
17312 | iter(this.source[i]);
|
17313 | }
|
17314 | },
|
17315 |
|
17316 | empty: function empty() {
|
17317 | var loc = this.currentLocation || { start: {} };
|
17318 | return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
|
17319 | },
|
17320 | wrap: function wrap(chunk) {
|
17321 | var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];
|
17322 |
|
17323 | if (chunk instanceof SourceNode) {
|
17324 | return chunk;
|
17325 | }
|
17326 |
|
17327 | chunk = castChunk(chunk, this, loc);
|
17328 |
|
17329 | return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
|
17330 | },
|
17331 |
|
17332 | functionCall: function functionCall(fn, type, params) {
|
17333 | params = this.generateList(params);
|
17334 | return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);
|
17335 | },
|
17336 |
|
17337 | quotedString: function quotedString(str) {
|
17338 | return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028')
|
17339 | .replace(/\u2029/g, '\\u2029') + '"';
|
17340 | },
|
17341 |
|
17342 | objectLiteral: function objectLiteral(obj) {
|
17343 | var pairs = [];
|
17344 |
|
17345 | for (var key in obj) {
|
17346 | if (obj.hasOwnProperty(key)) {
|
17347 | var value = castChunk(obj[key], this);
|
17348 | if (value !== 'undefined') {
|
17349 | pairs.push([this.quotedString(key), ':', value]);
|
17350 | }
|
17351 | }
|
17352 | }
|
17353 |
|
17354 | var ret = this.generateList(pairs);
|
17355 | ret.prepend('{');
|
17356 | ret.add('}');
|
17357 | return ret;
|
17358 | },
|
17359 |
|
17360 | generateList: function generateList(entries) {
|
17361 | var ret = this.empty();
|
17362 |
|
17363 | for (var i = 0, len = entries.length; i < len; i++) {
|
17364 | if (i) {
|
17365 | ret.add(',');
|
17366 | }
|
17367 |
|
17368 | ret.add(castChunk(entries[i], this));
|
17369 | }
|
17370 |
|
17371 | return ret;
|
17372 | },
|
17373 |
|
17374 | generateArray: function generateArray(entries) {
|
17375 | var ret = this.generateList(entries);
|
17376 | ret.prepend('[');
|
17377 | ret.add(']');
|
17378 |
|
17379 | return ret;
|
17380 | }
|
17381 | };
|
17382 |
|
17383 | exports['default'] = CodeGen;
|
17384 | module.exports = exports['default'];
|
17385 |
|
17386 | })
|
17387 | ])
|
17388 | });
|
17389 | ;
|
17390 |
|
17391 | }),
|
17392 |
|
17393 | (function(module, exports, __webpack_require__) {
|
17394 |
|
17395 | "use strict";
|
17396 |
|
17397 | Object.defineProperty(exports, "__esModule", { value: true });
|
17398 | var handlebars_1 = __webpack_require__(2);
|
17399 | var graphql_codegen_typescript_common_1 = __webpack_require__(1);
|
17400 | var mappers_1 = __webpack_require__(0);
|
17401 | function importFromGraphQL(options) {
|
17402 | var imports = ['GraphQLResolveInfo'];
|
17403 | if (options.data.root.hasScalars) {
|
17404 | imports.push('GraphQLScalarType', 'GraphQLScalarTypeConfig');
|
17405 | }
|
17406 | return "import { " + imports.join(', ') + " } from 'graphql';";
|
17407 | }
|
17408 | exports.importFromGraphQL = importFromGraphQL;
|
17409 | exports.getFieldType = function (convert) { return function (field, options) {
|
17410 | var config = options.data.root.config || {};
|
17411 | var mapper = mappers_1.pickMapper(field.type, config.mappers || {}, options);
|
17412 | var defaultMapper = mappers_1.useDefaultMapper(field, options);
|
17413 | if (mapper) {
|
17414 | return graphql_codegen_typescript_common_1.getFieldType(field, mapper.type, options);
|
17415 | }
|
17416 | if (defaultMapper) {
|
17417 | return graphql_codegen_typescript_common_1.getFieldType(field, defaultMapper.type, options);
|
17418 | }
|
17419 | return graphql_codegen_typescript_common_1.convertedType(field, options, convert);
|
17420 | }; };
|
17421 | exports.getFieldResolverName = function (convert) { return function (name) {
|
17422 | return convert(name) + "Resolver";
|
17423 | }; };
|
17424 | exports.getFieldResolver = function (convert) { return function (field, type, options) {
|
17425 | if (!field) {
|
17426 | return '';
|
17427 | }
|
17428 | var resolver;
|
17429 | var config = options.data.root.config || {};
|
17430 | var schema = options.data.root.rawSchema;
|
17431 | var subscriptionType = schema.getSubscriptionType();
|
17432 | var isSubscription = subscriptionType && subscriptionType.name === type.name;
|
17433 | if (isSubscription) {
|
17434 | resolver = 'SubscriptionResolver';
|
17435 | }
|
17436 | else {
|
17437 | resolver = 'Resolver';
|
17438 | }
|
17439 | var generics = ['R', 'Parent', 'Context'];
|
17440 | if (field.hasArguments) {
|
17441 | var prefix = config.noNamespaces ? convert(type.name) : '';
|
17442 | generics.push("" + prefix + convert(field.name) + "Args");
|
17443 | }
|
17444 | return new handlebars_1.SafeString(resolver + "<" + generics.join(', ') + ">");
|
17445 | }; };
|
17446 | function getTypenames(entity) {
|
17447 | var types = [];
|
17448 | if (isInterface(entity)) {
|
17449 | types = entity.implementingTypes;
|
17450 | }
|
17451 | else {
|
17452 | types = entity.possibleTypes;
|
17453 | }
|
17454 | return types.map(function (t) { return "'" + t + "'"; }).join(' | ');
|
17455 | }
|
17456 | exports.getTypenames = getTypenames;
|
17457 | function isInterface(entity) {
|
17458 | return typeof entity.implementingTypes !== 'undefined';
|
17459 | }
|
17460 | exports.isInterface = isInterface;
|
17461 |
|
17462 |
|
17463 | }),
|
17464 |
|
17465 | (function(module, exports, __webpack_require__) {
|
17466 |
|
17467 | "use strict";
|
17468 |
|
17469 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17470 | return new (P || (P = Promise))(function (resolve, reject) {
|
17471 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
17472 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
17473 | function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
17474 | step((generator = generator.apply(thisArg, _arguments || [])).next());
|
17475 | });
|
17476 | };
|
17477 | var __generator = (this && this.__generator) || function (thisArg, body) {
|
17478 | var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
17479 | return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
17480 | function verb(n) { return function (v) { return step([n, v]); }; }
|
17481 | function step(op) {
|
17482 | if (f) throw new TypeError("Generator is already executing.");
|
17483 | while (_) try {
|
17484 | if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
17485 | if (y = 0, t) op = [op[0] & 2, t.value];
|
17486 | switch (op[0]) {
|
17487 | case 0: case 1: t = op; break;
|
17488 | case 4: _.label++; return { value: op[1], done: false };
|
17489 | case 5: _.label++; y = op[1]; op = [0]; continue;
|
17490 | case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
17491 | default:
|
17492 | if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
17493 | if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
17494 | if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
17495 | if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
17496 | if (t[2]) _.ops.pop();
|
17497 | _.trys.pop(); continue;
|
17498 | }
|
17499 | op = body.call(thisArg, _);
|
17500 | } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
17501 | if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
17502 | }
|
17503 | };
|
17504 | var _this = this;
|
17505 | Object.defineProperty(exports, "__esModule", { value: true });
|
17506 | var graphql_codegen_typescript_common_1 = __webpack_require__(1);
|
17507 | var Handlebars = __webpack_require__(2);
|
17508 | var rootTemplate = __webpack_require__(7);
|
17509 | var resolver = __webpack_require__(8);
|
17510 | var resolveType = __webpack_require__(9);
|
17511 | var directive = __webpack_require__(10);
|
17512 | var scalar = __webpack_require__(11);
|
17513 | var helpers_1 = __webpack_require__(3);
|
17514 | var import_mappers_1 = __webpack_require__(12);
|
17515 | var context_1 = __webpack_require__(13);
|
17516 | var parent_type_1 = __webpack_require__(14);
|
17517 | exports.plugin = function (schema, documents, config) { return __awaiter(_this, void 0, void 0, function () {
|
17518 | var _a, templateContext, convert;
|
17519 | return __generator(this, function (_b) {
|
17520 | _a = graphql_codegen_typescript_common_1.initCommonTemplate(Handlebars, schema, config), templateContext = _a.templateContext, convert = _a.convert;
|
17521 | Handlebars.registerPartial('resolver', resolver);
|
17522 | Handlebars.registerPartial('resolveType', resolveType);
|
17523 | Handlebars.registerPartial('directive', directive);
|
17524 | Handlebars.registerPartial('scalar', scalar);
|
17525 | Handlebars.registerHelper('getFieldResolverName', helpers_1.getFieldResolverName(convert));
|
17526 | Handlebars.registerHelper('getFieldResolver', helpers_1.getFieldResolver(convert));
|
17527 | Handlebars.registerHelper('getTypenames', helpers_1.getTypenames);
|
17528 | Handlebars.registerHelper('getParentType', parent_type_1.getParentType(convert));
|
17529 | Handlebars.registerHelper('getParentTypes', parent_type_1.getParentTypes(convert));
|
17530 | Handlebars.registerHelper('getFieldType', helpers_1.getFieldType(convert));
|
17531 | Handlebars.registerHelper('importMappers', import_mappers_1.importMappers);
|
17532 | Handlebars.registerHelper('importContext', context_1.importContext);
|
17533 | Handlebars.registerHelper('importFromGraphQL', helpers_1.importFromGraphQL);
|
17534 | Handlebars.registerHelper('getContext', context_1.getContext);
|
17535 | return [2 , Handlebars.compile(rootTemplate)(templateContext)];
|
17536 | });
|
17537 | }); };
|
17538 |
|
17539 |
|
17540 | }),
|
17541 |
|
17542 | (function(module, exports) {
|
17543 |
|
17544 | module.exports = require("graphql-codegen-core");
|
17545 |
|
17546 | }),
|
17547 |
|
17548 | (function(module, exports) {
|
17549 |
|
17550 | module.exports = require("graphql-codegen-plugin-helpers");
|
17551 |
|
17552 | }),
|
17553 |
|
17554 | (function(module, exports) {
|
17555 |
|
17556 | module.exports = "{{{ importFromGraphQL }}}\n\n{{{ importMappers types }}}\n\n{{{ importContext }}}\n\nexport type Resolver<Result, Parent = {}, Context = {}, Args = {}> = (\n parent: Parent,\n args: Args,\n context: Context,\n info: GraphQLResolveInfo\n) => Promise<Result> | Result;\n\nexport interface ISubscriptionResolverObject<Result, Parent, Context, Args> {\n subscribe<R = Result, P = Parent>(\n parent: P,\n args: Args,\n context: Context,\n info: GraphQLResolveInfo\n ): AsyncIterator<R | Result> | Promise<AsyncIterator<R | Result>>;\n resolve?<R = Result, P = Parent>(\n parent: P,\n args: Args,\n context: Context,\n info: GraphQLResolveInfo\n ): R | Result | Promise<R | Result>;\n}\n\nexport type SubscriptionResolver<Result, Parent = {}, Context = {}, Args = {}> =\n | ((...args: any[]) => ISubscriptionResolverObject<Result, Parent, Context, Args>)\n | ISubscriptionResolverObject<Result, Parent, Context, Args>;\n\nexport type TypeResolveFn<Types, Parent = {}, Context = {}> = (\n parent: Parent,\n context: Context,\n info: GraphQLResolveInfo\n) => Maybe<Types>;\n\nexport type NextResolverFn<T> = () => Promise<T>;\n\nexport type DirectiveResolverFn<TResult, TArgs = {}, TContext = {}> = (\n next: NextResolverFn<TResult>,\n source: any,\n args: TArgs,\n context: TContext,\n info: GraphQLResolveInfo,\n) => TResult | Promise<TResult>;\n\n{{#each types}}\n{{~> resolver }}\n{{/each}}\n\n{{#each interfaces}}\n{{~> resolveType }}\n{{/each}}\n\n{{#each unions}}\n{{~> resolveType }}\n{{/each}}\n\n{{#each definedDirectives}}\n{{~> directive}}\n{{/each}}\n\n{{#each scalars}}\n{{~> scalar}}\n{{/each}}\n\nexport interface IResolvers {\n {{#each types}}\n {{ convert name }}?: {{ convert name }}Resolvers{{#unless @root.config.noNamespaces}}.Resolvers{{/unless}};\n {{/each}}\n {{#each interfaces}}\n {{ convert name }}?: {{ convert name }}Resolvers{{#unless @root.config.noNamespaces}}.Resolvers{{/unless}};\n {{/each}}\n {{#each unions}}\n {{ convert name }}?: {{ convert name }}Resolvers{{#unless @root.config.noNamespaces}}.Resolvers{{/unless}};\n {{/each}}\n {{#each scalars}}\n {{ convert name }}?: GraphQLScalarType;\n {{/each}}\n}\n\nexport interface IDirectiveResolvers<Result> {\n {{#each definedDirectives}}\n {{ name }}?: {{ convert name }}DirectiveResolver<Result>;\n {{/each}}\n}"
|
17557 |
|
17558 | }),
|
17559 |
|
17560 | (function(module, exports) {
|
17561 |
|
17562 | module.exports = "{{ toComment description }}\n{{#unless @root.config.noNamespaces}}\nexport namespace {{ convert name }}Resolvers {\n{{/unless}}\n export interface {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Resolvers<Context = {{{ getContext }}}, TypeParent = {{{ getParentType this }}}> {\n {{#each fields}}\n {{ toComment description }}\n {{ name }}?: {{#if @root.config.noNamespaces}}{{ convert ../name }}{{/if}}{{ getFieldResolverName name }}<{{{ getFieldType this }}}, TypeParent, Context>;\n {{/each}}\n }\n\n {{#each fields}}\n\n export type {{#if @root.config.noNamespaces}}{{ convert ../name }}{{/if}}{{ getFieldResolverName name }}<R = {{{ getFieldType this }}}, Parent = {{{ getParentType ../this }}}, Context = {{{ getContext }}}> = {{ getFieldResolver this ../this }};\n\n {{~# if hasArguments }}\n\n export interface {{#if @root.config.noNamespaces}}{{ convert ../name }}{{/if}}{{ convert name }}Args {\n {{#each arguments}}\n {{ toComment description }}\n {{ name }}{{ getOptionals this }}: {{ convertedType this }};\n {{/each}}\n }\n\n {{/if}}\n {{/each}}\n \n{{#unless @root.config.noNamespaces}}\n}\n{{/unless}}"
|
17563 |
|
17564 | }),
|
17565 |
|
17566 | (function(module, exports) {
|
17567 |
|
17568 | module.exports = "{{ toComment description }}\n{{#unless @root.config.noNamespaces}}\nexport namespace {{ convert name }}Resolvers {\n{{/unless}}\n export interface {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Resolvers {\n __resolveType: {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}ResolveType;\n }\n export type {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}ResolveType<R = {{{ getTypenames this }}}, Parent = {{{ getParentTypes this }}}, Context = {{{ getContext }}}> = TypeResolveFn<R, Parent, Context>;\n \n{{#unless @root.config.noNamespaces}}\n}\n{{/unless}}"
|
17569 |
|
17570 | }),
|
17571 |
|
17572 | (function(module, exports) {
|
17573 |
|
17574 | module.exports = "{{ toComment description }}\nexport type {{ convert name }}DirectiveResolver<Result> = DirectiveResolverFn<Result, {{#if hasArguments}}{{ convert name }}DirectiveArgs{{else}}{}{{/if}}, {{{ getContext }}}>;\n\n{{~# if hasArguments }}\n\nexport interface {{ convert name }}DirectiveArgs {\n{{#each arguments}}\n {{ toComment description }}\n {{ name }}{{ getOptionals this }}: {{ convertedType this }};\n{{/each}}\n}\n\n{{/if}}"
|
17575 |
|
17576 | }),
|
17577 |
|
17578 | (function(module, exports) {
|
17579 |
|
17580 | module.exports = "export interface {{name}}ScalarConfig extends GraphQLScalarTypeConfig<{{ convert name }}, any> {\n name: '{{name}}'\n}\n"
|
17581 |
|
17582 | }),
|
17583 |
|
17584 | (function(module, exports, __webpack_require__) {
|
17585 |
|
17586 | "use strict";
|
17587 |
|
17588 | Object.defineProperty(exports, "__esModule", { value: true });
|
17589 | var mappers_1 = __webpack_require__(0);
|
17590 | function importMappers(types, options) {
|
17591 | var config = options.data.root.config || {};
|
17592 | var mappers = config.mappers || {};
|
17593 | var defaultMapper = config.defaultMapper;
|
17594 | var modules = {};
|
17595 | var availableTypes = types.map(function (t) { return t.name; });
|
17596 | if (defaultMapper) {
|
17597 | var mapper = mappers_1.parseMapper(defaultMapper);
|
17598 | if (mapper.isExternal) {
|
17599 | modules[mapper.source] = [mapper.type];
|
17600 | }
|
17601 | }
|
17602 | for (var type in mappers) {
|
17603 | if (mappers.hasOwnProperty(type)) {
|
17604 | var mapper = mappers_1.pickMapper(type, mappers, options);
|
17605 |
|
17606 |
|
17607 | if (mapper && mapper.isExternal && availableTypes.includes(type)) {
|
17608 | var path = mapper.source;
|
17609 | if (!modules[path]) {
|
17610 | modules[path] = [];
|
17611 | }
|
17612 |
|
17613 | if (!modules[path].includes(mapper.type)) {
|
17614 | modules[path].push(mapper.type);
|
17615 | }
|
17616 | }
|
17617 | }
|
17618 | }
|
17619 | var imports = Object.keys(modules).map(function (path) { return "\n import { " + modules[path].join(', ') + " } from '" + path + "';\n "; });
|
17620 | return imports.join('\n');
|
17621 | }
|
17622 | exports.importMappers = importMappers;
|
17623 |
|
17624 |
|
17625 | }),
|
17626 |
|
17627 | (function(module, exports, __webpack_require__) {
|
17628 |
|
17629 | "use strict";
|
17630 |
|
17631 | Object.defineProperty(exports, "__esModule", { value: true });
|
17632 | var mappers_1 = __webpack_require__(0);
|
17633 | function importContext(options) {
|
17634 | var config = options.data.root.config || {};
|
17635 | var contextType = config.contextType;
|
17636 | if (typeof contextType === 'string') {
|
17637 | var mapper = mappers_1.parseMapper(contextType);
|
17638 | if (mapper.isExternal) {
|
17639 | return "import { " + mapper.type + " } from '" + mapper.source + "';";
|
17640 | }
|
17641 | }
|
17642 | return '';
|
17643 | }
|
17644 | exports.importContext = importContext;
|
17645 | function getContext(options) {
|
17646 | var config = options.data.root.config || {};
|
17647 | var contextType = config.contextType;
|
17648 | if (typeof contextType !== 'string') {
|
17649 | return '{}';
|
17650 | }
|
17651 | var mapper = mappers_1.parseMapper(contextType);
|
17652 | return mapper.type;
|
17653 | }
|
17654 | exports.getContext = getContext;
|
17655 |
|
17656 |
|
17657 | }),
|
17658 |
|
17659 | (function(module, exports, __webpack_require__) {
|
17660 |
|
17661 | "use strict";
|
17662 |
|
17663 | Object.defineProperty(exports, "__esModule", { value: true });
|
17664 | var mappers_1 = __webpack_require__(0);
|
17665 | var helpers_1 = __webpack_require__(3);
|
17666 | var emptyParent = '{}';
|
17667 | function getRootTypeNames(schema) {
|
17668 | var query = (schema.getQueryType() || {}).name;
|
17669 | var mutation = (schema.getMutationType() || {}).name;
|
17670 | var subscription = (schema.getSubscriptionType() || {}).name;
|
17671 | return [query, mutation, subscription];
|
17672 | }
|
17673 | function isRootType(type, schema) {
|
17674 | return getRootTypeNames(schema).includes(type.name);
|
17675 | }
|
17676 | exports.getParentType = function (convert) { return function (type, options) {
|
17677 | var config = options.data.root.config || {};
|
17678 | var schema = options.data.root.rawSchema;
|
17679 | var mapper = mappers_1.pickMapper(type.name, config.mappers || {}, options);
|
17680 | var defaultMapper = mappers_1.useDefaultMapper(type, options);
|
17681 | var name;
|
17682 | if (mapper) {
|
17683 | name = mapper.type;
|
17684 | }
|
17685 | else if (defaultMapper) {
|
17686 | name = defaultMapper.type;
|
17687 | }
|
17688 | else {
|
17689 | name = "" + (config.interfacePrefix || '') + convert(type.name);
|
17690 | }
|
17691 | return isRootType(type, schema) ? emptyParent : name;
|
17692 | }; };
|
17693 | function getParentTypes(convert) {
|
17694 | return function (entity, options) {
|
17695 | var schema = options.data.root.rawSchema;
|
17696 | var types = [];
|
17697 | if (helpers_1.isInterface(entity)) {
|
17698 | types = entity.implementingTypes;
|
17699 | }
|
17700 | else {
|
17701 | types = entity.possibleTypes;
|
17702 | }
|
17703 | var parentTypes = types
|
17704 | .map(function (name) { return schema.getType(name); })
|
17705 | .map(function (type) { return exports.getParentType(convert)(type, options); })
|
17706 | .filter(function (parent, i, all) { return all.indexOf(parent) === i; });
|
17707 | if (parentTypes.length) {
|
17708 | return parentTypes.join(' | ');
|
17709 | }
|
17710 | return emptyParent;
|
17711 | };
|
17712 | }
|
17713 | exports.getParentTypes = getParentTypes;
|
17714 |
|
17715 |
|
17716 | })
|
17717 | ])));
|
17718 |
|
\ | No newline at end of file |