mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
7 lines
34 KiB
JavaScript
7 lines
34 KiB
JavaScript
(function(){'use strict';function a(Ye){return Ye=d(Ye),_(y(Ye),Ye)}function d(Ye){return Ye.replace(V.comments,'').replace(V.port,'')}function y(Ye){let ze={start:0,end:Ye.length},$e=ze;for(let Qe=0,Ze=Ye.length;Qe<Ze;Qe++)if(Ye[Qe]===B){$e.rules||($e.rules=[]);let Je=$e,et=Je.rules[Je.rules.length-1];$e={start:Qe+1,parent:Je,previous:et},Je.rules.push($e)}else Ye[Qe]===X&&($e.end=Qe+1,$e=$e.parent||ze);return ze}function _(Ye,ze){let $e=ze.substring(Ye.start,Ye.end-1);if(Ye.parsedCssText=Ye.cssText=$e.trim(),Ye.parent){let Ze=Ye.previous?Ye.previous.end:Ye.parent.start;$e=ze.substring(Ze,Ye.start-1),$e=h($e),$e=$e.replace(V.multipleSpaces,' '),$e=$e.substring($e.lastIndexOf(';')+1);let Je=Ye.parsedSelector=Ye.selector=$e.trim();Ye.atRule=0===Je.indexOf('@'),Ye.atRule?0===Je.indexOf('@media')?Ye.type=K.MEDIA_RULE:Je.match(V.keyframesRule)&&(Ye.type=K.KEYFRAMES_RULE,Ye.keyframesName=Ye.selector.split(V.multipleSpaces).pop()):0===Je.indexOf(W)?Ye.type=K.MIXIN_RULE:Ye.type=K.STYLE_RULE}let Qe=Ye.rules;if(Qe)for(let et,Ze=0,Je=Qe.length;Ze<Je&&(et=Qe[Ze]);Ze++)_(et,ze);return Ye}function h(Ye){return Ye.replace(/\\([0-9a-f]{1,6})\s/gi,function(){let ze=arguments[1],$e=6-ze.length;for(;$e--;)ze='0'+ze;return'\\'+ze})}function S(Ye,ze,$e){$e=$e||'';let Qe='';if(Ye.cssText||Ye.rules){let Ze=Ye.rules;if(Ze&&!g(Ze))for(let tt,Je=0,et=Ze.length;Je<et&&(tt=Ze[Je]);Je++)Qe=S(tt,ze,Qe);else Qe=ze?Ye.cssText:E(Ye.cssText),Qe=Qe.trim(),Qe&&(Qe=' '+Qe+'\n')}return Qe&&(Ye.selector&&($e+=Ye.selector+' '+B+'\n'),$e+=Qe,Ye.selector&&($e+=X+'\n\n')),$e}function g(Ye){return 0===Ye[0].selector.indexOf(W)}function E(Ye){return Ye=C(Ye),A(Ye)}function C(Ye){return Ye.replace(V.customProp,'').replace(V.mixinProp,'')}function A(Ye){return Ye.replace(V.mixinApply,'').replace(V.varApply,'')}function T(Ye){Ye&&($=$&&!Ye.shimcssproperties,z=z&&!Ye.shimshadow)}function b(Ye,ze){return'string'==typeof Ye&&(Ye=a(Ye)),ze&&O(Ye,ze),S(Ye,$)}function R(Ye){return!Ye.__cssRules&&Ye.textContent&&(Ye.__cssRules=a(Ye.textContent)),Ye.__cssRules}function I(Ye){return Ye.parent&&Ye.parent.type===K.KEYFRAMES_RULE}function O(Ye,ze,$e,Qe){if(Ye){let Ze=!1;if(Qe&&Ye.type===K.MEDIA_RULE){let et=Ye.selector.match(J.MEDIA_MATCH);et&&!window.matchMedia(et[1]).matches&&(Ze=!0)}Ye.type===K.STYLE_RULE?ze(Ye):$e&&Ye.type===K.KEYFRAMES_RULE?$e(Ye):Ye.type===K.MIXIN_RULE&&(Ze=!0);let Je=Ye.rules;if(Je&&!Ze)for(let rt,et=0,tt=Je.length;et<tt&&(rt=Je[et]);et++)O(rt,ze,$e,Qe)}}function M(Ye,ze,$e,Qe){let Ze=L(Ye,ze);return P(Ze,$e,Qe)}function P(Ye,ze,$e){ze=ze||document.head;let Qe=$e&&$e.nextSibling||ze.firstChild;return Z=Ye,ze.insertBefore(Ye,Qe)}function L(Ye,ze){let $e=document.createElement('style');return ze&&$e.setAttribute('scope',ze),$e.textContent=Ye,$e}function w(Ye){let ze=document.createComment(' Shady DOM styles for '+Ye+' '),$e=Z?Z.nextSibling:null,Qe=document.head;return Qe.insertBefore(ze,$e||Qe.firstChild),Z=ze,ze}function D(Ye,ze){let $e=0;for(let Qe=ze,Ze=Ye.length;Qe<Ze;Qe++)if('('===Ye[Qe])$e++;else if(')'===Ye[Qe]&&0==--$e)return Qe;return-1}function H(Ye,ze){let $e=Ye.indexOf('var(');if(-1===$e)return ze(Ye,'','','');let Qe=D(Ye,$e+3),Ze=Ye.substring($e+4,Qe),Je=Ye.substring(0,$e),et=H(Ye.substring(Qe+1),ze),tt=Ze.indexOf(',');if(-1===tt)return ze(Je,Ze.trim(),'',et);let rt=Ze.substring(0,tt).trim(),st=Ze.substring(tt+1).trim();return ze(Je,rt,st,et)}function U(Ye,ze){window.ShadyDOM?window.ShadyDOM.nativeMethods.setAttribute.call(Ye,'class',ze):Ye.setAttribute('class',ze)}function k(Ye,ze){let $e=parseInt(Ye/32);ze[$e]=(ze[$e]||0)|1<<Ye%32}function F(){Xe||(Xe=!0,window.HTMLImports?window.HTMLImports.whenReady(q):'complete'===document.readyState?q():document.addEventListener('readystatechange',()=>{'complete'===document.readyState&&q()}))}function q(){requestAnimationFrame(()=>{(Xe||Be._elementsHaveApplied)&&Be.updateStyles(),Xe=!1})}(Ye=>{const ze=!!('import'in document.createElement('link'));let $e=null;!1=='currentScript'in document&&Object.defineProperty(document,'currentScript',{get(){return $e||('complete'===document.readyState?null:document.scripts[document.scripts.length-1])},configurable:!0});const Qe=/(^\/)|(^#)|(^[\w-\d]*:)/,Ze=/(url\()([^)]*)(\))/g,Je=/(@import[\s]+(?!url\())([^;]*)(;)/g,et=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,tt={fixUrls(Et,Ct){if(Et.href&&Et.setAttribute('href',tt.replaceAttrUrl(Et.getAttribute('href'),Ct)),Et.src&&Et.setAttribute('src',tt.replaceAttrUrl(Et.getAttribute('src'),Ct)),'style'===Et.localName){let xt=tt.replaceUrls(Et.textContent,Ct,Ze);xt=tt.replaceUrls(xt,Ct,Je),Et.textContent=xt}},replaceUrls(Et,Ct,xt){return Et.replace(xt,(At,vt,Nt,Tt)=>{let bt=Nt.replace(/["']/g,'');return Ct&&(bt=tt.resolveUrl(bt,Ct)),vt+'\''+bt+'\''+Tt})},replaceAttrUrl(Et,Ct){return Et&&Qe.test(Et)?Et:tt.resolveUrl(Et,Ct)},resolveUrl(Et,Ct){if(void 0===tt.__workingURL){tt.__workingURL=!1;try{const At=new URL('b','http://a');At.pathname='c%20d',tt.__workingURL='http://a/c%20d'===At.href}catch(At){}}if(tt.__workingURL)return new URL(Et,Ct).href;let xt=tt.__tempDoc;return xt||(xt=document.implementation.createHTMLDocument('temp'),tt.__tempDoc=xt,xt.__base=xt.createElement('base'),xt.head.appendChild(xt.__base),xt.__anchor=xt.createElement('a')),xt.__base.href=Ct,xt.__anchor.href=Et,xt.__anchor.href||Et}},rt={async:!0,load(Et,Ct,xt){if(!Et)xt('error: href must be specified');else if(Et.match(/^data:/)){const At=Et.split(','),vt=At[0];let Nt=At[1];Nt=-1<vt.indexOf(';base64')?atob(Nt):decodeURIComponent(Nt),Ct(Nt)}else{const At=new XMLHttpRequest;At.open('GET',Et,rt.async),At.onload=()=>{let vt=At.getResponseHeader('Location');if(vt&&0===vt.indexOf('/')){const Tt=location.origin||location.protocol+'//'+location.host;vt=Tt+vt}const Nt=At.response||At.responseText;304===At.status||0===At.status||200<=At.status&&300>At.status?Ct(Nt,vt):xt(Nt)},At.send()}}},st=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent),nt='link[rel=import]',ot='import-disable',lt=`link[rel=stylesheet][href][type=${ot}]`,at=`${nt}, ${lt},
|
|
style:not([type]), link[rel=stylesheet][href]:not([type]),
|
|
script:not([type]), script[type="application/javascript"],
|
|
script[type="text/javascript"]`,it='import-dependency',dt=`${nt}:not(${it})`,pt=`script[${it}]`,ct=`style[${it}],
|
|
link[rel=stylesheet][${it}]`;const ut=Et=>{return Et.nodeType===Node.ELEMENT_NODE&&'link'===Et.localName&&'import'===Et.rel},yt=(Et,Ct)=>{if(Et.__loaded)Ct&&Ct();else if('script'===Et.localName&&!Et.src)Et.__loaded=!0,Ct&&Ct();else{const xt=At=>{Et.removeEventListener(At.type,xt),Et.__loaded=!0,Ct&&Ct()};Et.addEventListener('load',xt),st&&'style'===Et.localName||Et.addEventListener('error',xt)}},ft=Et=>{_t(()=>ht(()=>Et&&Et()))},_t=Et=>{if('loading'!==document.readyState)Et();else{const Ct=()=>{'loading'!==document.readyState&&(document.removeEventListener('readystatechange',Ct),Et())};document.addEventListener('readystatechange',Ct)}},ht=Et=>{let Ct=document.querySelectorAll(dt),xt=Ct.length;if(!xt)return void Et();for(let Nt,At=0,vt=Ct.length;At<vt&&(Nt=Ct[At]);At++)yt(Nt,()=>{0==--xt&&Et()})},St=Et=>{if(ze)return Et.ownerDocument===document?null:Et.ownerDocument;let Ct=Et.__importDoc;if(!Ct&&Et.parentNode){if(Ct=Et.parentNode,'function'==typeof Ct.closest)Ct=Ct.closest(nt);else for(;!ut(Ct)&&(Ct=Ct.parentNode););Et.__importDoc=Ct}return Ct},gt=(Et,Ct)=>{if('function'==typeof window.CustomEvent)return new CustomEvent(Et,Ct);const xt=document.createEvent('CustomEvent');return xt.initCustomEvent(Et,!!Ct.bubbles,!!Ct.cancelable,Ct.detail),xt};if(ze){const Et=document.querySelectorAll(nt);for(let vt,xt=0,At=Et.length;xt<At&&(vt=Et[xt]);xt++)vt.import&&'loading'===vt.import.readyState||(vt.__loaded=!0);const Ct=xt=>{const At=xt.target;ut(At)&&(At.__loaded=!0)};document.addEventListener('load',Ct,!0),document.addEventListener('error',Ct,!0)}else new class{constructor(){this.documents={},this.inflight=0,this.dynamicImportsMO=new MutationObserver(Et=>this.handleMutations(Et)),_t(()=>{this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.loadImports(document)})}loadImports(Et){const Ct=Et.querySelectorAll(nt);for(let xt=0,At=Ct.length;xt<At;xt++)this.loadImport(Ct[xt])}loadImport(Et){const Ct=Et.href;if(void 0!==this.documents[Ct]){const xt=this.documents[Ct];return void(xt&&xt.__loaded&&(Et.import=xt,this.fireEventIfNeeded(Et)))}this.inflight++,this.documents[Ct]='pending',rt.load(Ct,(xt,At)=>{const vt=this.makeDocument(xt,At||Ct);this.documents[Ct]=vt,this.inflight--,this.loadImports(vt),this.processImportsIfLoadingDone()},()=>{this.documents[Ct]=null,this.inflight--,this.processImportsIfLoadingDone()})}makeDocument(Et,Ct){if(!Et)return document.createDocumentFragment();st&&(Et=Et.replace(et,(bt,Rt,It)=>{return-1===bt.indexOf('type=')?`${Rt} type=${ot} ${It}`:bt}));let xt;const At=document.createElement('template');if(At.innerHTML=Et,At.content)xt=At.content;else for(xt=document.createDocumentFragment();At.firstChild;)xt.appendChild(At.firstChild);const vt=xt.querySelector('base');vt&&(Ct=tt.replaceAttrUrl(vt.getAttribute('href'),Ct),vt.removeAttribute('href'));const Nt=xt.querySelectorAll(at);let Tt=0;for(let It,bt=0,Rt=Nt.length;bt<Rt&&(It=Nt[bt]);bt++)if(yt(It),tt.fixUrls(It,Ct),It.setAttribute(it,''),'script'===It.localName&&!It.src&&It.textContent){const Ot=Tt?`-${Tt}`:'',Mt=It.textContent+`\n//# sourceURL=${Ct}${Ot}.js\n`;It.setAttribute('src','data:text/javascript;charset=utf-8,'+encodeURIComponent(Mt)),It.textContent='',Tt++}return xt}processImportsIfLoadingDone(){if(!this.inflight){this.dynamicImportsMO.disconnect(),this.flatten(document);let Et=!1,Ct=!1;const xt=()=>{Ct&&Et&&(this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.fireEvents())};this.waitForStyles(()=>{Ct=!0,xt()}),this.runScripts(()=>{Et=!0,xt()})}}flatten(Et){const Ct=Et.querySelectorAll(nt);for(let vt,xt=0,At=Ct.length;xt<At&&(vt=Ct[xt]);xt++){const Nt=this.documents[vt.href];vt.import=Nt,Nt&&Nt.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.documents[vt.href]=vt,vt.readyState='loading',vt.import=vt,Object.defineProperty(vt,'baseURI',{get:()=>vt.href,configurable:!0,enumerable:!0}),this.flatten(Nt),vt.appendChild(Nt))}}runScripts(Et){const Ct=document.querySelectorAll(pt),xt=Ct.length,At=vt=>{if(vt<xt){const Nt=Ct[vt],Tt=document.createElement('script');Nt.removeAttribute(it);for(let bt=0,Rt=Nt.attributes.length;bt<Rt;bt++)Tt.setAttribute(Nt.attributes[bt].name,Nt.attributes[bt].value);$e=Tt,Nt.parentNode.replaceChild(Tt,Nt),yt(Tt,()=>{$e=null,At(vt+1)})}else Et()};At(0)}waitForStyles(Et){const Ct=document.querySelectorAll(ct);let xt=Ct.length;if(!xt)return void Et();const At=st&&!!document.querySelector(lt);for(let Tt,vt=0,Nt=Ct.length;vt<Nt&&(Tt=Ct[vt]);vt++)if(yt(Tt,()=>{Tt.removeAttribute(it),0==--xt&&Et()}),At&&Tt.parentNode!==document.head){const bt=document.createElement(Tt.localName);bt.__appliedElement=Tt,bt.setAttribute('type','import-placeholder'),Tt.parentNode.insertBefore(bt,Tt.nextSibling);let Rt=St(Tt);for(;Rt&&St(Rt);)Rt=St(Rt);Rt.parentNode!==document.head&&(Rt=null),document.head.insertBefore(Tt,Rt),Tt.removeAttribute('type')}}fireEvents(){const Et=document.querySelectorAll(nt);for(let xt,Ct=Et.length-1;0<=Ct&&(xt=Et[Ct]);Ct--)this.fireEventIfNeeded(xt)}fireEventIfNeeded(Et){if(!Et.__loaded){Et.__loaded=!0,Et.import&&(Et.import.readyState='complete');const Ct=Et.import?'load':'error';Et.dispatchEvent(gt(Ct,{bubbles:!1,cancelable:!1,detail:void 0}))}}handleMutations(Et){for(let Ct=0;Ct<Et.length;Ct++){const xt=Et[Ct];if(xt.addedNodes)for(let At=0;At<xt.addedNodes.length;At++){const vt=xt.addedNodes[At];vt&&vt.nodeType===Node.ELEMENT_NODE&&(ut(vt)?this.loadImport(vt):this.loadImports(vt))}}}};ft(()=>document.dispatchEvent(gt('HTMLImportsLoaded',{cancelable:!0,bubbles:!0,detail:void 0}))),Ye.useNative=ze,Ye.whenReady=ft,Ye.importForElement=St})(window.HTMLImports=window.HTMLImports||{});let K={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},B='{',X='}',V={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},W='--',z=!(window.ShadyDOM&&window.ShadyDOM.inUse),$=!navigator.userAgent.match('AppleWebKit/601')&&window.CSS&&CSS.supports&&CSS.supports('box-shadow','0 0 0 var(--foo)');window.ShadyCSS?T(window.ShadyCSS):window.WebComponents&&T(window.WebComponents.flags);let Z=null,J={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 ee='style-scope';class te{get SCOPE_NAME(){return ee}dom(Ye,ze,$e){Ye.__styleScoped?Ye.__styleScoped=null:this._transformDom(Ye,ze||'',$e)}_transformDom(Ye,ze,$e){Ye.nodeType===Node.ELEMENT_NODE&&this.element(Ye,ze,$e);let Qe='template'===Ye.localName?(Ye.content||Ye._content).childNodes:Ye.children||Ye.childNodes;if(Qe)for(let Ze=0;Ze<Qe.length;Ze++)this._transformDom(Qe[Ze],ze,$e)}element(Ye,ze,$e){if(ze)if(Ye.classList)$e?(Ye.classList.remove(ee),Ye.classList.remove(ze)):(Ye.classList.add(ee),Ye.classList.add(ze));else if(Ye.getAttribute){let Qe=Ye.getAttribute('class');if(!$e){let Ze=(Qe?Qe+' ':'')+ee+' '+ze;U(Ye,Ze)}else if(Qe){let Ze=Qe.replace(ee,'').replace(ze,'');U(Ye,Ze)}}}elementStyles(Ye,ze,$e){let Qe=Ye.__cssBuild,Ze=z||'shady'===Qe?b(ze,$e):this.css(ze,Ye.is,Ye.extends,$e)+'\n\n';return Ze.trim()}css(Ye,ze,$e,Qe){let Ze=this._calcHostScope(ze,$e);ze=this._calcElementScope(ze);let Je=this;return b(Ye,function(et){et.isScoped||(Je.rule(et,ze,Ze),et.isScoped=!0),Qe&&Qe(et,ze,Ze)})}_calcElementScope(Ye){return Ye?'.'+Ye:''}_calcHostScope(Ye,ze){return ze?'[is='+Ye+']':Ye}rule(Ye,ze,$e){this._transformRule(Ye,this._transformComplexSelector,ze,$e)}_transformRule(Ye,ze,$e,Qe){Ye.selector=Ye.transformedSelector=this._transformRuleCss(Ye,ze,$e,Qe)}_transformRuleCss(Ye,ze,$e,Qe){let Ze=Ye.selector.split(ne);if(!I(Ye))for(let tt,Je=0,et=Ze.length;Je<et&&(tt=Ze[Je]);Je++)Ze[Je]=ze.call(this,tt,$e,Qe);return Ze.join(ne)}_transformComplexSelector(Ye,ze,$e){let Qe=!1;return Ye=Ye.trim(),Ye=Ye.replace(re,(Ze,Je,et)=>`:${Je}(${et.replace(/\s/g,'')})`),Ye=Ye.replace(pe,`${ae} $1`),Ye=Ye.replace(oe,(Ze,Je,et)=>{if(!Qe){let tt=this._transformCompoundSelector(et,Je,ze,$e);Qe=Qe||tt.stop,Je=tt.combinator,et=tt.value}return Je+et}),Ye}_transformCompoundSelector(Ye,ze,$e,Qe){let Ze=Ye.indexOf(de);0<=Ye.indexOf(ae)?Ye=this._transformHostSelector(Ye,Qe):0!==Ze&&(Ye=$e?this._transformSimpleSelector(Ye,$e):Ye);let Je=!1;0<=Ze&&(ze='',Je=!0);let et;return Je&&(et=!0,Je&&(Ye=Ye.replace(ue,(tt,rt)=>` > ${rt}`))),Ye=Ye.replace(ye,(tt,rt,st)=>`[dir="${st}"] ${rt}, ${rt}[dir="${st}"]`),{value:Ye,combinator:ze,stop:et}}_transformSimpleSelector(Ye,ze){let $e=Ye.split(_e);return $e[0]+=ze,$e.join(_e)}_transformHostSelector(Ye,ze){let $e=Ye.match(me),Qe=$e&&$e[2].trim()||'';if(Qe){if(!Qe[0].match(le)){let Ze=Qe.split(le)[0];return Ze===ze?Qe:'should_not_match'}return Ye.replace(me,function(Ze,Je,et){return ze+et})}return Ye.replace(ae,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(de)?this._transformComplexSelector(Ye,se):this._transformSimpleSelector(Ye.trim(),se)}}let re=/:(nth[-\w]+)\(([^)]+)\)/,se=`:not(.${ee})`,ne=',',oe=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,le=/[[.:#*]/,ae=':host',de='::slotted',pe=/^(::slotted)/,me=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ue=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ye=/(.*):dir\((?:(ltr|rtl))\)/,_e=':';var ge=new te,Ee={};const Ce=Promise.resolve();class xe{static get(Ye){return Ye.__styleInfo}static set(Ye,ze){return Ye.__styleInfo=ze,ze}static invalidate(Ye){Ee[Ye]&&(Ee[Ye]._applyShimInvalid=!0)}static startValidating(Ye){const ze=Ee[Ye];ze._validating||(ze._validating=!0,Ce.then(()=>{ze._applyShimInvalid=!1,ze._validating=!1}))}constructor(Ye,ze,$e,Qe,Ze,Je){this.styleRules=Ye||null,this.placeholder=ze||null,this.ownStylePropertyNames=$e||[],this.overrideStyleProperties=null,this.elementName=Qe||'',this.cssBuild=Je||'',this.typeExtension=Ze||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}}const Ae=window.Element.prototype,ve=Ae.matches||Ae.matchesSelector||Ae.mozMatchesSelector||Ae.msMatchesSelector||Ae.oMatchesSelector||Ae.webkitMatchesSelector,Ne=navigator.userAgent.match('Trident'),Te='x-scope';class be{get XSCOPE_NAME(){return Te}decorateStyles(Ye){let ze=this,$e={},Qe=[],Ze=0;O(Ye,function(et){ze.decorateRule(et),et.index=Ze++,ze.collectPropertiesInCssText(et.propertyInfo.cssText,$e)},function(tt){Qe.push(tt)}),Ye._keyframes=Qe;let Je=[];for(let et in $e)Je.push(et);return Je}decorateRule(Ye){if(Ye.propertyInfo)return Ye.propertyInfo;let ze={},$e={},Qe=this.collectProperties(Ye,$e);return Qe&&(ze.properties=$e,Ye.rules=null),ze.cssText=this.collectCssText(Ye),Ye.propertyInfo=ze,ze}collectProperties(Ye,ze){let $e=Ye.propertyInfo;if(!$e){let Qe,Ze=J.VAR_ASSIGN,Je=Ye.parsedCssText,et,tt;for(;Qe=Ze.exec(Je);)et=(Qe[2]||Qe[3]).trim(),('inherit'!==et||'unset'!==et)&&(ze[Qe[1].trim()]=et),tt=!0;return tt}else if($e.properties)return Object.assign(ze,$e.properties),!0}collectCssText(Ye){return this.collectConsumingCssText(Ye.parsedCssText)}collectConsumingCssText(Ye){return Ye.replace(J.BRACKETED,'').replace(J.VAR_ASSIGN,'')}collectPropertiesInCssText(Ye,ze){for(let $e,Qe;$e=J.VAR_CONSUMED.exec(Ye);)Qe=$e[1],':'!==$e[2]&&(ze[Qe]=!0)}reify(Ye){let ze=Object.getOwnPropertyNames(Ye);for(let Qe,$e=0;$e<ze.length;$e++)Qe=ze[$e],Ye[Qe]=this.valueForProperty(Ye[Qe],Ye)}valueForProperty(Ye,ze){if(Ye)if(0<=Ye.indexOf(';'))Ye=this.valueForProperties(Ye,ze);else{let $e=this;Ye=H(Ye,function(Ze,Je,et,tt){if(!Je)return Ze+tt;let rt=$e.valueForProperty(ze[Je],ze);return rt&&'initial'!==rt?'apply-shim-inherit'===rt&&(rt='inherit'):rt=$e.valueForProperty(ze[et]||et,ze)||et,Ze+(rt||'')+tt})}return Ye&&Ye.trim()||''}valueForProperties(Ye,ze){let $e=Ye.split(';');for(let Ze,Je,Qe=0;Qe<$e.length;Qe++)if(Ze=$e[Qe]){if(J.MIXIN_MATCH.lastIndex=0,Je=J.MIXIN_MATCH.exec(Ze),Je)Ze=this.valueForProperty(ze[Je[1]],ze);else{let et=Ze.indexOf(':');if(-1!==et){let tt=Ze.substring(et);tt=tt.trim(),tt=this.valueForProperty(tt,ze)||tt,Ze=Ze.substring(0,et)+tt}}$e[Qe]=Ze&&Ze.lastIndexOf(';')===Ze.length-1?Ze.slice(0,-1):Ze||''}return $e.join(';')}applyProperties(Ye,ze){let $e='';Ye.propertyInfo||this.decorateRule(Ye),Ye.propertyInfo.cssText&&($e=this.valueForProperties(Ye.propertyInfo.cssText,ze)),Ye.cssText=$e}applyKeyframeTransforms(Ye,ze){let $e=Ye.cssText,Qe=Ye.cssText;if(null==Ye.hasAnimations&&(Ye.hasAnimations=J.ANIMATION_MATCH.test($e)),Ye.hasAnimations){let Ze;if(null==Ye.keyframeNamesToTransform)for(let Je in Ye.keyframeNamesToTransform=[],ze)Ze=ze[Je],Qe=Ze($e),$e!==Qe&&($e=Qe,Ye.keyframeNamesToTransform.push(Je));else{for(let Je=0;Je<Ye.keyframeNamesToTransform.length;++Je)Ze=ze[Ye.keyframeNamesToTransform[Je]],$e=Ze($e);Qe=$e}}Ye.cssText=Qe}propertyDataFromStyles(Ye,ze){let $e={},Qe=this,Ze=[];return O(Ye,function(Je){Je.propertyInfo||Qe.decorateRule(Je);let et=Je.transformedSelector||Je.parsedSelector;ze&&Je.propertyInfo.properties&&et&&ve.call(ze,et)&&(Qe.collectProperties(Je,$e),k(Je.index,Ze))},null,!0),{properties:$e,key:Ze}}whenHostOrRootRule(Ye,ze,$e,Qe){if(ze.propertyInfo||this.decorateRule(ze),!!ze.propertyInfo.properties){let Ze=Ye.is?ge._calcHostScope(Ye.is,Ye.extends):'html',Je=ze.parsedSelector,et=':host > *'===Je||'html'===Je,tt=0===Je.indexOf(':host')&&!et;if('shady'===$e&&(et=Je===Ze+' > *.'+Ze||-1!==Je.indexOf('html'),tt=!et&&0===Je.indexOf(Ze)),'shadow'===$e&&(et=':host > *'===Je||'html'===Je,tt=tt&&!et),et||tt){let rt=Ze;tt&&(z&&!ze.transformedSelector&&(ze.transformedSelector=ge._transformRuleCss(ze,ge._transformComplexSelector,ge._calcElementScope(Ye.is),Ze)),rt=ze.transformedSelector||Ze),Qe({selector:rt,isHost:tt,isRoot:et})}}}hostAndRootPropertiesForScope(Ye,ze){let $e={},Qe={},Ze=this,Je=ze&&ze.__cssBuild;return O(ze,function(et){Ze.whenHostOrRootRule(Ye,et,Je,function(tt){let rt=Ye._element||Ye;ve.call(rt,tt.selector)&&(tt.isHost?Ze.collectProperties(et,$e):Ze.collectProperties(et,Qe))})},null,!0),{rootProps:Qe,hostProps:$e}}transformStyles(Ye,ze,$e){let Qe=this,Ze=ge._calcHostScope(Ye.is,Ye.extends),Je=Ye.extends?'\\'+Ze.slice(0,-1)+'\\]':Ze,et=new RegExp(J.HOST_PREFIX+Je+J.HOST_SUFFIX),tt=xe.get(Ye).styleRules,rt=this._elementKeyframeTransforms(Ye,tt,$e);return ge.elementStyles(Ye,tt,function(st){Qe.applyProperties(st,ze),z||I(st)||!st.cssText||(Qe.applyKeyframeTransforms(st,rt),Qe._scopeSelector(st,et,Ze,$e))})}_elementKeyframeTransforms(Ye,ze,$e){let Qe=ze._keyframes,Ze={};if(!z&&Qe)for(let Je=0,et=Qe[Je];Je<Qe.length;et=Qe[++Je])this._scopeKeyframes(et,$e),Ze[et.keyframesName]=this._keyframesRuleTransformer(et);return Ze}_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,$e,Qe){Ye.transformedSelector=Ye.transformedSelector||Ye.selector;let Ze=Ye.transformedSelector,Je='.'+Qe,et=Ze.split(',');for(let st,tt=0,rt=et.length;tt<rt&&(st=et[tt]);tt++)et[tt]=st.match(ze)?st.replace($e,Je):Je+' '+st;Ye.selector=et.join(',')}applyElementScopeSelector(Ye,ze,$e){let Qe=Ye.getAttribute('class')||'',Ze=Qe;$e&&(Ze=Qe.replace(new RegExp('\\s*'+Te+'\\s*'+$e+'\\s*','g'),' ')),Ze+=(Ze?' ':'')+Te+' '+ze,Qe!==Ze&&U(Ye,Ze)}applyElementStyle(Ye,ze,$e,Qe){let Ze=Qe?Qe.textContent||'':this.transformStyles(Ye,ze,$e),Je=xe.get(Ye),et=Je.customStyle;return et&&!z&&et!==Qe&&(et._useCount--,0>=et._useCount&&et.parentNode&&et.parentNode.removeChild(et)),z?Je.customStyle?(Je.customStyle.textContent=Ze,Qe=Je.customStyle):Ze&&(Qe=M(Ze,$e,Ye.shadowRoot,Je.placeholder)):Qe?!Qe.parentNode&&P(Qe,null,Je.placeholder):Ze&&(Qe=M(Ze,$e,null,Je.placeholder)),Qe&&(Qe._useCount=Qe._useCount||0,Je.customStyle!=Qe&&Qe._useCount++,Je.customStyle=Qe),Ne&&(Qe.textContent=Qe.textContent),Qe}applyCustomStyle(Ye,ze){let $e=R(Ye),Qe=this;Ye.textContent=b($e,function(Ze){let Je=Ze.cssText=Ze.parsedCssText;Ze.propertyInfo&&Ze.propertyInfo.cssText&&(Je=C(Je),Ze.cssText=Qe.valueForProperties(Je,ze))})}}var Re=new be;let Ie={};const Oe=window.customElements;if(Oe&&!z){const Ye=Oe.define;Oe.define=function(ze,$e,Qe){return Ie[ze]=w(ze),Ye.call(Oe,ze,$e,Qe)}}let Pe=J.MIXIN_MATCH,Le=J.VAR_ASSIGN,we=/;\s*/m,De=/^\s*(initial)|(inherit)\s*$/,He='_-_';class Ue{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 ke{constructor(){this._currentTemplate=null,this._measureElement=null,this._map=new Ue,this._separator=He,this._boundProduceCssProperties=(Ye,ze,$e,Qe)=>this._produceCssProperties(Ye,ze,$e,Qe)}detectMixin(Ye){const ze=Pe.test(Ye)||Le.test(Ye);return Pe.lastIndex=0,Le.lastIndex=0,ze}transformStyle(Ye,ze){let $e=R(Ye);return this.transformRules($e,ze),$e}transformRules(Ye,ze){this._currentTemplate=Ee[ze],O(Ye,$e=>{this.transformRule($e)}),this._currentTemplate=null}transformRule(Ye){Ye.cssText=this.transformCssText(Ye.parsedCssText),':root'===Ye.selector&&(Ye.selector=':host > *')}transformCssText(Ye){return Ye=Ye.replace(Le,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=Pe.exec(Ye);){let $e=ze[0],Qe=ze[1],Ze=ze.index,Je=Ze+$e.indexOf('@apply'),et=Ze+$e.length,tt=Ye.slice(0,Je),rt=Ye.slice(et),st=this._cssTextToMap(tt),nt=this._atApplyToCssProperties(Qe,st);Ye=[tt,nt,rt].join(''),Pe.lastIndex=Ze+nt.length}return Ye}_atApplyToCssProperties(Ye,ze){Ye=Ye.replace(we,'');let $e=[],Qe=this._map.get(Ye);if(Qe||(this._map.set(Ye,{}),Qe=this._map.get(Ye)),Qe){this._currentTemplate&&(Qe.dependants[this._currentTemplate.name]=this._currentTemplate);let Ze,Je,et;for(Ze in Qe.properties)et=ze&&ze[Ze],Je=[Ze,': var(',Ye,He,Ze],et&&Je.push(',',et),Je.push(')'),$e.push(Je.join(''))}return $e.join('; ')}_replaceInitialOrInherit(Ye,ze){let $e=De.exec(ze);return $e&&($e[1]?ze=ke._getInitialValueForProperty(Ye):ze='apply-shim-inherit'),ze}_cssTextToMap(Ye){let ze=Ye.split(';'),$e,Qe,Ze={};for(let et,tt,Je=0;Je<ze.length;Je++)et=ze[Je],et&&(tt=et.split(':'),1<tt.length&&($e=tt[0].trim(),Qe=this._replaceInitialOrInherit($e,tt.slice(1).join(':')),Ze[$e]=Qe));return Ze}_invalidateMixinEntry(Ye){for(let ze in Ye.dependants)this._currentTemplate&&ze===this._currentTemplate.name||xe.invalidate(ze)}_produceCssProperties(Ye,ze,$e,Qe){if($e&&H($e,(it,dt)=>{dt&&this._map.get(dt)&&(Qe='@apply '+dt+';')}),!Qe)return Ye;let Ze=this._consumeCssProperties(Qe),Je=Ye.slice(0,Ye.indexOf('--')),et=this._cssTextToMap(Ze),tt=et,rt=this._map.get(ze),st=rt&&rt.properties;st?tt=Object.assign(Object.create(st),et):this._map.set(ze,tt);let ot,lt,nt=[],at=!1;for(ot in tt)lt=et[ot],void 0==lt&&(lt='initial'),st&&!(ot in st)&&(at=!0),nt.push(ze+He+ot+': '+lt);return at&&this._invalidateMixinEntry(rt),rt&&(rt.properties=tt),$e&&(Je=Ye+';'+Je),Je+nt.join('; ')+';'}}let Fe=new ke;window.ApplyShim=Fe;let qe=function(){};if(!z){let Ye=Je=>{return Je.classList&&!Je.classList.contains(ge.SCOPE_NAME)||Je instanceof SVGElement&&(!Je.hasAttribute('class')||0>Je.getAttribute('class').indexOf(ge.SCOPE_NAME))},ze=Je=>{for(let tt,et=0;et<Je.length;et++)if(tt=Je[et],tt.target!==document.documentElement&&tt.target!==document.head){for(let st,rt=0;rt<tt.addedNodes.length;rt++)if(st=tt.addedNodes[rt],Ye(st)){let nt=st.getRootNode();if(nt.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let ot=nt.host;if(ot){let lt=ot.is||ot.localName;ge.dom(st,lt)}}}for(let st,rt=0;rt<tt.removedNodes.length;rt++)if(st=tt.removedNodes[rt],st.nodeType===Node.ELEMENT_NODE){let nt;if(st.classList?nt=Array.from(st.classList):st.hasAttribute('class')&&(nt=st.getAttribute('class').split(/\s+/)),void 0!=nt){let ot=nt.indexOf(ge.SCOPE_NAME);if(0<=ot){let lt=nt[ot+1];lt&&ge.dom(st,lt,!0)}}}}},$e=new MutationObserver(ze),Qe=Je=>{$e.observe(Je,{childList:!0,subtree:!0})},Ze=window.customElements&&!window.customElements.flush;if(Ze)Qe(document);else{let Je=()=>{Qe(document.body)};window.HTMLImports?window.HTMLImports.whenReady(Je):requestAnimationFrame(function(){if('loading'===document.readyState){let et=function(){Je(),document.removeEventListener('readystatechange',et)};document.addEventListener('readystatechange',et)}else Je()})}qe=function(){ze($e.takeRecords())}}let je=new class{constructor(Ye=100){this.cache={},this.typeMax=Ye}_validate(Ye,ze,$e){for(let Ze,Qe=0;Qe<$e.length;Qe++)if(Ze=$e[Qe],Ye.properties[Ze]!==ze[Ze])return!1;return!0}store(Ye,ze,$e,Qe){let Ze=this.cache[Ye]||[];Ze.push({properties:ze,styleElement:$e,scopeSelector:Qe}),Ze.length>this.typeMax&&Ze.shift(),this.cache[Ye]=Ze}fetch(Ye,ze,$e){let Qe=this.cache[Ye];if(Qe)for(let Je,Ze=Qe.length-1;0<=Ze;Ze--)if(Je=Qe[Ze],this._validate(Je,ze,$e))return Je}};class Ke{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement,this._documentOwnerStyleInfo=xe.set(document.documentElement,new xe({rules:[]})),this._elementsHaveApplied=!1}get nativeShadow(){return z}get nativeCss(){return $}get nativeCssApply(){return!1}flush(){qe()}_generateScopeSelector(Ye){let ze=this._scopeCounter[Ye]=(this._scopeCounter[Ye]||0)+1;return`${Ye}-${ze}`}getStyleAst(Ye){return R(Ye)}styleAstToString(Ye){return b(Ye)}_gatherStyles(Ye){let ze=Ye.content.querySelectorAll('style'),$e=[];for(let Ze,Qe=0;Qe<ze.length;Qe++)Ze=ze[Qe],$e.push(Ze.textContent),Ze.parentNode.removeChild(Ze);return $e.join('').trim()}_getCssBuild(Ye){let ze=Ye.content.querySelector('style');return ze?ze.getAttribute('css-build')||'':''}prepareTemplate(Ye,ze,$e){if(!Ye._prepared){Ye._prepared=!0,Ye.name=ze,Ye.extends=$e,Ee[ze]=Ye;let Qe=this._getCssBuild(Ye),Ze=this._gatherStyles(Ye),Je={is:ze,extends:$e,__cssBuild:Qe};this.nativeShadow||ge.dom(Ye.content,ze);let et=Fe.detectMixin(Ze),tt=a(Ze);et&&this.nativeCss&&!this.nativeCssApply&&Fe.transformRules(tt,ze),Ye._styleAst=tt;let rt=[];if(this.nativeCss||(rt=Re.decorateStyles(Ye._styleAst,Je)),!rt.length||this.nativeCss){let st=this.nativeShadow?Ye.content:null,nt=Ie[ze],ot=this._generateStaticStyle(Je,Ye._styleAst,st,nt);Ye._style=ot}Ye._ownPropertyNames=rt}}_generateStaticStyle(Ye,ze,$e,Qe){let Ze=ge.elementStyles(Ye,ze);if(Ze.length)return M(Ze,Ye.is,$e,Qe)}_prepareHost(Ye){let $e,ze=Ye.getAttribute('is')||Ye.localName;ze!==Ye.localName&&($e=Ye.localName);let Je,et,tt,Qe=Ie[ze],Ze=Ee[ze];return Ze&&(Je=Ze._styleAst,et=Ze._ownPropertyNames,tt=Ze._cssBuild),xe.set(Ye,new xe(Je,Qe,et,ze,$e,tt))}applyStyle(Ye,ze){let $e=Ye.getAttribute('is')||Ye.localName,Qe=xe.get(Ye),Ze=!!Qe;if(Qe||(Qe=this._prepareHost(Ye)),this._isRootOwner(Ye)||(this._elementsHaveApplied=!0),window.CustomStyle){let Je=window.CustomStyle;if(Je._documentDirty){if(Je.findStyles(),this.nativeCss?!this.nativeCssApply&&Je._revalidateApplyShim():this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),Je.applyStyles(),!this._elementsHaveApplied)return;if(!this.nativeCss&&(this.updateStyles(),Ze))return}}if(ze&&(Qe.overrideStyleProperties=Qe.overrideStyleProperties||{},Object.assign(Qe.overrideStyleProperties,ze)),this.nativeCss){Qe.overrideStyleProperties&&this._updateNativeProperties(Ye,Qe.overrideStyleProperties);let Je=Ee[$e];if(!Je&&!this._isRootOwner(Ye))return;if(Je&&Je._applyShimInvalid&&Je._style){if(Je._validating||(Fe.transformRules(Je._styleAst,$e),Je._style.textContent=ge.elementStyles(Ye,Qe.styleRules),xe.startValidating($e)),this.nativeShadow){let et=Ye.shadowRoot;if(et){let tt=et.querySelector('style');tt.textContent=ge.elementStyles(Ye,Qe.styleRules)}}Qe.styleRules=Je._styleAst}}else this._updateProperties(Ye,Qe),Qe.ownStylePropertyNames&&Qe.ownStylePropertyNames.length&&this._applyStyleProperties(Ye,Qe);if(Ze){let Je=this._isRootOwner(Ye)?Ye:Ye.shadowRoot;Je&&this._applyToDescendants(Je)}}_applyToDescendants(Ye){let ze=Ye.children||Ye.childNodes;for(let Qe,$e=0;$e<ze.length;$e++)Qe=ze[$e],Qe.shadowRoot&&this.applyStyle(Qe),this._applyToDescendants(Qe)}_styleOwnerForNode(Ye){let ze=Ye.getRootNode(),$e=ze.host;return $e?xe.get($e)?$e:this._styleOwnerForNode($e):this._documentOwner}_isRootOwner(Ye){return Ye===this._documentOwner}_applyStyleProperties(Ye,ze){let $e=Ye.getAttribute('is')||Ye.localName,Qe=je.fetch($e,ze.styleProperties,ze.ownStylePropertyNames),Ze=Qe&&Qe.scopeSelector,Je=Qe?Qe.styleElement:null,et=ze.scopeSelector;ze.scopeSelector=Ze||this._generateScopeSelector($e);let tt=Re.applyElementStyle(Ye,ze.styleProperties,ze.scopeSelector,Je);return this.nativeShadow||Re.applyElementScopeSelector(Ye,ze.scopeSelector,et),Qe||je.store($e,ze.styleProperties,tt,ze.scopeSelector),tt}_updateProperties(Ye,ze){let $e=this._styleOwnerForNode(Ye),Qe=xe.get($e),Ze=Qe.styleProperties,Je=Object.create(Ze||null),et=Re.hostAndRootPropertiesForScope(Ye,ze.styleRules),tt=Re.propertyDataFromStyles(Qe.styleRules,Ye),rt=tt.properties;Object.assign(Je,et.hostProps,rt,et.rootProps),this._mixinOverrideStyles(Je,ze.overrideStyleProperties),Re.reify(Je),ze.styleProperties=Je}_mixinOverrideStyles(Ye,ze){for(let $e in ze){let Qe=ze[$e];(Qe||0===Qe)&&(Ye[$e]=Qe)}}_updateNativeProperties(Ye,ze){for(let $e in ze)null===$e?Ye.style.removeProperty($e):Ye.style.setProperty($e,ze[$e])}updateStyles(Ye){this.applyStyle(this._documentOwner,Ye)}_transformCustomStyleForDocument(Ye){let ze=R(Ye);O(ze,$e=>{z?ge.normalizeRootSelector($e):ge.documentRule($e),this.nativeCss&&!this.nativeCssApply&&Fe.transformRule($e)}),this.nativeCss?Ye.textContent=b(ze):this._documentOwnerStyleInfo.styleRules.rules.push(ze)}_revalidateApplyShim(Ye){if(this.nativeCss&&!this.nativeCssApply){let ze=R(Ye);Fe.transformRules(ze),Ye.textContent=b(ze)}}_applyCustomStyleToDocument(Ye){this.nativeCss||Re.applyCustomStyle(Ye,this._documentOwnerStyleInfo.styleProperties)}getComputedStyleValue(Ye,ze){let $e;if(!this.nativeCss){let Qe=xe.get(Ye)||xe.get(this._styleOwnerForNode(Ye));$e=Qe.styleProperties[ze]}return $e=$e||window.getComputedStyle(Ye).getPropertyValue(ze),$e.trim()}setElementClass(Ye,ze){let $e=Ye.getRootNode(),Qe=ze?ze.split(/\s/):[],Ze=$e.host&&$e.host.localName;if(!Ze){var Je=Ye.getAttribute('class');if(Je){let et=Je.split(/\s/);for(let tt=0;tt<et.length;tt++)if(et[tt]===ge.SCOPE_NAME){Ze=et[tt+1];break}}}if(Ze&&Qe.push(ge.SCOPE_NAME,Ze),!this.nativeCss){let et=xe.get(Ye);et&&et.scopeSelector&&Qe.push(Re.XSCOPE_NAME,et.scopeSelector)}U(Ye,Qe.join(' '))}_styleInfoForNode(Ye){return xe.get(Ye)}}window.ShadyCSS=new Ke;let Be=window.ShadyCSS,Xe=!1,Ve=[],We=null;class Ge extends HTMLElement{static get _customStyles(){return Ve}static get processHook(){return We}static set processHook(Ye){We=Ye}static get _documentDirty(){return Xe}static findStyles(){for(let ze,Ye=0;Ye<Ve.length;Ye++)if(ze=Ve[Ye],!ze._style){let $e=ze.querySelector('style');if(!$e)continue;if($e.__appliedElement)for(let Ze,Qe=0;Qe<$e.attributes.length;Qe++)Ze=$e.attributes[Qe],$e.__appliedElement.setAttribute(Ze.name,Ze.value);ze._style=$e.__appliedElement||$e,We&&We(ze._style),Be._transformCustomStyleForDocument(ze._style)}}static _revalidateApplyShim(){for(let ze,Ye=0;Ye<Ve.length;Ye++)ze=Ve[Ye],ze._style&&Be._revalidateApplyShim(ze._style)}static applyStyles(){for(let ze,Ye=0;Ye<Ve.length;Ye++)ze=Ve[Ye],ze._style&&Be._applyCustomStyleToDocument(ze._style);Xe=!1}constructor(){super(),Ve.push(this),F()}}window.CustomStyle=Ge,window.customElements.define('custom-style',Ge),function(){'use strict';if(customElements&&customElements.polyfillWrapFlushCallback){function ze(){if($e){let Ze=$e;return $e=null,Ze(),!0}}let $e,Qe=HTMLImports.whenReady;customElements.polyfillWrapFlushCallback(function(Ze){$e=Ze,Qe(ze)}),HTMLImports.whenReady=function(Ze){Qe(function(){ze()?HTMLImports.whenReady(Ze):Ze()})}}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 $e=document.querySelector('head');$e.insertBefore(ze,$e.firstChild)}(window.WebComponents)})();
|
|
//# sourceMappingURL=webcomponents-hi.js.map
|