hbs_plus 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,739 @@
1
+ var Handlebars = require("handlebars");
2
+
3
+ // BEGIN(BROWSER)
4
+ Handlebars.Compiler = function() {};
5
+ Handlebars.JavaScriptCompiler = function() {};
6
+
7
+ (function(Compiler, JavaScriptCompiler) {
8
+ Compiler.OPCODE_MAP = {
9
+ appendContent: 1,
10
+ getContext: 2,
11
+ lookupWithHelpers: 3,
12
+ lookup: 4,
13
+ append: 5,
14
+ invokeMustache: 6,
15
+ appendEscaped: 7,
16
+ pushString: 8,
17
+ truthyOrFallback: 9,
18
+ functionOrFallback: 10,
19
+ invokeProgram: 11,
20
+ invokePartial: 12,
21
+ push: 13,
22
+ assignToHash: 15,
23
+ pushStringParam: 16
24
+ };
25
+
26
+ Compiler.MULTI_PARAM_OPCODES = {
27
+ appendContent: 1,
28
+ getContext: 1,
29
+ lookupWithHelpers: 1,
30
+ lookup: 1,
31
+ invokeMustache: 2,
32
+ pushString: 1,
33
+ truthyOrFallback: 1,
34
+ functionOrFallback: 1,
35
+ invokeProgram: 2,
36
+ invokePartial: 1,
37
+ push: 1,
38
+ assignToHash: 1,
39
+ pushStringParam: 1
40
+ };
41
+
42
+ Compiler.DISASSEMBLE_MAP = {};
43
+
44
+ for(var prop in Compiler.OPCODE_MAP) {
45
+ var value = Compiler.OPCODE_MAP[prop];
46
+ Compiler.DISASSEMBLE_MAP[value] = prop;
47
+ }
48
+
49
+ Compiler.multiParamSize = function(code) {
50
+ return Compiler.MULTI_PARAM_OPCODES[Compiler.DISASSEMBLE_MAP[code]];
51
+ };
52
+
53
+ Compiler.prototype = {
54
+ compiler: Compiler,
55
+
56
+ disassemble: function() {
57
+ var opcodes = this.opcodes, opcode, nextCode;
58
+ var out = [], str, name, value;
59
+
60
+ for(var i=0, l=opcodes.length; i<l; i++) {
61
+ opcode = opcodes[i];
62
+
63
+ if(opcode === 'DECLARE') {
64
+ name = opcodes[++i];
65
+ value = opcodes[++i];
66
+ out.push("DECLARE " + name + " = " + value);
67
+ } else {
68
+ str = Compiler.DISASSEMBLE_MAP[opcode];
69
+
70
+ var extraParams = Compiler.multiParamSize(opcode);
71
+ var codes = [];
72
+
73
+ for(var j=0; j<extraParams; j++) {
74
+ nextCode = opcodes[++i];
75
+
76
+ if(typeof nextCode === "string") {
77
+ nextCode = "\"" + nextCode.replace("\n", "\\n") + "\"";
78
+ }
79
+
80
+ codes.push(nextCode);
81
+ }
82
+
83
+ str = str + " " + codes.join(" ");
84
+
85
+ out.push(str);
86
+ }
87
+ }
88
+
89
+ return out.join("\n");
90
+ },
91
+
92
+ guid: 0,
93
+
94
+ compile: function(program, options) {
95
+ this.children = [];
96
+ this.depths = {list: []};
97
+ this.options = options || {};
98
+ return this.program(program);
99
+ },
100
+
101
+ accept: function(node) {
102
+ return this[node.type](node);
103
+ },
104
+
105
+ program: function(program) {
106
+ var statements = program.statements, statement;
107
+ this.opcodes = [];
108
+
109
+ for(var i=0, l=statements.length; i<l; i++) {
110
+ statement = statements[i];
111
+ this[statement.type](statement);
112
+ }
113
+
114
+ this.depths.list = this.depths.list.sort(function(a, b) {
115
+ return a - b;
116
+ });
117
+
118
+ return this;
119
+ },
120
+
121
+ compileProgram: function(program) {
122
+ var result = new this.compiler().compile(program, this.options);
123
+ var guid = this.guid++;
124
+
125
+ this.usePartial = this.usePartial || result.usePartial;
126
+
127
+ this.children[guid] = result;
128
+
129
+ for(var i=0, l=result.depths.list.length; i<l; i++) {
130
+ depth = result.depths.list[i];
131
+
132
+ if(depth < 2) { continue; }
133
+ else { this.addDepth(depth - 1); }
134
+ }
135
+
136
+ return guid;
137
+ },
138
+
139
+ block: function(block) {
140
+ var mustache = block.mustache;
141
+ var depth, child, inverse, inverseGuid;
142
+
143
+ var params = this.setupStackForMustache(mustache);
144
+
145
+ var programGuid = this.compileProgram(block.program);
146
+
147
+ if(block.program.inverse) {
148
+ inverseGuid = this.compileProgram(block.program.inverse);
149
+ this.declare('inverse', inverseGuid);
150
+ }
151
+
152
+ this.opcode('invokeProgram', programGuid, params.length);
153
+ this.declare('inverse', null);
154
+ this.opcode('append');
155
+ },
156
+
157
+ inverse: function(block) {
158
+ var params = this.setupStackForMustache(block.mustache);
159
+
160
+ var programGuid = this.compileProgram(block.program);
161
+
162
+ this.declare('inverse', programGuid);
163
+
164
+ this.opcode('invokeProgram', null, params.length);
165
+ this.opcode('append');
166
+ },
167
+
168
+ hash: function(hash) {
169
+ var pairs = hash.pairs, pair, val;
170
+
171
+ this.opcode('push', '{}');
172
+
173
+ for(var i=0, l=pairs.length; i<l; i++) {
174
+ pair = pairs[i];
175
+ val = pair[1];
176
+
177
+ this.accept(val);
178
+ this.opcode('assignToHash', pair[0]);
179
+ }
180
+ },
181
+
182
+ partial: function(partial) {
183
+ var id = partial.id;
184
+ this.usePartial = true;
185
+
186
+ if(partial.context) {
187
+ this.ID(partial.context);
188
+ } else {
189
+ this.opcode('push', 'context');
190
+ }
191
+
192
+ this.opcode('invokePartial', id.original);
193
+ this.opcode('append');
194
+ },
195
+
196
+ content: function(content) {
197
+ this.opcode('appendContent', content.string);
198
+ },
199
+
200
+ mustache: function(mustache) {
201
+ var params = this.setupStackForMustache(mustache);
202
+
203
+ this.opcode('invokeMustache', params.length, mustache.id.original);
204
+
205
+ if(mustache.escaped) {
206
+ this.opcode('appendEscaped');
207
+ } else {
208
+ this.opcode('append');
209
+ }
210
+ },
211
+
212
+ ID: function(id) {
213
+ this.addDepth(id.depth);
214
+
215
+ this.opcode('getContext', id.depth);
216
+
217
+ this.opcode('lookupWithHelpers', id.parts[0] || null);
218
+
219
+ for(var i=1, l=id.parts.length; i<l; i++) {
220
+ this.opcode('lookup', id.parts[i]);
221
+ }
222
+ },
223
+
224
+ STRING: function(string) {
225
+ this.opcode('pushString', string.string);
226
+ },
227
+
228
+ INTEGER: function(integer) {
229
+ this.opcode('push', integer.integer);
230
+ },
231
+
232
+ BOOLEAN: function(bool) {
233
+ this.opcode('push', bool.bool);
234
+ },
235
+
236
+ comment: function() {},
237
+
238
+ // HELPERS
239
+ pushParams: function(params) {
240
+ var i = params.length, param;
241
+
242
+ while(i--) {
243
+ param = params[i];
244
+
245
+ if(this.options.stringParams) {
246
+ if(param.depth) {
247
+ this.addDepth(param.depth);
248
+ }
249
+
250
+ this.opcode('getContext', param.depth || 0);
251
+ this.opcode('pushStringParam', param.string);
252
+ } else {
253
+ this[param.type](param);
254
+ }
255
+ }
256
+ },
257
+
258
+ opcode: function(name, val1, val2) {
259
+ this.opcodes.push(Compiler.OPCODE_MAP[name]);
260
+ if(val1 !== undefined) { this.opcodes.push(val1); }
261
+ if(val2 !== undefined) { this.opcodes.push(val2); }
262
+ },
263
+
264
+ declare: function(name, value) {
265
+ this.opcodes.push('DECLARE');
266
+ this.opcodes.push(name);
267
+ this.opcodes.push(value);
268
+ },
269
+
270
+ addDepth: function(depth) {
271
+ if(depth === 0) { return; }
272
+
273
+ if(!this.depths[depth]) {
274
+ this.depths[depth] = true;
275
+ this.depths.list.push(depth);
276
+ }
277
+ },
278
+
279
+ setupStackForMustache: function(mustache) {
280
+ var params = mustache.params;
281
+
282
+ this.pushParams(params);
283
+
284
+ if(mustache.hash) {
285
+ this.hash(mustache.hash);
286
+ } else {
287
+ this.opcode('push', '{}');
288
+ }
289
+
290
+ this.ID(mustache.id);
291
+
292
+ return params;
293
+ }
294
+ };
295
+
296
+ JavaScriptCompiler.prototype = {
297
+ // PUBLIC API: You can override these methods in a subclass to provide
298
+ // alternative compiled forms for name lookup and buffering semantics
299
+ nameLookup: function(parent, name, type) {
300
+ if(JavaScriptCompiler.RESERVED_WORDS[name] || name.indexOf('-') !== -1 || !isNaN(name)) {
301
+ return parent + "['" + name + "']";
302
+ } else if (/^[0-9]+$/.test(name)) {
303
+ return parent + "[" + name + "]";
304
+ } else {
305
+ return parent + "." + name;
306
+ }
307
+ },
308
+
309
+ appendToBuffer: function(string) {
310
+ return "buffer = buffer + " + string + ";";
311
+ },
312
+
313
+ initializeBuffer: function() {
314
+ return this.quotedString("");
315
+ },
316
+ // END PUBLIC API
317
+
318
+ compile: function(environment, options) {
319
+ this.environment = environment;
320
+ this.options = options || {};
321
+
322
+ this.preamble();
323
+
324
+ this.stackSlot = 0;
325
+ this.stackVars = [];
326
+ this.registers = {list: []};
327
+
328
+ this.compileChildren(environment, options);
329
+
330
+ Handlebars.log(Handlebars.logger.DEBUG, environment.disassemble() + "\n\n");
331
+
332
+ var opcodes = environment.opcodes, opcode, name, declareName, declareVal;
333
+
334
+ this.i = 0;
335
+
336
+ for(l=opcodes.length; this.i<l; this.i++) {
337
+ opcode = this.nextOpcode(0);
338
+
339
+ if(opcode[0] === 'DECLARE') {
340
+ this.i = this.i + 2;
341
+ this[opcode[1]] = opcode[2];
342
+ } else {
343
+ this.i = this.i + opcode[1].length;
344
+ this[opcode[0]].apply(this, opcode[1]);
345
+ }
346
+ }
347
+
348
+ return this.createFunction();
349
+ },
350
+
351
+ nextOpcode: function(n) {
352
+ var opcodes = this.environment.opcodes, opcode = opcodes[this.i + n], name, val;
353
+ var extraParams, codes;
354
+
355
+ if(opcode === 'DECLARE') {
356
+ name = opcodes[this.i + 1];
357
+ val = opcodes[this.i + 2];
358
+ return ['DECLARE', name, val];
359
+ } else {
360
+ name = Compiler.DISASSEMBLE_MAP[opcode];
361
+
362
+ extraParams = Compiler.multiParamSize(opcode);
363
+ codes = [];
364
+
365
+ for(var j=0; j<extraParams; j++) {
366
+ codes.push(opcodes[this.i + j + 1 + n]);
367
+ }
368
+
369
+ return [name, codes];
370
+ }
371
+ },
372
+
373
+ eat: function(opcode) {
374
+ this.i = this.i + opcode.length;
375
+ },
376
+
377
+ preamble: function() {
378
+ var out = [];
379
+ out.push("var buffer = " + this.initializeBuffer() + ", currentContext = context");
380
+
381
+ var copies = "helpers = helpers || Handlebars.helpers;";
382
+ if(this.environment.usePartial) { copies = copies + " partials = partials || Handlebars.partials;"; }
383
+ out.push(copies);
384
+
385
+ // track the last context pushed into place to allow skipping the
386
+ // getContext opcode when it would be a noop
387
+ this.lastContext = 0;
388
+ this.source = out;
389
+ },
390
+
391
+ createFunction: function() {
392
+ var container = {
393
+ escapeExpression: Handlebars.Utils.escapeExpression,
394
+ invokePartial: Handlebars.VM.invokePartial,
395
+ programs: [],
396
+ program: function(i, helpers, partials, data) {
397
+ var programWrapper = this.programs[i];
398
+ if(data) {
399
+ return Handlebars.VM.program(this.children[i], helpers, partials, data);
400
+ } else if(programWrapper) {
401
+ return programWrapper;
402
+ } else {
403
+ programWrapper = this.programs[i] = Handlebars.VM.program(this.children[i], helpers, partials);
404
+ return programWrapper;
405
+ }
406
+ },
407
+ programWithDepth: Handlebars.VM.programWithDepth,
408
+ noop: Handlebars.VM.noop
409
+ };
410
+ var locals = this.stackVars.concat(this.registers.list);
411
+
412
+ if(locals.length > 0) {
413
+ this.source[0] = this.source[0] + ", " + locals.join(", ");
414
+ }
415
+
416
+ this.source[0] = this.source[0] + ";";
417
+
418
+ this.source.push("return buffer;");
419
+
420
+ var params = ["Handlebars", "context", "helpers", "partials"];
421
+
422
+ if(this.options.data) { params.push("data"); }
423
+
424
+ for(var i=0, l=this.environment.depths.list.length; i<l; i++) {
425
+ params.push("depth" + this.environment.depths.list[i]);
426
+ }
427
+
428
+ if(params.length === 4 && !this.environment.usePartial) { params.pop(); }
429
+
430
+ params.push(this.source.join("\n"));
431
+
432
+ var fn = Function.apply(this, params);
433
+ fn.displayName = "Handlebars.js";
434
+
435
+ Handlebars.log(Handlebars.logger.DEBUG, fn.toString() + "\n\n");
436
+
437
+ container.render = fn;
438
+
439
+ container.children = this.environment.children;
440
+
441
+ return function(context, options, $depth) {
442
+ options = options || {};
443
+ var args = [Handlebars, context, options.helpers, options.partials, options.data];
444
+ var depth = Array.prototype.slice.call(arguments, 2);
445
+ args = args.concat(depth);
446
+ return container.render.apply(container, args);
447
+ };
448
+ },
449
+
450
+ appendContent: function(content) {
451
+ this.source.push(this.appendToBuffer(this.quotedString(content)));
452
+ },
453
+
454
+ append: function() {
455
+ var local = this.popStack();
456
+ this.source.push("if(" + local + " || " + local + " === 0) { " + this.appendToBuffer(local) + " }");
457
+ },
458
+
459
+ appendEscaped: function() {
460
+ var opcode = this.nextOpcode(1), extra = "";
461
+
462
+ if(opcode[0] === 'appendContent') {
463
+ extra = " + " + this.quotedString(opcode[1][0]);
464
+ this.eat(opcode);
465
+ }
466
+
467
+ this.source.push(this.appendToBuffer("this.escapeExpression(" + this.popStack() + ")" + extra));
468
+ },
469
+
470
+ getContext: function(depth) {
471
+ if(this.lastContext !== depth) {
472
+ this.lastContext = depth;
473
+
474
+ if(depth === 0) {
475
+ this.source.push("currentContext = context;");
476
+ } else {
477
+ this.source.push("currentContext = depth" + depth + ";");
478
+ }
479
+ }
480
+ },
481
+
482
+ lookupWithHelpers: function(name) {
483
+ if(name) {
484
+ var topStack = this.nextStack();
485
+
486
+ var toPush = "if('" + name + "' in helpers) { " + topStack +
487
+ " = " + this.nameLookup('helpers', name, 'helper') +
488
+ "; } else { " + topStack + " = " +
489
+ this.nameLookup('currentContext', name, 'context') +
490
+ "; }";
491
+
492
+ this.source.push(toPush);
493
+ } else {
494
+ this.pushStack("currentContext");
495
+ }
496
+ },
497
+
498
+ lookup: function(name) {
499
+ var topStack = this.topStack();
500
+ this.source.push(topStack + " = " + this.nameLookup(topStack, name, 'context') + ";");
501
+ },
502
+
503
+ pushStringParam: function(string) {
504
+ this.pushStack("currentContext");
505
+ this.pushString(string);
506
+ },
507
+
508
+ pushString: function(string) {
509
+ this.pushStack(this.quotedString(string));
510
+ },
511
+
512
+ push: function(name) {
513
+ this.pushStack(name);
514
+ },
515
+
516
+ invokeMustache: function(paramSize, original) {
517
+ this.populateParams(paramSize, this.quotedString(original), "{}", null, function(nextStack, helperMissingString, id) {
518
+ this.source.push("else if(" + id + "=== undefined) { " + nextStack + " = helpers.helperMissing.call(" + helperMissingString + "); }");
519
+ this.source.push("else { " + nextStack + " = " + id + "; }");
520
+ });
521
+ },
522
+
523
+ invokeProgram: function(guid, paramSize) {
524
+ var inverse = this.programExpression(this.inverse);
525
+ var mainProgram = this.programExpression(guid);
526
+
527
+ this.populateParams(paramSize, null, mainProgram, inverse, function(nextStack, helperMissingString, id) {
528
+ this.source.push("else { " + nextStack + " = helpers.blockHelperMissing.call(" + helperMissingString + "); }");
529
+ });
530
+ },
531
+
532
+ populateParams: function(paramSize, helperId, program, inverse, fn) {
533
+ var id = this.popStack(), nextStack;
534
+ var params = [], param, stringParam;
535
+
536
+ var hash = this.popStack();
537
+
538
+ this.register('tmp1', program);
539
+ this.source.push('tmp1.hash = ' + hash + ';');
540
+
541
+ if(this.options.stringParams) {
542
+ this.source.push('tmp1.contexts = [];');
543
+ }
544
+
545
+ for(var i=0; i<paramSize; i++) {
546
+ param = this.popStack();
547
+ params.push(param);
548
+
549
+ if(this.options.stringParams) {
550
+ this.source.push('tmp1.contexts.push(' + this.popStack() + ');');
551
+ }
552
+ }
553
+
554
+ if(inverse) {
555
+ this.source.push('tmp1.fn = tmp1;');
556
+ this.source.push('tmp1.inverse = ' + inverse + ';');
557
+ }
558
+
559
+ if(this.options.data) {
560
+ this.source.push('tmp1.data = data;');
561
+ }
562
+
563
+ params.push('tmp1');
564
+
565
+ this.populateCall(params, id, helperId || id, fn);
566
+ },
567
+
568
+ populateCall: function(params, id, helperId, fn) {
569
+ var paramString = ["context"].concat(params).join(", ");
570
+ var helperMissingString = ["context"].concat(helperId).concat(params).join(", ");
571
+
572
+ nextStack = this.nextStack();
573
+
574
+ this.source.push("if(typeof " + id + " === 'function') { " + nextStack + " = " + id + ".call(" + paramString + "); }");
575
+ fn.call(this, nextStack, helperMissingString, id);
576
+ },
577
+
578
+ invokePartial: function(context) {
579
+ this.pushStack("this.invokePartial(" + this.nameLookup('partials', context, 'partial') + ", '" + context + "', " + this.popStack() + ", helpers, partials);");
580
+ },
581
+
582
+ assignToHash: function(key) {
583
+ var value = this.popStack();
584
+ var hash = this.topStack();
585
+
586
+ this.source.push(hash + "['" + key + "'] = " + value + ";");
587
+ },
588
+
589
+ // HELPERS
590
+
591
+ compiler: JavaScriptCompiler,
592
+
593
+ compileChildren: function(environment, options) {
594
+ var children = environment.children, child, compiler;
595
+ var compiled = [];
596
+
597
+ for(var i=0, l=children.length; i<l; i++) {
598
+ child = children[i];
599
+ compiler = new this.compiler();
600
+
601
+ compiled[i] = compiler.compile(child, options);
602
+ }
603
+
604
+ environment.rawChildren = children;
605
+ environment.children = compiled;
606
+ },
607
+
608
+ programExpression: function(guid) {
609
+ if(guid == null) { return "this.noop"; }
610
+
611
+ var programParams = [guid, "helpers", "partials"];
612
+
613
+ var depths = this.environment.rawChildren[guid].depths.list;
614
+
615
+ if(this.options.data) { programParams.push("data"); }
616
+
617
+ for(var i=0, l = depths.length; i<l; i++) {
618
+ depth = depths[i];
619
+
620
+ if(depth === 1) { programParams.push("context"); }
621
+ else { programParams.push("depth" + (depth - 1)); }
622
+ }
623
+
624
+ if(!this.environment.usePartial) {
625
+ if(programParams[3]) {
626
+ programParams[2] = "null";
627
+ } else {
628
+ programParams.pop();
629
+ }
630
+ }
631
+
632
+ if(depths.length === 0) {
633
+ return "this.program(" + programParams.join(", ") + ")";
634
+ } else {
635
+ programParams[0] = "this.children[" + guid + "]";
636
+ return "this.programWithDepth(" + programParams.join(", ") + ")";
637
+ }
638
+ },
639
+
640
+ register: function(name, val) {
641
+ this.useRegister(name);
642
+ this.source.push(name + " = " + val + ";");
643
+ },
644
+
645
+ useRegister: function(name) {
646
+ if(!this.registers[name]) {
647
+ this.registers[name] = true;
648
+ this.registers.list.push(name);
649
+ }
650
+ },
651
+
652
+ pushStack: function(item) {
653
+ this.source.push(this.nextStack() + " = " + item + ";");
654
+ return "stack" + this.stackSlot;
655
+ },
656
+
657
+ nextStack: function() {
658
+ this.stackSlot++;
659
+ if(this.stackSlot > this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); }
660
+ return "stack" + this.stackSlot;
661
+ },
662
+
663
+ popStack: function() {
664
+ return "stack" + this.stackSlot--;
665
+ },
666
+
667
+ topStack: function() {
668
+ return "stack" + this.stackSlot;
669
+ },
670
+
671
+ quotedString: function(str) {
672
+ return '"' + str
673
+ .replace(/\\/g, '\\\\')
674
+ .replace(/"/g, '\\"')
675
+ .replace(/\n/g, '\\n')
676
+ .replace(/\r/g, '\\r') + '"';
677
+ }
678
+ };
679
+
680
+ var reservedWords = ("break case catch continue default delete do else finally " +
681
+ "for function if in instanceof new return switch this throw " +
682
+ "try typeof var void while with null true false").split(" ");
683
+
684
+ compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
685
+
686
+ for(var i=0, l=reservedWords.length; i<l; i++) {
687
+ compilerWords[reservedWords[i]] = true;
688
+ }
689
+
690
+ })(Handlebars.Compiler, Handlebars.JavaScriptCompiler);
691
+
692
+ Handlebars.VM = {
693
+ programWithDepth: function(fn, helpers, partials, data, $depth) {
694
+ var args = Array.prototype.slice.call(arguments, 4);
695
+
696
+ return function(context, options) {
697
+ options = options || {};
698
+
699
+ options = {
700
+ helpers: options.helpers || helpers,
701
+ partials: options.partials || partials,
702
+ data: options.data || data
703
+ };
704
+
705
+ return fn.apply(this, [context, options].concat(args));
706
+ };
707
+ },
708
+ program: function(fn, helpers, partials, data) {
709
+ return function(context, options) {
710
+ options = options || {};
711
+
712
+ return fn(context, {
713
+ helpers: options.helpers || helpers,
714
+ partials: options.partials || partials,
715
+ data: options.data || data
716
+ });
717
+ };
718
+ },
719
+ noop: function() { return ""; },
720
+ compile: function(string, options) {
721
+ var ast = Handlebars.parse(string);
722
+ var environment = new Handlebars.Compiler().compile(ast, options);
723
+ return new Handlebars.JavaScriptCompiler().compile(environment, options);
724
+ },
725
+ invokePartial: function(partial, name, context, helpers, partials) {
726
+ if(partial === undefined) {
727
+ throw new Handlebars.Exception("The partial " + name + " could not be found");
728
+ } else if(partial instanceof Function) {
729
+ return partial(context, {helpers: helpers, partials: partials});
730
+ } else {
731
+ partials[name] = Handlebars.VM.compile(partial);
732
+ return partials[name](context, {helpers: helpers, partials: partials});
733
+ }
734
+ }
735
+ };
736
+
737
+ Handlebars.compile = Handlebars.VM.compile;
738
+ // END(BROWSER)
739
+