billboard.js 3.3.1 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +54 -25
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +520 -363
  6. package/dist/billboard.pkgd.min.js +2 -2
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +19 -11
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +18 -10
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +19 -11
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +19 -11
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +468 -340
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +485 -349
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +486 -350
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +487 -351
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +488 -352
  22. package/dist/theme/datalab.css +1 -1
  23. package/dist/theme/datalab.min.css +1 -1
  24. package/dist/theme/graph.css +1 -1
  25. package/dist/theme/graph.min.css +1 -1
  26. package/dist/theme/insight.css +1 -1
  27. package/dist/theme/insight.min.css +1 -1
  28. package/dist-esm/billboard.js +50 -28
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  32. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  33. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  34. package/package.json +21 -21
  35. package/src/Chart/api/chart.ts +1 -1
  36. package/src/Chart/api/subchart.ts +8 -8
  37. package/src/ChartInternal/internals/format.ts +9 -4
  38. package/src/ChartInternal/internals/redraw.ts +3 -2
  39. package/src/config/Options/common/tooltip.ts +10 -1
  40. package/src/module/util.ts +16 -9
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.1
8
+ * @version 3.3.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -192,7 +192,7 @@ var Plugin = /*#__PURE__*/function () {
192
192
  return Plugin;
193
193
  }();
194
194
 
195
- Plugin.version = "3.3.0";
195
+ Plugin.version = "3.3.1";
196
196
 
197
197
  ;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts
198
198
 
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.1
8
+ * @version 3.3.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,n){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,n)}i.d(r,{default:function(){return u}});var n=i(1),o=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach((function(e){t[e]=null,delete t[e]}))},t}();o.version="3.3.0";var u=function(i){var r,o;function u(e){var n=i.call(this,e)||this;return n.$$=void 0,t(n)||t(n)}o=i,(r=u).prototype=Object.create(o.prototype),r.prototype.constructor=r,e(r,o);var s=u.prototype;return s.$init=function(){var t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},s.pointExpandedR=function(t){var e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,n.select)(t.node().parentNode.parentNode).raise()},s.changeCursorPoint=function(){this.$$.$el.svg.select(".bb-event-rect").style("cursor","pointer")},s.findClosest=function(t,e){var n=this,i=this.$$;return t.filter((function(t){return t&&!i.isBarType(t.id)})).reduce((function(t,r){return i.dist(r,e)<n.getBubbleR(r)?r:t}),0)},s.getBubbleR=function(t){var e=this,n=this.options,i=n.minR,r=n.maxR,o=this.getZData(t);if(!o)return i;var u=this.$$.data.targets.reduce((function(t,n){var i=t[0],r=t[1],o=e.getZData(n.values[0]);return[Math.min(i,o),Math.max(r,o)]}),[1e4,0]),s=u[0],a=u[1],c=s>0&&a===s?0:o/a;return Math.abs(c)*(r-i)+i},s.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(o);u.version="0.0.1"}(),r=r.default}()}));
12
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,n){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,n)}i.d(r,{default:function(){return u}});var n=i(1),o=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach((function(e){t[e]=null,delete t[e]}))},t}();o.version="3.3.1";var u=function(i){var r,o;function u(e){var n=i.call(this,e)||this;return n.$$=void 0,t(n)||t(n)}o=i,(r=u).prototype=Object.create(o.prototype),r.prototype.constructor=r,e(r,o);var s=u.prototype;return s.$init=function(){var t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},s.pointExpandedR=function(t){var e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,n.select)(t.node().parentNode.parentNode).raise()},s.changeCursorPoint=function(){this.$$.$el.svg.select(".bb-event-rect").style("cursor","pointer")},s.findClosest=function(t,e){var n=this,i=this.$$;return t.filter((function(t){return t&&!i.isBarType(t.id)})).reduce((function(t,r){return i.dist(r,e)<n.getBubbleR(r)?r:t}),0)},s.getBubbleR=function(t){var e=this,n=this.options,i=n.minR,r=n.maxR,o=this.getZData(t);if(!o)return i;var u=this.$$.data.targets.reduce((function(t,n){var i=t[0],r=t[1],o=e.getZData(n.values[0]);return[Math.min(i,o),Math.max(r,o)]}),[1e4,0]),s=u[0],a=u[1],c=s>0&&a===s?0:o/a;return Math.abs(c)*(r-i)+i},s.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(o);u.version="0.0.1"}(),r=r.default}()}));
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.1
8
+ * @version 3.3.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -373,7 +373,7 @@ var Plugin = /*#__PURE__*/function () {
373
373
  return Plugin;
374
374
  }();
375
375
 
376
- Plugin.version = "3.3.0";
376
+ Plugin.version = "3.3.1";
377
377
 
378
378
  ;// CONCATENATED MODULE: ./src/Plugin/sparkline/Options.ts
379
379
  /**
@@ -1234,19 +1234,27 @@ function isTabVisible() {
1234
1234
 
1235
1235
 
1236
1236
  function convertInputType(mouse, touch) {
1237
- var isMobile = !1; // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop
1237
+ var hasTouch = !1;
1238
1238
 
1239
- if (/Mobi/.test(win.navigator.userAgent) && touch) {
1239
+ if (touch) {
1240
1240
  // Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
1241
- var hasTouchPoints = win.navigator && "maxTouchPoints" in win.navigator && win.navigator.maxTouchPoints > 0,
1242
- hasTouch = "ontouchmove" in win || win.DocumentTouch && doc instanceof win.DocumentTouch; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
1243
- // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
1244
-
1245
- isMobile = hasTouchPoints || hasTouch;
1241
+ if (win.navigator && "maxTouchPoints" in win.navigator) {
1242
+ hasTouch = win.navigator.maxTouchPoints > 0; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
1243
+ // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
1244
+ } else if ("ontouchmove" in win || win.DocumentTouch && doc instanceof win.DocumentTouch) {
1245
+ hasTouch = !0;
1246
+ } else {
1247
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
1248
+ var mQ = win.matchMedia && matchMedia("(pointer:coarse)");
1249
+
1250
+ if (mQ && mQ.media === "(pointer:coarse)") {
1251
+ hasTouch = !!mQ.matches;
1252
+ }
1253
+ }
1246
1254
  }
1247
1255
 
1248
- var hasMouse = mouse && !isMobile ? "onmouseover" in win : !1;
1249
- return hasMouse && "mouse" || isMobile && "touch" || null;
1256
+ var hasMouse = mouse && !hasTouch ? "onmouseover" in win : !1;
1257
+ return hasMouse && "mouse" || hasTouch && "touch" || null;
1250
1258
  }
1251
1259
  ;// CONCATENATED MODULE: ./src/config/config.ts
1252
1260
  /**
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.1
8
+ * @version 3.3.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.sparkline=t(e.d3,e.d3))}(this,(function(e,t){return function(){"use strict";var n=[,function(t){t.exports=e},,function(e){e.exports=t}],r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t,i=1;i<arguments.length;i++)t=null!=arguments[i]?arguments[i]:{},i%2?r(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}i.d(o,{default:function(){return f}});var c={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"},l=(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({},c),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars",level:"bb-level",levels:"bb-levels"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),{tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),function(){function e(e){void 0===e&&(e={}),this.$$=void 0,this.options=void 0,this.options=e}var t=e.prototype;return t.$beforeInit=function(){},t.$init=function(){},t.$afterInit=function(){},t.$redraw=function(){},t.$willDestroy=function(){var e=this;Object.keys(this).forEach((function(t){e[t]=null,delete e[t]}))},e}());l.version="3.3.0";var b=function(){return{selector:void 0}},s=(i(1),i(3),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")());s.requestIdleCallback=s.requestIdleCallback||function(e){return setTimeout(e,1)},s.cancelIdleCallback=s.cancelIdleCallback||function(e){return clearTimeout(e)};var u=null==s?void 0:s.document;var d=function(e){return void 0!==e},h=function(e){return"object"==typeof e};!function(){try{new MouseEvent("t")}catch(e){return function(e,t,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var r=u.createEvent("MouseEvent");r.initMouseEvent(t,n.bubbles,n.cancelable,s,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.dispatchEvent(r)}}}();function g(e){var t,n,r,i=this.config,o=function(){var e=n.shift();return e&&t&&h(t)&&e in t?(t=t[e],o()):e?void 0:t};Object.keys(i).forEach((function(a){t=e,n=a.split("_"),r=o(),d(r)&&(i[a]=r)}))}var f=function(n){var r,i;function o(t){var r=n.call(this,t)||this;return r.config=void 0,r.element=void 0,r.config=new b,e(r)||e(r)}i=n,(r=o).prototype=Object.create(i.prototype),r.prototype.constructor=r,t(r,i);var a=o.prototype;return a.$beforeInit=function(){g.call(this,this.options),this.validate(),this.element=[].slice.call(document.querySelectorAll(this.config.selector)),this.overrideInternals(),this.overrideOptions(),this.overHandler=this.overHandler.bind(this),this.moveHandler=this.moveHandler.bind(this),this.outHandler=this.outHandler.bind(this)},a.validate=function(){var e=this.$$,t=this.config,n="";if(t.selector&&document.querySelector(t.selector)||(n="No holder elements found from given selector option."),(e.hasType("bubble")||e.hasType("scatter")||e.hasArcType(e.data.targets))&&(n="Contains non supported chart types."),n)throw new Error("[Sparkline plugin] "+n)},a.overrideInternals=function(){var e=this.$$,t=e.getBarW,n=e.getIndices;e.getIndices=function(e,t,r){return"getShapeX"===r?{}:n.call(this,e,t)},e.getBarW=function(e,n){return t.call(this,e,n,1)}},a.overrideOptions=function(){var e=this.$$.config;e.legend_show=!1,e.resize_auto=!1,e.axis_x_show=!1,e.axis_x_padding={left:15,right:15,unit:"px"},e.axis_y_show=!1,e.axis_y_padding=5,e.tooltip_position||(e.tooltip_position=function(e,t,n){var r=this.internal.state.event,i=r.pageY-1.35*n,o=r.pageX-t/2;return i<0&&(i=0),o<0&&(o=0),{top:i,left:o}})},a.$init=function(){var e=this.$$.$el;e.chart.style("width","0").style("height","0").style("pointer-events","none"),document.body.appendChild(e.tooltip.node())},a.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},a.bindEvents=function(e){var t=this;if(void 0===e&&(e=!0),this.$$.config.interaction_enabled){var n=(e?"add":"remove")+"EventListener";this.element.forEach((function(e){var r=e.querySelector("svg");r[n]("mouseover",t.overHandler),r[n]("mousemove",t.moveHandler),r[n]("mouseout",t.outHandler)}))}},a.overHandler=function(e){this.$$.state.eventReceiver.rect=e.target.getBoundingClientRect()},a.moveHandler=function(e){var t,n,r,i=this.$$,o=i.getDataIndexFromEvent(e),a=null==(t=i.api.data(e.target.__id))?void 0:t[0],c=null==(n=a)||null==(r=n.values)?void 0:r[o];c&&!c.name&&(c.name=c.id),i.state.event=e,i.setExpand(o,a.id,!0),i.showTooltip([c],e.target)},a.outHandler=function(e){var t=this.$$;t.state.event=e,t.unexpandCircles(),t.hideTooltip()},a.$redraw=function(){var e,t=this.$$,n=t.$el,r=this.element,i=t.api.data(),o=null==(e=n.chart.html().match(/<svg[^>]*>/))?void 0:e[0];if(r.length<i.length){for(var a=n.chart.node(),l=i.length-r.length;l>0;l--)a.parentNode.insertBefore(r[0].cloneNode(),a.nextSibling);this.element=document.querySelectorAll(this.config.selector),r=this.element}i.map((function(e){return e.id})).forEach((function(e,t){var i="."+c.target+"-"+e,a=n.main.selectAll(i),l=r[t].querySelector("svg");l||(r[t].innerHTML=o+"</svg>",(l=r[t].querySelector("svg")).__id=e),l.querySelector(i)||a.style("opacity",null),a.style("fill","none").style("opacity",null),l.innerHTML="",l.appendChild(a.node())}))},a.$willDestroy=function(){this.bindEvents(!1),this.element.forEach((function(e){e.innerHTML=""}))},o}(l);f.version="0.0.1"}(),o=o.default}()}));
12
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.sparkline=t(e.d3,e.d3))}(this,(function(e,t){return function(){"use strict";var n=[,function(t){t.exports=e},,function(e){e.exports=t}],r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t,i=1;i<arguments.length;i++)t=null!=arguments[i]?arguments[i]:{},i%2?r(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}i.d(o,{default:function(){return f}});var c={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"},l=(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({},c),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars",level:"bb-level",levels:"bb-levels"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),{tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),function(){function e(e){void 0===e&&(e={}),this.$$=void 0,this.options=void 0,this.options=e}var t=e.prototype;return t.$beforeInit=function(){},t.$init=function(){},t.$afterInit=function(){},t.$redraw=function(){},t.$willDestroy=function(){var e=this;Object.keys(this).forEach((function(t){e[t]=null,delete e[t]}))},e}());l.version="3.3.1";var b=function(){return{selector:void 0}},s=(i(1),i(3),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")());s.requestIdleCallback=s.requestIdleCallback||function(e){return setTimeout(e,1)},s.cancelIdleCallback=s.cancelIdleCallback||function(e){return clearTimeout(e)};var u=null==s?void 0:s.document;var d=function(e){return void 0!==e},h=function(e){return"object"==typeof e};!function(){try{new MouseEvent("t")}catch(e){return function(e,t,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var r=u.createEvent("MouseEvent");r.initMouseEvent(t,n.bubbles,n.cancelable,s,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.dispatchEvent(r)}}}();function g(e){var t,n,r,i=this.config,o=function(){var e=n.shift();return e&&t&&h(t)&&e in t?(t=t[e],o()):e?void 0:t};Object.keys(i).forEach((function(a){t=e,n=a.split("_"),r=o(),d(r)&&(i[a]=r)}))}var f=function(n){var r,i;function o(t){var r=n.call(this,t)||this;return r.config=void 0,r.element=void 0,r.config=new b,e(r)||e(r)}i=n,(r=o).prototype=Object.create(i.prototype),r.prototype.constructor=r,t(r,i);var a=o.prototype;return a.$beforeInit=function(){g.call(this,this.options),this.validate(),this.element=[].slice.call(document.querySelectorAll(this.config.selector)),this.overrideInternals(),this.overrideOptions(),this.overHandler=this.overHandler.bind(this),this.moveHandler=this.moveHandler.bind(this),this.outHandler=this.outHandler.bind(this)},a.validate=function(){var e=this.$$,t=this.config,n="";if(t.selector&&document.querySelector(t.selector)||(n="No holder elements found from given selector option."),(e.hasType("bubble")||e.hasType("scatter")||e.hasArcType(e.data.targets))&&(n="Contains non supported chart types."),n)throw new Error("[Sparkline plugin] "+n)},a.overrideInternals=function(){var e=this.$$,t=e.getBarW,n=e.getIndices;e.getIndices=function(e,t,r){return"getShapeX"===r?{}:n.call(this,e,t)},e.getBarW=function(e,n){return t.call(this,e,n,1)}},a.overrideOptions=function(){var e=this.$$.config;e.legend_show=!1,e.resize_auto=!1,e.axis_x_show=!1,e.axis_x_padding={left:15,right:15,unit:"px"},e.axis_y_show=!1,e.axis_y_padding=5,e.tooltip_position||(e.tooltip_position=function(e,t,n){var r=this.internal.state.event,i=r.pageY-1.35*n,o=r.pageX-t/2;return i<0&&(i=0),o<0&&(o=0),{top:i,left:o}})},a.$init=function(){var e=this.$$.$el;e.chart.style("width","0").style("height","0").style("pointer-events","none"),document.body.appendChild(e.tooltip.node())},a.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},a.bindEvents=function(e){var t=this;if(void 0===e&&(e=!0),this.$$.config.interaction_enabled){var n=(e?"add":"remove")+"EventListener";this.element.forEach((function(e){var r=e.querySelector("svg");r[n]("mouseover",t.overHandler),r[n]("mousemove",t.moveHandler),r[n]("mouseout",t.outHandler)}))}},a.overHandler=function(e){this.$$.state.eventReceiver.rect=e.target.getBoundingClientRect()},a.moveHandler=function(e){var t,n,r,i=this.$$,o=i.getDataIndexFromEvent(e),a=null==(t=i.api.data(e.target.__id))?void 0:t[0],c=null==(n=a)||null==(r=n.values)?void 0:r[o];c&&!c.name&&(c.name=c.id),i.state.event=e,i.setExpand(o,a.id,!0),i.showTooltip([c],e.target)},a.outHandler=function(e){var t=this.$$;t.state.event=e,t.unexpandCircles(),t.hideTooltip()},a.$redraw=function(){var e,t=this.$$,n=t.$el,r=this.element,i=t.api.data(),o=null==(e=n.chart.html().match(/<svg[^>]*>/))?void 0:e[0];if(r.length<i.length){for(var a=n.chart.node(),l=i.length-r.length;l>0;l--)a.parentNode.insertBefore(r[0].cloneNode(),a.nextSibling);this.element=document.querySelectorAll(this.config.selector),r=this.element}i.map((function(e){return e.id})).forEach((function(e,t){var i="."+c.target+"-"+e,a=n.main.selectAll(i),l=r[t].querySelector("svg");l||(r[t].innerHTML=o+"</svg>",(l=r[t].querySelector("svg")).__id=e),l.querySelector(i)||a.style("opacity",null),a.style("fill","none").style("opacity",null),l.innerHTML="",l.appendChild(a.node())}))},a.$willDestroy=function(){this.bindEvents(!1),this.element.forEach((function(e){e.innerHTML=""}))},o}(l);f.version="0.0.1"}(),o=o.default}()}));
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.1
8
+ * @version 3.3.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -1155,19 +1155,27 @@ function isTabVisible() {
1155
1155
 
1156
1156
 
1157
1157
  function convertInputType(mouse, touch) {
1158
- var isMobile = !1; // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop
1158
+ var hasTouch = !1;
1159
1159
 
1160
- if (/Mobi/.test(win.navigator.userAgent) && touch) {
1160
+ if (touch) {
1161
1161
  // Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
1162
- var hasTouchPoints = win.navigator && "maxTouchPoints" in win.navigator && win.navigator.maxTouchPoints > 0,
1163
- hasTouch = "ontouchmove" in win || win.DocumentTouch && doc instanceof win.DocumentTouch; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
1164
- // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
1162
+ if (win.navigator && "maxTouchPoints" in win.navigator) {
1163
+ hasTouch = win.navigator.maxTouchPoints > 0; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
1164
+ // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
1165
+ } else if ("ontouchmove" in win || win.DocumentTouch && doc instanceof win.DocumentTouch) {
1166
+ hasTouch = !0;
1167
+ } else {
1168
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
1169
+ var mQ = win.matchMedia && matchMedia("(pointer:coarse)");
1165
1170
 
1166
- isMobile = hasTouchPoints || hasTouch;
1171
+ if (mQ && mQ.media === "(pointer:coarse)") {
1172
+ hasTouch = !!mQ.matches;
1173
+ }
1174
+ }
1167
1175
  }
1168
1176
 
1169
- var hasMouse = mouse && !isMobile ? "onmouseover" in win : !1;
1170
- return hasMouse && "mouse" || isMobile && "touch" || null;
1177
+ var hasMouse = mouse && !hasTouch ? "onmouseover" in win : !1;
1178
+ return hasMouse && "mouse" || hasTouch && "touch" || null;
1171
1179
  }
1172
1180
  ;// CONCATENATED MODULE: ./src/config/config.ts
1173
1181
  /**
@@ -1292,7 +1300,7 @@ var Plugin = /*#__PURE__*/function () {
1292
1300
  return Plugin;
1293
1301
  }();
