@webcomponents/shadycss
Advanced tools
Comparing version 1.3.1 to 1.3.2
{ | ||
"name": "@webcomponents/shadycss", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "Styling helpers for ShadyDOM", | ||
@@ -31,4 +31,12 @@ "main": "shadycss.min.js", | ||
"lint": "eslint src test entrypoints", | ||
"test": "npm run lint && gulp test-modules && wct --npm" | ||
"test": "npm run lint && gulp && wct", | ||
"prepack": "gulp closure" | ||
}, | ||
"files": [ | ||
"apply-shim.html", | ||
"apply-shim.min.js*", | ||
"custom-style-interface.html", | ||
"custom-style-interface.min.js*", | ||
"scoping-shim.min.js*" | ||
], | ||
"homepage": "https://webcomponents.org/polyfills", | ||
@@ -35,0 +43,0 @@ "devDependencies": { |
@@ -15,40 +15,40 @@ (function(){/* | ||
function la(a,b,c){c=void 0===c?"":c;var e="";if(a.cssText||a.rules){var d=a.rules,f;if(f=d)f=d[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var h=d.length,g;f<h&&(g=d[f]);f++)e=la(g,b,e)}else b?b=a.cssText:(b=a.cssText,b=b.replace(ma,"").replace(na,""),b=b.replace(oa,"").replace(pa,"")),(e=b.trim())&&(e=" "+e+"\n")}e&&(a.selector&&(c+=a.selector+" {\n"),c+=e,a.selector&&(c+="}\n\n"));return c} | ||
var ka=1,p=7,ha=4,ja=1E3,ba=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,ca=/@import[^;]*;/gim,ma=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,na=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,oa=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,pa=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,ia=/^@[^\s]*keyframes/,fa=/\s+/g;var q=!(window.ShadyDOM&&window.ShadyDOM.inUse),t;function qa(a){t=a&&a.shimcssproperties?!1:q||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?t=window.ShadyCSS.nativeCss:window.ShadyCSS?(qa(window.ShadyCSS),window.ShadyCSS=void 0):qa(window.WebComponents&&window.WebComponents.flags);var u=t;var v=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,w=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,ra=/(--[\w-]+)\s*([:,;)]|$)/gi,sa=/(animation\s*:)|(animation-name\s*:)/,ta=/@media\s(.*)/,ua=/\{[^}]*\}/g;var va=new Set;function y(a,b){if(!a)return"";"string"===typeof a&&(a=n(a));b&&z(a,b);return la(a,u)}function A(a){!a.__cssRules&&a.textContent&&(a.__cssRules=n(a.textContent));return a.__cssRules||null}function wa(a){return!!a.parent&&a.parent.type===p}function z(a,b,c,e){if(a){var d=!1,f=a.type;if(e&&f===ha){var h=a.selector.match(ta);h&&(window.matchMedia(h[1]).matches||(d=!0))}f===ka?b(a):c&&f===p?c(a):f===ja&&(d=!0);if((a=a.rules)&&!d){d=0;f=a.length;for(var g;d<f&&(g=a[d]);d++)z(g,b,c,e)}}} | ||
var ka=1,p=7,ha=4,ja=1E3,ba=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,ca=/@import[^;]*;/gim,ma=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,na=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,oa=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,pa=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,ia=/^@[^\s]*keyframes/,fa=/\s+/g;var q=!(window.ShadyDOM&&window.ShadyDOM.inUse),r;function qa(a){r=a&&a.shimcssproperties?!1:q||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?r=window.ShadyCSS.nativeCss:window.ShadyCSS?(qa(window.ShadyCSS),window.ShadyCSS=void 0):qa(window.WebComponents&&window.WebComponents.flags);var u=r;var v=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,w=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,ra=/(--[\w-]+)\s*([:,;)]|$)/gi,sa=/(animation\s*:)|(animation-name\s*:)/,ta=/@media\s(.*)/,ua=/\{[^}]*\}/g;var va=new Set;function y(a,b){if(!a)return"";"string"===typeof a&&(a=n(a));b&&z(a,b);return la(a,u)}function A(a){!a.__cssRules&&a.textContent&&(a.__cssRules=n(a.textContent));return a.__cssRules||null}function wa(a){return!!a.parent&&a.parent.type===p}function z(a,b,c,e){if(a){var d=!1,f=a.type;if(e&&f===ha){var h=a.selector.match(ta);h&&(window.matchMedia(h[1]).matches||(d=!0))}f===ka?b(a):c&&f===p?c(a):f===ja&&(d=!0);if((a=a.rules)&&!d){d=0;f=a.length;for(var g;d<f&&(g=a[d]);d++)z(g,b,c,e)}}} | ||
function B(a,b,c,e){var d=document.createElement("style");b&&d.setAttribute("scope",b);d.textContent=a;xa(d,c,e);return d}var C=null;function xa(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);C?a.compareDocumentPosition(C)===Node.DOCUMENT_POSITION_PRECEDING&&(C=a):C=a} | ||
function ya(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var e=0;var d=c+3;for(var f=a.length;d<f;d++)if("("===a[d])e++;else if(")"===a[d]&&0===--e)break a;d=-1}e=a.substring(c+4,d);c=a.substring(0,c);a=ya(a.substring(d+1),b);d=e.indexOf(",");return-1===d?b(c,e.trim(),"",a):b(c,e.substring(0,d).trim(),e.substring(d+1).trim(),a)}function D(a,b){q?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)} | ||
function E(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,u:c}};function F(){}function G(a,b,c){var e=H;a.__styleScoped?a.__styleScoped=null:za(e,a,b||"",c)}function za(a,b,c,e){b.nodeType===Node.ELEMENT_NODE&&Aa(b,c,e);if(b="template"===b.localName?(b.content||b.O||b).childNodes:b.children||b.childNodes)for(var d=0;d<b.length;d++)za(a,b[d],c,e)} | ||
function Aa(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(Ba);c?e&&(b=e.replace("style-scope","").replace(b,""),D(a,b)):D(a,(e?e+" ":"")+"style-scope "+b)}}function I(a,b,c){var e=H,d=a.__cssBuild;q||"shady"===d?b=y(b,c):(a=E(a),b=Ca(e,b,a.is,a.u,c)+"\n\n");return b.trim()} | ||
function Ca(a,b,c,e,d){var f=J(c,e);c=c?Da+c:"";return y(b,function(b){b.c||(b.selector=b.g=K(a,b,a.b,c,f),b.c=!0);d&&d(b,c,f)})}function J(a,b){return b?"[is="+a+"]":a}function K(a,b,c,e,d){var f=b.selector.split(Ea);if(!wa(b)){b=0;for(var h=f.length,g;b<h&&(g=f[b]);b++)f[b]=c.call(a,g,e,d)}return f.join(Ea)}function Fa(a){return a.replace(L,function(a,c,e){-1<e.indexOf("+")?e=e.replace(/\+/g,"___"):-1<e.indexOf("___")&&(e=e.replace(/___/g,"+"));return":"+c+"("+e+")"})} | ||
F.prototype.b=function(a,b,c){var e=!1;a=a.trim();var d=L.test(a);d&&(a=a.replace(L,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),a=Fa(a));a=a.replace(Ga,N+" $1");a=a.replace(Ha,function(a,d,g){e||(a=Ia(g,d,b,c),e=e||a.stop,d=a.F,g=a.value);return d+g});d&&(a=Fa(a));return a}; | ||
function Ia(a,b,c,e){var d=a.indexOf(O);0<=a.indexOf(N)?a=Ja(a,e):0!==d&&(a=c?Ka(a,c):a);c=!1;0<=d&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(La,function(a,b){return" > "+b}))}a=a.replace(Ma,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,F:b,stop:f}}function Ka(a,b){a=a.split(Na);a[0]+=b;return a.join(Na)} | ||
function Ja(a,b){var c=a.match(Oa);return(c=c&&c[2].trim()||"")?c[0].match(Pa)?a.replace(Oa,function(a,c,f){return b+f}):c.split(Pa)[0]===b?c:Qa:a.replace(N,b)}function Ra(a){a.selector===Sa&&(a.selector="html")}F.prototype.c=function(a){return a.match(O)?this.b(a,Ta):Ka(a.trim(),Ta)};aa.Object.defineProperties(F.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}}); | ||
var L=/:(nth[-\w]+)\(([^)]+)\)/,Ta=":not(.style-scope)",Ea=",",Ha=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Pa=/[[.:#*]/,N=":host",Sa=":root",O="::slotted",Ga=new RegExp("^("+O+")"),Oa=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,La=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ma=/(.*):dir\((?:(ltr|rtl))\)/,Da=".",Na=":",Ba="class",Qa="should_not_match",H=new F;function P(a,b,c,e){this.j=a||null;this.b=b||null;this.A=c||[];this.o=null;this.u=e||"";this.a=this.h=this.m=null}function Q(a){return a?a.__styleInfo:null}function Ua(a,b){return a.__styleInfo=b}P.prototype.c=function(){return this.j};P.prototype._getStyleRules=P.prototype.c;function Va(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Wa=navigator.userAgent.match("Trident");function Xa(){}function Ya(a){var b={},c=[],e=0;z(a,function(a){R(a);a.index=e++;a=a.f.cssText;for(var c;c=ra.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 E(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,u:c}};function F(){}function za(a,b){var c=G;a.__styleScoped?a.__styleScoped=null:H(c,a,function(a){I(a,b||"")})}function H(a,b,c){b.nodeType===Node.ELEMENT_NODE&&c(b);if(b="template"===b.localName?(b.content||b.w||b).childNodes:b.children||b.childNodes)for(var e=0;e<b.length;e++)H(a,b[e],c)} | ||
function I(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(Aa);c?e&&(b=e.replace("style-scope","").replace(b,""),D(a,b)):D(a,(e?e+" ":"")+"style-scope "+b)}}function Ba(a,b,c){var e=G;a.__styleScoped?a.__styleScoped=null:H(e,a,function(a){I(a,b,!0);I(a,c)})}function Ca(a,b){var c=G;a.__styleScoped?a.__styleScoped=null:H(c,a,function(a){I(a,b||"",!0)})} | ||
function J(a,b,c){var e=G,d=a.__cssBuild;q||"shady"===d?b=y(b,c):(a=E(a),b=Da(e,b,a.is,a.u,c)+"\n\n");return b.trim()}function Da(a,b,c,e,d){var f=K(c,e);c=c?Ea+c:"";return y(b,function(b){b.c||(b.selector=b.g=L(a,b,a.b,c,f),b.c=!0);d&&d(b,c,f)})}function K(a,b){return b?"[is="+a+"]":a}function L(a,b,c,e,d){var f=b.selector.split(Fa);if(!wa(b)){b=0;for(var h=f.length,g;b<h&&(g=f[b]);b++)f[b]=c.call(a,g,e,d)}return f.join(Fa)} | ||
function Ga(a){return a.replace(M,function(a,c,e){-1<e.indexOf("+")?e=e.replace(/\+/g,"___"):-1<e.indexOf("___")&&(e=e.replace(/___/g,"+"));return":"+c+"("+e+")"})}F.prototype.b=function(a,b,c){var e=!1;a=a.trim();var d=M.test(a);d&&(a=a.replace(M,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),a=Ga(a));a=a.replace(Ha,O+" $1");a=a.replace(Ia,function(a,d,g){e||(a=Ja(g,d,b,c),e=e||a.stop,d=a.F,g=a.value);return d+g});d&&(a=Ga(a));return a}; | ||
function Ja(a,b,c,e){var d=a.indexOf(Ka);0<=a.indexOf(O)?a=La(a,e):0!==d&&(a=c?Ma(a,c):a);c=!1;0<=d&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(Na,function(a,b){return" > "+b}))}a=a.replace(Oa,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,F:b,stop:f}}function Ma(a,b){a=a.split(Pa);a[0]+=b;return a.join(Pa)} | ||
function La(a,b){var c=a.match(Qa);return(c=c&&c[2].trim()||"")?c[0].match(Ra)?a.replace(Qa,function(a,c,f){return b+f}):c.split(Ra)[0]===b?c:Sa:a.replace(O,b)}function Ta(a){a.selector===Ua&&(a.selector="html")}F.prototype.c=function(a){return a.match(Ka)?this.b(a,Va):Ma(a.trim(),Va)};aa.Object.defineProperties(F.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}}); | ||
var M=/:(nth[-\w]+)\(([^)]+)\)/,Va=":not(.style-scope)",Fa=",",Ia=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Ra=/[[.:#*]/,O=":host",Ua=":root",Ka="::slotted",Ha=new RegExp("^("+Ka+")"),Qa=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Na=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Oa=/(.*):dir\((?:(ltr|rtl))\)/,Ea=".",Pa=":",Aa="class",Sa="should_not_match",G=new F;function P(a,b,c,e){this.j=a||null;this.b=b||null;this.A=c||[];this.o=null;this.u=e||"";this.a=this.h=this.m=null}function Q(a){return a?a.__styleInfo:null}function Wa(a,b){return a.__styleInfo=b}P.prototype.c=function(){return this.j};P.prototype._getStyleRules=P.prototype.c;function Xa(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Ya=navigator.userAgent.match("Trident");function Za(){}function $a(a){var b={},c=[],e=0;z(a,function(a){R(a);a.index=e++;a=a.f.cssText;for(var c;c=ra.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 R(a){if(!a.f){var b={},c={};S(a,c)&&(b.i=c,a.rules=null);b.cssText=a.parsedCssText.replace(ua,"").replace(v,"");a.f=b}}function S(a,b){var c=a.f;if(c){if(c.i)return Object.assign(b,c.i),!0}else{c=a.parsedCssText;for(var e;a=v.exec(c);){e=(a[2]||a[3]).trim();if("inherit"!==e||"unset"!==e)b[a[1].trim()]=e;e=!0}return e}} | ||
function T(a,b,c){b&&(b=0<=b.indexOf(";")?Za(a,b,c):ya(b,function(b,d,f,h){if(!d)return b+h;(d=T(a,c[d],c))&&"initial"!==d?"apply-shim-inherit"===d&&(d="inherit"):d=T(a,c[f]||f,c)||f;return b+(d||"")+h}));return b&&b.trim()||""} | ||
function Za(a,b,c){b=b.split(";");for(var e=0,d,f;e<b.length;e++)if(d=b[e]){w.lastIndex=0;if(f=w.exec(d))d=T(a,c[f[1]],c);else if(f=d.indexOf(":"),-1!==f){var h=d.substring(f);h=h.trim();h=T(a,h,c)||h;d=d.substring(0,f)+h}b[e]=d&&d.lastIndexOf(";")===d.length-1?d.slice(0,-1):d||""}return b.join(";")} | ||
function $a(a,b){var c={},e=[];z(a,function(a){a.f||R(a);var d=a.g||a.parsedSelector;b&&a.f.i&&d&&Va.call(b,d)&&(S(a,c),a=a.index,d=parseInt(a/32,10),e[d]=(e[d]||0)|1<<a%32)},null,!0);return{i:c,key:e}} | ||
function ab(a,b,c,e){b.f||R(b);if(b.f.i){var d=E(a);a=d.is;d=d.u;d=a?J(a,d):"html";var f=b.parsedSelector,h=":host > *"===f||"html"===f,g=0===f.indexOf(":host")&&!h;"shady"===c&&(h=f===d+" > *."+d||-1!==f.indexOf("html"),g=!h&&0===f.indexOf(d));"shadow"===c&&(h=":host > *"===f||"html"===f,g=g&&!h);if(h||g)c=d,g&&(b.g||(b.g=K(H,b,H.b,a?Da+a:"",d)),c=b.g||d),e({K:c,I:g,R:h})}} | ||
function bb(a,b){var c={},e={},d=b&&b.__cssBuild;z(b,function(b){ab(a,b,d,function(d){Va.call(a.P||a,d.K)&&(d.I?S(b,c):S(b,e))})},null,!0);return{J:e,H:c}} | ||
function cb(a,b,c,e){var d=E(b),f=J(d.is,d.u),h=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])");d=Q(b).j;var g=db(d,e);return I(b,d,function(b){var d="";b.f||R(b);b.f.cssText&&(d=Za(a,b.f.cssText,c));b.cssText=d;if(!q&&!wa(b)&&b.cssText){var k=d=b.cssText;null==b.B&&(b.B=sa.test(d));if(b.B)if(null==b.v){b.v=[];for(var r in g)k=g[r],k=k(d),d!==k&&(d=k,b.v.push(r))}else{for(r=0;r<b.v.length;++r)k=g[b.v[r]],d=k(d);k=d}b.cssText=k;b.g=b.g||b.selector;d="."+e;r=b.g.split(","); | ||
k=0;for(var rb=r.length,M;k<rb&&(M=r[k]);k++)r[k]=M.match(h)?M.replace(f,d):d+" "+M;b.selector=r.join(",")}})}function db(a,b){a=a.b;var c={};if(!q&&a)for(var e=0,d=a[e];e<a.length;d=a[++e]){var f=d,h=b;f.l=new RegExp("\\b"+f.keyframesName+"(?!\\B|-)","g");f.a=f.keyframesName+"-"+h;f.g=f.g||f.selector;f.selector=f.g.replace(f.keyframesName,f.a);c[d.keyframesName]=eb(d)}return c}function eb(a){return function(b){return b.replace(a.l,a.a)}} | ||
function fb(a,b){var c=U,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=Za(c,d,b))})}aa.Object.defineProperties(Xa.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var U=new Xa;var gb={},V=window.customElements;if(V&&!q){var hb=V.define;V.define=function(a,b,c){var e=document.createComment(" Shady DOM styles for "+a+" "),d=document.head;d.insertBefore(e,(C?C.nextSibling:null)||d.firstChild);C=e;gb[a]=e;hb.call(V,a,b,c)}};function ib(){this.cache={}}ib.prototype.store=function(a,b,c,e){var d=this.cache[a]||[];d.push({i:b,styleElement:c,h:e});100<d.length&&d.shift();this.cache[a]=d};function jb(){} | ||
function kb(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();var h=d;var g=[];h.classList?g=Array.from(h.classList):h instanceof window.SVGElement&&h.hasAttribute("class")&&(g=h.getAttribute("class").split(/\s+/));h=g;g=h.indexOf(H.a);if((h=-1<g?h[g+1]:"")&&f===d.ownerDocument)G(d,h,!0);else if(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(f= | ||
f.host))if(f=E(f).is,h===f)for(d=window.ShadyDOM.nativeMethods.querySelectorAll.call(d,":not(."+H.a+")"),f=0;f<d.length;f++)Aa(d[f],h);else h&&G(d,h,!0),G(d,f)}}}} | ||
if(!q){var lb=new MutationObserver(kb),mb=function(a){lb.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)mb(document);else{var nb=function(){mb(document.body)};window.HTMLImports?window.HTMLImports.whenReady(nb):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){nb();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",a)}else nb()})}jb=function(){kb(lb.takeRecords())}} | ||
var ob=jb;var W={};var pb=Promise.resolve();function qb(a){if(a=W[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function sb(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function tb(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,pb.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))};var ub=new ib;function X(){this.w={};this.c=document.documentElement;var a=new m;a.rules=[];this.l=Ua(this.c,new P(a));this.s=!1;this.b=this.a=null}l=X.prototype;l.flush=function(){ob()};l.G=function(a){return A(a)};l.M=function(a){return y(a)};l.prepareTemplate=function(a,b,c){this.prepareTemplateDom(a,b);this.prepareTemplateStyles(a,b,c)}; | ||
function T(a,b,c){b&&(b=0<=b.indexOf(";")?ab(a,b,c):ya(b,function(b,d,f,h){if(!d)return b+h;(d=T(a,c[d],c))&&"initial"!==d?"apply-shim-inherit"===d&&(d="inherit"):d=T(a,c[f]||f,c)||f;return b+(d||"")+h}));return b&&b.trim()||""} | ||
function ab(a,b,c){b=b.split(";");for(var e=0,d,f;e<b.length;e++)if(d=b[e]){w.lastIndex=0;if(f=w.exec(d))d=T(a,c[f[1]],c);else if(f=d.indexOf(":"),-1!==f){var h=d.substring(f);h=h.trim();h=T(a,h,c)||h;d=d.substring(0,f)+h}b[e]=d&&d.lastIndexOf(";")===d.length-1?d.slice(0,-1):d||""}return b.join(";")} | ||
function bb(a,b){var c={},e=[];z(a,function(a){a.f||R(a);var d=a.g||a.parsedSelector;b&&a.f.i&&d&&Xa.call(b,d)&&(S(a,c),a=a.index,d=parseInt(a/32,10),e[d]=(e[d]||0)|1<<a%32)},null,!0);return{i:c,key:e}} | ||
function cb(a,b,c,e){b.f||R(b);if(b.f.i){var d=E(a);a=d.is;d=d.u;d=a?K(a,d):"html";var f=b.parsedSelector,h=":host > *"===f||"html"===f,g=0===f.indexOf(":host")&&!h;"shady"===c&&(h=f===d+" > *."+d||-1!==f.indexOf("html"),g=!h&&0===f.indexOf(d));"shadow"===c&&(h=":host > *"===f||"html"===f,g=g&&!h);if(h||g)c=d,g&&(b.g||(b.g=L(G,b,G.b,a?Ea+a:"",d)),c=b.g||d),e({K:c,I:g,P:h})}} | ||
function db(a,b){var c={},e={},d=b&&b.__cssBuild;z(b,function(b){cb(a,b,d,function(d){Xa.call(a.R||a,d.K)&&(d.I?S(b,c):S(b,e))})},null,!0);return{J:e,H:c}} | ||
function eb(a,b,c,e){var d=E(b),f=K(d.is,d.u),h=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])");d=Q(b).j;var g=fb(d,e);return J(b,d,function(b){var d="";b.f||R(b);b.f.cssText&&(d=ab(a,b.f.cssText,c));b.cssText=d;if(!q&&!wa(b)&&b.cssText){var k=d=b.cssText;null==b.B&&(b.B=sa.test(d));if(b.B)if(null==b.v){b.v=[];for(var t in g)k=g[t],k=k(d),d!==k&&(d=k,b.v.push(t))}else{for(t=0;t<b.v.length;++t)k=g[b.v[t]],d=k(d);k=d}b.cssText=k;b.g=b.g||b.selector;d="."+e;t=b.g.split(","); | ||
k=0;for(var tb=t.length,N;k<tb&&(N=t[k]);k++)t[k]=N.match(h)?N.replace(f,d):d+" "+N;b.selector=t.join(",")}})}function fb(a,b){a=a.b;var c={};if(!q&&a)for(var e=0,d=a[e];e<a.length;d=a[++e]){var f=d,h=b;f.l=new RegExp("\\b"+f.keyframesName+"(?!\\B|-)","g");f.a=f.keyframesName+"-"+h;f.g=f.g||f.selector;f.selector=f.g.replace(f.keyframesName,f.a);c[d.keyframesName]=gb(d)}return c}function gb(a){return function(b){return b.replace(a.l,a.a)}} | ||
function hb(a,b){var c=U,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=ab(c,d,b))})}aa.Object.defineProperties(Za.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var U=new Za;var ib={},V=window.customElements;if(V&&!q){var jb=V.define;V.define=function(a,b,c){var e=document.createComment(" Shady DOM styles for "+a+" "),d=document.head;d.insertBefore(e,(C?C.nextSibling:null)||d.firstChild);C=e;ib[a]=e;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({i:b,styleElement:c,h:e});100<d.length&&d.shift();this.cache[a]=d};function lb(){} | ||
function mb(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();var h=d;var g=[];h.classList?g=Array.from(h.classList):h instanceof window.SVGElement&&h.hasAttribute("class")&&(g=h.getAttribute("class").split(/\s+/));h=g;g=h.indexOf(G.a);if((h=-1<g?h[g+1]:"")&&f===d.ownerDocument)Ca(d,h);else if(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(f= | ||
f.host))for(f=E(f).is,f!==h&&Ba(d,h,f),d=window.ShadyDOM.nativeMethods.querySelectorAll.call(d,":not(."+G.a+")"),f=0;f<d.length;f++)if(h=d[f],g=h.getRootNode().host)g=E(g).is,I(h,g)}}}} | ||
if(!q){var nb=new MutationObserver(mb),ob=function(a){nb.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ob(document);else{var pb=function(){ob(document.body)};window.HTMLImports?window.HTMLImports.whenReady(pb):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){pb();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",a)}else pb()})}lb=function(){mb(nb.takeRecords())}} | ||
var qb=lb;var W={};var rb=Promise.resolve();function sb(a){if(a=W[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function ub(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function vb(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,rb.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))};var wb=new kb;function X(){this.w={};this.c=document.documentElement;var a=new m;a.rules=[];this.l=Wa(this.c,new P(a));this.s=!1;this.b=this.a=null}l=X.prototype;l.flush=function(){qb()};l.G=function(a){return A(a)};l.M=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.s){a.s=!0;a.name=b;a.extends=c;W[b]=a;var e=(e=a.content.querySelector("style"))?e.getAttribute("css-build")||"":"";var d=[];for(var f=a.content.querySelectorAll("style"),h=0;h<f.length;h++){var g=f[h];if(g.hasAttribute("shady-unscoped")){if(!q){var k=g.textContent;va.has(k)||(va.add(k),k=g.cloneNode(!0),document.head.appendChild(k));g.parentNode.removeChild(g)}}else d.push(g.textContent),g.parentNode.removeChild(g)}d=d.join("").trim();c={is:b,extends:c, | ||
N:e};Y(this);f=w.test(d)||v.test(d);w.lastIndex=0;v.lastIndex=0;d=n(d);f&&u&&this.a&&this.a.transformRules(d,b);a._styleAst=d;a.w=e;e=[];u||(e=Ya(a._styleAst));if(!e.length||u)d=q?a.content:null,b=gb[b],f=I(c,a._styleAst),b=f.length?B(f,c.is,d,b):void 0,a.a=b;a.l=e}};l.prepareTemplateDom=function(a,b){q||a.c||(a.c=!0,G(a.content,b))}; | ||
function vb(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.s)&&a.flushCustomStyles()})})}function Y(a){!a.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(a.a=window.ShadyCSS.ApplyShim,a.a.invalidCallback=qb);vb(a)} | ||
l.flushCustomStyles=function(){Y(this);if(this.b){var a=this.b.processStyles();if(this.b.enqueued){if(u)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 for(wb(this,this.c,this.l),b=0;b<a.length;b++)(c=this.b.getStyleForCustomStyle(a[b]))&&fb(c,this.l.m);this.b.enqueued=!1;this.s&&!u&&this.styleDocument()}}}; | ||
l.styleElement=function(a,b){var c=E(a).is,e=Q(a);if(!e){var d=E(a);e=d.is;d=d.u;var f=gb[e];e=W[e];if(e){var h=e._styleAst;var g=e.l}e=Ua(a,new P(h,f,g,d))}a!==this.c&&(this.s=!0);b&&(e.o=e.o||{},Object.assign(e.o,b));if(u){if(e.o){b=e.o;for(var k in b)null===k?a.style.removeProperty(k):a.style.setProperty(k,b[k])}if(((k=W[c])||a===this.c)&&k&&k.a&&!sb(k)){if(sb(k)||k._applyShimValidatingVersion!==k._applyShimNextVersion)Y(this),this.a&&this.a.transformRules(k._styleAst,c),k.a.textContent=I(a,e.j), | ||
tb(k);q&&(c=a.shadowRoot)&&(c.querySelector("style").textContent=I(a,e.j));e.j=k._styleAst}}else if(this.flush(),wb(this,a,e),e.A&&e.A.length){c=e;k=E(a).is;a:{if(b=ub.cache[k])for(h=b.length-1;0<=h;h--){g=b[h];b:{e=c.A;for(d=0;d<e.length;d++)if(f=e[d],g.i[f]!==c.m[f]){e=!1;break b}e=!0}if(e){b=g;break a}}b=void 0}e=b?b.styleElement:null;h=c.h;(g=b&&b.h)||(g=this.w[k]=(this.w[k]||0)+1,g=k+"-"+g);c.h=g;g=c.h;d=U;d=e?e.textContent||"":cb(d,a,c.m,g);f=Q(a);var x=f.a;x&&!q&&x!==e&&(x._useCount--,0>=x._useCount&& | ||
x.parentNode&&x.parentNode.removeChild(x));q?f.a?(f.a.textContent=d,e=f.a):d&&(e=B(d,g,a.shadowRoot,f.b)):e?e.parentNode||(Wa&&-1<d.indexOf("@media")&&(e.textContent=d),xa(e,null,f.b)):d&&(e=B(d,g,null,f.b));e&&(e._useCount=e._useCount||0,f.a!=e&&e._useCount++,f.a=e);g=e;q||(e=c.h,f=d=a.getAttribute("class")||"",h&&(f=d.replace(new RegExp("\\s*x-scope\\s*"+h+"\\s*","g")," ")),f+=(f?" ":"")+"x-scope "+e,d!==f&&D(a,f));b||ub.store(k,c.m,g,c.h)}}; | ||
function xb(a,b){return(b=b.getRootNode().host)?Q(b)?b:xb(a,b):a.c}function wb(a,b,c){a=xb(a,b);var e=Q(a);a=Object.create(e.m||null);var d=bb(b,c.j);b=$a(e.j,b).i;Object.assign(a,d.H,b,d.J);b=c.o;for(var f in b)if((d=b[f])||0===d)a[f]=d;f=U;b=Object.getOwnPropertyNames(a);for(d=0;d<b.length;d++)e=b[d],a[e]=T(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=A(a);z(c,function(a){if(q)Ra(a);else{var c=H;a.selector=a.parsedSelector;Ra(a);a.selector=a.g=K(c,a,c.c,void 0,void 0)}u&&(Y(b),b.a&&b.a.transformRule(a))});u?a.textContent=y(c):this.l.j.rules.push(c)}; | ||
l.getComputedStyleValue=function(a,b){var c;u||(c=(Q(a)||Q(xb(this,a))).m[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};l.L=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]===H.a){c=e[d+1];break}}}c&&b.push(H.a,c);u||(c=Q(a))&&c.h&&b.push(U.a,c.h);D(a,b.join(" "))};l.D=function(a){return Q(a)};X.prototype.flush=X.prototype.flush; | ||
N:e};Y(this);f=w.test(d)||v.test(d);w.lastIndex=0;v.lastIndex=0;d=n(d);f&&u&&this.a&&this.a.transformRules(d,b);a._styleAst=d;a.O=e;e=[];u||(e=$a(a._styleAst));if(!e.length||u)d=q?a.content:null,b=ib[b],f=J(c,a._styleAst),b=f.length?B(f,c.is,d,b):void 0,a.a=b;a.l=e}};l.prepareTemplateDom=function(a,b){q||a.c||(a.c=!0,za(a.content,b))}; | ||
function xb(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.s)&&a.flushCustomStyles()})})}function Y(a){!a.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(a.a=window.ShadyCSS.ApplyShim,a.a.invalidCallback=sb);xb(a)} | ||
l.flushCustomStyles=function(){Y(this);if(this.b){var a=this.b.processStyles();if(this.b.enqueued){if(u)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 for(yb(this,this.c,this.l),b=0;b<a.length;b++)(c=this.b.getStyleForCustomStyle(a[b]))&&hb(c,this.l.m);this.b.enqueued=!1;this.s&&!u&&this.styleDocument()}}}; | ||
l.styleElement=function(a,b){var c=E(a).is,e=Q(a);if(!e){var d=E(a);e=d.is;d=d.u;var f=ib[e];e=W[e];if(e){var h=e._styleAst;var g=e.l}e=Wa(a,new P(h,f,g,d))}a!==this.c&&(this.s=!0);b&&(e.o=e.o||{},Object.assign(e.o,b));if(u){if(e.o){b=e.o;for(var k in b)null===k?a.style.removeProperty(k):a.style.setProperty(k,b[k])}if(((k=W[c])||a===this.c)&&k&&k.a&&!ub(k)){if(ub(k)||k._applyShimValidatingVersion!==k._applyShimNextVersion)Y(this),this.a&&this.a.transformRules(k._styleAst,c),k.a.textContent=J(a,e.j), | ||
vb(k);q&&(c=a.shadowRoot)&&(c.querySelector("style").textContent=J(a,e.j));e.j=k._styleAst}}else if(this.flush(),yb(this,a,e),e.A&&e.A.length){c=e;k=E(a).is;a:{if(b=wb.cache[k])for(h=b.length-1;0<=h;h--){g=b[h];b:{e=c.A;for(d=0;d<e.length;d++)if(f=e[d],g.i[f]!==c.m[f]){e=!1;break b}e=!0}if(e){b=g;break a}}b=void 0}e=b?b.styleElement:null;h=c.h;(g=b&&b.h)||(g=this.w[k]=(this.w[k]||0)+1,g=k+"-"+g);c.h=g;g=c.h;d=U;d=e?e.textContent||"":eb(d,a,c.m,g);f=Q(a);var x=f.a;x&&!q&&x!==e&&(x._useCount--,0>=x._useCount&& | ||
x.parentNode&&x.parentNode.removeChild(x));q?f.a?(f.a.textContent=d,e=f.a):d&&(e=B(d,g,a.shadowRoot,f.b)):e?e.parentNode||(Ya&&-1<d.indexOf("@media")&&(e.textContent=d),xa(e,null,f.b)):d&&(e=B(d,g,null,f.b));e&&(e._useCount=e._useCount||0,f.a!=e&&e._useCount++,f.a=e);g=e;q||(e=c.h,f=d=a.getAttribute("class")||"",h&&(f=d.replace(new RegExp("\\s*x-scope\\s*"+h+"\\s*","g")," ")),f+=(f?" ":"")+"x-scope "+e,d!==f&&D(a,f));b||wb.store(k,c.m,g,c.h)}}; | ||
function zb(a,b){return(b=b.getRootNode().host)?Q(b)?b:zb(a,b):a.c}function yb(a,b,c){a=zb(a,b);var e=Q(a);a=Object.create(e.m||null);var d=db(b,c.j);b=bb(e.j,b).i;Object.assign(a,d.H,b,d.J);b=c.o;for(var f in b)if((d=b[f])||0===d)a[f]=d;f=U;b=Object.getOwnPropertyNames(a);for(d=0;d<b.length;d++)e=b[d],a[e]=T(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=A(a);z(c,function(a){if(q)Ta(a);else{var c=G;a.selector=a.parsedSelector;Ta(a);a.selector=a.g=L(c,a,c.c,void 0,void 0)}u&&(Y(b),b.a&&b.a.transformRule(a))});u?a.textContent=y(c):this.l.j.rules.push(c)}; | ||
l.getComputedStyleValue=function(a,b){var c;u||(c=(Q(a)||Q(zb(this,a))).m[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};l.L=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]===G.a){c=e[d+1];break}}}c&&b.push(G.a,c);u||(c=Q(a))&&c.h&&b.push(U.a,c.h);D(a,b.join(" "))};l.D=function(a){return Q(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.L;X.prototype._styleInfoForNode=X.prototype.D;X.prototype.transformCustomStyleForDocument=X.prototype.C;X.prototype.getStyleAst=X.prototype.G;X.prototype.styleAstToString=X.prototype.M; | ||
X.prototype.flushCustomStyles=X.prototype.flushCustomStyles;Object.defineProperties(X.prototype,{nativeShadow:{get:function(){return q}},nativeCss:{get:function(){return u}}});var Z=new X,yb,zb;window.ShadyCSS&&(yb=window.ShadyCSS.ApplyShim,zb=window.ShadyCSS.CustomStyleInterface); | ||
X.prototype.flushCustomStyles=X.prototype.flushCustomStyles;Object.defineProperties(X.prototype,{nativeShadow:{get:function(){return q}},nativeCss:{get:function(){return u}}});var Z=new X,Ab,Bb;window.ShadyCSS&&(Ab=window.ShadyCSS.ApplyShim,Bb=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:q};yb&&(window.ShadyCSS.ApplyShim=yb);zb&&(window.ShadyCSS.CustomStyleInterface=zb);}).call(this); | ||
getComputedStyleValue:function(a,b){return Z.getComputedStyleValue(a,b)},nativeCss:u,nativeShadow:q};Ab&&(window.ShadyCSS.ApplyShim=Ab);Bb&&(window.ShadyCSS.CustomStyleInterface=Bb);}).call(this); | ||
//# sourceMappingURL=scoping-shim.min.js.map |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
284979
11
170
1