Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remixml

Package Overview
Dependencies
Maintainers
1
Versions
346
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remixml - npm Package Compare versions

Comparing version 6.0.5 to 6.0.6

2

package.json
{
"name": "remixml",
"version": "6.0.5",
"version": "6.0.6",
"description": "XML/HTML-like macro language/template compiler engine",

@@ -5,0 +5,0 @@ "main": "remixml.min.js",

@@ -568,2 +568,5 @@ /** @license

}
function /** void */ logparseerror()
{ logcontext(0, "Parse error");
}
for (;;)

@@ -609,3 +612,2 @@ { var /** Array */ rm;

}
params.lastIndex = lasttoken;
let /** !Object */ gotparms = {};

@@ -632,6 +634,11 @@ function /** string|undefined */ getparm(/** string */ name)

{ rm = params.exec(rxmls);
if (RUNTIMEDEBUG && rm[1])
logcontext(0, 'Skipping malformed parameter "' + rm[1] + '"');
if (RUNTIMEDEBUG)
{ if (rm[1])
logcontext(0, 'Skipping malformed parameter "' + rm[1] + '"');
else if (!rm)
logparseerror();
}
return fw = rm[2];
}
params.lastIndex = lasttoken;
if (parseparam() === "/")

@@ -647,3 +654,4 @@ gotparms[fw] = 1, parseparam();

{ if (!parseparam())
{ lasttoken = params.lastIndex;
{ if (rm)
lasttoken = params.lastIndex;
break;

@@ -1012,10 +1020,11 @@ }

rm = textrx.exec(rxmls);
if (rm || !ASSERT)
if (rm || !ASSERT && !RUNTIMEDEBUG)
{ ts += rm[0];
lasttoken = textrx.lastIndex;
} else {
if (RUNTIMEDEBUG)
log("Parse error **" + rxmls + "**");
ts += rxmls.substr(lasttoken);
lasttoken = rxmls.length;
logparseerror();
if (ASSERT) {
ts += rxmls.substr(lasttoken);
lasttoken = rxmls.length;
}
}

@@ -1022,0 +1031,0 @@ if (!comment)

@@ -576,2 +576,5 @@ /** @license

}
function /** void */ logparseerror()
{ logcontext(0, "Parse error");
}
for (;;)

@@ -617,3 +620,2 @@ { var /** Array */ rm;

}
params.lastIndex = lasttoken;
let /** !Object */ gotparms = {};

@@ -640,6 +642,11 @@ function /** string|undefined */ getparm(/** string */ name)

{ rm = params.exec(rxmls);
if (RUNTIMEDEBUG && rm[1])
logcontext(0, 'Skipping malformed parameter "' + rm[1] + '"');
if (RUNTIMEDEBUG)
{ if (rm[1])
logcontext(0, 'Skipping malformed parameter "' + rm[1] + '"');
else if (!rm)
logparseerror();
}
return fw = rm[2];
}
params.lastIndex = lasttoken;
if (parseparam() === "/")

@@ -655,3 +662,4 @@ gotparms[fw] = 1, parseparam();

{ if (!parseparam())
{ lasttoken = params.lastIndex;
{ if (rm)
lasttoken = params.lastIndex;
break;

@@ -1020,10 +1028,11 @@ }

rm = textrx.exec(rxmls);
if (rm || !ASSERT)
if (rm || !ASSERT && !RUNTIMEDEBUG)
{ ts += rm[0];
lasttoken = textrx.lastIndex;
} else {
if (RUNTIMEDEBUG)
log("Parse error **" + rxmls + "**");
ts += rxmls.substr(lasttoken);
lasttoken = rxmls.length;
logparseerror();
if (ASSERT) {
ts += rxmls.substr(lasttoken);
lasttoken = rxmls.length;
}
}

@@ -1030,0 +1039,0 @@ if (!comment)

@@ -14,27 +14,27 @@ (function(){"use strict";

*/
'use strict';(function(){function da(a){return"string"===typeof a}function Ga(a){return Ha[a]}function Ia(a){return Ja[a]}function Ka(a,b){a[b]=1;return a}function La(a,b,c,e,l){b._._tag[c]=function(g,u,m){delete u[""];m=C(u,m,l?l.split(ta).reduce(Ka,{}):{},e);return a(m)}}function ca(a,b){var c=a.match(Ma);return c?(a=T(c[1]),b?[a]:"["+a+"]"):a}function ua(a,b){return ia(ja(a,b))}function va(a){return a.replace(Na," ")}function wa(a,b,c){w.defineProperty(a,b,{get:c,configurable:!0})}function xa(a){return a.match(Oa)?
"."+a:'["'+a+'"]'}function ya(a){var b="",c="",e;for(za.lastIndex=0;e=za.exec(a);)b=e[1]?b+(c+"(function(){"+Aa(e)+'return x}catch(x){}return ""})()'):b+(c+JSON.stringify(e[0])),c="+";return b}function Ba(a,b,c){a="try{let x=Z($,"+ca(a);b&&(a+=","+b);c&&(b||(a+=",0"),a+=","+c);return a+");"}function Aa(a){var b=a[2],c=a[3];return Ba(JSON.stringify(a[1]),da(b)&&JSON.stringify(b),c&&JSON.stringify(c))}function ka(a){return"(function(){try{return("+a+')}catch(x){D(x)}return ""})()'}function Ca(a){return"(_=$._,"+
'use strict';(function(){function da(a){return"string"===typeof a}function Ga(a){return Ha[a]}function Ia(a){return Ja[a]}function Ka(a,b){a[b]=1;return a}function La(a,b,c,e,l){b._._tag[c]=function(g,u,m){delete u[""];m=C(u,m,l?l.split(sa).reduce(Ka,{}):{},e);return a(m)}}function ca(a,b){var c=a.match(Ma);return c?(a=T(c[1]),b?[a]:"["+a+"]"):a}function ta(a,b){return ia(ja(a,b))}function ua(a){return a.replace(Na," ")}function va(a,b,c){w.defineProperty(a,b,{get:c,configurable:!0})}function wa(a){return a.match(Oa)?
"."+a:'["'+a+'"]'}function xa(a){var b="",c="",e;for(ya.lastIndex=0;e=ya.exec(a);)b=e[1]?b+(c+"(function(){"+za(e)+'return x}catch(x){}return ""})()'):b+(c+JSON.stringify(e[0])),c="+";return b}function Aa(a,b,c){a="try{let x=Z($,"+ca(a);b&&(a+=","+b);c&&(b||(a+=",0"),a+=","+c);return a+");"}function za(a){var b=a[2],c=a[3];return Aa(JSON.stringify(a[1]),da(b)&&JSON.stringify(b),c&&JSON.stringify(c))}function ka(a){return"(function(){try{return("+a+')}catch(x){D(x)}return ""})()'}function Ba(a){return"(_=$._,"+
(a?ka(a):'""')+")"}function ba(a){a&&(0>a.indexOf("(")?(0<=(a=JSON.parse(a)).indexOf("_")&&(a="_=$._,"+a),a=ka(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=ka('eval("'+a+'")'),a=0>a.indexOf("_")?a:"(_=$._,"+a+")"));return a}function ja(a,b){function c(n,v){var la=D,H=a.slice(0,t),ea=(H.match(Pa)||"").length+1;H=H.match(Qa)[0].length+1;la(v+" at "+(ea+":"+H),a.substr(t-64,128+(n?n.length:0)))}function e(){2===
(p[2]&6)&&(p[2]|=4,d+="H._c=function(H,$){")}function l(n,v){I||(d+='H.push(W=L("'+n[0][0]+'"));W[0]='+JSON.stringify(n[v])+";")}var g=b&4;const u=g?"async ":"";var m=g?"await ":"",d="("+u+'function($){"use strict";var I,W,_,H=N($);',I=g=0;const ma="w,v="+u+"function(){"+m+"w();",Da=")};w=("+u+"function(W){",Ea="});"+m+"v()}",Ra=m+"X(J,H,$)";m="do{if((k=Y(H))===m)break;H="+m+"E(m=k,$"+(b?","+b:"")+")}while(--n);J.push.apply(J,H)}";for(var x,p=[0,{},4,""],aa=[p],t=0;;){var r,f="";if(t>=a.length){var q=
p[0];if(q){c(q,"Missing </"+q+">");a+="</"+q+">";continue}break}a:switch(a[t]){case "<":q=function(){r=fa.exec(a);r[1]&&c(0,'Skipping malformed parameter "'+r[1]+'"');return y=r[2]};var z=function(v,la){var H=h("mkmapping");if(H){let ea=H.slice(1,-1).split(Sa);for(d+=v;H=ea.pop();)d+=la+xa(H)+"=k["+ea.length+"];"}else if(""===H)return 1},h=function(v){return(v=n[v])&&ya(v)};na.lastIndex=++t;if(r=na.exec(a)){t=na.lastIndex;I||(r[1]?l(r,1):r[2]?(r[0]="<",l(r,2)):(oa.lastIndex=0,oa.exec(f=r[3])?"n"===
f[0]&&(d+="H.push("+JSON.stringify(f.slice(oa.lastIndex))+");"):l(r,3)));break}fa.lastIndex=t;let n={};var y;if("/"===q())n[y]=1,q();else if(!y){r&&(t=fa.lastIndex);break a}for(n[""]=y;;){if(!q()){t=fa.lastIndex;break}n[y]=r[3]?r[3].slice(1,-1):y}var J=n["/"];delete n["/"];q=n[""];if(1!==J){do{aa.push(p=[q,n,0,d]);d="";n["-"]&&(delete n["-"],p[2]=1);switch(q){case "noparse":if(!g++)continue;break;case "comment":g||I++}if(!I){delete n[""];d+="W=H;";if(!g)switch(q){case "set":d+="{let H=L(),";var k=
h("var")||h("variable");x=0;if(k){var W=h("expr");d+=ma;p[2]|=16;x=d.length;if(f=h("selector"))d+="B($,w=L(),H,"+f+");H=w;";else{void 0!==n.json&&(d+="H=JSON.parse(Y(H));");if(f=h("split"))d+="H=Y(H).split("+(ba(W)||f)+");",W=void 0;void 0!==W&&(d+="H="+(ba(W)||Ca("eval(Y(H))"))+";");if(f=h("join"))d+="H=H.join("+f+");";z("let k=H[0];H={};","H")}d.length!==x&&(x=0);k=ca(k,1);Array.isArray(k)?d+=k[0]+"=A("+(void 0!==n.clone?(x=0,"O(H,"+k[0]+")"):"H"):(x=0,d+="A(H,$,"+k);d+=Da}else if(f=h("tag")){e();
d+="v=0;Q("+f+",$,"+u+"function(H,a,$,W){let o=$;$=C(a,$,{";(f=h("args"))&&(f=f.replace(Ta,""))&&(d+='"'+f.replace(ta,'":1,"')+'":1');d+="}";if(f=h("scope"))d+=","+f;d+=");"}continue;case "insert":if(k=h("var")||h("variable")){d+=Ba(k,h("quote"),h("format"));if(f=h("join"))d+="x=x.join?x.join("+f+"):x;";k=h("limit");if((f=h("offset"))||void 0!==k)d+="x=F(x,"+f+(void 0!==k?","+k:"")+");";d+="I=K($,H,x)}catch(x){I=0}"}else if(void 0!==(k=h("expr")))d+="{let H=L(),"+ma+("H="+(ba(k)||Ca("eval(Y(H))"))+
";W.push(A(H)")+Da,p[2]|=8;else switch(h("variables")){case "dump":d+="log((W="+h("scope")+")?$[W]:$);"}continue;case "replace":k=h("flags");void 0===k&&(k="g");d+="{let H=L(),J=W,v=P("+(h("regexp")||h("from").replace(Ua,"\\$1"))+","+JSON.stringify(k)+","+(ba(h("expr"))||h("to"))+");";continue;case "trim":d+="{let H=L(),J=W;";continue;case "maketag":d+="{let H=L("+h("name")+"),J=W;";continue;case "attrib":d+="{let H=L(),v="+h("name")+",J=W;";continue;case "for":d+="{I=0;let g,i,k,m,J=W,n=0;";d=(k=
(p[2]&6)&&(p[2]|=4,d+="H._c=function(H,$){")}function l(n,v){I||(d+='H.push(W=L("'+n[0][0]+'"));W[0]='+JSON.stringify(n[v])+";")}var g=b&4;const u=g?"async ":"";var m=g?"await ":"",d="("+u+'function($){"use strict";var I,W,_,H=N($);',I=g=0;const ma="w,v="+u+"function(){"+m+"w();",Ca=")};w=("+u+"function(W){",Da="});"+m+"v()}",Ra=m+"X(J,H,$)";m="do{if((k=Y(H))===m)break;H="+m+"E(m=k,$"+(b?","+b:"")+")}while(--n);J.push.apply(J,H)}";for(var x,p=[0,{},4,""],aa=[p],t=0;;){var q,f="";if(t>=a.length){var r=
p[0];if(r){c(r,"Missing </"+r+">");a+="</"+r+">";continue}break}a:switch(a[t]){case "<":r=function(){q=fa.exec(a);q[1]?c(0,'Skipping malformed parameter "'+q[1]+'"'):q||c(0,"Parse error");return y=q[2]};var z=function(v,la){var H=h("mkmapping");if(H){let ea=H.slice(1,-1).split(Sa);for(d+=v;H=ea.pop();)d+=la+wa(H)+"=k["+ea.length+"];"}else if(""===H)return 1},h=function(v){return(v=n[v])&&xa(v)};na.lastIndex=++t;if(q=na.exec(a)){t=na.lastIndex;I||(q[1]?l(q,1):q[2]?(q[0]="<",l(q,2)):(oa.lastIndex=0,
oa.exec(f=q[3])?"n"===f[0]&&(d+="H.push("+JSON.stringify(f.slice(oa.lastIndex))+");"):l(q,3)));break}let n={};var y;fa.lastIndex=t;if("/"===r())n[y]=1,r();else if(!y){q&&(t=fa.lastIndex);break a}for(n[""]=y;;){if(!r()){q&&(t=fa.lastIndex);break}n[y]=q[3]?q[3].slice(1,-1):y}var J=n["/"];delete n["/"];r=n[""];if(1!==J){do{aa.push(p=[r,n,0,d]);d="";n["-"]&&(delete n["-"],p[2]=1);switch(r){case "noparse":if(!g++)continue;break;case "comment":g||I++}if(!I){delete n[""];d+="W=H;";if(!g)switch(r){case "set":d+=
"{let H=L(),";var k=h("var")||h("variable");x=0;if(k){var W=h("expr");d+=ma;p[2]|=16;x=d.length;if(f=h("selector"))d+="B($,w=L(),H,"+f+");H=w;";else{void 0!==n.json&&(d+="H=JSON.parse(Y(H));");if(f=h("split"))d+="H=Y(H).split("+(ba(W)||f)+");",W=void 0;void 0!==W&&(d+="H="+(ba(W)||Ba("eval(Y(H))"))+";");if(f=h("join"))d+="H=H.join("+f+");";z("let k=H[0];H={};","H")}d.length!==x&&(x=0);k=ca(k,1);Array.isArray(k)?d+=k[0]+"=A("+(void 0!==n.clone?(x=0,"O(H,"+k[0]+")"):"H"):(x=0,d+="A(H,$,"+k);d+=Ca}else if(f=
h("tag")){e();d+="v=0;Q("+f+",$,"+u+"function(H,a,$,W){let o=$;$=C(a,$,{";(f=h("args"))&&(f=f.replace(Ta,""))&&(d+='"'+f.replace(sa,'":1,"')+'":1');d+="}";if(f=h("scope"))d+=","+f;d+=");"}continue;case "insert":if(k=h("var")||h("variable")){d+=Aa(k,h("quote"),h("format"));if(f=h("join"))d+="x=x.join?x.join("+f+"):x;";k=h("limit");if((f=h("offset"))||void 0!==k)d+="x=F(x,"+f+(void 0!==k?","+k:"")+");";d+="I=K($,H,x)}catch(x){I=0}"}else if(void 0!==(k=h("expr")))d+="{let H=L(),"+ma+("H="+(ba(k)||Ba("eval(Y(H))"))+
";W.push(A(H)")+Ca,p[2]|=8;else switch(h("variables")){case "dump":d+="log((W="+h("scope")+")?$[W]:$);"}continue;case "replace":k=h("flags");void 0===k&&(k="g");d+="{let H=L(),J=W,v=P("+(h("regexp")||h("from").replace(Ua,"\\$1"))+","+JSON.stringify(k)+","+(ba(h("expr"))||h("to"))+");";continue;case "trim":d+="{let H=L(),J=W;";continue;case "maketag":d+="{let H=L("+h("name")+"),J=W;";continue;case "attrib":d+="{let H=L(),v="+h("name")+",J=W;";continue;case "for":d+="{I=0;let g,i,k,m,J=W,n=0;";d=(k=
h("in"))?d+("g=G($,"+ca(k)+((f=h("orderby"))?",(m=$._,function(_){let _index=_[0];$._=_=_[1];return["+ba(f)+"]}));$._=m":")")+";while(!(m=g.next()).done){k=(m=m.value)[1];i=m[0];W=S({_value:k,"):d+("for(i=+"+(h("from")||0)+",m="+((k=h("step"))?"+("+k+"||1)":1)+",k=+"+(h("to")||0)+";m<0?i>=k:i<=k;i+=m){W=S({");d+="_recno:++n,_index:i});let o=$;$=C(W,$,{}";if(f=h("scope"))d+=","+f;d+=");";1===z("k=(m=$._)._value;","m")&&(d+="M($._,$._._value);");continue;case "eval":d+="{let H=L(),n="+(void 0===(f=
h("recurse"))?1:0<f?+f:0)+",J=W,k,m=0;";continue;case "unset":if(f=h("tag"))k=function(v){v="._._tag"+v;d+="$"+v+"=$._._&&$._"+v+";"},e(),W=ca(f,1),Array.isArray(W)?k(W[0].slice(1)):(d+="{let v="+W+";",k("[v]"),d+="}");else if(f=h("var")||h("variable"))k=ca(f,1),d+=Array.isArray(k)?"delete "+k[0]+";":'eval("delete $."+'+k+");";continue;case "delimiter":d+="if($._._recno>1){";continue;case "elif":f="(!I&&";case "if":d+="if"+f+"(I="+(ba(h("expr"))||0)+")"+(f?")":"")+"{";continue;case "then":d+="if(I){";
continue;case "else":d+="if(!I){";continue}d+="{let J=W,H=S({";(k=n["::"])&&(n["::"]=k.slice(0,-1)+":;");k="";for(y in n)if(f=h(y))d+=k+(Va.test(y)?y:'"'+y+'"')+":"+f,k=",";d+='},"'+q+'")'}if(!J&&(k="script"===q?Wa:"style"===q?Xa:0)){k.lastIndex=t;k.exec(a);z=k.lastIndex;d+=";";!I&&(f=a.slice(t,z-3-q.length))&&(d+="H[0]="+JSON.stringify(f)+";");t=z;J=1;break}I||(d+=";",p[2]|=2)}while(0)}if(J)for(;;){p=aa.pop();z=p[0];f=0;if(q!==z){c(q,(z?"Expected </"+z+"> got </":"Missing <")+q+">");for(J=aa.length;J;)if(aa[--J][0]===
q){f=1;break}if(!f){aa.push(p);break}}b:do{switch(z){case "noparse":if(!--g)break b;break;case "comment":if(!g){I--;break b}break;case 0:break b}if(!I)if(g)d+="J.push(H)}";else{c:do switch(z){case "set":if("{"!==d.slice(-1)&&x){J=d.slice(x).match(Ya);d=d.slice(0,x-11-ma.length)+J[1]+J[2]+";";break c}d+=p[2]&16?Ea:"})}";break;case "insert":p[2]&8&&(d+=Ea);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 c;case "for":d+="$=o;I=1}}";break;case "if":case "then":case "elif":case "else":d+="I=1}";break c;case "eval":d+=m;break;case "nooutput":d+="J=[];";default:p[2]&4&&(d+="};");case "script":case "style":d+=Ra;case "delimiter":d+="}"}while(0);x=0}}while(0);d=p[3]+d;if(!f){p=aa[aa.length-1];break}}break;case "&":pa.lastIndex=++t;if(!g&&(r=pa.exec(a))){t=pa.lastIndex;I||(d+=Aa(r)+"I=K($,H,x)}catch(x){I=0}",x=0);break}f="&";default:qa.lastIndex=t,(r=qa.exec(a))?(f+=r[0],t=
qa.lastIndex):(ra("Parse error **"+a+"**"),f+=a.substr(t),t=a.length),I||(!g&&b&1&&(f=va(f)),!f||p[2]&1&&"0}"!==d.slice(-2)&&f.match(Za)||(d+="H.push("+JSON.stringify(f)+");"))}}return d+="return H})"}function ia(a){try{var b=eval(a)}catch(c){D(c,a),$a(a),b=function(){return""}}return b}const ab=("object"==typeof document?document:null)&&window,w=Object,Ha={"+":"%2B"," ":"+","\t":"%09","\n":"%0A","\r":"%0D","?":"%3F","&":"%26","#":"%23","<":"%3C"},Ja={"&":"&amp;","<":"&lt;"},ta=/\s*,\s*/g,Sa=/\s*,\s*/,
za=RegExp("(?:[^&]+|(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&]*))+|&([\\w$]+(?:[.[][\\w$]+]?)*\\.[\\w$]+)(?::([\\w$]*))?(?:%([^;]*))?;","y"),pa=/([\w$]+\.[\w$]+(?:[.[][\w$]+]?)*)(?::([\w$]*))?(?:%([^;]*))?;/y,na=/!(?:--(.*?)(?:--|$)|([^-].*?))(?:>|$)|\?(.*?)(?:\?>|$)/ys,oa=/(?:noparse|comment)\s/y,qa=RegExp("[^&<]+(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&<]*)*","y"),fa=/\s*((?:[^-:_a-zA-Z<&>\s\/]\s*)*)(?:([-:_a-zA-Z][-:\w]*|\/)\s*(?:=\s*("[^"]*"|'[^']*'))?|[<&>])/y,
Va=/^[_a-zA-Z]\w*$/,Wa=/<\/script>/g,Xa=/<\/style>/g,Ma=/^"([^(+]+)"$/,Oa=/^[A-Za-z_][\w]*$/,Pa=/\n/g,Qa=/[^\n]*$/,Ya=/([^=]+=).+(".*")/,Za=/^\s+$/,Na=/\s\s+/g,bb=/</g,cb=/[+ \t\n\r?&#<]/g,db=/[&<]/g,Ta=/[^-:\w,]+/g,Ua=/([\\^$*+?.|()[{])/g,eb=/"/g,fb=/[.[\]]+/,Fa={};var sa,$a=console.debug,ra=console.error;M=function(a,b){try{w.assign(a,b)}catch(c){}};D=function(a,b){ra("Remixml expression: "+(b?JSON.stringify(b):"")+"\n",a)};E=function(a,b,c){return ua(a,c)(b)};P=function(a,b,c){return function(e){return(Array.isArray(e)?
e.join(", "):e).replace(RegExp(a,b),c)}};U=function(a){var b;da(b=a[0])&&" "===b[0]&&!(a[0]=b.substr(1))&&a.splice(0,1);var c=a.length-1;da(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,e=a.length,l=b||va;e--;){switch((c=a[e])[""]){case "!":case "<":case "?":if(!b)break;default:R(c,b);continue;case void 0:if(a[e]=l(c))continue}a.splice(e,1)}return a};
S=function(a,b){b=L(b);w.assign(b,a);delete b["::"];(a=a["::"])&&w.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,e){if(1!==a[""])if(wa(a,"_contents",function(){let g=a._c;g?g(a.slice(),b):a[""]=1;return a}),c)wa(a,"_restargs",function(){var g,u={};for(g in this)switch(g[0]){default:0<=g||c[g]||(u[g]=this[g]);case "_":case void 0:}return u});else return a;var l;
continue;case "else":d+="if(!I){";continue}d+="{let J=W,H=S({";(k=n["::"])&&(n["::"]=k.slice(0,-1)+":;");k="";for(y in n)if(f=h(y))d+=k+(Va.test(y)?y:'"'+y+'"')+":"+f,k=",";d+='},"'+r+'")'}if(!J&&(k="script"===r?Wa:"style"===r?Xa:0)){k.lastIndex=t;k.exec(a);z=k.lastIndex;d+=";";!I&&(f=a.slice(t,z-3-r.length))&&(d+="H[0]="+JSON.stringify(f)+";");t=z;J=1;break}I||(d+=";",p[2]|=2)}while(0)}if(J)for(;;){p=aa.pop();z=p[0];f=0;if(r!==z){c(r,(z?"Expected </"+z+"> got </":"Missing <")+r+">");for(J=aa.length;J;)if(aa[--J][0]===
r){f=1;break}if(!f){aa.push(p);break}}b:do{switch(z){case "noparse":if(!--g)break b;break;case "comment":if(!g){I--;break b}break;case 0:break b}if(!I)if(g)d+="J.push(H)}";else{c:do switch(z){case "set":if("{"!==d.slice(-1)&&x){J=d.slice(x).match(Ya);d=d.slice(0,x-11-ma.length)+J[1]+J[2]+";";break c}d+=p[2]&16?Da:"})}";break;case "insert":p[2]&8&&(d+=Da);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 c;case "for":d+="$=o;I=1}}";break;case "if":case "then":case "elif":case "else":d+="I=1}";break c;case "eval":d+=m;break;case "nooutput":d+="J=[];";default:p[2]&4&&(d+="};");case "script":case "style":d+=Ra;case "delimiter":d+="}"}while(0);x=0}}while(0);d=p[3]+d;if(!f){p=aa[aa.length-1];break}}break;case "&":pa.lastIndex=++t;if(!g&&(q=pa.exec(a))){t=pa.lastIndex;I||(d+=za(q)+"I=K($,H,x)}catch(x){I=0}",x=0);break}f="&";default:qa.lastIndex=t,(q=qa.exec(a))?(f+=q[0],t=
qa.lastIndex):(c(0,"Parse error"),f+=a.substr(t),t=a.length),I||(!g&&b&1&&(f=ua(f)),!f||p[2]&1&&"0}"!==d.slice(-2)&&f.match(Za)||(d+="H.push("+JSON.stringify(f)+");"))}}return d+="return H})"}function ia(a){try{var b=eval(a)}catch(c){D(c,a),$a(a),b=function(){return""}}return b}const ab=("object"==typeof document?document:null)&&window,w=Object,Ha={"+":"%2B"," ":"+","\t":"%09","\n":"%0A","\r":"%0D","?":"%3F","&":"%26","#":"%23","<":"%3C"},Ja={"&":"&amp;","<":"&lt;"},sa=/\s*,\s*/g,Sa=/\s*,\s*/,ya=
RegExp("(?:[^&]+|(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&]*))+|&([\\w$]+(?:[.[][\\w$]+]?)*\\.[\\w$]+)(?::([\\w$]*))?(?:%([^;]*))?;","y"),pa=/([\w$]+\.[\w$]+(?:[.[][\w$]+]?)*)(?::([\w$]*))?(?:%([^;]*))?;/y,na=/!(?:--(.*?)(?:--|$)|([^-].*?))(?:>|$)|\?(.*?)(?:\?>|$)/ys,oa=/(?:noparse|comment)\s/y,qa=RegExp("[^&<]+(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&<]*)*","y"),fa=/\s*((?:[^-:_a-zA-Z<&>\s\/]\s*)*)(?:([-:_a-zA-Z][-:\w]*|\/)\s*(?:=\s*("[^"]*"|'[^']*'))?|[<&>])/y,
Va=/^[_a-zA-Z]\w*$/,Wa=/<\/script>/g,Xa=/<\/style>/g,Ma=/^"([^(+]+)"$/,Oa=/^[A-Za-z_][\w]*$/,Pa=/\n/g,Qa=/[^\n]*$/,Ya=/([^=]+=).+(".*")/,Za=/^\s+$/,Na=/\s\s+/g,bb=/</g,cb=/[+ \t\n\r?&#<]/g,db=/[&<]/g,Ta=/[^-:\w,]+/g,Ua=/([\\^$*+?.|()[{])/g,eb=/"/g,fb=/[.[\]]+/,Ea={};var ra,$a=console.debug,Fa=console.error;M=function(a,b){try{w.assign(a,b)}catch(c){}};D=function(a,b){Fa("Remixml expression: "+(b?JSON.stringify(b):"")+"\n",a)};E=function(a,b,c){return ta(a,c)(b)};P=function(a,b,c){return function(e){return(Array.isArray(e)?
e.join(", "):e).replace(RegExp(a,b),c)}};U=function(a){var b;da(b=a[0])&&" "===b[0]&&!(a[0]=b.substr(1))&&a.splice(0,1);var c=a.length-1;da(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,e=a.length,l=b||ua;e--;){switch((c=a[e])[""]){case "!":case "<":case "?":if(!b)break;default:R(c,b);continue;case void 0:if(a[e]=l(c))continue}a.splice(e,1)}return a};
S=function(a,b){b=L(b);w.assign(b,a);delete b["::"];(a=a["::"])&&w.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,e){if(1!==a[""])if(va(a,"_contents",function(){let g=a._c;g?g(a.slice(),b):a[""]=1;return a}),c)va(a,"_restargs",function(){var g,u={};for(g in this)switch(g[0]){default:0<=g||c[g]||(u[g]=this[g]);case "_":case void 0:}return u});else return a;var l;
(l=w.assign({},b))._=w.assign(a,{_:b._,_tag:w.assign({},b._._tag)});e&&(l[e]=a);return l};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 e=c._._tag[b[""]];if(e)return e(a,b,c);if(e=b._c)delete b._c,e(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=w.entries(b),0<=b.length&&a.splice(b.length),c)try{a=a.sort(function(e,l){var g,u;e=c(e);l=c(l);var m=
0;for(g=e.length;m<g;m++){var d=0;Array.isArray(e[m])&&(d=1,e[m]=e[m][0],l[m]=l[m][0]);if(u=e[m]>l[m]||-(e[m]!==l[m]))break}return d?-u:u})}catch(e){D(e,c)}return a[Symbol.iterator]()};B=function(a,b,c,e){for(var l=0;l<c.length;){let g=c[l++];switch(g[""]){default:B(a,b,g,e);return;case e:b.push(C(g,a));case void 0:}}};T=function(a){var b=a.split(fb),c;a="$";for(c of b)a+=xa(c);return a};Z=function(a,b,c,e){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(!e)break;
default:b=Y(b)}else- -b==b&&(b+="");e&&!b[""]&&sa&&(b=sa(e,b,a));switch(c){case "json":b=JSON.stringify(b).replace(bb,"\\\\u003c");break;case "uric":b=b.replace(cb,Ga);break;default:b[""]||(b=Array.isArray(b)?b.join(", "):b,b=(e=Fa[c])?e(b):b.replace(db,Ia));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,["("+ya(b)+")"]);return b};O=function(a,b){var c;if(b)for(c in b)delete b[c];else b=
0;for(g=e.length;m<g;m++){var d=0;Array.isArray(e[m])&&(d=1,e[m]=e[m][0],l[m]=l[m][0]);if(u=e[m]>l[m]||-(e[m]!==l[m]))break}return d?-u:u})}catch(e){D(e,c)}return a[Symbol.iterator]()};B=function(a,b,c,e){for(var l=0;l<c.length;){let g=c[l++];switch(g[""]){default:B(a,b,g,e);return;case e:b.push(C(g,a));case void 0:}}};T=function(a){var b=a.split(fb),c;a="$";for(c of b)a+=wa(c);return a};Z=function(a,b,c,e){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(!e)break;
default:b=Y(b)}else- -b==b&&(b+="");e&&!b[""]&&ra&&(b=ra(e,b,a));switch(c){case "json":b=JSON.stringify(b).replace(bb,"\\\\u003c");break;case "uric":b=b.replace(cb,Ga);break;default:b[""]||(b=Array.isArray(b)?b.join(", "):b,b=(e=Ea[c])?e(b):b.replace(db,Ia));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,["("+xa(b)+")"]);return b};O=function(a,b){var c;if(b)for(c in b)delete b[c];else b=
[];b=w.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[""]||w.keys(a).length:0};desc=function(a){return- -a===a?-a:[a,1]};abstract2dom=function(a,b){return ha.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,e=a[""];switch(e){case "!":return"\x3c!--"+a[0]+"--\x3e";case "<":return"<!"+a[0]+">";case "?":return"<?"+a[0]+"?>";case 1:e=c="";break;default:c="<"+e;for(var l of w.keys(a).splice(a.length))switch(l[0]){default:var g=a[l];null!=g&&(g[""]&&(g=g.join("")),c+=" "+l,l!==g&&(c+='="'+(g.replace?g.replace(eb,"&dquot;"):g)+'"'));case "_":case void 0:}if(!a.length)return c+(b&&"br"!==e?"></"+e+">":"/>");c+=">"}for(g=0;void 0!==(l=a[g++]);)c+=l[""]?Y(l,b):l;e&&(c+="</"+e+">");return c};
const ha={remixml2js:ja,js2obj:ia,compile:ua,parse2txt:function(a,b,c){da(a)&&(a=ia(ja(a,c)));return Y(a(b))},abstract2txt:Y,add_filter:function(a,b){Fa[a]=b},set_proc_fmt:function(a){sa=a},set_tag:function(a,b,c,e,l){N(b);La(a,b,c,e,l)},set_log_callback:function(a){ra=a}};"function"==typeof define&&define.amd?define("remixml",[],ha):"object"==typeof exports?w.assign(exports,ha):ab.Remixml=ha}).call(this);
const ha={remixml2js:ja,js2obj:ia,compile:ta,parse2txt:function(a,b,c){da(a)&&(a=ia(ja(a,c)));return Y(a(b))},abstract2txt:Y,add_filter:function(a,b){Ea[a]=b},set_proc_fmt:function(a){ra=a},set_tag:function(a,b,c,e,l){N(b);La(a,b,c,e,l)},set_log_callback:function(a){Fa=a}};"function"==typeof define&&define.amd?define("remixml",[],ha):"object"==typeof exports?w.assign(exports,ha):ab.Remixml=ha}).call(this);
}).call(this);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc