-
Notifications
You must be signed in to change notification settings - Fork 3
/
webcomponents-sd.js
175 lines (172 loc) · 72.2 KB
/
webcomponents-sd.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
(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 ba(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function p(a){if(!(a instanceof Array)){a=ba(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}
function ca(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 ea=ca(this);function fa(){}fa.prototype.toJSON=function(){return{}};function q(a){a.__shady||(a.__shady=new fa);return a.__shady}function r(a){return a&&a.__shady};var u=window.ShadyDOM||{};u.Lb=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var ha=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");u.m=!!(ha&&ha.configurable&&ha.get);u.ma=u.force||!u.Lb;u.u=u.noPatch||!1;u.P=u.preferPerformance;u.oa="on-demand"===u.u;var ia=navigator.userAgent.match("Trident");u.Na=ia;function v(a){return(a=r(a))&&void 0!==a.firstChild}function w(a){return a instanceof ShadowRoot}function ja(a){return(a=(a=r(a))&&a.root)&&a.va()}
var x=Element.prototype,ka=x.matches||x.matchesSelector||x.mozMatchesSelector||x.msMatchesSelector||x.oMatchesSelector||x.webkitMatchesSelector,la=document.createTextNode(""),ma=0,na=[];(new MutationObserver(function(){for(;na.length;)try{na.shift()()}catch(a){throw la.textContent=ma++,a;}})).observe(la,{characterData:!0});function oa(a){na.push(a);la.textContent=ma++}var pa=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 qa(a,b){for(;b;){if(b==a)return!0;b=b.__shady_parentNode}return!1}function ra(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=ba(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 sa(a){var b=[];for(a=a.__shady_native_firstChild;a;a=a.__shady_native_nextSibling)b.push(a);return b}function ta(a){var b=[];for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)b.push(a);return b}function ua(a,b,c){c.configurable=!0;if(c.value)a[b]=c.value;else try{Object.defineProperty(a,b,c)}catch(d){}}function y(a,b,c,d){c=void 0===c?"":c;for(var e in b)d&&0<=d.indexOf(e)||ua(a,c+e,b[e])}function va(a,b){for(var c in b)c in a&&ua(a,c,b[c])}
function z(a){var b={};Object.getOwnPropertyNames(a).forEach(function(c){b[c]=Object.getOwnPropertyDescriptor(a,c)});return b}function wa(a,b){for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length;d++)e=c[d],a[e]=b[e]}function xa(a){return a instanceof Node?a:document.createTextNode(""+a)}
function B(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];if(1===b.length)return xa(b[0]);c=document.createDocumentFragment();b=ba(b);for(var d=b.next();!d.done;d=b.next())c.appendChild(xa(d.value));return c};var ya=[],za;function Aa(a){za||(za=!0,oa(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.W=!1;this.addedNodes=[];this.removedNodes=[];this.aa=new Set}function Da(a){a.W||(a.W=!0,oa(function(){a.flush()}))}Ca.prototype.flush=function(){if(this.W){this.W=!1;var a=this.takeRecords();a.length&&this.aa.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=q(a);c.O||(c.O=new Ca);c.O.aa.add(b);var d=c.O;return{Ua:b,qb:d,pb:a,takeRecords:function(){return d.takeRecords()}}}function Fa(a){var b=a&&a.qb;b&&(b.aa.delete(a.Ua),b.aa.size||(q(a.pb).O=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"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}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,da;da=t[A];A++)n+=" "+da.name+'="'+da.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=u.m,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){y(a,b,"__shady_native_");for(var c in b)Ra(c)}function C(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 D=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),E=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","append","prepend","replaceChildren"];
function Xa(){var a=["dispatchEvent","addEventListener","removeEventListener"];window.EventTarget?(C(window.EventTarget.prototype,a),void 0===window.__shady_native_addEventListener&&C(Window.prototype,a)):(C(Node.prototype,a),C(Window.prototype,a));Oa?C(Node.prototype,"parentNode firstChild lastChild previousSibling nextSibling childNodes parentElement textContent".split(" ")):Sa(Node.prototype,{parentNode:{get:function(){D.currentNode=this;return D.parentNode()}},firstChild:{get:function(){D.currentNode=
this;return D.firstChild()}},lastChild:{get:function(){D.currentNode=this;return D.lastChild()}},previousSibling:{get:function(){D.currentNode=this;return D.previousSibling()}},nextSibling:{get:function(){D.currentNode=this;return D.nextSibling()}},childNodes:{get:function(){var b=[];D.currentNode=this;for(var c=D.firstChild();c;)b.push(c),c=D.nextSibling();return b}},parentElement:{get:function(){E.currentNode=this;return E.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}}}});C(Node.prototype,"appendChild insertBefore removeChild replaceChild cloneNode contains".split(" "));
C(HTMLElement.prototype,["parentElement","contains"]);a={firstElementChild:{get:function(){E.currentNode=this;return E.firstChild()}},lastElementChild:{get:function(){E.currentNode=this;return E.lastChild()}},children:{get:function(){var b=[];E.currentNode=this;for(var c=E.firstChild();c;)b.push(c),c=E.nextSibling();return ra(b)}},childElementCount:{get:function(){return this.children?this.children.length:0}}};Oa?(C(Element.prototype,Va),C(Element.prototype,["previousElementSibling","nextElementSibling",
"innerHTML","className"]),C(HTMLElement.prototype,["children","innerHTML","className"])):(Sa(Element.prototype,a),Sa(Element.prototype,{previousElementSibling:{get:function(){E.currentNode=this;return E.previousSibling()}},nextElementSibling:{get:function(){E.currentNode=this;return E.nextSibling()}},innerHTML:{get:function(){return Na(this,sa)},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)}}}));C(Element.prototype,"setAttribute getAttribute hasAttribute removeAttribute focus blur".split(" "));C(Element.prototype,Wa);C(HTMLElement.prototype,["focus","blur"]);window.HTMLTemplateElement&&
C(window.HTMLTemplateElement.prototype,["innerHTML"]);Oa?C(DocumentFragment.prototype,Va):Sa(DocumentFragment.prototype,a);C(DocumentFragment.prototype,Wa);Oa?(C(Document.prototype,Va),C(Document.prototype,["activeElement"])):Sa(Document.prototype,a);C(Document.prototype,["importNode","getElementById"]);C(Document.prototype,Wa)};var Ya=z({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=z({get textContent(){return this.__shady_textContent},set textContent(a){this.__shady_textContent=
a},get innerHTML(){return this.__shady_innerHTML},set innerHTML(a){this.__shady_innerHTML=a}}),$a=z({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){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=u.m||!0===u.u,cb=bb?function(){}:function(a){var b=q(a);b.Qa||(b.Qa=!0,va(a,$a))},db=bb?function(){}:function(a){var b=q(a);b.Pa||(b.Pa=!0,va(a,Ya),window.customElements&&window.customElements.polyfillWrapFlushCallback&&!u.u||va(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.H}else b=!!a,d=c=!1;return{Ka:e,capture:b,once:c,passive:d,Ja: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(!w)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),!w(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.da)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.da)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!u.P&&this instanceof Node&&!pa(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.Ka;d=d.Ja;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(!w(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 da="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 da}};b[eb].push({node:m,type:a,capture:e,once:f,passive:g,Zb: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.Ka;d=d.Ja;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].Zb,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=z({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.da=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.da=this.__immediatePropagationStopped=!0}});
function vb(a,b){b=void 0===b?a.target:b;a.__target=b;a.__relatedTarget=a.relatedTarget;if(u.m){b=Object.getPrototypeOf(a);if(!b.hasOwnProperty("__shady_patchedProto")){var c=Object.create(b);c.__shady_sourceProto=b;y(c,zb);b.__shady_patchedProto=c}a.__proto__=b.__shady_patchedProto}else y(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=q(this),d=a.substring(2);c.G||(c.G={});c.G[a]&&this.removeEventListener(d,c.G[a]);this.__shady_addEventListener(d,b);c.G[a]=b},get:function(){var b=r(this);return b&&b.G&&b.G[a]},configurable:!0}};function Hb(a,b){return{index:a,R:[],Z: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.R.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.Z++;e++;b.R.push(c[f]);f++;break;case 2:b||(b=Hb(e,0));
b.Z++;e++;break;case 3:b||(b=Hb(e,0)),b.R.push(c[f]),f++}b&&l.push(b);return l}function Jb(a,b){return a===b};var Kb=z({dispatchEvent:ub,addEventListener:wb,removeEventListener:xb});var Lb=null;function F(){Lb||(Lb=window.ShadyCSS&&window.ShadyCSS.ScopingShim);return Lb||null}function Mb(a,b,c){var d=F();return d&&"class"===b?(d.setElementClass(a,c),!0):!1}function Nb(a,b){var c=F();c&&c.unscopeNode(a,b)}function Ob(a,b){var c=F();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=F();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=u.P,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=r(a);if(b&&void 0!==b.ca)for(b=a.__shady_firstChild;b;b=b.__shady_nextSibling)Wb(b);if(a=r(a))a.ca=void 0}function Xb(a){var b=a;if(a&&"slot"===a.localName){var c=r(a);(c=c&&c.L)&&(b=c.length?c[0]:Xb(a.__shady_nextSibling))}return b}
function Yb(a,b,c){if(a=(a=r(a))&&a.O){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=z({get parentNode(){var a=r(this);a=a&&a.parentNode;return void 0!==a?a:this.__shady_native_parentNode},get firstChild(){var a=r(this);a=a&&a.firstChild;return void 0!==a?a:this.__shady_native_firstChild},get lastChild(){var a=r(this);a=a&&a.lastChild;return void 0!==a?a:this.__shady_native_lastChild},get nextSibling(){var a=r(this);a=a&&a.nextSibling;return void 0!==a?a:this.__shady_native_nextSibling},get previousSibling(){var a=r(this);a=a&&a.previousSibling;return void 0!==a?a:this.__shady_native_previousSibling},
get childNodes(){if(v(this)){var a=r(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=r(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||pa(a,this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.__shady_parentNode||(w(a)?a.host:void 0);return!!(a&&a instanceof Document)},get textContent(){if(v(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(!v(this)&&
u.m){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=r(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=G(this))?c.host.localName:Pb(this),f=a.__shady_parentNode;if(f){var g=Pb(a);var h=!!c||!G(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;F()&&(t&&Nb(n,t),(t=F())&&t.scopeNode(n,e))}});d.length&&(c.ra(d),c.s());v(this)&&(Zb(a,this,b),h=r(this),h.root?(f=!1,ja(this)&&h.root.s()):c&&"slot"===this.localName&&(f=!1,c.s()));f?(c=w(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||!w(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=G(a),d=c&&c.tb(a),e=r(this);if(v(this)&&($b(a,this),ja(this))){e.root.s();var f=!0}if(F()&&!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.s());f||(f=w(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=q(this),c=b.ca;void 0===c&&(w(this)?(c=this,b.ca=c):(c=(c=this.__shady_parentNode)?c.__shady_getRootNode(a):this,document.documentElement.__shady_native_contains(this)&&(b.ca=c)));return c}},contains:function(a){return qa(this,a)}});var bc=z({get assignedSlot(){var a=this.__shady_parentNode;(a=a&&a.__shady_shadowRoot)&&a.V();return(a=r(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 ec={get firstElementChild(){var a=r(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=r(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 v(this)?ra(Array.prototype.filter.call(ta(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}},H=z((ec.append=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];this.__shady_insertBefore(B.apply(null,p(b)),null)},ec.prepend=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];this.__shady_insertBefore(B.apply(null,p(b)),this.__shady_firstChild)},ec.replaceChildren=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];
for(;null!==(c=this.__shady_firstChild);)this.__shady_removeChild(c);this.__shady_insertBefore(B.apply(null,p(b)),null)},ec)),fc=z({querySelector:function(a){return cc(this,function(b){return ka.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 ra(b.filter(function(d){return d.__shady_getRootNode()==c}))}return ra(cc(this,function(d){return ka.call(d,a)}))}}),
gc=u.P&&!u.u?wa({},H):H;wa(H,fc);/*
Copyright (c) 2020 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 hc=z({after:function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];c=this.__shady_parentNode;if(null!==c){var d=this.__shady_nextSibling;c.__shady_insertBefore(B.apply(null,p(b)),d)}},before:function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];c=this.__shady_parentNode;null!==c&&c.__shady_insertBefore(B.apply(null,p(b)),this)},remove:function(){var a=this.__shady_parentNode;null!==a&&a.__shady_removeChild(this)},replaceWith:function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-
0]=arguments[c];c=this.__shady_parentNode;if(null!==c){var d=this.__shady_nextSibling;c.__shady_removeChild(this);c.__shady_insertBefore(B.apply(null,p(b)),d)}}});var ic=window.document;function jc(a,b){"slot"===b?(a=a.__shady_parentNode,ja(a)&&r(a).root.s()):"slot"===a.localName&&"name"===b&&(b=G(a))&&(b.Gb(a),b.s())}
var kc=z({get previousElementSibling(){var a=r(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=r(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!==ic?this.__shady_native_setAttribute(a,b):Mb(this,a,b)||(this.__shady_native_setAttribute(a,b),jc(this,a))},removeAttribute:function(a){this.ownerDocument!==ic?this.__shady_native_removeAttribute(a):Mb(this,a,"")?""===this.getAttribute(a)&&this.__shady_native_removeAttribute(a):(this.__shady_native_removeAttribute(a),
jc(this,a))}});u.P||Eb.forEach(function(a){kc[a]=Gb(a)});
var oc=z({attachShadow:function(a){if(!this)throw Error("Must provide a host.");if(!a)throw Error("Not enough arguments.");if(a.shadyUpgradeFragment&&!u.Na){var b=a.shadyUpgradeFragment;b.__proto__=ShadowRoot.prototype;b.xa(this,a);lc(b,b);a=b.__noInsertionPoint?null:b.querySelectorAll("slot");b.__noInsertionPoint=void 0;a&&a.length&&(b.ra(a),b.s());b.host.__shady_native_appendChild(b)}else b=new mc(nc,this,a);return this.__CE_shadowRoot=b},get shadowRoot(){var a=r(this);return a&&a.Rb||null}});
wa(kc,oc);var pc=document.implementation.createHTMLDocument("inert"),qc=z({get innerHTML(){return v(this)?Na("template"===this.localName?this.content:this,ta):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!==pc.namespaceURI?pc.createElementNS(this.namespaceURI,b):pc.createElement(b);for(u.m?b.__shady_native_innerHTML=a:b.innerHTML=a;a=b.__shady_firstChild;)this.__shady_insertBefore(a)}}});var rc=z({blur:function(){var a=r(this);(a=(a=a&&a.root)&&a.activeElement)?a.__shady_blur():this.__shady_native_blur()}});u.P||Fb.forEach(function(a){rc[a]=Gb(a)});var sc=z({assignedNodes:function(a){if("slot"===this.localName){var b=this.__shady_getRootNode();b&&w(b)&&b.V();return(b=r(this))?(a&&a.flatten?b.L: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.H=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.H=this;d.__shady_removeEventListener(a,b,c)}}});var tc=z({getElementById:function(a){return""===a?null:cc(this,function(b){return b.id==a},function(b){return!!b})[0]||null}});var uc=z({get activeElement(){var a=u.m?document.__shady_native_activeElement:document.activeElement;if(!a||!a.nodeType)return null;var b=!!w(this);if(!(this===document||b&&this.host!==a&&this.host.__shady_native_contains(a)))return null;for(b=G(a);b&&b!==this;)a=b.host,b=G(a);return this===document?b?null:a:b===this?a:null}});var vc=window.document,wc=z({importNode:function(a,b){if(a.ownerDocument!==vc||"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 xc=z({dispatchEvent:ub,addEventListener:wb.bind(window),removeEventListener:xb.bind(window)});var I={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(I.parentElement=ac.parentElement);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(I.contains=ac.contains);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(I.children=H.children);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(I.innerHTML=qc.innerHTML);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"className")&&(I.className=kc.className);
var J={EventTarget:[Kb],Node:[ac,window.EventTarget?null:Kb],Text:[bc],Comment:[bc],CDATASection:[bc],ProcessingInstruction:[bc],Element:[kc,H,hc,bc,!u.m||"innerHTML"in Element.prototype?qc:null,window.HTMLSlotElement?null:sc],HTMLElement:[rc,I],HTMLSlotElement:[sc],DocumentFragment:[gc,tc],Document:[wc,gc,tc,uc],Window:[xc],CharacterData:[hc]},yc=u.m?null:["innerHTML","textContent"];function K(a,b,c,d){b.forEach(function(e){return a&&e&&y(a,e,c,d)})}
function zc(a){var b=a?null:yc,c;for(c in J)K(window[c]&&window[c].prototype,J[c],a,b)}["Text","Comment","CDATASection","ProcessingInstruction"].forEach(function(a){var b=window[a],c=Object.create(b.prototype);c.__shady_protoIsPatched=!0;K(c,J.EventTarget);K(c,J.Node);J[a]&&K(c,J[a]);b.prototype.__shady_patchedProto=c});function Ac(a){a.__shady_protoIsPatched=!0;K(a,J.EventTarget);K(a,J.Node);K(a,J.Element);K(a,J.HTMLElement);K(a,J.HTMLSlotElement);return a};var Bc=u.oa,Cc=u.m;function Dc(a,b){if(Bc&&!a.__shady_protoIsPatched&&!w(a)){var c=Object.getPrototypeOf(a),d=c.hasOwnProperty("__shady_patchedProto")&&c.__shady_patchedProto;d||(d=Object.create(c),Ac(d),c.__shady_patchedProto=d);Object.setPrototypeOf(a,d)}Cc||(1===b?cb(a):2===b&&db(a))}
function Ec(a,b,c,d){Dc(a,1);d=d||null;var e=q(a),f=d?q(d):null;e.previousSibling=d?f.previousSibling:b.__shady_lastChild;if(f=r(e.previousSibling))f.nextSibling=a;if(f=r(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){Dc(b,2);var d=q(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)Ec(a,b,d,c);else Ec(a,b,d,c)}
function $b(a,b){var c=q(a);b=q(b);a===b.firstChild&&(b.firstChild=c.nextSibling);a===b.lastChild&&(b.lastChild=c.previousSibling);a=c.previousSibling;var d=c.nextSibling;a&&(q(a).nextSibling=d);d&&(q(d).previousSibling=a);c.parentNode=c.previousSibling=c.nextSibling=void 0;void 0!==b.childNodes&&(b.childNodes=null)}
function lc(a,b){var c=q(a);if(b||void 0===c.firstChild){c.childNodes=null;var d=c.firstChild=a.__shady_native_firstChild;c.lastChild=a.__shady_native_lastChild;Dc(a,2);c=d;for(d=void 0;c;c=c.__shady_native_nextSibling){var e=q(c);e.parentNode=b||a;e.nextSibling=c.__shady_native_nextSibling;e.previousSibling=d||null;d=c;Dc(c,1)}}};var Fc=z({addEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.H=c.H||this;this.host.__shady_addEventListener(a,b,c)},removeEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.H=c.H||this;this.host.__shady_removeEventListener(a,b,c)}});function Gc(a,b){y(a,Fc,b);y(a,uc,b);y(a,qc,b);y(a,H,b);u.u&&!b?(y(a,ac,b),y(a,tc,b)):u.m||(y(a,$a),y(a,Ya),y(a,Za))};var nc={},L=u.deferConnectionCallbacks&&"loading"===document.readyState,Hc;function Ic(a){var b=[];do b.unshift(a);while(a=a.__shady_parentNode);return b}function mc(a,b,c){if(a!==nc)throw new TypeError("Illegal constructor");this.g=null;this.xa(b,c)}k=mc.prototype;
k.xa=function(a,b){this.host=a;this.mode=b&&b.mode;lc(this.host);a=q(this.host);a.root=this;a.Rb="closed"!==this.mode?this:null;a=q(this);a.firstChild=a.lastChild=a.parentNode=a.nextSibling=a.previousSibling=null;if(u.preferPerformance)for(;a=this.host.__shady_native_firstChild;)this.host.__shady_native_removeChild(a);else this.s()};k.s=function(){var a=this;this.J||(this.J=!0,Aa(function(){return a.V()}))};k.ib=function(){for(var a,b=this;b;)b.J&&(a=b),b=b.hb();return a};
k.hb=function(){var a=this.host.__shady_getRootNode();if(w(a)){var b=r(this.host);if(b&&0<b.U)return a}};k.V=function(){var a=this.J&&this.ib();a&&a._renderSelf()};k.cb=function(){!this.wa&&this.J&&this.V()};
k._renderSelf=function(){var a=L;L=!0;this.J=!1;this.g&&(this.Ya(),this.Wa());if(!u.preferPerformance&&!this.wa)for(var b=this.host.__shady_firstChild;b;b=b.__shady_nextSibling){var c=r(b);b.__shady_native_parentNode!==this.host||"slot"!==b.localName&&c.assignedSlot||this.host.__shady_native_removeChild(b)}this.wa=!0;L=a;Hc&&Hc()};
k.Ya=function(){this.Y();for(var a=0,b;a<this.g.length;a++)b=this.g[a],this.Va(b);for(a=this.host.__shady_firstChild;a;a=a.__shady_nextSibling)this.ta(a);for(a=0;a<this.g.length;a++){b=this.g[a];var c=r(b);if(!c.assignedNodes.length)for(var d=b.__shady_firstChild;d;d=d.__shady_nextSibling)this.ta(d,b);(d=(d=r(b.__shady_parentNode))&&d.root)&&(d.va()||d.J)&&d._renderSelf();this.qa(c.L,c.assignedNodes);if(d=c.Ba){for(var e=0;e<d.length;e++)r(d[e]).ha=null;c.Ba=null;d.length>c.assignedNodes.length&&
(c.la=!0)}c.la&&(c.la=!1,this.ua(b))}};k.ta=function(a,b){var c=q(a),d=c.ha;c.ha=null;b||(b=(b=this.i[a.__shady_slot||"__catchall"])&&b[0]);b?(q(b).assignedNodes.push(a),c.assignedSlot=b):c.assignedSlot=void 0;d!==c.assignedSlot&&c.assignedSlot&&(q(c.assignedSlot).la=!0)};k.Va=function(a){var b=r(a),c=b.assignedNodes;b.assignedNodes=[];b.L=[];if(b.Ba=c)for(b=0;b<c.length;b++){var d=r(c[b]);d.ha=d.assignedSlot;d.assignedSlot===a&&(d.assignedSlot=null)}};
k.qa=function(a,b){for(var c=0,d=void 0;c<b.length&&(d=b[c]);c++)if("slot"==d.localName){var e=r(d).assignedNodes;e&&e.length&&this.qa(a,e)}else a.push(b[c])};k.ua=function(a){a.__shady_native_dispatchEvent(new Event("slotchange"));a=r(a);a.assignedSlot&&this.ua(a.assignedSlot)};k.Wa=function(){for(var a=this.g,b=[],c=0;c<a.length;c++){var d=a[c].__shady_parentNode,e=r(d);e&&e.root||!(0>b.indexOf(d))||b.push(d)}for(a=0;a<b.length;a++)c=b[a],this.Fb(c===this?this.host:c,this.Xa(c))};
k.Xa=function(a){var b=[];for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)if(this.kb(a))for(var c=r(a).L,d=0;d<c.length;d++)b.push(c[d]);else b.push(a);return b};k.kb=function(a){return"slot"==a.localName};
k.Fb=function(a,b){for(var c=sa(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.R.length&&(l=g.R[h]);h++)l.__shady_native_parentNode===a&&a.__shady_native_removeChild(l),c.splice(g.index+f,1);f-=g.Z}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.Z;h++)l=b[h],a.__shady_native_insertBefore(l,g),c.splice(h,0,l)};k.bb=function(){this.F=this.F||[];this.g=this.g||[];this.i=this.i||{}};
k.ra=function(a){this.bb();this.F.push.apply(this.F,p(a))};k.Y=function(){this.F&&this.F.length&&(this.nb(this.F),this.F=[])};k.nb=function(a){for(var b,c=0;c<a.length;c++){var d=a[c];lc(d);var e=d.__shady_parentNode;lc(e);e=r(e);e.U=(e.U||0)+1;e=this.za(d);this.i[e]?(b=b||{},b[e]=!0,this.i[e].push(d)):this.i[e]=[d];this.g.push(d)}if(b)for(var f in b)this.i[f]=this.Da(this.i[f])};k.za=function(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.Ra=b};
k.Da=function(a){return a.sort(function(b,c){b=Ic(b);for(var d=Ic(c),e=0;e<b.length;e++){c=b[e];var f=d[e];if(c!==f)return b=ta(c.__shady_parentNode),b.indexOf(c)-b.indexOf(f)}})};k.tb=function(a){if(this.g){this.Y();var b=this.i,c;for(c in b)for(var d=b[c],e=0;e<d.length;e++){var f=d[e];if(qa(a,f)){d.splice(e,1);var g=this.g.indexOf(f);0<=g&&(this.g.splice(g,1),(g=r(f.__shady_parentNode))&&g.U&&g.U--);e--;this.ub(f);g=!0}}return g}};
k.Gb=function(a){if(this.g){this.Y();var b=a.Ra,c=this.za(a);if(c!==b){b=this.i[b];var d=b.indexOf(a);0<=d&&b.splice(d,1);b=this.i[c]||(this.i[c]=[]);b.push(a);1<b.length&&(this.i[c]=this.Da(b))}}};k.ub=function(a){a=r(a);var b=a.L;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.L=[];a.assignedNodes=[]};k.va=function(){this.Y();return!(!this.g||!this.g.length)};
(function(a){a.__proto__=DocumentFragment.prototype;Gc(a,"__shady_");Gc(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})})})(mc.prototype);
if(window.customElements&&window.customElements.define&&u.ma&&!u.preferPerformance){var Jc=new Map;Hc=function(){var a=[];Jc.forEach(function(d,e){a.push([e,d])});Jc.clear();for(var b=0;b<a.length;b++){var c=a[b][0];a[b][1]?c.__shadydom_connectedCallback():c.__shadydom_disconnectedCallback()}};L&&document.addEventListener("readystatechange",function(){L=!1;Hc()},{once:!0});var Kc=function(a,b,c){var d=0,e="__isConnected"+d++;if(b||c)a.prototype.connectedCallback=a.prototype.__shadydom_connectedCallback=
function(){L?Jc.set(this,!0):this[e]||(this[e]=!0,b&&b.call(this))},a.prototype.disconnectedCallback=a.prototype.__shadydom_disconnectedCallback=function(){L?this.isConnected||Jc.set(this,!1):this[e]&&(this[e]=!1,c&&c.call(this))};return a},Lc=window.customElements.define,Mc=function(a,b){var c=b.prototype.connectedCallback,d=b.prototype.disconnectedCallback;Lc.call(window.customElements,a,Kc(b,c,d));b.prototype.connectedCallback=c;b.prototype.disconnectedCallback=d};window.customElements.define=
Mc;Object.defineProperty(window.CustomElementRegistry.prototype,"define",{value:Mc,configurable:!0})}function G(a){a=a.__shady_getRootNode();if(w(a))return a};function M(a){this.node=a}k=M.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)};k.append=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];return this.node.__shady_append.apply(this.node,p(b))};k.prepend=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];return this.node.__shady_prepend.apply(this.node,p(b))};
k.after=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];return this.node.__shady_after.apply(this.node,p(b))};k.before=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];return this.node.__shady_before.apply(this.node,p(b))};k.remove=function(){return this.node.__shady_remove()};k.replaceWith=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];return this.node.__shady_replaceWith.apply(this.node,p(b))};
ea.Object.defineProperties(M.prototype,{activeElement:{configurable:!0,enumerable:!0,get:function(){if(w(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(w(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){this.node.__shady_className=
a}}});function Nc(a){Object.defineProperty(M.prototype,a,{get:function(){return this.node["__shady_"+a]},set:function(b){this.node["__shady_"+a]=b},configurable:!0})}Eb.forEach(function(a){return Nc(a)});Fb.forEach(function(a){return Nc(a)});var Oc=new WeakMap;function Pc(a){if(w(a)||a instanceof M)return a;var b=Oc.get(a);b||(b=new M(a),Oc.set(a,b));return b};if(u.ma){var Qc=u.m?function(a){return a}:function(a){db(a);cb(a);return a},ShadyDOM={inUse:u.ma,patch:Qc,isShadyRoot:w,enqueue:Aa,flush:Ba,flushInitial:function(a){a.cb()},settings:u,filterMutations:Ga,observeChildren:Ea,unobserveChildren:Fa,deferConnectionCallbacks:u.deferConnectionCallbacks,preferPerformance:u.preferPerformance,handlesDynamicScoping:!0,wrap:u.u?Pc:Qc,wrapIfNeeded:!0===u.u?Pc:function(a){return a},Wrapper:M,composedPath:mb,noPatch:u.u,patchOnDemand:u.oa,nativeMethods:Pa,nativeTree:Qa,
patchElementProto:Ac};window.ShadyDOM=ShadyDOM;Xa();zc("__shady_");Object.defineProperty(document,"_activeElement",uc.activeElement);y(Window.prototype,xc,"__shady_");u.u?u.oa&&y(Element.prototype,oc):(zc(),Db());yb();window.Event=Ab;window.CustomEvent=Bb;window.MouseEvent=Cb;window.ShadowRoot=mc};/*
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 Rc(){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 Sc(a){var b=a=a.replace(Tc,"").replace(Uc,""),c=new Rc;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 Rc;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 Vc(c,a)}
function Vc(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(Wc," "),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(Xc)&&(a.type=7,a.keyframesName=a.selector.split(Wc).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++)Vc(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 Yc(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=Yc(h,b,d);else b?b=a.cssText:(b=a.cssText,b=b.replace(Zc,"").replace($c,""),b=b.replace(ad,"").replace(bd,"")),(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 Tc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,Uc=/@import[^;]*;/gim,Zc=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,$c=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,ad=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,bd=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,Xc=/^@[^\s]*keyframes/,Wc=/\s+/g;var N=!(window.ShadyDOM&&window.ShadyDOM.inUse),cd;function dd(a){cd=a&&a.shimcssproperties?!1:N||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}var ed;window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(ed=window.ShadyCSS.cssBuild);var O=!(!window.ShadyCSS||!window.ShadyCSS.disableRuntime);
window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?cd=window.ShadyCSS.nativeCss:window.ShadyCSS?(dd(window.ShadyCSS),window.ShadyCSS=void 0):dd(window.WebComponents&&window.WebComponents.flags);var P=cd;var fd=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,gd=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,hd=/(--[\w-]+)\s*([:,;)]|$)/gi,id=/(animation\s*:)|(animation-name\s*:)/,jd=/@media\s(.*)/,kd=/\{[^}]*\}/g;var ld=new Set;function Q(a,b){if(!a)return"";"string"===typeof a&&(a=Sc(a));b&&R(a,b);return Yc(a,P)}function md(a){!a.__cssRules&&a.textContent&&(a.__cssRules=Sc(a.textContent));return a.__cssRules||null}function nd(a){return!!a.parent&&7===a.parent.type}function R(a,b,c,d){if(a){var e=!1,f=a.type;if(d&&4===f){var g=a.selector.match(jd);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++)R(g,b,c,d)}}
function od(a,b,c,d){var e=document.createElement("style");b&&e.setAttribute("scope",b);e.textContent=a;pd(e,c,d);return e}var S=null;function qd(a){a=document.createComment(" Shady DOM styles for "+a+" ");var b=document.head;b.insertBefore(a,(S?S.nextSibling:null)||b.firstChild);return S=a}function pd(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);S?a.compareDocumentPosition(S)===Node.DOCUMENT_POSITION_PRECEDING&&(S=a):S=a}
function rd(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 sd(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");var d=rd(a,c+3),e=a.substring(c+4,d);c=a.substring(0,c);a=sd(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 td(a,b){N?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)}
var ud=window.ShadyDOM&&window.ShadyDOM.wrap||function(a){return a};function T(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,S:c}}function vd(a){for(var b=[],c="",d=0;0<=d&&d<a.length;d++)if("("===a[d]){var e=rd(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 U(a){if(void 0!==ed)return ed;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 wd(a){a=void 0===a?"":a;return""!==a&&P?N?"shadow"===a:"shady"===a:!1};function xd(){}function yd(a,b){var c=V;c.X(a,function(d){c.element(d,b||"")})}k=xd.prototype;k.X=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.X(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,""),td(a,b)):td(a,(d?d+" ":"")+"style-scope "+b)}};function zd(a,b,c){var d=V;d.X(a,function(e){d.element(e,b,!0);d.element(e,c)})}function Ad(a,b){var c=V;c.X(a,function(d){c.element(d,b||"",!0)})}
function Bd(a,b,c,d,e){var f=V;e=void 0===e?"":e;""===e&&(N||"shady"===(void 0===d?"":d)?e=Q(b,c):(a=T(a),e=Cd(f,b,a.is,a.S,c)+"\n\n"));return e.trim()}function Cd(a,b,c,d,e){var f=a.ea(c,d);c=a.sa(c);return Q(b,function(g){g.Ob||(a.Ea(g,a.ja,c,f),g.Ob=!0);e&&e(g,c,f)})}k.sa=function(a){return a?"."+a:""};k.ea=function(a,b){return b?"[is="+a+"]":a};k.Ea=function(a,b,c,d){a.selector=a.o=this.Fa(a,b,c,d)};
k.Fa=function(a,b,c,d){var e=vd(a.selector);if(!nd(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.Ha=function(a){return a.replace(Dd,function(b,c,d){-1<d.indexOf("+")?d=d.replace(/\+/g,"___"):-1<d.indexOf("___")&&(d=d.replace(/___/g,"+"));return":"+c+"("+d+")"})};
k.sb=function(a){for(var b=[],c;c=a.match(Ed);){var d=c.index,e=rd(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{pa:a,matches:b}};k.wb=function(a,b){var c=a.split("\ue000");return b.reduce(function(d,e,f){return d+e+c[f+1]},c[0])};
k.ja=function(a,b,c){var d=this,e=!1;a=a.trim();var f=Dd.test(a);f&&(a=a.replace(Dd,function(l,m,n){return":"+m+"("+n.replace(/\s/g,"")+")"}),a=this.Ha(a));var g=Ed.test(a);if(g){var h=this.sb(a);a=h.pa;h=h.matches}a=a.replace(Fd,":host $1");a=a.replace(Gd,function(l,m,n){e||(l=d.Cb(n,m,b,c),e=e||l.stop,m=l.Ib,n=l.value);return m+n});g&&(a=this.wb(a,h));f&&(a=this.Ha(a));return a=a.replace(Hd,function(l,m,n,t){return'[dir="'+n+'"] '+m+t+", "+m+'[dir="'+n+'"]'+t})};
k.Cb=function(a,b,c,d){var e=a.indexOf("::slotted");0<=a.indexOf(":host")?a=this.Eb(a,d):0!==e&&(a=c?this.Ga(a,c):a);c=!1;0<=e&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(Id,function(g,h){return" > "+h}))}return{value:a,Ib:b,stop:f}};k.Ga=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.Eb=function(a,b){var c=a.match(Jd);return(c=c&&c[2].trim()||"")?c[0].match(Kd)?a.replace(Jd,function(d,e,f){return b+f}):c.split(Kd)[0]===b?c:"should_not_match":a.replace(":host",b)};function Ld(a){":root"===a.selector&&(a.selector="html")}k.Db=function(a){return a.match(":host")?"":a.match("::slotted")?this.ja(a,":not(.style-scope)"):this.Ga(a.trim(),":not(.style-scope)")};ea.Object.defineProperties(xd.prototype,{T:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});
var Dd=/:(nth[-\w]+)\(([^)]+)\)/,Gd=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Kd=/[[.:#*]/,Fd=/^(::slotted)/,Jd=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Id=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Hd=/(.*):dir\((?:(ltr|rtl))\)(.*)/,Ed=/:(?:matches|any|-(?:webkit|moz)-any)/,V=new xd;function W(a,b,c,d,e){this.A=a||null;this.placeholder=b||null;this.na=c||[];this.M=null;this.cssBuild=e||"";this.S=d||"";this.K=this.v=this.D=null}function X(a){return a?a.__styleInfo:null}function Md(a,b){return a.__styleInfo=b}W.prototype.jb=function(){return this.A};W.prototype._getStyleRules=W.prototype.jb;function Nd(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Od=/:host\s*>\s*/,Pd=navigator.userAgent.match("Trident");function Qd(){}function Rd(a){var b={},c=[],d=0;R(a,function(f){Sd(f);f.index=d++;f=f.j.cssText;for(var g;g=hd.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0)}},function(f){c.push(f)});a.lb=c;a=[];for(var e in b)a.push(e);return a}
function Sd(a){if(!a.j){var b={},c={};Td(a,c)&&(b.C=c,a.rules=null);b.cssText=a.parsedCssText.replace(kd,"").replace(fd,"");a.j=b}}function Td(a,b){var c=a.j;if(c){if(c.C)return Object.assign(b,c.C),!0}else{c=a.parsedCssText;for(var d;a=fd.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}}
function Ud(a,b,c){b&&(b=0<=b.indexOf(";")?Vd(a,b,c):sd(b,function(d,e,f,g){if(!e)return d+g;(e=Ud(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=Ud(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""}
function Vd(a,b,c){b=b.split(";");for(var d=0,e,f;d<b.length;d++)if(e=b[d]){gd.lastIndex=0;if(f=gd.exec(e))e=Ud(a,c[f[1]],c);else if(f=e.indexOf(":"),-1!==f){var g=e.substring(f);g=g.trim();g=Ud(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 Wd(a,b){var c={},d=[];R(a,function(e){e.j||Sd(e);var f=e.o||e.parsedSelector;b&&e.j.C&&f&&Nd.call(b,f)&&(Td(e,c),e=e.index,f=parseInt(e/32,10),d[f]=(d[f]||0)|1<<e%32)},null,!0);return{C:c,key:d}}
function Xd(a,b,c,d){b.j||Sd(b);if(b.j.C){var e=T(a);a=e.is;e=e.S;e=a?V.ea(a,e):"html";var f=b.parsedSelector;var g=!!f.match(Od)||"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.o||(b.o=V.Fa(b,V.ja,V.sa(a),e)),c=b.o||e),g&&"html"===e&&(c=b.o||b.ac),d({pa:c,Nb:h,$b:g})}}
function Yd(a,b,c){var d={},e={};R(b,function(f){Xd(a,f,c,function(g){Nd.call(a._element||a,g.pa)&&(g.Nb?Td(f,d):Td(f,e))})},null,!0);return{Sb:e,Mb:d}}
function Zd(a,b,c,d){var e=T(b),f=V.ea(e.is,e.S),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=X(b);e=h.A;h=h.cssBuild;var l=a.Za(b,e,d);return Bd(b,e,function(m){var n="";m.j||Sd(m);m.j.cssText&&(n=Vd(a,m.j.cssText,c));m.cssText=n;if(!N&&!nd(m)&&m.cssText){var t=n=m.cssText;null==m.Ia&&(m.Ia=id.test(n));if(m.Ia)if(null==m.ba){m.ba=[];for(var A in l)t=l[A],t=t(n),n!==t&&(n=t,m.ba.push(A))}else{for(A=0;A<m.ba.length;++A)t=l[m.ba[A]],n=t(n);t=n}m.cssText=t;
a.Ab(m,g,f,d)}},h)}Qd.prototype.Za=function(a,b,c){a=b.lb;b={};if(!N&&a)for(var d=0,e=a[d];d<a.length;e=a[++d])this.zb(e,c),b[e.keyframesName]=this.mb(e);return b};Qd.prototype.mb=function(a){return function(b){return b.replace(a.Pb,a.Ma)}};Qd.prototype.zb=function(a,b){a.Pb=new RegExp("\\b"+a.keyframesName+"(?!\\B|-)","g");a.Ma=a.keyframesName+"-"+b;a.o=a.o||a.selector;a.selector=a.o.replace(a.keyframesName,a.Ma)};
Qd.prototype.Ab=function(a,b,c,d){a.o=a.o||a.selector;d="."+d;for(var e=vd(a.o),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 $d(a,b){var c=ae,d=md(a);a.textContent=Q(d,function(e){var f=e.cssText=e.parsedCssText;e.j&&e.j.cssText&&(f=f.replace(Zc,"").replace($c,""),e.cssText=Vd(c,f,b))})}ea.Object.defineProperties(Qd.prototype,{Oa:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var ae=new Qd;var be={},ce=window.customElements;if(ce&&!N&&!O){var de=ce.define;ce.define=function(a,b,c){be[a]||(be[a]=qd(a));de.call(ce,a,b,c)}};function ee(){this.cache={};this.Xb=100}ee.prototype.Hb=function(a,b,c){for(var d=0;d<c.length;d++){var e=c[d];if(a.C[e]!==b[e])return!1}return!0};ee.prototype.store=function(a,b,c,d){var e=this.cache[a]||[];e.push({C:b,styleElement:c,v:d});e.length>this.Xb&&e.shift();this.cache[a]=e};ee.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.Hb(e,b,c))return e}};function fe(){}var ge=new RegExp(V.T+"\\s*([^\\s]*)");function he(a){return(a=(a.classList&&a.classList.value?a.classList.value:a.getAttribute("class")||"").match(ge))?a[1]:""}function ie(a){var b=ud(a).getRootNode();return b===a||b===a.ownerDocument?"":(a=b.host)?T(a).is:""}
function je(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=he(e);if(g&&f===e.ownerDocument&&("style"!==e.localName&&"template"!==e.localName||""===U(e)))Ad(e,g);else if(f instanceof ShadowRoot)for(f=ie(e),f!==g&&zd(e,g,f),e=window.ShadyDOM.nativeMethods.querySelectorAll.call(e,":not(."+V.T+")"),g=0;g<e.length;g++){f=e[g];
var h=ie(f);h&&V.element(f,h)}}}}}
if(!(N||window.ShadyDOM&&window.ShadyDOM.handlesDynamicScoping)){var ke=new MutationObserver(je),le=function(a){ke.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)le(document);else{var me=function(){le(document.body)};window.HTMLImports?window.HTMLImports.whenReady(me):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){me();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",
a)}else me()})}fe=function(){je(ke.takeRecords())}};var ne={};var oe=Promise.resolve();function pe(a){if(a=ne[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function qe(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function re(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a._validating||(a._validating=!0,oe.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a._validating=!1}))};var se={},te=new ee;function Y(){this.Ca={};this.I=document.documentElement;var a=new Rc;a.rules=[];this.B=Md(this.I,new W(a));this.fa=!1;this.h=this.l=null}k=Y.prototype;k.flush=function(){fe()};k.fb=function(a){var b=this.Ca[a]=(this.Ca[a]||0)+1;return a+"-"+b};k.Kb=function(a){return md(a)};k.Wb=function(a){return Q(a)};
k.eb=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(!N){var e=d.textContent;if(!ld.has(e)){ld.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&&!O){N||be[b]||(be[b]=qd(b));a._prepared=!0;a.name=b;a.extends=c;ne[b]=a;var d=U(a),e=wd(d);c={is:b,extends:c};var f=this.eb(a)+(se[b]||"");this.N();if(!e){var g;if(g=!d)g=gd.test(f)||fd.test(f),gd.lastIndex=0,fd.lastIndex=0;var h=Sc(f);g&&P&&this.l&&this.l.transformRules(h,b);a._styleAst=h}g=[];P||(g=Rd(a._styleAst));if(!g.length||P)b=this.gb(c,a._styleAst,N?a.content:null,be[b]||null,d,e?f:""),a._style=b;a.rb=g}};k.Qb=function(a,b){se[b]=a.join(" ")};
k.prepareTemplateDom=function(a,b){if(!O){var c=U(a);N||"shady"===c||a._domPrepared||(a._domPrepared=!0,yd(a.content,b))}};k.gb=function(a,b,c,d,e,f){f=Bd(a,b,null,e,f);return f.length?od(f,a.is,c,d):null};k.Aa=function(a){var b=T(a),c=b.is;b=b.S;var d=be[c]||null,e=ne[c];if(e){c=e._styleAst;var f=e.rb;e=U(e);b=new W(c,d,f,b,e);Md(a,b);return b}};k.$a=function(){return!this.l&&window.ShadyCSS&&window.ShadyCSS.ApplyShim?(this.l=window.ShadyCSS.ApplyShim,this.l.invalidCallback=pe,!0):!1};
k.ab=function(){var a=this;!this.h&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.h=window.ShadyCSS.CustomStyleInterface,this.h.transformCallback=function(b){a.La(b)},this.h.validateCallback=function(){requestAnimationFrame(function(){(a.h.enqueued||a.fa)&&a.flushCustomStyles()})})};k.N=function(){var a=this.$a();this.ab();return a};
k.flushCustomStyles=function(){if(!O){var a=this.N();if(this.h){var b=this.h.processStyles();!a&&!this.h.enqueued||wd(this.B.cssBuild)||(P?this.B.cssBuild||this.yb(b):(this.vb(b),this.ka(this.I,this.B),this.Sa(b),this.fa&&this.styleDocument()),this.h.enqueued=!1)}}};
k.vb=function(a){var b=this;a=a.map(function(c){return b.h.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.B.A.rules=a.map(function(c){return md(c)})};
k.styleElement=function(a,b){if(O){if(b){X(a)||Md(a,new W(null));var c=X(a);this.ya(c,b);ue(this,a,c)}}else if(c=X(a)||this.Aa(a))this.ga(a)||(this.fa=!0),b&&this.ya(c,b),P?ue(this,a,c):(this.flush(),this.ka(a,c),c.na&&c.na.length&&this.Ta(a,c))};k.ya=function(a,b){a.M=a.M||{};Object.assign(a.M,b)};
function ue(a,b,c){var d=T(b).is;if(c.M){var e=c.M,f;for(f in e)null===f?b.style.removeProperty(f):b.style.setProperty(f,e[f])}if(((e=ne[d])||a.ga(b))&&(!e||""===U(e))&&e&&e._style&&!qe(e)){if(qe(e)||e._applyShimValidatingVersion!==e._applyShimNextVersion)a.N(),a.l&&a.l.transformRules(e._styleAst,d),e._style.textContent=Bd(b,c.A),re(e);N&&(a=b.shadowRoot)&&(a=a.querySelector("style"))&&(a.textContent=Bd(b,c.A));c.A=e._styleAst}}
k.ia=function(a){return(a=ud(a).getRootNode().host)?X(a)||this.Aa(a)?a:this.ia(a):this.I};k.ga=function(a){return a===this.I};
k.Ta=function(a,b){var c=T(a).is,d=te.fetch(c,b.D,b.na),e=d?d.styleElement:null,f=b.v;b.v=d&&d.v||this.fb(c);var g=b.v;var h=ae;h=e?e.textContent||"":Zd(h,a,b.D,g);var l=X(a),m=l.K;m&&!N&&m!==e&&(m._useCount--,0>=m._useCount&&m.parentNode&&m.parentNode.removeChild(m));N?l.K?(l.K.textContent=h,e=l.K):h&&(e=od(h,g,a.shadowRoot,l.placeholder)):e?e.parentNode||(Pd&&-1<h.indexOf("@media")&&(e.textContent=h),pd(e,null,l.placeholder)):h&&(e=od(h,g,null,l.placeholder));e&&(e._useCount=e._useCount||0,l.K!=
e&&e._useCount++,l.K=e);g=e;N||(e=b.v,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&&td(a,l));d||te.store(c,b.D,g,b.v);return g};k.ka=function(a,b){var c=this.ia(a),d=X(c),e=d.D;c===this.I||e||(this.ka(c,d),e=d.D);c=Object.create(e||null);e=Yd(a,b.A,b.cssBuild);a=Wd(d.A,a).C;Object.assign(c,e.Mb,a,e.Sb);this.ob(c,b.M);a=ae;d=Object.getOwnPropertyNames(c);e=0;for(var f;e<d.length;e++)f=d[e],c[f]=Ud(a,c[f],c);b.D=c};
k.ob=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.I,a)};k.styleSubtree=function(a,b){var c=ud(a),d=c.shadowRoot,e=this.ga(a);(d||e)&&this.styleElement(a,b);if(a=e?c:d)for(a=Array.from(a.querySelectorAll("*")).filter(function(f){return ud(f).shadowRoot}),b=0;b<a.length;b++)this.styleSubtree(a[b])};k.yb=function(a){for(var b=0;b<a.length;b++){var c=this.h.getStyleForCustomStyle(a[b]);c&&this.xb(c)}};
k.Sa=function(a){for(var b=0;b<a.length;b++){var c=this.h.getStyleForCustomStyle(a[b]);c&&$d(c,this.B.D)}};k.La=function(a){var b=this,c=U(a);c!==this.B.cssBuild&&(this.B.cssBuild=c);if(!wd(c)){var d=md(a);R(d,function(e){if(N)Ld(e);else{var f=V;e.selector=e.parsedSelector;Ld(e);f.Ea(e,f.Db)}P&&""===c&&(b.N(),b.l&&b.l.transformRule(e))});P?a.textContent=Q(d):this.B.A.rules.push(d)}};k.xb=function(a){if(P&&this.l){var b=md(a);this.N();this.l.transformRules(b);a.textContent=Q(b)}};
k.getComputedStyleValue=function(a,b){var c;P||(c=(X(a)||X(this.ia(a))).D[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};k.Vb=function(a,b){var c=ud(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]===V.T){c=d[e+1];break}}}c&&b.push(V.T,c);P||(c=X(a))&&c.v&&b.push(ae.Oa,c.v);td(a,b.join(" "))};k.Bb=function(a){return X(a)};
k.Ub=function(a,b){V.element(a,b)};k.Yb=function(a,b){V.element(a,b,!0)};k.Tb=function(a){return ie(a)};k.Jb=function(a){return he(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.Vb;
Y.prototype._styleInfoForNode=Y.prototype.Bb;Y.prototype.transformCustomStyleForDocument=Y.prototype.La;Y.prototype.getStyleAst=Y.prototype.Kb;Y.prototype.styleAstToString=Y.prototype.Wb;Y.prototype.flushCustomStyles=Y.prototype.flushCustomStyles;Y.prototype.scopeNode=Y.prototype.Ub;Y.prototype.unscopeNode=Y.prototype.Yb;Y.prototype.scopeForNode=Y.prototype.Tb;Y.prototype.currentScopeForNode=Y.prototype.Jb;Y.prototype.prepareAdoptedCssText=Y.prototype.Qb;
Object.defineProperties(Y.prototype,{nativeShadow:{get:function(){return N}},nativeCss:{get:function(){return P}}});var Z=new Y,ve,we;window.ShadyCSS&&(ve=window.ShadyCSS.ApplyShim,we=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:P,nativeShadow:N,cssBuild:ed,disableRuntime:O};ve&&(window.ShadyCSS.ApplyShim=ve);we&&(window.ShadyCSS.CustomStyleInterface=we);})();