(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 Copyright (c) 2014 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 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 Copyright (c) 2017 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';var ka={scope:{},getGlobal:function(k){return"undefined"!=typeof window&&window===k?k:"undefined"!=typeof global&&null!=global?global:k}};ka.global=ka.getGlobal(this); (function(){function k(){var a=this;this._scopeCounter={};this._documentOwner=document.documentElement;var b=new ya;b.rules=[];this._documentOwnerStyleInfo=u.set(this._documentOwner,new u(b));this._elementsHaveApplied=!1;this._customStyleInterface=this._applyShim=null;ob(function(){a._ensure()})}function z(){this.customStyles=[];this.enqueued=!1}function pb(){}function la(a){this.cache={};this.typeMax=void 0===a?100:a}function n(){}function u(a,b,c,d,e,f){this.styleRules=a||null;this.placeholder= b||null;this.ownStylePropertyNames=c||[];this.overrideStyleProperties=null;this.elementName=d||"";this.cssBuild=f||"";this.typeExtension=e||"";this.customStyle=this.scopeSelector=this.styleProperties=null}function v(){}function ya(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}function Rc(a){function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable, configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;m(this)&&(e=[],Q(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f":return">";case '"':return""";case "\u00a0":return" "}}function Mb(a){for(var b={},c=0;c";break a;case Node.TEXT_NODE:h=h.data;h=l&&nd[l.localName]?h:h.replace(od,Lb);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h),Error("not implemented");}}c+=h}return c}function W(a){D.currentNode=a;return D.parentNode()}function Db(a){D.currentNode=a;return D.firstChild()}function Eb(a){D.currentNode=a;return D.lastChild()}function da(a){var b=[];D.currentNode=a;for(a=D.firstChild();a;)b.push(a),a=D.nextSibling();return b}function Nb(a){G.currentNode= a;return G.firstChild()}function Ob(a){G.currentNode=a;return G.lastChild()}function Pb(a){G.currentNode=a;return G.previousSibling()}function Qb(a){G.currentNode=a;return G.nextSibling()}function Rb(a){var b=[];G.currentNode=a;for(a=G.firstChild();a;)b.push(a),a=G.nextSibling();return b}function Sb(a){return Ma(a,function(a){return da(a)})}function Tb(a){if(a.nodeType!==Node.ELEMENT_NODE)return a.nodeValue;a=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);for(var b="",c;c=a.nextNode();)b+= c.nodeValue;return b}function C(a,b){return void 0!==(a.__shady&&a.__shady[b])}function X(a){return{get:function(){var b=this.__shady&&this.__shady[a];return void 0!==b?b:Ub[a](this)},configurable:!0}}function J(a,b,c){for(var d in b){var e=Object.getOwnPropertyDescriptor(a,d);e&&e.configurable||!e&&c?Object.defineProperty(a,d,b[d]):c&&console.warn("Could not define",d,"on",a)}}function R(a){J(a,Vb);J(a,Na);J(a,Oa)}function Wb(a,b,c){Gb(a);c=c||null;a.__shady=a.__shady||{};b.__shady=b.__shady||{}; c&&(c.__shady=c.__shady||{});a.__shady.previousSibling=c?c.__shady.previousSibling:b.lastChild;var d=a.__shady.previousSibling;d&&d.__shady&&(d.__shady.nextSibling=a);(d=a.__shady.nextSibling=c)&&d.__shady&&(d.__shady.previousSibling=a);a.__shady.parentNode=b;c?c===b.__shady.firstChild&&(b.__shady.firstChild=a):(b.__shady.lastChild=a,b.__shady.firstChild||(b.__shady.firstChild=a));b.__shady.childNodes=null}function Xb(a){var b=C(a,"parentNode")&&a.__shady&&a.__shady.parentNode,c,d=V(a);if(b||d){c= Yb(a);if(b){a.__shady=a.__shady||{};b.__shady=b.__shady||{};a===b.__shady.firstChild&&(b.__shady.firstChild=a.__shady.nextSibling);a===b.__shady.lastChild&&(b.__shady.lastChild=a.__shady.previousSibling);var e=a.__shady.previousSibling,f=a.__shady.nextSibling;e&&(e.__shady=e.__shady||{},e.__shady.nextSibling=f);f&&(f.__shady=f.__shady||{},f.__shady.previousSibling=e);a.__shady.parentNode=a.__shady.previousSibling=a.__shady.nextSibling=void 0;C(b,"childNodes")&&(b.__shady.childNodes=null)}if(e=d){for(var g, e=d._getInsertionPoints(),f=0;f":return">";case "\u00a0":return" "}},h=function(b){Object.defineProperty(b,"innerHTML",{get:function(){for(var a="",b=this.content.firstChild;b;b=b.nextSibling)a+=b.outerHTML||b.data.replace(v,g);return a},set:function(b){k.body.innerHTML=b;for(a.bootstrap(k);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;k.body.firstChild;)this.content.appendChild(k.body.firstChild)},configurable:!0})},k=document.implementation.createHTMLDocument("template"), m=!0,p=document.createElement("style");p.textContent="template{display:none;}";var n=document.head;n.insertBefore(p,n.firstElementChild);a.prototype=Object.create(HTMLElement.prototype);var q=!document.createElement("div").hasOwnProperty("innerHTML");a.decorate=function(b){if(!b.content){b.content=k.createDocumentFragment();for(var c;c=b.firstChild;)b.content.appendChild(c);if(q)b.__proto__=a.prototype;else if(b.cloneNode=function(b){return a._cloneNode(this,b)},m)try{h(b)}catch(ae){m=!1}a.bootstrap(b.content)}}; h(a.prototype);a.bootstrap=function(b){b=b.querySelectorAll("template");for(var c=0,d=b.length,e;c]/g}if(b||f)a._cloneNode=function(a,b){var d=c.call(a,!1);this.decorate&&this.decorate(d);b&&(d.content.appendChild(c.call(a.content,!0)),this.fixClonedDom(d.content, a.content));return d},a.prototype.cloneNode=function(b){return a._cloneNode(this,b)},a.fixClonedDom=function(a,b){if(b.querySelectorAll){b=b.querySelectorAll("template");a=a.querySelectorAll("template");for(var c=0,d=a.length,e,f;c]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g, w={fixUrls:function(a,b){a.href&&a.setAttribute("href",w.replaceAttrUrl(a.getAttribute("href"),b));a.src&&a.setAttribute("src",w.replaceAttrUrl(a.getAttribute("src"),b));"style"===a.localName&&w.resolveUrlsInStyle(a,b)},fixUrlAttributes:function(a,b){for(var c=["action","src","href","url","style"],d=0,e;dg.search(/({{|\[\[)/)&&(f.value="style"===e?w.resolveUrlsInCssText(g,b):w.replaceAttrUrl(g,b))}},fixUrlsInTemplates:function(a,b){a= a.querySelectorAll("template");for(var c=0;ce.status?b(d,a):c(d)};e.send()}else c("error: href must be specified")}},x=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent);k.prototype.loadImports=function(a){a=a.querySelectorAll("link[rel=import]");for(var b=0,c=a.length;b]/g, md=Mb("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),nd=Mb("style script xmp iframe noembed noframes plaintext noscript".split(" ")),D=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),G=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),Ub=Object.freeze({parentNode:W,firstChild:Db,lastChild:Eb,previousSibling:function(a){D.currentNode=a;return D.previousSibling()},nextSibling:function(a){D.currentNode=a;return D.nextSibling()}, childNodes:da,parentElement:function(a){G.currentNode=a;return G.parentNode()},firstElementChild:Nb,lastElementChild:Ob,previousElementSibling:Pb,nextElementSibling:Qb,children:Rb,innerHTML:Sb,textContent:Tb}),fb=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),ta=document.implementation.createHTMLDocument("inert").createElement("div"),gb=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),Vb={parentElement:X("parentElement"), parentNode:X("parentNode"),nextSibling:X("nextSibling"),previousSibling:X("previousSibling"),className:{get:function(){return this.getAttribute("class")},set:function(a){this.setAttribute("class",a)},configurable:!0},nextElementSibling:{get:function(){if(C(this,"nextSibling")){for(var a=this.nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return Qb(this)},configurable:!0},previousElementSibling:{get:function(){if(C(this,"previousSibling")){for(var a=this.previousSibling;a&& a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return Pb(this)},configurable:!0}},Na={childNodes:{get:function(){if(C(this,"firstChild")){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var a=this.firstChild;a;a=a.nextSibling)this.__shady.childNodes.push(a)}return this.__shady.childNodes}return da(this)},configurable:!0},firstChild:X("firstChild"),lastChild:X("lastChild"),textContent:{get:function(){if(C(this,"firstChild")){for(var a=[],b=0,c=this.childNodes,d;d=c[b];b++)d.nodeType!== Node.COMMENT_NODE&&a.push(d.textContent);return a.join("")}return Tb(this)},set:function(a){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=a;else{for(;this.firstChild;)this.removeChild(this.firstChild);a&&this.appendChild(document.createTextNode(a))}},configurable:!0},firstElementChild:{get:function(){if(C(this,"firstChild")){for(var a=this.firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return Nb(this)},configurable:!0},lastElementChild:{get:function(){if(C(this,"lastChild")){for(var a= this.lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return Ob(this)},configurable:!0},children:{get:function(){return C(this,"firstChild")?Array.prototype.filter.call(this.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}):Rb(this)},configurable:!0},innerHTML:{get:function(){var a="template"===this.localName?this.content:this;return C(this,"firstChild")?Ma(a):Sb(a)},set:function(a){for(var b="template"===this.localName?this.content:this;b.firstChild;)b.removeChild(b.firstChild); for(fb&&fb.set?fb.set.call(ta,a):ta.innerHTML=a;ta.firstChild;)b.appendChild(ta.firstChild)},configurable:!0}},Bc={shadowRoot:{get:function(){return this.shadyRoot},set:function(a){this.shadyRoot=a},configurable:!0}},Oa={activeElement:{get:function(){var a;a=gb&&gb.get?gb.get.call(document):K.hasDescriptors?void 0:document.activeElement;if(a&&a.nodeType){var b=!!N(this);if(this===document||b&&this.host!==a&&this.host.contains(a)){for(b=V(a);b&&b!==this;)a=b.host,b=V(a);a=this===document?b?null:a: b===this?a:null}else a=null}else a=null;return a},set:function(){},configurable:!0}},Gb=K.hasDescriptors?function(){}:function(a){a.__shady&&a.__shady.__outsideAccessors||(a.__shady=a.__shady||{},a.__shady.__outsideAccessors=!0,J(a,Vb,!0))},Fb=K.hasDescriptors?function(){}:function(a){a.__shady&&a.__shady.__insideAccessors||(a.__shady=a.__shady||{},a.__shady.__insideAccessors=!0,J(a,Na,!0),J(a,Bc,!0))},ua=null,Fd={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},jc={get composed(){!1!==this.isTrusted&&void 0===this.__composed&&(this.__composed=Fd[this.type]);return this.__composed||!1},composedPath:function(){this.__composedPath||(this.__composedPath=Ua(this.__target,this.composed));return this.__composedPath},get target(){return gc(this.currentTarget,this.composedPath())},get relatedTarget(){if(!this.__relatedTarget)return null;this.__relatedTargetComposedPath||(this.__relatedTargetComposedPath=Ua(this.__relatedTarget,!0));return gc(this.currentTarget, this.__relatedTargetComposedPath)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.__propagationStopped=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.__propagationStopped=this.__immediatePropagationStopped=!0}},Wa={focus:!0,blur:!0},Gd=Va(window.Event),Hd=Va(window.CustomEvent),Id=Va(window.MouseEvent),Jd="function"===typeof Event?Event:function(a,b){b=b||{};var c=document.createEvent("Event");c.initEvent(a,!!b.bubbles, !!b.cancelable);return c};E.prototype.getInsertionPoints=function(){return this.root.querySelectorAll(this.insertionPointTag)};E.prototype.isInsertionPoint=function(a){return a.localName&&a.localName==this.insertionPointTag};E.prototype.distribute=function(){return this.root.hasInsertionPoint()?this.distributePool(this.root,this.collectPool()):[]};E.prototype.collectPool=function(){for(var a=[],b=0,c=this.root.host.firstChild;c;c=c.nextSibling)a[b++]=c;return a};E.prototype.distributePool=function(a, b){a=[];for(var c=this.root._getInsertionPoints(),d=0,e=c.length,f;d "+b})));a=a.replace(Wd,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,combinator:b,stop:f}};v.prototype._transformSimpleSelector=function(a,b){a=a.split(Ic);a[0]+=b;return a.join(Ic)};v.prototype._transformHostSelector=function(a,b){var c=a.match(Jc);return(c=c&&c[2].trim()||"")?c[0].match(Kc)?a.replace(Jc,function(a,c,f){return b+f}):c.split(Kc)[0]===b?c:Xd:a.replace(ib,b)};v.prototype.documentRule= function(a){a.selector=a.parsedSelector;this.normalizeRootSelector(a);this._transformRule(a,this._transformDocumentSelector)};v.prototype.normalizeRootSelector=function(a){a.selector===Yd&&(a.selector="html")};v.prototype._transformDocumentSelector=function(a){return a.match(jb)?this._transformComplexSelector(a,Lc):this._transformSimpleSelector(a.trim(),Lc)};ka.global.Object.defineProperties(v.prototype,{SCOPE_NAME:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var Sd=/:(nth[-\w]+)\(([^)]+)\)/, Lc=":not(.style-scope)",Hc=",",Ud=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,Kc=/[[.:#*]/,ib=":host",Yd=":root",jb="::slotted",Td=new RegExp("^("+jb+")"),Jc=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Vd=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Wd=/(.*):dir\((?:(ltr|rtl))\)/,Rd=".",Ic=":",Qd="class",Xd="should_not_match",t=new v;u.get=function(a){return a?a.__styleInfo:null};u.set=function(a,b){return a.__styleInfo=b};u.prototype._getStyleRules=function(){return this.styleRules};u.prototype._getStyleRules= u.prototype._getStyleRules;var Mc=function(a){return a.matches||a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector}(window.Element.prototype),Zd=navigator.userAgent.match("Trident");n.prototype.decorateStyles=function(a){var b=this,c={},d=[],e=0;ba(a,function(a){b.decorateRule(a);a.index=e++;b.collectPropertiesInCssText(a.propertyInfo.cssText,c)},function(a){d.push(a)});a._keyframes=d;a=[];for(var f in c)a.push(f);return a};n.prototype.decorateRule= function(a){if(a.propertyInfo)return a.propertyInfo;var b={},c={};this.collectProperties(a,c)&&(b.properties=c,a.rules=null);b.cssText=this.collectCssText(a);return a.propertyInfo=b};n.prototype.collectProperties=function(a,b){var c=a.propertyInfo;if(c){if(c.properties)return Object.assign(b,c.properties),!0}else{for(var c=a.parsedCssText,d;a=Fc.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}};n.prototype.collectCssText=function(a){return this.collectConsumingCssText(a.parsedCssText)}; n.prototype.collectConsumingCssText=function(a){return a.replace(Pd,"").replace(Fc,"")};n.prototype.collectPropertiesInCssText=function(a,b){for(var c;c=Nd.exec(a);){var d=c[1];":"!==c[2]&&(b[d]=!0)}};n.prototype.reify=function(a){for(var b=Object.getOwnPropertyNames(a),c=0,d;c *"===g||"html"===g,h=0===g.indexOf(":host")&&!e;"shady"===c&&(e=g===a+" > *."+a||-1!==g.indexOf("html"),h=!e&&0===g.indexOf(a));"shadow"===c&&(e=":host > *"===g||"html"===g,h=h&&!e);if(e||h)c=a,h&&(y&&!b.transformedSelector&&(b.transformedSelector=t._transformRuleCss(b,t._transformComplexSelector,t._calcElementScope(f),a)),c=b.transformedSelector||a),d({selector:c,isHost:h,isRoot:e})}};n.prototype.hostAndRootPropertiesForScope= function(a,b){var c={},d={},e=this,f=b&&b.__cssBuild;ba(b,function(b){e.whenHostOrRootRule(a,b,f,function(f){Mc.call(a._element||a,f.selector)&&(f.isHost?e.collectProperties(b,c):e.collectProperties(b,d))})},null,!0);return{rootProps:d,hostProps:c}};n.prototype.transformStyles=function(a,b,c){var d=this,e=T(a),f=t._calcHostScope(e.is,e.typeExtension),e=a.extends?"\\"+f.slice(0,-1)+"\\]":f,g=new RegExp("(?:^|[^.#[:])"+e+"($|[.:[\\s>+~])"),e=u.get(a).styleRules,h=this._elementKeyframeTransforms(a,e, c);return t.elementStyles(a,e,function(a){d.applyProperties(a,b);y||pc(a)||!a.cssText||(d.applyKeyframeTransforms(a,h),d._scopeSelector(a,g,f,c))})};n.prototype._elementKeyframeTransforms=function(a,b,c){a=b._keyframes;b={};if(!y&&a)for(var d=0,e=a[d];d=f._useCount&&f.parentNode&&f.parentNode.removeChild(f));y?e.customStyle?(e.customStyle.textContent=b,d=e.customStyle):b&&(d=Za(b,c,a.shadowRoot, e.placeholder)):d?d.parentNode||qc(d,null,e.placeholder):b&&(d=Za(b,c,null,e.placeholder));d&&(d._useCount=d._useCount||0,e.customStyle!=d&&d._useCount++,e.customStyle=d);Zd&&(d.textContent=d.textContent);return d};n.prototype.applyCustomStyle=function(a,b){var c=qa(a),d=this;a.textContent=aa(c,function(a){var c=a.cssText=a.parsedCssText;a.propertyInfo&&a.propertyInfo.cssText&&(c=c.replace(H.customProp,"").replace(H.mixinProp,""),a.cssText=d.valueForProperties(c,b))})};ka.global.Object.defineProperties(n.prototype, {XSCOPE_NAME:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var P=new n,kb={},wa=window.customElements;if(wa&&!y){var $d=wa.define;wa.define=function(a,b,c){var d=document.createComment(" Shady DOM styles for "+a+" "),e=document.head;e.insertBefore(d,(S?S.nextSibling:null)||e.firstChild);S=d;kb[a]=d;return $d.call(wa,a,b,c)}}la.prototype._validate=function(a,b,c){for(var d=0;dthis.typeMax&&e.shift();this.cache[a]=e};la.prototype.fetch=function(a,b,c){if(a=this.cache[a])for(var d=a.length-1;0<=d;d--){var e=a[d];if(this._validate(e,b,c))return e}};if(!y){var Nc=function(a){for(var b=0;bf.getAttribute("class").indexOf(t.SCOPE_NAME)))if(f=e.getRootNode(),f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(f=f.host))f=T(f).is,t.dom(e,f)}for(d=0;d