1294
1302
 
1295
- Plugin.version = "3.3.0";
1303
+ Plugin.version = "3.3.1";
1296
1304
 
1297
1305
  ;// CONCATENATED MODULE: ./src/Plugin/stanford/Options.ts
1298
1306
  /**
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.1
8
+ * @version 3.3.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):"function"==typeof define&&define.amd?define("bb",["d3-interpolate","d3-color","d3-scale","d3-selection","d3-brush","d3-axis","d3-format"],e):"object"==typeof exports?exports.bb=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.stanford=e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,r,n,a,o,i){return function(){"use strict";var c=[,function(t){t.exports=n},,function(t){t.exports=a},,function(e){e.exports=t},function(t){t.exports=e},function(t){t.exports=r},function(t){t.exports=o},function(t){t.exports=i}],s={};function l(t){var e=s[t];if(void 0!==e)return e.exports;var r=s[t]={exports:{}};return c[t](r,r.exports,l),r.exports}l.d=function(t,e){for(var r in e)l.o(e,r)&&!l.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var u={};return function(){function t(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,r){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,r)}l.d(u,{default:function(){return T}});var r=l(5),n=l(6),a=l(7);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e,r=1;r<arguments.length;r++)e=null!=arguments[r]?arguments[r]:{},r%2?i(Object(e),!0).forEach((function(r){o(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):i(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}));return t}var s={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},b=(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c({},{button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"}),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars",level:"bb-level",levels:"bb-levels"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),s),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),l(1),l(3),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")());b.requestIdleCallback=b.requestIdleCallback||function(t){return setTimeout(t,1)},b.cancelIdleCallback=b.cancelIdleCallback||function(t){return clearTimeout(t)};var d=null==b?void 0:b.document;var h=function(t){return"function"==typeof t},f=function(t){return"string"==typeof t},p=function(t){return"number"==typeof t},g=function(t){return void 0!==t},v=function(t){return"object"==typeof t},x=function(t){return void 0===t||null===t||f(t)&&0===t.length||v(t)&&!(t instanceof Date)&&0===Object.keys(t).length||p(t)&&isNaN(t)};!function(){try{new MouseEvent("t")}catch(t){return function(t,e,r){void 0===r&&(r={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var n=d.createEvent("MouseEvent");n.initMouseEvent(e,r.bubbles,r.cancelable,b,0,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}}();function y(t){var e;if(t instanceof Date)e=t;else if(f(t)){var r=this.config;e=this.format.dataTime(r.data_xFormat)(t)}else p(t)&&!isNaN(t)&&(e=new Date(+t));return e&&!isNaN(+e)||console&&console.error&&console.error("Failed to parse x '"+t+"' to Date object"),e}function m(t){var e,r,n,a=this.config,o=function(){var t=r.shift();return t&&e&&v(e)&&t in e?(e=e[t],o()):t?void 0:e};Object.keys(a).forEach((function(i){e=t,r=i.split("_"),n=o(),g(n)&&(a[i]=n)}))}var w=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach((function(e){t[e]=null,delete t[e]}))},t}();w.version="3.3.0";var S=function(){return{colors:void 0,epochs:[],lines:[],scale_min:void 0,scale_max:void 0,scale_width:20,scale_format:void 0,padding_top:0,padding_right:0,padding_bottom:0,padding_left:0,regions:[]}},_="bb-colorscale",O="bb-stanford-elements",j="bb-stanford-line",C="bb-stanford-lines",E="bb-stanford-region",$="bb-stanford-regions";function k(t,e){return t.epochs<e.epochs?-1:t.epochs>e.epochs?1:0}function M(t){for(var e,r=function(t){for(var e,r,n=0,a=0,o=t.length,i=o-1;a<o;i=a,a++)e=t[a],r=t[i],n+=e.x*r.y,n-=e.y*r.x;return n/2}(t),n=0,a=0,o=0,i=t.length,c=i-1;o<i;c=o,o++){var s=t[o],l=t[c];e=s.x*l.y-l.x*s.y,n+=(s.x+l.x)*e,a+=(s.y+l.y)*e}return{x:n/(e=6*r),y:a/e}}var L=function(){function t(t){this.owner=void 0,this.owner=t;var e=t.$$.$el.main.select(".bb-chart").append("g").attr("class",O);e.append("g").attr("class",C),e.append("g").attr("class",$)}var e=t.prototype;return e.updateStanfordLines=function(t){var e=this.owner.$$,r=e.config,n=e.$el.main,a=r.axis_rotated,o=this.xvCustom.bind(e),i=this.yvCustom.bind(e),c=n.select("."+C).style("shape-rendering","geometricprecision").selectAll("."+j).data(this.owner.config.lines);c.exit().transition().duration(t).style("opacity","0").remove();var s=c.enter().append("g");s.append("line").style("opacity","0"),s.merge(c).attr("class",(function(t){return j+(t.class?" "+t.class:"")})).select("line").transition().duration(t).attr("x1",(function(t){return a?i(t,"y1"):o(t,"x1")})).attr("x2",(function(t){return a?i(t,"y2"):o(t,"x2")})).attr("y1",(function(t){return a?o(t,"x1"):i(t,"y1")})).attr("y2",(function(t){return a?o(t,"x2"):i(t,"y2")})).transition().style("opacity",null)},e.updateStanfordRegions=function(t){var e=this.owner.$$,r=e.config,n=e.$el.main,a=r.axis_rotated,o=this.xvCustom.bind(e),i=this.yvCustom.bind(e),c=this.owner.countEpochsInRegion.bind(e),s=n.select("."+$).selectAll("."+E).data(this.owner.config.regions);s.exit().transition().duration(t).style("opacity","0").remove();var l=s.enter().append("g");l.append("polygon").style("opacity","0"),l.append("text").attr("transform",a?"rotate(-90)":"").style("opacity","0"),(s=l.merge(s)).attr("class",(function(t){return E+(t.class?" "+t.class:"")})).select("polygon").transition().duration(t).attr("points",(function(t){return t.points.map((function(t){return[a?i(t,"y"):o(t,"x"),a?o(t,"x"):i(t,"y")].join(",")})).join(" ")})).transition().style("opacity",(function(t){return(t.opacity?t.opacity:.2)+""})),s.select("text").transition().duration(t).attr("x",(function(t){return a?i(M(t.points),"y"):o(M(t.points),"x")})).attr("y",(function(t){return a?o(M(t.points),"x"):i(M(t.points),"y")})).text((function(t){if(t.text){var e=c(t.points),r=e.value,n=e.percentage;return t.text(r,n)}return""})).attr("text-anchor","middle").attr("dominant-baseline","middle").transition().style("opacity",null)},e.updateStanfordElements=function(t){void 0===t&&(t=0),this.updateStanfordLines(t),this.updateStanfordRegions(t)},e.xvCustom=function(t,e){var r=this,n=r.axis,a=r.config,o=e?t[e]:r.getBaseValue(t);return n.isTimeSeries()?o=y.call(r,o):n.isCategorized()&&f(o)&&(o=a.axis_x_categories.indexOf(t.value)),Math.ceil(r.scale.x(o))},e.yvCustom=function(t,e){var r=this,n=t.axis&&"y2"===t.axis?r.scale.y2:r.scale.y,a=e?t[e]:r.getBaseValue(t);return Math.ceil(n(a))},t}(),P=l(8),D=l(9),q=function(){function t(t){this.owner=void 0,this.colorScale=void 0,this.owner=t}var e=t.prototype;return e.drawColorScale=function(){var t=this.owner,e=t.$$,r=t.config,n=e.data.targets[0],o=e.state.height-r.padding_bottom-r.padding_top,i=r.scale_width,c=function(t,e,r){void 0===r&&(r=1);for(var n=[],a=0|Math.max(0,Math.ceil((e-t)/r)),o=t;o<a;o++)n.push(t+o*r);return n}(r.padding_bottom,o,5),s=(0,a.scaleSequential)(n.colors).domain([c[c.length-1],c[0]]);this.colorScale&&this.colorScale.remove(),this.colorScale=e.$el.svg.append("g").attr("width",50).attr("height",o).attr("class",_),this.colorScale.append("g").attr("transform","translate(0, "+r.padding_top+")").selectAll("bars").data(c).enter().append("rect").attr("y",(function(t,e){return 5*e})).attr("x",0).attr("width",i).attr("height",5).attr("fill",(function(t){return s(t)}));var l=(0,a.scaleLog)().domain([n.minEpochs,n.maxEpochs]).range([c[0]+r.padding_top+c[c.length-1]+5-1,c[0]+r.padding_top]),u=(0,P.axisRight)(l),b=r.scale_format;"pow10"===b?u.tickValues([1,10,100,1e3,1e4,1e5,1e6,1e7]):h(b)?u.tickFormat(b):u.tickFormat((0,D.format)("d"));var d=this.colorScale.append("g").attr("class","legend axis").attr("transform","translate("+i+",0)").call(u);"pow10"===b&&d.selectAll(".tick text").text(null).filter((function(t){return t/Math.pow(10,Math.ceil(Math.log(t)/Math.LN10-1e-12))==1})).text(10).append("tspan").attr("dy","-.7em").text((function(t){return Math.round(Math.log(t)/Math.LN10)})),this.colorScale.attr("transform","translate("+(e.state.current.width-this.xForColorScale())+", 0)")},e.xForColorScale=function(){return this.owner.config.padding_right+this.colorScale.node().getBBox().width},e.getColorScalePadding=function(){return this.xForColorScale()+this.owner.config.padding_left+20},t}(),T=function(o){var i,c;function l(e){var r=o.call(this,e)||this;return r.config=void 0,r.colorScale=void 0,r.elements=void 0,r.config=new S,t(r)||t(r)}c=o,(i=l).prototype=Object.create(c.prototype),i.prototype.constructor=i,e(i,c);var u=l.prototype;return u.$beforeInit=function(){var t=this,e=this.$$;e.config.data_xSort=!1,e.isMultipleX=function(){return!0},e.showGridFocus=function(){},e.labelishData=function(t){return t.values},e.opacityForCircle=function(){return 1};var r=e.getCurrentPaddingRight.bind(e);e.getCurrentPaddingRight=function(){return r()+(t.colorScale?t.colorScale.getColorScalePadding():0)}},u.$init=function(){var t=this.$$;m.call(this,this.options),t.color=this.getStanfordPointColor.bind(t),this.colorScale=new q(this),this.elements=new L(this),this.convertData(),this.initStanfordData(),this.setStanfordTooltip(),this.colorScale.drawColorScale(),this.$redraw()},u.$redraw=function(t){var e,r;null==(e=this.colorScale)||e.drawColorScale(),null==(r=this.elements)||r.updateStanfordElements(t)},u.getOptions=function(){return new S},u.convertData=function(){var t=this.$$.data.targets,e=this.options.epochs;t.forEach((function(t){t.values.forEach((function(t,r){t.epochs=e[r]})),t.minEpochs=void 0,t.maxEpochs=void 0,t.colors=void 0,t.colorscale=void 0}))},u.xvCustom=function(t,e){var r=this,n=r.axis,a=r.config,o=e?t[e]:r.getBaseValue(t);return n.isTimeSeries()?o=y.call(r,o):n.isCategorized()&&f(o)&&(o=a.axis_x_categories.indexOf(t.value)),Math.ceil(r.scale.x(o))},u.yvCustom=function(t,e){var r=this.scale,n=t.axis&&"y2"===t.axis?r.y2:r.y,a=e?t[e]:this.getBaseValue(t);return Math.ceil(n(a))},u.initStanfordData=function(){var t=this.config,e=this.$$.data.targets[0];e.values.sort(k);var o=e.values.map((function(t){return t.epochs}));e.minEpochs=isNaN(t.scale_min)?Math.min.apply(Math,o):t.scale_min,e.maxEpochs=isNaN(t.scale_max)?Math.max.apply(Math,o):t.scale_max,e.colors=h(t.colors)?t.colors:(0,r.interpolateHslLong)((0,n.hsl)(250,1,.5),(0,n.hsl)(0,1,.5)),e.colorscale=(0,a.scaleSequentialLog)(e.colors).domain([e.minEpochs,e.maxEpochs])},u.getStanfordPointColor=function(t){return this.data.targets[0].colorscale(t.epochs)},u.setStanfordTooltip=function(){var t=this.$$.config;x(t.tooltip_contents)&&(t.tooltip_contents=function(e,r,n,a){var o='<table class="'+s.tooltip+'"><tbody>';return e.forEach((function(e){o+="<tr>\n\t\t\t\t\t\t\t<th>"+r(t.data_x)+'</th>\n\t\t\t\t\t\t\t<th class="value">'+n(e.x)+"</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>"+r(e.id)+'</th>\n\t\t\t\t\t\t\t<th class="value">'+n(e.value)+'</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class="'+s.tooltipName+"-"+e.id+'">\n\t\t\t\t\t\t\t<td class="name"><span style="background-color:'+a(e)+'"></span>'+r("Epochs")+'</td>\n\t\t\t\t\t\t\t<td class="value">'+n(e.epochs)+"</td>\n\t\t\t\t\t\t</tr>"})),o+"</tbody></table>"})},u.countEpochsInRegion=function(t){var e=this.data.targets[0],r=e.values.reduce((function(t,e){return t+ +e.epochs}),0),n=e.values.reduce((function(e,r){return function(t,e){for(var r=t.x,n=t.value,a=!1,o=0,i=e.length-1;o<e.length;i=o++){var c=e[o].x,s=e[o].y,l=e[i].x,u=e[i].y;s>n!=u>n&&r<(l-c)*(n-s)/(u-s)+c&&(a=!a)}return a}(r,t)?e+ +r.epochs:e}),0);return{value:n,percentage:0!==n?+(n/r*100).toFixed(1):0}},l}(w)}(),u=u.default}()}));
12
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):"function"==typeof define&&define.amd?define("bb",["d3-interpolate","d3-color","d3-scale","d3-selection","d3-brush","d3-axis","d3-format"],e):"object"==typeof exports?exports.bb=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.stanford=e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,r,n,a,o,i){return function(){"use strict";var c=[,function(t){t.exports=n},,function(t){t.exports=a},,function(e){e.exports=t},function(t){t.exports=e},function(t){t.exports=r},function(t){t.exports=o},function(t){t.exports=i}],s={};function l(t){var e=s[t];if(void 0!==e)return e.exports;var r=s[t]={exports:{}};return c[t](r,r.exports,l),r.exports}l.d=function(t,e){for(var r in e)l.o(e,r)&&!l.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var u={};return function(){function t(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,r){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,r)}l.d(u,{default:function(){return T}});var r=l(5),n=l(6),a=l(7);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e,r=1;r<arguments.length;r++)e=null!=arguments[r]?arguments[r]:{},r%2?i(Object(e),!0).forEach((function(r){o(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):i(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}));return t}var s={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},b=(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c(c({},{button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"}),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars",level:"bb-level",levels:"bb-levels"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),s),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),l(1),l(3),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")());b.requestIdleCallback=b.requestIdleCallback||function(t){return setTimeout(t,1)},b.cancelIdleCallback=b.cancelIdleCallback||function(t){return clearTimeout(t)};var d=null==b?void 0:b.document;var h=function(t){return"function"==typeof t},f=function(t){return"string"==typeof t},p=function(t){return"number"==typeof t},g=function(t){return void 0!==t},v=function(t){return"object"==typeof t},x=function(t){return void 0===t||null===t||f(t)&&0===t.length||v(t)&&!(t instanceof Date)&&0===Object.keys(t).length||p(t)&&isNaN(t)};!function(){try{new MouseEvent("t")}catch(t){return function(t,e,r){void 0===r&&(r={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var n=d.createEvent("MouseEvent");n.initMouseEvent(e,r.bubbles,r.cancelable,b,0,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}}();function y(t){var e;if(t instanceof Date)e=t;else if(f(t)){var r=this.config;e=this.format.dataTime(r.data_xFormat)(t)}else p(t)&&!isNaN(t)&&(e=new Date(+t));return e&&!isNaN(+e)||console&&console.error&&console.error("Failed to parse x '"+t+"' to Date object"),e}function m(t){var e,r,n,a=this.config,o=function(){var t=r.shift();return t&&e&&v(e)&&t in e?(e=e[t],o()):t?void 0:e};Object.keys(a).forEach((function(i){e=t,r=i.split("_"),n=o(),g(n)&&(a[i]=n)}))}var w=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach((function(e){t[e]=null,delete t[e]}))},t}();w.version="3.3.1";var S=function(){return{colors:void 0,epochs:[],lines:[],scale_min:void 0,scale_max:void 0,scale_width:20,scale_format:void 0,padding_top:0,padding_right:0,padding_bottom:0,padding_left:0,regions:[]}},_="bb-colorscale",O="bb-stanford-elements",j="bb-stanford-line",C="bb-stanford-lines",E="bb-stanford-region",$="bb-stanford-regions";function k(t,e){return t.epochs<e.epochs?-1:t.epochs>e.epochs?1:0}function M(t){for(var e,r=function(t){for(var e,r,n=0,a=0,o=t.length,i=o-1;a<o;i=a,a++)e=t[a],r=t[i],n+=e.x*r.y,n-=e.y*r.x;return n/2}(t),n=0,a=0,o=0,i=t.length,c=i-1;o<i;c=o,o++){var s=t[o],l=t[c];e=s.x*l.y-l.x*s.y,n+=(s.x+l.x)*e,a+=(s.y+l.y)*e}return{x:n/(e=6*r),y:a/e}}var L=function(){function t(t){this.owner=void 0,this.owner=t;var e=t.$$.$el.main.select(".bb-chart").append("g").attr("class",O);e.append("g").attr("class",C),e.append("g").attr("class",$)}var e=t.prototype;return e.updateStanfordLines=function(t){var e=this.owner.$$,r=e.config,n=e.$el.main,a=r.axis_rotated,o=this.xvCustom.bind(e),i=this.yvCustom.bind(e),c=n.select("."+C).style("shape-rendering","geometricprecision").selectAll("."+j).data(this.owner.config.lines);c.exit().transition().duration(t).style("opacity","0").remove();var s=c.enter().append("g");s.append("line").style("opacity","0"),s.merge(c).attr("class",(function(t){return j+(t.class?" "+t.class:"")})).select("line").transition().duration(t).attr("x1",(function(t){return a?i(t,"y1"):o(t,"x1")})).attr("x2",(function(t){return a?i(t,"y2"):o(t,"x2")})).attr("y1",(function(t){return a?o(t,"x1"):i(t,"y1")})).attr("y2",(function(t){return a?o(t,"x2"):i(t,"y2")})).transition().style("opacity",null)},e.updateStanfordRegions=function(t){var e=this.owner.$$,r=e.config,n=e.$el.main,a=r.axis_rotated,o=this.xvCustom.bind(e),i=this.yvCustom.bind(e),c=this.owner.countEpochsInRegion.bind(e),s=n.select("."+$).selectAll("."+E).data(this.owner.config.regions);s.exit().transition().duration(t).style("opacity","0").remove();var l=s.enter().append("g");l.append("polygon").style("opacity","0"),l.append("text").attr("transform",a?"rotate(-90)":"").style("opacity","0"),(s=l.merge(s)).attr("class",(function(t){return E+(t.class?" "+t.class:"")})).select("polygon").transition().duration(t).attr("points",(function(t){return t.points.map((function(t){return[a?i(t,"y"):o(t,"x"),a?o(t,"x"):i(t,"y")].join(",")})).join(" ")})).transition().style("opacity",(function(t){return(t.opacity?t.opacity:.2)+""})),s.select("text").transition().duration(t).attr("x",(function(t){return a?i(M(t.points),"y"):o(M(t.points),"x")})).attr("y",(function(t){return a?o(M(t.points),"x"):i(M(t.points),"y")})).text((function(t){if(t.text){var e=c(t.points),r=e.value,n=e.percentage;return t.text(r,n)}return""})).attr("text-anchor","middle").attr("dominant-baseline","middle").transition().style("opacity",null)},e.updateStanfordElements=function(t){void 0===t&&(t=0),this.updateStanfordLines(t),this.updateStanfordRegions(t)},e.xvCustom=function(t,e){var r=this,n=r.axis,a=r.config,o=e?t[e]:r.getBaseValue(t);return n.isTimeSeries()?o=y.call(r,o):n.isCategorized()&&f(o)&&(o=a.axis_x_categories.indexOf(t.value)),Math.ceil(r.scale.x(o))},e.yvCustom=function(t,e){var r=this,n=t.axis&&"y2"===t.axis?r.scale.y2:r.scale.y,a=e?t[e]:r.getBaseValue(t);return Math.ceil(n(a))},t}(),P=l(8),D=l(9),q=function(){function t(t){this.owner=void 0,this.colorScale=void 0,this.owner=t}var e=t.prototype;return e.drawColorScale=function(){var t=this.owner,e=t.$$,r=t.config,n=e.data.targets[0],o=e.state.height-r.padding_bottom-r.padding_top,i=r.scale_width,c=function(t,e,r){void 0===r&&(r=1);for(var n=[],a=0|Math.max(0,Math.ceil((e-t)/r)),o=t;o<a;o++)n.push(t+o*r);return n}(r.padding_bottom,o,5),s=(0,a.scaleSequential)(n.colors).domain([c[c.length-1],c[0]]);this.colorScale&&this.colorScale.remove(),this.colorScale=e.$el.svg.append("g").attr("width",50).attr("height",o).attr("class",_),this.colorScale.append("g").attr("transform","translate(0, "+r.padding_top+")").selectAll("bars").data(c).enter().append("rect").attr("y",(function(t,e){return 5*e})).attr("x",0).attr("width",i).attr("height",5).attr("fill",(function(t){return s(t)}));var l=(0,a.scaleLog)().domain([n.minEpochs,n.maxEpochs]).range([c[0]+r.padding_top+c[c.length-1]+5-1,c[0]+r.padding_top]),u=(0,P.axisRight)(l),b=r.scale_format;"pow10"===b?u.tickValues([1,10,100,1e3,1e4,1e5,1e6,1e7]):h(b)?u.tickFormat(b):u.tickFormat((0,D.format)("d"));var d=this.colorScale.append("g").attr("class","legend axis").attr("transform","translate("+i+",0)").call(u);"pow10"===b&&d.selectAll(".tick text").text(null).filter((function(t){return t/Math.pow(10,Math.ceil(Math.log(t)/Math.LN10-1e-12))==1})).text(10).append("tspan").attr("dy","-.7em").text((function(t){return Math.round(Math.log(t)/Math.LN10)})),this.colorScale.attr("transform","translate("+(e.state.current.width-this.xForColorScale())+", 0)")},e.xForColorScale=function(){return this.owner.config.padding_right+this.colorScale.node().getBBox().width},e.getColorScalePadding=function(){return this.xForColorScale()+this.owner.config.padding_left+20},t}(),T=function(o){var i,c;function l(e){var r=o.call(this,e)||this;return r.config=void 0,r.colorScale=void 0,r.elements=void 0,r.config=new S,t(r)||t(r)}c=o,(i=l).prototype=Object.create(c.prototype),i.prototype.constructor=i,e(i,c);var u=l.prototype;return u.$beforeInit=function(){var t=this,e=this.$$;e.config.data_xSort=!1,e.isMultipleX=function(){return!0},e.showGridFocus=function(){},e.labelishData=function(t){return t.values},e.opacityForCircle=function(){return 1};var r=e.getCurrentPaddingRight.bind(e);e.getCurrentPaddingRight=function(){return r()+(t.colorScale?t.colorScale.getColorScalePadding():0)}},u.$init=function(){var t=this.$$;m.call(this,this.options),t.color=this.getStanfordPointColor.bind(t),this.colorScale=new q(this),this.elements=new L(this),this.convertData(),this.initStanfordData(),this.setStanfordTooltip(),this.colorScale.drawColorScale(),this.$redraw()},u.$redraw=function(t){var e,r;null==(e=this.colorScale)||e.drawColorScale(),null==(r=this.elements)||r.updateStanfordElements(t)},u.getOptions=function(){return new S},u.convertData=function(){var t=this.$$.data.targets,e=this.options.epochs;t.forEach((function(t){t.values.forEach((function(t,r){t.epochs=e[r]})),t.minEpochs=void 0,t.maxEpochs=void 0,t.colors=void 0,t.colorscale=void 0}))},u.xvCustom=function(t,e){var r=this,n=r.axis,a=r.config,o=e?t[e]:r.getBaseValue(t);return n.isTimeSeries()?o=y.call(r,o):n.isCategorized()&&f(o)&&(o=a.axis_x_categories.indexOf(t.value)),Math.ceil(r.scale.x(o))},u.yvCustom=function(t,e){var r=this.scale,n=t.axis&&"y2"===t.axis?r.y2:r.y,a=e?t[e]:this.getBaseValue(t);return Math.ceil(n(a))},u.initStanfordData=function(){var t=this.config,e=this.$$.data.targets[0];e.values.sort(k);var o=e.values.map((function(t){return t.epochs}));e.minEpochs=isNaN(t.scale_min)?Math.min.apply(Math,o):t.scale_min,e.maxEpochs=isNaN(t.scale_max)?Math.max.apply(Math,o):t.scale_max,e.colors=h(t.colors)?t.colors:(0,r.interpolateHslLong)((0,n.hsl)(250,1,.5),(0,n.hsl)(0,1,.5)),e.colorscale=(0,a.scaleSequentialLog)(e.colors).domain([e.minEpochs,e.maxEpochs])},u.getStanfordPointColor=function(t){return this.data.targets[0].colorscale(t.epochs)},u.setStanfordTooltip=function(){var t=this.$$.config;x(t.tooltip_contents)&&(t.tooltip_contents=function(e,r,n,a){var o='<table class="'+s.tooltip+'"><tbody>';return e.forEach((function(e){o+="<tr>\n\t\t\t\t\t\t\t<th>"+r(t.data_x)+'</th>\n\t\t\t\t\t\t\t<th class="value">'+n(e.x)+"</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>"+r(e.id)+'</th>\n\t\t\t\t\t\t\t<th class="value">'+n(e.value)+'</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class="'+s.tooltipName+"-"+e.id+'">\n\t\t\t\t\t\t\t<td class="name"><span style="background-color:'+a(e)+'"></span>'+r("Epochs")+'</td>\n\t\t\t\t\t\t\t<td class="value">'+n(e.epochs)+"</td>\n\t\t\t\t\t\t</tr>"})),o+"</tbody></table>"})},u.countEpochsInRegion=function(t){var e=this.data.targets[0],r=e.values.reduce((function(t,e){return t+ +e.epochs}),0),n=e.values.reduce((function(e,r){return function(t,e){for(var r=t.x,n=t.value,a=!1,o=0,i=e.length-1;o<e.length;i=o++){var c=e[o].x,s=e[o].y,l=e[i].x,u=e[i].y;s>n!=u>n&&r<(l-c)*(n-s)/(u-s)+c&&(a=!a)}return a}(r,t)?e+ +r.epochs:e}),0);return{value:n,percentage:0!==n?+(n/r*100).toFixed(1):0}},l}(w)}(),u=u.default}()}));
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.1
8
+ * @version 3.3.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -212,7 +212,7 @@ var Plugin = /*#__PURE__*/function () {
212
212
  return Plugin;
213
213
  }();
