Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

datagovsg-plottable-charts

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datagovsg-plottable-charts - npm Package Compare versions

Comparing version 3.4.2 to 3.4.3

25

dist/es/PivotTable.js

@@ -109,10 +109,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

data.forEach(function (g) {
var labels = {};
g._items.forEach(function (d) {
var groupValue = _get(d, field);
labels[groupValue] = groupValue;
});
var grouped = _groupBy(g._items, function (d) {
return _get(d, field);
});
Object.keys(grouped).forEach(function (groupValue) {
var items = grouped[groupValue];
Object.keys(grouped).forEach(function (groupKey) {
var items = grouped[groupKey];
if (items.length === 0) return;
result.push({
_group: Object.assign({}, g._group, _defineProperty({}, field, groupValue)),
_group: Object.assign({}, g._group, _defineProperty({}, field, labels[groupKey])),
_items: items,

@@ -136,7 +141,15 @@ _summaries: []

return data.map(function (g) {
var grouped = _groupBy(g._items, labelField);
var labels = {};
g._items.forEach(function (d) {
var groupValue = _get(d, labelField);
labels[groupValue] = groupValue;
});
var grouped = _groupBy(g._items, function (d) {
return _get(d, labelField);
});
var series = [];
var decimalPlaces = 0;
Object.keys(grouped).forEach(function (label) {
var values = grouped[label].map(function (d) {
Object.keys(grouped).forEach(function (groupKey) {
var label = labels[groupKey];
var values = grouped[groupKey].map(function (d) {
return +_get(d, valueField);

@@ -143,0 +156,0 @@ }).filter(function (d) {

@@ -137,10 +137,15 @@ 'use strict';

data.forEach(function (g) {
var labels = {};
g._items.forEach(function (d) {
var groupValue = (0, _get3.default)(d, field);
labels[groupValue] = groupValue;
});
var grouped = (0, _groupBy3.default)(g._items, function (d) {
return (0, _get3.default)(d, field);
});
Object.keys(grouped).forEach(function (groupValue) {
var items = grouped[groupValue];
Object.keys(grouped).forEach(function (groupKey) {
var items = grouped[groupKey];
if (items.length === 0) return;
result.push({
_group: Object.assign({}, g._group, _defineProperty({}, field, groupValue)),
_group: Object.assign({}, g._group, _defineProperty({}, field, labels[groupKey])),
_items: items,

@@ -164,7 +169,15 @@ _summaries: []

return data.map(function (g) {
var grouped = (0, _groupBy3.default)(g._items, labelField);
var labels = {};
g._items.forEach(function (d) {
var groupValue = (0, _get3.default)(d, labelField);
labels[groupValue] = groupValue;
});
var grouped = (0, _groupBy3.default)(g._items, function (d) {
return (0, _get3.default)(d, labelField);
});
var series = [];
var decimalPlaces = 0;
Object.keys(grouped).forEach(function (label) {
var values = grouped[label].map(function (d) {
Object.keys(grouped).forEach(function (groupKey) {
var label = labels[groupKey];
var values = grouped[groupKey].map(function (d) {
return +(0, _get3.default)(d, valueField);

@@ -171,0 +184,0 @@ }).filter(function (d) {

@@ -1,1 +0,1 @@

!function(){"use strict";function t(t,n){return n={exports:{}},t(n,n.exports),n.exports}function n(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function r(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function e(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function o(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError(yt);var r=function(){var e=arguments,o=n?n.apply(this,e):e[0],u=r.cache;if(u.has(o))return u.get(o);var i=t.apply(this,e);return r.cache=u.set(o,i)||u,i};return r.cache=new(o.Cache||vt),r}function u(t){if("string"==typeof t)return t;if(l(t))return mt(t,u)+"";if(P(t))return At?At.call(t):"";var n=t+"";return"0"==n&&1/t==-Ot?"-0":n}function i(t){var n=this.__data__=new st(t);this.size=n.size}function c(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new vt;++n<r;)this.add(t[n])}function a(t,n,r,e,o){return t===n||(null==t||null==n||!E(t)&&!E(n)?t!==t&&n!==n:vr(t,n,r,e,a,o))}function f(t){var n=["na","-","s"];return!t&&0!==t||n.indexOf(t.toString().trim().toLowerCase())>-1}function s(t){return t.reduce(function(t,n){var r=n.toString(),e=r.indexOf(".")+1;return e>0?Math.max(r.length-e,t):t},0)}var l=Array.isArray,p="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h="object"==typeof p&&p&&p.Object===Object&&p,v="object"==typeof self&&self&&self.Object===Object&&self,y=h||v||Function("return this")(),b=y.Symbol,_=Object.prototype,d=_.hasOwnProperty,g=_.toString,j=b?b.toStringTag:void 0,w=function(t){var n=d.call(t,j),r=t[j];try{t[j]=void 0;var e=!0}catch(t){}var o=g.call(t);return e&&(n?t[j]=r:delete t[j]),o},m=Object.prototype.toString,O=function(t){return m.call(t)},x="[object Null]",A="[object Undefined]",S=b?b.toStringTag:void 0,k=function(t){return null==t?void 0===t?A:x:S&&S in Object(t)?w(t):O(t)},E=function(t){return null!=t&&"object"==typeof t},z="[object Symbol]",P=function(t){return"symbol"==typeof t||E(t)&&k(t)==z},T=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,F=/^\w*$/,M=function(t,n){if(l(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!P(t))||F.test(t)||!T.test(t)||null!=n&&t in Object(n)},I=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)},$="[object AsyncFunction]",B="[object Function]",D="[object GeneratorFunction]",C="[object Proxy]",L=function(t){if(!I(t))return!1;var n=k(t);return n==B||n==D||n==$||n==C},U=y["__core-js_shared__"],V=function(){var t=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),R=function(t){return!!V&&V in t},W=Function.prototype.toString,N=function(t){if(null!=t){try{return W.call(t)}catch(t){}try{return t+""}catch(t){}}return""},G=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,H=Function.prototype,J=Object.prototype,K=H.toString,Q=J.hasOwnProperty,X=RegExp("^"+K.call(Q).replace(G,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=function(t){return!(!I(t)||R(t))&&(L(t)?X:q).test(N(t))},Z=function(t,n){return null==t?void 0:t[n]},tt=function(t,n){var r=Z(t,n);return Y(r)?r:void 0},nt=tt(Object,"create"),rt="__lodash_hash_undefined__",et=Object.prototype.hasOwnProperty,ot=Object.prototype.hasOwnProperty,ut="__lodash_hash_undefined__";n.prototype.clear=function(){this.__data__=nt?nt(null):{},this.size=0},n.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},n.prototype.get=function(t){var n=this.__data__;if(nt){var r=n[t];return r===rt?void 0:r}return et.call(n,t)?n[t]:void 0},n.prototype.has=function(t){var n=this.__data__;return nt?void 0!==n[t]:ot.call(n,t)},n.prototype.set=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=nt&&void 0===n?ut:n,this};var it=n,ct=function(t,n){return t===n||t!==t&&n!==n},at=function(t,n){for(var r=t.length;r--;)if(ct(t[r][0],n))return r;return-1},ft=Array.prototype.splice;r.prototype.clear=function(){this.__data__=[],this.size=0},r.prototype.delete=function(t){var n=this.__data__,r=at(n,t);return!(r<0||(r==n.length-1?n.pop():ft.call(n,r,1),--this.size,0))},r.prototype.get=function(t){var n=this.__data__,r=at(n,t);return r<0?void 0:n[r][1]},r.prototype.has=function(t){return at(this.__data__,t)>-1},r.prototype.set=function(t,n){var r=this.__data__,e=at(r,t);return e<0?(++this.size,r.push([t,n])):r[e][1]=n,this};var st=r,lt=tt(y,"Map"),pt=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t},ht=function(t,n){var r=t.__data__;return pt(n)?r["string"==typeof n?"string":"hash"]:r.map};e.prototype.clear=function(){this.size=0,this.__data__={hash:new it,map:new(lt||st),string:new it}},e.prototype.delete=function(t){var n=ht(this,t).delete(t);return this.size-=n?1:0,n},e.prototype.get=function(t){return ht(this,t).get(t)},e.prototype.has=function(t){return ht(this,t).has(t)},e.prototype.set=function(t,n){var r=ht(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this};var vt=e,yt="Expected a function";o.Cache=vt;var bt=o,_t=500,dt=/^\./,gt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jt=/\\(\\)?/g,wt=function(t){var n=bt(t,function(t){return r.size===_t&&r.clear(),t}),r=n.cache;return n}(function(t){var n=[];return dt.test(t)&&n.push(""),t.replace(gt,function(t,r,e,o){n.push(e?o.replace(jt,"$1"):r||t)}),n}),mt=function(t,n){for(var r=-1,e=null==t?0:t.length,o=Array(e);++r<e;)o[r]=n(t[r],r,t);return o},Ot=1/0,xt=b?b.prototype:void 0,At=xt?xt.toString:void 0,St=u,kt=function(t){return null==t?"":St(t)},Et=function(t,n){return l(t)?t:M(t,n)?[t]:wt(kt(t))},zt=1/0,Pt=function(t){if("string"==typeof t||P(t))return t;var n=t+"";return"0"==n&&1/t==-zt?"-0":n},Tt=function(t,n){for(var r=0,e=(n=Et(n,t)).length;null!=t&&r<e;)t=t[Pt(n[r++])];return r&&r==e?t:void 0},Ft=function(t,n,r){var e=null==t?void 0:Tt(t,n);return void 0===e?r:e},Mt=function(){try{var t=tt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),It=function(t,n,r){"__proto__"==n&&Mt?Mt(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r},$t=function(t,n,r,e){for(var o=-1,u=null==t?0:t.length;++o<u;){var i=t[o];n(e,i,r(i),t)}return e},Bt=function(t){return function(n,r,e){for(var o=-1,u=Object(n),i=e(n),c=i.length;c--;){var a=i[t?c:++o];if(!1===r(u[a],a,u))break}return n}}(),Dt=function(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e},Ct="[object Arguments]",Lt=function(t){return E(t)&&k(t)==Ct},Ut=Object.prototype,Vt=Ut.hasOwnProperty,Rt=Ut.propertyIsEnumerable,Wt=Lt(function(){return arguments}())?Lt:function(t){return E(t)&&Vt.call(t,"callee")&&!Rt.call(t,"callee")},Nt=function(){return!1},Gt=t(function(t,n){var r=n&&!n.nodeType&&n,e=r&&!0&&t&&!t.nodeType&&t,o=e&&e.exports===r?y.Buffer:void 0,u=(o?o.isBuffer:void 0)||Nt;t.exports=u}),qt=9007199254740991,Ht=/^(?:0|[1-9]\d*)$/,Jt=function(t,n){return!!(n=null==n?qt:n)&&("number"==typeof t||Ht.test(t))&&t>-1&&t%1==0&&t<n},Kt=9007199254740991,Qt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Kt},Xt={};Xt["[object Float32Array]"]=Xt["[object Float64Array]"]=Xt["[object Int8Array]"]=Xt["[object Int16Array]"]=Xt["[object Int32Array]"]=Xt["[object Uint8Array]"]=Xt["[object Uint8ClampedArray]"]=Xt["[object Uint16Array]"]=Xt["[object Uint32Array]"]=!0,Xt["[object Arguments]"]=Xt["[object Array]"]=Xt["[object ArrayBuffer]"]=Xt["[object Boolean]"]=Xt["[object DataView]"]=Xt["[object Date]"]=Xt["[object Error]"]=Xt["[object Function]"]=Xt["[object Map]"]=Xt["[object Number]"]=Xt["[object Object]"]=Xt["[object RegExp]"]=Xt["[object Set]"]=Xt["[object String]"]=Xt["[object WeakMap]"]=!1;var Yt=function(t){return function(n){return t(n)}},Zt=t(function(t,n){var r=n&&!n.nodeType&&n,e=r&&!0&&t&&!t.nodeType&&t,o=e&&e.exports===r&&h.process,u=function(){try{return o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=u}),tn=Zt&&Zt.isTypedArray,nn=tn?Yt(tn):function(t){return E(t)&&Qt(t.length)&&!!Xt[k(t)]},rn=Object.prototype.hasOwnProperty,en=function(t,n){var r=l(t),e=!r&&Wt(t),o=!r&&!e&&Gt(t),u=!r&&!e&&!o&&nn(t),i=r||e||o||u,c=i?Dt(t.length,String):[],a=c.length;for(var f in t)!n&&!rn.call(t,f)||i&&("length"==f||o&&("offset"==f||"parent"==f)||u&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Jt(f,a))||c.push(f);return c},on=Object.prototype,un=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||on)},cn=function(t,n){return function(r){return t(n(r))}}(Object.keys,Object),an=Object.prototype.hasOwnProperty,fn=function(t){if(!un(t))return cn(t);var n=[];for(var r in Object(t))an.call(t,r)&&"constructor"!=r&&n.push(r);return n},sn=function(t){return null!=t&&Qt(t.length)&&!L(t)},ln=function(t){return sn(t)?en(t):fn(t)},pn=function(t,n){return function(r,e){if(null==r)return r;if(!sn(r))return t(r,e);for(var o=r.length,u=n?o:-1,i=Object(r);(n?u--:++u<o)&&!1!==e(i[u],u,i););return r}}(function(t,n){return t&&Bt(t,n,ln)}),hn=function(t,n,r,e){return pn(t,function(t,o,u){n(e,t,r(t),u)}),e},vn=200;i.prototype.clear=function(){this.__data__=new st,this.size=0},i.prototype.delete=function(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r},i.prototype.get=function(t){return this.__data__.get(t)},i.prototype.has=function(t){return this.__data__.has(t)},i.prototype.set=function(t,n){var r=this.__data__;if(r instanceof st){var e=r.__data__;if(!lt||e.length<vn-1)return e.push([t,n]),this.size=++r.size,this;r=this.__data__=new vt(e)}return r.set(t,n),this.size=r.size,this};var yn=i,bn="__lodash_hash_undefined__";c.prototype.add=c.prototype.push=function(t){return this.__data__.set(t,bn),this},c.prototype.has=function(t){return this.__data__.has(t)};var _n=c,dn=function(t,n){for(var r=-1,e=null==t?0:t.length;++r<e;)if(n(t[r],r,t))return!0;return!1},gn=function(t,n){return t.has(n)},jn=1,wn=2,mn=function(t,n,r,e,o,u){var i=r&jn,c=t.length,a=n.length;if(c!=a&&!(i&&a>c))return!1;var f=u.get(t);if(f&&u.get(n))return f==n;var s=-1,l=!0,p=r&wn?new _n:void 0;for(u.set(t,n),u.set(n,t);++s<c;){var h=t[s],v=n[s];if(e)var y=i?e(v,h,s,n,t,u):e(h,v,s,t,n,u);if(void 0!==y){if(y)continue;l=!1;break}if(p){if(!dn(n,function(t,n){if(!gn(p,n)&&(h===t||o(h,t,r,e,u)))return p.push(n)})){l=!1;break}}else if(h!==v&&!o(h,v,r,e,u)){l=!1;break}}return u.delete(t),u.delete(n),l},On=y.Uint8Array,xn=function(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r},An=function(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r},Sn=1,kn=2,En="[object Boolean]",zn="[object Date]",Pn="[object Error]",Tn="[object Map]",Fn="[object Number]",Mn="[object RegExp]",In="[object Set]",$n="[object String]",Bn="[object Symbol]",Dn="[object ArrayBuffer]",Cn="[object DataView]",Ln=b?b.prototype:void 0,Un=Ln?Ln.valueOf:void 0,Vn=function(t,n,r,e,o,u,i){switch(r){case Cn:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case Dn:return!(t.byteLength!=n.byteLength||!u(new On(t),new On(n)));case En:case zn:case Fn:return ct(+t,+n);case Pn:return t.name==n.name&&t.message==n.message;case Mn:case $n:return t==n+"";case Tn:var c=xn;case In:var a=e&Sn;if(c||(c=An),t.size!=n.size&&!a)return!1;var f=i.get(t);if(f)return f==n;e|=kn,i.set(t,n);var s=mn(c(t),c(n),e,o,u,i);return i.delete(t),s;case Bn:if(Un)return Un.call(t)==Un.call(n)}return!1},Rn=function(t,n){for(var r=-1,e=n.length,o=t.length;++r<e;)t[o+r]=n[r];return t},Wn=function(t,n,r){var e=n(t);return l(t)?e:Rn(e,r(t))},Nn=function(t,n){for(var r=-1,e=null==t?0:t.length,o=0,u=[];++r<e;){var i=t[r];n(i,r,t)&&(u[o++]=i)}return u},Gn=Object.prototype.propertyIsEnumerable,qn=Object.getOwnPropertySymbols,Hn=qn?function(t){return null==t?[]:(t=Object(t),Nn(qn(t),function(n){return Gn.call(t,n)}))}:function(){return[]},Jn=function(t){return Wn(t,ln,Hn)},Kn=1,Qn=Object.prototype.hasOwnProperty,Xn=function(t,n,r,e,o,u){var i=r&Kn,c=Jn(t),a=c.length;if(a!=Jn(n).length&&!i)return!1;for(var f=a;f--;){var s=c[f];if(!(i?s in n:Qn.call(n,s)))return!1}var l=u.get(t);if(l&&u.get(n))return l==n;var p=!0;u.set(t,n),u.set(n,t);for(var h=i;++f<a;){var v=t[s=c[f]],y=n[s];if(e)var b=i?e(y,v,s,n,t,u):e(v,y,s,t,n,u);if(!(void 0===b?v===y||o(v,y,r,e,u):b)){p=!1;break}h||(h="constructor"==s)}if(p&&!h){var _=t.constructor,d=n.constructor;_!=d&&"constructor"in t&&"constructor"in n&&!("function"==typeof _&&_ instanceof _&&"function"==typeof d&&d instanceof d)&&(p=!1)}return u.delete(t),u.delete(n),p},Yn=tt(y,"DataView"),Zn=tt(y,"Promise"),tr=tt(y,"Set"),nr=tt(y,"WeakMap"),rr=N(Yn),er=N(lt),or=N(Zn),ur=N(tr),ir=N(nr),cr=k;(Yn&&"[object DataView]"!=cr(new Yn(new ArrayBuffer(1)))||lt&&"[object Map]"!=cr(new lt)||Zn&&"[object Promise]"!=cr(Zn.resolve())||tr&&"[object Set]"!=cr(new tr)||nr&&"[object WeakMap]"!=cr(new nr))&&(cr=function(t){var n=k(t),r="[object Object]"==n?t.constructor:void 0,e=r?N(r):"";if(e)switch(e){case rr:return"[object DataView]";case er:return"[object Map]";case or:return"[object Promise]";case ur:return"[object Set]";case ir:return"[object WeakMap]"}return n});var ar=cr,fr=1,sr="[object Arguments]",lr="[object Array]",pr="[object Object]",hr=Object.prototype.hasOwnProperty,vr=function(t,n,r,e,o,u){var i=l(t),c=l(n),a=i?lr:ar(t),f=c?lr:ar(n),s=(a=a==sr?pr:a)==pr,p=(f=f==sr?pr:f)==pr,h=a==f;if(h&&Gt(t)){if(!Gt(n))return!1;i=!0,s=!1}if(h&&!s)return u||(u=new yn),i||nn(t)?mn(t,n,r,e,o,u):Vn(t,n,a,r,e,o,u);if(!(r&fr)){var v=s&&hr.call(t,"__wrapped__"),y=p&&hr.call(n,"__wrapped__");if(v||y){var b=v?t.value():t,_=y?n.value():n;return u||(u=new yn),o(b,_,r,e,u)}}return!!h&&(u||(u=new yn),Xn(t,n,r,e,o,u))},yr=a,br=1,_r=2,dr=function(t,n,r,e){var o=r.length,u=o,i=!e;if(null==t)return!u;for(t=Object(t);o--;){var c=r[o];if(i&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<u;){var a=(c=r[o])[0],f=t[a],s=c[1];if(i&&c[2]){if(void 0===f&&!(a in t))return!1}else{var l=new yn;if(e)var p=e(f,s,a,t,n,l);if(!(void 0===p?yr(s,f,br|_r,e,l):p))return!1}}return!0},gr=function(t){return t===t&&!I(t)},jr=function(t){for(var n=ln(t),r=n.length;r--;){var e=n[r],o=t[e];n[r]=[e,o,gr(o)]}return n},wr=function(t,n){return function(r){return null!=r&&r[t]===n&&(void 0!==n||t in Object(r))}},mr=function(t){var n=jr(t);return 1==n.length&&n[0][2]?wr(n[0][0],n[0][1]):function(r){return r===t||dr(r,t,n)}},Or=function(t,n){return null!=t&&n in Object(t)},xr=function(t,n,r){for(var e=-1,o=(n=Et(n,t)).length,u=!1;++e<o;){var i=Pt(n[e]);if(!(u=null!=t&&r(t,i)))break;t=t[i]}return u||++e!=o?u:!!(o=null==t?0:t.length)&&Qt(o)&&Jt(i,o)&&(l(t)||Wt(t))},Ar=function(t,n){return null!=t&&xr(t,n,Or)},Sr=1,kr=2,Er=function(t,n){return M(t)&&gr(n)?wr(Pt(t),n):function(r){var e=Ft(r,t);return void 0===e&&e===n?Ar(r,t):yr(n,e,Sr|kr)}},zr=function(t){return t},Pr=function(t){return function(n){return null==n?void 0:n[t]}},Tr=function(t){return function(n){return Tt(n,t)}},Fr=function(t){return M(t)?Pr(Pt(t)):Tr(t)},Mr=function(t){return"function"==typeof t?t:null==t?zr:"object"==typeof t?l(t)?Er(t[0],t[1]):mr(t):Fr(t)},Ir=function(t,n){return function(r,e){var o=l(r)?$t:hn,u=n?n():{};return o(r,t,Mr(e,2),u)}},$r=Object.prototype.hasOwnProperty,Br=Ir(function(t,n,r){$r.call(t,r)?t[r].push(n):It(t,r,[n])}),Dr=function(t,n){for(var r,e=-1,o=t.length;++e<o;){var u=n(t[e]);void 0!==u&&(r=void 0===r?u:r+u)}return r},Cr=function(t){return t&&t.length?Dr(t,zr):0},Lr=function(t,n,r){for(var e=-1,o=t.length;++e<o;){var u=t[e],i=n(u);if(null!=i&&(void 0===c?i===i&&!P(i):r(i,c)))var c=i,a=u}return a},Ur=function(t,n){return t<n},Vr=function(t){return t&&t.length?Lr(t,zr,Ur):void 0},Rr=function(t,n){return t>n},Wr=function(t){return t&&t.length?Lr(t,zr,Rr):void 0},Nr=function(t,n,r,e){for(var o=t.length,u=r+(e?1:-1);e?u--:++u<o;)if(n(t[u],u,t))return u;return-1},Gr=function(t){return t!==t},qr=function(t,n,r){for(var e=r-1,o=t.length;++e<o;)if(t[e]===n)return e;return-1},Hr=function(t,n,r){return n===n?qr(t,n,r):Nr(t,Gr,r)},Jr=function(t,n){return!!(null==t?0:t.length)&&Hr(t,n,0)>-1},Kr=function(t,n,r){for(var e=-1,o=null==t?0:t.length;++e<o;)if(r(n,t[e]))return!0;return!1},Qr=tr&&1/An(new tr([,-0]))[1]==1/0?function(t){return new tr(t)}:function(){},Xr=200,Yr=function(t,n,r){var e=-1,o=Jr,u=t.length,i=!0,c=[],a=c;if(r)i=!1,o=Kr;else if(u>=Xr){var f=n?null:Qr(t);if(f)return An(f);i=!1,o=gn,a=new _n}else a=n?[]:c;t:for(;++e<u;){var s=t[e],l=n?n(s):s;if(s=r||0!==s?s:0,i&&l===l){for(var p=a.length;p--;)if(a[p]===l)continue t;n&&a.push(l),c.push(s)}else o(a,l,r)||(a!==c&&a.push(l),c.push(s))}return c},Zr=function(t){return t&&t.length?Yr(t):[]},te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ne=(function(){function t(t){this.value=t}function n(n){function r(o,u){try{var i=n[o](u),c=i.value;c instanceof t?Promise.resolve(c.value).then(function(t){r("next",t)},function(t){r("throw",t)}):e(i.done?"return":"normal",i.value)}catch(t){e("throw",t)}}function e(t,n){switch(t){case"return":o.resolve({value:n,done:!0});break;case"throw":o.reject(n);break;default:o.resolve({value:n,done:!1})}(o=o.next)?r(o.key,o.arg):u=null}var o,u;this._invoke=function(t,n){return new Promise(function(e,i){var c={key:t,arg:n,resolve:e,reject:i,next:null};u?u=u.next=c:(o=u=c,r(t,n))})},"function"!=typeof n.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(n.prototype[Symbol.asyncIterator]=function(){return this}),n.prototype.next=function(t){return this._invoke("next",t)},n.prototype.throw=function(t){return this._invoke("throw",t)},n.prototype.return=function(t){return this._invoke("return",t)}}(),function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}),re=function(){function t(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}(),ee=function(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t},oe=function(){function t(n){ne(this,t),this.data=n,this.transformations=[]}return re(t,[{key:"push",value:function(){var t;(t=this.transformations).push.apply(t,arguments)}},{key:"transform",value:function(t){var n=[{_group:{},_items:t=t||this.data,_summaries:[]}];return this.transformations.forEach(function(t){n=t(n)}),this.transformation=[],n}}]),t}(),ue={sum:function(t){return Cr(t)},avg:function(t){return Cr(t)/t.length},min:function(t){return Vr(t)},max:function(t){return Wr(t)},count:function(t){return t.length},countd:function(t){return Zr(t).length}};window.PivotTable=Object.assign(oe,{filterItems:function(t,n){var r=function(t,n){if("function"==typeof t)return t;if("string"!=typeof t)throw new TypeError;if("object"===(void 0===n?"undefined":te(n))){if("include"===n.type&&n.values instanceof Array)return function(r){return n.values.indexOf(Ft(r,t))>-1};if("exclude"===n.type&&n.values instanceof Array)return function(r){return n.values.indexOf(Ft(r,t))<0}}throw new TypeError}(t,n);return function(t){return t.map(function(t){return Object.assign({},t,{_items:t._items.filter(r)})})}},filterGroups:function(t,n){var r=function(t,n){if("function"==typeof t)return t;if("string"!=typeof t)throw new TypeError;if("object"===(void 0===n?"undefined":te(n))){if("include"===n.type&&n.values instanceof Array)return function(r){return n.values.indexOf(Ft(r,t))>-1};if("exclude"===n.type&&n.values instanceof Array)return function(r){return n.values.indexOf(Ft(r,t))<0}}throw new TypeError}(t,n);return function(t){return t.filter(function(t){return r(t._group)})}},groupItems:function(t){if("string"!=typeof t)throw new TypeError;return function(n){var r=[];return n.forEach(function(n){var e=Br(n._items,function(n){return Ft(n,t)});Object.keys(e).forEach(function(o){var u=e[o];0!==u.length&&r.push({_group:Object.assign({},n._group,ee({},t,o)),_items:u,_summaries:[]})})}),r}},aggregate:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sum";if("string"!=typeof t)throw new TypeError;if("string"!=typeof n)throw new TypeError;var e="string"==typeof r&&r in ue?ue[r]:r;if("function"==typeof e)return function(o){return o.map(function(o){var u=Br(o._items,t),i=[],c=0;return Object.keys(u).forEach(function(t){var r=u[t].map(function(t){return+Ft(t,n)}).filter(function(t){return!f(t)});r.length>0&&(c=Math.max(c,s(r)),i.push({label:t,value:e(r)}))}),c=Math.min(c,10),i.forEach(function(t){t.value=+t.value.toFixed(c)}),o._summaries.push({type:r,labelField:t,valueField:n,decimalPlaces:c,series:i}),o})};throw new TypeError}})}();
!function(){"use strict";function t(t,n){return n={exports:{}},t(n,n.exports),n.exports}function n(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function r(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function e(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function o(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError(yt);var r=function(){var e=arguments,o=n?n.apply(this,e):e[0],u=r.cache;if(u.has(o))return u.get(o);var i=t.apply(this,e);return r.cache=u.set(o,i)||u,i};return r.cache=new(o.Cache||vt),r}function u(t){if("string"==typeof t)return t;if(l(t))return mt(t,u)+"";if(P(t))return At?At.call(t):"";var n=t+"";return"0"==n&&1/t==-Ot?"-0":n}function i(t){var n=this.__data__=new st(t);this.size=n.size}function c(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new vt;++n<r;)this.add(t[n])}function a(t,n,r,e,o){return t===n||(null==t||null==n||!k(t)&&!k(n)?t!==t&&n!==n:vr(t,n,r,e,a,o))}function f(t){var n=["na","-","s"];return!t&&0!==t||n.indexOf(t.toString().trim().toLowerCase())>-1}function s(t){return t.reduce(function(t,n){var r=n.toString(),e=r.indexOf(".")+1;return e>0?Math.max(r.length-e,t):t},0)}var l=Array.isArray,p="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h="object"==typeof p&&p&&p.Object===Object&&p,v="object"==typeof self&&self&&self.Object===Object&&self,y=h||v||Function("return this")(),b=y.Symbol,_=Object.prototype,d=_.hasOwnProperty,g=_.toString,j=b?b.toStringTag:void 0,w=function(t){var n=d.call(t,j),r=t[j];try{t[j]=void 0;var e=!0}catch(t){}var o=g.call(t);return e&&(n?t[j]=r:delete t[j]),o},m=Object.prototype.toString,O=function(t){return m.call(t)},x="[object Null]",A="[object Undefined]",S=b?b.toStringTag:void 0,E=function(t){return null==t?void 0===t?A:x:S&&S in Object(t)?w(t):O(t)},k=function(t){return null!=t&&"object"==typeof t},z="[object Symbol]",P=function(t){return"symbol"==typeof t||k(t)&&E(t)==z},T=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,F=/^\w*$/,M=function(t,n){if(l(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!P(t))||F.test(t)||!T.test(t)||null!=n&&t in Object(n)},I=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)},$="[object AsyncFunction]",B="[object Function]",D="[object GeneratorFunction]",C="[object Proxy]",L=function(t){if(!I(t))return!1;var n=E(t);return n==B||n==D||n==$||n==C},U=y["__core-js_shared__"],V=function(){var t=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),R=function(t){return!!V&&V in t},W=Function.prototype.toString,N=function(t){if(null!=t){try{return W.call(t)}catch(t){}try{return t+""}catch(t){}}return""},G=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,H=Function.prototype,J=Object.prototype,K=H.toString,Q=J.hasOwnProperty,X=RegExp("^"+K.call(Q).replace(G,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=function(t){return!(!I(t)||R(t))&&(L(t)?X:q).test(N(t))},Z=function(t,n){return null==t?void 0:t[n]},tt=function(t,n){var r=Z(t,n);return Y(r)?r:void 0},nt=tt(Object,"create"),rt="__lodash_hash_undefined__",et=Object.prototype.hasOwnProperty,ot=Object.prototype.hasOwnProperty,ut="__lodash_hash_undefined__";n.prototype.clear=function(){this.__data__=nt?nt(null):{},this.size=0},n.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},n.prototype.get=function(t){var n=this.__data__;if(nt){var r=n[t];return r===rt?void 0:r}return et.call(n,t)?n[t]:void 0},n.prototype.has=function(t){var n=this.__data__;return nt?void 0!==n[t]:ot.call(n,t)},n.prototype.set=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=nt&&void 0===n?ut:n,this};var it=n,ct=function(t,n){return t===n||t!==t&&n!==n},at=function(t,n){for(var r=t.length;r--;)if(ct(t[r][0],n))return r;return-1},ft=Array.prototype.splice;r.prototype.clear=function(){this.__data__=[],this.size=0},r.prototype.delete=function(t){var n=this.__data__,r=at(n,t);return!(r<0||(r==n.length-1?n.pop():ft.call(n,r,1),--this.size,0))},r.prototype.get=function(t){var n=this.__data__,r=at(n,t);return r<0?void 0:n[r][1]},r.prototype.has=function(t){return at(this.__data__,t)>-1},r.prototype.set=function(t,n){var r=this.__data__,e=at(r,t);return e<0?(++this.size,r.push([t,n])):r[e][1]=n,this};var st=r,lt=tt(y,"Map"),pt=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t},ht=function(t,n){var r=t.__data__;return pt(n)?r["string"==typeof n?"string":"hash"]:r.map};e.prototype.clear=function(){this.size=0,this.__data__={hash:new it,map:new(lt||st),string:new it}},e.prototype.delete=function(t){var n=ht(this,t).delete(t);return this.size-=n?1:0,n},e.prototype.get=function(t){return ht(this,t).get(t)},e.prototype.has=function(t){return ht(this,t).has(t)},e.prototype.set=function(t,n){var r=ht(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this};var vt=e,yt="Expected a function";o.Cache=vt;var bt=o,_t=500,dt=/^\./,gt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jt=/\\(\\)?/g,wt=function(t){var n=bt(t,function(t){return r.size===_t&&r.clear(),t}),r=n.cache;return n}(function(t){var n=[];return dt.test(t)&&n.push(""),t.replace(gt,function(t,r,e,o){n.push(e?o.replace(jt,"$1"):r||t)}),n}),mt=function(t,n){for(var r=-1,e=null==t?0:t.length,o=Array(e);++r<e;)o[r]=n(t[r],r,t);return o},Ot=1/0,xt=b?b.prototype:void 0,At=xt?xt.toString:void 0,St=u,Et=function(t){return null==t?"":St(t)},kt=function(t,n){return l(t)?t:M(t,n)?[t]:wt(Et(t))},zt=1/0,Pt=function(t){if("string"==typeof t||P(t))return t;var n=t+"";return"0"==n&&1/t==-zt?"-0":n},Tt=function(t,n){for(var r=0,e=(n=kt(n,t)).length;null!=t&&r<e;)t=t[Pt(n[r++])];return r&&r==e?t:void 0},Ft=function(t,n,r){var e=null==t?void 0:Tt(t,n);return void 0===e?r:e},Mt=function(){try{var t=tt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),It=function(t,n,r){"__proto__"==n&&Mt?Mt(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r},$t=function(t,n,r,e){for(var o=-1,u=null==t?0:t.length;++o<u;){var i=t[o];n(e,i,r(i),t)}return e},Bt=function(t){return function(n,r,e){for(var o=-1,u=Object(n),i=e(n),c=i.length;c--;){var a=i[t?c:++o];if(!1===r(u[a],a,u))break}return n}}(),Dt=function(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e},Ct="[object Arguments]",Lt=function(t){return k(t)&&E(t)==Ct},Ut=Object.prototype,Vt=Ut.hasOwnProperty,Rt=Ut.propertyIsEnumerable,Wt=Lt(function(){return arguments}())?Lt:function(t){return k(t)&&Vt.call(t,"callee")&&!Rt.call(t,"callee")},Nt=function(){return!1},Gt=t(function(t,n){var r=n&&!n.nodeType&&n,e=r&&!0&&t&&!t.nodeType&&t,o=e&&e.exports===r?y.Buffer:void 0,u=(o?o.isBuffer:void 0)||Nt;t.exports=u}),qt=9007199254740991,Ht=/^(?:0|[1-9]\d*)$/,Jt=function(t,n){return!!(n=null==n?qt:n)&&("number"==typeof t||Ht.test(t))&&t>-1&&t%1==0&&t<n},Kt=9007199254740991,Qt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Kt},Xt={};Xt["[object Float32Array]"]=Xt["[object Float64Array]"]=Xt["[object Int8Array]"]=Xt["[object Int16Array]"]=Xt["[object Int32Array]"]=Xt["[object Uint8Array]"]=Xt["[object Uint8ClampedArray]"]=Xt["[object Uint16Array]"]=Xt["[object Uint32Array]"]=!0,Xt["[object Arguments]"]=Xt["[object Array]"]=Xt["[object ArrayBuffer]"]=Xt["[object Boolean]"]=Xt["[object DataView]"]=Xt["[object Date]"]=Xt["[object Error]"]=Xt["[object Function]"]=Xt["[object Map]"]=Xt["[object Number]"]=Xt["[object Object]"]=Xt["[object RegExp]"]=Xt["[object Set]"]=Xt["[object String]"]=Xt["[object WeakMap]"]=!1;var Yt=function(t){return function(n){return t(n)}},Zt=t(function(t,n){var r=n&&!n.nodeType&&n,e=r&&!0&&t&&!t.nodeType&&t,o=e&&e.exports===r&&h.process,u=function(){try{return o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=u}),tn=Zt&&Zt.isTypedArray,nn=tn?Yt(tn):function(t){return k(t)&&Qt(t.length)&&!!Xt[E(t)]},rn=Object.prototype.hasOwnProperty,en=function(t,n){var r=l(t),e=!r&&Wt(t),o=!r&&!e&&Gt(t),u=!r&&!e&&!o&&nn(t),i=r||e||o||u,c=i?Dt(t.length,String):[],a=c.length;for(var f in t)!n&&!rn.call(t,f)||i&&("length"==f||o&&("offset"==f||"parent"==f)||u&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Jt(f,a))||c.push(f);return c},on=Object.prototype,un=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||on)},cn=function(t,n){return function(r){return t(n(r))}}(Object.keys,Object),an=Object.prototype.hasOwnProperty,fn=function(t){if(!un(t))return cn(t);var n=[];for(var r in Object(t))an.call(t,r)&&"constructor"!=r&&n.push(r);return n},sn=function(t){return null!=t&&Qt(t.length)&&!L(t)},ln=function(t){return sn(t)?en(t):fn(t)},pn=function(t,n){return function(r,e){if(null==r)return r;if(!sn(r))return t(r,e);for(var o=r.length,u=n?o:-1,i=Object(r);(n?u--:++u<o)&&!1!==e(i[u],u,i););return r}}(function(t,n){return t&&Bt(t,n,ln)}),hn=function(t,n,r,e){return pn(t,function(t,o,u){n(e,t,r(t),u)}),e},vn=200;i.prototype.clear=function(){this.__data__=new st,this.size=0},i.prototype.delete=function(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r},i.prototype.get=function(t){return this.__data__.get(t)},i.prototype.has=function(t){return this.__data__.has(t)},i.prototype.set=function(t,n){var r=this.__data__;if(r instanceof st){var e=r.__data__;if(!lt||e.length<vn-1)return e.push([t,n]),this.size=++r.size,this;r=this.__data__=new vt(e)}return r.set(t,n),this.size=r.size,this};var yn=i,bn="__lodash_hash_undefined__";c.prototype.add=c.prototype.push=function(t){return this.__data__.set(t,bn),this},c.prototype.has=function(t){return this.__data__.has(t)};var _n=c,dn=function(t,n){for(var r=-1,e=null==t?0:t.length;++r<e;)if(n(t[r],r,t))return!0;return!1},gn=function(t,n){return t.has(n)},jn=1,wn=2,mn=function(t,n,r,e,o,u){var i=r&jn,c=t.length,a=n.length;if(c!=a&&!(i&&a>c))return!1;var f=u.get(t);if(f&&u.get(n))return f==n;var s=-1,l=!0,p=r&wn?new _n:void 0;for(u.set(t,n),u.set(n,t);++s<c;){var h=t[s],v=n[s];if(e)var y=i?e(v,h,s,n,t,u):e(h,v,s,t,n,u);if(void 0!==y){if(y)continue;l=!1;break}if(p){if(!dn(n,function(t,n){if(!gn(p,n)&&(h===t||o(h,t,r,e,u)))return p.push(n)})){l=!1;break}}else if(h!==v&&!o(h,v,r,e,u)){l=!1;break}}return u.delete(t),u.delete(n),l},On=y.Uint8Array,xn=function(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r},An=function(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r},Sn=1,En=2,kn="[object Boolean]",zn="[object Date]",Pn="[object Error]",Tn="[object Map]",Fn="[object Number]",Mn="[object RegExp]",In="[object Set]",$n="[object String]",Bn="[object Symbol]",Dn="[object ArrayBuffer]",Cn="[object DataView]",Ln=b?b.prototype:void 0,Un=Ln?Ln.valueOf:void 0,Vn=function(t,n,r,e,o,u,i){switch(r){case Cn:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case Dn:return!(t.byteLength!=n.byteLength||!u(new On(t),new On(n)));case kn:case zn:case Fn:return ct(+t,+n);case Pn:return t.name==n.name&&t.message==n.message;case Mn:case $n:return t==n+"";case Tn:var c=xn;case In:var a=e&Sn;if(c||(c=An),t.size!=n.size&&!a)return!1;var f=i.get(t);if(f)return f==n;e|=En,i.set(t,n);var s=mn(c(t),c(n),e,o,u,i);return i.delete(t),s;case Bn:if(Un)return Un.call(t)==Un.call(n)}return!1},Rn=function(t,n){for(var r=-1,e=n.length,o=t.length;++r<e;)t[o+r]=n[r];return t},Wn=function(t,n,r){var e=n(t);return l(t)?e:Rn(e,r(t))},Nn=function(t,n){for(var r=-1,e=null==t?0:t.length,o=0,u=[];++r<e;){var i=t[r];n(i,r,t)&&(u[o++]=i)}return u},Gn=Object.prototype.propertyIsEnumerable,qn=Object.getOwnPropertySymbols,Hn=qn?function(t){return null==t?[]:(t=Object(t),Nn(qn(t),function(n){return Gn.call(t,n)}))}:function(){return[]},Jn=function(t){return Wn(t,ln,Hn)},Kn=1,Qn=Object.prototype.hasOwnProperty,Xn=function(t,n,r,e,o,u){var i=r&Kn,c=Jn(t),a=c.length;if(a!=Jn(n).length&&!i)return!1;for(var f=a;f--;){var s=c[f];if(!(i?s in n:Qn.call(n,s)))return!1}var l=u.get(t);if(l&&u.get(n))return l==n;var p=!0;u.set(t,n),u.set(n,t);for(var h=i;++f<a;){var v=t[s=c[f]],y=n[s];if(e)var b=i?e(y,v,s,n,t,u):e(v,y,s,t,n,u);if(!(void 0===b?v===y||o(v,y,r,e,u):b)){p=!1;break}h||(h="constructor"==s)}if(p&&!h){var _=t.constructor,d=n.constructor;_!=d&&"constructor"in t&&"constructor"in n&&!("function"==typeof _&&_ instanceof _&&"function"==typeof d&&d instanceof d)&&(p=!1)}return u.delete(t),u.delete(n),p},Yn=tt(y,"DataView"),Zn=tt(y,"Promise"),tr=tt(y,"Set"),nr=tt(y,"WeakMap"),rr=N(Yn),er=N(lt),or=N(Zn),ur=N(tr),ir=N(nr),cr=E;(Yn&&"[object DataView]"!=cr(new Yn(new ArrayBuffer(1)))||lt&&"[object Map]"!=cr(new lt)||Zn&&"[object Promise]"!=cr(Zn.resolve())||tr&&"[object Set]"!=cr(new tr)||nr&&"[object WeakMap]"!=cr(new nr))&&(cr=function(t){var n=E(t),r="[object Object]"==n?t.constructor:void 0,e=r?N(r):"";if(e)switch(e){case rr:return"[object DataView]";case er:return"[object Map]";case or:return"[object Promise]";case ur:return"[object Set]";case ir:return"[object WeakMap]"}return n});var ar=cr,fr=1,sr="[object Arguments]",lr="[object Array]",pr="[object Object]",hr=Object.prototype.hasOwnProperty,vr=function(t,n,r,e,o,u){var i=l(t),c=l(n),a=i?lr:ar(t),f=c?lr:ar(n),s=(a=a==sr?pr:a)==pr,p=(f=f==sr?pr:f)==pr,h=a==f;if(h&&Gt(t)){if(!Gt(n))return!1;i=!0,s=!1}if(h&&!s)return u||(u=new yn),i||nn(t)?mn(t,n,r,e,o,u):Vn(t,n,a,r,e,o,u);if(!(r&fr)){var v=s&&hr.call(t,"__wrapped__"),y=p&&hr.call(n,"__wrapped__");if(v||y){var b=v?t.value():t,_=y?n.value():n;return u||(u=new yn),o(b,_,r,e,u)}}return!!h&&(u||(u=new yn),Xn(t,n,r,e,o,u))},yr=a,br=1,_r=2,dr=function(t,n,r,e){var o=r.length,u=o,i=!e;if(null==t)return!u;for(t=Object(t);o--;){var c=r[o];if(i&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<u;){var a=(c=r[o])[0],f=t[a],s=c[1];if(i&&c[2]){if(void 0===f&&!(a in t))return!1}else{var l=new yn;if(e)var p=e(f,s,a,t,n,l);if(!(void 0===p?yr(s,f,br|_r,e,l):p))return!1}}return!0},gr=function(t){return t===t&&!I(t)},jr=function(t){for(var n=ln(t),r=n.length;r--;){var e=n[r],o=t[e];n[r]=[e,o,gr(o)]}return n},wr=function(t,n){return function(r){return null!=r&&r[t]===n&&(void 0!==n||t in Object(r))}},mr=function(t){var n=jr(t);return 1==n.length&&n[0][2]?wr(n[0][0],n[0][1]):function(r){return r===t||dr(r,t,n)}},Or=function(t,n){return null!=t&&n in Object(t)},xr=function(t,n,r){for(var e=-1,o=(n=kt(n,t)).length,u=!1;++e<o;){var i=Pt(n[e]);if(!(u=null!=t&&r(t,i)))break;t=t[i]}return u||++e!=o?u:!!(o=null==t?0:t.length)&&Qt(o)&&Jt(i,o)&&(l(t)||Wt(t))},Ar=function(t,n){return null!=t&&xr(t,n,Or)},Sr=1,Er=2,kr=function(t,n){return M(t)&&gr(n)?wr(Pt(t),n):function(r){var e=Ft(r,t);return void 0===e&&e===n?Ar(r,t):yr(n,e,Sr|Er)}},zr=function(t){return t},Pr=function(t){return function(n){return null==n?void 0:n[t]}},Tr=function(t){return function(n){return Tt(n,t)}},Fr=function(t){return M(t)?Pr(Pt(t)):Tr(t)},Mr=function(t){return"function"==typeof t?t:null==t?zr:"object"==typeof t?l(t)?kr(t[0],t[1]):mr(t):Fr(t)},Ir=function(t,n){return function(r,e){var o=l(r)?$t:hn,u=n?n():{};return o(r,t,Mr(e,2),u)}},$r=Object.prototype.hasOwnProperty,Br=Ir(function(t,n,r){$r.call(t,r)?t[r].push(n):It(t,r,[n])}),Dr=function(t,n){for(var r,e=-1,o=t.length;++e<o;){var u=n(t[e]);void 0!==u&&(r=void 0===r?u:r+u)}return r},Cr=function(t){return t&&t.length?Dr(t,zr):0},Lr=function(t,n,r){for(var e=-1,o=t.length;++e<o;){var u=t[e],i=n(u);if(null!=i&&(void 0===c?i===i&&!P(i):r(i,c)))var c=i,a=u}return a},Ur=function(t,n){return t<n},Vr=function(t){return t&&t.length?Lr(t,zr,Ur):void 0},Rr=function(t,n){return t>n},Wr=function(t){return t&&t.length?Lr(t,zr,Rr):void 0},Nr=function(t,n,r,e){for(var o=t.length,u=r+(e?1:-1);e?u--:++u<o;)if(n(t[u],u,t))return u;return-1},Gr=function(t){return t!==t},qr=function(t,n,r){for(var e=r-1,o=t.length;++e<o;)if(t[e]===n)return e;return-1},Hr=function(t,n,r){return n===n?qr(t,n,r):Nr(t,Gr,r)},Jr=function(t,n){return!!(null==t?0:t.length)&&Hr(t,n,0)>-1},Kr=function(t,n,r){for(var e=-1,o=null==t?0:t.length;++e<o;)if(r(n,t[e]))return!0;return!1},Qr=tr&&1/An(new tr([,-0]))[1]==1/0?function(t){return new tr(t)}:function(){},Xr=200,Yr=function(t,n,r){var e=-1,o=Jr,u=t.length,i=!0,c=[],a=c;if(r)i=!1,o=Kr;else if(u>=Xr){var f=n?null:Qr(t);if(f)return An(f);i=!1,o=gn,a=new _n}else a=n?[]:c;t:for(;++e<u;){var s=t[e],l=n?n(s):s;if(s=r||0!==s?s:0,i&&l===l){for(var p=a.length;p--;)if(a[p]===l)continue t;n&&a.push(l),c.push(s)}else o(a,l,r)||(a!==c&&a.push(l),c.push(s))}return c},Zr=function(t){return t&&t.length?Yr(t):[]},te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ne=(function(){function t(t){this.value=t}function n(n){function r(o,u){try{var i=n[o](u),c=i.value;c instanceof t?Promise.resolve(c.value).then(function(t){r("next",t)},function(t){r("throw",t)}):e(i.done?"return":"normal",i.value)}catch(t){e("throw",t)}}function e(t,n){switch(t){case"return":o.resolve({value:n,done:!0});break;case"throw":o.reject(n);break;default:o.resolve({value:n,done:!1})}(o=o.next)?r(o.key,o.arg):u=null}var o,u;this._invoke=function(t,n){return new Promise(function(e,i){var c={key:t,arg:n,resolve:e,reject:i,next:null};u?u=u.next=c:(o=u=c,r(t,n))})},"function"!=typeof n.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(n.prototype[Symbol.asyncIterator]=function(){return this}),n.prototype.next=function(t){return this._invoke("next",t)},n.prototype.throw=function(t){return this._invoke("throw",t)},n.prototype.return=function(t){return this._invoke("return",t)}}(),function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}),re=function(){function t(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}(),ee=function(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t},oe=function(){function t(n){ne(this,t),this.data=n,this.transformations=[]}return re(t,[{key:"push",value:function(){var t;(t=this.transformations).push.apply(t,arguments)}},{key:"transform",value:function(t){var n=[{_group:{},_items:t=t||this.data,_summaries:[]}];return this.transformations.forEach(function(t){n=t(n)}),this.transformation=[],n}}]),t}(),ue={sum:function(t){return Cr(t)},avg:function(t){return Cr(t)/t.length},min:function(t){return Vr(t)},max:function(t){return Wr(t)},count:function(t){return t.length},countd:function(t){return Zr(t).length}};window.PivotTable=Object.assign(oe,{filterItems:function(t,n){var r=function(t,n){if("function"==typeof t)return t;if("string"!=typeof t)throw new TypeError;if("object"===(void 0===n?"undefined":te(n))){if("include"===n.type&&n.values instanceof Array)return function(r){return n.values.indexOf(Ft(r,t))>-1};if("exclude"===n.type&&n.values instanceof Array)return function(r){return n.values.indexOf(Ft(r,t))<0}}throw new TypeError}(t,n);return function(t){return t.map(function(t){return Object.assign({},t,{_items:t._items.filter(r)})})}},filterGroups:function(t,n){var r=function(t,n){if("function"==typeof t)return t;if("string"!=typeof t)throw new TypeError;if("object"===(void 0===n?"undefined":te(n))){if("include"===n.type&&n.values instanceof Array)return function(r){return n.values.indexOf(Ft(r,t))>-1};if("exclude"===n.type&&n.values instanceof Array)return function(r){return n.values.indexOf(Ft(r,t))<0}}throw new TypeError}(t,n);return function(t){return t.filter(function(t){return r(t._group)})}},groupItems:function(t){if("string"!=typeof t)throw new TypeError;return function(n){var r=[];return n.forEach(function(n){var e={};n._items.forEach(function(n){var r=Ft(n,t);e[r]=r});var o=Br(n._items,function(n){return Ft(n,t)});Object.keys(o).forEach(function(u){var i=o[u];0!==i.length&&r.push({_group:Object.assign({},n._group,ee({},t,e[u])),_items:i,_summaries:[]})})}),r}},aggregate:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sum";if("string"!=typeof t)throw new TypeError;if("string"!=typeof n)throw new TypeError;var e="string"==typeof r&&r in ue?ue[r]:r;if("function"==typeof e)return function(o){return o.map(function(o){var u={};o._items.forEach(function(n){var r=Ft(n,t);u[r]=r});var i=Br(o._items,function(n){return Ft(n,t)}),c=[],a=0;return Object.keys(i).forEach(function(t){var r=u[t],o=i[t].map(function(t){return+Ft(t,n)}).filter(function(t){return!f(t)});o.length>0&&(a=Math.max(a,s(o)),c.push({label:r,value:e(o)}))}),a=Math.min(a,10),c.forEach(function(t){t.value=+t.value.toFixed(a)}),o._summaries.push({type:r,labelField:t,valueField:n,decimalPlaces:a,series:c}),o})};throw new TypeError}})}();
{
"name": "datagovsg-plottable-charts",
"version": "3.4.2",
"version": "3.4.3",
"description": "Reusable Plottable chart components",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# datagovsg-plottable-charts
Generate beautifully styled charts like those on [data.gov.sg](https:data.gov.sg)
Reusable Plottable chart components
### Motivation
Generating a chart is easy, making it looks beautiful requires much more effort. Numerous charting libraries have been written to solves the basic problem of converting data to chart objects. Regardless of the library you choose, out-of-the-box defaults hardly produces the look you want.
Charts on Data.gov.sg are rendered using the **Plottable** library. Based on D3, it is highly flexible and gives you many low level controls to fine-tune every single detail. However, this power comes at the price of additional configurations. We want to abstract away these configurations by creating wrappers that pre-apply all the styles we want on our component. That's why we created this library.
### Some cool things it does
##### Tooltips
![popovers](public/popovers.png)
##### Pie chart labels
![outerlabels](public/outerlabels.png)
### Using the chart components

@@ -18,0 +5,0 @@ ```bash

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc