-
Notifications
You must be signed in to change notification settings - Fork 1
/
vendors~account.5ec4e5bfc097a5c73ff9.js
444 lines (356 loc) · 80.9 KB
/
vendors~account.5ec4e5bfc097a5c73ff9.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
(this["webpackJsonp"] = this["webpackJsonp"] || []).push([[30],{
/***/ 2950:
/***/ (function(module, exports) {
module.exports = {
compareTwoStrings,
findBestMatch
};
function compareTwoStrings (str1, str2) {
if (!str1.length && !str2.length) return 1; // if both are empty strings
if (!str1.length || !str2.length) return 0; // if only one is empty string
if (str1.toUpperCase() === str2.toUpperCase()) return 1; // identical
if (str1.length === 1 && str2.length === 1) return 0; // both are 1-letter strings
const pairs1 = wordLetterPairs(str1);
const pairs2 = wordLetterPairs(str2);
const union = pairs1.length + pairs2.length;
let intersection = 0;
pairs1.forEach(pair1 => {
for (let i = 0, pair2; pair2 = pairs2[i]; i++) {
if (pair1 !== pair2) continue;
intersection++;
pairs2.splice(i, 1);
break;
}
});
return intersection * 2 / union;
}
function findBestMatch (mainString, targetStrings) {
if (!areArgsValid(mainString, targetStrings)) throw new Error('Bad arguments: First argument should be a string, second should be an array of strings');
const ratings = targetStrings.map(target => ({ target, rating: compareTwoStrings(mainString, target) }));
const bestMatch = Array.from(ratings).sort((a, b) => b.rating - a.rating)[0];
return { ratings, bestMatch };
}
function flattenDeep (arr) {
return Array.isArray(arr) ? arr.reduce((a, b) => a.concat(flattenDeep(b)) , []) : [arr];
}
function areArgsValid (mainString, targetStrings) {
if (typeof mainString !== 'string') return false;
if (!Array.isArray(targetStrings)) return false;
if (!targetStrings.length) return false;
if (targetStrings.find(s => typeof s !== 'string')) return false;
return true;
}
function letterPairs (str) {
const pairs = [];
for (let i = 0, max = str.length - 1; i < max; i++) pairs[i] = str.substring(i, i + 2);
return pairs;
}
function wordLetterPairs (str) {
const pairs = str.toUpperCase().split(' ').map(letterPairs);
return flattenDeep(pairs);
}
/***/ }),
/***/ 2962:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2025);
/* harmony import */ var _baseMean_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2963);
/**
* This method is like `_.mean` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the value to be averaged.
* The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.7.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the mean.
* @example
*
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
*
* _.meanBy(objects, function(o) { return o.n; });
* // => 5
*
* // The `_.property` iteratee shorthand.
* _.meanBy(objects, 'n');
* // => 5
*/
function meanBy(array, iteratee) {
return Object(_baseMean_js__WEBPACK_IMPORTED_MODULE_1__["default"])(array, Object(_baseIteratee_js__WEBPACK_IMPORTED_MODULE_0__["default"])(iteratee, 2));
}
/* harmony default export */ __webpack_exports__["default"] = (meanBy);
/***/ }),
/***/ 2963:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _baseSum_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2964);
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/**
* The base implementation of `_.mean` and `_.meanBy` without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {number} Returns the mean.
*/
function baseMean(array, iteratee) {
var length = array == null ? 0 : array.length;
return length ? (Object(_baseSum_js__WEBPACK_IMPORTED_MODULE_0__["default"])(array, iteratee) / length) : NAN;
}
/* harmony default export */ __webpack_exports__["default"] = (baseMean);
/***/ }),
/***/ 2964:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/**
* The base implementation of `_.sum` and `_.sumBy` without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {number} Returns the sum.
*/
function baseSum(array, iteratee) {
var result,
index = -1,
length = array.length;
while (++index < length) {
var current = iteratee(array[index]);
if (current !== undefined) {
result = result === undefined ? current : (result + current);
}
}
return result;
}
/* harmony default export */ __webpack_exports__["default"] = (baseSum);
/***/ }),
/***/ 2965:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2025);
/* harmony import */ var _baseSum_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2964);
/**
* This method is like `_.sum` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the value to be summed.
* The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the sum.
* @example
*
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
*
* _.sumBy(objects, function(o) { return o.n; });
* // => 20
*
* // The `_.property` iteratee shorthand.
* _.sumBy(objects, 'n');
* // => 20
*/
function sumBy(array, iteratee) {
return (array && array.length)
? Object(_baseSum_js__WEBPACK_IMPORTED_MODULE_1__["default"])(array, Object(_baseIteratee_js__WEBPACK_IMPORTED_MODULE_0__["default"])(iteratee, 2))
: 0;
}
/* harmony default export */ __webpack_exports__["default"] = (sumBy);
/***/ }),
/***/ 2966:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _baseAssignValue_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(645);
/* harmony import */ var _createAggregator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2967);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` thru `iteratee`. The order of grouped values
* is determined by the order they occur in `collection`. The corresponding
* value of each key is an array of elements responsible for generating the
* key. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* _.groupBy([6.1, 4.2, 6.3], Math.floor);
* // => { '4': [4.2], '6': [6.1, 6.3] }
*
* // The `_.property` iteratee shorthand.
* _.groupBy(['one', 'two', 'three'], 'length');
* // => { '3': ['one', 'two'], '5': ['three'] }
*/
var groupBy = Object(_createAggregator_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function(result, value, key) {
if (hasOwnProperty.call(result, key)) {
result[key].push(value);
} else {
Object(_baseAssignValue_js__WEBPACK_IMPORTED_MODULE_0__["default"])(result, key, [value]);
}
});
/* harmony default export */ __webpack_exports__["default"] = (groupBy);
/***/ }),
/***/ 2967:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _arrayAggregator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2968);
/* harmony import */ var _baseAggregator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2969);
/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2025);
/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(655);
/**
* Creates a function like `_.groupBy`.
*
* @private
* @param {Function} setter The function to set accumulator values.
* @param {Function} [initializer] The accumulator object initializer.
* @returns {Function} Returns the new aggregator function.
*/
function createAggregator(setter, initializer) {
return function(collection, iteratee) {
var func = Object(_isArray_js__WEBPACK_IMPORTED_MODULE_3__["default"])(collection) ? _arrayAggregator_js__WEBPACK_IMPORTED_MODULE_0__["default"] : _baseAggregator_js__WEBPACK_IMPORTED_MODULE_1__["default"],
accumulator = initializer ? initializer() : {};
return func(collection, setter, Object(_baseIteratee_js__WEBPACK_IMPORTED_MODULE_2__["default"])(iteratee, 2), accumulator);
};
}
/* harmony default export */ __webpack_exports__["default"] = (createAggregator);
/***/ }),
/***/ 2968:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/**
* A specialized version of `baseAggregator` for arrays.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} setter The function to set `accumulator` values.
* @param {Function} iteratee The iteratee to transform keys.
* @param {Object} accumulator The initial aggregated object.
* @returns {Function} Returns `accumulator`.
*/
function arrayAggregator(array, setter, iteratee, accumulator) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
var value = array[index];
setter(accumulator, value, iteratee(value), array);
}
return accumulator;
}
/* harmony default export */ __webpack_exports__["default"] = (arrayAggregator);
/***/ }),
/***/ 2969:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2020);
/**
* Aggregates elements of `collection` on `accumulator` with keys transformed
* by `iteratee` and values set by `setter`.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} setter The function to set `accumulator` values.
* @param {Function} iteratee The iteratee to transform keys.
* @param {Object} accumulator The initial aggregated object.
* @returns {Function} Returns `accumulator`.
*/
function baseAggregator(collection, setter, iteratee, accumulator) {
Object(_baseEach_js__WEBPACK_IMPORTED_MODULE_0__["default"])(collection, function(value, key, collection) {
setter(accumulator, value, iteratee(value), collection);
});
return accumulator;
}
/* harmony default export */ __webpack_exports__["default"] = (baseAggregator);
/***/ }),
/***/ 2975:
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/*
Highcharts JS v6.2.0 (2018-10-17)
(c) 2014 Highsoft AS
Authors: Jon Arild Nygard / Oystein Moseng
License: www.highcharts.com/license
*/
(function(v){ true&&module.exports?module.exports=v: true?!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){return v}).call(exports, __webpack_require__, exports, module),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):undefined})(function(v){var H=function(b){var v=b.each,B=b.extend,E=b.isArray,t=b.isObject,p=b.isNumber,G=b.merge,z=b.pick,l=b.reduce;return{getColor:function(n,m){var q=m.index,f=m.mapOptionsToLevel,l=m.parentColor,y=m.parentColorIndex,F=m.series,d=m.colors,A=m.siblings,r=F.points,x,t,p,C;if(n){r=r[n.i];n=f[n.level]||{};if(x=r&&n.colorByPoint)p=r.index%(d?
d.length:F.chart.options.chart.colorCount),t=d&&d[p];d=r&&r.options.color;x=n&&n.color;if(f=l)f=(f=n&&n.colorVariation)&&"brightness"===f.key?b.color(l).brighten(q/A*f.to).get():l;x=z(d,x,t,f,F.color);C=z(r&&r.options.colorIndex,n&&n.colorIndex,p,y,m.colorIndex)}return{color:x,colorIndex:C}},getLevelOptions:function(b){var m=null,q,f,n,y;if(t(b))for(m={},n=p(b.from)?b.from:1,y=b.levels,f={},q=t(b.defaults)?b.defaults:{},E(y)&&(f=l(y,function(b,d){var f,m;t(d)&&p(d.level)&&(m=G({},d),f="boolean"===
typeof m.levelIsConstant?m.levelIsConstant:q.levelIsConstant,delete m.levelIsConstant,delete m.level,d=d.level+(f?0:n-1),t(b[d])?B(b[d],m):b[d]=m);return b},{})),y=p(b.to)?b.to:1,b=0;b<=y;b++)m[b]=G({},q,t(f[b])?f[b]:{});return m},setTreeValues:function m(b,f){var l=f.before,q=f.idRoot,t=f.mapIdToNode[q],d=f.points[b.i],p=d&&d.options||{},r=0,x=[];B(b,{levelDynamic:b.level-(("boolean"===typeof f.levelIsConstant?f.levelIsConstant:1)?0:t.level),name:z(d&&d.name,""),visible:q===b.id||("boolean"===typeof f.visible?
f.visible:!1)});"function"===typeof l&&(b=l(b,f));v(b.children,function(d,l){var q=B({},f);B(q,{index:l,siblings:b.children.length,visible:b.visible});d=m(d,q);x.push(d);d.visible&&(r+=d.val)});b.visible=0<r||b.visible;l=z(p.value,r);B(b,{children:x,childrenTotal:r,isLeaf:b.visible&&!r,val:l});return b},updateRootId:function(b){var l;t(b)&&(l=t(b.options)?b.options:{},l=z(b.rootNode,l.rootId,""),t(b.userOptions)&&(b.userOptions.rootId=l),b.rootNode=l);return l}}}(v);(function(b,v){var B=b.seriesType,
E=b.seriesTypes,t=b.map,p=b.merge,G=b.extend,z=b.noop,l=b.each,n=v.getColor,m=v.getLevelOptions,q=b.grep,f=b.isArray,H=b.isNumber,y=b.isObject,F=b.isString,d=b.pick,A=b.Series,r=b.stableSort,x=b.Color,J=function(a,c,e){e=e||this;b.objectEach(a,function(b,g){c.call(e,b,g,a)})},I=b.reduce,C=function(a,c,e){e=e||this;a=c.call(e,a);!1!==a&&C(a,c,e)},K=v.updateRootId;B("treemap","scatter",{showInLegend:!1,marker:!1,colorByPoint:!1,dataLabels:{enabled:!0,defer:!1,verticalAlign:"middle",formatter:function(){return this.point.name||
this.point.id},inside:!0},tooltip:{headerFormat:"",pointFormat:"\x3cb\x3e{point.name}\x3c/b\x3e: {point.value}\x3cbr/\x3e"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,drillUpButton:{position:{align:"right",x:-10,y:10}},borderColor:"#e6e6e6",borderWidth:1,opacity:.15,states:{hover:{borderColor:"#999999",brightness:E.heatmap?0:.1,halo:!1,opacity:.75,shadow:!1}}},{pointArrayMap:["value"],directTouch:!0,optionalAxis:"colorAxis",
getSymbol:z,parallelArrays:["x","y","value","colorValue"],colorKey:"colorValue",trackerGroups:["group","dataLabelsGroup"],getListOfParents:function(a,c){a=f(a)?a:[];var e=f(c)?c:[];c=I(a,function(a,c,e){c=d(c.parent,"");void 0===a[c]&&(a[c]=[]);a[c].push(e);return a},{"":[]});J(c,function(a,c,h){""!==c&&-1===b.inArray(c,e)&&(l(a,function(a){h[""].push(a)}),delete h[c])});return c},getTree:function(){var a=t(this.data,function(a){return a.id}),a=this.getListOfParents(this.data,a);this.nodeMap=[];return this.buildNode("",
-1,0,a,null)},init:function(a,c){var e=b.colorSeriesMixin;b.colorSeriesMixin&&(this.translateColors=e.translateColors,this.colorAttribs=e.colorAttribs,this.axisTypes=e.axisTypes);A.prototype.init.call(this,a,c);this.options.allowDrillToNode&&b.addEvent(this,"click",this.onClickDrillToNode)},buildNode:function(a,c,e,b,g){var h=this,w=[],k=h.points[c],d=0,f;l(b[a]||[],function(c){f=h.buildNode(h.points[c].id,c,e+1,b,a);d=Math.max(f.height+1,d);w.push(f)});c={id:a,i:c,children:w,height:d,level:e,parent:g,
visible:!1};h.nodeMap[c.id]=c;k&&(k.node=c);return c},setTreeValues:function(a){var c=this,e=c.options,b=c.nodeMap[c.rootNode],e="boolean"===typeof e.levelIsConstant?e.levelIsConstant:!0,g=0,h=[],D,k=c.points[a.i];l(a.children,function(a){a=c.setTreeValues(a);h.push(a);a.ignore||(g+=a.val)});r(h,function(a,c){return a.sortIndex-c.sortIndex});D=d(k&&k.options.value,g);k&&(k.value=D);G(a,{children:h,childrenTotal:g,ignore:!(d(k&&k.visible,!0)&&0<D),isLeaf:a.visible&&!g,levelDynamic:a.level-(e?0:b.level),
name:d(k&&k.name,""),sortIndex:d(k&&k.sortIndex,-D),val:D});return a},calculateChildrenAreas:function(a,c){var e=this,b=e.options,g=e.mapOptionsToLevel[a.level+1],h=d(e[g&&g.layoutAlgorithm]&&g.layoutAlgorithm,b.layoutAlgorithm),D=b.alternateStartingDirection,k=[];a=q(a.children,function(a){return!a.ignore});g&&g.layoutStartingDirection&&(c.direction="vertical"===g.layoutStartingDirection?0:1);k=e[h](c,a);l(a,function(a,b){b=k[b];a.values=p(b,{val:a.childrenTotal,direction:D?1-c.direction:c.direction});
a.pointValues=p(b,{x:b.x/e.axisRatio,width:b.width/e.axisRatio});a.children.length&&e.calculateChildrenAreas(a,a.values)})},setPointValues:function(){var a=this,c=a.xAxis,e=a.yAxis;l(a.points,function(b){var g=b.node,h=g.pointValues,w,k,d;d=(a.pointAttribs(b)["stroke-width"]||0)%2/2;h&&g.visible?(g=Math.round(c.translate(h.x,0,0,0,1))-d,w=Math.round(c.translate(h.x+h.width,0,0,0,1))-d,k=Math.round(e.translate(h.y,0,0,0,1))-d,h=Math.round(e.translate(h.y+h.height,0,0,0,1))-d,b.shapeType="rect",b.shapeArgs=
{x:Math.min(g,w),y:Math.min(k,h),width:Math.abs(w-g),height:Math.abs(h-k)},b.plotX=b.shapeArgs.x+b.shapeArgs.width/2,b.plotY=b.shapeArgs.y+b.shapeArgs.height/2):(delete b.plotX,delete b.plotY)})},setColorRecursive:function(a,c,e,b,g){var h=this,d=h&&h.chart,d=d&&d.options&&d.options.colors,k;if(a){k=n(a,{colors:d,index:b,mapOptionsToLevel:h.mapOptionsToLevel,parentColor:c,parentColorIndex:e,series:h,siblings:g});if(c=h.points[a.i])c.color=k.color,c.colorIndex=k.colorIndex;l(a.children||[],function(c,
b){h.setColorRecursive(c,k.color,k.colorIndex,b,a.children.length)})}},algorithmGroup:function(a,c,b,d){this.height=a;this.width=c;this.plot=d;this.startDirection=this.direction=b;this.lH=this.nH=this.lW=this.nW=this.total=0;this.elArr=[];this.lP={total:0,lH:0,nH:0,lW:0,nW:0,nR:0,lR:0,aspectRatio:function(a,c){return Math.max(a/c,c/a)}};this.addElement=function(a){this.lP.total=this.elArr[this.elArr.length-1];this.total+=a;0===this.direction?(this.lW=this.nW,this.lP.lH=this.lP.total/this.lW,this.lP.lR=
this.lP.aspectRatio(this.lW,this.lP.lH),this.nW=this.total/this.height,this.lP.nH=this.lP.total/this.nW,this.lP.nR=this.lP.aspectRatio(this.nW,this.lP.nH)):(this.lH=this.nH,this.lP.lW=this.lP.total/this.lH,this.lP.lR=this.lP.aspectRatio(this.lP.lW,this.lH),this.nH=this.total/this.width,this.lP.nW=this.lP.total/this.nH,this.lP.nR=this.lP.aspectRatio(this.lP.nW,this.nH));this.elArr.push(a)};this.reset=function(){this.lW=this.nW=0;this.elArr=[];this.total=0}},algorithmCalcPoints:function(a,c,b,d){var e,
h,w,k,f=b.lW,m=b.lH,u=b.plot,n,r=0,t=b.elArr.length-1;c?(f=b.nW,m=b.nH):n=b.elArr[b.elArr.length-1];l(b.elArr,function(a){if(c||r<t)0===b.direction?(e=u.x,h=u.y,w=f,k=a/w):(e=u.x,h=u.y,k=m,w=a/k),d.push({x:e,y:h,width:w,height:k}),0===b.direction?u.y+=k:u.x+=w;r+=1});b.reset();0===b.direction?b.width-=f:b.height-=m;u.y=u.parent.y+(u.parent.height-b.height);u.x=u.parent.x+(u.parent.width-b.width);a&&(b.direction=1-b.direction);c||b.addElement(n)},algorithmLowAspectRatio:function(a,b,e){var c=[],d=
this,h,f={x:b.x,y:b.y,parent:b},k=0,m=e.length-1,n=new this.algorithmGroup(b.height,b.width,b.direction,f);l(e,function(e){h=e.val/b.val*b.height*b.width;n.addElement(h);n.lP.nR>n.lP.lR&&d.algorithmCalcPoints(a,!1,n,c,f);k===m&&d.algorithmCalcPoints(a,!0,n,c,f);k+=1});return c},algorithmFill:function(a,b,e){var c=[],d,h=b.direction,f=b.x,k=b.y,m=b.width,n=b.height,r,t,p,q;l(e,function(e){d=e.val/b.val*b.height*b.width;r=f;t=k;0===h?(q=n,p=d/q,m-=p,f+=p):(p=m,q=d/p,n-=q,k+=q);c.push({x:r,y:t,width:p,
height:q});a&&(h=1-h)});return c},strip:function(a,b){return this.algorithmLowAspectRatio(!1,a,b)},squarified:function(a,b){return this.algorithmLowAspectRatio(!0,a,b)},sliceAndDice:function(a,b){return this.algorithmFill(!0,a,b)},stripes:function(a,b){return this.algorithmFill(!1,a,b)},translate:function(){var a=this,b=a.options,e=K(a),d,g;A.prototype.translate.call(a);g=a.tree=a.getTree();d=a.nodeMap[e];a.mapOptionsToLevel=m({from:d.level+1,levels:b.levels,to:g.height,defaults:{levelIsConstant:a.options.levelIsConstant,
colorByPoint:b.colorByPoint}});""===e||d&&d.children.length||(a.drillToNode("",!1),e=a.rootNode,d=a.nodeMap[e]);C(a.nodeMap[a.rootNode],function(b){var c=!1,e=b.parent;b.visible=!0;if(e||""===e)c=a.nodeMap[e];return c});C(a.nodeMap[a.rootNode].children,function(a){var b=!1;l(a,function(a){a.visible=!0;a.children.length&&(b=(b||[]).concat(a.children))});return b});a.setTreeValues(g);a.axisRatio=a.xAxis.len/a.yAxis.len;a.nodeMap[""].pointValues=e={x:0,y:0,width:100,height:100};a.nodeMap[""].values=
e=p(e,{width:e.width*a.axisRatio,direction:"vertical"===b.layoutStartingDirection?0:1,val:g.val});a.calculateChildrenAreas(g,e);a.colorAxis?a.translateColors():b.colorByPoint||a.setColorRecursive(a.tree);b.allowDrillToNode&&(b=d.pointValues,a.xAxis.setExtremes(b.x,b.x+b.width,!1),a.yAxis.setExtremes(b.y,b.y+b.height,!1),a.xAxis.setScale(),a.yAxis.setScale());a.setPointValues()},drawDataLabels:function(){var a=this,b=a.mapOptionsToLevel,e=q(a.points,function(a){return a.node.visible}),d,g;l(e,function(c){g=
b[c.node.level];d={style:{}};c.node.isLeaf||(d.enabled=!1);g&&g.dataLabels&&(d=p(d,g.dataLabels),a._hasPointLabels=!0);c.shapeArgs&&(d.style.width=c.shapeArgs.width,c.dataLabel&&c.dataLabel.css({width:c.shapeArgs.width+"px"}));c.dlOptions=p(d,c.options.dataLabels)});A.prototype.drawDataLabels.call(this)},alignDataLabel:function(a){E.column.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})},pointAttribs:function(a,b){var c=y(this.mapOptionsToLevel)?
this.mapOptionsToLevel:{},f=a&&c[a.node.level]||{},c=this.options,g=b&&c.states[b]||{},h=a&&a.getClassName()||"";a={stroke:a&&a.borderColor||f.borderColor||g.borderColor||c.borderColor,"stroke-width":d(a&&a.borderWidth,f.borderWidth,g.borderWidth,c.borderWidth),dashstyle:a&&a.borderDashStyle||f.borderDashStyle||g.borderDashStyle||c.borderDashStyle,fill:a&&a.color||this.color};-1!==h.indexOf("highcharts-above-level")?(a.fill="none",a["stroke-width"]=0):-1!==h.indexOf("highcharts-internal-node-interactive")?
(b=d(g.opacity,c.opacity),a.fill=x(a.fill).setOpacity(b).get(),a.cursor="pointer"):-1!==h.indexOf("highcharts-internal-node")?a.fill="none":b&&(a.fill=x(a.fill).brighten(g.brightness).get());return a},drawPoints:function(){var a=this,b=q(a.points,function(a){return a.node.visible});l(b,function(b){var c="level-group-"+b.node.levelDynamic;a[c]||(a[c]=a.chart.renderer.g(c).attr({zIndex:1E3-b.node.levelDynamic}).add(a.group));b.group=a[c]});E.column.prototype.drawPoints.call(this);a.options.allowDrillToNode&&
l(b,function(b){b.graphic&&(b.drillId=a.options.interactByLeaf?a.drillToByLeaf(b):a.drillToByGroup(b))})},onClickDrillToNode:function(a){var b=(a=a.point)&&a.drillId;F(b)&&(a.setState(""),this.drillToNode(b))},drillToByGroup:function(a){var b=!1;1!==a.node.level-this.nodeMap[this.rootNode].level||a.node.isLeaf||(b=a.id);return b},drillToByLeaf:function(a){var b=!1;if(a.node.parent!==this.rootNode&&a.node.isLeaf)for(a=a.node;!b;)a=this.nodeMap[a.parent],a.parent===this.rootNode&&(b=a.id);return b},
drillUp:function(){var a=this.nodeMap[this.rootNode];a&&F(a.parent)&&this.drillToNode(a.parent)},drillToNode:function(a,b){var c=this.nodeMap[a];this.idPreviousRoot=this.rootNode;this.rootNode=a;""===a?this.drillUpButton=this.drillUpButton.destroy():this.showDrillUpButton(c&&c.name||a);this.isDirty=!0;d(b,!0)&&this.chart.redraw()},showDrillUpButton:function(a){var b=this;a=a||"\x3c Back";var d=b.options.drillUpButton,f,g;d.text&&(a=d.text);this.drillUpButton?(this.drillUpButton.placed=!1,this.drillUpButton.attr({text:a}).align()):
(g=(f=d.theme)&&f.states,this.drillUpButton=this.chart.renderer.button(a,null,null,function(){b.drillUp()},f,g&&g.hover,g&&g.select).addClass("highcharts-drillup-button").attr({align:d.position.align,zIndex:7}).add().align(d.position,!1,d.relativeTo||"plotBox"))},buildKDTree:z,drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,getExtremes:function(){A.prototype.getExtremes.call(this,this.colorValueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;A.prototype.getExtremes.call(this)},getExtremesFromAll:!0,
bindAxes:function(){var a={endOnTick:!1,gridLineWidth:0,lineWidth:0,min:0,dataMin:0,minPadding:0,max:100,dataMax:100,maxPadding:0,startOnTick:!1,title:null,tickPositions:[]};A.prototype.bindAxes.call(this);b.extend(this.yAxis.options,a);b.extend(this.xAxis.options,a)},utils:{recursive:C,reduce:I}},{getClassName:function(){var a=b.Point.prototype.getClassName.call(this),c=this.series,e=c.options;this.node.level<=c.nodeMap[c.rootNode].level?a+=" highcharts-above-level":this.node.isLeaf||d(e.interactByLeaf,
!e.allowDrillToNode)?this.node.isLeaf||(a+=" highcharts-internal-node"):a+=" highcharts-internal-node-interactive";return a},isValid:function(){return this.id||H(this.value)},setState:function(a){b.Point.prototype.setState.call(this,a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})},setVisible:E.pie.prototype.pointClass.prototype.setVisible})})(v,H)});
//# sourceMappingURL=treemap.js.map
/***/ }),
/***/ 2976:
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/*
Highcharts JS v6.2.0 (2018-10-17)
(c) 2009-2018 Torstein Honsi
License: www.highcharts.com/license
*/
(function(k){ true&&module.exports?module.exports=k: true?!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){return k}).call(exports, __webpack_require__, exports, module),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):undefined})(function(k){(function(b){var t=b.addEvent,h=b.Axis,k=b.Chart,m=b.color,q,g=b.each,r=b.extend,p=b.isNumber,e=b.Legend,c=b.LegendSymbolMixin,x=b.noop,w=b.merge,u=b.pick;b.ColorAxis||(q=b.ColorAxis=function(){this.init.apply(this,arguments)},r(q.prototype,h.prototype),r(q.prototype,{defaultColorAxisOptions:{lineWidth:0,minPadding:0,maxPadding:0,gridLineWidth:1,
tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{overflow:"justify",rotation:0},minColor:"#e6ebf5",maxColor:"#003399",tickLength:5,showInLegend:!0},keepProps:["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"].concat(h.prototype.keepProps),init:function(a,d){var f="vertical"!==a.options.legend.layout,n;this.coll="colorAxis";n=w(this.defaultColorAxisOptions,{side:f?2:1,reversed:!f},d,{opposite:!f,
showEmpty:!1,title:null,visible:a.options.legend.enabled});h.prototype.init.call(this,a,n);d.dataClasses&&this.initDataClasses(d);this.initStops();this.horiz=f;this.zoomEnabled=!1;this.defaultLegendLength=200},initDataClasses:function(a){var d=this.chart,f,n=0,l=d.options.chart.colorCount,b=this.options,e=a.dataClasses.length;this.dataClasses=f=[];this.legendItems=[];g(a.dataClasses,function(a,c){a=w(a);f.push(a);a.color||("category"===b.dataClassColor?(c=d.options.colors,l=c.length,a.color=c[n],
a.colorIndex=n,n++,n===l&&(n=0)):a.color=m(b.minColor).tweenTo(m(b.maxColor),2>e?.5:c/(e-1)))})},setTickPositions:function(){if(!this.dataClasses)return h.prototype.setTickPositions.call(this)},initStops:function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];g(this.stops,function(a){a.color=m(a[1])})},setOptions:function(a){h.prototype.setOptions.call(this,a);this.options.crosshair=this.options.marker},setAxisSize:function(){var a=this.legendSymbol,d=this.chart,
f=d.options.legend||{},n,l;a?(this.left=f=a.attr("x"),this.top=n=a.attr("y"),this.width=l=a.attr("width"),this.height=a=a.attr("height"),this.right=d.chartWidth-f-l,this.bottom=d.chartHeight-n-a,this.len=this.horiz?l:a,this.pos=this.horiz?f:n):this.len=(this.horiz?f.symbolWidth:f.symbolHeight)||this.defaultLegendLength},normalizedValue:function(a){this.isLog&&(a=this.val2lin(a));return 1-(this.max-a)/(this.max-this.min||1)},toColor:function(a,d){var f=this.stops,n,l,b=this.dataClasses,e,c;if(b)for(c=
b.length;c--;){if(e=b[c],n=e.from,f=e.to,(void 0===n||a>=n)&&(void 0===f||a<=f)){l=e.color;d&&(d.dataClass=c,d.colorIndex=e.colorIndex);break}}else{a=this.normalizedValue(a);for(c=f.length;c--&&!(a>f[c][0]););n=f[c]||f[c+1];f=f[c+1]||n;a=1-(f[0]-a)/(f[0]-n[0]||1);l=n.color.tweenTo(f.color,a)}return l},getOffset:function(){var a=this.legendGroup,d=this.chart.axisOffset[this.side];a&&(this.axisParent=a,h.prototype.getOffset.call(this),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),
this.chart.axisOffset[this.side]=d)},setLegendColor:function(){var a,d=this.reversed;a=d?1:0;d=d?0:1;a=this.horiz?[a,0,d,0]:[0,d,0,a];this.legendColor={linearGradient:{x1:a[0],y1:a[1],x2:a[2],y2:a[3]},stops:this.stops}},drawLegendSymbol:function(a,d){var f=a.padding,b=a.options,l=this.horiz,c=u(b.symbolWidth,l?this.defaultLegendLength:12),e=u(b.symbolHeight,l?12:this.defaultLegendLength),g=u(b.labelPadding,l?16:30),b=u(b.itemDistance,10);this.setLegendColor();d.legendSymbol=this.chart.renderer.rect(0,
a.baseline-11,c,e).attr({zIndex:1}).add(d.legendGroup);this.legendItemWidth=c+f+(l?b:g);this.legendItemHeight=e+f+(l?g:0)},setState:function(a){g(this.series,function(d){d.setState(a)})},visible:!0,setVisible:x,getSeriesExtremes:function(){var a=this.series,d=a.length;this.dataMin=Infinity;for(this.dataMax=-Infinity;d--;)a[d].getExtremes(),void 0!==a[d].valueMin&&(this.dataMin=Math.min(this.dataMin,a[d].valueMin),this.dataMax=Math.max(this.dataMax,a[d].valueMax))},drawCrosshair:function(a,d){var f=
d&&d.plotX,b=d&&d.plotY,c,e=this.pos,g=this.len;d&&(c=this.toPixels(d[d.series.colorKey]),c<e?c=e-2:c>e+g&&(c=e+g+2),d.plotX=c,d.plotY=this.len-c,h.prototype.drawCrosshair.call(this,a,d),d.plotX=f,d.plotY=b,this.cross&&!this.cross.addedToColorAxis&&this.legendGroup&&(this.cross.addClass("highcharts-coloraxis-marker").add(this.legendGroup),this.cross.addedToColorAxis=!0,this.cross.attr({fill:this.crosshair.color})))},getPlotLinePath:function(a,d,f,b,c){return p(c)?this.horiz?["M",c-4,this.top-6,"L",
c+4,this.top-6,c,this.top,"Z"]:["M",this.left,c,"L",this.left-6,c+6,this.left-6,c-6,"Z"]:h.prototype.getPlotLinePath.call(this,a,d,f,b)},update:function(a,d){var c=this.chart,b=c.legend;g(this.series,function(a){a.isDirtyData=!0});a.dataClasses&&b.allItems&&(g(b.allItems,function(a){a.isDataClass&&a.legendGroup&&a.legendGroup.destroy()}),c.isDirtyLegend=!0);c.options[this.coll]=w(this.userOptions,a);h.prototype.update.call(this,a,d);this.legendItem&&(this.setLegendColor(),b.colorizeItem(this,!0))},
remove:function(){this.legendItem&&this.chart.legend.destroyItem(this);h.prototype.remove.call(this)},getDataClassLegendSymbols:function(){var a=this,d=this.chart,f=this.legendItems,e=d.options.legend,l=e.valueDecimals,q=e.valueSuffix||"",h;f.length||g(this.dataClasses,function(e,n){var m=!0,p=e.from,k=e.to;h="";void 0===p?h="\x3c ":void 0===k&&(h="\x3e ");void 0!==p&&(h+=b.numberFormat(p,l)+q);void 0!==p&&void 0!==k&&(h+=" - ");void 0!==k&&(h+=b.numberFormat(k,l)+q);f.push(r({chart:d,name:h,options:{},
drawLegendSymbol:c.drawRectangle,visible:!0,setState:x,isDataClass:!0,setVisible:function(){m=this.visible=!m;g(a.series,function(a){g(a.points,function(a){a.dataClass===n&&a.setVisible(m)})});d.legend.colorizeItem(this,m)}},e))});return f},name:""}),g(["fill","stroke"],function(a){b.Fx.prototype[a+"Setter"]=function(){this.elem.attr(a,m(this.start).tweenTo(m(this.end),this.pos),null,!0)}}),t(k,"afterGetAxes",function(){var a=this.options.colorAxis;this.colorAxis=[];a&&new q(this,a)}),t(e,"afterGetAllItems",
function(a){var d=[],c=this.chart.colorAxis[0];c&&c.options&&c.options.showInLegend&&(c.options.dataClasses?d=c.getDataClassLegendSymbols():d.push(c),g(c.series,function(c){b.erase(a.allItems,c)}));for(c=d.length;c--;)a.allItems.unshift(d[c])}),t(e,"afterColorizeItem",function(a){a.visible&&a.item.legendColor&&a.item.legendSymbol.attr({fill:a.item.legendColor})}),t(e,"afterUpdate",function(a,c,b){this.chart.colorAxis[0]&&this.chart.colorAxis[0].update({},b)}))})(k);(function(b){var k=b.defined,h=
b.each,v=b.noop,m=b.seriesTypes;b.colorPointMixin={isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value},setVisible:function(b){var g=this,q=b?"show":"hide";g.visible=!!b;h(["graphic","dataLabel"],function(b){if(g[b])g[b][q]()})},setState:function(h){b.Point.prototype.setState.call(this,h);this.graphic&&this.graphic.attr({zIndex:"hover"===h?1:0})}};b.colorSeriesMixin={pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],optionalAxis:"colorAxis",trackerGroups:["group",
"markerGroup","dataLabelsGroup"],getSymbol:v,parallelArrays:["x","y","value"],colorKey:"value",pointAttribs:m.column.prototype.pointAttribs,translateColors:function(){var b=this,g=this.options.nullColor,k=this.colorAxis,m=this.colorKey;h(this.data,function(e){var c=e[m];if(c=e.options.color||(e.isNull?g:k&&void 0!==c?k.toColor(c,e):e.color||b.color))e.color=c})},colorAttribs:function(b){var g={};k(b.color)&&(g[this.colorProp||"fill"]=b.color);return g}}})(k);(function(b){var k=b.colorPointMixin,h=
b.each,v=b.merge,m=b.noop,q=b.pick,g=b.Series,r=b.seriesType,p=b.seriesTypes;r("heatmap","scatter",{animation:!1,borderWidth:0,nullColor:"#f7f7f7",dataLabels:{formatter:function(){return this.point.value},inside:!0,verticalAlign:"middle",crop:!1,overflow:!1,padding:0},marker:null,pointRange:null,tooltip:{pointFormat:"{point.x}, {point.y}: {point.value}\x3cbr/\x3e"},states:{hover:{halo:!1,brightness:.2}}},v(b.colorSeriesMixin,{pointArrayMap:["y","value"],hasPointSpecificOptions:!0,getExtremesFromAll:!0,
directTouch:!0,init:function(){var b;p.scatter.prototype.init.apply(this,arguments);b=this.options;b.pointRange=q(b.pointRange,b.colsize||1);this.yAxis.axisPointRange=b.rowsize||1},translate:function(){var b=this.options,c=this.xAxis,g=this.yAxis,k=b.pointPadding||0,m=function(a,b,c){return Math.min(Math.max(b,a),c)};this.generatePoints();h(this.points,function(a){var d=(b.colsize||1)/2,e=(b.rowsize||1)/2,h=m(Math.round(c.len-c.translate(a.x-d,0,1,0,1)),-c.len,2*c.len),d=m(Math.round(c.len-c.translate(a.x+
d,0,1,0,1)),-c.len,2*c.len),l=m(Math.round(g.translate(a.y-e,0,1,0,1)),-g.len,2*g.len),e=m(Math.round(g.translate(a.y+e,0,1,0,1)),-g.len,2*g.len),p=q(a.pointPadding,k);a.plotX=a.clientX=(h+d)/2;a.plotY=(l+e)/2;a.shapeType="rect";a.shapeArgs={x:Math.min(h,d)+p,y:Math.min(l,e)+p,width:Math.abs(d-h)-2*p,height:Math.abs(e-l)-2*p}});this.translateColors()},drawPoints:function(){p.column.prototype.drawPoints.call(this);h(this.points,function(b){b.graphic.attr(this.colorAttribs(b))},this)},animate:m,getBox:m,
drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,alignDataLabel:p.column.prototype.alignDataLabel,getExtremes:function(){g.prototype.getExtremes.call(this,this.valueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;g.prototype.getExtremes.call(this)}}),b.extend({haloPath:function(b){if(!b)return[];var c=this.shapeArgs;return["M",c.x-b,c.y-b,"L",c.x-b,c.y+c.height+b,c.x+c.width+b,c.y+c.height+b,c.x+c.width+b,c.y-b,"Z"]}},k))})(k)});
//# sourceMappingURL=heatmap.js.map
/***/ })
}]);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVuZG9yc35hY2NvdW50LjVlYzRlNWJmYzA5N2E1YzczZmY5LmpzIiwic291cmNlcyI6WyJ3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