Update Handlebars.js to v2.0.0

This commit is contained in:
Dmitriy Simushev 2014-09-15 14:32:34 +00:00
parent 340c0f9213
commit e7b0201e0a
8 changed files with 47 additions and 114 deletions

View File

@ -13,6 +13,7 @@ var fs = require('fs'),
phpcs = require('gulp-phpcs'), phpcs = require('gulp-phpcs'),
order = require('gulp-order'), order = require('gulp-order'),
handlebars = require('gulp-handlebars'), handlebars = require('gulp-handlebars'),
handlebarsEngine = require('handlebars'),
defineModule = require('gulp-define-module'), defineModule = require('gulp-define-module'),
header = require('gulp-header'), header = require('gulp-header'),
zip = require('gulp-zip'), zip = require('gulp-zip'),
@ -112,7 +113,10 @@ gulp.task('chat-styles-handlebars', function() {
var stylePath = config.chatStylesPath + '/default'; var stylePath = config.chatStylesPath + '/default';
return gulp.src(stylePath + '/templates_src/client_side/**/*.handlebars') return gulp.src(stylePath + '/templates_src/client_side/**/*.handlebars')
.pipe(handlebars()) .pipe(handlebars({
// Use specific version of Handlebars.js
handlebars: handlebarsEngine
}))
.pipe(wrapHandlebarsTemplate()) .pipe(wrapHandlebarsTemplate())
.pipe(concat('templates.js')) .pipe(concat('templates.js'))
.pipe(uglify({preserveComments: 'some'})) .pipe(uglify({preserveComments: 'some'}))
@ -138,11 +142,17 @@ gulp.task('page-styles', function() {
return eventStream.merge( return eventStream.merge(
gulp.src(stylePath + '/templates_src/client_side/default/**/*.handlebars') gulp.src(stylePath + '/templates_src/client_side/default/**/*.handlebars')
.pipe(handlebars()) .pipe(handlebars({
// Use specific version of Handlebars.js
handlebars: handlebarsEngine
}))
.pipe(wrapHandlebarsTemplate()) .pipe(wrapHandlebarsTemplate())
.pipe(concat('default_app.tpl.js')), .pipe(concat('default_app.tpl.js')),
gulp.src(stylePath + '/templates_src/client_side/users/**/*.handlebars') gulp.src(stylePath + '/templates_src/client_side/users/**/*.handlebars')
.pipe(handlebars()) .pipe(handlebars({
// Use specific version of Handlebars.js
handlebars: handlebarsEngine
}))
.pipe(wrapHandlebarsTemplate()) .pipe(wrapHandlebarsTemplate())
.pipe(concat('users_app.tpl.js')) .pipe(concat('users_app.tpl.js'))
) )

View File

@ -1,106 +0,0 @@
/*
handlebars v1.3.0
Copyright (C) 2011 by Yehuda Katz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var Handlebars=function(){var E=function(a){this.string=a};E.prototype.toString=function(){return""+this.string};var V=function(a){return U[a]||"&amp;"},q={},U={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},W=/[&<>"'`]/g,X=/[&<>"'`]/;q.extend=function(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])};var F=Object.prototype.toString;q.toString=F;var m=function(a){return"function"===typeof a};m(/x/)&&(m=function(a){return"function"===typeof a&&"[object Function]"===
F.call(a)});q.isFunction=m;var M=Array.isArray||function(a){return a&&"object"===typeof a?"[object Array]"===F.call(a):!1};q.isArray=M;q.escapeExpression=function(a){if(a instanceof E)return a.toString();if(!a&&0!==a)return"";a=""+a;return!X.test(a)?a:a.replace(W,V)};q.isEmpty=function(a){return!a&&0!==a?!0:M(a)&&0===a.length?!0:!1};var j=function(a,b){var c;b&&b.firstLine&&(c=b.firstLine,a+=" - "+c+":"+b.firstColumn);for(var d=Error.prototype.constructor.call(this,a),f=0;f<G.length;f++)this[G[f]]=
d[G[f]];c&&(this.lineNumber=c,this.column=b.firstColumn)},G="description fileName lineNumber message name number stack".split(" ");j.prototype=Error();var m=function(a,b){this.helpers=a||{};this.partials=b||{};var c=this;c.registerHelper("helperMissing",function(a){if(2!==arguments.length)throw new N("Missing helper: '"+a+"'");});c.registerHelper("blockHelperMissing",function(a,b){var e=b.inverse||function(){},h=b.fn;B(a)&&(a=a.call(this));return!0===a?h(this):!1===a||null==a?e(this):O(a)?0<a.length?
c.helpers.each(a,b):e(this):h(a)});c.registerHelper("each",function(a,b){var c=b.fn,h=b.inverse,g=0,j="",r;B(a)&&(a=a.call(this));b.data&&(r=P(b.data));if(a&&"object"===typeof a)if(O(a))for(var k=a.length;g<k;g++)r&&(r.index=g,r.first=0===g,r.last=g===a.length-1),j+=c(a[g],{data:r});else for(k in a)a.hasOwnProperty(k)&&(r&&(r.key=k,r.index=g,r.first=0===g),j+=c(a[k],{data:r}),g++);0===g&&(j=h(this));return j});c.registerHelper("if",function(a,b){B(a)&&(a=a.call(this));return!b.hash.includeZero&&!a||
u.isEmpty(a)?b.inverse(this):b.fn(this)});c.registerHelper("unless",function(a,b){return c.helpers["if"].call(this,a,{fn:b.inverse,inverse:b.fn,hash:b.hash})});c.registerHelper("with",function(a,b){B(a)&&(a=a.call(this));if(!u.isEmpty(a))return b.fn(a)});c.registerHelper("log",function(a,b){var e=b.data&&null!=b.data.level?parseInt(b.data.level,10):1;c.log(e,a)})},n=function(a,b){y.log(a,b)},p={},u=q,N=j;p.VERSION="1.3.0";p.COMPILER_REVISION=4;p.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",
3:"== 1.0.0-rc.4",4:">= 1.0.0"};var O=u.isArray,B=u.isFunction,Q=u.toString;p.HandlebarsEnvironment=m;m.prototype={constructor:m,logger:y,log:n,registerHelper:function(a,b,c){if("[object Object]"===Q.call(a)){if(c||b)throw new N("Arg not supported with multiple helpers");u.extend(this.helpers,a)}else c&&(b.not=c),this.helpers[a]=b},registerPartial:function(a,b){"[object Object]"===Q.call(a)?u.extend(this.partials,a):this.partials[a]=b}};var y={methodMap:{"0":"debug",1:"info",2:"warn",3:"error"},DEBUG:0,
INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(y.level<=a){var c=y.methodMap[a];"undefined"!==typeof console&&console[c]&&console[c].call(console,b)}}};p.logger=y;p.log=n;var P=function(a){var b={};u.extend(b,a);return b};p.createFrame=P;var H=function(a,b,c){var d=function(a,d){d=d||{};return b(a,d.data||c)};d.program=a;d.depth=0;return d},v={},I=p.COMPILER_REVISION,R=p.REVISION_CHANGES;v.checkRevision=function(a){var b=a&&a[0]||1;if(b!==I){if(b<I)throw new j("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+
R[I]+") or downgrade your runtime to an older version ("+R[b]+").");throw new j("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").");}};v.template=function(a,b){if(!b)throw new j("No environment passed to template");var c={escapeExpression:q.escapeExpression,invokePartial:function(a,c,e,h,g,n){var r=b.VM.invokePartial.apply(this,arguments);if(null!=r)return r;if(b.compile)return r={helpers:h,partials:g,data:n},
g[c]=b.compile(a,{data:void 0!==n},b),g[c](e,r);throw new j("The partial "+c+" could not be compiled when running in runtime-only mode");},programs:[],program:function(a,b,c){var h=this.programs[a];c?h=H(a,b,c):h||(h=this.programs[a]=H(a,b));return h},merge:function(a,b){var c=a||b;a&&(b&&a!==b)&&(c={},q.extend(c,b),q.extend(c,a));return c},programWithDepth:b.VM.programWithDepth,noop:b.VM.noop,compilerInfo:null};return function(d,f){f=f||{};var e=f.partial?f:b,h,g;f.partial||(h=f.helpers,g=f.partials);
e=a.call(c,e,d,h,g,f.data);f.partial||b.VM.checkRevision(c.compilerInfo);return e}};v.programWithDepth=function(a,b,c){var d=Array.prototype.slice.call(arguments,3),f=function(a,f){f=f||{};return b.apply(this,[a,f.data||c].concat(d))};f.program=a;f.depth=d.length;return f};v.program=H;v.invokePartial=function(a,b,c,d,f,e){d={partial:!0,helpers:d,partials:f,data:e};if(void 0===a)throw new j("The partial "+b+" could not be found");if(a instanceof Function)return a(c,d)};v.noop=function(){return""};
n=function(){var a=new p.HandlebarsEnvironment;q.extend(a,p);a.SafeString=E;a.Exception=j;a.Utils=q;a.VM=v;a.template=function(b){return v.template(b,a)};return a};m=n();m.create=n;var C,l=function(a){a=a||{};this.firstLine=a.first_line;this.firstColumn=a.first_column;this.lastColumn=a.last_column;this.lastLine=a.last_line},z={ProgramNode:function(a,b,c,d){var f;3===arguments.length?(d=c,c=null):2===arguments.length&&(d=b,b=null);l.call(this,d);this.type="program";this.statements=a;this.strip={};
c?((f=c[0])?(f={first_line:f.firstLine,last_line:f.lastLine,last_column:f.lastColumn,first_column:f.firstColumn},this.inverse=new z.ProgramNode(c,b,f)):this.inverse=new z.ProgramNode(c,b),this.strip.right=b.left):b&&(this.strip.left=b.right)},MustacheNode:function(a,b,c,d,f){l.call(this,f);this.type="mustache";this.strip=d;null!=c&&c.charAt?(c=c.charAt(3)||c.charAt(2),this.escaped="{"!==c&&"&"!==c):this.escaped=!!c;this.sexpr=a instanceof z.SexprNode?a:new z.SexprNode(a,b);this.sexpr.isRoot=!0;this.id=
this.sexpr.id;this.params=this.sexpr.params;this.hash=this.sexpr.hash;this.eligibleHelper=this.sexpr.eligibleHelper;this.isHelper=this.sexpr.isHelper},SexprNode:function(a,b,c){l.call(this,c);this.type="sexpr";this.hash=b;c=this.id=a[0];a=this.params=a.slice(1);this.isHelper=(this.eligibleHelper=c.isSimple)&&(a.length||b)},PartialNode:function(a,b,c,d){l.call(this,d);this.type="partial";this.partialName=a;this.context=b;this.strip=c},BlockNode:function(a,b,c,d,f){l.call(this,f);if(a.sexpr.id.original!==
d.path.original)throw new j(a.sexpr.id.original+" doesn't match "+d.path.original,this);this.type="block";this.mustache=a;this.program=b;this.inverse=c;this.strip={left:a.strip.left,right:d.strip.right};(b||c).strip.left=a.strip.right;(c||b).strip.right=d.strip.left;c&&!b&&(this.isInverse=!0)},ContentNode:function(a,b){l.call(this,b);this.type="content";this.string=a},HashNode:function(a,b){l.call(this,b);this.type="hash";this.pairs=a},IdNode:function(a,b){l.call(this,b);this.type="ID";for(var c=
"",d=[],f=0,e=0,h=a.length;e<h;e++){var g=a[e].part,c=c+((a[e].separator||"")+g);if(".."===g||"."===g||"this"===g){if(0<d.length)throw new j("Invalid path: "+c,this);".."===g?f++:this.isScoped=!0}else d.push(g)}this.original=c;this.parts=d;this.string=d.join(".");this.depth=f;this.isSimple=1===a.length&&!this.isScoped&&0===f;this.stringModeValue=this.string},PartialNameNode:function(a,b){l.call(this,b);this.type="PARTIAL_NAME";this.name=a.original},DataNode:function(a,b){l.call(this,b);this.type=
"DATA";this.id=a},StringNode:function(a,b){l.call(this,b);this.type="STRING";this.original=this.string=this.stringModeValue=a},IntegerNode:function(a,b){l.call(this,b);this.type="INTEGER";this.original=this.integer=a;this.stringModeValue=Number(a)},BooleanNode:function(a,b){l.call(this,b);this.type="BOOLEAN";this.bool=a;this.stringModeValue="true"===a},CommentNode:function(a,b){l.call(this,b);this.type="comment";this.comment=a}};C=z;var w=function(a,b){return{left:"~"===a.charAt(2),right:"~"===b.charAt(0)||
"~"===b.charAt(1)}},n=function(){this.yy={}},D={trace:function(){},yy:{},symbols_:{error:2,root:3,statements:4,EOF:5,program:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,sexpr:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,partial_option0:27,sexpr_repetition0:28,sexpr_option0:29,dataName:30,param:31,STRING:32,INTEGER:33,BOOLEAN:34,OPEN_SEXPR:35,
CLOSE_SEXPR:36,hash:37,hash_repetition_plus0:38,hashSegment:39,ID:40,EQUALS:41,DATA:42,pathSegments:43,SEP:44,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},productions_:[0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,
2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[37,1],[39,3],[26,1],[26,1],[26,1],[30,2],[21,1],[43,3],[43,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[38,1],[38,2]],performAction:function(a,b,c,d,f,e){a=e.length-1;switch(f){case 1:return new d.ProgramNode(e[a-1],this._$);case 2:return new d.ProgramNode([],this._$);case 3:this.$=new d.ProgramNode([],e[a-1],e[a],this._$);break;case 4:this.$=new d.ProgramNode(e[a-
2],e[a-1],e[a],this._$);break;case 5:this.$=new d.ProgramNode(e[a-1],e[a],[],this._$);break;case 6:this.$=new d.ProgramNode(e[a],this._$);break;case 7:this.$=new d.ProgramNode([],this._$);break;case 8:this.$=new d.ProgramNode([],this._$);break;case 9:this.$=[e[a]];break;case 10:e[a-1].push(e[a]);this.$=e[a-1];break;case 11:this.$=new d.BlockNode(e[a-2],e[a-1].inverse,e[a-1],e[a],this._$);break;case 12:this.$=new d.BlockNode(e[a-2],e[a-1],e[a-1].inverse,e[a],this._$);break;case 13:this.$=e[a];break;
case 14:this.$=e[a];break;case 15:this.$=new d.ContentNode(e[a],this._$);break;case 16:this.$=new d.CommentNode(e[a],this._$);break;case 17:this.$=new d.MustacheNode(e[a-1],null,e[a-2],w(e[a-2],e[a]),this._$);break;case 18:this.$=new d.MustacheNode(e[a-1],null,e[a-2],w(e[a-2],e[a]),this._$);break;case 19:this.$={path:e[a-1],strip:w(e[a-2],e[a])};break;case 20:this.$=new d.MustacheNode(e[a-1],null,e[a-2],w(e[a-2],e[a]),this._$);break;case 21:this.$=new d.MustacheNode(e[a-1],null,e[a-2],w(e[a-2],e[a]),
this._$);break;case 22:this.$=new d.PartialNode(e[a-2],e[a-1],w(e[a-3],e[a]),this._$);break;case 23:this.$=w(e[a-1],e[a]);break;case 24:this.$=new d.SexprNode([e[a-2]].concat(e[a-1]),e[a],this._$);break;case 25:this.$=new d.SexprNode([e[a]],null,this._$);break;case 26:this.$=e[a];break;case 27:this.$=new d.StringNode(e[a],this._$);break;case 28:this.$=new d.IntegerNode(e[a],this._$);break;case 29:this.$=new d.BooleanNode(e[a],this._$);break;case 30:this.$=e[a];break;case 31:e[a-1].isHelper=!0;this.$=
e[a-1];break;case 32:this.$=new d.HashNode(e[a],this._$);break;case 33:this.$=[e[a-2],e[a]];break;case 34:this.$=new d.PartialNameNode(e[a],this._$);break;case 35:this.$=new d.PartialNameNode(new d.StringNode(e[a],this._$),this._$);break;case 36:this.$=new d.PartialNameNode(new d.IntegerNode(e[a],this._$));break;case 37:this.$=new d.DataNode(e[a],this._$);break;case 38:this.$=new d.IdNode(e[a],this._$);break;case 39:e[a-2].push({part:e[a],separator:e[a-1]});this.$=e[a-2];break;case 40:this.$=[{part:e[a]}];
break;case 43:this.$=[];break;case 44:e[a-1].push(e[a]);break;case 47:this.$=[e[a]];break;case 48:e[a-1].push(e[a])}},table:[{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,
12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,
16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:29,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:30,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:31,21:24,30:25,40:[1,28],42:[1,27],43:26},{21:33,26:32,32:[1,34],33:[1,35],40:[1,28],43:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,
8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,40:[1,28],42:[1,27],43:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,43],24:[2,43],28:43,32:[2,43],33:[2,43],34:[2,43],35:[2,43],36:[2,43],40:[2,43],42:[2,43]},{18:[2,25],24:[2,25],36:[2,25]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],40:[2,38],42:[2,38],44:[1,44]},{21:45,40:[1,28],43:26},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,
40],36:[2,40],40:[2,40],42:[2,40],44:[2,40]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,41],21:50,27:49,40:[1,28],43:26},{18:[2,34],40:[2,34]},{18:[2,35],40:[2,35]},{18:[2,36],40:[2,36]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,40:[1,28],43:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],
25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,45],21:56,24:[2,45],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:[1,61],36:[2,45],37:55,38:62,39:63,40:[1,64],42:[1,27],43:26},{40:[1,65]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],35:[2,37],36:[2,37],40:[2,37],42:[2,
37]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,66]},{18:[2,42]},{18:[1,67]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24],36:[2,24]},{18:[2,44],24:[2,44],32:[2,44],33:[2,44],34:[2,44],35:[2,44],
36:[2,44],40:[2,44],42:[2,44]},{18:[2,46],24:[2,46],36:[2,46]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],40:[2,26],42:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],40:[2,27],42:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],40:[2,28],42:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],40:[2,29],42:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],
40:[2,30],42:[2,30]},{17:68,21:24,30:25,40:[1,28],42:[1,27],43:26},{18:[2,32],24:[2,32],36:[2,32],39:69,40:[1,70]},{18:[2,47],24:[2,47],36:[2,47],40:[2,47]},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],41:[1,71],42:[2,40],44:[2,40]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],35:[2,39],36:[2,39],40:[2,39],42:[2,39],44:[2,39]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],
19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{36:[1,72]},{18:[2,48],24:[2,48],36:[2,48],40:[2,48]},{41:[1,71]},{21:56,30:60,31:73,32:[1,57],33:[1,58],34:[1,59],35:[1,61],40:[1,28],42:[1,27],43:26},{18:[2,31],24:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],40:[2,31],42:[2,31]},{18:[2,33],24:[2,33],36:[2,33],40:[2,33]}],defaultActions:{3:[2,2],16:[2,1],50:[2,42]},parseError:function(a){throw Error(a);},parse:function(a){var b=[0],c=[null],d=[],f=this.table,e="",h=0,g=0,j=0;this.lexer.setInput(a);
this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});a=this.lexer.yylloc;d.push(a);var n=this.lexer.options&&this.lexer.options.ranges;"function"===typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var k,p,l,s,m={},q,t;;){l=b[b.length-1];if(this.defaultActions[l])s=this.defaultActions[l];else{if(null===k||"undefined"==typeof k)k=void 0,k=this.lexer.lex()||1,"number"!==typeof k&&(k=this.symbols_[k]||k);s=
f[l]&&f[l][k]}if("undefined"===typeof s||!s.length||!s[0]){var u="";if(!j){t=[];for(q in f[l])this.terminals_[q]&&2<q&&t.push("'"+this.terminals_[q]+"'");u=this.lexer.showPosition?"Parse error on line "+(h+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+t.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'");this.parseError(u,{text:this.lexer.match,token:this.terminals_[k]||k,line:this.lexer.yylineno,loc:a,
expected:t})}}if(s[0]instanceof Array&&1<s.length)throw Error("Parse Error: multiple actions possible at state: "+l+", token: "+k);switch(s[0]){case 1:b.push(k);c.push(this.lexer.yytext);d.push(this.lexer.yylloc);b.push(s[1]);k=null;p?(k=p,p=null):(g=this.lexer.yyleng,e=this.lexer.yytext,h=this.lexer.yylineno,a=this.lexer.yylloc,0<j&&j--);break;case 2:t=this.productions_[s[1]][1];m.$=c[c.length-t];m._$={first_line:d[d.length-(t||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-
(t||1)].first_column,last_column:d[d.length-1].last_column};n&&(m._$.range=[d[d.length-(t||1)].range[0],d[d.length-1].range[1]]);l=this.performAction.call(m,e,g,h,this.yy,s[1],c,d);if("undefined"!==typeof l)return l;t&&(b=b.slice(0,-2*t),c=c.slice(0,-1*t),d=d.slice(0,-1*t));b.push(this.productions_[s[1]][0]);c.push(m.$);d.push(m._$);s=f[b[b.length-2]][b[b.length-1]];b.push(s);break;case 3:return!0}}return!0},lexer:{EOF:1,parseError:function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a);
},setInput:function(a){this._input=a;this._more=this._less=this.done=!1;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};this.options.ranges&&(this.yylloc.range=[0,0]);this.offset=0;return this},input:function(){var a=this._input[0];this.yytext+=a;this.yyleng++;this.offset++;this.match+=a;this.matched+=a;a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++;
this.options.ranges&&this.yylloc.range[1]++;this._input=this._input.slice(1);return a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-b-1);this.offset-=b;a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1);this.matched=this.matched.substr(0,this.matched.length-1);c.length-1&&(this.yylineno-=c.length-1);var d=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,
last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===a.length?this.yylloc.first_column:0)+a[a.length-c.length].length-c[0].length:this.yylloc.first_column-b};this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-b]);return this},more:function(){this._more=!0;return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(20<a.length?"...":"")+a.substr(-20).replace(/\n/g,
"")},upcomingInput:function(){var a=this.match;20>a.length&&(a+=this._input.substr(0,20-a.length));return(a.substr(0,20)+(20<a.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c;this._more||(this.match=this.yytext="");for(var d=this._currentRules(),f=0;f<d.length;f++)if((b=this._input.match(this.rules[d[f]]))&&(!a||
b[0].length>a[0].length))if(a=b,c=f,!this.options.flex)break;if(a){if(b=a[0].match(/(?:\r\n?|\n).*/g))this.yylineno+=b.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length};this.yytext+=a[0];this.match+=a[0];this.matches=a;this.yyleng=this.yytext.length;this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]);
this._more=!1;this._input=this._input.slice(a[0].length);this.matched+=a[0];a=this.performAction.call(this,this.yy,this,d[c],this.conditionStack[this.conditionStack.length-1]);this.done&&this._input&&(this.done=!1);if(a)return a}else return""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!==typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},
popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)},options:{},performAction:function(a,b,c){function d(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:"\\\\"===b.yytext.slice(-2)?(d(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(d(0,1),this.begin("emu")):
this.begin("mu");if(b.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return d(0,4),this.popState(),15;case 4:return 35;case 5:return 36;case 6:return 25;case 7:return 16;case 8:return 20;case 9:return 19;case 10:return 19;case 11:return 23;case 12:return 22;case 13:this.popState();this.begin("com");break;case 14:return d(3,5),this.popState(),15;case 15:return 22;case 16:return 41;case 17:return 40;case 18:return 40;case 19:return 44;case 21:return this.popState(),
24;case 22:return this.popState(),18;case 23:return b.yytext=d(1,2).replace(/\\"/g,'"'),32;case 24:return b.yytext=d(1,2).replace(/\\'/g,"'"),32;case 25:return 42;case 26:return 34;case 27:return 34;case 28:return 33;case 29:return 40;case 30:return b.yytext=d(1,2),40;case 31:return"INVALID";case 32:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,
/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[4,5,6,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],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[3],inclusive:!1},INITIAL:{rules:[0,1,32],inclusive:!0}}}};n.prototype=D;D.Parser=n;var J=new n,K=function(){};K.prototype={compiler:K,disassemble:function(){for(var a=this.opcodes,b,c=[],d,f,e=0,h=a.length;e<h;e++)if(b=a[e],"DECLARE"===b.opcode)c.push("DECLARE "+b.name+"="+b.value);else{d=[];for(var g=0;g<b.args.length;g++)f=b.args[g],"string"===typeof f&&(f='"'+f.replace("\n",
"\\n")+'"'),d.push(f);c.push(b.opcode+" "+d.join(" "))}return c.join("\n")},equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],f=a.opcodes[c];if(d.opcode!==f.opcode||d.args.length!==f.args.length)return!1;for(var e=0;e<d.args.length;e++)if(d.args[e]!==f.args[e])return!1}b=this.children.length;if(a.children.length!==b)return!1;for(c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,
b){this.opcodes=[];this.children=[];this.depths={list:[]};this.options=b;var c=this.options.knownHelpers;this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0};if(c)for(var d in c)this.options.knownHelpers[d]=c[d];return this.accept(a)},accept:function(a){var b=a.strip||{};b.left&&this.opcode("strip");a=this[a.type](a);b.right&&this.opcode("strip");return a},program:function(a){a=a.statements;for(var b=0,c=a.length;b<c;b++)this.accept(a[b]);this.isSimple=
1===c;this.depths.list=this.depths.list.sort(function(a,b){return a-b});return this},compileProgram:function(a){a=(new this.compiler).compile(a,this.options);var b=this.guid++,c;this.usePartial=this.usePartial||a.usePartial;this.children[b]=a;for(var d=0,f=a.depths.list.length;d<f;d++)c=a.depths.list[d],2>c||this.addDepth(c-1);return b},block:function(a){var b=a.mustache,c=a.program;a=a.inverse;c&&(c=this.compileProgram(c));a&&(a=this.compileProgram(a));var b=b.sexpr,d=this.classifySexpr(b);"helper"===
d?this.helperSexpr(b,c,a):"simple"===d?(this.simpleSexpr(b),this.opcode("pushProgram",c),this.opcode("pushProgram",a),this.opcode("emptyHash"),this.opcode("blockValue")):(this.ambiguousSexpr(b,c,a),this.opcode("pushProgram",c),this.opcode("pushProgram",a),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue"));this.opcode("append")},hash:function(a){a=a.pairs;var b,c;this.opcode("pushHash");for(var d=0,f=a.length;d<f;d++)b=a[d],c=b[1],this.options.stringParams?(c.depth&&this.addDepth(c.depth),
this.opcode("getContext",c.depth||0),this.opcode("pushStringParam",c.stringModeValue,c.type),"sexpr"===c.type&&this.sexpr(c)):this.accept(c),this.opcode("assignToHash",b[0]);this.opcode("popHash")},partial:function(a){var b=a.partialName;this.usePartial=!0;a.context?this.ID(a.context):this.opcode("push","depth0");this.opcode("invokePartial",b.name);this.opcode("append")},content:function(a){this.opcode("appendContent",a.string)},mustache:function(a){this.sexpr(a.sexpr);a.escaped&&!this.options.noEscape?
this.opcode("appendEscaped"):this.opcode("append")},ambiguousSexpr:function(a,b,c){a=a.id;var d=a.parts[0],f=null!=b||null!=c;this.opcode("getContext",a.depth);this.opcode("pushProgram",b);this.opcode("pushProgram",c);this.opcode("invokeAmbiguous",d,f)},simpleSexpr:function(a){a=a.id;"DATA"===a.type?this.DATA(a):a.parts.length?this.ID(a):(this.addDepth(a.depth),this.opcode("getContext",a.depth),this.opcode("pushContext"));this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){b=this.setupFullMustacheParams(a,
b,c);c=a.id.parts[0];if(this.options.knownHelpers[c])this.opcode("invokeKnownHelper",b.length,c);else{if(this.options.knownHelpersOnly)throw new j("You specified knownHelpersOnly, but used the unknown helper "+c,a);this.opcode("invokeHelper",b.length,c,a.isRoot)}},sexpr:function(a){var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ID:function(a){this.addDepth(a.depth);this.opcode("getContext",a.depth);a.parts[0]?this.opcode("lookupOnContext",
a.parts[0]):this.opcode("pushContext");for(var b=1,c=a.parts.length;b<c;b++)this.opcode("lookup",a.parts[b])},DATA:function(a){this.options.data=!0;if(a.id.isScoped||a.id.depth)throw new j("Scoped data references are not supported: "+a.original,a);this.opcode("lookupData");a=a.id.parts;for(var b=0,c=a.length;b<c;b++)this.opcode("lookup",a[b])},STRING:function(a){this.opcode("pushString",a.string)},INTEGER:function(a){this.opcode("pushLiteral",a.integer)},BOOLEAN:function(a){this.opcode("pushLiteral",
a.bool)},comment:function(){},opcode:function(a){this.opcodes.push({opcode:a,args:[].slice.call(arguments,1)})},declare:function(a,b){this.opcodes.push({opcode:"DECLARE",name:a,value:b})},addDepth:function(a){0!==a&&!this.depths[a]&&(this.depths[a]=!0,this.depths.list.push(a))},classifySexpr:function(a){var b=a.isHelper,c=a.eligibleHelper,d=this.options;c&&!b&&(d.knownHelpers[a.id.parts[0]]?b=!0:d.knownHelpersOnly&&(c=!1));return b?"helper":c?"ambiguous":"simple"},pushParams:function(a){for(var b=
a.length,c;b--;)if(c=a[b],this.options.stringParams)c.depth&&this.addDepth(c.depth),this.opcode("getContext",c.depth||0),this.opcode("pushStringParam",c.stringModeValue,c.type),"sexpr"===c.type&&this.sexpr(c);else this[c.type](c)},setupFullMustacheParams:function(a,b,c){var d=a.params;this.pushParams(d);this.opcode("pushProgram",b);this.opcode("pushProgram",c);a.hash?this.hash(a.hash):this.opcode("emptyHash");return d}};var A=function(a){this.value=a},x=function(){},S=p.COMPILER_REVISION,Y=p.REVISION_CHANGES,
T=p.log;x.prototype={nameLookup:function(a,b){var c,d;0===a.indexOf("depth")&&(c=!0);d=/^[0-9]+$/.test(b)?a+"["+b+"]":x.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']";return c?"("+a+" && "+d+")":d},compilerInfo:function(){return"this.compilerInfo = ["+S+",'"+Y[S]+"'];\n"},appendToBuffer:function(a){return this.environment.isSimple?"return "+a+";":{appendToBuffer:!0,content:a,toString:function(){return"buffer += "+a+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",
compile:function(a,b,c,d){this.environment=a;this.options=b||{};T("debug",this.environment.disassemble()+"\n\n");this.name=this.environment.name;this.isChild=!!c;this.context=c||{programs:[],environments:[],aliases:{}};this.preamble();this.stackSlot=0;this.stackVars=[];this.registers={list:[]};this.hashes=[];this.compileStack=[];this.inlineStack=[];this.compileChildren(a,b);a=a.opcodes;this.i=0;for(c=a.length;this.i<c;this.i++)b=a[this.i],"DECLARE"===b.opcode?this[b.name]=b.value:this[b.opcode].apply(this,
b.args),b.opcode!==this.stripNext&&(this.stripNext=!1);this.pushSource("");if(this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new j("Compile completed with content left on stack");return this.createFunctionContext(d)},preamble:function(){var a=[];if(this.isChild)a.push("");else{var b=this.namespace,c="helpers = this.merge(helpers, "+b+".helpers);";this.environment.usePartial&&(c=c+" partials = this.merge(partials, "+b+".partials);");this.options.data&&(c+=" data = data || {};");
a.push(c)}this.environment.isSimple?a.push(""):a.push(", buffer = "+this.initializeBuffer());this.lastContext=0;this.source=a},createFunctionContext:function(a){var b=this.stackVars.concat(this.registers.list);0<b.length&&(this.source[1]=this.source[1]+", "+b.join(", "));if(!this.isChild)for(var c in this.context.aliases)this.context.aliases.hasOwnProperty(c)&&(this.source[1]=this.source[1]+", "+c+"="+this.context.aliases[c]);this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+";");
this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n");this.environment.isSimple||this.pushSource("return buffer;");b=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];c=0;for(var d=this.environment.depths.list.length;c<d;c++)b.push("depth"+this.environment.depths.list[c]);c=this.mergeSource();this.isChild||(c=this.compilerInfo()+c);if(a)return b.push(c),Function.apply(this,b);a="function "+(this.name||"")+"("+b.join(",")+") {\n "+c+"}";T("debug",
a+"\n\n");return a},mergeSource:function(){for(var a="",b,c=0,d=this.source.length;c<d;c++){var f=this.source[c];f.appendToBuffer?b=b?b+"\n + "+f.content:f.content:(b&&(a+="buffer += "+b+";\n ",b=void 0),a+=f+"\n ")}return a},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=["depth0"];this.setupParams(0,a);this.replaceStack(function(b){a.splice(1,0,b);return"blockHelperMissing.call("+a.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing=
"helpers.blockHelperMissing";var a=["depth0"];this.setupParams(0,a);var b=this.topStack();a.splice(1,0,b);this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){this.pendingContent&&(a=this.pendingContent+a);this.stripNext&&(a=a.replace(/^\s+/,""));this.pendingContent=a},strip:function(){this.pendingContent&&(this.pendingContent=this.pendingContent.replace(/\s+$/,""));this.stripNext="strip"},append:function(){this.flushInline();
var a=this.popStack();this.pushSource("if("+a+" || "+a+" === 0) { "+this.appendToBuffer(a)+" }");this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression";this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){this.lastContext!==a&&(this.lastContext=a)},lookupOnContext:function(a){this.push(this.nameLookup("depth"+this.lastContext,a,"context"))},
pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"';this.replaceStack(function(a){return"typeof "+a+" === functionType ? "+a+".apply(depth0) : "+a})},lookup:function(a){this.replaceStack(function(b){return b+" == null || "+b+" === false ? "+b+" : "+this.nameLookup(b,a,"context")})},lookupData:function(){this.pushStackLiteral("data")},pushStringParam:function(a,b){this.pushStackLiteral("depth"+this.lastContext);
this.pushString(b);"sexpr"!==b&&("string"===typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(){this.pushStackLiteral("{}");this.options.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash);this.hash={values:[],types:[],contexts:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop();this.options.stringParams&&(this.push("{"+a.contexts.join(",")+"}"),this.push("{"+a.types.join(",")+"}"));this.push("{\n "+
a.values.join(",\n ")+"\n }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){this.inlineStack.push(a);return a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},invokeHelper:function(a,b,c){this.context.aliases.helperMissing="helpers.helperMissing";this.useRegister("helper");a=this.lastHelper=this.setupHelper(a,b,!0);b=this.nameLookup("depth"+this.lastContext,
b,"context");b="helper = "+a.name+" || "+b;a.paramsInit&&(b+=","+a.paramsInit);this.push("("+b+",helper ? helper.call("+a.callParams+") : helperMissing.call("+a.helperMissingParams+"))");c||this.flushInline()},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.context.aliases.functionType='"function"';this.useRegister("helper");this.emptyHash();var c=this.setupHelper(0,a,b),d=this.lastHelper=this.nameLookup("helpers",
a,"helper"),f=this.nameLookup("depth"+this.lastContext,a,"context"),e=this.nextStack();c.paramsInit&&this.pushSource(c.paramsInit);this.pushSource("if (helper = "+d+") { "+e+" = helper.call("+c.callParams+"); }");this.pushSource("else { helper = "+f+"; "+e+" = typeof helper === functionType ? helper.call("+c.callParams+") : helper; }")},invokePartial:function(a){a=[this.nameLookup("partials",a,"partial"),"'"+a+"'",this.popStack(),"helpers","partials"];this.options.data&&a.push("data");this.context.aliases.self=
"this";this.push("self.invokePartial("+a.join(", ")+")")},assignToHash:function(a){var b=this.popStack(),c,d;this.options.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&f.contexts.push("'"+a+"': "+c);d&&f.types.push("'"+a+"': "+d);f.values.push("'"+a+"': ("+b+")")},compiler:x,compileChildren:function(a,b){for(var c=a.children,d,f,e=0,h=c.length;e<h;e++){d=c[e];f=new this.compiler;var g=this.matchExistingProgram(d);null==g?(this.context.programs.push(""),g=this.context.programs.length,
d.index=g,d.name="program"+g,this.context.programs[g]=f.compile(d,b,this.context),this.context.environments[g]=d):(d.index=g,d.name="program"+g)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){this.context.aliases.self="this";if(null==a)return"self.noop";var b=this.environment.children[a];a=b.depths.list;for(var c=[b.index,b.name,"data"],d=0,f=a.length;d<f;d++)b=
a[d],1===b?c.push("depth0"):c.push("depth"+(b-1));return(0===a.length?"self.program(":"self.programWithDepth(")+c.join(", ")+")"},register:function(a,b){this.useRegister(a);this.pushSource(a+" = "+b+";")},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStackLiteral:function(a){return this.push(new A(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0);
a&&this.source.push(a)},pushStack:function(a){this.flushInline();var b=this.incrStack();a&&this.pushSource(b+" = "+a+";");this.compileStack.push(b);return b},replaceStack:function(a){var b="",c=this.isInline(),d,f,e;c?(d=this.popStack(!0),d instanceof A?(d=d.value,e=!0):(f=!this.stackSlot,b=!f?this.topStackName():this.incrStack(),b="("+this.push(b)+" = "+d+"),",d=this.topStack())):d=this.topStack();a=a.call(this,d);c?(e||this.popStack(),f&&this.stackSlot--,this.push("("+b+a+")")):(/^stack/.test(d)||
(d=this.nextStack()),this.pushSource(d+" = ("+b+a+");"));return d},nextStack:function(){return this.pushStack()},incrStack:function(){this.stackSlot++;this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot);return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var d=a[b];d instanceof A?this.compileStack.push(d):this.pushStack(d)}}},isInline:function(){return this.inlineStack.length},
popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof A)return c.value;if(!b){if(!this.stackSlot)throw new j("Invalid stack pop");this.stackSlot--}return c},topStack:function(a){var b=this.isInline()?this.inlineStack:this.compileStack,b=b[b.length-1];return!a&&b instanceof A?b.value:b},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,
"\\u2029")+'"'},setupHelper:function(a,b,c){var d=[];a=this.setupParams(a,d,c);var f=this.nameLookup("helpers",b,"helper");return{params:d,paramsInit:a,name:f,callParams:["depth0"].concat(d).join(", "),helperMissingParams:c&&["depth0",this.quotedString(b)].concat(d).join(", ")}},setupOptions:function(a,b){var c=[],d=[],f=[],e,h;c.push("hash:"+this.popStack());this.options.stringParams&&(c.push("hashTypes:"+this.popStack()),c.push("hashContexts:"+this.popStack()));e=this.popStack();if((h=this.popStack())||
e)h||(this.context.aliases.self="this",h="self.noop"),e||(this.context.aliases.self="this",e="self.noop"),c.push("inverse:"+e),c.push("fn:"+h);for(h=0;h<a;h++)e=this.popStack(),b.push(e),this.options.stringParams&&(f.push(this.popStack()),d.push(this.popStack()));this.options.stringParams&&(c.push("contexts:["+d.join(",")+"]"),c.push("types:["+f.join(",")+"]"));this.options.data&&c.push("data:data");return c},setupParams:function(a,b,c){a="{"+this.setupOptions(a,b).join(",")+"}";if(c)return this.useRegister("options"),
b.push("options"),"options="+a;b.push(a);return""}};for(var n="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".split(" "),D=x.RESERVED_WORDS={},L=0,Z=n.length;L<Z;L++)D[n[L]]=
!0;x.isValidJavaScriptVariableName=function(a){return!x.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)?!0:!1};var $=function(a){if(a.constructor===C.ProgramNode)return a;J.yy=C;return J.parse(a)},aa=m.create,n=function(){var a=aa();a.compile=function(b,c){var d=c;if(null==b||"string"!==typeof b&&b.constructor!==a.AST.ProgramNode)throw new j("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+b);d=d||{};"data"in d||(d.data=!0);var f;return function(c,h){if(!f){var g=
a.parse(b),g=(new a.Compiler).compile(g,d),g=(new a.JavaScriptCompiler).compile(g,d,void 0,!0);f=a.template(g)}return f.call(this,c,h)}};a.precompile=function(b,c){var d=c;if(null==b||"string"!==typeof b&&b.constructor!==a.AST.ProgramNode)throw new j("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+b);d=d||{};"data"in d||(d.data=!0);var f=a.parse(b),f=(new a.Compiler).compile(f,d);return(new a.JavaScriptCompiler).compile(f,d)};a.AST=C;a.Compiler=K;a.JavaScriptCompiler=
x;a.Parser=J;a.parse=$;return a},m=n();m.create=n;return m}();

