billboard.js 3.13.0-next.2 → 3.13.0

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 (53) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +5 -17
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +5 -5
  5. package/dist/billboard.pkgd.js +144 -58
  6. package/dist/billboard.pkgd.min.js +17 -17
  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 +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +139 -41
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +5 -5
  19. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +139 -41
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +6 -6
  21. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +139 -41
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +8 -8
  23. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +139 -41
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +7 -7
  25. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +139 -41
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +6 -6
  27. package/dist/theme/dark.css +1 -1
  28. package/dist/theme/dark.min.css +1 -1
  29. package/dist/theme/datalab.css +1 -1
  30. package/dist/theme/datalab.min.css +1 -1
  31. package/dist/theme/graph.css +1 -1
  32. package/dist/theme/graph.min.css +1 -1
  33. package/dist/theme/insight.css +1 -1
  34. package/dist/theme/insight.min.css +1 -1
  35. package/dist/theme/modern.css +1 -1
  36. package/dist/theme/modern.min.css +1 -1
  37. package/dist-esm/billboard.js +14 -26
  38. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  39. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +3 -3
  40. package/dist-esm/plugin/billboardjs-plugin-stanford.js +3 -3
  41. package/dist-esm/plugin/billboardjs-plugin-tableview.js +3 -3
  42. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +3 -3
  43. package/package.json +18 -18
  44. package/src/ChartInternal/Axis/AxisRendererHelper.ts +1 -2
  45. package/src/ChartInternal/ChartInternal.ts +1 -1
  46. package/src/ChartInternal/data/IData.ts +1 -1
  47. package/src/ChartInternal/interactions/zoom.ts +2 -1
  48. package/src/ChartInternal/internals/size.ts +1 -1
  49. package/src/ChartInternal/internals/tooltip.ts +1 -1
  50. package/src/config/Options/axis/y2.ts +0 -13
  51. package/src/config/Options/interaction/zoom.ts +2 -2
  52. package/src/module/generator.ts +1 -1
  53. package/src/module/util.ts +2 -2
@@ -5,11 +5,11 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.13.0-next.2
8
+ * @version 3.13.0
9
9
  *
10
10
  * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
11
- * - @types/d3-selection ^3.0.0
12
- * - @types/d3-transition ^3.0.0
11
+ * - @types/d3-selection ^3.0.10
12
+ * - @types/d3-transition ^3.0.8
13
13
  * - d3-axis ^3.0.0
14
14
  * - d3-brush ^3.0.0
15
15
  * - d3-drag ^3.0.0
@@ -1235,10 +1235,10 @@ var SHARED = '__core-js_shared__';
1235
1235
  var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
1236
1236
 
1237
1237
  (store.versions || (store.versions = [])).push({
1238
- version: '3.38.0',
1238
+ version: '3.38.1',
1239
1239
  mode: IS_PURE ? 'pure' : 'global',
1240
1240
  copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
1241
- license: 'https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE',
1241
+ license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
1242
1242
  source: 'https://github.com/zloirock/core-js'
1243
1243
  });
1244
1244
 
