>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow\//g,/\/shadow-deep\//g,/\^\^/g,/\^(?!=)/g]);function b(e){var t=document.createElement("style");return t.textContent=e,t}var E=document.createElement("iframe");E.style.display="none";var _=navigator.userAgent.match("Chrome");function S(e){e&&N().appendChild(document.createTextNode(e))}var T,M="shim-shadowdom-css",L="no-shim";function N(){return T||((T=document.createElement("style")).setAttribute(M,""),T[M]=!0),T}if(window.ShadowDOMPolyfill){S("style { display: none !important; }\n");var C=ShadowDOMPolyfill.wrap(document).querySelector("head");C.insertBefore(N(),C.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){e.urlResolver;if(window.HTMLImports&&!HTMLImports.useNative){var n="link[rel=stylesheet][shim-shadowdom]",r="style[shim-shadowdom]";HTMLImports.importer.documentPreloadSelectors+=","+n,HTMLImports.importer.importsPreloadSelectors+=","+n,HTMLImports.parser.documentSelectors=[HTMLImports.parser.documentSelectors,n,r].join(",");var o=HTMLImports.parser.parseGeneric;HTMLImports.parser.parseGeneric=function(e){if(!e[M]){var n=e.__importElement||e;n.hasAttribute("shim-shadowdom")?(e.__resource&&((n=e.ownerDocument.createElement("style")).textContent=e.__resource),HTMLImports.path.resolveUrlsInStyle(n,e.href),n.textContent=t.shimStyle(n),n.removeAttribute("shim-shadowdom",""),n.setAttribute(M,""),n[M]=!0,n.parentNode!==C&&(e.parentNode===C?C.replaceChild(n,e):this.addElementToDocument(n)),n.__importParsed=!0,this.markParsingComplete(e),this.parseNext()):o.call(this,e)}};var i=HTMLImports.parser.hasResource;HTMLImports.parser.hasResource=function(e){return"link"===e.localName&&"stylesheet"===e.rel&&e.hasAttribute("shim-shadowdom")?e.__resource:i.call(this,e)}}})}e.ShadowCSS=t}(window.WebComponents)),window.WebComponents,window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e},function(e){"use strict";var t=!1;if(!e.forceJURL)try{var n=new URL("b","http://a");n.pathname="c%20d",t="http://a/c%20d"===n.href}catch(e){}if(!t){var r=Object.create(null);r.ftp=21,r.file=0,r.gopher=70,r.http=80,r.https=443,r.ws=80,r.wss=443;var o=Object.create(null);o["%2e"]=".",o[".%2e"]="..",o["%2e."]="..",o["%2e%2e"]="..";var i=void 0,a=/[a-zA-Z]/,s=/[a-zA-Z0-9\+\-\.]/;w.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return""==this._username&&null==this._password||(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){m.call(this),f.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||f.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&f.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&f.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&f.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],f.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"==e[0]&&(e=e.slice(1)),f.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"==e[0]&&(e=e.slice(1)),f.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return(e=this.host)?this._scheme+"://"+e:""}};var l=e.URL;l&&(w.createObjectURL=function(e){return l.createObjectURL.apply(l,arguments)},w.revokeObjectURL=function(e){l.revokeObjectURL(e)}),e.URL=w}function c(e){return void 0!==r[e]}function u(){m.call(this),this._isInvalid=!0}function d(e){return""==e&&u.call(this),e.toLowerCase()}function p(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function h(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function f(e,t,n){function l(e){y.push(e)}var f=t||"scheme start",m=0,w="",v=!1,g=!1,y=[];e:for(;(e[m-1]!=i||0==m)&&!this._isInvalid;){var b=e[m];switch(f){case"scheme start":if(!b||!a.test(b)){if(t){l("Invalid scheme.");break e}w="",f="no scheme";continue}w+=b.toLowerCase(),f="scheme";break;case"scheme":if(b&&s.test(b))w+=b.toLowerCase();else{if(":"!=b){if(t){if(i==b)break e;l("Code point not allowed in scheme: "+b);break e}w="",m=0,f="no scheme";continue}if(this._scheme=w,w="",t)break e;c(this._scheme)&&(this._isRelative=!0),f="file"==this._scheme?"relative":this._isRelative&&n&&n._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==b?(this._query="?",f="query"):"#"==b?(this._fragment="#",f="fragment"):i!=b&&"\t"!=b&&"\n"!=b&&"\r"!=b&&(this._schemeData+=p(b));break;case"no scheme":if(n&&c(n._scheme)){f="relative";continue}l("Missing scheme."),u.call(this);break;case"relative or authority":if("/"!=b||"/"!=e[m+1]){l("Expected /, got: "+b),f="relative";continue}f="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=n._scheme),i==b){this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._username=n._username,this._password=n._password;break e}if("/"==b||"\\"==b)"\\"==b&&l("\\ is an invalid code point."),f="relative slash";else if("?"==b)this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query="?",this._username=n._username,this._password=n._password,f="query";else{if("#"!=b){var E=e[m+1],_=e[m+2];("file"!=this._scheme||!a.test(b)||":"!=E&&"|"!=E||i!=_&&"/"!=_&&"\\"!=_&&"?"!=_&&"#"!=_)&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password,this._path=n._path.slice(),this._path.pop()),f="relative path";continue}this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._fragment="#",this._username=n._username,this._password=n._password,f="fragment"}break;case"relative slash":if("/"!=b&&"\\"!=b){"file"!=this._scheme&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password),f="relative path";continue}"\\"==b&&l("\\ is an invalid code point."),f="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=b){l("Expected '/', got: "+b),f="authority ignore slashes";continue}f="authority second slash";break;case"authority second slash":if(f="authority ignore slashes","/"!=b){l("Expected '/', got: "+b);continue}break;case"authority ignore slashes":if("/"!=b&&"\\"!=b){f="authority";continue}l("Expected authority, got: "+b);break;case"authority":if("@"==b){v&&(l("@ already seen."),w+="%40"),v=!0;for(var S=0;S0){var i=w(r[o-1],e);if(i)return void(r[o-1]=i)}else n=this.observer,l.push(n),s||(s=!0,t(u));r[o]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=n.get(e);t||n.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=n.get(e),r=0;r=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=null;try{var a=i.getResponseHeader("Location");a&&(n="/"===a.substr(0,1)?location.origin+a:a)}catch(e){console.error(e.message)}r.call(o,!t.ok(i)&&i,i.response||i.responseText,n)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;n-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,l=a.length;s=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(e.import=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e.import&&(e.import.__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)(t=e.__pending.shift())&&t({target:e});this.parseNext()},parseLink:function(e){l(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var n,r,o=e;(r=(n=e).ownerDocument.createElement("style")).textContent=n.textContent,t.resolveUrlsInStyle(r),e=r,o.__appliedElement=e,e.__importElement=o,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(o){e.removeEventListener("load",r),e.removeEventListener("error",r),t&&t(o),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),o&&"style"===e.localName){var i=!1;if(-1==e.textContent.indexOf("@import"))i=!0;else if(e.sheet){i=!0;for(var a,s=e.sheet.cssRules,l=s?s.length:0,c=0;c=0},hasResource:function(e){return!l(e)||void 0!==e.__doc}};function l(e){return"link"===e.localName&&e.rel===i}e.parser=s,e.IMPORT_SELECTOR=a}),window.HTMLImports.addModule(function(e){var t=e.flags,n=e.IMPORT_LINK_TYPE,r=e.IMPORT_SELECTOR,o=e.rootDocument,i=e.Loader,a=e.Observer,s=e.parser,l={documents:{},documentPreloadSelectors:r,importsPreloadSelectors:[r].join(","),loadNode:function(e){c.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);c.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){return(e.ownerDocument||e)===o?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,r,o,i,a){if(t.load&&console.log("loaded",e,r),r.__resource=o,r.__error=i,function(e){return function(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}(e,n)}(r)){var l=this.documents[e];void 0===l&&((l=i?null:function(e,t){var r=document.implementation.createHTMLDocument(n);r._URL=t;var o=r.createElement("base");o.setAttribute("href",t),r.baseURI||function(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}(r)||Object.defineProperty(r,"baseURI",{value:t});var i=r.createElement("meta");i.setAttribute("charset","utf-8"),r.head.appendChild(i),r.head.appendChild(o),r.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(r);return r}(o,a||e))&&(l.__importLink=r,this.bootDocument(l)),this.documents[e]=l),r.__doc=l}s.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),s.parseNext()},loadedAll:function(){s.parseNext()}},c=new i(l.loaded.bind(l),l.loadedAll.bind(l));if(l.observer=new a,!document.baseURI){var u={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",u),Object.defineProperty(o,"baseURI",u)}e.importer=l,e.importLoader=c}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,l=e.length;s=0)){o.push(n);for(var i,a=n.querySelectorAll("link[rel="+t+"]"),s=0,l=a.length;s=0&&o(n,HTMLElement),n)}var p,h=document.createElement.bind(document),f=document.createElementNS.bind(document);function m(e,t){var r=e[t];e[t]=function(){var e=r.apply(this,arguments);return n(e),e}}p=Object.__proto__||i?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},m(Node.prototype,"cloneNode"),m(document,"importNode"),document.registerElement=function(n,o){var i=o||{};if(!n)throw new Error("document.registerElement: first argument `name` must not be empty");if(n.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(n)+"'.");if(function(e){for(var t=0;t