28
src/mibew/js/libs/handlebars.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
<script type="text/javascript" src="{{asset "js/libs/underscore-min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/underscore-min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/backbone-min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/backbone-min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/backbone.marionette.min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/backbone.marionette.min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/handlebars.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/handlebars.min.js"}}"></script>
<!-- Javascript templates --> <!-- Javascript templates -->
<script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/templates.js"}}"></script> <script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/templates.js"}}"></script>

View File

@ -6,7 +6,7 @@
<script type="text/javascript" src="{{asset "js/libs/underscore-min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/underscore-min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/backbone-min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/backbone-min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/backbone.marionette.min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/backbone.marionette.min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/handlebars.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/handlebars.min.js"}}"></script>
<!-- Client side templates --> <!-- Client side templates -->
<script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/default_app.tpl.js"}}"></script> <script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/default_app.tpl.js"}}"></script>

View File

@ -7,7 +7,7 @@
<script type="text/javascript" src="{{asset "js/libs/underscore-min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/underscore-min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/backbone-min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/backbone-min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/backbone.marionette.min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/backbone.marionette.min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/handlebars.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/handlebars.min.js"}}"></script>
<!-- Client side templates --> <!-- Client side templates -->
<script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/default_app.tpl.js"}}"></script> <script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/default_app.tpl.js"}}"></script>