@@ -2810,6 +2810,7 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
2810
2810
  var SymbolWrapper = function Symbol() {
2811
2811
  var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
2812
2812
  var result = isPrototypeOf(SymbolPrototype, this)
2813
+ // eslint-disable-next-line sonar/inconsistent-function-call -- ok
2813
2814
  ? new NativeSymbol(description)
2814
2815
  // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
2815
2816
  : description === undefined ? NativeSymbol() : NativeSymbol(description);
@@ -4573,7 +4574,7 @@ module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
4573
4574
  var target = state.target;
4574
4575
  var index = state.index++;
4575
4576
  if (!target || index >= target.length) {
4576
- state.target = undefined;
4577
+ state.target = null;
4577
4578
  return createIterResultObject(undefined, true);
4578
4579
  }
4579
4580
  switch (state.kind) {
@@ -6054,7 +6055,7 @@ if (!NATIVE_ARRAY_BUFFER) {
6054
6055
  });
6055
6056
  } else {
6056
6057
  var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;
6057
- /* eslint-disable no-new -- required for testing */
6058
+ /* eslint-disable no-new, sonar/inconsistent-function-call -- required for testing */
6058
6059
  if (!fails(function () {
6059
6060
  NativeArrayBuffer(1);
6060
6061
  }) || !fails(function () {
@@ -6065,7 +6066,7 @@ if (!NATIVE_ARRAY_BUFFER) {
6065
6066
  new NativeArrayBuffer(NaN);
6066
6067
  return NativeArrayBuffer.length !== 1 || INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;
6067
6068
  })) {
6068
- /* eslint-enable no-new -- required for testing */
6069
+ /* eslint-enable no-new, sonar/inconsistent-function-call -- required for testing */
6069
6070
  $ArrayBuffer = function ArrayBuffer(length) {
6070
6071
  anInstance(this, ArrayBufferPrototype);
6071
6072
  return inheritIfRequired(new NativeArrayBuffer(toIndex(length)), this, $ArrayBuffer);
@@ -7733,8 +7734,8 @@ module.exports = {
7733
7734
  setInternalState(that, {
7734
7735
  type: CONSTRUCTOR_NAME,
7735
7736
  index: create(null),
7736
- first: undefined,
7737
- last: undefined,
7737
+ first: null,
7738
+ last: null,
7738
7739
  size: 0
7739
7740
  });
7740
7741
  if (!DESCRIPTORS) that.size = 0;
@@ -7759,7 +7760,7 @@ module.exports = {
7759
7760
  key: key,
7760
7761
  value: value,
7761
7762
  previous: previous = state.last,
7762
- next: undefined,
7763
+ next: null,
7763
7764
  removed: false
7764
7765
  };
7765
7766
  if (!state.first) state.first = entry;
@@ -7793,10 +7794,10 @@ module.exports = {
7793
7794
  var entry = state.first;
7794
7795
  while (entry) {
7795
7796
  entry.removed = true;
7796
- if (entry.previous) entry.previous = entry.previous.next = undefined;
7797
+ if (entry.previous) entry.previous = entry.previous.next = null;
7797
7798
  entry = entry.next;
7798
7799
  }
7799
- state.first = state.last = undefined;
7800
+ state.first = state.last = null;
7800
7801
  state.index = create(null);
7801
7802
  if (DESCRIPTORS) state.size = 0;
7802
7803
  else that.size = 0;
@@ -7888,7 +7889,7 @@ module.exports = {
7888
7889
  target: iterated,
7889
7890
  state: getInternalCollectionState(iterated),
7890
7891
  kind: kind,
7891
- last: undefined
7892
+ last: null
7892
7893
  });
7893
7894
  }, function () {
7894
7895
  var state = getInternalIteratorState(this);
@@ -7899,7 +7900,7 @@ module.exports = {
7899
7900
  // get next entry
7900
7901
  if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
7901
7902
  // or finish the iteration
7902
- state.target = undefined;
7903
+ state.target = null;
7903
7904
  return createIterResultObject(undefined, true);
7904
7905
  }
7905
7906
  // return step by kind
@@ -9229,6 +9230,8 @@ if (DESCRIPTORS) {
9229
9230
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9230
9231
 
9231
9232
 
9233
+ /* eslint-disable no-undef, no-useless-call, sonar/no-reference-error -- required for testing */
9234
+ /* eslint-disable es/no-legacy-object-prototype-accessor-methods -- required for testing */
9232
9235
  var IS_PURE = __webpack_require__(36);
9233
9236
  var globalThis = __webpack_require__(4);
9234
9237
  var fails = __webpack_require__(7);
@@ -9241,7 +9244,6 @@ module.exports = IS_PURE || !fails(function () {
9241
9244
  if (WEBKIT && WEBKIT < 535) return;
9242
9245
  var key = Math.random();
9243
9246
  // In FF throws only define methods
9244
- // eslint-disable-next-line no-undef, no-useless-call, es/no-legacy-object-prototype-accessor-methods -- required for testing
9245
9247
  __defineSetter__.call(null, key, function () { /* empty */ });
9246
9248
  delete globalThis[key];
9247
9249
  });
@@ -10173,7 +10175,7 @@ if (FORCED_PROMISE_CONSTRUCTOR) {
10173
10175
  reactions: new Queue(),
10174
10176
  rejection: false,
10175
10177
  state: PENDING,
10176
- value: undefined
10178
+ value: null
10177
10179
  });
10178
10180
  };
10179
10181
 
@@ -11472,6 +11474,7 @@ var BASE_FORCED = DESCRIPTORS &&
11472
11474
  (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG || fails(function () {
11473
11475
  re2[MATCH] = false;
11474
11476
  // RegExp constructor can alter flags and IsRegExp works correct with @@match
11477
+ // eslint-disable-next-line sonar/inconsistent-function-call -- required for testing
11475
11478
  return NativeRegExp(re1) !== re1 || NativeRegExp(re2) === re2 || String(NativeRegExp(re1, 'i')) !== '/a/i';
11476
11479
  }));
11477
11480
 
@@ -14551,7 +14554,7 @@ if (DESCRIPTORS) {
14551
14554
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
14552
14555
 
14553
14556
 
14554
- /* eslint-disable no-new -- required for testing */
14557
+ /* eslint-disable no-new, sonar/inconsistent-function-call -- required for testing */
14555
14558
  var globalThis = __webpack_require__(4);
14556
14559
  var fails = __webpack_require__(7);
14557
14560
  var checkCorrectnessOfIteration = __webpack_require__(164);
@@ -15903,7 +15906,7 @@ module.exports = {
15903
15906
  setInternalState(that, {
15904
15907
  type: CONSTRUCTOR_NAME,
15905
15908
  id: id++,
15906
- frozen: undefined
15909
+ frozen: null
15907
15910
  });
15908
15911
  if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
15909
15912
  });
@@ -15951,7 +15954,7 @@ module.exports = {
15951
15954
  if (isObject(key)) {
15952
15955
  var data = getWeakData(key);
15953
15956
  if (data === true) return uncaughtFrozenStore(state).get(key);
15954
- return data ? data[state.id] : undefined;
15957
+ if (data) return data[state.id];
15955
15958
  }
15956
15959
  },
15957
15960
  // `WeakMap.prototype.set(key, value)` method
@@ -18603,9 +18606,11 @@ module.exports = function (input) {
18603
18606
 
18604
18607
  // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
18605
18608
  __webpack_require__(168);
18609
+ __webpack_require__(425);
18606
18610
  var $ = __webpack_require__(3);
18607
18611
  var globalThis = __webpack_require__(4);
18608
18612
  var safeGetBuiltIn = __webpack_require__(345);
18613
+ var getBuiltIn = __webpack_require__(23);
18609
18614
  var call = __webpack_require__(8);
18610
18615
  var uncurryThis = __webpack_require__(14);
18611
18616
  var DESCRIPTORS = __webpack_require__(6);
@@ -18645,10 +18650,11 @@ var NativeRequest = safeGetBuiltIn('Request');
18645
18650
  var Headers = safeGetBuiltIn('Headers');
18646
18651
  var RequestPrototype = NativeRequest && NativeRequest.prototype;
18647
18652
  var HeadersPrototype = Headers && Headers.prototype;
18648
- var RegExp = globalThis.RegExp;
18649
18653
  var TypeError = globalThis.TypeError;
18650
- var decodeURIComponent = globalThis.decodeURIComponent;
18651
18654
  var encodeURIComponent = globalThis.encodeURIComponent;
18655
+ var fromCharCode = String.fromCharCode;
18656
+ var fromCodePoint = getBuiltIn('String', 'fromCodePoint');
18657
+ var $parseInt = parseInt;
18652
18658
  var charAt = uncurryThis(''.charAt);
18653
18659
  var join = uncurryThis([].join);
18654
18660
  var push = uncurryThis([].push);
@@ -18657,33 +18663,125 @@ var shift = uncurryThis([].shift);
18657
18663
  var splice = uncurryThis([].splice);
18658
18664
  var split = uncurryThis(''.split);
18659
18665
  var stringSlice = uncurryThis(''.slice);
18666
+ var exec = uncurryThis(/./.exec);
18660
18667
 
18661
18668
  var plus = /\+/g;
18662
- var sequences = Array(4);
18669
+ var FALLBACK_REPLACER = '\uFFFD';
18670
+ var VALID_HEX = /^[0-9a-f]+$/i;
18663
18671
 
18664
- var percentSequence = function (bytes) {
18665
- return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
18672
+ var parseHexOctet = function (string, start) {
18673
+ var substr = stringSlice(string, start, start + 2);
18674
+ if (!exec(VALID_HEX, substr)) return NaN;
18675
+
18676
+ return $parseInt(substr, 16);
18666
18677
  };
18667
18678
 
18668
- var percentDecode = function (sequence) {
18669
- try {
18670
- return decodeURIComponent(sequence);
18671
- } catch (error) {
18672
- return sequence;
18679
+ var getLeadingOnes = function (octet) {
18680
+ var count = 0;
18681
+ for (var mask = 0x80; mask > 0 && (octet & mask) !== 0; mask >>= 1) {
18682
+ count++;
18673
18683
  }
18684
+ return count;
18674
18685
  };
18675
18686
 
18676
- var deserialize = function (it) {
18677
- var result = replace(it, plus, ' ');
18678
- var bytes = 4;
18679
- try {
18680
- return decodeURIComponent(result);
18681
- } catch (error) {
18682
- while (bytes) {
18683
- result = replace(result, percentSequence(bytes--), percentDecode);
18687
+ var utf8Decode = function (octets) {
18688
+ var codePoint = null;
18689
+
18690
+ switch (octets.length) {
18691
+ case 1:
18692
+ codePoint = octets[0];
18693
+ break;
18694
+ case 2:
18695
+ codePoint = (octets[0] & 0x1F) << 6 | (octets[1] & 0x3F);
18696
+ break;
18697
+ case 3:
18698
+ codePoint = (octets[0] & 0x0F) << 12 | (octets[1] & 0x3F) << 6 | (octets[2] & 0x3F);
18699
+ break;
18700
+ case 4:
18701
+ codePoint = (octets[0] & 0x07) << 18 | (octets[1] & 0x3F) << 12 | (octets[2] & 0x3F) << 6 | (octets[3] & 0x3F);
18702
+ break;
18703
+ }
18704
+
18705
+ return codePoint > 0x10FFFF ? null : codePoint;
18706
+ };
18707
+
18708
+ var decode = function (input) {
18709
+ input = replace(input, plus, ' ');
18710
+ var length = input.length;
18711
+ var result = '';
18712
+ var i = 0;
18713
+
18714
+ while (i < length) {
18715
+ var decodedChar = charAt(input, i);
18716
+
18717
+ if (decodedChar === '%') {
18718
+ if (charAt(input, i + 1) === '%' || i + 3 > length) {
18719
+ result += '%';
18720
+ i++;
18721
+ continue;
18722
+ }
18723
+
18724
+ var octet = parseHexOctet(input, i + 1);
18725
+
18726
+ // eslint-disable-next-line no-self-compare -- NaN check
18727
+ if (octet !== octet) {
18728
+ result += decodedChar;
18729
+ i++;
18730
+ continue;
18731
+ }
18732
+
18733
+ i += 2;
18734
+ var byteSequenceLength = getLeadingOnes(octet);
18735
+
18736
+ if (byteSequenceLength === 0) {
18737
+ decodedChar = fromCharCode(octet);
18738
+ } else {
18739
+ if (byteSequenceLength === 1 || byteSequenceLength > 4) {
18740
+ result += FALLBACK_REPLACER;
18741
+ i++;
18742
+ continue;
18743
+ }
18744
+
18745
+ var octets = [octet];
18746
+ var sequenceIndex = 1;
18747
+
18748
+ while (sequenceIndex < byteSequenceLength) {
18749
+ i++;
18750
+ if (i + 3 > length || charAt(input, i) !== '%') break;
18751
+
18752
+ var nextByte = parseHexOctet(input, i + 1);
18753
+
18754
+ // eslint-disable-next-line no-self-compare -- NaN check
18755
+ if (nextByte !== nextByte) {
18756
+ i += 3;
18757
+ break;
18758
+ }
18759
+ if (nextByte > 191 || nextByte < 128) break;
18760
+
18761
+ push(octets, nextByte);
18762
+ i += 2;
18763
+ sequenceIndex++;
18764
+ }
18765
+
18766
+ if (octets.length !== byteSequenceLength) {
18767
+ result += FALLBACK_REPLACER;
18768
+ continue;
18769
+ }
18770
+
18771
+ var codePoint = utf8Decode(octets);
18772
+ if (codePoint === null) {
18773
+ result += FALLBACK_REPLACER;
18774
+ } else {
18775
+ decodedChar = fromCodePoint(codePoint);
18776
+ }
18777
+ }
18684
18778
  }
18685
- return result;
18779
+
18780
+ result += decodedChar;
18781
+ i++;
18686
18782
  }
18783
+
18784
+ return result;
18687
18785
  };
18688
18786
 
18689
18787
  var find = /[!'()~]|%20/g;
@@ -18717,7 +18815,7 @@ var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params
18717
18815
  var target = state.target;
18718
18816
  var index = state.index++;
18719
18817
  if (!target || index >= target.length) {
18720
- state.target = undefined;
18818
+ state.target = null;
18721
18819
  return createIterResultObject(undefined, true);
18722
18820
  }
18723
18821
  var entry = target[index];
@@ -18776,8 +18874,8 @@ URLSearchParamsState.prototype = {
18776
18874
  if (attribute.length) {
18777
18875
  entry = split(attribute, '=');
18778
18876
  push(entries, {
18779
- key: deserialize(shift(entry)),
18780
- value: deserialize(join(entry, '='))
18877
+ key: decode(shift(entry)),
18878
+ value: decode(join(entry, '='))
18781
18879
  });
18782
18880
  }
18783
18881
  }
@@ -33981,7 +34079,7 @@ class ChartInternal {
33981
34079
  if (hasAxis || hasColorPatterns || hasPolar || hasTreemap || labelsBGColor || ((_a = $$.hasLegendDefsPoint) == null ? void 0 : _a.call($$))) {
33982
34080
  $el.defs = $el.svg.append("defs");
33983
34081
  if (hasAxis) {
33984
- ["id", "idXAxis", "idYAxis", "idY2Axis", "idGrid"].forEach((v) => {
34082
+ ["id", "idXAxis", "idYAxis", "idGrid"].forEach((v) => {
33985
34083
  $$.appendClip($el.defs, state.clip[v]);
33986
34084
  });
33987
34085
  }
@@ -36838,10 +36936,11 @@ util_extend(zoom, {
36838
36936
  * @private
36839
36937
  */
36840
36938
  bindZoomOnEventRect() {
36939
+ var _a;
36841
36940
  const $$ = this;
36842
36941
  const { config, $el: { eventRect, svg } } = $$;
36843
36942
  const behaviour = config.zoom_type === "drag" ? $$.zoomBehaviour : $$.zoom;
36844
- if (win.GestureEvent && /^((?!chrome|android|mobile).)*safari/i.test(navigator.userAgent)) {
36943
+ if (win.GestureEvent && /^((?!chrome|android|mobile).)*safari/i.test((_a = win.navigator) == null ? void 0 : _a.userAgent)) {
36845
36944
  svg.on("wheel", () => {
36846
36945
  });
36847
36946
  }
@@ -38372,7 +38471,6 @@ class AxisRendererHelper {
38372
38471
  size.w = width;
38373
38472
  size.h = height;
38374
38473
  }
38375
- } catch (e) {
38376
38474
  } finally {
38377
38475
  el.text("");
38378
38476
  }
@@ -42140,18 +42238,6 @@ function smoothLines(el, type) {
42140
42238
 
42141
42239
  ;// CONCATENATED MODULE: ./src/config/Options/axis/y2.ts
42142
42240
  /* harmony default export */ var y2 = ({
42143
- /**
42144
- * Set clip-path attribute for y2 axis element
42145
- * - **NOTE**: `clip-path` attribute for y2 Axis is set only when `axis.y2.inner` option is true.
42146
- * @name axis․y2․clipPath
42147
- * @memberof Options
42148
- * @type {boolean}
42149
- * @default true
42150
- * @example
42151
- * // don't set 'clip-path' attribute
42152
- * clipPath: false
42153
- */
42154
- axis_y2_clipPath: true,
42155
42241
  /**
42156
42242
  * Show or hide y2 axis.
42157
42243
  * - **NOTE**:
@@ -48285,7 +48371,7 @@ const bb = {
48285
48371
  * bb.version; // "1.0.0"
48286
48372
  * @memberof bb
48287
48373
  */
48288
- version: "3.13.0-next.2",
48374
+ version: "3.13.0",
48289
48375
  /**
48290
48376
  * Generate chart
48291
48377
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: