/** @license @nocompile Copyright (c) 2018 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ (function(){/* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ 'use strict';(function(b){function a(a,b){if("function"===typeof window.CustomEvent)return new CustomEvent(a,b);var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c}function c(a){if(J)return a.ownerDocument!==document?a.ownerDocument:null;var b=a.__importDoc;if(!b&&a.parentNode){b=a.parentNode;if("function"===typeof b.closest)b=b.closest("link[rel=import]");else for(;!h(b)&&(b=b.parentNode););a.__importDoc=b}return b}function d(a){var b=l(document, "link[rel=import]:not([import-dependency])"),c=b.length;c?r(b,function(b){return k(b,function(){0===--c&&a()})}):a()}function e(b){function a(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",a),b())}document.addEventListener("readystatechange",a);a()}function f(a){e(function(){return d(function(){return a&&a()})})}function k(a,b){if(a.__loaded)b&&b();else if("script"===a.localName&&!a.src||"style"===a.localName&&!a.firstChild)a.__loaded=!0,b&&b(); else{var c=function(e){a.removeEventListener(e.type,c);a.__loaded=!0;b&&b()};a.addEventListener("load",c);K&&"style"===a.localName||a.addEventListener("error",c)}}function h(a){return a.nodeType===Node.ELEMENT_NODE&&"link"===a.localName&&"import"===a.rel}function g(){var a=this;this.a={};this.b=0;this.c=new MutationObserver(function(b){return a.s(b)});this.c.observe(document.head,{childList:!0,subtree:!0});this.loadImports(document)}function n(a){r(l(a,"template"),function(a){r(l(a.content,'script:not([type]),script[type="application/javascript"],script[type="text/javascript"],script[type="module"]'), function(a){var b=document.createElement("script");r(a.attributes,function(a){return b.setAttribute(a.name,a.value)});b.textContent=a.textContent;a.parentNode.replaceChild(b,a)});n(a.content)})}function l(a,b){return a.childNodes.length?a.querySelectorAll(b):Aa}function r(a,b,c){var e=a?a.length:0,d=c?-1:1;for(c=c?e-1:0;c]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,t={F:function(a,b){a.href&&a.setAttribute("href",t.j(a.getAttribute("href"),b));a.src&&a.setAttribute("src",t.j(a.getAttribute("src"),b));if("style"===a.localName){var c=t.B(a.textContent,b,Ba);a.textContent=t.B(c,b,Ca)}},B:function(a,b,c){return a.replace(c, function(a,c,e,d){a=e.replace(/["']/g,"");b&&(a=t.j(a,b));return c+"'"+a+"'"+d})},j:function(a,b){if(void 0===t.m){t.m=!1;try{var c=new URL("b","http://a");c.pathname="c%20d";t.m="http://a/c%20d"===c.href}catch(Wa){}}if(t.m)return(new URL(a,b)).href;c=t.C;c||(c=document.implementation.createHTMLDocument("temp"),t.C=c,c.A=c.createElement("base"),c.head.appendChild(c.A),c.w=c.createElement("a"));c.A.href=b;c.w.href=a;return c.w.href||a}},X={async:!0,load:function(a,b,c){if(a)if(a.match(/^data:/)){a= a.split(",");var e=a[1];e=-1d.status?b(e,a):c(e)};d.send()}else c("error: href must be specified")}},K=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent); g.prototype.loadImports=function(a){var b=this;r(l(a,"link[rel=import]"),function(a){return b.g(a)})};g.prototype.g=function(a){var b=this,c=a.href;if(void 0!==this.a[c]){var e=this.a[c];e&&e.__loaded&&(a.__import=e,this.f(a))}else this.b++,this.a[c]="pending",X.load(c,function(a,e){a=b.u(a,e||c);b.a[c]=a;b.b--;b.loadImports(a);b.h()},function(){b.a[c]=null;b.b--;b.h()})};g.prototype.u=function(a,b){if(!a)return document.createDocumentFragment();K&&(a=a.replace(Da,function(a,b,c){return-1===a.indexOf("type=")? b+" type=import-disable "+c:a}));var c=document.createElement("template");c.innerHTML=a;if(c.content)a=c.content,n(a);else for(a=document.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);if(c=a.querySelector("base"))b=t.j(c.getAttribute("href"),b),c.removeAttribute("href");var e=0;r(l(a,'link[rel=import],link[rel=stylesheet][href][type=import-disable],style:not([type]),link[rel=stylesheet][href]:not([type]),script:not([type]),script[type="application/javascript"],script[type="text/javascript"],script[type="module"]'), function(a){k(a);t.F(a,b);a.setAttribute("import-dependency","");if("script"===a.localName&&!a.src&&a.textContent){if("module"===a.type)throw Error("Inline module scripts are not supported in HTML Imports.");a.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(a.textContent+("\n//# sourceURL="+b+(e?"-"+e:"")+".js\n")));a.textContent="";e++}});return a};g.prototype.h=function(){var a=this;if(!this.b){this.c.disconnect();this.flatten(document);var b=!1,c=!1,e=function(){c&& b&&(a.loadImports(document),a.b||(a.c.observe(document.head,{childList:!0,subtree:!0}),a.o()))};this.G(function(){c=!0;e()});this.v(function(){b=!0;e()})}};g.prototype.flatten=function(a){var b=this;r(l(a,"link[rel=import]"),function(a){var c=b.a[a.href];(a.__import=c)&&c.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(b.a[a.href]=a,a.readyState="loading",a.__import=a,b.flatten(c),a.appendChild(c))})};g.prototype.v=function(a){function b(d){if(d