/* 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 */ (function(){if(window.Reflect!==void 0&&window.customElements!==void 0&&!window.customElements.polyfillWrapFlushCallback){var BuiltInHTMLElement=HTMLElement;window.HTMLElement=function(){return Reflect.construct(BuiltInHTMLElement,[],this.constructor)};HTMLElement.prototype=BuiltInHTMLElement.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,BuiltInHTMLElement)}})(); (function(){/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var m;function n(){for(var a=Number(this),b=[],c=a;c-1)try{f.attributeChangedCallback.call(a,b,c,e,d)}catch(g){V(g)}}; m.M=function(a,b){var c=a.__CE_registry;if(c&&(a.defaultView||a.__CE_isImportDocument))return W(c,b)}; function ya(a,b,c,e){var d=b.__CE_registry;if(d&&(e===null||e==="http://www.w3.org/1999/xhtml")&&(d=W(d,c)))try{var f=new d.constructorFunction;if(f.__CE_state===void 0||f.__CE_definition===void 0)throw Error("Failed to construct '"+c+"': The returned value was not constructed with the HTMLElement constructor.");if(f.namespaceURI!=="http://www.w3.org/1999/xhtml")throw Error("Failed to construct '"+c+"': The constructed element's namespace must be the HTML namespace.");if(f.hasAttributes())throw Error("Failed to construct '"+ c+"': The constructed element must not have any attributes.");if(f.firstChild!==null)throw Error("Failed to construct '"+c+"': The constructed element must not have any children.");if(f.parentNode!==null)throw Error("Failed to construct '"+c+"': The constructed element must not have a parent node.");if(f.ownerDocument!==b)throw Error("Failed to construct '"+c+"': The constructed element's owner document is incorrect.");if(f.localName!==c)throw Error("Failed to construct '"+c+"': The constructed element's local name is incorrect."); return f}catch(g){return V(g),b=e===null?p.call(b,c):q.call(b,e,c),Object.setPrototypeOf(b,HTMLUnknownElement.prototype),b.__CE_state=2,b.__CE_definition=void 0,Q(a,b),b}b=e===null?p.call(b,c):q.call(b,e,c);Q(a,b);return b} function V(a){var b="",c="",e=0,d=0;a instanceof Error?(b=a.message,c=a.sourceURL||a.fileName||"",e=a.line||a.lineNumber||0,d=a.column||a.columnNumber||0):b="Uncaught "+String(a);var f=void 0;ErrorEvent.prototype.initErrorEvent===void 0?f=new ErrorEvent("error",{cancelable:!0,message:b,filename:c,lineno:e,colno:d,error:a}):(f=document.createEvent("ErrorEvent"),f.initErrorEvent("error",!1,!0,b,c,e),f.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{configurable:!0,get:function(){return!0}})}); f.error===void 0&&Object.defineProperty(f,"error",{configurable:!0,enumerable:!0,get:function(){return a}});window.dispatchEvent(f);f.defaultPrevented||console.error(a)};function za(){var a=this;this.K=void 0;this.J=new Promise(function(b){a.N=b})}za.prototype.resolve=function(a){if(this.K)throw Error("Already resolved.");this.K=a;this.N(a)};function X(a){var b=document;this.A=void 0;this.h=a;this.m=b;U(this.h,this.m);this.m.readyState==="loading"&&(this.A=new MutationObserver(this.L.bind(this)),this.A.observe(this.m,{childList:!0,subtree:!0}))}X.prototype.disconnect=function(){this.A&&this.A.disconnect()};X.prototype.L=function(a){var b=this.m.readyState;b!=="interactive"&&b!=="complete"||this.disconnect();for(b=0;b0;)w.call(h,h.childNodes[0]);for(f=g?k.content:k;f.childNodes.length>0;)u.call(h,f.childNodes[0])}})});Element.prototype.setAttribute=function(d,f){if(this.__CE_state!==1)return D.call(this,d,f);var g=C.call(this,d);D.call(this,d,f);f=C.call(this,d);a.attributeChangedCallback(this,d,g,f,null)};Element.prototype.setAttributeNS=function(d,f,g){if(this.__CE_state!== 1)return H.call(this,d,f,g);var h=G.call(this,d,f);H.call(this,d,f,g);g=G.call(this,d,f);a.attributeChangedCallback(this,f,h,g,d)};Element.prototype.removeAttribute=function(d){if(this.__CE_state!==1)return E.call(this,d);var f=C.call(this,d);E.call(this,d);f!==null&&a.attributeChangedCallback(this,d,f,null,null)};F&&(Element.prototype.toggleAttribute=function(d,f){if(this.__CE_state!==1)return F.call(this,d,f);var g=C.call(this,d),h=g!==null;f=F.call(this,d,f);if(h!==f){var k;a==null||(k=a.attributeChangedCallback)== null||k.call(a,this,d,g,f?"":null,null)}return f});Element.prototype.removeAttributeNS=function(d,f){if(this.__CE_state!==1)return fa.call(this,d,f);var g=G.call(this,d,f);fa.call(this,d,f);var h=G.call(this,d,f);g!==h&&a.attributeChangedCallback(this,f,g,h,d)};qa?c(HTMLElement.prototype,qa):ha&&c(Element.prototype,ha);ra?e(HTMLElement.prototype,ra):ia&&e(Element.prototype,ia);Z(a,Element.prototype,{prepend:ja,append:ka});Da(a)};var Fa={};function Ga(a){function b(){var c=this.constructor;var e=document.__CE_registry.G.get(c);if(!e)throw Error("Failed to construct a custom element: The constructor was not registered with `customElements`.");var d=e.constructionStack;if(d.length===0)return d=p.call(document,e.localName),Object.setPrototypeOf(d,c.prototype),d.__CE_state=1,d.__CE_definition=e,Q(a,d),d;var f=d.length-1,g=d[f];if(g===Fa)throw Error("Failed to construct '"+e.localName+"': This element was already constructed.");d[f]=Fa; Object.setPrototypeOf(g,c.prototype);Q(a,g);return g}b.prototype=pa.prototype;Object.defineProperty(HTMLElement.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:b});window.HTMLElement=b};function Ha(a){function b(c,e){Object.defineProperty(c,"textContent",{enumerable:e.enumerable,configurable:!0,get:e.get,set:function(d){if(this.nodeType===Node.TEXT_NODE)e.set.call(this,d);else{var f=void 0;if(this.firstChild){var g=this.childNodes,h=g.length;if(h>0&&J(this)){f=Array(h);for(var k=0;k