JS Template Engines Performance (v94)

Revision 94 of this benchmark created by Nikos M. on


Description

Preparation HTML

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

<script src="https://rawgithub.com/danactive/js-template-engines-performance/master/lib/underscore-1.4.4.min.js"></script>

<script src="https://rawgithub.com/danactive/js-template-engines-performance/master/lib/mustache-0.7.2.js"></script>

<script src="https://rawgithub.com/danactive/js-template-engines-performance/master/lib/handlebars.1.0.0-rc.3.js"></script>

<script src="https://rawgithub.com/danactive/js-template-engines-performance/master/lib/kendo.core.min.2013.1.319.js"></script>

<script src="https://rawgithub.com/danactive/js-template-engines-performance/master/lib/dust-runtime-1.2.3.js"></script>

<script src="https://rawgithub.com/danactive/js-template-engines-performance/master/lib/tempo-2.0.js"></script>

<script src="https://rawgithub.com/danactive/js-template-engines-performance/master/lib/hogan-2.0.0.js"></script>

<script>
/**
*  Contemplate
*  Light-weight Template Engine for PHP, Python, Node and client-side JavaScript
*
*  @version: 0.6.5
*  https://github.com/foo123/Contemplate
*
*  @inspired by : Simple JavaScript Templating, John Resig - http://ejohn.org/ - MIT Licensed
*  http://ejohn.org/blog/javascript-micro-templating/
*
**/
!function(e,n,t){e[n]=t()}(window,"Contemplate",function(e){"use strict";function n(e,n){var t,r={},u={},i={},o={},l={},a={};if(i[0]="HTML_SPECIALCHARS",i[1]="HTML_ENTITIES",o[0]="ENT_NOQUOTES",o[2]="ENT_COMPAT",o[3]="ENT_QUOTES",l=isNaN(e)?e?e.toUpperCase():"HTML_SPECIALCHARS":i[e],a=isNaN(n)?n?n.toUpperCase():"ENT_COMPAT":o[n],"HTML_SPECIALCHARS"!==l&&"HTML_ENTITIES"!==l)throw new Error("Table: "+l+" not supported");r[38]="&amp;","HTML_ENTITIES"===l&&(r[160]="&nbsp;",r[161]="&iexcl;",r[162]="&cent;",r[163]="&pound;",r[164]="&curren;",r[165]="&yen;",r[166]="&brvbar;",r[167]="&sect;",r[168]="&uml;",r[169]="&copy;",r[170]="&ordf;",r[171]="&laquo;",r[172]="&not;",r[173]="&shy;",r[174]="&reg;",r[175]="&macr;",r[176]="&deg;",r[177]="&plusmn;",r[178]="&sup2;",r[179]="&sup3;",r[180]="&acute;",r[181]="&micro;",r[182]="&para;",r[183]="&middot;",r[184]="&cedil;",r[185]="&sup1;",r[186]="&ordm;",r[187]="&raquo;",r[188]="&frac14;",r[189]="&frac12;",r[190]="&frac34;",r[191]="&iquest;",r[192]="&Agrave;",r[193]="&Aacute;",r[194]="&Acirc;",r[195]="&Atilde;",r[196]="&Auml;",r[197]="&Aring;",r[198]="&AElig;",r[199]="&Ccedil;",r[200]="&Egrave;",r[201]="&Eacute;",r[202]="&Ecirc;",r[203]="&Euml;",r[204]="&Igrave;",r[205]="&Iacute;",r[206]="&Icirc;",r[207]="&Iuml;",r[208]="&ETH;",r[209]="&Ntilde;",r[210]="&Ograve;",r[211]="&Oacute;",r[212]="&Ocirc;",r[213]="&Otilde;",r[214]="&Ouml;",r[215]="&times;",r[216]="&Oslash;",r[217]="&Ugrave;",r[218]="&Uacute;",r[219]="&Ucirc;",r[220]="&Uuml;",r[221]="&Yacute;",r[222]="&THORN;",r[223]="&szlig;",r[224]="&agrave;",r[225]="&aacute;",r[226]="&acirc;",r[227]="&atilde;",r[228]="&auml;",r[229]="&aring;",r[230]="&aelig;",r[231]="&ccedil;",r[232]="&egrave;",r[233]="&eacute;",r[234]="&ecirc;",r[235]="&euml;",r[236]="&igrave;",r[237]="&iacute;",r[238]="&icirc;",r[239]="&iuml;",r[240]="&eth;",r[241]="&ntilde;",r[242]="&ograve;",r[243]="&oacute;",r[244]="&ocirc;",r[245]="&otilde;",r[246]="&ouml;",r[247]="&divide;",r[248]="&oslash;",r[249]="&ugrave;",r[250]="&uacute;",r[251]="&ucirc;",r[252]="&uuml;",r[253]="&yacute;",r[254]="&thorn;",r[255]="&yuml;"),"ENT_NOQUOTES"!==a&&(r[34]="&quot;"),"ENT_QUOTES"===a&&(r[39]="&#39;"),r[60]="&lt;",r[62]="&gt;";for(t in r)r.hasOwnProperty(t)&&(u[String.fromCharCode(t)]=r[t]);return u}function t(e,t,r,u){var i=n("HTML_ENTITIES",t),o="";if(e=null==e?"":e+"",!i)return!1;if(t&&"ENT_QUOTES"===t&&(i["'"]="&#039;"),u||null==u)for(o in i)i.hasOwnProperty(o)&&(e=e.split(o).join(i[o]));else e=e.replace(/([\s\S]*?)(&(?:#\d+|#x[\da-f]+|[a-zA-Z][\da-z]*);|$)/g,function(e,n,t){for(o in i)i.hasOwnProperty(o)&&(n=n.split(o).join(i[o]));return n+t});return e}function r(e){return e=(e+"").toString(),encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")}function u(e,n){var t,r=0;if(null===e||"undefined"==typeof e)return 0;if(e.constructor!==Array&&e.constructor!==Object)return 1;"COUNT_RECURSIVE"===n&&(n=1),1!=n&&(n=0);for(t in e)e.hasOwnProperty(t)&&(r++,1!=n||!e[t]||e[t].constructor!==Array&&e[t].constructor!==Object||(r+=u(e[t],1)));return r}function i(e){var n,t=function(e){var n=/\W*function\s+([\w\$]+)\s*\(/.exec(e);return n?n[1]:"(Anonymous)"},r=function(e){if(!e||"object"!=typeof e||"number"!=typeof e.length)return!1;var n=e.length;return e[e.length]="bogus",n!==e.length?(e.length-=1,!0):(delete e[e.length],!1)};return e&&"object"==typeof e?(n=null,r(e)||(!n||0!==parseInt(n.local_value,10)&&(!n.local_value.toLowerCase||"off"!==n.local_value.toLowerCase()))&&"[object Object]"===Object.prototype.toString.call(e)&&"Object"===t(e.constructor)):!1}function o(e){var n,t={};if(e&&"object"==typeof e&&e.change_key_case)return e.flip();for(n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function l(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,n=arguments,t=0,r=n[t++],u=function(e,n,t,r){t||(t=" ");var u=e.length>=n?"":Array(1+n-e.length>>>0).join(t);return r?e+u:u+e},i=function(e,n,t,r,i,o){var l=r-e.length;return l>0&&(e=t||!i?u(e,r,o,t):e.slice(0,n.length)+u("",l,"0",!0)+e.slice(n.length)),e},o=function(e,n,t,r,o,l,a){var s=e>>>0;return t=t&&s&&{2:"0b",8:"0",16:"0x"}[n]||"",e=t+u(s.toString(n),l||0,"0",!1),i(e,t,r,o,a)},l=function(e,n,t,r,u,o){return null!=r&&(e=e.slice(0,r)),i(e,"",n,t,u,o)},a=function(e,r,a,s,c,f,d){var _,p,g,h,m;if("%%"==e)return"%";for(var v=!1,O="",E=!1,C=!1,b=" ",T=a.length,A=0;a&&T>A;A++)switch(a.charAt(A)){case" ":O=" ";break;case"+":O="+";break;case"-":v=!0;break;case"'":b=a.charAt(A+1);break;case"0":E=!0;break;case"#":C=!0}if(s=s?"*"==s?+n[t++]:"*"==s.charAt(0)?+n[s.slice(1,-1)]:+s:0,0>s&&(s=-s,v=!0),!isFinite(s))throw new Error("sprintf: (minimum-)width must be finite");switch(f=f?"*"==f?+n[t++]:"*"==f.charAt(0)?+n[f.slice(1,-1)]:+f:"fFeE".indexOf(d)>-1?6:"d"==d?0:void 0,m=r?n[r.slice(0,-1)]:n[t++],d){case"s":return l(String(m),v,s,f,E,b);case"c":return l(String.fromCharCode(+m),v,s,f,E);case"b":return o(m,2,C,v,s,f,E);case"o":return o(m,8,C,v,s,f,E);case"x":return o(m,16,C,v,s,f,E);case"X":return o(m,16,C,v,s,f,E).toUpperCase();case"u":return o(m,10,C,v,s,f,E);case"i":case"d":return _=+m||0,_=Math.round(_-_%1),p=0>_?"-":O,m=p+u(String(Math.abs(_)),f,"0",!1),i(m,p,v,s,E);case"e":case"E":case"f":case"F":case"g":case"G":return _=+m,p=0>_?"-":O,g=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())],h=["toString","toUpperCase"]["eEfFgG".indexOf(d)%2],m=p+Math.abs(_)[g](f),i(m,p,v,s,E)[h]();default:return e}};return r.replace(e,a)}function a(e,n){n=n?(n+"").replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g,"$1"):" \\s ";var t=new RegExp("^["+n+"]+","g");return(e+"").replace(t,"")}function s(e,n){n=n?(n+"").replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g,"\\$1"):" \\s ";var t=new RegExp("["+n+"]+$","g");return(e+"").replace(t,"")}function c(e,n){var t,r=0,u=0;for(e+="",n?(n+="",t=n.replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g,"$1")):t=" \n\r       \f            ​\u2028\u2029 ",r=e.length,u=0;r>u;u++)if(-1===t.indexOf(e.charAt(u))){e=e.substring(u);break}for(r=e.length,u=r-1;u>=0;u--)if(-1===t.indexOf(e.charAt(u))){e=e.substring(0,u+1);break}return-1===t.indexOf(e.charAt(0))?e:""}function f(){return Math.floor((new Date).getTime()/1e3)}function d(e,n){var t,r,u,i=/\\?([a-z])/gi,o=function(e,n){return e=e.toString(),e.length<n?o("0"+e,n,"0"):e},l=["Sun","Mon","Tues","Wednes","Thurs","Fri","Satur","January","February","March","April","May","June","July","August","September","October","November","December"];u=function(e,n){return r[e]?r[e]():n},r={d:function(){return o(r.j(),2)},D:function(){return r.l().slice(0,3)},j:function(){return t.getDate()},l:function(){return l[r.w()]+"day"},N:function(){return r.w()||7},S:function(){var e=r.j();return 4>e|e>20&&(["st","nd","rd"][e%10-1]||"th")},w:function(){return t.getDay()},z:function(){var e=new Date(r.Y(),r.n()-1,r.j()),n=new Date(r.Y(),0,1);return Math.round((e-n)/864e5)},W:function(){var e=new Date(r.Y(),r.n()-1,r.j()-r.N()+3),n=new Date(e.getFullYear(),0,4);return o(1+Math.round((e-n)/864e5/7),2)},F:function(){return l[6+r.n()]},m:function(){return o(r.n(),2)},M:function(){return r.F().slice(0,3)},n:function(){return t.getMonth()+1},t:function(){return new Date(r.Y(),r.n(),0).getDate()},L:function(){var e=r.Y();return e%4===0&e%100!==0|e%400===0},o:function(){var e=r.n(),n=r.W(),t=r.Y();return t+(12===e&&9>n?1:1===e&&n>9?-1:0)},Y:function(){return t.getFullYear()},y:function(){return r.Y().toString().slice(-2)},a:function(){return t.getHours()>11?"pm":"am"},A:function(){return r.a().toUpperCase()},B:function(){var e=3600*t.getUTCHours(),n=60*t.getUTCMinutes(),r=t.getUTCSeconds();return o(Math.floor((e+n+r+3600)/86.4)%1e3,3)},g:function(){return r.G()%12||12},G:function(){return t.getHours()},h:function(){return o(r.g(),2)},H:function(){return o(r.G(),2)},i:function(){return o(t.getMinutes(),2)},s:function(){return o(t.getSeconds(),2)},u:function(){return o(1e3*t.getMilliseconds(),6)},e:function(){throw"Not supported (see source code of date() for timezone on how to add support)"},I:function(){var e=new Date(r.Y(),0),n=Date.UTC(r.Y(),0),t=new Date(r.Y(),6),u=Date.UTC(r.Y(),6);return e-n!==t-u?1:0},O:function(){var e=t.getTimezoneOffset(),n=Math.abs(e);return(e>0?"-":"+")+o(100*Math.floor(n/60)+n%60,4)},P:function(){var e=r.O();return e.substr(0,3)+":"+e.substr(3,2)},T:function(){return"UTC"},Z:function(){return 60*-t.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(i,u)},r:function(){return"D, d M Y H:i:s O".replace(i,u)},U:function(){return t/1e3|0}};var a=function(e,n){return t=void 0===n?new Date:new Date(n instanceof Date?n:1e3*n),e.replace(i,u)};return a(e,n)}function _(e,n,t){for(var r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tues","Wednes","Thurs","Fri","Satur","January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],u=d(n,t),i=0,o=r.length;o>i;i++)e[r[i]]&&(u=u.replace(r[i],e[r[i]]));return u}var p,g="0.6.5",h=Object.prototype,m=Array.prototype,v=Function.prototype,O=v.call.bind(h.toString),E=v.call.bind(h.hasOwnProperty),C=v.call.bind(m.slice),b="undefined"!=typeof global&&"[object global]"===O(global),T=function(e){return"[object Array]"===O(e)||e instanceof Array},A=b?require("fs"):null,y=A?A.writeFileSync:null,S=A?A.readFileSync:null,w=A?A.existsSync:null,D=A?A.statSync:null,N=(A?A.realpathSync:null,A?A.writeFile:null),j=A?A.readFile:null,M=(A?A.exists:null,A?A.stat:null,A?A.realpath:null,function(e,n,t,r){var u;return u=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),r?(u.onload=function(){r(200===u.status?u.responseText:"")},u.open(e,n,!0),u.send(t),""):(u.open(e,n,!1),u.send(t),200===u.status?u.responseText:"")}),I=!1,x={},k={},L=!1,U=0,F="./",H={},R={},K={},P={},B="<%",$="%>",G="",Y="",q="",z="' + \"\\n\" + '",V="",J=b?require("os").EOL:"\n",W=!0,X=null,Z=0,Q="    ",en=0,nn=0,tn=0,rn=0,un=2,on=null,ln=null,an=null,sn=null,cn=null,fn=-1,dn=null,_n=0,pn=/[ -]/g,gn=/\n\r|\r\n|\n|\r/g,hn=/^[a-zA-Z_]/,mn=/^[0-9]/,vn=/^[a-zA-Z0-9_]/i,On=/^\s/,En={specials:null,replacements:null,functions:null,controls:null,controls2:null},Cn=["include","template","extends","endblock","block","elsefor","endfor","for","set","unset","isset","elseif","else","endif","if"],bn=["htmlselect","htmltable","plugin_([a-zA-Z0-9_]+)","haskey","lowercase","uppercase","camelcase","snakecase","pluralise","concat","ltrim","rtrim","trim","sprintf","addslashes","stripslashes","tpl","uuid","html","url","count","ldate","date","now","locale","dq","q","l","s","n","f"],Tn={},An=function(){nn=0,tn=0,rn=0,un=2,Z=0,on=[],ln={},an=[[null,-1]],dn=null},yn=function(){X.push([nn,tn,rn,un,Z,on,ln,an,dn])},Sn=function(){var e=X.pop();nn=e[0],tn=e[1],rn=e[2],un=e[3],Z=e[4],on=e[5],ln=e[6],an=e[7],dn=e[8]},wn=function(){return C(arguments).join(J)},Dn=function(e,n){if(2>arguments.length&&(n=Z),n>=0){n=0===n?n:n+1;var t,r,u=new Array(n).join(Q);for(e=e.split(gn),r=e.length,t=0;r>t;t++)e[t]=u+e[t];return e.join(J)}return e},Nn=function(){var e=C(arguments);if(!(e.length<1)){var n,t,r,u=e.shift(),i=e.length;for(n=0;i>n;n++)if(r=e[n])for(t in r)E(r,t)&&(u[t]=r[t]);return u}},jn=function(e,n){var t,r;if(n)r=c(n).split(" "),B=c(r[0]),$=c(r[1]);else{for(t=e.split("\n");t.length&&!c(t[0]).length;)t.shift();t.length&&(r=c(t.shift()).split(" "),B=c(r[0]),$=c(r[1])),e=t.join("\n")}return e},Mn=function(e,n){return P[e]?L&&n?(n(P[e]),""):P[e]:R[e]?b&&A?L&&n?(j(R[e],{encoding:p.ENCODING},function(e,t){n(e?"":t)}),""):S(R[e],{encoding:p.ENCODING}):"#"===R[e].charAt(0)?L&&n?(n(window.document.getElementById(R[e].substring(1)).innerHTML||""),""):window.document.getElementById(R[e].substring(1)).innerHTML||"":L&&n?(M("GET",R[e],null,n),""):M("GET",R[e]):""},In=function(e){return' ("undefined" !== typeof('+e+")) "},xn=function(e){e=e.split(",");var n=c(e.shift()),t=c(e.join(","));return"';"+J+Dn(n+" = ("+t+");")+J},kn=function(e){return e&&e.length?(e=c(e),"';"+J+Dn('if ("undefined" !== typeof ('+e+")) delete "+e+";")+J):"'; "+J},Ln=function(e){var n="';"+Dn(st({IFCOND:e}));return tn++,Z++,n},Un=function(e){Z--;var n="';"+Dn(ct({ELIFCOND:e}));return Z++,n},Fn=function(){Z--;var e="';"+Dn(ft());return Z++,e},Hn=function(){tn--,Z--;var e="';"+Dn(dt());return e},Rn=function(e){e=e.split(" as ");var n,t=c(e[0]),r="_O"+ ++en,u=e[1].split("=>"),i=u.length>=2;if(i){var o=c(u[0])+"__RAW__",l=c(u[1])+"__RAW__",a="_K"+ ++en,s="_V"+ ++en;n="';"+Dn(_t({O:t,_O:r,K:o,_K:a,V:l,_V:s,ASSIGN1:"__i__.d['"+o+"'] = "+a+"; __i__.d['"+l+"'] = "+s+" = "+r+"["+a+"];"},2)),un=2,Z+=3}else{var l=c(u[0])+"__RAW__",a="_K"+ ++en,f="_L"+ ++en,s="_V"+ ++en;n="';"+Dn(_t({O:t,_O:r,_K:a,_L:f,V:l,_V:s,ASSIGN1:"__i__.d['"+l+"'] = "+s+" = "+r+"["+a+"];"},1)),un=1,Z+=2}return nn++,rn++,n},Kn=function(){var e;return 2===un?(rn--,Z+=-3,e="';"+Dn(pt(null,2)),Z+=1):(rn--,Z+=-2,e="';"+Dn(pt(null,1)),Z+=1),e},Pn=function(){var e;return rn===nn?2===un?(nn--,rn--,Z+=-3,e="';"+Dn(gt(null,3))):(nn--,rn--,Z+=-2,e="';"+Dn(gt(null,2))):(nn--,Z+=-1,e="';"+Dn(gt(null,1))),e},Bn=function(e){return K[e]||(yn(),An(),K[e]=" "+Qn(jn(Mn(e)),!1)+"'; "+J,Sn()),Dn(K[e])},$n=function(e){e=e.split(",");var n=c(e.shift()),t=e.join(",");return"' + %tpl( \""+n+'", '+t+" ); "+J},Gn=function(e){return dn=c(e),"'; "+J},Yn=function(e){return e=c(e),on.push([e,-1,-1,0,an[0][1]]),ln[e]=ln[e]?ln[e]+1:1,fn=on.length,an.unshift([e,fn-1]),sn=e,cn=null,"' +  __||"+e+"||__"},qn=function(){if(1<an.length){var e=an.shift();return cn=e[0],fn=e[1]+1,sn=null,"__||/"+e[0]+"||__"}return""},zn=function(e,n,t){var r,u,i,o,l;for(r=e.split(n),u=r.length,i=[],o=0;u>o;o++)l=r[o].split(t),i.push(l[0]),l.length>1&&i.push(l[1]);return i},Vn=function(e,n,t){if(n)switch(t=t||"",n){case"isset":return t=t.replace(En.controls2,Vn),In(t);case"set":return t=t.replace(En.controls2,Vn),xn(t);case"unset":return t=t.replace(En.controls2,Vn),kn(t);case"if":return t=t.replace(En.controls2,Vn),Ln(t);case"elseif":return t=t.replace(En.controls2,Vn),Un(t);case"else":return Fn(t);case"endif":return Hn(t);case"for":return t=t.replace(En.controls2,Vn),Rn(t);case"elsefor":return Kn(t);case"endfor":return Pn(t);case"extends":return Gn(t);case"block":return Yn(t);case"endblock":return qn(t);case"template":return t=t.replace(En.controls2,Vn),$n(t);case"include":return Bn(t)}return e},Jn=function(e){for(var n,t,r,u,i,o,l,a,s,c,f={},d=on.length;d--;)t=on[d],n=t[0],l=t[1],a=t[2],s=t[3],c=t[4],r="__||"+n+"||__",u="__i__.renderBlock( '"+n+"' ); ",i=r.length,o=u.length,c>-1&&(on[c][3]+=o-(a-l+1)),a+=s,1===ln[n]&&(f[n]=at({BLOCKCODE:e.slice(l+i,a-i-1)+"';"})),e=e.slice(0,l)+u+e.slice(a+1),1<=ln[n]&&ln[n]--;return on=null,ln=null,an=null,[e,f]},Wn=function(e,n,t,r){for(var u=n,i=!1,o="";r>t&&(o=e[t++],u+=o,n!==o||i);)i=!i&&"\\"===o;return u},Xn=function(e,n,t,r){if(r=r||"VARSTR",hn.test(e[n])){var u,i,o,l,a,s,c,f,d,_,p,g=0,h={},m=[],v=0;for(i=e[n++];t>n&&vn.test(e[n]);)i+=e[n++];for(l=i,i="__i__.d['"+i+"']",a=l.length,v=0;t>n&&On.test(e[n]);)v++,n++;for(c=0;t>n&&("."===e[n]||"["===e[n]);){for(f=e[n++];t>n&&On.test(e[n]);)v++,n++;if("."===f){for(o="";t>n&&vn.test(e[n]);)o+=e[n++];if(s=o.length,!s)break;i+="['"+o+"']",a+=v+1+s,v=0}else if("["===f){if(c++,d=e[n],'"'===d||"'"===d)o=Wn(e,d,n+1,t),g++,_="__##"+r+g+"##__",h[_]=o,i+=f+_,s=o.length,n+=s,a+=v+1+s,v=0;else if(mn.test(d)){for(o=e[n++];t>n&&mn.test(e[n]);)o+=e[n++];i+=f+o,s=o.length,a+=v+1+s,v=0}else if("$"===d)p=e.slice(n+1),u=Xn(p,0,p.length,r+"_"+g+"_"),u&&(o=u[u.length-1],i+=f+o[0][0],s=o[1],n+=s+1,a+=v+2+s,v=0,m=m.concat(u));else{if("]"!==d)break;if(!(c>0))break;c--,i+=f+e[n++],a+=v+2,v=0}for(;t>n&&On.test(e[n]);)v++,n++;if("]"===e[n]){if(!(c>0))break;c--,i+=e[n++],a+=v+1,v=0}}for(;t>n&&On.test(e[n]);)v++,n++}return m.push([[i,l],a,h]),m}return null},Zn=function(e,n,t){return t&&Tn[t]?"Contemplate.plugin_"+t:"Contemplate."+n},Qn=function(e,n){var t,r,u,i,o,l,a,s,c,f,d,_,g,h,m,v,O,E;for(t=zn(e,B,$),r=t.length,l=!1,u="",o=0;r>o;o++){if(i=t[o],l){for(a="      "+i.replace(En.specials," ")+"",d=a.length,c={},s={},_=0,g="",h="",m=0;d>_;)if(g=a[_++],'"'===g||"'"===g)v=Wn(a,g,_,d),m++,f="__##STR"+m+"##__",s[f]=v,h+=f,_+=v.length-1;else if("$"===g)if(v=Xn(a,_,d)){for(O=0;O<v.length;O++)E=v[O],m++,f="__##VAR"+m+"##__",c[f]=E[0],s=p.merge(s,E[2]);h+=f,_+=E[1]}else h+="$";else h+=g;a=h,sn=null,cn=null,fn=-1,a=a.replace(En.controls,Vn).replace(En.functions,Zn).replace(En.replacements,"' + ( $1 ) + '");for(f in c)a=a.split(f+"__RAW__").join(c[f][1]),a=a.split(f).join(c[f][0]);for(f in s)a=a.split(f).join(s[f]);i=a.split("     ").join(G).split("").join(Dn(Y)),sn?(sn="__||"+sn+"||__",on[fn-1][1]=u.length+a.indexOf(sn)):cn&&(cn="__||/"+cn+"||__",on[fn-1][2]=u.length+a.indexOf(cn)+cn.length),l=!1}else W&&(i=i.split("\\").join("\\\\")),i=i.split("'").join("\\'").split(/\n/).join(V),l=!0;u+=i}return!1!==n?Jn(u):u},et=function(e){return F+e.replace(pn,"_")+"_tpl.js"},nt=function(e){return"Contemplate_"+e.replace(pn,"_")+"_Cached"},tt=function(e,n){An();var t,r,u=Qn(jn(Mn(e),n)),i={};r=dn?ht(null,1):ht({FCODE:"__p__ += '"+u[0]+"';"},2);for(t in u[1])i[t]=new Function("Contemplate,__i__",u[1][t]);return[new Function("Contemplate,__i__",r),i]},rt=function(e,n,t,r){An();var u,i,o,l,a,s,c=Qn(jn(Mn(e),r));a=[];for(l in c[1])s=J+lt({BLOCKNAME:l,BLOCKMETHODNAME:l,BLOCKMETHODCODE:Dn(c[1][l],1)}),a.push(s);a=a.length?J+"_blocks = { "+J+Dn(a.join(","+J),1)+J+"};"+J:"",dn?(i="this.extend( '"+dn+"' );",o=mt(null,1)):(i="",o=mt({RCODE:"__p__ += '"+c[0]+"';"},2)),u=q?q:"";var f=ot({CLASSNAME:t,TPLID:e,PREFIXCODE:u,EXTENDCODE:Dn(i,2),BLOCKS:Dn(a,2),RENDERCODE:Dn(o,4)});return it(n,f)},ut=function(e,n){if(n=n||{},P[e]){var t=tt(e,n.separators),r=vt(p,e,t[0]).setBlocks(t[1]);return dn&&r.extend(p.tpl(dn)),r}if(b||(U=p.CACHE_TO_DISK_NONE),!0!==n.autoUpdate&&p.CACHE_TO_DISK_NOUPDATE===U){var u=et(e),i=nt(e);if(w(u)||rt(e,u,i,n.separators),w(u)){var o=require(u)(p),r=(new o).setId(e);return r}return null}if(!0===n.autoUpdate||p.CACHE_TO_DISK_AUTOUPDATE===U){var u=et(e),i=nt(e);if(w(u)){var l=D(u),a=D(R[e]);l.mtime.getTime()<=a.mtime.getTime()&&rt(e,u,i,n.separators)}else rt(e,u,i,n.separators);if(w(u)){var o=require(u)(p),r=(new o).setId(e);return r}return null}var t=tt(e,n.separators),r=vt(p,e,t[0]).setBlocks(t[1]);return dn&&r.extend(p.tpl(dn)),r},it=function(e,n,t){return t?void N(e,n,{encoding:p.ENCODING},function(e){t(!e)}):y(e,n,{encoding:p.ENCODING})},ot=function(e){var n=wn;return[e.PREFIXCODE,n("","!function (root, moduleName, moduleDefinition) {","","    //","    // export the module","","    // node, CommonJS, etc..","    if ( 'object' === typeof(module) && module.exports ) module.exports = moduleDefinition();","","    // AMD, etc..","    else if ( 'function' === typeof(define) && define.amd ) define( moduleDefinition );","","    // browser, etc..","    else root[ moduleName ] = moduleDefinition();","","","}(this, '"),e.CLASSNAME,n("', function( ) {",'    "use strict";',"    return function( Contemplate ) {","    /* Contemplate cached template '"),e.TPLID,n("' */","    /* quasi extends main Contemplate class */","    ","    /* constructor */","    function "),e.CLASSNAME,n("(id)","    {","        /* initialize internal vars */","        var _extends = null, _blocks = null;","        ","        this.id = id;","        this.d = null;","        ","        ","        /* tpl-defined blocks render code starts here */",""),e.BLOCKS,n("","        /* tpl-defined blocks render code ends here */","        ","        /* template methods */","        ","        this.setId = function(id) {","            if ( id ) this.id = id;","            return this;","        };","        ","        this.extend = function(tpl) {","            if ( tpl && tpl.substr )","                _extends = Contemplate.tpl( tpl );","            else","                _extends = tpl;","            return this;","        };","        ","        /* render a tpl block method */","        this.renderBlock = function(block, __i__) {","            if ( !__i__ ) __i__ = this;","            if ( _blocks && _blocks[block] ) return _blocks[block](__i__);","            else if ( _extends ) return _extends.renderBlock(block, __i__);","            return '';","        };","        ","        /* tpl render method */","        this.render = function(data, __i__) {","            if ( !__i__ ) __i__ = this;","            var __p__ = '';","            if ( _extends )","            {","                __p__ = _extends.render(data, __i__);","            }","            else","            {","                /* tpl main render code starts here */",""),e.RENDERCODE,n("","                /* tpl main render code ends here */","            }","            this.d = null;","            return __p__;","        };","        ","        /* extend tpl assign code starts here */",""),e.EXTENDCODE,n("","        /* extend tpl assign code ends here */","    };","    ","    ","    // export it","    return "),e.CLASSNAME,n(";","    };","});","")].join("")},lt=function(e){var n=wn;return[n("","/* tpl block render method for block '"),e.BLOCKNAME,n("' */","'"),e.BLOCKMETHODNAME,n("': function(__i__) {",""),e.BLOCKMETHODCODE,n("","}","")].join("")},at=function(e){var n=wn;return[n("","var __p__ = '';",""),e.BLOCKCODE,n("","return __p__;","")].join("")},st=function(e){var n=wn;return[n("","if ( "),e.IFCOND,n(" )","{","")].join("")},ct=function(e){var n=wn;return[n("","}","else if ( "),e.ELIFCOND,n(" )","{","")].join("")},ft=function(){var e=wn;return e("","}","else","{","")},dt=function(){var e=wn;return e("","}","")},_t=function(e,n){var t=wn;return 2===n?[t("","var "),e._O," = ",e.O,t(";","if ("),e._O," && Object.keys(",e._O,t(").length)","{","    var "),e._K,", ",e._V,t(";","    for ("),e._K," in ",e._O,t(")","    {","        if (Contemplate.hasOwn("),e._O,", ",e._K,t("))","        {","            "),e.ASSIGN1,t("","            ","")].join(""):[t("","var "),e._O," = Contemplate.values(",e.O,t(");","if ("),e._O," && ",e._O,t(".length)","{","    var "),e._K,", ",e._V,", ",e._L," = ",e._O,".length",t(";","    for ("),e._K,"=0; ",e._K,"<",e._L,"; ",e._K,t("++)","    {","        "),e.ASSIGN1,t("","        ","")].join("")},pt=function(e,n){var t=wn;return 2===n?t("","        }","    }","}","else","{  ",""):t("","    }","}","else","{  ","")},gt=function(e,n){var t=wn;return 3===n?t("","        }","    }","}",""):2===n?t("","    }","}",""):t("","}","")},ht=function(e,n){var t=wn;return 1===n?"return '';":[t("","var __p__ = '';",""),e.FCODE,t("","return __p__;","")].join("")},mt=function(e,n){var t=wn;return 1===n?"__p__ = '';":[t("","__i__.d = Contemplate.data( data );",""),e.RCODE,t("","")].join("")},vt=function(e,n,t){var r=function(n,t){var r=null,u=null,i=null;this.id=null,this.d=null,n&&(this.id=n,r=t),this.setId=function(e){return e&&(this.id=e),this},this.extend=function(n){return u=n&&n.substr?e.tpl(n):n,this},this.setRenderFunction=function(e){return r=e,this},this.setBlocks=function(n){return i||(i={}),i=e.merge(i,n),this},this.renderBlock=function(n,t){return t||(t=this),i&&i[n]?i[n](e,t):u?u.renderBlock(n,t):""},this.render=function(n,t){var i="";return t||(t=this),u?i=u.render(n,t):r&&(t.d=e.data(n),i=r(e,t)),this.d=null,i}};return new r(n,t)};return p={VERSION:g,CACHE_TO_DISK_NONE:0,CACHE_TO_DISK_AUTOUPDATE:2,CACHE_TO_DISK_NOUPDATE:4,ENCODING:"utf8",init:function(){I||(X=[],En.specials=new RegExp("[\\n\\r\\v\\t]","g"),En.replacements=new RegExp("\\t[ ]*(.*?)[ ]*\\v","g"),En.controls=new RegExp("\\t[ ]*%("+Cn.join("|")+")\\b[ ]*\\((.*)\\)","g"),En.controls2=new RegExp("%("+Cn.join("|")+")\\b[ ]*\\((.*)\\)","g"),En.functions=new RegExp("%("+bn.join("|")+")\\b","g"),V=z,G="'; "+J,Y=J+"__p__ += '",I=!0)},addPlugin:function(e,n){e&&n&&(Tn[e]=!0,p["plugin_"+e]=n)},setPrefixCode:function(e){e&&(q=""+e)},setLocaleStrings:function(e){x=p.merge(x,e)},clearLocaleStrings:function(){x={}},setPlurals:function(e){if(e){for(var n in e)null==e[n]&&(e[n]=n+"s");k=p.merge(k,e)}},clearPlurals:function(){k={}},setTemplateSeparators:function(e){e&&(e.left&&(B=""+e.left),e.right&&($=""+e.right))},setPreserveLines:function(e){arguments.length<1&&(e=!0),V=e?z:""},setCacheDir:function(e){F=s(e,"/")+"/"},setCacheMode:function(e){U=b?e:p.CACHE_TO_DISK_NONE},setSyncMode:function(e){L=!e},clearCache:function(e){H={},e&&(K={})},add:function(e,n){if("object"==typeof e){for(var t in e)T(e[t])&&(e[t][0]&&(P[t]=e[t][0]),delete e[t]);R=p.merge(R,e)}else e&&n&&(R[e]=n)},addInline:function(e,n){"object"==typeof e?P=p.merge(P,e):e&&n&&(P[e]=n)},tpl:function(e,n,t){t=Nn({autoUpdate:!1,refresh:!1,escape:!0,separators:null},t),W=!1===t.escape?!1:!0,(t.refresh||!H[e])&&(H[e]=ut(e,t));var r=H[e];return n&&"object"==typeof n?r.render(n):r},html:function(e){return t(e,"ENT_COMPAT","UTF-8")},url:r,count:u,haskey:function(n){var t=O(n);if(!n||"[object Array]"!=t&&"[object Object]"!=t)return!1;var r,u,i,o=C(arguments);for(o.shift(),r=o.length,i=n,u=0;r>u;u++){if(e===i[o[u]])return!1;i=i[o[u]]}return!0},q:function(e){return"'"+e+"'"},dq:function(e){return'"'+e+'"'},s:function(e){return String(""+e)},n:function(e){return parseInt(e,10)},f:function(e){return parseFloat(e,10)},addslashes:function(e){return(e+"").replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0")},stripslashes:function(e){return(e+"").replace(/\\(.?)/g,function(e,n){switch(n){case"\\":return"\\";case"0":return"\x00";case"":return"";default:return n}})},concat:function(){return C(arguments).join("")},trim:c,ltrim:a,rtrim:s,ucfirst:function(e){return e[0].toUpperCase()+e.substr(1)},lcfirst:function(e){return e[0].toLowerCase()+e.substr(1)},lowercase:function(e){return e.toLowerCase()},uppercase:function(e){return e.toUpperCase()},camelcase:function(e,n,t){return n=n||"_",t?e.split(n).map(p.ucfirst).join(""):p.lcfirst(e.split(n).map(p.ucfirst).join(""))},snakecase:function(e,n){return n=n||"_",e.replace(/([A-Z])/g,n+"$1").toLowerCase()},sprintf:l,time:f,date:function(e,n){return n||(n=f()),d(e,n)},ldate:function(e,n){return n||(n=f()),_(x,e,n)},locale:function(e){return E(x,e)?x[e]:e},pluralise:function(e,n){return k[e]&&1!==n?k[e]:e},uuid:function(e){return[e||"UUID",++_n,f()].join("_")},htmltable:function(e,n){e=p.merge({},e),n=p.merge({},n||{});var t,r,u,o,l,a,s,c,f,d="",_="",g="",h="",m=[],v=!1;if(d="<table",n.id&&(d+=" id='"+n.id+"'"),n["class"]&&(d+=" class='"+n["class"]+"'"),n.style&&(d+=" style='"+n.style+"'"),n.data)for(t in n.data)p.hasOwn(n.data,t)&&(d+=" data-"+t+"='"+n.data[t]+"'");d+=">",_="",(n.header||n.footer)&&(_="<td>"+(p.keys(e)||[]).join("</td><td>")+"</td>"),g="",n.header&&(g="<thead><tr>"+_+"</tr></thead>"),h="",n.footer&&(h="<tfoot><tr>"+_+"</tr></tfoot>"),d+=g,m=[],l=p.values(e)||[];for(r in l)if(p.hasOwn(l,r))for(a=l[r],i(a)||(a=[a]),s=p.values(a)||[],u=0,o=s.length;o>u;u++)m[u]||(m[u]=new Array(o)),m[u][r]=s[u];for(c=n.odd?n.odd:"odd",f=n.even?n.even:"even",v=!1,r=0,o=m.length;o>r;r++)d+=v?"<tr class='"+c+"'><td>"+m[r].join("</td><td>")+"</td></tr>":"<tr class='"+f+"'><td>"+m[r].join("</td><td>")+"</td></tr>",v=!v;return m=null,d+=h,d+="</table>"},htmlselect:function(e,n){e=p.merge({},e),n=p.merge({},n||{});var t,r,u,l,a="";if(a="<select",n.multiple&&(a+=" multiple"),n.disabled&&(a+=" disabled='disabled'"),n.name&&(a+=" name='"+n.name+"'"),n.id&&(a+=" id='"+n.id+"'"),n["class"]&&(a+=" class='"+n["class"]+"'"),n.style&&(a+=" style='"+n.style+"'"),n.data)for(t in n.data)p.hasOwn(n.data,t)&&(a+=" data-"+t+"='"+n.data[t]+"'");a+=">",n.selected?(i(n.selected)||(n.selected=[n.selected]),n.selected=o(n.selected)):n.selected={},n.optgroups&&(i(n.optgroups)||(n.optgroups=[n.optgroups]),n.optgroups=o(n.optgroups));for(t in e)if(p.hasOwn(e,t))if(u=e[t],n.optgroups&&n.optgroups[t]){a+="<optgroup label='"+t+"'>";for(r in u)p.hasOwn(u,r)&&(l=u[r],n.use_key?l=r:n.use_value&&(r=l),a+=p.hasOwn(n.selected,r)?"<option value='"+r+"' selected='selected'>"+l+"</option>":"<option value='"+r+"'>"+l+"</option>");a+="</optgroup>"}else n.use_key?u=t:n.use_value&&(t=u),a+=n.selected[t]?"<option value='"+t+"' selected='selected'>"+u+"</option>":"<option value='"+t+"'>"+u+"</option>";return a+="</select>"},getTemplateContents:Mn,hasOwn:function(e,n){return e&&E(e,n)},keys:function(e){return e?Object.keys(e):null},values:function(e){if(e){if(e instanceof Array)return e;var n,t=[];for(n in e)E(e,n)&&t.push(e[n]);return t}return null},items:function(e){return e?e:null},merge:Nn,data:function(e){if(T(e))return e.slice();var n,t,r={};for(n in e)E(e,n)&&(t=n,r[t]=e[n]);return r}},p.now=p.time,p.l=p.locale,p.init(),p});
</script>

<!--External Template Definitions-->
<script type="text/x-kendo-template" id="kendoUIextTemplate"><div><h1 class='header'>#= data.header #</h1><h2 class='header2'>#= data.header2 #</h2><h3 class='header3'>#= data.header3 #</h3><h4 class='header4'>#= data.header4 #</h4><h5 class='header5'>#= data.header5 #</h5><h6 class='header6'>#= data.header6 #</h6><ul class='list'># for (var i = 0, l = data.list.length; i < l; i++) { #<li class='item'>#= data.list[i] #</li># } #</ul></div></script>

<script type="text/x-contemplate" id="contemplateextTemplate">
<# #>
<div><h1 class='header'><# $header #></h1><h2 class='header2'><# $header2 #></h2><h3 class='header3'><# $header3 #></h3><h4 class='header4'><# $header4 #></h4><h5 class='header5'><# $header5 #></h5><h6 class='header6'><# $header6 #></h6><ul class='list'><# %for($list as $item) #><li class='item'><# $item #></li><# %endfor() #></ul></div>
</script>

<script>
  window.sharedVariables = {
    header: "Header",
    header2: "Header2",
    header3: "Header3",
    header4: "Header4",
    header5: "Header5",
    header6: "Header6",
    list: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
  };

  window.mustacheTemplate = "<div><h1 class='header'>{{{header}}}</h1><h2 class='header2'>{{{header2}}}</h2><h3 class='header3'>{{{header3}}}</h3><h4 class='header4'>{{{header4}}}</h4><h5 class='header5'>{{{header5}}}</h5><h6 class='header6'>{{{header6}}}</h6><ul class='list'>{{#list}}<li class='item'>{{{.}}}</li>{{/list}}</ul></div>";

  window.underscoreTemplate = _.template("<div><h1 class='header'><%= header %></h1><h2 class='header2'><%= header2 %></h2><h3 class='header3'><%= header3 %></h3><h4 class='header4'><%= header4 %></h4><h5 class='header5'><%= header5 %></h5><h6 class='header6'><%= header6 %></h6><ul class='list'><% for (var i = 0, l = list.length; i < l; i++) { %><li class='item'><%= list[i] %></li><% } %></ul></div>");

  window.handlebarsTemplate = Handlebars.compile("<div><h1 class='header'>{{header}}</h1><h2 class='header2'>{{header2}}</h2><h3 class='header3'>{{header3}}</h3><h4 class='header4'>{{header4}}</h4><h5 class='header5'>{{header5}}</h5><h6 class='header6'>{{header6}}</h6><ul class='list'>{{#each list}}<li class='item'>{{this}}</li>{{/each}}</ul></div>");


  Handlebars.template((function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b["template-handlebars.html"]=a(function(a,b,c,d,e){function k(a,b){var c="";return c+="<li class='item'>"+i(typeof a===h?a.apply(a):a)+"</li>",c}this.compilerInfo=[2,">= 1.0.0-rc.3"],c=c||a.helpers,e=e||{};var f="",g,h="function",i=this.escapeExpression,j=this;f+="<div><h1 class='header'>",(g=c.header)?g=g.call(b,{hash:{},data:e}):(g=b.header,g=typeof g===h?g.apply(b):g),f+=i(g)+"</h1><h2 class='header2'>",(g=c.header2)?g=g.call(b,{hash:{},data:e}):(g=b.header2,g=typeof g===h?g.apply(b):g),f+=i(g)+"</h2><h3 class='header3'>",(g=c.header3)?g=g.call(b,{hash:{},data:e}):(g=b.header3,g=typeof g===h?g.apply(b):g),f+=i(g)+"</h3><h4 class='header4'>",(g=c.header4)?g=g.call(b,{hash:{},data:e}):(g=b.header4,g=typeof g===h?g.apply(b):g),f+=i(g)+"</h4><h5 class='header5'>",(g=c.header5)?g=g.call(b,{hash:{},data:e}):(g=b.header5,g=typeof g===h?g.apply(b):g),f+=i(g)+"</h5><h6 class='header6'>",(g=c.header6)?g=g.call(b,{hash:{},data:e}):(g=b.header6,g=typeof g===h?g.apply(b):g),f+=i(g)+"</h6><ul class='list'>",g=c.each.call(b,b.list,{hash:{},inverse:j.noop,fn:j.program(1,k,e),data:e});if(g||g===0)f+=g;return f+="</ul></div>",f})})());

  //Resig Template Function (modified to support ')
  function tmpl(str) {
              var strFunc =
              "var p=[];" +
                          "with(obj){p.push('" +
  
              str.replace(/[\r\t\n]/g, " ")
                 .replace(/'(?=[^#]*#>)/g, "\t")
                 .split("'").join("\\'")
                 .split("\t").join("'")
                 .replace(/<#=(.+?)#>/g, "',$1,'")
                 .split("<#").join("');")
                 .split("#>").join("p.push('")
                 + "');}return p.join('');";
  
              return new Function("obj", strFunc);
          }
  
  window.resig = tmpl("<div><h1 class='header'><#= header #></h1><h2 class='header2'><#= header2 #></h2><h3 class='header3'><#= header3 #></h3><h4 class='header4'><#= header4 #></h4><h5 class='header5'><#= header5 #></h5><h6 class='header6'><#= header6 #></h6><ul class='list'><# for (var i = 0, l = list.length; i < l; i++) { #><li class='item'><#= list[i] #></li><# } #></ul></div>");
  
  //Resig modified template function (no "with" block)
  function tmpl2(str) {
              var strFunc =
              "var p=[];" +
                          "p.push('" +
  
              str.replace(/[\r\t\n]/g, " ")
                 .replace(/'(?=[^#]*#>)/g, "\t")
                 .split("'").join("\\'")
                 .split("\t").join("'")
                 .replace(/<#=(.+?)#>/g, "',$1,'")
                 .split("<#").join("');")
                 .split("#>").join("p.push('")
                 + "');return p.join('');";
  
              return new Function("data", strFunc);
          }
  
  window.resig2 = tmpl2("<div><h1 class='header'><#= data.header #></h1><h2 class='header2'><#= data.header2 #></h2><h3 class='header3'><#= data.header3 #></h3><h4 class='header4'><#= data.header4 #></h4><h5 class='header5'><#= data.header5 #></h5><h6 class='header6'><#= data.header6 #></h6><ul class='list'><# for (var i = 0, l = data.list.length; i < l; i++) { #><li class='item'><#= data.list[i] #></li><# } #></ul></div>");

  window.kendouiTemplate = kendo.template("<div><h1 class='header'>#= data.header #</h1><h2 class='header2'>#= data.header2 #</h2><h3 class='header3'>#= data.header3 #</h3><h4 class='header4'>#= data.header4 #</h4><h5 class='header5'>#= data.header5 #</h5><h6 class='header6'>#= data.header6 #</h6><ul class='list'># for (var i = 0, l = data.list.length; i < l; i++) { #<li class='item'>#= data.list[i] #</li># } #</ul></div>", {useWithBlock: true});
  
  window.kendouiTemplate2 = kendo.template("<div><h1 class='header'>#= data.header #</h1><h2 class='header2'>#= data.header2 #</h2><h3 class='header3'>#= data.header3 #</h3><h4 class='header4'>#= data.header4 #</h4><h5 class='header5'>#= data.header5 #</h5><h6 class='header6'>#= data.header6 #</h6><ul class='list'># for (var i = 0, l = data.list.length; i < l; i++) { #<li class='item'>#= data.list[i] #</li># } #</ul></div>", {useWithBlock: false});
  
  //Use external template definition
  window.kendoUIAlt1 = kendo.template($("#kendoUIextTemplate").html());
  window.kendoUIAlt2 = kendo.template($("#kendoUIextTemplate").html(), {useWithBlock: false});

  //Use external template definition
  Contemplate.add({
    'test': "#contemplateextTemplate"
  })
  window.contemplateTpl = Contemplate.tpl( 'test' );

  window.dustTemplatePrecompiled = (function(){dust.register("dustTemplatePrecompiled",body_0);function body_0(chk,ctx){return chk.write("<div><h1 class='header'>").reference(ctx.get("header"),ctx,"h").write("</h1><h2 class='header2'>").reference(ctx.get("header2"),ctx,"h").write("</h2><h3 class='header3'>").reference(ctx.get("header3"),ctx,"h").write("</h3><h4 class='header4'>").reference(ctx.get("header4"),ctx,"h").write("</h4><h5 class='header5'>").reference(ctx.get("header5"),ctx,"h").write("</h5><h6 class='header6'>").reference(ctx.get("header6"),ctx,"h").write("</h6><ul class='list'>").section(ctx.get("list"),ctx,{"block":body_1},null).write("</ul></div>");}function body_1(chk,ctx){return chk.write("<li class='item'>").reference(ctx.getPath(true,[]),ctx,"h").write("</li>");}return body_0;})();

  window.dustTemplate2 = function(content) {
    dust.loadSource(dustTemplatePrecompiled, "dustTemplatePrecompiled");
    dust.render("dustTemplatePrecompiled", content, function() {});
  };

  window.dustTemplatePrecompiledCached = (function(){dust.register("dustTemplatePrecompiledCached",body_0);function body_0(chk,ctx){return chk.write("<div><h1 class='header'>").reference(ctx.get("header"),ctx,"h").write("</h1><h2 class='header2'>").reference(ctx.get("header2"),ctx,"h").write("</h2><h3 class='header3'>").reference(ctx.get("header3"),ctx,"h").write("</h3><h4 class='header4'>").reference(ctx.get("header4"),ctx,"h").write("</h4><h5 class='header5'>").reference(ctx.get("header5"),ctx,"h").write("</h5><h6 class='header6'>").reference(ctx.get("header6"),ctx,"h").write("</h6><ul class='list'>").section(ctx.get("list"),ctx,{"block":body_1},null).write("</ul></div>");}function body_1(chk,ctx){return chk.write("<li class='item'>").reference(ctx.getPath(true,[]),ctx,"h").write("</li>");}return body_0;})();

    dust.loadSource(dustTemplatePrecompiledCached, "dustTemplatePrecompiledCached");

  window.dustTemplate3 = function(content) {
    dust.render("dustTemplatePrecompiledCached", content, function() {});
  };

 $(document.body).append('<ul id="tempoTemplate"> <li data-template> {{header}} {{header2}} {{header3}} {{header4}} {{header5}} {{header6}} <ul><li >{{list}}</li></ul></li></ul> ');


  var tempoPrepared = Tempo.prepare('tempoTemplate');
 tempoTemplate = function(data) { tempoPrepared.render(data); }
     
     tempoTemplate()

  window.hoganCompile = Hogan.compile("<div><h1 class='header'>{{{header}}}</h1><h2>class='header2'>{{{header2}}}</h2><h3 class='header3'>{{{header3}}}</h3><h4 class='header4'>{{{header4}}}</h4><h5 class='header5'>{{{header5}}}</h5><h6 class='header6'>{{{header6}}}</h6><ul class='list'>{{#list}}<li class='item'>{{{.}}}</li>{{/list}}</ul></div>");

</script>

Test runner

Ready to run.

Testing in
TestOps/sec
mustache.js
Mustache.render(mustacheTemplate, sharedVariables);
ready
underscore.js
underscoreTemplate(sharedVariables);
ready
handlebar.js
handlebarsTemplate(sharedVariables);
ready
handlebar.js (precompiled)
Handlebars.templates["template-handlebars.html"](sharedVariables);
ready
dust.js (precompiled)
dustTemplate2(sharedVariables);
ready
dust.js (precompiled, cached)
dustTemplate3(sharedVariables);
ready
TempoJs
tempoTemplate(sharedVariables);
ready
Hogan.js
hoganCompile.render(sharedVariables);
ready
Kendo UI Templates (Default)
kendouiTemplate(sharedVariables);
ready
Kendo UI Templates (No "with" block)
kendouiTemplate2(sharedVariables);
ready
Resig Micro Templates (modified)
resig(sharedVariables);
ready
Resig Micro Templates (No "with" block)
resig2(sharedVariables);
ready
Contemplate (Compiled)
contemplateTpl.render(sharedVariables);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.