gwchq-textjam 0.3.4 → 0.3.5

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.
package/dist/index.js CHANGED
@@ -68351,7 +68351,7 @@ __webpack_require__.d(__webpack_exports__, {
68351
68351
  });
68352
68352
 
68353
68353
  ;// ./src/assets/editor/pyodide/shims/pygal.js?url
68354
- const pygalurl_namespaceObject = __webpack_require__.p + "assets/pygalc0b4f32d2d2cc5a0c638.js";
68354
+ const pygalurl_namespaceObject = __webpack_require__.p + "assets/pygalef3b78a56cb1d66beb61.js";
68355
68355
  ;// ./src/assets/editor/pyodide/packages/turtle-0.0.1-py3-none-any.whl?url
68356
68356
  const turtle_0_0_1_py3_none_anyurl_namespaceObject = __webpack_require__.p + "assets/turtle-0.0.1-py3-none-any0c3147a3e0c3188b2544.whl";
68357
68357
  ;// ./src/assets/editor/pyodide/packages/p5-0.0.1-py3-none-any.whl?url
@@ -68492,8 +68492,8 @@ __webpack_require__.r(__webpack_exports__);
68492
68492
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
68493
68493
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
68494
68494
  /* harmony export */ });
68495
- /* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(89379);
68496
- /* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53986);
68495
+ /* harmony import */ var D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(89379);
68496
+ /* harmony import */ var D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53986);
68497
68497
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
68498
68498
  /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14062);
68499
68499
  /* harmony import */ var _redux_EditorSlice__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68512);
@@ -68501,7 +68501,7 @@ __webpack_require__.r(__webpack_exports__);
68501
68501
  /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74848);
68502
68502
 
68503
68503
 
68504
- var _excluded = ["children", "fileIndex", "onTabClick"];
68504
+ var _excluded = ["children", "fileIndex", "draggableId", "onTabClick"];
68505
68505
 
68506
68506
 
68507
68507
 
@@ -68511,9 +68511,10 @@ var DraggableTab = _ref => {
68511
68511
  var {
68512
68512
  children,
68513
68513
  fileIndex,
68514
+ draggableId,
68514
68515
  onTabClick
68515
68516
  } = _ref,
68516
- otherProps = (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(_ref, _excluded);
68517
+ otherProps = (0,D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(_ref, _excluded);
68517
68518
  var openedTabs = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(state => state.editor.openedTabs);
68518
68519
  var openFilesCount = openedTabs.filter(t => t && t.type === "file").length || 1;
68519
68520
  var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useDispatch)();
@@ -68531,8 +68532,8 @@ var DraggableTab = _ref => {
68531
68532
  switchToFileTab((fileIndex + openFilesCount - 1) % openFilesCount);
68532
68533
  }
68533
68534
  };
68534
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Tabs_DraggableTabWrapper__WEBPACK_IMPORTED_MODULE_5__["default"], (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)((0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)({
68535
- draggableId: "draggable".concat(fileIndex),
68535
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Tabs_DraggableTabWrapper__WEBPACK_IMPORTED_MODULE_5__["default"], (0,D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)((0,D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)({
68536
+ draggableId: draggableId,
68536
68537
  index: fileIndex,
68537
68538
  onClick: e => {
68538
68539
  e.stopPropagation();
@@ -68555,8 +68556,8 @@ __webpack_require__.r(__webpack_exports__);
68555
68556
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
68556
68557
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
68557
68558
  /* harmony export */ });
68558
- /* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89379);
68559
- /* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53986);
68559
+ /* harmony import */ var D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89379);
68560
+ /* harmony import */ var D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53986);
68560
68561
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
68561
68562
  /* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98850);
68562
68563
  /* harmony import */ var react_tabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39243);
@@ -68575,8 +68576,8 @@ var DroppableTabList = _ref => {
68575
68576
  children: _children,
68576
68577
  index
68577
68578
  } = _ref,
68578
- otherProps = (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(_ref, _excluded);
68579
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_1__.TabList, (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({}, otherProps), {}, {
68579
+ otherProps = (0,D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(_ref, _excluded);
68580
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_1__.TabList, (0,D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({}, otherProps), {}, {
68580
68581
  children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__.Droppable, {
68581
68582
  direction: "horizontal",
68582
68583
  droppableId: index.toString(),
@@ -68586,7 +68587,7 @@ var DroppableTabList = _ref => {
68586
68587
  droppableProps,
68587
68588
  placeholder
68588
68589
  } = _ref2;
68589
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({
68590
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", (0,D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({
68590
68591
  className: "droppable-tab-list"
68591
68592
  }, droppableProps), {}, {
68592
68593
  ref: innerRef,
@@ -102366,8 +102367,8 @@ __webpack_require__.r(__webpack_exports__);
102366
102367
 
102367
102368
 
102368
102369
  // TODO: refactor existing modals
102369
- /** !deprecated!
102370
- * use BaseModal from `index.tsx` instead
102370
+ /** !deprecated!
102371
+ * use BaseModal from `index.tsx` instead
102371
102372
  */
102372
102373
 
102373
102374
  var BaseModal = _ref => {
@@ -103159,7 +103160,7 @@ __webpack_require__.r(__webpack_exports__);
103159
103160
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
103160
103161
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
103161
103162
  /* harmony export */ });
103162
- /* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89379);
103163
+ /* harmony import */ var D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89379);
103163
103164
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
103164
103165
  /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14062);
103165
103166
  /* harmony import */ var _redux_EditorSlice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68512);
@@ -103273,7 +103274,7 @@ var ProjectName = _ref => {
103273
103274
  id: "project_name_label",
103274
103275
  className: _styles_module_scss__WEBPACK_IMPORTED_MODULE_3__["default"].projectLabel,
103275
103276
  children: "Project Name"
103276
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
103277
+ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", (0,D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,D_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
103277
103278
  className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(_styles_module_scss__WEBPACK_IMPORTED_MODULE_3__["default"].projectName, className)
103278
103279
  }, hoverProps), {}, {
103279
103280
  children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)((components_Tooltip_Tooltip__WEBPACK_IMPORTED_MODULE_8___default()), {
@@ -107316,6 +107317,12 @@ var ResizableWithHandle = props => {
107316
107317
  setHeight(height + d.height);
107317
107318
  };
107318
107319
  var handleWrapperClass = "resizable-with-handle__handle resizable-with-handle__handle--".concat(handleDirection);
107320
+ var handleComponent = {
107321
+ [handleDirection]: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
107322
+ "aria-hidden": "true",
107323
+ className: "resizable-with-handle__bar resizable-with-handle__bar--".concat(handleDirection)
107324
+ })
107325
+ };
107319
107326
  return /*#__PURE__*/(0,jsx_runtime.jsx)(Resizable, (0,objectSpread2/* default */.A)((0,objectSpread2/* default */.A)({
107320
107327
  enable: (0,objectSpread2/* default */.A)({
107321
107328
  top: false,
@@ -107333,15 +107340,16 @@ var ResizableWithHandle = props => {
107333
107340
  },
107334
107341
  handleStyles: {
107335
107342
  top: {
107336
- top: "-9px"
107343
+ top: "-10px"
107337
107344
  },
107338
107345
  right: {
107339
107346
  height: "96%",
107340
107347
  top: "2%",
107341
- marginRight: "-12px"
107348
+ marginRight: "-13px"
107342
107349
  }
107343
107350
  },
107344
- handleClasses: handleClassName
107351
+ handleClasses: handleClassName,
107352
+ handleComponent: handleComponent
107345
107353
  }, rest), {}, {
107346
107354
  children: children
107347
107355
  }));
@@ -116841,115 +116849,6 @@ function escapeName(str, charsToEscape) {
116841
116849
 
116842
116850
 
116843
116851
 
116844
- /***/ }),
116845
-
116846
- /***/ 16450:
116847
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
116848
-
116849
-
116850
-
116851
- var isValue = __webpack_require__(48175)
116852
- , ensureValue = __webpack_require__(34809)
116853
- , ensurePlainFunction = __webpack_require__(90251)
116854
- , copy = __webpack_require__(30203)
116855
- , normalizeOptions = __webpack_require__(90148)
116856
- , map = __webpack_require__(30498);
116857
-
116858
- var bind = Function.prototype.bind
116859
- , defineProperty = Object.defineProperty
116860
- , hasOwnProperty = Object.prototype.hasOwnProperty
116861
- , define;
116862
-
116863
- define = function (name, desc, options) {
116864
- var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs;
116865
- dgs = copy(desc);
116866
- delete dgs.writable;
116867
- delete dgs.value;
116868
- dgs.get = function () {
116869
- if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;
116870
- desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);
116871
- defineProperty(this, name, desc);
116872
- return this[name];
116873
- };
116874
- return dgs;
116875
- };
116876
-
116877
- module.exports = function (props/*, options*/) {
116878
- var options = normalizeOptions(arguments[1]);
116879
- if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext);
116880
- return map(props, function (desc, name) { return define(name, desc, options); });
116881
- };
116882
-
116883
-
116884
- /***/ }),
116885
-
116886
- /***/ 58263:
116887
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
116888
-
116889
-
116890
-
116891
- var isValue = __webpack_require__(48175)
116892
- , isPlainFunction = __webpack_require__(6873)
116893
- , assign = __webpack_require__(16596)
116894
- , normalizeOpts = __webpack_require__(90148)
116895
- , contains = __webpack_require__(70214);
116896
-
116897
- var d = (module.exports = function (dscr, value/*, options*/) {
116898
- var c, e, w, options, desc;
116899
- if (arguments.length < 2 || typeof dscr !== "string") {
116900
- options = value;
116901
- value = dscr;
116902
- dscr = null;
116903
- } else {
116904
- options = arguments[2];
116905
- }
116906
- if (isValue(dscr)) {
116907
- c = contains.call(dscr, "c");
116908
- e = contains.call(dscr, "e");
116909
- w = contains.call(dscr, "w");
116910
- } else {
116911
- c = w = true;
116912
- e = false;
116913
- }
116914
-
116915
- desc = { value: value, configurable: c, enumerable: e, writable: w };
116916
- return !options ? desc : assign(normalizeOpts(options), desc);
116917
- });
116918
-
116919
- d.gs = function (dscr, get, set/*, options*/) {
116920
- var c, e, options, desc;
116921
- if (typeof dscr !== "string") {
116922
- options = set;
116923
- set = get;
116924
- get = dscr;
116925
- dscr = null;
116926
- } else {
116927
- options = arguments[3];
116928
- }
116929
- if (!isValue(get)) {
116930
- get = undefined;
116931
- } else if (!isPlainFunction(get)) {
116932
- options = get;
116933
- get = set = undefined;
116934
- } else if (!isValue(set)) {
116935
- set = undefined;
116936
- } else if (!isPlainFunction(set)) {
116937
- options = set;
116938
- set = undefined;
116939
- }
116940
- if (isValue(dscr)) {
116941
- c = contains.call(dscr, "c");
116942
- e = contains.call(dscr, "e");
116943
- } else {
116944
- c = true;
116945
- e = false;
116946
- }
116947
-
116948
- desc = { get: get, set: set, configurable: c, enumerable: e };
116949
- return !options ? desc : assign(normalizeOpts(options), desc);
116950
- };
116951
-
116952
-
116953
116852
  /***/ }),
116954
116853
 
116955
116854
  /***/ 83999:
@@ -131778,6 +131677,115 @@ year.every = function(k) {
131778
131677
  var years = year.range;
131779
131678
 
131780
131679
 
131680
+ /***/ }),
131681
+
131682
+ /***/ 16450:
131683
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
131684
+
131685
+
131686
+
131687
+ var isValue = __webpack_require__(48175)
131688
+ , ensureValue = __webpack_require__(34809)
131689
+ , ensurePlainFunction = __webpack_require__(90251)
131690
+ , copy = __webpack_require__(30203)
131691
+ , normalizeOptions = __webpack_require__(90148)
131692
+ , map = __webpack_require__(30498);
131693
+
131694
+ var bind = Function.prototype.bind
131695
+ , defineProperty = Object.defineProperty
131696
+ , hasOwnProperty = Object.prototype.hasOwnProperty
131697
+ , define;
131698
+
131699
+ define = function (name, desc, options) {
131700
+ var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs;
131701
+ dgs = copy(desc);
131702
+ delete dgs.writable;
131703
+ delete dgs.value;
131704
+ dgs.get = function () {
131705
+ if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;
131706
+ desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);
131707
+ defineProperty(this, name, desc);
131708
+ return this[name];
131709
+ };
131710
+ return dgs;
131711
+ };
131712
+
131713
+ module.exports = function (props/*, options*/) {
131714
+ var options = normalizeOptions(arguments[1]);
131715
+ if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext);
131716
+ return map(props, function (desc, name) { return define(name, desc, options); });
131717
+ };
131718
+
131719
+
131720
+ /***/ }),
131721
+
131722
+ /***/ 58263:
131723
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
131724
+
131725
+
131726
+
131727
+ var isValue = __webpack_require__(48175)
131728
+ , isPlainFunction = __webpack_require__(6873)
131729
+ , assign = __webpack_require__(16596)
131730
+ , normalizeOpts = __webpack_require__(90148)
131731
+ , contains = __webpack_require__(70214);
131732
+
131733
+ var d = (module.exports = function (dscr, value/*, options*/) {
131734
+ var c, e, w, options, desc;
131735
+ if (arguments.length < 2 || typeof dscr !== "string") {
131736
+ options = value;
131737
+ value = dscr;
131738
+ dscr = null;
131739
+ } else {
131740
+ options = arguments[2];
131741
+ }
131742
+ if (isValue(dscr)) {
131743
+ c = contains.call(dscr, "c");
131744
+ e = contains.call(dscr, "e");
131745
+ w = contains.call(dscr, "w");
131746
+ } else {
131747
+ c = w = true;
131748
+ e = false;
131749
+ }
131750
+
131751
+ desc = { value: value, configurable: c, enumerable: e, writable: w };
131752
+ return !options ? desc : assign(normalizeOpts(options), desc);
131753
+ });
131754
+
131755
+ d.gs = function (dscr, get, set/*, options*/) {
131756
+ var c, e, options, desc;
131757
+ if (typeof dscr !== "string") {
131758
+ options = set;
131759
+ set = get;
131760
+ get = dscr;
131761
+ dscr = null;
131762
+ } else {
131763
+ options = arguments[3];
131764
+ }
131765
+ if (!isValue(get)) {
131766
+ get = undefined;
131767
+ } else if (!isPlainFunction(get)) {
131768
+ options = get;
131769
+ get = set = undefined;
131770
+ } else if (!isValue(set)) {
131771
+ set = undefined;
131772
+ } else if (!isPlainFunction(set)) {
131773
+ options = set;
131774
+ set = undefined;
131775
+ }
131776
+ if (isValue(dscr)) {
131777
+ c = contains.call(dscr, "c");
131778
+ e = contains.call(dscr, "e");
131779
+ } else {
131780
+ c = true;
131781
+ e = false;
131782
+ }
131783
+
131784
+ desc = { get: get, set: set, configurable: c, enumerable: e };
131785
+ return !options ? desc : assign(normalizeOpts(options), desc);
131786
+ };
131787
+
131788
+
131781
131789
  /***/ }),
131782
131790
 
131783
131791
  /***/ 30041:
@@ -148418,6 +148426,324 @@ function hsl2rgb(hsl) {
148418
148426
  }
148419
148427
 
148420
148428
 
148429
+ /***/ }),
148430
+
148431
+ /***/ 9793:
148432
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
148433
+
148434
+
148435
+
148436
+ var annAttrs = __webpack_require__(84676);
148437
+ var overrideAll = (__webpack_require__(70756).overrideAll);
148438
+ var templatedArray = (__webpack_require__(79338).templatedArray);
148439
+
148440
+ module.exports = overrideAll(templatedArray('annotation', {
148441
+ visible: annAttrs.visible,
148442
+ x: {
148443
+ valType: 'any',
148444
+ description: [
148445
+ 'Sets the annotation\'s x position.'
148446
+ ].join(' ')
148447
+ },
148448
+ y: {
148449
+ valType: 'any',
148450
+ description: [
148451
+ 'Sets the annotation\'s y position.'
148452
+ ].join(' ')
148453
+ },
148454
+ z: {
148455
+ valType: 'any',
148456
+ description: [
148457
+ 'Sets the annotation\'s z position.'
148458
+ ].join(' ')
148459
+ },
148460
+ ax: {
148461
+ valType: 'number',
148462
+ description: [
148463
+ 'Sets the x component of the arrow tail about the arrow head (in pixels).'
148464
+ ].join(' ')
148465
+ },
148466
+ ay: {
148467
+ valType: 'number',
148468
+ description: [
148469
+ 'Sets the y component of the arrow tail about the arrow head (in pixels).'
148470
+ ].join(' ')
148471
+ },
148472
+
148473
+ xanchor: annAttrs.xanchor,
148474
+ xshift: annAttrs.xshift,
148475
+ yanchor: annAttrs.yanchor,
148476
+ yshift: annAttrs.yshift,
148477
+
148478
+ text: annAttrs.text,
148479
+ textangle: annAttrs.textangle,
148480
+ font: annAttrs.font,
148481
+ width: annAttrs.width,
148482
+ height: annAttrs.height,
148483
+ opacity: annAttrs.opacity,
148484
+ align: annAttrs.align,
148485
+ valign: annAttrs.valign,
148486
+ bgcolor: annAttrs.bgcolor,
148487
+ bordercolor: annAttrs.bordercolor,
148488
+ borderpad: annAttrs.borderpad,
148489
+ borderwidth: annAttrs.borderwidth,
148490
+ showarrow: annAttrs.showarrow,
148491
+ arrowcolor: annAttrs.arrowcolor,
148492
+ arrowhead: annAttrs.arrowhead,
148493
+ startarrowhead: annAttrs.startarrowhead,
148494
+ arrowside: annAttrs.arrowside,
148495
+ arrowsize: annAttrs.arrowsize,
148496
+ startarrowsize: annAttrs.startarrowsize,
148497
+ arrowwidth: annAttrs.arrowwidth,
148498
+ standoff: annAttrs.standoff,
148499
+ startstandoff: annAttrs.startstandoff,
148500
+ hovertext: annAttrs.hovertext,
148501
+ hoverlabel: annAttrs.hoverlabel,
148502
+ captureevents: annAttrs.captureevents,
148503
+
148504
+ // maybes later?
148505
+ // clicktoshow: annAttrs.clicktoshow,
148506
+ // xclick: annAttrs.xclick,
148507
+ // yclick: annAttrs.yclick,
148508
+
148509
+ // not needed!
148510
+ // axref: 'pixel'
148511
+ // ayref: 'pixel'
148512
+ // xref: 'x'
148513
+ // yref: 'y
148514
+ // zref: 'z'
148515
+ }), 'calc', 'from-root');
148516
+
148517
+
148518
+ /***/ }),
148519
+
148520
+ /***/ 58121:
148521
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
148522
+
148523
+
148524
+
148525
+ var Lib = __webpack_require__(30991);
148526
+ var Axes = __webpack_require__(15076);
148527
+
148528
+ module.exports = function convert(scene) {
148529
+ var fullSceneLayout = scene.fullSceneLayout;
148530
+ var anns = fullSceneLayout.annotations;
148531
+
148532
+ for(var i = 0; i < anns.length; i++) {
148533
+ mockAnnAxes(anns[i], scene);
148534
+ }
148535
+
148536
+ scene.fullLayout._infolayer
148537
+ .selectAll('.annotation-' + scene.id)
148538
+ .remove();
148539
+ };
148540
+
148541
+ function mockAnnAxes(ann, scene) {
148542
+ var fullSceneLayout = scene.fullSceneLayout;
148543
+ var domain = fullSceneLayout.domain;
148544
+ var size = scene.fullLayout._size;
148545
+
148546
+ var base = {
148547
+ // this gets fill in on render
148548
+ pdata: null,
148549
+
148550
+ // to get setConvert to not execute cleanly
148551
+ type: 'linear',
148552
+
148553
+ // don't try to update them on `editable: true`
148554
+ autorange: false,
148555
+
148556
+ // set infinite range so that annotation draw routine
148557
+ // does not try to remove 'outside-range' annotations,
148558
+ // this case is handled in the render loop
148559
+ range: [-Infinity, Infinity]
148560
+ };
148561
+
148562
+ ann._xa = {};
148563
+ Lib.extendFlat(ann._xa, base);
148564
+ Axes.setConvert(ann._xa);
148565
+ ann._xa._offset = size.l + domain.x[0] * size.w;
148566
+ ann._xa.l2p = function() {
148567
+ return 0.5 * (1 + ann._pdata[0] / ann._pdata[3]) * size.w * (domain.x[1] - domain.x[0]);
148568
+ };
148569
+
148570
+ ann._ya = {};
148571
+ Lib.extendFlat(ann._ya, base);
148572
+ Axes.setConvert(ann._ya);
148573
+ ann._ya._offset = size.t + (1 - domain.y[1]) * size.h;
148574
+ ann._ya.l2p = function() {
148575
+ return 0.5 * (1 - ann._pdata[1] / ann._pdata[3]) * size.h * (domain.y[1] - domain.y[0]);
148576
+ };
148577
+ }
148578
+
148579
+
148580
+ /***/ }),
148581
+
148582
+ /***/ 41926:
148583
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
148584
+
148585
+
148586
+
148587
+ var Lib = __webpack_require__(30991);
148588
+ var Axes = __webpack_require__(15076);
148589
+ var handleArrayContainerDefaults = __webpack_require__(21238);
148590
+ var handleAnnotationCommonDefaults = __webpack_require__(84081);
148591
+ var attributes = __webpack_require__(9793);
148592
+
148593
+ module.exports = function handleDefaults(sceneLayoutIn, sceneLayoutOut, opts) {
148594
+ handleArrayContainerDefaults(sceneLayoutIn, sceneLayoutOut, {
148595
+ name: 'annotations',
148596
+ handleItemDefaults: handleAnnotationDefaults,
148597
+ fullLayout: opts.fullLayout
148598
+ });
148599
+ };
148600
+
148601
+ function handleAnnotationDefaults(annIn, annOut, sceneLayout, opts) {
148602
+ function coerce(attr, dflt) {
148603
+ return Lib.coerce(annIn, annOut, attributes, attr, dflt);
148604
+ }
148605
+
148606
+ function coercePosition(axLetter) {
148607
+ var axName = axLetter + 'axis';
148608
+
148609
+ // mock in such way that getFromId grabs correct 3D axis
148610
+ var gdMock = { _fullLayout: {} };
148611
+ gdMock._fullLayout[axName] = sceneLayout[axName];
148612
+
148613
+ return Axes.coercePosition(annOut, gdMock, coerce, axLetter, axLetter, 0.5);
148614
+ }
148615
+
148616
+
148617
+ var visible = coerce('visible');
148618
+ if(!visible) return;
148619
+
148620
+ handleAnnotationCommonDefaults(annIn, annOut, opts.fullLayout, coerce);
148621
+
148622
+ coercePosition('x');
148623
+ coercePosition('y');
148624
+ coercePosition('z');
148625
+
148626
+ // if you have one coordinate you should all three
148627
+ Lib.noneOrAll(annIn, annOut, ['x', 'y', 'z']);
148628
+
148629
+ // hard-set here for completeness
148630
+ annOut.xref = 'x';
148631
+ annOut.yref = 'y';
148632
+ annOut.zref = 'z';
148633
+
148634
+ coerce('xanchor');
148635
+ coerce('yanchor');
148636
+ coerce('xshift');
148637
+ coerce('yshift');
148638
+
148639
+ if(annOut.showarrow) {
148640
+ annOut.axref = 'pixel';
148641
+ annOut.ayref = 'pixel';
148642
+
148643
+ // TODO maybe default values should be bigger than the 2D case?
148644
+ coerce('ax', -10);
148645
+ coerce('ay', -30);
148646
+
148647
+ // if you have one part of arrow length you should have both
148648
+ Lib.noneOrAll(annIn, annOut, ['ax', 'ay']);
148649
+ }
148650
+ }
148651
+
148652
+
148653
+ /***/ }),
148654
+
148655
+ /***/ 13802:
148656
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
148657
+
148658
+
148659
+
148660
+ var drawRaw = (__webpack_require__(47995).drawRaw);
148661
+ var project = __webpack_require__(51344);
148662
+ var axLetters = ['x', 'y', 'z'];
148663
+
148664
+ module.exports = function draw(scene) {
148665
+ var fullSceneLayout = scene.fullSceneLayout;
148666
+ var dataScale = scene.dataScale;
148667
+ var anns = fullSceneLayout.annotations;
148668
+
148669
+ for(var i = 0; i < anns.length; i++) {
148670
+ var ann = anns[i];
148671
+ var annotationIsOffscreen = false;
148672
+
148673
+ for(var j = 0; j < 3; j++) {
148674
+ var axLetter = axLetters[j];
148675
+ var pos = ann[axLetter];
148676
+ var ax = fullSceneLayout[axLetter + 'axis'];
148677
+ var posFraction = ax.r2fraction(pos);
148678
+
148679
+ if(posFraction < 0 || posFraction > 1) {
148680
+ annotationIsOffscreen = true;
148681
+ break;
148682
+ }
148683
+ }
148684
+
148685
+ if(annotationIsOffscreen) {
148686
+ scene.fullLayout._infolayer
148687
+ .select('.annotation-' + scene.id + '[data-index="' + i + '"]')
148688
+ .remove();
148689
+ } else {
148690
+ ann._pdata = project(scene.glplot.cameraParams, [
148691
+ fullSceneLayout.xaxis.r2l(ann.x) * dataScale[0],
148692
+ fullSceneLayout.yaxis.r2l(ann.y) * dataScale[1],
148693
+ fullSceneLayout.zaxis.r2l(ann.z) * dataScale[2]
148694
+ ]);
148695
+
148696
+ drawRaw(scene.graphDiv, ann, i, scene.id, ann._xa, ann._ya);
148697
+ }
148698
+ }
148699
+ };
148700
+
148701
+
148702
+ /***/ }),
148703
+
148704
+ /***/ 86578:
148705
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
148706
+
148707
+
148708
+
148709
+ var Registry = __webpack_require__(13936);
148710
+ var Lib = __webpack_require__(30991);
148711
+
148712
+ module.exports = {
148713
+ moduleType: 'component',
148714
+ name: 'annotations3d',
148715
+
148716
+ schema: {
148717
+ subplots: {
148718
+ scene: {annotations: __webpack_require__(9793)}
148719
+ }
148720
+ },
148721
+
148722
+ layoutAttributes: __webpack_require__(9793),
148723
+ handleDefaults: __webpack_require__(41926),
148724
+ includeBasePlot: includeGL3D,
148725
+
148726
+ convert: __webpack_require__(58121),
148727
+ draw: __webpack_require__(13802)
148728
+ };
148729
+
148730
+ function includeGL3D(layoutIn, layoutOut) {
148731
+ var GL3D = Registry.subplotsRegistry.gl3d;
148732
+ if(!GL3D) return;
148733
+
148734
+ var attrRegex = GL3D.attrRegex;
148735
+
148736
+ var keys = Object.keys(layoutIn);
148737
+ for(var i = 0; i < keys.length; i++) {
148738
+ var k = keys[i];
148739
+ if(attrRegex.test(k) && (layoutIn[k].annotations || []).length) {
148740
+ Lib.pushUnique(layoutOut._basePlotModules, GL3D);
148741
+ Lib.pushUnique(layoutOut._subplots.gl3d, k);
148742
+ }
148743
+ }
148744
+ }
148745
+
148746
+
148421
148747
  /***/ }),
