/*! tileTemplate v1.1.0 | a simple javascript template engine. | MIT License | By: Pandao | https://github.com/pandao/tileTemplate | 2014-12-09 */
!function(a){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?a(require,exports,module):"function"==typeof define?define(a):a(function(){},window.tileTemplate={},{})}(function(a,b){"use strict";var c=function(a){return"undefined"!=typeof document?document.getElementById(a):a};"function"!=typeof"".trim&&(String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")});var d=b;b.version="1.0.0",b.tags=[],b.caches=[],b.regex={},b.extend=function(a,b){b=b||this;for(var c in a)"undefined"==typeof b[c]&&(b[c]=a[c]);return b},b.escape=function(a){return a.replace(/\</gim,"&lt;").replace(/\>/gim,"&gt;").replace(/\"/gim,"&quot;").replace(/\'/gim,"&apos;")},b.unescape=function(a){return a.replace(/\&lt;/gim,"<").replace(/\&gt;/gim,">").replace(/\&quot;/gim,'"').replace(/\&apos;/gim,"'")},b.settings={debug:!1,cached:!0,filter:!0,openTag:"<%",closeTag:"%>"},b.set=b.config=function(){arguments&&arguments.length>1?this.settings[arguments[0]]=arguments[1]:this.settings=this.extend(this.settings,arguments[0])},b.xssFilter=function(a,b,c){return a=a.replace(/\s*<\s*iframe\s*(.*)\s*>\s*<\s*\/iframe\s*>\s*/gim,""),a=a.replace(new RegExp(b+"s*(.*)s*alerts*(s*(.*)s*)s*;?s*(.*)"+c,"igm"),""),a=a.replace(new RegExp(b+"s*(.*)s*confirms*(s*(.*)s*)s*;?s*(.*)"+c,"igm"),""),a=a.replace(new RegExp(b+"s*(.*)s*prompts*(s*(.*)s*)s*;?s*(.*)"+c,"igm"),""),a=a.replace(new RegExp(b+"s*(.*)s*windows*(.|;)s*(.*)"+c,"igm"),""),a=a.replace(new RegExp(b+"s*(.*)s*documents*(.|;)s*(.*)"+c,"igm"),""),a=a.replace(new RegExp(b+"s*(.*)s*createElements*(s*(.*)s*)s*(.*)"+c,"igm"),""),a=a.replace(new RegExp(b+"s*(.*)s*(\\$|jQuery)s*(.*)s*(s*(.*)s*)s*(.*)"+c,"igm"),""),a=a.replace(new RegExp(b+"s*(.*)s*eval(s*(.*)s*)s*(.*)"+c,"igm"),""),a.trim()},b.compileInclude=function(a){var b=this.settings.openTag,e=this.settings.closeTag;return function(f,g){var h=(new Date).getTime(),i=g.replace("('","").replace("')","").replace('("',"").replace('")',""),j="string"==typeof c(i)?i:null==c(i)?i:c(i).value||c(i).innerHTML,k=d.compile(j,a,{include:!0,name:i}).toString().split("\n").join("");return k=k.replace("anonymous","anonymous"+h),k+=" if(data) { out += anonymous"+h+"(data); }",b+" "+k+" "+e}},b.compile=function(a,b,c){var e=(new Date).getTime(),f={include:!1,name:"tile"+e};b=b||{},c=c||{},c=this.extend(f,c);var g=(c.include,this.settings.filter),h=this.settings.debug,i=this.settings.openTag,j=this.settings.closeTag,k=new RegExp(i+"=(.*?)"+j,"igm"),l=new RegExp(i+"=#(.*?)"+j,"igm"),m=new RegExp("//"+i+"?\\s*(.*?)\\s*"+j+"?","igm"),n=/\s*tag:(\w+):?([\u4e00-\u9fa5]+|\w+|\d+)?\s*/gim,o=new RegExp(i+"\\s*include\\s*((.*?))\\s*;?\\s*"+j,"igm"),p=function(a,b,c){var e="undefined"==typeof c?d.tags[b]():d.tags[b](c.toString());return"'"+e.toString()+"'"};if(this.regex.include=o,a=a.replace(/(^\s*)|(\s*$)/g,"").replace(l,function(){return"'+'"}).replace(m,"").replace(this.regex.include,this.compileInclude(b)).replace(k,function(a,b){return"'+"+b+"+'"}).split("\n"),h){for(var q=0,r=a.length;r>q;q++)a[q]=a[q].toString().replace(/(^\s*)|(\s*$)/g,"")+"_&_"+i+" _line="+(q+1)+"; "+j+"_&_";a=a.join("").split("_&_")}for(var q=0,r=a.length;r>q;q++)a[q]=a[q].trim(),g&&(a[q]=this.xssFilter(a[q],i,j)),a[q]="out+='"+a[q]+"';",a[q]=a[q].replace(n,p),a[q]=a[q].replace("out+='"+i,"").replace(j+"';","").replace("}';","}"),a[q]=a[q].replace(/^out\+\=\'\/\/(.*?)\'\;$/,function(a,b){return"/* "+b+" */"}).replace("'';';","'';");var s="var objectCount = function(data){var total=0;for(var i in data){total++} return total;};",t="if(typeof console == 'object') console.error('[tileTemplate]\\n"+this.escape(c.name)+"\\n\\n[type]\\nRender error\\n\\nmessage: '+e.message+'\\nline: '+(e.line+1));",u="try {"+a.join("")+"\n return out; } catch(e) { e.line=_line; if(objectCount(data) > 0) { "+t+" }}";a="var out = '', _line=0;\n "+(h?u:a.join("")+"\n return out;");var v="function extract(obj, parent) {for (var i in obj) { parent[i] = obj[i];}}",w=new Function("data",s+v+"extract(data, this);"+a);return w},b.render=function(a,b,d){d=d||"";var e=this.settings.cached,f="string"==typeof c(a)?a:null==c(a)?a:c(a).value||c(a).innerHTML,g=""==d?a:d;if(e&&"undefined"!=typeof this.caches[g])return this.caches[g];var h=this.compile(f,b,{name:""==d?a:d})(b);return e&&(this.caches[g]=h),h},b.tag=function(a,b){this.tags[a]=b},b.clear=function(a){return delete this.caches[a],!0}});
@@ -15,17 +15,17 @@
 te v1.1.
-0
+1
  %7C a sim

version 1.1.1