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

elements-lite

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elements-lite - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

30

dist/index-min.js

@@ -1,16 +0,16 @@

!function(w,m,h){function H(a,b,d){for(var g=[],r=a.firstChild,c=I(b);b=r;){if(c(b)){if(d)return b;g.push(b)}for(r=b.firstChild||b.nextSibling;!r&&(b=b.parentNode)!==a;)r=b.nextSibling}return d?null:g}function I(a){return J[a]||(J[a]=Function("_,v,a,b","return "+a.split(aa).map(function(a){var d,g,c=["_&&_.nodeType==1"],x=a.replace(ba,function(a,b,c,r){g=r+b.length;d=b.trim();return""});(a=a.slice(g).replace(K,function(a,b,d,g,x,f,e){c.push("((v='"+(g||(e?f.slice(1,-1):f)||"").replace(/'/g,"\\'")+
"'),(a='"+d+"'),1)",L[":"==b?d:b]||"(a=_.getAttribute(a))"+(x?"&&"+L[x]:f?"==v":""));return""}))&&"*"!=a&&(c[0]+="&&_.nodeName=='"+a.toUpperCase()+"'");x&&c.push("+"==d?"(a=_.previousSibling)":"(a=_.parentNode)",(d?"a.matches&&a.matches('":"a.closest&&a.closest('")+x+"')");return c.join("&&")}).join("||")))}function f(a,b,d){var g={};a=a.replace(K,function(a,b,d,c,f,e,k){e=k?e.slice(1,-1):e||d;g[b="."==b?(f="~","class"):"#"==b?"id":d]=f&&g[b]?"^"==f?e+g[b]:g[b]+("~"==f?" ":"")+e:e;return""})||"div";
a=(B[a]||(B[a]=m.createElement(a))).cloneNode(!0).attr(g);return d||!b?a:("object"==typeof b?k:y).call(a,b)}function y(a,b){var d,g=0,c=typeof a;if(a){if("string"==c||"number"==c)a=m.createTextNode(a);else if(!("nodeType"in a)&&"length"in a){c=a.length;for(d=m.createDocumentFragment();g<c;)y.call(d,a[g++]);a=d}a.nodeType&&(c=this.insertBefore?this:this[this.length-1],c.insertBefore(a,(!0===b?c.firstChild:"number"==typeof b?c.childNodes[0>b?c.childNodes.length-b-2:b]:b)||null))}return this}function z(a){return-1<
!function(w,l,k){function H(a,b,d){for(var h=[],r=a.firstChild,c=I(b);b=r;){if(c(b)){if(d)return b;h.push(b)}for(r=b.firstChild||b.nextSibling;!r&&(b=b.parentNode)!==a;)r=b.nextSibling}return d?null:h}function I(a){return J[a]||(J[a]=Function("_,v,a,b","return "+a.split(aa).map(function(a){var d,h,c=["_&&_.nodeType==1"],x=a.replace(ba,function(a,b,c,r){h=r+b.length;d=b.trim();return""});(a=a.slice(h).replace(K,function(a,b,d,h,x,e,f){c.push("((v='"+(h||(f?e.slice(1,-1):e)||"").replace(/'/g,"\\'")+
"'),(a='"+d+"'),1)",L[":"==b?d:b]||"(a=_.getAttribute(a))"+(x?"&&"+L[x]:e?"==v":""));return""}))&&"*"!=a&&(c[0]+="&&_.nodeName=='"+a.toUpperCase()+"'");x&&c.push("+"==d?"(a=_.previousSibling)":"(a=_.parentNode)",(d?"a.matches&&a.matches('":"a.closest&&a.closest('")+x+"')");return c.join("&&")}).join("||")))}function e(a,b,d){var h={};a=a.replace(K,function(a,b,d,c,e,g,f){g=f?g.slice(1,-1):g||d;h[b="."==b?(e="~","class"):"#"==b?"id":d]=e&&h[b]?"^"==e?g+h[b]:h[b]+("~"==e?" ":"")+g:g;return""})||"div";
a=(B[a]||(B[a]=l.createElement(a))).cloneNode(!0).attr(h);return d||!b?a:("object"==typeof b?m:y).call(a,b)}function y(a,b){var d,h=0,c=typeof a;if(a){if("string"==c||"number"==c)a=l.createTextNode(a);else if(!("nodeType"in a)&&"length"in a){c=a.length;for(d=l.createDocumentFragment();h<c;)y.call(d,a[h++]);a=d}a.nodeType&&(c=this.insertBefore?this:this[this.length-1],c.insertBefore(a,(!0===b?c.firstChild:"number"==typeof b?c.childNodes[0>b?c.childNodes.length-b-2:b]:b)||null))}return this}function z(a){return-1<
this.className.split(/\s+/).indexOf(a)}function C(a){var b=this.className;b&&(a=z.call(this,a)?b:b+" "+a);b!=a&&(this.className=a);return this}function M(a){z.call(this,a)&&(this.className=(" "+this.className+" ").replace(" "+a+" "," ").trim());return this}function N(a,b){1==arguments.length&&(b=!z.call(this,a));return(b?C:M).call(this,a),b}function O(){var a;this.emit&&this.emit("kill");this.parentNode&&this.parentNode.removeChild(this);Event.removeAll&&Event.removeAll(this);this.empty&&this.empty();
(a=this.attr&&this.attr("data-scope"))&&delete p[a];this.valObject&&(this.valObject=null);return this}function k(a,b){var d;if(a&&a.constructor==Object){for(b in a)k.call(this,b,a[b]);return this}d=this.getAttribute(a);if(1==arguments.length)return d;!ca||"id"!=a&&"name"!=a&&"checked"!=a?"class"==a?C.call(this,b):b||0===b?d!=b&&this.setAttribute(a,b):d&&this.removeAttribute(a):this.mergeAttributes(P("<INPUT "+a+'="'+b+'">'),!1)}function p(a,b,d){if(d=p[k.call(a,"data-scope")])return d;b&&!0!==b||
(d=(d=Q.call(a,"[data-scope]"))&&p[k.call(d,"data-scope")]||R);b&&(k.call(a,"data-scope",++S),d=p[S]=Object.create(b=d||b),d._super=b);return d}function T(a,b){var d,c,f;if(1!=this.nodeType)return this;a=p[k.call(this,"data-scope")]||a||(d=Q.call(this,"[data-scope]"))&&p[k.call(d,"data-scope")]||R;if(d=!b&&k.call(this,"data-bind")){c=d;f="data b r->data&&("+d.replace(da,function(a,b,d){return q[b]?(ea.call(q[b],"once")&&(c=c.replace(a,"")),"(r=b['"+b+"'].call(this"+(q[b].raw?",data,'"+d+"'":d?","+
d:"")+")||r),"):"this.attr('"+b+"',"+d+"),"})+"r)";d!=c&&k.call(this,"data-bind",c);try{if(Fn(f,this,a)(a,q))return this}catch(e){e.message+=" in binding: "+d;console.error(e);if(w.onerror)w.onerror(e.message,e.fileName,e.lineNumber);return this}}for(d=this.firstChild;d;d=c)c=d.nextSibling,T.call(d,a);D&&"SELECT"==this.nodeName&&this.parentNode.insertBefore(this,this);return this}function t(a){for(var b=this.length=a.length;b--;)this[b]=a[b]}function U(a){var b="closest"==a||"find"==a;E[a]=function(){for(var d,
g=0,e=this.length;g<e;)if(d=c[a].apply(this[g++],arguments),b&&d)return d;return b?null:this}}function V(a,b){this.name=b;this.parent=a;this.el=f("div");this.el.plugin=this}function A(a){this.txtMode=this.parent=a;this.txt="";this.plugin=this.el=this}function e(a,b){b=e[F(b)||u];return b[a]||b[a=a.slice(a.indexOf(":")+1)||a]||a}function F(a){return a&&(e[a=(""+a).toLowerCase()]||e[a=a.split("-")[0]])&&a}function W(a){(a=F(a))&&u!=a&&(e[u=e.current=a]=e[u]||{});return u}function X(a,b){-1==e.list.indexOf(a)&&
e.list.push(a);Object.merge(e[a]||(e[a]={}),b);u||W(a)}var u,v,ea=Object[h].hasOwnProperty,E=[],Y=m.body,P=m.createElement,G="textContent"in Y?"textContent":"innerText",B=f.cache={},S=0,R=f.data={_:e},c=(w.HTMLElement||w.Element||f)[h],Z=/^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w\:.#\[\]=])*)[ \t]*(.*?)$/gm,da=/[;\s]*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g,q=f.bindings={"class":function(a,b){N.call(this,a,2>arguments.length||b)},css:function(a,b){this.style[a.camelCase()]=b||""},data:function(a,
b){this.attr("data-"+a,b)},html:function(a){this.innerHTML=a}},D=!+"\v1",ca=D&&8>(m.documentMode|0),fa=c.matches=c.matches||function(a){return!!I(a)(this)},Q=c.closest=c.closest||function(a){for(var b=this;b;b=b.parentNode)if(fa.call(b,a))return b;return null},K=/([.#:[])([-\w]+)(?:\((.+?)\)|([~^$*|]?)=(("|')(?:\\?.)*?\6|[-\w]+))?]?/g,ba=/([\s>+]*)(?:("|')(?:\\?.)*?\2|\(.+?\)|[^\s+>])+$/,aa=/\s*,\s*(?=(?:[^'"()]|"(?:\\?.)*?"|'(?:\\?.)*?'|\(.+?\))+$)/,J={},L={"first-child":"(a=_.parentNode)&&a.firstChild==_",
"last-child":"(a=_.parentNode)&&a.lastChild==_",".":"~_.className.split(/\\s+/).indexOf(a)","#":"_.id==a","^":"!a.indexOf(v)","|":"a.split('-')[0]==v",$:"a.slice(-v.length)==v","~":"~a.split(/\\s+/).indexOf(v)","*":"~a.indexOf(v)"};w.El=f;c.append=y;c.after=function(a,b){y.call(a.parentNode,this,b?a:a.nextSibling);return this};c.to=function(a,b){y.call(a,this,b);return this};c.hasClass=z;c.addClass=C;c.rmClass=M;c.toggleClass=N;c.empty=function(){for(var a;a=this.firstChild;)O.call(a);return this};
c.kill=O;c.on=function(a,b){Event.add(this,a,b);return this};c.non=function(a,b){Event.remove(this,a,b);return this};c.emit=function(){Event.Emitter.emit.apply(this,arguments)};c.attr=k;f.scope=p;c.render=T;c.txt=q.txt=function(a){return arguments.length&&this[G]!=a?this[G]=a:this[G]};c.val=q.val=function(a){var b=this,d=b.type,c=b.options;if(arguments.length)return b.value=a;if(c){if("select-multiple"==d){a=[];for(d=0;b=c[d++];)b.selected&&!b.disabled&&a.push(b.valObject||b.value);return a}a=b.selectedIndex;
b=-1<a&&c[a]||b}return"checkbox"!=d&&"radio"!=d||b.checked?b.valObject||b.value:null};c.find=!D&&c.querySelector||function(a){return H(this,a,!0)};c.findAll=c.querySelectorAll?function(a){return new t(this.querySelectorAll(a))}:function(a){return new t(H(this,a))};f.wrap=t;t[h]=E;Object.keys(c).each(U);U("closest");E.cloneNode=function(a){return new t(this.map(function(b){return b.cloneNode(a)}))};c==f[h]&&(m.createElement=function(a){return Object.merge(P(a),c)},Object.merge(Y,c));f[h]=c;f.css=function(a){v||
(v=f("style").to(m.getElementsByTagName("head")[0]));v.styleSheet?v.styleSheet.cssText+=a:v.appendChild(m.createTextNode(a))};V[h]={_done:function(){var a=1<this.el.childNodes.length?new t(this.el.childNodes):this.el.firstChild;this.el.plugin=this.el=this.parent=null;return a},done:function(){var a=this.parent;B[this.name]=this._done();return a}};A[h].done=Fn("Function(this.txt)(),this.parent");f.plugins={binding:A.extend({done:function(){Object.merge(q,Function("return({"+this.txt+"})")());return this.parent}}),
css:A.extend({done:Fn("El.css(this.txt),this.parent")}),js:A,template:V};f.view=f.tpl=function(a){function b(a,d,m,n,l,h){for(l=d.length;l<=e[0];)e.shift(),c=c.plugin?c.plugin.done():c.parentNode||c[0].parentNode;c.txtMode?c.txt+=a+"\n":m?f.plugins[n]?(c=(new f.plugins[n](c,h)).el,e.unshift(l)):c.append(a):(n&&(c=f(n,0,1).to(c),e.unshift(l)),h&&(l=h.charAt(0),n=h.slice(1),">"==l?(d+" "+n).replace(Z,b):"|"==l||"\\"==l?c.append(n):"/"!=l&&("&"!=l&&(n=("INPUT"==c.tagName?"val":"txt")+":_('"+h.replace(/'/g,
"\\'")+"').format(data)"),l=k.call(c,"data-bind"),k.call(c,"data-bind",(l?l+";":"")+n))))}var d=m.createDocumentFragment(),c=d,e=[-1];a.replace(Z,b);d=d.childNodes;return 1==d.length?d[0]:d};f.i18n=e;e.list=[];e.get=F;e.use=W;e.add=X;e.def=function(a){Object.each(a,function(b,c){X(c,a)})};String[h].lang=function(a){return e(this,a)}}(window,document,"prototype");
(a=this.attr&&this.attr("data-scope"))&&delete p[a];this.valObject&&(this.valObject=null);return this}function m(a,b){var d;if(a&&a.constructor==Object){for(b in a)m.call(this,b,a[b]);return this}d=this.getAttribute(a);if(1==arguments.length)return d;!ca||"id"!=a&&"name"!=a&&"checked"!=a?"class"==a?C.call(this,b):b||0===b?d!=b&&this.setAttribute(a,b):d&&this.removeAttribute(a):this.mergeAttributes(P("<INPUT "+a+'="'+b+'">'),!1)}function p(a,b,d){if(d=p[m.call(a,"data-scope")])return d;b&&!0!==b||
(d=(d=Q.call(a,"[data-scope]"))&&p[m.call(d,"data-scope")]||R);b&&(m.call(a,"data-scope",++S),d=p[S]=Object.create(b=d||b),d._super=b);return d}function T(a,b){var d,c,e;if(1!=this.nodeType)return this;a=p[m.call(this,"data-scope")]||a||(d=Q.call(this,"[data-scope]"))&&p[m.call(d,"data-scope")]||R;if(d=!b&&m.call(this,"data-bind")){c=d;e="data b r->data&&("+d.replace(da,function(a,b,d){return q[b]?(ea.call(q[b],"once")&&(c=c.replace(a,"")),"(r=b['"+b+"'].call(this"+(q[b].raw?",data,'"+d+"'":d?","+
d:"")+")||r),"):"this.attr('"+b+"',"+d+"),"})+"r)";d!=c&&m.call(this,"data-bind",c);try{if(Fn(e,this,a)(a,q))return this}catch(f){f.message+=" in binding: "+d;console.error(f);if(w.onerror)w.onerror(f.message,f.fileName,f.lineNumber);return this}}for(d=this.firstChild;d;d=c)c=d.nextSibling,T.call(d,a);D&&"SELECT"==this.nodeName&&this.parentNode.insertBefore(this,this);return this}function t(a){for(var b=this.length=a.length;b--;)this[b]=a[b]}function U(a){var b="closest"==a||"find"==a;E[a]=function(){for(var d,
h=0,e=this.length;h<e;)if(d=c[a].apply(this[h++],arguments),b&&d)return d;return b?null:this}}function V(a,b){this.name=b;this.parent=a;this.el=e("div");this.el.plugin=this}function A(a){this.txtMode=this.parent=a;this.txt="";this.plugin=this.el=this}function f(a,b){b=f[F(b)||u];return b[a]||b[a=a.slice(a.indexOf(":")+1)||a]||a}function F(a){return a&&(f[a=(""+a).toLowerCase()]||f[a=a.split("-")[0]])&&a}function W(a){(a=F(a))&&u!=a&&(f[u=f.current=a]=f[u]||{});return u}function X(a,b){-1==f.list.indexOf(a)&&
f.list.push(a);Object.merge(f[a]||(f[a]={}),b);u||W(a)}var u,v,ea=Object[k].hasOwnProperty,E=[],Y=l.body,P=l.createElement,G="textContent"in Y?"textContent":"innerText",B=e.cache={},S=0,R=e.data={_:f},c=(w.HTMLElement||w.Element||e)[k],Z=/^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w\:.#\[\]=])*)[ \t]*(.*?)$/gm,da=/[;\s]*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g,q=e.bindings={"class":function(a,b){N.call(this,a,2>arguments.length||b)},css:function(a,b){this.style[a.camelCase()]=b||""},data:function(a,
b){this.attr("data-"+a,b)},html:function(a){this.innerHTML=a}},D=!+"\v1",ca=D&&8>(l.documentMode|0),fa=c.matches=c.matches||function(a){return!!I(a)(this)},Q=c.closest=c.closest||function(a){for(var b=this;b&&1==b.nodeType;b=b.parentNode)if(fa.call(b,a))return b;return null},K=/([.#:[])([-\w]+)(?:\((.+?)\)|([~^$*|]?)=(("|')(?:\\?.)*?\6|[-\w]+))?]?/g,ba=/([\s>+]*)(?:("|')(?:\\?.)*?\2|\(.+?\)|[^\s+>])+$/,aa=/\s*,\s*(?=(?:[^'"()]|"(?:\\?.)*?"|'(?:\\?.)*?'|\(.+?\))+$)/,J={},L={"first-child":"(a=_.parentNode)&&a.firstChild==_",
"last-child":"(a=_.parentNode)&&a.lastChild==_",".":"~_.className.split(/\\s+/).indexOf(a)","#":"_.id==a","^":"!a.indexOf(v)","|":"a.split('-')[0]==v",$:"a.slice(-v.length)==v","~":"~a.split(/\\s+/).indexOf(v)","*":"~a.indexOf(v)"};w.El=e;c.append=y;c.after=function(a,b){y.call(a.parentNode,this,b?a:a.nextSibling);return this};c.to=function(a,b){y.call(a,this,b);return this};c.hasClass=z;c.addClass=C;c.rmClass=M;c.toggleClass=N;c.empty=function(){for(var a;a=this.firstChild;)O.call(a);return this};
c.kill=O;c.on=function(a,b){Event.add(this,a,b);return this};c.non=function(a,b){Event.remove(this,a,b);return this};c.emit=function(){Event.Emitter.emit.apply(this,arguments)};c.attr=m;e.scope=p;c.render=T;c.txt=q.txt=function(a){return arguments.length&&this[G]!=a?this[G]=a:this[G]};c.val=q.val=function(a){var b=this,d=b.type,c=b.options;if(arguments.length)return b.value=a;if(c){if("select-multiple"==d){a=[];for(d=0;b=c[d++];)b.selected&&!b.disabled&&a.push(b.valObject||b.value);return a}a=b.selectedIndex;
b=-1<a&&c[a]||b}return"checkbox"!=d&&"radio"!=d||b.checked?b.valObject||b.value:null};c.find=!D&&c.querySelector||function(a){return H(this,a,!0)};c.findAll=c.querySelectorAll?function(a){return new t(this.querySelectorAll(a))}:function(a){return new t(H(this,a))};e.wrap=t;t[k]=E;Object.keys(c).each(U);U("closest");E.cloneNode=function(a){return new t(this.map(function(b){return b.cloneNode(a)}))};c==e[k]&&(l.createElement=function(a){return Object.merge(P(a),c)},Object.merge(Y,c));e[k]=c;e.css=function(a){v||
(v=e("style").to(l.getElementsByTagName("head")[0]));v.styleSheet?v.styleSheet.cssText+=a:v.appendChild(l.createTextNode(a))};V[k]={_done:function(){var a=1<this.el.childNodes.length?new t(this.el.childNodes):this.el.firstChild;this.el.plugin=this.el=this.parent=null;return a},done:function(){var a=this.parent;B[this.name]=this._done();return a}};A[k].done=Fn("Function(this.txt)(),this.parent");e.plugins={binding:A.extend({done:function(){Object.merge(q,Function("return({"+this.txt+"})")());return this.parent}}),
css:A.extend({done:Fn("El.css(this.txt),this.parent")}),js:A,template:V};e.view=e.tpl=function(a){function b(a,d,l,n,g,k){for(g=d.length;g<=f[0];)f.shift(),c=c.plugin?c.plugin.done():c.parentNode||c[0].parentNode;c.txtMode?c.txt+=a+"\n":l?e.plugins[n]?(c=(new e.plugins[n](c,k)).el,f.unshift(g)):c.append(a):(n&&(c=e(n,0,1).to(c),f.unshift(g)),k&&(g=k.charAt(0),n=k.slice(1),">"==g?(d+" "+n).replace(Z,b):"|"==g||"\\"==g?c.append(n):"/"!=g&&("&"!=g&&(n=("INPUT"==c.tagName?"val":"txt")+":_('"+k.replace(/'/g,
"\\'")+"').format(data)"),g=m.call(c,"data-bind"),m.call(c,"data-bind",(g?g+";":"")+n))))}var d=l.createDocumentFragment(),c=d,f=[-1];a.replace(Z,b);d=d.childNodes;return 1==d.length?d[0]:d};e.i18n=f;f.list=[];f.get=F;f.use=W;f.add=X;f.def=function(a,b){for(b in a)X(b,a)}}(window,document,"prototype");

