New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@webcomponents/shadycss

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webcomponents/shadycss - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

2

package.json
{
"name": "@webcomponents/shadycss",
"version": "1.6.0",
"version": "1.7.0",
"description": "Styling helpers for ShadyDOM",

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

@@ -10,4 +10,4 @@ (function(){/*

*/
'use strict';var l,aa="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function n(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}
function p(a){a=a.replace(ba,"").replace(ca,"");var b=da,c=a,e=new n;e.start=0;e.end=c.length;for(var d=e,f=0,g=c.length;f<g;f++)if("{"===c[f]){d.rules||(d.rules=[]);var h=d,k=h.rules[h.rules.length-1]||null;d=new n;d.start=f+1;d.parent=h;d.previous=k;h.rules.push(d)}else"}"===c[f]&&(d.end=f+1,d=d.parent||e);return b(e,a)}
'use strict';var k,aa="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function n(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}
function p(a){a=a.replace(ba,"").replace(ca,"");var b=da,c=a,e=new n;e.start=0;e.end=c.length;for(var d=e,f=0,g=c.length;f<g;f++)if("{"===c[f]){d.rules||(d.rules=[]);var h=d,l=h.rules[h.rules.length-1]||null;d=new n;d.start=f+1;d.parent=h;d.previous=l;h.rules.push(d)}else"}"===c[f]&&(d.end=f+1,d=d.parent||e);return b(e,a)}
function da(a,b){var c=b.substring(a.start,a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&(c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=ea(c),c=c.replace(fa," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=0===c.indexOf("@"),a.atRule?0===c.indexOf("@media")?a.type=ha:c.match(ia)&&(a.type=q,a.keyframesName=a.selector.split(fa).pop()):a.type=0===c.indexOf("--")?ja:ka);if(c=a.rules)for(var e=0,d=c.length,f=void 0;e<d&&(f=c[e]);e++)da(f,

@@ -20,40 +20,41 @@ b);return a}function ea(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(a,c){a=c;for(c=6-a.length;c--;)a="0"+a;return"\\"+a})}

function D(a,b){for(var c=0,e=a.length;b<e;b++)if("("===a[b])c++;else if(")"===a[b]&&0===--c)return b;return-1}function Aa(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");var e=D(a,c+3),d=a.substring(c+4,e);c=a.substring(0,c);a=Aa(a.substring(e+1),b);e=d.indexOf(",");return-1===e?b(c,d.trim(),"",a):b(c,d.substring(0,e).trim(),d.substring(e+1).trim(),a)}function E(a,b){r?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)}
function F(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||""):(b=a.is,c=a.extends);return{is:b,s:c}}function Ba(a){for(var b=[],c="",e=0;0<=e&&e<a.length;e++)if("("===a[e]){var d=D(a,e);c+=a.slice(e,d+1);e=d}else","===a[e]?(b.push(c),c=""):c+=a[e];c&&b.push(c);return b}
function G(a){if(void 0!==v)return v;if(void 0===a.__cssBuild){var b=a.getAttribute("css-build");if(b)a.__cssBuild=b;else{a:{b="template"===a.localName?a.content.firstChild:a.firstChild;if(b instanceof Comment&&(b=b.textContent.trim().split(":"),"css-build"===b[0])){b=b[1];break a}b=""}if(""!==b){var c="template"===a.localName?a.content.firstChild:a.firstChild;c.parentNode.removeChild(c)}a.__cssBuild=b}}return a.__cssBuild||""}
function H(a){a=void 0===a?"":a;return""!==a&&u?r?"shadow"===a:"shady"===a:!1};function I(){}function Ca(a,b){J(K,a,function(a){L(a,b||"")})}function J(a,b,c){b.nodeType===Node.ELEMENT_NODE&&c(b);var e;"template"===b.localName?e=(b.content||b._content||b).childNodes:e=b.children||b.childNodes;if(e)for(b=0;b<e.length;b++)J(a,e[b],c)}
function L(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),a.classList.remove(b)):(a.classList.add("style-scope"),a.classList.add(b));else if(a.getAttribute){var e=a.getAttribute("class");c?e&&(b=e.replace("style-scope","").replace(b,""),E(a,b)):E(a,(e?e+" ":"")+"style-scope "+b)}}function Da(a,b,c){J(K,a,function(a){L(a,b,!0);L(a,c)})}function Ea(a,b){J(K,a,function(a){L(a,b||"",!0)})}
function M(a,b,c,e,d){var f=K;d=void 0===d?"":d;""===d&&(r||"shady"===(void 0===e?"":e)?d=y(b,c):(a=F(a),d=Fa(f,b,a.is,a.s,c)+"\n\n"));return d.trim()}function Fa(a,b,c,e,d){var f=Ga(c,e);c=c?"."+c:"";return y(b,function(b){b.c||(b.selector=b.h=Ha(a,b,a.b,c,f),b.c=!0);d&&d(b,c,f)})}function Ga(a,b){return b?"[is="+a+"]":a}function Ha(a,b,c,e,d){var f=Ba(b.selector);if(!xa(b)){b=0;for(var g=f.length,h=void 0;b<g&&(h=f[b]);b++)f[b]=c.call(a,h,e,d)}return f.filter(function(a){return!!a}).join(",")}
function Ia(a){return a.replace(Ja,function(a,c,e){-1<e.indexOf("+")?e=e.replace(/\+/g,"___"):-1<e.indexOf("___")&&(e=e.replace(/___/g,"+"));return":"+c+"("+e+")"})}function Ka(a){for(var b=[],c;c=a.match(La);){var e=c.index,d=D(a,e);if(-1===d)throw Error(c.input+" selector missing ')'");c=a.slice(e,d+1);a=a.replace(c,"\ue000");b.push(c)}return{w:a,matches:b}}function Ma(a,b){var c=a.split("\ue000");return b.reduce(function(a,b,f){return a+b+c[f+1]},c[0])}
I.prototype.b=function(a,b,c){var e=!1;a=a.trim();var d=Ja.test(a);d&&(a=a.replace(Ja,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),a=Ia(a));var f=La.test(a);if(f){var g=Ka(a);a=g.w;g=g.matches}a=a.replace(Na,":host $1");a=a.replace(Oa,function(a,d,f){e||(a=Pa(f,d,b,c),e=e||a.stop,d=a.F,f=a.value);return d+f});f&&(a=Ma(a,g));d&&(a=Ia(a));return a};
function Pa(a,b,c,e){var d=a.indexOf("::slotted");0<=a.indexOf(":host")?a=Qa(a,e):0!==d&&(a=c?Ra(a,c):a);c=!1;0<=d&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(Sa,function(a,b){return" > "+b}))}a=a.replace(Ta,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,F:b,stop:f}}function Ra(a,b){a=a.split(/(\[.+?\])/);for(var c=[],e=0;e<a.length;e++)if(1===e%2)c.push(a[e]);else{var d=a[e];if(""!==d||e!==a.length-1)d=d.split(":"),d[0]+=b,c.push(d.join(":"))}return c.join("")}
function Qa(a,b){var c=a.match(Ua);return(c=c&&c[2].trim()||"")?c[0].match(Va)?a.replace(Ua,function(a,c,f){return b+f}):c.split(Va)[0]===b?c:"should_not_match":a.replace(":host",b)}function Wa(a){":root"===a.selector&&(a.selector="html")}I.prototype.c=function(a){return a.match(":host")?"":a.match("::slotted")?this.b(a,":not(.style-scope)"):Ra(a.trim(),":not(.style-scope)")};aa.Object.defineProperties(I.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});
var Ja=/:(nth[-\w]+)\(([^)]+)\)/,Oa=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Va=/[[.:#*]/,Na=/^(::slotted)/,Ua=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Sa=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ta=/(.*):dir\((?:(ltr|rtl))\)/,La=/:(?:matches|any|-(?:webkit|moz)-any)/,K=new I;function N(a,b,c,e,d){this.l=a||null;this.b=b||null;this.c=c||[];this.o=null;this.cssBuild=d||"";this.s=e||"";this.a=this.i=this.m=null}function P(a){return a?a.__styleInfo:null}function Xa(a,b){return a.__styleInfo=b}N.prototype.g=function(){return this.l};N.prototype._getStyleRules=N.prototype.g;function Ya(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Za=navigator.userAgent.match("Trident");function $a(){}function ab(a){var b={},c=[],e=0;z(a,function(a){Q(a);a.index=e++;a=a.f.cssText;for(var c;c=sa.exec(a);){var d=c[1];":"!==c[2]&&(b[d]=!0)}},function(a){c.push(a)});a.b=c;a=[];for(var d in b)a.push(d);return a}
var F=window.ShadyDOM&&window.ShadyDOM.wrap||function(a){return a};function G(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||""):(b=a.is,c=a.extends);return{is:b,s:c}}function Ba(a){for(var b=[],c="",e=0;0<=e&&e<a.length;e++)if("("===a[e]){var d=D(a,e);c+=a.slice(e,d+1);e=d}else","===a[e]?(b.push(c),c=""):c+=a[e];c&&b.push(c);return b}
function H(a){if(void 0!==v)return v;if(void 0===a.__cssBuild){var b=a.getAttribute("css-build");if(b)a.__cssBuild=b;else{a:{b="template"===a.localName?a.content.firstChild:a.firstChild;if(b instanceof Comment&&(b=b.textContent.trim().split(":"),"css-build"===b[0])){b=b[1];break a}b=""}if(""!==b){var c="template"===a.localName?a.content.firstChild:a.firstChild;c.parentNode.removeChild(c)}a.__cssBuild=b}}return a.__cssBuild||""}
function Ca(a){a=void 0===a?"":a;return""!==a&&u?r?"shadow"===a:"shady"===a:!1};function I(){}function Da(a,b){J(K,a,function(a){L(a,b||"")})}function J(a,b,c){b.nodeType===Node.ELEMENT_NODE&&c(b);var e;"template"===b.localName?e=(b.content||b._content||b).childNodes:e=b.children||b.childNodes;if(e)for(b=0;b<e.length;b++)J(a,e[b],c)}
function L(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),a.classList.remove(b)):(a.classList.add("style-scope"),a.classList.add(b));else if(a.getAttribute){var e=a.getAttribute("class");c?e&&(b=e.replace("style-scope","").replace(b,""),E(a,b)):E(a,(e?e+" ":"")+"style-scope "+b)}}function Ea(a,b,c){J(K,a,function(a){L(a,b,!0);L(a,c)})}function Fa(a,b){J(K,a,function(a){L(a,b||"",!0)})}
function M(a,b,c,e,d){var f=K;d=void 0===d?"":d;""===d&&(r||"shady"===(void 0===e?"":e)?d=y(b,c):(a=G(a),d=Ga(f,b,a.is,a.s,c)+"\n\n"));return d.trim()}function Ga(a,b,c,e,d){var f=Ha(c,e);c=c?"."+c:"";return y(b,function(b){b.c||(b.selector=b.h=Ia(a,b,a.b,c,f),b.c=!0);d&&d(b,c,f)})}function Ha(a,b){return b?"[is="+a+"]":a}function Ia(a,b,c,e,d){var f=Ba(b.selector);if(!xa(b)){b=0;for(var g=f.length,h=void 0;b<g&&(h=f[b]);b++)f[b]=c.call(a,h,e,d)}return f.filter(function(a){return!!a}).join(",")}
function Ja(a){return a.replace(Ka,function(a,c,e){-1<e.indexOf("+")?e=e.replace(/\+/g,"___"):-1<e.indexOf("___")&&(e=e.replace(/___/g,"+"));return":"+c+"("+e+")"})}function La(a){for(var b=[],c;c=a.match(Ma);){var e=c.index,d=D(a,e);if(-1===d)throw Error(c.input+" selector missing ')'");c=a.slice(e,d+1);a=a.replace(c,"\ue000");b.push(c)}return{w:a,matches:b}}function Na(a,b){var c=a.split("\ue000");return b.reduce(function(a,b,f){return a+b+c[f+1]},c[0])}
I.prototype.b=function(a,b,c){var e=!1;a=a.trim();var d=Ka.test(a);d&&(a=a.replace(Ka,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),a=Ja(a));var f=Ma.test(a);if(f){var g=La(a);a=g.w;g=g.matches}a=a.replace(Oa,":host $1");a=a.replace(Pa,function(a,d,f){e||(a=Qa(f,d,b,c),e=e||a.stop,d=a.F,f=a.value);return d+f});f&&(a=Na(a,g));d&&(a=Ja(a));return a};
function Qa(a,b,c,e){var d=a.indexOf("::slotted");0<=a.indexOf(":host")?a=Ra(a,e):0!==d&&(a=c?Sa(a,c):a);c=!1;0<=d&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(Ta,function(a,b){return" > "+b}))}a=a.replace(Ua,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,F:b,stop:f}}function Sa(a,b){a=a.split(/(\[.+?\])/);for(var c=[],e=0;e<a.length;e++)if(1===e%2)c.push(a[e]);else{var d=a[e];if(""!==d||e!==a.length-1)d=d.split(":"),d[0]+=b,c.push(d.join(":"))}return c.join("")}
function Ra(a,b){var c=a.match(Va);return(c=c&&c[2].trim()||"")?c[0].match(Wa)?a.replace(Va,function(a,c,f){return b+f}):c.split(Wa)[0]===b?c:"should_not_match":a.replace(":host",b)}function Xa(a){":root"===a.selector&&(a.selector="html")}I.prototype.c=function(a){return a.match(":host")?"":a.match("::slotted")?this.b(a,":not(.style-scope)"):Sa(a.trim(),":not(.style-scope)")};aa.Object.defineProperties(I.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});
var Ka=/:(nth[-\w]+)\(([^)]+)\)/,Pa=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Wa=/[[.:#*]/,Oa=/^(::slotted)/,Va=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ta=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ua=/(.*):dir\((?:(ltr|rtl))\)/,Ma=/:(?:matches|any|-(?:webkit|moz)-any)/,K=new I;function N(a,b,c,e,d){this.m=a||null;this.b=b||null;this.c=c||[];this.o=null;this.cssBuild=d||"";this.s=e||"";this.a=this.i=this.l=null}function P(a){return a?a.__styleInfo:null}function Ya(a,b){return a.__styleInfo=b}N.prototype.g=function(){return this.m};N.prototype._getStyleRules=N.prototype.g;function Za(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var $a=navigator.userAgent.match("Trident");function ab(){}function bb(a){var b={},c=[],e=0;z(a,function(a){Q(a);a.index=e++;a=a.f.cssText;for(var c;c=sa.exec(a);){var d=c[1];":"!==c[2]&&(b[d]=!0)}},function(a){c.push(a)});a.b=c;a=[];for(var d in b)a.push(d);return a}
function Q(a){if(!a.f){var b={},c={};R(a,c)&&(b.j=c,a.rules=null);b.cssText=a.parsedCssText.replace(va,"").replace(w,"");a.f=b}}function R(a,b){var c=a.f;if(c){if(c.j)return Object.assign(b,c.j),!0}else{c=a.parsedCssText;for(var e;a=w.exec(c);){e=(a[2]||a[3]).trim();if("inherit"!==e||"unset"!==e)b[a[1].trim()]=e;e=!0}return e}}
function S(a,b,c){b&&(b=0<=b.indexOf(";")?bb(a,b,c):Aa(b,function(b,d,f,g){if(!d)return b+g;(d=S(a,c[d],c))&&"initial"!==d?"apply-shim-inherit"===d&&(d="inherit"):d=S(a,c[f]||f,c)||f;return b+(d||"")+g}));return b&&b.trim()||""}
function bb(a,b,c){b=b.split(";");for(var e=0,d,f;e<b.length;e++)if(d=b[e]){x.lastIndex=0;if(f=x.exec(d))d=S(a,c[f[1]],c);else if(f=d.indexOf(":"),-1!==f){var g=d.substring(f);g=g.trim();g=S(a,g,c)||g;d=d.substring(0,f)+g}b[e]=d&&d.lastIndexOf(";")===d.length-1?d.slice(0,-1):d||""}return b.join(";")}
function cb(a,b){var c={},e=[];z(a,function(a){a.f||Q(a);var d=a.h||a.parsedSelector;b&&a.f.j&&d&&Ya.call(b,d)&&(R(a,c),a=a.index,d=parseInt(a/32,10),e[d]=(e[d]||0)|1<<a%32)},null,!0);return{j:c,key:e}}
function db(a,b,c,e){b.f||Q(b);if(b.f.j){var d=F(a);a=d.is;d=d.s;d=a?Ga(a,d):"html";var f=b.parsedSelector,g=":host > *"===f||"html"===f,h=0===f.indexOf(":host")&&!g;"shady"===c&&(g=f===d+" > *."+d||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(d));if(g||h)c=d,h&&(b.h||(b.h=Ha(K,b,K.b,a?"."+a:"",d)),c=b.h||d),e({w:c,J:h,R:g})}}function eb(a,b,c){var e={},d={};z(b,function(b){db(a,b,c,function(c){Ya.call(a._element||a,c.w)&&(c.J?R(b,e):R(b,d))})},null,!0);return{K:d,I:e}}
function fb(a,b,c,e){var d=F(b),f=Ga(d.is,d.s),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=P(b);d=h.l;h=h.cssBuild;var k=gb(d,e);return M(b,d,function(b){var d="";b.f||Q(b);b.f.cssText&&(d=bb(a,b.f.cssText,c));b.cssText=d;if(!r&&!xa(b)&&b.cssText){var h=d=b.cssText;null==b.B&&(b.B=ta.test(d));if(b.B)if(null==b.u){b.u=[];for(var m in k)h=k[m],h=h(d),d!==h&&(d=h,b.u.push(m))}else{for(m=0;m<b.u.length;++m)h=k[b.u[m]],d=h(d);h=d}b.cssText=h;b.h=b.h||b.selector;
d="."+e;m=Ba(b.h);h=0;for(var vb=m.length,O=void 0;h<vb&&(O=m[h]);h++)m[h]=O.match(g)?O.replace(f,d):d+" "+O;b.selector=m.join(",")}},h)}function gb(a,b){a=a.b;var c={};if(!r&&a)for(var e=0,d=a[e];e<a.length;d=a[++e]){var f=d,g=b;f.g=new RegExp("\\b"+f.keyframesName+"(?!\\B|-)","g");f.a=f.keyframesName+"-"+g;f.h=f.h||f.selector;f.selector=f.h.replace(f.keyframesName,f.a);c[d.keyframesName]=hb(d)}return c}function hb(a){return function(b){return b.replace(a.g,a.a)}}
function ib(a,b){var c=T,e=A(a);a.textContent=y(e,function(a){var d=a.cssText=a.parsedCssText;a.f&&a.f.cssText&&(d=d.replace(ma,"").replace(na,""),a.cssText=bb(c,d,b))})}aa.Object.defineProperties($a.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var T=new $a;var U={},V=window.customElements;if(V&&!r){var jb=V.define;V.define=function(a,b,c){U[a]||(U[a]=za(a));jb.call(V,a,b,c)}};function kb(){this.cache={}}kb.prototype.store=function(a,b,c,e){var d=this.cache[a]||[];d.push({j:b,styleElement:c,i:e});100<d.length&&d.shift();this.cache[a]=d};function lb(){}var mb=new RegExp(K.a+"\\s*([^\\s]*)");function nb(a){return(a=(a.classList&&a.classList.value?a.classList.value:a.getAttribute("class")||"").match(mb))?a[1]:""}function ob(a){var b=a.getRootNode();return b===a||b===a.ownerDocument?"":(a=b.host)?F(a).is:""}
function pb(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var e=0;e<c.addedNodes.length;e++){var d=c.addedNodes[e];if(d.nodeType===Node.ELEMENT_NODE){var f=d.getRootNode(),g=nb(d);if(g&&f===d.ownerDocument&&("style"!==d.localName&&"template"!==d.localName||""===G(d)))Ea(d,g);else if(f instanceof ShadowRoot)for(f=ob(d),f!==g&&Da(d,g,f),d=window.ShadyDOM.nativeMethods.querySelectorAll.call(d,":not(."+K.a+")"),g=0;g<d.length;g++){f=d[g];
var h=ob(f);h&&L(f,h)}}}}}
if(!(r||window.ShadyDOM&&window.ShadyDOM.handlesDynamicScoping)){var qb=new MutationObserver(pb),rb=function(a){qb.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)rb(document);else{var sb=function(){rb(document.body)};window.HTMLImports?window.HTMLImports.whenReady(sb):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){sb();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",
a)}else sb()})}lb=function(){pb(qb.takeRecords())}}var tb=lb;var W={};var ub=Promise.resolve();function wb(a){if(a=W[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function xb(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function yb(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a._validating||(a._validating=!0,ub.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a._validating=!1}))};var zb=new kb;function X(){this.A={};this.c=document.documentElement;var a=new n;a.rules=[];this.g=Xa(this.c,new N(a));this.v=!1;this.b=this.a=null}l=X.prototype;l.flush=function(){tb()};l.H=function(a){return A(a)};l.O=function(a){return y(a)};l.prepareTemplate=function(a,b,c){this.prepareTemplateDom(a,b);this.prepareTemplateStyles(a,b,c)};
l.prepareTemplateStyles=function(a,b,c){if(!a._prepared){r||U[b]||(U[b]=za(b));a._prepared=!0;a.name=b;a.extends=c;W[b]=a;var e=G(a),d=H(e);c={is:b,extends:c};var f=[];for(var g=a.content.querySelectorAll("style"),h=0;h<g.length;h++){var k=g[h];if(k.hasAttribute("shady-unscoped")){if(!r){var m=k.textContent;wa.has(m)||(wa.add(m),m=k.cloneNode(!0),document.head.appendChild(m));k.parentNode.removeChild(k)}}else f.push(k.textContent),k.parentNode.removeChild(k)}f=f.join("").trim();Y(this);if(!d){if(g=
!e)g=x.test(f)||w.test(f),x.lastIndex=0,w.lastIndex=0;h=p(f);g&&u&&this.a&&this.a.transformRules(h,b);a._styleAst=h}g=[];u||(g=ab(a._styleAst));if(!g.length||u)h=r?a.content:null,b=U[b]||null,e=M(c,a._styleAst,null,e,d?f:""),e=e.length?B(e,c.is,h,b):null,a._style=e;a.a=g}};l.prepareTemplateDom=function(a,b){var c=G(a);r||"shady"===c||a._domPrepared||(a._domPrepared=!0,Ca(a.content,b))};
function Ab(a){!a.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(a.b=window.ShadyCSS.CustomStyleInterface,a.b.transformCallback=function(b){a.C(b)},a.b.validateCallback=function(){requestAnimationFrame(function(){(a.b.enqueued||a.v)&&a.flushCustomStyles()})})}function Y(a){!a.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(a.a=window.ShadyCSS.ApplyShim,a.a.invalidCallback=wb);Ab(a)}
l.flushCustomStyles=function(){Y(this);if(this.b){var a=this.b.processStyles();if(this.b.enqueued&&!H(this.g.cssBuild)){if(u){if(!this.g.cssBuild)for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);if(c&&u&&this.a){var e=A(c);Y(this);this.a.transformRules(e);c.textContent=y(e)}}}else{Bb(this,this.c,this.g);for(b=0;b<a.length;b++)(c=this.b.getStyleForCustomStyle(a[b]))&&ib(c,this.g.m);this.v&&this.styleDocument()}this.b.enqueued=!1}}};
l.styleElement=function(a,b){var c=P(a);if(!c){var e=F(a);c=e.is;e=e.s;var d=U[c]||null;c=W[c];if(c){var f=c._styleAst;var g=c.a;var h=G(c)}f=new N(f,d,g,e,h);c&&Xa(a,f);c=f}a!==this.c&&(this.v=!0);b&&(c.o=c.o||{},Object.assign(c.o,b));if(u){b=c;f=F(a).is;if(b.o){g=b.o;for(var k in g)null===k?a.style.removeProperty(k):a.style.setProperty(k,g[k])}if(!(!(k=W[f])&&a!==this.c||k&&""!==G(k))&&k&&k._style&&!xb(k)){if(xb(k)||k._applyShimValidatingVersion!==k._applyShimNextVersion)Y(this),this.a&&this.a.transformRules(k._styleAst,
f),k._style.textContent=M(a,b.l),yb(k);r&&(f=a.shadowRoot)&&(f=f.querySelector("style"))&&(f.textContent=M(a,b.l));b.l=k._styleAst}}else if(k=c,this.flush(),Bb(this,a,k),k.c&&k.c.length){b=F(a).is;a:{if(f=zb.cache[b])for(g=f.length-1;0<=g;g--){h=f[g];b:{c=k.c;for(e=0;e<c.length;e++)if(d=c[e],h.j[d]!==k.m[d]){c=!1;break b}c=!0}if(c){f=h;break a}}f=void 0}c=f?f.styleElement:null;g=k.i;(h=f&&f.i)||(h=this.A[b]=(this.A[b]||0)+1,h=b+"-"+h);k.i=h;h=k.i;e=T;e=c?c.textContent||"":fb(e,a,k.m,h);d=P(a);var m=
d.a;m&&!r&&m!==c&&(m._useCount--,0>=m._useCount&&m.parentNode&&m.parentNode.removeChild(m));r?d.a?(d.a.textContent=e,c=d.a):e&&(c=B(e,h,a.shadowRoot,d.b)):c?c.parentNode||(Za&&-1<e.indexOf("@media")&&(c.textContent=e),ya(c,null,d.b)):e&&(c=B(e,h,null,d.b));c&&(c._useCount=c._useCount||0,d.a!=c&&c._useCount++,d.a=c);h=c;r||(c=k.i,d=e=a.getAttribute("class")||"",g&&(d=e.replace(new RegExp("\\s*x-scope\\s*"+g+"\\s*","g")," ")),d+=(d?" ":"")+"x-scope "+c,e!==d&&E(a,d));f||zb.store(b,k.m,h,k.i)}};
function Cb(a,b){return(b=b.getRootNode().host)?P(b)?b:Cb(a,b):a.c}function Bb(a,b,c){a=Cb(a,b);var e=P(a);a=Object.create(e.m||null);var d=eb(b,c.l,c.cssBuild);b=cb(e.l,b).j;Object.assign(a,d.I,b,d.K);b=c.o;for(var f in b)if((d=b[f])||0===d)a[f]=d;f=T;b=Object.getOwnPropertyNames(a);for(d=0;d<b.length;d++)e=b[d],a[e]=S(f,a[e],a);c.m=a}l.styleDocument=function(a){this.styleSubtree(this.c,a)};
l.styleSubtree=function(a,b){var c=a.shadowRoot;(c||a===this.c)&&this.styleElement(a,b);if(b=c&&(c.children||c.childNodes))for(a=0;a<b.length;a++)this.styleSubtree(b[a]);else if(a=a.children||a.childNodes)for(b=0;b<a.length;b++)this.styleSubtree(a[b])};
l.C=function(a){var b=this,c=G(a);c!==this.g.cssBuild&&(this.g.cssBuild=c);if(!H(c)){var e=A(a);z(e,function(a){if(r)Wa(a);else{var d=K;a.selector=a.parsedSelector;Wa(a);a.selector=a.h=Ha(d,a,d.c,void 0,void 0)}u&&""===c&&(Y(b),b.a&&b.a.transformRule(a))});u?a.textContent=y(e):this.g.l.rules.push(e)}};l.getComputedStyleValue=function(a,b){var c;u||(c=(P(a)||P(Cb(this,a))).m[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};
l.N=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var e=a.getAttribute("class");if(e){e=e.split(/\s/);for(var d=0;d<e.length;d++)if(e[d]===K.a){c=e[d+1];break}}}c&&b.push(K.a,c);u||(c=P(a))&&c.i&&b.push(T.a,c.i);E(a,b.join(" "))};l.D=function(a){return P(a)};l.M=function(a,b){L(a,b)};l.P=function(a,b){L(a,b,!0)};l.L=function(a){return ob(a)};l.G=function(a){return nb(a)};X.prototype.flush=X.prototype.flush;X.prototype.prepareTemplate=X.prototype.prepareTemplate;
function S(a,b,c){b&&(b=0<=b.indexOf(";")?cb(a,b,c):Aa(b,function(b,d,f,g){if(!d)return b+g;(d=S(a,c[d],c))&&"initial"!==d?"apply-shim-inherit"===d&&(d="inherit"):d=S(a,c[f]||f,c)||f;return b+(d||"")+g}));return b&&b.trim()||""}
function cb(a,b,c){b=b.split(";");for(var e=0,d,f;e<b.length;e++)if(d=b[e]){x.lastIndex=0;if(f=x.exec(d))d=S(a,c[f[1]],c);else if(f=d.indexOf(":"),-1!==f){var g=d.substring(f);g=g.trim();g=S(a,g,c)||g;d=d.substring(0,f)+g}b[e]=d&&d.lastIndexOf(";")===d.length-1?d.slice(0,-1):d||""}return b.join(";")}
function db(a,b){var c={},e=[];z(a,function(a){a.f||Q(a);var d=a.h||a.parsedSelector;b&&a.f.j&&d&&Za.call(b,d)&&(R(a,c),a=a.index,d=parseInt(a/32,10),e[d]=(e[d]||0)|1<<a%32)},null,!0);return{j:c,key:e}}
function eb(a,b,c,e){b.f||Q(b);if(b.f.j){var d=G(a);a=d.is;d=d.s;d=a?Ha(a,d):"html";var f=b.parsedSelector,g=":host > *"===f||"html"===f,h=0===f.indexOf(":host")&&!g;"shady"===c&&(g=f===d+" > *."+d||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(d));if(g||h)c=d,h&&(b.h||(b.h=Ia(K,b,K.b,a?"."+a:"",d)),c=b.h||d),e({w:c,J:h,R:g})}}function fb(a,b,c){var e={},d={};z(b,function(b){eb(a,b,c,function(c){Za.call(a._element||a,c.w)&&(c.J?R(b,e):R(b,d))})},null,!0);return{K:d,I:e}}
function gb(a,b,c,e){var d=G(b),f=Ha(d.is,d.s),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=P(b);d=h.m;h=h.cssBuild;var l=hb(d,e);return M(b,d,function(b){var d="";b.f||Q(b);b.f.cssText&&(d=cb(a,b.f.cssText,c));b.cssText=d;if(!r&&!xa(b)&&b.cssText){var h=d=b.cssText;null==b.B&&(b.B=ta.test(d));if(b.B)if(null==b.u){b.u=[];for(var m in l)h=l[m],h=h(d),d!==h&&(d=h,b.u.push(m))}else{for(m=0;m<b.u.length;++m)h=l[b.u[m]],d=h(d);h=d}b.cssText=h;b.h=b.h||b.selector;
d="."+e;m=Ba(b.h);h=0;for(var xb=m.length,O=void 0;h<xb&&(O=m[h]);h++)m[h]=O.match(g)?O.replace(f,d):d+" "+O;b.selector=m.join(",")}},h)}function hb(a,b){a=a.b;var c={};if(!r&&a)for(var e=0,d=a[e];e<a.length;d=a[++e]){var f=d,g=b;f.g=new RegExp("\\b"+f.keyframesName+"(?!\\B|-)","g");f.a=f.keyframesName+"-"+g;f.h=f.h||f.selector;f.selector=f.h.replace(f.keyframesName,f.a);c[d.keyframesName]=ib(d)}return c}function ib(a){return function(b){return b.replace(a.g,a.a)}}
function jb(a,b){var c=T,e=A(a);a.textContent=y(e,function(a){var d=a.cssText=a.parsedCssText;a.f&&a.f.cssText&&(d=d.replace(ma,"").replace(na,""),a.cssText=cb(c,d,b))})}aa.Object.defineProperties(ab.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var T=new ab;var U={},V=window.customElements;if(V&&!r){var kb=V.define;V.define=function(a,b,c){U[a]||(U[a]=za(a));kb.call(V,a,b,c)}};function lb(){this.cache={}}lb.prototype.store=function(a,b,c,e){var d=this.cache[a]||[];d.push({j:b,styleElement:c,i:e});100<d.length&&d.shift();this.cache[a]=d};function mb(){}var nb=new RegExp(K.a+"\\s*([^\\s]*)");function ob(a){return(a=(a.classList&&a.classList.value?a.classList.value:a.getAttribute("class")||"").match(nb))?a[1]:""}function pb(a){var b=F(a).getRootNode();return b===a||b===a.ownerDocument?"":(a=b.host)?G(a).is:""}
function qb(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var e=0;e<c.addedNodes.length;e++){var d=c.addedNodes[e];if(d.nodeType===Node.ELEMENT_NODE){var f=d.getRootNode(),g=ob(d);if(g&&f===d.ownerDocument&&("style"!==d.localName&&"template"!==d.localName||""===H(d)))Fa(d,g);else if(f instanceof ShadowRoot)for(f=pb(d),f!==g&&Ea(d,g,f),d=window.ShadyDOM.nativeMethods.querySelectorAll.call(d,":not(."+K.a+")"),g=0;g<d.length;g++){f=d[g];
var h=pb(f);h&&L(f,h)}}}}}
if(!(r||window.ShadyDOM&&window.ShadyDOM.handlesDynamicScoping)){var rb=new MutationObserver(qb),sb=function(a){rb.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)sb(document);else{var tb=function(){sb(document.body)};window.HTMLImports?window.HTMLImports.whenReady(tb):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){tb();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",
a)}else tb()})}mb=function(){qb(rb.takeRecords())}}var ub=mb;var W={};var vb=Promise.resolve();function wb(a){if(a=W[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function yb(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function zb(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a._validating||(a._validating=!0,vb.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a._validating=!1}))};var Ab=new lb;function X(){this.A={};this.c=document.documentElement;var a=new n;a.rules=[];this.g=Ya(this.c,new N(a));this.v=!1;this.b=this.a=null}k=X.prototype;k.flush=function(){ub()};k.H=function(a){return A(a)};k.O=function(a){return y(a)};k.prepareTemplate=function(a,b,c){this.prepareTemplateDom(a,b);this.prepareTemplateStyles(a,b,c)};
k.prepareTemplateStyles=function(a,b,c){if(!a._prepared){r||U[b]||(U[b]=za(b));a._prepared=!0;a.name=b;a.extends=c;W[b]=a;var e=H(a),d=Ca(e);c={is:b,extends:c};var f=[];for(var g=a.content.querySelectorAll("style"),h=0;h<g.length;h++){var l=g[h];if(l.hasAttribute("shady-unscoped")){if(!r){var m=l.textContent;wa.has(m)||(wa.add(m),m=l.cloneNode(!0),document.head.appendChild(m));l.parentNode.removeChild(l)}}else f.push(l.textContent),l.parentNode.removeChild(l)}f=f.join("").trim();Y(this);if(!d){if(g=
!e)g=x.test(f)||w.test(f),x.lastIndex=0,w.lastIndex=0;h=p(f);g&&u&&this.a&&this.a.transformRules(h,b);a._styleAst=h}g=[];u||(g=bb(a._styleAst));if(!g.length||u)h=r?a.content:null,b=U[b]||null,e=M(c,a._styleAst,null,e,d?f:""),e=e.length?B(e,c.is,h,b):null,a._style=e;a.a=g}};k.prepareTemplateDom=function(a,b){var c=H(a);r||"shady"===c||a._domPrepared||(a._domPrepared=!0,Da(a.content,b))};
function Bb(a){var b=G(a),c=b.is;b=b.s;var e=U[c]||null;c=W[c];if(c){var d=c._styleAst;var f=c.a;var g=H(c)}d=new N(d,e,f,b,g);c&&Ya(a,d);return d}function Cb(a){!a.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(a.b=window.ShadyCSS.CustomStyleInterface,a.b.transformCallback=function(b){a.C(b)},a.b.validateCallback=function(){requestAnimationFrame(function(){(a.b.enqueued||a.v)&&a.flushCustomStyles()})})}
function Y(a){!a.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(a.a=window.ShadyCSS.ApplyShim,a.a.invalidCallback=wb);Cb(a)}
k.flushCustomStyles=function(){Y(this);if(this.b){var a=this.b.processStyles();if(this.b.enqueued&&!Ca(this.g.cssBuild)){if(u){if(!this.g.cssBuild)for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);if(c&&u&&this.a){var e=A(c);Y(this);this.a.transformRules(e);c.textContent=y(e)}}}else{Db(this,this.c,this.g);for(b=0;b<a.length;b++)(c=this.b.getStyleForCustomStyle(a[b]))&&jb(c,this.g.l);this.v&&this.styleDocument()}this.b.enqueued=!1}}};
k.styleElement=function(a,b){var c=P(a);c||(c=Bb(a));a!==this.c&&(this.v=!0);b&&(c.o=c.o||{},Object.assign(c.o,b));if(u){b=c;c=G(a).is;if(b.o){var e=b.o,d;for(d in e)null===d?a.style.removeProperty(d):a.style.setProperty(d,e[d])}if(!(!(d=W[c])&&a!==this.c||d&&""!==H(d))&&d&&d._style&&!yb(d)){if(yb(d)||d._applyShimValidatingVersion!==d._applyShimNextVersion)Y(this),this.a&&this.a.transformRules(d._styleAst,c),d._style.textContent=M(a,b.m),zb(d);r&&(c=a.shadowRoot)&&(c=c.querySelector("style"))&&(c.textContent=
M(a,b.m));b.m=d._styleAst}}else if(b=c,this.flush(),Db(this,a,b),b.c&&b.c.length){d=G(a).is;a:{if(c=Ab.cache[d])for(e=c.length-1;0<=e;e--){var f=c[e];b:{var g=b.c;for(var h=0;h<g.length;h++){var l=g[h];if(f.j[l]!==b.l[l]){g=!1;break b}}g=!0}if(g){c=f;break a}}c=void 0}g=c?c.styleElement:null;e=b.i;(f=c&&c.i)||(f=this.A[d]=(this.A[d]||0)+1,f=d+"-"+f);b.i=f;f=b.i;h=T;h=g?g.textContent||"":gb(h,a,b.l,f);l=P(a);var m=l.a;m&&!r&&m!==g&&(m._useCount--,0>=m._useCount&&m.parentNode&&m.parentNode.removeChild(m));
r?l.a?(l.a.textContent=h,g=l.a):h&&(g=B(h,f,a.shadowRoot,l.b)):g?g.parentNode||($a&&-1<h.indexOf("@media")&&(g.textContent=h),ya(g,null,l.b)):h&&(g=B(h,f,null,l.b));g&&(g._useCount=g._useCount||0,l.a!=g&&g._useCount++,l.a=g);f=g;r||(g=b.i,l=h=a.getAttribute("class")||"",e&&(l=h.replace(new RegExp("\\s*x-scope\\s*"+e+"\\s*","g")," ")),l+=(l?" ":"")+"x-scope "+g,h!==l&&E(a,l));c||Ab.store(d,b.l,f,b.i)}};function Eb(a,b){return(b=F(b).getRootNode().host)?P(b)||Bb(b)?b:Eb(a,b):a.c}
function Db(a,b,c){var e=Eb(a,b),d=P(e),f=d.l;e===a.c||f||(Db(a,e,d),f=d.l);a=Object.create(f||null);e=fb(b,c.m,c.cssBuild);b=db(d.m,b).j;Object.assign(a,e.I,b,e.K);b=c.o;for(var g in b)if((d=b[g])||0===d)a[g]=d;g=T;b=Object.getOwnPropertyNames(a);for(d=0;d<b.length;d++)e=b[d],a[e]=S(g,a[e],a);c.l=a}k.styleDocument=function(a){this.styleSubtree(this.c,a)};
k.styleSubtree=function(a,b){var c=a.shadowRoot;(c||a===this.c)&&this.styleElement(a,b);if(b=c&&(c.children||c.childNodes))for(a=0;a<b.length;a++)this.styleSubtree(b[a]);else if(a=a.children||a.childNodes)for(b=0;b<a.length;b++)this.styleSubtree(a[b])};
k.C=function(a){var b=this,c=H(a);c!==this.g.cssBuild&&(this.g.cssBuild=c);if(!Ca(c)){var e=A(a);z(e,function(a){if(r)Xa(a);else{var d=K;a.selector=a.parsedSelector;Xa(a);a.selector=a.h=Ia(d,a,d.c,void 0,void 0)}u&&""===c&&(Y(b),b.a&&b.a.transformRule(a))});u?a.textContent=y(e):this.g.m.rules.push(e)}};k.getComputedStyleValue=function(a,b){var c;u||(c=(P(a)||P(Eb(this,a))).l[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};
k.N=function(a,b){var c=F(a).getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var e=a.getAttribute("class");if(e){e=e.split(/\s/);for(var d=0;d<e.length;d++)if(e[d]===K.a){c=e[d+1];break}}}c&&b.push(K.a,c);u||(c=P(a))&&c.i&&b.push(T.a,c.i);E(a,b.join(" "))};k.D=function(a){return P(a)};k.M=function(a,b){L(a,b)};k.P=function(a,b){L(a,b,!0)};k.L=function(a){return pb(a)};k.G=function(a){return ob(a)};X.prototype.flush=X.prototype.flush;X.prototype.prepareTemplate=X.prototype.prepareTemplate;
X.prototype.styleElement=X.prototype.styleElement;X.prototype.styleDocument=X.prototype.styleDocument;X.prototype.styleSubtree=X.prototype.styleSubtree;X.prototype.getComputedStyleValue=X.prototype.getComputedStyleValue;X.prototype.setElementClass=X.prototype.N;X.prototype._styleInfoForNode=X.prototype.D;X.prototype.transformCustomStyleForDocument=X.prototype.C;X.prototype.getStyleAst=X.prototype.H;X.prototype.styleAstToString=X.prototype.O;X.prototype.flushCustomStyles=X.prototype.flushCustomStyles;
X.prototype.scopeNode=X.prototype.M;X.prototype.unscopeNode=X.prototype.P;X.prototype.scopeForNode=X.prototype.L;X.prototype.currentScopeForNode=X.prototype.G;Object.defineProperties(X.prototype,{nativeShadow:{get:function(){return r}},nativeCss:{get:function(){return u}}});var Z=new X,Db,Eb;window.ShadyCSS&&(Db=window.ShadyCSS.ApplyShim,Eb=window.ShadyCSS.CustomStyleInterface);
X.prototype.scopeNode=X.prototype.M;X.prototype.unscopeNode=X.prototype.P;X.prototype.scopeForNode=X.prototype.L;X.prototype.currentScopeForNode=X.prototype.G;Object.defineProperties(X.prototype,{nativeShadow:{get:function(){return r}},nativeCss:{get:function(){return u}}});var Z=new X,Fb,Gb;window.ShadyCSS&&(Fb=window.ShadyCSS.ApplyShim,Gb=window.ShadyCSS.CustomStyleInterface);
window.ShadyCSS={ScopingShim:Z,prepareTemplate:function(a,b,c){Z.flushCustomStyles();Z.prepareTemplate(a,b,c)},prepareTemplateDom:function(a,b){Z.prepareTemplateDom(a,b)},prepareTemplateStyles:function(a,b,c){Z.flushCustomStyles();Z.prepareTemplateStyles(a,b,c)},styleSubtree:function(a,b){Z.flushCustomStyles();Z.styleSubtree(a,b)},styleElement:function(a){Z.flushCustomStyles();Z.styleElement(a)},styleDocument:function(a){Z.flushCustomStyles();Z.styleDocument(a)},flushCustomStyles:function(){Z.flushCustomStyles()},
getComputedStyleValue:function(a,b){return Z.getComputedStyleValue(a,b)},nativeCss:u,nativeShadow:r,cssBuild:v};Db&&(window.ShadyCSS.ApplyShim=Db);Eb&&(window.ShadyCSS.CustomStyleInterface=Eb);}).call(this);
getComputedStyleValue:function(a,b){return Z.getComputedStyleValue(a,b)},nativeCss:u,nativeShadow:r,cssBuild:v};Fb&&(window.ShadyCSS.ApplyShim=Fb);Gb&&(window.ShadyCSS.CustomStyleInterface=Gb);}).call(this);
//# sourceMappingURL=scoping-shim.min.js.map