148422
148748
 
148423
148749
  /***/ 2595:
@@ -150391,324 +150717,6 @@ module.exports = {
150391
150717
  };
150392
150718
 
150393
150719
 
150394
- /***/ }),
150395
-
150396
- /***/ 9793:
150397
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
150398
-
150399
-
150400
-
150401
- var annAttrs = __webpack_require__(84676);
150402
- var overrideAll = (__webpack_require__(70756).overrideAll);
150403
- var templatedArray = (__webpack_require__(79338).templatedArray);
150404
-
150405
- module.exports = overrideAll(templatedArray('annotation', {
150406
- visible: annAttrs.visible,
150407
- x: {
150408
- valType: 'any',
150409
- description: [
150410
- 'Sets the annotation\'s x position.'
150411
- ].join(' ')
150412
- },
150413
- y: {
150414
- valType: 'any',
150415
- description: [
150416
- 'Sets the annotation\'s y position.'
150417
- ].join(' ')
150418
- },
150419
- z: {
150420
- valType: 'any',
150421
- description: [
150422
- 'Sets the annotation\'s z position.'
150423
- ].join(' ')
150424
- },
150425
- ax: {
150426
- valType: 'number',
150427
- description: [
150428
- 'Sets the x component of the arrow tail about the arrow head (in pixels).'
150429
- ].join(' ')
150430
- },
150431
- ay: {
150432
- valType: 'number',
150433
- description: [
150434
- 'Sets the y component of the arrow tail about the arrow head (in pixels).'
150435
- ].join(' ')
150436
- },
150437
-
150438
- xanchor: annAttrs.xanchor,
150439
- xshift: annAttrs.xshift,
150440
- yanchor: annAttrs.yanchor,
150441
- yshift: annAttrs.yshift,
150442
-
150443
- text: annAttrs.text,
150444
- textangle: annAttrs.textangle,
150445
- font: annAttrs.font,
150446
- width: annAttrs.width,
150447
- height: annAttrs.height,
150448
- opacity: annAttrs.opacity,
150449
- align: annAttrs.align,
150450
- valign: annAttrs.valign,
150451
- bgcolor: annAttrs.bgcolor,
150452
- bordercolor: annAttrs.bordercolor,
150453
- borderpad: annAttrs.borderpad,
150454
- borderwidth: annAttrs.borderwidth,
150455
- showarrow: annAttrs.showarrow,
150456
- arrowcolor: annAttrs.arrowcolor,
150457
- arrowhead: annAttrs.arrowhead,
150458
- startarrowhead: annAttrs.startarrowhead,
150459
- arrowside: annAttrs.arrowside,
150460
- arrowsize: annAttrs.arrowsize,
150461
- startarrowsize: annAttrs.startarrowsize,
150462
- arrowwidth: annAttrs.arrowwidth,
150463
- standoff: annAttrs.standoff,
150464
- startstandoff: annAttrs.startstandoff,
150465
- hovertext: annAttrs.hovertext,
150466
- hoverlabel: annAttrs.hoverlabel,
150467
- captureevents: annAttrs.captureevents,
150468
-
150469
- // maybes later?
150470
- // clicktoshow: annAttrs.clicktoshow,
150471
- // xclick: annAttrs.xclick,
150472
- // yclick: annAttrs.yclick,
150473
-
150474
- // not needed!
150475
- // axref: 'pixel'
150476
- // ayref: 'pixel'
150477
- // xref: 'x'
150478
- // yref: 'y
150479
- // zref: 'z'
150480
- }), 'calc', 'from-root');
150481
-
150482
-
150483
- /***/ }),
150484
-
150485
- /***/ 58121:
150486
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
150487
-
150488
-
150489
-
150490
- var Lib = __webpack_require__(30991);
150491
- var Axes = __webpack_require__(15076);
150492
-
150493
- module.exports = function convert(scene) {
150494
- var fullSceneLayout = scene.fullSceneLayout;
150495
- var anns = fullSceneLayout.annotations;
150496
-
150497
- for(var i = 0; i < anns.length; i++) {
150498
- mockAnnAxes(anns[i], scene);
150499
- }
150500
-
150501
- scene.fullLayout._infolayer
150502
- .selectAll('.annotation-' + scene.id)
150503
- .remove();
150504
- };
150505
-
150506
- function mockAnnAxes(ann, scene) {
150507
- var fullSceneLayout = scene.fullSceneLayout;
150508
- var domain = fullSceneLayout.domain;
150509
- var size = scene.fullLayout._size;
150510
-
150511
- var base = {
150512
- // this gets fill in on render
150513
- pdata: null,
150514
-
150515
- // to get setConvert to not execute cleanly
150516
- type: 'linear',
150517
-
150518
- // don't try to update them on `editable: true`
150519
- autorange: false,
150520
-
150521
- // set infinite range so that annotation draw routine
150522
- // does not try to remove 'outside-range' annotations,
150523
- // this case is handled in the render loop
150524
- range: [-Infinity, Infinity]
150525
- };
150526
-
150527
- ann._xa = {};
150528
- Lib.extendFlat(ann._xa, base);
150529
- Axes.setConvert(ann._xa);
150530
- ann._xa._offset = size.l + domain.x[0] * size.w;
150531
- ann._xa.l2p = function() {
150532
- return 0.5 * (1 + ann._pdata[0] / ann._pdata[3]) * size.w * (domain.x[1] - domain.x[0]);
150533
- };
150534
-
150535
- ann._ya = {};
150536
- Lib.extendFlat(ann._ya, base);
150537
- Axes.setConvert(ann._ya);
150538
- ann._ya._offset = size.t + (1 - domain.y[1]) * size.h;
150539
- ann._ya.l2p = function() {
150540
- return 0.5 * (1 - ann._pdata[1] / ann._pdata[3]) * size.h * (domain.y[1] - domain.y[0]);
150541
- };
150542
- }
150543
-
150544
-
150545
- /***/ }),
150546
-
150547
- /***/ 41926:
150548
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
150549
-
150550
-
150551
-
150552
- var Lib = __webpack_require__(30991);
150553
- var Axes = __webpack_require__(15076);
150554
- var handleArrayContainerDefaults = __webpack_require__(21238);
150555
- var handleAnnotationCommonDefaults = __webpack_require__(84081);
150556
- var attributes = __webpack_require__(9793);
150557
-
150558
- module.exports = function handleDefaults(sceneLayoutIn, sceneLayoutOut, opts) {
150559
- handleArrayContainerDefaults(sceneLayoutIn, sceneLayoutOut, {
150560
- name: 'annotations',
150561
- handleItemDefaults: handleAnnotationDefaults,
150562
- fullLayout: opts.fullLayout
150563
- });
150564
- };
150565
-
150566
- function handleAnnotationDefaults(annIn, annOut, sceneLayout, opts) {
150567
- function coerce(attr, dflt) {
150568
- return Lib.coerce(annIn, annOut, attributes, attr, dflt);
150569
- }
150570
-
150571
- function coercePosition(axLetter) {
150572
- var axName = axLetter + 'axis';
150573
-
150574
- // mock in such way that getFromId grabs correct 3D axis
150575
- var gdMock = { _fullLayout: {} };
150576
- gdMock._fullLayout[axName] = sceneLayout[axName];
150577
-
150578
- return Axes.coercePosition(annOut, gdMock, coerce, axLetter, axLetter, 0.5);
150579
- }
150580
-
150581
-
150582
- var visible = coerce('visible');
150583
- if(!visible) return;
150584
-
150585
- handleAnnotationCommonDefaults(annIn, annOut, opts.fullLayout, coerce);
150586
-
150587
- coercePosition('x');
150588
- coercePosition('y');
150589
- coercePosition('z');
150590
-
150591
- // if you have one coordinate you should all three
150592
- Lib.noneOrAll(annIn, annOut, ['x', 'y', 'z']);
150593
-
150594
- // hard-set here for completeness
150595
- annOut.xref = 'x';
150596
- annOut.yref = 'y';
150597
- annOut.zref = 'z';
150598
-
150599
- coerce('xanchor');
150600
- coerce('yanchor');
150601
- coerce('xshift');
150602
- coerce('yshift');
150603
-
150604
- if(annOut.showarrow) {
150605
- annOut.axref = 'pixel';
150606
- annOut.ayref = 'pixel';
150607
-
150608
- // TODO maybe default values should be bigger than the 2D case?
150609
- coerce('ax', -10);
150610
- coerce('ay', -30);
150611
-
150612
- // if you have one part of arrow length you should have both
150613
- Lib.noneOrAll(annIn, annOut, ['ax', 'ay']);
150614
- }
150615
- }
150616
-
150617
-
150618
- /***/ }),
150619
-
150620
- /***/ 13802:
150621
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
150622
-
150623
-
150624
-
150625
- var drawRaw = (__webpack_require__(47995).drawRaw);
150626
- var project = __webpack_require__(51344);
150627
- var axLetters = ['x', 'y', 'z'];
150628
-
150629
- module.exports = function draw(scene) {
150630
- var fullSceneLayout = scene.fullSceneLayout;
150631
- var dataScale = scene.dataScale;
150632
- var anns = fullSceneLayout.annotations;
150633
-
150634
- for(var i = 0; i < anns.length; i++) {
150635
- var ann = anns[i];
150636
- var annotationIsOffscreen = false;
150637
-
150638
- for(var j = 0; j < 3; j++) {
150639
- var axLetter = axLetters[j];
150640
- var pos = ann[axLetter];
150641
- var ax = fullSceneLayout[axLetter + 'axis'];
150642
- var posFraction = ax.r2fraction(pos);
150643
-
150644
- if(posFraction < 0 || posFraction > 1) {
150645
- annotationIsOffscreen = true;
150646
- break;
150647
- }
150648
- }
150649
-
150650
- if(annotationIsOffscreen) {
150651
- scene.fullLayout._infolayer
150652
- .select('.annotation-' + scene.id + '[data-index="' + i + '"]')
150653
- .remove();
150654
- } else {
150655
- ann._pdata = project(scene.glplot.cameraParams, [
150656
- fullSceneLayout.xaxis.r2l(ann.x) * dataScale[0],
150657
- fullSceneLayout.yaxis.r2l(ann.y) * dataScale[1],
150658
- fullSceneLayout.zaxis.r2l(ann.z) * dataScale[2]
150659
- ]);
150660
-
150661
- drawRaw(scene.graphDiv, ann, i, scene.id, ann._xa, ann._ya);
150662
- }
150663
- }
150664
- };
150665
-
150666
-
150667
- /***/ }),
150668
-
150669
- /***/ 86578:
150670
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
150671
-
150672
-
150673
-
150674
- var Registry = __webpack_require__(13936);
150675
- var Lib = __webpack_require__(30991);
150676
-
150677
- module.exports = {
150678
- moduleType: 'component',
150679
- name: 'annotations3d',
150680
-
150681
- schema: {
150682
- subplots: {
150683
- scene: {annotations: __webpack_require__(9793)}
150684
- }
150685
- },
150686
-
150687
- layoutAttributes: __webpack_require__(9793),
150688
- handleDefaults: __webpack_require__(41926),
150689
- includeBasePlot: includeGL3D,
150690
-
150691
- convert: __webpack_require__(58121),
150692
- draw: __webpack_require__(13802)
150693
- };
150694
-
150695
- function includeGL3D(layoutIn, layoutOut) {
150696
- var GL3D = Registry.subplotsRegistry.gl3d;
150697
- if(!GL3D) return;
150698
-
150699
- var attrRegex = GL3D.attrRegex;
150700
-
150701
- var keys = Object.keys(layoutIn);
150702
- for(var i = 0; i < keys.length; i++) {
150703
- var k = keys[i];
150704
- if(attrRegex.test(k) && (layoutIn[k].annotations || []).length) {
150705
- Lib.pushUnique(layoutOut._basePlotModules, GL3D);
150706
- Lib.pushUnique(layoutOut._subplots.gl3d, k);
150707
- }
150708
- }
150709
- }
150710
-
150711
-
150712
150720
  /***/ }),
150713
150721
 
150714
150722
  /***/ 27639:
@@ -248941,6 +248949,595 @@ function isValidZ(z) {
248941
248949
  }
248942
248950
 
248943
248951
 
