Comparing version 5.1.5 to 5.2.0
{ | ||
"name": "remixml", | ||
"version": "5.1.5", | ||
"version": "5.2.0", | ||
"description": "XML/HTML-like macro language/template compiler engine", | ||
@@ -5,0 +5,0 @@ "main": "remixml.min.js", |
@@ -264,3 +264,4 @@ <h1>Remixml</h1> | ||
- `tag`<br /> | ||
Delete the named tag. | ||
Delete the named tag from the current scope, restores the | ||
definition of this tag from the parentscope (if any). | ||
- `<if expr="">...</if>`<br /> | ||
@@ -421,4 +422,4 @@ Attributes: | ||
These are extra helperfunctions which will be available | ||
in the inline Remixml Javascript scripts. | ||
These are extra helperfunctions which are available | ||
in the context of inline Remixml Javascript scripts. | ||
@@ -425,0 +426,0 @@ - `sizeof(x)`<br /> |
@@ -801,3 +801,4 @@ /** @license | ||
{ startcfn(); | ||
obj += "delete $._._tag[" + ts + "];"; | ||
ts = "._._tag[" + ts + "]"; | ||
obj += "$" + ts + "=$._._&&$._" + ts + ";"; | ||
} else if (ts = getparm("var") || getparm("variable")) | ||
@@ -804,0 +805,0 @@ { let /** !Array|string */ av |
@@ -809,3 +809,4 @@ /** @license | ||
{ startcfn(); | ||
obj += "delete $._._tag[" + ts + "];"; | ||
ts = "._._tag[" + ts + "]"; | ||
obj += "$" + ts + "=$._._&&$._" + ts + ";"; | ||
} else if (ts = getparm("var") || getparm("variable")) | ||
@@ -812,0 +813,0 @@ { let /** !Array|string */ av |
@@ -17,28 +17,28 @@ (function(){"use strict"; | ||
function Sa(){Aa();var m=za.Symbol.iterator;m||(m=za.Symbol.iterator=za.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[m]&&oa(Array.prototype,m,{configurable:!0,writable:!0,value:function(){return Ta(ca(this))}});Sa=function(){}}function Ta(m){Sa();m={next:m};m[za.Symbol.iterator]=function(){return this};return m}function Ua(m){var t="undefined"!=typeof Symbol&&Symbol.iterator&&m[Symbol.iterator];return t?t.call(m):{next:ca(m)}} | ||
(function(){function m(a){return"string"===typeof a}function t(a){return Va[a]}function z(a){return Wa[a]}function Xa(a,b,c,f,h){b._._tag[c]=function(k,n,p){p=C(n,p,(h?h.split(Da):[]).reduce(function(d,x){d[x]=1;return d},{}),f);return a(p)}}function ja(a,b){var c=a.match(Ya);return c?(a=T(c[1]),b?[a]:"["+a+"]"):a}function Ea(a,b){return qa(ra(a,b))}function Fa(a){return a.replace(Za," ")}function Ga(a,b,c){r.defineProperty(a,b,{get:c,configurable:!0})}function Ha(a){return a.match($a)?"."+a:'["'+ | ||
a+'"]'}function Ia(a){var b="",c="",f;for(Ja.lastIndex=0;f=da(Ja,a);)b=f[1]?b+(c+"(function(){"+Ka(f)+'return x}catch(x){}return ""})()'):b+(c+JSON.stringify(f[0])),c="+";return b}function La(a,b,c){a="try{let x=Z($,"+ja(a);b&&(a+=","+b);c&&(b||(a+=",0"),a+=","+c);return a+");"}function Ka(a){var b=a[2],c=a[3];return La(JSON.stringify(a[1]),m(b)&&JSON.stringify(b),c&&JSON.stringify(c))}function sa(a){return"(function(){try{return("+a+')}catch(x){D(x)}return ""})()'}function Ma(a){return"(_=$._,"+ | ||
(a?sa(a):'""')+")"}function ea(a){a&&(0>a.indexOf("(")?(0<=(a=JSON.parse(a)).indexOf("_")&&(a="_=$._,"+a),a=sa(a)):(a='"'===a.slice(-1)?'"'===a[0]?a.slice(1,-1):'"+'+a.slice(0,-1):('"'===a[0]?a.slice(1):'"+'+a)+'+"',0<=a.indexOf("{")&&(a="("+a+")"),a=sa('eval("'+a+'")'),a=0>a.indexOf("_")?a:"(_=$._,"+a+")"));return a}function ra(a,b){function c(J,W){var ta=D,H=a.slice(0,u),ka=(H.match(ab)||"").length+1;H=H.match(bb)[0].length+1;ta(W+" at "+(ka+":"+H),a.substr(u-64,128+(J?J.length:0)))}function f(){2=== | ||
(q[2]&6)&&(q[2]|=4,d+="H._c=function(H,$){")}function h(J,W){x||(d+='H.push(W=L("'+J[0][0]+'"));W[0]='+JSON.stringify(J[W])+";")}var k=b&4,n=k?"async ":"",p=k?"await ":"",d="("+n+'function($){"use strict";var I,W,_,H=N($);',x=k=0,ua="w,v="+n+"function(){"+p+"w();",Na=")};w=("+n+"function(W){",Oa="});"+p+"v()}",cb=p+"X(J,H,$)";p="do{if((k=Y(H))===m)break;H="+p+"E(m=k,$"+(b?","+b:"")+")}while(--n);J.push.apply(J,H)}";for(var y,q=[0,{},4,""],ba=[q],u=0,e={};;e={a:e.a,b:e.b}){var v,g="";if(u>=a.length){var w= | ||
q[0];if(w){c(w,"Missing </"+w+">");a+="</"+w+">";continue}break}a:switch(a[u]){case "<":var aa=function(J){return function(W,ta){var H=J.a("mkmapping");if(H){var ka=H.slice(1,-1).split(db);for(d+=W;H=ka.pop();)d+=ta+Ha(H)+"=k["+ka.length+"];"}else if(""===H)return 1}}(e);e.a=function(J){return function(W){return(W=J.b[W])&&Ia(W)}}(e);va.lastIndex=++u;if(v=da(va,a)){u=va.lastIndex;x||(v[1]?h(v,1):v[2]?(v[0]="<",h(v,2)):(wa.lastIndex=0,da(wa,g=v[3])?"n"===g[0]&&(d+="H.push("+JSON.stringify(g.slice(wa.lastIndex))+ | ||
(function(){function m(a){return"string"===typeof a}function t(a){return Va[a]}function z(a){return Wa[a]}function Xa(a,b,c,g,h){b._._tag[c]=function(k,n,p){p=C(n,p,(h?h.split(Da):[]).reduce(function(d,x){d[x]=1;return d},{}),g);return a(p)}}function ja(a,b){var c=a.match(Ya);return c?(a=T(c[1]),b?[a]:"["+a+"]"):a}function Ea(a,b){return qa(ra(a,b))}function Fa(a){return a.replace(Za," ")}function Ga(a,b,c){r.defineProperty(a,b,{get:c,configurable:!0})}function Ha(a){return a.match($a)?"."+a:'["'+ | ||
a+'"]'}function Ia(a){var b="",c="",g;for(Ja.lastIndex=0;g=da(Ja,a);)b=g[1]?b+(c+"(function(){"+Ka(g)+'return x}catch(x){}return ""})()'):b+(c+JSON.stringify(g[0])),c="+";return b}function La(a,b,c){a="try{let x=Z($,"+ja(a);b&&(a+=","+b);c&&(b||(a+=",0"),a+=","+c);return a+");"}function Ka(a){var b=a[2],c=a[3];return La(JSON.stringify(a[1]),m(b)&&JSON.stringify(b),c&&JSON.stringify(c))}function sa(a){return"(function(){try{return("+a+')}catch(x){D(x)}return ""})()'}function Ma(a){return"(_=$._,"+ | ||
(a?sa(a):'""')+")"}function ea(a){a&&(0>a.indexOf("(")?(0<=(a=JSON.parse(a)).indexOf("_")&&(a="_=$._,"+a),a=sa(a)):(a='"'===a.slice(-1)?'"'===a[0]?a.slice(1,-1):'"+'+a.slice(0,-1):('"'===a[0]?a.slice(1):'"+'+a)+'+"',0<=a.indexOf("{")&&(a="("+a+")"),a=sa('eval("'+a+'")'),a=0>a.indexOf("_")?a:"(_=$._,"+a+")"));return a}function ra(a,b){function c(J,W){var ta=D,H=a.slice(0,u),ka=(H.match(ab)||"").length+1;H=H.match(bb)[0].length+1;ta(W+" at "+(ka+":"+H),a.substr(u-64,128+(J?J.length:0)))}function g(){2=== | ||
(q[2]&6)&&(q[2]|=4,d+="H._c=function(H,$){")}function h(J,W){x||(d+='H.push(W=L("'+J[0][0]+'"));W[0]='+JSON.stringify(J[W])+";")}var k=b&4,n=k?"async ":"",p=k?"await ":"",d="("+n+'function($){"use strict";var I,W,_,H=N($);',x=k=0,ua="w,v="+n+"function(){"+p+"w();",Na=")};w=("+n+"function(W){",Oa="});"+p+"v()}",cb=p+"X(J,H,$)";p="do{if((k=Y(H))===m)break;H="+p+"E(m=k,$"+(b?","+b:"")+")}while(--n);J.push.apply(J,H)}";for(var y,q=[0,{},4,""],ba=[q],u=0,e={};;e={a:e.a,b:e.b}){var v,f="";if(u>=a.length){var w= | ||
q[0];if(w){c(w,"Missing </"+w+">");a+="</"+w+">";continue}break}a:switch(a[u]){case "<":var aa=function(J){return function(W,ta){var H=J.a("mkmapping");if(H){var ka=H.slice(1,-1).split(db);for(d+=W;H=ka.pop();)d+=ta+Ha(H)+"=k["+ka.length+"];"}else if(""===H)return 1}}(e);e.a=function(J){return function(W){return(W=J.b[W])&&Ia(W)}}(e);va.lastIndex=++u;if(v=da(va,a)){u=va.lastIndex;x||(v[1]?h(v,1):v[2]?(v[0]="<",h(v,2)):(wa.lastIndex=0,da(wa,f=v[3])?"n"===f[0]&&(d+="H.push("+JSON.stringify(f.slice(wa.lastIndex))+ | ||
");"):h(v,3)));break}fa.lastIndex=u;e.b={};var I=fa.exec(a)[1];if("/"===I)e.b[I]=1,I=fa.exec(a)[1];else if(!I){u=fa.lastIndex;break a}for(e.b[""]=I;v=fa.exec(a);){if(!v[1]){u=fa.lastIndex;break}e.b[v[1]]=v[2]?v[2].slice(1,-1):v[1]}var la=e.b["/"];delete e.b["/"];w=e.b[""];if(1!==la){do{ba.push(q=[w,e.b,0,d]);d="";e.b["-"]&&(delete e.b["-"],q[2]=1);switch(w){case "noparse":if(!k++)continue;break;case "comment":k||x++}if(!x){delete e.b[""];d+="W=H;";if(!k)switch(w){case "set":d+="{let H=L(),";var l= | ||
e.a("var")||e.a("variable");y=0;if(l){var ma=e.a("expr");d+=ua;q[2]|=16;y=d.length;if(g=e.a("selector"))d+="B($,w=L(),H,"+g+");H=w;";else{void 0!==e.b.json&&(d+="H=JSON.parse(Y(H));");if(g=e.a("split"))d+="H=Y(H).split("+(ea(ma)||g)+");",ma=void 0;void 0!==ma&&(d+="H="+(ea(ma)||Ma("eval(Y(H))"))+";");if(g=e.a("join"))d+="H=H.join("+g+");";aa("let k=H[0];H={};","H")}d.length!==y&&(y=0);l=ja(l,1);Array.isArray(l)?d+=l[0]+"=A("+(void 0!==e.b.clone?(y=0,"O(H,"+l[0]+")"):"H"):(y=0,d+="A(H,$,"+l);d+=Na}else if(g= | ||
e.a("tag")){f();d+="v=0;Q("+g+",$,"+n+"function(H,a,$,W){let o=$;$=C(a,$,{";(g=e.a("args"))&&(g=g.replace(eb,""))&&(d+='"'+g.replace(Da,'":1,"')+'":1');d+="}";if(g=e.a("scope"))d+=","+g;d+=");"}continue;case "insert":if(l=e.a("var")||e.a("variable")){d+=La(l,e.a("quote"),e.a("format"));if(g=e.a("join"))d+="x=x.join?x.join("+g+"):x;";l=e.a("limit");if((g=e.a("offset"))||void 0!==l)d+="x=F(x,"+g+(void 0!==l?","+l:"")+");";d+="I=K($,H,x)}catch(x){I=0}"}else if(void 0!==(l=e.a("expr")))d+="{let H=L(),"+ | ||
e.a("var")||e.a("variable");y=0;if(l){var ma=e.a("expr");d+=ua;q[2]|=16;y=d.length;if(f=e.a("selector"))d+="B($,w=L(),H,"+f+");H=w;";else{void 0!==e.b.json&&(d+="H=JSON.parse(Y(H));");if(f=e.a("split"))d+="H=Y(H).split("+(ea(ma)||f)+");",ma=void 0;void 0!==ma&&(d+="H="+(ea(ma)||Ma("eval(Y(H))"))+";");if(f=e.a("join"))d+="H=H.join("+f+");";aa("let k=H[0];H={};","H")}d.length!==y&&(y=0);l=ja(l,1);Array.isArray(l)?d+=l[0]+"=A("+(void 0!==e.b.clone?(y=0,"O(H,"+l[0]+")"):"H"):(y=0,d+="A(H,$,"+l);d+=Na}else if(f= | ||
e.a("tag")){g();d+="v=0;Q("+f+",$,"+n+"function(H,a,$,W){let o=$;$=C(a,$,{";(f=e.a("args"))&&(f=f.replace(eb,""))&&(d+='"'+f.replace(Da,'":1,"')+'":1');d+="}";if(f=e.a("scope"))d+=","+f;d+=");"}continue;case "insert":if(l=e.a("var")||e.a("variable")){d+=La(l,e.a("quote"),e.a("format"));if(f=e.a("join"))d+="x=x.join?x.join("+f+"):x;";l=e.a("limit");if((f=e.a("offset"))||void 0!==l)d+="x=F(x,"+f+(void 0!==l?","+l:"")+");";d+="I=K($,H,x)}catch(x){I=0}"}else if(void 0!==(l=e.a("expr")))d+="{let H=L(),"+ | ||
ua+("H="+(ea(l)||Ma("eval(Y(H))"))+";W.push(A(H)")+Na,q[2]|=8;else switch(e.a("variables")){case "dump":d+="log((W="+e.a("scope")+")?$[W]:$);"}continue;case "replace":l=e.a("flags");void 0===l&&(l="g");d+="{let H=L(),J=W,v=P("+(e.a("regexp")||e.a("from").replace(fb,"\\$1"))+","+JSON.stringify(l)+","+(ea(e.a("expr"))||e.a("to"))+");";continue;case "trim":d+="{let H=L(),J=W;";continue;case "maketag":d+="{let H=L("+e.a("name")+"),J=W;";continue;case "attrib":d+="{let H=L(),v="+e.a("name")+",J=W;";continue; | ||
case "for":d+="{I=0;let g,i,k,m,J=W,n=0;";d=(l=e.a("in"))?d+("g=G($,"+ja(l)+((g=e.a("orderby"))?",(m=$._,function(_){let _index=_[0];$._=_=_[1];return["+ea(g)+"]}));$._=m":")")+";while(!(m=g.next()).done){k=(m=m.value)[1];i=m[0];W=S({_value:k,"):d+("for(i=+"+(e.a("from")||0)+",m="+((l=e.a("step"))?"+("+l+"||1)":1)+",k=+"+(e.a("to")||0)+";m<0?i>=k:i<=k;i+=m){W=S({");d+="_recno:++n,_index:i});let o=$;$=C(W,$,{}";if(g=e.a("scope"))d+=","+g;d+=");";1===aa("k=(m=$._)._value;","m")&&(d+="M($._,$._._value);"); | ||
continue;case "eval":d+="{let H=L(),n="+(void 0===(g=e.a("recurse"))?1:0<g?+g:0)+",J=W,k,m=0;";continue;case "unset":if(g=e.a("tag"))f(),d+="delete $._._tag["+g+"];";else if(g=e.a("var")||e.a("variable"))l=ja(g,1),d=Array.isArray(l)?d+("delete "+l[0]+";"):d+('eval("delete "+'+T(l)+");");continue;case "delimiter":d+="if($._._recno>1){";continue;case "elif":g="(!I&&";case "if":d+="if"+g+"(I="+(ea(e.a("expr"))||0)+")"+(g?")":"")+"{";continue;case "then":d+="if(I){";continue;case "else":d+="if(!I){"; | ||
continue}d+="{let J=W,H=S({";(l=e.b["::"])&&(e.b["::"]=l.slice(0,-1)+":;");l="";for(I in e.b)if(g=e.a(I))d+=l+(gb.test(I)?'"'+I+'"':I)+":"+g,l=",";d+='},"'+w+'")'}if(!la&&(l="script"===w?hb:"style"===w?ib:0)){l.lastIndex=u;l.exec(a);aa=l.lastIndex;d+=";";!x&&(g=a.slice(u,aa-3-w.length))&&(d+="H[0]="+JSON.stringify(g)+";");u=aa;la=1;break}x||(d+=";",q[2]|=2)}while(0)}if(la)b:for(;;){q=ba.pop();g=q[0];c:do{switch(g){case "noparse":if(!--k)break c;break;case "comment":if(!k){x--;break c}break;case 0:break c}if(!x)if(k)d+= | ||
"J.push(H)}";else{d:do switch(g){case "set":if("{"!==d.slice(-1)&&y){aa=d.slice(y).match(jb);d=d.slice(0,y-11-ua.length)+aa[1]+aa[2]+";";break d}d+=q[2]&16?Oa:"})}";break;case "insert":q[2]&8&&(d+=Oa);break;case "replace":d+="J.push.apply(J,R(H,v))}";break;case "trim":d+="J.push.apply(J,U(R(H)))}";break;case "maketag":d+="J.push(H)}";break;case "attrib":d+="V(H,v,J)}";case "unset":break d;case "for":d+="$=o;I=1}}";break;case "if":case "then":case "elif":case "else":d+="I=1}";break d;case "eval":d+= | ||
p;break;case "nooutput":d+="J=[];";default:q[2]&4&&(d+="};");case "script":case "style":d+=cb;case "delimiter":d+="}"}while(0);y=0}}while(0);if(w!==g)for(c(w,(g?"Expected </"+g+"> got </":"Missing <")+w+">"),(g=ba.length)||ba.push(q);g;)if(ba[--g][0]===w)continue b;d=q[3]+d;q=ba[ba.length-1];break}break;case "&":xa.lastIndex=++u;if(!k&&(v=da(xa,a))){u=xa.lastIndex;x||(d+=Ka(v)+"I=K($,H,x)}catch(x){I=0}",y=0);break}g="&";default:ha.lastIndex=u,da(ha,a)||console.error("**"+a+"**"),ha.lastIndex=u,g+= | ||
da(ha,a)[0],u=ha.lastIndex,x||(k||(b&3?b&1&&(g=Fa(g)):g=g.replace(kb,"$1$2$3")),!g||q[2]&1&&"0}"!==d.slice(-2)&&g.match(lb)||(d+="H.push("+JSON.stringify(g)+");"))}}return d+="return H})"}function qa(a){try{var b=eval(a)}catch(c){D(c,a),mb(a),b=function(){return""}}return b}function ia(a){return RegExp(a,Pa?"g":"y")}function da(a,b){if(Pa){var c=a.lastIndex;return(a=a.exec(b))&&c==a.index&&a}return a.exec(b)}var nb=("object"==typeof document?document:null)&&window,r=Object,Pa=0!=/./.sticky,Va={"+":"%2B", | ||
" ":"+","\t":"%09","\n":"%0A","\r":"%0D","?":"%3F","&":"%26","#":"%23","<":"%3C"},Wa={"&":"&","<":"<"},Da=/\s*,\s*/g,db=/\s*,\s*/,Ja=ia("(?:[^&]+|(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&]*))+|&([\\w$]+(?:[.[][\\w$]+]?)*\\.[\\w$]+)(?::([\\w$]*))?(?:%([^;]*))?;"),xa=ia("([\\w$]+\\.[\\w$]+(?:[.[][\\w$]+]?)*)(?::([\\w$]*))?(?:%([^;]*))?;"),va=ia("!(?:--([\x00-\u00ff]*?)(?:--|$)|([^-][\x00-\u00ff]*?))(?:>|$)|\\?([\x00-\u00ff]*?)(?:\\?>|$)"),wa=ia("(?:noparse|comment)\\s"), | ||
ha=ia("[^&<]+(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&<]*)*"),fa=/\s*(?:([-\w:]+|\/)\s*(?:=\s*("[^"]*"|'[^']*'))?|>)/g,gb=/[^\w]/,hb=/<\/script>/g,ib=/<\/style>/g,Ya=/^"([^(+]+)"$/,$a=/^[A-Za-z_][\w]*$/,ab=/\n/g,bb=/[^\n]*$/,jb=/([^=]+=).+(".*")/,lb=/^\s+$/,Za=/\s\s+/g,ob=/</g,pb=/[+ \t\n\r?&#<]/g,qb=/[&<]/g,eb=/[^-:\w,]+/g,fb=/([\\^$*+?.|()[{])/g,rb=/"/g,sb=/[.[\]]+/,kb=/(\n)\s+|[ \f\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+(?:(\n)\s*|([ \f\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]))/g, | ||
Qa={},ya,mb=console.debug,Ra=console.error;M=function(a,b){try{r.assign(a,b)}catch(c){}};D=function(a,b){Ra("Remixml expression: "+(b?JSON.stringify(b):"")+"\n",a)};E=function(a,b,c){return Ea(a,c)(b)};P=function(a,b,c){return function(f){return f.replace(RegExp(a,b),c)}};U=function(a){var b;m(b=a[0])&&" "===b[0]&&!(a[0]=b.substr(1))&&a.splice(0,1);var c=a.length-1;m(b=a[c])&&" "===b.slice(-1)&&!(a[c]=b.slice(0,-1))&&a.splice(c,1);return a};F=function(a,b,c){b=+(b||0);c=+c;return 0>c?a.slice(b,c): | ||
0<c?a.slice(b,b+c):0==c?a.slice(b):""};R=function(a,b){for(var c,f=a.length,h=b||Fa;f--;){switch((c=a[f])[""]){case "!":case "<":case "?":if(!b)break;default:R(c,b);continue;case void 0:if(a[f]=h(c))continue}a.splice(f,1)}return a};S=function(a,b){b=L(b);r.assign(b,a);delete b["::"];(a=a["::"])&&r.assign(b,a);return b};L=function(a){var b=[];b[""]=a||1;return b};N=function(a){var b=a._;b||(a._=b={});b._tag||(b._tag={});!a["var"]&&a.__&&(a["var"]=a.__);return L()};C=function(a,b,c,f){if(1!==a[""])if(Ga(a, | ||
"_contents",function(){var k=a._c;k?k(a.slice(),b):a[""]=1;return a}),c)Ga(a,"_restargs",function(){var k,n={};for(k in this)switch(k[0]){default:0<=k||c[k]||(n[k]=this[k]);case "_":case void 0:}return n});else return a;var h;(h=r.assign({},b))._=r.assign(a,{_:b._,_tag:r.assign({},b._._tag)});f&&(h[f]=a);return h};V=function(a,b,c){void 0===c[b]&&(c[b]=1!==a.length||a[0][""]?a.length?a:"":a[0])};X=function(a,b,c){var f=c._._tag[b[""]];if(f)return f(a,b,c);if(f=b._c)delete b._c,f(b,c);a.push(b)};Q= | ||
function(a,b,c){b._._tag[a]=c};G=function(a,b,c){if((b=(b=Array.isArray(b)?b[0]:VE(a,b))||0)&&0<=b.size)a=b.entries();else if(a=r.entries(b),0<=b.length&&a.splice(b.length),c)try{a=a.sort(function(f,h){var k,n;f=c(f);h=c(h);var p=0;for(k=f.length;p<k;p++){var d=0;Array.isArray(f[p])&&(d=1,f[p]=f[p][0],h[p]=h[p][0]);if(n=f[p]>h[p]||-(f[p]!==h[p]))break}return d?-n:n})}catch(f){D(f,c)}Aa();Sa();return a[Symbol.iterator]()};B=function(a,b,c,f){for(var h=0;h<c.length;){var k=c[h++];switch(k[""]){default:B(a, | ||
b,k,f);return;case f:b.push(C(k,a));case void 0:}}};T=function(a){var b=a.split(sb),c;a="$";b=Ua(b);for(c=b.next();!c.done;c=b.next())c=c.value,a+=Ha(c);return a};Z=function(a,b,c,f){b=Array.isArray(b)?b[0]:VE(a,b);null==b&&(b="");"function"===typeof b&&(b=b(a._,a));if(b[""])switch(c){case "r":case "recurse":case "":case "none":if(!f)break;default:b=Y(b)}else- -b==b&&(b+="");if(f&&!b[""]&&ya){var h=(b=ya(f,b,a))[1];b=b[0]}switch(c){case "json":b=JSON.stringify(b).replace(ob,"\\\\u003c");break;case "uric":b= | ||
b.replace(pb,t);break;default:b[""]||h||(Array.isArray(b)&&(b=b.join(", ")),b=(f=Qa[c])?f(b):b.replace(qb,z));case "":case "none":case "r":case "recurse":}switch(b.length){case 0:b="";break;case 1:1===b[""]&&(b=b[0])}if("r"===c)for(c="";b!==c&&0<=b.indexOf("&");)c=b,b=VE(a,["("+Ia(b)+")"]);return b};O=function(a,b){var c;if(b)for(c in b)delete b[c];else b=[];b=r.assign(b,a);for(c=b.length;c--;)b[c][""]&&(b[c]=O(b[c]));return b};K=function(a,b,c){c[""]?(1===c[""]?b.push.apply(b,O(c)):b.push(c),c=1): | ||
c||void 0!==c&&c?(b.push(c),c=1):c=0;return c};sizeof=function(a){return Number(a)===a?1:a?a.length||1!==a[""]||r.keys(a).length:0};desc=function(a){return- -a===a?-a:[a,1]};abstract2dom=function(a,b){return na.abstract2dom(a,b)};abstract2txt=Y=function(a,b){for(;;){switch(a[""]){case void 0:return a;case 1:switch(a.length){case 0:return"";case 1:a=a[0];continue}}break}var c,f=a[""];switch(f){case "!":return"\x3c!--"+a[0]+"--\x3e";case "<":return"<!"+a[0]+">";case "?":return"<?"+a[0]+"?>";case 1:f= | ||
c="";break;default:c="<"+f;var h,k=Ua(r.keys(a).splice(a.length));for(h=k.next();!h.done;h=k.next())switch(h=h.value,h[0]){default:var n=a[h];null!=n&&(n[""]&&(n=n.join("")),c+=" "+h,h!==n&&(c+='="'+(n.replace?n.replace(rb,"&dquot;"):n)+'"'));case "_":case void 0:}if(!a.length)return c+(b&&"br"!==f?"></"+f+">":"/>");c+=">"}for(h=0;void 0!==(k=a[h++]);)c+=k[""]?Y(k,b):k;f&&(c+="</"+f+">");return c};r.assign||r.defineProperty(r,"assign",{value:function(a,b,c){if(b)for(c in b)a[c]=b[c];return a}});r.entries|| | ||
(r.entries=function(a){for(var b=a?r.keys(a):[],c=b.length,f=Array(c);c--;)f[c]=[b[c],a[b[c]]];return f});var na={remixml2js:ra,js2obj:qa,compile:Ea,parse2txt:function(a,b,c){m(a)&&(a=qa(ra(a,c)));return Y(a(b))},abstract2txt:Y,add_filter:function(a,b){Qa[a]=b},set_proc_fmt:function(a){ya=a},set_tag:function(a,b,c,f,h){N(b);Xa(a,b,c,f,h)},set_log_callback:function(a){Ra=a}};"function"==typeof define&&define.amd?define("remixml",[],na):"object"==typeof exports?r.assign(exports,na):nb.Remixml=na}).call(this); | ||
case "for":d+="{I=0;let g,i,k,m,J=W,n=0;";d=(l=e.a("in"))?d+("g=G($,"+ja(l)+((f=e.a("orderby"))?",(m=$._,function(_){let _index=_[0];$._=_=_[1];return["+ea(f)+"]}));$._=m":")")+";while(!(m=g.next()).done){k=(m=m.value)[1];i=m[0];W=S({_value:k,"):d+("for(i=+"+(e.a("from")||0)+",m="+((l=e.a("step"))?"+("+l+"||1)":1)+",k=+"+(e.a("to")||0)+";m<0?i>=k:i<=k;i+=m){W=S({");d+="_recno:++n,_index:i});let o=$;$=C(W,$,{}";if(f=e.a("scope"))d+=","+f;d+=");";1===aa("k=(m=$._)._value;","m")&&(d+="M($._,$._._value);"); | ||
continue;case "eval":d+="{let H=L(),n="+(void 0===(f=e.a("recurse"))?1:0<f?+f:0)+",J=W,k,m=0;";continue;case "unset":if(f=e.a("tag"))g(),f="._._tag["+f+"]",d+="$"+f+"=$._._&&$._"+f+";";else if(f=e.a("var")||e.a("variable"))l=ja(f,1),d=Array.isArray(l)?d+("delete "+l[0]+";"):d+('eval("delete "+'+T(l)+");");continue;case "delimiter":d+="if($._._recno>1){";continue;case "elif":f="(!I&&";case "if":d+="if"+f+"(I="+(ea(e.a("expr"))||0)+")"+(f?")":"")+"{";continue;case "then":d+="if(I){";continue;case "else":d+= | ||
"if(!I){";continue}d+="{let J=W,H=S({";(l=e.b["::"])&&(e.b["::"]=l.slice(0,-1)+":;");l="";for(I in e.b)if(f=e.a(I))d+=l+(gb.test(I)?'"'+I+'"':I)+":"+f,l=",";d+='},"'+w+'")'}if(!la&&(l="script"===w?hb:"style"===w?ib:0)){l.lastIndex=u;l.exec(a);aa=l.lastIndex;d+=";";!x&&(f=a.slice(u,aa-3-w.length))&&(d+="H[0]="+JSON.stringify(f)+";");u=aa;la=1;break}x||(d+=";",q[2]|=2)}while(0)}if(la)b:for(;;){q=ba.pop();f=q[0];c:do{switch(f){case "noparse":if(!--k)break c;break;case "comment":if(!k){x--;break c}break; | ||
case 0:break c}if(!x)if(k)d+="J.push(H)}";else{d:do switch(f){case "set":if("{"!==d.slice(-1)&&y){aa=d.slice(y).match(jb);d=d.slice(0,y-11-ua.length)+aa[1]+aa[2]+";";break d}d+=q[2]&16?Oa:"})}";break;case "insert":q[2]&8&&(d+=Oa);break;case "replace":d+="J.push.apply(J,R(H,v))}";break;case "trim":d+="J.push.apply(J,U(R(H)))}";break;case "maketag":d+="J.push(H)}";break;case "attrib":d+="V(H,v,J)}";case "unset":break d;case "for":d+="$=o;I=1}}";break;case "if":case "then":case "elif":case "else":d+= | ||
"I=1}";break d;case "eval":d+=p;break;case "nooutput":d+="J=[];";default:q[2]&4&&(d+="};");case "script":case "style":d+=cb;case "delimiter":d+="}"}while(0);y=0}}while(0);if(w!==f)for(c(w,(f?"Expected </"+f+"> got </":"Missing <")+w+">"),(f=ba.length)||ba.push(q);f;)if(ba[--f][0]===w)continue b;d=q[3]+d;q=ba[ba.length-1];break}break;case "&":xa.lastIndex=++u;if(!k&&(v=da(xa,a))){u=xa.lastIndex;x||(d+=Ka(v)+"I=K($,H,x)}catch(x){I=0}",y=0);break}f="&";default:ha.lastIndex=u,da(ha,a)||console.error("**"+ | ||
a+"**"),ha.lastIndex=u,f+=da(ha,a)[0],u=ha.lastIndex,x||(k||(b&3?b&1&&(f=Fa(f)):f=f.replace(kb,"$1$2$3")),!f||q[2]&1&&"0}"!==d.slice(-2)&&f.match(lb)||(d+="H.push("+JSON.stringify(f)+");"))}}return d+="return H})"}function qa(a){try{var b=eval(a)}catch(c){D(c,a),mb(a),b=function(){return""}}return b}function ia(a){return RegExp(a,Pa?"g":"y")}function da(a,b){if(Pa){var c=a.lastIndex;return(a=a.exec(b))&&c==a.index&&a}return a.exec(b)}var nb=("object"==typeof document?document:null)&&window,r=Object, | ||
Pa=0!=/./.sticky,Va={"+":"%2B"," ":"+","\t":"%09","\n":"%0A","\r":"%0D","?":"%3F","&":"%26","#":"%23","<":"%3C"},Wa={"&":"&","<":"<"},Da=/\s*,\s*/g,db=/\s*,\s*/,Ja=ia("(?:[^&]+|(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&]*))+|&([\\w$]+(?:[.[][\\w$]+]?)*\\.[\\w$]+)(?::([\\w$]*))?(?:%([^;]*))?;"),xa=ia("([\\w$]+\\.[\\w$]+(?:[.[][\\w$]+]?)*)(?::([\\w$]*))?(?:%([^;]*))?;"),va=ia("!(?:--([\x00-\u00ff]*?)(?:--|$)|([^-][\x00-\u00ff]*?))(?:>|$)|\\?([\x00-\u00ff]*?)(?:\\?>|$)"), | ||
wa=ia("(?:noparse|comment)\\s"),ha=ia("[^&<]+(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&<]*)*"),fa=/\s*(?:([-\w:]+|\/)\s*(?:=\s*("[^"]*"|'[^']*'))?|>)/g,gb=/[^\w]/,hb=/<\/script>/g,ib=/<\/style>/g,Ya=/^"([^(+]+)"$/,$a=/^[A-Za-z_][\w]*$/,ab=/\n/g,bb=/[^\n]*$/,jb=/([^=]+=).+(".*")/,lb=/^\s+$/,Za=/\s\s+/g,ob=/</g,pb=/[+ \t\n\r?&#<]/g,qb=/[&<]/g,eb=/[^-:\w,]+/g,fb=/([\\^$*+?.|()[{])/g,rb=/"/g,sb=/[.[\]]+/,kb=/(\n)\s+|[ \f\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+(?:(\n)\s*|([ \f\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]))/g, | ||
Qa={},ya,mb=console.debug,Ra=console.error;M=function(a,b){try{r.assign(a,b)}catch(c){}};D=function(a,b){Ra("Remixml expression: "+(b?JSON.stringify(b):"")+"\n",a)};E=function(a,b,c){return Ea(a,c)(b)};P=function(a,b,c){return function(g){return g.replace(RegExp(a,b),c)}};U=function(a){var b;m(b=a[0])&&" "===b[0]&&!(a[0]=b.substr(1))&&a.splice(0,1);var c=a.length-1;m(b=a[c])&&" "===b.slice(-1)&&!(a[c]=b.slice(0,-1))&&a.splice(c,1);return a};F=function(a,b,c){b=+(b||0);c=+c;return 0>c?a.slice(b,c): | ||
0<c?a.slice(b,b+c):0==c?a.slice(b):""};R=function(a,b){for(var c,g=a.length,h=b||Fa;g--;){switch((c=a[g])[""]){case "!":case "<":case "?":if(!b)break;default:R(c,b);continue;case void 0:if(a[g]=h(c))continue}a.splice(g,1)}return a};S=function(a,b){b=L(b);r.assign(b,a);delete b["::"];(a=a["::"])&&r.assign(b,a);return b};L=function(a){var b=[];b[""]=a||1;return b};N=function(a){var b=a._;b||(a._=b={});b._tag||(b._tag={});!a["var"]&&a.__&&(a["var"]=a.__);return L()};C=function(a,b,c,g){if(1!==a[""])if(Ga(a, | ||
"_contents",function(){var k=a._c;k?k(a.slice(),b):a[""]=1;return a}),c)Ga(a,"_restargs",function(){var k,n={};for(k in this)switch(k[0]){default:0<=k||c[k]||(n[k]=this[k]);case "_":case void 0:}return n});else return a;var h;(h=r.assign({},b))._=r.assign(a,{_:b._,_tag:r.assign({},b._._tag)});g&&(h[g]=a);return h};V=function(a,b,c){void 0===c[b]&&(c[b]=1!==a.length||a[0][""]?a.length?a:"":a[0])};X=function(a,b,c){var g=c._._tag[b[""]];if(g)return g(a,b,c);if(g=b._c)delete b._c,g(b,c);a.push(b)};Q= | ||
function(a,b,c){b._._tag[a]=c};G=function(a,b,c){if((b=(b=Array.isArray(b)?b[0]:VE(a,b))||0)&&0<=b.size)a=b.entries();else if(a=r.entries(b),0<=b.length&&a.splice(b.length),c)try{a=a.sort(function(g,h){var k,n;g=c(g);h=c(h);var p=0;for(k=g.length;p<k;p++){var d=0;Array.isArray(g[p])&&(d=1,g[p]=g[p][0],h[p]=h[p][0]);if(n=g[p]>h[p]||-(g[p]!==h[p]))break}return d?-n:n})}catch(g){D(g,c)}Aa();Sa();return a[Symbol.iterator]()};B=function(a,b,c,g){for(var h=0;h<c.length;){var k=c[h++];switch(k[""]){default:B(a, | ||
b,k,g);return;case g:b.push(C(k,a));case void 0:}}};T=function(a){var b=a.split(sb),c;a="$";b=Ua(b);for(c=b.next();!c.done;c=b.next())c=c.value,a+=Ha(c);return a};Z=function(a,b,c,g){b=Array.isArray(b)?b[0]:VE(a,b);null==b&&(b="");"function"===typeof b&&(b=b(a._,a));if(b[""])switch(c){case "r":case "recurse":case "":case "none":if(!g)break;default:b=Y(b)}else- -b==b&&(b+="");if(g&&!b[""]&&ya){var h=(b=ya(g,b,a))[1];b=b[0]}switch(c){case "json":b=JSON.stringify(b).replace(ob,"\\\\u003c");break;case "uric":b= | ||
b.replace(pb,t);break;default:b[""]||h||(Array.isArray(b)&&(b=b.join(", ")),b=(g=Qa[c])?g(b):b.replace(qb,z));case "":case "none":case "r":case "recurse":}switch(b.length){case 0:b="";break;case 1:1===b[""]&&(b=b[0])}if("r"===c)for(c="";b!==c&&0<=b.indexOf("&");)c=b,b=VE(a,["("+Ia(b)+")"]);return b};O=function(a,b){var c;if(b)for(c in b)delete b[c];else b=[];b=r.assign(b,a);for(c=b.length;c--;)b[c][""]&&(b[c]=O(b[c]));return b};K=function(a,b,c){c[""]?(1===c[""]?b.push.apply(b,O(c)):b.push(c),c=1): | ||
c||void 0!==c&&c?(b.push(c),c=1):c=0;return c};sizeof=function(a){return Number(a)===a?1:a?a.length||1!==a[""]||r.keys(a).length:0};desc=function(a){return- -a===a?-a:[a,1]};abstract2dom=function(a,b){return na.abstract2dom(a,b)};abstract2txt=Y=function(a,b){for(;;){switch(a[""]){case void 0:return a;case 1:switch(a.length){case 0:return"";case 1:a=a[0];continue}}break}var c,g=a[""];switch(g){case "!":return"\x3c!--"+a[0]+"--\x3e";case "<":return"<!"+a[0]+">";case "?":return"<?"+a[0]+"?>";case 1:g= | ||
c="";break;default:c="<"+g;var h,k=Ua(r.keys(a).splice(a.length));for(h=k.next();!h.done;h=k.next())switch(h=h.value,h[0]){default:var n=a[h];null!=n&&(n[""]&&(n=n.join("")),c+=" "+h,h!==n&&(c+='="'+(n.replace?n.replace(rb,"&dquot;"):n)+'"'));case "_":case void 0:}if(!a.length)return c+(b&&"br"!==g?"></"+g+">":"/>");c+=">"}for(h=0;void 0!==(k=a[h++]);)c+=k[""]?Y(k,b):k;g&&(c+="</"+g+">");return c};r.assign||r.defineProperty(r,"assign",{value:function(a,b,c){if(b)for(c in b)a[c]=b[c];return a}});r.entries|| | ||
(r.entries=function(a){for(var b=a?r.keys(a):[],c=b.length,g=Array(c);c--;)g[c]=[b[c],a[b[c]]];return g});var na={remixml2js:ra,js2obj:qa,compile:Ea,parse2txt:function(a,b,c){m(a)&&(a=qa(ra(a,c)));return Y(a(b))},abstract2txt:Y,add_filter:function(a,b){Qa[a]=b},set_proc_fmt:function(a){ya=a},set_tag:function(a,b,c,g,h){N(b);Xa(a,b,c,g,h)},set_log_callback:function(a){Ra=a}};"function"==typeof define&&define.amd?define("remixml",[],na):"object"==typeof exports?r.assign(exports,na):nb.Remixml=na}).call(this); | ||
}).call(this); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
569478
7073
518