@@ -15,3 +15,3 @@ /**

import StyleTransformer from './style-transformer.js';
import {getIsExtends, elementHasBuiltCss} from './style-util.js';
import {getIsExtends, elementHasBuiltCss, wrap} from './style-util.js';

@@ -53,3 +53,3 @@ export let flush = function() {};

export function getOwnerScope(node) {
const ownerRoot = node.getRootNode();
const ownerRoot = wrap(node).getRootNode();
if (ownerRoot === node || ownerRoot === node.ownerDocument) {

@@ -71,3 +71,3 @@ return '';

const currentScope = getCurrentScope(element);
const ownerRoot = element.getRootNode();
const ownerRoot = wrap(element).getRootNode();
if (ownerRoot === element) {

@@ -74,0 +74,0 @@ return;

@@ -150,3 +150,3 @@ /**

let {is, typeExtension} = StyleUtil.getIsExtends(host);
let placeholder = getStylePlaceholder(is)
let placeholder = getStylePlaceholder(is);
let template = templateMap[is];

@@ -309,6 +309,6 @@ let ast;

_styleOwnerForNode(node) {
let root = node.getRootNode();
let root = StyleUtil.wrap(node).getRootNode();
let host = root.host;
if (host) {
if (StyleInfo.get(host)) {
if (StyleInfo.get(host) || this._prepareHost(host)) {
return host;

@@ -345,2 +345,9 @@ } else {

let ownerProperties = ownerStyleInfo.styleProperties;
// style owner has not updated properties yet
// go up the chain and force property update,
// except if the owner is the document
if (owner !== this._documentOwner && !ownerProperties) {
this._updateProperties(owner, ownerStyleInfo);
ownerProperties = ownerStyleInfo.styleProperties;
}
let props = Object.create(ownerProperties || null);

@@ -478,3 +485,3 @@ let hostAndRootProps = StyleProperties.hostAndRootPropertiesForScope(host, styleInfo.styleRules, styleInfo.cssBuild);

setElementClass(element, classString) {
let root = element.getRootNode();
let root = StyleUtil.wrap(element).getRootNode();
let classes = classString ? classString.split(/\s/) : [];

@@ -481,0 +488,0 @@ let scopeName = root.host && root.host.localName;

@@ -240,2 +240,4 @@ /**

export const wrap = window['ShadyDOM'] && window['ShadyDOM']['wrap'] || ((node) => node);
/**

@@ -242,0 +244,0 @@ * @param {Element | {is: string, extends: string}} element

Sorry, the diff of this file is not supported yet

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