214
214
 
215
- Plugin.version = "3.3.0";
215
+ Plugin.version = "3.3.1";
216
216
 
217
217
  ;// CONCATENATED MODULE: ./src/Plugin/tableview/Options.ts
218
218
  /**
@@ -1173,19 +1173,27 @@ function isTabVisible() {
1173
1173
 
1174
1174
 
1175
1175
  function convertInputType(mouse, touch) {
1176
- var isMobile = !1; // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop
1176
+ var hasTouch = !1;
1177
1177
 
1178
- if (/Mobi/.test(win.navigator.userAgent) && touch) {
1178
+ if (touch) {
1179
1179
  // Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
1180
- var hasTouchPoints = win.navigator && "maxTouchPoints" in win.navigator && win.navigator.maxTouchPoints > 0,
1181
- hasTouch = "ontouchmove" in win || win.DocumentTouch && doc instanceof win.DocumentTouch; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
1182
- // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
1183
-
1184
- isMobile = hasTouchPoints || hasTouch;
1180
+ if (win.navigator && "maxTouchPoints" in win.navigator) {
1181
+ hasTouch = win.navigator.maxTouchPoints > 0; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
1182
+ // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
1183
+ } else if ("ontouchmove" in win || win.DocumentTouch && doc instanceof win.DocumentTouch) {
1184
+ hasTouch = !0;
1185
+ } else {
1186
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
1187
+ var mQ = win.matchMedia && matchMedia("(pointer:coarse)");
1188
+
1189
+ if (mQ && mQ.media === "(pointer:coarse)") {
1190
+ hasTouch = !!mQ.matches;
1191
+ }
1192
+ }
1185
1193
  }
1186
1194
 
1187
- var hasMouse = mouse && !isMobile ? "onmouseover" in win : !1;
1188
- return hasMouse && "mouse" || isMobile && "touch" || null;
1195
+ var hasMouse = mouse && !hasTouch ? "onmouseover" in win : !1;
1196
+ return hasMouse && "mouse" || hasTouch && "touch" || null;
1189
1197
  }
1190
1198
  ;// CONCATENATED MODULE: ./src/config/config.ts
1191
1199
  /**
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.1
8
+ * @version 3.3.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.tableview=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n=[,function(e){e.exports=t},,function(t){t.exports=e}],r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={exports:{}};return n[t](i,i.exports,o),i.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var i={};return function(){function t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(t,e)}o.d(i,{default:function(){return $}});var r=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach((function(e){t[e]=null,delete t[e]}))},t}();r.version="3.3.0";var c=function(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){var e=t;return this.$$.axis.isCategorized()?e=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(e=t.toLocaleDateString()),e},class:void 0,style:!0,title:void 0,updateOnToggle:!0}},l="__tableview-style__",a="bb-tableview",u=".bb-tableview {\n\t\tborder-collapse:collapse;\n\t\tborder-spacing:0;\n\t\tbackground:#fff;\n\t\tmin-width:100%;\n\t\tmargin-top:10px;\n\t\tfont-family:sans-serif;\n\t\tfont-size:.9em;\n\t}\n\t.bb-tableview tr:hover {\n\t\tbackground:#eef7ff;\n\t}\n\t.bb-tableview thead tr {\n\t\tbackground:#f8f8f8;\n\t}\n\t.bb-tableview caption,.bb-tableview td,.bb-tableview th {\n\t\ttext-align: center;\n\t\tborder:1px solid silver;\n\t\tpadding:.5em;\n\t}\n\t.bb-tableview caption {\n\t\tfont-size:1.1em;\n\t\tfont-weight:700;\n\t\tmargin-bottom: -1px;\n\t}",s="<caption>{=title}</caption>\n\t\t<thead><tr>{=thead}</tr></thead>\n\t\t<tbody>{=tbody}</tbody>",f='<th scope="col">{=title}</th>',b='<th scope="row">{=value}</th>',d="<td>{=value}</td>",p=(o(1),o(3),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")());p.requestIdleCallback=p.requestIdleCallback||function(t){return setTimeout(t,1)},p.cancelIdleCallback=p.cancelIdleCallback||function(t){return clearTimeout(t)};var h=null==p?void 0:p.document;var v=function(t){return"number"==typeof t},g=function(t){return void 0!==t},y=function(t){return"object"==typeof t};!function(){try{new MouseEvent("t")}catch(t){return function(t,e,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var r=h.createEvent("MouseEvent");r.initMouseEvent(e,n.bubbles,n.cancelable,p,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(r)}}}();function m(t,e){var n=t;for(var r in e)n=n.replace(new RegExp("{="+r+"}","g"),e[r]);return n}function O(t){var e,n,r,o=this.config,i=function(){var t=n.shift();return t&&e&&y(e)&&t in e?(e=e[t],i()):t?void 0:e};Object.keys(o).forEach((function(c){e=t,n=c.split("_"),r=i(),g(r)&&(o[c]=r)}))}function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var n,r=1;r<arguments.length;r++)n=null!=arguments[r]?arguments[r]:{},r%2?j(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}));return e}var $=function(t){var r,o;function i(n){var r=t.call(this,n)||this;return r.config=void 0,r.element=void 0,r.config=new c,e(r)||e(r)}o=t,(r=i).prototype=Object.create(o.prototype),r.prototype.constructor=r,n(r,o);var p=i.prototype;return p.$beforeInit=function(){O.call(this,this.options)},p.$init=function(){var t,e=this.config,n=e.class,r=e.selector,o=e.style,i=document.querySelector(r||"."+(n||a));if(!i){var c=this.$$.$el.chart.node();i=document.createElement("table"),c.parentNode.insertBefore(i,c.nextSibling)}if("TABLE"!==i.tagName){var s=document.createElement("table");i.appendChild(s),i=s}if(o&&!document.getElementById(l)){var f=document.createElement("style");f.id=l,f.innerHTML=u,(document.head||document.getElementsByTagName("head")[0]).appendChild(f)}(t=i.classList).add.apply(t,[o&&a,n].filter(Boolean)),this.element=i},p.generateTable=function(){var t=this,e=this.$$,n=this.config,r=this.element,o=e.filterTargetsToShow(e.data.targets),i=m(f,{title:o.length?this.config.categoryTitle:""}),c="",l=[];o.forEach((function(t){i+=m(f,{title:t.id}),t.values.forEach((function(t,e){l[e]||(l[e]=[t.x]),l[e].push(t.value)}))})),l.forEach((function(e){c+="<tr>"+e.map((function(e,r){return m(r?d:b,{value:0===r?n.categoryFormat.bind(t)(e):v(e)?e.toLocaleString():""})})).join("")+"</tr>"}));var a=m(s,w(w({},n),{},{title:n.title||e.config.title_text||"",thead:i,tbody:c})).replace(/<[^>]+><\/[^>]+>/g,"");r.innerHTML=a},p.$redraw=function(){var t=this.$$.state;t.resizing||!this.config.updateOnToggle&&t.toggling||this.generateTable()},p.$willDestroy=function(){if(this.element.parentNode.removeChild(this.element),1===this.$$.charts.length){var t,e=document.getElementById(l);null==e||null==(t=e.parentNode)||t.removeChild(e)}},i}(r)}(),i=i.default}()}));
12
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.tableview=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n=[,function(e){e.exports=t},,function(t){t.exports=e}],r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={exports:{}};return n[t](i,i.exports,o),i.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var i={};return function(){function t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(t,e)}o.d(i,{default:function(){return $}});var r=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach((function(e){t[e]=null,delete t[e]}))},t}();r.version="3.3.1";var c=function(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){var e=t;return this.$$.axis.isCategorized()?e=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(e=t.toLocaleDateString()),e},class:void 0,style:!0,title:void 0,updateOnToggle:!0}},l="__tableview-style__",a="bb-tableview",u=".bb-tableview {\n\t\tborder-collapse:collapse;\n\t\tborder-spacing:0;\n\t\tbackground:#fff;\n\t\tmin-width:100%;\n\t\tmargin-top:10px;\n\t\tfont-family:sans-serif;\n\t\tfont-size:.9em;\n\t}\n\t.bb-tableview tr:hover {\n\t\tbackground:#eef7ff;\n\t}\n\t.bb-tableview thead tr {\n\t\tbackground:#f8f8f8;\n\t}\n\t.bb-tableview caption,.bb-tableview td,.bb-tableview th {\n\t\ttext-align: center;\n\t\tborder:1px solid silver;\n\t\tpadding:.5em;\n\t}\n\t.bb-tableview caption {\n\t\tfont-size:1.1em;\n\t\tfont-weight:700;\n\t\tmargin-bottom: -1px;\n\t}",s="<caption>{=title}</caption>\n\t\t<thead><tr>{=thead}</tr></thead>\n\t\t<tbody>{=tbody}</tbody>",f='<th scope="col">{=title}</th>',b='<th scope="row">{=value}</th>',d="<td>{=value}</td>",p=(o(1),o(3),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")());p.requestIdleCallback=p.requestIdleCallback||function(t){return setTimeout(t,1)},p.cancelIdleCallback=p.cancelIdleCallback||function(t){return clearTimeout(t)};var h=null==p?void 0:p.document;var v=function(t){return"number"==typeof t},g=function(t){return void 0!==t},y=function(t){return"object"==typeof t};!function(){try{new MouseEvent("t")}catch(t){return function(t,e,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var r=h.createEvent("MouseEvent");r.initMouseEvent(e,n.bubbles,n.cancelable,p,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(r)}}}();function m(t,e){var n=t;for(var r in e)n=n.replace(new RegExp("{="+r+"}","g"),e[r]);return n}function O(t){var e,n,r,o=this.config,i=function(){var t=n.shift();return t&&e&&y(e)&&t in e?(e=e[t],i()):t?void 0:e};Object.keys(o).forEach((function(c){e=t,n=c.split("_"),r=i(),g(r)&&(o[c]=r)}))}function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var n,r=1;r<arguments.length;r++)n=null!=arguments[r]?arguments[r]:{},r%2?j(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}));return e}var $=function(t){var r,o;function i(n){var r=t.call(this,n)||this;return r.config=void 0,r.element=void 0,r.config=new c,e(r)||e(r)}o=t,(r=i).prototype=Object.create(o.prototype),r.prototype.constructor=r,n(r,o);var p=i.prototype;return p.$beforeInit=function(){O.call(this,this.options)},p.$init=function(){var t,e=this.config,n=e.class,r=e.selector,o=e.style,i=document.querySelector(r||"."+(n||a));if(!i){var c=this.$$.$el.chart.node();i=document.createElement("table"),c.parentNode.insertBefore(i,c.nextSibling)}if("TABLE"!==i.tagName){var s=document.createElement("table");i.appendChild(s),i=s}if(o&&!document.getElementById(l)){var f=document.createElement("style");f.id=l,f.innerHTML=u,(document.head||document.getElementsByTagName("head")[0]).appendChild(f)}(t=i.classList).add.apply(t,[o&&a,n].filter(Boolean)),this.element=i},p.generateTable=function(){var t=this,e=this.$$,n=this.config,r=this.element,o=e.filterTargetsToShow(e.data.targets),i=m(f,{title:o.length?this.config.categoryTitle:""}),c="",l=[];o.forEach((function(t){i+=m(f,{title:t.id}),t.values.forEach((function(t,e){l[e]||(l[e]=[t.x]),l[e].push(t.value)}))})),l.forEach((function(e){c+="<tr>"+e.map((function(e,r){return m(r?d:b,{value:0===r?n.categoryFormat.bind(t)(e):v(e)?e.toLocaleString():""})})).join("")+"</tr>"}));var a=m(s,w(w({},n),{},{title:n.title||e.config.title_text||"",thead:i,tbody:c})).replace(/<[^>]+><\/[^>]+>/g,"");r.innerHTML=a},p.$redraw=function(){var t=this.$$.state;t.resizing||!this.config.updateOnToggle&&t.toggling||this.generateTable()},p.$willDestroy=function(){if(this.element.parentNode.removeChild(this.element),1===this.$$.charts.length){var t,e=document.getElementById(l);null==e||null==(t=e.parentNode)||t.removeChild(e)}},i}(r)}(),i=i.default}()}));
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.1
8
+ * @version 3.3.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -976,19 +976,27 @@ function isTabVisible() {
976
976
 
977
977
 
978
978
  function convertInputType(mouse, touch) {
979
- var isMobile = !1; // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop
979
+ var hasTouch = !1;
980
980
 
981
- if (/Mobi/.test(win.navigator.userAgent) && touch) {
981
+ if (touch) {
982
982
  // Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
983
- var hasTouchPoints = win.navigator && "maxTouchPoints" in win.navigator && win.navigator.maxTouchPoints > 0,
984
- hasTouch = "ontouchmove" in win || win.DocumentTouch && doc instanceof win.DocumentTouch; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
985
- // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
986
-
987
- isMobile = hasTouchPoints || hasTouch;
983
+ if (win.navigator && "maxTouchPoints" in win.navigator) {
984
+ hasTouch = win.navigator.maxTouchPoints > 0; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
985
+ // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
986
+ } else if ("ontouchmove" in win || win.DocumentTouch && doc instanceof win.DocumentTouch) {
987
+ hasTouch = !0;
988
+ } else {
989
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
990
+ var mQ = win.matchMedia && matchMedia("(pointer:coarse)");
991
+
992
+ if (mQ && mQ.media === "(pointer:coarse)") {
993
+ hasTouch = !!mQ.matches;
994
+ }
995
+ }
988
996
  }
989
997
 
990
- var hasMouse = mouse && !isMobile ? "onmouseover" in win : !1;
991
- return hasMouse && "mouse" || isMobile && "touch" || null;
998
+ var hasMouse = mouse && !hasTouch ? "onmouseover" in win : !1;
999
+ return hasMouse && "mouse" || hasTouch && "touch" || null;
992
1000
  }
993
1001
  ;// CONCATENATED MODULE: ./src/config/config.ts
994
1002
  /**
@@ -1113,7 +1121,7 @@ var Plugin = /*#__PURE__*/function () {
1113
1121
  return Plugin;
1114
1122
  }();
