!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vega"),require("vega-lite")):"function"==typeof define&&define.amd?define(["vega","vega-lite"],t):(e=e||self).vegaEmbed=t(e.vega,e.vl)}(this,function(e,t){"use strict";var n="http://www.w3.org/1999/xhtml",r={svg:"http://www.w3.org/2000/svg",xhtml:n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function i(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),r.hasOwnProperty(t)?{space:r[t],local:e}:e}function o(e){var t=i(e);return(t.local?function(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}:function(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===n&&t.documentElement.namespaceURI===n?t.createElement(e):t.createElementNS(r,e)}})(t)}function a(){}function s(e){return null==e?a:function(){return this.querySelector(e)}}function l(){return[]}function c(e){return new Array(e.length)}function u(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}u.prototype={constructor:u,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var f="$";function p(e,t,n,r,i,o){for(var a,s=0,l=t.length,c=o.length;st?1:e>=t?0:NaN}function g(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function m(e){return e.trim().split(/^|\s+/)}function v(e){return e.classList||new b(e)}function b(e){this._node=e,this._names=m(e.getAttribute("class")||"")}function y(e,t){for(var n=v(e),r=-1,i=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var j={},z=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(j={mouseenter:"mouseover",mouseleave:"mouseout"}));function N(e,t,n){return e=T(e,t,n),function(t){var n=t.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||e.call(this,t)}}function T(e,t,n){return function(r){var i=z;z=r;try{e.call(this,this.__data__,t,n)}finally{z=i}}}function $(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r=S&&(S=_+1);!(x=y[S])&&++S=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=d);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==t?function(e){return function(){this.style.removeProperty(e)}}:"function"==typeof t?function(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}:function(e,t,n){return function(){this.style.setProperty(e,t,n)}})(e,t,null==n?"":n)):function(e,t){return e.style.getPropertyValue(t)||g(e).getComputedStyle(e,null).getPropertyValue(t)}(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?function(e){return function(){delete this[e]}}:"function"==typeof t?function(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}:function(e,t){return function(){this[e]=t}})(e,t)):this.node()[e]},classed:function(e,t){var n=m(e+"");if(arguments.length<2){for(var r=v(this.node()),i=-1,o=n.length;++i=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}(e+""),a=o.length;if(!(arguments.length<2)){for(s=t?F:$,null==n&&(n=!1),r=0;r0)return[m,n+c.join(",\n"+d),s].join("\n"+o)}return v}(e,"",0)};function M(e,t){return e(t={exports:{}},t.exports),t.exports}var q,X=M(function(e,t){var n;t=e.exports=J,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,o=t.re=[],a=t.src=[],s=0,l=s++;a[l]="0|[1-9]\\d*";var c=s++;a[c]="[0-9]+";var u=s++;a[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var f=s++;a[f]="("+a[l]+")\\.("+a[l]+")\\.("+a[l]+")";var p=s++;a[p]="("+a[c]+")\\.("+a[c]+")\\.("+a[c]+")";var h=s++;a[h]="(?:"+a[l]+"|"+a[u]+")";var d=s++;a[d]="(?:"+a[c]+"|"+a[u]+")";var g=s++;a[g]="(?:-("+a[h]+"(?:\\."+a[h]+")*))";var m=s++;a[m]="(?:-?("+a[d]+"(?:\\."+a[d]+")*))";var v=s++;a[v]="[0-9A-Za-z-]+";var b=s++;a[b]="(?:\\+("+a[v]+"(?:\\."+a[v]+")*))";var y=s++,w="v?"+a[f]+a[g]+"?"+a[b]+"?";a[y]="^"+w+"$";var x="[v=\\s]*"+a[p]+a[m]+"?"+a[b]+"?",_=s++;a[_]="^"+x+"$";var S=s++;a[S]="((?:<|>)?=?)";var k=s++;a[k]=a[c]+"|x|X|\\*";var C=s++;a[C]=a[l]+"|x|X|\\*";var E=s++;a[E]="[v=\\s]*("+a[C]+")(?:\\.("+a[C]+")(?:\\.("+a[C]+")(?:"+a[g]+")?"+a[b]+"?)?)?";var A=s++;a[A]="[v=\\s]*("+a[k]+")(?:\\.("+a[k]+")(?:\\.("+a[k]+")(?:"+a[m]+")?"+a[b]+"?)?)?";var O=s++;a[O]="^"+a[S]+"\\s*"+a[E]+"$";var j=s++;a[j]="^"+a[S]+"\\s*"+a[A]+"$";var z=s++;a[z]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var N=s++;a[N]="(?:~>?)";var T=s++;a[T]="(\\s*)"+a[N]+"\\s+",o[T]=new RegExp(a[T],"g");var $=s++;a[$]="^"+a[N]+a[E]+"$";var F=s++;a[F]="^"+a[N]+a[A]+"$";var P=s++;a[P]="(?:\\^)";var I=s++;a[I]="(\\s*)"+a[P]+"\\s+",o[I]=new RegExp(a[I],"g");var W=s++;a[W]="^"+a[P]+a[E]+"$";var L=s++;a[L]="^"+a[P]+a[A]+"$";var B=s++;a[B]="^"+a[S]+"\\s*("+x+")$|^$";var D=s++;a[D]="^"+a[S]+"\\s*("+w+")$|^$";var R=s++;a[R]="(\\s*)"+a[S]+"\\s*("+x+"|"+a[E]+")",o[R]=new RegExp(a[R],"g");var V=s++;a[V]="^\\s*("+a[E]+")\\s+-\\s+("+a[E]+")\\s*$";var M=s++;a[M]="^\\s*("+a[A]+")\\s+-\\s+("+a[A]+")\\s*$";var q=s++;a[q]="(<|>)?=?\\s*\\*";for(var X=0;X<35;X++)n(X,a[X]),o[X]||(o[X]=new RegExp(a[X]));function H(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof J)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[_]:o[y]).test(e))return null;try{return new J(e,t)}catch(e){return null}}function J(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof J){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof J))return new J(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var a=e.trim().match(t.loose?o[_]:o[y]);if(!a)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new J(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(Q(e,t))return null;var n=H(e),r=H(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var a in n)if(("major"===a||"minor"===a||"patch"===a)&&n[a]!==r[a])return i+a;return o},t.compareIdentifiers=G;var U=/^[0-9]+$/;function G(e,t){var n=U.test(e),r=U.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function K(e,t,n){return Y(e,t,n)<0}function Q(e,t,n){return 0===Y(e,t,n)}function ee(e,t,n){return 0!==Y(e,t,n)}function te(e,t,n){return Y(e,t,n)>=0}function ne(e,t,n){return Y(e,t,n)<=0}function re(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Q(e,n,r);case"!=":return ee(e,n,r);case">":return Z(e,n,r);case">=":return te(e,n,r);case"<":return K(e,n,r);case"<=":return ne(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new J(e,t).major},t.minor=function(e,t){return new J(e,t).minor},t.patch=function(e,t){return new J(e,t).patch},t.compare=Y,t.compareLoose=function(e,t){return Y(e,t,!0)},t.rcompare=function(e,t,n){return Y(t,e,n)},t.sort=function(e,n){return e.sort(function(e,r){return t.compare(e,r,n)})},t.rsort=function(e,n){return e.sort(function(e,r){return t.rcompare(e,r,n)})},t.gt=Z,t.lt=K,t.eq=Q,t.neq=ee,t.gte=te,t.lte=ne,t.cmp=re,t.Comparator=ie;var oe={};function ae(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ae)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new ae(e.raw,t);if(e instanceof ie)return new ae(e.value,t);if(!(this instanceof ae))return new ae(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e,t){for(var n=!0,r=e.slice(),i=r.pop();n&&r.length;)n=r.every(function(e){return i.intersects(e,t)}),i=r.pop();return n}function le(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,n,r,i,o,a,s,l,c,u,f,p){return((t=le(n)?"":le(r)?">="+n+".0.0":le(i)?">="+n+"."+r+".0":">="+t)+" "+(s=le(l)?"":le(c)?"<"+(+l+1)+".0.0":le(u)?"<"+l+"."+(+c+1)+".0":f?"<="+l+"."+c+"."+u+"-"+f:"<="+s)).trim()}function ue(e,t,r){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function fe(e,t,n){try{t=new ae(t,n)}catch(e){return!1}return t.test(e)}function pe(e,t,n,r){var i,o,a,s,l;switch(e=new J(e,r),t=new ae(t,r),n){case">":i=Z,o=ne,a=K,s=">",l=">=";break;case"<":i=K,o=te,a=Z,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(fe(e,t,r))return!1;for(var c=0;c=0.0.0")),f=f||e,p=p||e,i(e.semver,f.semver,r)?f=e:a(e.semver,p.semver,r)&&(p=e)}),f.operator===s||f.operator===l)return!1;if((!p.operator||p.operator===s)&&o(e,p.semver))return!1;if(p.operator===l&&a(e,p.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?o[B]:o[D],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new J(n[2],this.options.loose):this.semver=oe},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===oe||("string"==typeof e&&(e=new J(e,this.options)),re(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new ae(e.value,t),fe(this.value,n,t);if(""===e.operator)return n=new ae(this.value,t),fe(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&a||s||l},t.Range=ae,ae.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},ae.prototype.toString=function(){return this.range},ae.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[M]:o[V];e=e.replace(r,ce),n("hyphen replace",e),e=e.replace(o[R],"$1$2$3"),n("comparator trim",e,o[R]),e=(e=(e=e.replace(o[T],"$1~")).replace(o[I],"$1^")).split(/\s+/).join(" ");var i=t?o[B]:o[D],a=e.split(" ").map(function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){n("caret",e,t);var r=t.loose?o[L]:o[W];return e.replace(r,function(t,r,i,o,a){var s;return n("caret",e,t,r,i,o,a),le(r)?s="":le(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":le(o)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":a?(n("replaceCaret pr",a),s="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+a+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",s),s})}(e,t)}).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var r=t.loose?o[F]:o[$];return e.replace(r,function(t,r,i,o,a){var s;return n("tilde",e,t,r,i,o,a),le(r)?s="":le(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":le(o)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":a?(n("replaceTilde pr",a),s=">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s})}(e,t)}).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var r=t.loose?o[j]:o[O];return e.replace(r,function(t,r,i,o,a,s){n("xRange",e,t,r,i,o,a,s);var l=le(i),c=l||le(o),u=c||le(a),f=u;return"="===r&&f&&(r=""),l?t=">"===r||"<"===r?"<0.0.0":"*":r&&f?(c&&(o=0),a=0,">"===r?(r=">=",c?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):"<="===r&&(r="<",c?i=+i+1:o=+o+1),t=r+i+"."+o+"."+a):c?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t})}(e,t)}).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[q],"")}(e,t),n("stars",e),e}(e,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(a=a.filter(function(e){return!!e.match(i)})),a=a.map(function(e){return new ie(e,this.options)},this)},ae.prototype.intersects=function(e,t){if(!(e instanceof ae))throw new TypeError("a Range is required");return this.set.some(function(n){return se(n,t)&&e.set.some(function(e){return se(e,t)&&n.every(function(n){return e.every(function(e){return n.intersects(e,t)})})})})},t.toComparators=function(e,t){return new ae(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},ae.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new J(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!Z(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(n&&e.test(n))return n;return null},t.validRange=function(e,t){try{return new ae(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return pe(e,t,"<",n)},t.gtr=function(e,t,n){return pe(e,t,">",n)},t.outside=pe,t.prerelease=function(e,t){var n=H(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new ae(e,n),t=new ae(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof J)return e;if("string"!=typeof e)return null;var t=e.match(o[z]);if(null==t)return null;return H(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}}),H=(X.SEMVER_SPEC_VERSION,X.re,X.src,X.parse,X.valid,X.clean,X.SemVer,X.inc,X.diff,X.compareIdentifiers,X.rcompareIdentifiers,X.major,X.minor,X.patch,X.compare,X.compareLoose,X.rcompare,X.sort,X.rsort,X.gt,X.lt,X.eq,X.neq,X.gte,X.lte,X.cmp,X.Comparator,X.Range,X.toComparators,X.satisfies),J=(X.maxSatisfying,X.minSatisfying,X.minVersion,X.validRange,X.ltr,X.gtr,X.outside,X.prerelease,X.intersects,X.coerce,M(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=/\/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t[0],version:t[1]}}})),U=(q=J)&&q.__esModule&&Object.prototype.hasOwnProperty.call(q,"default")?q.default:q;const G={background:"#fff",arc:{fill:"#4572a7"},area:{fill:"#4572a7"},line:{stroke:"#4572a7",strokeWidth:2},path:{stroke:"#4572a7"},rect:{fill:"#4572a7"},shape:{stroke:"#4572a7"},symbol:{fill:"#4572a7",strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},Y={group:{fill:"#e5e5e5"},arc:{fill:"#000"},area:{fill:"#000"},line:{stroke:"#000"},path:{stroke:"#000"},rect:{fill:"#000"},shape:{stroke:"#000"},symbol:{fill:"#000",size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},Z={background:"#f9f9f9",arc:{fill:"#ab5787"},area:{fill:"#ab5787"},line:{stroke:"#ab5787"},path:{stroke:"#ab5787"},rect:{fill:"#ab5787"},shape:{stroke:"#ab5787"},symbol:{fill:"#ab5787",size:30},axis:{domainColor:"#979797",domainWidth:.5,gridWidth:.2,labelColor:"#979797",tickColor:"#979797",tickWidth:.2,titleColor:"#979797"},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},K={background:"#fff",arc:{fill:"#3e5c69"},area:{fill:"#3e5c69"},line:{stroke:"#3e5c69"},path:{stroke:"#3e5c69"},rect:{fill:"#3e5c69"},shape:{stroke:"#3e5c69"},symbol:{fill:"#3e5c69"},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},Q={background:"#333",title:{color:"#fff"},style:{"guide-label":{fill:"#fff"},"guide-title":{fill:"#fff"}},axis:{domainColor:"#fff",gridColor:"#888",tickColor:"#fff"}},ee={arc:{fill:"#30a2da"},area:{fill:"#30a2da"},axisBand:{grid:!1},axisBottom:{domain:!1,domainColor:"#333",domainWidth:3,grid:!0,gridColor:"#cbcbcb",gridWidth:1,labelColor:"#999",labelFontSize:10,labelPadding:4,tickColor:"#cbcbcb",tickSize:10,titleFontSize:14,titlePadding:10},axisLeft:{domainColor:"#cbcbcb",domainWidth:1,grid:!0,gridColor:"#cbcbcb",gridWidth:1,labelColor:"#999",labelFontSize:10,labelPadding:4,tickColor:"#cbcbcb",tickSize:10,ticks:!0,titleFontSize:14,titlePadding:10},axisRight:{domainColor:"#333",domainWidth:1,grid:!0,gridColor:"#cbcbcb",gridWidth:1,labelColor:"#999",labelFontSize:10,labelPadding:4,tickColor:"#cbcbcb",tickSize:10,ticks:!0,titleFontSize:14,titlePadding:10},axisTop:{domain:!1,domainColor:"#333",domainWidth:3,grid:!0,gridColor:"#cbcbcb",gridWidth:1,labelColor:"#999",labelFontSize:10,labelPadding:4,tickColor:"#cbcbcb",tickSize:10,titleFontSize:14,titlePadding:10},background:"#f0f0f0",group:{fill:"#f0f0f0"},legend:{labelColor:"#333",labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:"#333",titleFontSize:14,titlePadding:10},line:{stroke:"#30a2da",strokeWidth:2},path:{stroke:"#30a2da",strokeWidth:.5},rect:{fill:"#30a2da"},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},symbol:{filled:!0,shape:"circle"},shape:{stroke:"#30a2da"},style:{bar:{binSpacing:2,fill:"#30a2da",stroke:null}},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},te="Benton Gothic Bold, sans",ne={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},re={background:"#ffffff",title:{anchor:"start",font:te,fontColor:"#000000",fontSize:22,fontWeight:"normal"},arc:{fill:"#82c6df"},area:{fill:"#82c6df"},line:{stroke:"#82c6df",strokeWidth:2},path:{stroke:"#82c6df"},rect:{fill:"#82c6df"},shape:{stroke:"#82c6df"},symbol:{fill:"#82c6df",size:30},axis:{labelFont:"Benton Gothic, sans",labelFontSize:11.5,labelFontWeight:"normal",titleFont:te,titleFontSize:13,titleFontWeight:"normal"},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:"Benton Gothic, sans",labelFontSize:11.5,symbolType:"square",titleFont:te,titleFontSize:13,titleFontWeight:"normal"},range:{category:ne["category-6"],diverging:ne["fireandice-6"],heatmap:ne["fire-7"],ordinal:ne["fire-7"],ramp:ne["fire-7"]}};var ie=Object.freeze({excel:G,ggplot2:Y,quartz:Z,vox:K,dark:Q,fivethirtyeight:ee,latimes:re}),oe="#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black; }\n #vg-tooltip-element.visible {\n visibility: visible; }\n #vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px; }\n #vg-tooltip-element table {\n border-spacing: 0; }\n #vg-tooltip-element table tr {\n border: none; }\n #vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px; }\n #vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px; }\n #vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left; }\n #vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white; }\n #vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf; }\n";const ae="vg-tooltip-element",se={offsetX:10,offsetY:10,id:ae,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function(e){return String(e).replace(/&/g,"&").replace(/t&&c(),a=t=n+1):"]"===r&&(a||ce("Access path missing open bracket: "+e),a>0&&c(),a=0,t=n+1):n>t?c():t=n+1}return a&&ce("Access path missing closing bracket: "+e),o&&ce("Access path missing closing quote: "+e),n>t&&(n++,c()),i}(e),r="return _["+n.map(he).join("][")+"];";le(Function("_",r),[e=1===n.length?n[0]:e],t||e)}("id"),le(function(e){return e},de,"identity"),le(function(){return 0},de,"zero"),le(function(){return 1},de,"one"),le(function(){return!0},de,"true"),le(function(){return!1},de,"false"),function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);ie?"[Object]":t.indexOf(r)>=0?"[Circular]":(t.push(r),r)}}(t))}class ve{constructor(e){this.options=Object.assign({},se,e);const t=this.options.id;if(this.call=this.tooltip_handler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const e=document.createElement("style");e.setAttribute("id",this.options.styleId),e.innerHTML=function(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return oe.toString().replace(ae,e)}(t);const n=document.head;n.childNodes.length>0?n.insertBefore(e,n.childNodes[0]):n.appendChild(e)}this.el=document.getElementById(t),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",t),this.el.classList.add("vg-tooltip"),document.body.appendChild(this.el))}tooltip_handler(e,t,n,r){if(null==r||""===r)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=function(e,t,n){if(ue(e))return`[${e.map(e=>t(pe(e)?e:me(e,n))).join(", ")}]`;if(fe(e)){let r="";const i=e,{title:o}=i,a=ge(i,["title"]);o&&(r+=`

