UNPKG

node-red-contrib-uibuilder

Version:

Easily create data-driven web UI's for Node-RED. Single- & Multi-page. Multiple UI's. Work with existing web development workflows or mix and match with no-code/low-code features.

1 lines 3.34 MB
(()=>{var MZ=Object.freeze,lL=Object.defineProperty;var j7e=(t,e,r)=>e in t?lL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var At=(t,e)=>()=>(t&&(e=t(t=0)),e);var Sr=(t,e)=>{for(var r in e)lL(t,r,{get:e[r],enumerable:!0})};var Mr=(t,e,r)=>j7e(t,typeof e!="symbol"?e+"":e,r);var yn=(t,e)=>MZ(lL(t,"raw",{value:MZ(e||t.slice())}));var K7e,Gk,Z7e,NZ,Q7e,J7e,l,Aa,qu,e8e,qi,Et=At(()=>{K7e=Object.create,Gk=Object.defineProperty,Z7e=Object.getOwnPropertyDescriptor,NZ=Object.getOwnPropertyNames,Q7e=Object.getPrototypeOf,J7e=Object.prototype.hasOwnProperty,l=(t,e)=>Gk(t,"name",{value:e,configurable:!0}),Aa=(t,e)=>function(){return e||(0,t[NZ(t)[0]])((e={exports:{}}).exports,e),e.exports},qu=(t,e)=>{for(var r in e)Gk(t,r,{get:e[r],enumerable:!0})},e8e=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of NZ(e))!J7e.call(t,a)&&a!==r&&Gk(t,a,{get:()=>e[a],enumerable:!(i=Z7e(e,a))||i.enumerable});return t},qi=(t,e,r)=>(r=t!=null?K7e(Q7e(t)):{},e8e(e||!t||!t.__esModule?Gk(r,"default",{value:t,enumerable:!0}):r,t))});function ZL(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function QL(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function kb(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function uQ(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function v3(t){let e,r,i;t.length!==2?(e=kb,r=l((o,u)=>kb(t(o),u),"compare2"),i=l((o,u)=>t(o)-u,"delta")):(e=t===kb||t===uQ?t:hQ,r=t,i=t);function a(o,u,h=0,d=o.length){if(h<d){if(e(u,u)!==0)return d;do{let f=h+d>>>1;r(o[f],u)<0?h=f+1:d=f}while(h<d)}return h}l(a,"left");function n(o,u,h=0,d=o.length){if(h<d){if(e(u,u)!==0)return d;do{let f=h+d>>>1;r(o[f],u)<=0?h=f+1:d=f}while(h<d)}return h}l(n,"right");function s(o,u,h=0,d=o.length){let f=a(o,u,h,d-1);return f>h&&i(o[f-1],u)>-i(o[f],u)?f-1:f}return l(s,"center"),{left:a,center:s,right:n}}function hQ(){return 0}function dQ(t){return t===null?NaN:+t}function gL({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):r}function pQ({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function gQ({_intern:t,_key:e},r){let i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function mQ(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Sb(t,e,r){let i=(e-t)/Math.max(0,r),a=Math.floor(Math.log10(i)),n=i/Math.pow(10,a),s=n>=a8e?10:n>=n8e?5:n>=s8e?2:1,o,u,h;return a<0?(h=Math.pow(10,-a)/s,o=Math.round(t*h),u=Math.round(e*h),o/h<t&&++o,u/h>e&&--u,h=-h):(h=Math.pow(10,a)*s,o=Math.round(t/h),u=Math.round(e/h),o*h<t&&++o,u*h>e&&--u),u<o&&.5<=r&&r<2?Sb(t,e,r*2):[o,u,h]}function yQ(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];let i=e<t,[a,n,s]=i?Sb(e,t,r):Sb(t,e,r);if(!(n>=a))return[];let o=n-a+1,u=new Array(o);if(i)if(s<0)for(let h=0;h<o;++h)u[h]=(n-h)/-s;else for(let h=0;h<o;++h)u[h]=(n-h)*s;else if(s<0)for(let h=0;h<o;++h)u[h]=(a+h)/-s;else for(let h=0;h<o;++h)u[h]=(a+h)*s;return u}function n3(t,e,r){return e=+e,t=+t,r=+r,Sb(t,e,r)[2]}function s3(t,e,r){e=+e,t=+t,r=+r;let i=e<t,a=i?n3(e,t,r):n3(t,e,r);return(i?-1:1)*(a<0?1/-a:a)}function vQ(t,e,r){t=+t,e=+e,r=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+r;for(var i=-1,a=Math.max(0,Math.ceil((e-t)/r))|0,n=new Array(a);++i<a;)n[i]=t+i*r;return n}function bQ(t){return t}function xQ(t){return"translate("+t+",0)"}function TQ(t){return"translate(0,"+t+")"}function CQ(t){return e=>+t(e)}function kQ(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function wQ(){return!this.__axis}function JL(t,e){var r=[],i=null,a=null,n=6,s=6,o=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=t===Yk||t===Wk?-1:1,d=t===Wk||t===cL?"x":"y",f=t===Yk||t===mL?xQ:TQ;function p(g){var m=i==null?e.ticks?e.ticks.apply(e,r):e.domain():i,y=a==null?e.tickFormat?e.tickFormat.apply(e,r):bQ:a,v=Math.max(n,0)+o,b=e.range(),T=+b[0]+u,x=+b[b.length-1]+u,C=(e.bandwidth?kQ:CQ)(e.copy(),u),w=g.selection?g.selection():g,S=w.selectAll(".domain").data([null]),k=w.selectAll(".tick").data(m,e).order(),_=k.exit(),L=k.enter().append("g").attr("class","tick"),I=k.select("line"),N=k.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),I=I.merge(L.append("line").attr("stroke","currentColor").attr(d+"2",h*n)),N=N.merge(L.append("text").attr("fill","currentColor").attr(d,h*v).attr("dy",t===Yk?"0em":t===mL?"0.71em":"0.32em")),g!==w&&(S=S.transition(g),k=k.transition(g),I=I.transition(g),N=N.transition(g),_=_.transition(g).attr("opacity",PZ).attr("transform",function($){return isFinite($=C($))?f($+u):this.getAttribute("transform")}),L.attr("opacity",PZ).attr("transform",function($){var P=this.parentNode.__axis;return f((P&&isFinite(P=P($))?P:C($))+u)})),_.remove(),S.attr("d",t===Wk||t===cL?s?"M"+h*s+","+T+"H"+u+"V"+x+"H"+h*s:"M"+u+","+T+"V"+x:s?"M"+T+","+h*s+"V"+u+"H"+x+"V"+h*s:"M"+T+","+u+"H"+x),k.attr("opacity",1).attr("transform",function($){return f(C($)+u)}),I.attr(d+"2",h*n),N.attr(d,h*v).text(y),w.filter(wQ).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===cL?"start":t===Wk?"end":"middle"),w.each(function(){this.__axis=C})}return l(p,"axis"),p.scale=function(g){return arguments.length?(e=g,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(g){return arguments.length?(r=g==null?[]:Array.from(g),p):r.slice()},p.tickValues=function(g){return arguments.length?(i=g==null?null:Array.from(g),p):i&&i.slice()},p.tickFormat=function(g){return arguments.length?(a=g,p):a},p.tickSize=function(g){return arguments.length?(n=s=+g,p):n},p.tickSizeInner=function(g){return arguments.length?(n=+g,p):n},p.tickSizeOuter=function(g){return arguments.length?(s=+g,p):s},p.tickPadding=function(g){return arguments.length?(o=+g,p):o},p.offset=function(g){return arguments.length?(u=+g,p):u},p}function eR(t){return JL(Yk,t)}function tR(t){return JL(mL,t)}function SQ(){}function b3(t){return t==null?SQ:function(){return this.querySelector(t)}}function EQ(t){typeof t!="function"&&(t=b3(t));for(var e=this._groups,r=e.length,i=new Array(r),a=0;a<r;++a)for(var n=e[a],s=n.length,o=i[a]=new Array(s),u,h,d=0;d<s;++d)(u=n[d])&&(h=t.call(u,u.__data__,d,n))&&("__data__"in u&&(h.__data__=u.__data__),o[d]=h);return new Un(i,this._parents)}function _Q(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function AQ(){return[]}function rR(t){return t==null?AQ:function(){return this.querySelectorAll(t)}}function LQ(t){return function(){return _Q(t.apply(this,arguments))}}function RQ(t){typeof t=="function"?t=LQ(t):t=rR(t);for(var e=this._groups,r=e.length,i=[],a=[],n=0;n<r;++n)for(var s=e[n],o=s.length,u,h=0;h<o;++h)(u=s[h])&&(i.push(t.call(u,u.__data__,h,s)),a.push(u));return new Un(i,a)}function iR(t){return function(){return this.matches(t)}}function aR(t){return function(e){return e.matches(t)}}function DQ(t){return function(){return o8e.call(this.children,t)}}function IQ(){return this.firstElementChild}function MQ(t){return this.select(t==null?IQ:DQ(typeof t=="function"?t:aR(t)))}function NQ(){return Array.from(this.children)}function OQ(t){return function(){return l8e.call(this.children,t)}}function PQ(t){return this.selectAll(t==null?NQ:OQ(typeof t=="function"?t:aR(t)))}function BQ(t){typeof t!="function"&&(t=iR(t));for(var e=this._groups,r=e.length,i=new Array(r),a=0;a<r;++a)for(var n=e[a],s=n.length,o=i[a]=[],u,h=0;h<s;++h)(u=n[h])&&t.call(u,u.__data__,h,n)&&o.push(u);return new Un(i,this._parents)}function nR(t){return new Array(t.length)}function FQ(){return new Un(this._enter||this._groups.map(nR),this._parents)}function Eb(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function $Q(t){return function(){return t}}function zQ(t,e,r,i,a,n){for(var s=0,o,u=e.length,h=n.length;s<h;++s)(o=e[s])?(o.__data__=n[s],i[s]=o):r[s]=new Eb(t,n[s]);for(;s<u;++s)(o=e[s])&&(a[s]=o)}function qQ(t,e,r,i,a,n,s){var o,u,h=new Map,d=e.length,f=n.length,p=new Array(d),g;for(o=0;o<d;++o)(u=e[o])&&(p[o]=g=s.call(u,u.__data__,o,e)+"",h.has(g)?a[o]=u:h.set(g,u));for(o=0;o<f;++o)g=s.call(t,n[o],o,n)+"",(u=h.get(g))?(i[o]=u,u.__data__=n[o],h.delete(g)):r[o]=new Eb(t,n[o]);for(o=0;o<d;++o)(u=e[o])&&h.get(p[o])===u&&(a[o]=u)}function VQ(t){return t.__data__}function GQ(t,e){if(!arguments.length)return Array.from(this,VQ);var r=e?qQ:zQ,i=this._parents,a=this._groups;typeof t!="function"&&(t=$Q(t));for(var n=a.length,s=new Array(n),o=new Array(n),u=new Array(n),h=0;h<n;++h){var d=i[h],f=a[h],p=f.length,g=WQ(t.call(d,d&&d.__data__,h,i)),m=g.length,y=o[h]=new Array(m),v=s[h]=new Array(m),b=u[h]=new Array(p);r(d,f,y,v,b,g,e);for(var T=0,x=0,C,w;T<m;++T)if(C=y[T]){for(T>=x&&(x=T+1);!(w=v[x])&&++x<m;);C._next=w||null}}return s=new Un(s,i),s._enter=o,s._exit=u,s}function WQ(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function UQ(){return new Un(this._exit||this._groups.map(nR),this._parents)}function HQ(t,e,r){var i=this.enter(),a=this,n=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(a=e(a),a&&(a=a.selection())),r==null?n.remove():r(n),i&&a?i.merge(a).order():a}function YQ(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,a=r.length,n=i.length,s=Math.min(a,n),o=new Array(a),u=0;u<s;++u)for(var h=r[u],d=i[u],f=h.length,p=o[u]=new Array(f),g,m=0;m<f;++m)(g=h[m]||d[m])&&(p[m]=g);for(;u<a;++u)o[u]=r[u];return new Un(o,this._parents)}function XQ(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],a=i.length-1,n=i[a],s;--a>=0;)(s=i[a])&&(n&&s.compareDocumentPosition(n)^4&&n.parentNode.insertBefore(s,n),n=s);return this}function jQ(t){t||(t=KQ);function e(f,p){return f&&p?t(f.__data__,p.__data__):!f-!p}l(e,"compareNode");for(var r=this._groups,i=r.length,a=new Array(i),n=0;n<i;++n){for(var s=r[n],o=s.length,u=a[n]=new Array(o),h,d=0;d<o;++d)(h=s[d])&&(u[d]=h);u.sort(e)}return new Un(a,this._parents).order()}function KQ(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ZQ(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function QQ(){return Array.from(this)}function JQ(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],a=0,n=i.length;a<n;++a){var s=i[a];if(s)return s}return null}function eJ(){let t=0;for(let e of this)++t;return t}function tJ(){return!this.node()}function rJ(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var a=e[r],n=0,s=a.length,o;n<s;++n)(o=a[n])&&t.call(o,o.__data__,n,a);return this}function qb(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),BZ.hasOwnProperty(e)?{space:BZ[e],local:t}:t}function iJ(t){return function(){this.removeAttribute(t)}}function aJ(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nJ(t,e){return function(){this.setAttribute(t,e)}}function sJ(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function oJ(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function lJ(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function cJ(t,e){var r=qb(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?aJ:iJ:typeof e=="function"?r.local?lJ:oJ:r.local?sJ:nJ)(r,e))}function sR(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function uJ(t){return function(){this.style.removeProperty(t)}}function hJ(t,e,r){return function(){this.style.setProperty(t,e,r)}}function dJ(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function fJ(t,e,r){return arguments.length>1?this.each((e==null?uJ:typeof e=="function"?dJ:hJ)(t,e,r==null?"":r)):Vd(this.node(),t)}function Vd(t,e){return t.style.getPropertyValue(e)||sR(t).getComputedStyle(t,null).getPropertyValue(e)}function pJ(t){return function(){delete this[t]}}function gJ(t,e){return function(){this[t]=e}}function mJ(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function yJ(t,e){return arguments.length>1?this.each((e==null?pJ:typeof e=="function"?mJ:gJ)(t,e)):this.node()[t]}function oR(t){return t.trim().split(/^|\s+/)}function x3(t){return t.classList||new lR(t)}function lR(t){this._node=t,this._names=oR(t.getAttribute("class")||"")}function cR(t,e){for(var r=x3(t),i=-1,a=e.length;++i<a;)r.add(e[i])}function uR(t,e){for(var r=x3(t),i=-1,a=e.length;++i<a;)r.remove(e[i])}function vJ(t){return function(){cR(this,t)}}function bJ(t){return function(){uR(this,t)}}function xJ(t,e){return function(){(e.apply(this,arguments)?cR:uR)(this,t)}}function TJ(t,e){var r=oR(t+"");if(arguments.length<2){for(var i=x3(this.node()),a=-1,n=r.length;++a<n;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?xJ:e?vJ:bJ)(r,e))}function CJ(){this.textContent=""}function kJ(t){return function(){this.textContent=t}}function wJ(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function SJ(t){return arguments.length?this.each(t==null?CJ:(typeof t=="function"?wJ:kJ)(t)):this.node().textContent}function EJ(){this.innerHTML=""}function _J(t){return function(){this.innerHTML=t}}function AJ(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function LJ(t){return arguments.length?this.each(t==null?EJ:(typeof t=="function"?AJ:_J)(t)):this.node().innerHTML}function RJ(){this.nextSibling&&this.parentNode.appendChild(this)}function DJ(){return this.each(RJ)}function IJ(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function MJ(){return this.each(IJ)}function NJ(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===yL&&e.documentElement.namespaceURI===yL?e.createElement(t):e.createElementNS(r,t)}}function OJ(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function hR(t){var e=qb(t);return(e.local?OJ:NJ)(e)}function PJ(t){var e=typeof t=="function"?t:hR(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function BJ(){return null}function FJ(t,e){var r=typeof t=="function"?t:hR(t),i=e==null?BJ:typeof e=="function"?e:b3(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function $J(){var t=this.parentNode;t&&t.removeChild(this)}function zJ(){return this.each($J)}function qJ(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function VJ(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function GJ(t){return this.select(t?VJ:qJ)}function WJ(t){return arguments.length?this.property("__data__",t):this.node().__data__}function UJ(t){return function(e){t.call(this,e,this.__data__)}}function HJ(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function YJ(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,a=e.length,n;r<a;++r)n=e[r],(!t.type||n.type===t.type)&&n.name===t.name?this.removeEventListener(n.type,n.listener,n.options):e[++i]=n;++i?e.length=i:delete this.__on}}}function XJ(t,e,r){return function(){var i=this.__on,a,n=UJ(e);if(i){for(var s=0,o=i.length;s<o;++s)if((a=i[s]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=n,a.options=r),a.value=e;return}}this.addEventListener(t.type,n,r),a={type:t.type,name:t.name,value:e,listener:n,options:r},i?i.push(a):this.__on=[a]}}function jJ(t,e,r){var i=HJ(t+""),a,n=i.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var u=0,h=o.length,d;u<h;++u)for(a=0,d=o[u];a<n;++a)if((s=i[a]).type===d.type&&s.name===d.name)return d.value}return}for(o=e?XJ:YJ,a=0;a<n;++a)this.each(o(i[a],e,r));return this}function dR(t,e,r){var i=sR(t),a=i.CustomEvent;typeof a=="function"?a=new a(e,r):(a=i.document.createEvent("Event"),r?(a.initEvent(e,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}function KJ(t,e){return function(){return dR(this,t,e)}}function ZJ(t,e){return function(){return dR(this,t,e.apply(this,arguments))}}function QJ(t,e){return this.each((typeof e=="function"?ZJ:KJ)(t,e))}function*JJ(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],a=0,n=i.length,s;a<n;++a)(s=i[a])&&(yield s)}function Un(t,e){this._groups=t,this._parents=e}function fR(){return new Un([[document.documentElement]],eee)}function tee(){return this}function it(t){return typeof t=="string"?new Un([[document.querySelector(t)]],[document.documentElement]):new Un([[t]],eee)}function s1(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Gb(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function Yu(){}function vL(){return this.rgb().formatHex()}function ree(){return this.rgb().formatHex8()}function iee(){return gR(this).formatHsl()}function bL(){return this.rgb().formatRgb()}function Wu(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=c8e.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?xL(e):r===3?new Oa(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?vb(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?vb(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=u8e.exec(t))?new Oa(e[1],e[2],e[3],1):(e=h8e.exec(t))?new Oa(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=d8e.exec(t))?vb(e[1],e[2],e[3],e[4]):(e=f8e.exec(t))?vb(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=p8e.exec(t))?kL(e[1],e[2]/100,e[3]/100,1):(e=g8e.exec(t))?kL(e[1],e[2]/100,e[3]/100,e[4]):FZ.hasOwnProperty(t)?xL(FZ[t]):t==="transparent"?new Oa(NaN,NaN,NaN,0):null}function xL(t){return new Oa(t>>16&255,t>>8&255,t&255,1)}function vb(t,e,r,i){return i<=0&&(t=e=r=NaN),new Oa(t,e,r,i)}function pR(t){return t instanceof Yu||(t=Wu(t)),t?(t=t.rgb(),new Oa(t.r,t.g,t.b,t.opacity)):new Oa}function Lb(t,e,r,i){return arguments.length===1?pR(t):new Oa(t,e,r,i==null?1:i)}function Oa(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function TL(){return"#".concat(Vu(this.r)).concat(Vu(this.g)).concat(Vu(this.b))}function aee(){return"#".concat(Vu(this.r)).concat(Vu(this.g)).concat(Vu(this.b)).concat(Vu((isNaN(this.opacity)?1:this.opacity)*255))}function CL(){let t=Rb(this.opacity);return"".concat(t===1?"rgb(":"rgba(").concat(Gu(this.r),", ").concat(Gu(this.g),", ").concat(Gu(this.b)).concat(t===1?")":", ".concat(t,")"))}function Rb(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gu(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Vu(t){return t=Gu(t),(t<16?"0":"")+t.toString(16)}function kL(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Fs(t,e,r,i)}function gR(t){if(t instanceof Fs)return new Fs(t.h,t.s,t.l,t.opacity);if(t instanceof Yu||(t=Wu(t)),!t)return new Fs;if(t instanceof Fs)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),n=Math.max(e,r,i),s=NaN,o=n-a,u=(n+a)/2;return o?(e===n?s=(r-i)/o+(r<i)*6:r===n?s=(i-e)/o+2:s=(e-r)/o+4,o/=u<.5?n+a:2-n-a,s*=60):o=u>0&&u<1?0:s,new Fs(s,o,u,t.opacity)}function nee(t,e,r,i){return arguments.length===1?gR(t):new Fs(t,e,r,i==null?1:i)}function Fs(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function wL(t){return t=(t||0)%360,t<0?t+360:t}function bb(t){return Math.max(0,Math.min(1,t||0))}function Xk(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}function mR(t){if(t instanceof Mo)return new Mo(t.l,t.a,t.b,t.opacity);if(t instanceof xl)return yR(t);t instanceof Oa||(t=pR(t));var e=Qk(t.r),r=Qk(t.g),i=Qk(t.b),a=jk((.2225045*e+.7168786*r+.0606169*i)/oee),n,s;return e===r&&r===i?n=s=a:(n=jk((.4360747*e+.3850649*r+.1430804*i)/see),s=jk((.0139322*e+.0971045*r+.7141733*i)/lee)),new Mo(116*a-16,500*(n-a),200*(a-s),t.opacity)}function hee(t,e,r,i){return arguments.length===1?mR(t):new Mo(t,e,r,i==null?1:i)}function Mo(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function jk(t){return t>v8e?Math.pow(t,1/3):t/uee+cee}function Kk(t){return t>Jm?t*t*t:uee*(t-cee)}function Zk(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Qk(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function dee(t){if(t instanceof xl)return new xl(t.h,t.c,t.l,t.opacity);if(t instanceof Mo||(t=mR(t)),t.a===0&&t.b===0)return new xl(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*y8e;return new xl(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function c3(t,e,r,i){return arguments.length===1?dee(t):new xl(t,e,r,i==null?1:i)}function xl(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function yR(t){if(isNaN(t.h))return new Mo(t.l,0,0,t.opacity);var e=t.h*m8e;return new Mo(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function vR(t,e){return function(r){return t+r*e}}function fee(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function pee(t,e){var r=e-t;return r?vR(t,r>180||r<-180?r-360*Math.round(r/360):r):T3(isNaN(t)?e:t)}function gee(t){return(t=+t)==1?qd:function(e,r){return r-e?fee(e,r,t):T3(isNaN(e)?r:e)}}function qd(t,e){var r=e-t;return r?vR(t,r):T3(isNaN(t)?e:t)}function bR(t){return function(e,r){var i=t((e=c3(e)).h,(r=c3(r)).h),a=qd(e.c,r.c),n=qd(e.l,r.l),s=qd(e.opacity,r.opacity);return function(o){return e.h=i(o),e.c=a(o),e.l=n(o),e.opacity=s(o),e+""}}}function xR(t,e,r,i,a){var n=t*t,s=n*t;return((1-3*t+3*n-s)*e+(4-6*n+3*s)*r+(1+3*t+3*n-3*s)*i+s*a)/6}function yee(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),a=t[i],n=t[i+1],s=i>0?t[i-1]:2*a-n,o=i<e-1?t[i+2]:2*n-a;return xR((r-i/e)*e,s,a,n,o)}}function vee(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),a=t[(i+e-1)%e],n=t[i%e],s=t[(i+1)%e],o=t[(i+2)%e];return xR((r-i/e)*e,a,n,s,o)}}function TR(t){return function(e){var r=e.length,i=new Array(r),a=new Array(r),n=new Array(r),s,o;for(s=0;s<r;++s)o=Lb(e[s]),i[s]=o.r||0,a[s]=o.g||0,n[s]=o.b||0;return i=t(i),a=t(a),n=t(n),o.opacity=1,function(u){return o.r=i(u),o.g=a(u),o.b=n(u),o+""}}}function bee(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,i=e.slice(),a;return function(n){for(a=0;a<r;++a)i[a]=t[a]*(1-n)+e[a]*n;return i}}function xee(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Tee(t,e){var r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),n=new Array(r),s;for(s=0;s<i;++s)a[s]=C3(t[s],e[s]);for(;s<r;++s)n[s]=e[s];return function(o){for(s=0;s<i;++s)n[s]=a[s](o);return n}}function Cee(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function Bs(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function kee(t,e){var r={},i={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?r[a]=C3(t[a],e[a]):i[a]=e[a];return function(n){for(a in r)i[a]=r[a](n);return i}}function wee(t){return function(){return t}}function See(t){return function(e){return t(e)+""}}function CR(t,e){var r=SL.lastIndex=uL.lastIndex=0,i,a,n,s=-1,o=[],u=[];for(t=t+"",e=e+"";(i=SL.exec(t))&&(a=uL.exec(e));)(n=a.index)>r&&(n=e.slice(r,n),o[s]?o[s]+=n:o[++s]=n),(i=i[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,u.push({i:s,x:Bs(i,a)})),r=uL.lastIndex;return r<e.length&&(n=e.slice(r),o[s]?o[s]+=n:o[++s]=n),o.length<2?u[0]?See(u[0].x):wee(e):(e=u.length,function(h){for(var d=0,f;d<e;++d)o[(f=u[d]).i]=f.x(h);return o.join("")})}function C3(t,e){var r=typeof e,i;return e==null||r==="boolean"?T3(e):(r==="number"?Bs:r==="string"?(i=Wu(e))?(e=i,u3):CR:e instanceof Wu?u3:e instanceof Date?Cee:xee(e)?bee:Array.isArray(e)?Tee:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?kee:Bs)(t,e)}function Eee(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function kR(t,e,r,i,a,n){var s,o,u;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(u=t*r+e*i)&&(r-=t*u,i-=e*u),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,u/=o),t*i<e*r&&(t=-t,e=-e,u=-u,s=-s),{translateX:a,translateY:n,rotate:Math.atan2(e,t)*$Z,skewX:Math.atan(u)*$Z,scaleX:s,scaleY:o}}function _ee(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?EL:kR(e.a,e.b,e.c,e.d,e.e,e.f)}function Aee(t){return t==null||(Uk||(Uk=document.createElementNS("http://www.w3.org/2000/svg","g")),Uk.setAttribute("transform",t),!(t=Uk.transform.baseVal.consolidate()))?EL:(t=t.matrix,kR(t.a,t.b,t.c,t.d,t.e,t.f))}function wR(t,e,r,i){function a(h){return h.length?h.pop()+" ":""}l(a,"pop");function n(h,d,f,p,g,m){if(h!==f||d!==p){var y=g.push("translate(",null,e,null,r);m.push({i:y-4,x:Bs(h,f)},{i:y-2,x:Bs(d,p)})}else(f||p)&&g.push("translate("+f+e+p+r)}l(n,"translate");function s(h,d,f,p){h!==d?(h-d>180?d+=360:d-h>180&&(h+=360),p.push({i:f.push(a(f)+"rotate(",null,i)-2,x:Bs(h,d)})):d&&f.push(a(f)+"rotate("+d+i)}l(s,"rotate");function o(h,d,f,p){h!==d?p.push({i:f.push(a(f)+"skewX(",null,i)-2,x:Bs(h,d)}):d&&f.push(a(f)+"skewX("+d+i)}l(o,"skewX");function u(h,d,f,p,g,m){if(h!==f||d!==p){var y=g.push(a(g)+"scale(",null,",",null,")");m.push({i:y-4,x:Bs(h,f)},{i:y-2,x:Bs(d,p)})}else(f!==1||p!==1)&&g.push(a(g)+"scale("+f+","+p+")")}return l(u,"scale"),function(h,d){var f=[],p=[];return h=t(h),d=t(d),n(h.translateX,h.translateY,d.translateX,d.translateY,f,p),s(h.rotate,d.rotate,f,p),o(h.skewX,d.skewX,f,p),u(h.scaleX,h.scaleY,d.scaleX,d.scaleY,f,p),h=d=null,function(g){for(var m=-1,y=p.length,v;++m<y;)f[(v=p[m]).i]=v.x(g);return f.join("")}}}function Lee(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Db(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function Gd(t){return t=Db(Math.abs(t)),t?t[1]:NaN}function Ree(t,e){return function(r,i){for(var a=r.length,n=[],s=0,o=t[0],u=0;a>0&&o>0&&(u+o+1>i&&(o=Math.max(1,i-u)),n.push(r.substring(a-=o,a+o)),!((u+=o+1)>i));)o=t[s=(s+1)%t.length];return n.reverse().join(e)}}function Dee(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}function Ib(t){if(!(e=T8e.exec(t)))throw new Error("invalid format: "+t);var e;return new k3({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 k3(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}function Iee(t){e:for(var e=t.length,r=1,i=-1,a;r<e;++r)switch(t[r]){case".":i=a=r;break;case"0":i===0&&(i=r),a=r;break;default:if(!+t[r])break e;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(a+1):t}function Nee(t,e){var r=Db(t,e);if(!r)return t+"";var i=r[0],a=r[1],n=a-(Mee=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=i.length;return n===s?i:n>s?i+new Array(n-s+1).join("0"):n>0?i.slice(0,n)+"."+i.slice(n):"0."+new Array(1-n).join("0")+Db(t,Math.max(0,e+n-1))[0]}function _L(t,e){var r=Db(t,e);if(!r)return t+"";var i=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}function AL(t){return t}function Oee(t){var e=t.grouping===void 0||t.thousands===void 0?AL:Ree(qZ.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",a=t.decimal===void 0?".":t.decimal+"",n=t.numerals===void 0?AL:Dee(qZ.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"\u2212":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function h(f){f=Ib(f);var p=f.fill,g=f.align,m=f.sign,y=f.symbol,v=f.zero,b=f.width,T=f.comma,x=f.precision,C=f.trim,w=f.type;w==="n"?(T=!0,w="g"):zZ[w]||(x===void 0&&(x=12),C=!0,w="g"),(v||p==="0"&&g==="=")&&(v=!0,p="0",g="=");var S=y==="$"?r:y==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k=y==="$"?i:/[%p]/.test(w)?s:"",_=zZ[w],L=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function I(N){var $=S,P=k,A,D,R;if(w==="c")P=_(N)+P,N="";else{N=+N;var M=N<0||1/N<0;if(N=isNaN(N)?u:_(Math.abs(N),x),C&&(N=Iee(N)),M&&+N==0&&m!=="+"&&(M=!1),$=(M?m==="("?m:o:m==="-"||m==="("?"":m)+$,P=(w==="s"?VZ[8+Mee/3]:"")+P+(M&&m==="("?")":""),L){for(A=-1,D=N.length;++A<D;)if(R=N.charCodeAt(A),48>R||R>57){P=(R===46?a+N.slice(A+1):N.slice(A))+P,N=N.slice(0,A);break}}}T&&!v&&(N=e(N,1/0));var O=$.length+N.length+P.length,B=O<b?new Array(b-O+1).join(p):"";switch(T&&v&&(N=e(B+N,B.length?b-P.length:1/0),B=""),g){case"<":N=$+N+P+B;break;case"=":N=$+B+N+P;break;case"^":N=B.slice(0,O=B.length>>1)+$+N+P+B.slice(O);break;default:N=B+$+N+P;break}return n(N)}return l(I,"format"),I.toString=function(){return f+""},I}l(h,"newFormat");function d(f,p){var g=h((f=Ib(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(Gd(p)/3)))*3,y=Math.pow(10,-m),v=VZ[8+m/3];return function(b){return g(y*b)+v}}return l(d,"formatPrefix"),{format:h,formatPrefix:d}}function Bee(t){return Hk=Oee(t),Xu=Hk.format,Pee=Hk.formatPrefix,Hk}function Fee(t){return Math.max(0,-Gd(Math.abs(t)))}function $ee(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Gd(e)/3)))*3-Gd(Math.abs(t)))}function zee(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Gd(e)-Gd(t))+1}function qee(t){var e=0,r=t.children,i=r&&r.length;if(!i)e=1;else for(;--i>=0;)e+=r[i].value;t.value=e}function Vee(){return this.eachAfter(qee)}function Gee(t,e){let r=-1;for(let i of this)t.call(e,i,++r,this);return this}function Wee(t,e){for(var r=this,i=[r],a,n,s=-1;r=i.pop();)if(t.call(e,r,++s,this),a=r.children)for(n=a.length-1;n>=0;--n)i.push(a[n]);return this}function Uee(t,e){for(var r=this,i=[r],a=[],n,s,o,u=-1;r=i.pop();)if(a.push(r),n=r.children)for(s=0,o=n.length;s<o;++s)i.push(n[s]);for(;r=a.pop();)t.call(e,r,++u,this);return this}function Hee(t,e){let r=-1;for(let i of this)if(t.call(e,i,++r,this))return i}function Yee(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,a=i&&i.length;--a>=0;)r+=i[a].value;e.value=r})}function Xee(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function jee(t){for(var e=this,r=Kee(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var a=i.length;t!==r;)i.splice(a,0,t),t=t.parent;return i}function Kee(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),a=null;for(t=r.pop(),e=i.pop();t===e;)a=t,t=r.pop(),e=i.pop();return a}function Zee(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function Qee(){return Array.from(this)}function Jee(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function ete(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function*tte(){var t=this,e,r=[t],i,a,n;do for(e=r.reverse(),r=[];t=e.pop();)if(yield t,i=t.children)for(a=0,n=i.length;a<n;++a)r.push(i[a]);while(r.length)}function Wb(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=ate)):e===void 0&&(e=ite);for(var r=new Mb(t),i,a=[r],n,s,o,u;i=a.pop();)if((s=e(i.data))&&(u=(s=Array.from(s)).length))for(i.children=s,o=u-1;o>=0;--o)a.push(n=s[o]=new Mb(s[o])),n.parent=i,n.depth=i.depth+1;return r.eachBefore(ste)}function rte(){return Wb(this).eachBefore(nte)}function ite(t){return t.children}function ate(t){return Array.isArray(t)?t[1]:null}function nte(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function ste(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Mb(t){this.data=t,this.depth=this.height=0,this.parent=null}function ote(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function lte(t,e,r,i,a){for(var n=t.children,s,o=-1,u=n.length,h=t.value&&(i-e)/t.value;++o<u;)s=n[o],s.y0=r,s.y1=a,s.x0=e,s.x1=e+=s.value*h}function cte(t,e,r,i,a){for(var n=t.children,s,o=-1,u=n.length,h=t.value&&(a-r)/t.value;++o<u;)s=n[o],s.x0=e,s.x1=i,s.y0=r,s.y1=r+=s.value*h}function ute(t,e,r,i,a,n){for(var s=[],o=e.children,u,h,d=0,f=0,p=o.length,g,m,y=e.value,v,b,T,x,C,w,S;d<p;){g=a-r,m=n-i;do v=o[f++].value;while(!v&&f<p);for(b=T=v,w=Math.max(m/g,g/m)/(y*t),S=v*v*w,C=Math.max(T/S,S/b);f<p;++f){if(v+=h=o[f].value,h<b&&(b=h),h>T&&(T=h),S=v*v*w,x=Math.max(T/S,S/b),x>C){v-=h;break}C=x}s.push(u={value:v,dice:g<m,children:o.slice(d,f)}),u.dice?lte(u,r,i,a,y?i+=m*v/y:n):cte(u,r,i,y?r+=g*v/y:a,n),y-=v,d=f}return s}function hte(t){if(typeof t!="function")throw new Error;return t}function Hm(){return 0}function Ym(t){return function(){return t}}function SR(){var t=k8e,e=!1,r=1,i=1,a=[0],n=Hm,s=Hm,o=Hm,u=Hm,h=Hm;function d(p){return p.x0=p.y0=0,p.x1=r,p.y1=i,p.eachBefore(f),a=[0],e&&p.eachBefore(ote),p}l(d,"treemap");function f(p){var g=a[p.depth],m=p.x0+g,y=p.y0+g,v=p.x1-g,b=p.y1-g;v<m&&(m=v=(m+v)/2),b<y&&(y=b=(y+b)/2),p.x0=m,p.y0=y,p.x1=v,p.y1=b,p.children&&(g=a[p.depth+1]=n(p)/2,m+=h(p)-g,y+=s(p)-g,v-=o(p)-g,b-=u(p)-g,v<m&&(m=v=(m+v)/2),b<y&&(y=b=(y+b)/2),t(p,m,y,v,b))}return l(f,"positionNode"),d.round=function(p){return arguments.length?(e=!!p,d):e},d.size=function(p){return arguments.length?(r=+p[0],i=+p[1],d):[r,i]},d.tile=function(p){return arguments.length?(t=hte(p),d):t},d.padding=function(p){return arguments.length?d.paddingInner(p).paddingOuter(p):d.paddingInner()},d.paddingInner=function(p){return arguments.length?(n=typeof p=="function"?p:Ym(+p),d):n},d.paddingOuter=function(p){return arguments.length?d.paddingTop(p).paddingRight(p).paddingBottom(p).paddingLeft(p):d.paddingTop()},d.paddingTop=function(p){return arguments.length?(s=typeof p=="function"?p:Ym(+p),d):s},d.paddingRight=function(p){return arguments.length?(o=typeof p=="function"?p:Ym(+p),d):o},d.paddingBottom=function(p){return arguments.length?(u=typeof p=="function"?p:Ym(+p),d):u},d.paddingLeft=function(p){return arguments.length?(h=typeof p=="function"?p:Ym(+p),d):h},d}function Ub(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function No(){var t=new OZ,e=[],r=[],i=GZ;function a(n){let s=t.get(n);if(s===void 0){if(i!==GZ)return i;t.set(n,s=e.push(n)-1)}return r[s%r.length]}return l(a,"scale"),a.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new OZ;for(let s of n)t.has(s)||t.set(s,e.push(s)-1);return a},a.range=function(n){return arguments.length?(r=Array.from(n),a):r.slice()},a.unknown=function(n){return arguments.length?(i=n,a):i},a.copy=function(){return No(e,r).unknown(i)},Ub.apply(a,arguments),a}function dte(t){return function(){return t}}function fte(t){return+t}function $d(t){return t}function h3(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:dte(isNaN(e)?NaN:.5)}function pte(t,e){var r;return t>e&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}function gte(t,e,r){var i=t[0],a=t[1],n=e[0],s=e[1];return a<i?(i=h3(a,i),n=r(s,n)):(i=h3(i,a),n=r(n,s)),function(o){return n(i(o))}}function mte(t,e,r){var i=Math.min(t.length,e.length)-1,a=new Array(i),n=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)a[s]=h3(t[s],t[s+1]),n[s]=r(e[s],e[s+1]);return function(o){var u=i8e(t,o,1,i)-1;return n[u](a[u](o))}}function ER(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function yte(){var t=WZ,e=WZ,r=C3,i,a,n,s=$d,o,u,h;function d(){var p=Math.min(t.length,e.length);return s!==$d&&(s=pte(t[0],t[p-1])),o=p>2?mte:gte,u=h=null,f}l(d,"rescale");function f(p){return p==null||isNaN(p=+p)?n:(u||(u=o(t.map(i),e,r)))(i(s(p)))}return l(f,"scale"),f.invert=function(p){return s(a((h||(h=o(e,t.map(i),Bs)))(p)))},f.domain=function(p){return arguments.length?(t=Array.from(p,fte),d()):t.slice()},f.range=function(p){return arguments.length?(e=Array.from(p),d()):e.slice()},f.rangeRound=function(p){return e=Array.from(p),r=Eee,d()},f.clamp=function(p){return arguments.length?(s=p?!0:$d,d()):s!==$d},f.interpolate=function(p){return arguments.length?(r=p,d()):r},f.unknown=function(p){return arguments.length?(n=p,f):n},function(p,g){return i=p,a=g,d()}}function _R(){return yte()($d,$d)}function vte(t,e,r,i){var a=s3(t,e,r),n;switch(i=Ib(i==null?",f":i),i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(n=$ee(a,s))&&(i.precision=n),Pee(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(n=zee(a,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=n-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(n=Fee(a))&&(i.precision=n-(i.type==="%")*2);break}}return Xu(i)}function bte(t){var e=t.domain;return t.ticks=function(r){var i=e();return yQ(i[0],i[i.length-1],r==null?10:r)},t.tickFormat=function(r,i){var a=e();return vte(a[0],a[a.length-1],r==null?10:r,i)},t.nice=function(r){r==null&&(r=10);var i=e(),a=0,n=i.length-1,s=i[a],o=i[n],u,h,d=10;for(o<s&&(h=s,s=o,o=h,h=a,a=n,n=h);d-- >0;){if(h=n3(s,o,r),h===u)return i[a]=s,i[n]=o,e(i);if(h>0)s=Math.floor(s/h)*h,o=Math.ceil(o/h)*h;else if(h<0)s=Math.ceil(s*h)/h,o=Math.floor(o*h)/h;else break;u=h}return t},t}function kl(){var t=_R();return t.copy=function(){return ER(t,kl())},Ub.apply(t,arguments),bte(t)}function aa(t,e,r,i){function a(n){return t(n=arguments.length===0?new Date:new Date(+n)),n}return l(a,"interval"),a.floor=n=>(t(n=new Date(+n)),n),a.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),a.round=n=>{let s=a(n),o=a.ceil(n);return n-s<o-n?s:o},a.offset=(n,s)=>(e(n=new Date(+n),s==null?1:Math.floor(s)),n),a.range=(n,s,o)=>{let u=[];if(n=a.ceil(n),o=o==null?1:Math.floor(o),!(n<s)||!(o>0))return u;let h;do u.push(h=new Date(+n)),e(n,o),t(n);while(h<n&&n<s);return u},a.filter=n=>aa(s=>{if(s>=s)for(;t(s),!n(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!n(s););else for(;--o>=0;)for(;e(s,1),!n(s););}),r&&(a.count=(n,s)=>(hL.setTime(+n),dL.setTime(+s),t(hL),t(dL),Math.floor(r(hL,dL))),a.every=n=>(n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?a.filter(i?s=>i(s)%n===0:s=>a.count(0,s)%n===0):a)),a}function Ku(t){return aa(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*$s)/AR)}function Zu(t){return aa(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/AR)}function OR(t,e,r,i,a,n){let s=[[Dc,1,Lc],[Dc,5,5*Lc],[Dc,15,15*Lc],[Dc,30,30*Lc],[n,1,$s],[n,5,5*$s],[n,15,15*$s],[n,30,30*$s],[a,1,Rc],[a,3,3*Rc],[a,6,6*Rc],[a,12,12*Rc],[i,1,Ic],[i,2,2*Ic],[r,1,AR],[e,1,UZ],[e,3,3*UZ],[t,1,fL]];function o(h,d,f){let p=d<h;p&&([h,d]=[d,h]);let g=f&&typeof f.range=="function"?f:u(h,d,f),m=g?g.range(h,+d+1):[];return p?m.reverse():m}l(o,"ticks");function u(h,d,f){let p=Math.abs(d-h)/f,g=v3(([,,v])=>v).right(s,p);if(g===s.length)return t.every(s3(h/fL,d/fL,f));if(g===0)return Wd.every(Math.max(s3(h,d,f),1));let[m,y]=s[p/s[g-1][2]<s[g][2]/p?g-1:g];return m.every(y)}return l(u,"tickInterval"),[o,u]}function Jk(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function e3(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Xm(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function wte(t){var e=t.dateTime,r=t.date,i=t.time,a=t.periods,n=t.days,s=t.shortDays,o=t.months,u=t.shortMonths,h=jm(a),d=Km(a),f=jm(n),p=Km(n),g=jm(s),m=Km(s),y=jm(o),v=Km(o),b=jm(u),T=Km(u),x={a:M,A:O,b:B,B:q,c:null,d:ML,e:ML,f:Ute,g:tre,G:ire,H:Vte,I:Gte,j:Wte,L:PR,m:Hte,M:Yte,p:F,q:z,Q:PL,s:BL,S:Xte,u:jte,U:Kte,V:Zte,w:Qte,W:Jte,x:null,X:null,y:ere,Y:rre,Z:are,"%":OL},C={a:W,A:V,b:G,B:j,c:null,d:NL,e:NL,f:lre,g:vre,G:xre,H:nre,I:sre,j:ore,L:FR,m:cre,M:ure,p:Y,q:te,Q:PL,s:BL,S:hre,u:dre,U:fre,V:pre,w:gre,W:mre,x:null,X:null,y:yre,Y:bre,Z:Tre,"%":OL},w={a:I,A:N,b:$,B:P,c:A,d:DL,e:DL,f:Fte,g:RL,G:LL,H:IL,I:IL,j:Nte,L:Bte,m:Mte,M:Ote,p:L,q:Ite,Q:zte,s:qte,S:Pte,u:_te,U:Ate,V:Lte,w:Ete,W:Rte,x:D,X:R,y:RL,Y:LL,Z:Dte,"%":$te};x.x=S(r,x),x.X=S(i,x),x.c=S(e,x),C.x=S(r,C),C.X=S(i,C),C.c=S(e,C);function S(X,K){return function(J){var ee=[],ie=-1,le=0,me=X.length,ce,Se,_e;for(J instanceof Date||(J=new Date(+J));++ie<me;)X.charCodeAt(ie)===37&&(ee.push(X.slice(le,ie)),(Se=HZ[ce=X.charAt(++ie)])!=null?ce=X.charAt(++ie):Se=ce==="e"?" ":"0",(_e=K[ce])&&(ce=_e(J,Se)),ee.push(ce),le=ie+1);return ee.push(X.slice(le,ie)),ee.join("")}}l(S,"newFormat");function k(X,K){return function(J){var ee=Xm(1900,void 0,1),ie=_(ee,X,J+="",0),le,me;if(ie!=J.length)return null;if("Q"in ee)return new Date(ee.Q);if("s"in ee)return new Date(ee.s*1e3+("L"in ee?ee.L:0));if(K&&!("Z"in ee)&&(ee.Z=0),"p"in ee&&(ee.H=ee.H%12+ee.p*12),ee.m===void 0&&(ee.m="q"in ee?ee.q:0),"V"in ee){if(ee.V<1||ee.V>53)return null;"w"in ee||(ee.w=1),"Z"in ee?(le=e3(Xm(ee.y,0,1)),me=le.getUTCDay(),le=me>4||me===0?d3.ceil(le):d3(le),le=LR.offset(le,(ee.V-1)*7),ee.y=le.getUTCFullYear(),ee.m=le.getUTCMonth(),ee.d=le.getUTCDate()+(ee.w+6)%7):(le=Jk(Xm(ee.y,0,1)),me=le.getDay(),le=me>4||me===0?i1.ceil(le):i1(le),le=ju.offset(le,(ee.V-1)*7),ee.y=le.getFullYear(),ee.m=le.getMonth(),ee.d=le.getDate()+(ee.w+6)%7)}else("W"in ee||"U"in ee)&&("w"in ee||(ee.w="u"in ee?ee.u%7:"W"in ee?1:0),me="Z"in ee?e3(Xm(ee.y,0,1)).getUTCDay():Jk(Xm(ee.y,0,1)).getDay(),ee.m=0,ee.d="W"in ee?(ee.w+6)%7+ee.W*7-(me+5)%7:ee.w+ee.U*7-(me+6)%7);return"Z"in ee?(ee.H+=ee.Z/100|0,ee.M+=ee.Z%100,e3(ee)):Jk(ee)}}l(k,"newParse");function _(X,K,J,ee){for(var ie=0,le=K.length,me=J.length,ce,Se;ie<le;){if(ee>=me)return-1;if(ce=K.charCodeAt(ie++),ce===37){if(ce=K.charAt(ie++),Se=w[ce in HZ?K.charAt(ie++):ce],!Se||(ee=Se(X,J,ee))<0)return-1}else if(ce!=J.charCodeAt(ee++))return-1}return ee}l(_,"parseSpecifier");function L(X,K,J){var ee=h.exec(K.slice(J));return ee?(X.p=d.get(ee[0].toLowerCase()),J+ee[0].length):-1}l(L,"parsePeriod");function I(X,K,J){var ee=g.exec(K.slice(J));return ee?(X.w=m.get(ee[0].toLowerCase()),J+ee[0].length):-1}l(I,"parseShortWeekday");function N(X,K,J){var ee=f.exec(K.slice(J));return ee?(X.w=p.get(ee[0].toLowerCase()),J+ee[0].length):-1}l(N,"parseWeekday");function $(X,K,J){var ee=b.exec(K.slice(J));return ee?(X.m=T.get(ee[0].toLowerCase()),J+ee[0].length):-1}l($,"parseShortMonth");function P(X,K,J){var ee=y.exec(K.slice(J));return ee?(X.m=v.get(ee[0].toLowerCase()),J+ee[0].length):-1}l(P,"parseMonth");function A(X,K,J){return _(X,e,K,J)}l(A,"parseLocaleDateTime");function D(X,K,J){return _(X,r,K,J)}l(D,"parseLocaleDate");function R(X,K,J){return _(X,i,K,J)}l(R,"parseLocaleTime");function M(X){return s[X.getDay()]}l(M,"formatShortWeekday");function O(X){return n[X.getDay()]}l(O,"formatWeekday");function B(X){return u[X.getMonth()]}l(B,"formatShortMonth");function q(X){return o[X.getMonth()]}l(q,"formatMonth");function F(X){return a[+(X.getHours()>=12)]}l(F,"formatPeriod");function z(X){return 1+~~(X.getMonth()/3)}l(z,"formatQuarter");function W(X){return s[X.getUTCDay()]}l(W,"formatUTCShortWeekday");function V(X){return n[X.getUTCDay()]}l(V,"formatUTCWeekday");function G(X){return u[X.getUTCMonth()]}l(G,"formatUTCShortMonth");function j(X){return o[X.getUTCMonth()]}l(j,"formatUTCMonth");function Y(X){return a[+(X.getUTCHours()>=12)]}l(Y,"formatUTCPeriod");function te(X){return 1+~~(X.getUTCMonth()/3)}return l(te,"formatUTCQuarter"),{format:l(function(X){var K=S(X+="",x);return K.toString=function(){return X},K},"format"),parse:l(function(X){var K=k(X+="",!1);return K.toString=function(){return X},K},"parse"),utcFormat:l(function(X){var K=S(X+="",C);return K.toString=function(){return X},K},"utcFormat"),utcParse:l(function(X){var K=k(X+="",!0);return K.toString=function(){return X},K},"utcParse")}}function Vr(t,e,r){var i=t<0?"-":"",a=(i?-t:t)+"",n=a.length;return i+(n<r?new Array(r-n+1).join(e)+a:a)}function Ste(t){return t.replace(D8e,"\\$&")}function jm(t){return new RegExp("^(?:"+t.map(Ste).join("|")+")","i")}function Km(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function Ete(t,e,r){var i=La.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function _te(t,e,r){var i=La.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function Ate(t,e,r){var i=La.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function Lte(t,e,r){var i=La.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function Rte(t,e,r){var i=La.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function LL(t,e,r){var i=La.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function RL(t,e,r){var i=La.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function Dte(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function Ite(t,e,r){var i=La.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}function Mte(t,e,r){var i=La.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function DL(t,e,r){var i=La.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function Nte(t,e,r){var i=La.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function IL(t,e,r){var i=La.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function Ote(t,e,r){var i=La.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function Pte(t,e,r){var i=La.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function Bte(t,e,r){var i=La.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function Fte(t,e,r){var i=La.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function $te(t,e,r){var i=R8e.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function zte(t,e,r){var i=La.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function qte(t,e,r){var i=La.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function ML(t,e){return Vr(t.getDate(),e,2)}function Vte(t,e){return Vr(t.getHours(),e,2)}function Gte(t,e){return Vr(t.getHours()%12||12,e,2)}function Wte(t,e){return Vr(1+ju.count(Mc(t),t),e,3)}function PR(t,e){return Vr(t.getMilliseconds(),e,3)}function Ute(t,e){return PR(t,e)+"000"}function Hte(t,e){return Vr(t.getMonth()+1,e,2)}function Yte(t,e){return Vr(t.getMinutes(),e,2)}function Xte(t,e){return Vr(t.getSeconds(),e,2)}function jte(t){var e=t.getDay();return e===0?7:e}function Kte(t,e){return Vr(c1.count(Mc(t)-1,t),e,2)}function BR(t){var e=t.getDay();return e>=4||e===0?Uu(t):Uu.ceil(t)}function Zte(t,e){return t=BR(t),Vr(Uu.count(Mc(t),t)+(Mc(t).getDay()===4),e,2)}function Qte(t){return t.getDay()}function Jte(t,e){return Vr(i1.count(Mc(t)-1,t),e,2)}function ere(t,e){return Vr(t.getFullYear()%100,e,2)}function tre(t,e){return t=BR(t),Vr(t.getFullYear()%100,e,2)}function rre(t,e){return Vr(t.getFullYear()%1e4,e,4)}function ire(t,e){var r=t.getDay();return t=r>=4||r===0?Uu(t):Uu.ceil(t),Vr(t.getFullYear()%1e4,e,4)}function are(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Vr(e/60|0,"0",2)+Vr(e%60,"0",2)}function NL(t,e){return Vr(t.getUTCDate(),e,2)}function nre(t,e){return Vr(t.getUTCHours(),e,2)}function sre(t,e){return Vr(t.getUTCHours()%12||12,e,2)}function ore(t,e){return Vr(1+LR.count(Hu(t),t),e,3)}function FR(t,e){return Vr(t.getUTCMilliseconds(),e,3)}function lre(t,e){return FR(t,e)+"000"}function cre(t,e){return Vr(t.getUTCMonth()+1,e,2)}function ure(t,e){return Vr(t.getUTCMinutes(),e,2)}function hre(t,e){return Vr(t.getUTCSeconds(),e,2)}function dre(t){var e=t.getUTCDay();return e===0?7:e}function fre(t,e){return Vr(NR.count(Hu(t)-1,t),e,2)}function $R(t){var e=t.getUTCDay();return e>=4||e===0?a1(t):a1.ceil(t)}function pre(t,e){return t=$R(t),Vr(a1.count(Hu(t),t)+(Hu(t).getUTCDay()===4),e,2)}function gre(t){return t.getUTCDay()}function mre(t,e){return Vr(d3.count(Hu(t)-1,t),e,2)}function yre(t,e){return Vr(t.getUTCFullYear()%100,e,2)}function vre(t,e){return t=$R(t),Vr(t.getUTCFullYear()%100,e,2)}function bre(t,e){return Vr(t.getUTCFullYear()%1e4,e,4)}function xre(t,e){var r=t.getUTCDay();return t=r>=4||r===0?a1(t):a1.ceil(t),Vr(t.getUTCFullYear()%1e4,e,4)}function Tre(){return"+0000"}function OL(){return"%"}function PL(t){return+t}function BL(t){return Math.floor(+t/1e3)}function Cre(t){return Um=wte(t),Hb=Um.format,I8e=Um.parse,M8e=Um.utcFormat,N8e=Um.utcParse,Um}function kre(t,e){t=t.slice();var r=0,i=t.length-1,a=t[r],n=t[i],s;return n<a&&(s=r,r=i,i=s,s=a,a=n,n=s),t[r]=e.floor(a),t[i]=e.ceil(n),t}function wre(t){return new Date(t)}function Sre(t){return t instanceof Date?+t:+new Date(+t)}function zR(t,e,r,i,a,n,s,o,u,h){var d=_R(),f=d.invert,p=d.domain,g=h(".%L"),m=h(":%S"),y=h("%I:%M"),v=h("%I %p"),b=h("%a %d"),T=h("%b %d"),x=h("%B"),C=h("%Y");function w(S){return(u(S)<S?g:o(S)<S?m:s(S)<S?y:n(S)<S?v:i(S)<S?a(S)<S?b:T:r(S)<S?x:C)(S)}return l(w,"tickFormat"),d.invert=function(S){return new Date(f(S))},d.domain=function(S){return arguments.length?p(Array.from(S,Sre)):p().map(wre)},d.ticks=function(S){var k=p();return t(k[0],k[k.length-1],S==null?10:S)},d.tickFormat=function(S,k){return k==null?w:h(k)},d.nice=function(S){var k=p();return(!S||typeof S.range!="function")&&(S=e(k[0],k[k.length-1],S==null?10:S)),S?p(kre(k,S)):d},d.copy=function(){return ER(d,zR(t,e,r,i,a,n,s,o,u,h))},d}function qR(){return Ub.apply(zR(A8e,L8e,Mc,u1,c1,ju,l1,o1,Dc,Hb).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Yb(){var t=No().unknown(void 0),e=t.domain,r=t.range,i=0,a=1,n,s,o=!1,u=0,h