View File

@ -14,7 +14,7 @@
<script type="text/javascript" src="{{asset "js/libs/underscore-min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/underscore-min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/backbone-min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/backbone-min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/backbone.marionette.min.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/backbone.marionette.min.js"}}"></script>
<script type="text/javascript" src="{{asset "js/libs/handlebars.js"}}"></script> <script type="text/javascript" src="{{asset "js/libs/handlebars.min.js"}}"></script>
<!-- Client side templates --> <!-- Client side templates -->
<script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/default_app.tpl.js"}}"></script> <script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/default_app.tpl.js"}}"></script>

View File

@ -13,7 +13,7 @@
"gulp-uglify": "~0.3.1", "gulp-uglify": "~0.3.1",
"gulp-concat": "~2.3.4", "gulp-concat": "~2.3.4",
"gulp-order": "~1.1.1", "gulp-order": "~1.1.1",
"gulp-handlebars": "~2.1.0", "gulp-handlebars": "~2.2.0",
"gulp-define-module": "~0.1.1", "gulp-define-module": "~0.1.1",
"gulp-header": "~1.0.5", "gulp-header": "~1.0.5",
"gulp-zip": "~1.0.0", "gulp-zip": "~1.0.0",
@ -22,6 +22,7 @@
"gulp-chmod": "~1.1.0", "gulp-chmod": "~1.1.0",
"gulp-xgettext": "~0.2.0", "gulp-xgettext": "~0.2.0",
"gulp-concat-po": "~0.1.0", "gulp-concat-po": "~0.1.0",
"handlebars": "~2.0.0",
"run-sequence": "~0.3.6", "run-sequence": "~0.3.6",
"through2": "^0.5.1", "through2": "^0.5.1",
"pofile": "~0.2.12", "pofile": "~0.2.12",