248952
+ /***/ }),
248953
+
248954
+ /***/ 42124:
248955
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
248956
+
248957
+
248958
+
248959
+ var histogramAttrs = __webpack_require__(71250);
248960
+ var makeBinAttrs = __webpack_require__(9284);
248961
+ var heatmapAttrs = __webpack_require__(68300);
248962
+ var baseAttrs = __webpack_require__(35667);
248963
+ var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
248964
+ var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
248965
+ var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
248966
+ var colorScaleAttrs = __webpack_require__(17957);
248967
+
248968
+ var extendFlat = (__webpack_require__(91307).extendFlat);
248969
+
248970
+ module.exports = extendFlat(
248971
+ {
248972
+ x: histogramAttrs.x,
248973
+ y: histogramAttrs.y,
248974
+
248975
+ z: {
248976
+ valType: 'data_array',
248977
+ editType: 'calc',
248978
+ description: 'Sets the aggregation data.'
248979
+ },
248980
+ marker: {
248981
+ color: {
248982
+ valType: 'data_array',
248983
+ editType: 'calc',
248984
+ description: 'Sets the aggregation data.'
248985
+ },
248986
+ editType: 'calc'
248987
+ },
248988
+
248989
+ histnorm: histogramAttrs.histnorm,
248990
+ histfunc: histogramAttrs.histfunc,
248991
+ nbinsx: histogramAttrs.nbinsx,
248992
+ xbins: makeBinAttrs('x'),
248993
+ nbinsy: histogramAttrs.nbinsy,
248994
+ ybins: makeBinAttrs('y'),
248995
+ autobinx: histogramAttrs.autobinx,
248996
+ autobiny: histogramAttrs.autobiny,
248997
+
248998
+ bingroup: extendFlat({}, histogramAttrs.bingroup, {
248999
+ description: [
249000
+ 'Set the `xbingroup` and `ybingroup` default prefix',
249001
+ 'For example, setting a `bingroup` of *1* on two histogram2d traces',
249002
+ 'will make them their x-bins and y-bins match separately.'
249003
+ ].join(' ')
249004
+ }),
249005
+ xbingroup: extendFlat({}, histogramAttrs.bingroup, {
249006
+ description: [
249007
+ 'Set a group of histogram traces which will have compatible x-bin settings.',
249008
+ 'Using `xbingroup`, histogram2d and histogram2dcontour traces ',
249009
+ '(on axes of the same axis type) can have compatible x-bin settings.',
249010
+ 'Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup`'
249011
+ ].join(' ')
249012
+ }),
249013
+ ybingroup: extendFlat({}, histogramAttrs.bingroup, {
249014
+ description: [
249015
+ 'Set a group of histogram traces which will have compatible y-bin settings.',
249016
+ 'Using `ybingroup`, histogram2d and histogram2dcontour traces ',
249017
+ '(on axes of the same axis type) can have compatible y-bin settings.',
249018
+ 'Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup`'
249019
+ ].join(' ')
249020
+ }),
249021
+
249022
+ xgap: heatmapAttrs.xgap,
249023
+ ygap: heatmapAttrs.ygap,
249024
+ zsmooth: heatmapAttrs.zsmooth,
249025
+ xhoverformat: axisHoverFormat('x'),
249026
+ yhoverformat: axisHoverFormat('y'),
249027
+ zhoverformat: axisHoverFormat('z', 1),
249028
+ hovertemplate: hovertemplateAttrs({}, {keys: 'z'}),
249029
+ texttemplate: texttemplateAttrs({
249030
+ arrayOk: false,
249031
+ editType: 'plot'
249032
+ }, {
249033
+ keys: 'z'
249034
+ }),
249035
+ textfont: heatmapAttrs.textfont,
249036
+ showlegend: extendFlat({}, baseAttrs.showlegend, {dflt: false})
249037
+ },
249038
+ colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
249039
+ );
249040
+
249041
+
249042
+ /***/ }),
249043
+
249044
+ /***/ 32492:
249045
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249046
+
249047
+
249048
+
249049
+ var Lib = __webpack_require__(30991);
249050
+ var Axes = __webpack_require__(15076);
249051
+
249052
+ var binFunctions = __webpack_require__(47260);
249053
+ var normFunctions = __webpack_require__(855);
249054
+ var doAvg = __webpack_require__(26756);
249055
+ var getBinSpanLabelRound = __webpack_require__(41574);
249056
+ var calcAllAutoBins = (__webpack_require__(50414).calcAllAutoBins);
249057
+
249058
+ module.exports = function calc(gd, trace) {
249059
+ var xa = Axes.getFromId(gd, trace.xaxis);
249060
+ var ya = Axes.getFromId(gd, trace.yaxis);
249061
+
249062
+ var xcalendar = trace.xcalendar;
249063
+ var ycalendar = trace.ycalendar;
249064
+ var xr2c = function(v) { return xa.r2c(v, 0, xcalendar); };
249065
+ var yr2c = function(v) { return ya.r2c(v, 0, ycalendar); };
249066
+ var xc2r = function(v) { return xa.c2r(v, 0, xcalendar); };
249067
+ var yc2r = function(v) { return ya.c2r(v, 0, ycalendar); };
249068
+
249069
+ var i, j, n, m;
249070
+
249071
+ // calculate the bins
249072
+ var xBinsAndPos = calcAllAutoBins(gd, trace, xa, 'x');
249073
+ var xBinSpec = xBinsAndPos[0];
249074
+ var xPos0 = xBinsAndPos[1];
249075
+ var yBinsAndPos = calcAllAutoBins(gd, trace, ya, 'y');
249076
+ var yBinSpec = yBinsAndPos[0];
249077
+ var yPos0 = yBinsAndPos[1];
249078
+
249079
+ var serieslen = trace._length;
249080
+ if(xPos0.length > serieslen) xPos0.splice(serieslen, xPos0.length - serieslen);
249081
+ if(yPos0.length > serieslen) yPos0.splice(serieslen, yPos0.length - serieslen);
249082
+
249083
+ // make the empty bin array & scale the map
249084
+ var z = [];
249085
+ var onecol = [];
249086
+ var zerocol = [];
249087
+ var nonuniformBinsX = typeof xBinSpec.size === 'string';
249088
+ var nonuniformBinsY = typeof yBinSpec.size === 'string';
249089
+ var xEdges = [];
249090
+ var yEdges = [];
249091
+ var xbins = nonuniformBinsX ? xEdges : xBinSpec;
249092
+ var ybins = nonuniformBinsY ? yEdges : yBinSpec;
249093
+ var total = 0;
249094
+ var counts = [];
249095
+ var inputPoints = [];
249096
+ var norm = trace.histnorm;
249097
+ var func = trace.histfunc;
249098
+ var densitynorm = norm.indexOf('density') !== -1;
249099
+ var extremefunc = func === 'max' || func === 'min';
249100
+ var sizeinit = extremefunc ? null : 0;
249101
+ var binfunc = binFunctions.count;
249102
+ var normfunc = normFunctions[norm];
249103
+ var doavg = false;
249104
+ var xinc = [];
249105
+ var yinc = [];
249106
+
249107
+ // set a binning function other than count?
249108
+ // for binning functions: check first for 'z',
249109
+ // then 'mc' in case we had a colored scatter plot
249110
+ // and want to transfer these colors to the 2D histo
249111
+ // TODO: axe this, make it the responsibility of the app changing type? or an impliedEdit?
249112
+ var rawCounterData = ('z' in trace) ?
249113
+ trace.z :
249114
+ (('marker' in trace && Array.isArray(trace.marker.color)) ?
249115
+ trace.marker.color : '');
249116
+ if(rawCounterData && func !== 'count') {
249117
+ doavg = func === 'avg';
249118
+ binfunc = binFunctions[func];
249119
+ }
249120
+
249121
+ // decrease end a little in case of rounding errors
249122
+ var xBinSize = xBinSpec.size;
249123
+ var xBinStart = xr2c(xBinSpec.start);
249124
+ var xBinEnd = xr2c(xBinSpec.end) +
249125
+ (xBinStart - Axes.tickIncrement(xBinStart, xBinSize, false, xcalendar)) / 1e6;
249126
+
249127
+ for(i = xBinStart; i < xBinEnd; i = Axes.tickIncrement(i, xBinSize, false, xcalendar)) {
249128
+ onecol.push(sizeinit);
249129
+ xEdges.push(i);
249130
+ if(doavg) zerocol.push(0);
249131
+ }
249132
+ xEdges.push(i);
249133
+
249134
+ var nx = onecol.length;
249135
+ var dx = (i - xBinStart) / nx;
249136
+ var x0 = xc2r(xBinStart + dx / 2);
249137
+
249138
+ var yBinSize = yBinSpec.size;
249139
+ var yBinStart = yr2c(yBinSpec.start);
249140
+ var yBinEnd = yr2c(yBinSpec.end) +
249141
+ (yBinStart - Axes.tickIncrement(yBinStart, yBinSize, false, ycalendar)) / 1e6;
249142
+
249143
+ for(i = yBinStart; i < yBinEnd; i = Axes.tickIncrement(i, yBinSize, false, ycalendar)) {
249144
+ z.push(onecol.slice());
249145
+ yEdges.push(i);
249146
+ var ipCol = new Array(nx);
249147
+ for(j = 0; j < nx; j++) ipCol[j] = [];
249148
+ inputPoints.push(ipCol);
249149
+ if(doavg) counts.push(zerocol.slice());
249150
+ }
249151
+ yEdges.push(i);
249152
+
249153
+ var ny = z.length;
249154
+ var dy = (i - yBinStart) / ny;
249155
+ var y0 = yc2r(yBinStart + dy / 2);
249156
+
249157
+ if(densitynorm) {
249158
+ xinc = makeIncrements(onecol.length, xbins, dx, nonuniformBinsX);
249159
+ yinc = makeIncrements(z.length, ybins, dy, nonuniformBinsY);
249160
+ }
249161
+
249162
+ // for date axes we need bin bounds to be calcdata. For nonuniform bins
249163
+ // we already have this, but uniform with start/end/size they're still strings.
249164
+ if(!nonuniformBinsX && xa.type === 'date') xbins = binsToCalc(xr2c, xbins);
249165
+ if(!nonuniformBinsY && ya.type === 'date') ybins = binsToCalc(yr2c, ybins);
249166
+
249167
+ // put data into bins
249168
+ var uniqueValsPerX = true;
249169
+ var uniqueValsPerY = true;
249170
+ var xVals = new Array(nx);
249171
+ var yVals = new Array(ny);
249172
+ var xGapLow = Infinity;
249173
+ var xGapHigh = Infinity;
249174
+ var yGapLow = Infinity;
249175
+ var yGapHigh = Infinity;
249176
+ for(i = 0; i < serieslen; i++) {
249177
+ var xi = xPos0[i];
249178
+ var yi = yPos0[i];
249179
+ n = Lib.findBin(xi, xbins);
249180
+ m = Lib.findBin(yi, ybins);
249181
+ if(n >= 0 && n < nx && m >= 0 && m < ny) {
249182
+ total += binfunc(n, i, z[m], rawCounterData, counts[m]);
249183
+ inputPoints[m][n].push(i);
249184
+
249185
+ if(uniqueValsPerX) {
249186
+ if(xVals[n] === undefined) xVals[n] = xi;
249187
+ else if(xVals[n] !== xi) uniqueValsPerX = false;
249188
+ }
249189
+ if(uniqueValsPerY) {
249190
+ if(yVals[m] === undefined) yVals[m] = yi;
249191
+ else if(yVals[m] !== yi) uniqueValsPerY = false;
249192
+ }
249193
+
249194
+ xGapLow = Math.min(xGapLow, xi - xEdges[n]);
249195
+ xGapHigh = Math.min(xGapHigh, xEdges[n + 1] - xi);
249196
+ yGapLow = Math.min(yGapLow, yi - yEdges[m]);
249197
+ yGapHigh = Math.min(yGapHigh, yEdges[m + 1] - yi);
249198
+ }
249199
+ }
249200
+ // normalize, if needed
249201
+ if(doavg) {
249202
+ for(m = 0; m < ny; m++) total += doAvg(z[m], counts[m]);
249203
+ }
249204
+ if(normfunc) {
249205
+ for(m = 0; m < ny; m++) normfunc(z[m], total, xinc, yinc[m]);
249206
+ }
249207
+
249208
+ return {
249209
+ x: xPos0,
249210
+ xRanges: getRanges(xEdges, uniqueValsPerX && xVals, xGapLow, xGapHigh, xa, xcalendar),
249211
+ x0: x0,
249212
+ dx: dx,
249213
+ y: yPos0,
249214
+ yRanges: getRanges(yEdges, uniqueValsPerY && yVals, yGapLow, yGapHigh, ya, ycalendar),
249215
+ y0: y0,
249216
+ dy: dy,
249217
+ z: z,
249218
+ pts: inputPoints
249219
+ };
249220
+ };
249221
+
249222
+ function makeIncrements(len, bins, dv, nonuniform) {
249223
+ var out = new Array(len);
249224
+ var i;
249225
+ if(nonuniform) {
249226
+ for(i = 0; i < len; i++) out[i] = 1 / (bins[i + 1] - bins[i]);
249227
+ } else {
249228
+ var inc = 1 / dv;
249229
+ for(i = 0; i < len; i++) out[i] = inc;
249230
+ }
249231
+ return out;
249232
+ }
249233
+
249234
+ function binsToCalc(r2c, bins) {
249235
+ return {
249236
+ start: r2c(bins.start),
249237
+ end: r2c(bins.end),
249238
+ size: bins.size
249239
+ };
249240
+ }
249241
+
249242
+ function getRanges(edges, uniqueVals, gapLow, gapHigh, ax, calendar) {
249243
+ var i;
249244
+ var len = edges.length - 1;
249245
+ var out = new Array(len);
249246
+ var roundFn = getBinSpanLabelRound(gapLow, gapHigh, edges, ax, calendar);
249247
+
249248
+ for(i = 0; i < len; i++) {
249249
+ var v = (uniqueVals || [])[i];
249250
+ out[i] = v === undefined ?
249251
+ [roundFn(edges[i]), roundFn(edges[i + 1], true)] :
249252
+ [v, v];
249253
+ }
249254
+ return out;
249255
+ }
249256
+
249257
+
249258
+ /***/ }),
249259
+
249260
+ /***/ 15611:
249261
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249262
+
249263
+
249264
+
249265
+ var Lib = __webpack_require__(30991);
249266
+
249267
+ var handleSampleDefaults = __webpack_require__(6236);
249268
+ var handleStyleDefaults = __webpack_require__(25157);
249269
+ var colorscaleDefaults = __webpack_require__(13682);
249270
+ var handleHeatmapLabelDefaults = __webpack_require__(52340);
249271
+ var attributes = __webpack_require__(42124);
249272
+
249273
+
249274
+ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
249275
+ function coerce(attr, dflt) {
249276
+ return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
249277
+ }
249278
+
249279
+ handleSampleDefaults(traceIn, traceOut, coerce, layout);
249280
+ if(traceOut.visible === false) return;
249281
+
249282
+ handleStyleDefaults(traceIn, traceOut, coerce, layout);
249283
+ colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
249284
+ coerce('hovertemplate');
249285
+
249286
+ handleHeatmapLabelDefaults(coerce, layout);
249287
+
249288
+ coerce('xhoverformat');
249289
+ coerce('yhoverformat');
249290
+ };
249291
+
249292
+
249293
+ /***/ }),
249294
+
249295
+ /***/ 94587:
249296
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249297
+
249298
+
249299
+
249300
+ var heatmapHover = __webpack_require__(85243);
249301
+ var hoverLabelText = (__webpack_require__(15076).hoverLabelText);
249302
+
249303
+ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
249304
+ var pts = heatmapHover(pointData, xval, yval, hovermode, opts);
249305
+
249306
+ if(!pts) return;
249307
+
249308
+ pointData = pts[0];
249309
+ var indices = pointData.index;
249310
+ var ny = indices[0];
249311
+ var nx = indices[1];
249312
+ var cd0 = pointData.cd[0];
249313
+ var trace = cd0.trace;
249314
+ var xRange = cd0.xRanges[nx];
249315
+ var yRange = cd0.yRanges[ny];
249316
+
249317
+ pointData.xLabel = hoverLabelText(pointData.xa, [xRange[0], xRange[1]], trace.xhoverformat);
249318
+ pointData.yLabel = hoverLabelText(pointData.ya, [yRange[0], yRange[1]], trace.yhoverformat);
249319
+
249320
+ return pts;
249321
+ };
249322
+
249323
+
249324
+ /***/ }),
249325
+
249326
+ /***/ 3617:
249327
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249328
+
249329
+
249330
+
249331
+ module.exports = {
249332
+ attributes: __webpack_require__(42124),
249333
+ supplyDefaults: __webpack_require__(15611),
249334
+ crossTraceDefaults: __webpack_require__(34294),
249335
+ calc: __webpack_require__(91980),
249336
+ plot: __webpack_require__(29406),
249337
+ layerName: 'heatmaplayer',
249338
+ colorbar: __webpack_require__(90165),
249339
+ style: __webpack_require__(58756),
249340
+ hoverPoints: __webpack_require__(94587),
249341
+ eventData: __webpack_require__(63870),
249342
+
249343
+ moduleType: 'trace',
249344
+ name: 'histogram2d',
249345
+ basePlotModule: __webpack_require__(47885),
249346
+ categories: ['cartesian', 'svg', '2dMap', 'histogram', 'showLegend'],
249347
+ meta: {
249348
+ hrName: 'histogram_2d',
249349
+ description: [
249350
+ 'The sample data from which statistics are computed is set in `x`',
249351
+ 'and `y` (where `x` and `y` represent marginal distributions,',
249352
+ 'binning is set in `xbins` and `ybins` in this case)',
249353
+ 'or `z` (where `z` represent the 2D distribution and binning set,',
249354
+ 'binning is set by `x` and `y` in this case).',
249355
+ 'The resulting distribution is visualized as a heatmap.'
249356
+ ].join(' ')
249357
+ }
249358
+ };
249359
+
249360
+
249361
+ /***/ }),
249362
+
249363
+ /***/ 6236:
249364
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249365
+
249366
+
249367
+
249368
+ var Registry = __webpack_require__(13936);
249369
+ var Lib = __webpack_require__(30991);
249370
+
249371
+ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout) {
249372
+ var x = coerce('x');
249373
+ var y = coerce('y');
249374
+ var xlen = Lib.minRowLength(x);
249375
+ var ylen = Lib.minRowLength(y);
249376
+
249377
+ // we could try to accept x0 and dx, etc...
249378
+ // but that's a pretty weird use case.
249379
+ // for now require both x and y explicitly specified.
249380
+ if(!xlen || !ylen) {
249381
+ traceOut.visible = false;
249382
+ return;
249383
+ }
249384
+
249385
+ traceOut._length = Math.min(xlen, ylen);
249386
+
249387
+ var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
249388
+ handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);
249389
+
249390
+ // if marker.color is an array, we can use it in aggregation instead of z
249391
+ var hasAggregationData = coerce('z') || coerce('marker.color');
249392
+
249393
+ if(hasAggregationData) coerce('histfunc');
249394
+ coerce('histnorm');
249395
+
249396
+ // Note: bin defaults are now handled in Histogram2D.crossTraceDefaults
249397
+ // autobin(x|y) are only included here to appease Plotly.validate
249398
+ coerce('autobinx');
249399
+ coerce('autobiny');
249400
+ };
249401
+
249402
+
249403
+ /***/ }),
249404
+
249405
+ /***/ 34872:
249406
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249407
+
249408
+
249409
+
249410
+ var histogram2dAttrs = __webpack_require__(42124);
249411
+ var contourAttrs = __webpack_require__(70318);
249412
+ var colorScaleAttrs = __webpack_require__(17957);
249413
+ var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
249414
+
249415
+ var extendFlat = (__webpack_require__(91307).extendFlat);
249416
+
249417
+ module.exports = extendFlat({
249418
+ x: histogram2dAttrs.x,
249419
+ y: histogram2dAttrs.y,
249420
+ z: histogram2dAttrs.z,
249421
+ marker: histogram2dAttrs.marker,
249422
+
249423
+ histnorm: histogram2dAttrs.histnorm,
249424
+ histfunc: histogram2dAttrs.histfunc,
249425
+ nbinsx: histogram2dAttrs.nbinsx,
249426
+ xbins: histogram2dAttrs.xbins,
249427
+ nbinsy: histogram2dAttrs.nbinsy,
249428
+ ybins: histogram2dAttrs.ybins,
249429
+ autobinx: histogram2dAttrs.autobinx,
249430
+ autobiny: histogram2dAttrs.autobiny,
249431
+
249432
+ bingroup: histogram2dAttrs.bingroup,
249433
+ xbingroup: histogram2dAttrs.xbingroup,
249434
+ ybingroup: histogram2dAttrs.ybingroup,
249435
+
249436
+ autocontour: contourAttrs.autocontour,
249437
+ ncontours: contourAttrs.ncontours,
249438
+ contours: contourAttrs.contours,
249439
+ line: {
249440
+ color: contourAttrs.line.color,
249441
+ width: extendFlat({}, contourAttrs.line.width, {
249442
+ dflt: 0.5,
249443
+ description: 'Sets the contour line width in (in px)'
249444
+ }),
249445
+ dash: contourAttrs.line.dash,
249446
+ smoothing: contourAttrs.line.smoothing,
249447
+ editType: 'plot'
249448
+ },
249449
+ xhoverformat: axisHoverFormat('x'),
249450
+ yhoverformat: axisHoverFormat('y'),
249451
+ zhoverformat: axisHoverFormat('z', 1),
249452
+ hovertemplate: histogram2dAttrs.hovertemplate,
249453
+ texttemplate: contourAttrs.texttemplate,
249454
+ textfont: contourAttrs.textfont
249455
+ },
249456
+ colorScaleAttrs('', {
249457
+ cLetter: 'z',
249458
+ editTypeOverride: 'calc'
249459
+ })
249460
+ );
249461
+
249462
+
249463
+ /***/ }),
249464
+
249465
+ /***/ 14319:
249466
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249467
+
249468
+
249469
+
249470
+ var Lib = __webpack_require__(30991);
249471
+
249472
+ var handleSampleDefaults = __webpack_require__(6236);
249473
+ var handleContoursDefaults = __webpack_require__(657);
249474
+ var handleStyleDefaults = __webpack_require__(74619);
249475
+ var handleHeatmapLabelDefaults = __webpack_require__(52340);
249476
+ var attributes = __webpack_require__(34872);
249477
+
249478
+
249479
+ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
249480
+ function coerce(attr, dflt) {
249481
+ return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
249482
+ }
249483
+
249484
+ function coerce2(attr) {
249485
+ return Lib.coerce2(traceIn, traceOut, attributes, attr);
249486
+ }
249487
+
249488
+ handleSampleDefaults(traceIn, traceOut, coerce, layout);
249489
+ if(traceOut.visible === false) return;
249490
+
249491
+ handleContoursDefaults(traceIn, traceOut, coerce, coerce2);
249492
+ handleStyleDefaults(traceIn, traceOut, coerce, layout);
249493
+ coerce('xhoverformat');
249494
+ coerce('yhoverformat');
249495
+ coerce('hovertemplate');
249496
+ if(
249497
+ traceOut.contours &&
249498
+ traceOut.contours.coloring === 'heatmap'
249499
+ ) {
249500
+ handleHeatmapLabelDefaults(coerce, layout);
249501
+ }
249502
+ };
249503
+
249504
+
249505
+ /***/ }),
249506
+
249507
+ /***/ 60613:
249508
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249509
+
249510
+
249511
+
249512
+ module.exports = {
249513
+ attributes: __webpack_require__(34872),
249514
+ supplyDefaults: __webpack_require__(14319),
249515
+ crossTraceDefaults: __webpack_require__(34294),
249516
+ calc: __webpack_require__(3274),
249517
+ plot: (__webpack_require__(32664).plot),
249518
+ layerName: 'contourlayer',
249519
+ style: __webpack_require__(72690),
249520
+ colorbar: __webpack_require__(70307),
249521
+ hoverPoints: __webpack_require__(52353),
249522
+
249523
+ moduleType: 'trace',
249524
+ name: 'histogram2dcontour',
249525
+ basePlotModule: __webpack_require__(47885),
249526
+ categories: ['cartesian', 'svg', '2dMap', 'contour', 'histogram', 'showLegend'],
249527
+ meta: {
249528
+ hrName: 'histogram_2d_contour',
249529
+ description: [
249530
+ 'The sample data from which statistics are computed is set in `x`',
249531
+ 'and `y` (where `x` and `y` represent marginal distributions,',
249532
+ 'binning is set in `xbins` and `ybins` in this case)',
249533
+ 'or `z` (where `z` represent the 2D distribution and binning set,',
249534
+ 'binning is set by `x` and `y` in this case).',
249535
+ 'The resulting distribution is visualized as a contour plot.'
249536
+ ].join(' ')
249537
+ }
249538
+ };
249539
+
249540
+
248944
249541
  /***/ }),
248945
249542
 
248946
249543
  /***/ 71250:
@@ -250649,595 +251246,6 @@ module.exports = {
250649
251246
  };
250650
251247
 
250651
251248
 
