Skip to content

Instantly share code, notes, and snippets.

@daKmoR
Created January 5, 2017 20:48
Show Gist options
  • Save daKmoR/6251ae09e7da25d274603346c906b598 to your computer and use it in GitHub Desktop.
Save daKmoR/6251ae09e7da25d274603346c906b598 to your computer and use it in GitHub Desktop.
v1 webcomponents-lite.min.js
!function(){window.WebComponents=window.WebComponents||{flags:{}};var a="webcomponents-lite.js",b=document.querySelector('script[src*="'+a+'"]'),c={};if(!c.noOpts){if(location.search.slice(1).split("&").forEach(function(a){var d,b=a.split("=");b[0]&&(d=b[0].match(/wc-(.+)/))&&(c[d[1]]=b[1]||!0)}),b)for(var e,d=0;e=b.attributes[d];d++)"src"!==e.name&&(c[e.name]=e.value||!0);if(c.log&&c.log.split){var f=c.log.split(",");c.log={},f.forEach(function(a){c.log[a]=!0})}else c.log={}}c.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=c.register),WebComponents.flags=c}(),function(a){"use strict";function f(a){return void 0!==d[a]}function g(){o.call(this),this._isInvalid=!0}function h(a){return""==a&&g.call(this),a.toLowerCase()}function i(a){var b=a.charCodeAt(0);return b>32&&b<127&&[34,35,60,62,63,96].indexOf(b)==-1?a:encodeURIComponent(a)}function j(a){var b=a.charCodeAt(0);return b>32&&b<127&&[34,35,60,62,96].indexOf(b)==-1?a:encodeURIComponent(a)}function n(a,b,c){function n(a){t.push(a)}var o=b||"scheme start",p=0,q="",r=!1,s=!1,t=[];a:for(;(a[p-1]!=k||0==p)&&!this._isInvalid;){var u=a[p];switch(o){case"scheme start":if(!u||!l.test(u)){if(b){n("Invalid scheme.");break a}q="",o="no scheme";continue}q+=u.toLowerCase(),o="scheme";break;case"scheme":if(u&&m.test(u))q+=u.toLowerCase();else{if(":"!=u){if(b){if(k==u)break a;n("Code point not allowed in scheme: "+u);break a}q="",p=0,o="no scheme";continue}if(this._scheme=q,q="",b)break a;f(this._scheme)&&(this._isRelative=!0),o="file"==this._scheme?"relative":this._isRelative&&c&&c._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==u?(this._query="?",o="query"):"#"==u?(this._fragment="#",o="fragment"):k!=u&&"\t"!=u&&"\n"!=u&&"\r"!=u&&(this._schemeData+=i(u));break;case"no scheme":if(c&&f(c._scheme)){o="relative";continue}n("Missing scheme."),g.call(this);break;case"relative or authority":if("/"!=u||"/"!=a[p+1]){n("Expected /, got: "+u),o="relative";continue}o="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=c._scheme),k==u){this._host=c._host,this._port=c._port,this._path=c._path.slice(),this._query=c._query,this._username=c._username,this._password=c._password;break a}if("/"==u||"\\"==u)"\\"==u&&n("\\ is an invalid code point."),o="relative slash";else if("?"==u)this._host=c._host,this._port=c._port,this._path=c._path.slice(),this._query="?",this._username=c._username,this._password=c._password,o="query";else{if("#"!=u){var v=a[p+1],w=a[p+2];("file"!=this._scheme||!l.test(u)||":"!=v&&"|"!=v||k!=w&&"/"!=w&&"\\"!=w&&"?"!=w&&"#"!=w)&&(this._host=c._host,this._port=c._port,this._username=c._username,this._password=c._password,this._path=c._path.slice(),this._path.pop()),o="relative path";continue}this._host=c._host,this._port=c._port,this._path=c._path.slice(),this._query=c._query,this._fragment="#",this._username=c._username,this._password=c._password,o="fragment"}break;case"relative slash":if("/"!=u&&"\\"!=u){"file"!=this._scheme&&(this._host=c._host,this._port=c._port,this._username=c._username,this._password=c._password),o="relative path";continue}"\\"==u&&n("\\ is an invalid code point."),o="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=u){n("Expected '/', got: "+u),o="authority ignore slashes";continue}o="authority second slash";break;case"authority second slash":if(o="authority ignore slashes","/"!=u){n("Expected '/', got: "+u);continue}break;case"authority ignore slashes":if("/"!=u&&"\\"!=u){o="authority";continue}n("Expected authority, got: "+u);break;case"authority":if("@"==u){r&&(n("@ already seen."),q+="%40"),r=!0;for(var x=0;x<q.length;x++){var y=q[x];if("\t"!=y&&"\n"!=y&&"\r"!=y)if(":"!=y||null!==this._password){var z=i(y);null!==this._password?this._password+=z:this._username+=z}else this._password="";else n("Invalid whitespace in authority.")}q=""}else{if(k==u||"/"==u||"\\"==u||"?"==u||"#"==u){p-=q.length,q="",o="host";continue}q+=u}break;case"file host":if(k==u||"/"==u||"\\"==u||"?"==u||"#"==u){2!=q.length||!l.test(q[0])||":"!=q[1]&&"|"!=q[1]?0==q.length?o="relative path start":(this._host=h.call(this,q),q="",o="relative path start"):o="relative path";continue}"\t"==u||"\n"==u||"\r"==u?n("Invalid whitespace in file host."):q+=u;break;case"host":case"hostname":if(":"!=u||s){if(k==u||"/"==u||"\\"==u||"?"==u||"#"==u){if(this._host=h.call(this,q),q="",o="relative path start",b)break a;continue}"\t"!=u&&"\n"!=u&&"\r"!=u?("["==u?s=!0:"]"==u&&(s=!1),q+=u):n("Invalid code point in host/hostname: "+u)}else if(this._host=h.call(this,q),q="",o="port","hostname"==b)break a;break;case"port":if(/[0-9]/.test(u))q+=u;else{if(k==u||"/"==u||"\\"==u||"?"==u||"#"==u||b){if(""!=q){var A=parseInt(q,10);A!=d[this._scheme]&&(this._port=A+""),q=""}if(b)break a;o="relative path start";continue}"\t"==u||"\n"==u||"\r"==u?n("Invalid code point in port: "+u):g.call(this)}break;case"relative path start":if("\\"==u&&n("'\\' not allowed in path."),o="relative path","/"!=u&&"\\"!=u)continue;break;case"relative path":if(k!=u&&"/"!=u&&"\\"!=u&&(b||"?"!=u&&"#"!=u))"\t"!=u&&"\n"!=u&&"\r"!=u&&(q+=i(u));else{"\\"==u&&n("\\ not allowed in relative path.");var B;(B=e[q.toLowerCase()])&&(q=B),".."==q?(this._path.pop(),"/"!=u&&"\\"!=u&&this._path.push("")):"."==q&&"/"!=u&&"\\"!=u?this._path.push(""):"."!=q&&("file"==this._scheme&&0==this._path.length&&2==q.length&&l.test(q[0])&&"|"==q[1]&&(q=q[0]+":"),this._path.push(q)),q="","?"==u?(this._query="?",o="query"):"#"==u&&(this._fragment="#",o="fragment")}break;case"query":b||"#"!=u?k!=u&&"\t"!=u&&"\n"!=u&&"\r"!=u&&(this._query+=j(u)):(this._fragment="#",o="fragment");break;case"fragment":k!=u&&"\t"!=u&&"\n"!=u&&"\r"!=u&&(this._fragment+=u)}p++}}function o(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function p(a,b){void 0===b||b instanceof p||(b=new p(String(b))),this._url=a,o.call(this);var c=a.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");n.call(this,c,null,b)}var b=!1;if(!a.forceJURL)try{var c=new URL("b","http://a");c.pathname="c%20d",b="http://a/c%20d"===c.href}catch(a){}if(!b){var d=Object.create(null);d.ftp=21,d.file=0,d.gopher=70,d.http=80,d.https=443,d.ws=80,d.wss=443;var e=Object.create(null);e["%2e"]=".",e[".%2e"]="..",e["%2e."]="..",e["%2e%2e"]="..";var k=void 0,l=/[a-zA-Z]/,m=/[a-zA-Z0-9\+\-\.]/;p.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var a="";return""==this._username&&null==this._password||(a=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+a+this.host:"")+this.pathname+this._query+this._fragment},set href(a){o.call(this),n.call(this,a)},get protocol(){return this._scheme+":"},set protocol(a){this._isInvalid||n.call(this,a+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(a){!this._isInvalid&&this._isRelative&&n.call(this,a,"host")},get hostname(){return this._host},set hostname(a){!this._isInvalid&&this._isRelative&&n.call(this,a,"hostname")},get port(){return this._port},set port(a){!this._isInvalid&&this._isRelative&&n.call(this,a,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(a){!this._isInvalid&&this._isRelative&&(this._path=[],n.call(this,a,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(a){!this._isInvalid&&this._isRelative&&(this._query="?","?"==a[0]&&(a=a.slice(1)),n.call(this,a,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(a){this._isInvalid||(this._fragment="#","#"==a[0]&&(a=a.slice(1)),n.call(this,a,"fragment"))},get origin(){var a;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return a=this.host,a?this._scheme+"://"+a:""}};var q=a.URL;q&&(p.createObjectURL=function(a){return q.createObjectURL.apply(q,arguments)},p.revokeObjectURL=function(a){q.revokeObjectURL(a)}),a.URL=p}}(self),"undefined"==typeof WeakMap&&!function(){var a=Object.defineProperty,b=Date.now()%1e9,c=function(){this.name="__st"+(1e9*Math.random()>>>0)+(b++ +"__")};c.prototype={set:function(b,c){var d=b[this.name];return d&&d[0]===b?d[1]=c:a(b,this.name,{value:[b,c],writable:!0}),this},get:function(a){var b;return(b=a[this.name])&&b[0]===a?b[1]:void 0},delete:function(a){var b=a[this.name];return!(!b||b[0]!==a)&&(b[0]=b[1]=void 0,!0)},has:function(a){var b=a[this.name];return!!b&&b[0]===a}},window.WeakMap=c}(),function(){function k(a){switch(a){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}}function l(a){return a.replace(j,k)}var a="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&!function(){var a=document.importNode;document.importNode=function(){var b=a.apply(document,arguments);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var c=document.createDocumentFragment();return c.appendChild(b),c}return b}}();var b=function(){if(!a){var b=document.createElement("template"),c=document.createElement("template");c.content.appendChild(document.createElement("div")),b.content.appendChild(c);var d=b.cloneNode(!0);return 0===d.content.childNodes.length||0===d.content.firstChild.content.childNodes.length}}(),c="template",d=function(){};if(a){var e=document.implementation.createHTMLDocument("template"),f=!0,g=document.createElement("style");g.textContent=c+"{display:none;}";var h=document.head;h.insertBefore(g,h.firstElementChild),d.prototype=Object.create(HTMLElement.prototype),d.decorate=function(a){if(!a.content){a.content=e.createDocumentFragment();for(var b;b=a.firstChild;)a.content.appendChild(b);if(a.cloneNode=function(a){return d.cloneNode(this,a)},f)try{Object.defineProperty(a,"innerHTML",{get:function(){for(var a="",b=this.content.firstChild;b;b=b.nextSibling)a+=b.outerHTML||l(b.data);return a},set:function(a){for(e.body.innerHTML=a,d.bootstrap(e);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;e.body.firstChild;)this.content.appendChild(e.body.firstChild)},configurable:!0})}catch(a){f=!1}d.bootstrap(a.content)}},d.bootstrap=function(a){for(var g,b=a.querySelectorAll(c),e=0,f=b.length;e<f&&(g=b[e]);e++)d.decorate(g)},document.addEventListener("DOMContentLoaded",function(){d.bootstrap(document)});var i=document.createElement;document.createElement=function(){"use strict";var a=i.apply(document,arguments);return"template"===a.localName&&d.decorate(a),a};var j=/[&\u00A0<>]/g}if(a||b){var m=Node.prototype.cloneNode;d.cloneNode=function(a,b){var c=m.call(a,!1);return this.decorate&&this.decorate(c),b&&(c.content.appendChild(m.call(a.content,!0)),this.fixClonedDom(c.content,a.content)),c},d.fixClonedDom=function(a,b){if(b.querySelectorAll)for(var h,i,d=b.querySelectorAll(c),e=a.querySelectorAll(c),f=0,g=e.length;f<g;f++)i=d[f],h=e[f],this.decorate&&this.decorate(i),h.parentNode.replaceChild(i.cloneNode(!0),h)};var n=document.importNode;Node.prototype.cloneNode=function(a){var b=m.call(this,a);return a&&d.fixClonedDom(b,this),b},document.importNode=function(a,b){if(a.localName===c)return d.cloneNode(a,b);var e=n.call(document,a,b);return b&&d.fixClonedDom(e,a),e},b&&(HTMLTemplateElement.prototype.cloneNode=function(a){return d.cloneNode(this,a)})}a&&(window.HTMLTemplateElement=d)}(),window.HTMLImports=window.HTMLImports||{flags:{}},function(a){function i(a,b){b=b||f,m(function(){o(a,b)},b)}function l(a){return"complete"===a.readyState||a.readyState===j}function m(a,b){if(l(b))a&&a();else{var c=function(){"complete"!==b.readyState&&b.readyState!==j||(b.removeEventListener(k,c),m(a,b))};b.addEventListener(k,c)}}function n(a){a.target.__loaded=!0}function o(a,b){function h(){d==e&&a&&a({allImports:c,loadedImports:f,errorImports:g})}function i(a){n(a),f.push(this),d++,h()}function j(a){g.push(this),d++,h()}var c=b.querySelectorAll("link[rel=import]"),d=0,e=c.length,f=[],g=[];if(e)for(var l,k=0;k<e&&(l=c[k]);k++)p(l)?(f.push(this),d++,h()):(l.addEventListener("load",i),l.addEventListener("error",j));else h()}function p(a){return c?a.__loaded||a.import&&"loading"!==a.import.readyState:a.__importParsed}function q(a){for(var d,b=0,c=a.length;b<c&&(d=a[b]);b++)r(d)&&s(d)}function r(a){return"link"===a.localName&&"import"===a.rel}function s(a){var b=a.import;b?n({target:a}):(a.addEventListener("load",n),a.addEventListener("error",n))}var b="import",c=Boolean(b in document.createElement("link")),d=Boolean(window.ShadowDOMPolyfill),e=function(a){return d?window.ShadowDOMPolyfill.wrapIfNeeded(a):a},f=e(document),g={get:function(){var a=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return e(a)},configurable:!0};Object.defineProperty(document,"_currentScript",g),Object.defineProperty(f,"_currentScript",g);var h=/Trident/.test(navigator.userAgent),j=h?"complete":"interactive",k="readystatechange";c&&(new MutationObserver(function(a){for(var d,b=0,c=a.length;b<c&&(d=a[b]);b++)d.addedNodes&&q(d.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var d,a=document.querySelectorAll("link[rel=import]"),b=0,c=a.length;b<c&&(d=a[b]);b++)s(d)}()),i(function(a){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var b=f.createEvent("CustomEvent");b.initCustomEvent("HTMLImportsLoaded",!0,!0,a),f.dispatchEvent(b)}),a.IMPORT_LINK_TYPE=b,a.useNative=c,a.rootDocument=f,a.whenReady=i,a.isIE=h}(window.HTMLImports),function(a){var b=[],c=function(a){b.push(a)},d=function(){b.forEach(function(b){b(a)})};a.addModule=c,a.initializeModules=d}(window.HTMLImports),window.HTMLImports.addModule(function(a){var b=/(url\()([^)]*)(\))/g,c=/(@import[\s]+(?!url\())([^;]*)(;)/g,d={resolveUrlsInStyle:function(a,b){var c=a.ownerDocument,d=c.createElement("a");return a.textContent=this.resolveUrlsInCssText(a.textContent,b,d),a},resolveUrlsInCssText:function(a,d,e){var f=this.replaceUrls(a,e,d,b);return f=this.replaceUrls(f,e,d,c)},replaceUrls:function(a,b,c,d){return a.replace(d,function(a,d,e,f){var g=e.replace(/["']/g,"");return c&&(g=new URL(g,c).href),b.href=g,g=b.href,d+"'"+g+"'"+f})}};a.path=d}),window.HTMLImports.addModule(function(a){var b={async:!0,ok:function(a){return a.status>=200&&a.status<300||304===a.status||0===a.status},load:function(c,d,e){var f=new XMLHttpRequest;return(a.flags.debug||a.flags.bust)&&(c+="?"+Math.random()),f.open("GET",c,b.async),f.addEventListener("readystatechange",function(a){if(4===f.readyState){var c=null;try{var g=f.getResponseHeader("Location");g&&(c="/"===g.substr(0,1)?location.origin+g:g)}catch(a){console.error(a.message)}d.call(e,!b.ok(f)&&f,f.response||f.responseText,c)}}),f.send(),f},loadDocument:function(a,b,c){this.load(a,b,c).responseType="document"}};a.xhr=b}),window.HTMLImports.addModule(function(a){var b=a.xhr,c=a.flags,d=function(a,b){this.cache={},this.onload=a,this.oncomplete=b,this.inflight=0,this.pending={}};d.prototype={addNodes:function(a){this.inflight+=a.length;for(var d,b=0,c=a.length;b<c&&(d=a[b]);b++)this.require(d);this.checkDone()},addNode:function(a){this.inflight++,this.require(a),this.checkDone()},require:function(a){var b=a.src||a.href;a.__nodeUrl=b,this.dedupe(b,a)||this.fetch(b,a)},dedupe:function(a,b){if(this.pending[a])return this.pending[a].push(b),!0;return this.cache[a]?(this.onload(a,b,this.cache[a]),this.tail(),!0):(this.pending[a]=[b],!1)},fetch:function(a,d){if(c.load&&console.log("fetch",a,d),a)if(a.match(/^data:/)){var e=a.split(","),f=e[0],g=e[1];g=f.indexOf(";base64")>-1?atob(g):decodeURIComponent(g),setTimeout(function(){this.receive(a,d,null,g)}.bind(this),0)}else{var h=function(b,c,e){this.receive(a,d,b,c,e)}.bind(this);b.load(a,h)}else setTimeout(function(){this.receive(a,d,{error:"href must be specified"},null)}.bind(this),0)},receive:function(a,b,c,d,e){this.cache[a]=d;for(var i,f=this.pending[a],g=0,h=f.length;g<h&&(i=f[g]);g++)this.onload(a,i,d,c,e),this.tail();this.pending[a]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},a.Loader=d}),window.HTMLImports.addModule(function(a){var b=function(a){this.addCallback=a,this.mo=new MutationObserver(this.handler.bind(this))};b.prototype={handler:function(a){for(var d,b=0,c=a.length;b<c&&(d=a[b]);b++)"childList"===d.type&&d.addedNodes.length&&this.addedNodes(d.addedNodes)},addedNodes:function(a){this.addCallback&&this.addCallback(a);for(var d,b=0,c=a.length;b<c&&(d=a[b]);b++)d.children&&d.children.length&&this.addedNodes(d.children)},observe:function(a){this.mo.observe(a,{childList:!0,subtree:!0})}},a.Observer=b}),window.HTMLImports.addModule(function(a){function i(a){return"link"===a.localName&&a.rel===f}function j(a){var b=k(a);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(b)}function k(a){return a.textContent+l(a)}function l(a){var b=a.ownerDocument;b.__importedScripts=b.__importedScripts||0;var c=a.ownerDocument.baseURI,d=b.__importedScripts?"-"+b.__importedScripts:"";return b.__importedScripts++,"\n//# sourceURL="+c+d+".js\n"}function m(a){var c=a.ownerDocument.createElement("style");return c.textContent=a.textContent,b.resolveUrlsInStyle(c),c}var b=a.path,c=a.rootDocument,d=a.flags,e=a.isIE,f=a.IMPORT_LINK_TYPE,g="link[rel="+f+"]",h={documentSelectors:g,importsSelectors:[g,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var a=this.nextToParse();a&&this.parse(a)},parse:function(a){if(this.isParsed(a))return void(d.parse&&console.log("[%s] is already parsed",a.localName));var b=this[this.map[a.localName]];b&&(this.markParsing(a),b.call(this,a))},parseDynamic:function(a,b){this.dynamicElements.push(a),b||this.parseNext()},markParsing:function(a){d.parse&&console.log("parsing",a),this.parsingElement=a},markParsingComplete:function(a){a.__importParsed=!0,this.markDynamicParsingComplete(a),a.__importElement&&(a.__importElement.__importParsed=!0,this.markDynamicParsingComplete(a.__importElement)),this.parsingElement=null,d.parse&&console.log("completed",a)},markDynamicParsingComplete:function(a){var b=this.dynamicElements.indexOf(a);b>=0&&this.dynamicElements.splice(b,1)},parseImport:function(a){if(a.import=a.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(a),a.import&&(a.import.__importParsed=!0),this.markParsingComplete(a),a.__resource&&!a.__error?a.dispatchEvent(new CustomEvent("load",{bubbles:!1})):a.dispatchEvent(new CustomEvent("error",{bubbles:!1})),a.__pending)for(var b;a.__pending.length;)b=a.__pending.shift(),b&&b({target:a});this.parseNext()},parseLink:function(a){i(a)?this.parseImport(a):(a.href=a.href,this.parseGeneric(a))},parseStyle:function(a){var b=a;a=m(a),b.__appliedElement=a,a.__importElement=b,this.parseGeneric(a)},parseGeneric:function(a){this.trackElement(a),this.addElementToDocument(a)},rootImportForElement:function(a){for(var b=a;b.ownerDocument.__importLink;)b=b.ownerDocument.__importLink;return b},addElementToDocument:function(a){var b=this.rootImportForElement(a.__importElement||a);b.parentNode.insertBefore(a,b)},trackElement:function(a,b){var c=this,d=function(e){a.removeEventListener("load",d),a.removeEventListener("error",d),b&&b(e),c.markParsingComplete(a),c.parseNext()};if(a.addEventListener("load",d),a.addEventListener("error",d),e&&"style"===a.localName){var f=!1;if(a.textContent.indexOf("@import")==-1)f=!0;else if(a.sheet){f=!0;for(var j,g=a.sheet.cssRules,h=g?g.length:0,i=0;i<h&&(j=g[i]);i++)j.type===CSSRule.IMPORT_RULE&&(f=f&&Boolean(j.styleSheet))}f&&setTimeout(function(){a.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(b){var c=document.createElement("script");c.__importElement=b,c.src=b.src?b.src:j(b),a.currentScript=b,this.trackElement(c,function(b){c.parentNode&&c.parentNode.removeChild(c),a.currentScript=null}),this.addElementToDocument(c)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(c)||this.nextToParseDynamic())},nextToParseInDoc:function(a,b){if(a&&this._mayParse.indexOf(a)<0){this._mayParse.push(a);for(var f,c=a.querySelectorAll(this.parseSelectorsForNode(a)),d=0,e=c.length;d<e&&(f=c[d]);d++)if(!this.isParsed(f))return this.hasResource(f)?i(f)?this.nextToParseInDoc(f.__doc,f):f:void 0}return b},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(a){var b=a.ownerDocument||a;return b===c?this.documentSelectors:this.importsSelectors},isParsed:function(a){return a.__importParsed},needsDynamicParsing:function(a){return this.dynamicElements.indexOf(a)>=0},hasResource:function(a){return!i(a)||void 0!==a.__doc}};a.parser=h,a.IMPORT_SELECTOR=g}),window.HTMLImports.addModule(function(a){function k(a){return l(a,c)}function l(a,b){return"link"===a.localName&&a.getAttribute("rel")===b}function m(a){return!!Object.getOwnPropertyDescriptor(a,"baseURI")}function n(a,b){var d=document.implementation.createHTMLDocument(c);d._URL=b;var e=d.createElement("base");e.setAttribute("href",b),d.baseURI||m(d)||Object.defineProperty(d,"baseURI",{value:b});var f=d.createElement("meta");return f.setAttribute("charset","utf-8"),d.head.appendChild(f),d.head.appendChild(e),d.body.innerHTML=a,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(d),d}var b=a.flags,c=a.IMPORT_LINK_TYPE,d=a.IMPORT_SELECTOR,e=a.rootDocument,f=a.Loader,g=a.Observer,h=a.parser,i={documents:{},documentPreloadSelectors:d,importsPreloadSelectors:[d].join(","),loadNode:function(a){j.addNode(a)},loadSubtree:function(a){var b=this.marshalNodes(a);j.addNodes(b)},marshalNodes:function(a){return a.querySelectorAll(this.loadSelectorsForNode(a))},loadSelectorsForNode:function(a){var b=a.ownerDocument||a;return b===e?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(a,c,d,e,f){if(b.load&&console.log("loaded",a,c),c.__resource=d,c.__error=e,k(c)){var g=this.documents[a];void 0===g&&(g=e?null:n(d,f||a),g&&(g.__importLink=c,this.bootDocument(g)),this.documents[a]=g),c.__doc=g}h.parseNext()},bootDocument:function(a){this.loadSubtree(a),this.observer.observe(a),h.parseNext()},loadedAll:function(){h.parseNext()}},j=new f(i.loaded.bind(i),i.loadedAll.bind(i));if(i.observer=new g,!document.baseURI){var o={get:function(){var a=document.querySelector("base");return a?a.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",o),Object.defineProperty(e,"baseURI",o)}a.importer=i,a.importLoader=j}),window.HTMLImports.addModule(function(a){var b=a.parser,c=a.importer,d={added:function(a){for(var d,e,f,i,g=0,h=a.length;g<h&&(i=a[g]);g++)d||(d=i.ownerDocument,e=b.isParsed(d)),f=this.shouldLoadNode(i),f&&c.loadNode(i),this.shouldParseNode(i)&&e&&b.parseDynamic(i,f)},shouldLoadNode:function(a){return 1===a.nodeType&&e.call(a,c.loadSelectorsForNode(a))},shouldParseNode:function(a){return 1===a.nodeType&&e.call(a,b.parseSelectorsForNode(a))}};c.observer.addCallback=d.added.bind(d);var e=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(a){function e(){window.HTMLImports.importer.bootDocument(d)}var b=a.initializeModules;a.isIE;if(!a.useNative){b();var d=a.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?e():document.addEventListener("DOMContentLoaded",e)}}(window.HTMLImports),function(){function a(a){function b(a){if("object"!=typeof this||"function"!=typeof a)throw new TypeError;this._state=null,this._value=null,this._deferreds=[],g(a,d.bind(this),e.bind(this))}function c(b){var c=this;return null===this._state?void this._deferreds.push(b):void a(function(){var a=c._state?b.onFulfilled:b.onRejected;if("function"!=typeof a)return void(c._state?b.resolve:b.reject)(c._value);var d;try{d=a(c._value)}catch(a){return void b.reject(a)}b.resolve(d)})}function d(a){try{if(a===this)throw new TypeError;if(a&&("object"==typeof a||"function"==typeof a)){var b=a.then;if("function"==typeof b)return void g(b.bind(a),d.bind(this),e.bind(this))}this._state=!0,this._value=a,f.call(this)}catch(a){e.call(this,a)}}function e(a){this._state=!1,this._value=a,f.call(this)}function f(){for(var a=0,b=this._deferreds.length;a<b;a++)c.call(this,this._deferreds[a]);this._deferreds=null}function g(a,b,c){var d=!1;try{a(function(a){d||(d=!0,b(a))},function(a){d||(d=!0,c(a))})}catch(a){if(d)return;d=!0,c(a)}}return b.prototype.catch=function(a){return this.then(null,a)},b.prototype.then=function(a,d){var e=this;return new b(function(b,f){c.call(e,{onFulfilled:a,onRejected:d,resolve:b,reject:f})})},b.resolve=function(a){return a&&"object"==typeof a&&a.constructor===b?a:new b(function(b){b(a)})},b.reject=function(a){return new b(function(b,c){c(a)})},b}function b(){var a=document.createTextNode(""),b=0;return function(c){var d=new MutationObserver(function(a){d.disconnect(),c()});d.observe(a,{characterData:!0}),a.textContent=b++}}window.Promise||(window.Promise=a(b()),window.Promise.all=function(){var a=Array.prototype.slice.call(1===arguments.length&&Array.isArray(arguments[0])?arguments[0]:arguments);return new Promise(function(b,c){function e(f,g){try{if(g&&("object"==typeof g||"function"==typeof g)){var h=g.then;if("function"==typeof h)return void h.call(g,function(a){e(f,a)},c)}a[f]=g,0===--d&&b(a)}catch(a){c(a)}}if(0===a.length)return b([]);for(var d=a.length,f=0;f<a.length;f++)e(f,a[f])})},window.Promise.race=function(a){return new Promise(function(b,c){for(var d=0,e=a.length;d<e;d++)a[d].then(b,c)})})}(),function(a){"use strict";var b=a.flags.shadydom;b&&(window.ShadyDOM=window.ShadyDOM||{},ShadyDOM.force=b);var c=a.flags.register||a.flags.ce;c&&window.customElements&&(customElements.forcePolyfill=c)}(window.WebComponents),function(){function a(){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 b(){return g.customElements}function c(a){if(!/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a)||-1!==h.indexOf(a))return Error("The element name '"+a+"' is not valid.")}function d(a,c,d,e){var f=b();return a=d?j.call(a,c,d):j.call(a,c),(c=f.a.get(c.toLowerCase()))&&f.u(a,c,e),f.b(a),a}function e(a,c,d,e){c=c.toLowerCase();var f=a.getAttribute(c);e.call(a,c,d),1==a.__$CE_upgraded&&(e=b().a.get(a.localName),d=e.A,(e=e.i)&&0<=d.indexOf(c)&&(d=a.getAttribute(c),d!==f&&e.call(a,c,f,d,null)))}var f=document,g=window;if(!b()||(b().g=function(){},b().forcePolyfill)){var h="annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ");a.prototype.L=function(a,b){function d(a){var b=g[a];if(void 0!==b&&"function"!=typeof b)throw Error(f+" '"+a+"' is not a Function");return b}if("function"!=typeof b)throw new TypeError("constructor must be a Constructor");var e=c(a);if(e)throw e;if(this.a.has(a))throw Error("An element with name '"+a+"' is already defined");if(this.j.has(b))throw Error("Definition failed for '"+a+"': The constructor is already used.");var f=a,g=b.prototype;if("object"!=typeof g)throw new TypeError("Definition failed for '"+a+"': constructor.prototype must be an object");var e=d("connectedCallback"),h=d("disconnectedCallback"),i=d("attributeChangedCallback");this.a.set(f,{name:a,localName:f,constructor:b,v:e,w:h,i:i,A:i&&b.observedAttributes||[]}),this.j.set(b,f),this.K(),(a=this.h.get(f))&&(a.resolve(void 0),this.h.delete(f))},a.prototype.get=function(a){return(a=this.a.get(a))?a.constructor:void 0},a.prototype.M=function(a){var b=c(a);if(b)return Promise.reject(b);if(this.a.has(a))return Promise.resolve();if(b=this.h.get(a))return b.N;var d,e=new Promise(function(a){d=a}),b={N:e,resolve:d};return this.h.set(a,b),e},a.prototype.g=function(){this.enableFlush&&(this.l(this.m.takeRecords()),this.D(this.C.takeRecords()),this.o.forEach(function(a){this.l(a.takeRecords())},this))},a.prototype.K=function(){var a=this;if(!this.s){this.s=!0;var b=function(){a.s=!1,a.m||(a.m=a.b(f)),a.c(f.childNodes)};window.HTMLImports?window.HTMLImports.whenReady(b):b()}},a.prototype.I=function(a){this.f=a},a.prototype.b=function(a){return null!=a.__$CE_observer?a.__$CE_observer:(a.__$CE_observer=new MutationObserver(this.l.bind(this)),a.__$CE_observer.observe(a,{childList:!0,subtree:!0}),this.enableFlush&&this.o.add(a.__$CE_observer),a.__$CE_observer)},a.prototype.J=function(a){null!=a.__$CE_observer&&(a.__$CE_observer.disconnect(),this.enableFlush&&this.o.delete(a.__$CE_observer),a.__$CE_observer=null)},a.prototype.l=function(a){for(var b=0;b<a.length;b++){var c=a[b];if("childList"===c.type){var d=c.removedNodes;this.c(c.addedNodes),this.H(d)}}},a.prototype.c=function(a,b){b=b||new Set;for(var c=0;c<a.length;c++){var d=a[c];if(d.nodeType===Node.ELEMENT_NODE){this.J(d),d=f.createTreeWalker(d,NodeFilter.SHOW_ELEMENT,null,!1);do this.G(d.currentNode,b);while(d.nextNode())}}},a.prototype.G=function(a,b){if(!b.has(a)){b.add(a);var c=this.a.get(a.localName);if(c){a.__$CE_upgraded||this.u(a,c,!0);var d;if(d=a.__$CE_upgraded&&!a.__$CE_attached)a:{d=a;do{if(d.__$CE_attached||d.nodeType===Node.DOCUMENT_NODE){d=!0;break a}d=d.parentNode||d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host}while(d);d=!1}d&&(a.__$CE_attached=!0,c.v&&c.v.call(a))}a.shadowRoot&&this.c(a.shadowRoot.childNodes,b),"LINK"===a.tagName&&a.rel&&-1!==a.rel.toLowerCase().split(" ").indexOf("import")&&this.B(a,b)}},a.prototype.B=function(a,b){var c=a.import;if(c)b.has(c)||(b.add(c),c.__$CE_observer||this.b(c),this.c(c.childNodes,b));else if(b=a.href,!this.F.has(b)){this.F.add(b);var d=this,e=function(){a.removeEventListener("load",e),a.import.__$CE_observer||d.b(a.import),d.c(a.import.childNodes)};a.addEventListener("load",e)}},a.prototype.H=function(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.nodeType===Node.ELEMENT_NODE){this.b(c),c=f.createTreeWalker(c,NodeFilter.SHOW_ELEMENT,null,!1);do{var d=c.currentNode;if(d.__$CE_upgraded&&d.__$CE_attached){d.__$CE_attached=!1;var e=this.a.get(d.localName);e&&e.w&&e.w.call(d)}}while(c.nextNode())}}},a.prototype.u=function(a,b,c){if(a.__proto__=b.constructor.prototype,c&&(this.I(a),new b.constructor,a.__$CE_upgraded=!0,console.assert(!this.f)),c=b.A,(b=b.i)&&0<c.length){this.C.observe(a,{attributes:!0,attributeOldValue:!0,attributeFilter:c});for(var d=0;d<c.length;d++){var e=c[d];if(a.hasAttribute(e)){var f=a.getAttribute(e);b.call(a,e,null,f,null)}}}},a.prototype.D=function(a){for(var b=0;b<a.length;b++){var c=a[b];if("attributes"===c.type){var d=c.target,e=this.a.get(d.localName),f=c.attributeName,g=c.oldValue,h=d.getAttribute(f);h!==g&&e.i.call(d,f,g,h,c.attributeNamespace)}}},window.CustomElementRegistry=a,a.prototype.define=a.prototype.L,a.prototype.get=a.prototype.get,a.prototype.whenDefined=a.prototype.M,a.prototype.flush=a.prototype.g,a.prototype.polyfilled=!0,a.prototype._observeRoot=a.prototype.b,a.prototype._addImport=a.prototype.B;var i=g.HTMLElement;a.prototype.nativeHTMLElement=i,g.HTMLElement=function(){var a=b();if(a.f){var c=a.f;return a.f=null,c}if(this.constructor)return a=a.j.get(this.constructor),d(f,a,void 0,!1);throw Error("Unknown constructor. Did you call customElements.define()?")},g.HTMLElement.prototype=i.prototype;var j=f.createElement;f.createElement=function(a,b){return d(f,a,b,!0);
};var k=f.createElementNS;f.createElementNS=function(a,b){return"http://www.w3.org/1999/xhtml"===a?f.createElement(b):k.call(f,a,b)};var l=Element.prototype.attachShadow;l&&Object.defineProperty(Element.prototype,"attachShadow",{value:function(a){return a=l.call(this,a),b().b(a),a}});var m=f.importNode;f.importNode=function(a,c){return a=m.call(f,a,c),b().c(a.nodeType===Node.ELEMENT_NODE?[a]:a.childNodes),a};var n=Element.prototype.setAttribute;Element.prototype.setAttribute=function(a,b){e(this,a,b,n)};var o=Element.prototype.removeAttribute;Element.prototype.removeAttribute=function(a){e(this,a,null,o)},Object.defineProperty(window,"customElements",{value:new a,configurable:!0,enumerable:!0}),window.CustomElements={takeRecords:function(){b().g&&b().g()}}}}(),function(){"use strict";function b(a){return Boolean("ShadyRoot"===a.__localName)}function e(a,b){return d.call(a,b)}function f(a,b,c){var d=Object.getOwnPropertyDescriptor(b,a);d&&Object.defineProperty(c,a,d)}function g(a,b){if(a&&b)for(var e,c=Object.getOwnPropertyNames(b),d=0;d<c.length&&(e=c[d]);d++)f(e,b,a);return a||b}function h(a){for(var b=[],c=arguments.length-1;c-- >0;)b[c]=arguments[c+1];for(var d=0;d<b.length;d++)g(a,b[d]);return a}function i(a,b){for(var c in b)a[c]=b[c];return a}function k(a,b){var c=Object.getPrototypeOf(a);if(!c.hasOwnProperty("__patchProto")){var d=Object.create(c);d.__sourceProto=c,g(d,b),c.__patchProto=d}j(a,c.__patchProto)}function n(a,b,c){return{index:a,removed:b,addedCount:c}}function z(a,b){return y[b]||(y[b]=Object.getOwnPropertyDescriptor(HTMLElement.prototype,b)||Object.getOwnPropertyDescriptor(Element.prototype,b)||Object.getOwnPropertyDescriptor(Node.prototype,b)),y[b].get.call(a)}function K(a){H||(H=!0,m.then(L)),G.push(a)}function L(){for(H=!1,I++;G.length;)G.shift()();F&&F.flush&&F.flush();var a=I>J;if(G.length&&!a&&L(),I=0,a)throw new Error("Loop detected in ShadyDOM distribution, aborting.")}function O(a){switch(a){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}function P(a){return a.replace(M,O)}function Q(a){return a.replace(N,O)}function R(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}function U(a,b,c){switch(a.nodeType){case Node.ELEMENT_NODE:for(var h,d=a.localName,e="<"+d,f=a.attributes,g=0;h=f[g];g++)e+=" "+h.name+'="'+P(h.value)+'"';return e+=">",S[d]?e:e+V(a,c)+"</"+d+">";case Node.TEXT_NODE:var i=a.data;return b&&T[b.localName]?i:Q(i);case Node.COMMENT_NODE:return"<!--"+a.data+"-->";default:throw window.console.error(a),new Error("not implemented")}}function V(a,b){"template"===a.localName&&(a=a.content);for(var g,c="",d=b?b(a):a.childNodes,e=0,f=d.length;e<f&&(g=d[e]);e++)c+=U(g,a,b);return c}function ia(a,b){var c=ha(b);return a.map(function(a){var b=c===ha(a.target);if(b&&a.addedNodes){var d=Array.from(a.addedNodes).filter(function(a){return c===ha(a)});if(d.length)return a=Object.create(a),Object.defineProperty(a,"addedNodes",{value:d,configurable:!0}),a}else if(b)return a}).filter(function(a){return a})}function ra(b){a.inUse&&!ua(b)&&qa.canPatchNode(b)&&(x.saveChildNodes(b),qa.patch(b))}function sa(){return Boolean(qa.hasPrototypeDescriptors)}function ta(a){qa.unpatch(a)}function ua(a){return Boolean(a.__patched)}function ya(a,b){for(var c=[],d=a,e=a===window?window:a.getRootNode();d;)c.push(d),d=d.assignedSlot?d.assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==e)?d.host:d.parentNode;return c[c.length-1]===document&&c.push(window),c}function za(a,c){if(!b)return a;for(var g,h,i,j,d=ya(a,!0),e=c,f=0;f<e.length;f++)if(g=e[f],i=g===window?window:g.getRootNode(),i!==h&&(j=d.indexOf(i),h=i),!b(i)||j>-1)return g}function Ba(a){var b=function(b,c){var d=new a(b,c);return d.__composed=c&&Boolean(c.composed),d};return i(b,a),b.prototype=a.prototype,b}function Da(a,b,c){var d=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c];if(d)for(var f,e=0;f=d[e];e++)if(f.call(b,a),a.__immediatePropagationStopped)return}function Ea(a){var c,b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return c},configurable:!0});for(var d=b.length-1;d>=0;d--)if(c=b[d],Da(a,c,"capture"),a.__propagationStopped)return;Object.defineProperty(a,"eventPhase",{value:Event.AT_TARGET});for(var e,f=0;f<b.length;f++)if(c=b[f],(0===f||c.shadowRoot&&c.shadowRoot===e)&&(Da(a,c,"bubble"),c!==window&&(e=c.getRootNode()),a.__propagationStopped))return}function Fa(a,b,c){var d=this;if(b){var e,f,g;if("object"==typeof c?(e=Boolean(c.capture),f=Boolean(c.once),g=Boolean(c.passive)):(e=Boolean(c),f=!1,g=!1),b.__eventWrappers){for(var h=0;h<b.__eventWrappers.length;h++)if(b.__eventWrappers[h].node===d&&b.__eventWrappers[h].type===a&&b.__eventWrappers[h].capture===e&&b.__eventWrappers[h].once===f&&b.__eventWrappers[h].passive===g)return}else b.__eventWrappers=[];var i=function(d){if(f&&this.removeEventListener(a,b,c),d.__target||(d.__target=d.target,d.__relatedTarget=d.relatedTarget,k(d,Aa)),d.composed||d.composedPath().indexOf(this)>-1)return d.eventPhase===Event.BUBBLING_PHASE&&d.target===d.relatedTarget?void d.stopImmediatePropagation():b(d)};b.__eventWrappers.push({node:this,type:a,capture:e,once:f,passive:g,wrapperFn:i}),Ca[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][e?"capture":"bubble"].push(i)):va.call(this,a,i,c)}}function Ga(a,b,c){var d=this;if(b){var e,f,g;"object"==typeof c?(e=Boolean(c.capture),f=Boolean(c.once),g=Boolean(c.passive)):(e=Boolean(c),f=!1,g=!1);var h=void 0;if(b.__eventWrappers)for(var i=0;i<b.__eventWrappers.length;i++)if(b.__eventWrappers[i].node===d&&b.__eventWrappers[i].type===a&&b.__eventWrappers[i].capture===e&&b.__eventWrappers[i].once===f&&b.__eventWrappers[i].passive===g){h=b.__eventWrappers.splice(i,1)[0].wrapperFn,b.__eventWrappers.length||(b.__eventWrappers=void 0);break}if(wa.call(this,a,h||b,c),h&&Ca[a]&&this.__handlers&&this.__handlers[a]){var j=this.__handlers[a][e?"capture":"bubble"],k=j.indexOf(h);k>-1&&j.splice(k,1)}}}function Ha(){for(var a in Ca)window.addEventListener(a,function(a){a.__target||(a.__target=a.target,a.__relatedTarget=a.relatedTarget,k(a,Aa),Ea(a),a.stopImmediatePropagation())},!0)}var a=window.ShadyDOM||{};a.hasNativeShadowDOM=Boolean(Element.prototype.attachShadow&&Node.prototype.getRootNode),a.inUse=a.force||!a.hasNativeShadowDOM;var m,c=Element.prototype,d=c.matches||c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector,j=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a},l={};m=window.Promise?Promise.resolve():{then:function(a){var b=document.createTextNode(""),c=new MutationObserver(function(){c.disconnect(),a()});c.observe(b,{characterData:!0})}};var o=0,p=1,q=2,r=3,s={calcEditDistances:function(b,c,d,e,f,g){for(var h=this,i=g-f+1,j=d-c+1,k=new Array(i),l=0;l<i;l++)k[l]=new Array(j),k[l][0]=l;for(var m=0;m<j;m++)k[0][m]=m;for(var n=1;n<i;n++)for(var o=1;o<j;o++)if(h.equals(b[c+o-1],e[f+n-1]))k[n][o]=k[n-1][o-1];else{var p=k[n-1][o]+1,q=k[n][o-1]+1;k[n][o]=p<q?p:q}return k},spliceOperationsFromEditDistances:function(b){for(var c=b.length-1,d=b[0].length-1,e=b[c][d],f=[];c>0||d>0;)if(0!=c)if(0!=d){var j,g=b[c-1][d-1],h=b[c-1][d],i=b[c][d-1];j=h<i?h<g?h:g:i<g?i:g,j==g?(g==e?f.push(o):(f.push(p),e=g),c--,d--):j==h?(f.push(r),c--,e=h):(f.push(q),d--,e=i)}else f.push(r),c--;else f.push(q),d--;return f.reverse(),f},calcSplices:function(b,c,d,e,f,g){var j,h=0,i=0,k=Math.min(d-c,g-f);if(0==c&&0==f&&(h=this.sharedPrefix(b,e,k)),d==b.length&&g==e.length&&(i=this.sharedSuffix(b,e,k-h)),c+=h,f+=h,d-=i,g-=i,d-c==0&&g-f==0)return[];if(c==d){for(j=n(c,[],0);f<g;)j.removed.push(e[f++]);return[j]}if(f==g)return[n(c,[],d-c)];var l=this.spliceOperationsFromEditDistances(this.calcEditDistances(b,c,d,e,f,g));j=void 0;for(var m=[],s=c,t=f,u=0;u<l.length;u++)switch(l[u]){case o:j&&(m.push(j),j=void 0),s++,t++;break;case p:j||(j=n(s,[],0)),j.addedCount++,s++,j.removed.push(e[t]),t++;break;case q:j||(j=n(s,[],0)),j.addedCount++,s++;break;case r:j||(j=n(s,[],0)),j.removed.push(e[t]),t++}return j&&m.push(j),m},sharedPrefix:function(b,c,d){for(var e=this,f=0;f<d;f++)if(!e.equals(b[f],c[f]))return f;return d},sharedSuffix:function(b,c,d){for(var e=b.length,f=c.length,g=0;g<d&&this.equals(b[--e],c[--f]);)g++;return g},calculateSplices:function(b,c){return this.calcSplices(b,0,b.length,c,0,c.length)},equals:function(b,c){return b===c}},t=function(a,b){return s.calculateSplices(a,b)},u=Element.prototype.insertBefore,v=Element.prototype.appendChild,w=Element.prototype.removeChild,x={arrayCopyChildNodes:function(b){for(var c=[],d=0,e=b.firstChild;e;e=e.nextSibling)c[d++]=e;return c},arrayCopyChildren:function(b){for(var c=[],d=0,e=b.firstElementChild;e;e=e.nextElementSibling)c[d++]=e;return c},arrayCopy:function(b){for(var c=b.length,d=new Array(c),e=0;e<c;e++)d[e]=b[e];return d},saveChildNodes:function(b){x.Logical.saveChildNodes(b),x.Composed.hasParentNode(b)||x.Composed.saveComposedData(b),x.Composed.saveChildNodes(b)}};x.Logical={hasParentNode:function(b){return Boolean(b.__dom&&b.__dom.parentNode)},hasChildNodes:function(b){return Boolean(b.__dom&&void 0!==b.__dom.childNodes)},getChildNodes:function(b){return this.hasChildNodes(b)?this._getChildNodes(b):x.Composed.getChildNodes(b)},_getChildNodes:function(b){if(!b.__dom.childNodes){b.__dom.childNodes=[];for(var c=this.getFirstChild(b);c;c=this.getNextSibling(c))b.__dom.childNodes.push(c)}return b.__dom.childNodes},getParentNode:function(b){return b.__dom&&void 0!==b.__dom.parentNode?b.__dom.parentNode:x.Composed.getParentNode(b)},getFirstChild:function(b){return b.__dom&&void 0!==b.__dom.firstChild?b.__dom.firstChild:x.Composed.getFirstChild(b)},getLastChild:function(b){return b.__dom&&void 0!==b.__dom.lastChild?b.__dom.lastChild:x.Composed.getLastChild(b)},getNextSibling:function(b){return b.__dom&&void 0!==b.__dom.nextSibling?b.__dom.nextSibling:x.Composed.getNextSibling(b)},getPreviousSibling:function(b){return b.__dom&&void 0!==b.__dom.previousSibling?b.__dom.previousSibling:x.Composed.getPreviousSibling(b)},getFirstElementChild:function(b){return b.__dom&&void 0!==b.__dom.firstChild?this._getFirstElementChild(b):x.Composed.getFirstElementChild(b)},_getFirstElementChild:function(b){for(var c=b.__dom.firstChild;c&&c.nodeType!==Node.ELEMENT_NODE;)c=c.__dom.nextSibling;return c},getLastElementChild:function(b){return b.__dom&&void 0!==b.__dom.lastChild?this._getLastElementChild(b):x.Composed.getLastElementChild(b)},_getLastElementChild:function(b){for(var c=b.__dom.lastChild;c&&c.nodeType!==Node.ELEMENT_NODE;)c=c.__dom.previousSibling;return c},getNextElementSibling:function(b){return b.__dom&&void 0!==b.__dom.nextSibling?this._getNextElementSibling(b):x.Composed.getNextElementSibling(b)},_getNextElementSibling:function(b){for(var c=this,d=b.__dom.nextSibling;d&&d.nodeType!==Node.ELEMENT_NODE;)d=c.getNextSibling(d);return d},getPreviousElementSibling:function(b){return b.__dom&&void 0!==b.__dom.previousSibling?this._getPreviousElementSibling(b):x.Composed.getPreviousElementSibling(b)},_getPreviousElementSibling:function(b){for(var c=this,d=b.__dom.previousSibling;d&&d.nodeType!==Node.ELEMENT_NODE;)d=c.getPreviousSibling(d);return d},saveChildNodes:function(b){if(!this.hasChildNodes(b)){b.__dom=b.__dom||{},b.__dom.firstChild=b.firstChild,b.__dom.lastChild=b.lastChild;for(var e,c=b.__dom.childNodes=x.arrayCopyChildNodes(b),d=0;d<c.length&&(e=c[d]);d++)e.__dom=e.__dom||{},e.__dom.parentNode=b,e.__dom.nextSibling=c[d+1]||null,e.__dom.previousSibling=c[d-1]||null,l.patchNode(e)}},recordInsertBefore:function(b,c,d){var e=this;if(c.__dom.childNodes=null,b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var f=x.arrayCopyChildNodes(b),g=0;g<f.length;g++)e._linkNode(f[g],c,d);b.__dom=b.__dom||{},b.__dom.firstChild=b.__dom.lastChild=null,b.__dom.childNodes=null}else this._linkNode(b,c,d)},_linkNode:function(b,c,d){l.patchNode(b),d=d||null,b.__dom=b.__dom||{},c.__dom=c.__dom||{},d&&(d.__dom=d.__dom||{}),b.__dom.previousSibling=d?d.__dom.previousSibling:c.__dom.lastChild,b.__dom.previousSibling&&(b.__dom.previousSibling.__dom.nextSibling=b),b.__dom.nextSibling=d,b.__dom.nextSibling&&(b.__dom.nextSibling.__dom.previousSibling=b),b.__dom.parentNode=c,d?d===c.__dom.firstChild&&(c.__dom.firstChild=b):(c.__dom.lastChild=b,c.__dom.firstChild||(c.__dom.firstChild=b)),c.__dom.childNodes=null},recordRemoveChild:function(b,c){b.__dom=b.__dom||{},c.__dom=c.__dom||{},b===c.__dom.firstChild&&(c.__dom.firstChild=b.__dom.nextSibling),b===c.__dom.lastChild&&(c.__dom.lastChild=b.__dom.previousSibling);var d=b.__dom.previousSibling,e=b.__dom.nextSibling;d&&(d.__dom=d.__dom||{},d.__dom.nextSibling=e),e&&(e.__dom=e.__dom||{},e.__dom.previousSibling=d),b.__dom.parentNode=b.__dom.previousSibling=b.__dom.nextSibling=null,c.__dom.childNodes=null}},x.Composed={hasParentNode:function(b){return Boolean(b.__dom&&void 0!==b.__dom.$parentNode)},hasChildNodes:function(b){return Boolean(b.__dom&&void 0!==b.__dom.$childNodes)},getChildNodes:function(b){return this.hasChildNodes(b)?this._getChildNodes(b):!b.__patched&&x.arrayCopy(b.childNodes)},_getChildNodes:function(b){if(!b.__dom.$childNodes){b.__dom.$childNodes=[];for(var c=b.__dom.$firstChild;c;c=c.__dom.$nextSibling)b.__dom.$childNodes.push(c)}return b.__dom.$childNodes},getComposedChildNodes:function(b){return b.__dom.$childNodes},getParentNode:function(b){return this.hasParentNode(b)?b.__dom.$parentNode:!b.__patched&&b.parentNode},getFirstChild:function(b){return b.__patched?b.__dom.$firstChild:b.firstChild},getLastChild:function(b){return b.__patched?b.__dom.$lastChild:b.lastChild},getNextSibling:function(b){return b.__patched?b.__dom.$nextSibling:b.nextSibling},getPreviousSibling:function(b){return b.__patched?b.__dom.$previousSibling:b.previousSibling},getFirstElementChild:function(b){return b.__patched?this._getFirstElementChild(b):b.firstElementChild},_getFirstElementChild:function(b){for(var c=b.__dom.$firstChild;c&&c.nodeType!==Node.ELEMENT_NODE;)c=c.__dom.$nextSibling;return c},getLastElementChild:function(b){return b.__patched?this._getLastElementChild(b):b.lastElementChild},_getLastElementChild:function(b){for(var c=b.__dom.$lastChild;c&&c.nodeType!==Node.ELEMENT_NODE;)c=c.__dom.$previousSibling;return c},getNextElementSibling:function(b){return b.__patched?this._getNextElementSibling(b):b.nextElementSibling},_getNextElementSibling:function(b){for(var c=this,d=b.__dom.$nextSibling;d&&d.nodeType!==Node.ELEMENT_NODE;)d=c.getNextSibling(d);return d},getPreviousElementSibling:function(b){return b.__patched?this._getPreviousElementSibling(b):b.previousElementSibling},_getPreviousElementSibling:function(b){for(var c=this,d=b.__dom.$previousSibling;d&&d.nodeType!==Node.ELEMENT_NODE;)d=c.getPreviousSibling(d);return d},saveChildNodes:function(b){var c=this;if(!this.hasChildNodes(b)){b.__dom=b.__dom||{},b.__dom.$firstChild=b.firstChild,b.__dom.$lastChild=b.lastChild;for(var f,d=b.__dom.$childNodes=x.arrayCopyChildNodes(b),e=0;e<d.length&&(f=d[e]);e++)c.saveComposedData(f)}},saveComposedData:function(b){b.__dom=b.__dom||{},void 0===b.__dom.$parentNode&&(b.__dom.$parentNode=b.parentNode),void 0===b.__dom.$nextSibling&&(b.__dom.$nextSibling=b.nextSibling),void 0===b.__dom.$previousSibling&&(b.__dom.$previousSibling=b.previousSibling)},recordInsertBefore:function(b,c,d){var e=this;if(c.__dom.$childNodes=null,b.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var f=this.getFirstChild(b);f;f=this.getNextSibling(f))e._linkNode(f,c,d);else this._linkNode(b,c,d)},_linkNode:function(b,c,d){b.__dom=b.__dom||{},c.__dom=c.__dom||{},d&&(d.__dom=d.__dom||{}),b.__dom.$previousSibling=d?d.__dom.$previousSibling:c.__dom.$lastChild,b.__dom.$previousSibling&&(b.__dom.$previousSibling.__dom.$nextSibling=b),b.__dom.$nextSibling=d,b.__dom.$nextSibling&&(b.__dom.$nextSibling.__dom.$previousSibling=b),b.__dom.$parentNode=c,d?d===c.__dom.$firstChild&&(c.__dom.$firstChild=b):(c.__dom.$lastChild=b,c.__dom.$firstChild||(c.__dom.$firstChild=b)),c.__dom.$childNodes=null},recordRemoveChild:function(b,c){b.__dom=b.__dom||{},c.__dom=c.__dom||{},b===c.__dom.$firstChild&&(c.__dom.$firstChild=b.__dom.$nextSibling),b===c.__dom.$lastChild&&(c.__dom.$lastChild=b.__dom.$previousSibling);var d=b.__dom.$previousSibling,e=b.__dom.$nextSibling;d&&(d.__dom=d.__dom||{},d.__dom.$nextSibling=e),e&&(e.__dom=e.__dom||{},e.__dom.$previousSibling=d),b.__dom.$parentNode=b.__dom.$previousSibling=b.__dom.$nextSibling=null,c.__dom.$childNodes=null},clearChildNodes:function(b){for(var f,c=this,d=this.getChildNodes(b),e=0;e<d.length;e++)f=d[e],c.recordRemoveChild(f,b),w.call(b,f)},saveParentNode:function(b){b.__dom=b.__dom||{},b.__dom.$parentNode=b.parentNode},insertBefore:function(b,c,d){return this.saveChildNodes(b),this._addChild(b,c,d),u.call(b,c,d||null)},appendChild:function(b,c){return this.saveChildNodes(b),this._addChild(b,c),v.call(b,c)},removeChild:function(b,c){var d=this.getParentNode(c);if(this.saveChildNodes(b),this._removeChild(b,c),d===b)return w.call(b,c)},_addChild:function(b,c,d){var e=this,f=c.nodeType===Node.DOCUMENT_FRAGMENT_NODE,g=this.getParentNode(c);if(g&&this._removeChild(g,c),f)for(var h=this.getChildNodes(c),i=0;i<h.length;i++){var j=h[i];e._removeChild(c,j),e.recordInsertBefore(j,b,d)}else this.recordInsertBefore(c,b,d)},_removeChild:function(b,c){this.recordRemoveChild(c,b)}};var y={},A="function"==typeof Event?Event:function(a,b){b=b||{};var c=document.createEvent("Event");return c.initEvent(a,Boolean(b.bubbles),Boolean(b.cancelable)),c},B=function(){function a(a){this.root=a,this.insertionPointTag="slot"}return a.prototype.getInsertionPoints=function(){return this.root.querySelectorAll(this.insertionPointTag)},a.prototype.hasInsertionPoint=function(){return Boolean(this.root._insertionPoints&&this.root._insertionPoints.length)},a.prototype.isInsertionPoint=function(b){return b.localName&&b.localName==this.insertionPointTag},a.prototype.distribute=function(){return this.hasInsertionPoint()?this.distributePool(this.root,this.collectPool()):[]},a.prototype.collectPool=function(){return x.arrayCopy(x.Logical.getChildNodes(this.root.host))},a.prototype.distributePool=function(b,c){for(var i,d=this,e=[],f=this.root._insertionPoints,g=0,h=f.length;g<h&&(i=f[g]);g++){d.distributeInsertionPoint(i,c);var j=x.Logical.getParentNode(i);j&&j.shadyRoot&&d.hasInsertionPoint(j.shadyRoot)&&e.push(j.shadyRoot)}for(var k=0;k<c.length;k++){var l=c[k];if(l){l._assignedSlot=void 0;var m=x.Composed.getParentNode(l);m&&x.Composed.removeChild(m,l)}}return e},a.prototype.distributeInsertionPoint=function(b,c){var d=this,e=b._assignedNodes;e&&this.clearAssignedSlots(b,!0),b._assignedNodes=[];for(var j,f=!1,g=!1,h=0,i=c.length;h<i;h++)j=c[h],j&&d.matchesInsertionPoint(j,b)&&(j.__prevAssignedSlot!=b&&(f=!0),d.distributeNodeInto(j,b),c[h]=void 0,g=!0);if(!g)for(var m,k=x.Logical.getChildNodes(b),l=0;l<k.length;l++)m=k[l],m.__prevAssignedSlot!=b&&(f=!0),d.distributeNodeInto(m,b);if(e){for(var n=0;n<e.length;n++)e[n].__prevAssignedSlot=null;b._assignedNodes.length<e.length&&(f=!0)}this.setDistributedNodesOnInsertionPoint(b),f&&this._fireSlotChange(b)},a.prototype.clearAssignedSlots=function(b,c){var d=b._assignedNodes;if(d)for(var e=0;e<d.length;e++){var f=d[e];c&&(f.__prevAssignedSlot=f._assignedSlot),f._assignedSlot===b&&(f._assignedSlot=null)}},a.prototype.matchesInsertionPoint=function(b,c){var d=c.getAttribute("name");d=d?d.trim():"";var e=b.getAttribute&&b.getAttribute("slot");return e=e?e.trim():"",e==d},a.prototype.distributeNodeInto=function(b,c){c._assignedNodes.push(b),b._assignedSlot=c},a.prototype.setDistributedNodesOnInsertionPoint=function(b){var c=this,d=b._assignedNodes;b._distributedNodes=[];for(var f,e=0;e<d.length&&(f=d[e]);e++)if(c.isInsertionPoint(f)){var g=f._distributedNodes;if(g)for(var h=0;h<g.length;h++)b._distributedNodes.push(g[h])}else b._distributedNodes.push(d[e])},a.prototype._fireSlotChange=function(b){b.dispatchEvent(new A("slotchange")),b._assignedSlot&&this._fireSlotChange(b._assignedSlot)},a.prototype.isFinalDestination=function(b){return!b._assignedSlot},a}(),C=function(b){if(!b)throw"Must provide a host";var c=document.createDocumentFragment();return c.__proto__=E,c._init(b),c},D={_init:function(b){this.__localName="ShadyRoot",b.shadyRoot=this,this.host=b,x.Logical.saveChildNodes(b),x.Logical.saveChildNodes(this),this._clean=!0,this._hasRendered=!1,this._distributor=new B(this),this.update()},update:function(){var b=this._findDistributionRoot(this.host);b._clean&&(b._clean=!1,K(function(){b.render()}))},_findDistributionRoot:function(b){for(var c=b.shadyRoot;b&&this._elementNeedsDistribution(b);)c=b.getRootNode(),b=c&&c.host;return c},_elementNeedsDistribution:function(b){for(var f,c=this,d=x.Logical.getChildNodes(b),e=0;e<d.length;e++)if(f=d[e],c._distributor.isInsertionPoint(f))return b.getRootNode()},render:function(){this._clean||(this._clean=!0,this._skipUpdateInsertionPoints?this._hasRendered||(this._insertionPoints=[]):this.updateInsertionPoints(),this._skipUpdateInsertionPoints=!1,this.distribute(),this.compose(),this._hasRendered=!0)},forceRender:function(){this._clean=!1,this.render()},distribute:function(){for(var b=this._distributor.distribute(),c=0;c<b.length;c++)b[c].forceRender()},updateInsertionPoints:function(){var b=this,c=this.__insertionPoints;if(c)for(var e,d=0;d<c.length;d++)e=c[d],e.getRootNode()!==b&&b._distributor.clearAssignedSlots(e);c=this._insertionPoints=this._distributor.getInsertionPoints();for(var g,f=0;f<c.length;f++)g=c[f],x.Logical.saveChildNodes(g),x.Logical.saveChildNodes(x.Logical.getParentNode(g))},get _insertionPoints(){return this.__insertionPoints||this.updateInsertionPoints(),this.__insertionPoints||(this.__insertionPoints=[])},set _insertionPoints(a){this.__insertionPoints=a},hasInsertionPoint:function(){return this._distributor.hasInsertionPoint()},compose:function(){this._composeTree()},_composeTree:function(){var b=this;this._updateChildNodes(this.host,this._composeNode(this.host));for(var f,g,c=this._insertionPoints||[],d=0,e=c.length;d<e&&(f=c[d]);d++)g=x.Logical.getParentNode(f),g!==b.host&&g!==b&&b._updateChildNodes(g,b._composeNode(g))},_composeNode:function(b){for(var c=this,d=[],e=x.Logical.getChildNodes(b.shadyRoot||b),f=0;f<e.length;f++){var g=e[f];if(c._distributor.isInsertionPoint(g))for(var h=g._distributedNodes||(g._distributedNodes=[]),i=0;i<h.length;i++){var j=h[i];c.isFinalDestination(g,j)&&d.push(j)}else d.push(g)}return d},isFinalDestination:function(b,c){return this._distributor.isFinalDestination(b,c)},_updateChildNodes:function(b,c){for(var h,d=x.Composed.getChildNodes(b),e=t(c,d),f=0,g=0;f<e.length&&(h=e[f]);f++){for(var j,i=0;i<h.removed.length&&(j=h.removed[i]);i++)x.Composed.getParentNode(j)===b&&x.Composed.removeChild(b,j),d.splice(h.index+g,1);g-=h.addedCount}for(var l,m,k=0;k<e.length&&(l=e[k]);k++){m=d[l.index];for(var o,n=l.index;n<l.index+l.addedCount;n++)o=c[n],x.Composed.insertBefore(b,o,m),d.splice(n,0,o)}},getInsertionPointTag:function(){return this._distributor.insertionPointTag}},E=Object.create(DocumentFragment.prototype);g(E,D);var H,F=window.customElements,G=[],I=0,J=100;L.list=G;var M=/[&\u00A0"]/g,N=/[&\u00A0<>]/g,S=R(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),T=R(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),W={addNode:function(b,c,d){var e=this.ownerShadyRootForNode(b);if(e){c.__noInsertionPoint&&e._clean&&(e._skipUpdateInsertionPoints=!0);var f=this._maybeAddInsertionPoint(c,b,e);f&&(e._skipUpdateInsertionPoints=!1)}x.Logical.hasChildNodes(b)&&x.Logical.recordInsertBefore(c,b,d);var g=this._maybeDistribute(c,b,e)||b.shadyRoot;return g},removeNode:function(b){var d,c=x.Logical.hasParentNode(b)&&x.Logical.getParentNode(b),e=this.ownerShadyRootForNode(b);return c&&(d=this.maybeDistributeParent(b),x.Logical.recordRemoveChild(b,c),e&&(this._removeDistributedChildren(e,b)||c.localName===e.getInsertionPointTag())&&(e._skipUpdateInsertionPoints=!1,e.update())),this._removeOwnerShadyRoot(b),d},_scheduleObserver:function(b,c,d){var e=b.__dom&&b.__dom.observer;e&&(c&&e.addedNodes.push(c),d&&e.removedNodes.push(d),e.schedule())},removeNodeFromParent:function(b,c){c?(this._scheduleObserver(c,null,b),this.removeNode(b)):this._removeOwnerShadyRoot(b)},_hasCachedOwnerRoot:function(b){return Boolean(void 0!==b.__ownerShadyRoot)},getRootNode:function(c){if(c&&c.nodeType){var d=c.__ownerShadyRoot;if(void 0===d){if(b(c))d=c;else{var e=x.Logical.getParentNode(c);d=e?this.getRootNode(e):c}document.documentElement.contains(c)&&(c.__ownerShadyRoot=d)}return d}},ownerShadyRootForNode:function(c){var d=this.getRootNode(c);if(b(d))return d},_maybeDistribute:function(b,c,d){var e=d&&d.getInsertionPointTag()||"",f=b.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!b.__noInsertionPoint&&e&&b.querySelector(e),g=f&&x.Logical.getParentNode(f).nodeType!==Node.DOCUMENT_FRAGMENT_NODE,h=f||b.localName===e;(h||c.localName===e)&&d&&d.update();var i=this._nodeNeedsDistribution(c);return i&&c.shadyRoot.update(),i||h&&!g},_maybeAddInsertionPoint:function(b,c,d){var f,e=this,g=d.getInsertionPointTag();if(b.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||b.__noInsertionPoint)b.localName===g&&(x.Logical.saveChildNodes(c),x.Logical.saveChildNodes(b),f=!0);else for(var j,k,l,h=b.querySelectorAll(g),i=0;i<h.length&&(j=h[i]);i++)k=x.Logical.getParentNode(j),k===b&&(k=c),l=e._maybeAddInsertionPoint(j,k,d),f=f||l;return f},_nodeNeedsDistribution:function(b){return b&&b.shadyRoot&&b.shadyRoot.hasInsertionPoint()},_removeDistributedChildren:function(b,c){for(var e,d=this,f=b._insertionPoints,g=0;g<f.length;g++){var h=f[g];if(d._contains(c,h))for(var i=h.assignedNodes({flatten:!0}),j=0;j<i.length;j++){e=!0;var k=i[j],l=x.Composed.getParentNode(k);l&&x.Composed.removeChild(l,k)}}return e},_contains:function(b,c){for(;c;){if(c==b)return!0;c=x.Logical.getParentNode(c)}},_removeOwnerShadyRoot:function(b){var c=this;if(this._hasCachedOwnerRoot(b))for(var g,d=x.Logical.getChildNodes(b),e=0,f=d.length;e<f&&(g=d[e]);e++)c._removeOwnerShadyRoot(g);b.__ownerShadyRoot=void 0},firstComposedNode:function(b){for(var g,c=b.assignedNodes({flatten:!0}),d=this.getRootNode(b),e=0,f=c.length;e<f&&(g=c[e]);e++)if(d.isFinalDestination(b,g))return g},clearNode:function(b){for(;b.firstChild;)b.removeChild(b.firstChild)},maybeDistributeParent:function(b){var c=x.Logical.getParentNode(b);if(this._nodeNeedsDistribution(c))return c.shadyRoot.update(),!0},maybeDistributeAttributeChange:function(b,c){if("slot"===c)this.maybeDistributeParent(b);else if("slot"===b.localName&&"name"===c){var d=this.ownerShadyRootForNode(b);d&&d.update()}},query:function(b,c,d){var e=[];return this._queryElements(x.Logical.getChildNodes(b),c,d,e),e},_queryElements:function(b,c,d,e){for(var i,f=this,g=0,h=b.length;g<h&&(i=b[g]);g++)if(i.nodeType===Node.ELEMENT_NODE&&f._queryElement(i,c,d,e))return!0},_queryElement:function(b,c,d,e){var f=c(b);return f&&e.push(b),d&&d(f)?f:void this._queryElements(x.Logical.getChildNodes(b),c,d,e)},activeElementForNode:function(c){var d=this,e=document.activeElement;if(!e)return null;var f=!!b(c);if(c!==document){if(!f)return null;if(c.host===e||!c.host.contains(e))return null}for(var g=this.ownerShadyRootForNode(e);g&&g!==c;)e=g.host,g=d.ownerShadyRootForNode(e);return c===document?g?null:e:g===c?e:null}},X=Element.prototype.cloneNode,Y=Document.prototype.importNode,Z=Element.prototype.setAttribute,$=Element.prototype.removeAttribute,_=function(a,b){window.ShadyCSS&&"class"===a&&this.ownerDocument===document?window.ShadyCSS.setElementClass(this,b):Z.call(this,a,b)},aa={};Object.defineProperties(aa,{parentElement:{get:function(){return x.Logical.getParentNode(this)},configurable:!0},parentNode:{get:function(){return x.Logical.getParentNode(this)},configurable:!0},nextSibling:{get:function(){return x.Logical.getNextSibling(this)},configurable:!0},previousSibling:{get:function(){return x.Logical.getPreviousSibling(this)},configurable:!0},nextElementSibling:{get:function(){return x.Logical.getNextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){return x.Logical.getPreviousElementSibling(this)},configurable:!0},assignedSlot:{get:function(){return this._assignedSlot},configurable:!0}});var ba={appendChild:function(b){return this.insertBefore(b)},insertBefore:function(c,d){if(d&&x.Logical.getParentNode(d)!==this)throw Error("The ref_node to be inserted before is not a child of this node");if(c.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var e=x.Logical.getParentNode(c);W.removeNodeFromParent(c,e)}if(!W.addNode(this,c,d)){if(d){var f=W.ownerShadyRootForNode(d);f&&(d=d.localName===f.getInsertionPointTag()?W.firstComposedNode(d):d)}var g=b(this)?this.host:this;d?x.Composed.insertBefore(g,c,d):x.Composed.appendChild(g,c)}return W._scheduleObserver(this,c),c},removeChild:function(c){if(x.Logical.getParentNode(c)!==this)throw Error("The node to be removed is not a child of this node: "+c);if(!W.removeNode(c)){var d=b(this)?this.host:this,e=x.Composed.getParentNode(c);d===e&&x.Composed.removeChild(d,c)}return W._scheduleObserver(this,null,c),c},replaceChild:function(b,c){return this.insertBefore(b,c),this.removeChild(c),b},querySelector:function(b){var c=W.query(this,function(a){return e(a,b)},function(a){return Boolean(a)})[0];return c||null},querySelectorAll:function(b){return W.query(this,function(a){return e(a,b)})},cloneNode:function(b){if("template"==this.localName)return X.call(this,b);var c=X.call(this,!1);if(b)for(var f,d=this.childNodes,e=0;e<d.length;e++)f=d[e].cloneNode(!0),c.appendChild(f);return c},importNode:function(b,c){var d=this instanceof Document?this:this.ownerDocument,e=Y.call(d,b,!1);if(c){var f=x.Logical.getChildNodes(b);l.patchNode(e);for(var h,g=0;g<f.length;g++)h=d.importNode(f[g],!0),e.appendChild(h)}return e}};Object.defineProperties(ba,{childNodes:{get:function(){var b=x.Logical.getChildNodes(this);return Array.isArray(b)?b:x.arrayCopyChildNodes(this)},configurable:!0},children:{get:function(){return x.Logical.hasChildNodes(this)?Array.prototype.filter.call(this.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}):x.arrayCopyChildren(this)},configurable:!0},firstChild:{get:function(){return x.Logical.getFirstChild(this)},configurable:!0},lastChild:{get:function(){return x.Logical.getLastChild(this)},configurable:!0},firstElementChild:{get:function(){return x.Logical.getFirstElementChild(this)},configurable:!0},lastElementChild:{get:function(){return x.Logical.getLastElementChild(this)},configurable:!0},textContent:{get:function(){if(this.childNodes){for(var e,b=[],c=0,d=this.childNodes;e=d[c];c++)e.nodeType!==Node.COMMENT_NODE&&b.push(e.textContent);return b.join("")}return""},set:function(b){W.clearNode(this),b&&this.appendChild(document.createTextNode(b))},configurable:!0},innerHTML:{get:function(){return V(this)},set:function(b){var c=this;W.clearNode(this);var d=document.createElement("div");d.innerHTML=b;for(var e=x.arrayCopyChildNodes(d),f=0;f<e.length;f++)c.appendChild(e[f])},configurable:!0}});var ca={assignedNodes:function(b){return(b&&b.flatten?this._distributedNodes:this._assignedNodes)||[]},setAttribute:function(b,c){_.call(this,b,c),W.maybeDistributeAttributeChange(this,b)},removeAttribute:function(b){$.call(this,b),W.maybeDistributeAttributeChange(this,b)}};Object.defineProperties(ca,{shadowRoot:{get:function(){return this.shadyRoot}},slot:{get:function(){return this.getAttribute("slot")},set:function(b){this.setAttribute("slot",b)}}});var da={get:function(){return W.activeElementForNode(this)}},ea={};Object.defineProperties(ea,{activeElement:da});var fa={};Object.defineProperties(fa,{_activeElement:da});var ga={Node:h({__patched:"Node"},aa),Fragment:h({__patched:"Fragment"},aa,ba,ea),Element:h({__patched:"Element"},aa,ba,ca,ea),Document:h({__patched:"Document"},aa,ba,ca,fa)},ha=function(a){return W.getRootNode(a);
},ja=function(){this._scheduled=!1,this.addedNodes=[],this.removedNodes=[],this.callbacks=new Set};ja.prototype.schedule=function(){var b=this;this._scheduled||(this._scheduled=!0,m.then(function(){b.flush()}))},ja.prototype.flush=function(){if(this._scheduled){this._scheduled=!1;var b=this.takeRecords();b.length&&this.callbacks.forEach(function(a){a(b)})}},ja.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var b=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],b}return[]};var ka=function(a){return l.isNodePatched(a)?V(a,function(a){return x.Composed.getChildNodes(a)}):a.innerHTML},la=function(a){return l.isNodePatched(a)?x.Composed.getChildNodes(a):a.childNodes},ma=function(a,b){l.patchNode(a),a.__dom.observer||(a.__dom.observer=new ja),a.__dom.observer.callbacks.add(b);var c=a.__dom.observer;return{_callback:b,_observer:c,_node:a,takeRecords:function(){return c.takeRecords()}}},na=function(a){var b=a&&a._observer;b&&(b.callbacks.delete(a._callback),b.callbacks.size||(a._node.__dom.observer=null))},oa=0,pa=!1,qa={canPatchNode:function(a){switch(a){case document.head:case document.documentElement:return!1;default:return!0}},hasPrototypeDescriptors:Boolean(Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent")),patch:function(a){oa++,pa&&window.console.warn("patch node",a),this.hasPrototypeDescriptors?k(a,this.mixinForObject(a)):(window.console.warn("Patching instance rather than prototype",a),g(a,this.mixinForObject(a)))},mixinForObject:function(a){switch(a.nodeType){case Node.ELEMENT_NODE:return ga.Element;case Node.DOCUMENT_FRAGMENT_NODE:return ga.Fragment;case Node.DOCUMENT_NODE:return ga.Document;case Node.TEXT_NODE:case Node.COMMENT_NODE:return ga.Node}},unpatch:function(a){a.__sourceProto&&(a.__proto__=a.__sourceProto)}};l.patchNode=ra,l.canUnpatchNode=sa,l.isNodePatched=ua;var va=Element.prototype.addEventListener,wa=Element.prototype.removeEventListener,xa={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Aa={__patched:"Event",get composed(){return this.isTrusted&&void 0===this.__composed&&(this.__composed=xa[this.type]),this.__composed||!1},composedPath:function(){return this.__composedPath||(this.__composedPath=ya(this.__target,this.composed)),this.__composedPath},get target(){return za(this.currentTarget,this.composedPath())},get relatedTarget(){return this.__relatedTarget?(this.__relatedTargetComposedPath||(this.__relatedTargetComposedPath=ya(this.__relatedTarget,!0)),za(this.currentTarget,this.__relatedTargetComposedPath)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.__propagationStopped=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.__immediatePropagationStopped=!0,this.__propagationStopped=!0}},Ca={focus:!0,blur:!0},Ia=Ba(Event),Ja=Ba(CustomEvent),Ka=Ba(MouseEvent);if(a.inUse){window.ShadyDOM={tree:x,getNativeProperty:z,patch:ra,isPatched:ua,getComposedInnerHTML:ka,getComposedChildNodes:la,unpatch:ta,canUnpatch:sa,isShadyRoot:b,enqueue:K,flush:L,inUse:a.inUse,filterMutations:ia,observeChildren:ma,unobserveChildren:na};var La=function(a){ra(a);var b=new C(a);return ra(b),b};Element.prototype.attachShadow=function(){return La(this)},Node.prototype.addEventListener=Fa,Node.prototype.removeEventListener=Ga,Event=Ia,CustomEvent=Ja,MouseEvent=Ka,Ha(),Object.defineProperty(Node.prototype,"isConnected",{get:function(){return document.documentElement.contains(this)},configurable:!0}),Node.prototype.getRootNode=function(a){return ha(this,a)},Object.defineProperty(Element.prototype,"slot",{get:function(){return this.getAttribute("slot")},set:function(b){this.setAttribute("slot",b)},configurable:!0}),Object.defineProperty(Node.prototype,"assignedSlot",{get:function(){return this._assignedSlot||null},configurable:!0});var Ma=Element.prototype.setAttribute;Element.prototype.setAttribute=_,Element.prototype.__nativeSetAttribute=Ma;var Na={get:function(){return this.getAttribute("class")},set:function(b){this.setAttribute("class",b)},configurable:!0},Oa=Object.getOwnPropertyDescriptor(Element.prototype,"className");if(Oa&&Oa.configurable)Object.defineProperty(Element.prototype,"className",Na);else{var Pa=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;Oa=Object.getOwnPropertyDescriptor(Pa.prototype,"className"),Oa&&Oa.configurable&&Object.defineProperty(Pa.prototype,"className",Na)}}}(),function(){"use strict";function a(a){return a=b(a),d(c(a),a)}function b(a){return a.replace(n.comments,"").replace(n.port,"")}function c(a){for(var b={start:0,end:a.length},c=b,d=0,e=a.length;d<e;d++)if(a[d]===l){c.rules||(c.rules=[]);var f=c,g=f.rules[f.rules.length-1];c={start:d+1,parent:f,previous:g},f.rules.push(c)}else a[d]===m&&(c.end=d+1,c=c.parent||b);return b}function d(a,b){var c=b.substring(a.start,a.end-1);if(a.parsedCssText=a.cssText=c.trim(),a.parent){var f=a.previous?a.previous.end:a.parent.start;c=b.substring(f,a.start-1),c=e(c),c=c.replace(n.multipleSpaces," "),c=c.substring(c.lastIndexOf(";")+1);var g=a.parsedSelector=a.selector=c.trim();a.atRule=0===g.indexOf(q),a.atRule?0===g.indexOf(p)?a.type=k.MEDIA_RULE:g.match(n.keyframesRule)&&(a.type=k.KEYFRAMES_RULE,a.keyframesName=a.selector.split(n.multipleSpaces).pop()):0===g.indexOf(o)?a.type=k.MIXIN_RULE:a.type=k.STYLE_RULE}var h=a.rules;if(h)for(var l,i=0,j=h.length;i<j&&(l=h[i]);i++)d(l,b);return a}function e(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(){for(var a=arguments[1],b=6-a.length;b--;)a="0"+a;return"\\"+a})}function f(a,b,c){c=c||"";var d="";if(a.cssText||a.rules){var e=a.rules;if(e&&!g(e))for(var k,i=0,j=e.length;i<j&&(k=e[i]);i++)d=f(k,b,d);else d=b?a.cssText:h(a.cssText),d=d.trim(),d&&(d=" "+d+"\n")}return d&&(a.selector&&(c+=a.selector+" "+l+"\n"),c+=d,a.selector&&(c+=m+"\n\n")),c}function g(a){return 0===a[0].selector.indexOf(o)}function h(a){return a=i(a),j(a)}function i(a){return a.replace(n.customProp,"").replace(n.mixinProp,"")}function j(a){return a.replace(n.mixinApply,"").replace(n.varApply,"")}function v(a){a&&(s=s&&!a.shimcssproperties,r=r&&!a.shimshadow)}function w(b,c){return"string"==typeof b&&(b=a(b)),c&&z(b,c),f(b,s)}function x(b){return!b.__cssRules&&b.textContent&&(b.__cssRules=a(b.textContent)),b.__cssRules}function y(a){return a.parent&&a.parent.type===k.KEYFRAMES_RULE}function z(a,b,c,d){if(a){var e=!1;if(d&&a.type===k.MEDIA_RULE){var f=a.selector.match(I.MEDIA_MATCH);f&&(window.matchMedia(f[1]).matches||(e=!0))}a.type===k.STYLE_RULE?b(a):c&&a.type===k.KEYFRAMES_RULE?c(a):a.type===k.MIXIN_RULE&&(e=!0);var g=a.rules;if(g&&!e)for(var j,h=0,i=g.length;h<i&&(j=g[h]);h++)z(j,b,c,d)}}function A(a,b,c,d){var e=C(a,b);return B(e,c,d)}function B(a,b,c){b=b||document.head;var d=c&&c.nextSibling||b.firstChild;return D=a,b.insertBefore(a,d)}function C(a,b){var c=document.createElement("style");return b&&c.setAttribute("scope",b),c.textContent=a,c}function E(a){var b=document.createComment(" Shady DOM styles for "+a+" "),c=D?D.nextSibling:null,d=document.head;return d.insertBefore(b,c||d.firstChild),D=b,b}function F(a,b){for(var c=0,d=b,e=a.length;d<e;d++)if("("===a[d])c++;else if(")"===a[d]&&0===--c)return d;return-1}function G(a,b){var c=a.indexOf("var(");if(c===-1)return b(a,"","","");var d=F(a,c+3),e=a.substring(c+4,d),f=a.substring(0,c),g=G(a.substring(d+1),b),h=e.indexOf(",");if(h===-1)return b(f,e.trim(),"",g);var i=e.substring(0,h).trim(),j=e.substring(h+1).trim();return b(f,i,j,g)}function H(a,b){a.__nativeSetAttribute?a.__nativeSetAttribute("class",b):a.setAttribute("class",b)}function ja(a,b){var c=parseInt(a/32),d=1<<a%32;b[c]=(b[c]||0)|d}function Da(){Aa||(Aa=!0,window.HTMLImports?window.HTMLImports.whenReady(Ea):"complete"===document.readyState?Ea():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&Ea()}))}function Ea(){requestAnimationFrame(function(){Aa&&(za.updateStyles(),Aa=!1)})}function Fa(){var a=window.Reflect&&Reflect.construct?Reflect.construct(HTMLElement,[],this.constructor||Fa):HTMLElement.call(this);return Ba.push(a),Da(),a}var k={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},l="{",m="}",n={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},o="--",p="@media",q="@",r=!(window.ShadyDOM&&window.ShadyDOM.inUse),s=!navigator.userAgent.match("AppleWebKit/601")&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)"),u=!1;window.ShadyCSS?v(window.ShadyCSS):window.WebComponents&&v(window.WebComponents.flags);var D=null,I={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>+~])"},J="style-scope",K={dom:function(b,c,d){b.__styleScoped?b.__styleScoped=null:this._transformDom(b,c||"",d)},_transformDom:function(b,c,d){b.nodeType===Node.ELEMENT_NODE&&this.element(b,c,d);var e="template"===b.localName?(b.content||b._content).childNodes:b.children||b.childNodes;if(e)for(var f=0;f<e.length;f++)this._transformDom(e[f],c,d)},element:function(b,c,d){if(c)if(b.classList)d?(b.classList.remove(J),b.classList.remove(c)):(b.classList.add(J),b.classList.add(c));else if(b.getAttribute){var e=b.getAttribute(Z);if(d){if(e){var f=e.replace(J,"").replace(c,"");H(b,f)}}else{var g=(e?e+" ":"")+J+" "+c;H(b,g)}}},elementStyles:function(b,c,d){var e=b.__cssBuild,f=r||"shady"===e?w(c,d):this.css(c,b.is,b.extends,d)+"\n\n";return f.trim()},css:function(b,c,d,e){var f=this._calcHostScope(c,d);c=this._calcElementScope(c);var g=this;return w(b,function(a){a.isScoped||(g.rule(a,c,f),a.isScoped=!0),e&&e(a,c,f)})},_calcElementScope:function(b){return b?X+b:""},_calcHostScope:function(b,c){return c?"[is="+b+"]":b},rule:function(b,c,d){this._transformRule(b,this._transformComplexSelector,c,d)},_transformRule:function(b,c,d,e){b.selector=b.transformedSelector=this._transformRuleCss(b,c,d,e)},_transformRuleCss:function(b,c,d,e){var f=b.selector.split(N);if(!y(b))for(var i,g=0,h=f.length;g<h&&(i=f[g]);g++)f[g]=c.call(this,i,d,e);return f.join(N)},_transformComplexSelector:function(b,c,d){var e=this,f=!1;return b=b.trim(),b=b.replace(L,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),b=b.replace(T,Q+" $1"),b=b.replace(O,function(a,b,g){if(!f){var h=e._transformCompoundSelector(g,b,c,d);f=f||h.stop,b=h.combinator,g=h.value}return b+g})},_transformCompoundSelector:function(b,c,d,e){var f=b.indexOf(S);b.indexOf(Q)>=0?b=this._transformHostSelector(b,e):0!==f&&(b=d?this._transformSimpleSelector(b,d):b);var g=!1;f>=0&&(c="",g=!0);var h=void 0;return g&&(h=!0,g&&(b=b.replace(V,function(a,b){return" > "+b}))),b=b.replace(W,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'}),{value:b,combinator:c,stop:h}},_transformSimpleSelector:function(b,c){var d=b.split(Y);return d[0]+=c,d.join(Y)},_transformHostSelector:function(b,c){var d=b.match(U),e=d&&d[2].trim()||"";if(e){if(e[0].match(P))return b.replace(U,function(a,b,d){return c+d});var f=e.split(P)[0];return f===c?e:$}return b.replace(Q,c)},documentRule:function(b){b.selector=b.parsedSelector,this.normalizeRootSelector(b),this._transformRule(b,this._transformDocumentSelector)},normalizeRootSelector:function(b){b.selector===R&&(b.selector="html")},_transformDocumentSelector:function(b){return b.match(S)?this._transformComplexSelector(b,M):this._transformSimpleSelector(b.trim(),M)},SCOPE_NAME:J},L=/:(nth[-\w]+)\(([^)]+)\)/,M=":not(."+J+")",N=",",O=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,P=/[[.:#*]/,Q=":host",R=":root",S="::slotted",T=new RegExp("^("+S+")"),U=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,V=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,W=/(.*):dir\((?:(ltr|rtl))\)/,X=".",Y=":",Z="class",$="should_not_match",aa=(function(){function a(a){this.value=a}function b(b){function e(a,b){return new Promise(function(e,g){var h={key:a,arg:b,resolve:e,reject:g,next:null};d?d=d.next=h:(c=d=h,f(a,b))})}function f(c,d){try{var e=b[c](d),h=e.value;h instanceof a?Promise.resolve(h.value).then(function(a){f("next",a)},function(a){f("throw",a)}):g(e.done?"return":"normal",e.value)}catch(a){g("throw",a)}}function g(a,b){switch(a){case"return":c.resolve({value:b,done:!0});break;case"throw":c.reject(b);break;default:c.resolve({value:b,done:!1})}c=c.next,c?f(c.key,c.arg):d=null}var c,d;this._invoke=e,"function"!=typeof b.return&&(this.return=void 0)}return"function"==typeof Symbol&&Symbol.asyncIterator&&(b.prototype[Symbol.asyncIterator]=function(){return this}),b.prototype.next=function(a){return this._invoke("next",a)},b.prototype.throw=function(a){return this._invoke("throw",a)},b.prototype.return=function(a){return this._invoke("return",a)},{wrap:function(a){return function(){return new b(a.apply(this,arguments))}},await:function(b){return new a(b)}}}(),function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}),ba=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),ea=function(){function a(b,c,d,e,f,g){aa(this,a),this.styleRules=b||null,this.placeholder=c||null,this.ownStylePropertyNames=d||[],this.overrideStyleProperties=null,this.elementName=e||"",this.cssBuild=g||"",this.typeExtension=f||"",this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}return ba(a,null,[{key:"get",value:function(b){return b.__styleInfo}},{key:"set",value:function(b,c){return b.__styleInfo=c,c}}]),a}(),fa=window.Element.prototype,ga=fa.matches||fa.matchesSelector||fa.mozMatchesSelector||fa.msMatchesSelector||fa.oMatchesSelector||fa.webkitMatchesSelector,ha=navigator.userAgent.match("Trident"),ia={decorateStyles:function(b){var c=this,d={},e=[],f=0;z(b,function(a){c.decorateRule(a),a.index=f++,c.collectPropertiesInCssText(a.propertyInfo.cssText,d)},function(b){e.push(b)}),b._keyframes=e;var g=[];for(var h in d)g.push(h);return g},decorateRule:function(b){if(b.propertyInfo)return b.propertyInfo;var c={},d={},e=this.collectProperties(b,d);return e&&(c.properties=d,b.rules=null),c.cssText=this.collectCssText(b),b.propertyInfo=c,c},collectProperties:function(b,c){var d=b.propertyInfo;if(!d){for(var e=void 0,f=this.rx.VAR_ASSIGN,g=b.parsedCssText,h=void 0,i=void 0;e=f.exec(g);)h=(e[2]||e[3]).trim(),"inherit"===h&&"unset"===h||(c[e[1].trim()]=h),i=!0;return i}if(d.properties)return Object.assign(c,d.properties),!0},collectCssText:function(b){return this.collectConsumingCssText(b.parsedCssText)},collectConsumingCssText:function(b){return b.replace(this.rx.BRACKETED,"").replace(this.rx.VAR_ASSIGN,"")},collectPropertiesInCssText:function(b,c){for(var d=void 0;d=this.rx.VAR_CONSUMED.exec(b);){var e=d[1];":"!==d[2]&&(c[e]=!0)}},reify:function(b){for(var e,c=Object.getOwnPropertyNames(b),d=0;d<c.length;d++)e=c[d],b[e]=this.valueForProperty(b[e],b)},valueForProperty:function(b,c){var d=this;return b&&(b.indexOf(";")>=0?b=this.valueForProperties(b,c):!function(){var a=d,e=function(d,e,f,g){if(!e)return d+g;var h=a.valueForProperty(c[e],c);return h&&"initial"!==h?"apply-shim-inherit"===h&&(h="inherit"):h=a.valueForProperty(c[f]||f,c)||f,d+(h||"")+g};b=G(b,e)}()),b&&b.trim()||""},valueForProperties:function(b,c){for(var f,g,d=b.split(";"),e=0;e<d.length;e++)if(f=d[e]){if(this.rx.MIXIN_MATCH.lastIndex=0,g=this.rx.MIXIN_MATCH.exec(f))f=this.valueForProperty(c[g[1]],c);else{var h=f.indexOf(":");if(h!==-1){var i=f.substring(h);i=i.trim(),i=this.valueForProperty(i,c)||i,f=f.substring(0,h)+i}}d[e]=f&&f.lastIndexOf(";")===f.length-1?f.slice(0,-1):f||""}return d.join(";")},applyProperties:function(b,c){var d="";b.propertyInfo||this.decorateRule(b),b.propertyInfo.cssText&&(d=this.valueForProperties(b.propertyInfo.cssText,c)),b.cssText=d},applyKeyframeTransforms:function(b,c){var d=b.cssText,e=b.cssText;if(null==b.hasAnimations&&(b.hasAnimations=this.rx.ANIMATION_MATCH.test(d)),b.hasAnimations){var f=void 0;if(null==b.keyframeNamesToTransform){b.keyframeNamesToTransform=[];for(var g in c)f=c[g],e=f(d),d!==e&&(d=e,b.keyframeNamesToTransform.push(g))}else{for(var h=0;h<b.keyframeNamesToTransform.length;++h)f=c[b.keyframeNamesToTransform[h]],d=f(d);e=d}}b.cssText=e},propertyDataFromStyles:function(b,c){var d={},e=this,f=[];return z(b,function(a){a.propertyInfo||e.decorateRule(a);var b=a.transformedSelector||a.parsedSelector;c&&a.propertyInfo.properties&&b&&ga.call(c,b)&&(e.collectProperties(a,d),ja(a.index,f))},null,!0),{properties:d,key:f}},whenHostOrRootRule:function(b,c,d,e){if(c.propertyInfo||this.decorateRule(c),c.propertyInfo.properties){var f=b.is?K._calcHostScope(b.is,b.extends):"html",g=c.parsedSelector,h=":host > *"===g||"html"===g,i=0===g.indexOf(":host")&&!h;if("shady"===d&&(h=g===f+" > *."+f||g.indexOf("html")!==-1,i=!h&&0===g.indexOf(f)),"shadow"===d&&(h=":host > *"===g||"html"===g,i=i&&!h),h||i){var j=f;i&&(r&&!c.transformedSelector&&(c.transformedSelector=K._transformRuleCss(c,K._transformComplexSelector,K._calcElementScope(b.is),f)),j=c.transformedSelector||f),e({selector:j,isHost:i,isRoot:h})}}},hostAndRootPropertiesForScope:function(b,c){var d={},e={},f=this,g=c&&c.__cssBuild;return z(c,function(a){f.whenHostOrRootRule(b,a,g,function(c){var g=b._element||b;ga.call(g,c.selector)&&(c.isHost?f.collectProperties(a,d):f.collectProperties(a,e))})},null,!0),{rootProps:e,hostProps:d}},transformStyles:function(b,c,d){var e=this,f=K._calcHostScope(b.is,b.extends),g=b.extends?"\\"+f.slice(0,-1)+"\\]":f,h=new RegExp(this.rx.HOST_PREFIX+g+this.rx.HOST_SUFFIX),i=ea.get(b).styleRules,j=this._elementKeyframeTransforms(b,i,d);return K.elementStyles(b,i,function(a){e.applyProperties(a,c),r||y(a)||!a.cssText||(e.applyKeyframeTransforms(a,j),e._scopeSelector(a,h,f,d))})},_elementKeyframeTransforms:function(b,c,d){var e=c._keyframes,f={};if(!r&&e)for(var g=0,h=e[g];g<e.length;h=e[++g])this._scopeKeyframes(h,d),f[h.keyframesName]=this._keyframesRuleTransformer(h);return f},_keyframesRuleTransformer:function(b){return function(a){return a.replace(b.keyframesNameRx,b.transformedKeyframesName)}},_scopeKeyframes:function(b,c){b.keyframesNameRx=new RegExp(b.keyframesName,"g"),b.transformedKeyframesName=b.keyframesName+"-"+c,b.transformedSelector=b.transformedSelector||b.selector,b.selector=b.transformedSelector.replace(b.keyframesName,b.transformedKeyframesName)},_scopeSelector:function(b,c,d,e){b.transformedSelector=b.transformedSelector||b.selector;for(var k,f=b.transformedSelector,g="."+e,h=f.split(","),i=0,j=h.length;i<j&&(k=h[i]);i++)h[i]=k.match(c)?k.replace(d,g):g+" "+k;b.selector=h.join(",")},applyElementScopeSelector:function(b,c,d){var e=b.getAttribute("class")||"",f=e;d&&(f=e.replace(new RegExp("\\s*"+this.XSCOPE_NAME+"\\s*"+d+"\\s*","g")," ")),f+=(f?" ":"")+this.XSCOPE_NAME+" "+c,e!==f&&(b.__nativeSetAttribute?b.__nativeSetAttribute("class",f):b.setAttribute("class",f))},applyElementStyle:function(b,c,d,e){var f=e?e.textContent||"":this.transformStyles(b,c,d),g=ea.get(b),h=g.customStyle;return h&&!r&&h!==e&&(h._useCount--,h._useCount<=0&&h.parentNode&&h.parentNode.removeChild(h)),r?g.customStyle?(g.customStyle.textContent=f,e=g.customStyle):f&&(e=A(f,d,b.shadowRoot,g.placeholder)):e?e.parentNode||B(e,null,g.placeholder):f&&(e=A(f,d,null,g.placeholder)),e&&(e._useCount=e._useCount||0,g.customStyle!=e&&e._useCount++,g.customStyle=e),ha&&(e.textContent=e.textContent),e},applyCustomStyle:function(b,c){var d=x(b),e=this;b.textContent=w(d,function(a){var b=a.cssText=a.parsedCssText;a.propertyInfo&&a.propertyInfo.cssText&&(b=i(b),a.cssText=e.valueForProperties(b,c))})},rx:I,XSCOPE_NAME:"x-scope"},ka={},la={},ma=window.customElements;ma&&!r&&!function(){var a=ma.define;ma.define=function(b,c,d){return la[b]=E(b),a.call(ma,b,c,d)}}();var na=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;aa(this,a),this.cache={},this.typeMax=b}return ba(a,[{key:"_validate",value:function(b,c,d){for(var e=0;e<d.length;e++){var f=d[e];if(b.properties[f]!==c[f])return!1}return!0}},{key:"store",value:function(b,c,d,e){var f=this.cache[b]||[];f.push({properties:c,styleElement:d,scopeSelector:e}),f.length>this.typeMax&&f.shift(),this.cache[b]=f}},{key:"fetch",value:function(b,c,d){var e=this.cache[b];if(e)for(var f=e.length-1;f>=0;f--){var g=e[f];if(this._validate(g,c,d))return g}}}]),a}(),oa=I.MIXIN_MATCH,pa=I.VAR_ASSIGN,qa=/;\s*/m,ra=/^\s*(initial)|(inherit)\s*$/,sa="_-_",ta=function(){function a(){aa(this,a),this._map={}}return ba(a,[{key:"set",value:function(b,c){b=b.trim(),this._map[b]={properties:c,dependants:{}}}},{key:"get",value:function(b){return b=b.trim(),this._map[b]}}]),a}(),ua=function(){function a(){var b=this;aa(this,a),this._currentTemplate=null,this._measureElement=null,this._map=new ta,this._separator=sa,this._boundProduceCssProperties=function(a,c,d,e){return b._produceCssProperties(a,c,d,e)}}return ba(a,[{key:"transformStyle",value:function(b,c){var d=x(b);return this.transformRules(d,c),d}},{key:"transformRules",value:function(b,c){var d=this;this._currentTemplate=ka[c],z(b,function(a){d.transformRule(a)}),this._currentTemplate&&(this._currentTemplate.__applyShimInvalid=!1),this._currentTemplate=null}},{key:"transformRule",value:function(b){b.cssText=this.transformCssText(b.parsedCssText),":root"===b.selector&&(b.selector=":host > *")}},{key:"transformCssText",value:function(b){return b=b.replace(pa,this._boundProduceCssProperties),this._consumeCssProperties(b)}},{key:"_getInitialValueForProperty",value:function(b){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(b)}},{key:"_consumeCssProperties",value:function(b){for(var c=void 0;c=oa.exec(b);){var d=c[0],e=c[1],f=c.index,g=f+d.indexOf("@apply"),h=f+d.length,i=b.slice(0,g),j=b.slice(h),k=this._cssTextToMap(i),l=this._atApplyToCssProperties(e,k);b=[i,l,j].join(""),oa.lastIndex=f+l.length}return b}},{key:"_atApplyToCssProperties",value:function(b,c){b=b.replace(qa,"");var d=[],e=this._map.get(b);if(e||(this._map.set(b,{}),e=this._map.get(b)),e){this._currentTemplate&&(e.dependants[this._currentTemplate.name]=this._currentTemplate);var f=void 0,g=void 0,h=void 0;for(f in e.properties)h=c&&c[f],g=[f,": var(",b,sa,f],h&&g.push(",",h),g.push(")"),d.push(g.join(""))}return d.join("; ")}},{key:"_replaceInitialOrInherit",value:function(c,d){var e=ra.exec(d);return e&&(d=e[1]?a._getInitialValueForProperty(c):"apply-shim-inherit"),d}},{key:"_cssTextToMap",value:function(b){for(var h,i,c=b.split(";"),d=void 0,e=void 0,f={},g=0;g<c.length;g++)h=c[g],h&&(i=h.split(":"),i.length>1&&(d=i[0].trim(),e=this._replaceInitialOrInherit(d,i.slice(1).join(":")),f[d]=e));return f}},{key:"_invalidateMixinEntry",value:function(b){for(var c in b.dependants)c!==this._currentTemplate&&(b.dependants[c].__applyShimInvalid=!0)}},{key:"_produceCssProperties",value:function(b,c,d,e){var f=this;if(d&&G(d,function(a,b){b&&f._map.get(b)&&(e="@apply "+b+";")}),!e)return b;var g=this._consumeCssProperties(e),h=b.slice(0,b.indexOf("--")),i=this._cssTextToMap(g),j=i,k=this._map.get(c),l=k&&k.properties;l?j=Object.assign(Object.create(l),i):this._map.set(c,j);var m=[],n=void 0,o=void 0,p=!1;for(n in j)o=i[n],void 0===o&&(o="initial"),!l||n in l||(p=!0),m.push(c+sa+n+": "+o);return p&&this._invalidateMixinEntry(k),k&&(k.properties=j),d&&(h=b+";"+h),h+m.join("; ")+";"}}]),a}(),va=new ua;window.ApplyShim=va;var wa=function(){};r||!function(){var a=function(b){return b.classList&&!b.classList.contains(K.SCOPE_NAME)||b instanceof SVGElement&&(!b.hasAttribute("class")||b.getAttribute("class").indexOf(K.SCOPE_NAME)<0)},b=function(c){for(var d=0;d<c.length;d++){var e=c[d];if(e.target!==document.documentElement&&e.target!==document.head){for(var f=0;f<e.addedNodes.length;f++){var g=e.addedNodes[f];if(a(g)){var h=g.getRootNode();if(h.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var i=h.host;if(i){var j=i.is||i.localName;K.dom(g,j)}}}}for(var k=0;k<e.removedNodes.length;k++){var l=e.removedNodes[k];if(l.nodeType===Node.ELEMENT_NODE){var m=void 0;if(l.classList?m=Array.from(l.classList):l.hasAttribute("class")&&(m=l.getAttribute("class").split(/\s+/)),void 0!==m){var n=m.indexOf(K.SCOPE_NAME);if(n>=0){var o=m[n+1];o&&K.dom(l,o,!0)}}}}}}},c=new MutationObserver(b),d=function(b){c.observe(b,{childList:!0,subtree:!0})},e=window.customElements&&!window.customElements.flush;e?d(document):!function(){var a=function(){d(document.body)};window.HTMLImports?window.HTMLImports.whenReady(a):requestAnimationFrame(function(){"loading"===document.readyState?!function(){var b=function b(){a(),document.removeEventListener("readystatechange",b)};document.addEventListener("readystatechange",b)}():a()})}(),wa=function(){b(c.takeRecords())}}();var xa=new na,ya={flush:wa,scopeCounter:{},nativeShadow:r,nativeCss:s,nativeCssApply:u,_documentOwner:document.documentElement,_documentOwnerStyleInfo:ea.set(document.documentElement,new ea({rules:[]})),_generateScopeSelector:function(b){var c=this.scopeCounter[b]=(this.scopeCounter[b]||0)+1;return b+"-"+c},getStyleAst:function(b){return x(b)},styleAstToString:function(b){return w(b)},_gatherStyles:function(b){for(var c=b.content.querySelectorAll("style"),d=[],e=0;e<c.length;e++){var f=c[e];d.push(f.textContent),f.parentNode.removeChild(f)}return d.join("").trim()},_getCssBuild:function(b){var c=b.content.querySelector("style");return c?c.getAttribute("css-build")||"":""},prepareTemplate:function(c,d,e){if(!c._prepared){c._prepared=!0,c.name=d,c.extends=e,ka[d]=c;var f=this._getCssBuild(c),g=this._gatherStyles(c),h={is:d,extends:e,__cssBuild:f};this.nativeShadow||K.dom(c.content,d);var i=a(g);this.nativeCss&&!this.nativeCssApply&&va.transformRules(i,d),c._styleAst=i;var j=[];if(this.nativeCss||(j=ia.decorateStyles(c._styleAst,h)),!j.length||this.nativeCss){var k=this.nativeShadow?c.content:null,l=la[d],m=this._generateStaticStyle(h,c._styleAst,k,l);c._style=m}c._ownPropertyNames=j}},_generateStaticStyle:function(b,c,d,e){var f=K.elementStyles(b,c);if(f.length)return A(f,b.is,d,e)},_prepareHost:function(b){var c=b.getAttribute("is")||b.localName,d=void 0;c!==b.localName&&(d=b.localName);var e=la[c],f=ka[c],g=void 0,h=void 0,i=void 0;return f&&(g=f._styleAst,h=f._ownPropertyNames,i=f._cssBuild),ea.set(b,new ea(g,e,h,c,d,i))},applyStyle:function(b,c){var d=b.getAttribute("is")||b.localName;if(window.CustomStyle){var e=window.CustomStyle;e._documentDirty&&(e.findStyles(),this.nativeCss?this.nativeCssApply||e._revalidateApplyShim():this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),e.applyStyles(),e._documentDirty=!1)}var f=ea.get(b),g=Boolean(f);if(f||(f=this._prepareHost(b)),c&&(f.overrideStyleProperties=f.overrideStyleProperties||{},Object.assign(f.overrideStyleProperties,c)),this.nativeCss){var h=ka[d];if(h&&h.__applyShimInvalid&&h._style){if(va.transformRules(h._styleAst,d),h._style.textContent=K.elementStyles(b,f.styleRules),this.nativeShadow){var i=b.shadowRoot.querySelector("style");i.textContent=K.elementStyles(b,f.styleRules)}f.styleRules=h._styleAst}this._updateNativeProperties(b,f.overrideStyleProperties)}else this._updateProperties(b,f),f.ownStylePropertyNames&&f.ownStylePropertyNames.length&&this._applyStyleProperties(b,f);if(g){var j=this._isRootOwner(b)?b:b.shadowRoot;j&&this._applyToDescendants(j)}},_applyToDescendants:function(b){for(var e,c=b.children,d=0;d<c.length;d++)e=c[d],e.shadowRoot&&this.applyStyle(e),this._applyToDescendants(e)},_styleOwnerForNode:function(b){var c=b.getRootNode(),d=c.host;return d?ea.get(d)?d:this._styleOwnerForNode(d):this._documentOwner},_isRootOwner:function(b){return b===this._documentOwner},_applyStyleProperties:function(b,c){var d=b.getAttribute("is")||b.localName,e=xa.fetch(d,c.styleProperties,c.ownStylePropertyNames),f=e&&e.scopeSelector,g=e?e.styleElement:null,h=c.scopeSelector;c.scopeSelector=f||this._generateScopeSelector(d);var i=ia.applyElementStyle(b,c.styleProperties,c.scopeSelector,g);return this.nativeShadow||ia.applyElementScopeSelector(b,c.scopeSelector,h),e||xa.store(d,c.styleProperties,i,c.scopeSelector),i},_updateProperties:function(b,c){var d=this._styleOwnerForNode(b),e=ea.get(d),f=e.styleProperties,g=Object.create(f||null),h=ia.hostAndRootPropertiesForScope(b,c.styleRules),i=ia.propertyDataFromStyles(e.styleRules,b),j=i.properties;Object.assign(g,h.hostProps,j,h.rootProps),this._mixinOverrideStyles(g,c.overrideStyleProperties),ia.reify(g),c.styleProperties=g},_mixinOverrideStyles:function(b,c){for(var d in c){var e=c[d];(e||0===e)&&(b[d]=e)}},_updateNativeProperties:function(b,c){for(var d in c)null===d?b.style.removeProperty(d):b.style.setProperty(d,c[d])},updateStyles:function(b){window.CustomStyle&&(window.CustomStyle._documentDirty=!0),this.applyStyle(this._documentOwner,b)},_transformCustomStyleForDocument:function(b){var c=this,d=x(b);z(d,function(a){r?K.normalizeRootSelector(a):K.documentRule(a),c.nativeCss&&!c.nativeCssApply&&va.transformRule(a)}),this.nativeCss?b.textContent=w(d):this._documentOwnerStyleInfo.styleRules.rules.push(d)},_revalidateApplyShim:function(b){if(this.nativeCss&&!this.nativeCssApply){var c=x(b);va.transformRules(c),b.textContent=w(c)}},_applyCustomStyleToDocument:function(b){this.nativeCss||ia.applyCustomStyle(b,this._documentOwnerStyleInfo.styleProperties)},getComputedStyleValue:function(b,c){var d=void 0;if(!this.nativeCss){var e=ea.get(b)||ea.get(this._styleOwnerForNode(b));d=e.styleProperties[c]}return d=d||window.getComputedStyle(b).getPropertyValue(c),d.trim()},setElementClass:function(b,c){var d=b.getRootNode(),e=c?c.split(/\s/):[],f=d.host&&d.host.localName;if(!f){var g=b.getAttribute("class");if(g)for(var h=g.split(/\s/),i=0;i<h.length;i++)if(h[i]===K.SCOPE_NAME){f=h[i+1];break}}if(f&&e.push(K.SCOPE_NAME,f),!this.nativeCss){var j=ea.get(b);j&&j.scopeSelector&&e.push(ia.XSCOPE_NAME,j.scopeSelector)}H(b,e.join(" "))},_styleInfoForNode:function(b){return ea.get(b)}};window.ShadyCSS=ya;var za=window.ShadyCSS,Aa=!1,Ba=[],Ca=null;Object.defineProperties(Fa,{processHook:{get:function(){return Ca},set:function(b){return Ca=b,b}},_customStyles:{get:function(){return Ba}},_documentDirty:{get:function(){return Aa},set:function(b){return Aa=b,b}}}),Fa.findStyles=function(){for(var a=0;a<Ba.length;a++)Ba[a]._findStyle()},Fa._revalidateApplyShim=function(){for(var a=0;a<Ba.length;a++){var b=Ba[a];b._style&&za._revalidateApplyShim(b._style)}},Fa.applyStyles=function(){for(var a=0;a<Ba.length;a++)Ba[a]._applyStyle()},Fa.prototype=Object.create(HTMLElement.prototype,{constructor:{value:Fa,configurable:!0,writable:!0}}),Fa.prototype._findStyle=function(){if(!this._style){var a=this.querySelector("style");if(!a)return;if(a.__appliedElement)for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];
a.__appliedElement.setAttribute(c.name,c.value)}this._style=a.__appliedElement||a,Ca&&Ca(this._style),za._transformCustomStyleForDocument(this._style)}},Fa.prototype._applyStyle=function(){this._style&&za._applyCustomStyleToDocument(this._style)},window.customElements.define("custom-style",Fa),window.CustomStyle=Fa}(),function(a){"use strict";window.CustomElements={takeRecords:function(){customElements.flush&&customElements.flush()}},HTMLImports.whenReady(function(){requestAnimationFrame(function(){window.dispatchEvent(new CustomEvent("WebComponentsReady"))})})}(window.WebComponents),function(a){"use strict";if(Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();return d.push.apply(d,arguments),b.apply(a,d)}}),Array.from||(Array.from=function(a){return[].slice.call(a)}),!Object.assign){var b=function(a,b){for(var e,c=Object.getOwnPropertyNames(b),d=0;d<c.length;d++)e=c[d],a[e]=b[e]};Object.assign=function(a,c){for(var f,d=[].slice.call(arguments,1),e=0;e<d.length;e++)f=d[e],f&&b(a,f);return a}}}(window.WebComponents),function(a){"use strict";if(!window.performance||!window.performance.now){var b=Date.now();window.performance={now:function(){return Date.now()-b}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var a=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return a?function(b){return a(function(){b(performance.now())})}:function(a){return window.setTimeout(a,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(a){clearTimeout(a)}}());var c=function(){var a=document.createEvent("Event");return a.initEvent("foo",!0,!0),a.preventDefault(),a.defaultPrevented}();if(!c){var d=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(d.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(a,b){b=b||{};var c=document.createEvent("CustomEvent");return c.initCustomEvent(a,Boolean(b.bubbles),Boolean(b.cancelable),b.detail),c},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var f=window.Event;if(window.Event=function(a,b){b=b||{};var c=document.createEvent("Event");return c.initEvent(a,Boolean(b.bubbles),Boolean(b.cancelable)),c},f)for(var g in f)window.Event[g]=f[g];window.Event.prototype=f.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){var h=window.MouseEvent;if(window.MouseEvent=function(a,b){b=b||{};var c=document.createEvent("MouseEvent");return c.initMouseEvent(a,Boolean(b.bubbles),Boolean(b.cancelable),b.view||window,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget),c},h)for(var g in h)window.MouseEvent[g]=h[g];window.MouseEvent.prototype=h.prototype}}(window.WebComponents),function(a){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 c=document.querySelector("head");c.insertBefore(b,c.firstChild)}(window.WebComponents);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment