mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
Make WebComponentsReady fire consistently for Chrome
Also fire WebComponentsReady on document and have it bubble for backwards compatibility Fixes #753 Fixes #756
This commit is contained in:
7
.gitattributes
vendored
7
.gitattributes
vendored
@@ -1,4 +1,3 @@
|
||||
/webcomponents*.js binary
|
||||
/webcomponents*.js.map binary
|
||||
/webcomponents-loader.js text
|
||||
/webcomponents-es5-loader.js text
|
||||
webcomponents*.js binary
|
||||
webcomponents*.js.map binary
|
||||
webcomponents-loader.js -binary
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
HTMLImports['whenReady'](function() {
|
||||
requestAnimationFrame(function() {
|
||||
window.dispatchEvent(new CustomEvent('WebComponentsReady'));
|
||||
document.dispatchEvent(new CustomEvent('WebComponentsReady', {bubbles: true}));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
window.importsOk = true;
|
||||
});
|
||||
window.webComponentsReadyCount = 0;
|
||||
window.addEventListener('WebComponentsReady', function() {
|
||||
document.addEventListener('WebComponentsReady', function() {
|
||||
window.webComponentsReadyCount++;
|
||||
});
|
||||
</script>
|
||||
@@ -26,7 +26,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
<link rel="import" href="imports/import-file.html">
|
||||
</head>
|
||||
<body>
|
||||
<my-element></my-element>
|
||||
<script>
|
||||
window.addEventListener('WebComponentsReady', () => {
|
||||
class MyElement extends HTMLElement {
|
||||
connectedCallback(){
|
||||
this.textContent = 'upgraded!';
|
||||
}
|
||||
}
|
||||
customElements.define('my-element', MyElement);
|
||||
});
|
||||
suite('Loader', function() {
|
||||
test('expected boot', function() {
|
||||
assert.equal(window.webComponentsReadyCount, 1, 'failed to fire WebComponentsReady');
|
||||
@@ -35,6 +44,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
}
|
||||
assert.ok(window.importTest, 'import failed to set global value');
|
||||
});
|
||||
test('WebComponentsReady was fired on document and bubbled', function() {
|
||||
assert.equal(document.querySelector('my-element').textContent, 'upgraded!');
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -24,8 +24,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
*/
|
||||
'use strict';(function(){function V(b){function a(a,e){Object.defineProperty(a,"innerHTML",{enumerable:e.enumerable,configurable:!0,get:e.get,set:function(a){var f=this,d=void 0;g(this)&&(d=[],t(this,function(b){b!==f&&d.push(b)}));e.set.call(this,a);if(d)for(var c=0;c<d.length;c++){var k=d[c];1===k.__CE_state&&b.disconnectedCallback(k)}this.ownerDocument.__CE_hasRegistry?b.c(this):b.l(this);return a}})}function d(a,e){m(a,"insertAdjacentElement",function(a,f){var d=g(f);a=e.call(this,a,f);d&&b.a(f);
|
||||
g(a)&&b.b(f);return a})}H?m(Element.prototype,"attachShadow",function(b){return this.__CE_shadowRoot=b=H.call(this,b)}):console.warn("Custom Elements: `Element#attachShadow` was not patched.");if(v&&v.get)a(Element.prototype,v);else if(w&&w.get)a(HTMLElement.prototype,w);else{var c=z.call(document,"div");b.s(function(b){a(b,{enumerable:!0,configurable:!0,get:function(){return I.call(this,!0).innerHTML},set:function(b){var a="template"===this.localName?this.content:this;for(c.innerHTML=b;0<a.childNodes.length;)C.call(a,
|
||||
a.childNodes[0]);for(;0<c.childNodes.length;)y.call(a,c.childNodes[0])}})})}m(Element.prototype,"setAttribute",function(a,e){if(1!==this.__CE_state)return J.call(this,a,e);var f=D.call(this,a);J.call(this,a,e);e=D.call(this,a);f!==e&&b.attributeChangedCallback(this,a,f,e,null)});m(Element.prototype,"setAttributeNS",function(a,e,d){if(1!==this.__CE_state)return K.call(this,a,e,d);var f=x.call(this,a,e);K.call(this,a,e,d);d=x.call(this,a,e);f!==d&&b.attributeChangedCallback(this,e,f,d,a)});m(Element.prototype,
|
||||
"removeAttribute",function(a){if(1!==this.__CE_state)return L.call(this,a);var d=D.call(this,a);L.call(this,a);null!==d&&b.attributeChangedCallback(this,a,d,null,null)});m(Element.prototype,"removeAttributeNS",function(a,d){if(1!==this.__CE_state)return M.call(this,a,d);var f=x.call(this,a,d);M.call(this,a,d);var e=x.call(this,a,d);f!==e&&b.attributeChangedCallback(this,d,f,e,a)});N?d(HTMLElement.prototype,N):O?d(Element.prototype,O):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");
|
||||
a.childNodes[0]);for(;0<c.childNodes.length;)y.call(a,c.childNodes[0])}})})}m(Element.prototype,"setAttribute",function(a,e){if(1!==this.__CE_state)return J.call(this,a,e);var f=D.call(this,a);J.call(this,a,e);e=D.call(this,a);b.attributeChangedCallback(this,a,f,e,null)});m(Element.prototype,"setAttributeNS",function(a,e,d){if(1!==this.__CE_state)return K.call(this,a,e,d);var f=x.call(this,a,e);K.call(this,a,e,d);d=x.call(this,a,e);b.attributeChangedCallback(this,e,f,d,a)});m(Element.prototype,"removeAttribute",
|
||||
function(a){if(1!==this.__CE_state)return L.call(this,a);var d=D.call(this,a);L.call(this,a);null!==d&&b.attributeChangedCallback(this,a,d,null,null)});m(Element.prototype,"removeAttributeNS",function(a,d){if(1!==this.__CE_state)return M.call(this,a,d);var f=x.call(this,a,d);M.call(this,a,d);var e=x.call(this,a,d);f!==e&&b.attributeChangedCallback(this,d,f,e,a)});N?d(HTMLElement.prototype,N):O?d(Element.prototype,O):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");
|
||||
P(b,Element.prototype,{C:W,append:X});Y(b,{I:Z,H:aa,K:ba,remove:ca})}function Y(b,a){var d=Element.prototype;d.before=function(d){for(var f=[],e=0;e<arguments.length;++e)f[e-0]=arguments[e];e=f.filter(function(b){return b instanceof Node&&g(b)});a.I.apply(this,f);for(var c=0;c<e.length;c++)b.a(e[c]);if(g(this))for(e=0;e<f.length;e++)c=f[e],c instanceof Element&&b.b(c)};d.after=function(d){for(var f=[],e=0;e<arguments.length;++e)f[e-0]=arguments[e];e=f.filter(function(b){return b instanceof Node&&
|
||||
g(b)});a.H.apply(this,f);for(var c=0;c<e.length;c++)b.a(e[c]);if(g(this))for(e=0;e<f.length;e++)c=f[e],c instanceof Element&&b.b(c)};d.replaceWith=function(d){for(var f=[],e=0;e<arguments.length;++e)f[e-0]=arguments[e];var e=f.filter(function(b){return b instanceof Node&&g(b)}),c=g(this);a.K.apply(this,f);for(var u=0;u<e.length;u++)b.a(e[u]);if(c)for(b.a(this),e=0;e<f.length;e++)c=f[e],c instanceof Element&&b.b(c)};d.remove=function(){var d=g(this);a.remove.call(this);d&&b.a(this)}}function da(b){function a(a,
|
||||
c){Object.defineProperty(a,"textContent",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(a){if(this.nodeType===Node.TEXT_NODE)c.set.call(this,a);else{var d=void 0;if(this.firstChild){var f=this.childNodes,u=f.length;if(0<u&&g(this))for(var d=Array(u),h=0;h<u;h++)d[h]=f[h]}c.set.call(this,a);if(d)for(a=0;a<d.length;a++)b.a(d[a])}}})}m(Node.prototype,"insertBefore",function(a,c){if(a instanceof DocumentFragment){var d=Array.prototype.slice.apply(a.childNodes);a=Q.call(this,a,c);if(g(this))for(c=
|
||||
@@ -64,7 +64,7 @@ var a=this.g;this.g=function(d){return b(function(){return a(d)})}};window.Custo
|
||||
Q=window.Node.prototype.insertBefore,C=window.Node.prototype.removeChild,R=window.Node.prototype.replaceChild,E=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),H=window.Element.prototype.attachShadow,v=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),D=window.Element.prototype.getAttribute,J=window.Element.prototype.setAttribute,L=window.Element.prototype.removeAttribute,x=window.Element.prototype.getAttributeNS,K=window.Element.prototype.setAttributeNS,M=
|
||||
window.Element.prototype.removeAttributeNS,O=window.Element.prototype.insertAdjacentElement,W=window.Element.prototype.prepend,X=window.Element.prototype.append,Z=window.Element.prototype.before,aa=window.Element.prototype.after,ba=window.Element.prototype.replaceWith,ca=window.Element.prototype.remove,ka=window.HTMLElement,w=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),N=window.HTMLElement.prototype.insertAdjacentElement,S=new function(){},r=window.customElements;if(!r||
|
||||
r.forcePolyfill||"function"!=typeof r.define||"function"!=typeof r.get)r=new p,ja(r),ea(r),da(r),V(r),document.__CE_hasRegistry=!0,r=new l(r),Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:r});(function(){var b=window.customElements,a=window.HTMLImports;if(b&&b.polyfillWrapFlushCallback){var d,c=function(){if(d){var a=d;d=null;a();return!0}},f=a.whenReady;b.polyfillWrapFlushCallback(function(a){d=a;f(c)});a.whenReady=function(b){f(function(){c()?a.whenReady(b):
|
||||
b()})}}a.whenReady(function(){requestAnimationFrame(function(){window.dispatchEvent(new CustomEvent("WebComponentsReady"))})})})();(function(){var b=document.createElement("style");b.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var a=document.querySelector("head");a.insertBefore(b,a.firstChild)})()})();
|
||||
b()})}}a.whenReady(function(){requestAnimationFrame(function(){document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})})();(function(){var b=document.createElement("style");b.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var a=document.querySelector("head");a.insertBefore(b,a.firstChild)})()})();
|
||||
}).call(self)
|
||||
|
||||
//# sourceMappingURL=webcomponents-hi-ce.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -33,8 +33,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
(function(){function k(){var a=this;this.m={};this.g=document.documentElement;var b=new oa;b.rules=[];this.h=u.set(this.g,new u(b));this.i=!1;this.a=this.b=null;eb(function(){a.c()})}function D(){this.customStyles=[];this.enqueued=!1}function fb(){}function ba(a){this.cache={};this.f=void 0===a?100:a}function n(){}function u(a,b,c,d,e){this.G=a||null;this.b=b||null;this.ra=c||[];this.N=null;this.W=e||"";this.a=this.D=this.H=null}function r(){}function oa(){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 Hc(a){function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;m(this)&&(e=[],K(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var g=e[f];1===g.__CE_state&&a.disconnectedCallback(g)}this.ownerDocument.__CE_hasRegistry?a.c(this):a.j(this);
|
||||
return b}})}function c(b,c){v(b,"insertAdjacentElement",function(b,d){var e=m(d);b=c.call(this,b,d);e&&a.a(d);m(b)&&a.b(d);return b})}gb?v(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=gb.call(this,a)}):console.warn("Custom Elements: `Element#attachShadow` was not patched.");if(pa&&pa.get)b(Element.prototype,pa);else if(qa&&qa.get)b(HTMLElement.prototype,qa);else{var d=ra.call(document,"div");a.o(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return hb.call(this,
|
||||
!0).innerHTML},set:function(a){var b="template"===this.localName?this.content:this;for(d.innerHTML=a;0<b.childNodes.length;)sa.call(b,b.childNodes[0]);for(;0<d.childNodes.length;)ca.call(b,d.childNodes[0])}})})}v(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return ib.call(this,b,c);var d=ta.call(this,b);ib.call(this,b,c);c=ta.call(this,b);d!==c&&a.attributeChangedCallback(this,b,d,c,null)});v(Element.prototype,"setAttributeNS",function(b,c,d){if(1!==this.__CE_state)return jb.call(this,
|
||||
b,c,d);var e=da.call(this,b,c);jb.call(this,b,c,d);d=da.call(this,b,c);e!==d&&a.attributeChangedCallback(this,c,e,d,b)});v(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return kb.call(this,b);var c=ta.call(this,b);kb.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});v(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return lb.call(this,b,c);var d=da.call(this,b,c);lb.call(this,b,c);var e=da.call(this,b,c);d!==e&&a.attributeChangedCallback(this,
|
||||
!0).innerHTML},set:function(a){var b="template"===this.localName?this.content:this;for(d.innerHTML=a;0<b.childNodes.length;)sa.call(b,b.childNodes[0]);for(;0<d.childNodes.length;)ca.call(b,d.childNodes[0])}})})}v(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return ib.call(this,b,c);var d=ta.call(this,b);ib.call(this,b,c);c=ta.call(this,b);a.attributeChangedCallback(this,b,d,c,null)});v(Element.prototype,"setAttributeNS",function(b,c,d){if(1!==this.__CE_state)return jb.call(this,
|
||||
b,c,d);var e=da.call(this,b,c);jb.call(this,b,c,d);d=da.call(this,b,c);a.attributeChangedCallback(this,c,e,d,b)});v(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return kb.call(this,b);var c=ta.call(this,b);kb.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});v(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return lb.call(this,b,c);var d=da.call(this,b,c);lb.call(this,b,c);var e=da.call(this,b,c);d!==e&&a.attributeChangedCallback(this,
|
||||
c,d,e,b)});mb?c(HTMLElement.prototype,mb):nb?c(Element.prototype,nb):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");ob(a,Element.prototype,{Ha:Jc,append:Kc});Lc(a,{$a:Mc,Za:Nc,kb:Oc,remove:Pc})}function Lc(a,b){var c=Element.prototype;c.before=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&m(a)});b.$a.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],
|
||||
g instanceof Element&&a.b(g)};c.after=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&m(a)});b.Za.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};c.replaceWith=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];var f=d.filter(function(a){return a instanceof Node&&m(a)}),g=m(this);b.kb.apply(this,d);for(var h=0;h<f.length;h++)a.a(f[h]);
|
||||
if(g)for(a.a(this),f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};c.remove=function(){var c=m(this);b.remove.call(this);c&&a.a(this)}}function Qc(a){function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,h=e.length;if(0<h&&m(this))for(var c=Array(h),l=0;l<h;l++)c[l]=e[l]}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)a.a(c[b])}}})}
|
||||
@@ -163,7 +163,7 @@ c&&J.m(c,this.h.H)}};k.prototype.v=function(a){var b=this,c=ga(a);U(c,function(a
|
||||
[];c=c.host&&c.host.localName;if(!c){var d=a.getAttribute("class");if(d)for(var d=d.split(/\s/),e=0;e<d.length;e++)if(d[e]===t.a){c=d[e+1];break}}c&&b.push(t.a,c);x||(c=u.get(a))&&c.D&&b.push(J.g,c.D);ha(a,b.join(" "))};k.prototype.Na=function(a){return u.get(a)};k.prototype.flush=k.prototype.I;k.prototype.prepareTemplate=k.prototype.prepareTemplate;k.prototype.styleElement=k.prototype.styleElement;k.prototype.styleDocument=k.prototype.styleDocument;k.prototype.styleSubtree=k.prototype.styleSubtree;
|
||||
k.prototype.getComputedStyleValue=k.prototype.getComputedStyleValue;k.prototype.setElementClass=k.prototype.Pa;k.prototype._styleInfoForNode=k.prototype.Na;k.prototype.transformCustomStyleForDocument=k.prototype.v;k.prototype.getStyleAst=k.prototype.Oa;k.prototype.styleAstToString=k.prototype.Qa;k.prototype.flushCustomStyles=k.prototype.f;Object.defineProperties(k.prototype,{nativeShadow:{get:function(){return p}},nativeCss:{get:function(){return x}}});var G=new k,bb,cb;window.ShadyCSS&&(bb=window.ShadyCSS.ApplyShim,
|
||||
cb=window.ShadyCSS.CustomStyleInterface);window.ShadyCSS={ScopingShim:G,prepareTemplate:function(a,b,c){G.f();G.prepareTemplate(a,b,c)},styleSubtree:function(a,b){G.f();G.styleSubtree(a,b)},styleElement:function(a){G.f();G.styleElement(a)},styleDocument:function(a){G.f();G.styleDocument(a)},getComputedStyleValue:function(a,b){return G.getComputedStyleValue(a,b)},nativeCss:x,nativeShadow:p};bb&&(window.ShadyCSS.ApplyShim=bb);cb&&(window.ShadyCSS.CustomStyleInterface=cb);(function(){var a=window.customElements,
|
||||
b=window.HTMLImports;if(a&&a.polyfillWrapFlushCallback){var c,d=function(){if(c){var a=c;c=null;a();return!0}},e=b.whenReady;a.polyfillWrapFlushCallback(function(a){c=a;e(d)});b.whenReady=function(a){e(function(){d()?b.whenReady(a):a()})}}b.whenReady(function(){requestAnimationFrame(function(){window.dispatchEvent(new CustomEvent("WebComponentsReady"))})})})();(function(){var a=document.createElement("style");a.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";
|
||||
b=window.HTMLImports;if(a&&a.polyfillWrapFlushCallback){var c,d=function(){if(c){var a=c;c=null;a();return!0}},e=b.whenReady;a.polyfillWrapFlushCallback(function(a){c=a;e(d)});b.whenReady=function(a){e(function(){d()?b.whenReady(a):a()})}}b.whenReady(function(){requestAnimationFrame(function(){document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})})();(function(){var a=document.createElement("style");a.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";
|
||||
var b=document.querySelector("head");b.insertBefore(a,b.firstChild)})()})();
|
||||
}).call(self)
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -37,7 +37,7 @@ null;b(d+1)})}else a()}var c=document.querySelectorAll("script[import-dependency
|
||||
document.head){var f=document.createElement(d.a.localName);f.__appliedElement=d.a;f.setAttribute("type","import-placeholder");d.a.parentNode.insertBefore(f,d.a.nextSibling);for(f=k(d.a);f&&k(f);)f=k(f);f.parentNode!==document.head&&(f=null);document.head.insertBefore(d.a,f);d.a.removeAttribute("type")}}else a()};l.prototype.B=function(){for(var a=document.querySelectorAll("link[rel=import]"),b=a.length-1,c;0<=b&&(c=a[b]);b--)this.m(c)};l.prototype.m=function(a){a.__loaded||(a.__loaded=!0,a.import&&
|
||||
(a.import.readyState="complete"),a.dispatchEvent(n(a.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))};l.prototype.C=function(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.addedNodes)for(var e=0;e<c.addedNodes.length;e++){var d=c.addedNodes[e];d&&d.nodeType===Node.ELEMENT_NODE&&(u(d)?this.o(d):this.h(d))}}};if(t){for(var r=document.querySelectorAll("link[rel=import]"),B=0,J=r.length,y;B<J&&(y=r[B]);B++)y.import&&"loading"===y.import.readyState||(y.__loaded=!0);r=function(a){a=a.target;
|
||||
u(a)&&(a.__loaded=!0)};document.addEventListener("load",r,!0);document.addEventListener("error",r,!0)}else new l;p(function(){return document.dispatchEvent(n("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))});m.useNative=t;m.whenReady=p;m.importForElement=k})(window.HTMLImports=window.HTMLImports||{});
|
||||
(function(){var m=window.customElements,n=window.HTMLImports;if(m&&m.polyfillWrapFlushCallback){var k,v=function(){if(k){var p=k;k=null;p();return!0}},q=n.whenReady;m.polyfillWrapFlushCallback(function(p){k=p;q(v)});n.whenReady=function(k){q(function(){v()?n.whenReady(k):k()})}}n.whenReady(function(){requestAnimationFrame(function(){window.dispatchEvent(new CustomEvent("WebComponentsReady"))})})})();var D=document.createElement("style");D.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";
|
||||
(function(){var m=window.customElements,n=window.HTMLImports;if(m&&m.polyfillWrapFlushCallback){var k,v=function(){if(k){var p=k;k=null;p();return!0}},q=n.whenReady;m.polyfillWrapFlushCallback(function(p){k=p;q(v)});n.whenReady=function(k){q(function(){v()?n.whenReady(k):k()})}}n.whenReady(function(){requestAnimationFrame(function(){document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})})();var D=document.createElement("style");D.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";
|
||||
var E=document.querySelector("head");E.insertBefore(D,E.firstChild);
|
||||
}).call(self)
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -33,8 +33,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
(function(){function k(){var a=this;this.s={};this.g=document.documentElement;var b=new va;b.rules=[];this.h=p.set(this.g,new p(b));this.i=!1;this.a=this.b=null;nb(function(){a.c()})}function J(){this.customStyles=[];this.enqueued=!1}function ob(){}function ia(a){this.cache={};this.f=void 0===a?100:a}function n(){}function p(a,b,c,d,e){this.I=a||null;this.b=b||null;this.Aa=c||[];this.S=null;this.aa=e||"";this.a=this.G=this.K=null}function v(){}function va(){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 Tc(a){function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;m(this)&&(e=[],O(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var g=e[f];1===g.__CE_state&&a.disconnectedCallback(g)}this.ownerDocument.__CE_hasRegistry?a.c(this):a.j(this);
|
||||
return b}})}function c(b,c){w(b,"insertAdjacentElement",function(b,d){var e=m(d);b=c.call(this,b,d);e&&a.a(d);m(b)&&a.b(d);return b})}pb?w(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=pb.call(this,a)}):console.warn("Custom Elements: `Element#attachShadow` was not patched.");if(wa&&wa.get)b(Element.prototype,wa);else if(xa&&xa.get)b(HTMLElement.prototype,xa);else{var d=ya.call(document,"div");a.u(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return qb.call(this,
|
||||
!0).innerHTML},set:function(a){var b="template"===this.localName?this.content:this;for(d.innerHTML=a;0<b.childNodes.length;)za.call(b,b.childNodes[0]);for(;0<d.childNodes.length;)ja.call(b,d.childNodes[0])}})})}w(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return rb.call(this,b,c);var d=Aa.call(this,b);rb.call(this,b,c);c=Aa.call(this,b);d!==c&&a.attributeChangedCallback(this,b,d,c,null)});w(Element.prototype,"setAttributeNS",function(b,c,d){if(1!==this.__CE_state)return sb.call(this,
|
||||
b,c,d);var e=ka.call(this,b,c);sb.call(this,b,c,d);d=ka.call(this,b,c);e!==d&&a.attributeChangedCallback(this,c,e,d,b)});w(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return tb.call(this,b);var c=Aa.call(this,b);tb.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});w(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return ub.call(this,b,c);var d=ka.call(this,b,c);ub.call(this,b,c);var e=ka.call(this,b,c);d!==e&&a.attributeChangedCallback(this,
|
||||
!0).innerHTML},set:function(a){var b="template"===this.localName?this.content:this;for(d.innerHTML=a;0<b.childNodes.length;)za.call(b,b.childNodes[0]);for(;0<d.childNodes.length;)ja.call(b,d.childNodes[0])}})})}w(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return rb.call(this,b,c);var d=Aa.call(this,b);rb.call(this,b,c);c=Aa.call(this,b);a.attributeChangedCallback(this,b,d,c,null)});w(Element.prototype,"setAttributeNS",function(b,c,d){if(1!==this.__CE_state)return sb.call(this,
|
||||
b,c,d);var e=ka.call(this,b,c);sb.call(this,b,c,d);d=ka.call(this,b,c);a.attributeChangedCallback(this,c,e,d,b)});w(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return tb.call(this,b);var c=Aa.call(this,b);tb.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});w(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return ub.call(this,b,c);var d=ka.call(this,b,c);ub.call(this,b,c);var e=ka.call(this,b,c);d!==e&&a.attributeChangedCallback(this,
|
||||
c,d,e,b)});vb?c(HTMLElement.prototype,vb):wb?c(Element.prototype,wb):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");xb(a,Element.prototype,{Ra:Uc,append:Vc});Wc(a,{ob:Xc,nb:Yc,yb:Zc,remove:$c})}function Wc(a,b){var c=Element.prototype;c.before=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&m(a)});b.ob.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],
|
||||
g instanceof Element&&a.b(g)};c.after=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&m(a)});b.nb.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};c.replaceWith=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];var f=d.filter(function(a){return a instanceof Node&&m(a)}),g=m(this);b.yb.apply(this,d);for(var h=0;h<f.length;h++)a.a(f[h]);
|
||||
if(g)for(a.a(this),f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};c.remove=function(){var c=m(this);b.remove.call(this);c&&a.a(this)}}function ad(a){function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,h=e.length;if(0<h&&m(this))for(var c=Array(h),l=0;l<h;l++)c[l]=e[l]}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)a.a(c[b])}}})}
|
||||
@@ -184,8 +184,8 @@ k.prototype.Wa=function(a){for(var b=0;b<a.length;b++){var c=this.a.getStyleForC
|
||||
function(a,b){var c;C||(c=(p.get(a)||p.get(this.o(a))).K[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};k.prototype.Za=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var d=a.getAttribute("class");if(d)for(var d=d.split(/\s/),e=0;e<d.length;e++)if(d[e]===y.a){c=d[e+1];break}}c&&b.push(y.a,c);C||(c=p.get(a))&&c.G&&b.push(H.g,c.G);oa(a,b.join(" "))};k.prototype.Xa=function(a){return p.get(a)};k.prototype.flush=k.prototype.L;k.prototype.prepareTemplate=
|
||||
k.prototype.prepareTemplate;k.prototype.styleElement=k.prototype.styleElement;k.prototype.styleDocument=k.prototype.styleDocument;k.prototype.styleSubtree=k.prototype.styleSubtree;k.prototype.getComputedStyleValue=k.prototype.getComputedStyleValue;k.prototype.setElementClass=k.prototype.Za;k.prototype._styleInfoForNode=k.prototype.Xa;k.prototype.transformCustomStyleForDocument=k.prototype.A;k.prototype.getStyleAst=k.prototype.Ya;k.prototype.styleAstToString=k.prototype.$a;k.prototype.flushCustomStyles=
|
||||
k.prototype.f;Object.defineProperties(k.prototype,{nativeShadow:{get:function(){return u}},nativeCss:{get:function(){return C}}});var I=new k,kb,lb;window.ShadyCSS&&(kb=window.ShadyCSS.ApplyShim,lb=window.ShadyCSS.CustomStyleInterface);window.ShadyCSS={ScopingShim:I,prepareTemplate:function(a,b,c){I.f();I.prepareTemplate(a,b,c)},styleSubtree:function(a,b){I.f();I.styleSubtree(a,b)},styleElement:function(a){I.f();I.styleElement(a)},styleDocument:function(a){I.f();I.styleDocument(a)},getComputedStyleValue:function(a,
|
||||
b){return I.getComputedStyleValue(a,b)},nativeCss:C,nativeShadow:u};kb&&(window.ShadyCSS.ApplyShim=kb);lb&&(window.ShadyCSS.CustomStyleInterface=lb);(function(){var a=window.customElements,b=window.HTMLImports;if(a&&a.polyfillWrapFlushCallback){var c,d=function(){if(c){var a=c;c=null;a();return!0}},e=b.whenReady;a.polyfillWrapFlushCallback(function(a){c=a;e(d)});b.whenReady=function(a){e(function(){d()?b.whenReady(a):a()})}}b.whenReady(function(){requestAnimationFrame(function(){window.dispatchEvent(new CustomEvent("WebComponentsReady"))})})})();
|
||||
(function(){var a=document.createElement("style");a.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var b=document.querySelector("head");b.insertBefore(a,b.firstChild)})()})();
|
||||
b){return I.getComputedStyleValue(a,b)},nativeCss:C,nativeShadow:u};kb&&(window.ShadyCSS.ApplyShim=kb);lb&&(window.ShadyCSS.CustomStyleInterface=lb);(function(){var a=window.customElements,b=window.HTMLImports;if(a&&a.polyfillWrapFlushCallback){var c,d=function(){if(c){var a=c;c=null;a();return!0}},e=b.whenReady;a.polyfillWrapFlushCallback(function(a){c=a;e(d)});b.whenReady=function(a){e(function(){d()?b.whenReady(a):a()})}}b.whenReady(function(){requestAnimationFrame(function(){document.dispatchEvent(new CustomEvent("WebComponentsReady",
|
||||
{bubbles:!0}))})})})();(function(){var a=document.createElement("style");a.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var b=document.querySelector("head");b.insertBefore(a,b.firstChild)})()})();
|
||||
}).call(self)
|
||||
|
||||
//# sourceMappingURL=webcomponents-lite.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -45,10 +45,24 @@
|
||||
document.head.appendChild(newScript);
|
||||
} else {
|
||||
// Ensure `WebComponentsReady` is fired also when there are no polyfills loaded.
|
||||
requestAnimationFrame(function() {
|
||||
// Reset the HTMLImports stub.
|
||||
window['HTMLImports'] = null;
|
||||
window.dispatchEvent(new CustomEvent('WebComponentsReady'));
|
||||
});
|
||||
// however, we have to wait for the document to be in 'interactive' state,
|
||||
// otherwise a rAF may fire before scripts in <body>
|
||||
|
||||
var fire = function() {
|
||||
requestAnimationFrame(function() {
|
||||
// Reset the HTMLImports stub.
|
||||
window['HTMLImports'] = null;
|
||||
document.dispatchEvent(new CustomEvent('WebComponentsReady', {bubbles: true}));
|
||||
});
|
||||
};
|
||||
|
||||
if (document.readyState !== 'loading') {
|
||||
fire();
|
||||
} else {
|
||||
document.addEventListener('readystatechange', function wait() {
|
||||
fire();
|
||||
document.removeEventListener('readystatechange', wait);
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -26,8 +26,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
(function(){function k(){var a=this;this.m={};this.g=document.documentElement;var b=new pa;b.rules=[];this.h=t.set(this.g,new t(b));this.i=!1;this.a=this.b=null;fb(function(){a.c()})}function D(){this.customStyles=[];this.enqueued=!1}function gb(){}function ba(a){this.cache={};this.f=void 0===a?100:a}function n(){}function t(a,b,c,d,e){this.F=a||null;this.b=b||null;this.pa=c||[];this.M=null;this.U=e||"";this.a=this.C=this.G=null}function q(){}function pa(){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 Ic(a){function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;l(this)&&(e=[],K(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var g=e[f];1===g.__CE_state&&a.disconnectedCallback(g)}this.ownerDocument.__CE_hasRegistry?a.c(this):a.j(this);
|
||||
return b}})}function c(b,c){x(b,"insertAdjacentElement",function(b,d){var e=l(d);b=c.call(this,b,d);e&&a.a(d);l(b)&&a.b(d);return b})}hb?x(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=hb.call(this,a)}):console.warn("Custom Elements: `Element#attachShadow` was not patched.");if(qa&&qa.get)b(Element.prototype,qa);else if(ra&&ra.get)b(HTMLElement.prototype,ra);else{var d=sa.call(document,"div");a.o(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return ib.call(this,
|
||||
!0).innerHTML},set:function(a){var b="template"===this.localName?this.content:this;for(d.innerHTML=a;0<b.childNodes.length;)ta.call(b,b.childNodes[0]);for(;0<d.childNodes.length;)da.call(b,d.childNodes[0])}})})}x(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return jb.call(this,b,c);var d=ua.call(this,b);jb.call(this,b,c);c=ua.call(this,b);d!==c&&a.attributeChangedCallback(this,b,d,c,null)});x(Element.prototype,"setAttributeNS",function(b,c,d){if(1!==this.__CE_state)return kb.call(this,
|
||||
b,c,d);var e=ea.call(this,b,c);kb.call(this,b,c,d);d=ea.call(this,b,c);e!==d&&a.attributeChangedCallback(this,c,e,d,b)});x(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return lb.call(this,b);var c=ua.call(this,b);lb.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});x(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return mb.call(this,b,c);var d=ea.call(this,b,c);mb.call(this,b,c);var e=ea.call(this,b,c);d!==e&&a.attributeChangedCallback(this,
|
||||
!0).innerHTML},set:function(a){var b="template"===this.localName?this.content:this;for(d.innerHTML=a;0<b.childNodes.length;)ta.call(b,b.childNodes[0]);for(;0<d.childNodes.length;)da.call(b,d.childNodes[0])}})})}x(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return jb.call(this,b,c);var d=ua.call(this,b);jb.call(this,b,c);c=ua.call(this,b);a.attributeChangedCallback(this,b,d,c,null)});x(Element.prototype,"setAttributeNS",function(b,c,d){if(1!==this.__CE_state)return kb.call(this,
|
||||
b,c,d);var e=ea.call(this,b,c);kb.call(this,b,c,d);d=ea.call(this,b,c);a.attributeChangedCallback(this,c,e,d,b)});x(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return lb.call(this,b);var c=ua.call(this,b);lb.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});x(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return mb.call(this,b,c);var d=ea.call(this,b,c);mb.call(this,b,c);var e=ea.call(this,b,c);d!==e&&a.attributeChangedCallback(this,
|
||||
c,d,e,b)});nb?c(HTMLElement.prototype,nb):ob?c(Element.prototype,ob):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");pb(a,Element.prototype,{Ca:Jc,append:Kc});Lc(a,{Sa:Mc,Ra:Nc,ab:Oc,remove:Pc})}function Lc(a,b){var c=Element.prototype;c.before=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&l(a)});b.Sa.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(l(this))for(f=0;f<d.length;f++)g=d[f],
|
||||
g instanceof Element&&a.b(g)};c.after=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&l(a)});b.Ra.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(l(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};c.replaceWith=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];var f=d.filter(function(a){return a instanceof Node&&l(a)}),g=l(this);b.ab.apply(this,d);for(var h=0;h<f.length;h++)a.a(f[h]);
|
||||
if(g)for(a.a(this),f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};c.remove=function(){var c=l(this);b.remove.call(this);c&&a.a(this)}}function Qc(a){function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,h=e.length;if(0<h&&l(this))for(var c=Array(h),m=0;m<h;m++)c[m]=e[m]}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)a.a(c[b])}}})}
|
||||
@@ -112,8 +112,8 @@ if(!ma||ma.forcePolyfill||"function"!=typeof ma.define||"function"!=typeof ma.ge
|
||||
fb:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,Za:/^@[^\s]*keyframes/,Ba:/\s+/g},u=!(window.ShadyDOM&&window.ShadyDOM.inUse),v=!navigator.userAgent.match("AppleWebKit/601")&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)");window.ShadyCSS?ic(window.ShadyCSS):window.WebComponents&&ic(window.WebComponents.flags);var wc=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,xc=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,zd=/(--[\w-]+)\s*([:,;)]|$)/gi,Ad=/(animation\s*:)|(animation-name\s*:)/,
|
||||
ld=/@media[^(]*(\([^)]*\))/,Bd=/\{[^}]*\}/g,N=null;q.prototype.g=function(a,b,c){a.__styleScoped?a.__styleScoped=null:this.i(a,b||"",c)};q.prototype.i=function(a,b,c){a.nodeType===Node.ELEMENT_NODE&&this.B(a,b,c);if(a="template"===a.localName?(a.content||a.jb).childNodes:a.children||a.childNodes)for(var d=0;d<a.length;d++)this.i(a[d],b,c)};q.prototype.B=function(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 d=a.getAttribute(Cd);c?d&&(b=d.replace("style-scope","").replace(b,""),ia(a,b)):ia(a,(d?d+" ":"")+"style-scope "+b)}};q.prototype.b=function(a,b,c){var d=a.__cssBuild;u||"shady"===d?b=T(b,c):(a=O(a),b=this.N(b,a.is,a.U,c)+"\n\n");return b.trim()};q.prototype.N=function(a,b,c,d){var e=this.c(b,c);b=this.h(b);var f=this;return T(a,function(a){a.c||(f.P(a,b,e),a.c=!0);d&&d(a,b,e)})};q.prototype.h=function(a){return a?Dd+a:""};q.prototype.c=function(a,b){return b?"[is="+a+
|
||||
"]":a};q.prototype.P=function(a,b,c){this.j(a,this.f,b,c)};q.prototype.j=function(a,b,c,d){a.selector=a.A=this.l(a,b,c,d)};q.prototype.l=function(a,b,c,d){var e=a.selector.split(yc);if(!jc(a)){a=0;for(var f=e.length,g;a<f&&(g=e[a]);a++)e[a]=b.call(this,g,c,d)}return e.join(yc)};q.prototype.f=function(a,b,c){var d=this,e=!1;a=a.trim();a=a.replace(Ed,function(a,b,d){return":"+b+"("+d.replace(/\s/g,"")+")"});a=a.replace(Fd,Za+" $1");return a=a.replace(Gd,function(a,g,h){e||(a=d.H(h,g,b,c),e=e||a.stop,
|
||||
g=a.Ta,h=a.value);return g+h})};q.prototype.H=function(a,b,c,d){var e=a.indexOf($a);0<=a.indexOf(Za)?a=this.V(a,d):0!==e&&(a=c?this.m(a,c):a);c=!1;0<=e&&(b="",c=!0);var f;c&&(f=!0,c&&(a=a.replace(Hd,function(a,b){return" > "+b})));a=a.replace(Id,function(a,b,d){return'[dir="'+d+'"] '+b+", "+b+'[dir="'+d+'"]'});return{value:a,Ta:b,stop:f}};q.prototype.m=function(a,b){a=a.split(zc);a[0]+=b;return a.join(zc)};q.prototype.V=function(a,b){var c=a.match(Ac);return(c=c&&c[2].trim()||"")?c[0].match(Bc)?a.replace(Ac,
|
||||
"]":a};q.prototype.P=function(a,b,c){this.j(a,this.f,b,c)};q.prototype.j=function(a,b,c,d){a.selector=a.A=this.l(a,b,c,d)};q.prototype.l=function(a,b,c,d){var e=a.selector.split(yc);if(!jc(a)){a=0;for(var f=e.length,g;a<f&&(g=e[a]);a++)e[a]=b.call(this,g,c,d)}return e.join(yc)};q.prototype.f=function(a,b,c){var d=this,e=!1;a=a.trim();a=a.replace(Ed,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"});a=a.replace(Fd,Za+" $1");return a=a.replace(Gd,function(a,g,h){e||(a=d.H(h,g,b,c),e=e||a.stop,
|
||||
g=a.Ta,h=a.value);return g+h})};q.prototype.H=function(a,b,c,d){var e=a.indexOf($a);0<=a.indexOf(Za)?a=this.V(a,d):0!==e&&(a=c?this.m(a,c):a);c=!1;0<=e&&(b="",c=!0);var f;c&&(f=!0,c&&(a=a.replace(Hd,function(a,b){return" > "+b})));a=a.replace(Id,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,Ta:b,stop:f}};q.prototype.m=function(a,b){a=a.split(zc);a[0]+=b;return a.join(zc)};q.prototype.V=function(a,b){var c=a.match(Ac);return(c=c&&c[2].trim()||"")?c[0].match(Bc)?a.replace(Ac,
|
||||
function(a,c,f){return b+f}):c.split(Bc)[0]===b?c:Jd:a.replace(Za,b)};q.prototype.O=function(a){a.selector=a.parsedSelector;this.o(a);this.j(a,this.I)};q.prototype.o=function(a){a.selector===Kd&&(a.selector="html")};q.prototype.I=function(a){return a.match($a)?this.f(a,Cc):this.m(a.trim(),Cc)};eb.Object.defineProperties(q.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var Ed=/:(nth[-\w]+)\(([^)]+)\)/,Cc=":not(.style-scope)",yc=",",Gd=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,
|
||||
Bc=/[[.:#*]/,Za=":host",Kd=":root",$a="::slotted",Fd=new RegExp("^("+$a+")"),Ac=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Hd=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Id=/(.*):dir\((?:(ltr|rtl))\)/,Dd=".",zc=":",Cd="class",Jd="should_not_match",r=new q;t.get=function(a){return a?a.__styleInfo:null};t.set=function(a,b){return a.__styleInfo=b};t.prototype.c=function(){return this.F};t.prototype._getStyleRules=t.prototype.c;var Dc=function(a){return a.matches||a.matchesSelector||a.mozMatchesSelector||
|
||||
a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector}(window.Element.prototype),Ld=navigator.userAgent.match("Trident");n.prototype.P=function(a){var b=this,c={},d=[],e=0;U(a,function(a){b.c(a);a.index=e++;b.O(a.s.cssText,c)},function(a){d.push(a)});a.b=d;a=[];for(var f in c)a.push(f);return a};n.prototype.c=function(a){if(!a.s){var b={},c={};this.b(a,c)&&(b.D=c,a.rules=null);b.cssText=this.N(a);a.s=b}};n.prototype.b=function(a,b){var c=a.s;if(c){if(c.D)return Object.assign(b,c.D),!0}else{for(var c=
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user