@@ -1,13 +0,13 @@

!function(u,k,n){function f(a,b,c){var e={};a=a.replace(selectorRe,function(a,b,c,d,f,h,g){h=g?h.slice(1,-1):h||c;e[b="."==b?(f="~","class"):"#"==b?"id":c]=f&&e[b]?"^"==f?h+e[b]:e[b]+("~"==f?" ":"")+h:h;return""})||"div";a=(z[a]||(z[a]=k.createElement(a))).cloneNode(!0).attr(e);return c||!b?a:("object"==typeof b?l:v).call(a,b)}function v(a,b){var c,e=0,d=typeof a;if(a){if("string"==d||"number"==d)a=k.createTextNode(a);else if(!("nodeType"in a)&&"length"in a){d=a.length;for(c=k.createDocumentFragment();e<
!function(u,k,q){function f(a,b,c){var e={};a=a.replace(selectorRe,function(a,b,c,d,f,h,g){h=g?h.slice(1,-1):h||c;e[b="."==b?(f="~","class"):"#"==b?"id":c]=f&&e[b]?"^"==f?h+e[b]:e[b]+("~"==f?" ":"")+h:h;return""})||"div";a=(z[a]||(z[a]=k.createElement(a))).cloneNode(!0).attr(e);return c||!b?a:("object"==typeof b?l:v).call(a,b)}function v(a,b){var c,e=0,d=typeof a;if(a){if("string"==d||"number"==d)a=k.createTextNode(a);else if(!("nodeType"in a)&&"length"in a){d=a.length;for(c=k.createDocumentFragment();e<
d;)v.call(c,a[e++]);a=c}a.nodeType&&(d=this.insertBefore?this:this[this.length-1],d.insertBefore(a,(!0===b?d.firstChild:"number"==typeof b?d.childNodes[0>b?d.childNodes.length-b-2:b]:b)||null))}return this}function x(a){return-1<this.className.split(/\s+/).indexOf(a)}function A(a){var b=this.className;b&&(a=x.call(this,a)?b:b+" "+a);b!=a&&(this.className=a);return this}function E(a){x.call(this,a)&&(this.className=(" "+this.className+" ").replace(" "+a+" "," ").trim());return this}function F(a,b){1==
arguments.length&&(b=!x.call(this,a));return(b?A:E).call(this,a),b}function G(){var a;this.emit&&this.emit("kill");this.parentNode&&this.parentNode.removeChild(this);Event.removeAll&&Event.removeAll(this);this.empty&&this.empty();(a=this.attr&&this.attr("data-scope"))&&delete p[a];this.valObject&&(this.valObject=null);return this}function l(a,b){var c;if(a&&a.constructor==Object){for(b in a)l.call(this,b,a[b]);return this}c=this.getAttribute(a);if(1==arguments.length)return c;"class"==a?A.call(this,
b):b||0===b?c!=b&&this.setAttribute(a,b):c&&this.removeAttribute(a)}function p(a,b,c){if(c=p[l.call(a,"data-scope")])return c;b&&!0!==b||(c=(c=H.call(a,"[data-scope]"))&&p[l.call(c,"data-scope")]||I);b&&(l.call(a,"data-scope",++J),c=p[J]=Object.create(b=c||b),c._super=b);return c}function K(a,b){var c,e,d;if(1!=this.nodeType)return this;a=p[l.call(this,"data-scope")]||a||(c=H.call(this,"[data-scope]"))&&p[l.call(c,"data-scope")]||I;if(c=!b&&l.call(this,"data-bind")){e=c;d="data b r->data&&("+c.replace(Q,
function(a,b,c){return q[b]?(R.call(q[b],"once")&&(e=e.replace(a,"")),"(r=b['"+b+"'].call(this"+(q[b].raw?",data,'"+c+"'":c?","+c:"")+")||r),"):"this.attr('"+b+"',"+c+"),"})+"r)";c!=e&&l.call(this,"data-bind",e);try{if(Fn(d,this,a)(a,q))return this}catch(f){f.message+=" in binding: "+c;console.error(f);if(u.onerror)u.onerror(f.message,f.fileName,f.lineNumber);return this}}for(c=this.firstChild;c;c=e)e=c.nextSibling,K.call(c,a);return this}function w(a){for(var b=this.length=a.length;b--;)this[b]=
arguments.length&&(b=!x.call(this,a));return(b?A:E).call(this,a),b}function G(){var a;this.emit&&this.emit("kill");this.parentNode&&this.parentNode.removeChild(this);Event.removeAll&&Event.removeAll(this);this.empty&&this.empty();(a=this.attr&&this.attr("data-scope"))&&delete n[a];this.valObject&&(this.valObject=null);return this}function l(a,b){var c;if(a&&a.constructor==Object){for(b in a)l.call(this,b,a[b]);return this}c=this.getAttribute(a);if(1==arguments.length)return c;"class"==a?A.call(this,
b):b||0===b?c!=b&&this.setAttribute(a,b):c&&this.removeAttribute(a)}function n(a,b,c){if(c=n[l.call(a,"data-scope")])return c;b&&!0!==b||(c=(c=H.call(a,"[data-scope]"))&&n[l.call(c,"data-scope")]||I);b&&(l.call(a,"data-scope",++J),c=n[J]=Object.create(b=c||b),c._super=b);return c}function K(a,b){var c,e,d;if(1!=this.nodeType)return this;a=n[l.call(this,"data-scope")]||a||(c=H.call(this,"[data-scope]"))&&n[l.call(c,"data-scope")]||I;if(c=!b&&l.call(this,"data-bind")){e=c;d="data b r->data&&("+c.replace(Q,
function(a,b,c){return p[b]?(R.call(p[b],"once")&&(e=e.replace(a,"")),"(r=b['"+b+"'].call(this"+(p[b].raw?",data,'"+c+"'":c?","+c:"")+")||r),"):"this.attr('"+b+"',"+c+"),"})+"r)";c!=e&&l.call(this,"data-bind",e);try{if(Fn(d,this,a)(a,p))return this}catch(f){f.message+=" in binding: "+c;console.error(f);if(u.onerror)u.onerror(f.message,f.fileName,f.lineNumber);return this}}for(c=this.firstChild;c;c=e)e=c.nextSibling,K.call(c,a);return this}function w(a){for(var b=this.length=a.length;b--;)this[b]=
a[b]}function L(a){var b="closest"==a||"find"==a;B[a]=function(){for(var c,e=0,f=this.length;e<f;)if(c=d[a].apply(this[e++],arguments),b&&c)return c;return b?null:this}}function M(a,b){this.name=b;this.parent=a;this.el=f("div");this.el.plugin=this}function y(a){this.txtMode=this.parent=a;this.txt="";this.plugin=this.el=this}function g(a,b){b=g[C(b)||r];return b[a]||b[a=a.slice(a.indexOf(":")+1)||a]||a}function C(a){return a&&(g[a=(""+a).toLowerCase()]||g[a=a.split("-")[0]])&&a}function N(a){(a=C(a))&&
r!=a&&(g[r=g.current=a]=g[r]||{});return r}function O(a,b){-1==g.list.indexOf(a)&&g.list.push(a);Object.merge(g[a]||(g[a]={}),b);r||N(a)}var r,t,R=Object[n].hasOwnProperty,B=[],D="textContent"in k.body?"textContent":"innerText",z=f.cache={},J=0,I=f.data={_:g},d=(u.HTMLElement||u.Element||f)[n],P=/^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w\:.#\[\]=])*)[ \t]*(.*?)$/gm,Q=/[;\s]*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g,q=f.bindings={"class":function(a,b){F.call(this,a,2>arguments.length||b)},css:function(a,
r!=a&&(g[r=g.current=a]=g[r]||{});return r}function O(a,b){-1==g.list.indexOf(a)&&g.list.push(a);Object.merge(g[a]||(g[a]={}),b);r||N(a)}var r,t,R=Object[q].hasOwnProperty,B=[],D="textContent"in k.body?"textContent":"innerText",z=f.cache={},J=0,I=f.data={_:g},d=(u.HTMLElement||u.Element||f)[q],P=/^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w\:.#\[\]=])*)[ \t]*(.*?)$/gm,Q=/[;\s]*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g,p=f.bindings={"class":function(a,b){F.call(this,a,2>arguments.length||b)},css:function(a,
b){this.style[a.camelCase()]=b||""},data:function(a,b){this.attr("data-"+a,b)},html:function(a){this.innerHTML=a}},H=d.closest;u.El=f;d.append=v;d.after=function(a,b){v.call(a.parentNode,this,b?a:a.nextSibling);return this};d.to=function(a,b){v.call(a,this,b);return this};d.hasClass=x;d.addClass=A;d.rmClass=E;d.toggleClass=F;d.empty=function(){for(var a;a=this.firstChild;)G.call(a);return this};d.kill=G;d.on=function(a,b){Event.add(this,a,b);return this};d.non=function(a,b){Event.remove(this,a,b);
return this};d.emit=function(){Event.Emitter.emit.apply(this,arguments)};d.attr=l;f.scope=p;d.render=K;d.txt=q.txt=function(a){return arguments.length&&this[D]!=a?this[D]=a:this[D]};d.val=q.val=function(a){var b=this,c=b.type,e=b.options;if(arguments.length)return b.value=a;if(e){if("select-multiple"==c){a=[];for(c=0;b=e[c++];)b.selected&&!b.disabled&&a.push(b.valObject||b.value);return a}a=b.selectedIndex;b=-1<a&&e[a]||b}return"checkbox"!=c&&"radio"!=c||b.checked?b.valObject||b.value:null};d.find=
d.querySelector;d.findAll=function(a){return new w(this.querySelectorAll(a))};f.wrap=w;w[n]=B;Object.keys(d).each(L);L("closest");B.cloneNode=function(a){return new w(this.map(function(b){return b.cloneNode(a)}))};f[n]=d;f.css=function(a){t||(t=f("style").to(k.getElementsByTagName("head")[0]));t.styleSheet?t.styleSheet.cssText+=a:t.appendChild(k.createTextNode(a))};M[n]={_done:function(){var a=1<this.el.childNodes.length?new w(this.el.childNodes):this.el.firstChild;this.el.plugin=this.el=this.parent=
null;return a},done:function(){var a=this.parent;z[this.name]=this._done();return a}};y[n].done=Fn("Function(this.txt)(),this.parent");f.plugins={binding:y.extend({done:function(){Object.merge(q,Function("return({"+this.txt+"})")());return this.parent}}),css:y.extend({done:Fn("El.css(this.txt),this.parent")}),js:y,template:M};f.view=f.tpl=function(a){function b(a,c,g,m,h,k){for(h=c.length;h<=d[0];)d.shift(),e=e.plugin?e.plugin.done():e.parentNode||e[0].parentNode;e.txtMode?e.txt+=a+"\n":g?f.plugins[m]?
(e=(new f.plugins[m](e,k)).el,d.unshift(h)):e.append(a):(m&&(e=f(m,0,1).to(e),d.unshift(h)),k&&(h=k.charAt(0),m=k.slice(1),">"==h?(c+" "+m).replace(P,b):"|"==h||"\\"==h?e.append(m):"/"!=h&&("&"!=h&&(m=("INPUT"==e.tagName?"val":"txt")+":_('"+k.replace(/'/g,"\\'")+"').format(data)"),h=l.call(e,"data-bind"),l.call(e,"data-bind",(h?h+";":"")+m))))}var c=k.createDocumentFragment(),e=c,d=[-1];a.replace(P,b);c=c.childNodes;return 1==c.length?c[0]:c};f.i18n=g;g.list=[];g.get=C;g.use=N;g.add=O;g.def=function(a){Object.each(a,
function(b,c){O(c,a)})};String[n].lang=function(a){return g(this,a)}}(window,document,"prototype");
return this};d.emit=function(){Event.Emitter.emit.apply(this,arguments)};d.attr=l;f.scope=n;d.render=K;d.txt=p.txt=function(a){return arguments.length&&this[D]!=a?this[D]=a:this[D]};d.val=p.val=function(a){var b=this,c=b.type,e=b.options;if(arguments.length)return b.value=a;if(e){if("select-multiple"==c){a=[];for(c=0;b=e[c++];)b.selected&&!b.disabled&&a.push(b.valObject||b.value);return a}a=b.selectedIndex;b=-1<a&&e[a]||b}return"checkbox"!=c&&"radio"!=c||b.checked?b.valObject||b.value:null};d.find=
d.querySelector;d.findAll=function(a){return new w(this.querySelectorAll(a))};f.wrap=w;w[q]=B;Object.keys(d).each(L);L("closest");B.cloneNode=function(a){return new w(this.map(function(b){return b.cloneNode(a)}))};f[q]=d;f.css=function(a){t||(t=f("style").to(k.getElementsByTagName("head")[0]));t.styleSheet?t.styleSheet.cssText+=a:t.appendChild(k.createTextNode(a))};M[q]={_done:function(){var a=1<this.el.childNodes.length?new w(this.el.childNodes):this.el.firstChild;this.el.plugin=this.el=this.parent=
null;return a},done:function(){var a=this.parent;z[this.name]=this._done();return a}};y[q].done=Fn("Function(this.txt)(),this.parent");f.plugins={binding:y.extend({done:function(){Object.merge(p,Function("return({"+this.txt+"})")());return this.parent}}),css:y.extend({done:Fn("El.css(this.txt),this.parent")}),js:y,template:M};f.view=f.tpl=function(a){function b(a,c,g,m,h,k){for(h=c.length;h<=d[0];)d.shift(),e=e.plugin?e.plugin.done():e.parentNode||e[0].parentNode;e.txtMode?e.txt+=a+"\n":g?f.plugins[m]?
(e=(new f.plugins[m](e,k)).el,d.unshift(h)):e.append(a):(m&&(e=f(m,0,1).to(e),d.unshift(h)),k&&(h=k.charAt(0),m=k.slice(1),">"==h?(c+" "+m).replace(P,b):"|"==h||"\\"==h?e.append(m):"/"!=h&&("&"!=h&&(m=("INPUT"==e.tagName?"val":"txt")+":_('"+k.replace(/'/g,"\\'")+"').format(data)"),h=l.call(e,"data-bind"),l.call(e,"data-bind",(h?h+";":"")+m))))}var c=k.createDocumentFragment(),e=c,d=[-1];a.replace(P,b);c=c.childNodes;return 1==c.length?c[0]:c};f.i18n=g;g.list=[];g.get=C;g.use=N;g.add=O;g.def=function(a,
b){for(b in a)O(b,a)}}(window,document,"prototype");

@@ -5,4 +5,4 @@

/*
* @version 1.0.0
* @date 2016-03-12
* @version 1.0.1
* @date 2016-04-04
* @stability 3 - Stable

@@ -56,3 +56,3 @@ * @author Lauri Rooden <lauri@rooden.ee>

, closest = proto.closest = proto.closest || function(selector) {
for (var el = this; el; el = el.parentNode) {
for (var el = this; el && el.nodeType == 1; el = el.parentNode) {
if (matches.call(el, selector)) return el

@@ -662,10 +662,7 @@ }

i18n.add = i18nAdd
i18n.def = function(map) {
Object.each(map, function(name, tag) {
i18nAdd(tag, map)
})
i18n.def = function(map, key) {
for (key in map) {
i18nAdd(key, map)
}
}
String[protoStr].lang = function(lang) {
return i18n(this, lang)
}
// navigator.userLanguage for IE, navigator.language for others

@@ -672,0 +669,0 @@ // var lang = navigator.language || navigator.userLanguage;

{
"name": "elements-lite",
"version": "1.0.0",
"version": "1.0.1",
"stability": 3,

@@ -5,0 +5,0 @@ "author": "Lauri Rooden <lauri@rooden.ee>",

@@ -7,4 +7,4 @@ [1]: https://secure.travis-ci.org/litejs/elements-lite.png

@version 1.0.0
@date 2016-03-12
@version 1.0.1
@date 2016-04-04
@stability 3 - Stable

@@ -11,0 +11,0 @@

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