250652
- /***/ }),
250653
-
250654
- /***/ 42124:
250655
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250656
-
250657
-
250658
-
250659
- var histogramAttrs = __webpack_require__(71250);
250660
- var makeBinAttrs = __webpack_require__(9284);
250661
- var heatmapAttrs = __webpack_require__(68300);
250662
- var baseAttrs = __webpack_require__(35667);
250663
- var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
250664
- var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
250665
- var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
250666
- var colorScaleAttrs = __webpack_require__(17957);
250667
-
250668
- var extendFlat = (__webpack_require__(91307).extendFlat);
250669
-
250670
- module.exports = extendFlat(
250671
- {
250672
- x: histogramAttrs.x,
250673
- y: histogramAttrs.y,
250674
-
250675
- z: {
250676
- valType: 'data_array',
250677
- editType: 'calc',
250678
- description: 'Sets the aggregation data.'
250679
- },
250680
- marker: {
250681
- color: {
250682
- valType: 'data_array',
250683
- editType: 'calc',
250684
- description: 'Sets the aggregation data.'
250685
- },
250686
- editType: 'calc'
250687
- },
250688
-
250689
- histnorm: histogramAttrs.histnorm,
250690
- histfunc: histogramAttrs.histfunc,
250691
- nbinsx: histogramAttrs.nbinsx,
250692
- xbins: makeBinAttrs('x'),
250693
- nbinsy: histogramAttrs.nbinsy,
250694
- ybins: makeBinAttrs('y'),
250695
- autobinx: histogramAttrs.autobinx,
250696
- autobiny: histogramAttrs.autobiny,
250697
-
250698
- bingroup: extendFlat({}, histogramAttrs.bingroup, {
250699
- description: [
250700
- 'Set the `xbingroup` and `ybingroup` default prefix',
250701
- 'For example, setting a `bingroup` of *1* on two histogram2d traces',
250702
- 'will make them their x-bins and y-bins match separately.'
250703
- ].join(' ')
250704
- }),
250705
- xbingroup: extendFlat({}, histogramAttrs.bingroup, {
250706
- description: [
250707
- 'Set a group of histogram traces which will have compatible x-bin settings.',
250708
- 'Using `xbingroup`, histogram2d and histogram2dcontour traces ',
250709
- '(on axes of the same axis type) can have compatible x-bin settings.',
250710
- 'Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup`'
250711
- ].join(' ')
250712
- }),
250713
- ybingroup: extendFlat({}, histogramAttrs.bingroup, {
250714
- description: [
250715
- 'Set a group of histogram traces which will have compatible y-bin settings.',
250716
- 'Using `ybingroup`, histogram2d and histogram2dcontour traces ',
250717
- '(on axes of the same axis type) can have compatible y-bin settings.',
250718
- 'Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup`'
250719
- ].join(' ')
250720
- }),
250721
-
250722
- xgap: heatmapAttrs.xgap,
250723
- ygap: heatmapAttrs.ygap,
250724
- zsmooth: heatmapAttrs.zsmooth,
250725
- xhoverformat: axisHoverFormat('x'),
250726
- yhoverformat: axisHoverFormat('y'),
250727
- zhoverformat: axisHoverFormat('z', 1),
250728
- hovertemplate: hovertemplateAttrs({}, {keys: 'z'}),
250729
- texttemplate: texttemplateAttrs({
250730
- arrayOk: false,
250731
- editType: 'plot'
250732
- }, {
250733
- keys: 'z'
250734
- }),
250735
- textfont: heatmapAttrs.textfont,
250736
- showlegend: extendFlat({}, baseAttrs.showlegend, {dflt: false})
250737
- },
250738
- colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
250739
- );
250740
-
250741
-
250742
- /***/ }),
250743
-
250744
- /***/ 32492:
250745
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250746
-
250747
-
250748
-
250749
- var Lib = __webpack_require__(30991);
250750
- var Axes = __webpack_require__(15076);
250751
-
250752
- var binFunctions = __webpack_require__(47260);
250753
- var normFunctions = __webpack_require__(855);
250754
- var doAvg = __webpack_require__(26756);
250755
- var getBinSpanLabelRound = __webpack_require__(41574);
250756
- var calcAllAutoBins = (__webpack_require__(50414).calcAllAutoBins);
250757
-
250758
- module.exports = function calc(gd, trace) {
250759
- var xa = Axes.getFromId(gd, trace.xaxis);
250760
- var ya = Axes.getFromId(gd, trace.yaxis);
250761
-
250762
- var xcalendar = trace.xcalendar;
250763
- var ycalendar = trace.ycalendar;
250764
- var xr2c = function(v) { return xa.r2c(v, 0, xcalendar); };
250765
- var yr2c = function(v) { return ya.r2c(v, 0, ycalendar); };
250766
- var xc2r = function(v) { return xa.c2r(v, 0, xcalendar); };
250767
- var yc2r = function(v) { return ya.c2r(v, 0, ycalendar); };
250768
-
250769
- var i, j, n, m;
250770
-
250771
- // calculate the bins
250772
- var xBinsAndPos = calcAllAutoBins(gd, trace, xa, 'x');
250773
- var xBinSpec = xBinsAndPos[0];
250774
- var xPos0 = xBinsAndPos[1];
250775
- var yBinsAndPos = calcAllAutoBins(gd, trace, ya, 'y');
250776
- var yBinSpec = yBinsAndPos[0];
250777
- var yPos0 = yBinsAndPos[1];
250778
-
250779
- var serieslen = trace._length;
250780
- if(xPos0.length > serieslen) xPos0.splice(serieslen, xPos0.length - serieslen);
250781
- if(yPos0.length > serieslen) yPos0.splice(serieslen, yPos0.length - serieslen);
250782
-
250783
- // make the empty bin array & scale the map
250784
- var z = [];
250785
- var onecol = [];
250786
- var zerocol = [];
250787
- var nonuniformBinsX = typeof xBinSpec.size === 'string';
250788
- var nonuniformBinsY = typeof yBinSpec.size === 'string';
250789
- var xEdges = [];
250790
- var yEdges = [];
250791
- var xbins = nonuniformBinsX ? xEdges : xBinSpec;
250792
- var ybins = nonuniformBinsY ? yEdges : yBinSpec;
250793
- var total = 0;
250794
- var counts = [];
250795
- var inputPoints = [];
250796
- var norm = trace.histnorm;
250797
- var func = trace.histfunc;
250798
- var densitynorm = norm.indexOf('density') !== -1;
250799
- var extremefunc = func === 'max' || func === 'min';
250800
- var sizeinit = extremefunc ? null : 0;
250801
- var binfunc = binFunctions.count;
250802
- var normfunc = normFunctions[norm];
250803
- var doavg = false;
250804
- var xinc = [];
250805
- var yinc = [];
250806
-
250807
- // set a binning function other than count?
250808
- // for binning functions: check first for 'z',
250809
- // then 'mc' in case we had a colored scatter plot
250810
- // and want to transfer these colors to the 2D histo
250811
- // TODO: axe this, make it the responsibility of the app changing type? or an impliedEdit?
250812
- var rawCounterData = ('z' in trace) ?
250813
- trace.z :
250814
- (('marker' in trace && Array.isArray(trace.marker.color)) ?
250815
- trace.marker.color : '');
250816
- if(rawCounterData && func !== 'count') {
250817
- doavg = func === 'avg';
250818
- binfunc = binFunctions[func];
250819
- }
250820
-
250821
- // decrease end a little in case of rounding errors
250822
- var xBinSize = xBinSpec.size;
250823
- var xBinStart = xr2c(xBinSpec.start);
250824
- var xBinEnd = xr2c(xBinSpec.end) +
250825
- (xBinStart - Axes.tickIncrement(xBinStart, xBinSize, false, xcalendar)) / 1e6;
250826
-
250827
- for(i = xBinStart; i < xBinEnd; i = Axes.tickIncrement(i, xBinSize, false, xcalendar)) {
250828
- onecol.push(sizeinit);
250829
- xEdges.push(i);
250830
- if(doavg) zerocol.push(0);
250831
- }
250832
- xEdges.push(i);
250833
-
250834
- var nx = onecol.length;
250835
- var dx = (i - xBinStart) / nx;
250836
- var x0 = xc2r(xBinStart + dx / 2);
250837
-
250838
- var yBinSize = yBinSpec.size;
250839
- var yBinStart = yr2c(yBinSpec.start);
250840
- var yBinEnd = yr2c(yBinSpec.end) +
250841
- (yBinStart - Axes.tickIncrement(yBinStart, yBinSize, false, ycalendar)) / 1e6;
250842
-
250843
- for(i = yBinStart; i < yBinEnd; i = Axes.tickIncrement(i, yBinSize, false, ycalendar)) {
250844
- z.push(onecol.slice());
250845
- yEdges.push(i);
250846
- var ipCol = new Array(nx);
250847
- for(j = 0; j < nx; j++) ipCol[j] = [];
250848
- inputPoints.push(ipCol);
250849
- if(doavg) counts.push(zerocol.slice());
250850
- }
250851
- yEdges.push(i);
250852
-
250853
- var ny = z.length;
250854
- var dy = (i - yBinStart) / ny;
250855
- var y0 = yc2r(yBinStart + dy / 2);
250856
-
250857
- if(densitynorm) {
250858
- xinc = makeIncrements(onecol.length, xbins, dx, nonuniformBinsX);
250859
- yinc = makeIncrements(z.length, ybins, dy, nonuniformBinsY);
250860
- }
250861
-
250862
- // for date axes we need bin bounds to be calcdata. For nonuniform bins
250863
- // we already have this, but uniform with start/end/size they're still strings.
250864
- if(!nonuniformBinsX && xa.type === 'date') xbins = binsToCalc(xr2c, xbins);
250865
- if(!nonuniformBinsY && ya.type === 'date') ybins = binsToCalc(yr2c, ybins);
250866
-
250867
- // put data into bins
250868
- var uniqueValsPerX = true;
250869
- var uniqueValsPerY = true;
250870
- var xVals = new Array(nx);
250871
- var yVals = new Array(ny);
250872
- var xGapLow = Infinity;
250873
- var xGapHigh = Infinity;
250874
- var yGapLow = Infinity;
250875
- var yGapHigh = Infinity;
250876
- for(i = 0; i < serieslen; i++) {
250877
- var xi = xPos0[i];
250878
- var yi = yPos0[i];
250879
- n = Lib.findBin(xi, xbins);
250880
- m = Lib.findBin(yi, ybins);
250881
- if(n >= 0 && n < nx && m >= 0 && m < ny) {
250882
- total += binfunc(n, i, z[m], rawCounterData, counts[m]);
250883
- inputPoints[m][n].push(i);
250884
-
250885
- if(uniqueValsPerX) {
250886
- if(xVals[n] === undefined) xVals[n] = xi;
250887
- else if(xVals[n] !== xi) uniqueValsPerX = false;
250888
- }
250889
- if(uniqueValsPerY) {
250890
- if(yVals[m] === undefined) yVals[m] = yi;
250891
- else if(yVals[m] !== yi) uniqueValsPerY = false;
250892
- }
250893
-
250894
- xGapLow = Math.min(xGapLow, xi - xEdges[n]);
250895
- xGapHigh = Math.min(xGapHigh, xEdges[n + 1] - xi);
250896
- yGapLow = Math.min(yGapLow, yi - yEdges[m]);
250897
- yGapHigh = Math.min(yGapHigh, yEdges[m + 1] - yi);
250898
- }
250899
- }
250900
- // normalize, if needed
250901
- if(doavg) {
250902
- for(m = 0; m < ny; m++) total += doAvg(z[m], counts[m]);
250903
- }
250904
- if(normfunc) {
250905
- for(m = 0; m < ny; m++) normfunc(z[m], total, xinc, yinc[m]);
250906
- }
250907
-
250908
- return {
250909
- x: xPos0,
250910
- xRanges: getRanges(xEdges, uniqueValsPerX && xVals, xGapLow, xGapHigh, xa, xcalendar),
250911
- x0: x0,
250912
- dx: dx,
250913
- y: yPos0,
250914
- yRanges: getRanges(yEdges, uniqueValsPerY && yVals, yGapLow, yGapHigh, ya, ycalendar),
250915
- y0: y0,
250916
- dy: dy,
250917
- z: z,
250918
- pts: inputPoints
250919
- };
250920
- };
250921
-
250922
- function makeIncrements(len, bins, dv, nonuniform) {
250923
- var out = new Array(len);
250924
- var i;
250925
- if(nonuniform) {
250926
- for(i = 0; i < len; i++) out[i] = 1 / (bins[i + 1] - bins[i]);
250927
- } else {
250928
- var inc = 1 / dv;
250929
- for(i = 0; i < len; i++) out[i] = inc;
250930
- }
250931
- return out;
250932
- }
250933
-
250934
- function binsToCalc(r2c, bins) {
250935
- return {
250936
- start: r2c(bins.start),
250937
- end: r2c(bins.end),
250938
- size: bins.size
250939
- };
250940
- }
250941
-
250942
- function getRanges(edges, uniqueVals, gapLow, gapHigh, ax, calendar) {
250943
- var i;
250944
- var len = edges.length - 1;
250945
- var out = new Array(len);
250946
- var roundFn = getBinSpanLabelRound(gapLow, gapHigh, edges, ax, calendar);
250947
-
250948
- for(i = 0; i < len; i++) {
250949
- var v = (uniqueVals || [])[i];
250950
- out[i] = v === undefined ?
250951
- [roundFn(edges[i]), roundFn(edges[i + 1], true)] :
250952
- [v, v];
250953
- }
250954
- return out;
250955
- }
250956
-
250957
-
250958
- /***/ }),
250959
-
250960
- /***/ 15611:
250961
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250962
-
250963
-
250964
-
250965
- var Lib = __webpack_require__(30991);
250966
-
250967
- var handleSampleDefaults = __webpack_require__(6236);
250968
- var handleStyleDefaults = __webpack_require__(25157);
250969
- var colorscaleDefaults = __webpack_require__(13682);
250970
- var handleHeatmapLabelDefaults = __webpack_require__(52340);
250971
- var attributes = __webpack_require__(42124);
250972
-
250973
-
250974
- module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
250975
- function coerce(attr, dflt) {
250976
- return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
250977
- }
250978
-
250979
- handleSampleDefaults(traceIn, traceOut, coerce, layout);
250980
- if(traceOut.visible === false) return;
250981
-
250982
- handleStyleDefaults(traceIn, traceOut, coerce, layout);
250983
- colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
250984
- coerce('hovertemplate');
250985
-
250986
- handleHeatmapLabelDefaults(coerce, layout);
250987
-
250988
- coerce('xhoverformat');
250989
- coerce('yhoverformat');
250990
- };
250991
-
250992
-
250993
- /***/ }),
250994
-
250995
- /***/ 94587:
250996
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250997
-
250998
-
250999
-
251000
- var heatmapHover = __webpack_require__(85243);
251001
- var hoverLabelText = (__webpack_require__(15076).hoverLabelText);
251002
-
251003
- module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
251004
- var pts = heatmapHover(pointData, xval, yval, hovermode, opts);
251005
-
251006
- if(!pts) return;
251007
-
251008
- pointData = pts[0];
251009
- var indices = pointData.index;
251010
- var ny = indices[0];
251011
- var nx = indices[1];
251012
- var cd0 = pointData.cd[0];
251013
- var trace = cd0.trace;
251014
- var xRange = cd0.xRanges[nx];
251015
- var yRange = cd0.yRanges[ny];
251016
-
251017
- pointData.xLabel = hoverLabelText(pointData.xa, [xRange[0], xRange[1]], trace.xhoverformat);
251018
- pointData.yLabel = hoverLabelText(pointData.ya, [yRange[0], yRange[1]], trace.yhoverformat);
251019
-
251020
- return pts;
251021
- };
251022
-
251023
-
251024
- /***/ }),
251025
-
251026
- /***/ 3617:
251027
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
251028
-
251029
-
251030
-
251031
- module.exports = {
251032
- attributes: __webpack_require__(42124),
251033
- supplyDefaults: __webpack_require__(15611),
251034
- crossTraceDefaults: __webpack_require__(34294),
251035
- calc: __webpack_require__(91980),
251036
- plot: __webpack_require__(29406),
251037
- layerName: 'heatmaplayer',
251038
- colorbar: __webpack_require__(90165),
251039
- style: __webpack_require__(58756),
251040
- hoverPoints: __webpack_require__(94587),
251041
- eventData: __webpack_require__(63870),
251042
-
251043
- moduleType: 'trace',
251044
- name: 'histogram2d',
251045
- basePlotModule: __webpack_require__(47885),
251046
- categories: ['cartesian', 'svg', '2dMap', 'histogram', 'showLegend'],
251047
- meta: {
251048
- hrName: 'histogram_2d',
251049
- description: [
251050
- 'The sample data from which statistics are computed is set in `x`',
251051
- 'and `y` (where `x` and `y` represent marginal distributions,',
251052
- 'binning is set in `xbins` and `ybins` in this case)',
251053
- 'or `z` (where `z` represent the 2D distribution and binning set,',
251054
- 'binning is set by `x` and `y` in this case).',
251055
- 'The resulting distribution is visualized as a heatmap.'
251056
- ].join(' ')
251057
- }
251058
- };
251059
-
251060
-
251061
- /***/ }),
251062
-
251063
- /***/ 6236:
251064
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
251065
-
251066
-
251067
-
251068
- var Registry = __webpack_require__(13936);
251069
- var Lib = __webpack_require__(30991);
251070
-
251071
- module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout) {
251072
- var x = coerce('x');
251073
- var y = coerce('y');
251074
- var xlen = Lib.minRowLength(x);
251075
- var ylen = Lib.minRowLength(y);
251076
-
251077
- // we could try to accept x0 and dx, etc...
251078
- // but that's a pretty weird use case.
251079
- // for now require both x and y explicitly specified.
251080
- if(!xlen || !ylen) {
251081
- traceOut.visible = false;
251082
- return;
251083
- }
251084
-
251085
- traceOut._length = Math.min(xlen, ylen);
251086
-
251087
- var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
251088
- handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);
251089
-
251090
- // if marker.color is an array, we can use it in aggregation instead of z
251091
- var hasAggregationData = coerce('z') || coerce('marker.color');
251092
-
251093
- if(hasAggregationData) coerce('histfunc');
251094
- coerce('histnorm');
251095
-
251096
- // Note: bin defaults are now handled in Histogram2D.crossTraceDefaults
251097
- // autobin(x|y) are only included here to appease Plotly.validate
251098
- coerce('autobinx');
251099
- coerce('autobiny');
251100
- };
251101
-
251102
-
251103
- /***/ }),
251104
-
251105
- /***/ 34872:
251106
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
251107
-
251108
-
251109
-
251110
- var histogram2dAttrs = __webpack_require__(42124);
251111
- var contourAttrs = __webpack_require__(70318);
251112
- var colorScaleAttrs = __webpack_require__(17957);
251113
- var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
251114
-
251115
- var extendFlat = (__webpack_require__(91307).extendFlat);
251116
-
251117
- module.exports = extendFlat({
251118
- x: histogram2dAttrs.x,
251119
- y: histogram2dAttrs.y,
251120
- z: histogram2dAttrs.z,
251121
- marker: histogram2dAttrs.marker,
251122
-
251123
- histnorm: histogram2dAttrs.histnorm,
251124
- histfunc: histogram2dAttrs.histfunc,
251125
- nbinsx: histogram2dAttrs.nbinsx,
251126
- xbins: histogram2dAttrs.xbins,
251127
- nbinsy: histogram2dAttrs.nbinsy,
251128
- ybins: histogram2dAttrs.ybins,
251129
- autobinx: histogram2dAttrs.autobinx,
251130
- autobiny: histogram2dAttrs.autobiny,
251131
-
251132
- bingroup: histogram2dAttrs.bingroup,
251133
- xbingroup: histogram2dAttrs.xbingroup,
251134
- ybingroup: histogram2dAttrs.ybingroup,
251135
-
251136
- autocontour: contourAttrs.autocontour,
251137
- ncontours: contourAttrs.ncontours,
251138
- contours: contourAttrs.contours,
251139
- line: {
251140
- color: contourAttrs.line.color,
251141
- width: extendFlat({}, contourAttrs.line.width, {
251142
- dflt: 0.5,
251143
- description: 'Sets the contour line width in (in px)'
251144
- }),
251145
- dash: contourAttrs.line.dash,
251146
- smoothing: contourAttrs.line.smoothing,
251147
- editType: 'plot'
251148
- },
251149
- xhoverformat: axisHoverFormat('x'),
251150
- yhoverformat: axisHoverFormat('y'),
251151
- zhoverformat: axisHoverFormat('z', 1),
251152
- hovertemplate: histogram2dAttrs.hovertemplate,
251153
- texttemplate: contourAttrs.texttemplate,
251154
- textfont: contourAttrs.textfont
251155
- },
251156
- colorScaleAttrs('', {
251157
- cLetter: 'z',
251158
- editTypeOverride: 'calc'
251159
- })
251160
- );
251161
-
251162
-
251163
- /***/ }),
251164
-
251165
- /***/ 14319:
251166
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
251167
-
251168
-
251169
-
251170
- var Lib = __webpack_require__(30991);
251171
-
251172
- var handleSampleDefaults = __webpack_require__(6236);
251173
- var handleContoursDefaults = __webpack_require__(657);
251174
- var handleStyleDefaults = __webpack_require__(74619);
251175
- var handleHeatmapLabelDefaults = __webpack_require__(52340);
251176
- var attributes = __webpack_require__(34872);
251177
-
251178
-
251179
- module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
251180
- function coerce(attr, dflt) {
251181
- return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
251182
- }
251183
-
251184
- function coerce2(attr) {
251185
- return Lib.coerce2(traceIn, traceOut, attributes, attr);
251186
- }
251187
-
251188
- handleSampleDefaults(traceIn, traceOut, coerce, layout);
251189
- if(traceOut.visible === false) return;
251190
-
251191
- handleContoursDefaults(traceIn, traceOut, coerce, coerce2);
251192
- handleStyleDefaults(traceIn, traceOut, coerce, layout);
251193
- coerce('xhoverformat');
251194
- coerce('yhoverformat');
251195
- coerce('hovertemplate');
251196
- if(
251197
- traceOut.contours &&
251198
- traceOut.contours.coloring === 'heatmap'
251199
- ) {
251200
- handleHeatmapLabelDefaults(coerce, layout);
251201
- }
251202
- };
251203
-
251204
-
251205
- /***/ }),
251206
-
251207
- /***/ 60613:
251208
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
251209
-
251210
-
251211
-
251212
- module.exports = {
251213
- attributes: __webpack_require__(34872),
251214
- supplyDefaults: __webpack_require__(14319),
251215
- crossTraceDefaults: __webpack_require__(34294),
251216
- calc: __webpack_require__(3274),
251217
- plot: (__webpack_require__(32664).plot),
251218
- layerName: 'contourlayer',
251219
- style: __webpack_require__(72690),
251220
- colorbar: __webpack_require__(70307),
251221
- hoverPoints: __webpack_require__(52353),
251222
-
251223
- moduleType: 'trace',
251224
- name: 'histogram2dcontour',
251225
- basePlotModule: __webpack_require__(47885),
251226
- categories: ['cartesian', 'svg', '2dMap', 'contour', 'histogram', 'showLegend'],
251227
- meta: {
251228
- hrName: 'histogram_2d_contour',
251229
- description: [
251230
- 'The sample data from which statistics are computed is set in `x`',
251231
- 'and `y` (where `x` and `y` represent marginal distributions,',
251232
- 'binning is set in `xbins` and `ybins` in this case)',
251233
- 'or `z` (where `z` represent the 2D distribution and binning set,',
251234
- 'binning is set by `x` and `y` in this case).',
251235
- 'The resulting distribution is visualized as a contour plot.'
251236
- ].join(' ')
251237
- }
251238
- };
251239
-
251240
-
251241
251249
  /***/ }),
251242
251250
 
251243
251251
  /***/ 48223:
@@ -267427,6 +267435,993 @@ module.exports = function selectPoints(searchInfo, selectionTester) {
267427
267435
  };
267428
267436
 
267429
267437
 