${t(o)}

`);const s=Object.keys(a);if(s.length>0){r+="";for(const e of s){let i=a[e];fe(i)&&(i=me(i,n)),r+=``}r+="
${t(e)}:${t(i)}
"}return r||"{}"}return t(e)}(r,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:i,y:o}=function(e,t,n,r){let i=e.clientX+n;i+t.width>window.innerWidth&&(i=+e.clientX-n-t.width);let o=e.clientY+r;return o+t.height>window.innerHeight&&(o=+e.clientY-r-t.height),{x:i,y:o}}(t,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.setAttribute("style",`top: ${o}px; left: ${i}px`)}}var be='.vega-embed {\n position: relative;\n display: inline-block;\n padding-right: 38px; }\n .vega-embed details:not([open]) > :not(summary) {\n display: none !important; }\n .vega-embed summary {\n list-style: none;\n display: flex;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n outline: none;\n cursor: pointer; }\n .vega-embed summary::-webkit-details-marker {\n display: none; }\n .vega-embed details[open] summary {\n opacity: 0.7; }\n .vega-embed:hover summary,\n .vega-embed:focus summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease; }\n .vega-embed .vega-actions {\n position: absolute;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5); }\n .vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none; }\n .vega-embed .vega-actions a:hover {\n background-color: #f7f7f9;\n color: black; }\n .vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: "";\n display: inline-block;\n position: absolute; }\n .vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid #0000;\n border-bottom-color: #d9d9d9; }\n .vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid #0000;\n border-bottom-color: #fff; }\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: scroll;\n padding-right: 14px; }\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6); }\n to {\n opacity: 1;\n transform: scale(1); } }\n';function ye(t,n){if("object"!=typeof n||null===n)return t;for(const r in n)n.hasOwnProperty(r)&&void 0!==n[r]&&("object"!=typeof n[r]||e.isArray(n[r])||null===n[r]?t[r]=n[r]:"object"!=typeof t[r]||null===t[r]?t[r]=we(e.isArray(n[r].constructor)?[]:{},n[r]):we(t[r],n[r]));return t}function we(e,...t){for(const n of t)e=ye(e,n);return e}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return this.substr(!t||t<0?0:+t,e.length)===e});const xe=e,_e=t,Se={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},ke={vega:"Vega","vega-lite":"Vega-Lite"},Ce={vega:xe.version,"vega-lite":_e?_e.version:"not available"},Ee={vega:e=>e,"vega-lite":(e,t)=>_e.compile(e,{config:t}).spec},Ae='\n\n \n \n \n';function Oe(e,t,n,r){const i=`${t}
`,o=`
${n}`,a=window.open("");a.document.write(i+e+o),a.document.title=`${ke[r]} JSON Source`}function je(e,t,n={}){return D(this,void 0,void 0,function*(){const r=(i=n.loader)&&"load"in i?n.loader:xe.loader(n.loader);var i;if(xe.isString(t)){const i=yield r.load(t);return je(e,JSON.parse(i),n)}const o=(n=we(n,t.usermeta&&t.usermeta.embedOptions)).patch||n.onBeforeParse,a=!0===n.actions||!1===n.actions?n.actions:we({},{export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},n.actions||{}),s=Object.assign({},Se,n.i18n),l=n.renderer||"canvas",c=n.logLevel||xe.Warn,u=n.downloadFileName||"visualization";let f=n.config||{};if(xe.isString(f)){const i=yield r.load(f);return je(e,t,Object.assign({},n,{config:JSON.parse(i)}))}if(!1!==n.defaultStyle){const e="vega-embed-style";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.innerText=void 0===n.defaultStyle||!0===n.defaultStyle?be.toString():n.defaultStyle,document.head.appendChild(t)}}n.theme&&(f=we({},ie[n.theme],f));const p=function(e,t){if(e.$schema){const n=U(e.$schema);t&&t!==n.library&&console.warn(`The given visualization spec is written in ${ke[n.library]}, but mode argument sets ${ke[t]||t}.`);const r=n.library;return H(Ce[r],`^${n.version.slice(1)}`)||console.warn(`The input spec uses ${r} ${n.version}, but the current version of ${ke[r]} is ${Ce[r]}.`),r}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":t||"vega"}(t,n.mode);let h=Ee[p](t,f);if("vega-lite"===p&&h.$schema){const e=U(h.$schema);H(Ce.vega,`^${e.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${e.version}, but current version is ${Ce.vega}.`)}const d=(g=e,"string"==typeof g?new W([[document.querySelector(g)]],[document.documentElement]):new W([[g]],I)).classed("vega-embed",!0).html("");var g;if(o)if(o instanceof Function)h=o(h);else if(xe.isString(o)){const e=yield r.load(o);h=we(h,JSON.parse(e))}else h=we(h,o);const m=xe.parse(h,"vega-lite"===p?{}:f),v=new xe.View(m,{loader:r,logLevel:c,renderer:l});if(!1!==n.tooltip){let e;e="function"==typeof n.tooltip?n.tooltip:new ve(!0===n.tooltip?{}:n.tooltip).call,v.tooltip(e)}let{hover:b}=n;if(void 0===b&&(b="vega-lite"!==p),b){const{hoverSet:e,updateSet:t}="boolean"==typeof b?{}:b;v.hover(e,t)}if(n&&(n.width&&v.width(n.width),n.height&&v.height(n.height),n.padding&&v.padding(n.padding)),yield v.initialize(e).runAsync(),!1!==a){let e=d;if(!1!==n.defaultStyle){const t=d.append("details").attr("title",s.CLICK_TO_VIEW_ACTIONS);e=t,t.insert("summary").html(Ae);const n=t.node();document.addEventListener("click",e=>{n.contains(e.target)||n.removeAttribute("open")})}const r=e.insert("div").attr("class","vega-actions");if(!0===a||!1!==a.export)for(const e of["svg","png"])if(!0===a||!0===a.export||a.export[e]){const t=s[`${e.toUpperCase()}_ACTION`];r.append("a").text(t).attr("href","#").attr("target","_blank").attr("download",`${u}.${e}`).on("mousedown",function(){v.toImageURL(e,n.scaleFactor).then(e=>{this.href=e}).catch(e=>{throw e}),z.preventDefault()})}if(!0!==a&&!1===a.source||r.append("a").text(s.SOURCE_ACTION).attr("href","#").on("mousedown",()=>{Oe(V(t),n.sourceHeader||"",n.sourceFooter||"",p),z.preventDefault()}),"vega-lite"!==p||!0!==a&&!1===a.compiled||r.append("a").text(s.COMPILED_ACTION).attr("href","#").on("mousedown",()=>{Oe(V(h),n.sourceHeader||"",n.sourceFooter||"","vega"),z.preventDefault()}),!0===a||!1!==a.editor){const e=n.editorUrl||"https://vega.github.io/editor/";r.append("a").text(s.EDITOR_ACTION).attr("href","#").on("mousedown",()=>{!function(e,t,n){const r=e.open(t),i=250;let o=~~(1e4/i);e.addEventListener("message",function t(n){n.source===r&&(o=0,e.removeEventListener("message",t,!1))},!1),setTimeout(function e(){o<=0||(r.postMessage(n,"*"),setTimeout(e,i),o-=1)},i)}(window,e,{config:f,mode:p,renderer:l,spec:V(t)}),z.preventDefault()})}}return{view:v,spec:t,vgSpec:h}})}function ze(e,t={}){return D(this,void 0,void 0,function*(){const n=document.createElement("div");n.classList.add("vega-embed-wrapper");const r=document.createElement("div");n.appendChild(r);const i=!0===t.actions||!1===t.actions?t.actions:Object.assign({export:!0,source:!1,compiled:!0,editor:!0},t.actions||{}),o=yield je(r,e,Object.assign({actions:i},t||{}));return n.value=o.view,n})}const Ne=(...t)=>t.length>1&&(e.isString(t[0])&&!function(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")}(t[0])||function(e){return e instanceof L||"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}(t[0])||3===t.length)?je(t[0],t[1],t[2]):ze(t[0],t[1]);return Ne.vl=_e,Ne.container=ze,Ne.embed=je,Ne.vega=xe,Ne.default=je,Ne.version=B,Ne});