diff --git a/demos/scenarios/01_default-values-scenario.html b/demos/scenarios/01_default-values-scenario.html index 2bb1eef..15d0e16 100644 --- a/demos/scenarios/01_default-values-scenario.html +++ b/demos/scenarios/01_default-values-scenario.html @@ -1,7 +1,7 @@  - + diff --git a/demos/scenarios/02_separators-scenario.html b/demos/scenarios/02_separators-scenario.html index e5e8eea..5422747 100644 --- a/demos/scenarios/02_separators-scenario.html +++ b/demos/scenarios/02_separators-scenario.html @@ -1,7 +1,7 @@  - + diff --git a/demos/scenarios/03_iterating-through-fields-scenario.html b/demos/scenarios/03_iterating-through-fields-scenario.html index ae350f3..defffff 100644 --- a/demos/scenarios/03_iterating-through-fields-scenario.html +++ b/demos/scenarios/03_iterating-through-fields-scenario.html @@ -1,7 +1,7 @@  - + diff --git a/demos/scenarios/04_assigning-variables-scenario.html b/demos/scenarios/04_assigning-variables-scenario.html index 35d2bed..f7afa2f 100644 --- a/demos/scenarios/04_assigning-variables-scenario.html +++ b/demos/scenarios/04_assigning-variables-scenario.html @@ -1,7 +1,7 @@  - + diff --git a/demos/scenarios/05_arrays-plus-headers-and-footers.html b/demos/scenarios/05_arrays-plus-headers-and-footers.html index aacc11a..5d842d3 100644 --- a/demos/scenarios/05_arrays-plus-headers-and-footers.html +++ b/demos/scenarios/05_arrays-plus-headers-and-footers.html @@ -1,7 +1,7 @@  - + diff --git a/demos/step-by-step/01_inserting-data.html b/demos/step-by-step/01_inserting-data.html index 5dfe17e..6f91617 100644 --- a/demos/step-by-step/01_inserting-data.html +++ b/demos/step-by-step/01_inserting-data.html @@ -1,7 +1,7 @@  - + diff --git a/demos/step-by-step/02_compiling-named-templates-from-strings.html b/demos/step-by-step/02_compiling-named-templates-from-strings.html index 32aaf76..7a4db12 100644 --- a/demos/step-by-step/02_compiling-named-templates-from-strings.html +++ b/demos/step-by-step/02_compiling-named-templates-from-strings.html @@ -1,7 +1,7 @@ - + diff --git a/demos/step-by-step/03_converters-and-encoding.html b/demos/step-by-step/03_converters-and-encoding.html index c3e2131..42e2ca3 100644 --- a/demos/step-by-step/03_converters-and-encoding.html +++ b/demos/step-by-step/03_converters-and-encoding.html @@ -1,7 +1,7 @@  - + diff --git a/demos/step-by-step/04_if-else-tag.html b/demos/step-by-step/04_if-else-tag.html index 2e913c4..fb15bc0 100644 --- a/demos/step-by-step/04_if-else-tag.html +++ b/demos/step-by-step/04_if-else-tag.html @@ -1,7 +1,7 @@  - + diff --git a/demos/step-by-step/05_for-tag.html b/demos/step-by-step/05_for-tag.html index d133cef..e4d1a4b 100644 --- a/demos/step-by-step/05_for-tag.html +++ b/demos/step-by-step/05_for-tag.html @@ -1,7 +1,7 @@  - + diff --git a/demos/step-by-step/06_template-composition.html b/demos/step-by-step/06_template-composition.html index ca650d7..7b4206d 100644 --- a/demos/step-by-step/06_template-composition.html +++ b/demos/step-by-step/06_template-composition.html @@ -1,7 +1,7 @@ - + diff --git a/demos/step-by-step/07_paths.html b/demos/step-by-step/07_paths.html index 2d43b11..08adb62 100644 --- a/demos/step-by-step/07_paths.html +++ b/demos/step-by-step/07_paths.html @@ -1,7 +1,7 @@  - + diff --git a/demos/step-by-step/08_custom-tags.html b/demos/step-by-step/08_custom-tags.html index 147aa8d..0693cb0 100644 --- a/demos/step-by-step/08_custom-tags.html +++ b/demos/step-by-step/08_custom-tags.html @@ -1,7 +1,7 @@  - + diff --git a/demos/step-by-step/09_helper-functions.html b/demos/step-by-step/09_helper-functions.html index e87a22d..43b32e7 100644 --- a/demos/step-by-step/09_helper-functions.html +++ b/demos/step-by-step/09_helper-functions.html @@ -1,7 +1,7 @@  - + diff --git a/demos/step-by-step/10_comparison-tests.html b/demos/step-by-step/10_comparison-tests.html index a9dc6dd..820197e 100644 --- a/demos/step-by-step/10_comparison-tests.html +++ b/demos/step-by-step/10_comparison-tests.html @@ -1,7 +1,7 @@  - + diff --git a/demos/step-by-step/11_accessing-parent-data.html b/demos/step-by-step/11_accessing-parent-data.html index b47058c..2c495de 100644 --- a/demos/step-by-step/11_accessing-parent-data.html +++ b/demos/step-by-step/11_accessing-parent-data.html @@ -1,7 +1,7 @@  - + diff --git a/demos/step-by-step/12_passing-in-context.html b/demos/step-by-step/12_passing-in-context.html index e0f1eee..ec8cf5c 100644 --- a/demos/step-by-step/12_passing-in-context.html +++ b/demos/step-by-step/12_passing-in-context.html @@ -1,7 +1,7 @@  - + diff --git a/demos/step-by-step/13_associating-helpers-with-templates.html b/demos/step-by-step/13_associating-helpers-with-templates.html index 5dfa433..031edd5 100644 --- a/demos/step-by-step/13_associating-helpers-with-templates.html +++ b/demos/step-by-step/13_associating-helpers-with-templates.html @@ -1,7 +1,7 @@  - + diff --git a/demos/variants/accessing-templates/01_compiling-template-objects-from-strings.html b/demos/variants/accessing-templates/01_compiling-template-objects-from-strings.html index cf207ad..03395eb 100644 --- a/demos/variants/accessing-templates/01_compiling-template-objects-from-strings.html +++ b/demos/variants/accessing-templates/01_compiling-template-objects-from-strings.html @@ -1,7 +1,7 @@ - + diff --git a/demos/variants/accessing-templates/02_registering-named-template-from-script-declaration.html b/demos/variants/accessing-templates/02_registering-named-template-from-script-declaration.html index bd7abed..d60ec43 100644 --- a/demos/variants/accessing-templates/02_registering-named-template-from-script-declaration.html +++ b/demos/variants/accessing-templates/02_registering-named-template-from-script-declaration.html @@ -1,7 +1,7 @@ - + diff --git a/demos/variants/accessing-templates/03_getting-template-objects-from-script-declaration.html b/demos/variants/accessing-templates/03_getting-template-objects-from-script-declaration.html index 904aa82..31d6696 100644 --- a/demos/variants/accessing-templates/03_getting-template-objects-from-script-declaration.html +++ b/demos/variants/accessing-templates/03_getting-template-objects-from-script-declaration.html @@ -1,7 +1,7 @@ - + diff --git a/demos/variants/accessing-templates/04_template-composition-subtemplates.html b/demos/variants/accessing-templates/04_template-composition-subtemplates.html index 29474e3..673d8d0 100644 --- a/demos/variants/accessing-templates/04_template-composition-subtemplates.html +++ b/demos/variants/accessing-templates/04_template-composition-subtemplates.html @@ -1,7 +1,7 @@ - + diff --git a/demos/variants/accessing-templates/05_template-composition-templateobjects.html b/demos/variants/accessing-templates/05_template-composition-templateobjects.html index ceb09cf..e83f97d 100644 --- a/demos/variants/accessing-templates/05_template-composition-templateobjects.html +++ b/demos/variants/accessing-templates/05_template-composition-templateobjects.html @@ -1,7 +1,7 @@ - + diff --git a/jsrender-node.js b/jsrender-node.js index a76c257..d4fb15e 100644 --- a/jsrender-node.js +++ b/jsrender-node.js @@ -1470,7 +1470,7 @@ function tmplObject(markup, options) { if (htmlTag && htmlTag !== wrapMap.div) { // When using JsViews, we trim templates which are inserted into HTML contexts where text nodes are not rendered (i.e. not 'Phrasing Content'). // Currently not trimmed for
  • tag. (Not worth adding perf cost) - tmpl.markup = $.trim(tmpl.markup); + tmpl.markup = tmpl.markup.trim(); } return tmpl; @@ -2198,7 +2198,7 @@ function parseParams(params, pathBindings, tmpl, isLinkExpr) { // to return the new object, and trigger re-binding of the subsequent path) expr = pathStart[fnDp-1]; if (full.length - 1 > ind - (expr || 0)) { // We need to compile a subexpression - expr = $.trim(full.slice(expr, ind + all.length)); + expr = (full.slice(expr, ind + all.length)).trim(); binds = bindto || bndStack[fnDp-1].bd; // Insert exprOb object, to be used during binding to return the computed object theOb = binds[binds.length-1]; diff --git a/jsrender.js b/jsrender.js index 43148fd..5d68616 100644 --- a/jsrender.js +++ b/jsrender.js @@ -1522,7 +1522,7 @@ function tmplObject(markup, options) { if (htmlTag && htmlTag !== wrapMap.div) { // When using JsViews, we trim templates which are inserted into HTML contexts where text nodes are not rendered (i.e. not 'Phrasing Content'). // Currently not trimmed for
  • tag. (Not worth adding perf cost) - tmpl.markup = $.trim(tmpl.markup); + tmpl.markup = tmpl.markup.trim(); } return tmpl; @@ -2250,7 +2250,7 @@ function parseParams(params, pathBindings, tmpl, isLinkExpr) { // to return the new object, and trigger re-binding of the subsequent path) expr = pathStart[fnDp-1]; if (full.length - 1 > ind - (expr || 0)) { // We need to compile a subexpression - expr = $.trim(full.slice(expr, ind + all.length)); + expr = full.slice(expr, ind + all.length).trim(); binds = bindto || bndStack[fnDp-1].bd; // Insert exprOb object, to be used during binding to return the computed object theOb = binds[binds.length-1]; diff --git a/jsrender.min.js b/jsrender.min.js index 3d9f9da..b393426 100644 --- a/jsrender.min.js +++ b/jsrender.min.js @@ -1,4 +1,3 @@ /*! JsRender v1.0.16: http://jsviews.com/#jsrender */ /*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */ -!function(e,t){var n=t.jQuery;"object"==typeof exports?module.exports=n?e(t,n):function(n){if(n&&!n.fn)throw"Provide jQuery or null";return e(t,n)}:"function"==typeof define&&define.amd?define(function(){return e(t)}):e(t,!1)}(function(e,t){"use strict";function n(e,t){return function(){var n,r=this,i=r.base;return r.base=e,n=t.apply(r,arguments),r.base=i,n}}function r(e,t){return ke(t)&&(t=n(e?e._d?e:n(a,e):a,t),t._d=(e&&e._d||0)+1),t}function i(e,t){var n,i=t.props;for(n in i)!Ve.test(n)||e[n]&&e[n].fix||(e[n]="convert"!==n?r(e.constructor.prototype[n],i[n]):i[n])}function o(e){return e}function a(){return""}function s(e){try{throw console.log("JsRender dbg breakpoint: "+e),"dbg breakpoint"}catch(t){}return this.base?this.baseApply(arguments):e}function p(e){this.name=(t.link?"JsViews":"JsRender")+" Error",this.message=e||this.name}function l(e,t){if(e){for(var n in t)"__proto__"!==n&&(e[n]=t[n]);return e}}function d(e,t,n){return e?Array.isArray(e)?d.apply(oe,e):(xe=n?n[0]:xe,/^(\W|_){5}$/.test(e+t+xe)||S("Invalid delimiters"),he=e[0],ve=e[1],me=t[0],_e=t[1],ue.delimiters=[he+ve,me+_e,xe],e="\\"+he+"(\\"+xe+")?\\"+ve,t="\\"+me+"\\"+_e,re="(?:(\\w+(?=[\\/\\s\\"+me+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+me+"]|\\"+me+"(?!\\"+_e+"))*?)",ce.rTag="(?:"+re+")",re=new RegExp("(?:"+e+re+"(\\/)?|\\"+he+"(\\"+xe+")?\\"+ve+"(?:(?:\\/(\\w+))\\s*|!--[\\s\\S]*?--))"+t,"g"),ce.rTmpl=new RegExp("^\\s|\\s$|<.*>|([^\\\\]|^)[{}]|"+e+".*"+t),ge):ue.delimiters}function c(e,t){t||e===!0||(t=e,e=void 0);var n,r,i,o,a=this,s="root"===t;if(e){if(o=t&&a.type===t&&a,!o)if(n=a.views,a._.useKey){for(r in n)if(o=t?n[r].get(e,t):n[r])break}else for(r=0,i=n.length;!o&&i>r;r++)o=t?n[r].get(e,t):n[r]}else if(s)o=a.root;else if(t)for(;a&&!o;)o=a.type===t?a:void 0,a=a.parent;else o=a.parent;return o||void 0}function u(){var e=this.get("item");return e?e.index:void 0}function f(){return this.index}function g(e,t,n,r){var i,o,s,p=0;if(1===n&&(r=1,n=void 0),t)for(o=t.split("."),s=o.length;e&&s>p;p++)i=e,e=o[p]?e[o[p]]:e,ke(e)&&(e=e.call(i));return n&&(n.lt=n.lt||s>p),void 0===e?r?a:"":r?function(){return e.apply(i,arguments)}:e}function h(n,r,i){var o,a,s,p,d,c,u,f=this,g=!we&&arguments.length>1,h=f.ctx;if(n){if(f._||(d=f.index,f=f.tag),c=f,h&&h.hasOwnProperty(n)||(h=le).hasOwnProperty(n)){if(s=h[n],"tag"===n||"tagCtx"===n||"root"===n||"parentTags"===n)return s}else h=void 0;if((!we&&f.tagCtx||f.linked)&&(s&&s._cxp||(f=f.tagCtx||ke(s)?f:(f=f.scope||f,!f.isTop&&f.ctx.tag||f),void 0!==s&&f.tagCtx&&(f=f.tagCtx.view.scope),h=f._ocps,s=h&&h.hasOwnProperty(n)&&h[n]||s,s&&s._cxp||!i&&!g||((h||(f._ocps=f._ocps||{}))[n]=s=[{_ocp:s,_vw:c,_key:n}],s._cxp={path:Ce,ind:0,updateValue:function(e,n){return t.observable(s[0]).setProperty(Ce,e),this}})),p=s&&s._cxp)){if(arguments.length>2)return a=s[1]?ce._ceo(s[1].deps):[Ce],a.unshift(s[0]),a._cxp=p,a;if(d=p.tagElse,u=s[1]?p.tag&&p.tag.cvtArgs?p.tag.cvtArgs(d,1)[p.ind]:s[1](s[0].data,s[0],ce):s[0]._ocp,g)return ce._ucp(n,r,f,p),f;s=u}return s&&ke(s)&&(o=function(){return s.apply(this&&this!==e?this:c,arguments)},l(o,s)),o||s}}function v(e){return e&&(e.fn?e:this.getRsc("templates",e)||se(e))}function m(e,t,n,r){var o,a,s,p,d,c="number"==typeof n&&t.tmpl.bnds[n-1];if(void 0===r&&c&&c._lr&&(r=""),void 0!==r?n=r={props:{},args:[r]}:c&&(n=c(t.data,t,ce)),c=c._bd&&c,e||c){if(a=t._lc,o=a&&a.tag,n.view=t,!o){if(o=l(new ce._tg,{_:{bnd:c,unlinked:!0,lt:n.lt},inline:!a,tagName:":",convert:e,onArrayChange:!0,flow:!0,tagCtx:n,tagCtxs:[n],_is:"tag"}),p=n.args.length,p>1)for(d=o.bindTo=[];p--;)d.unshift(p);a&&(a.tag=o,o.linkCtx=a),n.ctx=Q(n.ctx,(a?a.view:t).ctx),i(o,n)}o._er=r&&s,o.ctx=n.ctx||o.ctx||{},n.ctx=void 0,s=o.cvtArgs()[0],o._er=r&&s}else s=n.args[0];return s=c&&t._.onRender?t._.onRender(s,t,o):s,void 0!=s?s:""}function _(e,t){var n,r,i,o,a,s,p,l=this;if(l.tagName){if(s=l,l=(s.tagCtxs||[l])[e||0],!l)return}else s=l.tag;if(a=s.bindFrom,o=l.args,(p=s.convert)&&typeof p===Be&&(p="true"===p?void 0:l.view.getRsc("converters",p)||S("Unknown converter: '"+p+"'")),p&&!t&&(o=o.slice()),a){for(i=[],n=a.length;n--;)r=a[n],i.unshift(x(l,r));t&&(o=i)}if(p){if(p=p.apply(s,i||o),void 0===p)return o;if(a=a||[0],n=a.length,(!je(p)||p.arg0!==!1&&(1===n||p.length!==n||p.arg0))&&(p=[p],a=[0],n=1),t)o=p;else for(;n--;)r=a[n],+r===r&&(o[r]=p[n])}return o}function x(e,t){return e=e[+t===t?"args":"props"],e&&e[t]}function b(e){return this.cvtArgs(e,1)}function w(e,t){var n,r,i=this;if(typeof t===Be){for(;void 0===n&&i;)r=i.tmpl&&i.tmpl[e],n=r&&r[t],i=i.parent;return n||oe[e][t]}}function y(e,t,n,r,o,a){function s(e){var t=p[e];if(void 0!==t)for(t=je(t)?t:[t],v=t.length;v--;)q=t[v],isNaN(parseInt(q))||(t[v]=parseInt(q));return t||[0]}t=t||ie;var p,l,d,c,u,f,g,v,m,w,y,C,k,j,T,A,P,N,R,F,M,$,V,I,D,q,J,U,K,B,L=0,H="",W=t._lc||!1,Z=t.ctx,z=n||t.tmpl,G="number"==typeof r&&t.tmpl.bnds[r-1];for("tag"===e._is?(p=e,e=p.tagName,r=p.tagCtxs,d=p.template):(l=t.getRsc("tags",e)||S("Unknown tag: {{"+e+"}} "),d=l.template),void 0===a&&G&&(G._lr=l.lateRender&&G._lr!==!1||G._lr)&&(a=""),void 0!==a?(H+=a,r=a=[{props:{},args:[],params:{props:{}}}]):G&&(r=G(t.data,t,ce)),g=r.length;g>L;L++)y=r[L],P=y.tmpl,(!W||!W.tag||L&&!W.tag.inline||p._er||P&&+P===P)&&(P&&z.tmpls&&(y.tmpl=y.content=z.tmpls[P-1]),y.index=L,y.ctxPrm=h,y.render=E,y.cvtArgs=_,y.bndArgs=b,y.view=t,y.ctx=Q(Q(y.ctx,l&&l.ctx),Z)),(n=y.props.tmpl)&&(y.tmpl=t._getTmpl(n),y.content=y.content||y.tmpl),p?W&&W.fn._lr&&(N=!!p.init):(p=new l._ctr,N=!!p.init,p.parent=f=Z&&Z.tag,p.tagCtxs=r,W&&(p.inline=!1,W.tag=p),p.linkCtx=W,(p._.bnd=G||W.fn)?(p._.ths=y.params.props["this"],p._.lt=r.lt,p._.arrVws={}):p.dataBoundOnly&&S(e+" must be data-bound:\n{^{"+e+"}}")),I=p.dataMap,y.tag=p,I&&r&&(y.map=r[L].map),p.flow||(C=y.ctx=y.ctx||{},c=p.parents=C.parentTags=Z&&Q(C.parentTags,Z.parentTags)||{},f&&(c[f.tagName]=f),c[p.tagName]=C.tag=p,C.tagCtx=y);if(!(p._er=a)){for(i(p,r[0]),p.rendering={rndr:p.rendering},L=0;g>L;L++){if(y=p.tagCtx=r[L],V=y.props,p.ctx=y.ctx,!L){if(N&&(p.init(y,W,p.ctx),N=void 0),y.args.length||y.argDefault===!1||p.argDefault===!1||(y.args=M=[y.view.data],y.params.args=["#data"]),j=s("bindTo"),void 0!==p.bindTo&&(p.bindTo=j),void 0!==p.bindFrom?p.bindFrom=s("bindFrom"):p.bindTo&&(p.bindFrom=p.bindTo=j),T=p.bindFrom||j,U=j.length,J=T.length,p._.bnd&&(K=p.linkedElement)&&(p.linkedElement=K=je(K)?K:[K],U!==K.length&&S("linkedElement not same length as bindTo")),(K=p.linkedCtxParam)&&(p.linkedCtxParam=K=je(K)?K:[K],J!==K.length&&S("linkedCtxParam not same length as bindFrom/bindTo")),T)for(p._.fromIndex={},p._.toIndex={},m=J;m--;)for(q=T[m],v=U;v--;)q===j[v]&&(p._.fromIndex[v]=m,p._.toIndex[m]=v);W&&(W.attr=p.attr=W.attr||p.attr||W._dfAt),u=p.attr,p._.noVws=u&&u!==Ke}if(M=p.cvtArgs(L),p.linkedCtxParam)for($=p.cvtArgs(L,1),v=J,B=p.constructor.prototype.ctx;v--;)(k=p.linkedCtxParam[v])&&(q=T[v],A=$[v],y.ctx[k]=ce._cp(B&&void 0===A?B[k]:A,void 0!==A&&x(y.params,q),y.view,p._.bnd&&{tag:p,cvt:p.convert,ind:v,tagElse:L}));(R=V.dataMap||I)&&(M.length||V.dataMap)&&(F=y.map,(!F||F.src!==M[0]||o)&&(F&&F.src&&F.unmap(),R.map(M[0],y,F,!p._.bnd),F=y.map),M=[F.tgt]),w=void 0,p.render&&(w=p.render.apply(p,M),t.linked&&w&&!Ee.test(w)&&(n={links:[]},n.render=n.fn=function(){return w},w=O(n,t.data,void 0,!0,t,void 0,void 0,p))),M.length||(M=[t]),void 0===w&&(D=M[0],p.contentCtx&&(D=p.contentCtx===!0?t:p.contentCtx(D)),w=y.render(D,!0)||(o?void 0:"")),H=H?H+(w||""):void 0!==w?""+w:void 0}p.rendering=p.rendering.rndr}return p.tagCtx=r[0],p.ctx=p.tagCtx.ctx,p._.noVws&&p.inline&&(H="text"===u?pe.html(H):""),G&&t._.onRender?t._.onRender(H,t,p):H}function C(e,t,n,r,i,o,a,s){var p,l,d,c=this,f="array"===t;c.content=s,c.views=f?[]:{},c.data=r,c.tmpl=i,d=c._={key:0,useKey:f?0:1,id:""+qe++,onRender:a,bnds:{}},c.linked=!!a,c.type=t||"top",t&&(c.cache={_ct:ue._cchCt}),n&&"top"!==n.type||((c.ctx=e||{}).root=c.data),(c.parent=n)?(c.root=n.root||c,p=n.views,l=n._,c.isTop=l.scp,c.scope=(!e.tag||e.tag===n.ctx.tag)&&!c.isTop&&n.scope||c,l.useKey?(p[d.key="_"+l.useKey++]=c,c.index=We,c.getIndex=u):p.length===(d.key=c.index=o)?p.push(c):p.splice(o,0,c),c.ctx=e||n.ctx):t&&(c.root=c)}function k(e){var t,n,r;for(t in Ye)n=t+"s",e[n]&&(r=e[n],e[n]={},oe[n](r,e))}function j(e,t,n){function i(){var t=this;t._={unlinked:!0},t.inline=!0,t.tagName=e}var o,a,s,p=new ce._tg;if(ke(t)?t={depends:t.depends,render:t}:typeof t===Be&&(t={template:t}),a=t.baseTag){t.flow=!!t.flow,a=typeof a===Be?n&&n.tags[a]||de[a]:a,a||S('baseTag: "'+t.baseTag+'" not found'),p=l(p,a);for(s in t)p[s]=r(a[s],t[s])}else p=l(p,t);return void 0!==(o=p.template)&&(p.template=typeof o===Be?se[o]||se(o):o),(i.prototype=p).constructor=p._ctr=i,n&&(p._parentTmpl=n),p}function T(e){return this.base.apply(this,e)}function A(e,n,r,i){function o(n){var o,s;if(typeof n===Be||n.nodeType>0&&(a=n)){if(!a&&(/^\.?\/[^\\:*?"<>]*$/.test(n)?(s=se[e=e||n])?n=s:a=document.getElementById(n):"#"===n.charAt(0)&&(a=document.getElementById(n.slice(1))),!a&&t.fn&&!ce.rTmpl.test(n)))try{a=t(n,document)[0]}catch(p){}a&&("SCRIPT"!==a.tagName&&S(n+": Use script block, not "+a.tagName),i?n=a.innerHTML:(o=a.getAttribute(Qe),o&&(o!==He?(n=se[o],delete se[o]):t.fn&&(n=t.data(a)[He])),o&&n||(e=e||(t.fn?He:n),n=A(e,a.innerHTML,r,i)),n.tmplName=e=e||o,e!==He&&(se[e]=n),a.setAttribute(Qe,e),t.fn&&t.data(a,He,n))),a=void 0}else n.fn||(n=void 0);return n}var a,s,p=n=n||"";return ce._html=pe.html,0===i&&(i=void 0,p=o(p)),i=i||(n.markup?n.bnds?l({},n):n:{}),i.tmplName=i.tmplName||e||"unnamed",r&&(i._parentTmpl=r),!p&&n.markup&&(p=o(n.markup))&&p.fn&&(p=p.markup),void 0!==p?(p.render||n.render?p.tmpls&&(s=p):(n=F(p,i),q(p.replace(Pe,"\\$&"),n)),s||(s=l(function(){return s.render.apply(s,arguments)},n),k(s)),s):void 0}function P(e,t){return ke(e)?e.call(t):e}function N(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!0})}function R(e,n){function r(e){d.apply(this,e)}function i(){return new r(arguments)}function o(e,t){for(var n,r,i,o,a,s=0;x>s;s++)i=f[s],n=void 0,typeof i!==Be&&(n=i,i=n.getter,a=n.parentRef),void 0===(o=e[i])&&n&&void 0!==(r=n.defaultVal)&&(o=P(r,e)),t(o,n&&u[n.type],i,a)}function a(t){t=typeof t===Be?JSON.parse(t):t;var n,r,i,a,l=0,d=t,c=[];if(je(t)){for(t=t||[],n=t.length;n>l;l++)c.push(this.map(t[l]));return c._is=e,c.unmap=p,c.merge=s,c}if(t){for(o(t,function(e,t){t?e=t.map(e):typeof e===Be&&("{"===e[0]&&"}"===e[e.length-1]||"["===e[0]&&"]"===e[e.length-1])&&(e=JSON.parse(e)),c.push(e)}),d=this.apply(this,c),l=x;l--;)if(i=c[l],a=f[l].parentRef,a&&i&&i.unmap)if(je(i))for(n=i.length;n--;)N(i[n],a,d);else N(i,a,d);for(r in t)r===ae||w[r]||(d[r]=t[r])}return d}function s(e,t,n){e=typeof e===Be?JSON.parse(e):e;var r,a,s,p,l,d,c,u,f,g,v=0,m=this;if(je(m)){for(c={},f=[],a=e.length,s=m.length;a>v;v++){for(u=e[v],d=!1,r=0;s>r&&!d;r++)c[r]||(l=m[r],h&&(c[r]=d=typeof h===Be?u[h]&&(w[h]?l[h]():l[h])===u[h]:h(l,u)));d?(l.merge(u),f.push(l)):(f.push(g=i.map(u)),n&&N(g,n,t))}return void(b?b(m).refresh(f,!0):m.splice.apply(m,[0,m.length].concat(f)))}o(e,function(e,t,n,r){t?m[n]().merge(e,m,r):m[n]()!==e&&(typeof e===Be&&("{"===e[0]&&"}"===e[e.length-1]||"["===e[0]&&"]"===e[e.length-1])&&(e=JSON.parse(e)),m[n](e))});for(p in e)p===ae||w[p]||(m[p]=e[p])}function p(){function e(e){for(var t=[],n=0,r=e.length;r>n;n++)t.push(e[n].unmap());return t}var t,n,r,i,o=0,a=this;if(je(a))return e(a);for(t={};x>o;o++)n=f[o],r=void 0,typeof n!==Be&&(r=n,n=r.getter),i=a[n](),t[n]=r&&i&&u[r.type]?je(i)?e(i):i.unmap():i;for(n in a)!a.hasOwnProperty(n)||"_"===n.charAt(0)&&w[n.slice(1)]||n===ae||ke(a[n])||(t[n]=a[n]);return t}var l,d,c,u=this,f=n.getters,g=n.extend,h=n.id,v=t.extend({_is:e||"unnamed",unmap:p,merge:s},g),m="",_="",x=f?f.length:0,b=t.observable,w={};for(r.prototype=v,l=0;x>l;l++)!function(e){e=e.getter||e,w[e]=l+1;var t="_"+e;m+=(m?",":"")+e,_+="this."+t+" = "+e+";\n",v[e]=v[e]||function(n){return arguments.length?void(b?b(this).setProperty(e,n):this[t]=n):this[t]},b&&(v[e].set=v[e].set||function(e){this[t]=e})}(f[l]);return _=new Function(m,_),d=function(){_.apply(this,arguments),(c=arguments[x+1])&&N(this,arguments[x],c)},d.prototype=v,v.constructor=d,i.map=a,i.getters=f,i.extend=g,i.id=h,i}function F(e,n){var r,i=fe._wm||{},o={tmpls:[],links:{},bnds:[],_is:"template",render:E};return n&&(o=l(o,n)),o.markup=e,o.htmlTag||(r=Fe.exec(e),o.htmlTag=r?r[1].toLowerCase():""),r=i[o.htmlTag],r&&r!==i.div&&(o.markup=t.trim(o.markup)),o}function M(e,t){function n(i,o,a){var s,p,l,d=ce.onStore[e];if(i&&typeof i===Le&&!i.nodeType&&!i.markup&&!i.getTgt&&!("viewModel"===e&&i.getters||i.extend)){for(p in i)n(p,i[p],o);return o||oe}return i&&typeof i!==Be&&(a=o,o=i,i=void 0),l=a?"viewModel"===e?a:a[r]=a[r]||{}:n,s=t.compile,void 0===o&&(o=s?i:l[i],i=void 0),null===o?i&&delete l[i]:(s&&(o=s.call(l,i,o,a,0)||{},o._is=e),i&&(l[i]=o)),d&&d(i,o,a,s),o}var r=e+"s";oe[r]=n}function $(e){ge[e]=ge[e]||function(t){return arguments.length?(ue[e]=t,ge):ue[e]}}function V(e){function t(t,n){this.tgt=e.getTgt(t,n),n.map=this}return ke(e)&&(e={getTgt:e}),e.baseMap&&(e=l(l({},e.baseMap),e)),e.map=function(e,n){return new t(e,n)},e}function E(e,t,n,r,i,o){var a,s,p,l,d,c,u,f,g=r,h="";if(t===!0?(n=t,t=void 0):typeof t!==Le&&(t=void 0),(p=this.tag)?(d=this,g=g||d.view,l=g._getTmpl(p.template||d.tmpl),arguments.length||(e=p.contentCtx&&ke(p.contentCtx)?e=p.contentCtx(e):g)):l=this,l){if(!r&&e&&"view"===e._is&&(g=e),g&&e===g&&(e=g.data),c=!g,we=we||c,c&&((t=t||{}).root=e),!we||fe.useViews||l.useViews||g&&g!==ie)h=O(l,e,t,n,g,i,o,p);else{if(g?(u=g.data,f=g.index,g.index=We):(g=ie,u=g.data,g.data=e,g.ctx=t),je(e)&&!n)for(a=0,s=e.length;s>a;a++)g.index=a,g.data=e[a],h+=l.fn(e[a],g,ce);else g.data=e,h+=l.fn(e,g,ce);g.data=u,g.index=f}c&&(we=void 0)}return h}function O(e,t,n,r,i,o,a,s){var p,d,c,u,f,g,h,v,m,_,x,b,w,y="";if(s&&(m=s.tagName,b=s.tagCtx,n=n?Q(n,s.ctx):s.ctx,e===i.content?h=e!==i.ctx._wrp?i.ctx._wrp:void 0:e!==b.content?e===s.template?(h=b.tmpl,n._wrp=b.content):h=b.content||i.content:h=i.content,b.props.link===!1&&(n=n||{},n.link=!1)),i&&(a=a||i._.onRender,w=n&&n.link===!1,w&&i._.nl&&(a=void 0),n=Q(n,i.ctx),b=!s&&i.tag?i.tag.tagCtxs[i.tagElse]:b),(_=b&&b.props.itemVar)&&("~"!==_[0]&&D("Use itemVar='~myItem'"),_=_.slice(1)),o===!0&&(g=!0,o=0),a&&s&&s._.noVws&&(a=void 0),v=a,a===!0&&(v=void 0,a=i._.onRender),n=e.helpers?Q(e.helpers,n):n,x=n,je(t)&&!r)for(c=g?i:void 0!==o&&i||new C(n,"array",i,t,e,o,a,h),c._.nl=w,i&&i._.useKey&&(c._.bnd=!s||s._.bnd&&s,c.tag=s),p=0,d=t.length;d>p;p++)u=new C(x,"item",c,t[p],e,(o||0)+p,a,c.content),_&&((u.ctx=l({},x))[_]=ce._cp(t[p],"#data",u)),f=e.fn(t[p],u,ce),y+=c._.onRender?c._.onRender(f,u):f;else c=g?i:new C(x,m||"data",i,t,e,o,a,h),_&&((c.ctx=l({},x))[_]=ce._cp(t,"#data",c)),c.tag=s,c._.nl=w,y+=e.fn(t,c,ce);return s&&(c.tagElse=b.index,b.contentView=c),v?v(y,c):y}function I(e,t,n){var r=void 0!==n?ke(n)?n.call(t.data,e,t):n||"":"{Error: "+(e.message||e)+"}";return ue.onError&&void 0!==(n=ue.onError.call(t.data,e,n&&r,t))&&(r=n),t&&!t._lc?pe.html(r):r}function S(e){throw new ce.Err(e)}function D(e){S("Syntax error\n"+e)}function q(e,t,n,r,i){function o(t){t-=h,t&&m.push(e.substr(h,t).replace(Te,"\\n"))}function a(t,n){t&&(t+="}}",D((n?"{{"+n+"}} block has {{/"+t+" without {{"+t:"Unmatched or missing {{/"+t)+", in template:\n"+e))}function s(s,p,l,u,g,x,b,w,y,C,k,j){(b&&p||y&&!l||w&&":"===w.slice(-1)||C)&&D(s),x&&(g=":",u=Ke),y=y||n&&!i;var T,A,P,N=(p||n)&&[[]],R="",F="",M="",$="",V="",E="",O="",I="",S=!y&&!g;l=l||(w=w||"#data",g),o(j),h=j+s.length,b?f&&m.push(["*","\n"+w.replace(/^:/,"ret+= ").replace(Ae,"$1")+";\n"]):l?("else"===l&&(Re.test(w)&&D('For "{{else if expr}}" use "{{else expr}}"'),N=_[9]&&[[]],_[10]=e.substring(_[10],j),A=_[11]||_[0]||D("Mismatched: "+s),_=v.pop(),m=_[2],S=!0),w&&B(w.replace(Te," "),N,t,n).replace(Ne,function(e,t,n,r,i,o,a,s){return"this:"===r&&(o="undefined"),s&&(P=P||"@"===s[0]),r="'"+i+"':",a?(F+=n+o+",",$+="'"+s+"',"):n?(M+=r+"j._cp("+o+',"'+s+'",view),',E+=r+"'"+s+"',"):t?O+=o:("trigger"===i&&(I+=o),"lateRender"===i&&(T="false"!==s),R+=r+o+",",V+=r+"'"+s+"',",c=c||Ve.test(i)),""}).slice(0,-1),N&&N[0]&&N.pop(),d=[l,u||!!r||c||"",S&&[],U($||(":"===l?"'#data',":""),V,E),U(F||(":"===l?"data,":""),R,M),O,I,T,P,N||0],m.push(d),S&&(v.push(_),_=d,_[10]=h,_[11]=A)):k&&(a(k!==_[0]&&k!==_[11]&&k,_[0]),_[10]=e.substring(_[10],j),_=v.pop()),a(!_&&k),m=_[2]}var p,l,d,c,u,f=ue.allowCode||t&&t.allowCode||ge.allowCode===!0,g=[],h=0,v=[],m=g,_=[,,g];if(f&&t._is&&(t.allowCode=f),n&&(void 0!==r&&(e=e.slice(0,-r.length-2)+me),e=he+e+_e),a(v[0]&&v[0][2].pop()[0]),e.replace(re,s),o(e.length),(h=g[g.length-1])&&a(typeof h!==Be&&+h[10]===h[10]&&h[0]),n){for(l=L(g,e,n),u=[],p=g.length;p--;)u.unshift(g[p][9]);J(l,u)}else l=L(g,t);return l}function J(e,t){var n,r,i=0,o=t.length;for(e.deps=[],e.paths=[];o>i;i++){e.paths.push(r=t[i]);for(n in r)"_jsvto"!==n&&r.hasOwnProperty(n)&&r[n].length&&!r[n].skp&&(e.deps=e.deps.concat(r[n]))}}function U(e,t,n){return[e.slice(0,-1),t.slice(0,-1),n.slice(0,-1)]}function K(e,t){return"\n params:{args:["+e[0]+"],\n props:{"+e[1]+"}"+(e[2]?",\n ctx:{"+e[2]+"}":"")+"},\n args:["+t[0]+"],\n props:{"+t[1]+"}"+(t[2]?",\n ctx:{"+t[2]+"}":"")}function B(e,n,r,i){function o(r,o,l,T,A,P,N,R,F,M,$,V,E,O,I,S,q,J,U,K,B){function L(e,t,r,o,p,l,d,c){if(z="."===r,r&&(A=A.slice(t.length),/^\.?constructor$/.test(c||A)&&D(e),z||(e=(M?(i?"":"(ltOb.lt=ltOb.lt||")+"(ob=":"")+(o?'view.ctxPrm("'+o+'")':p?"view":"data")+(M?")===undefined"+(i?"":")")+'?"":view._getOb(ob,"':"")+(c?(l?"."+l:o?"":p?"":"."+r)+(d||""):(c=o?"":p?l||"":r,"")),e+=c?"."+c:"",e=t+("view.data"===e.slice(0,9)?e.slice(5):e)+(M?(i?'"':'",ltOb')+($?",1)":")"):"")),u)){if(H="_linkTo"===a?s=n._jsvto=n._jsvto||[]:f.bd,W=z&&H[H.length-1]){if(W._cpfn){for(;W.sb;)W=W.sb;W.prm&&(W.bnd&&(A="^"+A.slice(1)),W.sb=A,W.bnd=W.bnd||"^"===A[0])}}else H.push(A);$&&!z&&(y[m]=Y,C[m]=k[m].length)}return e}T&&!R&&(A=T+A),P=P||"",E=E||"",l=l||o||E,A=A||F,M&&(M=!/\)|]/.test(B[K-1]))&&(A=A.slice(1).split(".").join("^")),$=$||J||"";var Q,H,W,Z,z,G,X,Y=K;if(!c&&!d){if(N&&D(e),q&&u){if(Q=y[m-1],B.length-1>Y-(Q||0)){if(Q=t.trim(B.slice(Q,Y+r.length)),H=s||g[m-1].bd,W=H[H.length-1],W&&W.prm){for(;W.sb&&W.sb.prm;)W=W.sb;Z=W.sb={path:W.sb,bnd:W.bnd},!Z.path&&W.path&&(W.bnd=!0)}else H.push(Z={path:H.pop()});W&&W.sb===Z&&(k[m]=k[m-1].slice(W._cpPthSt)+k[m],k[m-1]=k[m-1].slice(0,W._cpPthSt)),Z._cpPthSt=C[m-1],Z._cpKey=Q,k[m]+=B.slice(j,K),j=K,Z._cpfn=Ze[Q]=Ze[Q]||new Function("data,view,j","//"+Q+"\nvar v;\nreturn ((v="+k[m]+("]"===S?")]":S)+")!=null?v:null);"),k[m-1]+=w[v]&&fe.cache?'view.getCache("'+Q.replace(Pe,"\\$&")+'"':k[m],Z.prm=f.bd,Z.bnd=Z.bnd||Z.path&&Z.path.indexOf("^")>=0}k[m]=""}"["===$&&($="[j._sq("),"["===l&&(l="[j._sq(")}return X=c?(c=!O,c?r:E+'"'):d?(d=!I,d?r:E+'"'):(l?(b[++v]=!0,_[v]=0,u&&(y[m++]=Y++,f=g[m]={bd:[]},k[m]="",C[m]=1),l):"")+(U?v?"":(h=B.slice(h,Y),(a?(a=p=s=!1,"\b"):"\b,")+h+(h=Y+r.length,u&&n.push(f.bd=[]),"\b")):R?(m&&D(e),u&&n.pop(),a="_"+A,p=T,h=Y+r.length,u&&(u=f.bd=n[a]=[],u.skp=!T),A+":"):A?A.split("^").join(".").replace(ce.rPath,L)+($||P):P?P:S?"]"===S?")]":")":V?(w[v]||D(e),","):o?"":(c=O,d=I,'"')),c||d||S&&(w[v]=!1,v--),u&&(c||d||(S&&(b[v+1]&&(f=g[--m],b[v+1]=!1),x=_[v+1]),$&&(_[v+1]=k[m].length+(l?1:0),(A||S)&&(f=g[++m]={bd:[]},b[v+1]=!0))),k[m]=(k[m]||"")+B.slice(j,K),j=K+r.length,c||d||((G=l&&b[v+1])&&(k[m-1]+=l,C[m-1]++),"("===$&&z&&!Z&&(k[m]=k[m-1].slice(x)+k[m],k[m-1]=k[m-1].slice(0,x))),k[m]+=G?X.slice(1):X),c||d||!$||(v++,A&&"("===$&&(w[v]=!0)),c||d||!J||(u&&(k[m]+=$),X+=$),X}var a,s,p,l,d,c,u=n&&n[0],f={bd:u},g={0:f},h=0,v=0,m=0,_={},x=0,b={},w={},y={},C={0:0},k={0:""},j=0;return"@"===e[0]&&(e=e.replace(De,".")),l=(e+(r?" ":"")).replace(ce.rPrm,o),u&&(l=k[0]),!v&&l||D(e)}function L(e,t,n){var r,i,o,a,s,p,l,d,c,u,f,g,h,v,m,_,x,b,w,y,C,k,j,T,A,P,N,R,M,$,V,E,O,I=0,S=fe.useViews||t.useViews||t.tags||t.templates||t.helpers||t.converters,q="",U={},B=e.length;for(typeof t===Be?(b=n?'data-link="'+t.replace(Te," ").slice(1,-1)+'"':t,t=0):(b=t.tmplName||"unnamed",t.allowCode&&(U.allowCode=!0),t.debug&&(U.debug=!0),f=t.bnds,x=t.tmpls),r=0;B>r;r++)if(i=e[r],typeof i===Be)q+='+"'+i+'"';else if(o=i[0],"*"===o)q+=";\n"+i[1]+"\nret=ret";else{if(a=i[1],C=!n&&i[2],s=K(i[3],h=i[4]),$=i[6],V=i[7],i[8]?(E="\nvar ob,ltOb={},ctxs=",O=";\nctxs.lt=ltOb.lt;\nreturn ctxs;"):(E="\nreturn ",O=""),k=i[10]&&i[10].replace(Ae,"$1"),(A="else"===o)?g&&g.push(i[9]):(R=i[5]||ue.debugMode!==!1&&"undefined",f&&(g=i[9])&&(g=[g],I=f.push(1))),S=S||h[1]||h[2]||g||/view.(?!index)/.test(h[0]),(P=":"===o)?a&&(o=a===Ke?">":a+o):(C&&(w=F(k,U),w.tmplName=b+"/"+o,w.useViews=w.useViews||S,L(C,w),S=w.useViews,x.push(w)),A||(y=o,S=S||o&&(!de[o]||!de[o].flow),T=q,q=""),j=e[r+1],j=j&&"else"===j[0]),M=R?";\ntry{\nret+=":"\n+",v="",m="",P&&(g||$||a&&a!==Ke||V)){if(N=new Function("data,view,j","// "+b+" "+ ++I+" "+o+E+"{"+s+"};"+O),N._er=R,N._tag=o,N._bd=!!g,N._lr=V,n)return N;J(N,g),_='c("'+a+'",view,',u=!0,v=_+I+",",m=")"}if(q+=P?(n?(R?"try{\n":"")+"return ":M)+(u?(u=void 0,S=c=!0,_+(N?(f[I-1]=N,I):"{"+s+"}")+")"):">"===o?(l=!0,"h("+h[0]+")"):(d=!0,"((v="+h[0]+")!=null?v:"+(n?"null)":'"")'))):(p=!0,"\n{view:view,content:false,tmpl:"+(C?x.length:"false")+","+s+"},"),y&&!j){if(q="["+q.slice(0,-1)+"]",_='t("'+y+'",view,this,',n||g){if(q=new Function("data,view,j"," // "+b+" "+I+" "+y+E+q+O),q._er=R,q._tag=y,g&&J(f[I-1]=q,g),q._lr=V,n)return q;v=_+I+",undefined,",m=")"}q=T+M+_+(g&&I||q)+")",g=0,y=0}R&&!j&&(S=!0,q+=";\n}catch(e){ret"+(n?"urn ":"+=")+v+"j._err(e,view,"+R+")"+m+";}"+(n?"":"\nret=ret"))}q="// "+b+(U.debug?"\ndebugger;":"")+"\nvar v"+(p?",t=j._tag":"")+(c?",c=j._cnvt":"")+(l?",h=j._html":"")+(n?(i[8]?", ob":"")+";\n":',ret=""')+q+(n?"\n":";\nreturn ret;");try{q=new Function("data,view,j",q)}catch(Q){D("Compiled template code:\n\n"+q+'\n: "'+(Q.message||Q)+'"')}return t&&(t.fn=q,t.useViews=!!S),q}function Q(e,t){return e&&e!==t?t?l(l({},t),e):e:t&&l({},t)}function H(e,n){var r,i,o=n.map,a=o&&o.propsArr;if(!a){if(a=[],typeof e===Le||ke(e))for(r in e)i=e[r],r===ae||!e.hasOwnProperty(r)||n.props.noFunctions&&t.isFunction(i)||a.push({key:r,prop:i});o&&(o.propsArr=o.options&&a)}return W(a,n)}function W(e,n){var r,i,o,a=n.tag,s=n.props,p=n.params.props,l=s.filter,d=s.sort,c=d===!0,u=parseInt(s.step),f=s.reverse?-1:1;if(!je(e))return e;if(c||d&&typeof d===Be?(r=e.map(function(e,t){return e=c?e:g(e,d),{i:t,v:typeof e===Be?e.toLowerCase():e}}),r.sort(function(e,t){return e.v>t.v?f:e.vf)&&!a.dataMap&&(e=e.slice()),ke(d)&&(e=e.sort(function(){return d.apply(n,arguments)})),0>f&&(!d||ke(d))&&(e=e.reverse()),e.filter&&l&&(e=e.filter(l,n),n.tag.onFilter&&n.tag.onFilter(n)),p.sorted&&(r=d||0>f?e:e.slice(),a.sorted?t.observable(a.sorted).refresh(r):n.map.sorted=r),i=s.start,o=s.end,(p.start&&void 0===i||p.end&&void 0===o)&&(i=o=0),isNaN(i)&&isNaN(o)||(i=+i||0,o=void 0===o||o>e.length?e.length:+o,e=e.slice(i,o)),u>1){for(i=0,o=e.length,r=[];o>i;i+=u)r.push(e[i]);e=r}return p.paged&&a.paged&&$observable(a.paged).refresh(e),e}function Z(e,n,r){var i=this.jquery&&(this[0]||S("Unknown template")),o=i.getAttribute(Qe);return E.call(o&&t.data(i)[He]||se(i),e,n,r)}function z(e){return Je[e]||(Je[e]="&#"+e.charCodeAt(0)+";")}function G(e,t){return Ue[t]||""}function X(e){return void 0!=e?$e.test(e)&&(""+e).replace(Oe,z)||e:""}function Y(e){return typeof e===Be?e.replace(Ie,z):e}function ee(e){return typeof e===Be?e.replace(Se,G):e}var te=t===!1;t=t&&t.fn?t:e.jQuery;var ne,re,ie,oe,ae,se,pe,le,de,ce,ue,fe,ge,he,ve,me,_e,xe,be,we,ye="v1.0.16",Ce="_ocp",ke=function(e){return"function"==typeof e},je=Array.isArray,Te=/[ \t]*(\r\n|\n|\r)/g,Ae=/\\(['"\\])/g,Pe=/['"\\]/g,Ne=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,Re=/^if\s/,Fe=/<(\w+)[>\s]/,Me=/[\x00`><"'&=]/g,$e=/[\x00`><\"'&=]/,Ve=/^on[A-Z]|^convert(Back)?$/,Ee=/^\#\d+_`[\s\S]*\/\d+_`$/,Oe=Me,Ie=/[&<>]/g,Se=/&(amp|gt|lt);/g,De=/\[['"]?|['"]?\]/g,qe=0,Je={"&":"&","<":"<",">":">","\x00":"�","'":"'",'"':""","`":"`","=":"="},Ue={amp:"&",gt:">",lt:"<"},Ke="html",Be="string",Le="object",Qe="data-jsv-tmpl",He="jsvTmpl",We="For #index in nested block use #getIndex().",Ze={},ze={},Ge=e.jsrender,Xe=Ge&&t&&!t.render,Ye={template:{compile:A},tag:{compile:j},viewModel:{compile:R},helper:{},converter:{}};if(oe={jsviews:ye,sub:{rPath:/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,rPrm:/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|~(?![\w$])|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(?:(\()\s*)?\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,View:C,Err:p,tmplFn:q,parse:B,extend:l,extendCtx:Q,syntaxErr:D,onStore:{template:function(e,t){null===t?delete ze[e]:e&&(ze[e]=t)}},addSetting:$,settings:{allowCode:!1},advSet:a,_thp:i,_gm:r,_tg:function(){},_cnvt:m,_tag:y,_er:S,_err:I,_cp:o,_sq:function(e){return"constructor"===e&&D(""),e}},settings:{delimiters:d,advanced:function(e){return e?(l(fe,e),ce.advSet(),ge):fe}},map:V},(p.prototype=new Error).constructor=p,u.depends=function(){return[this.get("item"),"index"]},f.depends="index",C.prototype={get:c,getIndex:f,ctxPrm:h,getRsc:w,_getTmpl:v,_getOb:g,getCache:function(e){return ue._cchCt>this.cache._ct&&(this.cache={_ct:ue._cchCt}),void 0!==this.cache[e]?this.cache[e]:this.cache[e]=Ze[e](this.data,this,ce)},_is:"view"},ce=oe.sub,ge=oe.settings,!(Ge||t&&t.render)){for(ne in Ye)M(ne,Ye[ne]);if(pe=oe.converters,le=oe.helpers,de=oe.tags,ce._tg.prototype={baseApply:T,cvtArgs:_,bndArgs:b,ctxPrm:h},ie=ce.topView=new C,t){if(t.fn.render=Z,ae=t.expando,t.observable){if(ye!==(ye=t.views.jsviews))throw"jquery.observable.js requires jsrender.js "+ye;l(ce,t.views.sub),oe.map=t.views.map}}else t={jsrender:ye},te&&(e.jsrender=t),t.renderFile=t.__express=t.compile=function(){throw"Node.js: use npm jsrender, or jsrender-node.js"},ce._jq=function(e){e!==t&&(l(e,t),t=e,t.fn.render=Z,delete t.jsrender,ae=t.expando)};ue=ce.settings,ue.allowCode=!1,t.render=ze,t.views=oe,t.templates=se=oe.templates;for(be in ue)$(be);(ge.debugMode=function(e){return void 0===e?ue.debugMode:(ue._clFns&&ue._clFns(),ue.debugMode=e,ue.onError=typeof e===Be?function(){return e}:ke(e)?e:void 0,ge)})(!1),fe=ue.advanced={cache:!0,useViews:!1,_jsv:!1},de({"if":{render:function(e){var t=this,n=t.tagCtx,r=t.rendering.done||!e&&(n.args.length||!n.index)?"":(t.rendering.done=!0,void(t.selected=n.index));return r},contentCtx:!0,flow:!0},"for":{sortDataMap:V(W),init:function(e,t){this.setDataMap(this.tagCtxs)},render:function(e){var t,n,r,i,o,a=this,s=a.tagCtx,p=s.argDefault===!1,l=s.props,d=p||s.args.length,c="",u=0;if(!a.rendering.done){if(t=d?e:s.view.data,p)for(p=l.reverse?"unshift":"push",i=+l.end,o=+l.step||1,t=[],r=+l.start||0;(i-r)*o>0;r+=o)t[p](r);void 0!==t&&(n=je(t),c+=s.render(t,!d||l.noIteration),u+=n?t.length:1),(a.rendering.done=u)&&(a.selected=s.index)}return c},setDataMap:function(e){for(var t,n,r,i=this,o=e.length;o--;)t=e[o],n=t.props,r=t.params.props,t.argDefault=void 0===n.end||t.args.length>0,n.dataMap=t.argDefault!==!1&&je(t.args[0])&&(r.sort||r.start||r.end||r.step||r.filter||r.reverse||n.sort||n.start||n.end||n.step||n.filter||n.reverse)&&i.sortDataMap},flow:!0},props:{baseTag:"for",dataMap:V(H),init:a,flow:!0},include:{flow:!0},"*":{render:o,flow:!0},":*":{render:o,flow:!0},dbg:le.dbg=pe.dbg=s}),pe({html:X,attr:X,encode:Y,unencode:ee,url:function(e){return void 0!=e?encodeURI(""+e):null===e?e:""}})}return ue=ce.settings,ge.delimiters("{{","}}","^"),Xe&&Ge.views.sub._jq(t),t||Ge},window); -//# sourceMappingURL=jsrender.min.js.map +!function(t,e){var n=e.jQuery;"object"==typeof exports?module.exports=n?t(e,n):function(n){if(n&&!n.fn)throw"Provide jQuery or null";return t(e,n)}:"function"==typeof define&&define.amd?define(function(){return t(e)}):t(e,!1)}(function(t,e){"use strict";var n=!1===e;e=e&&e.fn?e:t.jQuery;var r,i,o,a,s,l,p,d,c,u,f,g,h,v,m,_,x,b,w,y,C="v1.0.16",k="_ocp",j=function(t){return"function"==typeof t},T=Array.isArray,A=/[ \t]*(\r\n|\n|\r)/g,P=/\\(['"\\])/g,N=/['"\\]/g,R=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,F=/^if\s/,M=/<(\w+)[>\s]/,$=/[\x00`><\"'&=]/,V=/^on[A-Z]|^convert(Back)?$/,E=/^\#\d+_`[\s\S]*\/\d+_`$/,O=/[\x00`><"'&=]/g,I=/[&<>]/g,S=/&(amp|gt|lt);/g,D=/\[['"]?|['"]?\]/g,q=0,J={"&":"&","<":"<",">":">","\0":"�","'":"'",'"':""","`":"`","=":"="},U={amp:"&",gt:">",lt:"<"},K="html",B="string",L="object",Q="data-jsv-tmpl",H="jsvTmpl",W="For #index in nested block use #getIndex().",Z={},z={},G=t.jsrender,X=G&&e&&!e.render,Y={template:{compile:function t(n,r,i,o){function s(r){var a,s;if(typeof r===B||r.nodeType>0&&(d=r)){if(!d&&(/^\.?\/[^\\:*?"<>]*$/.test(r)?(s=l[n=n||r])?r=s:d=document.getElementById(r):"#"===r.charAt(0)&&(d=document.getElementById(r.slice(1))),!d&&e.fn&&!u.rTmpl.test(r)))try{d=e(r,document)[0]}catch(t){}d&&("SCRIPT"!==d.tagName&&Ct(r+": Use script block, not "+d.tagName),o?r=d.innerHTML:((a=d.getAttribute(Q))&&(a!==H?(r=l[a],delete l[a]):e.fn&&(r=e.data(d)[H])),a&&r||(n=n||(e.fn?H:r),r=t(n,d.innerHTML,i,o)),r.tmplName=n=n||a,n!==H&&(l[n]=r),d.setAttribute(Q,n),e.fn&&e.data(d,H,r))),d=void 0}else r.fn||(r=void 0);return r}var d,c,f=r=r||"";u._html=p.html,0===o&&(o=void 0,f=s(f));(o=o||(r.markup?r.bnds?at({},r):r:{})).tmplName=o.tmplName||n||"unnamed",i&&(o._parentTmpl=i);!f&&r.markup&&(f=s(r.markup))&&f.fn&&(f=f.markup);if(void 0!==f)return f.render||r.render?f.tmpls&&(c=f):(r=mt(f,o),jt(f.replace(N,"\\$&"),r)),c||(c=at(function(){return c.render.apply(c,arguments)},r),function(t){var e,n,r;for(e in Y)t[n=e+"s"]&&(r=t[n],t[n]={},a[n](r,t))}(c)),c}},tag:{compile:function(t,e,n){var r,i,o,a=new u._tg;function s(){var e=this;e._={unlinked:!0},e.inline=!0,e.tagName=t}j(e)?e={depends:e.depends,render:e}:typeof e===B&&(e={template:e});if(i=e.baseTag)for(o in e.flow=!!e.flow,(i=typeof i===B?n&&n.tags[i]||c[i]:i)||Ct('baseTag: "'+e.baseTag+'" not found'),a=at(a,i),e)a[o]=et(i[o],e[o]);else a=at(a,e);void 0!==(r=a.template)&&(a.template=typeof r===B?l[r]||l(r):r);(s.prototype=a).constructor=a._ctr=s,n&&(a._parentTmpl=n);return a}},viewModel:{compile:function(t,n){var r,i,o,a=this,l=n.getters,p=n.extend,d=n.id,c=e.extend({_is:t||"unnamed",unmap:w,merge:b},p),u="",f="",g=l?l.length:0,h=e.observable,v={};function m(t){i.apply(this,t)}function _(){return new m(arguments)}function x(t,e){for(var n,r,i,o,s,p=0;p1,v=g.ctx;if(n){if(g._||(p=g.index,g=g.tag),c=g,v&&v.hasOwnProperty(n)||(v=d).hasOwnProperty(n)){if(s=v[n],"tag"===n||"tagCtx"===n||"root"===n||"parentTags"===n)return s}else v=void 0;if((!y&&g.tagCtx||g.linked)&&(s&&s._cxp||(g=g.tagCtx||j(s)?g:!(g=g.scope||g).isTop&&g.ctx.tag||g,void 0!==s&&g.tagCtx&&(g=g.tagCtx.view.scope),v=g._ocps,(s=v&&v.hasOwnProperty(n)&&v[n]||s)&&s._cxp||!i&&!h||((v||(g._ocps=g._ocps||{}))[n]=s=[{_ocp:s,_vw:c,_key:n}],s._cxp={path:k,ind:0,updateValue:function(t,n){return e.observable(s[0]).setProperty(k,t),this}})),l=s&&s._cxp)){if(arguments.length>2)return(a=s[1]?u._ceo(s[1].deps):[k]).unshift(s[0]),a._cxp=l,a;if(p=l.tagElse,f=s[1]?l.tag&&l.tag.cvtArgs?l.tag.cvtArgs(p,1)[l.ind]:s[1](s[0].data,s[0],u):s[0]._ocp,h)return u._ucp(n,r,g,l),g;s=f}return s&&j(s)&&(o=function(){return s.apply(this&&this!==t?this:c,arguments)},at(o,s)),o||s}}function ct(t,e){var n,r,i,o,a,s,l,p=this;if(p.tagName){if(!(p=((s=p).tagCtxs||[p])[t||0]))return}else s=p.tag;if(a=s.bindFrom,o=p.args,(l=s.convert)&&typeof l===B&&(l="true"===l?void 0:p.view.getRsc("converters",l)||Ct("Unknown converter: '"+l+"'")),l&&!e&&(o=o.slice()),a){for(i=[],n=a.length;n--;)r=a[n],i.unshift(ut(p,r));e&&(o=i)}if(l){if(void 0===(l=l.apply(s,i||o)))return o;if(n=(a=a||[0]).length,T(l)&&(!1===l.arg0||1!==n&&l.length===n&&!l.arg0)||(l=[l],a=[0],n=1),e)o=l;else for(;n--;)+(r=a[n])===r&&(o[r]=l[n])}return o}function ut(t,e){return(t=t[+e===e?"args":"props"])&&t[e]}function ft(t){return this.cvtArgs(t,1)}function gt(t,e,n,r,i,o,a,s){var l,p,d,c=this,u="array"===e;c.content=s,c.views=u?[]:{},c.data=r,c.tmpl=i,d=c._={key:0,useKey:u?0:1,id:""+q++,onRender:a,bnds:{}},c.linked=!!a,c.type=e||"top",e&&(c.cache={_ct:f._cchCt}),n&&"top"!==n.type||((c.ctx=t||{}).root=c.data),(c.parent=n)?(c.root=n.root||c,l=n.views,p=n._,c.isTop=p.scp,c.scope=(!t.tag||t.tag===n.ctx.tag)&&!c.isTop&&n.scope||c,p.useKey?(l[d.key="_"+p.useKey++]=c,c.index=W,c.getIndex=st):l.length===(d.key=c.index=o)?l.push(c):l.splice(o,0,c),c.ctx=t||n.ctx):e&&(c.root=c)}function ht(t,e){return j(t)?t.call(e):t}function vt(t,e,n){Object.defineProperty(t,e,{value:n,configurable:!0})}function mt(t,e){var n,r=g._wm||{},i={tmpls:[],links:{},bnds:[],_is:"template",render:wt};return e&&(i=at(i,e)),i.markup=t,i.htmlTag||(n=M.exec(t),i.htmlTag=n?n[1].toLowerCase():""),(n=r[i.htmlTag])&&n!==r.div&&(i.markup=i.markup.trim()),i}function _t(t,e){var n=t+"s";a[n]=function r(i,o,s){var l,p,d,c=u.onStore[t];if(i&&typeof i===L&&!i.nodeType&&!i.markup&&!i.getTgt&&!("viewModel"===t&&i.getters||i.extend)){for(p in i)r(p,i[p],o);return o||a}return i&&typeof i!==B&&(s=o,o=i,i=void 0),d=s?"viewModel"===t?s:s[n]=s[n]||{}:r,l=e.compile,void 0===o&&(o=l?i:d[i],i=void 0),null===o?i&&delete d[i]:(l&&((o=l.call(d,i,o,s,0)||{})._is=t),i&&(d[i]=o)),c&&c(i,o,s,l),o}}function xt(t){h[t]=h[t]||function(e){return arguments.length?(f[t]=e,h):f[t]}}function bt(t){function e(e,n){this.tgt=t.getTgt(e,n),n.map=this}return j(t)&&(t={getTgt:t}),t.baseMap&&(t=at(at({},t.baseMap),t)),t.map=function(t,n){return new e(t,n)},t}function wt(t,e,n,r,i,a){var s,l,p,d,c,f,h,v=r,m="";if(!0===e?(n=e,e=void 0):typeof e!==L&&(e=void 0),(p=this.tag)?(d=(v=v||this.view)._getTmpl(p.template||this.tmpl),arguments.length||(t=p.contentCtx&&j(p.contentCtx)?t=p.contentCtx(t):v)):d=this,d){if(!r&&t&&"view"===t._is&&(v=t),v&&t===v&&(t=v.data),c=!v,y=y||c,c&&((e=e||{}).root=t),!y||g.useViews||d.useViews||v&&v!==o)m=yt(d,t,e,n,v,i,a,p);else{if(v?(f=v.data,h=v.index,v.index=W):(f=(v=o).data,v.data=t,v.ctx=e),T(t)&&!n)for(s=0,l=t.length;sY-(L||0)){if(L=B.slice(L,Y+n.length).trim(),Q=o||c[v-1].bd,(H=Q[Q.length-1])&&H.prm){for(;H.sb&&H.sb.prm;)H=H.sb;!(W=H.sb={path:H.sb,bnd:H.bnd}).path&&H.path&&(H.bnd=!0)}else Q.push(W={path:Q.pop()});H&&H.sb===W&&(C[v]=C[v-1].slice(H._cpPthSt)+C[v],C[v-1]=C[v-1].slice(0,H._cpPthSt)),W._cpPthSt=y[v-1],W._cpKey=L,C[v]+=B.slice(k,K),k=K,W._cpfn=Z[L]=Z[L]||new Function("data,view,j","//"+L+"\nvar v;\nreturn ((v="+C[v]+("]"===D?")]":D)+")!=null?v:null);"),C[v-1]+=b[h]&&g.cache?'view.getCache("'+L.replace(N,"\\$&")+'"':C[v],W.prm=d.bd,W.bnd=W.bnd||W.path&&W.path.indexOf("^")>=0}C[v]=""}"["===V&&(V="[j._sq("),"["===j&&(j="[j._sq(")}return X=l?(l=!I)?n:O+'"':s?(s=!S)?n:O+'"':(j?(x[++h]=!0,m[h]=0,p&&(w[v++]=Y++,d=c[v]={bd:[]},C[v]="",y[v]=1),j):"")+(U?h?"":(f=B.slice(f,Y),(i?(i=o=!1,"\b"):"\b,")+f+(f=Y+n.length,p&&e.push(d.bd=[]),"\b")):F?(v&&kt(t),p&&e.pop(),i="_"+A,f=Y+n.length,p&&((p=d.bd=e[i]=[]).skp=!T),A+":"):A?A.split("^").join(".").replace(u.rPath,function(t,n,a,s,l,c,u,f){if(z="."===a,a&&(A=A.slice(n.length),/^\.?constructor$/.test(f||A)&&kt(t),z||(t=($?(r?"":"(ltOb.lt=ltOb.lt||")+"(ob=":"")+(s?'view.ctxPrm("'+s+'")':l?"view":"data")+($?")===undefined"+(r?"":")")+'?"":view._getOb(ob,"':"")+(f?(c?"."+c:s||l?"":"."+a)+(u||""):(f=s?"":l?c||"":a,"")),t=n+("view.data"===(t+=f?"."+f:"").slice(0,9)?t.slice(5):t)+($?(r?'"':'",ltOb')+(V?",1)":")"):"")),p)){if(Q="_linkTo"===i?o=e._jsvto=e._jsvto||[]:d.bd,H=z&&Q[Q.length-1]){if(H._cpfn){for(;H.sb;)H=H.sb;H.prm&&(H.bnd&&(A="^"+A.slice(1)),H.sb=A,H.bnd=H.bnd||"^"===A[0])}}else Q.push(A);V&&!z&&(w[v]=Y,y[v]=C[v].length)}return t})+(V||P):P||(D?"]"===D?")]":")":E?(b[h]||kt(t),","):a?"":(l=I,s=S,'"'))),l||s||D&&(b[h]=!1,h--),p&&(l||s||(D&&(x[h+1]&&(d=c[--v],x[h+1]=!1),_=m[h+1]),V&&(m[h+1]=C[v].length+(j?1:0),(A||D)&&(d=c[++v]={bd:[]},x[h+1]=!0))),C[v]=(C[v]||"")+B.slice(k,K),k=K+n.length,l||s||((G=j&&x[h+1])&&(C[v-1]+=j,y[v-1]++),"("===V&&z&&!W&&(C[v]=C[v-1].slice(_)+C[v],C[v-1]=C[v-1].slice(0,_))),C[v]+=G?X.slice(1):X),l||s||!V||(h++,A&&"("===V&&(b[h]=!0)),l||s||!J||(p&&(C[v]+=V),X+=V),X}),p&&(a=C[0]),!h&&a||kt(t)}function Rt(t,e,n){var r,i,o,a,s,l,p,d,u,h,v,m,_,x,b,w,y,C,k,j,T,N,R,F,M,$,V,E,O,I,S,D,q=0,J=g.useViews||e.useViews||e.tags||e.templates||e.helpers||e.converters,U="",L={},Q=t.length;for(typeof e===B?(y=n?'data-link="'+e.replace(A," ").slice(1,-1)+'"':e,e=0):(y=e.tmplName||"unnamed",e.allowCode&&(L.allowCode=!0),e.debug&&(L.debug=!0),h=e.bnds,w=e.tmpls),r=0;r":a+o):(j&&((C=mt(T,L)).tmplName=y+"/"+o,C.useViews=C.useViews||J,Rt(j,C),J=C.useViews,w.push(C)),F||(k=o,J=J||o&&(!c[o]||!c[o].flow),R=U,U=""),N=(N=t[r+1])&&"else"===N[0]),E=V?";\ntry{\nret+=":"\n+",_="",x="",M&&(v||O||a&&a!==K||I)){if(($=new Function("data,view,j","// "+y+" "+ ++q+" "+o+S+"{"+s+"};"+D))._er=V,$._tag=o,$._bd=!!v,$._lr=I,n)return $;Tt($,v),u=!0,_=(b='c("'+a+'",view,')+q+",",x=")"}if(U+=M?(n?(V?"try{\n":"")+"return ":E)+(u?(u=void 0,J=d=!0,b+($?(h[q-1]=$,q):"{"+s+"}")+")"):">"===o?(p=!0,"h("+m[0]+")"):"((v="+m[0]+")!=null?v:"+(n?"null)":'"")')):(l=!0,"\n{view:view,content:false,tmpl:"+(j?w.length:"false")+","+s+"},"),k&&!N){if(U="["+U.slice(0,-1)+"]",b='t("'+k+'",view,this,',n||v){if((U=new Function("data,view,j"," // "+y+" "+q+" "+k+S+U+D))._er=V,U._tag=k,v&&Tt(h[q-1]=U,v),U._lr=I,n)return U;_=b+q+",undefined,",x=")"}U=R+E+b+(v&&q||U)+")",v=0,k=0}V&&!N&&(J=!0,U+=";\n}catch(e){ret"+(n?"urn ":"+=")+_+"j._err(e,view,"+V+")"+x+";}"+(n?"":"\nret=ret"))}U="// "+y+(L.debug?"\ndebugger;":"")+"\nvar v"+(l?",t=j._tag":"")+(d?",c=j._cnvt":"")+(p?",h=j._html":"")+(n?(i[8]?", ob":"")+";\n":',ret=""')+U+(n?"\n":";\nreturn ret;");try{U=new Function("data,view,j",U)}catch(t){kt("Compiled template code:\n\n"+U+'\n: "'+(t.message||t)+'"')}return e&&(e.fn=U,e.useViews=!!J),U}function Ft(t,e){return t&&t!==e?e?at(at({},e),t):t:e&&at({},e)}function Mt(t,n){var r,i,o,a=n.tag,s=n.props,l=n.params.props,p=s.filter,d=s.sort,c=!0===d,u=parseInt(s.step),f=s.reverse?-1:1;if(!T(t))return t;if(c||d&&typeof d===B?((r=t.map(function(t,e){return{i:e,v:typeof(t=c?t:pt(t,d))===B?t.toLowerCase():t}})).sort(function(t,e){return t.v>e.v?f:t.vt.length?t.length:+o,t=t.slice(i,o)),u>1){for(i=0,o=t.length,r=[];i=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(?:(\()\s*)?\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,View:gt,Err:ot,tmplFn:jt,parse:Nt,extend:at,extendCtx:Ft,syntaxErr:kt,onStore:{template:function(t,e){null===e?delete z[t]:t&&(z[t]=e)}},addSetting:xt,settings:{allowCode:!1},advSet:it,_thp:nt,_gm:et,_tg:function(){},_cnvt:function(t,e,n,r){var i,o,a,s,l,p="number"==typeof n&&e.tmpl.bnds[n-1];void 0===r&&p&&p._lr&&(r="");void 0!==r?n=r={props:{},args:[r]}:p&&(n=p(e.data,e,u));if(p=p._bd&&p,t||p){if(i=(o=e._lc)&&o.tag,n.view=e,!i){if(i=at(new u._tg,{_:{bnd:p,unlinked:!0,lt:n.lt},inline:!o,tagName:":",convert:t,onArrayChange:!0,flow:!0,tagCtx:n,tagCtxs:[n],_is:"tag"}),(s=n.args.length)>1)for(l=i.bindTo=[];s--;)l.unshift(s);o&&(o.tag=i,i.linkCtx=o),n.ctx=Ft(n.ctx,(o?o.view:e).ctx),nt(i,n)}i._er=r&&a,i.ctx=n.ctx||i.ctx||{},n.ctx=void 0,a=i.cvtArgs()[0],i._er=r&&a}else a=n.args[0];return null!=(a=p&&e._.onRender?e._.onRender(a,e,i):a)?a:""},_tag:function(t,e,n,r,i,a){function s(t){var e=l[t];if(void 0!==e)for(e=T(e)?e:[e],v=e.length;v--;)O=e[v],isNaN(parseInt(O))||(e[v]=parseInt(O));return e||[0]}var l,d,c,f,g,h,v,m,_,x,b,w,y,C,k,j,A,P,N,R,F,M,$,V,O,I,S,D,q,J=0,U="",B=(e=e||o)._lc||!1,L=e.ctx,Q=n||e.tmpl,H="number"==typeof r&&e.tmpl.bnds[r-1];"tag"===t._is?(t=(l=t).tagName,r=l.tagCtxs,l.template):(d=e.getRsc("tags",t)||Ct("Unknown tag: {{"+t+"}} ")).template;void 0===a&&H&&(H._lr=d.lateRender&&!1!==H._lr||H._lr)&&(a="");void 0!==a?(U+=a,r=a=[{props:{},args:[],params:{props:{}}}]):H&&(r=H(e.data,e,u));for(h=r.length;J)|(\\*))\\s*((?:[^\\"+_+"]|\\"+_+"(?!\\"+x+"))*?)",u.rTag="(?:"+i+")",i=new RegExp("(?:"+e+i+"(\\/)?|\\"+v+"(\\"+b+")?\\"+m+"(?:(?:\\/(\\w+))\\s*|!--[\\s\\S]*?--))"+n,"g"),u.rTmpl=new RegExp("^\\s|\\s$|<.*>|([^\\\\]|^)[{}]|"+e+".*"+n),h},advanced:function(t){return t?(at(g,t),u.advSet(),h):g}},map:bt},(ot.prototype=new Error).constructor=ot,st.depends=function(){return[this.get("item"),"index"]},lt.depends="index",gt.prototype={get:function(t,e){e||!0===t||(e=t,t=void 0);var n,r,i,o,a=this,s="root"===e;if(t){if(!(o=e&&a.type===e&&a))if(n=a.views,a._.useKey){for(r in n)if(o=e?n[r].get(t,e):n[r])break}else for(r=0,i=n.length;!o&&rthis.cache._ct&&(this.cache={_ct:f._cchCt}),void 0!==this.cache[t]?this.cache[t]:this.cache[t]=Z[t](this.data,this,u)},_is:"view"},u=a.sub,h=a.settings,!(G||e&&e.render)){for(r in Y)_t(r,Y[r]);if(p=a.converters,d=a.helpers,c=a.tags,u._tg.prototype={baseApply:function(t){return this.base.apply(this,t)},cvtArgs:ct,bndArgs:ft,ctxPrm:dt},o=u.topView=new gt,e){if(e.fn.render=$t,s=e.expando,e.observable){if(C!==(C=e.views.jsviews))throw"jquery.observable.js requires jsrender.js "+C;at(u,e.views.sub),a.map=e.views.map}}else e={jsrender:C},n&&(t.jsrender=e),e.renderFile=e.__express=e.compile=function(){throw"Node.js: use npm jsrender, or jsrender-node.js"},u._jq=function(t){t!==e&&(at(t,e),(e=t).fn.render=$t,delete e.jsrender,s=e.expando)};for(w in(f=u.settings).allowCode=!1,e.render=z,e.views=a,e.templates=l=a.templates,f)xt(w);(h.debugMode=function(t){return void 0===t?f.debugMode:(f._clFns&&f._clFns(),f.debugMode=t,f.onError=typeof t===B?function(){return t}:j(t)?t:void 0,h)})(!1),g=f.advanced={cache:!0,useViews:!1,_jsv:!1},c({if:{render:function(t){var e=this,n=e.tagCtx;return e.rendering.done||!t&&(n.args.length||!n.index)?"":(e.rendering.done=!0,void(e.selected=n.index))},contentCtx:!0,flow:!0},for:{sortDataMap:bt(Mt),init:function(t,e){this.setDataMap(this.tagCtxs)},render:function(t){var e,n,r,i,o,a=this,s=a.tagCtx,l=!1===s.argDefault,p=s.props,d=l||s.args.length,c="",u=0;if(!a.rendering.done){if(e=d?t:s.view.data,l)for(l=p.reverse?"unshift":"push",i=+p.end,o=+p.step||1,e=[],r=+p.start||0;(i-r)*o>0;r+=o)e[l](r);void 0!==e&&(n=T(e),c+=s.render(e,!d||p.noIteration),u+=n?e.length:1),(a.rendering.done=u)&&(a.selected=s.index)}return c},setDataMap:function(t){for(var e,n,r,i=t.length;i--;)n=(e=t[i]).props,r=e.params.props,e.argDefault=void 0===n.end||e.args.length>0,n.dataMap=!1!==e.argDefault&&T(e.args[0])&&(r.sort||r.start||r.end||r.step||r.filter||r.reverse||n.sort||n.start||n.end||n.step||n.filter||n.reverse)&&this.sortDataMap},flow:!0},props:{baseTag:"for",dataMap:bt(function(t,n){var r,i,o=n.map,a=o&&o.propsArr;if(!a){if(a=[],typeof t===L||j(t))for(r in t)i=t[r],r===s||!t.hasOwnProperty(r)||n.props.noFunctions&&e.isFunction(i)||a.push({key:r,prop:i});o&&(o.propsArr=o.options&&a)}return Mt(a,n)}),init:it,flow:!0},include:{flow:!0},"*":{render:rt,flow:!0},":*":{render:rt,flow:!0},dbg:d.dbg=p.dbg=function(t){try{throw console.log("JsRender dbg breakpoint: "+t),"dbg breakpoint"}catch(t){}return this.base?this.baseApply(arguments):t}}),p({html:Ot,attr:Ot,encode:function(t){return typeof t===B?t.replace(I,Vt):t},unencode:function(t){return typeof t===B?t.replace(S,Et):t},url:function(t){return null!=t?encodeURI(""+t):null===t?t:""}})}return f=u.settings,h.delimiters("{{","}}","^"),X&&G.views.sub._jq(e),e||G},window); \ No newline at end of file diff --git a/test/perf-compare.html b/test/perf-compare.html index 5601344..2c4a4d9 100644 --- a/test/perf-compare.html +++ b/test/perf-compare.html @@ -3,7 +3,7 @@ Benchmark JsRender - + diff --git a/test/test.min.map.html b/test/test.min.map.html index ec81dc3..ee8b4df 100644 --- a/test/test.min.map.html +++ b/test/test.min.map.html @@ -1,7 +1,7 @@ - + diff --git a/test/unit-tests-amd-scriptloader.html b/test/unit-tests-amd-scriptloader.html index f2009df..59ae20d 100644 --- a/test/unit-tests-amd-scriptloader.html +++ b/test/unit-tests-amd-scriptloader.html @@ -3,7 +3,7 @@ - + diff --git a/test/unit-tests-browserify.html b/test/unit-tests-browserify.html index 6c55c41..81effe5 100644 --- a/test/unit-tests-browserify.html +++ b/test/unit-tests-browserify.html @@ -2,7 +2,7 @@ - + diff --git a/test/unit-tests-jsrender-no-jquery.html b/test/unit-tests-jsrender-no-jquery.html index d37ef57..7bef443 100644 --- a/test/unit-tests-jsrender-no-jquery.html +++ b/test/unit-tests-jsrender-no-jquery.html @@ -5,7 +5,7 @@ - + diff --git a/test/unit-tests-jsrender-with-jquery.html b/test/unit-tests-jsrender-with-jquery.html index a7a9dc6..b77ac17 100644 --- a/test/unit-tests-jsrender-with-jquery.html +++ b/test/unit-tests-jsrender-with-jquery.html @@ -3,7 +3,7 @@ - + diff --git a/test/unit-tests/requirejs-config.js b/test/unit-tests/requirejs-config.js index bad903f..3833965 100644 --- a/test/unit-tests/requirejs-config.js +++ b/test/unit-tests/requirejs-config.js @@ -3,7 +3,7 @@ requirejs.config({ "baseUrl": "//www.jsviews.com/download", // Or point to correct local path on your system: "baseUrl": "/download", // "baseUrl": "../../download", // Or point to correct local path on your system: "baseUrl": "/download", "paths": { - "jquery": "//code.jquery.com/jquery-3.7.1", + "jquery": "//code.jquery.com/jquery-4.0.0", "jsrender": "./jsrender", "jquery.observable": "./jquery.observable", "jquery.views": "./jquery.views", diff --git a/test/unit-tests/tests-node.js b/test/unit-tests/tests-node.js index 96416d2..6943c7c 100644 --- a/test/unit-tests/tests-node.js +++ b/test/unit-tests/tests-node.js @@ -43,7 +43,7 @@ QUnit.test("jsrender.compile", function(assert) { QUnit.test("jsrender.tags.clientTemplate", function(assert) { jsrender.views.settings.delimiters("<%", "%>"); var tmpl = jsrender.compile( - '\n' + '\n' + '\n' + '<%clientTemplate "./test/templates/outer.html"/%>\n' + '<%clientTemplate "./test/templates/inner.html"/%>\n' @@ -52,7 +52,7 @@ QUnit.test("jsrender.tags.clientTemplate", function(assert) { + ''); var html = tmpl({name: "Jo"}); assert.equal(html, - '\n' + '\n' + '\n' + '\n' + '\n' diff --git a/typescript/jsrender/test/tests.html b/typescript/jsrender/test/tests.html index 685c284..313df3f 100644 --- a/typescript/jsrender/test/tests.html +++ b/typescript/jsrender/test/tests.html @@ -4,7 +4,7 @@ body { font-family: 'Helvetica Neue', HelveticaNeue, Helvetica, Arial, sans-serif; font-size: 15px;} code { font-size: 12px; } - +