267438
+ /***/ }),
267439
+
267440
+ /***/ 1015:
267441
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
267442
+
267443
+
267444
+
267445
+ var scatterAttrs = __webpack_require__(86854);
267446
+ var fontAttrs = __webpack_require__(70827);
267447
+ var colorAttributes = __webpack_require__(17957);
267448
+ var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
267449
+ var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
267450
+ var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
267451
+ var baseAttrs = __webpack_require__(35667);
267452
+ var DASHES = __webpack_require__(68828);
267453
+
267454
+ var MARKER_SYMBOLS = __webpack_require__(98993);
267455
+ var extendFlat = (__webpack_require__(91307).extendFlat);
267456
+ var overrideAll = (__webpack_require__(70756).overrideAll);
267457
+ var sortObjectKeys = __webpack_require__(99124);
267458
+
267459
+ var scatterLineAttrs = scatterAttrs.line;
267460
+ var scatterMarkerAttrs = scatterAttrs.marker;
267461
+ var scatterMarkerLineAttrs = scatterMarkerAttrs.line;
267462
+
267463
+ var lineAttrs = extendFlat({
267464
+ width: scatterLineAttrs.width,
267465
+ dash: {
267466
+ valType: 'enumerated',
267467
+ values: sortObjectKeys(DASHES),
267468
+ dflt: 'solid',
267469
+ description: 'Sets the dash style of the lines.'
267470
+ }
267471
+ }, colorAttributes('line'));
267472
+
267473
+ function makeProjectionAttr(axLetter) {
267474
+ return {
267475
+ show: {
267476
+ valType: 'boolean',
267477
+ dflt: false,
267478
+ description: [
267479
+ 'Sets whether or not projections are shown along the',
267480
+ axLetter, 'axis.'
267481
+ ].join(' ')
267482
+ },
267483
+ opacity: {
267484
+ valType: 'number',
267485
+ min: 0,
267486
+ max: 1,
267487
+ dflt: 1,
267488
+ description: 'Sets the projection color.'
267489
+ },
267490
+ scale: {
267491
+ valType: 'number',
267492
+ min: 0,
267493
+ max: 10,
267494
+ dflt: 2 / 3,
267495
+ description: [
267496
+ 'Sets the scale factor determining the size of the',
267497
+ 'projection marker points.'
267498
+ ].join(' ')
267499
+ }
267500
+ };
267501
+ }
267502
+
267503
+ var attrs = module.exports = overrideAll({
267504
+ x: scatterAttrs.x,
267505
+ y: scatterAttrs.y,
267506
+ z: {
267507
+ valType: 'data_array',
267508
+ description: 'Sets the z coordinates.'
267509
+ },
267510
+
267511
+ text: extendFlat({}, scatterAttrs.text, {
267512
+ description: [
267513
+ 'Sets text elements associated with each (x,y,z) triplet.',
267514
+ 'If a single string, the same string appears over',
267515
+ 'all the data points.',
267516
+ 'If an array of string, the items are mapped in order to the',
267517
+ 'this trace\'s (x,y,z) coordinates.',
267518
+ 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,',
267519
+ 'these elements will be seen in the hover labels.'
267520
+ ].join(' ')
267521
+ }),
267522
+ texttemplate: texttemplateAttrs({}, {
267523
+
267524
+ }),
267525
+ hovertext: extendFlat({}, scatterAttrs.hovertext, {
267526
+ description: [
267527
+ 'Sets text elements associated with each (x,y,z) triplet.',
267528
+ 'If a single string, the same string appears over',
267529
+ 'all the data points.',
267530
+ 'If an array of string, the items are mapped in order to the',
267531
+ 'this trace\'s (x,y,z) coordinates.',
267532
+ 'To be seen, trace `hoverinfo` must contain a *text* flag.'
267533
+ ].join(' ')
267534
+ }),
267535
+ hovertemplate: hovertemplateAttrs(),
267536
+
267537
+ xhoverformat: axisHoverFormat('x'),
267538
+ yhoverformat: axisHoverFormat('y'),
267539
+ zhoverformat: axisHoverFormat('z'),
267540
+
267541
+ mode: extendFlat({}, scatterAttrs.mode, // shouldn't this be on-par with 2D?
267542
+ {dflt: 'lines+markers'}),
267543
+ surfaceaxis: {
267544
+ valType: 'enumerated',
267545
+ values: [-1, 0, 1, 2],
267546
+ dflt: -1,
267547
+ description: [
267548
+ 'If *-1*, the scatter points are not fill with a surface',
267549
+ 'If *0*, *1*, *2*, the scatter points are filled with',
267550
+ 'a Delaunay surface about the x, y, z respectively.'
267551
+ ].join(' ')
267552
+ },
267553
+ surfacecolor: {
267554
+ valType: 'color',
267555
+ description: 'Sets the surface fill color.'
267556
+ },
267557
+ projection: {
267558
+ x: makeProjectionAttr('x'),
267559
+ y: makeProjectionAttr('y'),
267560
+ z: makeProjectionAttr('z')
267561
+ },
267562
+
267563
+ connectgaps: scatterAttrs.connectgaps,
267564
+ line: lineAttrs,
267565
+
267566
+ marker: extendFlat({ // Parity with scatter.js?
267567
+ symbol: {
267568
+ valType: 'enumerated',
267569
+ values: sortObjectKeys(MARKER_SYMBOLS),
267570
+ dflt: 'circle',
267571
+ arrayOk: true,
267572
+ description: 'Sets the marker symbol type.'
267573
+ },
267574
+ size: extendFlat({}, scatterMarkerAttrs.size, {dflt: 8}),
267575
+ sizeref: scatterMarkerAttrs.sizeref,
267576
+ sizemin: scatterMarkerAttrs.sizemin,
267577
+ sizemode: scatterMarkerAttrs.sizemode,
267578
+ opacity: extendFlat({}, scatterMarkerAttrs.opacity, {
267579
+ arrayOk: false,
267580
+ description: [
267581
+ 'Sets the marker opacity.',
267582
+ 'Note that the marker opacity for scatter3d traces',
267583
+ 'must be a scalar value for performance reasons.',
267584
+ 'To set a blending opacity value',
267585
+ '(i.e. which is not transparent), set *marker.color*',
267586
+ 'to an rgba color and use its alpha channel.'
267587
+ ].join(' ')
267588
+ }),
267589
+ colorbar: scatterMarkerAttrs.colorbar,
267590
+
267591
+ line: extendFlat({
267592
+ width: extendFlat({}, scatterMarkerLineAttrs.width, {arrayOk: false})
267593
+ },
267594
+ colorAttributes('marker.line')
267595
+ )
267596
+ },
267597
+ colorAttributes('marker')
267598
+ ),
267599
+
267600
+ textposition: extendFlat({}, scatterAttrs.textposition, {dflt: 'top center'}),
267601
+ textfont: fontAttrs({
267602
+ noFontShadow: true,
267603
+ noFontLineposition: true,
267604
+ noFontTextcase: true,
267605
+ editType: 'calc',
267606
+ colorEditType: 'style',
267607
+ arrayOk: true,
267608
+ variantValues: ['normal', 'small-caps'],
267609
+ description: 'Sets the text font.'
267610
+ }),
267611
+
267612
+ opacity: baseAttrs.opacity,
267613
+
267614
+ hoverinfo: extendFlat({}, baseAttrs.hoverinfo)
267615
+ }, 'calc', 'nested');
267616
+
267617
+ attrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';
267618
+
267619
+
267620
+ /***/ }),
267621
+
267622
+ /***/ 30935:
267623
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
267624
+
267625
+
267626
+
267627
+ var arraysToCalcdata = __webpack_require__(47213);
267628
+ var calcColorscale = __webpack_require__(59498);
267629
+
267630
+ /**
267631
+ * This is a kludge to put the array attributes into
267632
+ * calcdata the way Scatter.plot does, so that legends and
267633
+ * popovers know what to do with them.
267634
+ */
267635
+ module.exports = function calc(gd, trace) {
267636
+ var cd = [{x: false, y: false, trace: trace, t: {}}];
267637
+
267638
+ arraysToCalcdata(cd, trace);
267639
+ calcColorscale(gd, trace);
267640
+
267641
+ return cd;
267642
+ };
267643
+
267644
+
267645
+ /***/ }),
267646
+
267647
+ /***/ 77681:
267648
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
267649
+
267650
+
267651
+
267652
+ var Registry = __webpack_require__(13936);
267653
+
267654
+ function calculateAxisErrors(data, params, scaleFactor, axis) {
267655
+ if(!params || !params.visible) return null;
267656
+
267657
+ var computeError = Registry.getComponentMethod('errorbars', 'makeComputeError')(params);
267658
+ var result = new Array(data.length);
267659
+
267660
+ for(var i = 0; i < data.length; i++) {
267661
+ var errors = computeError(+data[i], i);
267662
+
267663
+ if(axis.type === 'log') {
267664
+ var point = axis.c2l(data[i]);
267665
+ var min = data[i] - errors[0];
267666
+ var max = data[i] + errors[1];
267667
+
267668
+ result[i] = [
267669
+ (axis.c2l(min, true) - point) * scaleFactor,
267670
+ (axis.c2l(max, true) - point) * scaleFactor
267671
+ ];
267672
+
267673
+ // Keep track of the lower error bound which isn't negative!
267674
+ if(min > 0) {
267675
+ var lower = axis.c2l(min);
267676
+ if(!axis._lowerLogErrorBound) axis._lowerLogErrorBound = lower;
267677
+ axis._lowerErrorBound = Math.min(axis._lowerLogErrorBound, lower);
267678
+ }
267679
+ } else {
267680
+ result[i] = [
267681
+ -errors[0] * scaleFactor,
267682
+ errors[1] * scaleFactor
267683
+ ];
267684
+ }
267685
+ }
267686
+
267687
+ return result;
267688
+ }
267689
+
267690
+ function dataLength(array) {
267691
+ for(var i = 0; i < array.length; i++) {
267692
+ if(array[i]) return array[i].length;
267693
+ }
267694
+ return 0;
267695
+ }
267696
+
267697
+ function calculateErrors(data, scaleFactor, sceneLayout) {
267698
+ var errors = [
267699
+ calculateAxisErrors(data.x, data.error_x, scaleFactor[0], sceneLayout.xaxis),
267700
+ calculateAxisErrors(data.y, data.error_y, scaleFactor[1], sceneLayout.yaxis),
267701
+ calculateAxisErrors(data.z, data.error_z, scaleFactor[2], sceneLayout.zaxis)
267702
+ ];
267703
+
267704
+ var n = dataLength(errors);
267705
+ if(n === 0) return null;
267706
+
267707
+ var errorBounds = new Array(n);
267708
+
267709
+ for(var i = 0; i < n; i++) {
267710
+ var bound = [[0, 0, 0], [0, 0, 0]];
267711
+
267712
+ for(var j = 0; j < 3; j++) {
267713
+ if(errors[j]) {
267714
+ for(var k = 0; k < 2; k++) {
267715
+ bound[k][j] = errors[j][i][k];
267716
+ }
267717
+ }
267718
+ }
267719
+
267720
+ errorBounds[i] = bound;
267721
+ }
267722
+
267723
+ return errorBounds;
267724
+ }
267725
+
267726
+ module.exports = calculateErrors;
267727
+
267728
+
267729
+ /***/ }),
267730
+
267731
+ /***/ 93219:
267732
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
267733
+
267734
+
267735
+
267736
+ var createLinePlot = (__webpack_require__(46000).gl_line3d);
267737
+ var createScatterPlot = (__webpack_require__(46000).gl_scatter3d);
267738
+ var createErrorBars = (__webpack_require__(46000).gl_error3d);
267739
+ var createMesh = (__webpack_require__(46000).gl_mesh3d);
267740
+ var triangulate = (__webpack_require__(46000).delaunay_triangulate);
267741
+
267742
+ var Lib = __webpack_require__(30991);
267743
+ var str2RgbaArray = __webpack_require__(44960);
267744
+ var formatColor = (__webpack_require__(592).formatColor);
267745
+ var makeBubbleSizeFn = __webpack_require__(42581);
267746
+ var DASH_PATTERNS = __webpack_require__(68828);
267747
+ var MARKER_SYMBOLS = __webpack_require__(98993);
267748
+
267749
+ var Axes = __webpack_require__(15076);
267750
+ var appendArrayPointValue = (__webpack_require__(2918).appendArrayPointValue);
267751
+
267752
+ var calculateError = __webpack_require__(77681);
267753
+
267754
+ function LineWithMarkers(scene, uid) {
267755
+ this.scene = scene;
267756
+ this.uid = uid;
267757
+ this.linePlot = null;
267758
+ this.scatterPlot = null;
267759
+ this.errorBars = null;
267760
+ this.textMarkers = null;
267761
+ this.delaunayMesh = null;
267762
+ this.color = null;
267763
+ this.mode = '';
267764
+ this.dataPoints = [];
267765
+ this.axesBounds = [
267766
+ [-Infinity, -Infinity, -Infinity],
267767
+ [Infinity, Infinity, Infinity]
267768
+ ];
267769
+ this.textLabels = null;
267770
+ this.data = null;
267771
+ }
267772
+
267773
+ var proto = LineWithMarkers.prototype;
267774
+
267775
+ proto.handlePick = function(selection) {
267776
+ if(selection.object &&
267777
+ (selection.object === this.linePlot ||
267778
+ selection.object === this.delaunayMesh ||
267779
+ selection.object === this.textMarkers ||
267780
+ selection.object === this.scatterPlot)
267781
+ ) {
267782
+ var ind = selection.index = selection.data.index;
267783
+
267784
+ if(selection.object.highlight) {
267785
+ selection.object.highlight(null);
267786
+ }
267787
+ if(this.scatterPlot) {
267788
+ selection.object = this.scatterPlot;
267789
+ this.scatterPlot.highlight(selection.data);
267790
+ }
267791
+
267792
+ selection.textLabel = '';
267793
+ if(this.textLabels) {
267794
+ if(Lib.isArrayOrTypedArray(this.textLabels)) {
267795
+ if(this.textLabels[ind] || this.textLabels[ind] === 0) {
267796
+ selection.textLabel = this.textLabels[ind];
267797
+ }
267798
+ } else {
267799
+ selection.textLabel = this.textLabels;
267800
+ }
267801
+ }
267802
+
267803
+ selection.traceCoordinate = [
267804
+ this.data.x[ind],
267805
+ this.data.y[ind],
267806
+ this.data.z[ind]
267807
+ ];
267808
+
267809
+ return true;
267810
+ }
267811
+ };
267812
+
267813
+ function constructDelaunay(points, color, axis) {
267814
+ var u = (axis + 1) % 3;
267815
+ var v = (axis + 2) % 3;
267816
+ var filteredPoints = [];
267817
+ var filteredIds = [];
267818
+ var i;
267819
+
267820
+ for(i = 0; i < points.length; ++i) {
267821
+ var p = points[i];
267822
+ if(isNaN(p[u]) || !isFinite(p[u]) ||
267823
+ isNaN(p[v]) || !isFinite(p[v])) {
267824
+ continue;
267825
+ }
267826
+ filteredPoints.push([p[u], p[v]]);
267827
+ filteredIds.push(i);
267828
+ }
267829
+ var cells = triangulate(filteredPoints);
267830
+ for(i = 0; i < cells.length; ++i) {
267831
+ var c = cells[i];
267832
+ for(var j = 0; j < c.length; ++j) {
267833
+ c[j] = filteredIds[c[j]];
267834
+ }
267835
+ }
267836
+ return {
267837
+ positions: points,
267838
+ cells: cells,
267839
+ meshColor: color
267840
+ };
267841
+ }
267842
+
267843
+ function calculateErrorParams(errors) {
267844
+ var capSize = [0.0, 0.0, 0.0];
267845
+ var color = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];
267846
+ var lineWidth = [1.0, 1.0, 1.0];
267847
+
267848
+ for(var i = 0; i < 3; i++) {
267849
+ var e = errors[i];
267850
+
267851
+ if(e && e.copy_zstyle !== false && errors[2].visible !== false) e = errors[2];
267852
+ if(!e || !e.visible) continue;
267853
+
267854
+ capSize[i] = e.width / 2; // ballpark rescaling
267855
+ color[i] = str2RgbaArray(e.color);
267856
+ lineWidth[i] = e.thickness;
267857
+ }
267858
+
267859
+ return {capSize: capSize, color: color, lineWidth: lineWidth};
267860
+ }
267861
+
267862
+ function parseAlignmentX(a) {
267863
+ if(a === null || a === undefined) return 0;
267864
+
267865
+ return (a.indexOf('left') > -1) ? -1 :
267866
+ (a.indexOf('right') > -1) ? 1 : 0;
267867
+ }
267868
+
267869
+ function parseAlignmentY(a) {
267870
+ if(a === null || a === undefined) return 0;
267871
+
267872
+ return (a.indexOf('top') > -1) ? -1 :
267873
+ (a.indexOf('bottom') > -1) ? 1 : 0;
267874
+ }
267875
+
267876
+ function calculateTextOffset(tp) {
267877
+ // Read out text properties
267878
+
267879
+ var defaultAlignmentX = 0;
267880
+ var defaultAlignmentY = 0;
267881
+
267882
+ var textOffset = [
267883
+ defaultAlignmentX,
267884
+ defaultAlignmentY
267885
+ ];
267886
+
267887
+ if(Array.isArray(tp)) {
267888
+ for(var i = 0; i < tp.length; i++) {
267889
+ textOffset[i] = [
267890
+ defaultAlignmentX,
267891
+ defaultAlignmentY
267892
+ ];
267893
+ if(tp[i]) {
267894
+ textOffset[i][0] = parseAlignmentX(tp[i]);
267895
+ textOffset[i][1] = parseAlignmentY(tp[i]);
267896
+ }
267897
+ }
267898
+ } else {
267899
+ textOffset[0] = parseAlignmentX(tp);
267900
+ textOffset[1] = parseAlignmentY(tp);
267901
+ }
267902
+
267903
+ return textOffset;
267904
+ }
267905
+
267906
+
267907
+ function calculateSize(sizeIn, sizeFn) {
267908
+ // rough parity with Plotly 2D markers
267909
+ return sizeFn(sizeIn * 4);
267910
+ }
267911
+
267912
+ function calculateSymbol(symbolIn) {
267913
+ return MARKER_SYMBOLS[symbolIn];
267914
+ }
267915
+
267916
+ function formatParam(paramIn, len, calculate, dflt, extraFn) {
267917
+ var paramOut = null;
267918
+
267919
+ if(Lib.isArrayOrTypedArray(paramIn)) {
267920
+ paramOut = [];
267921
+
267922
+ for(var i = 0; i < len; i++) {
267923
+ if(paramIn[i] === undefined) paramOut[i] = dflt;
267924
+ else paramOut[i] = calculate(paramIn[i], extraFn);
267925
+ }
267926
+ } else paramOut = calculate(paramIn, Lib.identity);
267927
+
267928
+ return paramOut;
267929
+ }
267930
+
267931
+
267932
+ function convertPlotlyOptions(scene, data) {
267933
+ var points = [];
267934
+ var sceneLayout = scene.fullSceneLayout;
267935
+ var scaleFactor = scene.dataScale;
267936
+ var xaxis = sceneLayout.xaxis;
267937
+ var yaxis = sceneLayout.yaxis;
267938
+ var zaxis = sceneLayout.zaxis;
267939
+ var marker = data.marker;
267940
+ var line = data.line;
267941
+ var x = data.x || [];
267942
+ var y = data.y || [];
267943
+ var z = data.z || [];
267944
+ var len = x.length;
267945
+ var xcalendar = data.xcalendar;
267946
+ var ycalendar = data.ycalendar;
267947
+ var zcalendar = data.zcalendar;
267948
+ var xc, yc, zc;
267949
+ var params, i;
267950
+ var text;
267951
+
267952
+ // Convert points
267953
+ for(i = 0; i < len; i++) {
267954
+ // sanitize numbers and apply transforms based on axes.type
267955
+ xc = xaxis.d2l(x[i], 0, xcalendar) * scaleFactor[0];
267956
+ yc = yaxis.d2l(y[i], 0, ycalendar) * scaleFactor[1];
267957
+ zc = zaxis.d2l(z[i], 0, zcalendar) * scaleFactor[2];
267958
+
267959
+ points[i] = [xc, yc, zc];
267960
+ }
267961
+
267962
+ // convert text
267963
+ if(Array.isArray(data.text)) {
267964
+ text = data.text;
267965
+ } else if(Lib.isTypedArray(data.text)) {
267966
+ text = Array.from(data.text);
267967
+ } else if(data.text !== undefined) {
267968
+ text = new Array(len);
267969
+ for(i = 0; i < len; i++) text[i] = data.text;
267970
+ }
267971
+
267972
+ function formatter(axName, val) {
267973
+ var ax = sceneLayout[axName];
267974
+ return Axes.tickText(ax, ax.d2l(val), true).text;
267975
+ }
267976
+
267977
+ // check texttemplate
267978
+ var texttemplate = data.texttemplate;
267979
+ if(texttemplate) {
267980
+ var fullLayout = scene.fullLayout;
267981
+ var d3locale = fullLayout._d3locale;
267982
+ var isArray = Array.isArray(texttemplate);
267983
+ var N = isArray ? Math.min(texttemplate.length, len) : len;
267984
+ var txt = isArray ?
267985
+ function(i) { return texttemplate[i]; } :
267986
+ function() { return texttemplate; };
267987
+
267988
+ text = new Array(N);
267989
+
267990
+ for(i = 0; i < N; i++) {
267991
+ var d = {x: x[i], y: y[i], z: z[i]};
267992
+ var labels = {
267993
+ xLabel: formatter('xaxis', x[i]),
267994
+ yLabel: formatter('yaxis', y[i]),
267995
+ zLabel: formatter('zaxis', z[i])
267996
+ };
267997
+ var pointValues = {};
267998
+ appendArrayPointValue(pointValues, data, i);
267999
+ var meta = data._meta || {};
268000
+ text[i] = Lib.texttemplateString(txt(i), labels, d3locale, pointValues, d, meta);
268001
+ }
268002
+ }
268003
+
268004
+ // Build object parameters
268005
+ params = {
268006
+ position: points,
268007
+ mode: data.mode,
268008
+ text: text
268009
+ };
268010
+
268011
+ if('line' in data) {
268012
+ params.lineColor = formatColor(line, 1, len);
268013
+ params.lineWidth = line.width;
268014
+ params.lineDashes = line.dash;
268015
+ }
268016
+
268017
+ if('marker' in data) {
268018
+ var sizeFn = makeBubbleSizeFn(data);
268019
+
268020
+ params.scatterColor = formatColor(marker, 1, len);
268021
+ params.scatterSize = formatParam(marker.size, len, calculateSize, 20, sizeFn);
268022
+ params.scatterMarker = formatParam(marker.symbol, len, calculateSymbol, '●');
268023
+ params.scatterLineWidth = marker.line.width; // arrayOk === false
268024
+ params.scatterLineColor = formatColor(marker.line, 1, len);
268025
+ params.scatterAngle = 0;
268026
+ }
268027
+
268028
+ if('textposition' in data) {
268029
+ params.textOffset = calculateTextOffset(data.textposition);
268030
+ params.textColor = formatColor(data.textfont, 1, len);
268031
+ params.textSize = formatParam(data.textfont.size, len, Lib.identity, 12);
268032
+ params.textFontFamily = data.textfont.family;
268033
+ params.textFontWeight = data.textfont.weight;
268034
+ params.textFontStyle = data.textfont.style;
268035
+ params.textFontVariant = data.textfont.variant;
268036
+ params.textAngle = 0;
268037
+ }
268038
+
268039
+ var dims = ['x', 'y', 'z'];
268040
+ params.project = [false, false, false];
268041
+ params.projectScale = [1, 1, 1];
268042
+ params.projectOpacity = [1, 1, 1];
268043
+ for(i = 0; i < 3; ++i) {
268044
+ var projection = data.projection[dims[i]];
268045
+ if((params.project[i] = projection.show)) {
268046
+ params.projectOpacity[i] = projection.opacity;
268047
+ params.projectScale[i] = projection.scale;
268048
+ }
268049
+ }
268050
+
268051
+ params.errorBounds = calculateError(data, scaleFactor, sceneLayout);
268052
+
268053
+ var errorParams = calculateErrorParams([data.error_x, data.error_y, data.error_z]);
268054
+ params.errorColor = errorParams.color;
268055
+ params.errorLineWidth = errorParams.lineWidth;
268056
+ params.errorCapSize = errorParams.capSize;
268057
+
268058
+ params.delaunayAxis = data.surfaceaxis;
268059
+ params.delaunayColor = str2RgbaArray(data.surfacecolor);
268060
+
268061
+ return params;
268062
+ }
268063
+
268064
+ function _arrayToColor(color) {
268065
+ if(Lib.isArrayOrTypedArray(color)) {
268066
+ var c = color[0];
268067
+
268068
+ if(Lib.isArrayOrTypedArray(c)) color = c;
268069
+
268070
+ return 'rgb(' + color.slice(0, 3).map(function(x) {
268071
+ return Math.round(x * 255);
268072
+ }) + ')';
268073
+ }
268074
+
268075
+ return null;
268076
+ }
268077
+
268078
+ function arrayToColor(colors) {
268079
+ if(!Lib.isArrayOrTypedArray(colors)) {
268080
+ return null;
268081
+ }
268082
+
268083
+ if((colors.length === 4) && (typeof colors[0] === 'number')) {
268084
+ return _arrayToColor(colors);
268085
+ }
268086
+
268087
+ return colors.map(_arrayToColor);
268088
+ }
268089
+
268090
+ proto.update = function(data) {
268091
+ var gl = this.scene.glplot.gl;
268092
+ var lineOptions;
268093
+ var scatterOptions;
268094
+ var errorOptions;
268095
+ var textOptions;
268096
+ var dashPattern = DASH_PATTERNS.solid;
268097
+
268098
+ // Save data
268099
+ this.data = data;
268100
+
268101
+ // Run data conversion
268102
+ var options = convertPlotlyOptions(this.scene, data);
268103
+
268104
+ if('mode' in options) {
268105
+ this.mode = options.mode;
268106
+ }
268107
+ if('lineDashes' in options) {
268108
+ if(options.lineDashes in DASH_PATTERNS) {
268109
+ dashPattern = DASH_PATTERNS[options.lineDashes];
268110
+ }
268111
+ }
268112
+
268113
+ this.color = arrayToColor(options.scatterColor) ||
268114
+ arrayToColor(options.lineColor);
268115
+
268116
+ // Save data points
268117
+ this.dataPoints = options.position;
268118
+
268119
+ lineOptions = {
268120
+ gl: this.scene.glplot.gl,
268121
+ position: options.position,
268122
+ color: options.lineColor,
268123
+ lineWidth: options.lineWidth || 1,
268124
+ dashes: dashPattern[0],
268125
+ dashScale: dashPattern[1],
268126
+ opacity: data.opacity,
268127
+ connectGaps: data.connectgaps
268128
+ };
268129
+
268130
+ if(this.mode.indexOf('lines') !== -1) {
268131
+ if(this.linePlot) this.linePlot.update(lineOptions);
268132
+ else {
268133
+ this.linePlot = createLinePlot(lineOptions);
268134
+ this.linePlot._trace = this;
268135
+ this.scene.glplot.add(this.linePlot);
268136
+ }
268137
+ } else if(this.linePlot) {
268138
+ this.scene.glplot.remove(this.linePlot);
268139
+ this.linePlot.dispose();
268140
+ this.linePlot = null;
268141
+ }
268142
+
268143
+ // N.B. marker.opacity must be a scalar for performance
268144
+ var scatterOpacity = data.opacity;
268145
+ if(data.marker && data.marker.opacity !== undefined) scatterOpacity *= data.marker.opacity;
268146
+
268147
+ scatterOptions = {
268148
+ gl: this.scene.glplot.gl,
268149
+ position: options.position,
268150
+ color: options.scatterColor,
268151
+ size: options.scatterSize,
268152
+ glyph: options.scatterMarker,
268153
+ opacity: scatterOpacity,
268154
+ orthographic: true,
268155
+ lineWidth: options.scatterLineWidth,
268156
+ lineColor: options.scatterLineColor,
268157
+ project: options.project,
268158
+ projectScale: options.projectScale,
268159
+ projectOpacity: options.projectOpacity
268160
+ };
268161
+
268162
+ if(this.mode.indexOf('markers') !== -1) {
268163
+ if(this.scatterPlot) this.scatterPlot.update(scatterOptions);
268164
+ else {
268165
+ this.scatterPlot = createScatterPlot(scatterOptions);
268166
+ this.scatterPlot._trace = this;
268167
+ this.scatterPlot.highlightScale = 1;
268168
+ this.scene.glplot.add(this.scatterPlot);
268169
+ }
268170
+ } else if(this.scatterPlot) {
268171
+ this.scene.glplot.remove(this.scatterPlot);
268172
+ this.scatterPlot.dispose();
268173
+ this.scatterPlot = null;
268174
+ }
268175
+
268176
+ textOptions = {
268177
+ gl: this.scene.glplot.gl,
268178
+ position: options.position,
268179
+ glyph: options.text,
268180
+ color: options.textColor,
268181
+ size: options.textSize,
268182
+ angle: options.textAngle,
268183
+ alignment: options.textOffset,
268184
+ font: options.textFontFamily,
268185
+ fontWeight: options.textFontWeight,
268186
+ fontStyle: options.textFontStyle,
268187
+ fontVariant: options.textFontVariant,
268188
+ orthographic: true,
268189
+ lineWidth: 0,
268190
+ project: false,
268191
+ opacity: data.opacity
268192
+ };
268193
+
268194
+ this.textLabels = data.hovertext || data.text;
268195
+
268196
+ if(this.mode.indexOf('text') !== -1) {
268197
+ if(this.textMarkers) this.textMarkers.update(textOptions);
268198
+ else {
268199
+ this.textMarkers = createScatterPlot(textOptions);
268200
+ this.textMarkers._trace = this;
268201
+ this.textMarkers.highlightScale = 1;
268202
+ this.scene.glplot.add(this.textMarkers);
268203
+ }
268204
+ } else if(this.textMarkers) {
268205
+ this.scene.glplot.remove(this.textMarkers);
268206
+ this.textMarkers.dispose();
268207
+ this.textMarkers = null;
268208
+ }
268209
+
268210
+ errorOptions = {
268211
+ gl: this.scene.glplot.gl,
268212
+ position: options.position,
268213
+ color: options.errorColor,
268214
+ error: options.errorBounds,
268215
+ lineWidth: options.errorLineWidth,
268216
+ capSize: options.errorCapSize,
268217
+ opacity: data.opacity
268218
+ };
268219
+ if(this.errorBars) {
268220
+ if(options.errorBounds) {
268221
+ this.errorBars.update(errorOptions);
268222
+ } else {
268223
+ this.scene.glplot.remove(this.errorBars);
268224
+ this.errorBars.dispose();
268225
+ this.errorBars = null;
268226
+ }
268227
+ } else if(options.errorBounds) {
268228
+ this.errorBars = createErrorBars(errorOptions);
268229
+ this.errorBars._trace = this;
268230
+ this.scene.glplot.add(this.errorBars);
268231
+ }
268232
+
268233
+ if(options.delaunayAxis >= 0) {
268234
+ var delaunayOptions = constructDelaunay(
268235
+ options.position,
268236
+ options.delaunayColor,
268237
+ options.delaunayAxis
268238
+ );
268239
+ delaunayOptions.opacity = data.opacity;
268240
+
268241
+ if(this.delaunayMesh) {
268242
+ this.delaunayMesh.update(delaunayOptions);
268243
+ } else {
268244
+ delaunayOptions.gl = gl;
268245
+ this.delaunayMesh = createMesh(delaunayOptions);
268246
+ this.delaunayMesh._trace = this;
268247
+ this.scene.glplot.add(this.delaunayMesh);
268248
+ }
268249
+ } else if(this.delaunayMesh) {
268250
+ this.scene.glplot.remove(this.delaunayMesh);
268251
+ this.delaunayMesh.dispose();
268252
+ this.delaunayMesh = null;
268253
+ }
268254
+ };
268255
+
268256
+ proto.dispose = function() {
268257
+ if(this.linePlot) {
268258
+ this.scene.glplot.remove(this.linePlot);
268259
+ this.linePlot.dispose();
268260
+ }
268261
+ if(this.scatterPlot) {
268262
+ this.scene.glplot.remove(this.scatterPlot);
268263
+ this.scatterPlot.dispose();
268264
+ }
268265
+ if(this.errorBars) {
268266
+ this.scene.glplot.remove(this.errorBars);
268267
+ this.errorBars.dispose();
268268
+ }
268269
+ if(this.textMarkers) {
268270
+ this.scene.glplot.remove(this.textMarkers);
268271
+ this.textMarkers.dispose();
268272
+ }
268273
+ if(this.delaunayMesh) {
268274
+ this.scene.glplot.remove(this.delaunayMesh);
268275
+ this.delaunayMesh.dispose();
268276
+ }
268277
+ };
268278
+
268279
+ function createLineWithMarkers(scene, data) {
268280
+ var plot = new LineWithMarkers(scene, data.uid);
268281
+ plot.update(data);
268282
+ return plot;
268283
+ }
268284
+
268285
+ module.exports = createLineWithMarkers;
268286
+
268287
+
268288
+ /***/ }),
268289
+
268290
+ /***/ 13744:
268291
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
268292
+
268293
+
268294
+
268295
+ var Registry = __webpack_require__(13936);
268296
+ var Lib = __webpack_require__(30991);
268297
+
268298
+ var subTypes = __webpack_require__(33068);
268299
+ var handleMarkerDefaults = __webpack_require__(15294);
268300
+ var handleLineDefaults = __webpack_require__(82094);
268301
+ var handleTextDefaults = __webpack_require__(94729);
268302
+
268303
+ var attributes = __webpack_require__(1015);
268304
+
268305
+ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
268306
+ function coerce(attr, dflt) {
268307
+ return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
268308
+ }
268309
+
268310
+ var len = handleXYZDefaults(traceIn, traceOut, coerce, layout);
268311
+ if(!len) {
268312
+ traceOut.visible = false;
268313
+ return;
268314
+ }
268315
+
268316
+ coerce('text');
268317
+ coerce('hovertext');
268318
+ coerce('hovertemplate');
268319
+ coerce('xhoverformat');
268320
+ coerce('yhoverformat');
268321
+ coerce('zhoverformat');
268322
+
268323
+ coerce('mode');
268324
+
268325
+ if(subTypes.hasMarkers(traceOut)) {
268326
+ handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noSelect: true, noAngle: true});
268327
+ }
268328
+
268329
+ if(subTypes.hasLines(traceOut)) {
268330
+ coerce('connectgaps');
268331
+ handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);
268332
+ }
268333
+
268334
+ if(subTypes.hasText(traceOut)) {
268335
+ coerce('texttemplate');
268336
+ handleTextDefaults(traceIn, traceOut, layout, coerce, {
268337
+ noSelect: true,
268338
+ noFontShadow: true,
268339
+ noFontLineposition: true,
268340
+ noFontTextcase: true,
268341
+ });
268342
+ }
268343
+
268344
+ var lineColor = (traceOut.line || {}).color;
268345
+ var markerColor = (traceOut.marker || {}).color;
268346
+ if(coerce('surfaceaxis') >= 0) coerce('surfacecolor', lineColor || markerColor);
268347
+
268348
+ var dims = ['x', 'y', 'z'];
268349
+ for(var i = 0; i < 3; ++i) {
268350
+ var projection = 'projection.' + dims[i];
268351
+ if(coerce(projection + '.show')) {
268352
+ coerce(projection + '.opacity');
268353
+ coerce(projection + '.scale');
268354
+ }
268355
+ }
268356
+
268357
+ var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');
268358
+ errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'z'});
268359
+ errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'y', inherit: 'z'});
268360
+ errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'x', inherit: 'z'});
268361
+ };
268362
+
268363
+ function handleXYZDefaults(traceIn, traceOut, coerce, layout) {
268364
+ var len = 0;
268365
+ var x = coerce('x');
268366
+ var y = coerce('y');
268367
+ var z = coerce('z');
268368
+
268369
+ var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
268370
+ handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);
268371
+
268372
+ if(x && y && z) {
268373
+ // TODO: what happens if one is missing?
268374
+ len = Math.min(x.length, y.length, z.length);
268375
+ traceOut._length = traceOut._xlength = traceOut._ylength = traceOut._zlength = len;
268376
+ }
268377
+
268378
+ return len;
268379
+ }
268380
+
268381
+
268382
+ /***/ }),
268383
+
268384
+ /***/ 68860:
268385
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
268386
+
268387
+
268388
+
268389
+ module.exports = {
268390
+ plot: __webpack_require__(93219),
268391
+ attributes: __webpack_require__(1015),
268392
+ markerSymbols: __webpack_require__(98993),
268393
+ supplyDefaults: __webpack_require__(13744),
268394
+ colorbar: [
268395
+ {
268396
+ container: 'marker',
268397
+ min: 'cmin',
268398
+ max: 'cmax'
268399
+ }, {
268400
+ container: 'line',
268401
+ min: 'cmin',
268402
+ max: 'cmax'
268403
+ }
268404
+ ],
268405
+ calc: __webpack_require__(30935),
268406
+
268407
+ moduleType: 'trace',
268408
+ name: 'scatter3d',
268409
+ basePlotModule: __webpack_require__(68137),
268410
+ categories: ['gl3d', 'symbols', 'showLegend', 'scatter-like'],
268411
+ meta: {
268412
+ hrName: 'scatter_3d',
268413
+ description: [
268414
+ 'The data visualized as scatter point or lines in 3D dimension',
268415
+ 'is set in `x`, `y`, `z`.',
268416
+ 'Text (appearing either on the chart or on hover only) is via `text`.',
268417
+ 'Bubble charts are achieved by setting `marker.size` and/or `marker.color`',
268418
+ 'Projections are achieved via `projection`.',
268419
+ 'Surface fills are achieved via `surfaceaxis`.'
268420
+ ].join(' ')
268421
+ }
268422
+ };
268423
+
268424
+
267430
268425
  /***/ }),
