(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
*/
var k;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function ca(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function da(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}
function ea(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var fa=ea(this);function ha(){}ha.prototype.toJSON=function(){return{}};function p(a){a.__shady||(a.__shady=new ha);return a.__shady}function q(a){return a&&a.__shady};var r=window.ShadyDOM||{};r.Hb=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var ia=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");r.h=!!(ia&&ia.configurable&&ia.get);r.ia=r.force||!r.Hb;r.l=r.noPatch||!1;r.L=r.preferPerformance;r.ka="on-demand"===r.l;var ja=navigator.userAgent.match("Trident");r.Ja=ja;function u(a){return(a=q(a))&&void 0!==a.firstChild}function v(a){return a instanceof ShadowRoot}function ka(a){return(a=(a=q(a))&&a.root)&&a.ra()}
var w=Element.prototype,la=w.matches||w.matchesSelector||w.mozMatchesSelector||w.msMatchesSelector||w.oMatchesSelector||w.webkitMatchesSelector,ma=document.createTextNode(""),na=0,oa=[];(new MutationObserver(function(){for(;oa.length;)try{oa.shift()()}catch(a){throw ma.textContent=na++,a;}})).observe(ma,{characterData:!0});function pa(a){oa.push(a);ma.textContent=na++}var qa=document.contains?function(a,b){return a.__shady_native_contains(b)}:function(a,b){return a===b||a.documentElement&&a.documentElement.__shady_native_contains(b)};
function ra(a,b){for(;b;){if(b==a)return!0;b=b.__shady_parentNode}return!1}function sa(a){for(var b=a.length-1;0<=b;b--){var c=a[b],d=c.getAttribute("id")||c.getAttribute("name");d&&"length"!==d&&isNaN(d)&&(a[d]=c)}a.item=function(e){return a[e]};a.namedItem=function(e){if("length"!==e&&isNaN(e)&&a[e])return a[e];for(var f=ca(a),g=f.next();!g.done;g=f.next())if(g=g.value,(g.getAttribute("id")||g.getAttribute("name"))==e)return g;return null};return a}
function ta(a){var b=[];for(a=a.__shady_native_firstChild;a;a=a.__shady_native_nextSibling)b.push(a);return b}function ua(a){var b=[];for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)b.push(a);return b}function va(a,b,c){c.configurable=!0;if(c.value)a[b]=c.value;else try{Object.defineProperty(a,b,c)}catch(d){}}function x(a,b,c,d){c=void 0===c?"":c;for(var e in b)d&&0<=d.indexOf(e)||va(a,c+e,b[e])}function wa(a,b){for(var c in b)c in a&&va(a,c,b[c])}
function y(a){var b={};Object.getOwnPropertyNames(a).forEach(function(c){b[c]=Object.getOwnPropertyDescriptor(a,c)});return b}function xa(a,b){for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length;d++)e=c[d],a[e]=b[e]};var ya=[],za;function Aa(a){za||(za=!0,pa(Ba));ya.push(a)}function Ba(){za=!1;for(var a=!!ya.length;ya.length;)ya.shift()();return a}Ba.list=ya;function Ca(){this.S=!1;this.addedNodes=[];this.removedNodes=[];this.W=new Set}function Da(a){a.S||(a.S=!0,pa(function(){a.flush()}))}Ca.prototype.flush=function(){if(this.S){this.S=!1;var a=this.takeRecords();a.length&&this.W.forEach(function(b){b(a)})}};Ca.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];this.addedNodes=[];this.removedNodes=[];return a}return[]};
function Ea(a,b){var c=p(a);c.K||(c.K=new Ca);c.K.W.add(b);var d=c.K;return{Qa:b,mb:d,lb:a,takeRecords:function(){return d.takeRecords()}}}function Fa(a){var b=a&&a.mb;b&&(b.W.delete(a.Qa),b.W.size||(p(a.lb).K=null))}
function Ga(a,b){var c=b.getRootNode();return a.map(function(d){var e=c===d.target.getRootNode();if(e&&d.addedNodes){if(e=[].slice.call(d.addedNodes).filter(function(f){return c===f.getRootNode()}),e.length)return d=Object.create(d),Object.defineProperty(d,"addedNodes",{value:e,configurable:!0}),d}else if(e)return d}).filter(function(d){return d})};var Ha=/[&\u00A0"]/g,Ia=/[&\u00A0<>]/g;function Ja(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}function Ka(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var La=Ka("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),Ma=Ka("style script xmp iframe noembed noframes plaintext noscript".split(" "));
function Na(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,g=void 0;e<f&&(g=d[e]);e++){a:{var h=g;var l=a,m=b;switch(h.nodeType){case Node.ELEMENT_NODE:l=h.localName;for(var n="<"+l,t=h.attributes,A=0,ba;ba=t[A];A++)n+=" "+ba.name+'="'+ba.value.replace(Ha,Ja)+'"';n+=">";h=La[l]?n:n+Na(h,m)+"</"+l+">";break a;case Node.TEXT_NODE:h=h.data;h=l&&Ma[l.localName]?h:h.replace(Ia,Ja);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};var Oa=r.h,Pa={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},Qa={};function Ra(a){Qa[a]=function(b){return b["__shady_native_"+a]}}function Sa(a,b){x(a,b,"__shady_native_");for(var c in b)Ra(c)}function z(a,b){b=void 0===b?[]:b;for(var c=0;c<b.length;c++){var d=b[c],e=Object.getOwnPropertyDescriptor(a,d);e&&(Object.defineProperty(a,"__shady_native_"+d,e),e.value?Pa[d]||(Pa[d]=e.value):Ra(d))}}
var B=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),C=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),Ta=document.implementation.createHTMLDocument("inert");function Ua(a){for(var b;b=a.__shady_native_firstChild;)a.__shady_native_removeChild(b)}var Va=["firstElementChild","lastElementChild","children","childElementCount"],Wa=["querySelector","querySelectorAll"];
function Xa(){var a=["dispatchEvent","addEventListener","removeEventListener"];window.EventTarget?z(window.EventTarget.prototype,a):(z(Node.prototype,a),z(Window.prototype,a));Oa?z(Node.prototype,"parentNode firstChild lastChild previousSibling nextSibling childNodes parentElement textContent".split(" ")):Sa(Node.prototype,{parentNode:{get:function(){B.currentNode=this;return B.parentNode()}},firstChild:{get:function(){B.currentNode=this;return B.firstChild()}},lastChild:{get:function(){B.currentNode=
this;return B.lastChild()}},previousSibling:{get:function(){B.currentNode=this;return B.previousSibling()}},nextSibling:{get:function(){B.currentNode=this;return B.nextSibling()}},childNodes:{get:function(){var b=[];B.currentNode=this;for(var c=B.firstChild();c;)b.push(c),c=B.nextSibling();return b}},parentElement:{get:function(){C.currentNode=this;return C.parentNode()}},textContent:{get:function(){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(var b=document.createTreeWalker(this,
NodeFilter.SHOW_TEXT,null,!1),c="",d;d=b.nextNode();)c+=d.nodeValue;return c;default:return this.nodeValue}},set:function(b){if("undefined"===typeof b||null===b)b="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:Ua(this);(0<b.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_native_insertBefore(document.createTextNode(b),void 0);break;default:this.nodeValue=b}}}});z(Node.prototype,"appendChild insertBefore removeChild replaceChild cloneNode contains".split(" "));
z(HTMLElement.prototype,["parentElement","contains"]);a={firstElementChild:{get:function(){C.currentNode=this;return C.firstChild()}},lastElementChild:{get:function(){C.currentNode=this;return C.lastChild()}},children:{get:function(){var b=[];C.currentNode=this;for(var c=C.firstChild();c;)b.push(c),c=C.nextSibling();return sa(b)}},childElementCount:{get:function(){return this.children?this.children.length:0}}};Oa?(z(Element.prototype,Va),z(Element.prototype,["previousElementSibling","nextElementSibling",
"innerHTML","className"]),z(HTMLElement.prototype,["children","innerHTML","className"])):(Sa(Element.prototype,a),Sa(Element.prototype,{previousElementSibling:{get:function(){C.currentNode=this;return C.previousSibling()}},nextElementSibling:{get:function(){C.currentNode=this;return C.nextSibling()}},innerHTML:{get:function(){return Na(this,ta)},set:function(b){var c="template"===this.localName?this.content:this;Ua(c);var d=this.localName||"div";d=this.namespaceURI&&this.namespaceURI!==Ta.namespaceURI?
Ta.createElementNS(this.namespaceURI,d):Ta.createElement(d);d.innerHTML=b;for(b="template"===this.localName?d.content:d;d=b.__shady_native_firstChild;)c.__shady_native_insertBefore(d,void 0)}},className:{get:function(){return this.getAttribute("class")||""},set:function(b){this.setAttribute("class",b)}}}));z(Element.prototype,"setAttribute getAttribute hasAttribute removeAttribute focus blur".split(" "));z(Element.prototype,Wa);z(HTMLElement.prototype,["focus","blur"]);window.HTMLTemplateElement&&
z(window.HTMLTemplateElement.prototype,["innerHTML"]);Oa?z(DocumentFragment.prototype,Va):Sa(DocumentFragment.prototype,a);z(DocumentFragment.prototype,Wa);Oa?(z(Document.prototype,Va),z(Document.prototype,["activeElement"])):Sa(Document.prototype,a);z(Document.prototype,["importNode","getElementById"]);z(Document.prototype,Wa)};var Ya=y({get childNodes(){return this.__shady_childNodes},get firstChild(){return this.__shady_firstChild},get lastChild(){return this.__shady_lastChild},get childElementCount(){return this.__shady_childElementCount},get children(){return this.__shady_children},get firstElementChild(){return this.__shady_firstElementChild},get lastElementChild(){return this.__shady_lastElementChild},get shadowRoot(){return this.__shady_shadowRoot}}),Za=y({get textContent(){return this.__shady_textContent},set textContent(a){this.__shady_textContent=
a},get innerHTML(){return this.__shady_innerHTML},set innerHTML(a){return this.__shady_innerHTML=a}}),$a=y({get parentElement(){return this.__shady_parentElement},get parentNode(){return this.__shady_parentNode},get nextSibling(){return this.__shady_nextSibling},get previousSibling(){return this.__shady_previousSibling},get nextElementSibling(){return this.__shady_nextElementSibling},get previousElementSibling(){return this.__shady_previousElementSibling},get className(){return this.__shady_className},
set className(a){return this.__shady_className=a}});function ab(a){for(var b in a){var c=a[b];c&&(c.enumerable=!1)}}ab(Ya);ab(Za);ab($a);var bb=r.h||!0===r.l,cb=bb?function(){}:function(a){var b=p(a);b.Ma||(b.Ma=!0,wa(a,$a))},db=bb?function(){}:function(a){var b=p(a);b.La||(b.La=!0,wa(a,Ya),window.customElements&&window.customElements.polyfillWrapFlushCallback&&!r.l||wa(a,Za))};var eb="__eventWrappers"+Date.now(),fb=function(){var a=Object.getOwnPropertyDescriptor(Event.prototype,"composed");return a?function(b){return a.get.call(b)}:null}(),gb=function(){function a(){}var b=!1,c={get capture(){b=!0;return!1}};window.addEventListener("test",a,c);window.removeEventListener("test",a,c);return b}();function hb(a){if(a&&"object"===typeof a){var b=!!a.capture;var c=!!a.once;var d=!!a.passive;var e=a.C}else b=!!a,d=c=!1;return{Ga:e,capture:b,once:c,passive:d,Fa:gb?a:b}}
var ib={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},jb={DOMAttrModified:!0,DOMAttributeNameChanged:!0,DOMCharacterDataModified:!0,DOMElementNameChanged:!0,DOMNodeInserted:!0,DOMNodeInsertedIntoDocument:!0,DOMNodeRemoved:!0,DOMNodeRemovedFromDocument:!0,DOMSubtreeModified:!0};function kb(a){return a instanceof Node?a.__shady_getRootNode():a}
function lb(a,b){var c=[],d=a;for(a=kb(a);d;)c.push(d),d=d.__shady_assignedSlot?d.__shady_assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d.host:d.__shady_parentNode;c[c.length-1]===document&&c.push(window);return c}function mb(a){a.__composedPath||(a.__composedPath=lb(a.target,!0));return a.__composedPath}function nb(a,b){if(!v)return a;a=lb(a,!0);for(var c=0,d,e=void 0,f,g=void 0;c<b.length;c++)if(d=b[c],f=kb(d),f!==e&&(g=a.indexOf(f),e=f),!v(f)||-1<g)return d}
function ob(a){function b(c,d){c=new a(c,d);c.__composed=d&&!!d.composed;return c}b.__proto__=a;b.prototype=a.prototype;return b}var pb={focus:!0,blur:!0};function qb(a){return a.__target!==a.target||a.__relatedTarget!==a.relatedTarget}function rb(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!qb(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.__immediatePropagationStopped);d++);}
function sb(a){var b=a.composedPath(),c=b.map(function(l){return nb(l,b)}),d=a.bubbles;Object.defineProperty(a,"currentTarget",{configurable:!0,enumerable:!0,get:function(){return g}});var e=Event.CAPTURING_PHASE;Object.defineProperty(a,"eventPhase",{configurable:!0,enumerable:!0,get:function(){return e}});for(var f=b.length-1;0<=f;f--){var g=b[f];e=g===c[f]?Event.AT_TARGET:Event.CAPTURING_PHASE;rb(a,g,"capture");if(a.Z)return}for(f=0;f<b.length;f++){g=b[f];var h=g===c[f];if(h||d)if(e=h?Event.AT_TARGET:
Event.BUBBLING_PHASE,rb(a,g,"bubble"),a.Z)return}e=0;g=null}function tb(a,b,c,d,e,f){for(var g=0;g<a.length;g++){var h=a[g],l=h.type,m=h.capture,n=h.once,t=h.passive;if(b===h.node&&c===l&&d===m&&e===n&&f===t)return g}return-1}function ub(a){Ba();return!r.L&&this instanceof Node&&!qa(document,this)?(a.__target||vb(a,this),sb(a)):this.__shady_native_dispatchEvent(a)}
function wb(a,b,c){var d=hb(c),e=d.capture,f=d.once,g=d.passive,h=d.Ga;d=d.Fa;if(b){var l=typeof b;if("function"===l||"object"===l)if("object"!==l||b.handleEvent&&"function"===typeof b.handleEvent){if(jb[a])return this.__shady_native_addEventListener(a,b,d);var m=h||this;if(h=b[eb]){if(-1<tb(h,m,a,e,f,g))return}else b[eb]=[];h=function(n){f&&this.__shady_removeEventListener(a,b,c);n.__target||vb(n);if(m!==this){var t=Object.getOwnPropertyDescriptor(n,"currentTarget");Object.defineProperty(n,"currentTarget",
{get:function(){return m},configurable:!0});var A=Object.getOwnPropertyDescriptor(n,"eventPhase");Object.defineProperty(n,"eventPhase",{configurable:!0,enumerable:!0,get:function(){return e?Event.CAPTURING_PHASE:Event.BUBBLING_PHASE}})}n.__previousCurrentTarget=n.currentTarget;if(!v(m)&&"slot"!==m.localName||-1!=n.composedPath().indexOf(m))if(n.composed||-1<n.composedPath().indexOf(m))if(qb(n)&&n.target===n.relatedTarget)n.eventPhase===Event.BUBBLING_PHASE&&n.stopImmediatePropagation();else if(n.eventPhase===
Event.CAPTURING_PHASE||n.bubbles||n.target===m||m instanceof Window){var ba="function"===l?b.call(m,n):b.handleEvent&&b.handleEvent(n);m!==this&&(t?(Object.defineProperty(n,"currentTarget",t),t=null):delete n.currentTarget,A?(Object.defineProperty(n,"eventPhase",A),A=null):delete n.eventPhase);return ba}};b[eb].push({node:m,type:a,capture:e,once:f,passive:g,Vb:h});this.__handlers=this.__handlers||{};this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]};this.__handlers[a][e?"capture":"bubble"].push(h);
pb[a]||this.__shady_native_addEventListener(a,h,d)}}}
function xb(a,b,c){if(b){var d=hb(c);c=d.capture;var e=d.once,f=d.passive,g=d.Ga;d=d.Fa;if(jb[a])return this.__shady_native_removeEventListener(a,b,d);var h=g||this;g=void 0;var l=null;try{l=b[eb]}catch(m){}l&&(e=tb(l,h,a,c,e,f),-1<e&&(g=l.splice(e,1)[0].Vb,l.length||(b[eb]=void 0)));this.__shady_native_removeEventListener(a,g||b,d);g&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][c?"capture":"bubble"],b=a.indexOf(g),-1<b&&a.splice(b,1))}}
function yb(){for(var a in pb)window.__shady_native_addEventListener(a,function(b){b.__target||(vb(b),sb(b))},!0)}
var zb=y({get composed(){void 0===this.__composed&&(fb?this.__composed="focusin"===this.type||"focusout"===this.type||fb(this):!1!==this.isTrusted&&(this.__composed=ib[this.type]));return this.__composed||!1},composedPath:function(){this.__composedPath||(this.__composedPath=lb(this.__target,this.composed));return this.__composedPath},get target(){return nb(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){if(!this.__relatedTarget)return null;this.__relatedTargetComposedPath||
(this.__relatedTargetComposedPath=lb(this.__relatedTarget,!0));return nb(this.currentTarget||this.__previousCurrentTarget,this.__relatedTargetComposedPath)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.Z=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.Z=this.__immediatePropagationStopped=!0}});
function vb(a,b){b=void 0===b?a.target:b;a.__target=b;a.__relatedTarget=a.relatedTarget;if(r.h){b=Object.getPrototypeOf(a);if(!b.hasOwnProperty("__shady_patchedProto")){var c=Object.create(b);c.__shady_sourceProto=b;x(c,zb);b.__shady_patchedProto=c}a.__proto__=b.__shady_patchedProto}else x(a,zb)}var Ab=ob(Event),Bb=ob(CustomEvent),Cb=ob(MouseEvent);
function Db(){if(!fb&&Object.getOwnPropertyDescriptor(Event.prototype,"isTrusted")){var a=function(){var b=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});this.__shady_dispatchEvent(b)};Element.prototype.click?Element.prototype.click=a:HTMLElement.prototype.click&&(HTMLElement.prototype.click=a)}}
var Eb=Object.getOwnPropertyNames(Element.prototype).filter(function(a){return"on"===a.substring(0,2)}),Fb=Object.getOwnPropertyNames(HTMLElement.prototype).filter(function(a){return"on"===a.substring(0,2)});function Gb(a){return{set:function(b){var c=p(this),d=a.substring(2);c.B||(c.B={});c.B[a]&&this.removeEventListener(d,c.B[a]);this.__shady_addEventListener(d,b);c.B[a]=b},get:function(){var b=q(this);return b&&b.B&&b.B[a]},configurable:!0}};function Hb(a,b){return{index:a,M:[],V:b}}
function Ib(a,b,c,d){var e=0,f=0,g=0,h=0,l=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(g=0;g<l;g++)if(a[g]!==c[g])break a;g=l}if(b==a.length&&d==c.length){h=a.length;for(var m=c.length,n=0;n<l-g&&Jb(a[--h],c[--m]);)n++;h=n}e+=g;f+=g;b-=h;d-=h;if(0==b-e&&0==d-f)return[];if(e==b){for(b=Hb(e,0);f<d;)b.M.push(c[f++]);return[b]}if(f==d)return[Hb(e,b-e)];l=e;g=f;d=d-g+1;h=b-l+1;b=Array(d);for(m=0;m<d;m++)b[m]=Array(h),b[m][0]=m;for(m=0;m<h;m++)b[0][m]=m;for(m=1;m<d;m++)for(n=1;n<h;n++)if(a[l+n-1]===c[g+m-1])b[m][n]=
b[m-1][n-1];else{var t=b[m-1][n]+1,A=b[m][n-1]+1;b[m][n]=t<A?t:A}l=b.length-1;g=b[0].length-1;d=b[l][g];for(a=[];0<l||0<g;)0==l?(a.push(2),g--):0==g?(a.push(3),l--):(h=b[l-1][g-1],m=b[l-1][g],n=b[l][g-1],t=m<n?m<h?m:h:n<h?n:h,t==h?(h==d?a.push(0):(a.push(1),d=h),l--,g--):t==m?(a.push(3),l--,d=m):(a.push(2),g--,d=n));a.reverse();b=void 0;l=[];for(g=0;g<a.length;g++)switch(a[g]){case 0:b&&(l.push(b),b=void 0);e++;f++;break;case 1:b||(b=Hb(e,0));b.V++;e++;b.M.push(c[f]);f++;break;case 2:b||(b=Hb(e,0));
b.V++;e++;break;case 3:b||(b=Hb(e,0)),b.M.push(c[f]),f++}b&&l.push(b);return l}function Jb(a,b){return a===b};var Kb=y({dispatchEvent:ub,addEventListener:wb,removeEventListener:xb});var Lb=null;function D(){Lb||(Lb=window.ShadyCSS&&window.ShadyCSS.ScopingShim);return Lb||null}function Mb(a,b,c){var d=D();return d&&"class"===b?(d.setElementClass(a,c),!0):!1}function Nb(a,b){var c=D();c&&c.unscopeNode(a,b)}function Ob(a,b){var c=D();if(!c)return!0;if(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){c=!0;for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)c=c&&Ob(a,b);return c}return a.nodeType!==Node.ELEMENT_NODE?!0:c.currentScopeForNode(a)===b}
function Pb(a){if(a.nodeType!==Node.ELEMENT_NODE)return"";var b=D();return b?b.currentScopeForNode(a):""}function Qb(a,b){if(a)for(a.nodeType===Node.ELEMENT_NODE&&b(a),a=a.__shady_firstChild;a;a=a.__shady_nextSibling)a.nodeType===Node.ELEMENT_NODE&&Qb(a,b)};var Rb=window.document,Sb=r.L,Tb=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),Ub=Tb&&Tb.get;function Vb(a){for(var b;b=a.__shady_firstChild;)a.__shady_removeChild(b)}function Wb(a){var b=q(a);if(b&&void 0!==b.Y)for(b=a.__shady_firstChild;b;b=b.__shady_nextSibling)Wb(b);if(a=q(a))a.Y=void 0}function Xb(a){var b=a;if(a&&"slot"===a.localName){var c=q(a);(c=c&&c.H)&&(b=c.length?c[0]:Xb(a.__shady_nextSibling))}return b}
function Yb(a,b,c){if(a=(a=q(a))&&a.K){if(b)if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var d=0,e=b.childNodes.length;d<e;d++)a.addedNodes.push(b.childNodes[d]);else a.addedNodes.push(b);c&&a.removedNodes.push(c);Da(a)}}
var ac=y({get parentNode(){var a=q(this);a=a&&a.parentNode;return void 0!==a?a:this.__shady_native_parentNode},get firstChild(){var a=q(this);a=a&&a.firstChild;return void 0!==a?a:this.__shady_native_firstChild},get lastChild(){var a=q(this);a=a&&a.lastChild;return void 0!==a?a:this.__shady_native_lastChild},get nextSibling(){var a=q(this);a=a&&a.nextSibling;return void 0!==a?a:this.__shady_native_nextSibling},get previousSibling(){var a=q(this);a=a&&a.previousSibling;return void 0!==a?a:this.__shady_native_previousSibling},
get childNodes(){if(u(this)){var a=q(this);if(!a.childNodes){a.childNodes=[];for(var b=this.__shady_firstChild;b;b=b.__shady_nextSibling)a.childNodes.push(b)}var c=a.childNodes}else c=this.__shady_native_childNodes;c.item=function(d){return c[d]};return c},get parentElement(){var a=q(this);(a=a&&a.parentNode)&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:this.__shady_native_parentElement},get isConnected(){if(Ub&&Ub.call(this))return!0;if(this.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return!1;
var a=this.ownerDocument;if(null===a||qa(a,this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.__shady_parentNode||(v(a)?a.host:void 0);return!!(a&&a instanceof Document)},get textContent(){if(u(this)){for(var a=[],b=this.__shady_firstChild;b;b=b.__shady_nextSibling)b.nodeType!==Node.COMMENT_NODE&&a.push(b.__shady_textContent);return a.join("")}return this.__shady_native_textContent},set textContent(a){if("undefined"===typeof a||null===a)a="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:if(!u(this)&&
r.h){var b=this.__shady_firstChild;(b!=this.__shady_lastChild||b&&b.nodeType!=Node.TEXT_NODE)&&Vb(this);this.__shady_native_textContent=a}else Vb(this),(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_insertBefore(document.createTextNode(a));break;default:this.nodeValue=a}},insertBefore:function(a,b){if(this.ownerDocument!==Rb&&a.ownerDocument!==Rb)return this.__shady_native_insertBefore(a,b),a;if(a===this)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");
if(b){var c=q(b);c=c&&c.parentNode;if(void 0!==c&&c!==this||void 0===c&&b.__shady_native_parentNode!==this)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.");}if(b===a)return a;Yb(this,a);var d=[],e=(c=E(this))?c.host.localName:Pb(this),f=a.__shady_parentNode;if(f){var g=Pb(a);var h=!!c||!E(a)||Sb&&void 0!==this.__noInsertionPoint;f.__shady_removeChild(a,h)}f=!0;var l=(!Sb||void 0===a.__noInsertionPoint&&void 0===
this.__noInsertionPoint)&&!Ob(a,e),m=c&&!a.__noInsertionPoint&&(!Sb||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE);if(m||l)l&&(g=g||Pb(a)),Qb(a,function(n){m&&"slot"===n.localName&&d.push(n);if(l){var t=g;D()&&(t&&Nb(n,t),(t=D())&&t.scopeNode(n,e))}});d.length&&(c.na(d),c.j());u(this)&&(Zb(a,this,b),h=q(this),h.root?(f=!1,ka(this)&&h.root.j()):c&&"slot"===this.localName&&(f=!1,c.j()));f?(c=v(this)?this.host:this,b?(b=Xb(b),c.__shady_native_insertBefore(a,b)):c.__shady_native_appendChild(a)):a.ownerDocument!==
this.ownerDocument&&this.ownerDocument.adoptNode(a);return a},appendChild:function(a){if(this!=a||!v(a))return this.__shady_insertBefore(a)},removeChild:function(a,b){b=void 0===b?!1:b;if(this.ownerDocument!==Rb)return this.__shady_native_removeChild(a);if(a.__shady_parentNode!==this)throw Error("The node to be removed is not a child of this node: "+a);Yb(this,null,a);var c=E(a),d=c&&c.pb(a),e=q(this);if(u(this)&&($b(a,this),ka(this))){e.root.j();var f=!0}if(D()&&!b&&c&&a.nodeType!==Node.TEXT_NODE){var g=
Pb(a);Qb(a,function(h){Nb(h,g)})}Wb(a);c&&((b="slot"===this.localName)&&(f=!0),(d||b)&&c.j());f||(f=v(this)?this.host:this,(!e.root&&"slot"!==a.localName||f===a.__shady_native_parentNode)&&f.__shady_native_removeChild(a));return a},replaceChild:function(a,b){this.__shady_insertBefore(a,b);this.__shady_removeChild(b);return a},cloneNode:function(a){if("template"==this.localName)return this.__shady_native_cloneNode(a);var b=this.__shady_native_cloneNode(!1);if(a&&b.nodeType!==Node.ATTRIBUTE_NODE){a=
this.__shady_firstChild;for(var c;a;a=a.__shady_nextSibling)c=a.__shady_cloneNode(!0),b.__shady_appendChild(c)}return b},getRootNode:function(a){if(this&&this.nodeType){var b=p(this),c=b.Y;void 0===c&&(v(this)?(c=this,b.Y=c):(c=(c=this.__shady_parentNode)?c.__shady_getRootNode(a):this,document.documentElement.__shady_native_contains(this)&&(b.Y=c)));return c}},contains:function(a){return ra(this,a)}});var bc=y({get assignedSlot(){var a=this.__shady_parentNode;(a=a&&a.__shady_shadowRoot)&&a.R();return(a=q(this))&&a.assignedSlot||null}});function cc(a,b,c){var d=[];dc(a,b,c,d);return d}function dc(a,b,c,d){for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling){var e;if(e=a.nodeType===Node.ELEMENT_NODE){e=a;var f=b,g=c,h=d,l=f(e);l&&h.push(e);g&&g(l)?e=l:(dc(e,f,g,h),e=void 0)}if(e)break}}
var F=y({get firstElementChild(){var a=q(this);if(a&&void 0!==a.firstChild){for(a=this.__shady_firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_firstElementChild},get lastElementChild(){var a=q(this);if(a&&void 0!==a.lastChild){for(a=this.__shady_lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_lastElementChild},get children(){return u(this)?sa(Array.prototype.filter.call(ua(this),
function(a){return a.nodeType===Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var a=this.__shady_children;return a?a.length:0}}),ec=y({querySelector:function(a){return cc(this,function(b){return la.call(b,a)},function(b){return!!b})[0]||null},querySelectorAll:function(a,b){if(b){b=Array.prototype.slice.call(this.__shady_native_querySelectorAll(a));var c=this.__shady_getRootNode();return sa(b.filter(function(d){return d.__shady_getRootNode()==c}))}return sa(cc(this,function(d){return la.call(d,
a)}))}}),fc=r.L&&!r.l?xa({},F):F;xa(F,ec);var gc=window.document;function hc(a,b){"slot"===b?(a=a.__shady_parentNode,ka(a)&&q(a).root.j()):"slot"===a.localName&&"name"===b&&(b=E(a))&&(b.Cb(a),b.j())}
var ic=y({get previousElementSibling(){var a=q(this);if(a&&void 0!==a.previousSibling){for(a=this.__shady_previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_previousElementSibling},get nextElementSibling(){var a=q(this);if(a&&void 0!==a.nextSibling){for(a=this.__shady_nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_nextElementSibling},get slot(){return this.getAttribute("slot")},
set slot(a){this.__shady_setAttribute("slot",a)},get className(){return this.getAttribute("class")||""},set className(a){this.__shady_setAttribute("class",a)},setAttribute:function(a,b){this.ownerDocument!==gc?this.__shady_native_setAttribute(a,b):Mb(this,a,b)||(this.__shady_native_setAttribute(a,b),hc(this,a))},removeAttribute:function(a){this.ownerDocument!==gc?this.__shady_native_removeAttribute(a):Mb(this,a,"")?""===this.getAttribute(a)&&this.__shady_native_removeAttribute(a):(this.__shady_native_removeAttribute(a),
hc(this,a))}});r.L||Eb.forEach(function(a){ic[a]=Gb(a)});
var mc=y({attachShadow:function(a){if(!this)throw Error("Must provide a host.");if(!a)throw Error("Not enough arguments.");if(a.shadyUpgradeFragment&&!r.Ja){var b=a.shadyUpgradeFragment;b.__proto__=ShadowRoot.prototype;b.ta(this,a);jc(b,b);a=b.__noInsertionPoint?null:b.querySelectorAll("slot");b.__noInsertionPoint=void 0;a&&a.length&&(b.na(a),b.j());b.host.__shady_native_appendChild(b)}else b=new kc(lc,this,a);return this.__CE_shadowRoot=b},get shadowRoot(){var a=q(this);return a&&a.Nb||null}});
xa(ic,mc);var nc=document.implementation.createHTMLDocument("inert"),oc=y({get innerHTML(){return u(this)?Na("template"===this.localName?this.content:this,ua):this.__shady_native_innerHTML},set innerHTML(a){if("template"===this.localName)this.__shady_native_innerHTML=a;else{Vb(this);var b=this.localName||"div";b=this.namespaceURI&&this.namespaceURI!==nc.namespaceURI?nc.createElementNS(this.namespaceURI,b):nc.createElement(b);for(r.h?b.__shady_native_innerHTML=a:b.innerHTML=a;a=b.__shady_firstChild;)this.__shady_insertBefore(a)}}});var pc=y({blur:function(){var a=q(this);(a=(a=a&&a.root)&&a.activeElement)?a.__shady_blur():this.__shady_native_blur()}});r.L||Fb.forEach(function(a){pc[a]=Gb(a)});var qc=y({assignedNodes:function(a){if("slot"===this.localName){var b=this.__shady_getRootNode();b&&v(b)&&b.R();return(b=q(this))?(a&&a.flatten?b.H:b.assignedNodes)||[]:[]}},addEventListener:function(a,b,c){if("slot"!==this.localName||"slotchange"===a)wb.call(this,a,b,c);else{"object"!==typeof c&&(c={capture:!!c});var d=this.__shady_parentNode;if(!d)throw Error("ShadyDOM cannot attach event to slot unless it has a `parentNode`");c.C=this;d.__shady_addEventListener(a,b,c)}},removeEventListener:function(a,
b,c){if("slot"!==this.localName||"slotchange"===a)xb.call(this,a,b,c);else{"object"!==typeof c&&(c={capture:!!c});var d=this.__shady_parentNode;if(!d)throw Error("ShadyDOM cannot attach event to slot unless it has a `parentNode`");c.C=this;d.__shady_removeEventListener(a,b,c)}}});var rc=y({getElementById:function(a){return""===a?null:cc(this,function(b){return b.id==a},function(b){return!!b})[0]||null}});var sc=y({get activeElement(){var a=r.h?document.__shady_native_activeElement:document.activeElement;if(!a||!a.nodeType)return null;var b=!!v(this);if(!(this===document||b&&this.host!==a&&this.host.__shady_native_contains(a)))return null;for(b=E(a);b&&b!==this;)a=b.host,b=E(a);return this===document?b?null:a:b===this?a:null}});var tc=window.document,uc=y({importNode:function(a,b){if(a.ownerDocument!==tc||"template"===a.localName)return this.__shady_native_importNode(a,b);var c=this.__shady_native_importNode(a,!1);if(b)for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)b=this.__shady_importNode(a,!0),c.__shady_appendChild(b);return c}});var vc=y({dispatchEvent:ub,addEventListener:wb.bind(window),removeEventListener:xb.bind(window)});var G={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(G.parentElement=ac.parentElement);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(G.contains=ac.contains);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(G.children=F.children);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(G.innerHTML=oc.innerHTML);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"className")&&(G.className=ic.className);
var H={EventTarget:[Kb],Node:[ac,window.EventTarget?null:Kb],Text:[bc],Comment:[bc],CDATASection:[bc],ProcessingInstruction:[bc],Element:[ic,F,bc,!r.h||"innerHTML"in Element.prototype?oc:null,window.HTMLSlotElement?null:qc],HTMLElement:[pc,G],HTMLSlotElement:[qc],DocumentFragment:[fc,rc],Document:[uc,fc,rc,sc],Window:[vc]},wc=r.h?null:["innerHTML","textContent"];function I(a,b,c,d){b.forEach(function(e){return a&&e&&x(a,e,c,d)})}
function xc(a){var b=a?null:wc,c;for(c in H)I(window[c]&&window[c].prototype,H[c],a,b)}["Text","Comment","CDATASection","ProcessingInstruction"].forEach(function(a){var b=window[a],c=Object.create(b.prototype);c.__shady_protoIsPatched=!0;I(c,H.EventTarget);I(c,H.Node);H[a]&&I(c,H[a]);b.prototype.__shady_patchedProto=c});function yc(a){a.__shady_protoIsPatched=!0;I(a,H.EventTarget);I(a,H.Node);I(a,H.Element);I(a,H.HTMLElement);I(a,H.HTMLSlotElement);return a};var zc=r.ka,Ac=r.h;function Bc(a,b){if(zc&&!a.__shady_protoIsPatched&&!v(a)){var c=Object.getPrototypeOf(a),d=c.hasOwnProperty("__shady_patchedProto")&&c.__shady_patchedProto;d||(d=Object.create(c),yc(d),c.__shady_patchedProto=d);Object.setPrototypeOf(a,d)}Ac||(1===b?cb(a):2===b&&db(a))}
function Cc(a,b,c,d){Bc(a,1);d=d||null;var e=p(a),f=d?p(d):null;e.previousSibling=d?f.previousSibling:b.__shady_lastChild;if(f=q(e.previousSibling))f.nextSibling=a;if(f=q(e.nextSibling=d))f.previousSibling=a;e.parentNode=b;d?d===c.firstChild&&(c.firstChild=a):(c.lastChild=a,c.firstChild||(c.firstChild=a));c.childNodes=null}
function Zb(a,b,c){Bc(b,2);var d=p(b);void 0!==d.firstChild&&(d.childNodes=null);if(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(a=a.__shady_native_firstChild;a;a=a.__shady_native_nextSibling)Cc(a,b,d,c);else Cc(a,b,d,c)}
function $b(a,b){var c=p(a);b=p(b);a===b.firstChild&&(b.firstChild=c.nextSibling);a===b.lastChild&&(b.lastChild=c.previousSibling);a=c.previousSibling;var d=c.nextSibling;a&&(p(a).nextSibling=d);d&&(p(d).previousSibling=a);c.parentNode=c.previousSibling=c.nextSibling=void 0;void 0!==b.childNodes&&(b.childNodes=null)}
function jc(a,b){var c=p(a);if(b||void 0===c.firstChild){c.childNodes=null;var d=c.firstChild=a.__shady_native_firstChild;c.lastChild=a.__shady_native_lastChild;Bc(a,2);c=d;for(d=void 0;c;c=c.__shady_native_nextSibling){var e=p(c);e.parentNode=b||a;e.nextSibling=c.__shady_native_nextSibling;e.previousSibling=d||null;d=c;Bc(c,1)}}};var Dc=y({addEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.C=c.C||this;this.host.__shady_addEventListener(a,b,c)},removeEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.C=c.C||this;this.host.__shady_removeEventListener(a,b,c)}});function Ec(a,b){x(a,Dc,b);x(a,sc,b);x(a,oc,b);x(a,F,b);r.l&&!b?(x(a,ac,b),x(a,rc,b)):r.h||(x(a,$a),x(a,Ya),x(a,Za))};var lc={},J=r.deferConnectionCallbacks&&"loading"===document.readyState,Fc;function Gc(a){var b=[];do b.unshift(a);while(a=a.__shady_parentNode);return b}function kc(a,b,c){if(a!==lc)throw new TypeError("Illegal constructor");this.a=null;this.ta(b,c)}k=kc.prototype;
k.ta=function(a,b){this.host=a;this.mode=b&&b.mode;jc(this.host);a=p(this.host);a.root=this;a.Nb="closed"!==this.mode?this:null;a=p(this);a.firstChild=a.lastChild=a.parentNode=a.nextSibling=a.previousSibling=null;if(r.preferPerformance)for(;a=this.host.__shady_native_firstChild;)this.host.__shady_native_removeChild(a);else this.j()};k.j=function(){var a=this;this.F||(this.F=!0,Aa(function(){return a.R()}))};k.eb=function(){for(var a,b=this;b;)b.F&&(a=b),b=b.cb();return a};
k.cb=function(){var a=this.host.__shady_getRootNode();if(v(a)){var b=q(this.host);if(b&&0<b.P)return a}};k.R=function(){var a=this.F&&this.eb();a&&a._renderSelf()};k.Za=function(){!this.sa&&this.F&&this.R()};
k._renderSelf=function(){var a=J;J=!0;this.F=!1;this.a&&(this.Ua(),this.Sa());if(!r.preferPerformance&&!this.sa)for(var b=this.host.__shady_firstChild;b;b=b.__shady_nextSibling){var c=q(b);b.__shady_native_parentNode!==this.host||"slot"!==b.localName&&c.assignedSlot||this.host.__shady_native_removeChild(b)}this.sa=!0;J=a;Fc&&Fc()};
k.Ua=function(){this.U();for(var a=0,b;a<this.a.length;a++)b=this.a[a],this.Ra(b);for(a=this.host.__shady_firstChild;a;a=a.__shady_nextSibling)this.pa(a);for(a=0;a<this.a.length;a++){b=this.a[a];var c=q(b);if(!c.assignedNodes.length)for(var d=b.__shady_firstChild;d;d=d.__shady_nextSibling)this.pa(d,b);(d=(d=q(b.__shady_parentNode))&&d.root)&&(d.ra()||d.F)&&d._renderSelf();this.ma(c.H,c.assignedNodes);if(d=c.xa){for(var e=0;e<d.length;e++)q(d[e]).da=null;c.xa=null;d.length>c.assignedNodes.length&&
(c.ha=!0)}c.ha&&(c.ha=!1,this.qa(b))}};k.pa=function(a,b){var c=p(a),d=c.da;c.da=null;b||(b=(b=this.c[a.__shady_slot||"__catchall"])&&b[0]);b?(p(b).assignedNodes.push(a),c.assignedSlot=b):c.assignedSlot=void 0;d!==c.assignedSlot&&c.assignedSlot&&(p(c.assignedSlot).ha=!0)};k.Ra=function(a){var b=q(a),c=b.assignedNodes;b.assignedNodes=[];b.H=[];if(b.xa=c)for(b=0;b<c.length;b++){var d=q(c[b]);d.da=d.assignedSlot;d.assignedSlot===a&&(d.assignedSlot=null)}};
k.ma=function(a,b){for(var c=0,d=void 0;c<b.length&&(d=b[c]);c++)if("slot"==d.localName){var e=q(d).assignedNodes;e&&e.length&&this.ma(a,e)}else a.push(b[c])};k.qa=function(a){a.__shady_native_dispatchEvent(new Event("slotchange"));a=q(a);a.assignedSlot&&this.qa(a.assignedSlot)};k.Sa=function(){for(var a=this.a,b=[],c=0;c<a.length;c++){var d=a[c].__shady_parentNode,e=q(d);e&&e.root||!(0>b.indexOf(d))||b.push(d)}for(a=0;a<b.length;a++)c=b[a],this.Bb(c===this?this.host:c,this.Ta(c))};
k.Ta=function(a){var b=[];for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)if(this.gb(a))for(var c=q(a).H,d=0;d<c.length;d++)b.push(c[d]);else b.push(a);return b};k.gb=function(a){return"slot"==a.localName};
k.Bb=function(a,b){for(var c=ta(a),d=Ib(b,b.length,c,c.length),e=0,f=0,g=void 0;e<d.length&&(g=d[e]);e++){for(var h=0,l=void 0;h<g.M.length&&(l=g.M[h]);h++)l.__shady_native_parentNode===a&&a.__shady_native_removeChild(l),c.splice(g.index+f,1);f-=g.V}e=0;for(f=void 0;e<d.length&&(f=d[e]);e++)for(g=c[f.index],h=f.index;h<f.index+f.V;h++)l=b[h],a.__shady_native_insertBefore(l,g),c.splice(h,0,l)};k.Ya=function(){this.A=this.A||[];this.a=this.a||[];this.c=this.c||{}};
k.na=function(a){this.Ya();this.A.push.apply(this.A,a instanceof Array?a:da(ca(a)))};k.U=function(){this.A&&this.A.length&&(this.jb(this.A),this.A=[])};k.jb=function(a){for(var b,c=0;c<a.length;c++){var d=a[c];jc(d);var e=d.__shady_parentNode;jc(e);e=q(e);e.P=(e.P||0)+1;e=this.va(d);this.c[e]?(b=b||{},b[e]=!0,this.c[e].push(d)):this.c[e]=[d];this.a.push(d)}if(b)for(var f in b)this.c[f]=this.za(this.c[f])};k.va=function(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.Na=b};
k.za=function(a){return a.sort(function(b,c){b=Gc(b);for(var d=Gc(c),e=0;e<b.length;e++){c=b[e];var f=d[e];if(c!==f)return b=ua(c.__shady_parentNode),b.indexOf(c)-b.indexOf(f)}})};k.pb=function(a){if(this.a){this.U();var b=this.c,c;for(c in b)for(var d=b[c],e=0;e<d.length;e++){var f=d[e];if(ra(a,f)){d.splice(e,1);var g=this.a.indexOf(f);0<=g&&(this.a.splice(g,1),(g=q(f.__shady_parentNode))&&g.P&&g.P--);e--;this.qb(f);g=!0}}return g}};
k.Cb=function(a){if(this.a){this.U();var b=a.Na,c=this.va(a);if(c!==b){b=this.c[b];var d=b.indexOf(a);0<=d&&b.splice(d,1);b=this.c[c]||(this.c[c]=[]);b.push(a);1<b.length&&(this.c[c]=this.za(b))}}};k.qb=function(a){a=q(a);var b=a.H;if(b)for(var c=0;c<b.length;c++){var d=b[c],e=d.__shady_native_parentNode;e&&e.__shady_native_removeChild(d)}a.H=[];a.assignedNodes=[]};k.ra=function(){this.U();return!(!this.a||!this.a.length)};
(function(a){a.__proto__=DocumentFragment.prototype;Ec(a,"__shady_");Ec(a);Object.defineProperties(a,{nodeType:{value:Node.DOCUMENT_FRAGMENT_NODE,configurable:!0},nodeName:{value:"#document-fragment",configurable:!0},nodeValue:{value:null,configurable:!0}});["localName","namespaceURI","prefix"].forEach(function(b){Object.defineProperty(a,b,{value:void 0,configurable:!0})});["ownerDocument","baseURI","isConnected"].forEach(function(b){Object.defineProperty(a,b,{get:function(){return this.host[b]},
configurable:!0})})})(kc.prototype);
if(window.customElements&&window.customElements.define&&r.ia&&!r.preferPerformance){var Hc=new Map;Fc=function(){var a=[];Hc.forEach(function(d,e){a.push([e,d])});Hc.clear();for(var b=0;b<a.length;b++){var c=a[b][0];a[b][1]?c.__shadydom_connectedCallback():c.__shadydom_disconnectedCallback()}};J&&document.addEventListener("readystatechange",function(){J=!1;Fc()},{once:!0});var Ic=function(a,b,c){var d=0,e="__isConnected"+d++;if(b||c)a.prototype.connectedCallback=a.prototype.__shadydom_connectedCallback=
function(){J?Hc.set(this,!0):this[e]||(this[e]=!0,b&&b.call(this))},a.prototype.disconnectedCallback=a.prototype.__shadydom_disconnectedCallback=function(){J?this.isConnected||Hc.set(this,!1):this[e]&&(this[e]=!1,c&&c.call(this))};return a},Jc=window.customElements.define,Kc=function(a,b){var c=b.prototype.connectedCallback,d=b.prototype.disconnectedCallback;Jc.call(window.customElements,a,Ic(b,c,d));b.prototype.connectedCallback=c;b.prototype.disconnectedCallback=d};window.customElements.define=
Kc;Object.defineProperty(window.CustomElementRegistry.prototype,"define",{value:Kc,configurable:!0})}function E(a){a=a.__shady_getRootNode();if(v(a))return a};function K(a){this.node=a}k=K.prototype;k.addEventListener=function(a,b,c){return this.node.__shady_addEventListener(a,b,c)};k.removeEventListener=function(a,b,c){return this.node.__shady_removeEventListener(a,b,c)};k.appendChild=function(a){return this.node.__shady_appendChild(a)};k.insertBefore=function(a,b){return this.node.__shady_insertBefore(a,b)};k.removeChild=function(a){return this.node.__shady_removeChild(a)};k.replaceChild=function(a,b){return this.node.__shady_replaceChild(a,b)};
k.cloneNode=function(a){return this.node.__shady_cloneNode(a)};k.getRootNode=function(a){return this.node.__shady_getRootNode(a)};k.contains=function(a){return this.node.__shady_contains(a)};k.dispatchEvent=function(a){return this.node.__shady_dispatchEvent(a)};k.setAttribute=function(a,b){this.node.__shady_setAttribute(a,b)};k.getAttribute=function(a){return this.node.__shady_native_getAttribute(a)};k.hasAttribute=function(a){return this.node.__shady_native_hasAttribute(a)};k.removeAttribute=function(a){this.node.__shady_removeAttribute(a)};
k.attachShadow=function(a){return this.node.__shady_attachShadow(a)};k.focus=function(){this.node.__shady_native_focus()};k.blur=function(){this.node.__shady_blur()};k.importNode=function(a,b){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_importNode(a,b)};k.getElementById=function(a){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_getElementById(a)};k.querySelector=function(a){return this.node.__shady_querySelector(a)};
k.querySelectorAll=function(a,b){return this.node.__shady_querySelectorAll(a,b)};k.assignedNodes=function(a){if("slot"===this.node.localName)return this.node.__shady_assignedNodes(a)};
fa.Object.defineProperties(K.prototype,{activeElement:{configurable:!0,enumerable:!0,get:function(){if(v(this.node)||this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_activeElement}},_activeElement:{configurable:!0,enumerable:!0,get:function(){return this.activeElement}},host:{configurable:!0,enumerable:!0,get:function(){if(v(this.node))return this.node.host}},parentNode:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_parentNode}},firstChild:{configurable:!0,
enumerable:!0,get:function(){return this.node.__shady_firstChild}},lastChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastChild}},nextSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextSibling}},previousSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousSibling}},childNodes:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childNodes}},parentElement:{configurable:!0,enumerable:!0,
get:function(){return this.node.__shady_parentElement}},firstElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_firstElementChild}},lastElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastElementChild}},nextElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextElementSibling}},previousElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousElementSibling}},
children:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_children}},childElementCount:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childElementCount}},shadowRoot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_shadowRoot}},assignedSlot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_assignedSlot}},isConnected:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_isConnected}},innerHTML:{configurable:!0,
enumerable:!0,get:function(){return this.node.__shady_innerHTML},set:function(a){this.node.__shady_innerHTML=a}},textContent:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_textContent},set:function(a){this.node.__shady_textContent=a}},slot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_slot},set:function(a){this.node.__shady_slot=a}},className:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_className},set:function(a){return this.node.__shady_className=
a}}});function Lc(a){Object.defineProperty(K.prototype,a,{get:function(){return this.node["__shady_"+a]},set:function(b){this.node["__shady_"+a]=b},configurable:!0})}Eb.forEach(function(a){return Lc(a)});Fb.forEach(function(a){return Lc(a)});var Mc=new WeakMap;function Nc(a){if(v(a)||a instanceof K)return a;var b=Mc.get(a);b||(b=new K(a),Mc.set(a,b));return b};if(r.ia){var Oc=r.h?function(a){return a}:function(a){db(a);cb(a);return a},ShadyDOM={inUse:r.ia,patch:Oc,isShadyRoot:v,enqueue:Aa,flush:Ba,flushInitial:function(a){a.Za()},settings:r,filterMutations:Ga,observeChildren:Ea,unobserveChildren:Fa,deferConnectionCallbacks:r.deferConnectionCallbacks,preferPerformance:r.preferPerformance,handlesDynamicScoping:!0,wrap:r.l?Nc:Oc,wrapIfNeeded:!0===r.l?Nc:function(a){return a},Wrapper:K,composedPath:mb,noPatch:r.l,patchOnDemand:r.ka,nativeMethods:Pa,nativeTree:Qa,
patchElementProto:yc};window.ShadyDOM=ShadyDOM;Xa();xc("__shady_");Object.defineProperty(document,"_activeElement",sc.activeElement);x(Window.prototype,vc,"__shady_");r.l?r.ka&&x(Element.prototype,mc):(xc(),Db());yb();window.Event=Ab;window.CustomEvent=Bb;window.MouseEvent=Cb;window.ShadowRoot=kc};/*

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
*/
function Pc(){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 Qc(a){var b=a=a.replace(Rc,"").replace(Sc,""),c=new Pc;c.start=0;c.end=b.length;for(var d=c,e=0,f=b.length;e<f;e++)if("{"===b[e]){d.rules||(d.rules=[]);var g=d,h=g.rules[g.rules.length-1]||null;d=new Pc;d.start=e+1;d.parent=g;d.previous=h;g.rules.push(d)}else"}"===b[e]&&(d.end=e+1,d=d.parent||c);return Tc(c,a)}
function Tc(a,b){var c=b.substring(a.start,a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&(c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=_expandUnicodeEscapes$$module$third_party$javascript$polymer$v2$shadycss$src$css_parse(c),c=c.replace(Uc," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=0===c.indexOf("@"),a.atRule?0===c.indexOf("@media")?a.type=4:c.match(Vc)&&(a.type=7,a.keyframesName=a.selector.split(Uc).pop()):a.type=0===c.indexOf("--")?
1E3:1);if(c=a.rules)for(var d=0,e=c.length,f=void 0;d<e&&(f=c[d]);d++)Tc(f,b);return a}function _expandUnicodeEscapes$$module$third_party$javascript$polymer$v2$shadycss$src$css_parse(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(b,c){b=c;for(c=6-b.length;c--;)b="0"+b;return"\\"+b})}
function Wc(a,b,c){c=void 0===c?"":c;var d="";if(a.cssText||a.rules){var e=a.rules;if(e&&!_hasMixinRules$$module$third_party$javascript$polymer$v2$shadycss$src$css_parse(e))for(var f=0,g=e.length,h=void 0;f<g&&(h=e[f]);f++)d=Wc(h,b,d);else b?b=a.cssText:(b=a.cssText,b=b.replace(Xc,"").replace(Yc,""),b=b.replace(Zc,"").replace($c,"")),(d=b.trim())&&(d="  "+d+"\n")}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="}\n\n"));return c}
function _hasMixinRules$$module$third_party$javascript$polymer$v2$shadycss$src$css_parse(a){a=a[0];return!!a&&!!a.selector&&0===a.selector.indexOf("--")}var Rc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,Sc=/@import[^;]*;/gim,Xc=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,Yc=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,Zc=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,$c=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,Vc=/^@[^\s]*keyframes/,Uc=/\s+/g;var L=!(window.ShadyDOM&&window.ShadyDOM.inUse),ad;function bd(a){ad=a&&a.shimcssproperties?!1:L||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}var cd;window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(cd=window.ShadyCSS.cssBuild);var M=!(!window.ShadyCSS||!window.ShadyCSS.disableRuntime);
window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?ad=window.ShadyCSS.nativeCss:window.ShadyCSS?(bd(window.ShadyCSS),window.ShadyCSS=void 0):bd(window.WebComponents&&window.WebComponents.flags);var N=ad;var dd=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,ed=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,fd=/(--[\w-]+)\s*([:,;)]|$)/gi,gd=/(animation\s*:)|(animation-name\s*:)/,hd=/@media\s(.*)/,id=/\{[^}]*\}/g;var jd=new Set;function O(a,b){if(!a)return"";"string"===typeof a&&(a=Qc(a));b&&P(a,b);return Wc(a,N)}function kd(a){!a.__cssRules&&a.textContent&&(a.__cssRules=Qc(a.textContent));return a.__cssRules||null}function ld(a){return!!a.parent&&7===a.parent.type}function P(a,b,c,d){if(a){var e=!1,f=a.type;if(d&&4===f){var g=a.selector.match(hd);g&&(window.matchMedia(g[1]).matches||(e=!0))}1===f?b(a):c&&7===f?c(a):1E3===f&&(e=!0);if((a=a.rules)&&!e)for(e=0,f=a.length,g=void 0;e<f&&(g=a[e]);e++)P(g,b,c,d)}}
function md(a,b,c,d){var e=document.createElement("style");b&&e.setAttribute("scope",b);e.textContent=a;nd(e,c,d);return e}var Q=null;function od(a){a=document.createComment(" Shady DOM styles for "+a+" ");var b=document.head;b.insertBefore(a,(Q?Q.nextSibling:null)||b.firstChild);return Q=a}function nd(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);Q?a.compareDocumentPosition(Q)===Node.DOCUMENT_POSITION_PRECEDING&&(Q=a):Q=a}
function pd(a,b){for(var c=0,d=a.length;b<d;b++)if("("===a[b])c++;else if(")"===a[b]&&0===--c)return b;return-1}function qd(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");var d=pd(a,c+3),e=a.substring(c+4,d);c=a.substring(0,c);a=qd(a.substring(d+1),b);d=e.indexOf(",");return-1===d?b(c,e.trim(),"",a):b(c,e.substring(0,d).trim(),e.substring(d+1).trim(),a)}function rd(a,b){L?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)}
var sd=window.ShadyDOM&&window.ShadyDOM.wrap||function(a){return a};function R(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||""):(b=a.is,c=a.extends);return{is:b,N:c}}function td(a){for(var b=[],c="",d=0;0<=d&&d<a.length;d++)if("("===a[d]){var e=pd(a,d);c+=a.slice(d,e+1);d=e}else","===a[d]?(b.push(c),c=""):c+=a[d];c&&b.push(c);return b}
function S(a){if(void 0!==cd)return cd;if(void 0===a.__cssBuild){var b=a.getAttribute("css-build");if(b)a.__cssBuild=b;else{a:{b="template"===a.localName?a.content.firstChild:a.firstChild;if(b instanceof Comment&&(b=b.textContent.trim().split(":"),"css-build"===b[0])){b=b[1];break a}b=""}if(""!==b){var c="template"===a.localName?a.content.firstChild:a.firstChild;c.parentNode.removeChild(c)}a.__cssBuild=b}}return a.__cssBuild||""}
function ud(a){a=void 0===a?"":a;return""!==a&&N?L?"shadow"===a:"shady"===a:!1};function vd(){}function wd(a,b){var c=T;c.T(a,function(d){c.element(d,b||"")})}k=vd.prototype;k.T=function(a,b){a.nodeType===Node.ELEMENT_NODE&&b(a);if(a="template"===a.localName?(a.content||a._content||a).childNodes:a.children||a.childNodes)for(var c=0;c<a.length;c++)this.T(a[c],b)};
k.element=function(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),a.classList.remove(b)):(a.classList.add("style-scope"),a.classList.add(b));else if(a.getAttribute){var d=a.getAttribute("class");c?d&&(b=d.replace("style-scope","").replace(b,""),rd(a,b)):rd(a,(d?d+" ":"")+"style-scope "+b)}};function xd(a,b,c){var d=T;d.T(a,function(e){d.element(e,b,!0);d.element(e,c)})}function yd(a,b){var c=T;c.T(a,function(d){c.element(d,b||"",!0)})}
function zd(a,b,c,d,e){var f=T;e=void 0===e?"":e;""===e&&(L||"shady"===(void 0===d?"":d)?e=O(b,c):(a=R(a),e=Ad(f,b,a.is,a.N,c)+"\n\n"));return e.trim()}function Ad(a,b,c,d,e){var f=a.aa(c,d);c=a.oa(c);return O(b,function(g){g.Kb||(a.Aa(g,a.fa,c,f),g.Kb=!0);e&&e(g,c,f)})}k.oa=function(a){return a?"."+a:""};k.aa=function(a,b){return b?"[is="+a+"]":a};k.Aa=function(a,b,c,d){a.selector=a.i=this.Ba(a,b,c,d)};
k.Ba=function(a,b,c,d){var e=td(a.selector);if(!ld(a)){a=0;for(var f=e.length,g=void 0;a<f&&(g=e[a]);a++)e[a]=b.call(this,g,c,d)}return e.filter(function(h){return!!h}).join(",")};k.Da=function(a){return a.replace(Bd,function(b,c,d){-1<d.indexOf("+")?d=d.replace(/\+/g,"___"):-1<d.indexOf("___")&&(d=d.replace(/___/g,"+"));return":"+c+"("+d+")"})};
k.ob=function(a){for(var b=[],c;c=a.match(Cd);){var d=c.index,e=pd(a,d);if(-1===e)throw Error(c.input+" selector missing ')'");c=a.slice(d,e+1);a=a.replace(c,"\ue000");b.push(c)}return{la:a,matches:b}};k.sb=function(a,b){var c=a.split("\ue000");return b.reduce(function(d,e,f){return d+e+c[f+1]},c[0])};
k.fa=function(a,b,c){var d=this,e=!1;a=a.trim();var f=Bd.test(a);f&&(a=a.replace(Bd,function(l,m,n){return":"+m+"("+n.replace(/\s/g,"")+")"}),a=this.Da(a));var g=Cd.test(a);if(g){var h=this.ob(a);a=h.la;h=h.matches}a=a.replace(Dd,":host $1");a=a.replace(Ed,function(l,m,n){e||(l=d.yb(n,m,b,c),e=e||l.stop,m=l.Eb,n=l.value);return m+n});g&&(a=this.sb(a,h));f&&(a=this.Da(a));return a=a.replace(Fd,function(l,m,n,t){return'[dir="'+n+'"] '+m+t+", "+m+'[dir="'+n+'"]'+t})};
k.yb=function(a,b,c,d){var e=a.indexOf("::slotted");0<=a.indexOf(":host")?a=this.Ab(a,d):0!==e&&(a=c?this.Ca(a,c):a);c=!1;0<=e&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(Gd,function(g,h){return" > "+h}))}return{value:a,Eb:b,stop:f}};k.Ca=function(a,b){a=a.split(/(\[.+?\])/);for(var c=[],d=0;d<a.length;d++)if(1===d%2)c.push(a[d]);else{var e=a[d];if(""!==e||d!==a.length-1)e=e.split(":"),e[0]+=b,c.push(e.join(":"))}return c.join("")};
k.Ab=function(a,b){var c=a.match(Hd);return(c=c&&c[2].trim()||"")?c[0].match(Id)?a.replace(Hd,function(d,e,f){return b+f}):c.split(Id)[0]===b?c:"should_not_match":a.replace(":host",b)};function Jd(a){":root"===a.selector&&(a.selector="html")}k.zb=function(a){return a.match(":host")?"":a.match("::slotted")?this.fa(a,":not(.style-scope)"):this.Ca(a.trim(),":not(.style-scope)")};fa.Object.defineProperties(vd.prototype,{O:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});
var Bd=/:(nth[-\w]+)\(([^)]+)\)/,Ed=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Id=/[[.:#*]/,Dd=/^(::slotted)/,Hd=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Gd=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Fd=/(.*):dir\((?:(ltr|rtl))\)(.*)/,Cd=/:(?:matches|any|-(?:webkit|moz)-any)/,T=new vd;function U(a,b,c,d,e){this.o=a||null;this.placeholder=b||null;this.ja=c||[];this.I=null;this.cssBuild=e||"";this.N=d||"";this.G=this.m=this.v=null}function V(a){return a?a.__styleInfo:null}function Kd(a,b){return a.__styleInfo=b}U.prototype.fb=function(){return this.o};U.prototype._getStyleRules=U.prototype.fb;function Ld(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Md=/:host\s*>\s*/,Nd=navigator.userAgent.match("Trident");function W(){}function Od(a){var b={},c=[],d=0;P(a,function(f){Pd(f);f.index=d++;f=f.f.cssText;for(var g;g=fd.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0)}},function(f){c.push(f)});a.hb=c;a=[];for(var e in b)a.push(e);return a}
function Pd(a){if(!a.f){var b={},c={};Qd(a,c)&&(b.u=c,a.rules=null);b.cssText=a.parsedCssText.replace(id,"").replace(dd,"");a.f=b}}function Qd(a,b){var c=a.f;if(c){if(c.u)return Object.assign(b,c.u),!0}else{c=a.parsedCssText;for(var d;a=dd.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}}
function Rd(a,b,c){b&&(b=0<=b.indexOf(";")?Sd(a,b,c):qd(b,function(d,e,f,g){if(!e)return d+g;(e=Rd(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=Rd(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""}
function Sd(a,b,c){b=b.split(";");for(var d=0,e,f;d<b.length;d++)if(e=b[d]){ed.lastIndex=0;if(f=ed.exec(e))e=Rd(a,c[f[1]],c);else if(f=e.indexOf(":"),-1!==f){var g=e.substring(f);g=g.trim();g=Rd(a,g,c)||g;e=e.substring(0,f)+g}b[d]=e&&e.lastIndexOf(";")===e.length-1?e.slice(0,-1):e||""}return b.join(";")}
function Td(a,b){var c={},d=[];P(a,function(e){e.f||Pd(e);var f=e.i||e.parsedSelector;b&&e.f.u&&f&&Ld.call(b,f)&&(Qd(e,c),e=e.index,f=parseInt(e/32,10),d[f]=(d[f]||0)|1<<e%32)},null,!0);return{u:c,key:d}}
function Ud(a,b,c,d){b.f||Pd(b);if(b.f.u){var e=R(a);a=e.is;e=e.N;e=a?T.aa(a,e):"html";var f=b.parsedSelector;var g=!!f.match(Md)||"html"===e&&-1<f.indexOf("html");var h=0===f.indexOf(":host")&&!g;"shady"===c&&(g=f===e+" > *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));if(g||h)c=e,h&&(b.i||(b.i=T.Ba(b,T.fa,T.oa(a),e)),c=b.i||e),g&&"html"===e&&(c=b.i||b.Xb),d({la:c,Jb:h,Wb:g})}}
function Vd(a,b,c){var d={},e={};P(b,function(f){Ud(a,f,c,function(g){Ld.call(a._element||a,g.la)&&(g.Jb?Qd(f,d):Qd(f,e))})},null,!0);return{Ob:e,Ib:d}}
function Wd(a,b,c,d){var e=R(b),f=T.aa(e.is,e.N),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=V(b);e=h.o;h=h.cssBuild;var l=a.Va(b,e,d);return zd(b,e,function(m){var n="";m.f||Pd(m);m.f.cssText&&(n=Sd(a,m.f.cssText,c));m.cssText=n;if(!L&&!ld(m)&&m.cssText){var t=n=m.cssText;null==m.Ea&&(m.Ea=gd.test(n));if(m.Ea)if(null==m.X){m.X=[];for(var A in l)t=l[A],t=t(n),n!==t&&(n=t,m.X.push(A))}else{for(A=0;A<m.X.length;++A)t=l[m.X[A]],n=t(n);t=n}m.cssText=t;a.wb(m,
g,f,d)}},h)}W.prototype.Va=function(a,b,c){a=b.hb;b={};if(!L&&a)for(var d=0,e=a[d];d<a.length;e=a[++d])this.vb(e,c),b[e.keyframesName]=this.ib(e);return b};W.prototype.ib=function(a){return function(b){return b.replace(a.Lb,a.Ia)}};W.prototype.vb=function(a,b){a.Lb=new RegExp("\\b"+a.keyframesName+"(?!\\B|-)","g");a.Ia=a.keyframesName+"-"+b;a.i=a.i||a.selector;a.selector=a.i.replace(a.keyframesName,a.Ia)};
W.prototype.wb=function(a,b,c,d){a.i=a.i||a.selector;d="."+d;for(var e=td(a.i),f=0,g=e.length,h=void 0;f<g&&(h=e[f]);f++)e[f]=h.match(b)?h.replace(c,d):d+" "+h;a.selector=e.join(",")};function Xd(a,b){var c=Yd,d=kd(a);a.textContent=O(d,function(e){var f=e.cssText=e.parsedCssText;e.f&&e.f.cssText&&(f=f.replace(Xc,"").replace(Yc,""),e.cssText=Sd(c,f,b))})}fa.Object.defineProperties(W.prototype,{Ka:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var Yd=new W;var X={},Zd=window.customElements;if(Zd&&!L&&!M){var $d=Zd.define;Zd.define=function(a,b,c){X[a]||(X[a]=od(a));$d.call(Zd,a,b,c)}};function ae(){this.cache={};this.Tb=100}ae.prototype.Db=function(a,b,c){for(var d=0;d<c.length;d++){var e=c[d];if(a.u[e]!==b[e])return!1}return!0};ae.prototype.store=function(a,b,c,d){var e=this.cache[a]||[];e.push({u:b,styleElement:c,m:d});e.length>this.Tb&&e.shift();this.cache[a]=e};ae.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.Db(e,b,c))return e}};function be(){}var ce=new RegExp(T.O+"\\s*([^\\s]*)");function de(a){return(a=(a.classList&&a.classList.value?a.classList.value:a.getAttribute("class")||"").match(ce))?a[1]:""}function ee(a){var b=sd(a).getRootNode();return b===a||b===a.ownerDocument?"":(a=b.host)?R(a).is:""}
function fe(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var d=0;d<c.addedNodes.length;d++){var e=c.addedNodes[d];if(e.nodeType===Node.ELEMENT_NODE){var f=e.getRootNode(),g=de(e);if(g&&f===e.ownerDocument&&("style"!==e.localName&&"template"!==e.localName||""===S(e)))yd(e,g);else if(f instanceof ShadowRoot)for(f=ee(e),f!==g&&xd(e,g,f),e=window.ShadyDOM.nativeMethods.querySelectorAll.call(e,":not(."+T.O+")"),g=0;g<e.length;g++){f=e[g];
var h=ee(f);h&&T.element(f,h)}}}}}
if(!(L||window.ShadyDOM&&window.ShadyDOM.handlesDynamicScoping)){var ge=new MutationObserver(fe),he=function(a){ge.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)he(document);else{var ie=function(){he(document.body)};window.HTMLImports?window.HTMLImports.whenReady(ie):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){ie();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",
a)}else ie()})}be=function(){fe(ge.takeRecords())}};var je={};var ke=Promise.resolve();function le(a){if(a=je[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function me(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function ne(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a._validating||(a._validating=!0,ke.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a._validating=!1}))};var oe={},pe=new ae;function Y(){this.ya={};this.D=document.documentElement;var a=new Pc;a.rules=[];this.s=Kd(this.D,new U(a));this.ba=!1;this.b=this.g=null}k=Y.prototype;k.flush=function(){be()};k.ab=function(a){var b=this.ya[a]=(this.ya[a]||0)+1;return a+"-"+b};k.Gb=function(a){return kd(a)};k.Sb=function(a){return O(a)};
k.$a=function(a){var b=[];a=a.content.querySelectorAll("style");for(var c=0;c<a.length;c++){var d=a[c];if(d.hasAttribute("shady-unscoped")){if(!L){var e=d.textContent;if(!jd.has(e)){jd.add(e);var f=document.createElement("style");f.setAttribute("shady-unscoped","");f.textContent=e;document.head.appendChild(f)}d.parentNode.removeChild(d)}}else b.push(d.textContent),d.parentNode.removeChild(d)}return b.join("").trim()};
k.prepareTemplate=function(a,b,c){this.prepareTemplateDom(a,b);this.prepareTemplateStyles(a,b,c)};
k.prepareTemplateStyles=function(a,b,c){if(!a._prepared&&!M){L||X[b]||(X[b]=od(b));a._prepared=!0;a.name=b;a.extends=c;je[b]=a;var d=S(a),e=ud(d);c={is:b,extends:c};var f=this.$a(a)+(oe[b]||"");this.J();if(!e){var g;if(g=!d)g=ed.test(f)||dd.test(f),ed.lastIndex=0,dd.lastIndex=0;var h=Qc(f);g&&N&&this.g&&this.g.transformRules(h,b);a._styleAst=h}g=[];N||(g=Od(a._styleAst));if(!g.length||N)b=this.bb(c,a._styleAst,L?a.content:null,X[b]||null,d,e?f:""),a._style=b;a.nb=g}};k.Mb=function(a,b){oe[b]=a.join(" ")};
k.prepareTemplateDom=function(a,b){if(!M){var c=S(a);L||"shady"===c||a._domPrepared||(a._domPrepared=!0,wd(a.content,b))}};k.bb=function(a,b,c,d,e,f){f=zd(a,b,null,e,f);return f.length?md(f,a.is,c,d):null};k.wa=function(a){var b=R(a),c=b.is;b=b.N;var d=X[c]||null,e=je[c];if(e){c=e._styleAst;var f=e.nb;e=S(e);b=new U(c,d,f,b,e);Kd(a,b);return b}};k.Wa=function(){return!this.g&&window.ShadyCSS&&window.ShadyCSS.ApplyShim?(this.g=window.ShadyCSS.ApplyShim,this.g.invalidCallback=le,!0):!1};
k.Xa=function(){var a=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(b){a.Ha(b)},this.b.validateCallback=function(){requestAnimationFrame(function(){(a.b.enqueued||a.ba)&&a.flushCustomStyles()})})};k.J=function(){var a=this.Wa();this.Xa();return a};
k.flushCustomStyles=function(){if(!M){var a=this.J();if(this.b){var b=this.b.processStyles();!a&&!this.b.enqueued||ud(this.s.cssBuild)||(N?this.s.cssBuild||this.ub(b):(this.rb(b),this.ga(this.D,this.s),this.Oa(b),this.ba&&this.styleDocument()),this.b.enqueued=!1)}}};
k.rb=function(a){var b=this;a=a.map(function(c){return b.b.getStyleForCustomStyle(c)}).filter(function(c){return!!c});a.sort(function(c,d){c=d.compareDocumentPosition(c);return c&Node.DOCUMENT_POSITION_FOLLOWING?1:c&Node.DOCUMENT_POSITION_PRECEDING?-1:0});this.s.o.rules=a.map(function(c){return kd(c)})};
k.styleElement=function(a,b){if(M){if(b){V(a)||Kd(a,new U(null));var c=V(a);this.ua(c,b);qe(this,a,c)}}else if(c=V(a)||this.wa(a))this.ca(a)||(this.ba=!0),b&&this.ua(c,b),N?qe(this,a,c):(this.flush(),this.ga(a,c),c.ja&&c.ja.length&&this.Pa(a,c))};k.ua=function(a,b){a.I=a.I||{};Object.assign(a.I,b)};
function qe(a,b,c){var d=R(b).is;if(c.I){var e=c.I,f;for(f in e)null===f?b.style.removeProperty(f):b.style.setProperty(f,e[f])}if(((e=je[d])||a.ca(b))&&(!e||""===S(e))&&e&&e._style&&!me(e)){if(me(e)||e._applyShimValidatingVersion!==e._applyShimNextVersion)a.J(),a.g&&a.g.transformRules(e._styleAst,d),e._style.textContent=zd(b,c.o),ne(e);L&&(a=b.shadowRoot)&&(a=a.querySelector("style"))&&(a.textContent=zd(b,c.o));c.o=e._styleAst}}
k.ea=function(a){return(a=sd(a).getRootNode().host)?V(a)||this.wa(a)?a:this.ea(a):this.D};k.ca=function(a){return a===this.D};
k.Pa=function(a,b){var c=R(a).is,d=pe.fetch(c,b.v,b.ja),e=d?d.styleElement:null,f=b.m;b.m=d&&d.m||this.ab(c);var g=b.m;var h=Yd;h=e?e.textContent||"":Wd(h,a,b.v,g);var l=V(a),m=l.G;m&&!L&&m!==e&&(m._useCount--,0>=m._useCount&&m.parentNode&&m.parentNode.removeChild(m));L?l.G?(l.G.textContent=h,e=l.G):h&&(e=md(h,g,a.shadowRoot,l.placeholder)):e?e.parentNode||(Nd&&-1<h.indexOf("@media")&&(e.textContent=h),nd(e,null,l.placeholder)):h&&(e=md(h,g,null,l.placeholder));e&&(e._useCount=e._useCount||0,l.G!=
e&&e._useCount++,l.G=e);g=e;L||(e=b.m,l=h=a.getAttribute("class")||"",f&&(l=h.replace(new RegExp("\\s*x-scope\\s*"+f+"\\s*","g")," ")),l+=(l?" ":"")+"x-scope "+e,h!==l&&rd(a,l));d||pe.store(c,b.v,g,b.m);return g};k.ga=function(a,b){var c=this.ea(a),d=V(c),e=d.v;c===this.D||e||(this.ga(c,d),e=d.v);c=Object.create(e||null);e=Vd(a,b.o,b.cssBuild);a=Td(d.o,a).u;Object.assign(c,e.Ib,a,e.Ob);this.kb(c,b.I);a=Yd;d=Object.getOwnPropertyNames(c);e=0;for(var f;e<d.length;e++)f=d[e],c[f]=Rd(a,c[f],c);b.v=c};
k.kb=function(a,b){for(var c in b){var d=b[c];if(d||0===d)a[c]=d}};k.styleDocument=function(a){this.styleSubtree(this.D,a)};k.styleSubtree=function(a,b){var c=sd(a),d=c.shadowRoot,e=this.ca(a);(d||e)&&this.styleElement(a,b);if(a=e?c:d)for(a=Array.from(a.querySelectorAll("*")).filter(function(f){return sd(f).shadowRoot}),b=0;b<a.length;b++)this.styleSubtree(a[b])};k.ub=function(a){for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);c&&this.tb(c)}};
k.Oa=function(a){for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);c&&Xd(c,this.s.v)}};k.Ha=function(a){var b=this,c=S(a);c!==this.s.cssBuild&&(this.s.cssBuild=c);if(!ud(c)){var d=kd(a);P(d,function(e){if(L)Jd(e);else{var f=T;e.selector=e.parsedSelector;Jd(e);f.Aa(e,f.zb)}N&&""===c&&(b.J(),b.g&&b.g.transformRule(e))});N?a.textContent=O(d):this.s.o.rules.push(d)}};k.tb=function(a){if(N&&this.g){var b=kd(a);this.J();this.g.transformRules(b);a.textContent=O(b)}};
k.getComputedStyleValue=function(a,b){var c;N||(c=(V(a)||V(this.ea(a))).v[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};k.Rb=function(a,b){var c=sd(a).getRootNode();b=b?("string"===typeof b?b:String(b)).split(/\s/):[];c=c.host&&c.host.localName;if(!c){var d=a.getAttribute("class");if(d){d=d.split(/\s/);for(var e=0;e<d.length;e++)if(d[e]===T.O){c=d[e+1];break}}}c&&b.push(T.O,c);N||(c=V(a))&&c.m&&b.push(Yd.Ka,c.m);rd(a,b.join(" "))};k.xb=function(a){return V(a)};
k.Qb=function(a,b){T.element(a,b)};k.Ub=function(a,b){T.element(a,b,!0)};k.Pb=function(a){return ee(a)};k.Fb=function(a){return de(a)};Y.prototype.flush=Y.prototype.flush;Y.prototype.prepareTemplate=Y.prototype.prepareTemplate;Y.prototype.styleElement=Y.prototype.styleElement;Y.prototype.styleDocument=Y.prototype.styleDocument;Y.prototype.styleSubtree=Y.prototype.styleSubtree;Y.prototype.getComputedStyleValue=Y.prototype.getComputedStyleValue;Y.prototype.setElementClass=Y.prototype.Rb;
Y.prototype._styleInfoForNode=Y.prototype.xb;Y.prototype.transformCustomStyleForDocument=Y.prototype.Ha;Y.prototype.getStyleAst=Y.prototype.Gb;Y.prototype.styleAstToString=Y.prototype.Sb;Y.prototype.flushCustomStyles=Y.prototype.flushCustomStyles;Y.prototype.scopeNode=Y.prototype.Qb;Y.prototype.unscopeNode=Y.prototype.Ub;Y.prototype.scopeForNode=Y.prototype.Pb;Y.prototype.currentScopeForNode=Y.prototype.Fb;Y.prototype.prepareAdoptedCssText=Y.prototype.Mb;
Object.defineProperties(Y.prototype,{nativeShadow:{get:function(){return L}},nativeCss:{get:function(){return N}}});var Z=new Y,re,se;window.ShadyCSS&&(re=window.ShadyCSS.ApplyShim,se=window.ShadyCSS.CustomStyleInterface);
window.ShadyCSS={ScopingShim:Z,prepareTemplate:function(a,b,c){Z.flushCustomStyles();Z.prepareTemplate(a,b,c)},prepareTemplateDom:function(a,b){Z.prepareTemplateDom(a,b)},prepareTemplateStyles:function(a,b,c){Z.flushCustomStyles();Z.prepareTemplateStyles(a,b,c)},styleSubtree:function(a,b){Z.flushCustomStyles();Z.styleSubtree(a,b)},styleElement:function(a){Z.flushCustomStyles();Z.styleElement(a)},styleDocument:function(a){Z.flushCustomStyles();Z.styleDocument(a)},flushCustomStyles:function(){Z.flushCustomStyles()},
getComputedStyleValue:function(a,b){return Z.getComputedStyleValue(a,b)},nativeCss:N,nativeShadow:L,cssBuild:cd,disableRuntime:M};re&&(window.ShadyCSS.ApplyShim=re);se&&(window.ShadyCSS.CustomStyleInterface=se);})();
//# sourceMappingURL=webcomponents-sd.js.sourcemap
