@decidables/detectable-elements 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@
3
3
  * @license
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
- */var S,A,E=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,T=Symbol(),M=new Map,C=function(){function t(e,n){if(r(this,t),this._$cssResult$=!0,n!==T)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}return i(t,[{key:"styleSheet",get:function(){var t=M.get(this.cssText);return E&&void 0===t&&(M.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}},{key:"toString",value:function(){return this.cssText}}]),t}(),N=function(t){return new C("string"==typeof t?t:t+"",T)},R=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var a=1===t.length?t[0]:n.reduce((function(e,n,r){return e+function(t){if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")}(n)+t[r+1]}),t[0]);return new C(a,T)},q=E?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",r=_(t.cssRules);try{for(r.s();!(e=r.n()).done;){n+=e.value.cssText}}catch(t){r.e(t)}finally{r.f()}return N(n)}(t):t},P=window.trustedTypes,z=P?P.emptyScript:"",F=window.reactiveElementPolyfillSupport,$={toAttribute:function(t,e){switch(e){case Boolean:t=t?z:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},O=function(t,e){return e!==t&&(e==e||t==t)},I={attribute:!0,type:String,converter:$,reflect:!1,hasChanged:O},H=function(t){s(c,t);var a,o,l=v(c);function c(){var t;return r(this,c),(t=l.call(this))._$Et=new Map,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Ei=null,t.o(),t}return i(c,[{key:"o",value:function(){var t,e=this;this._$Ep=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}},{key:"_$Em",value:function(){var t=this;this.constructor.elementProperties.forEach((function(e,n){t.hasOwnProperty(n)&&(t._$Et.set(n,t[n]),delete t[n])}))}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){E?t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):e.forEach((function(e){var n=document.createElement("style"),r=window.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$ES",value:function(t,e){var n,r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:I,i=this.constructor._$Eh(t,a);if(void 0!==i&&!0===a.reflect){var o=(null!==(r=null===(n=a.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==r?r:$.toAttribute)(e,a.type);this._$Ei=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Ei=null}}},{key:"_$AK",value:function(t,e){var n,r,a,i=this.constructor,o=i._$Eu.get(t);if(void 0!==o&&this._$Ei!==o){var s=i.getPropertyOptions(o),l=s.converter,c=null!==(a=null!==(r=null===(n=l)||void 0===n?void 0:n.fromAttribute)&&void 0!==r?r:"function"==typeof l?l:null)&&void 0!==a?a:$.fromAttribute;this._$Ei=o,this[o]=c(e,s.type),this._$Ei=null}}},{key:"requestUpdate",value:function(t,e,n){var r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||O)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$EC())}},{key:"_$EC",value:(a=regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$Ep;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])})),o=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=a.apply(t,e);function s(t){n(o,r,i,s,l,"next",t)}function l(t){n(o,r,i,s,l,"throw",t)}s(void 0)}))},function(){return o.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var t,e=this;if(this.isUpdatePending){this.hasUpdated,this._$Et&&(this._$Et.forEach((function(t,n){return e[n]=t})),this._$Et=void 0);var n=!1,r=this._$AL;try{(n=this.shouldUpdate(r))?(this.willUpdate(r),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(r)):this._$EU()}catch(t){throw n=!1,this._$EU(),t}n&&this._$AE(r)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$EU",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$Ep}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._$E_&&(this._$E_.forEach((function(t,n){return e._$ES(n,e[n],t)})),this._$E_=void 0),this._$EU()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this.elementProperties.forEach((function(n,r){var a=t._$Eh(r,n);void 0!==a&&(t._$Eu.set(a,r),e.push(a))})),e}},{key:"createProperty",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I;if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(t,n),!n.noAccessor&&!this.prototype.hasOwnProperty(t)){var r="symbol"==e(t)?Symbol():"__"+t,a=this.getPropertyDescriptor(t,r,n);void 0!==a&&Object.defineProperty(this.prototype,t,a)}}},{key:"getPropertyDescriptor",value:function(t,e,n){return{get:function(){return this[e]},set:function(r){var a=this[t];this[e]=r,this.requestUpdate(t,a,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){return this.elementProperties.get(t)||I}},{key:"finalize",value:function(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;var t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){var e,n=this.properties,r=_([].concat(w(Object.getOwnPropertyNames(n)),w(Object.getOwnPropertySymbols(n))));try{for(r.s();!(e=r.n()).done;){var a=e.value;this.createProperty(a,n[a])}}catch(t){r.e(t)}finally{r.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,r=_(new Set(t.flat(1/0).reverse()));try{for(r.s();!(n=r.n()).done;){var a=n.value;e.unshift(q(a))}}catch(t){r.e(t)}finally{r.f()}}else void 0!==t&&e.push(q(t));return e}},{key:"_$Eh",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]),c}(d(HTMLElement));H.finalized=!0,H.elementProperties=new Map,H.elementStyles=[],H.shadowRootOptions={mode:"open"},null==F||F({ReactiveElement:H}),(null!==(S=globalThis.reactiveElementVersions)&&void 0!==S?S:globalThis.reactiveElementVersions=[]).push("1.1.2");var D=globalThis.trustedTypes,U=D?D.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,j="lit$".concat((Math.random()+"").slice(9),"$"),L="?"+j,V="<".concat(L,">"),B=document,K=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.createComment(t)},X=function(t){return null===t||"object"!=e(t)&&"function"!=typeof t},G=Array.isArray,Z=function(t){var e;return G(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,Q=/>/g,J=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,tt=/'/g,et=/"/g,nt=/^(?:script|style|textarea)$/i,rt=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return{_$litType$:t,strings:e,values:r}}},at=rt(1),it=rt(2),ot=Symbol.for("lit-noChange"),st=Symbol.for("lit-nothing"),lt=new WeakMap,ct=B.createTreeWalker(B,129,null,!1),ut=function(t,e){for(var n,r=t.length-1,a=[],i=2===e?"<svg>":"",o=Y,s=0;s<r;s++){for(var l=t[s],c=void 0,u=void 0,h=-1,d=0;d<l.length&&(o.lastIndex=d,null!==(u=o.exec(l)));)d=o.lastIndex,o===Y?"!--"===u[1]?o=W:void 0!==u[1]?o=Q:void 0!==u[2]?(nt.test(u[2])&&(n=RegExp("</"+u[2],"g")),o=J):void 0!==u[3]&&(o=J):o===J?">"===u[0]?(o=null!=n?n:Y,h=-1):void 0===u[1]?h=-2:(h=o.lastIndex-u[2].length,c=u[1],o=void 0===u[3]?J:'"'===u[3]?et:tt):o===et||o===tt?o=J:o===W||o===Q?o=Y:(o=J,n=void 0);var f=o===J&&t[s+1].startsWith("/>")?" ":"";i+=o===Y?l+V:h>=0?(a.push(c),l.slice(0,h)+"$lit$"+l.slice(h)+j+f):l+j+(-2===h?(a.push(void 0),s):f)}var p=i+(t[r]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==U?U.createHTML(p):p,a]},ht=function(){function t(e,n){var a,i=e.strings,o=e._$litType$;r(this,t),this.parts=[];var s=0,l=0,c=i.length-1,u=this.parts,h=y(ut(i,o),2),d=h[0],f=h[1];if(this.el=t.createElement(d,n),ct.currentNode=this.el.content,2===o){var p=this.el.content,v=p.firstChild;v.remove(),p.append.apply(p,w(v.childNodes))}for(;null!==(a=ct.nextNode())&&u.length<c;){if(1===a.nodeType){if(a.hasAttributes()){var m,b=[],g=_(a.getAttributeNames());try{for(g.s();!(m=g.n()).done;){var k=m.value;if(k.endsWith("$lit$")||k.startsWith(j)){var x=f[l++];if(b.push(k),void 0!==x){var S=a.getAttribute(x.toLowerCase()+"$lit$").split(j),A=/([.?@])?(.*)/.exec(x);u.push({type:1,index:s,name:A[2],strings:S,ctor:"."===A[1]?gt:"?"===A[1]?wt:"@"===A[1]?kt:bt})}else u.push({type:6,index:s})}}}catch(t){g.e(t)}finally{g.f()}for(var E=0,T=b;E<T.length;E++){var M=T[E];a.removeAttribute(M)}}if(nt.test(a.tagName)){var C=a.textContent.split(j),N=C.length-1;if(N>0){a.textContent=D?D.emptyScript:"";for(var R=0;R<N;R++)a.append(C[R],K()),ct.nextNode(),u.push({type:2,index:++s});a.append(C[N],K())}}}else if(8===a.nodeType)if(a.data===L)u.push({type:2,index:s});else for(var q=-1;-1!==(q=a.data.indexOf(j,q+1));)u.push({type:7,index:s}),q+=j.length-1;s++}}return i(t,null,[{key:"createElement",value:function(t,e){var n=B.createElement("template");return n.innerHTML=t,n}}]),t}();function dt(t,e){var n,r,a,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;if(e===ot)return e;var l=void 0!==s?null===(n=o._$Cl)||void 0===n?void 0:n[s]:o._$Cu,c=X(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===c?l=void 0:(l=new c(t))._$AT(t,o,s),void 0!==s?(null!==(a=(i=o)._$Cl)&&void 0!==a?a:i._$Cl=[])[s]=l:o._$Cu=l),void 0!==l&&(e=dt(t,l._$AS(t,e.values),l,s)),e}var ft,pt,vt=function(){function t(e,n){r(this,t),this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=n}return i(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"p",value:function(t){var e,n=this._$AD,r=n.el.content,a=n.parts,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:B).importNode(r,!0);ct.currentNode=i;for(var o=ct.nextNode(),s=0,l=0,c=a[0];void 0!==c;){if(s===c.index){var u=void 0;2===c.type?u=new mt(o,o.nextSibling,this,t):1===c.type?u=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(u=new xt(o,this,t)),this.v.push(u),c=a[++l]}s!==(null==c?void 0:c.index)&&(o=ct.nextNode(),s++)}return i}},{key:"m",value:function(t){var e,n=0,r=_(this.v);try{for(r.s();!(e=r.n()).done;){var a=e.value;void 0!==a&&(void 0!==a.strings?(a._$AI(t,a,n),n+=a.strings.length-2):a._$AI(t[n])),n++}}catch(t){r.e(t)}finally{r.f()}}}]),t}(),mt=function(){function t(e,n,a,i){var o;r(this,t),this.type=2,this._$AH=st,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=a,this.options=i,this._$Cg=null===(o=null==i?void 0:i.isConnected)||void 0===o||o}return i(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;t=dt(this,t,e),X(t)?t===st||null==t||""===t?(this._$AH!==st&&this._$AR(),this._$AH=st):t!==this._$AH&&t!==ot&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):Z(t)?this.A(t):this.$(t)}},{key:"M",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._$AB;return this._$AA.parentNode.insertBefore(t,e)}},{key:"S",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}},{key:"$",value:function(t){this._$AH!==st&&X(this._$AH)?this._$AA.nextSibling.data=t:this.S(B.createTextNode(t)),this._$AH=t}},{key:"T",value:function(t){var e,n=t.values,r=t._$litType$,a="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=ht.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===a)this._$AH.m(n);else{var i=new vt(a,this),o=i.p(this.options);i.m(n),this.S(o),this._$AH=i}}},{key:"_$AC",value:function(t){var e=lt.get(t.strings);return void 0===e&&lt.set(t.strings,e=new ht(t)),e}},{key:"A",value:function(e){G(this._$AH)||(this._$AH=[],this._$AR());var n,r,a=this._$AH,i=0,o=_(e);try{for(o.s();!(r=o.n()).done;){var s=r.value;i===a.length?a.push(n=new t(this.M(K()),this.M(K()),this,this.options)):n=a[i],n._$AI(s),i++}}catch(t){o.e(t)}finally{o.f()}i<a.length&&(this._$AR(n&&n._$AB.nextSibling,i),a.length=i)}},{key:"_$AR",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var r=e.nextSibling;e.remove(),e=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),bt=function(){function t(e,n,a,i,o){r(this,t),this.type=1,this._$AH=st,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=o,a.length>2||""!==a[0]||""!==a[1]?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=st}return i(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,a=this.strings,i=!1;if(void 0===a)t=dt(this,t,e,0),(i=!X(t)||t!==this._$AH&&t!==ot)&&(this._$AH=t);else{var o,s,l=t;for(t=a[0],o=0;o<a.length-1;o++)(s=dt(this,l[n+o],e,o))===ot&&(s=this._$AH[o]),i||(i=!X(s)||s!==this._$AH[o]),s===st?t=st:t!==st&&(t+=(null!=s?s:"")+a[o+1]),this._$AH[o]=s}i&&!r&&this.k(t)}},{key:"k",value:function(t){t===st?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}]),t}(),gt=function(t){s(n,t);var e=v(n);function n(){var t;return r(this,n),(t=e.apply(this,arguments)).type=3,t}return i(n,[{key:"k",value:function(t){this.element[this.name]=t===st?void 0:t}}]),n}(bt),yt=D?D.emptyScript:"",wt=function(t){s(n,t);var e=v(n);function n(){var t;return r(this,n),(t=e.apply(this,arguments)).type=4,t}return i(n,[{key:"k",value:function(t){t&&t!==st?this.element.setAttribute(this.name,yt):this.element.removeAttribute(this.name)}}]),n}(bt),kt=function(t){s(n,t);var e=v(n);function n(t,a,i,o,s){var l;return r(this,n),(l=e.call(this,t,a,i,o,s)).type=5,l}return i(n,[{key:"_$AI",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;if((t=null!==(e=dt(this,t,n,0))&&void 0!==e?e:st)!==ot){var r=this._$AH,a=t===st&&r!==st||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==st&&(r===st||a);a&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}]),n}(bt),xt=function(){function t(e,n,a){r(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=a}return i(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){dt(this,t)}}]),t}(),_t=window.litHtmlPolyfillSupport;null==_t||_t(ht,mt),(null!==(A=globalThis.litHtmlVersions)&&void 0!==A?A:globalThis.litHtmlVersions=[]).push("2.1.1");var St=function(t){s(n,t);var e=v(n);function n(){var t;return r(this,n),(t=e.apply(this,arguments)).renderOptions={host:f(t)},t._$Dt=void 0,t}return i(n,[{key:"createRenderRoot",value:function(){var t,e,r=b(l(n.prototype),"createRenderRoot",this).call(this);return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=r.firstChild),r}},{key:"update",value:function(t){var e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),b(l(n.prototype),"update",this).call(this,t),this._$Dt=function(t,e,n){var r,a,i=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e,o=i._$litPart$;if(void 0===o){var s=null!==(a=null==n?void 0:n.renderBefore)&&void 0!==a?a:null;i._$litPart$=o=new mt(e.insertBefore(K(),s),s,void 0,null!=n?n:{})}return o._$AI(t),o}(e,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;b(l(n.prototype),"connectedCallback",this).call(this),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;b(l(n.prototype),"disconnectedCallback",this).call(this),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return ot}}]),n}(H);St.finalized=!0,St._$litElement$=!0,null===(ft=globalThis.litElementHydrateSupport)||void 0===ft||ft.call(globalThis,{LitElement:St});var At=globalThis.litElementPolyfillSupport;function Et(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Tt(t){var e=t,n=t,r=t;function a(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(a<i){if(0!==n(e,e))return i;do{var o=a+i>>>1;r(t[o],e)<0?a=o+1:i=o}while(a<i)}return a}return 2!==t.length&&(e=function(e,n){return t(e)-n},n=Et,r=function(e,n){return Et(t(e),n)}),{left:a,center:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,o=a(t,n,r,i-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(a<i){if(0!==n(e,e))return i;do{var o=a+i>>>1;r(t[o],e)<=0?a=o+1:i=o}while(a<i)}return a}}}null==At||At({LitElement:St}),(null!==(pt=globalThis.litElementVersions)&&void 0!==pt?pt:globalThis.litElementVersions=[]).push("3.1.1");var Mt=Tt(Et).right;Tt((function(t){return null===t?NaN:+t})).center;var Ct=Mt;function Nt(t,e){var n,r;if(void 0===e){var a,i=_(t);try{for(i.s();!(a=i.n()).done;){var o=a.value;null!=o&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}}catch(t){i.e(t)}finally{i.f()}}else{var s,l=-1,c=_(t);try{for(c.s();!(s=c.n()).done;){var u=s.value;null!=(u=e(u,++l,t))&&(void 0===n?u>=u&&(n=r=u):(n>u&&(n=u),r<u&&(r=u)))}}catch(t){c.e(t)}finally{c.f()}}return[n,r]}var Rt=function(){function t(){r(this,t),this._partials=new Float64Array(32),this._n=0}return i(t,[{key:"add",value:function(t){for(var e=this._partials,n=0,r=0;r<this._n&&r<32;r++){var a=e[r],i=t+a,o=Math.abs(t)<Math.abs(a)?t-(i-a):a-(i-t);o&&(e[n++]=o),t=i}return e[n]=t,this._n=n+1,this}},{key:"valueOf",value:function(){var t,e,n,r=this._partials,a=this._n,i=0;if(a>0){for(i=r[--a];a>0&&(t=i,!(n=(e=r[--a])-((i=t+e)-t))););a>0&&(n<0&&r[a-1]<0||n>0&&r[a-1]>0)&&(e=2*n)==(t=i+e)-i&&(i=t)}return i}}]),t}();function qt(t){return t}var Pt=Array.prototype.slice;function zt(t){return function(){return t}}var Ft=Math.sqrt(50),$t=Math.sqrt(10),Ot=Math.sqrt(2);function It(t,e,n){var r,a,i,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(a=t,t=e,e=a),0===(o=Ht(t,e,n))||!isFinite(o))return[];if(o>0){var l=Math.round(t/o),c=Math.round(e/o);for(l*o<t&&++l,c*o>e&&--c,i=new Array(a=c-l+1);++s<a;)i[s]=(l+s)*o}else{o=-o;var u=Math.round(t*o),h=Math.round(e*o);for(u/o<t&&++u,h/o>e&&--h,i=new Array(a=h-u+1);++s<a;)i[s]=(u+s)/o}return r&&i.reverse(),i}function Ht(t,e,n){var r=(e-t)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,a);return a>=0?(i>=Ft?10:i>=$t?5:i>=Ot?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=Ft?10:i>=$t?5:i>=Ot?2:1)}function Dt(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=Ft?a*=10:i>=$t?a*=5:i>=Ot&&(a*=2),e<t?-a:a}function Ut(t){return Math.ceil(Math.log(function(t,e){var n=0;if(void 0===e){var r,a=_(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;null!=i&&(i=+i)>=i&&++n}}catch(t){a.e(t)}finally{a.f()}}else{var o,s=-1,l=_(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;null!=(c=e(c,++s,t))&&(c=+c)>=c&&++n}}catch(t){l.e(t)}finally{l.f()}}return n}(t))/Math.LN2)+1}function jt(){var t=qt,e=Nt,n=Ut;function r(r){Array.isArray(r)||(r=Array.from(r));var a,i,o=r.length,s=new Array(o);for(a=0;a<o;++a)s[a]=t(r[a],a,r);var l=e(s),c=l[0],u=l[1],h=n(s,c,u);if(!Array.isArray(h)){var d=u,f=+h;if(e===Nt){var p=function(t,e,n){for(var r;;){var a=Ht(t,e,n);if(a===r||0===a||!isFinite(a))return[t,e];a>0?(t=Math.floor(t/a)*a,e=Math.ceil(e/a)*a):a<0&&(t=Math.ceil(t*a)/a,e=Math.floor(e*a)/a),r=a}}(c,u,f),v=y(p,2);c=v[0],u=v[1]}if((h=It(c,u,f))[h.length-1]>=u)if(d>=u&&e===Nt){var m=Ht(c,u,f);isFinite(m)&&(m>0?u=(Math.floor(u/m)+1)*m:m<0&&(u=(Math.ceil(u*-m)+1)/-m))}else h.pop()}for(var b=h.length;h[0]<=c;)h.shift(),--b;for(;h[b-1]>u;)h.pop(),--b;var g,w=new Array(b+1);for(a=0;a<=b;++a)(g=w[a]=[]).x0=a>0?h[a-1]:c,g.x1=a<b?h[a]:u;for(a=0;a<o;++a)null!=(i=s[a])&&c<=i&&i<=u&&w[Ct(h,i,0,b)].push(r[a]);return w}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:zt(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:zt([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?zt(Pt.call(t)):zt(t),r):n},r}var Lt=regeneratorRuntime.mark(Vt);function Vt(t){var e,n,r;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:e=_(t),a.prev=1,e.s();case 3:if((n=e.n()).done){a.next=8;break}return r=n.value,a.delegateYield(r,"t0",6);case 6:a.next=3;break;case 8:a.next=13;break;case 10:a.prev=10,a.t1=a.catch(1),e.e(a.t1);case 13:return a.prev=13,e.f(),a.finish(13);case 16:case"end":return a.stop()}}),Lt,null,[[1,10,13,16]])}function Bt(t,e,n){t=+t,e=+e,n=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+n;for(var r=-1,a=0|Math.max(0,Math.ceil((e-t)/n)),i=new Array(a);++r<a;)i[r]=t+r*n;return i}function Kt(t){return t}var Xt=1e-6;function Gt(t){return"translate("+t+",0)"}function Zt(t){return"translate(0,"+t+")"}function Yt(t){return function(e){return+t(e)}}function Wt(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Qt(){return!this.__axis}function Jt(t,e){var n=[],r=null,a=null,i=6,o=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",h=1===t||3===t?Gt:Zt;function d(d){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==a?e.tickFormat?e.tickFormat.apply(e,n):Kt:a,v=Math.max(i,0)+s,m=e.range(),b=+m[0]+l,g=+m[m.length-1]+l,y=(e.bandwidth?Wt:Yt)(e.copy(),l),w=d.selection?d.selection():d,k=w.selectAll(".domain").data([null]),x=w.selectAll(".tick").data(f,e).order(),_=x.exit(),S=x.enter().append("g").attr("class","tick"),A=x.select("line"),E=x.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(S),A=A.merge(S.append("line").attr("stroke","currentColor").attr(u+"2",c*i)),E=E.merge(S.append("text").attr("fill","currentColor").attr(u,c*v).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==w&&(k=k.transition(d),x=x.transition(d),A=A.transition(d),E=E.transition(d),_=_.transition(d).attr("opacity",Xt).attr("transform",(function(t){return isFinite(t=y(t))?h(t+l):this.getAttribute("transform")})),S.attr("opacity",Xt).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:y(t))+l)}))),_.remove(),k.attr("d",4===t||2===t?o?"M"+c*o+","+b+"H"+l+"V"+g+"H"+c*o:"M"+l+","+b+"V"+g:o?"M"+b+","+c*o+"V"+l+"H"+g+"V"+c*o:"M"+b+","+l+"H"+g),x.attr("opacity",1).attr("transform",(function(t){return h(y(t)+l)})),A.attr(u+"2",c*i),E.attr(u,c*v).text(p),w.filter(Qt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),w.each((function(){this.__axis=y}))}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),d):r&&r.slice()},d.tickFormat=function(t){return arguments.length?(a=t,d):a},d.tickSize=function(t){return arguments.length?(i=o=+t,d):i},d.tickSizeInner=function(t){return arguments.length?(i=+t,d):i},d.tickSizeOuter=function(t){return arguments.length?(o=+t,d):o},d.tickPadding=function(t){return arguments.length?(s=+t,d):s},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function te(t){return Jt(3,t)}function ee(t){return Jt(4,t)}var ne={value:function(){}};function re(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ae(r)}function ae(t){this._=t}function ie(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function oe(t,e){for(var n,r=0,a=t.length;r<a;++r)if((n=t[r]).name===e)return n.value}function se(t,e,n){for(var r=0,a=t.length;r<a;++r)if(t[r].name===e){t[r]=ne,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ae.prototype=re.prototype={constructor:ae,on:function(t,e){var n,r=this._,a=ie(t+"",r),i=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<o;)if(n=(t=a[i]).type)r[n]=se(r[n],t.name,e);else if(null==e)for(n in r)r[n]=se(r[n],t.name,null);return this}for(;++i<o;)if((n=(t=a[i]).type)&&(n=oe(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ae(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,a=new Array(n),i=0;i<n;++i)a[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,a)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],a=0,i=r.length;a<i;++a)r[a].value.apply(e,n)}};var le="http://www.w3.org/1999/xhtml",ce={svg:"http://www.w3.org/2000/svg",xhtml:le,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ue(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ce.hasOwnProperty(e)?{space:ce[e],local:t}:t}function he(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===le&&e.documentElement.namespaceURI===le?e.createElement(t):e.createElementNS(n,t)}}function de(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function fe(t){var e=ue(t);return(e.local?de:he)(e)}function pe(){}function ve(t){return null==t?pe:function(){return this.querySelector(t)}}function me(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function be(){return[]}function ge(t){return null==t?be:function(){return this.querySelectorAll(t)}}function ye(t){return function(){return this.matches(t)}}function we(t){return function(e){return e.matches(t)}}var ke=Array.prototype.find;function xe(){return this.firstElementChild}var _e=Array.prototype.filter;function Se(){return Array.from(this.children)}function Ae(t){return new Array(t.length)}function Ee(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Te(t){return function(){return t}}function Me(t,e,n,r,a,i){for(var o,s=0,l=e.length,c=i.length;s<c;++s)(o=e[s])?(o.__data__=i[s],r[s]=o):n[s]=new Ee(t,i[s]);for(;s<l;++s)(o=e[s])&&(a[s]=o)}function Ce(t,e,n,r,a,i,o){var s,l,c,u=new Map,h=e.length,d=i.length,f=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(f[s]=c=o.call(l,l.__data__,s,e)+"",u.has(c)?a[s]=l:u.set(c,l));for(s=0;s<d;++s)c=o.call(t,i[s],s,i)+"",(l=u.get(c))?(r[s]=l,l.__data__=i[s],u.delete(c)):n[s]=new Ee(t,i[s]);for(s=0;s<h;++s)(l=e[s])&&u.get(f[s])===l&&(a[s]=l)}function Ne(t){return t.__data__}function Re(t){return"object"===e(t)&&"length"in t?t:Array.from(t)}function qe(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Pe(t){return function(){this.removeAttribute(t)}}function ze(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fe(t,e){return function(){this.setAttribute(t,e)}}function $e(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Oe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Ie(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function He(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function De(t){return function(){this.style.removeProperty(t)}}function Ue(t,e,n){return function(){this.style.setProperty(t,e,n)}}function je(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Le(t,e){return t.style.getPropertyValue(e)||He(t).getComputedStyle(t,null).getPropertyValue(e)}function Ve(t){return function(){delete this[t]}}function Be(t,e){return function(){this[t]=e}}function Ke(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Xe(t){return t.trim().split(/^|\s+/)}function Ge(t){return t.classList||new Ze(t)}function Ze(t){this._node=t,this._names=Xe(t.getAttribute("class")||"")}function Ye(t,e){for(var n=Ge(t),r=-1,a=e.length;++r<a;)n.add(e[r])}function We(t,e){for(var n=Ge(t),r=-1,a=e.length;++r<a;)n.remove(e[r])}function Qe(t){return function(){Ye(this,t)}}function Je(t){return function(){We(this,t)}}function tn(t,e){return function(){(e.apply(this,arguments)?Ye:We)(this,t)}}function en(){this.textContent=""}function nn(t){return function(){this.textContent=t}}function rn(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function an(){this.innerHTML=""}function on(t){return function(){this.innerHTML=t}}function sn(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ln(){this.nextSibling&&this.parentNode.appendChild(this)}function cn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function un(){return null}function hn(){var t=this.parentNode;t&&t.removeChild(this)}function dn(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function fn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function pn(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function vn(t){return function(){var e=this.__on;if(e){for(var n,r=0,a=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++a]=n:this.removeEventListener(n.type,n.listener,n.options);++a?e.length=a:delete this.__on}}}function mn(t,e,n){return function(){var r,a=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(a)for(var o=0,s=a.length;o<s;++o)if((r=a[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=e);this.addEventListener(t.type,i,n),r={type:t.type,name:t.name,value:e,listener:i,options:n},a?a.push(r):this.__on=[r]}}function bn(t,e,n){var r=He(t),a=r.CustomEvent;"function"==typeof a?a=new a(e,n):(a=r.document.createEvent("Event"),n?(a.initEvent(e,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}function gn(t,e){return function(){return bn(this,t,e)}}function yn(t,e){return function(){return bn(this,t,e.apply(this,arguments))}}Ee.prototype={constructor:Ee,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Ze.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var wn=regeneratorRuntime.mark(kn);function kn(){var t,e,n,r,a,i,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:t=this._groups,e=0,n=t.length;case 1:if(!(e<n)){s.next=13;break}r=t[e],a=0,i=r.length;case 3:if(!(a<i)){s.next=10;break}if(!(o=r[a])){s.next=7;break}return s.next=7,o;case 7:++a,s.next=3;break;case 10:++e,s.next=1;break;case 13:case"end":return s.stop()}}),wn,this)}var xn=[null];function _n(t,e){this._groups=t,this._parents=e}function Sn(){return new _n([[document.documentElement]],xn)}function An(t){return"string"==typeof t?new _n([[document.querySelector(t)]],[document.documentElement]):new _n([[t]],xn)}function En(t,e){if(t=function(t){for(var e;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[t.clientX-a.left-e.clientLeft,t.clientY-a.top-e.clientTop]}}return[t.pageX,t.pageY]}_n.prototype=Sn.prototype=o({constructor:_n,select:function(t){"function"!=typeof t&&(t=ve(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o,s=e[a],l=s.length,c=r[a]=new Array(l),u=0;u<l;++u)(i=s[u])&&(o=t.call(i,i.__data__,u,s))&&("__data__"in i&&(o.__data__=i.__data__),c[u]=o);return new _n(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return me(t.apply(this,arguments))}}(t):ge(t);for(var e=this._groups,n=e.length,r=[],a=[],i=0;i<n;++i)for(var o,s=e[i],l=s.length,c=0;c<l;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),a.push(o));return new _n(r,a)},selectChild:function(t){return this.select(null==t?xe:function(t){return function(){return ke.call(this.children,t)}}("function"==typeof t?t:we(t)))},selectChildren:function(t){return this.selectAll(null==t?Se:function(t){return function(){return _e.call(this.children,t)}}("function"==typeof t?t:we(t)))},filter:function(t){"function"!=typeof t&&(t=ye(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o=e[a],s=o.length,l=r[a]=[],c=0;c<s;++c)(i=o[c])&&t.call(i,i.__data__,c,o)&&l.push(i);return new _n(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Ne);var n=e?Ce:Me,r=this._parents,a=this._groups;"function"!=typeof t&&(t=Te(t));for(var i=a.length,o=new Array(i),s=new Array(i),l=new Array(i),c=0;c<i;++c){var u=r[c],h=a[c],d=h.length,f=Re(t.call(u,u&&u.__data__,c,r)),p=f.length,v=s[c]=new Array(p),m=o[c]=new Array(p),b=l[c]=new Array(d);n(u,h,v,m,b,f,e);for(var g,y,w=0,k=0;w<p;++w)if(g=v[w]){for(w>=k&&(k=w+1);!(y=m[k])&&++k<p;);g._next=y||null}}return(o=new _n(o,r))._enter=s,o._exit=l,o},enter:function(){return new _n(this._enter||this._groups.map(Ae),this._parents)},exit:function(){return new _n(this._exit||this._groups.map(Ae),this._parents)},join:function(t,e,n){var r=this.enter(),a=this,i=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(a=e(a))&&(a=a.selection()),null==n?i.remove():n(i),r&&a?r.merge(a).order():a},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,a=n.length,i=r.length,o=Math.min(a,i),s=new Array(a),l=0;l<o;++l)for(var c,u=n[l],h=r[l],d=u.length,f=s[l]=new Array(d),p=0;p<d;++p)(c=u[p]||h[p])&&(f[p]=c);for(;l<a;++l)s[l]=n[l];return new _n(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,a=t[e],i=a.length-1,o=a[i];--i>=0;)(r=a[i])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=qe);for(var n=this._groups,r=n.length,a=new Array(r),i=0;i<r;++i){for(var o,s=n[i],l=s.length,c=a[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(c[u]=o);c.sort(e)}return new _n(a,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],a=0,i=r.length;a<i;++a){var o=r[a];if(o)return o}return null},size:function(){var t,e=0,n=_(this);try{for(n.s();!(t=n.n()).done;){t.value;++e}}catch(t){n.e(t)}finally{n.f()}return e},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var a,i=e[n],o=0,s=i.length;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this},attr:function(t,e){var n=ue(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?ze:Pe:"function"==typeof e?n.local?Ie:Oe:n.local?$e:Fe)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?De:"function"==typeof e?je:Ue)(t,e,null==n?"":n)):Le(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ve:"function"==typeof e?Ke:Be)(t,e)):this.node()[t]},classed:function(t,e){var n=Xe(t+"");if(arguments.length<2){for(var r=Ge(this.node()),a=-1,i=n.length;++a<i;)if(!r.contains(n[a]))return!1;return!0}return this.each(("function"==typeof e?tn:e?Qe:Je)(n,e))},text:function(t){return arguments.length?this.each(null==t?en:("function"==typeof t?rn:nn)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?an:("function"==typeof t?sn:on)(t)):this.node().innerHTML},raise:function(){return this.each(ln)},lower:function(){return this.each(cn)},append:function(t){var e="function"==typeof t?t:fe(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:fe(t),r=null==e?un:"function"==typeof e?e:ve(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(hn)},clone:function(t){return this.select(t?fn:dn)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,a,i=pn(t+""),o=i.length;if(!(arguments.length<2)){for(s=e?mn:vn,r=0;r<o;++r)this.each(s(i[r],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<o;++r)if((a=i[r]).type===l.type&&a.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?yn:gn)(t,e))}},Symbol.iterator,kn);var Tn={passive:!1},Mn={capture:!0,passive:!1};function Cn(t){t.stopImmediatePropagation()}function Nn(t){t.preventDefault(),t.stopImmediatePropagation()}var Rn=function(t){return function(){return t}};function qn(t,e){var n=e.sourceEvent,r=e.subject,a=e.target,i=e.identifier,o=e.active,s=e.x,l=e.y,c=e.dx,u=e.dy,h=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}function Pn(t){return!t.ctrlKey&&!t.button}function zn(){return this.parentNode}function Fn(t,e){return null==e?{x:t.x,y:t.y}:e}function $n(){return navigator.maxTouchPoints||"ontouchstart"in this}function On(){var t,e,n,r,a=Pn,i=zn,o=Fn,s=$n,l={},c=re("start","drag","end"),u=0,h=0;function d(t){t.on("mousedown.drag",f).filter(s).on("touchstart.drag",m).on("touchmove.drag",b,Tn).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(o,s){if(!r&&a.call(this,o,s)){var l=y(this,i.call(this,o,s),o,s,"mouse");l&&(An(o.view).on("mousemove.drag",p,Mn).on("mouseup.drag",v,Mn),function(t){var e=t.document.documentElement,n=An(t).on("dragstart.drag",Nn,Mn);"onselectstart"in e?n.on("selectstart.drag",Nn,Mn):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(o.view),Cn(o),n=!1,t=o.clientX,e=o.clientY,l("start",o))}}function p(r){if(Nn(r),!n){var a=r.clientX-t,i=r.clientY-e;n=a*a+i*i>h}l.mouse("drag",r)}function v(t){An(t.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=An(t).on("dragstart.drag",null);e&&(r.on("click.drag",Nn,Mn),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,n),Nn(t),l.mouse("end",t)}function m(t,e){if(a.call(this,t,e)){var n,r,o=t.changedTouches,s=i.call(this,t,e),l=o.length;for(n=0;n<l;++n)(r=y(this,s,t,e,o[n].identifier,o[n]))&&(Cn(t),r("start",t,o[n]))}}function b(t){var e,n,r=t.changedTouches,a=r.length;for(e=0;e<a;++e)(n=l[r[e].identifier])&&(Nn(t),n("drag",t,r[e]))}function g(t){var e,n,a=t.changedTouches,i=a.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),e=0;e<i;++e)(n=l[a[e].identifier])&&(Cn(t),n("end",t,a[e]))}function y(t,e,n,r,a,i){var s,h,f,p=c.copy(),v=En(i||n,e);if(null!=(f=o.call(t,new qn("beforestart",{sourceEvent:n,target:d,identifier:a,active:u,x:v[0],y:v[1],dx:0,dy:0,dispatch:p}),r)))return s=f.x-v[0]||0,h=f.y-v[1]||0,function n(i,o,c){var m,b=v;switch(i){case"start":l[a]=n,m=u++;break;case"end":delete l[a],--u;case"drag":v=En(c||o,e),m=u}p.call(i,t,new qn(i,{sourceEvent:o,subject:f,target:d,identifier:a,active:m,x:v[0]+s,y:v[1]+h,dx:v[0]-b[0],dy:v[1]-b[1],dispatch:p}),r)}}return d.filter=function(t){return arguments.length?(a="function"==typeof t?t:Rn(!!t),d):a},d.container=function(t){return arguments.length?(i="function"==typeof t?t:Rn(t),d):i},d.subject=function(t){return arguments.length?(o="function"==typeof t?t:Rn(t),d):o},d.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Rn(!!t),d):s},d.on=function(){var t=c.on.apply(c,arguments);return t===c?d:t},d.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,d):Math.sqrt(h)},d}function In(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Hn(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Dn(){}qn.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Un=.7,jn=1/Un,Ln="\\s*([+-]?\\d+)\\s*",Vn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Kn=/^#([0-9a-f]{3,8})$/,Xn=new RegExp("^rgb\\("+[Ln,Ln,Ln]+"\\)$"),Gn=new RegExp("^rgb\\("+[Bn,Bn,Bn]+"\\)$"),Zn=new RegExp("^rgba\\("+[Ln,Ln,Ln,Vn]+"\\)$"),Yn=new RegExp("^rgba\\("+[Bn,Bn,Bn,Vn]+"\\)$"),Wn=new RegExp("^hsl\\("+[Vn,Bn,Bn]+"\\)$"),Qn=new RegExp("^hsla\\("+[Vn,Bn,Bn,Vn]+"\\)$"),Jn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function tr(){return this.rgb().formatHex()}function er(){return this.rgb().formatRgb()}function nr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Kn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?rr(e):3===n?new sr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ar(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ar(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Xn.exec(t))?new sr(e[1],e[2],e[3],1):(e=Gn.exec(t))?new sr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Zn.exec(t))?ar(e[1],e[2],e[3],e[4]):(e=Yn.exec(t))?ar(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Wn.exec(t))?hr(e[1],e[2]/100,e[3]/100,1):(e=Qn.exec(t))?hr(e[1],e[2]/100,e[3]/100,e[4]):Jn.hasOwnProperty(t)?rr(Jn[t]):"transparent"===t?new sr(NaN,NaN,NaN,0):null}function rr(t){return new sr(t>>16&255,t>>8&255,255&t,1)}function ar(t,e,n,r){return r<=0&&(t=e=n=NaN),new sr(t,e,n,r)}function ir(t){return t instanceof Dn||(t=nr(t)),t?new sr((t=t.rgb()).r,t.g,t.b,t.opacity):new sr}function or(t,e,n,r){return 1===arguments.length?ir(t):new sr(t,e,n,null==r?1:r)}function sr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function lr(){return"#"+ur(this.r)+ur(this.g)+ur(this.b)}function cr(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ur(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function hr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new fr(t,e,n,r)}function dr(t){if(t instanceof fr)return new fr(t.h,t.s,t.l,t.opacity);if(t instanceof Dn||(t=nr(t)),!t)return new fr;if(t instanceof fr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,a=Math.min(e,n,r),i=Math.max(e,n,r),o=NaN,s=i-a,l=(i+a)/2;return s?(o=e===i?(n-r)/s+6*(n<r):n===i?(r-e)/s+2:(e-n)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new fr(o,s,l,t.opacity)}function fr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function pr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}In(Dn,nr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:tr,formatHex:tr,formatHsl:function(){return dr(this).formatHsl()},formatRgb:er,toString:er}),In(sr,or,Hn(Dn,{brighter:function(t){return t=null==t?jn:Math.pow(jn,t),new sr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Un:Math.pow(Un,t),new sr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:lr,formatHex:lr,formatRgb:cr,toString:cr})),In(fr,(function(t,e,n,r){return 1===arguments.length?dr(t):new fr(t,e,n,null==r?1:r)}),Hn(Dn,{brighter:function(t){return t=null==t?jn:Math.pow(jn,t),new fr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Un:Math.pow(Un,t),new fr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,a=2*n-r;return new sr(pr(t>=240?t-240:t+120,a,r),pr(t,a,r),pr(t<120?t+240:t-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var vr=function(t){return function(){return t}};function mr(t){return 1==(t=+t)?br:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):vr(isNaN(e)?n:e)}}function br(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):vr(isNaN(t)?e:t)}var gr=function t(e){var n=mr(e);function r(t,e){var r=n((t=or(t)).r,(e=or(e)).r),a=n(t.g,e.g),i=n(t.b,e.b),o=br(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=a(e),t.b=i(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function yr(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,a=e.slice();return function(i){for(n=0;n<r;++n)a[n]=t[n]*(1-i)+e[n]*i;return a}}function wr(t,e){var n,r=e?e.length:0,a=t?Math.min(r,t.length):0,i=new Array(a),o=new Array(r);for(n=0;n<a;++n)i[n]=Tr(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<a;++n)o[n]=i[n](t);return o}}function kr(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function xr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function _r(t,n){var r,a={},i={};for(r in null!==t&&"object"===e(t)||(t={}),null!==n&&"object"===e(n)||(n={}),n)r in t?a[r]=Tr(t[r],n[r]):i[r]=n[r];return function(t){for(r in a)i[r]=a[r](t);return i}}var Sr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ar=new RegExp(Sr.source,"g");function Er(t,e){var n,r,a,i=Sr.lastIndex=Ar.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(n=Sr.exec(t))&&(r=Ar.exec(e));)(a=r.index)>i&&(a=e.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:xr(n,r)})),i=Ar.lastIndex;return i<e.length&&(a=e.slice(i),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}function Tr(t,n){var r,a=e(n);return null==n||"boolean"===a?vr(n):("number"===a?xr:"string"===a?(r=nr(n))?(n=r,gr):Er:n instanceof nr?gr:n instanceof Date?kr:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(n)?yr:Array.isArray(n)?wr:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?_r:xr)(t,n)}function Mr(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Cr,Nr=180/Math.PI,Rr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qr(t,e,n,r,a,i){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:a,translateY:i,rotate:Math.atan2(e,t)*Nr,skewX:Math.atan(l)*Nr,scaleX:o,scaleY:s}}function Pr(t,e,n,r){function a(t){return t.length?t.pop()+" ":""}return function(i,o){var s=[],l=[];return i=t(i),o=t(o),function(t,r,a,i,o,s){if(t!==a||r!==i){var l=o.push("translate(",null,e,null,n);s.push({i:l-4,x:xr(t,a)},{i:l-2,x:xr(r,i)})}else(a||i)&&o.push("translate("+a+e+i+n)}(i.translateX,i.translateY,o.translateX,o.translateY,s,l),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(a(n)+"rotate(",null,r)-2,x:xr(t,e)})):e&&n.push(a(n)+"rotate("+e+r)}(i.rotate,o.rotate,s,l),function(t,e,n,i){t!==e?i.push({i:n.push(a(n)+"skewX(",null,r)-2,x:xr(t,e)}):e&&n.push(a(n)+"skewX("+e+r)}(i.skewX,o.skewX,s,l),function(t,e,n,r,i,o){if(t!==n||e!==r){var s=i.push(a(i)+"scale(",null,",",null,")");o.push({i:s-4,x:xr(t,n)},{i:s-2,x:xr(e,r)})}else 1===n&&1===r||i.push(a(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,s,l),i=o=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var zr,Fr,$r=Pr((function(t){var e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Rr:qr(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Or=Pr((function(t){return null==t?Rr:(Cr||(Cr=document.createElementNS("http://www.w3.org/2000/svg","g")),Cr.setAttribute("transform",t),(t=Cr.transform.baseVal.consolidate())?qr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Rr)}),", ",")",")"),Ir=0,Hr=0,Dr=0,Ur=0,jr=0,Lr=0,Vr="object"===("undefined"==typeof performance?"undefined":e(performance))&&performance.now?performance:Date,Br="object"===("undefined"==typeof window?"undefined":e(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Kr(){return jr||(Br(Xr),jr=Vr.now()+Lr)}function Xr(){jr=0}function Gr(){this._call=this._time=this._next=null}function Zr(t,e,n){var r=new Gr;return r.restart(t,e,n),r}function Yr(){jr=(Ur=Vr.now())+Lr,Ir=Hr=0;try{!function(){Kr(),++Ir;for(var t,e=zr;e;)(t=jr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ir}()}finally{Ir=0,function(){var t,e,n=zr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:zr=e);Fr=t,Qr(r)}(),jr=0}}function Wr(){var t=Vr.now(),e=t-Ur;e>1e3&&(Lr-=e,Ur=t)}function Qr(t){Ir||(Hr&&(Hr=clearTimeout(Hr)),t-jr>24?(t<1/0&&(Hr=setTimeout(Yr,t-Vr.now()-Lr)),Dr&&(Dr=clearInterval(Dr))):(Dr||(Ur=Vr.now(),Dr=setInterval(Wr,1e3)),Ir=1,Br(Yr)))}function Jr(t,e,n){var r=new Gr;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Gr.prototype=Zr.prototype={constructor:Gr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Kr():+n)+(null==e?0:+e),this._next||Fr===this||(Fr?Fr._next=this:zr=this,Fr=this),this._call=t,this._time=n,Qr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qr())}};var ta=re("start","end","cancel","interrupt"),ea=[];function na(t,e,n,r,a,i){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,a=t.__transition;function i(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(i){var c,u,h,d;if(1!==n.state)return l();for(c in a)if((d=a[c]).name===n.name){if(3===d.state)return Jr(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete a[c]):+c<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete a[c])}if(Jr((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(i))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function s(e){for(var a=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,o=r.length;++i<o;)r[i].call(t,a);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete a[e],a)return;delete t.__transition}a[e]=n,n.timer=Zr(i,0,n.time)}(t,n,{name:e,index:r,group:a,on:ta,tween:ea,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function ra(t,e){var n=ia(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function aa(t,e){var n=ia(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ia(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function oa(t,e){var n,r;return function(){var a=aa(this,t),i=a.tween;if(i!==n)for(var o=0,s=(r=n=i).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}a.tween=r}}function sa(t,e,n){var r,a;if("function"!=typeof n)throw new Error;return function(){var i=aa(this,t),o=i.tween;if(o!==r){a=(r=o).slice();for(var s={name:e,value:n},l=0,c=a.length;l<c;++l)if(a[l].name===e){a[l]=s;break}l===c&&a.push(s)}i.tween=a}}function la(t,e,n){var r=t._id;return t.each((function(){var t=aa(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ia(t,r).value[e]}}function ca(t,e){var n;return("number"==typeof e?xr:e instanceof nr?gr:(n=nr(e))?(e=n,gr):Er)(t,e)}function ua(t){return function(){this.removeAttribute(t)}}function ha(t){return function(){this.removeAttributeNS(t.space,t.local)}}function da(t,e,n){var r,a,i=n+"";return function(){var o=this.getAttribute(t);return o===i?null:o===r?a:a=e(r=o,n)}}function fa(t,e,n){var r,a,i=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?a:a=e(r=o,n)}}function pa(t,e,n){var r,a,i;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttribute(t))===(s=l+"")?null:o===r&&s===a?i:(a=s,i=e(r=o,l));this.removeAttribute(t)}}function va(t,e,n){var r,a,i;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===r&&s===a?i:(a=s,i=e(r=o,l));this.removeAttributeNS(t.space,t.local)}}function ma(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function ba(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ga(t,e){var n,r;function a(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&ba(t,a)),n}return a._value=e,a}function ya(t,e){var n,r;function a(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&ma(t,a)),n}return a._value=e,a}function wa(t,e){return function(){ra(this,t).delay=+e.apply(this,arguments)}}function ka(t,e){return e=+e,function(){ra(this,t).delay=e}}function xa(t,e){return function(){aa(this,t).duration=+e.apply(this,arguments)}}function _a(t,e){return e=+e,function(){aa(this,t).duration=e}}function Sa(t,e){if("function"!=typeof e)throw new Error;return function(){aa(this,t).ease=e}}function Aa(t,e,n){var r,a,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ra:aa;return function(){var o=i(this,t),s=o.on;s!==r&&(a=(r=s).copy()).on(e,n),o.on=a}}var Ea=Sn.prototype.constructor;function Ta(t){return function(){this.style.removeProperty(t)}}function Ma(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Ca(t,e,n){var r,a;function i(){var i=e.apply(this,arguments);return i!==a&&(r=(a=i)&&Ma(t,i,n)),r}return i._value=e,i}function Na(t){return function(e){this.textContent=t.call(this,e)}}function Ra(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Na(r)),e}return r._value=t,r}var qa=0;function Pa(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function za(){return++qa}var Fa=Sn.prototype;Pa.prototype=o({constructor:Pa,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ve(t));for(var r=this._groups,a=r.length,i=new Array(a),o=0;o<a;++o)for(var s,l,c=r[o],u=c.length,h=i[o]=new Array(u),d=0;d<u;++d)(s=c[d])&&(l=t.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,na(h[d],e,n,d,h,ia(s,n)));return new Pa(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ge(t));for(var r=this._groups,a=r.length,i=[],o=[],s=0;s<a;++s)for(var l,c=r[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,f=t.call(l,l.__data__,h,c),p=ia(l,n),v=0,m=f.length;v<m;++v)(d=f[v])&&na(d,e,n,v,f,p);i.push(f),o.push(l)}return new Pa(i,o,e,n)},selectChild:Fa.selectChild,selectChildren:Fa.selectChildren,filter:function(t){"function"!=typeof t&&(t=ye(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o=e[a],s=o.length,l=r[a]=[],c=0;c<s;++c)(i=o[c])&&t.call(i,i.__data__,c,o)&&l.push(i);return new Pa(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,a=n.length,i=Math.min(r,a),o=new Array(r),s=0;s<i;++s)for(var l,c=e[s],u=n[s],h=c.length,d=o[s]=new Array(h),f=0;f<h;++f)(l=c[f]||u[f])&&(d[f]=l);for(;s<r;++s)o[s]=e[s];return new Pa(o,this._parents,this._name,this._id)},selection:function(){return new Ea(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=za(),r=this._groups,a=r.length,i=0;i<a;++i)for(var o,s=r[i],l=s.length,c=0;c<l;++c)if(o=s[c]){var u=ia(o,e);na(o,t,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Pa(r,this._parents,t,n)},call:Fa.call,nodes:Fa.nodes,node:Fa.node,size:Fa.size,empty:Fa.empty,each:Fa.each,on:function(t,e){var n=this._id;return arguments.length<2?ia(this.node(),n).on.on(t):this.each(Aa(n,t,e))},attr:function(t,e){var n=ue(t),r="transform"===n?Or:ca;return this.attrTween(t,"function"==typeof e?(n.local?va:pa)(n,r,la(this,"attr."+t,e)):null==e?(n.local?ha:ua)(n):(n.local?fa:da)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=ue(t);return this.tween(n,(r.local?ga:ya)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?$r:ca;return null==e?this.styleTween(t,function(t,e){var n,r,a;return function(){var i=Le(this,t),o=(this.style.removeProperty(t),Le(this,t));return i===o?null:i===n&&o===r?a:a=e(n=i,r=o)}}(t,r)).on("end.style."+t,Ta(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,a,i;return function(){var o=Le(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=Le(this,t)),o===l?null:o===r&&l===a?i:(a=l,i=e(r=o,s))}}(t,r,la(this,"style."+t,e))).each(function(t,e){var n,r,a,i,o="style."+e,s="end."+o;return function(){var l=aa(this,t),c=l.on,u=null==l.value[o]?i||(i=Ta(e)):void 0;c===n&&a===u||(r=(n=c).copy()).on(s,a=u),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,a,i=n+"";return function(){var o=Le(this,t);return o===i?null:o===r?a:a=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Ca(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(la(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ra(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,a=ia(this.node(),n).tween,i=0,o=a.length;i<o;++i)if((r=a[i]).name===t)return r.value;return null}return this.each((null==e?oa:sa)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?wa:ka)(e,t)):ia(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?xa:_a)(e,t)):ia(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Sa(e,t)):ia(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;aa(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,a=n.size();return new Promise((function(i,o){var s={value:o},l={value:function(){0==--a&&i()}};n.each((function(){var n=aa(this,r),a=n.on;a!==t&&((e=(t=a).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===a&&i()}))}},Symbol.iterator,Fa[Symbol.iterator]);var $a=function(t){return+t};function Oa(t){return t*t*t}function Ia(t){return--t*t*t+1}var Ha={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Da(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error("transition ".concat(e," not found"));return n}Sn.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,a,i=t.__transition,o=!0;if(i){for(a in e=null==e?null:e+"",i)(n=i[a]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[a]):o=!1;o&&delete t.__transition}}(this,t)}))},Sn.prototype.transition=function(t){var e,n;t instanceof Pa?(e=t._id,t=t._name):(e=za(),(n=Ha).time=Kr(),t=null==t?null:t+"");for(var r=this._groups,a=r.length,i=0;i<a;++i)for(var o,s=r[i],l=s.length,c=0;c<l;++c)(o=s[c])&&na(o,t,e,c,s,n||Da(o,e));return new Pa(r,this._parents,t,e)};var Ua=Math.PI,ja=2*Ua,La=1e-6,Va=ja-La;function Ba(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ka(){return new Ba}Ba.prototype=Ka.prototype={constructor:Ba,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,a,i){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(t,e,n,r,a){t=+t,e=+e,n=+n,r=+r,a=+a;var i=this._x1,o=this._y1,s=n-t,l=r-e,c=i-t,u=o-e,h=c*c+u*u;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>La)if(Math.abs(u*s-l*c)>La&&a){var d=n-i,f=r-o,p=s*s+l*l,v=d*d+f*f,m=Math.sqrt(p),b=Math.sqrt(h),g=a*Math.tan((Ua-Math.acos((p+h-v)/(2*m*b)))/2),y=g/b,w=g/m;Math.abs(y-1)>La&&(this._+="L"+(t+y*c)+","+(e+y*u)),this._+="A"+a+","+a+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+w*s)+","+(this._y1=e+w*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,a,i){t=+t,e=+e,i=!!i;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^i,h=i?r-a:a-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>La||Math.abs(this._y1-c)>La)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%ja+ja),h>Va?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>La&&(this._+="A"+n+","+n+",0,"+ +(h>=Ua)+","+u+","+(this._x1=t+n*Math.cos(a))+","+(this._y1=e+n*Math.sin(a))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Xa=Array.prototype.slice;function Ga(t,e){return t-e}var Za=function(t){return function(){return t}};function Ya(t,e){for(var n,r=-1,a=e.length;++r<a;)if(n=Wa(t,e[r]))return n;return 0}function Wa(t,e){for(var n=e[0],r=e[1],a=-1,i=0,o=t.length,s=o-1;i<o;s=i++){var l=t[i],c=l[0],u=l[1],h=t[s],d=h[0],f=h[1];if(Qa(l,h,e))return 0;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(a=-a)}return a}function Qa(t,e,n){var r;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&function(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}(t[r=+(t[0]===e[0])],n[r],e[r])}function Ja(){}var ti=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ei(){var t=1,e=1,n=Ut,r=s;function a(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Ga);else{var r=Nt(t),a=Dt(r[0],r[1],e);e=It(Math.floor(r[0]/a)*a,Math.floor(r[1]/a-1)*a,e)}return e.map((function(e){return i(t,e)}))}function i(n,a){var i=[],s=[];return function(n,r,a){var i,s,l,c,u,h,d=new Array,f=new Array;i=s=-1,c=n[0]>=r,ti[c<<1].forEach(p);for(;++i<t-1;)l=c,c=n[i+1]>=r,ti[l|c<<1].forEach(p);ti[c<<0].forEach(p);for(;++s<e-1;){for(i=-1,c=n[s*t+t]>=r,u=n[s*t]>=r,ti[c<<1|u<<2].forEach(p);++i<t-1;)l=c,c=n[s*t+t+i+1]>=r,h=u,u=n[s*t+i+1]>=r,ti[l|c<<1|u<<2|h<<3].forEach(p);ti[c|u<<3].forEach(p)}i=-1,u=n[s*t]>=r,ti[u<<2].forEach(p);for(;++i<t-1;)h=u,u=n[s*t+i+1]>=r,ti[u<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+i,t[0][1]+s],l=[t[1][0]+i,t[1][1]+s],c=o(r),u=o(l);(e=f[c])?(n=d[u])?(delete f[e.end],delete d[n.start],e===n?(e.ring.push(l),a(e.ring)):d[e.start]=f[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete f[e.end],e.ring.push(l),f[e.end=u]=e):(e=d[u])?(n=f[c])?(delete d[e.start],delete f[n.end],e===n?(e.ring.push(l),a(e.ring)):d[n.start]=f[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=c]=e):d[c]=f[u]={start:c,end:u,ring:[r,l]}}ti[u<<3].forEach(p)}(n,a,(function(t){r(t,n,a),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?i.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=i.length;n<r;++n)if(-1!==Ya((e=i[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:a,coordinates:i}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,a){n.forEach((function(n){var i,o=n[0],s=n[1],l=0|o,c=0|s,u=r[c*t+l];o>0&&o<t&&l===o&&(i=r[c*t+l-1],n[0]=o+(a-i)/(u-i)-.5),s>0&&s<e&&c===s&&(i=r[(c-1)*t+l],n[1]=s+(a-i)/(u-i)-.5)}))}return a.contour=i,a.size=function(n){if(!arguments.length)return[t,e];var r=Math.floor(n[0]),i=Math.floor(n[1]);if(!(r>=0&&i>=0))throw new Error("invalid size");return t=r,e=i,a},a.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Za(Xa.call(t)):Za(t),a):n},a.smooth=function(t){return arguments.length?(r=t?s:Ja,a):r===s},a}function ni(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function ri(t){return(t=ni(Math.abs(t)))?t[1]:NaN}var ai,ii=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function oi(t){if(!(e=ii.exec(t)))throw new Error("invalid format: "+t);var e;return new si({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function si(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function li(t,e){var n=ni(t,e);if(!n)return t+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}oi.prototype=si.prototype,si.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ci={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return li(100*t,e)},r:li,s:function(t,e){var n=ni(t,e);if(!n)return t+"";var r=n[0],a=n[1],i=a-(ai=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+ni(t,Math.max(0,e+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function ui(t){return t}var hi,di,fi,pi=Array.prototype.map,vi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mi(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ui:(e=pi.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var a=t.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(t.substring(a-=s,a+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return i.reverse().join(n)}),a=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?ui:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(pi.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=oi(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,v=t.comma,m=t.precision,b=t.trim,g=t.type;"n"===g?(v=!0,g="g"):ci[g]||(void 0===m&&(m=12),b=!0,g="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var y="$"===d?a:"#"===d&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",w="$"===d?i:/[%p]/.test(g)?l:"",k=ci[g],x=/[defgprs%]/.test(g);function _(t){var a,i,l,d=y,_=w;if("c"===g)_=k(t)+_,t="";else{var S=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:k(Math.abs(t),m),b&&(t=function(t){t:for(var e,n=t.length,r=1,a=-1;r<n;++r)switch(t[r]){case".":a=e=r;break;case"0":0===a&&(a=r),e=r;break;default:if(!+t[r])break t;a>0&&(a=0)}return a>0?t.slice(0,a)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),d=(S?"("===h?h:c:"-"===h||"("===h?"":h)+d,_=("s"===g?vi[8+ai/3]:"")+_+(S&&"("===h?")":""),x)for(a=-1,i=t.length;++a<i;)if(48>(l=t.charCodeAt(a))||l>57){_=(46===l?o+t.slice(a+1):t.slice(a))+_,t=t.slice(0,a);break}}v&&!f&&(t=r(t,1/0));var A=d.length+t.length+_.length,E=A<p?new Array(p-A+1).join(e):"";switch(v&&f&&(t=r(E+t,E.length?p-_.length:1/0),E=""),n){case"<":t=d+t+_+E;break;case"=":t=d+E+t+_;break;case"^":t=E.slice(0,A=E.length>>1)+d+t+_+E.slice(A);break;default:t=E+d+t+_}return s(t)}return m=void 0===m?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),_.toString=function(){return t+""},_}return{format:h,formatPrefix:function(t,e){var n=h(((t=oi(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ri(e)/3))),a=Math.pow(10,-r),i=vi[8+r/3];return function(t){return n(a*t)+i}}}}hi=mi({thousands:",",grouping:[3],currency:["$",""]}),di=hi.format,fi=hi.formatPrefix;var bi=1e-6,gi=Math.PI,yi=2*gi,wi=180/gi,ki=gi/180,xi=Math.abs,_i=Math.cos,Si=Math.sin,Ai=Math.sqrt;function Ei(){}function Ti(t,e){t&&Ci.hasOwnProperty(t.type)&&Ci[t.type](t,e)}var Mi={Feature:function(t,e){Ti(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,a=n.length;++r<a;)Ti(n[r].geometry,e)}},Ci={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ni(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)Ni(n[r],e,0)},Polygon:function(t,e){Ri(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)Ri(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,a=n.length;++r<a;)Ti(n[r],e)}};function Ni(t,e,n){var r,a=-1,i=t.length-n;for(e.lineStart();++a<i;)r=t[a],e.point(r[0],r[1],r[2]);e.lineEnd()}function Ri(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ni(t[n],e,1);e.polygonEnd()}function qi(t,e){t&&Mi.hasOwnProperty(t.type)?Mi[t.type](t,e):Ti(t,e)}function Pi(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function zi(t,e,n,r,a){var i,o,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(function(t,e){return xi(t[0]-e[0])<bi&&xi(t[1]-e[1])<bi}(r,o)){if(!r[2]&&!o[2]){for(a.lineStart(),i=0;i<e;++i)a.point((r=t[i])[0],r[1]);return void a.lineEnd()}o[0]+=2e-6}s.push(n=new Pi(r,t,null,!0)),l.push(n.o=new Pi(r,null,n,!1)),s.push(n=new Pi(o,t,null,!1)),l.push(n.o=new Pi(o,null,n,!0))}})),s.length){for(l.sort(e),Fi(s),Fi(l),i=0,o=l.length;i<o;++i)l[i].e=n=!n;for(var c,u,h=s[0];;){for(var d=h,f=!0;d.v;)if((d=d.n)===h)return;c=d.z,a.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(i=0,o=c.length;i<o;++i)a.point((u=c[i])[0],u[1]);else r(d.x,d.n.x,1,a);d=d.n}else{if(f)for(c=d.p.z,i=c.length-1;i>=0;--i)a.point((u=c[i])[0],u[1]);else r(d.x,d.p.x,-1,a);d=d.p}c=(d=d.o).z,f=!f}while(!d.v);a.lineEnd()}}}function Fi(t){if(e=t.length){for(var e,n,r=0,a=t[0];++r<e;)a.n=n=t[r],n.p=a,a=n;a.n=n=t[0],n.p=a}}var $i=1e9,Oi=-$i;function Ii(t,e,n,r){function a(a,i){return t<=a&&a<=n&&e<=i&&i<=r}function i(a,i,s,c){var u=0,h=0;if(null==a||(u=o(a,s))!==(h=o(i,s))||l(a,i)<0^s>0)do{c.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==h);else c.point(i[0],i[1])}function o(r,a){return xi(r[0]-t)<bi?a>0?0:3:xi(r[0]-n)<bi?a>0?2:1:xi(r[1]-e)<bi?a>0?1:0:a>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var l,c,u,h,d,f,p,v,m,b,g,y=o,w=function(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Ei,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}(),k={point:x,lineStart:function(){k.point=_,c&&c.push(u=[]);b=!0,m=!1,p=v=NaN},lineEnd:function(){l&&(_(h,d),f&&m&&w.rejoin(),l.push(w.result()));k.point=x,m&&y.lineEnd()},polygonStart:function(){y=w,l=[],c=[],g=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,a=c.length;n<a;++n)for(var i,o,s=c[n],l=1,u=s.length,h=s[0],d=h[0],f=h[1];l<u;++l)i=d,o=f,d=(h=s[l])[0],f=h[1],o<=r?f>r&&(d-i)*(r-o)>(f-o)*(t-i)&&++e:f<=r&&(d-i)*(r-o)<(f-o)*(t-i)&&--e;return e}(),n=g&&e,a=(h=l,l=Array.from(Vt(h))).length;var h;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),i(null,null,1,o),o.lineEnd()),a&&zi(l,s,e,i,o),o.polygonEnd());y=o,l=c=u=null}};function x(t,e){a(t,e)&&y.point(t,e)}function _(i,o){var s=a(i,o);if(c&&u.push([i,o]),b)h=i,d=o,f=s,b=!1,s&&(y.lineStart(),y.point(i,o));else if(s&&m)y.point(i,o);else{var l=[p=Math.max(Oi,Math.min($i,p)),v=Math.max(Oi,Math.min($i,v))],w=[i=Math.max(Oi,Math.min($i,i)),o=Math.max(Oi,Math.min($i,o))];!function(t,e,n,r,a,i){var o,s=t[0],l=t[1],c=0,u=1,h=e[0]-s,d=e[1]-l;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>c&&(c=o)}if(o=a-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<u&&(u=o)}if(o=r-l,d||!(o>0)){if(o/=d,d<0){if(o<c)return;o<u&&(u=o)}else if(d>0){if(o>u)return;o>c&&(c=o)}if(o=i-l,d||!(o<0)){if(o/=d,d<0){if(o>u)return;o>c&&(c=o)}else if(d>0){if(o<c)return;o<u&&(u=o)}return c>0&&(t[0]=s+c*h,t[1]=l+c*d),u<1&&(e[0]=s+u*h,e[1]=l+u*d),!0}}}}}(l,w,t,e,n,r)?s&&(y.lineStart(),y.point(i,o),g=!1):(m||(y.lineStart(),y.point(l[0],l[1])),y.point(w[0],w[1]),s||y.lineEnd(),g=!1)}p=i,v=o,m=s}return k}}var Hi,Di,Ui,ji,Li=function(t){return t},Vi=new Rt,Bi=new Rt,Ki={point:Ei,lineStart:Ei,lineEnd:Ei,polygonStart:function(){Ki.lineStart=Xi,Ki.lineEnd=Yi},polygonEnd:function(){Ki.lineStart=Ki.lineEnd=Ki.point=Ei,Vi.add(xi(Bi)),Bi=new Rt},result:function(){var t=Vi/2;return Vi=new Rt,t}};function Xi(){Ki.point=Gi}function Gi(t,e){Ki.point=Zi,Hi=Ui=t,Di=ji=e}function Zi(t,e){Bi.add(ji*t-Ui*e),Ui=t,ji=e}function Yi(){Zi(Hi,Di)}var Wi=Ki,Qi=1/0,Ji=Qi,to=-Qi,eo=to,no={point:function(t,e){t<Qi&&(Qi=t);t>to&&(to=t);e<Ji&&(Ji=e);e>eo&&(eo=e)},lineStart:Ei,lineEnd:Ei,polygonStart:Ei,polygonEnd:Ei,result:function(){var t=[[Qi,Ji],[to,eo]];return to=eo=-(Ji=Qi=1/0),t}};var ro,ao,io,oo,so=no,lo=0,co=0,uo=0,ho=0,fo=0,po=0,vo=0,mo=0,bo=0,go={point:yo,lineStart:wo,lineEnd:_o,polygonStart:function(){go.lineStart=So,go.lineEnd=Ao},polygonEnd:function(){go.point=yo,go.lineStart=wo,go.lineEnd=_o},result:function(){var t=bo?[vo/bo,mo/bo]:po?[ho/po,fo/po]:uo?[lo/uo,co/uo]:[NaN,NaN];return lo=co=uo=ho=fo=po=vo=mo=bo=0,t}};function yo(t,e){lo+=t,co+=e,++uo}function wo(){go.point=ko}function ko(t,e){go.point=xo,yo(io=t,oo=e)}function xo(t,e){var n=t-io,r=e-oo,a=Ai(n*n+r*r);ho+=a*(io+t)/2,fo+=a*(oo+e)/2,po+=a,yo(io=t,oo=e)}function _o(){go.point=yo}function So(){go.point=Eo}function Ao(){To(ro,ao)}function Eo(t,e){go.point=To,yo(ro=io=t,ao=oo=e)}function To(t,e){var n=t-io,r=e-oo,a=Ai(n*n+r*r);ho+=a*(io+t)/2,fo+=a*(oo+e)/2,po+=a,vo+=(a=oo*t-io*e)*(io+t),mo+=a*(oo+e),bo+=3*a,yo(io=t,oo=e)}var Mo=go;function Co(t){this._context=t}Co.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,yi)}},result:Ei};var No,Ro,qo,Po,zo,Fo=new Rt,$o={point:Ei,lineStart:function(){$o.point=Oo},lineEnd:function(){No&&Io(Ro,qo),$o.point=Ei},polygonStart:function(){No=!0},polygonEnd:function(){No=null},result:function(){var t=+Fo;return Fo=new Rt,t}};function Oo(t,e){$o.point=Io,Ro=Po=t,qo=zo=e}function Io(t,e){Po-=t,zo-=e,Fo.add(Ai(Po*Po+zo*zo)),Po=t,zo=e}var Ho=$o;function Do(){this._string=[]}function Uo(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function jo(t,e){var n,r,a=4.5;function i(t){return t&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),qi(t,n(r))),r.result()}return i.area=function(t){return qi(t,n(Wi)),Wi.result()},i.measure=function(t){return qi(t,n(Ho)),Ho.result()},i.bounds=function(t){return qi(t,n(so)),so.result()},i.centroid=function(t){return qi(t,n(Mo)),Mo.result()},i.projection=function(e){return arguments.length?(n=null==e?(t=null,Li):(t=e).stream,i):t},i.context=function(t){return arguments.length?(r=null==t?(e=null,new Do):new Co(e=t),"function"!=typeof a&&r.pointRadius(a),i):e},i.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(r.pointRadius(+t),+t),i):a},i.projection(t).context(e)}function Lo(){}function Vo(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),qi(n,t.stream(so)),e(so.result()),null!=r&&t.clipExtent(r),t}function Bo(t,e,n){return Vo(t,(function(n){var r=e[1][0]-e[0][0],a=e[1][1]-e[0][1],i=Math.min(r/(n[1][0]-n[0][0]),a/(n[1][1]-n[0][1])),o=+e[0][0]+(r-i*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(a-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,s])}),n)}function Ko(){var t,e,n,r,a,i,o,s,l=1,c=0,u=0,h=1,d=1,f=0,p=null,v=1,m=1,b=(s={point:function(t,e){var n=w([t,e]);this.stream.point(n[0],n[1])}},function(t){var e=new Lo;for(var n in s)e[n]=s[n];return e.stream=t,e}),g=Li;function y(){return v=l*h,m=l*d,i=o=null,w}function w(n){var r=n[0]*v,a=n[1]*m;if(f){var i=a*t-r*e;r=r*t+a*e,a=i}return[r+c,a+u]}return w.invert=function(n){var r=n[0]-c,a=n[1]-u;if(f){var i=a*t+r*e;r=r*t-a*e,a=i}return[r/v,a/m]},w.stream=function(t){return i&&o===t?i:i=b(g(o=t))},w.postclip=function(t){return arguments.length?(g=t,p=n=r=a=null,y()):g},w.clipExtent=function(t){return arguments.length?(g=null==t?(p=n=r=a=null,Li):Ii(p=+t[0][0],n=+t[0][1],r=+t[1][0],a=+t[1][1]),y()):null==p?null:[[p,n],[r,a]]},w.scale=function(t){return arguments.length?(l=+t,y()):l},w.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],y()):[c,u]},w.angle=function(n){return arguments.length?(e=Si(f=n%360*ki),t=_i(f),y()):f*wi},w.reflectX=function(t){return arguments.length?(h=t?-1:1,y()):h<0},w.reflectY=function(t){return arguments.length?(d=t?-1:1,y()):d<0},w.fitExtent=function(t,e){return Bo(w,t,e)},w.fitSize=function(t,e){return function(t,e,n){return Bo(t,[[0,0],e],n)}(w,t,e)},w.fitWidth=function(t,e){return function(t,e,n){return Vo(t,(function(n){var r=+e,a=r/(n[1][0]-n[0][0]),i=(r-a*(n[1][0]+n[0][0]))/2,o=-a*n[0][1];t.scale(150*a).translate([i,o])}),n)}(w,t,e)},w.fitHeight=function(t,e){return function(t,e,n){return Vo(t,(function(n){var r=+e,a=r/(n[1][1]-n[0][1]),i=-a*n[0][0],o=(r-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([i,o])}),n)}(w,t,e)},w}function Xo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Go(t){return+t}Do.prototype={_radius:4.5,_circle:Uo(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Uo(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Lo.prototype={constructor:Lo,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Zo=[0,1];function Yo(t){return t}function Wo(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Qo(t,e,n){var r=t[0],a=t[1],i=e[0],o=e[1];return a<r?(r=Wo(a,r),i=n(o,i)):(r=Wo(r,a),i=n(i,o)),function(t){return i(r(t))}}function Jo(t,e,n){var r=Math.min(t.length,e.length)-1,a=new Array(r),i=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)a[o]=Wo(t[o],t[o+1]),i[o]=n(e[o],e[o+1]);return function(e){var n=Ct(t,e,1,r)-1;return i[n](a[n](e))}}function ts(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function es(){var t,e,n,r,a,i,o=Zo,s=Zo,l=Tr,c=Yo;function u(){var t=Math.min(o.length,s.length);return c!==Yo&&(c=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(o[0],o[t-1])),r=t>2?Jo:Qo,a=i=null,h}function h(e){return null==e||isNaN(e=+e)?n:(a||(a=r(o.map(t),s,l)))(t(c(e)))}return h.invert=function(n){return c(e((i||(i=r(s,o.map(t),xr)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,Go),u()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),u()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),l=Mr,u()},h.clamp=function(t){return arguments.length?(c=!!t||Yo,u()):c!==Yo},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}function ns(){return es()(Yo,Yo)}function rs(t,e,n,r){var a,i=Dt(t,e,n);switch((r=oi(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(a=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ri(e)/3)))-ri(Math.abs(t)))}(i,o))||(r.precision=a),fi(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ri(e)-ri(t))+1}(i,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(t){return Math.max(0,-ri(Math.abs(t)))}(i))||(r.precision=a-2*("%"===r.type))}return di(r)}function as(t){var e=t.domain;return t.ticks=function(t){var n=e();return It(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return rs(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,a,i=e(),o=0,s=i.length-1,l=i[o],c=i[s],u=10;for(c<l&&(a=l,l=c,c=a,a=o,o=s,s=a);u-- >0;){if((a=Ht(l,c,n))===r)return i[o]=l,i[s]=c,e(i);if(a>0)l=Math.floor(l/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;l=Math.ceil(l*a)/a,c=Math.floor(c*a)/a}r=a}return t},t}function is(){var t=ns();return t.copy=function(){return ts(t,is())},Xo.apply(t,arguments),as(t)}var os,ss,ls,cs,us,hs,ds,fs,ps,vs=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");function ms(t){return function(){return t}}function bs(t){this._context=t}function gs(t){return new bs(t)}function ys(t){return t[0]}function ws(t){return t[1]}function ks(t,n){var r=ms(!0),a=null,i=gs,o=null;function s(s){var l,c,u,h=(s=function(t){return"object"===e(t)&&"length"in t?t:Array.from(t)}(s)).length,d=!1;for(null==a&&(o=i(u=Ka())),l=0;l<=h;++l)!(l<h&&r(c=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+t(c,l,s),+n(c,l,s));if(u)return o=null,u+""||null}return t="function"==typeof t?t:void 0===t?ys:ms(t),n="function"==typeof n?n:void 0===n?ws:ms(n),s.x=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),s):t},s.y=function(t){return arguments.length?(n="function"==typeof t?t:ms(+t),s):n},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:ms(!!t),s):r},s.curve=function(t){return arguments.length?(i=t,null!=a&&(o=i(a)),s):i},s.context=function(t){return arguments.length?(null==t?a=o=null:o=i(a=t),s):a},s}bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var xs,_s,Ss=function(t){s(n,t);var e=v(n);function n(){var t;return r(this,n),(t=e.call(this)).uniqueId="decidables-".concat(n.uniqueId),t}return i(n,[{key:"getComputedStyleValue",value:function(t){return window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,t):getComputedStyle(this).getPropertyValue(t)}},{key:"firstUpdated",value:function(t){b(l(n.prototype),"firstUpdated",this).call(this,t),An(this.renderRoot.host).classed("keyboard",!0).on("mousemove.keyboard touchstart.keyboard",(function(t){An(t.currentTarget.renderRoot.host).classed("keyboard",!1).on("mousemove.keyboard touchstart.keyboard",null)})).on("keydown.keyboard",(function(t){An(t.currentTarget.renderRoot.host).classed("keyboard",!0).on("keydown.keyboard mousemove.keyboard touchstart.keyboard",null)}))}}],[{key:"uniqueId",get:function(){return n.ID+=1,n.ID}},{key:"greys",get:function(){var t="#999999",e={white:"#ffffff"};return e.light75=gr(t,"#ffffff")(.75),e.light50=gr(t,"#ffffff")(.5),e.light25=gr(t,"#ffffff")(.25),e.grey=t,e.dark25=gr(t,"#000000")(.25),e.dark50=gr(t,"#000000")(.5),e.dark75=gr(t,"#000000")(.75),e.black="#000000",e}},{key:"shadows",get:function(){return{elevations:[0,2,4,8,16],baselineColor:"#000000",baselineColorString:"0, 0, 0",inverseBaselineColor:"#FFFFFF",inverseBaselineColorString:"255, 255, 255",opacityUmbra:.2,opacityPenumbra:.14,opacityAmbient:.12,opacityBoost:.2,mapUmbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:3,b:1,s:-2},4:{x:0,y:2,b:4,s:-1},8:{x:0,y:5,b:5,s:-3},16:{x:0,y:8,b:10,s:-5}},mapPenumbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:2,b:2,s:0},4:{x:0,y:4,b:5,s:0},8:{x:0,y:8,b:10,s:1},16:{x:0,y:16,b:24,s:2}},mapAmbient:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:1,b:5,s:0},4:{x:0,y:1,b:10,s:0},8:{x:0,y:3,b:14,s:2},16:{x:0,y:6,b:30,s:5}}}}},{key:"cssBoxShadow",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.shadows.opacityUmbra+this.shadows.opacityBoost,a=this.shadows.opacityPenumbra+this.shadows.opacityBoost,i=this.shadows.opacityAmbient+this.shadows.opacityBoost,o=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(r,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(r,")"),s=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(a,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(a,")"),l=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(i,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(i,")"),c=this.shadows.mapUmbra[t],u=this.shadows.mapPenumbra[t],h=this.shadows.mapAmbient[t],d=e?"".concat(-c.y,"px ").concat(c.y/2,"px ").concat(c.b,"px ").concat(c.s,"px"):"".concat(c.y/2,"px ").concat(c.y,"px ").concat(c.b,"px ").concat(c.s,"px"),f=e?"".concat(-u.y,"px ").concat(u.y/2,"px ").concat(u.b,"px ").concat(u.s,"px"):"".concat(u.y/2,"px ").concat(u.y,"px ").concat(u.b,"px ").concat(u.s,"px"),p=e?"".concat(-h.y,"px ").concat(h.y/2,"px ").concat(h.b,"px ").concat(h.s,"px"):"".concat(h.y/2,"px ").concat(h.y,"px ").concat(h.b,"px ").concat(h.s,"px");return"".concat(d," ").concat(o,", ").concat(f," ").concat(s,", ").concat(p," ").concat(l)}},{key:"svgFilters",get:function(){var t=n.shadows,e=t.elevations.map((function(e){return it(os||(os=g(["\n <filter id=",' x="-250%" y="-250%" width="600%" height="600%">\n <feComponentTransfer in="SourceAlpha" result="solid">\n <feFuncA type="table" tableValues="0 1 1"/>\n </feComponentTransfer>\n <feOffset in="solid" result="offU" dx='," dy=",' />\n <feOffset in="solid" result="offP" dx='," dy=",' />\n <feOffset in="solid" result="offA" dx='," dy="," />\n ","\n ","\n ","\n <feGaussianBlur in=",' result="blurU" stdDeviation='," />\n <feGaussianBlur in=",' result="blurP" stdDeviation='," />\n <feGaussianBlur in=",' result="blurA" stdDeviation=',' />\n <feFlood in="SourceGraphic" result="opU" flood-color='," flood-opacity=",' />\n <feFlood in="SourceGraphic" result="opP" flood-color='," flood-opacity=",' />\n <feFlood in="SourceGraphic" result="opA" flood-color='," flood-opacity=",' />\n <feComposite in="opU" in2="blurU" result="shU" operator="in" />\n <feComposite in="opP" in2="blurP" result="shP" operator="in" />\n <feComposite in="opA" in2="blurA" result="shA" operator="in" />\n \x3c!-- HACK Edge: Using a dynamic value for erode radius stops Edge from corrupting the "radius" value! --\x3e\n <feMorphology in="solid" result="smaller" operator="erode" radius=',' />\n <feComposite in="shU" in2="smaller" result="finalU" operator="out" />\n <feComposite in="shP" in2="smaller" result="finalP" operator="out" />\n <feComposite in="shA" in2="smaller" result="finalA" operator="out" />\n <feMerge>\n <feMergeNode in="finalU" />\n <feMergeNode in="finalP" />\n <feMergeNode in="finalA" />\n <feMergeNode in="SourceGraphic" />\n </feMerge>\n </filter>'])),"shadow-".concat(e),t.mapUmbra[e].y/2,t.mapUmbra[e].y,t.mapPenumbra[e].y/2,t.mapPenumbra[e].y,t.mapAmbient[e].y/2,t.mapAmbient[e].y,0===t.mapUmbra[e].s?it(ss||(ss=g([""]))):it(ls||(ls=g(['<feMorphology in="offU" result="spreadU" operator='," radius="," />"])),t.mapUmbra[e].s>0?"dilate":"erode",Math.abs(t.mapUmbra[e].s)),0===t.mapPenumbra[e].s?it(cs||(cs=g([""]))):it(us||(us=g(['<feMorphology in="offP" result="spreadP" operator='," radius="," />"])),t.mapPenumbra[e].s>0?"dilate":"erode",Math.abs(t.mapPenumbra[e].s)),0===t.mapAmbient[e].s?it(hs||(hs=g([""]))):it(ds||(ds=g(['<feMorphology in="offA" result="spreadA" operator='," radius="," />"])),t.mapAmbient[e].s>0?"dilate":"erode",Math.abs(t.mapAmbient[e].s)),0===t.mapUmbra[e].s?"offU":"spreadU",t.mapUmbra[e].b/2,0===t.mapPenumbra[e].s?"offP":"spreadP",t.mapPenumbra[e].b/2,0===t.mapAmbient[e].s?"offA":"spreadA",t.mapAmbient[e].b/2,t.baselineColor,t.opacityUmbra+t.opacityBoost,t.baselineColor,t.opacityPenumbra+t.opacityBoost,t.baselineColor,t.opacityAmbient+t.opacityBoost,1)}));return it(fs||(fs=g(['\n <svg class="defs">\n <defs>\n ',"\n </defs>\n </svg>\n "])),e)}},{key:"styles",get:function(){return R(ps||(ps=g(["\n :host {\n ---shadow-0: var(--shadow-0, ",");\n ---shadow-2: var(--shadow-2, ",");\n ---shadow-4: var(--shadow-4, ",");\n ---shadow-8: var(--shadow-8, ",");\n\n ---color-background: var(--color-background, ",");\n ---color-border: var(--color-border, ",");\n ---color-text: var(--color-text, ",");\n ---color-text-inverse: var(--color-text-inverse, ",");\n ---color-link: var(--color-link, ",");\n ---color-element-background: var(--color-element-background, ",");\n ---color-element-disabled: var(--color-element-disabled, ",");\n ---color-element-enabled: var(--color-element-enabled, ",");\n ---color-element-selected: var(--color-element-selected, ",");\n ---color-element-border: var(--color-element-border, ",");\n ---color-element-emphasis: var(--color-element-emphasis, ",');\n\n ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);\n ---font-family-math: var(--font-family-math, "Source Serif", serif);\n\n ---transition-duration: var(--transition-duration, 500ms);\n\n font-family: var(---font-family-base);\n }\n\n :host,\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: border-box;\n }\n\n .math-greek {\n font-family: var(---font-family-math);\n font-style: normal;\n }\n\n .math-num {\n font-family: var(---font-family-base);\n font-style: normal;\n }\n\n .math-var {\n font-family: var(---font-family-math);\n font-style: italic;\n }\n\n .defs {\n display: block;\n\n width: 0;\n height: 0;\n }\n '])),N(this.cssBoxShadow(0)),N(this.cssBoxShadow(2)),N(this.cssBoxShadow(4)),N(this.cssBoxShadow(8)),N(this.greys.white),N(this.greys.light75),N(this.greys.dark75),N(this.greys.white),N(this.greys.dark25),N(this.greys.light75),N(this.greys.light50),N(this.greys.grey),N(this.greys.dark25),N(this.greys.dark50),N(this.greys.dark75))}}]),n}(St);Ss.ID=0;var As=function(t){s(n,t);var e=v(n);function n(){var t;return r(this,n),(t=e.call(this)).disabled=!1,t}return i(n,[{key:"render",value:function(){return at(xs||(xs=g(["\n <button ?disabled=",">\n <slot></slot>\n </button>\n "])),this.disabled)}}],[{key:"properties",get:function(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0}}}},{key:"styles",get:function(){return[b(l(n),"styles",this),R(_s||(_s=g(["\n :host {\n margin: 0.25rem;\n }\n\n button {\n width: 100%;\n height: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n\n border: 0;\n border-radius: 0.25rem;\n outline: none;\n }\n\n button:disabled {\n background-color: var(--decidables-button-background-color, var(---color-element-disabled));\n outline: none;\n box-shadow: none;\n }\n\n button:enabled {\n cursor: pointer;\n\n background-color: var(--decidables-button-background-color, var(---color-element-enabled));\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n button:enabled:hover {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n button:enabled:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(.keyboard) button:enabled:focus {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) button:enabled:focus:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))]}}]),n}(Ss);customElements.define("decidables-button",As);
6
+ */var S,A,E=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,T=Symbol(),M=new Map,C=function(){function t(e,n){if(r(this,t),this._$cssResult$=!0,n!==T)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}return i(t,[{key:"styleSheet",get:function(){var t=M.get(this.cssText);return E&&void 0===t&&(M.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}},{key:"toString",value:function(){return this.cssText}}]),t}(),N=function(t){return new C("string"==typeof t?t:t+"",T)},R=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var a=1===t.length?t[0]:n.reduce((function(e,n,r){return e+function(t){if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")}(n)+t[r+1]}),t[0]);return new C(a,T)},q=E?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",r=_(t.cssRules);try{for(r.s();!(e=r.n()).done;){n+=e.value.cssText}}catch(t){r.e(t)}finally{r.f()}return N(n)}(t):t},P=window.trustedTypes,z=P?P.emptyScript:"",F=window.reactiveElementPolyfillSupport,$={toAttribute:function(t,e){switch(e){case Boolean:t=t?z:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},O=function(t,e){return e!==t&&(e==e||t==t)},I={attribute:!0,type:String,converter:$,reflect:!1,hasChanged:O},H=function(t){s(c,t);var a,o,l=v(c);function c(){var t;return r(this,c),(t=l.call(this))._$Et=new Map,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Ei=null,t.o(),t}return i(c,[{key:"o",value:function(){var t,e=this;this._$Ep=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}},{key:"_$Em",value:function(){var t=this;this.constructor.elementProperties.forEach((function(e,n){t.hasOwnProperty(n)&&(t._$Et.set(n,t[n]),delete t[n])}))}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){E?t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):e.forEach((function(e){var n=document.createElement("style"),r=window.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$ES",value:function(t,e){var n,r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:I,i=this.constructor._$Eh(t,a);if(void 0!==i&&!0===a.reflect){var o=(null!==(r=null===(n=a.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==r?r:$.toAttribute)(e,a.type);this._$Ei=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Ei=null}}},{key:"_$AK",value:function(t,e){var n,r,a,i=this.constructor,o=i._$Eu.get(t);if(void 0!==o&&this._$Ei!==o){var s=i.getPropertyOptions(o),l=s.converter,c=null!==(a=null!==(r=null===(n=l)||void 0===n?void 0:n.fromAttribute)&&void 0!==r?r:"function"==typeof l?l:null)&&void 0!==a?a:$.fromAttribute;this._$Ei=o,this[o]=c(e,s.type),this._$Ei=null}}},{key:"requestUpdate",value:function(t,e,n){var r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||O)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$E_())}},{key:"_$E_",value:(a=regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$Ep;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])})),o=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=a.apply(t,e);function s(t){n(o,r,i,s,l,"next",t)}function l(t){n(o,r,i,s,l,"throw",t)}s(void 0)}))},function(){return o.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var t,e=this;if(this.isUpdatePending){this.hasUpdated,this._$Et&&(this._$Et.forEach((function(t,n){return e[n]=t})),this._$Et=void 0);var n=!1,r=this._$AL;try{(n=this.shouldUpdate(r))?(this.willUpdate(r),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(r)):this._$EU()}catch(t){throw n=!1,this._$EU(),t}n&&this._$AE(r)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$EU",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$Ep}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._$EC&&(this._$EC.forEach((function(t,n){return e._$ES(n,e[n],t)})),this._$EC=void 0),this._$EU()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this.elementProperties.forEach((function(n,r){var a=t._$Eh(r,n);void 0!==a&&(t._$Eu.set(a,r),e.push(a))})),e}},{key:"createProperty",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I;if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(t,n),!n.noAccessor&&!this.prototype.hasOwnProperty(t)){var r="symbol"==e(t)?Symbol():"__"+t,a=this.getPropertyDescriptor(t,r,n);void 0!==a&&Object.defineProperty(this.prototype,t,a)}}},{key:"getPropertyDescriptor",value:function(t,e,n){return{get:function(){return this[e]},set:function(r){var a=this[t];this[e]=r,this.requestUpdate(t,a,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){return this.elementProperties.get(t)||I}},{key:"finalize",value:function(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;var t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){var e,n=this.properties,r=_([].concat(w(Object.getOwnPropertyNames(n)),w(Object.getOwnPropertySymbols(n))));try{for(r.s();!(e=r.n()).done;){var a=e.value;this.createProperty(a,n[a])}}catch(t){r.e(t)}finally{r.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,r=_(new Set(t.flat(1/0).reverse()));try{for(r.s();!(n=r.n()).done;){var a=n.value;e.unshift(q(a))}}catch(t){r.e(t)}finally{r.f()}}else void 0!==t&&e.push(q(t));return e}},{key:"_$Eh",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]),c}(d(HTMLElement));H.finalized=!0,H.elementProperties=new Map,H.elementStyles=[],H.shadowRootOptions={mode:"open"},null==F||F({ReactiveElement:H}),(null!==(S=globalThis.reactiveElementVersions)&&void 0!==S?S:globalThis.reactiveElementVersions=[]).push("1.3.1");var D=globalThis.trustedTypes,U=D?D.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,j="lit$".concat((Math.random()+"").slice(9),"$"),L="?"+j,V="<".concat(L,">"),B=document,K=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.createComment(t)},X=function(t){return null===t||"object"!=e(t)&&"function"!=typeof t},G=Array.isArray,Z=function(t){var e;return G(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,Q=/>/g,J=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,tt=/'/g,et=/"/g,nt=/^(?:script|style|textarea|title)$/i,rt=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return{_$litType$:t,strings:e,values:r}}},at=rt(1),it=rt(2),ot=Symbol.for("lit-noChange"),st=Symbol.for("lit-nothing"),lt=new WeakMap,ct=B.createTreeWalker(B,129,null,!1),ut=function(t,e){for(var n,r=t.length-1,a=[],i=2===e?"<svg>":"",o=Y,s=0;s<r;s++){for(var l=t[s],c=void 0,u=void 0,h=-1,d=0;d<l.length&&(o.lastIndex=d,null!==(u=o.exec(l)));)d=o.lastIndex,o===Y?"!--"===u[1]?o=W:void 0!==u[1]?o=Q:void 0!==u[2]?(nt.test(u[2])&&(n=RegExp("</"+u[2],"g")),o=J):void 0!==u[3]&&(o=J):o===J?">"===u[0]?(o=null!=n?n:Y,h=-1):void 0===u[1]?h=-2:(h=o.lastIndex-u[2].length,c=u[1],o=void 0===u[3]?J:'"'===u[3]?et:tt):o===et||o===tt?o=J:o===W||o===Q?o=Y:(o=J,n=void 0);var f=o===J&&t[s+1].startsWith("/>")?" ":"";i+=o===Y?l+V:h>=0?(a.push(c),l.slice(0,h)+"$lit$"+l.slice(h)+j+f):l+j+(-2===h?(a.push(void 0),s):f)}var p=i+(t[r]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==U?U.createHTML(p):p,a]},ht=function(){function t(e,n){var a,i=e.strings,o=e._$litType$;r(this,t),this.parts=[];var s=0,l=0,c=i.length-1,u=this.parts,h=y(ut(i,o),2),d=h[0],f=h[1];if(this.el=t.createElement(d,n),ct.currentNode=this.el.content,2===o){var p=this.el.content,v=p.firstChild;v.remove(),p.append.apply(p,w(v.childNodes))}for(;null!==(a=ct.nextNode())&&u.length<c;){if(1===a.nodeType){if(a.hasAttributes()){var m,b=[],g=_(a.getAttributeNames());try{for(g.s();!(m=g.n()).done;){var k=m.value;if(k.endsWith("$lit$")||k.startsWith(j)){var x=f[l++];if(b.push(k),void 0!==x){var S=a.getAttribute(x.toLowerCase()+"$lit$").split(j),A=/([.?@])?(.*)/.exec(x);u.push({type:1,index:s,name:A[2],strings:S,ctor:"."===A[1]?gt:"?"===A[1]?wt:"@"===A[1]?kt:bt})}else u.push({type:6,index:s})}}}catch(t){g.e(t)}finally{g.f()}for(var E=0,T=b;E<T.length;E++){var M=T[E];a.removeAttribute(M)}}if(nt.test(a.tagName)){var C=a.textContent.split(j),N=C.length-1;if(N>0){a.textContent=D?D.emptyScript:"";for(var R=0;R<N;R++)a.append(C[R],K()),ct.nextNode(),u.push({type:2,index:++s});a.append(C[N],K())}}}else if(8===a.nodeType)if(a.data===L)u.push({type:2,index:s});else for(var q=-1;-1!==(q=a.data.indexOf(j,q+1));)u.push({type:7,index:s}),q+=j.length-1;s++}}return i(t,null,[{key:"createElement",value:function(t,e){var n=B.createElement("template");return n.innerHTML=t,n}}]),t}();function dt(t,e){var n,r,a,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;if(e===ot)return e;var l=void 0!==s?null===(n=o._$Cl)||void 0===n?void 0:n[s]:o._$Cu,c=X(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===c?l=void 0:(l=new c(t))._$AT(t,o,s),void 0!==s?(null!==(a=(i=o)._$Cl)&&void 0!==a?a:i._$Cl=[])[s]=l:o._$Cu=l),void 0!==l&&(e=dt(t,l._$AS(t,e.values),l,s)),e}var ft,pt,vt=function(){function t(e,n){r(this,t),this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=n}return i(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"p",value:function(t){var e,n=this._$AD,r=n.el.content,a=n.parts,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:B).importNode(r,!0);ct.currentNode=i;for(var o=ct.nextNode(),s=0,l=0,c=a[0];void 0!==c;){if(s===c.index){var u=void 0;2===c.type?u=new mt(o,o.nextSibling,this,t):1===c.type?u=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(u=new xt(o,this,t)),this.v.push(u),c=a[++l]}s!==(null==c?void 0:c.index)&&(o=ct.nextNode(),s++)}return i}},{key:"m",value:function(t){var e,n=0,r=_(this.v);try{for(r.s();!(e=r.n()).done;){var a=e.value;void 0!==a&&(void 0!==a.strings?(a._$AI(t,a,n),n+=a.strings.length-2):a._$AI(t[n])),n++}}catch(t){r.e(t)}finally{r.f()}}}]),t}(),mt=function(){function t(e,n,a,i){var o;r(this,t),this.type=2,this._$AH=st,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=a,this.options=i,this._$Cg=null===(o=null==i?void 0:i.isConnected)||void 0===o||o}return i(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;t=dt(this,t,e),X(t)?t===st||null==t||""===t?(this._$AH!==st&&this._$AR(),this._$AH=st):t!==this._$AH&&t!==ot&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):Z(t)?this.S(t):this.$(t)}},{key:"A",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._$AB;return this._$AA.parentNode.insertBefore(t,e)}},{key:"k",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}},{key:"$",value:function(t){this._$AH!==st&&X(this._$AH)?this._$AA.nextSibling.data=t:this.k(B.createTextNode(t)),this._$AH=t}},{key:"T",value:function(t){var e,n=t.values,r=t._$litType$,a="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=ht.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===a)this._$AH.m(n);else{var i=new vt(a,this),o=i.p(this.options);i.m(n),this.k(o),this._$AH=i}}},{key:"_$AC",value:function(t){var e=lt.get(t.strings);return void 0===e&&lt.set(t.strings,e=new ht(t)),e}},{key:"S",value:function(e){G(this._$AH)||(this._$AH=[],this._$AR());var n,r,a=this._$AH,i=0,o=_(e);try{for(o.s();!(r=o.n()).done;){var s=r.value;i===a.length?a.push(n=new t(this.A(K()),this.A(K()),this,this.options)):n=a[i],n._$AI(s),i++}}catch(t){o.e(t)}finally{o.f()}i<a.length&&(this._$AR(n&&n._$AB.nextSibling,i),a.length=i)}},{key:"_$AR",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var r=e.nextSibling;e.remove(),e=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),bt=function(){function t(e,n,a,i,o){r(this,t),this.type=1,this._$AH=st,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=o,a.length>2||""!==a[0]||""!==a[1]?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=st}return i(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,a=this.strings,i=!1;if(void 0===a)t=dt(this,t,e,0),(i=!X(t)||t!==this._$AH&&t!==ot)&&(this._$AH=t);else{var o,s,l=t;for(t=a[0],o=0;o<a.length-1;o++)(s=dt(this,l[n+o],e,o))===ot&&(s=this._$AH[o]),i||(i=!X(s)||s!==this._$AH[o]),s===st?t=st:t!==st&&(t+=(null!=s?s:"")+a[o+1]),this._$AH[o]=s}i&&!r&&this.C(t)}},{key:"C",value:function(t){t===st?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}]),t}(),gt=function(t){s(n,t);var e=v(n);function n(){var t;return r(this,n),(t=e.apply(this,arguments)).type=3,t}return i(n,[{key:"C",value:function(t){this.element[this.name]=t===st?void 0:t}}]),n}(bt),yt=D?D.emptyScript:"",wt=function(t){s(n,t);var e=v(n);function n(){var t;return r(this,n),(t=e.apply(this,arguments)).type=4,t}return i(n,[{key:"C",value:function(t){t&&t!==st?this.element.setAttribute(this.name,yt):this.element.removeAttribute(this.name)}}]),n}(bt),kt=function(t){s(n,t);var e=v(n);function n(t,a,i,o,s){var l;return r(this,n),(l=e.call(this,t,a,i,o,s)).type=5,l}return i(n,[{key:"_$AI",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;if((t=null!==(e=dt(this,t,n,0))&&void 0!==e?e:st)!==ot){var r=this._$AH,a=t===st&&r!==st||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==st&&(r===st||a);a&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}]),n}(bt),xt=function(){function t(e,n,a){r(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=a}return i(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){dt(this,t)}}]),t}(),_t=window.litHtmlPolyfillSupport;null==_t||_t(ht,mt),(null!==(A=globalThis.litHtmlVersions)&&void 0!==A?A:globalThis.litHtmlVersions=[]).push("2.2.1");var St=function(t){s(n,t);var e=v(n);function n(){var t;return r(this,n),(t=e.apply(this,arguments)).renderOptions={host:f(t)},t._$Dt=void 0,t}return i(n,[{key:"createRenderRoot",value:function(){var t,e,r=b(l(n.prototype),"createRenderRoot",this).call(this);return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=r.firstChild),r}},{key:"update",value:function(t){var e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),b(l(n.prototype),"update",this).call(this,t),this._$Dt=function(t,e,n){var r,a,i=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e,o=i._$litPart$;if(void 0===o){var s=null!==(a=null==n?void 0:n.renderBefore)&&void 0!==a?a:null;i._$litPart$=o=new mt(e.insertBefore(K(),s),s,void 0,null!=n?n:{})}return o._$AI(t),o}(e,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;b(l(n.prototype),"connectedCallback",this).call(this),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;b(l(n.prototype),"disconnectedCallback",this).call(this),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return ot}}]),n}(H);St.finalized=!0,St._$litElement$=!0,null===(ft=globalThis.litElementHydrateSupport)||void 0===ft||ft.call(globalThis,{LitElement:St});var At=globalThis.litElementPolyfillSupport;function Et(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Tt(t){var e=t,n=t,r=t;function a(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(a<i){if(0!==n(e,e))return i;do{var o=a+i>>>1;r(t[o],e)<0?a=o+1:i=o}while(a<i)}return a}return 2!==t.length&&(e=function(e,n){return t(e)-n},n=Et,r=function(e,n){return Et(t(e),n)}),{left:a,center:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,o=a(t,n,r,i-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(a<i){if(0!==n(e,e))return i;do{var o=a+i>>>1;r(t[o],e)<=0?a=o+1:i=o}while(a<i)}return a}}}null==At||At({LitElement:St}),(null!==(pt=globalThis.litElementVersions)&&void 0!==pt?pt:globalThis.litElementVersions=[]).push("3.2.0");var Mt=Tt(Et).right;Tt((function(t){return null===t?NaN:+t})).center;var Ct=Mt;function Nt(t,e){var n,r;if(void 0===e){var a,i=_(t);try{for(i.s();!(a=i.n()).done;){var o=a.value;null!=o&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}}catch(t){i.e(t)}finally{i.f()}}else{var s,l=-1,c=_(t);try{for(c.s();!(s=c.n()).done;){var u=s.value;null!=(u=e(u,++l,t))&&(void 0===n?u>=u&&(n=r=u):(n>u&&(n=u),r<u&&(r=u)))}}catch(t){c.e(t)}finally{c.f()}}return[n,r]}var Rt=function(){function t(){r(this,t),this._partials=new Float64Array(32),this._n=0}return i(t,[{key:"add",value:function(t){for(var e=this._partials,n=0,r=0;r<this._n&&r<32;r++){var a=e[r],i=t+a,o=Math.abs(t)<Math.abs(a)?t-(i-a):a-(i-t);o&&(e[n++]=o),t=i}return e[n]=t,this._n=n+1,this}},{key:"valueOf",value:function(){var t,e,n,r=this._partials,a=this._n,i=0;if(a>0){for(i=r[--a];a>0&&(t=i,!(n=(e=r[--a])-((i=t+e)-t))););a>0&&(n<0&&r[a-1]<0||n>0&&r[a-1]>0)&&(e=2*n)==(t=i+e)-i&&(i=t)}return i}}]),t}();function qt(t){return t}var Pt=Array.prototype.slice;function zt(t){return function(){return t}}var Ft=Math.sqrt(50),$t=Math.sqrt(10),Ot=Math.sqrt(2);function It(t,e,n){var r,a,i,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(a=t,t=e,e=a),0===(o=Ht(t,e,n))||!isFinite(o))return[];if(o>0){var l=Math.round(t/o),c=Math.round(e/o);for(l*o<t&&++l,c*o>e&&--c,i=new Array(a=c-l+1);++s<a;)i[s]=(l+s)*o}else{o=-o;var u=Math.round(t*o),h=Math.round(e*o);for(u/o<t&&++u,h/o>e&&--h,i=new Array(a=h-u+1);++s<a;)i[s]=(u+s)/o}return r&&i.reverse(),i}function Ht(t,e,n){var r=(e-t)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,a);return a>=0?(i>=Ft?10:i>=$t?5:i>=Ot?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=Ft?10:i>=$t?5:i>=Ot?2:1)}function Dt(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=Ft?a*=10:i>=$t?a*=5:i>=Ot&&(a*=2),e<t?-a:a}function Ut(t){return Math.ceil(Math.log(function(t,e){var n=0;if(void 0===e){var r,a=_(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;null!=i&&(i=+i)>=i&&++n}}catch(t){a.e(t)}finally{a.f()}}else{var o,s=-1,l=_(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;null!=(c=e(c,++s,t))&&(c=+c)>=c&&++n}}catch(t){l.e(t)}finally{l.f()}}return n}(t))/Math.LN2)+1}function jt(){var t=qt,e=Nt,n=Ut;function r(r){Array.isArray(r)||(r=Array.from(r));var a,i,o=r.length,s=new Array(o);for(a=0;a<o;++a)s[a]=t(r[a],a,r);var l=e(s),c=l[0],u=l[1],h=n(s,c,u);if(!Array.isArray(h)){var d=u,f=+h;if(e===Nt){var p=function(t,e,n){for(var r;;){var a=Ht(t,e,n);if(a===r||0===a||!isFinite(a))return[t,e];a>0?(t=Math.floor(t/a)*a,e=Math.ceil(e/a)*a):a<0&&(t=Math.ceil(t*a)/a,e=Math.floor(e*a)/a),r=a}}(c,u,f),v=y(p,2);c=v[0],u=v[1]}if((h=It(c,u,f))[h.length-1]>=u)if(d>=u&&e===Nt){var m=Ht(c,u,f);isFinite(m)&&(m>0?u=(Math.floor(u/m)+1)*m:m<0&&(u=(Math.ceil(u*-m)+1)/-m))}else h.pop()}for(var b=h.length;h[0]<=c;)h.shift(),--b;for(;h[b-1]>u;)h.pop(),--b;var g,w=new Array(b+1);for(a=0;a<=b;++a)(g=w[a]=[]).x0=a>0?h[a-1]:c,g.x1=a<b?h[a]:u;for(a=0;a<o;++a)null!=(i=s[a])&&c<=i&&i<=u&&w[Ct(h,i,0,b)].push(r[a]);return w}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:zt(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:zt([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?zt(Pt.call(t)):zt(t),r):n},r}var Lt=regeneratorRuntime.mark(Vt);function Vt(t){var e,n,r;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:e=_(t),a.prev=1,e.s();case 3:if((n=e.n()).done){a.next=8;break}return r=n.value,a.delegateYield(r,"t0",6);case 6:a.next=3;break;case 8:a.next=13;break;case 10:a.prev=10,a.t1=a.catch(1),e.e(a.t1);case 13:return a.prev=13,e.f(),a.finish(13);case 16:case"end":return a.stop()}}),Lt,null,[[1,10,13,16]])}function Bt(t,e,n){t=+t,e=+e,n=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+n;for(var r=-1,a=0|Math.max(0,Math.ceil((e-t)/n)),i=new Array(a);++r<a;)i[r]=t+r*n;return i}function Kt(t){return t}var Xt=1e-6;function Gt(t){return"translate("+t+",0)"}function Zt(t){return"translate(0,"+t+")"}function Yt(t){return function(e){return+t(e)}}function Wt(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Qt(){return!this.__axis}function Jt(t,e){var n=[],r=null,a=null,i=6,o=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",h=1===t||3===t?Gt:Zt;function d(d){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==a?e.tickFormat?e.tickFormat.apply(e,n):Kt:a,v=Math.max(i,0)+s,m=e.range(),b=+m[0]+l,g=+m[m.length-1]+l,y=(e.bandwidth?Wt:Yt)(e.copy(),l),w=d.selection?d.selection():d,k=w.selectAll(".domain").data([null]),x=w.selectAll(".tick").data(f,e).order(),_=x.exit(),S=x.enter().append("g").attr("class","tick"),A=x.select("line"),E=x.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(S),A=A.merge(S.append("line").attr("stroke","currentColor").attr(u+"2",c*i)),E=E.merge(S.append("text").attr("fill","currentColor").attr(u,c*v).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==w&&(k=k.transition(d),x=x.transition(d),A=A.transition(d),E=E.transition(d),_=_.transition(d).attr("opacity",Xt).attr("transform",(function(t){return isFinite(t=y(t))?h(t+l):this.getAttribute("transform")})),S.attr("opacity",Xt).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:y(t))+l)}))),_.remove(),k.attr("d",4===t||2===t?o?"M"+c*o+","+b+"H"+l+"V"+g+"H"+c*o:"M"+l+","+b+"V"+g:o?"M"+b+","+c*o+"V"+l+"H"+g+"V"+c*o:"M"+b+","+l+"H"+g),x.attr("opacity",1).attr("transform",(function(t){return h(y(t)+l)})),A.attr(u+"2",c*i),E.attr(u,c*v).text(p),w.filter(Qt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),w.each((function(){this.__axis=y}))}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),d):r&&r.slice()},d.tickFormat=function(t){return arguments.length?(a=t,d):a},d.tickSize=function(t){return arguments.length?(i=o=+t,d):i},d.tickSizeInner=function(t){return arguments.length?(i=+t,d):i},d.tickSizeOuter=function(t){return arguments.length?(o=+t,d):o},d.tickPadding=function(t){return arguments.length?(s=+t,d):s},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function te(t){return Jt(3,t)}function ee(t){return Jt(4,t)}var ne={value:function(){}};function re(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ae(r)}function ae(t){this._=t}function ie(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function oe(t,e){for(var n,r=0,a=t.length;r<a;++r)if((n=t[r]).name===e)return n.value}function se(t,e,n){for(var r=0,a=t.length;r<a;++r)if(t[r].name===e){t[r]=ne,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ae.prototype=re.prototype={constructor:ae,on:function(t,e){var n,r=this._,a=ie(t+"",r),i=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<o;)if(n=(t=a[i]).type)r[n]=se(r[n],t.name,e);else if(null==e)for(n in r)r[n]=se(r[n],t.name,null);return this}for(;++i<o;)if((n=(t=a[i]).type)&&(n=oe(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ae(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,a=new Array(n),i=0;i<n;++i)a[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,a)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],a=0,i=r.length;a<i;++a)r[a].value.apply(e,n)}};var le="http://www.w3.org/1999/xhtml",ce={svg:"http://www.w3.org/2000/svg",xhtml:le,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ue(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ce.hasOwnProperty(e)?{space:ce[e],local:t}:t}function he(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===le&&e.documentElement.namespaceURI===le?e.createElement(t):e.createElementNS(n,t)}}function de(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function fe(t){var e=ue(t);return(e.local?de:he)(e)}function pe(){}function ve(t){return null==t?pe:function(){return this.querySelector(t)}}function me(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function be(){return[]}function ge(t){return null==t?be:function(){return this.querySelectorAll(t)}}function ye(t){return function(){return this.matches(t)}}function we(t){return function(e){return e.matches(t)}}var ke=Array.prototype.find;function xe(){return this.firstElementChild}var _e=Array.prototype.filter;function Se(){return Array.from(this.children)}function Ae(t){return new Array(t.length)}function Ee(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Te(t){return function(){return t}}function Me(t,e,n,r,a,i){for(var o,s=0,l=e.length,c=i.length;s<c;++s)(o=e[s])?(o.__data__=i[s],r[s]=o):n[s]=new Ee(t,i[s]);for(;s<l;++s)(o=e[s])&&(a[s]=o)}function Ce(t,e,n,r,a,i,o){var s,l,c,u=new Map,h=e.length,d=i.length,f=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(f[s]=c=o.call(l,l.__data__,s,e)+"",u.has(c)?a[s]=l:u.set(c,l));for(s=0;s<d;++s)c=o.call(t,i[s],s,i)+"",(l=u.get(c))?(r[s]=l,l.__data__=i[s],u.delete(c)):n[s]=new Ee(t,i[s]);for(s=0;s<h;++s)(l=e[s])&&u.get(f[s])===l&&(a[s]=l)}function Ne(t){return t.__data__}function Re(t){return"object"===e(t)&&"length"in t?t:Array.from(t)}function qe(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Pe(t){return function(){this.removeAttribute(t)}}function ze(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fe(t,e){return function(){this.setAttribute(t,e)}}function $e(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Oe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Ie(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function He(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function De(t){return function(){this.style.removeProperty(t)}}function Ue(t,e,n){return function(){this.style.setProperty(t,e,n)}}function je(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Le(t,e){return t.style.getPropertyValue(e)||He(t).getComputedStyle(t,null).getPropertyValue(e)}function Ve(t){return function(){delete this[t]}}function Be(t,e){return function(){this[t]=e}}function Ke(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Xe(t){return t.trim().split(/^|\s+/)}function Ge(t){return t.classList||new Ze(t)}function Ze(t){this._node=t,this._names=Xe(t.getAttribute("class")||"")}function Ye(t,e){for(var n=Ge(t),r=-1,a=e.length;++r<a;)n.add(e[r])}function We(t,e){for(var n=Ge(t),r=-1,a=e.length;++r<a;)n.remove(e[r])}function Qe(t){return function(){Ye(this,t)}}function Je(t){return function(){We(this,t)}}function tn(t,e){return function(){(e.apply(this,arguments)?Ye:We)(this,t)}}function en(){this.textContent=""}function nn(t){return function(){this.textContent=t}}function rn(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function an(){this.innerHTML=""}function on(t){return function(){this.innerHTML=t}}function sn(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ln(){this.nextSibling&&this.parentNode.appendChild(this)}function cn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function un(){return null}function hn(){var t=this.parentNode;t&&t.removeChild(this)}function dn(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function fn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function pn(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function vn(t){return function(){var e=this.__on;if(e){for(var n,r=0,a=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++a]=n:this.removeEventListener(n.type,n.listener,n.options);++a?e.length=a:delete this.__on}}}function mn(t,e,n){return function(){var r,a=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(a)for(var o=0,s=a.length;o<s;++o)if((r=a[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=e);this.addEventListener(t.type,i,n),r={type:t.type,name:t.name,value:e,listener:i,options:n},a?a.push(r):this.__on=[r]}}function bn(t,e,n){var r=He(t),a=r.CustomEvent;"function"==typeof a?a=new a(e,n):(a=r.document.createEvent("Event"),n?(a.initEvent(e,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}function gn(t,e){return function(){return bn(this,t,e)}}function yn(t,e){return function(){return bn(this,t,e.apply(this,arguments))}}Ee.prototype={constructor:Ee,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Ze.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var wn=regeneratorRuntime.mark(kn);function kn(){var t,e,n,r,a,i,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:t=this._groups,e=0,n=t.length;case 1:if(!(e<n)){s.next=13;break}r=t[e],a=0,i=r.length;case 3:if(!(a<i)){s.next=10;break}if(!(o=r[a])){s.next=7;break}return s.next=7,o;case 7:++a,s.next=3;break;case 10:++e,s.next=1;break;case 13:case"end":return s.stop()}}),wn,this)}var xn=[null];function _n(t,e){this._groups=t,this._parents=e}function Sn(){return new _n([[document.documentElement]],xn)}function An(t){return"string"==typeof t?new _n([[document.querySelector(t)]],[document.documentElement]):new _n([[t]],xn)}function En(t,e){if(t=function(t){for(var e;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[t.clientX-a.left-e.clientLeft,t.clientY-a.top-e.clientTop]}}return[t.pageX,t.pageY]}_n.prototype=Sn.prototype=o({constructor:_n,select:function(t){"function"!=typeof t&&(t=ve(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o,s=e[a],l=s.length,c=r[a]=new Array(l),u=0;u<l;++u)(i=s[u])&&(o=t.call(i,i.__data__,u,s))&&("__data__"in i&&(o.__data__=i.__data__),c[u]=o);return new _n(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return me(t.apply(this,arguments))}}(t):ge(t);for(var e=this._groups,n=e.length,r=[],a=[],i=0;i<n;++i)for(var o,s=e[i],l=s.length,c=0;c<l;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),a.push(o));return new _n(r,a)},selectChild:function(t){return this.select(null==t?xe:function(t){return function(){return ke.call(this.children,t)}}("function"==typeof t?t:we(t)))},selectChildren:function(t){return this.selectAll(null==t?Se:function(t){return function(){return _e.call(this.children,t)}}("function"==typeof t?t:we(t)))},filter:function(t){"function"!=typeof t&&(t=ye(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o=e[a],s=o.length,l=r[a]=[],c=0;c<s;++c)(i=o[c])&&t.call(i,i.__data__,c,o)&&l.push(i);return new _n(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Ne);var n=e?Ce:Me,r=this._parents,a=this._groups;"function"!=typeof t&&(t=Te(t));for(var i=a.length,o=new Array(i),s=new Array(i),l=new Array(i),c=0;c<i;++c){var u=r[c],h=a[c],d=h.length,f=Re(t.call(u,u&&u.__data__,c,r)),p=f.length,v=s[c]=new Array(p),m=o[c]=new Array(p),b=l[c]=new Array(d);n(u,h,v,m,b,f,e);for(var g,y,w=0,k=0;w<p;++w)if(g=v[w]){for(w>=k&&(k=w+1);!(y=m[k])&&++k<p;);g._next=y||null}}return(o=new _n(o,r))._enter=s,o._exit=l,o},enter:function(){return new _n(this._enter||this._groups.map(Ae),this._parents)},exit:function(){return new _n(this._exit||this._groups.map(Ae),this._parents)},join:function(t,e,n){var r=this.enter(),a=this,i=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(a=e(a))&&(a=a.selection()),null==n?i.remove():n(i),r&&a?r.merge(a).order():a},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,a=n.length,i=r.length,o=Math.min(a,i),s=new Array(a),l=0;l<o;++l)for(var c,u=n[l],h=r[l],d=u.length,f=s[l]=new Array(d),p=0;p<d;++p)(c=u[p]||h[p])&&(f[p]=c);for(;l<a;++l)s[l]=n[l];return new _n(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,a=t[e],i=a.length-1,o=a[i];--i>=0;)(r=a[i])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=qe);for(var n=this._groups,r=n.length,a=new Array(r),i=0;i<r;++i){for(var o,s=n[i],l=s.length,c=a[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(c[u]=o);c.sort(e)}return new _n(a,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],a=0,i=r.length;a<i;++a){var o=r[a];if(o)return o}return null},size:function(){var t,e=0,n=_(this);try{for(n.s();!(t=n.n()).done;){t.value;++e}}catch(t){n.e(t)}finally{n.f()}return e},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var a,i=e[n],o=0,s=i.length;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this},attr:function(t,e){var n=ue(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?ze:Pe:"function"==typeof e?n.local?Ie:Oe:n.local?$e:Fe)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?De:"function"==typeof e?je:Ue)(t,e,null==n?"":n)):Le(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ve:"function"==typeof e?Ke:Be)(t,e)):this.node()[t]},classed:function(t,e){var n=Xe(t+"");if(arguments.length<2){for(var r=Ge(this.node()),a=-1,i=n.length;++a<i;)if(!r.contains(n[a]))return!1;return!0}return this.each(("function"==typeof e?tn:e?Qe:Je)(n,e))},text:function(t){return arguments.length?this.each(null==t?en:("function"==typeof t?rn:nn)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?an:("function"==typeof t?sn:on)(t)):this.node().innerHTML},raise:function(){return this.each(ln)},lower:function(){return this.each(cn)},append:function(t){var e="function"==typeof t?t:fe(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:fe(t),r=null==e?un:"function"==typeof e?e:ve(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(hn)},clone:function(t){return this.select(t?fn:dn)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,a,i=pn(t+""),o=i.length;if(!(arguments.length<2)){for(s=e?mn:vn,r=0;r<o;++r)this.each(s(i[r],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<o;++r)if((a=i[r]).type===l.type&&a.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?yn:gn)(t,e))}},Symbol.iterator,kn);var Tn={passive:!1},Mn={capture:!0,passive:!1};function Cn(t){t.stopImmediatePropagation()}function Nn(t){t.preventDefault(),t.stopImmediatePropagation()}var Rn=function(t){return function(){return t}};function qn(t,e){var n=e.sourceEvent,r=e.subject,a=e.target,i=e.identifier,o=e.active,s=e.x,l=e.y,c=e.dx,u=e.dy,h=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}function Pn(t){return!t.ctrlKey&&!t.button}function zn(){return this.parentNode}function Fn(t,e){return null==e?{x:t.x,y:t.y}:e}function $n(){return navigator.maxTouchPoints||"ontouchstart"in this}function On(){var t,e,n,r,a=Pn,i=zn,o=Fn,s=$n,l={},c=re("start","drag","end"),u=0,h=0;function d(t){t.on("mousedown.drag",f).filter(s).on("touchstart.drag",m).on("touchmove.drag",b,Tn).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(o,s){if(!r&&a.call(this,o,s)){var l=y(this,i.call(this,o,s),o,s,"mouse");l&&(An(o.view).on("mousemove.drag",p,Mn).on("mouseup.drag",v,Mn),function(t){var e=t.document.documentElement,n=An(t).on("dragstart.drag",Nn,Mn);"onselectstart"in e?n.on("selectstart.drag",Nn,Mn):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(o.view),Cn(o),n=!1,t=o.clientX,e=o.clientY,l("start",o))}}function p(r){if(Nn(r),!n){var a=r.clientX-t,i=r.clientY-e;n=a*a+i*i>h}l.mouse("drag",r)}function v(t){An(t.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=An(t).on("dragstart.drag",null);e&&(r.on("click.drag",Nn,Mn),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,n),Nn(t),l.mouse("end",t)}function m(t,e){if(a.call(this,t,e)){var n,r,o=t.changedTouches,s=i.call(this,t,e),l=o.length;for(n=0;n<l;++n)(r=y(this,s,t,e,o[n].identifier,o[n]))&&(Cn(t),r("start",t,o[n]))}}function b(t){var e,n,r=t.changedTouches,a=r.length;for(e=0;e<a;++e)(n=l[r[e].identifier])&&(Nn(t),n("drag",t,r[e]))}function g(t){var e,n,a=t.changedTouches,i=a.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),e=0;e<i;++e)(n=l[a[e].identifier])&&(Cn(t),n("end",t,a[e]))}function y(t,e,n,r,a,i){var s,h,f,p=c.copy(),v=En(i||n,e);if(null!=(f=o.call(t,new qn("beforestart",{sourceEvent:n,target:d,identifier:a,active:u,x:v[0],y:v[1],dx:0,dy:0,dispatch:p}),r)))return s=f.x-v[0]||0,h=f.y-v[1]||0,function n(i,o,c){var m,b=v;switch(i){case"start":l[a]=n,m=u++;break;case"end":delete l[a],--u;case"drag":v=En(c||o,e),m=u}p.call(i,t,new qn(i,{sourceEvent:o,subject:f,target:d,identifier:a,active:m,x:v[0]+s,y:v[1]+h,dx:v[0]-b[0],dy:v[1]-b[1],dispatch:p}),r)}}return d.filter=function(t){return arguments.length?(a="function"==typeof t?t:Rn(!!t),d):a},d.container=function(t){return arguments.length?(i="function"==typeof t?t:Rn(t),d):i},d.subject=function(t){return arguments.length?(o="function"==typeof t?t:Rn(t),d):o},d.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Rn(!!t),d):s},d.on=function(){var t=c.on.apply(c,arguments);return t===c?d:t},d.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,d):Math.sqrt(h)},d}function In(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Hn(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Dn(){}qn.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Un=.7,jn=1/Un,Ln="\\s*([+-]?\\d+)\\s*",Vn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Kn=/^#([0-9a-f]{3,8})$/,Xn=new RegExp("^rgb\\("+[Ln,Ln,Ln]+"\\)$"),Gn=new RegExp("^rgb\\("+[Bn,Bn,Bn]+"\\)$"),Zn=new RegExp("^rgba\\("+[Ln,Ln,Ln,Vn]+"\\)$"),Yn=new RegExp("^rgba\\("+[Bn,Bn,Bn,Vn]+"\\)$"),Wn=new RegExp("^hsl\\("+[Vn,Bn,Bn]+"\\)$"),Qn=new RegExp("^hsla\\("+[Vn,Bn,Bn,Vn]+"\\)$"),Jn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function tr(){return this.rgb().formatHex()}function er(){return this.rgb().formatRgb()}function nr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Kn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?rr(e):3===n?new sr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ar(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ar(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Xn.exec(t))?new sr(e[1],e[2],e[3],1):(e=Gn.exec(t))?new sr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Zn.exec(t))?ar(e[1],e[2],e[3],e[4]):(e=Yn.exec(t))?ar(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Wn.exec(t))?hr(e[1],e[2]/100,e[3]/100,1):(e=Qn.exec(t))?hr(e[1],e[2]/100,e[3]/100,e[4]):Jn.hasOwnProperty(t)?rr(Jn[t]):"transparent"===t?new sr(NaN,NaN,NaN,0):null}function rr(t){return new sr(t>>16&255,t>>8&255,255&t,1)}function ar(t,e,n,r){return r<=0&&(t=e=n=NaN),new sr(t,e,n,r)}function ir(t){return t instanceof Dn||(t=nr(t)),t?new sr((t=t.rgb()).r,t.g,t.b,t.opacity):new sr}function or(t,e,n,r){return 1===arguments.length?ir(t):new sr(t,e,n,null==r?1:r)}function sr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function lr(){return"#"+ur(this.r)+ur(this.g)+ur(this.b)}function cr(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ur(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function hr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new fr(t,e,n,r)}function dr(t){if(t instanceof fr)return new fr(t.h,t.s,t.l,t.opacity);if(t instanceof Dn||(t=nr(t)),!t)return new fr;if(t instanceof fr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,a=Math.min(e,n,r),i=Math.max(e,n,r),o=NaN,s=i-a,l=(i+a)/2;return s?(o=e===i?(n-r)/s+6*(n<r):n===i?(r-e)/s+2:(e-n)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new fr(o,s,l,t.opacity)}function fr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function pr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}In(Dn,nr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:tr,formatHex:tr,formatHsl:function(){return dr(this).formatHsl()},formatRgb:er,toString:er}),In(sr,or,Hn(Dn,{brighter:function(t){return t=null==t?jn:Math.pow(jn,t),new sr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Un:Math.pow(Un,t),new sr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:lr,formatHex:lr,formatRgb:cr,toString:cr})),In(fr,(function(t,e,n,r){return 1===arguments.length?dr(t):new fr(t,e,n,null==r?1:r)}),Hn(Dn,{brighter:function(t){return t=null==t?jn:Math.pow(jn,t),new fr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Un:Math.pow(Un,t),new fr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,a=2*n-r;return new sr(pr(t>=240?t-240:t+120,a,r),pr(t,a,r),pr(t<120?t+240:t-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var vr=function(t){return function(){return t}};function mr(t){return 1==(t=+t)?br:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):vr(isNaN(e)?n:e)}}function br(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):vr(isNaN(t)?e:t)}var gr=function t(e){var n=mr(e);function r(t,e){var r=n((t=or(t)).r,(e=or(e)).r),a=n(t.g,e.g),i=n(t.b,e.b),o=br(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=a(e),t.b=i(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function yr(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,a=e.slice();return function(i){for(n=0;n<r;++n)a[n]=t[n]*(1-i)+e[n]*i;return a}}function wr(t,e){var n,r=e?e.length:0,a=t?Math.min(r,t.length):0,i=new Array(a),o=new Array(r);for(n=0;n<a;++n)i[n]=Tr(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<a;++n)o[n]=i[n](t);return o}}function kr(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function xr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function _r(t,n){var r,a={},i={};for(r in null!==t&&"object"===e(t)||(t={}),null!==n&&"object"===e(n)||(n={}),n)r in t?a[r]=Tr(t[r],n[r]):i[r]=n[r];return function(t){for(r in a)i[r]=a[r](t);return i}}var Sr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ar=new RegExp(Sr.source,"g");function Er(t,e){var n,r,a,i=Sr.lastIndex=Ar.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(n=Sr.exec(t))&&(r=Ar.exec(e));)(a=r.index)>i&&(a=e.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:xr(n,r)})),i=Ar.lastIndex;return i<e.length&&(a=e.slice(i),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}function Tr(t,n){var r,a=e(n);return null==n||"boolean"===a?vr(n):("number"===a?xr:"string"===a?(r=nr(n))?(n=r,gr):Er:n instanceof nr?gr:n instanceof Date?kr:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(n)?yr:Array.isArray(n)?wr:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?_r:xr)(t,n)}function Mr(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Cr,Nr=180/Math.PI,Rr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qr(t,e,n,r,a,i){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:a,translateY:i,rotate:Math.atan2(e,t)*Nr,skewX:Math.atan(l)*Nr,scaleX:o,scaleY:s}}function Pr(t,e,n,r){function a(t){return t.length?t.pop()+" ":""}return function(i,o){var s=[],l=[];return i=t(i),o=t(o),function(t,r,a,i,o,s){if(t!==a||r!==i){var l=o.push("translate(",null,e,null,n);s.push({i:l-4,x:xr(t,a)},{i:l-2,x:xr(r,i)})}else(a||i)&&o.push("translate("+a+e+i+n)}(i.translateX,i.translateY,o.translateX,o.translateY,s,l),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(a(n)+"rotate(",null,r)-2,x:xr(t,e)})):e&&n.push(a(n)+"rotate("+e+r)}(i.rotate,o.rotate,s,l),function(t,e,n,i){t!==e?i.push({i:n.push(a(n)+"skewX(",null,r)-2,x:xr(t,e)}):e&&n.push(a(n)+"skewX("+e+r)}(i.skewX,o.skewX,s,l),function(t,e,n,r,i,o){if(t!==n||e!==r){var s=i.push(a(i)+"scale(",null,",",null,")");o.push({i:s-4,x:xr(t,n)},{i:s-2,x:xr(e,r)})}else 1===n&&1===r||i.push(a(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,s,l),i=o=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var zr,Fr,$r=Pr((function(t){var e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Rr:qr(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Or=Pr((function(t){return null==t?Rr:(Cr||(Cr=document.createElementNS("http://www.w3.org/2000/svg","g")),Cr.setAttribute("transform",t),(t=Cr.transform.baseVal.consolidate())?qr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Rr)}),", ",")",")"),Ir=0,Hr=0,Dr=0,Ur=0,jr=0,Lr=0,Vr="object"===("undefined"==typeof performance?"undefined":e(performance))&&performance.now?performance:Date,Br="object"===("undefined"==typeof window?"undefined":e(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Kr(){return jr||(Br(Xr),jr=Vr.now()+Lr)}function Xr(){jr=0}function Gr(){this._call=this._time=this._next=null}function Zr(t,e,n){var r=new Gr;return r.restart(t,e,n),r}function Yr(){jr=(Ur=Vr.now())+Lr,Ir=Hr=0;try{!function(){Kr(),++Ir;for(var t,e=zr;e;)(t=jr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ir}()}finally{Ir=0,function(){var t,e,n=zr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:zr=e);Fr=t,Qr(r)}(),jr=0}}function Wr(){var t=Vr.now(),e=t-Ur;e>1e3&&(Lr-=e,Ur=t)}function Qr(t){Ir||(Hr&&(Hr=clearTimeout(Hr)),t-jr>24?(t<1/0&&(Hr=setTimeout(Yr,t-Vr.now()-Lr)),Dr&&(Dr=clearInterval(Dr))):(Dr||(Ur=Vr.now(),Dr=setInterval(Wr,1e3)),Ir=1,Br(Yr)))}function Jr(t,e,n){var r=new Gr;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Gr.prototype=Zr.prototype={constructor:Gr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Kr():+n)+(null==e?0:+e),this._next||Fr===this||(Fr?Fr._next=this:zr=this,Fr=this),this._call=t,this._time=n,Qr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qr())}};var ta=re("start","end","cancel","interrupt"),ea=[];function na(t,e,n,r,a,i){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,a=t.__transition;function i(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(i){var c,u,h,d;if(1!==n.state)return l();for(c in a)if((d=a[c]).name===n.name){if(3===d.state)return Jr(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete a[c]):+c<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete a[c])}if(Jr((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(i))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function s(e){for(var a=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,o=r.length;++i<o;)r[i].call(t,a);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete a[e],a)return;delete t.__transition}a[e]=n,n.timer=Zr(i,0,n.time)}(t,n,{name:e,index:r,group:a,on:ta,tween:ea,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function ra(t,e){var n=ia(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function aa(t,e){var n=ia(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ia(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function oa(t,e){var n,r;return function(){var a=aa(this,t),i=a.tween;if(i!==n)for(var o=0,s=(r=n=i).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}a.tween=r}}function sa(t,e,n){var r,a;if("function"!=typeof n)throw new Error;return function(){var i=aa(this,t),o=i.tween;if(o!==r){a=(r=o).slice();for(var s={name:e,value:n},l=0,c=a.length;l<c;++l)if(a[l].name===e){a[l]=s;break}l===c&&a.push(s)}i.tween=a}}function la(t,e,n){var r=t._id;return t.each((function(){var t=aa(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ia(t,r).value[e]}}function ca(t,e){var n;return("number"==typeof e?xr:e instanceof nr?gr:(n=nr(e))?(e=n,gr):Er)(t,e)}function ua(t){return function(){this.removeAttribute(t)}}function ha(t){return function(){this.removeAttributeNS(t.space,t.local)}}function da(t,e,n){var r,a,i=n+"";return function(){var o=this.getAttribute(t);return o===i?null:o===r?a:a=e(r=o,n)}}function fa(t,e,n){var r,a,i=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?a:a=e(r=o,n)}}function pa(t,e,n){var r,a,i;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttribute(t))===(s=l+"")?null:o===r&&s===a?i:(a=s,i=e(r=o,l));this.removeAttribute(t)}}function va(t,e,n){var r,a,i;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===r&&s===a?i:(a=s,i=e(r=o,l));this.removeAttributeNS(t.space,t.local)}}function ma(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function ba(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ga(t,e){var n,r;function a(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&ba(t,a)),n}return a._value=e,a}function ya(t,e){var n,r;function a(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&ma(t,a)),n}return a._value=e,a}function wa(t,e){return function(){ra(this,t).delay=+e.apply(this,arguments)}}function ka(t,e){return e=+e,function(){ra(this,t).delay=e}}function xa(t,e){return function(){aa(this,t).duration=+e.apply(this,arguments)}}function _a(t,e){return e=+e,function(){aa(this,t).duration=e}}function Sa(t,e){if("function"!=typeof e)throw new Error;return function(){aa(this,t).ease=e}}function Aa(t,e,n){var r,a,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ra:aa;return function(){var o=i(this,t),s=o.on;s!==r&&(a=(r=s).copy()).on(e,n),o.on=a}}var Ea=Sn.prototype.constructor;function Ta(t){return function(){this.style.removeProperty(t)}}function Ma(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Ca(t,e,n){var r,a;function i(){var i=e.apply(this,arguments);return i!==a&&(r=(a=i)&&Ma(t,i,n)),r}return i._value=e,i}function Na(t){return function(e){this.textContent=t.call(this,e)}}function Ra(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Na(r)),e}return r._value=t,r}var qa=0;function Pa(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function za(){return++qa}var Fa=Sn.prototype;Pa.prototype=o({constructor:Pa,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ve(t));for(var r=this._groups,a=r.length,i=new Array(a),o=0;o<a;++o)for(var s,l,c=r[o],u=c.length,h=i[o]=new Array(u),d=0;d<u;++d)(s=c[d])&&(l=t.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,na(h[d],e,n,d,h,ia(s,n)));return new Pa(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ge(t));for(var r=this._groups,a=r.length,i=[],o=[],s=0;s<a;++s)for(var l,c=r[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,f=t.call(l,l.__data__,h,c),p=ia(l,n),v=0,m=f.length;v<m;++v)(d=f[v])&&na(d,e,n,v,f,p);i.push(f),o.push(l)}return new Pa(i,o,e,n)},selectChild:Fa.selectChild,selectChildren:Fa.selectChildren,filter:function(t){"function"!=typeof t&&(t=ye(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o=e[a],s=o.length,l=r[a]=[],c=0;c<s;++c)(i=o[c])&&t.call(i,i.__data__,c,o)&&l.push(i);return new Pa(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,a=n.length,i=Math.min(r,a),o=new Array(r),s=0;s<i;++s)for(var l,c=e[s],u=n[s],h=c.length,d=o[s]=new Array(h),f=0;f<h;++f)(l=c[f]||u[f])&&(d[f]=l);for(;s<r;++s)o[s]=e[s];return new Pa(o,this._parents,this._name,this._id)},selection:function(){return new Ea(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=za(),r=this._groups,a=r.length,i=0;i<a;++i)for(var o,s=r[i],l=s.length,c=0;c<l;++c)if(o=s[c]){var u=ia(o,e);na(o,t,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Pa(r,this._parents,t,n)},call:Fa.call,nodes:Fa.nodes,node:Fa.node,size:Fa.size,empty:Fa.empty,each:Fa.each,on:function(t,e){var n=this._id;return arguments.length<2?ia(this.node(),n).on.on(t):this.each(Aa(n,t,e))},attr:function(t,e){var n=ue(t),r="transform"===n?Or:ca;return this.attrTween(t,"function"==typeof e?(n.local?va:pa)(n,r,la(this,"attr."+t,e)):null==e?(n.local?ha:ua)(n):(n.local?fa:da)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=ue(t);return this.tween(n,(r.local?ga:ya)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?$r:ca;return null==e?this.styleTween(t,function(t,e){var n,r,a;return function(){var i=Le(this,t),o=(this.style.removeProperty(t),Le(this,t));return i===o?null:i===n&&o===r?a:a=e(n=i,r=o)}}(t,r)).on("end.style."+t,Ta(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,a,i;return function(){var o=Le(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=Le(this,t)),o===l?null:o===r&&l===a?i:(a=l,i=e(r=o,s))}}(t,r,la(this,"style."+t,e))).each(function(t,e){var n,r,a,i,o="style."+e,s="end."+o;return function(){var l=aa(this,t),c=l.on,u=null==l.value[o]?i||(i=Ta(e)):void 0;c===n&&a===u||(r=(n=c).copy()).on(s,a=u),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,a,i=n+"";return function(){var o=Le(this,t);return o===i?null:o===r?a:a=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Ca(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(la(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ra(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,a=ia(this.node(),n).tween,i=0,o=a.length;i<o;++i)if((r=a[i]).name===t)return r.value;return null}return this.each((null==e?oa:sa)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?wa:ka)(e,t)):ia(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?xa:_a)(e,t)):ia(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Sa(e,t)):ia(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;aa(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,a=n.size();return new Promise((function(i,o){var s={value:o},l={value:function(){0==--a&&i()}};n.each((function(){var n=aa(this,r),a=n.on;a!==t&&((e=(t=a).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===a&&i()}))}},Symbol.iterator,Fa[Symbol.iterator]);var $a=function(t){return+t};function Oa(t){return t*t*t}function Ia(t){return--t*t*t+1}var Ha={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Da(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error("transition ".concat(e," not found"));return n}Sn.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,a,i=t.__transition,o=!0;if(i){for(a in e=null==e?null:e+"",i)(n=i[a]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[a]):o=!1;o&&delete t.__transition}}(this,t)}))},Sn.prototype.transition=function(t){var e,n;t instanceof Pa?(e=t._id,t=t._name):(e=za(),(n=Ha).time=Kr(),t=null==t?null:t+"");for(var r=this._groups,a=r.length,i=0;i<a;++i)for(var o,s=r[i],l=s.length,c=0;c<l;++c)(o=s[c])&&na(o,t,e,c,s,n||Da(o,e));return new Pa(r,this._parents,t,e)};var Ua=Math.PI,ja=2*Ua,La=1e-6,Va=ja-La;function Ba(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ka(){return new Ba}Ba.prototype=Ka.prototype={constructor:Ba,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,a,i){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(t,e,n,r,a){t=+t,e=+e,n=+n,r=+r,a=+a;var i=this._x1,o=this._y1,s=n-t,l=r-e,c=i-t,u=o-e,h=c*c+u*u;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>La)if(Math.abs(u*s-l*c)>La&&a){var d=n-i,f=r-o,p=s*s+l*l,v=d*d+f*f,m=Math.sqrt(p),b=Math.sqrt(h),g=a*Math.tan((Ua-Math.acos((p+h-v)/(2*m*b)))/2),y=g/b,w=g/m;Math.abs(y-1)>La&&(this._+="L"+(t+y*c)+","+(e+y*u)),this._+="A"+a+","+a+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+w*s)+","+(this._y1=e+w*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,a,i){t=+t,e=+e,i=!!i;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^i,h=i?r-a:a-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>La||Math.abs(this._y1-c)>La)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%ja+ja),h>Va?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>La&&(this._+="A"+n+","+n+",0,"+ +(h>=Ua)+","+u+","+(this._x1=t+n*Math.cos(a))+","+(this._y1=e+n*Math.sin(a))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Xa=Array.prototype.slice;function Ga(t,e){return t-e}var Za=function(t){return function(){return t}};function Ya(t,e){for(var n,r=-1,a=e.length;++r<a;)if(n=Wa(t,e[r]))return n;return 0}function Wa(t,e){for(var n=e[0],r=e[1],a=-1,i=0,o=t.length,s=o-1;i<o;s=i++){var l=t[i],c=l[0],u=l[1],h=t[s],d=h[0],f=h[1];if(Qa(l,h,e))return 0;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(a=-a)}return a}function Qa(t,e,n){var r;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&function(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}(t[r=+(t[0]===e[0])],n[r],e[r])}function Ja(){}var ti=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ei(){var t=1,e=1,n=Ut,r=s;function a(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Ga);else{var r=Nt(t),a=Dt(r[0],r[1],e);e=It(Math.floor(r[0]/a)*a,Math.floor(r[1]/a-1)*a,e)}return e.map((function(e){return i(t,e)}))}function i(n,a){var i=[],s=[];return function(n,r,a){var i,s,l,c,u,h,d=new Array,f=new Array;i=s=-1,c=n[0]>=r,ti[c<<1].forEach(p);for(;++i<t-1;)l=c,c=n[i+1]>=r,ti[l|c<<1].forEach(p);ti[c<<0].forEach(p);for(;++s<e-1;){for(i=-1,c=n[s*t+t]>=r,u=n[s*t]>=r,ti[c<<1|u<<2].forEach(p);++i<t-1;)l=c,c=n[s*t+t+i+1]>=r,h=u,u=n[s*t+i+1]>=r,ti[l|c<<1|u<<2|h<<3].forEach(p);ti[c|u<<3].forEach(p)}i=-1,u=n[s*t]>=r,ti[u<<2].forEach(p);for(;++i<t-1;)h=u,u=n[s*t+i+1]>=r,ti[u<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+i,t[0][1]+s],l=[t[1][0]+i,t[1][1]+s],c=o(r),u=o(l);(e=f[c])?(n=d[u])?(delete f[e.end],delete d[n.start],e===n?(e.ring.push(l),a(e.ring)):d[e.start]=f[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete f[e.end],e.ring.push(l),f[e.end=u]=e):(e=d[u])?(n=f[c])?(delete d[e.start],delete f[n.end],e===n?(e.ring.push(l),a(e.ring)):d[n.start]=f[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=c]=e):d[c]=f[u]={start:c,end:u,ring:[r,l]}}ti[u<<3].forEach(p)}(n,a,(function(t){r(t,n,a),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?i.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=i.length;n<r;++n)if(-1!==Ya((e=i[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:a,coordinates:i}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,a){n.forEach((function(n){var i,o=n[0],s=n[1],l=0|o,c=0|s,u=r[c*t+l];o>0&&o<t&&l===o&&(i=r[c*t+l-1],n[0]=o+(a-i)/(u-i)-.5),s>0&&s<e&&c===s&&(i=r[(c-1)*t+l],n[1]=s+(a-i)/(u-i)-.5)}))}return a.contour=i,a.size=function(n){if(!arguments.length)return[t,e];var r=Math.floor(n[0]),i=Math.floor(n[1]);if(!(r>=0&&i>=0))throw new Error("invalid size");return t=r,e=i,a},a.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Za(Xa.call(t)):Za(t),a):n},a.smooth=function(t){return arguments.length?(r=t?s:Ja,a):r===s},a}function ni(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function ri(t){return(t=ni(Math.abs(t)))?t[1]:NaN}var ai,ii=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function oi(t){if(!(e=ii.exec(t)))throw new Error("invalid format: "+t);var e;return new si({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function si(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function li(t,e){var n=ni(t,e);if(!n)return t+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}oi.prototype=si.prototype,si.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ci={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return li(100*t,e)},r:li,s:function(t,e){var n=ni(t,e);if(!n)return t+"";var r=n[0],a=n[1],i=a-(ai=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+ni(t,Math.max(0,e+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function ui(t){return t}var hi,di,fi,pi=Array.prototype.map,vi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mi(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ui:(e=pi.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var a=t.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(t.substring(a-=s,a+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return i.reverse().join(n)}),a=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?ui:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(pi.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=oi(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,v=t.comma,m=t.precision,b=t.trim,g=t.type;"n"===g?(v=!0,g="g"):ci[g]||(void 0===m&&(m=12),b=!0,g="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var y="$"===d?a:"#"===d&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",w="$"===d?i:/[%p]/.test(g)?l:"",k=ci[g],x=/[defgprs%]/.test(g);function _(t){var a,i,l,d=y,_=w;if("c"===g)_=k(t)+_,t="";else{var S=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:k(Math.abs(t),m),b&&(t=function(t){t:for(var e,n=t.length,r=1,a=-1;r<n;++r)switch(t[r]){case".":a=e=r;break;case"0":0===a&&(a=r),e=r;break;default:if(!+t[r])break t;a>0&&(a=0)}return a>0?t.slice(0,a)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),d=(S?"("===h?h:c:"-"===h||"("===h?"":h)+d,_=("s"===g?vi[8+ai/3]:"")+_+(S&&"("===h?")":""),x)for(a=-1,i=t.length;++a<i;)if(48>(l=t.charCodeAt(a))||l>57){_=(46===l?o+t.slice(a+1):t.slice(a))+_,t=t.slice(0,a);break}}v&&!f&&(t=r(t,1/0));var A=d.length+t.length+_.length,E=A<p?new Array(p-A+1).join(e):"";switch(v&&f&&(t=r(E+t,E.length?p-_.length:1/0),E=""),n){case"<":t=d+t+_+E;break;case"=":t=d+E+t+_;break;case"^":t=E.slice(0,A=E.length>>1)+d+t+_+E.slice(A);break;default:t=E+d+t+_}return s(t)}return m=void 0===m?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),_.toString=function(){return t+""},_}return{format:h,formatPrefix:function(t,e){var n=h(((t=oi(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ri(e)/3))),a=Math.pow(10,-r),i=vi[8+r/3];return function(t){return n(a*t)+i}}}}hi=mi({thousands:",",grouping:[3],currency:["$",""]}),di=hi.format,fi=hi.formatPrefix;var bi=1e-6,gi=Math.PI,yi=2*gi,wi=180/gi,ki=gi/180,xi=Math.abs,_i=Math.cos,Si=Math.sin,Ai=Math.sqrt;function Ei(){}function Ti(t,e){t&&Ci.hasOwnProperty(t.type)&&Ci[t.type](t,e)}var Mi={Feature:function(t,e){Ti(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,a=n.length;++r<a;)Ti(n[r].geometry,e)}},Ci={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ni(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)Ni(n[r],e,0)},Polygon:function(t,e){Ri(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)Ri(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,a=n.length;++r<a;)Ti(n[r],e)}};function Ni(t,e,n){var r,a=-1,i=t.length-n;for(e.lineStart();++a<i;)r=t[a],e.point(r[0],r[1],r[2]);e.lineEnd()}function Ri(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ni(t[n],e,1);e.polygonEnd()}function qi(t,e){t&&Mi.hasOwnProperty(t.type)?Mi[t.type](t,e):Ti(t,e)}function Pi(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function zi(t,e,n,r,a){var i,o,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(function(t,e){return xi(t[0]-e[0])<bi&&xi(t[1]-e[1])<bi}(r,o)){if(!r[2]&&!o[2]){for(a.lineStart(),i=0;i<e;++i)a.point((r=t[i])[0],r[1]);return void a.lineEnd()}o[0]+=2e-6}s.push(n=new Pi(r,t,null,!0)),l.push(n.o=new Pi(r,null,n,!1)),s.push(n=new Pi(o,t,null,!1)),l.push(n.o=new Pi(o,null,n,!0))}})),s.length){for(l.sort(e),Fi(s),Fi(l),i=0,o=l.length;i<o;++i)l[i].e=n=!n;for(var c,u,h=s[0];;){for(var d=h,f=!0;d.v;)if((d=d.n)===h)return;c=d.z,a.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(i=0,o=c.length;i<o;++i)a.point((u=c[i])[0],u[1]);else r(d.x,d.n.x,1,a);d=d.n}else{if(f)for(c=d.p.z,i=c.length-1;i>=0;--i)a.point((u=c[i])[0],u[1]);else r(d.x,d.p.x,-1,a);d=d.p}c=(d=d.o).z,f=!f}while(!d.v);a.lineEnd()}}}function Fi(t){if(e=t.length){for(var e,n,r=0,a=t[0];++r<e;)a.n=n=t[r],n.p=a,a=n;a.n=n=t[0],n.p=a}}var $i=1e9,Oi=-$i;function Ii(t,e,n,r){function a(a,i){return t<=a&&a<=n&&e<=i&&i<=r}function i(a,i,s,c){var u=0,h=0;if(null==a||(u=o(a,s))!==(h=o(i,s))||l(a,i)<0^s>0)do{c.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==h);else c.point(i[0],i[1])}function o(r,a){return xi(r[0]-t)<bi?a>0?0:3:xi(r[0]-n)<bi?a>0?2:1:xi(r[1]-e)<bi?a>0?1:0:a>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var l,c,u,h,d,f,p,v,m,b,g,y=o,w=function(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Ei,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}(),k={point:x,lineStart:function(){k.point=_,c&&c.push(u=[]);b=!0,m=!1,p=v=NaN},lineEnd:function(){l&&(_(h,d),f&&m&&w.rejoin(),l.push(w.result()));k.point=x,m&&y.lineEnd()},polygonStart:function(){y=w,l=[],c=[],g=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,a=c.length;n<a;++n)for(var i,o,s=c[n],l=1,u=s.length,h=s[0],d=h[0],f=h[1];l<u;++l)i=d,o=f,d=(h=s[l])[0],f=h[1],o<=r?f>r&&(d-i)*(r-o)>(f-o)*(t-i)&&++e:f<=r&&(d-i)*(r-o)<(f-o)*(t-i)&&--e;return e}(),n=g&&e,a=(h=l,l=Array.from(Vt(h))).length;var h;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),i(null,null,1,o),o.lineEnd()),a&&zi(l,s,e,i,o),o.polygonEnd());y=o,l=c=u=null}};function x(t,e){a(t,e)&&y.point(t,e)}function _(i,o){var s=a(i,o);if(c&&u.push([i,o]),b)h=i,d=o,f=s,b=!1,s&&(y.lineStart(),y.point(i,o));else if(s&&m)y.point(i,o);else{var l=[p=Math.max(Oi,Math.min($i,p)),v=Math.max(Oi,Math.min($i,v))],w=[i=Math.max(Oi,Math.min($i,i)),o=Math.max(Oi,Math.min($i,o))];!function(t,e,n,r,a,i){var o,s=t[0],l=t[1],c=0,u=1,h=e[0]-s,d=e[1]-l;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>c&&(c=o)}if(o=a-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<u&&(u=o)}if(o=r-l,d||!(o>0)){if(o/=d,d<0){if(o<c)return;o<u&&(u=o)}else if(d>0){if(o>u)return;o>c&&(c=o)}if(o=i-l,d||!(o<0)){if(o/=d,d<0){if(o>u)return;o>c&&(c=o)}else if(d>0){if(o<c)return;o<u&&(u=o)}return c>0&&(t[0]=s+c*h,t[1]=l+c*d),u<1&&(e[0]=s+u*h,e[1]=l+u*d),!0}}}}}(l,w,t,e,n,r)?s&&(y.lineStart(),y.point(i,o),g=!1):(m||(y.lineStart(),y.point(l[0],l[1])),y.point(w[0],w[1]),s||y.lineEnd(),g=!1)}p=i,v=o,m=s}return k}}var Hi,Di,Ui,ji,Li=function(t){return t},Vi=new Rt,Bi=new Rt,Ki={point:Ei,lineStart:Ei,lineEnd:Ei,polygonStart:function(){Ki.lineStart=Xi,Ki.lineEnd=Yi},polygonEnd:function(){Ki.lineStart=Ki.lineEnd=Ki.point=Ei,Vi.add(xi(Bi)),Bi=new Rt},result:function(){var t=Vi/2;return Vi=new Rt,t}};function Xi(){Ki.point=Gi}function Gi(t,e){Ki.point=Zi,Hi=Ui=t,Di=ji=e}function Zi(t,e){Bi.add(ji*t-Ui*e),Ui=t,ji=e}function Yi(){Zi(Hi,Di)}var Wi=Ki,Qi=1/0,Ji=Qi,to=-Qi,eo=to,no={point:function(t,e){t<Qi&&(Qi=t);t>to&&(to=t);e<Ji&&(Ji=e);e>eo&&(eo=e)},lineStart:Ei,lineEnd:Ei,polygonStart:Ei,polygonEnd:Ei,result:function(){var t=[[Qi,Ji],[to,eo]];return to=eo=-(Ji=Qi=1/0),t}};var ro,ao,io,oo,so=no,lo=0,co=0,uo=0,ho=0,fo=0,po=0,vo=0,mo=0,bo=0,go={point:yo,lineStart:wo,lineEnd:_o,polygonStart:function(){go.lineStart=So,go.lineEnd=Ao},polygonEnd:function(){go.point=yo,go.lineStart=wo,go.lineEnd=_o},result:function(){var t=bo?[vo/bo,mo/bo]:po?[ho/po,fo/po]:uo?[lo/uo,co/uo]:[NaN,NaN];return lo=co=uo=ho=fo=po=vo=mo=bo=0,t}};function yo(t,e){lo+=t,co+=e,++uo}function wo(){go.point=ko}function ko(t,e){go.point=xo,yo(io=t,oo=e)}function xo(t,e){var n=t-io,r=e-oo,a=Ai(n*n+r*r);ho+=a*(io+t)/2,fo+=a*(oo+e)/2,po+=a,yo(io=t,oo=e)}function _o(){go.point=yo}function So(){go.point=Eo}function Ao(){To(ro,ao)}function Eo(t,e){go.point=To,yo(ro=io=t,ao=oo=e)}function To(t,e){var n=t-io,r=e-oo,a=Ai(n*n+r*r);ho+=a*(io+t)/2,fo+=a*(oo+e)/2,po+=a,vo+=(a=oo*t-io*e)*(io+t),mo+=a*(oo+e),bo+=3*a,yo(io=t,oo=e)}var Mo=go;function Co(t){this._context=t}Co.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,yi)}},result:Ei};var No,Ro,qo,Po,zo,Fo=new Rt,$o={point:Ei,lineStart:function(){$o.point=Oo},lineEnd:function(){No&&Io(Ro,qo),$o.point=Ei},polygonStart:function(){No=!0},polygonEnd:function(){No=null},result:function(){var t=+Fo;return Fo=new Rt,t}};function Oo(t,e){$o.point=Io,Ro=Po=t,qo=zo=e}function Io(t,e){Po-=t,zo-=e,Fo.add(Ai(Po*Po+zo*zo)),Po=t,zo=e}var Ho=$o;function Do(){this._string=[]}function Uo(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function jo(t,e){var n,r,a=4.5;function i(t){return t&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),qi(t,n(r))),r.result()}return i.area=function(t){return qi(t,n(Wi)),Wi.result()},i.measure=function(t){return qi(t,n(Ho)),Ho.result()},i.bounds=function(t){return qi(t,n(so)),so.result()},i.centroid=function(t){return qi(t,n(Mo)),Mo.result()},i.projection=function(e){return arguments.length?(n=null==e?(t=null,Li):(t=e).stream,i):t},i.context=function(t){return arguments.length?(r=null==t?(e=null,new Do):new Co(e=t),"function"!=typeof a&&r.pointRadius(a),i):e},i.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(r.pointRadius(+t),+t),i):a},i.projection(t).context(e)}function Lo(){}function Vo(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),qi(n,t.stream(so)),e(so.result()),null!=r&&t.clipExtent(r),t}function Bo(t,e,n){return Vo(t,(function(n){var r=e[1][0]-e[0][0],a=e[1][1]-e[0][1],i=Math.min(r/(n[1][0]-n[0][0]),a/(n[1][1]-n[0][1])),o=+e[0][0]+(r-i*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(a-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,s])}),n)}function Ko(){var t,e,n,r,a,i,o,s,l=1,c=0,u=0,h=1,d=1,f=0,p=null,v=1,m=1,b=(s={point:function(t,e){var n=w([t,e]);this.stream.point(n[0],n[1])}},function(t){var e=new Lo;for(var n in s)e[n]=s[n];return e.stream=t,e}),g=Li;function y(){return v=l*h,m=l*d,i=o=null,w}function w(n){var r=n[0]*v,a=n[1]*m;if(f){var i=a*t-r*e;r=r*t+a*e,a=i}return[r+c,a+u]}return w.invert=function(n){var r=n[0]-c,a=n[1]-u;if(f){var i=a*t+r*e;r=r*t-a*e,a=i}return[r/v,a/m]},w.stream=function(t){return i&&o===t?i:i=b(g(o=t))},w.postclip=function(t){return arguments.length?(g=t,p=n=r=a=null,y()):g},w.clipExtent=function(t){return arguments.length?(g=null==t?(p=n=r=a=null,Li):Ii(p=+t[0][0],n=+t[0][1],r=+t[1][0],a=+t[1][1]),y()):null==p?null:[[p,n],[r,a]]},w.scale=function(t){return arguments.length?(l=+t,y()):l},w.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],y()):[c,u]},w.angle=function(n){return arguments.length?(e=Si(f=n%360*ki),t=_i(f),y()):f*wi},w.reflectX=function(t){return arguments.length?(h=t?-1:1,y()):h<0},w.reflectY=function(t){return arguments.length?(d=t?-1:1,y()):d<0},w.fitExtent=function(t,e){return Bo(w,t,e)},w.fitSize=function(t,e){return function(t,e,n){return Bo(t,[[0,0],e],n)}(w,t,e)},w.fitWidth=function(t,e){return function(t,e,n){return Vo(t,(function(n){var r=+e,a=r/(n[1][0]-n[0][0]),i=(r-a*(n[1][0]+n[0][0]))/2,o=-a*n[0][1];t.scale(150*a).translate([i,o])}),n)}(w,t,e)},w.fitHeight=function(t,e){return function(t,e,n){return Vo(t,(function(n){var r=+e,a=r/(n[1][1]-n[0][1]),i=-a*n[0][0],o=(r-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([i,o])}),n)}(w,t,e)},w}function Xo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Go(t){return+t}Do.prototype={_radius:4.5,_circle:Uo(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Uo(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Lo.prototype={constructor:Lo,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Zo=[0,1];function Yo(t){return t}function Wo(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Qo(t,e,n){var r=t[0],a=t[1],i=e[0],o=e[1];return a<r?(r=Wo(a,r),i=n(o,i)):(r=Wo(r,a),i=n(i,o)),function(t){return i(r(t))}}function Jo(t,e,n){var r=Math.min(t.length,e.length)-1,a=new Array(r),i=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)a[o]=Wo(t[o],t[o+1]),i[o]=n(e[o],e[o+1]);return function(e){var n=Ct(t,e,1,r)-1;return i[n](a[n](e))}}function ts(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function es(){var t,e,n,r,a,i,o=Zo,s=Zo,l=Tr,c=Yo;function u(){var t=Math.min(o.length,s.length);return c!==Yo&&(c=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(o[0],o[t-1])),r=t>2?Jo:Qo,a=i=null,h}function h(e){return null==e||isNaN(e=+e)?n:(a||(a=r(o.map(t),s,l)))(t(c(e)))}return h.invert=function(n){return c(e((i||(i=r(s,o.map(t),xr)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,Go),u()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),u()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),l=Mr,u()},h.clamp=function(t){return arguments.length?(c=!!t||Yo,u()):c!==Yo},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}function ns(){return es()(Yo,Yo)}function rs(t,e,n,r){var a,i=Dt(t,e,n);switch((r=oi(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(a=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ri(e)/3)))-ri(Math.abs(t)))}(i,o))||(r.precision=a),fi(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ri(e)-ri(t))+1}(i,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(t){return Math.max(0,-ri(Math.abs(t)))}(i))||(r.precision=a-2*("%"===r.type))}return di(r)}function as(t){var e=t.domain;return t.ticks=function(t){var n=e();return It(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return rs(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,a,i=e(),o=0,s=i.length-1,l=i[o],c=i[s],u=10;for(c<l&&(a=l,l=c,c=a,a=o,o=s,s=a);u-- >0;){if((a=Ht(l,c,n))===r)return i[o]=l,i[s]=c,e(i);if(a>0)l=Math.floor(l/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;l=Math.ceil(l*a)/a,c=Math.floor(c*a)/a}r=a}return t},t}function is(){var t=ns();return t.copy=function(){return ts(t,is())},Xo.apply(t,arguments),as(t)}var os,ss,ls,cs,us,hs,ds,fs,ps,vs=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");function ms(t){return function(){return t}}function bs(t){this._context=t}function gs(t){return new bs(t)}function ys(t){return t[0]}function ws(t){return t[1]}function ks(t,n){var r=ms(!0),a=null,i=gs,o=null;function s(s){var l,c,u,h=(s=function(t){return"object"===e(t)&&"length"in t?t:Array.from(t)}(s)).length,d=!1;for(null==a&&(o=i(u=Ka())),l=0;l<=h;++l)!(l<h&&r(c=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+t(c,l,s),+n(c,l,s));if(u)return o=null,u+""||null}return t="function"==typeof t?t:void 0===t?ys:ms(t),n="function"==typeof n?n:void 0===n?ws:ms(n),s.x=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),s):t},s.y=function(t){return arguments.length?(n="function"==typeof t?t:ms(+t),s):n},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:ms(!!t),s):r},s.curve=function(t){return arguments.length?(i=t,null!=a&&(o=i(a)),s):i},s.context=function(t){return arguments.length?(null==t?a=o=null:o=i(a=t),s):a},s}bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var xs,_s,Ss=function(t){s(n,t);var e=v(n);function n(){var t;return r(this,n),(t=e.call(this)).uniqueId="decidables-".concat(n.uniqueId),t}return i(n,[{key:"getComputedStyleValue",value:function(t){return window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,t):getComputedStyle(this).getPropertyValue(t)}},{key:"firstUpdated",value:function(t){b(l(n.prototype),"firstUpdated",this).call(this,t),An(this.renderRoot.host).classed("keyboard",!0).on("mousemove.keyboard touchstart.keyboard",(function(t){An(t.currentTarget.renderRoot.host).classed("keyboard",!1).on("mousemove.keyboard touchstart.keyboard",null)})).on("keydown.keyboard",(function(t){An(t.currentTarget.renderRoot.host).classed("keyboard",!0).on("keydown.keyboard mousemove.keyboard touchstart.keyboard",null)}))}}],[{key:"uniqueId",get:function(){return n.ID+=1,n.ID}},{key:"greys",get:function(){var t="#999999",e={white:"#ffffff"};return e.light75=gr(t,"#ffffff")(.75),e.light50=gr(t,"#ffffff")(.5),e.light25=gr(t,"#ffffff")(.25),e.grey=t,e.dark25=gr(t,"#000000")(.25),e.dark50=gr(t,"#000000")(.5),e.dark75=gr(t,"#000000")(.75),e.black="#000000",e}},{key:"shadows",get:function(){return{elevations:[0,2,4,8,16],baselineColor:"#000000",baselineColorString:"0, 0, 0",inverseBaselineColor:"#FFFFFF",inverseBaselineColorString:"255, 255, 255",opacityUmbra:.2,opacityPenumbra:.14,opacityAmbient:.12,opacityBoost:.2,mapUmbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:3,b:1,s:-2},4:{x:0,y:2,b:4,s:-1},8:{x:0,y:5,b:5,s:-3},16:{x:0,y:8,b:10,s:-5}},mapPenumbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:2,b:2,s:0},4:{x:0,y:4,b:5,s:0},8:{x:0,y:8,b:10,s:1},16:{x:0,y:16,b:24,s:2}},mapAmbient:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:1,b:5,s:0},4:{x:0,y:1,b:10,s:0},8:{x:0,y:3,b:14,s:2},16:{x:0,y:6,b:30,s:5}}}}},{key:"cssBoxShadow",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.shadows.opacityUmbra+this.shadows.opacityBoost,a=this.shadows.opacityPenumbra+this.shadows.opacityBoost,i=this.shadows.opacityAmbient+this.shadows.opacityBoost,o=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(r,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(r,")"),s=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(a,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(a,")"),l=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(i,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(i,")"),c=this.shadows.mapUmbra[t],u=this.shadows.mapPenumbra[t],h=this.shadows.mapAmbient[t],d=e?"".concat(-c.y,"px ").concat(c.y/2,"px ").concat(c.b,"px ").concat(c.s,"px"):"".concat(c.y/2,"px ").concat(c.y,"px ").concat(c.b,"px ").concat(c.s,"px"),f=e?"".concat(-u.y,"px ").concat(u.y/2,"px ").concat(u.b,"px ").concat(u.s,"px"):"".concat(u.y/2,"px ").concat(u.y,"px ").concat(u.b,"px ").concat(u.s,"px"),p=e?"".concat(-h.y,"px ").concat(h.y/2,"px ").concat(h.b,"px ").concat(h.s,"px"):"".concat(h.y/2,"px ").concat(h.y,"px ").concat(h.b,"px ").concat(h.s,"px");return"".concat(d," ").concat(o,", ").concat(f," ").concat(s,", ").concat(p," ").concat(l)}},{key:"svgFilters",get:function(){var t=n.shadows,e=t.elevations.map((function(e){return it(os||(os=g(["\n <filter id=",' x="-250%" y="-250%" width="600%" height="600%">\n <feComponentTransfer in="SourceAlpha" result="solid">\n <feFuncA type="table" tableValues="0 1 1"/>\n </feComponentTransfer>\n <feOffset in="solid" result="offU" dx='," dy=",' />\n <feOffset in="solid" result="offP" dx='," dy=",' />\n <feOffset in="solid" result="offA" dx='," dy="," />\n ","\n ","\n ","\n <feGaussianBlur in=",' result="blurU" stdDeviation='," />\n <feGaussianBlur in=",' result="blurP" stdDeviation='," />\n <feGaussianBlur in=",' result="blurA" stdDeviation=',' />\n <feFlood in="SourceGraphic" result="opU" flood-color='," flood-opacity=",' />\n <feFlood in="SourceGraphic" result="opP" flood-color='," flood-opacity=",' />\n <feFlood in="SourceGraphic" result="opA" flood-color='," flood-opacity=",' />\n <feComposite in="opU" in2="blurU" result="shU" operator="in" />\n <feComposite in="opP" in2="blurP" result="shP" operator="in" />\n <feComposite in="opA" in2="blurA" result="shA" operator="in" />\n \x3c!-- HACK Edge: Using a dynamic value for erode radius stops Edge from corrupting the "radius" value! --\x3e\n <feMorphology in="solid" result="smaller" operator="erode" radius=',' />\n <feComposite in="shU" in2="smaller" result="finalU" operator="out" />\n <feComposite in="shP" in2="smaller" result="finalP" operator="out" />\n <feComposite in="shA" in2="smaller" result="finalA" operator="out" />\n <feMerge>\n <feMergeNode in="finalU" />\n <feMergeNode in="finalP" />\n <feMergeNode in="finalA" />\n <feMergeNode in="SourceGraphic" />\n </feMerge>\n </filter>'])),"shadow-".concat(e),t.mapUmbra[e].y/2,t.mapUmbra[e].y,t.mapPenumbra[e].y/2,t.mapPenumbra[e].y,t.mapAmbient[e].y/2,t.mapAmbient[e].y,0===t.mapUmbra[e].s?it(ss||(ss=g([""]))):it(ls||(ls=g(['<feMorphology in="offU" result="spreadU" operator='," radius="," />"])),t.mapUmbra[e].s>0?"dilate":"erode",Math.abs(t.mapUmbra[e].s)),0===t.mapPenumbra[e].s?it(cs||(cs=g([""]))):it(us||(us=g(['<feMorphology in="offP" result="spreadP" operator='," radius="," />"])),t.mapPenumbra[e].s>0?"dilate":"erode",Math.abs(t.mapPenumbra[e].s)),0===t.mapAmbient[e].s?it(hs||(hs=g([""]))):it(ds||(ds=g(['<feMorphology in="offA" result="spreadA" operator='," radius="," />"])),t.mapAmbient[e].s>0?"dilate":"erode",Math.abs(t.mapAmbient[e].s)),0===t.mapUmbra[e].s?"offU":"spreadU",t.mapUmbra[e].b/2,0===t.mapPenumbra[e].s?"offP":"spreadP",t.mapPenumbra[e].b/2,0===t.mapAmbient[e].s?"offA":"spreadA",t.mapAmbient[e].b/2,t.baselineColor,t.opacityUmbra+t.opacityBoost,t.baselineColor,t.opacityPenumbra+t.opacityBoost,t.baselineColor,t.opacityAmbient+t.opacityBoost,1)}));return it(fs||(fs=g(['\n <svg class="defs">\n <defs>\n ',"\n </defs>\n </svg>\n "])),e)}},{key:"styles",get:function(){return R(ps||(ps=g(["\n :host {\n ---shadow-0: var(--shadow-0, ",");\n ---shadow-2: var(--shadow-2, ",");\n ---shadow-4: var(--shadow-4, ",");\n ---shadow-8: var(--shadow-8, ",");\n\n ---color-background: var(--color-background, ",");\n ---color-border: var(--color-border, ",");\n ---color-text: var(--color-text, ",");\n ---color-text-inverse: var(--color-text-inverse, ",");\n ---color-link: var(--color-link, ",");\n ---color-element-background: var(--color-element-background, ",");\n ---color-element-disabled: var(--color-element-disabled, ",");\n ---color-element-enabled: var(--color-element-enabled, ",");\n ---color-element-selected: var(--color-element-selected, ",");\n ---color-element-border: var(--color-element-border, ",");\n ---color-element-emphasis: var(--color-element-emphasis, ",');\n\n ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);\n ---font-family-math: var(--font-family-math, "Source Serif", serif);\n\n ---transition-duration: var(--transition-duration, 500ms);\n\n font-family: var(---font-family-base);\n }\n\n :host,\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: border-box;\n }\n\n .math-greek {\n font-family: var(---font-family-math);\n font-style: normal;\n }\n\n .math-num {\n font-family: var(---font-family-base);\n font-style: normal;\n }\n\n .math-var {\n font-family: var(---font-family-math);\n font-style: italic;\n }\n\n .defs {\n display: block;\n\n width: 0;\n height: 0;\n }\n '])),N(this.cssBoxShadow(0)),N(this.cssBoxShadow(2)),N(this.cssBoxShadow(4)),N(this.cssBoxShadow(8)),N(this.greys.white),N(this.greys.light75),N(this.greys.dark75),N(this.greys.white),N(this.greys.dark25),N(this.greys.light75),N(this.greys.light50),N(this.greys.grey),N(this.greys.dark25),N(this.greys.dark50),N(this.greys.dark75))}}]),n}(St);Ss.ID=0;var As=function(t){s(n,t);var e=v(n);function n(){var t;return r(this,n),(t=e.call(this)).disabled=!1,t}return i(n,[{key:"render",value:function(){return at(xs||(xs=g(["\n <button ?disabled=",">\n <slot></slot>\n </button>\n "])),this.disabled)}}],[{key:"properties",get:function(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0}}}},{key:"styles",get:function(){return[b(l(n),"styles",this),R(_s||(_s=g(["\n :host {\n margin: 0.25rem;\n }\n\n button {\n width: 100%;\n height: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n\n border: 0;\n border-radius: 0.25rem;\n outline: none;\n }\n\n button:disabled {\n background-color: var(--decidables-button-background-color, var(---color-element-disabled));\n outline: none;\n box-shadow: none;\n }\n\n button:enabled {\n cursor: pointer;\n\n background-color: var(--decidables-button-background-color, var(---color-element-enabled));\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n button:enabled:hover {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n button:enabled:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(.keyboard) button:enabled:focus {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) button:enabled:focus:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))]}}]),n}(Ss);customElements.define("decidables-button",As);
7
7
  /**
8
8
  * @license
9
9
  * Copyright 2018 Google LLC