267431
268426
 
267432
268427
  /***/ 47213:
@@ -271357,993 +272352,6 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) {
271357
272352
  };
271358
272353
 
271359
272354
 
271360
- /***/ }),
271361
-
271362
- /***/ 1015:
271363
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
271364
-
271365
-
271366
-
271367
- var scatterAttrs = __webpack_require__(86854);
271368
- var fontAttrs = __webpack_require__(70827);
271369
- var colorAttributes = __webpack_require__(17957);
271370
- var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
271371
- var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
271372
- var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
271373
- var baseAttrs = __webpack_require__(35667);
271374
- var DASHES = __webpack_require__(68828);
271375
-
271376
- var MARKER_SYMBOLS = __webpack_require__(98993);
271377
- var extendFlat = (__webpack_require__(91307).extendFlat);
271378
- var overrideAll = (__webpack_require__(70756).overrideAll);
271379
- var sortObjectKeys = __webpack_require__(99124);
271380
-
271381
- var scatterLineAttrs = scatterAttrs.line;
271382
- var scatterMarkerAttrs = scatterAttrs.marker;
271383
- var scatterMarkerLineAttrs = scatterMarkerAttrs.line;
271384
-
271385
- var lineAttrs = extendFlat({
271386
- width: scatterLineAttrs.width,
271387
- dash: {
271388
- valType: 'enumerated',
271389
- values: sortObjectKeys(DASHES),
271390
- dflt: 'solid',
271391
- description: 'Sets the dash style of the lines.'
271392
- }
271393
- }, colorAttributes('line'));
271394
-
271395
- function makeProjectionAttr(axLetter) {
271396
- return {
271397
- show: {
271398
- valType: 'boolean',
271399
- dflt: false,
271400
- description: [
271401
- 'Sets whether or not projections are shown along the',
271402
- axLetter, 'axis.'
271403
- ].join(' ')
271404
- },
271405
- opacity: {
271406
- valType: 'number',
271407
- min: 0,
271408
- max: 1,
271409
- dflt: 1,
271410
- description: 'Sets the projection color.'
271411
- },
271412
- scale: {
271413
- valType: 'number',
271414
- min: 0,
271415
- max: 10,
271416
- dflt: 2 / 3,
271417
- description: [
271418
- 'Sets the scale factor determining the size of the',
271419
- 'projection marker points.'
271420
- ].join(' ')
271421
- }
271422
- };
271423
- }
271424
-
271425
- var attrs = module.exports = overrideAll({
271426
- x: scatterAttrs.x,
271427
- y: scatterAttrs.y,
271428
- z: {
271429
- valType: 'data_array',
271430
- description: 'Sets the z coordinates.'
271431
- },
271432
-
271433
- text: extendFlat({}, scatterAttrs.text, {
271434
- description: [
271435
- 'Sets text elements associated with each (x,y,z) triplet.',
271436
- 'If a single string, the same string appears over',
271437
- 'all the data points.',
271438
- 'If an array of string, the items are mapped in order to the',
271439
- 'this trace\'s (x,y,z) coordinates.',
271440
- 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,',
271441
- 'these elements will be seen in the hover labels.'
271442
- ].join(' ')
271443
- }),
271444
- texttemplate: texttemplateAttrs({}, {
271445
-
271446
- }),
271447
- hovertext: extendFlat({}, scatterAttrs.hovertext, {
271448
- description: [
271449
- 'Sets text elements associated with each (x,y,z) triplet.',
271450
- 'If a single string, the same string appears over',
271451
- 'all the data points.',
271452
- 'If an array of string, the items are mapped in order to the',
271453
- 'this trace\'s (x,y,z) coordinates.',
271454
- 'To be seen, trace `hoverinfo` must contain a *text* flag.'
271455
- ].join(' ')
271456
- }),
271457
- hovertemplate: hovertemplateAttrs(),
271458
-
271459
- xhoverformat: axisHoverFormat('x'),
271460
- yhoverformat: axisHoverFormat('y'),
271461
- zhoverformat: axisHoverFormat('z'),
271462
-
271463
- mode: extendFlat({}, scatterAttrs.mode, // shouldn't this be on-par with 2D?
271464
- {dflt: 'lines+markers'}),
271465
- surfaceaxis: {
271466
- valType: 'enumerated',
271467
- values: [-1, 0, 1, 2],
271468
- dflt: -1,
271469
- description: [
271470
- 'If *-1*, the scatter points are not fill with a surface',
271471
- 'If *0*, *1*, *2*, the scatter points are filled with',
271472
- 'a Delaunay surface about the x, y, z respectively.'
271473
- ].join(' ')
271474
- },
271475
- surfacecolor: {
271476
- valType: 'color',
271477
- description: 'Sets the surface fill color.'
271478
- },
271479
- projection: {
271480
- x: makeProjectionAttr('x'),
271481
- y: makeProjectionAttr('y'),
271482
- z: makeProjectionAttr('z')
271483
- },
271484
-
271485
- connectgaps: scatterAttrs.connectgaps,
271486
- line: lineAttrs,
271487
-
271488
- marker: extendFlat({ // Parity with scatter.js?
271489
- symbol: {
271490
- valType: 'enumerated',
271491
- values: sortObjectKeys(MARKER_SYMBOLS),
271492
- dflt: 'circle',
271493
- arrayOk: true,
271494
- description: 'Sets the marker symbol type.'
271495
- },
271496
- size: extendFlat({}, scatterMarkerAttrs.size, {dflt: 8}),
271497
- sizeref: scatterMarkerAttrs.sizeref,
271498
- sizemin: scatterMarkerAttrs.sizemin,
271499
- sizemode: scatterMarkerAttrs.sizemode,
271500
- opacity: extendFlat({}, scatterMarkerAttrs.opacity, {
271501
- arrayOk: false,
271502
- description: [
271503
- 'Sets the marker opacity.',
271504
- 'Note that the marker opacity for scatter3d traces',
271505
- 'must be a scalar value for performance reasons.',
271506
- 'To set a blending opacity value',
271507
- '(i.e. which is not transparent), set *marker.color*',
271508
- 'to an rgba color and use its alpha channel.'
271509
- ].join(' ')
271510
- }),
271511
- colorbar: scatterMarkerAttrs.colorbar,
271512
-
271513
- line: extendFlat({
271514
- width: extendFlat({}, scatterMarkerLineAttrs.width, {arrayOk: false})
271515
- },
271516
- colorAttributes('marker.line')
271517
- )
271518
- },
271519
- colorAttributes('marker')
271520
- ),
271521
-
271522
- textposition: extendFlat({}, scatterAttrs.textposition, {dflt: 'top center'}),
271523
- textfont: fontAttrs({
271524
- noFontShadow: true,
271525
- noFontLineposition: true,
271526
- noFontTextcase: true,
271527
- editType: 'calc',
271528
- colorEditType: 'style',
271529
- arrayOk: true,
271530
- variantValues: ['normal', 'small-caps'],
271531
- description: 'Sets the text font.'
271532
- }),
271533
-
271534
- opacity: baseAttrs.opacity,
271535
-
271536
- hoverinfo: extendFlat({}, baseAttrs.hoverinfo)
271537
- }, 'calc', 'nested');
271538
-
271539
- attrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';
271540
-
271541
-
271542
- /***/ }),
271543
-
271544
- /***/ 30935:
271545
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
271546
-
271547
-
271548
-
271549
- var arraysToCalcdata = __webpack_require__(47213);
271550
- var calcColorscale = __webpack_require__(59498);
271551
-
271552
- /**
271553
- * This is a kludge to put the array attributes into
271554
- * calcdata the way Scatter.plot does, so that legends and
271555
- * popovers know what to do with them.
271556
- */
271557
- module.exports = function calc(gd, trace) {
271558
- var cd = [{x: false, y: false, trace: trace, t: {}}];
271559
-
271560
- arraysToCalcdata(cd, trace);
271561
- calcColorscale(gd, trace);
271562
-
271563
- return cd;
271564
- };
271565
-
271566
-
271567
- /***/ }),
271568
-
271569
- /***/ 77681:
271570
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
271571
-
271572
-
271573
-
271574
- var Registry = __webpack_require__(13936);
271575
-
271576
- function calculateAxisErrors(data, params, scaleFactor, axis) {
271577
- if(!params || !params.visible) return null;
271578
-
271579
- var computeError = Registry.getComponentMethod('errorbars', 'makeComputeError')(params);
271580
- var result = new Array(data.length);
271581
-
271582
- for(var i = 0; i < data.length; i++) {
271583
- var errors = computeError(+data[i], i);
271584
-
271585
- if(axis.type === 'log') {
271586
- var point = axis.c2l(data[i]);
271587
- var min = data[i] - errors[0];
271588
- var max = data[i] + errors[1];
271589
-
271590
- result[i] = [
271591
- (axis.c2l(min, true) - point) * scaleFactor,
271592
- (axis.c2l(max, true) - point) * scaleFactor
271593
- ];
271594
-
271595
- // Keep track of the lower error bound which isn't negative!
271596
- if(min > 0) {
271597
- var lower = axis.c2l(min);
271598
- if(!axis._lowerLogErrorBound) axis._lowerLogErrorBound = lower;
271599
- axis._lowerErrorBound = Math.min(axis._lowerLogErrorBound, lower);
271600
- }
271601
- } else {
271602
- result[i] = [
271603
- -errors[0] * scaleFactor,
271604
- errors[1] * scaleFactor
271605
- ];
271606
- }
271607
- }
271608
-
271609
- return result;
271610
- }
271611
-
271612
- function dataLength(array) {
271613
- for(var i = 0; i < array.length; i++) {
271614
- if(array[i]) return array[i].length;
271615
- }
271616
- return 0;
271617
- }
271618
-
271619
- function calculateErrors(data, scaleFactor, sceneLayout) {
271620
- var errors = [
271621
- calculateAxisErrors(data.x, data.error_x, scaleFactor[0], sceneLayout.xaxis),
271622
- calculateAxisErrors(data.y, data.error_y, scaleFactor[1], sceneLayout.yaxis),
271623
- calculateAxisErrors(data.z, data.error_z, scaleFactor[2], sceneLayout.zaxis)
271624
- ];
271625
-
271626
- var n = dataLength(errors);
271627
- if(n === 0) return null;
271628
-
271629
- var errorBounds = new Array(n);
271630
-
271631
- for(var i = 0; i < n; i++) {
271632
- var bound = [[0, 0, 0], [0, 0, 0]];
271633
-
271634
- for(var j = 0; j < 3; j++) {
271635
- if(errors[j]) {
271636
- for(var k = 0; k < 2; k++) {
271637
- bound[k][j] = errors[j][i][k];
271638
- }
271639
- }
271640
- }
271641
-
271642
- errorBounds[i] = bound;
271643
- }
271644
-
271645
- return errorBounds;
271646
- }
271647
-
271648
- module.exports = calculateErrors;
271649
-
271650
-
271651
- /***/ }),
271652
-
271653
- /***/ 93219:
271654
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
271655
-
271656
-
271657
-
271658
- var createLinePlot = (__webpack_require__(46000).gl_line3d);
271659
- var createScatterPlot = (__webpack_require__(46000).gl_scatter3d);
271660
- var createErrorBars = (__webpack_require__(46000).gl_error3d);
271661
- var createMesh = (__webpack_require__(46000).gl_mesh3d);
271662
- var triangulate = (__webpack_require__(46000).delaunay_triangulate);
271663
-
271664
- var Lib = __webpack_require__(30991);
271665
- var str2RgbaArray = __webpack_require__(44960);
271666
- var formatColor = (__webpack_require__(592).formatColor);
271667
- var makeBubbleSizeFn = __webpack_require__(42581);
271668
- var DASH_PATTERNS = __webpack_require__(68828);
271669
- var MARKER_SYMBOLS = __webpack_require__(98993);
271670
-
271671
- var Axes = __webpack_require__(15076);
271672
- var appendArrayPointValue = (__webpack_require__(2918).appendArrayPointValue);
271673
-
271674
- var calculateError = __webpack_require__(77681);
271675
-
271676
- function LineWithMarkers(scene, uid) {
271677
- this.scene = scene;
271678
- this.uid = uid;
271679
- this.linePlot = null;
271680
- this.scatterPlot = null;
271681
- this.errorBars = null;
271682
- this.textMarkers = null;
271683
- this.delaunayMesh = null;
271684
- this.color = null;
271685
- this.mode = '';
271686
- this.dataPoints = [];
271687
- this.axesBounds = [
271688
- [-Infinity, -Infinity, -Infinity],
271689
- [Infinity, Infinity, Infinity]
271690
- ];
271691
- this.textLabels = null;
271692
- this.data = null;
271693
- }
271694
-
271695
- var proto = LineWithMarkers.prototype;
271696
-
271697
- proto.handlePick = function(selection) {
271698
- if(selection.object &&
271699
- (selection.object === this.linePlot ||
271700
- selection.object === this.delaunayMesh ||
271701
- selection.object === this.textMarkers ||
271702
- selection.object === this.scatterPlot)
271703
- ) {
271704
- var ind = selection.index = selection.data.index;
271705
-
271706
- if(selection.object.highlight) {
271707
- selection.object.highlight(null);
271708
- }
271709
- if(this.scatterPlot) {
271710
- selection.object = this.scatterPlot;
271711
- this.scatterPlot.highlight(selection.data);
271712
- }
271713
-
271714
- selection.textLabel = '';
271715
- if(this.textLabels) {
271716
- if(Lib.isArrayOrTypedArray(this.textLabels)) {
271717
- if(this.textLabels[ind] || this.textLabels[ind] === 0) {
271718
- selection.textLabel = this.textLabels[ind];
271719
- }
271720
- } else {
271721
- selection.textLabel = this.textLabels;
271722
- }
271723
- }
271724
-
271725
- selection.traceCoordinate = [
271726
- this.data.x[ind],
271727
- this.data.y[ind],
271728
- this.data.z[ind]
271729
- ];
271730
-
271731
- return true;
271732
- }
271733
- };
271734
-
271735
- function constructDelaunay(points, color, axis) {
271736
- var u = (axis + 1) % 3;
271737
- var v = (axis + 2) % 3;
271738
- var filteredPoints = [];
271739
- var filteredIds = [];
271740
- var i;
271741
-
271742
- for(i = 0; i < points.length; ++i) {
271743
- var p = points[i];
271744
- if(isNaN(p[u]) || !isFinite(p[u]) ||
271745
- isNaN(p[v]) || !isFinite(p[v])) {
271746
- continue;
271747
- }
271748
- filteredPoints.push([p[u], p[v]]);
271749
- filteredIds.push(i);
271750
- }
271751
- var cells = triangulate(filteredPoints);
271752
- for(i = 0; i < cells.length; ++i) {
271753
- var c = cells[i];
271754
- for(var j = 0; j < c.length; ++j) {
271755
- c[j] = filteredIds[c[j]];
271756
- }
271757
- }
271758
- return {
271759
- positions: points,
271760
- cells: cells,
271761
- meshColor: color
271762
- };
271763
- }
271764
-
271765
- function calculateErrorParams(errors) {
271766
- var capSize = [0.0, 0.0, 0.0];
271767
- var color = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];
271768
- var lineWidth = [1.0, 1.0, 1.0];
271769
-
271770
- for(var i = 0; i < 3; i++) {
271771
- var e = errors[i];
271772
-
271773
- if(e && e.copy_zstyle !== false && errors[2].visible !== false) e = errors[2];
271774
- if(!e || !e.visible) continue;
271775
-
271776
- capSize[i] = e.width / 2; // ballpark rescaling
271777
- color[i] = str2RgbaArray(e.color);
271778
- lineWidth[i] = e.thickness;
271779
- }
271780
-
271781
- return {capSize: capSize, color: color, lineWidth: lineWidth};
271782
- }
271783
-
271784
- function parseAlignmentX(a) {
271785
- if(a === null || a === undefined) return 0;
271786
-
271787
- return (a.indexOf('left') > -1) ? -1 :
271788
- (a.indexOf('right') > -1) ? 1 : 0;
271789
- }
271790
-
271791
- function parseAlignmentY(a) {
271792
- if(a === null || a === undefined) return 0;
271793
-
271794
- return (a.indexOf('top') > -1) ? -1 :
271795
- (a.indexOf('bottom') > -1) ? 1 : 0;
271796
- }
271797
-
271798
- function calculateTextOffset(tp) {
271799
- // Read out text properties
271800
-
271801
- var defaultAlignmentX = 0;
271802
- var defaultAlignmentY = 0;
271803
-
271804
- var textOffset = [
271805
- defaultAlignmentX,
271806
- defaultAlignmentY
271807
- ];
271808
-
271809
- if(Array.isArray(tp)) {
271810
- for(var i = 0; i < tp.length; i++) {
271811
- textOffset[i] = [
271812
- defaultAlignmentX,
271813
- defaultAlignmentY
271814
- ];
271815
- if(tp[i]) {
271816
- textOffset[i][0] = parseAlignmentX(tp[i]);
271817
- textOffset[i][1] = parseAlignmentY(tp[i]);
271818
- }
271819
- }
271820
- } else {
271821
- textOffset[0] = parseAlignmentX(tp);
271822
- textOffset[1] = parseAlignmentY(tp);
271823
- }
271824
-
271825
- return textOffset;
271826
- }
271827
-
271828
-
271829
- function calculateSize(sizeIn, sizeFn) {
271830
- // rough parity with Plotly 2D markers
271831
- return sizeFn(sizeIn * 4);
271832
- }
271833
-
271834
- function calculateSymbol(symbolIn) {
271835
- return MARKER_SYMBOLS[symbolIn];
271836
- }
271837
-
271838
- function formatParam(paramIn, len, calculate, dflt, extraFn) {
271839
- var paramOut = null;
271840
-
271841
- if(Lib.isArrayOrTypedArray(paramIn)) {
271842
- paramOut = [];
271843
-
271844
- for(var i = 0; i < len; i++) {
271845
- if(paramIn[i] === undefined) paramOut[i] = dflt;
271846
- else paramOut[i] = calculate(paramIn[i], extraFn);
271847
- }
271848
- } else paramOut = calculate(paramIn, Lib.identity);
271849
-
271850
- return paramOut;
271851
- }
271852
-
271853
-
271854
- function convertPlotlyOptions(scene, data) {
271855
- var points = [];
271856
- var sceneLayout = scene.fullSceneLayout;
271857
- var scaleFactor = scene.dataScale;
271858
- var xaxis = sceneLayout.xaxis;
271859
- var yaxis = sceneLayout.yaxis;
271860
- var zaxis = sceneLayout.zaxis;
271861
- var marker = data.marker;
271862
- var line = data.line;
271863
- var x = data.x || [];
271864
- var y = data.y || [];
271865
- var z = data.z || [];
271866
- var len = x.length;
271867
- var xcalendar = data.xcalendar;
271868
- var ycalendar = data.ycalendar;
271869
- var zcalendar = data.zcalendar;
271870
- var xc, yc, zc;
271871
- var params, i;
271872
- var text;
271873
-
271874
- // Convert points
271875
- for(i = 0; i < len; i++) {
271876
- // sanitize numbers and apply transforms based on axes.type
271877
- xc = xaxis.d2l(x[i], 0, xcalendar) * scaleFactor[0];
271878
- yc = yaxis.d2l(y[i], 0, ycalendar) * scaleFactor[1];
271879
- zc = zaxis.d2l(z[i], 0, zcalendar) * scaleFactor[2];
271880
-
271881
- points[i] = [xc, yc, zc];
271882
- }
271883
-
271884
- // convert text
271885
- if(Array.isArray(data.text)) {
271886
- text = data.text;
271887
- } else if(Lib.isTypedArray(data.text)) {
271888
- text = Array.from(data.text);
271889
- } else if(data.text !== undefined) {
271890
- text = new Array(len);
271891
- for(i = 0; i < len; i++) text[i] = data.text;
271892
- }
271893
-
271894
- function formatter(axName, val) {
271895
- var ax = sceneLayout[axName];
271896
- return Axes.tickText(ax, ax.d2l(val), true).text;
271897
- }
271898
-
271899
- // check texttemplate
271900
- var texttemplate = data.texttemplate;
271901
- if(texttemplate) {
271902
- var fullLayout = scene.fullLayout;
271903
- var d3locale = fullLayout._d3locale;
271904
- var isArray = Array.isArray(texttemplate);
271905
- var N = isArray ? Math.min(texttemplate.length, len) : len;
271906
- var txt = isArray ?
271907
- function(i) { return texttemplate[i]; } :
271908
- function() { return texttemplate; };
271909
-
271910
- text = new Array(N);
271911
-
271912
- for(i = 0; i < N; i++) {
271913
- var d = {x: x[i], y: y[i], z: z[i]};
271914
- var labels = {
271915
- xLabel: formatter('xaxis', x[i]),
271916
- yLabel: formatter('yaxis', y[i]),
271917
- zLabel: formatter('zaxis', z[i])
271918
- };
271919
- var pointValues = {};
271920
- appendArrayPointValue(pointValues, data, i);
271921
- var meta = data._meta || {};
271922
- text[i] = Lib.texttemplateString(txt(i), labels, d3locale, pointValues, d, meta);
271923
- }
271924
- }
271925
-
271926
- // Build object parameters
271927
- params = {
271928
- position: points,
271929
- mode: data.mode,
271930
- text: text
271931
- };
271932
-
271933
- if('line' in data) {
271934
- params.lineColor = formatColor(line, 1, len);
271935
- params.lineWidth = line.width;
271936
- params.lineDashes = line.dash;
271937
- }
271938
-
271939
- if('marker' in data) {
271940
- var sizeFn = makeBubbleSizeFn(data);
271941
-
271942
- params.scatterColor = formatColor(marker, 1, len);
271943
- params.scatterSize = formatParam(marker.size, len, calculateSize, 20, sizeFn);
271944
- params.scatterMarker = formatParam(marker.symbol, len, calculateSymbol, '●');
271945
- params.scatterLineWidth = marker.line.width; // arrayOk === false
271946
- params.scatterLineColor = formatColor(marker.line, 1, len);
271947
- params.scatterAngle = 0;
271948
- }
271949
-
271950
- if('textposition' in data) {
271951
- params.textOffset = calculateTextOffset(data.textposition);
271952
- params.textColor = formatColor(data.textfont, 1, len);
271953
- params.textSize = formatParam(data.textfont.size, len, Lib.identity, 12);
271954
- params.textFontFamily = data.textfont.family;
271955
- params.textFontWeight = data.textfont.weight;
271956
- params.textFontStyle = data.textfont.style;
271957
- params.textFontVariant = data.textfont.variant;
271958
- params.textAngle = 0;
271959
- }
271960
-
271961
- var dims = ['x', 'y', 'z'];
271962
- params.project = [false, false, false];
271963
- params.projectScale = [1, 1, 1];
271964
- params.projectOpacity = [1, 1, 1];
271965
- for(i = 0; i < 3; ++i) {
271966
- var projection = data.projection[dims[i]];
271967
- if((params.project[i] = projection.show)) {
271968
- params.projectOpacity[i] = projection.opacity;
271969
- params.projectScale[i] = projection.scale;
271970
- }
271971
- }
271972
-
271973
- params.errorBounds = calculateError(data, scaleFactor, sceneLayout);
271974
-
271975
- var errorParams = calculateErrorParams([data.error_x, data.error_y, data.error_z]);
271976
- params.errorColor = errorParams.color;
271977
- params.errorLineWidth = errorParams.lineWidth;
271978
- params.errorCapSize = errorParams.capSize;
271979
-
271980
- params.delaunayAxis = data.surfaceaxis;
271981
- params.delaunayColor = str2RgbaArray(data.surfacecolor);
271982
-
271983
- return params;
271984
- }
271985
-
271986
- function _arrayToColor(color) {
271987
- if(Lib.isArrayOrTypedArray(color)) {
271988
- var c = color[0];
271989
-
271990
- if(Lib.isArrayOrTypedArray(c)) color = c;
271991
-
271992
- return 'rgb(' + color.slice(0, 3).map(function(x) {
271993
- return Math.round(x * 255);
271994
- }) + ')';
271995
- }
271996
-
271997
- return null;
271998
- }
271999
-
272000
- function arrayToColor(colors) {
272001
- if(!Lib.isArrayOrTypedArray(colors)) {
272002
- return null;
272003
- }
272004
-
272005
- if((colors.length === 4) && (typeof colors[0] === 'number')) {
272006
- return _arrayToColor(colors);
272007
- }
272008
-
272009
- return colors.map(_arrayToColor);
272010
- }
272011
-
272012
- proto.update = function(data) {
272013
- var gl = this.scene.glplot.gl;
272014
- var lineOptions;
272015
- var scatterOptions;
272016
- var errorOptions;
272017
- var textOptions;
272018
- var dashPattern = DASH_PATTERNS.solid;
272019
-
272020
- // Save data
272021
- this.data = data;
272022
-
272023
- // Run data conversion
272024
- var options = convertPlotlyOptions(this.scene, data);
272025
-
272026
- if('mode' in options) {
272027
- this.mode = options.mode;
272028
- }
272029
- if('lineDashes' in options) {
272030
- if(options.lineDashes in DASH_PATTERNS) {
272031
- dashPattern = DASH_PATTERNS[options.lineDashes];
272032
- }
272033
- }
272034
-
272035
- this.color = arrayToColor(options.scatterColor) ||
272036
- arrayToColor(options.lineColor);
272037
-
272038
- // Save data points
272039
- this.dataPoints = options.position;
272040
-
272041
- lineOptions = {
272042
- gl: this.scene.glplot.gl,
272043
- position: options.position,
272044
- color: options.lineColor,
272045
- lineWidth: options.lineWidth || 1,
272046
- dashes: dashPattern[0],
272047
- dashScale: dashPattern[1],
272048
- opacity: data.opacity,
272049
- connectGaps: data.connectgaps
272050
- };
272051
-
272052
- if(this.mode.indexOf('lines') !== -1) {
272053
- if(this.linePlot) this.linePlot.update(lineOptions);
272054
- else {
272055
- this.linePlot = createLinePlot(lineOptions);
272056
- this.linePlot._trace = this;
272057
- this.scene.glplot.add(this.linePlot);
272058
- }
272059
- } else if(this.linePlot) {
272060
- this.scene.glplot.remove(this.linePlot);
272061
- this.linePlot.dispose();
272062
- this.linePlot = null;
272063
- }
272064
-
272065
- // N.B. marker.opacity must be a scalar for performance
272066
- var scatterOpacity = data.opacity;
272067
- if(data.marker && data.marker.opacity !== undefined) scatterOpacity *= data.marker.opacity;
272068
-
272069
- scatterOptions = {
272070
- gl: this.scene.glplot.gl,
272071
- position: options.position,
272072
- color: options.scatterColor,
272073
- size: options.scatterSize,
272074
- glyph: options.scatterMarker,
272075
- opacity: scatterOpacity,
272076
- orthographic: true,
272077
- lineWidth: options.scatterLineWidth,
272078
- lineColor: options.scatterLineColor,
272079
- project: options.project,
272080
- projectScale: options.projectScale,
272081
- projectOpacity: options.projectOpacity
272082
- };
272083
-
272084
- if(this.mode.indexOf('markers') !== -1) {
272085
- if(this.scatterPlot) this.scatterPlot.update(scatterOptions);
272086
- else {
272087
- this.scatterPlot = createScatterPlot(scatterOptions);
272088
- this.scatterPlot._trace = this;
272089
- this.scatterPlot.highlightScale = 1;
272090
- this.scene.glplot.add(this.scatterPlot);
272091
- }
272092
- } else if(this.scatterPlot) {
272093
- this.scene.glplot.remove(this.scatterPlot);
272094
- this.scatterPlot.dispose();
272095
- this.scatterPlot = null;
272096
- }
272097
-
272098
- textOptions = {
272099
- gl: this.scene.glplot.gl,
272100
- position: options.position,
272101
- glyph: options.text,
272102
- color: options.textColor,
272103
- size: options.textSize,
272104
- angle: options.textAngle,
272105
- alignment: options.textOffset,
272106
- font: options.textFontFamily,
272107
- fontWeight: options.textFontWeight,
272108
- fontStyle: options.textFontStyle,
272109
- fontVariant: options.textFontVariant,
272110
- orthographic: true,
272111
- lineWidth: 0,
272112
- project: false,
272113
- opacity: data.opacity
272114
- };
272115
-
272116
- this.textLabels = data.hovertext || data.text;
272117
-
272118
- if(this.mode.indexOf('text') !== -1) {
272119
- if(this.textMarkers) this.textMarkers.update(textOptions);
272120
- else {
272121
- this.textMarkers = createScatterPlot(textOptions);
272122
- this.textMarkers._trace = this;
272123
- this.textMarkers.highlightScale = 1;
272124
- this.scene.glplot.add(this.textMarkers);
272125
- }
272126
- } else if(this.textMarkers) {
272127
- this.scene.glplot.remove(this.textMarkers);
272128
- this.textMarkers.dispose();
272129
- this.textMarkers = null;
272130
- }
272131
-
272132
- errorOptions = {
272133
- gl: this.scene.glplot.gl,
272134
- position: options.position,
272135
- color: options.errorColor,
272136
- error: options.errorBounds,
272137
- lineWidth: options.errorLineWidth,
272138
- capSize: options.errorCapSize,
272139
- opacity: data.opacity
272140
- };
272141
- if(this.errorBars) {
272142
- if(options.errorBounds) {
272143
- this.errorBars.update(errorOptions);
272144
- } else {
272145
- this.scene.glplot.remove(this.errorBars);
272146
- this.errorBars.dispose();
272147
- this.errorBars = null;
272148
- }
272149
- } else if(options.errorBounds) {
272150
- this.errorBars = createErrorBars(errorOptions);
272151
- this.errorBars._trace = this;
272152
- this.scene.glplot.add(this.errorBars);
272153
- }
272154
-
272155
- if(options.delaunayAxis >= 0) {
272156
- var delaunayOptions = constructDelaunay(
272157
- options.position,
272158
- options.delaunayColor,
272159
- options.delaunayAxis
272160
- );
272161
- delaunayOptions.opacity = data.opacity;
272162
-
272163
- if(this.delaunayMesh) {
272164
- this.delaunayMesh.update(delaunayOptions);
272165
- } else {
272166
- delaunayOptions.gl = gl;
272167
- this.delaunayMesh = createMesh(delaunayOptions);
272168
- this.delaunayMesh._trace = this;
272169
- this.scene.glplot.add(this.delaunayMesh);
272170
- }
272171
- } else if(this.delaunayMesh) {
272172
- this.scene.glplot.remove(this.delaunayMesh);
272173
- this.delaunayMesh.dispose();
272174
- this.delaunayMesh = null;
272175
- }
272176
- };
272177
-
272178
- proto.dispose = function() {
272179
- if(this.linePlot) {
272180
- this.scene.glplot.remove(this.linePlot);
272181
- this.linePlot.dispose();
272182
- }
272183
- if(this.scatterPlot) {
272184
- this.scene.glplot.remove(this.scatterPlot);
272185
- this.scatterPlot.dispose();
272186
- }
272187
- if(this.errorBars) {
272188
- this.scene.glplot.remove(this.errorBars);
272189
- this.errorBars.dispose();
272190
- }
272191
- if(this.textMarkers) {
272192
- this.scene.glplot.remove(this.textMarkers);
272193
- this.textMarkers.dispose();
272194
- }
272195
- if(this.delaunayMesh) {
272196
- this.scene.glplot.remove(this.delaunayMesh);
272197
- this.delaunayMesh.dispose();
272198
- }
272199
- };
272200
-
272201
- function createLineWithMarkers(scene, data) {
272202
- var plot = new LineWithMarkers(scene, data.uid);
272203
- plot.update(data);
272204
- return plot;
272205
- }
272206
-
272207
- module.exports = createLineWithMarkers;
272208
-
272209
-
272210
- /***/ }),
272211
-
272212
- /***/ 13744:
272213
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
272214
-
272215
-
272216
-
272217
- var Registry = __webpack_require__(13936);
272218
- var Lib = __webpack_require__(30991);
272219
-
272220
- var subTypes = __webpack_require__(33068);
272221
- var handleMarkerDefaults = __webpack_require__(15294);
272222
- var handleLineDefaults = __webpack_require__(82094);
272223
- var handleTextDefaults = __webpack_require__(94729);
272224
-
272225
- var attributes = __webpack_require__(1015);
272226
-
272227
- module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
272228
- function coerce(attr, dflt) {
272229
- return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
272230
- }
272231
-
272232
- var len = handleXYZDefaults(traceIn, traceOut, coerce, layout);
272233
- if(!len) {
272234
- traceOut.visible = false;
272235
- return;
272236
- }
272237
-
272238
- coerce('text');
272239
- coerce('hovertext');
272240
- coerce('hovertemplate');
272241
- coerce('xhoverformat');
272242
- coerce('yhoverformat');
272243
- coerce('zhoverformat');
272244
-
272245
- coerce('mode');
272246
-
272247
- if(subTypes.hasMarkers(traceOut)) {
272248
- handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noSelect: true, noAngle: true});
272249
- }
272250
-
272251
- if(subTypes.hasLines(traceOut)) {
272252
- coerce('connectgaps');
272253
- handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);
272254
- }
272255
-
272256
- if(subTypes.hasText(traceOut)) {
272257
- coerce('texttemplate');
272258
- handleTextDefaults(traceIn, traceOut, layout, coerce, {
272259
- noSelect: true,
272260
- noFontShadow: true,
272261
- noFontLineposition: true,
272262
- noFontTextcase: true,
272263
- });
272264
- }
272265
-
272266
- var lineColor = (traceOut.line || {}).color;
272267
- var markerColor = (traceOut.marker || {}).color;
272268
- if(coerce('surfaceaxis') >= 0) coerce('surfacecolor', lineColor || markerColor);
272269
-
272270
- var dims = ['x', 'y', 'z'];
272271
- for(var i = 0; i < 3; ++i) {
272272
- var projection = 'projection.' + dims[i];
272273
- if(coerce(projection + '.show')) {
272274
- coerce(projection + '.opacity');
272275
- coerce(projection + '.scale');
272276
- }
272277
- }
272278
-
272279
- var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');
272280
- errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'z'});
272281
- errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'y', inherit: 'z'});
272282
- errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'x', inherit: 'z'});
272283
- };
272284
-
272285
- function handleXYZDefaults(traceIn, traceOut, coerce, layout) {
272286
- var len = 0;
272287
- var x = coerce('x');
272288
- var y = coerce('y');
272289
- var z = coerce('z');
272290
-
272291
- var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
272292
- handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);
272293
-
272294
- if(x && y && z) {
272295
- // TODO: what happens if one is missing?
272296
- len = Math.min(x.length, y.length, z.length);
272297
- traceOut._length = traceOut._xlength = traceOut._ylength = traceOut._zlength = len;
272298
- }
272299
-
272300
- return len;
272301
- }
272302
-
272303
-
272304
- /***/ }),
272305
-
272306
- /***/ 68860:
272307
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
272308
-
272309
-
272310
-
272311
- module.exports = {
272312
- plot: __webpack_require__(93219),
272313
- attributes: __webpack_require__(1015),
272314
- markerSymbols: __webpack_require__(98993),
272315
- supplyDefaults: __webpack_require__(13744),
272316
- colorbar: [
272317
- {
272318
- container: 'marker',
272319
- min: 'cmin',
272320
- max: 'cmax'
272321
- }, {
272322
- container: 'line',
272323
- min: 'cmin',
272324
- max: 'cmax'
272325
- }
272326
- ],
272327
- calc: __webpack_require__(30935),
272328
-
272329
- moduleType: 'trace',
272330
- name: 'scatter3d',
272331
- basePlotModule: __webpack_require__(68137),
272332
- categories: ['gl3d', 'symbols', 'showLegend', 'scatter-like'],
272333
- meta: {
272334
- hrName: 'scatter_3d',
272335
- description: [
272336
- 'The data visualized as scatter point or lines in 3D dimension',
272337
- 'is set in `x`, `y`, `z`.',
272338
- 'Text (appearing either on the chart or on hover only) is via `text`.',
272339
- 'Bubble charts are achieved by setting `marker.size` and/or `marker.color`',
272340
- 'Projections are achieved via `projection`.',
272341
- 'Surface fills are achieved via `surfaceaxis`.'
272342
- ].join(' ')
272343
- }
272344
- };
272345
-
272346
-
272347
272355
  /***/ }),
272348
272356
 
272349
272357
  /***/ 44771:
@@ -368855,6 +368863,26 @@ const TextJamEditor = ({ onLogoutClick = () => { }, onViewProfileClick = () => {
368855
368863
  exports.TextJamEditor = TextJamEditor;
368856
368864
 
368857
368865
 
368866
+ /***/ }),
368867
+
368868
+ /***/ 66360:
368869
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
368870
+
368871
+
368872
+ var __importDefault = (this && this.__importDefault) || function (mod) {
368873
+ return (mod && mod.__esModule) ? mod : { "default": mod };
368874
+ };
368875
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
368876
+ exports.AssetPreviewPanel = void 0;
368877
+ const jsx_runtime_1 = __webpack_require__(74848);
368878
+ const styles_module_scss_1 = __importDefault(__webpack_require__(22401));
368879
+ const AssetPreview_1 = __webpack_require__(91078);
368880
+ const AssetPreviewPanel = ({ file, }) => {
368881
+ return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.previewContainer, children: (0, jsx_runtime_1.jsx)(AssetPreview_1.AssetPreview, { file: file }) }));
368882
+ };
368883
+ exports.AssetPreviewPanel = AssetPreviewPanel;
368884
+
368885
+
368858
368886
  /***/ }),
368859
368887
 
368860
368888
  /***/ 91078:
@@ -368905,26 +368933,6 @@ const AssetPreview = ({ file }) => {
368905
368933
  exports.AssetPreview = AssetPreview;
368906
368934
 
368907
368935
 
368908
- /***/ }),
368909
-
368910
- /***/ 66360:
368911
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
368912
-
368913
-
368914
- var __importDefault = (this && this.__importDefault) || function (mod) {
368915
- return (mod && mod.__esModule) ? mod : { "default": mod };
368916
- };
368917
- Object.defineProperty(exports, "__esModule", ({ value: true }));
368918
- exports.AssetPreviewPanel = void 0;
368919
- const jsx_runtime_1 = __webpack_require__(74848);
368920
- const styles_module_scss_1 = __importDefault(__webpack_require__(22401));
368921
- const AssetPreview_1 = __webpack_require__(91078);
368922
- const AssetPreviewPanel = ({ file, }) => {
368923
- return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.previewContainer, children: (0, jsx_runtime_1.jsx)(AssetPreview_1.AssetPreview, { file: file }) }));
368924
- };
368925
- exports.AssetPreviewPanel = AssetPreviewPanel;
368926
-
368927
-
368928
368936
  /***/ }),
368929
368937
 
368930
368938
  /***/ 46175:
@@ -369239,7 +369247,7 @@ const EditorInput = () => {
369239
369247
  if (!project || !project.components) {
369240
369248
  return null;
369241
369249
  }
369242
- return ((0, jsx_runtime_1.jsx)(dnd_1.DragDropContext, { onDragStart: (input) => onDragStart(input), onDragEnd: (result) => onDragEnd(result), children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.tabbedPanel, children: (0, jsx_runtime_1.jsxs)(react_tabs_1.Tabs, { selectedIndex: fileOnlyFocusIndex, children: [(0, jsx_runtime_1.jsxs)("div", { className: "tabContainer", children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.scrollWrapper, children: (0, jsx_runtime_1.jsx)(DroppableTabList_1.default, { index: 0, children: openedFiles.map((file, fileIndex) => file && ((0, jsx_runtime_1.jsxs)(DraggableTab_1.default, { fileIndex: fileIndex, onTabClick: () => {
369250
+ return ((0, jsx_runtime_1.jsx)(dnd_1.DragDropContext, { onDragStart: (input) => onDragStart(input), onDragEnd: (result) => onDragEnd(result), children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.tabbedPanel, children: (0, jsx_runtime_1.jsxs)(react_tabs_1.Tabs, { selectedIndex: fileOnlyFocusIndex, children: [(0, jsx_runtime_1.jsxs)("div", { className: "tabContainer", children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.scrollWrapper, children: (0, jsx_runtime_1.jsx)(DroppableTabList_1.default, { index: 0, children: openedFiles.map((file, fileIndex) => file && ((0, jsx_runtime_1.jsxs)(DraggableTab_1.default, { draggableId: `file-${file.id}`, fileIndex: fileIndex, onTabClick: () => {
369243
369251
  const unifiedIdx = fileOnlyToUnifiedIndex(unifiedTabs, fileIndex);
369244
369252
  if (unifiedIdx >= 0) {
369245
369253
  dispatch((0, EditorSlice_1.setFocussedFileIndex)(unifiedIdx));
@@ -369865,234 +369873,234 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
369865
369873
  exports.consoleOverrideScript = exports.disableLocalStorageScript = void 0;
369866
369874
  // insert script to disable access to specific localStorage keys
369867
369875
  // localstorage.getItem() is a potential security risk when executing untrusted code
369868
- exports.disableLocalStorageScript = `
369869
- <script>
369870
- (function() {
369871
- const originalGetItem = window.localStorage.getItem.bind(window.localStorage);
369872
- const originalSetItem = window.localStorage.setItem.bind(window.localStorage);
369873
- const originalRemoveItem = window.localStorage.removeItem.bind(window.localStorage);
369874
- const originalClear = window.localStorage.clear.bind(window.localStorage);
369875
-
369876
- const isDisallowedKey = (key) => key === 'authKey' || key.startsWith('oidc.');
369877
-
369878
- Object.defineProperty(window, 'localStorage', {
369879
- value: {
369880
- getItem: function(key) {
369881
- if (isDisallowedKey(key)) {
369882
- console.log(\`localStorage.getItem for "\${key}" is disabled\`);
369883
- return null;
369884
- }
369885
- return originalGetItem(key);
369886
- },
369887
- setItem: function(key, value) {
369888
- if (isDisallowedKey(key)) {
369889
- console.log(\`localStorage.setItem for "\${key}" is disabled\`);
369890
- return;
369891
- }
369892
- return originalSetItem(key, value);
369893
- },
369894
- removeItem: function(key) {
369895
- if (isDisallowedKey(key)) {
369896
- console.log(\`localStorage.removeItem for "\${key}" is disabled\`);
369897
- return;
369898
- }
369899
- return originalRemoveItem(key);
369900
- },
369901
- clear: function() {
369902
- console.log('localStorage.clear is disabled');
369903
- return;
369904
- }
369905
- },
369906
- writable: false,
369907
- configurable: false
369908
- });
369909
- })();
369910
- </script>
369876
+ exports.disableLocalStorageScript = `
369877
+ <script>
369878
+ (function() {
369879
+ const originalGetItem = window.localStorage.getItem.bind(window.localStorage);
369880
+ const originalSetItem = window.localStorage.setItem.bind(window.localStorage);
369881
+ const originalRemoveItem = window.localStorage.removeItem.bind(window.localStorage);
369882
+ const originalClear = window.localStorage.clear.bind(window.localStorage);
369883
+
369884
+ const isDisallowedKey = (key) => key === 'authKey' || key.startsWith('oidc.');
369885
+
369886
+ Object.defineProperty(window, 'localStorage', {
369887
+ value: {
369888
+ getItem: function(key) {
369889
+ if (isDisallowedKey(key)) {
369890
+ console.log(\`localStorage.getItem for "\${key}" is disabled\`);
369891
+ return null;
369892
+ }
369893
+ return originalGetItem(key);
369894
+ },
369895
+ setItem: function(key, value) {
369896
+ if (isDisallowedKey(key)) {
369897
+ console.log(\`localStorage.setItem for "\${key}" is disabled\`);
369898
+ return;
369899
+ }
369900
+ return originalSetItem(key, value);
369901
+ },
369902
+ removeItem: function(key) {
369903
+ if (isDisallowedKey(key)) {
369904
+ console.log(\`localStorage.removeItem for "\${key}" is disabled\`);
369905
+ return;
369906
+ }
369907
+ return originalRemoveItem(key);
369908
+ },
369909
+ clear: function() {
369910
+ console.log('localStorage.clear is disabled');
369911
+ return;
369912
+ }
369913
+ },
369914
+ writable: false,
369915
+ configurable: false
369916
+ });
369917
+ })();
369918
+ </script>
369911
369919
  `;
369912
369920
  const MAX_DEPTH = 5; // Maximum depth for object serialization to prevent infinite recursion
369913
369921
  // Override console methods to send logs to parent window and serialize complex objects
369914
- exports.consoleOverrideScript = `
369915
- <script>
369916
- (function() {
369917
- const SerializedType = {
369918
- Null: "null",
369919
- Undefined: "undefined",
369920
- Boolean: "boolean",
369921
- Number: "number",
369922
- String: "string",
369923
- Array: "array",
369924
- Object: "object",
369925
- };
369926
-
369927
- const original = {};
369928
- const methods = ["log", "error", "warn", "info", "debug", "assert"];
369929
-
369930
- function getTimestamp() {
369931
- const now = new Date();
369932
- const pad = (n) => String(n).padStart(2, '0');
369933
-
369934
- return (
369935
- now.getFullYear() + '-' +
369936
- pad(now.getMonth() + 1) + '-' +
369937
- pad(now.getDate()) + ' ' +
369938
- pad(now.getHours()) + ':' +
369939
- pad(now.getMinutes()) + ':' +
369940
- pad(now.getSeconds()) + '.' +
369941
- pad(Math.floor(now.getMilliseconds() / 10))
369942
- );
369943
- }
369944
-
369945
- function serialize(arg, depth = 0, maxDepth = ${MAX_DEPTH}, visited = new WeakSet()) {
369946
- if (depth > maxDepth) return { "type": SerializedType.String, "value": "[Max depth reached]" };
369947
-
369948
- if (arg && typeof arg === "object") {
369949
- if (visited.has(arg)) {
369950
- return { "type": SerializedType.String, "value": "[Circular reference]" };
369951
- }
369952
- visited.add(arg);
369953
- }
369954
-
369955
- const type = typeof arg;
369956
- if (arg === null) return { "type": SerializedType.Null, "value": "null" };
369957
- if (arg === undefined) return { "type": SerializedType.Undefined, "value": "undefined" };
369958
- if (type === "boolean") return { "type": SerializedType.Boolean, "value": String(arg) };
369959
- if (type === "number") return { "type": SerializedType.Number, "value": String(arg) };
369960
- if (type === "string") return { "type": SerializedType.String, "value": arg };
369961
-
369962
- if (Array.isArray(arg)) {
369963
- return {
369964
- "type": SerializedType.Array,
369965
- "value": arg.map(item => serialize(item, depth + 1, maxDepth))
369966
- };
369967
- }
369968
-
369969
- if (type === "object" && arg !== null) {
369970
- const props = {};
369971
- try {
369972
- for (let key in arg) {
369973
- if (arg.hasOwnProperty(key)) {
369974
- props[key] = serialize(arg[key], depth + 1, maxDepth, visited);
369975
- }
369976
- }
369977
- } catch (error) {
369978
- console.error("Error serializing object property:", error);
369979
- }
369980
- return { "type": SerializedType.Object, "value": props };
369981
- }
369982
-
369983
- return { "type": SerializedType.String, "value": String(arg) };
369984
- }
369985
-
369986
- methods.forEach(m => {
369987
- original[m] = console[m] || function(){};
369988
-
369989
- console[m] = function(...args) {
369990
- const timestamp = getTimestamp();
369991
-
369992
- let level = m;
369993
- let serializedArgs = args.map(arg => serialize(arg));
369994
-
369995
- if (m === "assert") {
369996
- const condition = Boolean(args[0]);
369997
- const messageArgs = args.slice(1);
369998
-
369999
- serializedArgs =
370000
- messageArgs.length > 0
370001
- ? messageArgs.map(arg => serialize(arg))
370002
- : [
370003
- {
370004
- "type": "string",
370005
- "value": condition ? "Assertion passed" : "Assertion failed",
370006
- },
370007
- ];
370008
-
370009
- level = condition ? "log" : "error";
370010
- }
370011
-
370012
- window.parent.postMessage({
370013
- "type": "console",
370014
- "method": level,
370015
- "data": serializedArgs,
370016
- "timestamp": timestamp
370017
- }, "*");
370018
-
370019
- original[m](...args);
370020
- };
370021
- });
370022
-
370023
- window.addEventListener("error", function(event) {
370024
- const timestamp = getTimestamp();
370025
- const error = event.error;
370026
-
370027
- let message;
370028
- if (error && error.name && error.message) {
370029
- message = error.name + ": " + error.message;
370030
- } else if (event.message) {
370031
- message = event.message;
370032
- } else {
370033
- message = "Unknown JavaScript error";
370034
- }
370035
-
370036
- let displayFilename = event.filename;
370037
-
370038
- if (
370039
- typeof displayFilename === "string" &&
370040
- displayFilename.startsWith("blob:")
370041
- ) {
370042
- const sourceMap = window.__blobSourceMap__ || {};
370043
- const mappedFilename = sourceMap[displayFilename];
370044
-
370045
- if (mappedFilename) {
370046
- displayFilename = mappedFilename;
370047
- } else {
370048
- const meta = document.querySelector("meta[filename]");
370049
- displayFilename =
370050
- (meta && meta.getAttribute("filename")) || "preview";
370051
- }
370052
- }
370053
-
370054
- const location =
370055
- displayFilename || event.lineno || event.colno
370056
- ? " at " +
370057
- [displayFilename, event.lineno, event.colno]
370058
- .filter(Boolean)
370059
- .join(":")
370060
- : "";
370061
-
370062
- window.parent.postMessage({
370063
- "type": "console",
370064
- "method": "error",
370065
- "data": [
370066
- { "type": "string", "value": message + location }
370067
- ],
370068
- "timestamp": timestamp
370069
- }, "*");
370070
- });
370071
-
370072
- window.addEventListener("unhandledrejection", function(event) {
370073
- const timestamp = getTimestamp();
370074
- const reason = event.reason;
370075
-
370076
- let message;
370077
- if (reason && reason.name && reason.message) {
370078
- message = reason.name + ": " + reason.message;
370079
- } else if (typeof reason === "string") {
370080
- message = "UnhandledPromiseRejection: " + reason;
370081
- } else {
370082
- message = "UnhandledPromiseRejection: " + String(reason);
370083
- }
370084
-
370085
- window.parent.postMessage({
370086
- "type": "console",
370087
- "method": "error",
370088
- "data": [
370089
- { "type": "string", "value": message }
370090
- ],
370091
- "timestamp": timestamp
370092
- }, "*");
370093
- });
370094
- })();
370095
- </script>
369922
+ exports.consoleOverrideScript = `
369923
+ <script>
369924
+ (function() {
369925
+ const SerializedType = {
369926
+ Null: "null",
369927
+ Undefined: "undefined",
369928
+ Boolean: "boolean",
369929
+ Number: "number",
369930
+ String: "string",
369931
+ Array: "array",
369932
+ Object: "object",
369933
+ };
369934
+
369935
+ const original = {};
369936
+ const methods = ["log", "error", "warn", "info", "debug", "assert"];
369937
+
369938
+ function getTimestamp() {
369939
+ const now = new Date();
369940
+ const pad = (n) => String(n).padStart(2, '0');
369941
+
369942
+ return (
369943
+ now.getFullYear() + '-' +
369944
+ pad(now.getMonth() + 1) + '-' +
369945
+ pad(now.getDate()) + ' ' +
369946
+ pad(now.getHours()) + ':' +
369947
+ pad(now.getMinutes()) + ':' +
369948
+ pad(now.getSeconds()) + '.' +
369949
+ pad(Math.floor(now.getMilliseconds() / 10))
369950
+ );
369951
+ }
369952
+
369953
+ function serialize(arg, depth = 0, maxDepth = ${MAX_DEPTH}, visited = new WeakSet()) {
369954
+ if (depth > maxDepth) return { "type": SerializedType.String, "value": "[Max depth reached]" };
369955
+
369956
+ if (arg && typeof arg === "object") {
369957
+ if (visited.has(arg)) {
369958
+ return { "type": SerializedType.String, "value": "[Circular reference]" };
369959
+ }
369960
+ visited.add(arg);
369961
+ }
369962
+
369963
+ const type = typeof arg;
369964
+ if (arg === null) return { "type": SerializedType.Null, "value": "null" };
369965
+ if (arg === undefined) return { "type": SerializedType.Undefined, "value": "undefined" };
369966
+ if (type === "boolean") return { "type": SerializedType.Boolean, "value": String(arg) };
369967
+ if (type === "number") return { "type": SerializedType.Number, "value": String(arg) };
369968
+ if (type === "string") return { "type": SerializedType.String, "value": arg };
369969
+
369970
+ if (Array.isArray(arg)) {
369971
+ return {
369972
+ "type": SerializedType.Array,
369973
+ "value": arg.map(item => serialize(item, depth + 1, maxDepth))
369974
+ };
369975
+ }
369976
+
369977
+ if (type === "object" && arg !== null) {
369978
+ const props = {};
369979
+ try {
369980
+ for (let key in arg) {
369981
+ if (arg.hasOwnProperty(key)) {
369982
+ props[key] = serialize(arg[key], depth + 1, maxDepth, visited);
369983
+ }
369984
+ }
369985
+ } catch (error) {
369986
+ console.error("Error serializing object property:", error);
369987
+ }
369988
+ return { "type": SerializedType.Object, "value": props };
369989
+ }
369990
+
369991
+ return { "type": SerializedType.String, "value": String(arg) };
369992
+ }
369993
+
369994
+ methods.forEach(m => {
369995
+ original[m] = console[m] || function(){};
369996
+
369997
+ console[m] = function(...args) {
369998
+ const timestamp = getTimestamp();
369999
+
370000
+ let level = m;
370001
+ let serializedArgs = args.map(arg => serialize(arg));
370002
+
370003
+ if (m === "assert") {
370004
+ const condition = Boolean(args[0]);
370005
+ const messageArgs = args.slice(1);
370006
+
370007
+ serializedArgs =
370008
+ messageArgs.length > 0
370009
+ ? messageArgs.map(arg => serialize(arg))
370010
+ : [
370011
+ {
370012
+ "type": "string",
370013
+ "value": condition ? "Assertion passed" : "Assertion failed",
370014
+ },
370015
+ ];
370016
+
370017
+ level = condition ? "log" : "error";
370018
+ }
370019
+
370020
+ window.parent.postMessage({
370021
+ "type": "console",
370022
+ "method": level,
370023
+ "data": serializedArgs,
370024
+ "timestamp": timestamp
370025
+ }, "*");
370026
+
370027
+ original[m](...args);
370028
+ };
370029
+ });
370030
+
370031
+ window.addEventListener("error", function(event) {
370032
+ const timestamp = getTimestamp();
370033
+ const error = event.error;
370034
+
370035
+ let message;
370036
+ if (error && error.name && error.message) {
370037
+ message = error.name + ": " + error.message;
370038
+ } else if (event.message) {
370039
+ message = event.message;
370040
+ } else {
370041
+ message = "Unknown JavaScript error";
370042
+ }
370043
+
370044
+ let displayFilename = event.filename;
370045
+
370046
+ if (
370047
+ typeof displayFilename === "string" &&
370048
+ displayFilename.startsWith("blob:")
370049
+ ) {
370050
+ const sourceMap = window.__blobSourceMap__ || {};
370051
+ const mappedFilename = sourceMap[displayFilename];
370052
+
370053
+ if (mappedFilename) {
370054
+ displayFilename = mappedFilename;
370055
+ } else {
370056
+ const meta = document.querySelector("meta[filename]");
370057
+ displayFilename =
370058
+ (meta && meta.getAttribute("filename")) || "preview";
370059
+ }
370060
+ }
370061
+
370062
+ const location =
370063
+ displayFilename || event.lineno || event.colno
370064
+ ? " at " +
370065
+ [displayFilename, event.lineno, event.colno]
370066
+ .filter(Boolean)
370067
+ .join(":")
370068
+ : "";
370069
+
370070
+ window.parent.postMessage({
370071
+ "type": "console",
370072
+ "method": "error",
370073
+ "data": [
370074
+ { "type": "string", "value": message + location }
370075
+ ],
370076
+ "timestamp": timestamp
370077
+ }, "*");
370078
+ });
370079
+
370080
+ window.addEventListener("unhandledrejection", function(event) {
370081
+ const timestamp = getTimestamp();
370082
+ const reason = event.reason;
370083
+
370084
+ let message;
370085
+ if (reason && reason.name && reason.message) {
370086
+ message = reason.name + ": " + reason.message;
370087
+ } else if (typeof reason === "string") {
370088
+ message = "UnhandledPromiseRejection: " + reason;
370089
+ } else {
370090
+ message = "UnhandledPromiseRejection: " + String(reason);
370091
+ }
370092
+
370093
+ window.parent.postMessage({
370094
+ "type": "console",
370095
+ "method": "error",
370096
+ "data": [
370097
+ { "type": "string", "value": message }
370098
+ ],
370099
+ "timestamp": timestamp
370100
+ }, "*");
370101
+ });
370102
+ })();
370103
+ </script>
370096
370104
  `;
370097
370105
 
370098
370106
 
@@ -370439,19 +370447,19 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
370439
370447
  const react_1 = __webpack_require__(51649);
370440
370448
  const classnames_1 = __importDefault(__webpack_require__(46942));
370441
370449
  const styles_module_scss_1 = __importDefault(__webpack_require__(12914));
370442
- const IFRAME_ALLOW = `
370443
- accelerometer 'none';
370444
- camera 'none';
370445
- encrypted-media;
370446
- fullscreen;
370447
- picture-in-picture;
370448
- geolocation 'none';
370449
- gyroscope 'none';
370450
- magnetometer 'none';
370451
- microphone 'none';
370452
- midi 'none';
370453
- payment 'none';
370454
- usb 'none';
370450
+ const IFRAME_ALLOW = `
370451
+ accelerometer 'none';
370452
+ camera 'none';
370453
+ encrypted-media;
370454
+ fullscreen;
370455
+ picture-in-picture;
370456
+ geolocation 'none';
370457
+ gyroscope 'none';
370458
+ magnetometer 'none';
370459
+ microphone 'none';
370460
+ midi 'none';
370461
+ payment 'none';
370462
+ usb 'none';
370455
370463
  `;
370456
370464
  /**
370457
370465
  * Owns the persistent, body-mounted iframe host and keeps it visually glued to
@@ -374286,7 +374294,7 @@ const WebComponentProject = ({ nameEditable = false, sidebarOptions = [], packag
374286
374294
  return () => clearTimeout(timeout);
374287
374295
  }, [project]);
374288
374296
  renderer.link = function (data) {
374289
- return `<a href="${data.href}" target="_blank" rel="noreferrer"
374297
+ return `<a href="${data.href}" target="_blank" rel="noreferrer"
374290
374298
  }">${data.text}</a>`;
374291
374299
  };
374292
374300
  marked_1.marked.setOptions({
@@ -374519,10 +374527,10 @@ const WebComponentLoader = (props) => {
374519
374527
  (0, react_1.useEffect)(() => {
374520
374528
  // Create a script element to save the existing Prism object if there is one
374521
374529
  const script = document.createElement("script");
374522
- script.textContent = `
374523
- if (window.Prism) {
374524
- window.syntaxHighlight = window.Prism;
374525
- }
374530
+ script.textContent = `
374531
+ if (window.Prism) {
374532
+ window.syntaxHighlight = window.Prism;
374533
+ }
374526
374534
  `;
374527
374535
  // Append the script to the document body
374528
374536
  document.body.appendChild(script);
@@ -385718,7 +385726,7 @@ module.exports = webpackAsyncContext;
385718
385726
  /***/ 24427:
385719
385727
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
385720
385728
 
385721
- module.exports = __webpack_require__.p + "assets/PyodideWorkerb1409749c37aedc47dc8.js";
385729
+ module.exports = __webpack_require__.p + "assets/PyodideWorker5d8b7bf9f06568fe4573.js";
385722
385730
 
385723
385731
  /***/ }),
385724
385732