!function(){var e=function(){var t=[].slice.call(arguments);return t.push(e.options),t[0].match(/^\s*#([\w:\-\.]+)\s*$/gim)&&t[0].replace(/^\s*#([\w:\-\.]+)\s*$/gim,function(e,n){var o=document,i=o&&o.getelementbyid(n);t[0]=i?i.value||i.innerhtml:e}),e.documenthtml&&(e.compile.call(e,e.documenthtml),e.documenthtml=""),1==arguments.length?e.compile.apply(e,t):arguments.length>=2?e.to_html.apply(e,t):void 0},t={escapehash:{"<":"<",">":">","&":"&",'"':""","'":"'","/":"/"},escapereplace:function(e){return t.escapehash[e]},escaping:function(e){return"string"!=typeof e?e:e.replace(/[&<>"']/gim,this.escapereplace)},detection:function(e){return"undefined"==typeof e?"":e}},n=function(e){if("undefined"!=typeof console){if(console.warn)return void console.warn(e);if(console.log)return void console.log(e)}throw e},o=function(e,t){if(e=e!==object(e)?{}:e,e.__proto__)return e.__proto__=t,e;var n=function(){},o=object.create?object.create(t):new(n.prototype=t,n);for(var i in e)e.hasownproperty(i)&&(o[i]=e[i]);return o},i=function(e){var t,n,o,i=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,r=/,/,s=/^\s*(_?)(\s+?)\1\s*$/,a=/^function[^{]+{([\s\s]*)}/m,c=[];"function"==typeof e?e.length&&(t=e.tostring()):"string"==typeof e&&(t=e),t=t.trim(),o=t.match(i),n=t.match(a)[1].trim();for(var p=0;p1&&(e=i.shift(),o=i.shift().split(","),r="_method."+o.shift()+".call(this, "+[e].concat(o)+")"),"<%= "+(t?"_method.__escapehtml.escaping":"")+"("+(n&&n.detection===!1?"":"_method.__escapehtml.detection")+"("+r+")) %>"},this.__removeshell=function(t,o){var r=0;return t=t.replace(e.settings.helperregister,function(t,n,o){var r=i(o),s=r[0],a=r[1],c=new function(s.join(","),a);return e.register(n,c),t}).replace(e.settings.forstart,function(e,t,n,o){var n=n||"value",o=o&&o.substr(1),i="i"+r++;return"<% ~function() {for(var "+i+" in "+t+") {if("+t+".hasownproperty("+i+")) {var "+n+"="+t+"["+i+"];"+(o?"var "+o+"="+i+";":"")+" %>"}).replace(e.settings.forend,"<% }}}(); %>").replace(e.settings.ifstart,function(e,t){return"<% if("+t+") { %>"}).replace(e.settings.ifend,"<% } %>").replace(e.settings.elsestart,function(){return"<% } else { %>"}).replace(e.settings.elseifstart,function(e,t){return"<% } else if("+t+") { %>"}).replace(e.settings.noneencode,function(e,t){return n.__interpolate(t,!1,o)}).replace(e.settings.interpolate,function(e,t){return n.__interpolate(t,!0,o)}).replace(e.settings.inlinecomment,"").replace(e.settings.rangestart,function(e,t,n,o){var i="j"+r++;return"<% ~function() {for(var "+i+"="+n+";"+i+"<"+o+";"+i+"++) {{var "+t+"="+i+"; %>"}).replace(e.settings.include,function(e,t,n){return t.match(/^file\:\/\//gim)?e:"<%= _method.__juicer("+t+", "+n+"); %>"}),o&&o.errorhandling===!1||(t="<% try { %>"+t,t+='<% } catch(e) {_method.__throw("juicer render exception: "+e.message);} %>'),t},this.__tonative=function(e,t){return this.__convert(e,!t||t.strip)},this.__lexicalanalyze=function(t){var n=[],o=[],i="",r=["if","each","_","_method","console","break","case","catch","continue","debugger","default","delete","do","finally","for","function","in","instanceof","new","return","switch","this","throw","try","typeof","var","void","while","with","null","typeof","class","enum","export","extends","import","super","implements","interface","let","package","private","protected","public","static","yield","const","arguments","true","false","undefined","nan"],s=function(e,t){if(array.prototype.indexof&&e.indexof===array.prototype.indexof)return e.indexof(t);for(var n=0;n=,\(\)\[\]]\s*([a-za-z_0-9]+)/gim,a);for(var c=0;c"},this.__convert=function(e,t){var n=[].join("");return n+="'use strict';",n+="var _=_||{};",n+="var _out='';_out+='",n+=t!==!1?e.replace(/\\/g,"\\\\").replace(/[\r\t\n]/g," ").replace(/'(?=[^%]*%>)/g," ").split("'").join("\\'").split(" ").join("'").replace(/<%=(.+?)%>/g,"';_out+=$1;_out+='").split("<%").join("';").split("%>").join("_out+='")+"';return _out;":e.replace(/\\/g,"\\\\").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t").replace(/[\n]/g,"\\n").replace(/'(?=[^%]*%>)/g," ").split("'").join("\\'").split(" ").join("'").replace(/<%=(.+?)%>/g,"';_out+=$1;_out+='").split("<%").join("';").split("%>").join("_out+='")+"';return _out.replace(/[\\r\\n]\\s+[\\r\\n]/g, '\\r\\n');"},this.parse=function(e,t){var i=this;return t&&t.loose===!1||(e=this.__lexicalanalyze(e)+e),e=this.__removeshell(e,t),e=this.__tonative(e,t),this._render=new function("_, _method",e),this.render=function(e,t){return t&&t===n.options._method||(t=o(t,n.options._method)),i._render.call(this,e,t)},this}},e.compile=function(e,t){t&&t===this.options||(t=o(t,this.options));var i=this,r={get:function(e){return t.cachestore?t.cachestore.get(e):i.__cache[e]},set:function(e,n){return t.cachestore?t.cachestore.set(e,n):i.__cache[e]=n}};try{var s=r.get(e)?r.get(e):new this.template(this.options).parse(e,t);return t&&t.cache===!1||r.set(e,s),s}catch(a){return n("juicer compile exception: "+a.message),{render:function(){}}}},e.to_html=function(e,t,n){return n&&n===this.options||(n=o(n,this.options)),this.compile(e,n).render(t,n._method)},"undefined"!=typeof global&&"undefined"==typeof window&&e.set("cache",!1),"undefined"!=typeof document&&document.body&&(e.documenthtml=document.body.innerhtml),"undefined"!=typeof module&&module.exports?module.exports=e:this.juicer=e}(); juicer.register('json2str', json.stringify);