KISSY.add("template/base",function(a){function u(c){if(!b[c]){var d=a.guid(g),e,f,h=[m,d,n,f=s(c),o];try{e=new Function(d,h.join(""))}catch(l){h[3]=i+j+k+","+l.message+i+j,e=new Function(d,h.join(""))}b[c]={name:d,o:f,parser:h.join(""),render:e}}return b[c]}var b={},c={"#":"start","/":"end"},d="KS_TEMPL_STAT_PARAM",e=new RegExp(d,"g"),f="KS_TEMPL",g="KS_DATA_",h="as",i='");',j=f+'.push("',k="KISSY.Template: Syntax Error. ",l="KISSY.Template: Render Error. ",m="var "+f+"=[],"+d+"=false;with(",n="||{}){try{"+f+'.push("',o='");}catch(e){'+f+'=["'+l+'" + e.message]}};return '+f+'.join("");',p=function(a){return a.replace(/\\"/g,'"')},q=function(a){return a.replace(/"/g,'\\"')},r=a.trim,s=function(b){var d,g;return q(r(b).replace(/[\r\t\n]/g," ").replace(/\\/g,"\\\\")).replace(/\{\{([#/]?)(?!\}\})([^}]*)\}\}/g,function(b,h,k){d="",k=p(r(k));if(h){g=k.indexOf(" "),k=g===-1?[k,""]:[k.substring(0,g),k.substring(g)];var l=k[0],m,n=r(k[1]),o=t[l];o&&c[h]&&(m=o[c[h]],d=String(a.isFunction(m)?m.apply(this,n.split(/\s+/)):m.replace(e,n)))}else d=f+".push("+"typeof ("+k+') ==="undefined"?"":'+k+");";return i+d+j})},t={"if":{start:"if("+d+"){",end:"}"},"else":{start:"}else{"},elseif:{start:"}else if("+d+"){"},each:{start:function(a,b,c,d){var e="_ks_value",f="_ks_index";return b===h&&c&&(e=c||e,f=d||f),"KISSY.each("+a+", function("+e+", "+f+"){"},end:"});"},"!":{start:"/*"+d+"*/"}};return a.mix(u,{log:function(c){c in b?"js_beautify"in window||a.log(b[c].parser,"info"):(u(c),this.log(c))},addStatement:function(b,c){a.isString(b)?t[b]=c:a.mix(t,b)}}),u}),KISSY.add("template/node",function(a,b,c){var d=c.all;a.mix(a,{tmpl:function(a,c){return d(b(d(a).html()).render(c))}})},{requires:["./base","node"]}),KISSY.add("template",function(a,b){return a.Template=b,b},{requires:["template/base","template/node"]});