1115
1123
 
1116
- Plugin.version = "3.3.0";
1124
+ Plugin.version = "3.3.1";
1117
1125
 
1118
1126
  ;// CONCATENATED MODULE: ./src/Plugin/textoverlap/Options.ts
1119
1127
  /**
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.1
8
+ * @version 3.3.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-delaunay","d3-polygon","d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.textoverlap=t(e.d3,e.d3,e.d3,e.d3))}(this,(function(e,t,n,o){return function(){"use strict";var r={3:function(e){e.exports=o},12:function(t){t.exports=e},13:function(e){e.exports=t},1:function(e){e.exports=n}},i={};function c(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return r[e](n,n.exports,c),n.exports}c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var u={};return function(){function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}c.d(u,{default:function(){return d}});var n=c(12),o=c(13);c(1),c(3);var r="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")();r.requestIdleCallback=r.requestIdleCallback||function(e){return setTimeout(e,1)},r.cancelIdleCallback=r.cancelIdleCallback||function(e){return clearTimeout(e)};var i=null==r?void 0:r.document;var a=function(e){return void 0!==e},l=function(e){return"object"==typeof e};!function(){try{new MouseEvent("t")}catch(e){return function(e,t,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var o=i.createEvent("MouseEvent");o.initMouseEvent(t,n.bubbles,n.cancelable,r,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.dispatchEvent(o)}}}();function s(e){var t,n,o,r=this.config,i=function(){var e=n.shift();return e&&t&&l(t)&&e in t?(t=t[e],i()):e?void 0:t};Object.keys(r).forEach((function(c){t=e,n=c.split("_"),o=i(),a(o)&&(r[c]=o)}))}var f=function(){function e(e){void 0===e&&(e={}),this.$$=void 0,this.options=void 0,this.options=e}var t=e.prototype;return t.$beforeInit=function(){},t.$init=function(){},t.$afterInit=function(){},t.$redraw=function(){},t.$willDestroy=function(){var e=this;Object.keys(this).forEach((function(t){e[t]=null,delete e[t]}))},e}();f.version="3.3.0";var b=function(){return{selector:void 0,extent:1,area:0}},d=function(r){var i,c;function u(t){var n=r.call(this,t)||this;return n.config=void 0,n.config=new b,e(n)||e(n)}c=r,(i=u).prototype=Object.create(c.prototype),i.prototype.constructor=i,t(i,c);var a=u.prototype;return a.$init=function(){s.call(this,this.options)},a.$redraw=function(){var e=this.$$.$el,t=this.config.selector,n=t?e.main.selectAll(t):e.text;n.empty()||this.preventLabelOverlap(n)},a.generateVoronoi=function(e){var t=this.$$.scale,o=["x","y"].map((function(e){return t[e].domain()})),r=o[0],i=o[1],c=[i[0],r[1]];return r[1]=c[0],i[0]=c[1],n.Delaunay.from(e).voronoi([].concat(r,i))},a.preventLabelOverlap=function(e){var t=this.config,n=t.extent,r=t.area,i=e.data().map((function(e){return[e.index,e.value]})),c=this.generateVoronoi(i),u=0;e.each((function(){var e=c.cellPolygon(u);if(e&&this){var t=i[u],a=t[0],l=t[1],s=(0,o.polygonCentroid)(e),f=s[0],b=s[1],d=Math.abs((0,o.polygonArea)(e)),p=Math.round(Math.atan2(b-l,f-a)/Math.PI*2),v=n*(0===p?1:-1),h=-1===p?-n:n+5,y=1===Math.abs(p)?"middle":0===p?"start":"end";this.style.display=d<r?"none":"",this.setAttribute("text-anchor",y),this.setAttribute("dy","0."+(1===p?71:35)+"em"),this.setAttribute("transform","translate("+v+", "+h+")")}u++}))},u}(f)}(),u=u.default}()}));
12
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-delaunay","d3-polygon","d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.textoverlap=t(e.d3,e.d3,e.d3,e.d3))}(this,(function(e,t,n,o){return function(){"use strict";var r={3:function(e){e.exports=o},12:function(t){t.exports=e},13:function(e){e.exports=t},1:function(e){e.exports=n}},i={};function c(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return r[e](n,n.exports,c),n.exports}c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var u={};return function(){function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}c.d(u,{default:function(){return d}});var n=c(12),o=c(13);c(1),c(3);var r="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")();r.requestIdleCallback=r.requestIdleCallback||function(e){return setTimeout(e,1)},r.cancelIdleCallback=r.cancelIdleCallback||function(e){return clearTimeout(e)};var i=null==r?void 0:r.document;var a=function(e){return void 0!==e},l=function(e){return"object"==typeof e};!function(){try{new MouseEvent("t")}catch(e){return function(e,t,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var o=i.createEvent("MouseEvent");o.initMouseEvent(t,n.bubbles,n.cancelable,r,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.dispatchEvent(o)}}}();function s(e){var t,n,o,r=this.config,i=function(){var e=n.shift();return e&&t&&l(t)&&e in t?(t=t[e],i()):e?void 0:t};Object.keys(r).forEach((function(c){t=e,n=c.split("_"),o=i(),a(o)&&(r[c]=o)}))}var f=function(){function e(e){void 0===e&&(e={}),this.$$=void 0,this.options=void 0,this.options=e}var t=e.prototype;return t.$beforeInit=function(){},t.$init=function(){},t.$afterInit=function(){},t.$redraw=function(){},t.$willDestroy=function(){var e=this;Object.keys(this).forEach((function(t){e[t]=null,delete e[t]}))},e}();f.version="3.3.1";var b=function(){return{selector:void 0,extent:1,area:0}},d=function(r){var i,c;function u(t){var n=r.call(this,t)||this;return n.config=void 0,n.config=new b,e(n)||e(n)}c=r,(i=u).prototype=Object.create(c.prototype),i.prototype.constructor=i,t(i,c);var a=u.prototype;return a.$init=function(){s.call(this,this.options)},a.$redraw=function(){var e=this.$$.$el,t=this.config.selector,n=t?e.main.selectAll(t):e.text;n.empty()||this.preventLabelOverlap(n)},a.generateVoronoi=function(e){var t=this.$$.scale,o=["x","y"].map((function(e){return t[e].domain()})),r=o[0],i=o[1],c=[i[0],r[1]];return r[1]=c[0],i[0]=c[1],n.Delaunay.from(e).voronoi([].concat(r,i))},a.preventLabelOverlap=function(e){var t=this.config,n=t.extent,r=t.area,i=e.data().map((function(e){return[e.index,e.value]})),c=this.generateVoronoi(i),u=0;e.each((function(){var e=c.cellPolygon(u);if(e&&this){var t=i[u],a=t[0],l=t[1],s=(0,o.polygonCentroid)(e),f=s[0],b=s[1],d=Math.abs((0,o.polygonArea)(e)),p=Math.round(Math.atan2(b-l,f-a)/Math.PI*2),v=n*(0===p?1:-1),h=-1===p?-n:n+5,y=1===Math.abs(p)?"middle":0===p?"start":"end";this.style.display=d<r?"none":"",this.setAttribute("text-anchor",y),this.setAttribute("dy","0."+(1===p?71:35)+"em"),this.setAttribute("transform","translate("+v+", "+h+")")}u++}))},u}(f)}(),u=u.default}()}));