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 5.1.1 to 5.1.2

testsuite/tag5/data.json

2

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

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

@@ -23,4 +23,3 @@ /** @license

{if(_&&!_.length&&_[""]===1)_="";return v?eval(T(v)+"=_;"):_};
function VE($,v){return eval(IA(v)?v[0]:T(v))};
function IA(s){return Array.isArray(s)}
function VE($,v){return eval(Array.isArray(v)?v[0]:T(v))};

@@ -85,2 +84,4 @@

function /** !boolean */ IA(/** * */ s) { return Array.isArray(s); }
function /** !boolean */ isstring(/** * */ s)

@@ -391,6 +392,7 @@ { return typeof s === "string"; }

x = "";
break;
break;
case 1:
if (x[""] === 1)
x = x[0];
break;
}

@@ -1079,14 +1081,13 @@ if (quot === "r")

{ for (;;)
{ if (!IA(vdom))
return vdom;
switch (vdom.length)
{ case 0:
if (vdom[""] === 1)
return "";
break;
case 1:
if (vdom[""] === 1)
{ vdom = vdom[0];
continue;
}
{ switch (vdom[""])
{ case undefined:
return vdom;
case 1:
switch (vdom.length)
{ case 0:
return "";
case 1:
vdom = vdom[0];
continue;
}
}

@@ -1113,5 +1114,7 @@ break;

{ default:
let /** string */ val = /** @type {Object} */(vdom)[narg];
if (val != null && typeof val !== "object")
{ parent += " " + narg;
let /** string|!Array */ val = /** @type {Object} */(vdom)[narg];
if (val != null)
{ if (val[""])
val = val.join("");
parent += " " + narg;
if (narg !== val)

@@ -1118,0 +1121,0 @@ parent += '="'

@@ -26,3 +26,3 @@ /** @license

// Cut END for prepend
var A,VE,IA;
var A,VE;
// Cut END for externs

@@ -32,4 +32,3 @@ // Cut BEGIN for prepend

{if(_&&!_.length&&_[""]===1)_="";return v?eval(T(v)+"=_;"):_};
function VE($,v){return eval(IA(v)?v[0]:T(v))};
function IA(s){return Array.isArray(s)}
function VE($,v){return eval(Array.isArray(v)?v[0]:T(v))};
// Cut END for prepend

@@ -94,2 +93,4 @@

function /** !boolean */ IA(/** * */ s) { return Array.isArray(s); }
function /** !boolean */ isstring(/** * */ s)

@@ -400,6 +401,7 @@ { return typeof s === "string"; }

x = "";
break;
break;
case 1:
if (x[""] === 1)
x = x[0];
break;
}

@@ -1088,14 +1090,13 @@ if (quot === "r")

{ for (;;)
{ if (!IA(vdom))
return vdom;
switch (vdom.length)
{ case 0:
if (vdom[""] === 1)
return "";
break;
case 1:
if (vdom[""] === 1)
{ vdom = vdom[0];
continue;
}
{ switch (vdom[""])
{ case undefined:
return vdom;
case 1:
switch (vdom.length)
{ case 0:
return "";
case 1:
vdom = vdom[0];
continue;
}
}

@@ -1122,5 +1123,7 @@ break;

{ default:
let /** string */ val = /** @type {Object} */(vdom)[narg];
if (val != null && typeof val !== "object")
{ parent += " " + narg;
let /** string|!Array */ val = /** @type {Object} */(vdom)[narg];
if (val != null)
{ if (val[""])
val = val.join("");
parent += " " + narg;
if (narg !== val)

@@ -1127,0 +1130,0 @@ parent += '="'

@@ -6,4 +6,3 @@ (function(){"use strict";

{if(_&&!_.length&&_[""]===1)_="";return v?eval(T(v)+"=_;"):_};
function VE($,v){return eval(IA(v)?v[0]:T(v))};
function IA(s){return Array.isArray(s)}
function VE($,v){return eval(Array.isArray(v)?v[0]:T(v))};
/*

@@ -26,21 +25,22 @@

case "comment":n||J++}if(!J){delete e.b[""];d+="W=H;";if(!n)switch(w){case "set":d+="{let H=L(),";var k=e.a("var")||e.a("variable");y=0;if(k){var oa=e.a("expr");d+=wa;p[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("+(ha(oa)||f)+");",oa=void 0;void 0!==oa&&(d+="H="+(ha(oa)||Oa("eval(Y(H))"))+";");if(f=e.a("join"))d+="H=H.join("+f+");";da("let k=H[0];H={};","H")}d.length!==y&&(y=0);k=la(k,1);
IA(k)?d+=k[0]+"=A("+(void 0!==e.b.clone?(y=0,"O(H,"+k[0]+")"):"H"):(y=0,d+="A(H,$,"+k);d+=Pa}else if(f=e.a("tag")){g();d+="v=0;Q("+f+",$,"+H+"function(H,a,$,W){let o=$;$=C(a,$,{";(f=e.a("args"))&&(f=f.replace(gb,""))&&(d+='"'+f.replace(Fa,'":1,"')+'":1');d+="}";if(f=e.a("scope"))d+=","+f;d+=");";h()}continue;case "insert":if(k=e.a("var")||e.a("variable")){d+=Na(k,e.a("quote"),e.a("format"));if(f=e.a("join"))d+="x=x.join?x.join("+f+"):x;";k=e.a("limit");if((f=e.a("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=e.a("expr")))d+="{let H=L(),"+wa+("H="+(ha(k)||Oa("eval(Y(H))"))+";W.push(A(H)")+Pa,h();else switch(e.a("variables")){case "dump":d+="log((W="+e.a("scope")+")?$[W]:$);"}continue;case "replace":k=e.a("flags");void 0===k&&(k="g");d+="{let H=L(),J=W,v=P("+(e.a("regexp")||e.a("from").replace(hb,"\\$1"))+","+JSON.stringify(k)+","+(ha(e.a("expr"))||e.a("to"))+");";m();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":h();d+="{I=0;let g,i,k,m,J=W,n=0;";d=(k=e.a("in"))?d+("g=G($,"+la(k)+((f=e.a("orderby"))?",(m=$._,function(_){let _index=_[0];$._=_=_[1];return["+ha(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="+((k=e.a("step"))?"+("+k+"||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===da("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(),d+="delete $._._tag["+f+"];";else if(f=e.a("var")||e.a("variable"))k=la(f,1),d=IA(k)?d+("delete "+k[0]+";"):d+('eval("delete "+'+T(k)+");");continue;case "delimiter":d+="if($._._recno>1){";m();continue;case "elif":f="(!I&&";case "if":d+="if"+f+"(I="+(ha(e.a("expr"))||0)+
")"+(f?")":"")+"{";m();continue;case "then":d+="if(I){";m();continue;case "else":d+="if(!I){";m();continue}d+="{let J=W,H=S({";(k=e.b["::"])&&(e.b["::"]=k.slice(0,-1)+":;");k="";for(W in e.b)if(f=e.a(W))d+=k+(ib.test(W)?'"'+W+'"':W)+":"+f,k=",";d+='},"'+w+'")'}if(!na&&(k="script"===w?jb:"style"===w?kb:0)){k.lastIndex=u;k.exec(a);da=k.lastIndex;d+=";";!J&&(f=a.slice(u,da-3-w.length))&&(d+="H[0]="+JSON.stringify(f)+";");u=da;na=1;break}J||(d+=";",p[2]|=2)}while(0)}if(na)b:for(;;){p=x.pop();f=p[0];c:do{switch(f){case "noparse":if(!--n)break c;
break;case "comment":if(!n){J--;break c}break;case 0:break c}if(!J)if(n)d+="J.push(H)}";else{d:do{switch(f){case "set":if("{"!==d.slice(-1)&&y){da=d.slice(y).match(lb);d=d.slice(0,y-11-wa.length)+da[1]+da[2]+";";break d}d+=p[2]&16?Qa:"})}";break;case "insert":p[2]&8&&(d+=Qa);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+=ca;break;case "nooutput":d+="J=[];";default:p[2]&4&&(d+="};");case "script":case "style":d+=eb;case "delimiter":d+="}"}x[x.length-1][2]|=8}while(0);y=0}}while(0);if(w!==f)for(c(w,(f?"Expected </"+f+"> got </":"Missing <")+w+">"),(f=x.length)||x.push(p);f;)if(x[--f][0]===w)continue b;d=p[3]+d;p=x[x.length-1];break}break;case "&":za.lastIndex=++u;if(!n&&(v=fa(za,a))){u=za.lastIndex;J||(d+=Ma(v)+"I=K($,H,x)}catch(x){I=0}",y=0,h());break}f="&";default:ja.lastIndex=u,fa(ja,
a)||console.error("**"+a+"**"),ja.lastIndex=u,f+=fa(ja,a)[0],u=ja.lastIndex,J||(n||(b&3?b&1&&(f=Ha(f)):f=f.replace(mb,"$1$2$3")),!f||p[2]&1&&"0}"!==d.slice(-2)&&f.match(nb)||(f=JSON.stringify(f),d+=p[2]&8?(y=0,"H.push("+f+");"):"H[0]="+(h(),f)+";"))}}return d+="return H})"}function sa(a){try{var b=eval(a)}catch(c){D(c,a),ob(a),b=function(){return""}}return b}function ka(a){return RegExp(a,Ra?"g":"y")}function fa(a,b){if(Ra){var c=a.lastIndex;return(a=a.exec(b))&&c==a.index&&a}return a.exec(b)}var pb=
("object"==typeof document?document:null)&&window,r=Object,Ra=0!=/./.sticky,Xa={"+":"%2B"," ":"+","\t":"%09","\n":"%0A","\r":"%0D","?":"%3F","&":"%26","#":"%23","<":"%3C"},Ya={"&":"&amp;","<":"&lt;"},Fa=/\s*,\s*/g,fb=/\s*,\s*/,La=ka("(?:[^&]+|(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&]*))+|&([\\w$]+(?:[.[][\\w$]+]?)*\\.[\\w$]+)(?::([\\w$]*))?(?:%([^;]*))?;"),za=ka("([\\w$]+\\.[\\w$]+(?:[.[][\\w$]+]?)*)(?::([\\w$]*))?(?:%([^;]*))?;"),xa=ka("!(?:--([\x00-\u00ff]*?)(?:--|$)|([^-][\x00-\u00ff]*?))(?:>|$)|\\?([\x00-\u00ff]*?)(?:\\?>|$)"),
ya=ka("(?:noparse|comment)\\s"),ja=ka("[^&<]+(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&<]*)*"),ia=/\s*(?:([-\w:]+|\/)\s*(?:=\s*("[^"]*"|'[^']*'))?|>)/g,ib=/[^\w]/,jb=/<\/script>/g,kb=/<\/style>/g,$a=/^"([^(+]+)"$/,bb=/^[A-Za-z_][\w]*$/,cb=/\n/g,db=/[^\n]*$/,lb=/([^=]+=).+(".*")/,nb=/^\s+$/,ab=/\s\s+/g,qb=/</g,rb=/[+ \t\n\r?&#<]/g,sb=/[&<]/g,gb=/[^-:\w,]+/g,hb=/([\\^$*+?.|()[{])/g,tb=/"/g,ub=/[.[\]]+/,mb=/(\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,
Sa={},Aa,ob=console.debug,Ta=console.error;M=function(a,b){try{r.assign(a,b)}catch(c){}};D=function(a,b){Ta("Remixml expression: "+(b?JSON.stringify(b):"")+"\n",a)};E=function(a,b,c){return Ga(a,c)(b)};P=function(a,b,c){return function(g){return g.replace(RegExp(a,b),c)}};U=function(a){var b;l(b=a[0])&&" "===b[0]&&!(a[0]=b.substr(1))&&a.splice(0,1);var c=a.length-1;l(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||Ha;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(Ia(a,
"_contents",function(){var m=a._c;m?m(a.slice(),b):a[""]=1;return a}),c)Ia(a,"_restargs",function(){var m,q={};for(m in this)switch(m[0]){default:0<=m||c[m]||(q[m]=this[m]);case "_":case void 0:}return q});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=IA(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 m,q;g=c(g);h=c(h);var n=0;for(m=g.length;n<m;n++){var H=0;IA(g[n])&&(H=1,g[n]=g[n][0],h[n]=h[n][0]);if(q=g[n]>h[n]||-(g[n]!==h[n]))break}return H?-q:q})}catch(g){D(g,c)}Ca();Ua();return a[Symbol.iterator]()};B=function(a,b,c,g){for(var h=0;h<c.length;){var m=c[h++];switch(m[""]){default:B(a,b,m,g);return;
case g:b.push(C(m,a));case void 0:}}};T=function(a){var b=a.split(ub),c;a="$";b=Wa(b);for(c=b.next();!c.done;c=b.next())c=c.value,a+=Ja(c);return a};Z=function(a,b,c,g){b=IA(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[""]&&Aa){var h=(b=Aa(g,b,a))[1];b=b[0]}switch(c){case "json":b=JSON.stringify(b).replace(qb,"\\\\u003c");break;case "uric":b=b.replace(rb,t);
break;default:b[""]||h||(IA(b)&&(b=b.join(", ")),b=(g=Sa[c])?g(b):b.replace(sb,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,["("+Ka(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 pa.abstract2dom(a,b)};abstract2txt=Y=function(a,b){for(;;){if(!IA(a))return a;switch(a.length){case 0:if(1===a[""])return"";break;case 1:if(1===a[""]){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,m=Wa(r.keys(a).splice(a.length));for(h=m.next();!h.done;h=m.next())switch(h=h.value,h[0]){default:var q=a[h];null!=q&&"object"!==typeof q&&(c+=" "+h,h!==q&&(c+='="'+(q.replace?q.replace(tb,"&dquot;"):q)+'"'));case "_":case void 0:}if(!a.length)return c+(b&&"br"!==g?"></"+g+">":"/>");c+=">"}for(h=0;void 0!==(m=a[h++]);)c+=m[""]?Y(m,b):m;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 pa={remixml2js:ta,js2obj:sa,compile:Ga,parse2txt:function(a,b,c){l(a)&&(a=sa(ta(a,c)));return Y(a(b))},abstract2txt:Y,add_filter:function(a,b){Sa[a]=b},set_proc_fmt:function(a){Aa=a},set_tag:function(a,b,c,g,h){N(b);Za(a,b,c,g,h)},set_log_callback:function(a){Ta=a}};"function"==typeof define&&define.amd?define("remixml",[],pa):"object"==typeof exports?r.assign(exports,pa):pb.Remixml=pa}).call(this);
Array.isArray(k)?d+=k[0]+"=A("+(void 0!==e.b.clone?(y=0,"O(H,"+k[0]+")"):"H"):(y=0,d+="A(H,$,"+k);d+=Pa}else if(f=e.a("tag")){g();d+="v=0;Q("+f+",$,"+H+"function(H,a,$,W){let o=$;$=C(a,$,{";(f=e.a("args"))&&(f=f.replace(gb,""))&&(d+='"'+f.replace(Fa,'":1,"')+'":1');d+="}";if(f=e.a("scope"))d+=","+f;d+=");";h()}continue;case "insert":if(k=e.a("var")||e.a("variable")){d+=Na(k,e.a("quote"),e.a("format"));if(f=e.a("join"))d+="x=x.join?x.join("+f+"):x;";k=e.a("limit");if((f=e.a("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=e.a("expr")))d+="{let H=L(),"+wa+("H="+(ha(k)||Oa("eval(Y(H))"))+";W.push(A(H)")+Pa,h();else switch(e.a("variables")){case "dump":d+="log((W="+e.a("scope")+")?$[W]:$);"}continue;case "replace":k=e.a("flags");void 0===k&&(k="g");d+="{let H=L(),J=W,v=P("+(e.a("regexp")||e.a("from").replace(hb,"\\$1"))+","+JSON.stringify(k)+","+(ha(e.a("expr"))||e.a("to"))+");";m();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":h();d+="{I=0;let g,i,k,m,J=W,n=0;";d=(k=e.a("in"))?d+("g=G($,"+la(k)+((f=e.a("orderby"))?",(m=$._,function(_){let _index=_[0];$._=_=_[1];return["+ha(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="+((k=e.a("step"))?"+("+k+"||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===da("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(),d+="delete $._._tag["+f+"];";else if(f=e.a("var")||e.a("variable"))k=la(f,1),d=Array.isArray(k)?d+("delete "+k[0]+";"):d+('eval("delete "+'+T(k)+");");continue;case "delimiter":d+="if($._._recno>1){";m();continue;case "elif":f="(!I&&";case "if":d+="if"+f+"(I="+(ha(e.a("expr"))||
0)+")"+(f?")":"")+"{";m();continue;case "then":d+="if(I){";m();continue;case "else":d+="if(!I){";m();continue}d+="{let J=W,H=S({";(k=e.b["::"])&&(e.b["::"]=k.slice(0,-1)+":;");k="";for(W in e.b)if(f=e.a(W))d+=k+(ib.test(W)?'"'+W+'"':W)+":"+f,k=",";d+='},"'+w+'")'}if(!na&&(k="script"===w?jb:"style"===w?kb:0)){k.lastIndex=u;k.exec(a);da=k.lastIndex;d+=";";!J&&(f=a.slice(u,da-3-w.length))&&(d+="H[0]="+JSON.stringify(f)+";");u=da;na=1;break}J||(d+=";",p[2]|=2)}while(0)}if(na)b:for(;;){p=x.pop();f=p[0];
c:do{switch(f){case "noparse":if(!--n)break c;break;case "comment":if(!n){J--;break c}break;case 0:break c}if(!J)if(n)d+="J.push(H)}";else{d:do{switch(f){case "set":if("{"!==d.slice(-1)&&y){da=d.slice(y).match(lb);d=d.slice(0,y-11-wa.length)+da[1]+da[2]+";";break d}d+=p[2]&16?Qa:"})}";break;case "insert":p[2]&8&&(d+=Qa);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+=ca;break;case "nooutput":d+="J=[];";default:p[2]&4&&(d+="};");case "script":case "style":d+=eb;case "delimiter":d+="}"}x[x.length-1][2]|=8}while(0);y=0}}while(0);if(w!==f)for(c(w,(f?"Expected </"+f+"> got </":"Missing <")+w+">"),(f=x.length)||x.push(p);f;)if(x[--f][0]===w)continue b;d=p[3]+d;p=x[x.length-1];break}break;case "&":za.lastIndex=++u;if(!n&&(v=fa(za,a))){u=za.lastIndex;J||(d+=
Ma(v)+"I=K($,H,x)}catch(x){I=0}",y=0,h());break}f="&";default:ja.lastIndex=u,fa(ja,a)||console.error("**"+a+"**"),ja.lastIndex=u,f+=fa(ja,a)[0],u=ja.lastIndex,J||(n||(b&3?b&1&&(f=Ha(f)):f=f.replace(mb,"$1$2$3")),!f||p[2]&1&&"0}"!==d.slice(-2)&&f.match(nb)||(f=JSON.stringify(f),d+=p[2]&8?(y=0,"H.push("+f+");"):"H[0]="+(h(),f)+";"))}}return d+="return H})"}function sa(a){try{var b=eval(a)}catch(c){D(c,a),ob(a),b=function(){return""}}return b}function ka(a){return RegExp(a,Ra?"g":"y")}function fa(a,
b){if(Ra){var c=a.lastIndex;return(a=a.exec(b))&&c==a.index&&a}return a.exec(b)}var pb=("object"==typeof document?document:null)&&window,r=Object,Ra=0!=/./.sticky,Xa={"+":"%2B"," ":"+","\t":"%09","\n":"%0A","\r":"%0D","?":"%3F","&":"%26","#":"%23","<":"%3C"},Ya={"&":"&amp;","<":"&lt;"},Fa=/\s*,\s*/g,fb=/\s*,\s*/,La=ka("(?:[^&]+|(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&]*))+|&([\\w$]+(?:[.[][\\w$]+]?)*\\.[\\w$]+)(?::([\\w$]*))?(?:%([^;]*))?;"),za=ka("([\\w$]+\\.[\\w$]+(?:[.[][\\w$]+]?)*)(?::([\\w$]*))?(?:%([^;]*))?;"),
xa=ka("!(?:--([\x00-\u00ff]*?)(?:--|$)|([^-][\x00-\u00ff]*?))(?:>|$)|\\?([\x00-\u00ff]*?)(?:\\?>|$)"),ya=ka("(?:noparse|comment)\\s"),ja=ka("[^&<]+(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&<]*)*"),ia=/\s*(?:([-\w:]+|\/)\s*(?:=\s*("[^"]*"|'[^']*'))?|>)/g,ib=/[^\w]/,jb=/<\/script>/g,kb=/<\/style>/g,$a=/^"([^(+]+)"$/,bb=/^[A-Za-z_][\w]*$/,cb=/\n/g,db=/[^\n]*$/,lb=/([^=]+=).+(".*")/,nb=/^\s+$/,ab=/\s\s+/g,qb=/</g,rb=/[+ \t\n\r?&#<]/g,sb=/[&<]/g,gb=/[^-:\w,]+/g,hb=/([\\^$*+?.|()[{])/g,
tb=/"/g,ub=/[.[\]]+/,mb=/(\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,Sa={},Aa,ob=console.debug,Ta=console.error;M=function(a,b){try{r.assign(a,b)}catch(c){}};D=function(a,b){Ta("Remixml expression: "+(b?JSON.stringify(b):"")+"\n",a)};E=function(a,b,c){return Ga(a,c)(b)};P=function(a,b,c){return function(g){return g.replace(RegExp(a,b),c)}};U=function(a){var b;l(b=a[0])&&" "===
b[0]&&!(a[0]=b.substr(1))&&a.splice(0,1);var c=a.length-1;l(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||Ha;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(Ia(a,"_contents",function(){var m=a._c;m?m(a.slice(),b):a[""]=1;return a}),c)Ia(a,"_restargs",function(){var m,q={};for(m in this)switch(m[0]){default:0<=m||c[m]||(q[m]=this[m]);case "_":case void 0:}return q});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 m,q;g=c(g);h=c(h);var n=0;for(m=g.length;n<m;n++){var H=0;Array.isArray(g[n])&&(H=1,g[n]=g[n][0],
h[n]=h[n][0]);if(q=g[n]>h[n]||-(g[n]!==h[n]))break}return H?-q:q})}catch(g){D(g,c)}Ca();Ua();return a[Symbol.iterator]()};B=function(a,b,c,g){for(var h=0;h<c.length;){var m=c[h++];switch(m[""]){default:B(a,b,m,g);return;case g:b.push(C(m,a));case void 0:}}};T=function(a){var b=a.split(ub),c;a="$";b=Wa(b);for(c=b.next();!c.done;c=b.next())c=c.value,a+=Ja(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[""]&&Aa){var h=(b=Aa(g,b,a))[1];b=b[0]}switch(c){case "json":b=JSON.stringify(b).replace(qb,"\\\\u003c");break;case "uric":b=b.replace(rb,t);break;default:b[""]||h||(Array.isArray(b)&&(b=b.join(", ")),b=(g=Sa[c])?g(b):b.replace(sb,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,["("+Ka(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 pa.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,m=Wa(r.keys(a).splice(a.length));for(h=m.next();!h.done;h=m.next())switch(h=h.value,h[0]){default:var q=a[h];null!=q&&(q[""]&&(q=q.join("")),c+=" "+h,h!==q&&(c+='="'+(q.replace?q.replace(tb,"&dquot;"):q)+'"'));case "_":case void 0:}if(!a.length)return c+(b&&"br"!==g?"></"+g+">":"/>");c+=">"}for(h=0;void 0!==(m=a[h++]);)c+=
m[""]?Y(m,b):m;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 pa={remixml2js:ta,js2obj:sa,compile:Ga,parse2txt:function(a,b,c){l(a)&&(a=sa(ta(a,c)));return Y(a(b))},abstract2txt:Y,add_filter:function(a,b){Sa[a]=b},set_proc_fmt:function(a){Aa=a},set_tag:function(a,b,c,g,h){N(b);Za(a,b,c,g,h)},set_log_callback:function(a){Ta=
a}};"function"==typeof define&&define.amd?define("remixml",[],pa):"object"==typeof exports?r.assign(exports,pa):pb.Remixml=pa}).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