Files
webcomponentsjs/webcomponents-hi-ce.js
Monica Dinculescu a7d2aae2c3 update bundles
2017-01-17 15:16:28 -08:00

3 lines
41 KiB
JavaScript

(function(){'use strict';function _(Ye){return Ye=y(Ye),E(S(Ye),Ye)}function y(Ye){return Ye.replace(J.comments,'').replace(J.port,'')}function S(Ye){let ze={start:0,end:Ye.length},Je=ze;for(let Ze=0,Qe=Ye.length;Ze<Qe;Ze++)if(Ye[Ze]===Y){Je.rules||(Je.rules=[]);let et=Je,tt=et.rules[et.rules.length-1];Je={start:Ze+1,parent:et,previous:tt},et.rules.push(Je)}else Ye[Ze]===z&&(Je.end=Ze+1,Je=Je.parent||ze);return ze}function E(Ye,ze){let Je=ze.substring(Ye.start,Ye.end-1);if(Ye.parsedCssText=Ye.cssText=Je.trim(),Ye.parent){let Qe=Ye.previous?Ye.previous.end:Ye.parent.start;Je=ze.substring(Qe,Ye.start-1),Je=C(Je),Je=Je.replace(J.multipleSpaces,' '),Je=Je.substring(Je.lastIndexOf(';')+1);let et=Ye.parsedSelector=Ye.selector=Je.trim();Ye.atRule=0===et.indexOf('@'),Ye.atRule?0===et.indexOf('@media')?Ye.type=G.MEDIA_RULE:et.match(J.keyframesRule)&&(Ye.type=G.KEYFRAMES_RULE,Ye.keyframesName=Ye.selector.split(J.multipleSpaces).pop()):0===et.indexOf(Z)?Ye.type=G.MIXIN_RULE:Ye.type=G.STYLE_RULE}let Ze=Ye.rules;if(Ze)for(let tt,Qe=0,et=Ze.length;Qe<et&&(tt=Ze[Qe]);Qe++)E(tt,ze);return Ye}function C(Ye){return Ye.replace(/\\([0-9a-f]{1,6})\s/gi,function(){let ze=arguments[1],Je=6-ze.length;for(;Je--;)ze='0'+ze;return'\\'+ze})}function N(Ye,ze,Je){Je=Je||'';let Ze='';if(Ye.cssText||Ye.rules){let Qe=Ye.rules;if(Qe&&!A(Qe))for(let rt,et=0,tt=Qe.length;et<tt&&(rt=Qe[et]);et++)Ze=N(rt,ze,Ze);else Ze=ze?Ye.cssText:T(Ye.cssText),Ze=Ze.trim(),Ze&&(Ze=' '+Ze+'\n')}return Ze&&(Ye.selector&&(Je+=Ye.selector+' '+Y+'\n'),Je+=Ze,Ye.selector&&(Je+=z+'\n\n')),Je}function A(Ye){return 0===Ye[0].selector.indexOf(Z)}function T(Ye){return Ye=R(Ye),I(Ye)}function R(Ye){return Ye.replace(J.customProp,'').replace(J.mixinProp,'')}function I(Ye){return Ye.replace(J.mixinApply,'').replace(J.varApply,'')}function O(Ye){Ye&&(re=re&&!Ye.shimcssproperties,te=te&&!Ye.shimshadow)}function P(Ye,ze){return'string'==typeof Ye&&(Ye=_(Ye)),ze&&U(Ye,ze),N(Ye,re)}function L(Ye){return!Ye.__cssRules&&Ye.textContent&&(Ye.__cssRules=_(Ye.textContent)),Ye.__cssRules}function D(Ye){return Ye.parent&&Ye.parent.type===G.KEYFRAMES_RULE}function U(Ye,ze,Je,Ze){if(Ye){let Qe=!1;if(Ze&&Ye.type===G.MEDIA_RULE){let tt=Ye.selector.match(ne.MEDIA_MATCH);tt&&!window.matchMedia(tt[1]).matches&&(Qe=!0)}Ye.type===G.STYLE_RULE?ze(Ye):Je&&Ye.type===G.KEYFRAMES_RULE?Je(Ye):Ye.type===G.MIXIN_RULE&&(Qe=!0);let et=Ye.rules;if(et&&!Qe)for(let st,tt=0,rt=et.length;tt<rt&&(st=et[tt]);tt++)U(st,ze,Je,Ze)}}function H(Ye,ze,Je,Ze){let Qe=$(Ye,ze);return F(Qe,Je,Ze)}function F(Ye,ze,Je){ze=ze||document.head;let Ze=Je&&Je.nextSibling||ze.firstChild;return oe=Ye,ze.insertBefore(Ye,Ze)}function $(Ye,ze){let Je=document.createElement('style');return ze&&Je.setAttribute('scope',ze),Je.textContent=Ye,Je}function K(Ye){let ze=document.createComment(' Shady DOM styles for '+Ye+' '),Je=oe?oe.nextSibling:null,Ze=document.head;return Ze.insertBefore(ze,Je||Ze.firstChild),oe=ze,ze}function B(Ye,ze){let Je=0;for(let Ze=ze,Qe=Ye.length;Ze<Qe;Ze++)if('('===Ye[Ze])Je++;else if(')'===Ye[Ze]&&0==--Je)return Ze;return-1}function V(Ye,ze){let Je=Ye.indexOf('var(');if(-1===Je)return ze(Ye,'','','');let Ze=B(Ye,Je+3),Qe=Ye.substring(Je+4,Ze),et=Ye.substring(0,Je),tt=V(Ye.substring(Ze+1),ze),rt=Qe.indexOf(',');if(-1===rt)return ze(et,Qe.trim(),'',tt);let st=Qe.substring(0,rt).trim(),ot=Qe.substring(rt+1).trim();return ze(et,st,ot,tt)}function X(Ye,ze){window.ShadyDOM?window.ShadyDOM.nativeMethods.setAttribute.call(Ye,'class',ze):Ye.setAttribute('class',ze)}function W(Ye,ze){let Je=parseInt(Ye/32);ze[Je]=(ze[Je]||0)|1<<Ye%32}(function(Ye){function ze(Pt){return Pt.nodeType===Node.ELEMENT_NODE&&Tt.call(Pt,mt)}function Je(Pt,Lt){Rt.forEach(wt=>{const Dt=Pt.attributes[wt],Ut=Dt&&Dt.value;Ut&&0>Ut.search(/({{|\[\[)/)&&(Dt.value='style'===wt?Et.resolveUrlsInCssText(Ut,Lt):Et.replaceAttrUrl(Ut,Lt))})}function Ze(Pt,Lt){const wt=Pt.content;if(wt){const Dt=wt.querySelectorAll('style, form[action], [src], [href], [url], [style]');for(let Ut=0;Ut<Dt.length;Ut++){const kt=Dt[Ut];'style'==kt.localName?Et.resolveUrlsInStyle(kt,Lt):Je(kt,Lt)}Qe(wt,Lt)}}function Qe(Pt,Lt){const wt=Pt.querySelectorAll('template');for(let Dt=0;Dt<wt.length;Dt++)Ze(wt[Dt],Lt)}function et(Pt,Lt){const wt=Pt.querySelectorAll(At);for(let kt,Dt=0,Ut=wt.length;Dt<Ut&&(kt=wt[Dt]);Dt++)lt(kt),kt.href&&kt.setAttribute('href',Et.replaceAttrUrl(kt.getAttribute('href'),Lt)),kt.src&&kt.setAttribute('src',Et.replaceAttrUrl(kt.getAttribute('src'),Lt)),'style'==kt.localName?Et.resolveUrlsInStyle(kt,Lt):'script'===kt.localName&&(kt.textContent&&(kt.textContent+=`\n//# sourceURL=${Lt}`),kt.setAttribute('type',It));Qe(Pt,Lt)}function tt(Pt,Lt){const wt=Pt.querySelectorAll('dom-module');for(let Dt=0;Dt<wt.length;Dt++){const Ut=wt[Dt],kt=Ut.getAttribute('assetpath')||'';Ut.setAttribute('assetpath',Et.replaceAttrUrl(kt,Lt))}}function rt(Pt){const Lt=Pt.querySelectorAll(`script[type=${It}]`);let wt=Promise.resolve();for(let kt,Dt=0,Ut=Lt.length;Dt<Ut&&(kt=Lt[Dt]);Dt++)wt=wt.then(()=>{const Ht=Pt.createElement('script');Ht.textContent=kt.textContent,kt.src&&Ht.setAttribute('src',kt.getAttribute('src'));const Ft=lt(Ht).catch(()=>Ht);return ft=Ht,kt.parentNode.replaceChild(Ht,kt),Ft.then(jt=>{jt===ft&&(ft=null)})});return wt}function st(Pt){const Lt=Pt.querySelectorAll(Nt),wt=[];for(let kt,Dt=0,Ut=Lt.length;Dt<Ut&&(kt=Lt[Dt]);Dt++)wt.push(lt(kt).catch(()=>kt));return Promise.all(wt)}function ot(Pt){const Lt=Pt.import.querySelectorAll(vt);for(let Ut,wt=0,Dt=Lt.length;wt<Dt&&(Ut=Lt[wt]);wt++){const kt=document.createElement(Ut.localName);lt(kt),kt.textContent=Ut.textContent;for(let Ht=0,Ft=Ut.attributes.length;Ht<Ft;Ht++)kt.setAttribute(Ut.attributes[Ht].name,Ut.attributes[Ht].value);Ut.parentNode.removeChild(Ut),Pt.parentNode.insertBefore(kt,Pt)}}function nt(Pt){const Lt=Pt.querySelectorAll(mt);for(let Dt,wt=Lt.length-1;0<=wt&&(Dt=Lt[wt]);wt--)if(!Dt.__fired){Dt.__fired=!0;const Ut=Dt.import?'load':'error';yt.log&&console.warn('fire',Ut,Dt.href),lt(Dt),Dt.dispatchEvent(new CustomEvent(Ut,{bubbles:!1,cancelable:!1,detail:void 0}))}}function lt(Pt){return Pt.__loadPromise||(Pt.__loadPromise=new Promise((Lt,wt)=>{it(Pt)?Lt(Pt):(Pt.addEventListener('load',()=>Lt(Pt)),Pt.addEventListener('error',()=>wt(Pt)))})),Pt.__loadPromise}function it(Pt){let Lt=!1;if(_t&&ze(Pt)&&Pt.import&&'loading'!==Pt.import.readyState)Lt=!0;else if(!(Mt&&'style'===Pt.localName))'script'!==Pt.localName||Pt.src||(Lt=!0);else if(-1==Pt.textContent.indexOf('@import'))Lt=!0;else if(Pt.sheet){Lt=!0;const wt=Pt.sheet.cssRules;for(let Dt=0,Ut=wt?wt.length:0;Dt<Ut&&Lt;Dt++)wt[Dt].type===CSSRule.IMPORT_RULE&&(Lt=!!wt[Dt].styleSheet)}return Lt}function dt(Pt,Lt){const wt=document.createElement('import-content');wt.style.display='none',Lt&&wt.setAttribute('import-href',Lt),Pt&&(wt.innerHTML=Pt);const Dt=wt.querySelector('base');return Dt&&(Lt=Et._resolveUrl(Dt.getAttribute('href'),Lt),Dt.parentNode.removeChild(Dt)),tt(wt,Lt),et(wt,Lt),wt}function pt(Pt,Lt){return Lt=Lt||document,ct(Lt).then(ut).then(wt=>{return Pt&&Pt(wt),wt})}function ct(Pt){return new Promise(Lt=>{'loading'===Pt.readyState?Pt.addEventListener('readystatechange',()=>{'loading'!==Pt.readyState&&Lt(Pt)}):Lt(Pt)})}function ut(Pt){let Lt=Pt.querySelectorAll(mt);const wt=[],Dt={allImports:[],loadedImports:[],errorImports:[]};for(let Ht,Ut=0,kt=Lt.length;Ut<kt&&(Ht=Lt[Ut]);Ut++)Tt.call(Ht,`${mt} ${mt}`)||(Dt.allImports.push(Ht),wt.push(lt(Ht).then(Ft=>{return Dt.loadedImports.push(Ft),Ft}).catch(Ft=>{return Dt.errorImports.push(Ft),Ft})));return Promise.all(wt).then(()=>Dt)}const mt='link[rel=import]',_t=!!('import'in document.createElement('link')),yt={bust:!1,log:!1};let ft=null;!1=='currentScript'in document&&Object.defineProperty(document,'currentScript',{get:function(){return ft||('complete'===document.readyState?null:document.scripts[document.scripts.length-1])},configurable:!0});const ht=/(^\/)|(^#)|(^[\w-\d]*:)/,St=/(url\()([^)]*)(\))/g,gt=/(@import[\s]+(?!url\())([^;]*)(;)/g,Et={resolveUrlsInStyle:function(Pt,Lt){Pt.textContent=Et.resolveUrlsInCssText(Pt.textContent,Lt)},resolveUrlsInCssText:function(Pt,Lt){let wt=Et.replaceUrls(Pt,Lt,St);return wt=Et.replaceUrls(wt,Lt,gt),wt},replaceUrls:function(Pt,Lt,wt){return Pt.replace(wt,function(Dt,Ut,kt,Ht){let Ft=kt.replace(/["']/g,'');return Lt&&(Ft=Et._resolveUrl(Ft,Lt)),Ut+'\''+Ft+'\''+Ht})},replaceAttrUrl:function(Pt,Lt){return Pt&&ht.test(Pt)?Pt:Et._resolveUrl(Pt,Lt)},_resolveUrl:function(Pt,Lt){if(void 0===Et.__workingURL){Et.__workingURL=!1;try{const Dt=new URL('b','http://a');Dt.pathname='c%20d',Et.__workingURL='http://a/c%20d'===Dt.href}catch(Dt){}}if(Et.__workingURL)return new URL(Pt,Lt).href;let wt=Et.__tempDoc;return wt||(wt=document.implementation.createHTMLDocument('temp'),Et.__tempDoc=wt,wt.__base=wt.createElement('base'),wt.head.appendChild(wt.__base),wt.__anchor=wt.createElement('a')),wt.__base.href=Lt,wt.__anchor.href=Pt,wt.__anchor.href||Pt}},Ct={async:!0,load:function(Pt,Lt){const wt=new XMLHttpRequest;return yt.bust&&(Pt+='?'+Math.random()),wt.open('GET',Pt,Ct.async),wt.addEventListener('readystatechange',()=>{if(4===wt.readyState){let Ut;try{const Ft=wt.getResponseHeader('Location');Ft&&(Ut='/'===Ft.substr(0,1)?location.origin+Ft:Ft)}catch(Ft){console.error(Ft.message)}const kt=200<=wt.status&&300>wt.status||304===wt.status||0===wt.status,Ht=wt.response||wt.responseText;Lt(!kt,Ht,Ut)}}),wt.send(),wt}};class bt{constructor(Pt,Lt){this.cache={},this.onload=Pt,this.oncomplete=Lt,this.inflight=0,this.pending={}}addNodes(Pt){this.inflight+=Pt.length;for(let Dt,Lt=0,wt=Pt.length;Lt<wt&&(Dt=Pt[Lt]);Lt++)this.require(Dt);this.checkDone()}addNode(Pt){this.inflight++,this.require(Pt),this.checkDone()}require(Pt){const Lt=Pt.src||Pt.href;this.dedupe(Lt,Pt)||this.fetch(Lt,Pt)}dedupe(Pt,Lt){if(this.pending[Pt])return this.pending[Pt].push(Lt),!0;return this.cache[Pt]?(this.onload(Pt,Lt,this.cache[Pt]),this.tail(),!0):(this.pending[Pt]=[Lt],!1)}fetch(Pt,Lt){if(yt.log&&console.log('fetch',Pt,Lt),!Pt)this.receive(Pt,Lt,!0,'error: href must be specified');else if(Pt.match(/^data:/)){const wt=Pt.split(','),Dt=wt[0];let Ut=wt[1];Ut=-1<Dt.indexOf(';base64')?atob(Ut):decodeURIComponent(Ut),this.receive(Pt,Lt,!1,Ut)}else Ct.load(Pt,(wt,Dt,Ut)=>this.receive(Pt,Lt,wt,Dt,Ut))}receive(Pt,Lt,wt,Dt,Ut){this.cache[Pt]=Dt;const kt=this.pending[Pt];for(let jt,Ht=0,Ft=kt.length;Ht<Ft&&(jt=kt[Ht]);Ht++)this.onload(Pt,jt,Dt,wt,Ut),this.tail();this.pending[Pt]=null}tail(){--this.inflight,this.checkDone()}checkDone(){this.inflight||this.oncomplete()}}const vt=['style:not([type])','link[rel=stylesheet][href]:not([type])'].join(','),Nt=[`${mt} style:not([type])`,`${mt} link[rel=stylesheet][href]:not([type])`].join(','),At=[mt,vt,'script:not([type])','script[type="application/javascript"]','script[type="text/javascript"]'].join(',');const Tt=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,Rt=['action','src','href','url','style'],It='import-script',Mt=/Trident/.test(navigator.userAgent),Ot=!Mt&&/Edge\/\d./i.test(navigator.userAgent);new class{constructor(Pt){this.documents={},this._doc=Pt;const Lt=Pt.querySelectorAll(mt);for(let wt=0,Dt=Lt.length;wt<Dt;wt++)lt(Lt[wt]);new MutationObserver(this._onMutation.bind(this)).observe(Pt.head,{childList:!0}),_t||(this._loader=new bt(this._onLoaded.bind(this),this._onLoadedAll.bind(this)),ct(Pt).then(()=>this._loadSubtree(Pt)))}_loadSubtree(Pt){const Lt=Pt.querySelectorAll(mt);this._loader.addNodes(Lt)}_onLoaded(Pt,Lt,wt,Dt,Ut){if(yt.log&&console.log('loaded',Pt,Lt),void 0===this.documents[Pt])if(Dt)this.documents[Pt]=null;else{const kt=dt(wt,Ut||Pt);this._loadSubtree(kt),this.documents[Pt]=kt}}_onLoadedAll(){this._flatten(this._doc),Promise.all([rt(this._doc),st(this._doc)]).then(()=>nt(this._doc))}_flatten(Pt){const Lt=Pt.querySelectorAll(mt);for(let Ut,wt=0,Dt=Lt.length;wt<Dt&&(Ut=Lt[wt]);wt++)Ut.import=this.documents[Ut.href],Ut.import&&!Ut.import.__firstImport&&(Ut.import.__firstImport=Ut,this._flatten(Ut.import),Pt===document&&((Mt||Ot)&&ot(Ut),this._observe(Ut.import)),Ut.appendChild(Ut.import))}_observe(Pt){Pt.__importObserver||(Pt.__importObserver=new MutationObserver(this._onMutation.bind(this)),Pt.__importObserver.observe(Pt,{childList:!0,subtree:!0}))}_onMutation(Pt){for(let wt,Lt=0;Lt<Pt.length&&(wt=Pt[Lt]);Lt++)for(let Dt=0,Ut=wt.addedNodes?wt.addedNodes.length:0;Dt<Ut;Dt++){const kt=wt.addedNodes[Dt];kt&&ze(kt)&&(_t?lt(kt):this._loader.addNode(kt))}}}(document),pt(Pt=>document.dispatchEvent(new CustomEvent('HTMLImportsLoaded',{cancelable:!0,bubbles:!0,detail:Pt}))),Ye.useNative=_t,Ye.whenReady=pt})(window.HTMLImports=window.HTMLImports||{}),function(){function Ye(){this.a=new Map,this.j=new Map,this.h=new Map,this.o=new Set,this.C=new MutationObserver(this.D.bind(this)),this.f=null,this.F=new Set,this.enableFlush=!0,this.s=!1,this.m=null}function ze(){return tt.customElements}function Je(ct){if(!/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(ct)||-1!==rt.indexOf(ct))return Error('The element name \''+ct+'\' is not valid.')}function Ze(ct,ut,mt,_t){var yt=ze();return ct=mt?ot.call(ct,ut,mt):ot.call(ct,ut),(ut=yt.a.get(ut.toLowerCase()))&&yt.u(ct,ut,_t),yt.b(ct),ct}function Qe(ct,ut,mt,_t){ut=ut.toLowerCase();var yt=ct.getAttribute(ut);_t.call(ct,ut,mt),1==ct.__$CE_upgraded&&(_t=ze().a.get(ct.localName),mt=_t.A,(_t=_t.i)&&0<=mt.indexOf(ut)&&(mt=ct.getAttribute(ut),mt!==yt&&_t.call(ct,ut,yt,mt,null)))}var et=document,tt=window;if(!(ze()&&(ze().g=function(){},!ze().forcePolyfill))){var rt='annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph'.split(' ');Ye.prototype.L=function(ct,ut){function mt(gt){var Et=ft[gt];if(void 0!==Et&&'function'!=typeof Et)throw Error(yt+' \''+gt+'\' is not a Function');return Et}if('function'!=typeof ut)throw new TypeError('constructor must be a Constructor');var _t=Je(ct);if(_t)throw _t;if(this.a.has(ct))throw Error('An element with name \''+ct+'\' is already defined');if(this.j.has(ut))throw Error('Definition failed for \''+ct+'\': The constructor is already used.');var yt=ct,ft=ut.prototype;if('object'!=typeof ft)throw new TypeError('Definition failed for \''+ct+'\': constructor.prototype must be an object');var _t=mt('connectedCallback'),ht=mt('disconnectedCallback'),St=mt('attributeChangedCallback');this.a.set(yt,{name:ct,localName:yt,constructor:ut,v:_t,w:ht,i:St,A:St&&ut.observedAttributes||[]}),this.j.set(ut,yt),this.K(),(ct=this.h.get(yt))&&(ct.resolve(void 0),this.h.delete(yt))},Ye.prototype.get=function(ct){return(ct=this.a.get(ct))?ct.constructor:void 0},Ye.prototype.M=function(ct){var ut=Je(ct);if(ut)return Promise.reject(ut);if(this.a.has(ct))return Promise.resolve();if(ut=this.h.get(ct))return ut.N;var mt,_t=new Promise(function(yt){mt=yt}),ut={N:_t,resolve:mt};return this.h.set(ct,ut),_t},Ye.prototype.g=function(){this.enableFlush&&(this.l(this.m.takeRecords()),this.D(this.C.takeRecords()),this.o.forEach(function(ct){this.l(ct.takeRecords())},this))},Ye.prototype.K=function(){var ct=this;if(!this.s){this.s=!0;var ut=function(){ct.s=!1,ct.m||(ct.m=ct.b(et)),ct.c(et.childNodes)};window.HTMLImports?window.HTMLImports.whenReady(ut):ut()}},Ye.prototype.I=function(ct){this.f=ct},Ye.prototype.b=function(ct){return null==ct.__$CE_observer?(ct.__$CE_observer=new MutationObserver(this.l.bind(this)),ct.__$CE_observer.observe(ct,{childList:!0,subtree:!0}),this.enableFlush&&this.o.add(ct.__$CE_observer),ct.__$CE_observer):ct.__$CE_observer},Ye.prototype.J=function(ct){null!=ct.__$CE_observer&&(ct.__$CE_observer.disconnect(),this.enableFlush&&this.o.delete(ct.__$CE_observer),ct.__$CE_observer=null)},Ye.prototype.l=function(ct){for(var mt,ut=0;ut<ct.length;ut++)if(mt=ct[ut],'childList'===mt.type){var _t=mt.removedNodes;this.c(mt.addedNodes),this.H(_t)}},Ye.prototype.c=function(ct,ut){ut=ut||new Set;for(var _t,mt=0;mt<ct.length;mt++)if(_t=ct[mt],_t.nodeType===Node.ELEMENT_NODE){this.J(_t),_t=et.createTreeWalker(_t,NodeFilter.SHOW_ELEMENT,null,!1);do this.G(_t.currentNode,ut);while(_t.nextNode())}},Ye.prototype.G=function(ct,ut){if(!ut.has(ct)){ut.add(ct);var mt=this.a.get(ct.localName);if(mt){ct.__$CE_upgraded||this.u(ct,mt,!0);var _t;if(_t=ct.__$CE_upgraded&&!ct.__$CE_attached)a:{_t=ct;do{if(_t.__$CE_attached||_t.nodeType===Node.DOCUMENT_NODE){_t=!0;break a}_t=_t.parentNode||_t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&_t.host}while(_t);_t=!1}_t&&(ct.__$CE_attached=!0,mt.v&&mt.v.call(ct))}ct.shadowRoot&&this.c(ct.shadowRoot.childNodes,ut),'LINK'===ct.tagName&&ct.rel&&-1!==ct.rel.toLowerCase().split(' ').indexOf('import')&&this.B(ct,ut)}},Ye.prototype.B=function(ct,ut){var mt=ct.import;if(mt)ut.has(mt)||(ut.add(mt),mt.__$CE_observer||this.b(mt),this.c(mt.childNodes,ut));else if(ut=ct.href,!this.F.has(ut)){this.F.add(ut);var _t=this,yt=function(){ct.removeEventListener('load',yt),ct.import.__$CE_observer||_t.b(ct.import),_t.c(ct.import.childNodes)};ct.addEventListener('load',yt)}},Ye.prototype.H=function(ct){for(var mt,ut=0;ut<ct.length;ut++)if(mt=ct[ut],mt.nodeType===Node.ELEMENT_NODE){this.b(mt),mt=et.createTreeWalker(mt,NodeFilter.SHOW_ELEMENT,null,!1);do{var _t=mt.currentNode;if(_t.__$CE_upgraded&&_t.__$CE_attached){_t.__$CE_attached=!1;var yt=this.a.get(_t.localName);yt&&yt.w&&yt.w.call(_t)}}while(mt.nextNode())}},Ye.prototype.u=function(ct,ut,mt){if(ct.__proto__=ut.constructor.prototype,mt&&(this.I(ct),new ut.constructor,ct.__$CE_upgraded=!0,console.assert(!this.f)),mt=ut.A,(ut=ut.i)&&0<mt.length){this.C.observe(ct,{attributes:!0,attributeOldValue:!0,attributeFilter:mt});for(var yt,_t=0;_t<mt.length;_t++)if(yt=mt[_t],ct.hasAttribute(yt)){var ft=ct.getAttribute(yt);ut.call(ct,yt,null,ft,null)}}},Ye.prototype.D=function(ct){for(var mt,ut=0;ut<ct.length;ut++)if(mt=ct[ut],'attributes'===mt.type){var _t=mt.target,yt=this.a.get(_t.localName),ft=mt.attributeName,ht=mt.oldValue,St=_t.getAttribute(ft);St!==ht&&yt.i.call(_t,ft,ht,St,mt.attributeNamespace)}},window.CustomElementRegistry=Ye,Ye.prototype.define=Ye.prototype.L,Ye.prototype.get=Ye.prototype.get,Ye.prototype.whenDefined=Ye.prototype.M,Ye.prototype.flush=Ye.prototype.g,Ye.prototype.polyfilled=!0,Ye.prototype._observeRoot=Ye.prototype.b,Ye.prototype._addImport=Ye.prototype.B;var st=tt.HTMLElement;Ye.prototype.nativeHTMLElement=st,tt.HTMLElement=function(){var ct=ze();if(ct.f){var ut=ct.f;return ct.f=null,ut}if(this.constructor)return ct=ct.j.get(this.constructor),Ze(et,ct,void 0,!1);throw Error('Unknown constructor. Did you call customElements.define()?')},tt.HTMLElement.prototype=st.prototype;var ot=et.createElement;et.createElement=function(ct,ut){return Ze(et,ct,ut,!0)};var nt=et.createElementNS;et.createElementNS=function(ct,ut){return'http://www.w3.org/1999/xhtml'===ct?et.createElement(ut):nt.call(et,ct,ut)};var lt=Element.prototype.attachShadow;lt&&Object.defineProperty(Element.prototype,'attachShadow',{value:function(ct){return ct=lt.call(this,ct),ze().b(ct),ct}});var it=et.importNode;et.importNode=function(ct,ut){return ct=it.call(et,ct,ut),ze().c(ct.nodeType===Node.ELEMENT_NODE?[ct]:ct.childNodes),ct};var dt=Element.prototype.setAttribute;Element.prototype.setAttribute=function(ct,ut){Qe(this,ct,ut,dt)};var pt=Element.prototype.removeAttribute;Element.prototype.removeAttribute=function(ct){Qe(this,ct,null,pt)},Object.defineProperty(window,'customElements',{value:new Ye,configurable:!0,enumerable:!0}),window.CustomElements={takeRecords:function(){ze().g&&ze().g()}}}}();let G={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},Y='{',z='}',J={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},Z='--',te=!(window.ShadyDOM&&window.ShadyDOM.inUse),re=!navigator.userAgent.match('AppleWebKit/601')&&window.CSS&&CSS.supports&&CSS.supports('box-shadow','0 0 0 var(--foo)');window.ShadyCSS?O(window.ShadyCSS):window.WebComponents&&O(window.WebComponents.flags);let oe=null,ne={VAR_ASSIGN:/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,MIXIN_MATCH:/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,VAR_CONSUMED:/(--[\w-]+)\s*([:,;)]|$)/gi,ANIMATION_MATCH:/(animation\s*:)|(animation-name\s*:)/,MEDIA_MATCH:/@media[^(]*(\([^)]*\))/,IS_VAR:/^--/,BRACKETED:/\{[^}]*\}/g,HOST_PREFIX:'(?:^|[^.#[:])',HOST_SUFFIX:'($|[.:[\\s>+~])'};const le='style-scope';class ae{get SCOPE_NAME(){return le}dom(Ye,ze,Je){Ye.__styleScoped?Ye.__styleScoped=null:this._transformDom(Ye,ze||'',Je)}_transformDom(Ye,ze,Je){Ye.nodeType===Node.ELEMENT_NODE&&this.element(Ye,ze,Je);let Ze='template'===Ye.localName?(Ye.content||Ye._content).childNodes:Ye.children||Ye.childNodes;if(Ze)for(let Qe=0;Qe<Ze.length;Qe++)this._transformDom(Ze[Qe],ze,Je)}element(Ye,ze,Je){if(ze)if(Ye.classList)Je?(Ye.classList.remove(le),Ye.classList.remove(ze)):(Ye.classList.add(le),Ye.classList.add(ze));else if(Ye.getAttribute){let Ze=Ye.getAttribute('class');if(!Je){let Qe=(Ze?Ze+' ':'')+le+' '+ze;X(Ye,Qe)}else if(Ze){let Qe=Ze.replace(le,'').replace(ze,'');X(Ye,Qe)}}}elementStyles(Ye,ze,Je){let Ze=Ye.__cssBuild,Qe=te||'shady'===Ze?P(ze,Je):this.css(ze,Ye.is,Ye.extends,Je)+'\n\n';return Qe.trim()}css(Ye,ze,Je,Ze){let Qe=this._calcHostScope(ze,Je);ze=this._calcElementScope(ze);let et=this;return P(Ye,function(tt){tt.isScoped||(et.rule(tt,ze,Qe),tt.isScoped=!0),Ze&&Ze(tt,ze,Qe)})}_calcElementScope(Ye){return Ye?'.'+Ye:''}_calcHostScope(Ye,ze){return ze?'[is='+Ye+']':Ye}rule(Ye,ze,Je){this._transformRule(Ye,this._transformComplexSelector,ze,Je)}_transformRule(Ye,ze,Je,Ze){Ye.selector=Ye.transformedSelector=this._transformRuleCss(Ye,ze,Je,Ze)}_transformRuleCss(Ye,ze,Je,Ze){let Qe=Ye.selector.split(pe);if(!D(Ye))for(let rt,et=0,tt=Qe.length;et<tt&&(rt=Qe[et]);et++)Qe[et]=ze.call(this,rt,Je,Ze);return Qe.join(pe)}_transformComplexSelector(Ye,ze,Je){let Ze=!1;return Ye=Ye.trim(),Ye=Ye.replace(ie,(Qe,et,tt)=>`:${et}(${tt.replace(/\s/g,'')})`),Ye=Ye.replace(he,`${_e} $1`),Ye=Ye.replace(ue,(Qe,et,tt)=>{if(!Ze){let rt=this._transformCompoundSelector(tt,et,ze,Je);Ze=Ze||rt.stop,et=rt.combinator,tt=rt.value}return et+tt}),Ye}_transformCompoundSelector(Ye,ze,Je,Ze){let Qe=Ye.indexOf(fe);0<=Ye.indexOf(_e)?Ye=this._transformHostSelector(Ye,Ze):0!==Qe&&(Ye=Je?this._transformSimpleSelector(Ye,Je):Ye);let et=!1;0<=Qe&&(ze='',et=!0);let tt;return et&&(tt=!0,et&&(Ye=Ye.replace(ge,(rt,st)=>` > ${st}`))),Ye=Ye.replace(Ee,(rt,st,ot)=>`[dir="${ot}"] ${st}, ${st}[dir="${ot}"]`),{value:Ye,combinator:ze,stop:tt}}_transformSimpleSelector(Ye,ze){let Je=Ye.split(be);return Je[0]+=ze,Je.join(be)}_transformHostSelector(Ye,ze){let Je=Ye.match(Se),Ze=Je&&Je[2].trim()||'';if(Ze){if(!Ze[0].match(me)){let Qe=Ze.split(me)[0];return Qe===ze?Ze:'should_not_match'}return Ye.replace(Se,function(Qe,et,tt){return ze+tt})}return Ye.replace(_e,ze)}documentRule(Ye){Ye.selector=Ye.parsedSelector,this.normalizeRootSelector(Ye),this._transformRule(Ye,this._transformDocumentSelector)}normalizeRootSelector(Ye){Ye.selector===':root'&&(Ye.selector='html')}_transformDocumentSelector(Ye){return Ye.match(fe)?this._transformComplexSelector(Ye,de):this._transformSimpleSelector(Ye.trim(),de)}}let ie=/:(nth[-\w]+)\(([^)]+)\)/,de=`:not(.${le})`,pe=',',ue=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,me=/[[.:#*]/,_e=':host',fe='::slotted',he=/^(::slotted)/,Se=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ge=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ee=/(.*):dir\((?:(ltr|rtl))\)/,be=':';var Ae=new ae,xe={};const Te=Promise.resolve();class Re{static get(Ye){return Ye.__styleInfo}static set(Ye,ze){return Ye.__styleInfo=ze,ze}static invalidate(Ye){xe[Ye]&&(xe[Ye]._applyShimInvalid=!0)}static startValidating(Ye){const ze=xe[Ye];ze._validating||(ze._validating=!0,Te.then(()=>{ze._applyShimInvalid=!1,ze._validating=!1}))}constructor(Ye,ze,Je,Ze,Qe,et){this.styleRules=Ye||null,this.placeholder=ze||null,this.ownStylePropertyNames=Je||[],this.overrideStyleProperties=null,this.elementName=Ze||'',this.cssBuild=et||'',this.typeExtension=Qe||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}}const Ie=window.Element.prototype,Me=Ie.matches||Ie.matchesSelector||Ie.mozMatchesSelector||Ie.msMatchesSelector||Ie.oMatchesSelector||Ie.webkitMatchesSelector,Oe=navigator.userAgent.match('Trident'),Pe='x-scope';class Le{get XSCOPE_NAME(){return Pe}decorateStyles(Ye){let ze=this,Je={},Ze=[],Qe=0;U(Ye,function(tt){ze.decorateRule(tt),tt.index=Qe++,ze.collectPropertiesInCssText(tt.propertyInfo.cssText,Je)},function(rt){Ze.push(rt)}),Ye._keyframes=Ze;let et=[];for(let tt in Je)et.push(tt);return et}decorateRule(Ye){if(Ye.propertyInfo)return Ye.propertyInfo;let ze={},Je={},Ze=this.collectProperties(Ye,Je);return Ze&&(ze.properties=Je,Ye.rules=null),ze.cssText=this.collectCssText(Ye),Ye.propertyInfo=ze,ze}collectProperties(Ye,ze){let Je=Ye.propertyInfo;if(!Je){let Ze,Qe=ne.VAR_ASSIGN,et=Ye.parsedCssText,tt,rt;for(;Ze=Qe.exec(et);)tt=(Ze[2]||Ze[3]).trim(),('inherit'!==tt||'unset'!==tt)&&(ze[Ze[1].trim()]=tt),rt=!0;return rt}else if(Je.properties)return Object.assign(ze,Je.properties),!0}collectCssText(Ye){return this.collectConsumingCssText(Ye.parsedCssText)}collectConsumingCssText(Ye){return Ye.replace(ne.BRACKETED,'').replace(ne.VAR_ASSIGN,'')}collectPropertiesInCssText(Ye,ze){for(let Je,Ze;Je=ne.VAR_CONSUMED.exec(Ye);)Ze=Je[1],':'!==Je[2]&&(ze[Ze]=!0)}reify(Ye){let ze=Object.getOwnPropertyNames(Ye);for(let Ze,Je=0;Je<ze.length;Je++)Ze=ze[Je],Ye[Ze]=this.valueForProperty(Ye[Ze],Ye)}valueForProperty(Ye,ze){if(Ye)if(0<=Ye.indexOf(';'))Ye=this.valueForProperties(Ye,ze);else{let Je=this;Ye=V(Ye,function(Qe,et,tt,rt){if(!et)return Qe+rt;let st=Je.valueForProperty(ze[et],ze);return st&&'initial'!==st?'apply-shim-inherit'===st&&(st='inherit'):st=Je.valueForProperty(ze[tt]||tt,ze)||tt,Qe+(st||'')+rt})}return Ye&&Ye.trim()||''}valueForProperties(Ye,ze){let Je=Ye.split(';');for(let Qe,et,Ze=0;Ze<Je.length;Ze++)if(Qe=Je[Ze]){if(ne.MIXIN_MATCH.lastIndex=0,et=ne.MIXIN_MATCH.exec(Qe),et)Qe=this.valueForProperty(ze[et[1]],ze);else{let tt=Qe.indexOf(':');if(-1!==tt){let rt=Qe.substring(tt);rt=rt.trim(),rt=this.valueForProperty(rt,ze)||rt,Qe=Qe.substring(0,tt)+rt}}Je[Ze]=Qe&&Qe.lastIndexOf(';')===Qe.length-1?Qe.slice(0,-1):Qe||''}return Je.join(';')}applyProperties(Ye,ze){let Je='';Ye.propertyInfo||this.decorateRule(Ye),Ye.propertyInfo.cssText&&(Je=this.valueForProperties(Ye.propertyInfo.cssText,ze)),Ye.cssText=Je}applyKeyframeTransforms(Ye,ze){let Je=Ye.cssText,Ze=Ye.cssText;if(null==Ye.hasAnimations&&(Ye.hasAnimations=ne.ANIMATION_MATCH.test(Je)),Ye.hasAnimations){let Qe;if(null==Ye.keyframeNamesToTransform)for(let et in Ye.keyframeNamesToTransform=[],ze)Qe=ze[et],Ze=Qe(Je),Je!==Ze&&(Je=Ze,Ye.keyframeNamesToTransform.push(et));else{for(let et=0;et<Ye.keyframeNamesToTransform.length;++et)Qe=ze[Ye.keyframeNamesToTransform[et]],Je=Qe(Je);Ze=Je}}Ye.cssText=Ze}propertyDataFromStyles(Ye,ze){let Je={},Ze=this,Qe=[];return U(Ye,function(et){et.propertyInfo||Ze.decorateRule(et);let tt=et.transformedSelector||et.parsedSelector;ze&&et.propertyInfo.properties&&tt&&Me.call(ze,tt)&&(Ze.collectProperties(et,Je),W(et.index,Qe))},null,!0),{properties:Je,key:Qe}}whenHostOrRootRule(Ye,ze,Je,Ze){if(ze.propertyInfo||this.decorateRule(ze),!!ze.propertyInfo.properties){let Qe=Ye.is?Ae._calcHostScope(Ye.is,Ye.extends):'html',et=ze.parsedSelector,tt=':host > *'===et||'html'===et,rt=0===et.indexOf(':host')&&!tt;if('shady'===Je&&(tt=et===Qe+' > *.'+Qe||-1!==et.indexOf('html'),rt=!tt&&0===et.indexOf(Qe)),'shadow'===Je&&(tt=':host > *'===et||'html'===et,rt=rt&&!tt),tt||rt){let st=Qe;rt&&(te&&!ze.transformedSelector&&(ze.transformedSelector=Ae._transformRuleCss(ze,Ae._transformComplexSelector,Ae._calcElementScope(Ye.is),Qe)),st=ze.transformedSelector||Qe),Ze({selector:st,isHost:rt,isRoot:tt})}}}hostAndRootPropertiesForScope(Ye,ze){let Je={},Ze={},Qe=this,et=ze&&ze.__cssBuild;return U(ze,function(tt){Qe.whenHostOrRootRule(Ye,tt,et,function(rt){let st=Ye._element||Ye;Me.call(st,rt.selector)&&(rt.isHost?Qe.collectProperties(tt,Je):Qe.collectProperties(tt,Ze))})},null,!0),{rootProps:Ze,hostProps:Je}}transformStyles(Ye,ze,Je){let Ze=this,Qe=Ae._calcHostScope(Ye.is,Ye.extends),et=Ye.extends?'\\'+Qe.slice(0,-1)+'\\]':Qe,tt=new RegExp(ne.HOST_PREFIX+et+ne.HOST_SUFFIX),rt=Re.get(Ye).styleRules,st=this._elementKeyframeTransforms(Ye,rt,Je);return Ae.elementStyles(Ye,rt,function(ot){Ze.applyProperties(ot,ze),te||D(ot)||!ot.cssText||(Ze.applyKeyframeTransforms(ot,st),Ze._scopeSelector(ot,tt,Qe,Je))})}_elementKeyframeTransforms(Ye,ze,Je){let Ze=ze._keyframes,Qe={};if(!te&&Ze)for(let et=0,tt=Ze[et];et<Ze.length;tt=Ze[++et])this._scopeKeyframes(tt,Je),Qe[tt.keyframesName]=this._keyframesRuleTransformer(tt);return Qe}_keyframesRuleTransformer(Ye){return function(ze){return ze.replace(Ye.keyframesNameRx,Ye.transformedKeyframesName)}}_scopeKeyframes(Ye,ze){Ye.keyframesNameRx=new RegExp(Ye.keyframesName,'g'),Ye.transformedKeyframesName=Ye.keyframesName+'-'+ze,Ye.transformedSelector=Ye.transformedSelector||Ye.selector,Ye.selector=Ye.transformedSelector.replace(Ye.keyframesName,Ye.transformedKeyframesName)}_scopeSelector(Ye,ze,Je,Ze){Ye.transformedSelector=Ye.transformedSelector||Ye.selector;let Qe=Ye.transformedSelector,et='.'+Ze,tt=Qe.split(',');for(let ot,rt=0,st=tt.length;rt<st&&(ot=tt[rt]);rt++)tt[rt]=ot.match(ze)?ot.replace(Je,et):et+' '+ot;Ye.selector=tt.join(',')}applyElementScopeSelector(Ye,ze,Je){let Ze=Ye.getAttribute('class')||'',Qe=Ze;Je&&(Qe=Ze.replace(new RegExp('\\s*'+Pe+'\\s*'+Je+'\\s*','g'),' ')),Qe+=(Qe?' ':'')+Pe+' '+ze,Ze!==Qe&&X(Ye,Qe)}applyElementStyle(Ye,ze,Je,Ze){let Qe=Ze?Ze.textContent||'':this.transformStyles(Ye,ze,Je),et=Re.get(Ye),tt=et.customStyle;return tt&&!te&&tt!==Ze&&(tt._useCount--,0>=tt._useCount&&tt.parentNode&&tt.parentNode.removeChild(tt)),te?et.customStyle?(et.customStyle.textContent=Qe,Ze=et.customStyle):Qe&&(Ze=H(Qe,Je,Ye.shadowRoot,et.placeholder)):Ze?!Ze.parentNode&&F(Ze,null,et.placeholder):Qe&&(Ze=H(Qe,Je,null,et.placeholder)),Ze&&(Ze._useCount=Ze._useCount||0,et.customStyle!=Ze&&Ze._useCount++,et.customStyle=Ze),Oe&&(Ze.textContent=Ze.textContent),Ze}applyCustomStyle(Ye,ze){let Je=L(Ye),Ze=this;Ye.textContent=P(Je,function(Qe){let et=Qe.cssText=Qe.parsedCssText;Qe.propertyInfo&&Qe.propertyInfo.cssText&&(et=R(et),Qe.cssText=Ze.valueForProperties(et,ze))})}}var we=new Le;let De={};const Ue=window.customElements;if(Ue&&!te){const Ye=Ue.define;Ue.define=function(ze,Je,Ze){return De[ze]=K(ze),Ye.call(Ue,ze,Je,Ze)}}let He=ne.MIXIN_MATCH,Fe=ne.VAR_ASSIGN,je=/;\s*/m,$e=/^\s*(initial)|(inherit)\s*$/,qe='_-_';class Ke{constructor(){this._map={}}set(Ye,ze){Ye=Ye.trim(),this._map[Ye]={properties:ze,dependants:{}}}get(Ye){return Ye=Ye.trim(),this._map[Ye]}}class Be{constructor(){this._currentTemplate=null,this._measureElement=null,this._map=new Ke,this._separator=qe,this._boundProduceCssProperties=(Ye,ze,Je,Ze)=>this._produceCssProperties(Ye,ze,Je,Ze)}detectMixin(Ye){const ze=He.test(Ye)||Fe.test(Ye);return He.lastIndex=0,Fe.lastIndex=0,ze}transformStyle(Ye,ze){let Je=L(Ye);return this.transformRules(Je,ze),Je}transformRules(Ye,ze){this._currentTemplate=xe[ze],U(Ye,Je=>{this.transformRule(Je)}),this._currentTemplate=null}transformRule(Ye){Ye.cssText=this.transformCssText(Ye.parsedCssText),':root'===Ye.selector&&(Ye.selector=':host > *')}transformCssText(Ye){return Ye=Ye.replace(Fe,this._boundProduceCssProperties),this._consumeCssProperties(Ye)}_getInitialValueForProperty(Ye){return this._measureElement||(this._measureElement=document.createElement('meta'),this._measureElement.style.all='initial',document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(Ye)}_consumeCssProperties(Ye){for(let ze;ze=He.exec(Ye);){let Je=ze[0],Ze=ze[1],Qe=ze.index,et=Qe+Je.indexOf('@apply'),tt=Qe+Je.length,rt=Ye.slice(0,et),st=Ye.slice(tt),ot=this._cssTextToMap(rt),nt=this._atApplyToCssProperties(Ze,ot);Ye=[rt,nt,st].join(''),He.lastIndex=Qe+nt.length}return Ye}_atApplyToCssProperties(Ye,ze){Ye=Ye.replace(je,'');let Je=[],Ze=this._map.get(Ye);if(Ze||(this._map.set(Ye,{}),Ze=this._map.get(Ye)),Ze){this._currentTemplate&&(Ze.dependants[this._currentTemplate.name]=this._currentTemplate);let Qe,et,tt;for(Qe in Ze.properties)tt=ze&&ze[Qe],et=[Qe,': var(',Ye,qe,Qe],tt&&et.push(',',tt),et.push(')'),Je.push(et.join(''))}return Je.join('; ')}_replaceInitialOrInherit(Ye,ze){let Je=$e.exec(ze);return Je&&(Je[1]?ze=Be._getInitialValueForProperty(Ye):ze='apply-shim-inherit'),ze}_cssTextToMap(Ye){let ze=Ye.split(';'),Je,Ze,Qe={};for(let tt,rt,et=0;et<ze.length;et++)tt=ze[et],tt&&(rt=tt.split(':'),1<rt.length&&(Je=rt[0].trim(),Ze=this._replaceInitialOrInherit(Je,rt.slice(1).join(':')),Qe[Je]=Ze));return Qe}_invalidateMixinEntry(Ye){for(let ze in Ye.dependants)this._currentTemplate&&ze===this._currentTemplate.name||Re.invalidate(ze)}_produceCssProperties(Ye,ze,Je,Ze){if(Je&&V(Je,(pt,ct)=>{ct&&this._map.get(ct)&&(Ze='@apply '+ct+';')}),!Ze)return Ye;let Qe=this._consumeCssProperties(Ze),et=Ye.slice(0,Ye.indexOf('--')),tt=this._cssTextToMap(Qe),rt=tt,st=this._map.get(ze),ot=st&&st.properties;ot?rt=Object.assign(Object.create(ot),tt):this._map.set(ze,rt);let lt,it,nt=[],dt=!1;for(lt in rt)it=tt[lt],void 0==it&&(it='initial'),ot&&!(lt in ot)&&(dt=!0),nt.push(ze+qe+lt+': '+it);return dt&&this._invalidateMixinEntry(st),st&&(st.properties=rt),Je&&(et=Ye+';'+et),et+nt.join('; ')+';'}}let Ve=new Be;window.ApplyShim=Ve;let Xe=function(){};if(!te){let Ye=et=>{return et.classList&&!et.classList.contains(Ae.SCOPE_NAME)||et instanceof SVGElement&&(!et.hasAttribute('class')||0>et.getAttribute('class').indexOf(Ae.SCOPE_NAME))},ze=et=>{for(let rt,tt=0;tt<et.length;tt++)if(rt=et[tt],rt.target!==document.documentElement&&rt.target!==document.head){for(let ot,st=0;st<rt.addedNodes.length;st++)if(ot=rt.addedNodes[st],Ye(ot)){let nt=ot.getRootNode();if(nt.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let lt=nt.host;if(lt){let it=lt.is||lt.localName;Ae.dom(ot,it)}}}for(let ot,st=0;st<rt.removedNodes.length;st++)if(ot=rt.removedNodes[st],ot.nodeType===Node.ELEMENT_NODE){let nt;if(ot.classList?nt=Array.from(ot.classList):ot.hasAttribute('class')&&(nt=ot.getAttribute('class').split(/\s+/)),void 0!=nt){let lt=nt.indexOf(Ae.SCOPE_NAME);if(0<=lt){let it=nt[lt+1];it&&Ae.dom(ot,it,!0)}}}}},Je=new MutationObserver(ze),Ze=et=>{Je.observe(et,{childList:!0,subtree:!0})},Qe=window.customElements&&!window.customElements.flush;if(Qe)Ze(document);else{let et=()=>{Ze(document.body)};window.HTMLImports?window.HTMLImports.whenReady(et):requestAnimationFrame(function(){if('loading'===document.readyState){let tt=function(){et(),document.removeEventListener('readystatechange',tt)};document.addEventListener('readystatechange',tt)}else et()})}Xe=function(){ze(Je.takeRecords())}}let We=new class{constructor(Ye=100){this.cache={},this.typeMax=Ye}_validate(Ye,ze,Je){for(let Qe,Ze=0;Ze<Je.length;Ze++)if(Qe=Je[Ze],Ye.properties[Qe]!==ze[Qe])return!1;return!0}store(Ye,ze,Je,Ze){let Qe=this.cache[Ye]||[];Qe.push({properties:ze,styleElement:Je,scopeSelector:Ze}),Qe.length>this.typeMax&&Qe.shift(),this.cache[Ye]=Qe}fetch(Ye,ze,Je){let Ze=this.cache[Ye];if(Ze)for(let et,Qe=Ze.length-1;0<=Qe;Qe--)if(et=Ze[Qe],this._validate(et,ze,Je))return et}};class Ge{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement,this._documentOwnerStyleInfo=Re.set(document.documentElement,new Re({rules:[]})),this._elementsHaveApplied=!1}get nativeShadow(){return te}get nativeCss(){return re}get nativeCssApply(){return!1}flush(){Xe()}_generateScopeSelector(Ye){let ze=this._scopeCounter[Ye]=(this._scopeCounter[Ye]||0)+1;return`${Ye}-${ze}`}getStyleAst(Ye){return L(Ye)}styleAstToString(Ye){return P(Ye)}_gatherStyles(Ye){let ze=Ye.content.querySelectorAll('style'),Je=[];for(let Qe,Ze=0;Ze<ze.length;Ze++)Qe=ze[Ze],Je.push(Qe.textContent),Qe.parentNode.removeChild(Qe);return Je.join('').trim()}_getCssBuild(Ye){let ze=Ye.content.querySelector('style');return ze?ze.getAttribute('css-build')||'':''}prepareTemplate(Ye,ze,Je){if(!Ye._prepared){Ye._prepared=!0,Ye.name=ze,Ye.extends=Je,xe[ze]=Ye;let Ze=this._getCssBuild(Ye),Qe=this._gatherStyles(Ye),et={is:ze,extends:Je,__cssBuild:Ze};this.nativeShadow||Ae.dom(Ye.content,ze);let tt=Ve.detectMixin(Qe),rt=_(Qe);tt&&this.nativeCss&&!this.nativeCssApply&&Ve.transformRules(rt,ze),Ye._styleAst=rt;let st=[];if(this.nativeCss||(st=we.decorateStyles(Ye._styleAst,et)),!st.length||this.nativeCss){let ot=this.nativeShadow?Ye.content:null,nt=De[ze],lt=this._generateStaticStyle(et,Ye._styleAst,ot,nt);Ye._style=lt}Ye._ownPropertyNames=st}}_generateStaticStyle(Ye,ze,Je,Ze){let Qe=Ae.elementStyles(Ye,ze);if(Qe.length)return H(Qe,Ye.is,Je,Ze)}_prepareHost(Ye){let Je,ze=Ye.getAttribute('is')||Ye.localName;ze!==Ye.localName&&(Je=Ye.localName);let et,tt,rt,Ze=De[ze],Qe=xe[ze];return Qe&&(et=Qe._styleAst,tt=Qe._ownPropertyNames,rt=Qe._cssBuild),Re.set(Ye,new Re(et,Ze,tt,ze,Je,rt))}applyStyle(Ye,ze){let Je=Ye.getAttribute('is')||Ye.localName,Ze=Re.get(Ye),Qe=!!Ze;if(Ze||(Ze=this._prepareHost(Ye)),this._isRootOwner(Ye)||(this._elementsHaveApplied=!0),window.CustomStyle){let et=window.CustomStyle;if(et._documentDirty){if(et.findStyles(),this.nativeCss?!this.nativeCssApply&&et._revalidateApplyShim():this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),et.applyStyles(),!this._elementsHaveApplied)return;if(!this.nativeCss&&(this.updateStyles(),Qe))return}}if(ze&&(Ze.overrideStyleProperties=Ze.overrideStyleProperties||{},Object.assign(Ze.overrideStyleProperties,ze)),this.nativeCss){Ze.overrideStyleProperties&&this._updateNativeProperties(Ye,Ze.overrideStyleProperties);let et=xe[Je];if(!et&&!this._isRootOwner(Ye))return;if(et&&et._applyShimInvalid&&et._style){if(et._validating||(Ve.transformRules(et._styleAst,Je),et._style.textContent=Ae.elementStyles(Ye,Ze.styleRules),Re.startValidating(Je)),this.nativeShadow){let tt=Ye.shadowRoot;if(tt){let rt=tt.querySelector('style');rt.textContent=Ae.elementStyles(Ye,Ze.styleRules)}}Ze.styleRules=et._styleAst}}else this._updateProperties(Ye,Ze),Ze.ownStylePropertyNames&&Ze.ownStylePropertyNames.length&&this._applyStyleProperties(Ye,Ze);if(Qe){let et=this._isRootOwner(Ye)?Ye:Ye.shadowRoot;et&&this._applyToDescendants(et)}}_applyToDescendants(Ye){let ze=Ye.children;for(let Ze,Je=0;Je<ze.length;Je++)Ze=ze[Je],Ze.shadowRoot&&this.applyStyle(Ze),this._applyToDescendants(Ze)}_styleOwnerForNode(Ye){let ze=Ye.getRootNode(),Je=ze.host;return Je?Re.get(Je)?Je:this._styleOwnerForNode(Je):this._documentOwner}_isRootOwner(Ye){return Ye===this._documentOwner}_applyStyleProperties(Ye,ze){let Je=Ye.getAttribute('is')||Ye.localName,Ze=We.fetch(Je,ze.styleProperties,ze.ownStylePropertyNames),Qe=Ze&&Ze.scopeSelector,et=Ze?Ze.styleElement:null,tt=ze.scopeSelector;ze.scopeSelector=Qe||this._generateScopeSelector(Je);let rt=we.applyElementStyle(Ye,ze.styleProperties,ze.scopeSelector,et);return this.nativeShadow||we.applyElementScopeSelector(Ye,ze.scopeSelector,tt),Ze||We.store(Je,ze.styleProperties,rt,ze.scopeSelector),rt}_updateProperties(Ye,ze){let Je=this._styleOwnerForNode(Ye),Ze=Re.get(Je),Qe=Ze.styleProperties,et=Object.create(Qe||null),tt=we.hostAndRootPropertiesForScope(Ye,ze.styleRules),rt=we.propertyDataFromStyles(Ze.styleRules,Ye),st=rt.properties;Object.assign(et,tt.hostProps,st,tt.rootProps),this._mixinOverrideStyles(et,ze.overrideStyleProperties),we.reify(et),ze.styleProperties=et}_mixinOverrideStyles(Ye,ze){for(let Je in ze){let Ze=ze[Je];(Ze||0===Ze)&&(Ye[Je]=Ze)}}_updateNativeProperties(Ye,ze){for(let Je in ze)null===Je?Ye.style.removeProperty(Je):Ye.style.setProperty(Je,ze[Je])}updateStyles(Ye){this.applyStyle(this._documentOwner,Ye)}_transformCustomStyleForDocument(Ye){let ze=L(Ye);U(ze,Je=>{te?Ae.normalizeRootSelector(Je):Ae.documentRule(Je),this.nativeCss&&!this.nativeCssApply&&Ve.transformRule(Je)}),this.nativeCss?Ye.textContent=P(ze):this._documentOwnerStyleInfo.styleRules.rules.push(ze)}_revalidateApplyShim(Ye){if(this.nativeCss&&!this.nativeCssApply){let ze=L(Ye);Ve.transformRules(ze),Ye.textContent=P(ze)}}_applyCustomStyleToDocument(Ye){this.nativeCss||we.applyCustomStyle(Ye,this._documentOwnerStyleInfo.styleProperties)}getComputedStyleValue(Ye,ze){let Je;if(!this.nativeCss){let Ze=Re.get(Ye)||Re.get(this._styleOwnerForNode(Ye));Je=Ze.styleProperties[ze]}return Je=Je||window.getComputedStyle(Ye).getPropertyValue(ze),Je.trim()}setElementClass(Ye,ze){let Je=Ye.getRootNode(),Ze=ze?ze.split(/\s/):[],Qe=Je.host&&Je.host.localName;if(!Qe){var et=Ye.getAttribute('class');if(et){let tt=et.split(/\s/);for(let rt=0;rt<tt.length;rt++)if(tt[rt]===Ae.SCOPE_NAME){Qe=tt[rt+1];break}}}if(Qe&&Ze.push(Ae.SCOPE_NAME,Qe),!this.nativeCss){let tt=Re.get(Ye);tt&&tt.scopeSelector&&Ze.push(we.XSCOPE_NAME,tt.scopeSelector)}X(Ye,Ze.join(' '))}_styleInfoForNode(Ye){return Re.get(Ye)}}window.ShadyCSS=new Ge,function(){'use strict';HTMLImports.whenReady(function(){requestAnimationFrame(function(){window.dispatchEvent(new CustomEvent('WebComponentsReady'))})})}(window.WebComponents),function(){var ze=document.createElement('style');ze.textContent='body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n';var Je=document.querySelector('head');Je.insertBefore(ze,Je.firstChild)}(window.WebComponents)})();
//# sourceMappingURL=webcomponents-hi-ce.js.map