gwchq-textjam 0.3.5 → 0.3.6
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/LICENSE.txt +202 -202
- package/README.md +266 -266
- package/dist/assets/{PyodideWorker5d8b7bf9f06568fe4573.js → PyodideWorkerb1409749c37aedc47dc8.js} +959 -959
- package/dist/assets/{pygalef3b78a56cb1d66beb61.js → pygalc0b4f32d2d2cc5a0c638.js} +495 -495
- package/dist/assets/pyodide-stdin-sw.js +238 -238
- package/dist/index.js +2291 -2285
- package/dist/style.css +3 -3
- package/package.json +301 -301
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/
|
|
68354
|
+
const pygalurl_namespaceObject = __webpack_require__.p + "assets/pygalc0b4f32d2d2cc5a0c638.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
|
|
68496
|
-
/* harmony import */ var
|
|
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);
|
|
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);
|
|
@@ -68514,7 +68514,7 @@ var DraggableTab = _ref => {
|
|
|
68514
68514
|
draggableId,
|
|
68515
68515
|
onTabClick
|
|
68516
68516
|
} = _ref,
|
|
68517
|
-
otherProps = (0,
|
|
68517
|
+
otherProps = (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(_ref, _excluded);
|
|
68518
68518
|
var openedTabs = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(state => state.editor.openedTabs);
|
|
68519
68519
|
var openFilesCount = openedTabs.filter(t => t && t.type === "file").length || 1;
|
|
68520
68520
|
var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useDispatch)();
|
|
@@ -68532,7 +68532,7 @@ var DraggableTab = _ref => {
|
|
|
68532
68532
|
switchToFileTab((fileIndex + openFilesCount - 1) % openFilesCount);
|
|
68533
68533
|
}
|
|
68534
68534
|
};
|
|
68535
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Tabs_DraggableTabWrapper__WEBPACK_IMPORTED_MODULE_5__["default"], (0,
|
|
68535
|
+
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)({
|
|
68536
68536
|
draggableId: draggableId,
|
|
68537
68537
|
index: fileIndex,
|
|
68538
68538
|
onClick: e => {
|
|
@@ -68556,8 +68556,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68556
68556
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
68557
68557
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
68558
68558
|
/* harmony export */ });
|
|
68559
|
-
/* harmony import */ var
|
|
68560
|
-
/* harmony import */ var
|
|
68559
|
+
/* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89379);
|
|
68560
|
+
/* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53986);
|
|
68561
68561
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
68562
68562
|
/* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98850);
|
|
68563
68563
|
/* harmony import */ var react_tabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39243);
|
|
@@ -68576,8 +68576,8 @@ var DroppableTabList = _ref => {
|
|
|
68576
68576
|
children: _children,
|
|
68577
68577
|
index
|
|
68578
68578
|
} = _ref,
|
|
68579
|
-
otherProps = (0,
|
|
68580
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_1__.TabList, (0,
|
|
68579
|
+
otherProps = (0,_Users_valeriya_projects_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,_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), {}, {
|
|
68581
68581
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__.Droppable, {
|
|
68582
68582
|
direction: "horizontal",
|
|
68583
68583
|
droppableId: index.toString(),
|
|
@@ -68587,7 +68587,7 @@ var DroppableTabList = _ref => {
|
|
|
68587
68587
|
droppableProps,
|
|
68588
68588
|
placeholder
|
|
68589
68589
|
} = _ref2;
|
|
68590
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", (0,
|
|
68590
|
+
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)({
|
|
68591
68591
|
className: "droppable-tab-list"
|
|
68592
68592
|
}, droppableProps), {}, {
|
|
68593
68593
|
ref: innerRef,
|
|
@@ -102367,8 +102367,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102367
102367
|
|
|
102368
102368
|
|
|
102369
102369
|
// TODO: refactor existing modals
|
|
102370
|
-
/** !deprecated!
|
|
102371
|
-
* use BaseModal from `index.tsx` instead
|
|
102370
|
+
/** !deprecated!
|
|
102371
|
+
* use BaseModal from `index.tsx` instead
|
|
102372
102372
|
*/
|
|
102373
102373
|
|
|
102374
102374
|
var BaseModal = _ref => {
|
|
@@ -103160,10 +103160,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
103160
103160
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
103161
103161
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
103162
103162
|
/* harmony export */ });
|
|
103163
|
-
/* harmony import */ var
|
|
103163
|
+
/* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89379);
|
|
103164
103164
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
103165
103165
|
/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14062);
|
|
103166
103166
|
/* harmony import */ var _redux_EditorSlice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68512);
|
|
103167
|
+
/* harmony import */ var _utils_componentNameValidation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(56469);
|
|
103167
103168
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46942);
|
|
103168
103169
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
|
|
103169
103170
|
/* harmony import */ var _styles_module_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29881);
|
|
@@ -103180,6 +103181,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
103180
103181
|
|
|
103181
103182
|
|
|
103182
103183
|
|
|
103184
|
+
|
|
103183
103185
|
var defaultProjectName = "New project";
|
|
103184
103186
|
var getProjectName = project => (project === null || project === void 0 ? void 0 : project.name) || defaultProjectName;
|
|
103185
103187
|
var ProjectName = _ref => {
|
|
@@ -103274,7 +103276,7 @@ var ProjectName = _ref => {
|
|
|
103274
103276
|
id: "project_name_label",
|
|
103275
103277
|
className: _styles_module_scss__WEBPACK_IMPORTED_MODULE_3__["default"].projectLabel,
|
|
103276
103278
|
children: "Project Name"
|
|
103277
|
-
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", (0,
|
|
103279
|
+
}), /*#__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)({
|
|
103278
103280
|
className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(_styles_module_scss__WEBPACK_IMPORTED_MODULE_3__["default"].projectName, className)
|
|
103279
103281
|
}, hoverProps), {}, {
|
|
103280
103282
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)((components_Tooltip_Tooltip__WEBPACK_IMPORTED_MODULE_8___default()), {
|
|
@@ -103292,7 +103294,7 @@ var ProjectName = _ref => {
|
|
|
103292
103294
|
onKeyUp: handleKeyUp,
|
|
103293
103295
|
value: name,
|
|
103294
103296
|
readOnly: !isEditing,
|
|
103295
|
-
maxLength:
|
|
103297
|
+
maxLength: _utils_componentNameValidation__WEBPACK_IMPORTED_MODULE_9__.PROJECT_NAME_LIMIT,
|
|
103296
103298
|
onChange: handleOnChange,
|
|
103297
103299
|
onBlur: handleOnBlur,
|
|
103298
103300
|
className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(_styles_module_scss__WEBPACK_IMPORTED_MODULE_3__["default"].projectInput, {
|
|
@@ -116849,6 +116851,115 @@ function escapeName(str, charsToEscape) {
|
|
|
116849
116851
|
|
|
116850
116852
|
|
|
116851
116853
|
|
|
116854
|
+
/***/ }),
|
|
116855
|
+
|
|
116856
|
+
/***/ 16450:
|
|
116857
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
116858
|
+
|
|
116859
|
+
|
|
116860
|
+
|
|
116861
|
+
var isValue = __webpack_require__(48175)
|
|
116862
|
+
, ensureValue = __webpack_require__(34809)
|
|
116863
|
+
, ensurePlainFunction = __webpack_require__(90251)
|
|
116864
|
+
, copy = __webpack_require__(30203)
|
|
116865
|
+
, normalizeOptions = __webpack_require__(90148)
|
|
116866
|
+
, map = __webpack_require__(30498);
|
|
116867
|
+
|
|
116868
|
+
var bind = Function.prototype.bind
|
|
116869
|
+
, defineProperty = Object.defineProperty
|
|
116870
|
+
, hasOwnProperty = Object.prototype.hasOwnProperty
|
|
116871
|
+
, define;
|
|
116872
|
+
|
|
116873
|
+
define = function (name, desc, options) {
|
|
116874
|
+
var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs;
|
|
116875
|
+
dgs = copy(desc);
|
|
116876
|
+
delete dgs.writable;
|
|
116877
|
+
delete dgs.value;
|
|
116878
|
+
dgs.get = function () {
|
|
116879
|
+
if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;
|
|
116880
|
+
desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);
|
|
116881
|
+
defineProperty(this, name, desc);
|
|
116882
|
+
return this[name];
|
|
116883
|
+
};
|
|
116884
|
+
return dgs;
|
|
116885
|
+
};
|
|
116886
|
+
|
|
116887
|
+
module.exports = function (props/*, options*/) {
|
|
116888
|
+
var options = normalizeOptions(arguments[1]);
|
|
116889
|
+
if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext);
|
|
116890
|
+
return map(props, function (desc, name) { return define(name, desc, options); });
|
|
116891
|
+
};
|
|
116892
|
+
|
|
116893
|
+
|
|
116894
|
+
/***/ }),
|
|
116895
|
+
|
|
116896
|
+
/***/ 58263:
|
|
116897
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
116898
|
+
|
|
116899
|
+
|
|
116900
|
+
|
|
116901
|
+
var isValue = __webpack_require__(48175)
|
|
116902
|
+
, isPlainFunction = __webpack_require__(6873)
|
|
116903
|
+
, assign = __webpack_require__(16596)
|
|
116904
|
+
, normalizeOpts = __webpack_require__(90148)
|
|
116905
|
+
, contains = __webpack_require__(70214);
|
|
116906
|
+
|
|
116907
|
+
var d = (module.exports = function (dscr, value/*, options*/) {
|
|
116908
|
+
var c, e, w, options, desc;
|
|
116909
|
+
if (arguments.length < 2 || typeof dscr !== "string") {
|
|
116910
|
+
options = value;
|
|
116911
|
+
value = dscr;
|
|
116912
|
+
dscr = null;
|
|
116913
|
+
} else {
|
|
116914
|
+
options = arguments[2];
|
|
116915
|
+
}
|
|
116916
|
+
if (isValue(dscr)) {
|
|
116917
|
+
c = contains.call(dscr, "c");
|
|
116918
|
+
e = contains.call(dscr, "e");
|
|
116919
|
+
w = contains.call(dscr, "w");
|
|
116920
|
+
} else {
|
|
116921
|
+
c = w = true;
|
|
116922
|
+
e = false;
|
|
116923
|
+
}
|
|
116924
|
+
|
|
116925
|
+
desc = { value: value, configurable: c, enumerable: e, writable: w };
|
|
116926
|
+
return !options ? desc : assign(normalizeOpts(options), desc);
|
|
116927
|
+
});
|
|
116928
|
+
|
|
116929
|
+
d.gs = function (dscr, get, set/*, options*/) {
|
|
116930
|
+
var c, e, options, desc;
|
|
116931
|
+
if (typeof dscr !== "string") {
|
|
116932
|
+
options = set;
|
|
116933
|
+
set = get;
|
|
116934
|
+
get = dscr;
|
|
116935
|
+
dscr = null;
|
|
116936
|
+
} else {
|
|
116937
|
+
options = arguments[3];
|
|
116938
|
+
}
|
|
116939
|
+
if (!isValue(get)) {
|
|
116940
|
+
get = undefined;
|
|
116941
|
+
} else if (!isPlainFunction(get)) {
|
|
116942
|
+
options = get;
|
|
116943
|
+
get = set = undefined;
|
|
116944
|
+
} else if (!isValue(set)) {
|
|
116945
|
+
set = undefined;
|
|
116946
|
+
} else if (!isPlainFunction(set)) {
|
|
116947
|
+
options = set;
|
|
116948
|
+
set = undefined;
|
|
116949
|
+
}
|
|
116950
|
+
if (isValue(dscr)) {
|
|
116951
|
+
c = contains.call(dscr, "c");
|
|
116952
|
+
e = contains.call(dscr, "e");
|
|
116953
|
+
} else {
|
|
116954
|
+
c = true;
|
|
116955
|
+
e = false;
|
|
116956
|
+
}
|
|
116957
|
+
|
|
116958
|
+
desc = { get: get, set: set, configurable: c, enumerable: e };
|
|
116959
|
+
return !options ? desc : assign(normalizeOpts(options), desc);
|
|
116960
|
+
};
|
|
116961
|
+
|
|
116962
|
+
|
|
116852
116963
|
/***/ }),
|
|
116853
116964
|
|
|
116854
116965
|
/***/ 83999:
|
|
@@ -131677,115 +131788,6 @@ year.every = function(k) {
|
|
|
131677
131788
|
var years = year.range;
|
|
131678
131789
|
|
|
131679
131790
|
|
|
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
|
-
|
|
131789
131791
|
/***/ }),
|
|
131790
131792
|
|
|
131791
131793
|
/***/ 30041:
|
|
@@ -143215,7 +143217,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143215
143217
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
143216
143218
|
/* harmony export */ });
|
|
143217
143219
|
// extracted by mini-css-extract-plugin
|
|
143218
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","projectName":"styles-module__projectName--HRN56","projectLabel":"styles-module__projectLabel--IyOEH","projectInput":"styles-module__projectInput--ppPP8","editing":"styles-module__editing--+2Ncm","shared":"styles-module__shared--exD57"});
|
|
143220
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","projectName":"styles-module__projectName--HRN56","projectLabel":"styles-module__projectLabel--IyOEH","projectInput":"styles-module__projectInput--ppPP8","editing":"styles-module__editing--+2Ncm","shared":"styles-module__shared--exD57","nameWrapper":"styles-module__nameWrapper--7OVl3","authorInfo":"styles-module__authorInfo--7yqRy","nameText":"styles-module__nameText--iz4Ov"});
|
|
143219
143221
|
|
|
143220
143222
|
/***/ }),
|
|
143221
143223
|
|
|
@@ -148426,324 +148428,6 @@ function hsl2rgb(hsl) {
|
|
|
148426
148428
|
}
|
|
148427
148429
|
|
|
148428
148430
|
|
|
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
|
-
|
|
148747
148431
|
/***/ }),
|
|
148748
148432
|
|
|
148749
148433
|
/***/ 2595:
|
|
@@ -150717,6 +150401,324 @@ module.exports = {
|
|
|
150717
150401
|
};
|
|
150718
150402
|
|
|
150719
150403
|
|
|
150404
|
+
/***/ }),
|
|
150405
|
+
|
|
150406
|
+
/***/ 9793:
|
|
150407
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
150408
|
+
|
|
150409
|
+
|
|
150410
|
+
|
|
150411
|
+
var annAttrs = __webpack_require__(84676);
|
|
150412
|
+
var overrideAll = (__webpack_require__(70756).overrideAll);
|
|
150413
|
+
var templatedArray = (__webpack_require__(79338).templatedArray);
|
|
150414
|
+
|
|
150415
|
+
module.exports = overrideAll(templatedArray('annotation', {
|
|
150416
|
+
visible: annAttrs.visible,
|
|
150417
|
+
x: {
|
|
150418
|
+
valType: 'any',
|
|
150419
|
+
description: [
|
|
150420
|
+
'Sets the annotation\'s x position.'
|
|
150421
|
+
].join(' ')
|
|
150422
|
+
},
|
|
150423
|
+
y: {
|
|
150424
|
+
valType: 'any',
|
|
150425
|
+
description: [
|
|
150426
|
+
'Sets the annotation\'s y position.'
|
|
150427
|
+
].join(' ')
|
|
150428
|
+
},
|
|
150429
|
+
z: {
|
|
150430
|
+
valType: 'any',
|
|
150431
|
+
description: [
|
|
150432
|
+
'Sets the annotation\'s z position.'
|
|
150433
|
+
].join(' ')
|
|
150434
|
+
},
|
|
150435
|
+
ax: {
|
|
150436
|
+
valType: 'number',
|
|
150437
|
+
description: [
|
|
150438
|
+
'Sets the x component of the arrow tail about the arrow head (in pixels).'
|
|
150439
|
+
].join(' ')
|
|
150440
|
+
},
|
|
150441
|
+
ay: {
|
|
150442
|
+
valType: 'number',
|
|
150443
|
+
description: [
|
|
150444
|
+
'Sets the y component of the arrow tail about the arrow head (in pixels).'
|
|
150445
|
+
].join(' ')
|
|
150446
|
+
},
|
|
150447
|
+
|
|
150448
|
+
xanchor: annAttrs.xanchor,
|
|
150449
|
+
xshift: annAttrs.xshift,
|
|
150450
|
+
yanchor: annAttrs.yanchor,
|
|
150451
|
+
yshift: annAttrs.yshift,
|
|
150452
|
+
|
|
150453
|
+
text: annAttrs.text,
|
|
150454
|
+
textangle: annAttrs.textangle,
|
|
150455
|
+
font: annAttrs.font,
|
|
150456
|
+
width: annAttrs.width,
|
|
150457
|
+
height: annAttrs.height,
|
|
150458
|
+
opacity: annAttrs.opacity,
|
|
150459
|
+
align: annAttrs.align,
|
|
150460
|
+
valign: annAttrs.valign,
|
|
150461
|
+
bgcolor: annAttrs.bgcolor,
|
|
150462
|
+
bordercolor: annAttrs.bordercolor,
|
|
150463
|
+
borderpad: annAttrs.borderpad,
|
|
150464
|
+
borderwidth: annAttrs.borderwidth,
|
|
150465
|
+
showarrow: annAttrs.showarrow,
|
|
150466
|
+
arrowcolor: annAttrs.arrowcolor,
|
|
150467
|
+
arrowhead: annAttrs.arrowhead,
|
|
150468
|
+
startarrowhead: annAttrs.startarrowhead,
|
|
150469
|
+
arrowside: annAttrs.arrowside,
|
|
150470
|
+
arrowsize: annAttrs.arrowsize,
|
|
150471
|
+
startarrowsize: annAttrs.startarrowsize,
|
|
150472
|
+
arrowwidth: annAttrs.arrowwidth,
|
|
150473
|
+
standoff: annAttrs.standoff,
|
|
150474
|
+
startstandoff: annAttrs.startstandoff,
|
|
150475
|
+
hovertext: annAttrs.hovertext,
|
|
150476
|
+
hoverlabel: annAttrs.hoverlabel,
|
|
150477
|
+
captureevents: annAttrs.captureevents,
|
|
150478
|
+
|
|
150479
|
+
// maybes later?
|
|
150480
|
+
// clicktoshow: annAttrs.clicktoshow,
|
|
150481
|
+
// xclick: annAttrs.xclick,
|
|
150482
|
+
// yclick: annAttrs.yclick,
|
|
150483
|
+
|
|
150484
|
+
// not needed!
|
|
150485
|
+
// axref: 'pixel'
|
|
150486
|
+
// ayref: 'pixel'
|
|
150487
|
+
// xref: 'x'
|
|
150488
|
+
// yref: 'y
|
|
150489
|
+
// zref: 'z'
|
|
150490
|
+
}), 'calc', 'from-root');
|
|
150491
|
+
|
|
150492
|
+
|
|
150493
|
+
/***/ }),
|
|
150494
|
+
|
|
150495
|
+
/***/ 58121:
|
|
150496
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
150497
|
+
|
|
150498
|
+
|
|
150499
|
+
|
|
150500
|
+
var Lib = __webpack_require__(30991);
|
|
150501
|
+
var Axes = __webpack_require__(15076);
|
|
150502
|
+
|
|
150503
|
+
module.exports = function convert(scene) {
|
|
150504
|
+
var fullSceneLayout = scene.fullSceneLayout;
|
|
150505
|
+
var anns = fullSceneLayout.annotations;
|
|
150506
|
+
|
|
150507
|
+
for(var i = 0; i < anns.length; i++) {
|
|
150508
|
+
mockAnnAxes(anns[i], scene);
|
|
150509
|
+
}
|
|
150510
|
+
|
|
150511
|
+
scene.fullLayout._infolayer
|
|
150512
|
+
.selectAll('.annotation-' + scene.id)
|
|
150513
|
+
.remove();
|
|
150514
|
+
};
|
|
150515
|
+
|
|
150516
|
+
function mockAnnAxes(ann, scene) {
|
|
150517
|
+
var fullSceneLayout = scene.fullSceneLayout;
|
|
150518
|
+
var domain = fullSceneLayout.domain;
|
|
150519
|
+
var size = scene.fullLayout._size;
|
|
150520
|
+
|
|
150521
|
+
var base = {
|
|
150522
|
+
// this gets fill in on render
|
|
150523
|
+
pdata: null,
|
|
150524
|
+
|
|
150525
|
+
// to get setConvert to not execute cleanly
|
|
150526
|
+
type: 'linear',
|
|
150527
|
+
|
|
150528
|
+
// don't try to update them on `editable: true`
|
|
150529
|
+
autorange: false,
|
|
150530
|
+
|
|
150531
|
+
// set infinite range so that annotation draw routine
|
|
150532
|
+
// does not try to remove 'outside-range' annotations,
|
|
150533
|
+
// this case is handled in the render loop
|
|
150534
|
+
range: [-Infinity, Infinity]
|
|
150535
|
+
};
|
|
150536
|
+
|
|
150537
|
+
ann._xa = {};
|
|
150538
|
+
Lib.extendFlat(ann._xa, base);
|
|
150539
|
+
Axes.setConvert(ann._xa);
|
|
150540
|
+
ann._xa._offset = size.l + domain.x[0] * size.w;
|
|
150541
|
+
ann._xa.l2p = function() {
|
|
150542
|
+
return 0.5 * (1 + ann._pdata[0] / ann._pdata[3]) * size.w * (domain.x[1] - domain.x[0]);
|
|
150543
|
+
};
|
|
150544
|
+
|
|
150545
|
+
ann._ya = {};
|
|
150546
|
+
Lib.extendFlat(ann._ya, base);
|
|
150547
|
+
Axes.setConvert(ann._ya);
|
|
150548
|
+
ann._ya._offset = size.t + (1 - domain.y[1]) * size.h;
|
|
150549
|
+
ann._ya.l2p = function() {
|
|
150550
|
+
return 0.5 * (1 - ann._pdata[1] / ann._pdata[3]) * size.h * (domain.y[1] - domain.y[0]);
|
|
150551
|
+
};
|
|
150552
|
+
}
|
|
150553
|
+
|
|
150554
|
+
|
|
150555
|
+
/***/ }),
|
|
150556
|
+
|
|
150557
|
+
/***/ 41926:
|
|
150558
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
150559
|
+
|
|
150560
|
+
|
|
150561
|
+
|
|
150562
|
+
var Lib = __webpack_require__(30991);
|
|
150563
|
+
var Axes = __webpack_require__(15076);
|
|
150564
|
+
var handleArrayContainerDefaults = __webpack_require__(21238);
|
|
150565
|
+
var handleAnnotationCommonDefaults = __webpack_require__(84081);
|
|
150566
|
+
var attributes = __webpack_require__(9793);
|
|
150567
|
+
|
|
150568
|
+
module.exports = function handleDefaults(sceneLayoutIn, sceneLayoutOut, opts) {
|
|
150569
|
+
handleArrayContainerDefaults(sceneLayoutIn, sceneLayoutOut, {
|
|
150570
|
+
name: 'annotations',
|
|
150571
|
+
handleItemDefaults: handleAnnotationDefaults,
|
|
150572
|
+
fullLayout: opts.fullLayout
|
|
150573
|
+
});
|
|
150574
|
+
};
|
|
150575
|
+
|
|
150576
|
+
function handleAnnotationDefaults(annIn, annOut, sceneLayout, opts) {
|
|
150577
|
+
function coerce(attr, dflt) {
|
|
150578
|
+
return Lib.coerce(annIn, annOut, attributes, attr, dflt);
|
|
150579
|
+
}
|
|
150580
|
+
|
|
150581
|
+
function coercePosition(axLetter) {
|
|
150582
|
+
var axName = axLetter + 'axis';
|
|
150583
|
+
|
|
150584
|
+
// mock in such way that getFromId grabs correct 3D axis
|
|
150585
|
+
var gdMock = { _fullLayout: {} };
|
|
150586
|
+
gdMock._fullLayout[axName] = sceneLayout[axName];
|
|
150587
|
+
|
|
150588
|
+
return Axes.coercePosition(annOut, gdMock, coerce, axLetter, axLetter, 0.5);
|
|
150589
|
+
}
|
|
150590
|
+
|
|
150591
|
+
|
|
150592
|
+
var visible = coerce('visible');
|
|
150593
|
+
if(!visible) return;
|
|
150594
|
+
|
|
150595
|
+
handleAnnotationCommonDefaults(annIn, annOut, opts.fullLayout, coerce);
|
|
150596
|
+
|
|
150597
|
+
coercePosition('x');
|
|
150598
|
+
coercePosition('y');
|
|
150599
|
+
coercePosition('z');
|
|
150600
|
+
|
|
150601
|
+
// if you have one coordinate you should all three
|
|
150602
|
+
Lib.noneOrAll(annIn, annOut, ['x', 'y', 'z']);
|
|
150603
|
+
|
|
150604
|
+
// hard-set here for completeness
|
|
150605
|
+
annOut.xref = 'x';
|
|
150606
|
+
annOut.yref = 'y';
|
|
150607
|
+
annOut.zref = 'z';
|
|
150608
|
+
|
|
150609
|
+
coerce('xanchor');
|
|
150610
|
+
coerce('yanchor');
|
|
150611
|
+
coerce('xshift');
|
|
150612
|
+
coerce('yshift');
|
|
150613
|
+
|
|
150614
|
+
if(annOut.showarrow) {
|
|
150615
|
+
annOut.axref = 'pixel';
|
|
150616
|
+
annOut.ayref = 'pixel';
|
|
150617
|
+
|
|
150618
|
+
// TODO maybe default values should be bigger than the 2D case?
|
|
150619
|
+
coerce('ax', -10);
|
|
150620
|
+
coerce('ay', -30);
|
|
150621
|
+
|
|
150622
|
+
// if you have one part of arrow length you should have both
|
|
150623
|
+
Lib.noneOrAll(annIn, annOut, ['ax', 'ay']);
|
|
150624
|
+
}
|
|
150625
|
+
}
|
|
150626
|
+
|
|
150627
|
+
|
|
150628
|
+
/***/ }),
|
|
150629
|
+
|
|
150630
|
+
/***/ 13802:
|
|
150631
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
150632
|
+
|
|
150633
|
+
|
|
150634
|
+
|
|
150635
|
+
var drawRaw = (__webpack_require__(47995).drawRaw);
|
|
150636
|
+
var project = __webpack_require__(51344);
|
|
150637
|
+
var axLetters = ['x', 'y', 'z'];
|
|
150638
|
+
|
|
150639
|
+
module.exports = function draw(scene) {
|
|
150640
|
+
var fullSceneLayout = scene.fullSceneLayout;
|
|
150641
|
+
var dataScale = scene.dataScale;
|
|
150642
|
+
var anns = fullSceneLayout.annotations;
|
|
150643
|
+
|
|
150644
|
+
for(var i = 0; i < anns.length; i++) {
|
|
150645
|
+
var ann = anns[i];
|
|
150646
|
+
var annotationIsOffscreen = false;
|
|
150647
|
+
|
|
150648
|
+
for(var j = 0; j < 3; j++) {
|
|
150649
|
+
var axLetter = axLetters[j];
|
|
150650
|
+
var pos = ann[axLetter];
|
|
150651
|
+
var ax = fullSceneLayout[axLetter + 'axis'];
|
|
150652
|
+
var posFraction = ax.r2fraction(pos);
|
|
150653
|
+
|
|
150654
|
+
if(posFraction < 0 || posFraction > 1) {
|
|
150655
|
+
annotationIsOffscreen = true;
|
|
150656
|
+
break;
|
|
150657
|
+
}
|
|
150658
|
+
}
|
|
150659
|
+
|
|
150660
|
+
if(annotationIsOffscreen) {
|
|
150661
|
+
scene.fullLayout._infolayer
|
|
150662
|
+
.select('.annotation-' + scene.id + '[data-index="' + i + '"]')
|
|
150663
|
+
.remove();
|
|
150664
|
+
} else {
|
|
150665
|
+
ann._pdata = project(scene.glplot.cameraParams, [
|
|
150666
|
+
fullSceneLayout.xaxis.r2l(ann.x) * dataScale[0],
|
|
150667
|
+
fullSceneLayout.yaxis.r2l(ann.y) * dataScale[1],
|
|
150668
|
+
fullSceneLayout.zaxis.r2l(ann.z) * dataScale[2]
|
|
150669
|
+
]);
|
|
150670
|
+
|
|
150671
|
+
drawRaw(scene.graphDiv, ann, i, scene.id, ann._xa, ann._ya);
|
|
150672
|
+
}
|
|
150673
|
+
}
|
|
150674
|
+
};
|
|
150675
|
+
|
|
150676
|
+
|
|
150677
|
+
/***/ }),
|
|
150678
|
+
|
|
150679
|
+
/***/ 86578:
|
|
150680
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
150681
|
+
|
|
150682
|
+
|
|
150683
|
+
|
|
150684
|
+
var Registry = __webpack_require__(13936);
|
|
150685
|
+
var Lib = __webpack_require__(30991);
|
|
150686
|
+
|
|
150687
|
+
module.exports = {
|
|
150688
|
+
moduleType: 'component',
|
|
150689
|
+
name: 'annotations3d',
|
|
150690
|
+
|
|
150691
|
+
schema: {
|
|
150692
|
+
subplots: {
|
|
150693
|
+
scene: {annotations: __webpack_require__(9793)}
|
|
150694
|
+
}
|
|
150695
|
+
},
|
|
150696
|
+
|
|
150697
|
+
layoutAttributes: __webpack_require__(9793),
|
|
150698
|
+
handleDefaults: __webpack_require__(41926),
|
|
150699
|
+
includeBasePlot: includeGL3D,
|
|
150700
|
+
|
|
150701
|
+
convert: __webpack_require__(58121),
|
|
150702
|
+
draw: __webpack_require__(13802)
|
|
150703
|
+
};
|
|
150704
|
+
|
|
150705
|
+
function includeGL3D(layoutIn, layoutOut) {
|
|
150706
|
+
var GL3D = Registry.subplotsRegistry.gl3d;
|
|
150707
|
+
if(!GL3D) return;
|
|
150708
|
+
|
|
150709
|
+
var attrRegex = GL3D.attrRegex;
|
|
150710
|
+
|
|
150711
|
+
var keys = Object.keys(layoutIn);
|
|
150712
|
+
for(var i = 0; i < keys.length; i++) {
|
|
150713
|
+
var k = keys[i];
|
|
150714
|
+
if(attrRegex.test(k) && (layoutIn[k].annotations || []).length) {
|
|
150715
|
+
Lib.pushUnique(layoutOut._basePlotModules, GL3D);
|
|
150716
|
+
Lib.pushUnique(layoutOut._subplots.gl3d, k);
|
|
150717
|
+
}
|
|
150718
|
+
}
|
|
150719
|
+
}
|
|
150720
|
+
|
|
150721
|
+
|
|
150720
150722
|
/***/ }),
|
|
150721
150723
|
|
|
150722
150724
|
/***/ 27639:
|
|
@@ -248949,595 +248951,6 @@ function isValidZ(z) {
|
|
|
248949
248951
|
}
|
|
248950
248952
|
|
|
248951
248953
|
|
|
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
|
-
|
|
249541
248954
|
/***/ }),
|
|
249542
248955
|
|
|
249543
248956
|
/***/ 71250:
|
|
@@ -251246,6 +250659,595 @@ module.exports = {
|
|
|
251246
250659
|
};
|
|
251247
250660
|
|
|
251248
250661
|
|
|
250662
|
+
/***/ }),
|
|
250663
|
+
|
|
250664
|
+
/***/ 42124:
|
|
250665
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
250666
|
+
|
|
250667
|
+
|
|
250668
|
+
|
|
250669
|
+
var histogramAttrs = __webpack_require__(71250);
|
|
250670
|
+
var makeBinAttrs = __webpack_require__(9284);
|
|
250671
|
+
var heatmapAttrs = __webpack_require__(68300);
|
|
250672
|
+
var baseAttrs = __webpack_require__(35667);
|
|
250673
|
+
var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
|
|
250674
|
+
var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
|
|
250675
|
+
var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
|
|
250676
|
+
var colorScaleAttrs = __webpack_require__(17957);
|
|
250677
|
+
|
|
250678
|
+
var extendFlat = (__webpack_require__(91307).extendFlat);
|
|
250679
|
+
|
|
250680
|
+
module.exports = extendFlat(
|
|
250681
|
+
{
|
|
250682
|
+
x: histogramAttrs.x,
|
|
250683
|
+
y: histogramAttrs.y,
|
|
250684
|
+
|
|
250685
|
+
z: {
|
|
250686
|
+
valType: 'data_array',
|
|
250687
|
+
editType: 'calc',
|
|
250688
|
+
description: 'Sets the aggregation data.'
|
|
250689
|
+
},
|
|
250690
|
+
marker: {
|
|
250691
|
+
color: {
|
|
250692
|
+
valType: 'data_array',
|
|
250693
|
+
editType: 'calc',
|
|
250694
|
+
description: 'Sets the aggregation data.'
|
|
250695
|
+
},
|
|
250696
|
+
editType: 'calc'
|
|
250697
|
+
},
|
|
250698
|
+
|
|
250699
|
+
histnorm: histogramAttrs.histnorm,
|
|
250700
|
+
histfunc: histogramAttrs.histfunc,
|
|
250701
|
+
nbinsx: histogramAttrs.nbinsx,
|
|
250702
|
+
xbins: makeBinAttrs('x'),
|
|
250703
|
+
nbinsy: histogramAttrs.nbinsy,
|
|
250704
|
+
ybins: makeBinAttrs('y'),
|
|
250705
|
+
autobinx: histogramAttrs.autobinx,
|
|
250706
|
+
autobiny: histogramAttrs.autobiny,
|
|
250707
|
+
|
|
250708
|
+
bingroup: extendFlat({}, histogramAttrs.bingroup, {
|
|
250709
|
+
description: [
|
|
250710
|
+
'Set the `xbingroup` and `ybingroup` default prefix',
|
|
250711
|
+
'For example, setting a `bingroup` of *1* on two histogram2d traces',
|
|
250712
|
+
'will make them their x-bins and y-bins match separately.'
|
|
250713
|
+
].join(' ')
|
|
250714
|
+
}),
|
|
250715
|
+
xbingroup: extendFlat({}, histogramAttrs.bingroup, {
|
|
250716
|
+
description: [
|
|
250717
|
+
'Set a group of histogram traces which will have compatible x-bin settings.',
|
|
250718
|
+
'Using `xbingroup`, histogram2d and histogram2dcontour traces ',
|
|
250719
|
+
'(on axes of the same axis type) can have compatible x-bin settings.',
|
|
250720
|
+
'Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup`'
|
|
250721
|
+
].join(' ')
|
|
250722
|
+
}),
|
|
250723
|
+
ybingroup: extendFlat({}, histogramAttrs.bingroup, {
|
|
250724
|
+
description: [
|
|
250725
|
+
'Set a group of histogram traces which will have compatible y-bin settings.',
|
|
250726
|
+
'Using `ybingroup`, histogram2d and histogram2dcontour traces ',
|
|
250727
|
+
'(on axes of the same axis type) can have compatible y-bin settings.',
|
|
250728
|
+
'Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup`'
|
|
250729
|
+
].join(' ')
|
|
250730
|
+
}),
|
|
250731
|
+
|
|
250732
|
+
xgap: heatmapAttrs.xgap,
|
|
250733
|
+
ygap: heatmapAttrs.ygap,
|
|
250734
|
+
zsmooth: heatmapAttrs.zsmooth,
|
|
250735
|
+
xhoverformat: axisHoverFormat('x'),
|
|
250736
|
+
yhoverformat: axisHoverFormat('y'),
|
|
250737
|
+
zhoverformat: axisHoverFormat('z', 1),
|
|
250738
|
+
hovertemplate: hovertemplateAttrs({}, {keys: 'z'}),
|
|
250739
|
+
texttemplate: texttemplateAttrs({
|
|
250740
|
+
arrayOk: false,
|
|
250741
|
+
editType: 'plot'
|
|
250742
|
+
}, {
|
|
250743
|
+
keys: 'z'
|
|
250744
|
+
}),
|
|
250745
|
+
textfont: heatmapAttrs.textfont,
|
|
250746
|
+
showlegend: extendFlat({}, baseAttrs.showlegend, {dflt: false})
|
|
250747
|
+
},
|
|
250748
|
+
colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
|
|
250749
|
+
);
|
|
250750
|
+
|
|
250751
|
+
|
|
250752
|
+
/***/ }),
|
|
250753
|
+
|
|
250754
|
+
/***/ 32492:
|
|
250755
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
250756
|
+
|
|
250757
|
+
|
|
250758
|
+
|
|
250759
|
+
var Lib = __webpack_require__(30991);
|
|
250760
|
+
var Axes = __webpack_require__(15076);
|
|
250761
|
+
|
|
250762
|
+
var binFunctions = __webpack_require__(47260);
|
|
250763
|
+
var normFunctions = __webpack_require__(855);
|
|
250764
|
+
var doAvg = __webpack_require__(26756);
|
|
250765
|
+
var getBinSpanLabelRound = __webpack_require__(41574);
|
|
250766
|
+
var calcAllAutoBins = (__webpack_require__(50414).calcAllAutoBins);
|
|
250767
|
+
|
|
250768
|
+
module.exports = function calc(gd, trace) {
|
|
250769
|
+
var xa = Axes.getFromId(gd, trace.xaxis);
|
|
250770
|
+
var ya = Axes.getFromId(gd, trace.yaxis);
|
|
250771
|
+
|
|
250772
|
+
var xcalendar = trace.xcalendar;
|
|
250773
|
+
var ycalendar = trace.ycalendar;
|
|
250774
|
+
var xr2c = function(v) { return xa.r2c(v, 0, xcalendar); };
|
|
250775
|
+
var yr2c = function(v) { return ya.r2c(v, 0, ycalendar); };
|
|
250776
|
+
var xc2r = function(v) { return xa.c2r(v, 0, xcalendar); };
|
|
250777
|
+
var yc2r = function(v) { return ya.c2r(v, 0, ycalendar); };
|
|
250778
|
+
|
|
250779
|
+
var i, j, n, m;
|
|
250780
|
+
|
|
250781
|
+
// calculate the bins
|
|
250782
|
+
var xBinsAndPos = calcAllAutoBins(gd, trace, xa, 'x');
|
|
250783
|
+
var xBinSpec = xBinsAndPos[0];
|
|
250784
|
+
var xPos0 = xBinsAndPos[1];
|
|
250785
|
+
var yBinsAndPos = calcAllAutoBins(gd, trace, ya, 'y');
|
|
250786
|
+
var yBinSpec = yBinsAndPos[0];
|
|
250787
|
+
var yPos0 = yBinsAndPos[1];
|
|
250788
|
+
|
|
250789
|
+
var serieslen = trace._length;
|
|
250790
|
+
if(xPos0.length > serieslen) xPos0.splice(serieslen, xPos0.length - serieslen);
|
|
250791
|
+
if(yPos0.length > serieslen) yPos0.splice(serieslen, yPos0.length - serieslen);
|
|
250792
|
+
|
|
250793
|
+
// make the empty bin array & scale the map
|
|
250794
|
+
var z = [];
|
|
250795
|
+
var onecol = [];
|
|
250796
|
+
var zerocol = [];
|
|
250797
|
+
var nonuniformBinsX = typeof xBinSpec.size === 'string';
|
|
250798
|
+
var nonuniformBinsY = typeof yBinSpec.size === 'string';
|
|
250799
|
+
var xEdges = [];
|
|
250800
|
+
var yEdges = [];
|
|
250801
|
+
var xbins = nonuniformBinsX ? xEdges : xBinSpec;
|
|
250802
|
+
var ybins = nonuniformBinsY ? yEdges : yBinSpec;
|
|
250803
|
+
var total = 0;
|
|
250804
|
+
var counts = [];
|
|
250805
|
+
var inputPoints = [];
|
|
250806
|
+
var norm = trace.histnorm;
|
|
250807
|
+
var func = trace.histfunc;
|
|
250808
|
+
var densitynorm = norm.indexOf('density') !== -1;
|
|
250809
|
+
var extremefunc = func === 'max' || func === 'min';
|
|
250810
|
+
var sizeinit = extremefunc ? null : 0;
|
|
250811
|
+
var binfunc = binFunctions.count;
|
|
250812
|
+
var normfunc = normFunctions[norm];
|
|
250813
|
+
var doavg = false;
|
|
250814
|
+
var xinc = [];
|
|
250815
|
+
var yinc = [];
|
|
250816
|
+
|
|
250817
|
+
// set a binning function other than count?
|
|
250818
|
+
// for binning functions: check first for 'z',
|
|
250819
|
+
// then 'mc' in case we had a colored scatter plot
|
|
250820
|
+
// and want to transfer these colors to the 2D histo
|
|
250821
|
+
// TODO: axe this, make it the responsibility of the app changing type? or an impliedEdit?
|
|
250822
|
+
var rawCounterData = ('z' in trace) ?
|
|
250823
|
+
trace.z :
|
|
250824
|
+
(('marker' in trace && Array.isArray(trace.marker.color)) ?
|
|
250825
|
+
trace.marker.color : '');
|
|
250826
|
+
if(rawCounterData && func !== 'count') {
|
|
250827
|
+
doavg = func === 'avg';
|
|
250828
|
+
binfunc = binFunctions[func];
|
|
250829
|
+
}
|
|
250830
|
+
|
|
250831
|
+
// decrease end a little in case of rounding errors
|
|
250832
|
+
var xBinSize = xBinSpec.size;
|
|
250833
|
+
var xBinStart = xr2c(xBinSpec.start);
|
|
250834
|
+
var xBinEnd = xr2c(xBinSpec.end) +
|
|
250835
|
+
(xBinStart - Axes.tickIncrement(xBinStart, xBinSize, false, xcalendar)) / 1e6;
|
|
250836
|
+
|
|
250837
|
+
for(i = xBinStart; i < xBinEnd; i = Axes.tickIncrement(i, xBinSize, false, xcalendar)) {
|
|
250838
|
+
onecol.push(sizeinit);
|
|
250839
|
+
xEdges.push(i);
|
|
250840
|
+
if(doavg) zerocol.push(0);
|
|
250841
|
+
}
|
|
250842
|
+
xEdges.push(i);
|
|
250843
|
+
|
|
250844
|
+
var nx = onecol.length;
|
|
250845
|
+
var dx = (i - xBinStart) / nx;
|
|
250846
|
+
var x0 = xc2r(xBinStart + dx / 2);
|
|
250847
|
+
|
|
250848
|
+
var yBinSize = yBinSpec.size;
|
|
250849
|
+
var yBinStart = yr2c(yBinSpec.start);
|
|
250850
|
+
var yBinEnd = yr2c(yBinSpec.end) +
|
|
250851
|
+
(yBinStart - Axes.tickIncrement(yBinStart, yBinSize, false, ycalendar)) / 1e6;
|
|
250852
|
+
|
|
250853
|
+
for(i = yBinStart; i < yBinEnd; i = Axes.tickIncrement(i, yBinSize, false, ycalendar)) {
|
|
250854
|
+
z.push(onecol.slice());
|
|
250855
|
+
yEdges.push(i);
|
|
250856
|
+
var ipCol = new Array(nx);
|
|
250857
|
+
for(j = 0; j < nx; j++) ipCol[j] = [];
|
|
250858
|
+
inputPoints.push(ipCol);
|
|
250859
|
+
if(doavg) counts.push(zerocol.slice());
|
|
250860
|
+
}
|
|
250861
|
+
yEdges.push(i);
|
|
250862
|
+
|
|
250863
|
+
var ny = z.length;
|
|
250864
|
+
var dy = (i - yBinStart) / ny;
|
|
250865
|
+
var y0 = yc2r(yBinStart + dy / 2);
|
|
250866
|
+
|
|
250867
|
+
if(densitynorm) {
|
|
250868
|
+
xinc = makeIncrements(onecol.length, xbins, dx, nonuniformBinsX);
|
|
250869
|
+
yinc = makeIncrements(z.length, ybins, dy, nonuniformBinsY);
|
|
250870
|
+
}
|
|
250871
|
+
|
|
250872
|
+
// for date axes we need bin bounds to be calcdata. For nonuniform bins
|
|
250873
|
+
// we already have this, but uniform with start/end/size they're still strings.
|
|
250874
|
+
if(!nonuniformBinsX && xa.type === 'date') xbins = binsToCalc(xr2c, xbins);
|
|
250875
|
+
if(!nonuniformBinsY && ya.type === 'date') ybins = binsToCalc(yr2c, ybins);
|
|
250876
|
+
|
|
250877
|
+
// put data into bins
|
|
250878
|
+
var uniqueValsPerX = true;
|
|
250879
|
+
var uniqueValsPerY = true;
|
|
250880
|
+
var xVals = new Array(nx);
|
|
250881
|
+
var yVals = new Array(ny);
|
|
250882
|
+
var xGapLow = Infinity;
|
|
250883
|
+
var xGapHigh = Infinity;
|
|
250884
|
+
var yGapLow = Infinity;
|
|
250885
|
+
var yGapHigh = Infinity;
|
|
250886
|
+
for(i = 0; i < serieslen; i++) {
|
|
250887
|
+
var xi = xPos0[i];
|
|
250888
|
+
var yi = yPos0[i];
|
|
250889
|
+
n = Lib.findBin(xi, xbins);
|
|
250890
|
+
m = Lib.findBin(yi, ybins);
|
|
250891
|
+
if(n >= 0 && n < nx && m >= 0 && m < ny) {
|
|
250892
|
+
total += binfunc(n, i, z[m], rawCounterData, counts[m]);
|
|
250893
|
+
inputPoints[m][n].push(i);
|
|
250894
|
+
|
|
250895
|
+
if(uniqueValsPerX) {
|
|
250896
|
+
if(xVals[n] === undefined) xVals[n] = xi;
|
|
250897
|
+
else if(xVals[n] !== xi) uniqueValsPerX = false;
|
|
250898
|
+
}
|
|
250899
|
+
if(uniqueValsPerY) {
|
|
250900
|
+
if(yVals[m] === undefined) yVals[m] = yi;
|
|
250901
|
+
else if(yVals[m] !== yi) uniqueValsPerY = false;
|
|
250902
|
+
}
|
|
250903
|
+
|
|
250904
|
+
xGapLow = Math.min(xGapLow, xi - xEdges[n]);
|
|
250905
|
+
xGapHigh = Math.min(xGapHigh, xEdges[n + 1] - xi);
|
|
250906
|
+
yGapLow = Math.min(yGapLow, yi - yEdges[m]);
|
|
250907
|
+
yGapHigh = Math.min(yGapHigh, yEdges[m + 1] - yi);
|
|
250908
|
+
}
|
|
250909
|
+
}
|
|
250910
|
+
// normalize, if needed
|
|
250911
|
+
if(doavg) {
|
|
250912
|
+
for(m = 0; m < ny; m++) total += doAvg(z[m], counts[m]);
|
|
250913
|
+
}
|
|
250914
|
+
if(normfunc) {
|
|
250915
|
+
for(m = 0; m < ny; m++) normfunc(z[m], total, xinc, yinc[m]);
|
|
250916
|
+
}
|
|
250917
|
+
|
|
250918
|
+
return {
|
|
250919
|
+
x: xPos0,
|
|
250920
|
+
xRanges: getRanges(xEdges, uniqueValsPerX && xVals, xGapLow, xGapHigh, xa, xcalendar),
|
|
250921
|
+
x0: x0,
|
|
250922
|
+
dx: dx,
|
|
250923
|
+
y: yPos0,
|
|
250924
|
+
yRanges: getRanges(yEdges, uniqueValsPerY && yVals, yGapLow, yGapHigh, ya, ycalendar),
|
|
250925
|
+
y0: y0,
|
|
250926
|
+
dy: dy,
|
|
250927
|
+
z: z,
|
|
250928
|
+
pts: inputPoints
|
|
250929
|
+
};
|
|
250930
|
+
};
|
|
250931
|
+
|
|
250932
|
+
function makeIncrements(len, bins, dv, nonuniform) {
|
|
250933
|
+
var out = new Array(len);
|
|
250934
|
+
var i;
|
|
250935
|
+
if(nonuniform) {
|
|
250936
|
+
for(i = 0; i < len; i++) out[i] = 1 / (bins[i + 1] - bins[i]);
|
|
250937
|
+
} else {
|
|
250938
|
+
var inc = 1 / dv;
|
|
250939
|
+
for(i = 0; i < len; i++) out[i] = inc;
|
|
250940
|
+
}
|
|
250941
|
+
return out;
|
|
250942
|
+
}
|
|
250943
|
+
|
|
250944
|
+
function binsToCalc(r2c, bins) {
|
|
250945
|
+
return {
|
|
250946
|
+
start: r2c(bins.start),
|
|
250947
|
+
end: r2c(bins.end),
|
|
250948
|
+
size: bins.size
|
|
250949
|
+
};
|
|
250950
|
+
}
|
|
250951
|
+
|
|
250952
|
+
function getRanges(edges, uniqueVals, gapLow, gapHigh, ax, calendar) {
|
|
250953
|
+
var i;
|
|
250954
|
+
var len = edges.length - 1;
|
|
250955
|
+
var out = new Array(len);
|
|
250956
|
+
var roundFn = getBinSpanLabelRound(gapLow, gapHigh, edges, ax, calendar);
|
|
250957
|
+
|
|
250958
|
+
for(i = 0; i < len; i++) {
|
|
250959
|
+
var v = (uniqueVals || [])[i];
|
|
250960
|
+
out[i] = v === undefined ?
|
|
250961
|
+
[roundFn(edges[i]), roundFn(edges[i + 1], true)] :
|
|
250962
|
+
[v, v];
|
|
250963
|
+
}
|
|
250964
|
+
return out;
|
|
250965
|
+
}
|
|
250966
|
+
|
|
250967
|
+
|
|
250968
|
+
/***/ }),
|
|
250969
|
+
|
|
250970
|
+
/***/ 15611:
|
|
250971
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
250972
|
+
|
|
250973
|
+
|
|
250974
|
+
|
|
250975
|
+
var Lib = __webpack_require__(30991);
|
|
250976
|
+
|
|
250977
|
+
var handleSampleDefaults = __webpack_require__(6236);
|
|
250978
|
+
var handleStyleDefaults = __webpack_require__(25157);
|
|
250979
|
+
var colorscaleDefaults = __webpack_require__(13682);
|
|
250980
|
+
var handleHeatmapLabelDefaults = __webpack_require__(52340);
|
|
250981
|
+
var attributes = __webpack_require__(42124);
|
|
250982
|
+
|
|
250983
|
+
|
|
250984
|
+
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
250985
|
+
function coerce(attr, dflt) {
|
|
250986
|
+
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
|
|
250987
|
+
}
|
|
250988
|
+
|
|
250989
|
+
handleSampleDefaults(traceIn, traceOut, coerce, layout);
|
|
250990
|
+
if(traceOut.visible === false) return;
|
|
250991
|
+
|
|
250992
|
+
handleStyleDefaults(traceIn, traceOut, coerce, layout);
|
|
250993
|
+
colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
|
|
250994
|
+
coerce('hovertemplate');
|
|
250995
|
+
|
|
250996
|
+
handleHeatmapLabelDefaults(coerce, layout);
|
|
250997
|
+
|
|
250998
|
+
coerce('xhoverformat');
|
|
250999
|
+
coerce('yhoverformat');
|
|
251000
|
+
};
|
|
251001
|
+
|
|
251002
|
+
|
|
251003
|
+
/***/ }),
|
|
251004
|
+
|
|
251005
|
+
/***/ 94587:
|
|
251006
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251007
|
+
|
|
251008
|
+
|
|
251009
|
+
|
|
251010
|
+
var heatmapHover = __webpack_require__(85243);
|
|
251011
|
+
var hoverLabelText = (__webpack_require__(15076).hoverLabelText);
|
|
251012
|
+
|
|
251013
|
+
module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
|
|
251014
|
+
var pts = heatmapHover(pointData, xval, yval, hovermode, opts);
|
|
251015
|
+
|
|
251016
|
+
if(!pts) return;
|
|
251017
|
+
|
|
251018
|
+
pointData = pts[0];
|
|
251019
|
+
var indices = pointData.index;
|
|
251020
|
+
var ny = indices[0];
|
|
251021
|
+
var nx = indices[1];
|
|
251022
|
+
var cd0 = pointData.cd[0];
|
|
251023
|
+
var trace = cd0.trace;
|
|
251024
|
+
var xRange = cd0.xRanges[nx];
|
|
251025
|
+
var yRange = cd0.yRanges[ny];
|
|
251026
|
+
|
|
251027
|
+
pointData.xLabel = hoverLabelText(pointData.xa, [xRange[0], xRange[1]], trace.xhoverformat);
|
|
251028
|
+
pointData.yLabel = hoverLabelText(pointData.ya, [yRange[0], yRange[1]], trace.yhoverformat);
|
|
251029
|
+
|
|
251030
|
+
return pts;
|
|
251031
|
+
};
|
|
251032
|
+
|
|
251033
|
+
|
|
251034
|
+
/***/ }),
|
|
251035
|
+
|
|
251036
|
+
/***/ 3617:
|
|
251037
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251038
|
+
|
|
251039
|
+
|
|
251040
|
+
|
|
251041
|
+
module.exports = {
|
|
251042
|
+
attributes: __webpack_require__(42124),
|
|
251043
|
+
supplyDefaults: __webpack_require__(15611),
|
|
251044
|
+
crossTraceDefaults: __webpack_require__(34294),
|
|
251045
|
+
calc: __webpack_require__(91980),
|
|
251046
|
+
plot: __webpack_require__(29406),
|
|
251047
|
+
layerName: 'heatmaplayer',
|
|
251048
|
+
colorbar: __webpack_require__(90165),
|
|
251049
|
+
style: __webpack_require__(58756),
|
|
251050
|
+
hoverPoints: __webpack_require__(94587),
|
|
251051
|
+
eventData: __webpack_require__(63870),
|
|
251052
|
+
|
|
251053
|
+
moduleType: 'trace',
|
|
251054
|
+
name: 'histogram2d',
|
|
251055
|
+
basePlotModule: __webpack_require__(47885),
|
|
251056
|
+
categories: ['cartesian', 'svg', '2dMap', 'histogram', 'showLegend'],
|
|
251057
|
+
meta: {
|
|
251058
|
+
hrName: 'histogram_2d',
|
|
251059
|
+
description: [
|
|
251060
|
+
'The sample data from which statistics are computed is set in `x`',
|
|
251061
|
+
'and `y` (where `x` and `y` represent marginal distributions,',
|
|
251062
|
+
'binning is set in `xbins` and `ybins` in this case)',
|
|
251063
|
+
'or `z` (where `z` represent the 2D distribution and binning set,',
|
|
251064
|
+
'binning is set by `x` and `y` in this case).',
|
|
251065
|
+
'The resulting distribution is visualized as a heatmap.'
|
|
251066
|
+
].join(' ')
|
|
251067
|
+
}
|
|
251068
|
+
};
|
|
251069
|
+
|
|
251070
|
+
|
|
251071
|
+
/***/ }),
|
|
251072
|
+
|
|
251073
|
+
/***/ 6236:
|
|
251074
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251075
|
+
|
|
251076
|
+
|
|
251077
|
+
|
|
251078
|
+
var Registry = __webpack_require__(13936);
|
|
251079
|
+
var Lib = __webpack_require__(30991);
|
|
251080
|
+
|
|
251081
|
+
module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout) {
|
|
251082
|
+
var x = coerce('x');
|
|
251083
|
+
var y = coerce('y');
|
|
251084
|
+
var xlen = Lib.minRowLength(x);
|
|
251085
|
+
var ylen = Lib.minRowLength(y);
|
|
251086
|
+
|
|
251087
|
+
// we could try to accept x0 and dx, etc...
|
|
251088
|
+
// but that's a pretty weird use case.
|
|
251089
|
+
// for now require both x and y explicitly specified.
|
|
251090
|
+
if(!xlen || !ylen) {
|
|
251091
|
+
traceOut.visible = false;
|
|
251092
|
+
return;
|
|
251093
|
+
}
|
|
251094
|
+
|
|
251095
|
+
traceOut._length = Math.min(xlen, ylen);
|
|
251096
|
+
|
|
251097
|
+
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
|
|
251098
|
+
handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);
|
|
251099
|
+
|
|
251100
|
+
// if marker.color is an array, we can use it in aggregation instead of z
|
|
251101
|
+
var hasAggregationData = coerce('z') || coerce('marker.color');
|
|
251102
|
+
|
|
251103
|
+
if(hasAggregationData) coerce('histfunc');
|
|
251104
|
+
coerce('histnorm');
|
|
251105
|
+
|
|
251106
|
+
// Note: bin defaults are now handled in Histogram2D.crossTraceDefaults
|
|
251107
|
+
// autobin(x|y) are only included here to appease Plotly.validate
|
|
251108
|
+
coerce('autobinx');
|
|
251109
|
+
coerce('autobiny');
|
|
251110
|
+
};
|
|
251111
|
+
|
|
251112
|
+
|
|
251113
|
+
/***/ }),
|
|
251114
|
+
|
|
251115
|
+
/***/ 34872:
|
|
251116
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251117
|
+
|
|
251118
|
+
|
|
251119
|
+
|
|
251120
|
+
var histogram2dAttrs = __webpack_require__(42124);
|
|
251121
|
+
var contourAttrs = __webpack_require__(70318);
|
|
251122
|
+
var colorScaleAttrs = __webpack_require__(17957);
|
|
251123
|
+
var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
|
|
251124
|
+
|
|
251125
|
+
var extendFlat = (__webpack_require__(91307).extendFlat);
|
|
251126
|
+
|
|
251127
|
+
module.exports = extendFlat({
|
|
251128
|
+
x: histogram2dAttrs.x,
|
|
251129
|
+
y: histogram2dAttrs.y,
|
|
251130
|
+
z: histogram2dAttrs.z,
|
|
251131
|
+
marker: histogram2dAttrs.marker,
|
|
251132
|
+
|
|
251133
|
+
histnorm: histogram2dAttrs.histnorm,
|
|
251134
|
+
histfunc: histogram2dAttrs.histfunc,
|
|
251135
|
+
nbinsx: histogram2dAttrs.nbinsx,
|
|
251136
|
+
xbins: histogram2dAttrs.xbins,
|
|
251137
|
+
nbinsy: histogram2dAttrs.nbinsy,
|
|
251138
|
+
ybins: histogram2dAttrs.ybins,
|
|
251139
|
+
autobinx: histogram2dAttrs.autobinx,
|
|
251140
|
+
autobiny: histogram2dAttrs.autobiny,
|
|
251141
|
+
|
|
251142
|
+
bingroup: histogram2dAttrs.bingroup,
|
|
251143
|
+
xbingroup: histogram2dAttrs.xbingroup,
|
|
251144
|
+
ybingroup: histogram2dAttrs.ybingroup,
|
|
251145
|
+
|
|
251146
|
+
autocontour: contourAttrs.autocontour,
|
|
251147
|
+
ncontours: contourAttrs.ncontours,
|
|
251148
|
+
contours: contourAttrs.contours,
|
|
251149
|
+
line: {
|
|
251150
|
+
color: contourAttrs.line.color,
|
|
251151
|
+
width: extendFlat({}, contourAttrs.line.width, {
|
|
251152
|
+
dflt: 0.5,
|
|
251153
|
+
description: 'Sets the contour line width in (in px)'
|
|
251154
|
+
}),
|
|
251155
|
+
dash: contourAttrs.line.dash,
|
|
251156
|
+
smoothing: contourAttrs.line.smoothing,
|
|
251157
|
+
editType: 'plot'
|
|
251158
|
+
},
|
|
251159
|
+
xhoverformat: axisHoverFormat('x'),
|
|
251160
|
+
yhoverformat: axisHoverFormat('y'),
|
|
251161
|
+
zhoverformat: axisHoverFormat('z', 1),
|
|
251162
|
+
hovertemplate: histogram2dAttrs.hovertemplate,
|
|
251163
|
+
texttemplate: contourAttrs.texttemplate,
|
|
251164
|
+
textfont: contourAttrs.textfont
|
|
251165
|
+
},
|
|
251166
|
+
colorScaleAttrs('', {
|
|
251167
|
+
cLetter: 'z',
|
|
251168
|
+
editTypeOverride: 'calc'
|
|
251169
|
+
})
|
|
251170
|
+
);
|
|
251171
|
+
|
|
251172
|
+
|
|
251173
|
+
/***/ }),
|
|
251174
|
+
|
|
251175
|
+
/***/ 14319:
|
|
251176
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251177
|
+
|
|
251178
|
+
|
|
251179
|
+
|
|
251180
|
+
var Lib = __webpack_require__(30991);
|
|
251181
|
+
|
|
251182
|
+
var handleSampleDefaults = __webpack_require__(6236);
|
|
251183
|
+
var handleContoursDefaults = __webpack_require__(657);
|
|
251184
|
+
var handleStyleDefaults = __webpack_require__(74619);
|
|
251185
|
+
var handleHeatmapLabelDefaults = __webpack_require__(52340);
|
|
251186
|
+
var attributes = __webpack_require__(34872);
|
|
251187
|
+
|
|
251188
|
+
|
|
251189
|
+
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
251190
|
+
function coerce(attr, dflt) {
|
|
251191
|
+
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
|
|
251192
|
+
}
|
|
251193
|
+
|
|
251194
|
+
function coerce2(attr) {
|
|
251195
|
+
return Lib.coerce2(traceIn, traceOut, attributes, attr);
|
|
251196
|
+
}
|
|
251197
|
+
|
|
251198
|
+
handleSampleDefaults(traceIn, traceOut, coerce, layout);
|
|
251199
|
+
if(traceOut.visible === false) return;
|
|
251200
|
+
|
|
251201
|
+
handleContoursDefaults(traceIn, traceOut, coerce, coerce2);
|
|
251202
|
+
handleStyleDefaults(traceIn, traceOut, coerce, layout);
|
|
251203
|
+
coerce('xhoverformat');
|
|
251204
|
+
coerce('yhoverformat');
|
|
251205
|
+
coerce('hovertemplate');
|
|
251206
|
+
if(
|
|
251207
|
+
traceOut.contours &&
|
|
251208
|
+
traceOut.contours.coloring === 'heatmap'
|
|
251209
|
+
) {
|
|
251210
|
+
handleHeatmapLabelDefaults(coerce, layout);
|
|
251211
|
+
}
|
|
251212
|
+
};
|
|
251213
|
+
|
|
251214
|
+
|
|
251215
|
+
/***/ }),
|
|
251216
|
+
|
|
251217
|
+
/***/ 60613:
|
|
251218
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251219
|
+
|
|
251220
|
+
|
|
251221
|
+
|
|
251222
|
+
module.exports = {
|
|
251223
|
+
attributes: __webpack_require__(34872),
|
|
251224
|
+
supplyDefaults: __webpack_require__(14319),
|
|
251225
|
+
crossTraceDefaults: __webpack_require__(34294),
|
|
251226
|
+
calc: __webpack_require__(3274),
|
|
251227
|
+
plot: (__webpack_require__(32664).plot),
|
|
251228
|
+
layerName: 'contourlayer',
|
|
251229
|
+
style: __webpack_require__(72690),
|
|
251230
|
+
colorbar: __webpack_require__(70307),
|
|
251231
|
+
hoverPoints: __webpack_require__(52353),
|
|
251232
|
+
|
|
251233
|
+
moduleType: 'trace',
|
|
251234
|
+
name: 'histogram2dcontour',
|
|
251235
|
+
basePlotModule: __webpack_require__(47885),
|
|
251236
|
+
categories: ['cartesian', 'svg', '2dMap', 'contour', 'histogram', 'showLegend'],
|
|
251237
|
+
meta: {
|
|
251238
|
+
hrName: 'histogram_2d_contour',
|
|
251239
|
+
description: [
|
|
251240
|
+
'The sample data from which statistics are computed is set in `x`',
|
|
251241
|
+
'and `y` (where `x` and `y` represent marginal distributions,',
|
|
251242
|
+
'binning is set in `xbins` and `ybins` in this case)',
|
|
251243
|
+
'or `z` (where `z` represent the 2D distribution and binning set,',
|
|
251244
|
+
'binning is set by `x` and `y` in this case).',
|
|
251245
|
+
'The resulting distribution is visualized as a contour plot.'
|
|
251246
|
+
].join(' ')
|
|
251247
|
+
}
|
|
251248
|
+
};
|
|
251249
|
+
|
|
251250
|
+
|
|
251249
251251
|
/***/ }),
|
|
251250
251252
|
|
|
251251
251253
|
/***/ 48223:
|
|
@@ -267435,993 +267437,6 @@ module.exports = function selectPoints(searchInfo, selectionTester) {
|
|
|
267435
267437
|
};
|
|
267436
267438
|
|
|
267437
267439
|
|
|
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
|
-
|
|
268425
267440
|
/***/ }),
|
|
268426
267441
|
|
|
268427
267442
|
/***/ 47213:
|
|
@@ -272352,6 +271367,993 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) {
|
|
|
272352
271367
|
};
|
|
272353
271368
|
|
|
272354
271369
|
|
|
271370
|
+
/***/ }),
|
|
271371
|
+
|
|
271372
|
+
/***/ 1015:
|
|
271373
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
271374
|
+
|
|
271375
|
+
|
|
271376
|
+
|
|
271377
|
+
var scatterAttrs = __webpack_require__(86854);
|
|
271378
|
+
var fontAttrs = __webpack_require__(70827);
|
|
271379
|
+
var colorAttributes = __webpack_require__(17957);
|
|
271380
|
+
var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
|
|
271381
|
+
var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
|
|
271382
|
+
var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
|
|
271383
|
+
var baseAttrs = __webpack_require__(35667);
|
|
271384
|
+
var DASHES = __webpack_require__(68828);
|
|
271385
|
+
|
|
271386
|
+
var MARKER_SYMBOLS = __webpack_require__(98993);
|
|
271387
|
+
var extendFlat = (__webpack_require__(91307).extendFlat);
|
|
271388
|
+
var overrideAll = (__webpack_require__(70756).overrideAll);
|
|
271389
|
+
var sortObjectKeys = __webpack_require__(99124);
|
|
271390
|
+
|
|
271391
|
+
var scatterLineAttrs = scatterAttrs.line;
|
|
271392
|
+
var scatterMarkerAttrs = scatterAttrs.marker;
|
|
271393
|
+
var scatterMarkerLineAttrs = scatterMarkerAttrs.line;
|
|
271394
|
+
|
|
271395
|
+
var lineAttrs = extendFlat({
|
|
271396
|
+
width: scatterLineAttrs.width,
|
|
271397
|
+
dash: {
|
|
271398
|
+
valType: 'enumerated',
|
|
271399
|
+
values: sortObjectKeys(DASHES),
|
|
271400
|
+
dflt: 'solid',
|
|
271401
|
+
description: 'Sets the dash style of the lines.'
|
|
271402
|
+
}
|
|
271403
|
+
}, colorAttributes('line'));
|
|
271404
|
+
|
|
271405
|
+
function makeProjectionAttr(axLetter) {
|
|
271406
|
+
return {
|
|
271407
|
+
show: {
|
|
271408
|
+
valType: 'boolean',
|
|
271409
|
+
dflt: false,
|
|
271410
|
+
description: [
|
|
271411
|
+
'Sets whether or not projections are shown along the',
|
|
271412
|
+
axLetter, 'axis.'
|
|
271413
|
+
].join(' ')
|
|
271414
|
+
},
|
|
271415
|
+
opacity: {
|
|
271416
|
+
valType: 'number',
|
|
271417
|
+
min: 0,
|
|
271418
|
+
max: 1,
|
|
271419
|
+
dflt: 1,
|
|
271420
|
+
description: 'Sets the projection color.'
|
|
271421
|
+
},
|
|
271422
|
+
scale: {
|
|
271423
|
+
valType: 'number',
|
|
271424
|
+
min: 0,
|
|
271425
|
+
max: 10,
|
|
271426
|
+
dflt: 2 / 3,
|
|
271427
|
+
description: [
|
|
271428
|
+
'Sets the scale factor determining the size of the',
|
|
271429
|
+
'projection marker points.'
|
|
271430
|
+
].join(' ')
|
|
271431
|
+
}
|
|
271432
|
+
};
|
|
271433
|
+
}
|
|
271434
|
+
|
|
271435
|
+
var attrs = module.exports = overrideAll({
|
|
271436
|
+
x: scatterAttrs.x,
|
|
271437
|
+
y: scatterAttrs.y,
|
|
271438
|
+
z: {
|
|
271439
|
+
valType: 'data_array',
|
|
271440
|
+
description: 'Sets the z coordinates.'
|
|
271441
|
+
},
|
|
271442
|
+
|
|
271443
|
+
text: extendFlat({}, scatterAttrs.text, {
|
|
271444
|
+
description: [
|
|
271445
|
+
'Sets text elements associated with each (x,y,z) triplet.',
|
|
271446
|
+
'If a single string, the same string appears over',
|
|
271447
|
+
'all the data points.',
|
|
271448
|
+
'If an array of string, the items are mapped in order to the',
|
|
271449
|
+
'this trace\'s (x,y,z) coordinates.',
|
|
271450
|
+
'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,',
|
|
271451
|
+
'these elements will be seen in the hover labels.'
|
|
271452
|
+
].join(' ')
|
|
271453
|
+
}),
|
|
271454
|
+
texttemplate: texttemplateAttrs({}, {
|
|
271455
|
+
|
|
271456
|
+
}),
|
|
271457
|
+
hovertext: extendFlat({}, scatterAttrs.hovertext, {
|
|
271458
|
+
description: [
|
|
271459
|
+
'Sets text elements associated with each (x,y,z) triplet.',
|
|
271460
|
+
'If a single string, the same string appears over',
|
|
271461
|
+
'all the data points.',
|
|
271462
|
+
'If an array of string, the items are mapped in order to the',
|
|
271463
|
+
'this trace\'s (x,y,z) coordinates.',
|
|
271464
|
+
'To be seen, trace `hoverinfo` must contain a *text* flag.'
|
|
271465
|
+
].join(' ')
|
|
271466
|
+
}),
|
|
271467
|
+
hovertemplate: hovertemplateAttrs(),
|
|
271468
|
+
|
|
271469
|
+
xhoverformat: axisHoverFormat('x'),
|
|
271470
|
+
yhoverformat: axisHoverFormat('y'),
|
|
271471
|
+
zhoverformat: axisHoverFormat('z'),
|
|
271472
|
+
|
|
271473
|
+
mode: extendFlat({}, scatterAttrs.mode, // shouldn't this be on-par with 2D?
|
|
271474
|
+
{dflt: 'lines+markers'}),
|
|
271475
|
+
surfaceaxis: {
|
|
271476
|
+
valType: 'enumerated',
|
|
271477
|
+
values: [-1, 0, 1, 2],
|
|
271478
|
+
dflt: -1,
|
|
271479
|
+
description: [
|
|
271480
|
+
'If *-1*, the scatter points are not fill with a surface',
|
|
271481
|
+
'If *0*, *1*, *2*, the scatter points are filled with',
|
|
271482
|
+
'a Delaunay surface about the x, y, z respectively.'
|
|
271483
|
+
].join(' ')
|
|
271484
|
+
},
|
|
271485
|
+
surfacecolor: {
|
|
271486
|
+
valType: 'color',
|
|
271487
|
+
description: 'Sets the surface fill color.'
|
|
271488
|
+
},
|
|
271489
|
+
projection: {
|
|
271490
|
+
x: makeProjectionAttr('x'),
|
|
271491
|
+
y: makeProjectionAttr('y'),
|
|
271492
|
+
z: makeProjectionAttr('z')
|
|
271493
|
+
},
|
|
271494
|
+
|
|
271495
|
+
connectgaps: scatterAttrs.connectgaps,
|
|
271496
|
+
line: lineAttrs,
|
|
271497
|
+
|
|
271498
|
+
marker: extendFlat({ // Parity with scatter.js?
|
|
271499
|
+
symbol: {
|
|
271500
|
+
valType: 'enumerated',
|
|
271501
|
+
values: sortObjectKeys(MARKER_SYMBOLS),
|
|
271502
|
+
dflt: 'circle',
|
|
271503
|
+
arrayOk: true,
|
|
271504
|
+
description: 'Sets the marker symbol type.'
|
|
271505
|
+
},
|
|
271506
|
+
size: extendFlat({}, scatterMarkerAttrs.size, {dflt: 8}),
|
|
271507
|
+
sizeref: scatterMarkerAttrs.sizeref,
|
|
271508
|
+
sizemin: scatterMarkerAttrs.sizemin,
|
|
271509
|
+
sizemode: scatterMarkerAttrs.sizemode,
|
|
271510
|
+
opacity: extendFlat({}, scatterMarkerAttrs.opacity, {
|
|
271511
|
+
arrayOk: false,
|
|
271512
|
+
description: [
|
|
271513
|
+
'Sets the marker opacity.',
|
|
271514
|
+
'Note that the marker opacity for scatter3d traces',
|
|
271515
|
+
'must be a scalar value for performance reasons.',
|
|
271516
|
+
'To set a blending opacity value',
|
|
271517
|
+
'(i.e. which is not transparent), set *marker.color*',
|
|
271518
|
+
'to an rgba color and use its alpha channel.'
|
|
271519
|
+
].join(' ')
|
|
271520
|
+
}),
|
|
271521
|
+
colorbar: scatterMarkerAttrs.colorbar,
|
|
271522
|
+
|
|
271523
|
+
line: extendFlat({
|
|
271524
|
+
width: extendFlat({}, scatterMarkerLineAttrs.width, {arrayOk: false})
|
|
271525
|
+
},
|
|
271526
|
+
colorAttributes('marker.line')
|
|
271527
|
+
)
|
|
271528
|
+
},
|
|
271529
|
+
colorAttributes('marker')
|
|
271530
|
+
),
|
|
271531
|
+
|
|
271532
|
+
textposition: extendFlat({}, scatterAttrs.textposition, {dflt: 'top center'}),
|
|
271533
|
+
textfont: fontAttrs({
|
|
271534
|
+
noFontShadow: true,
|
|
271535
|
+
noFontLineposition: true,
|
|
271536
|
+
noFontTextcase: true,
|
|
271537
|
+
editType: 'calc',
|
|
271538
|
+
colorEditType: 'style',
|
|
271539
|
+
arrayOk: true,
|
|
271540
|
+
variantValues: ['normal', 'small-caps'],
|
|
271541
|
+
description: 'Sets the text font.'
|
|
271542
|
+
}),
|
|
271543
|
+
|
|
271544
|
+
opacity: baseAttrs.opacity,
|
|
271545
|
+
|
|
271546
|
+
hoverinfo: extendFlat({}, baseAttrs.hoverinfo)
|
|
271547
|
+
}, 'calc', 'nested');
|
|
271548
|
+
|
|
271549
|
+
attrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';
|
|
271550
|
+
|
|
271551
|
+
|
|
271552
|
+
/***/ }),
|
|
271553
|
+
|
|
271554
|
+
/***/ 30935:
|
|
271555
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
271556
|
+
|
|
271557
|
+
|
|
271558
|
+
|
|
271559
|
+
var arraysToCalcdata = __webpack_require__(47213);
|
|
271560
|
+
var calcColorscale = __webpack_require__(59498);
|
|
271561
|
+
|
|
271562
|
+
/**
|
|
271563
|
+
* This is a kludge to put the array attributes into
|
|
271564
|
+
* calcdata the way Scatter.plot does, so that legends and
|
|
271565
|
+
* popovers know what to do with them.
|
|
271566
|
+
*/
|
|
271567
|
+
module.exports = function calc(gd, trace) {
|
|
271568
|
+
var cd = [{x: false, y: false, trace: trace, t: {}}];
|
|
271569
|
+
|
|
271570
|
+
arraysToCalcdata(cd, trace);
|
|
271571
|
+
calcColorscale(gd, trace);
|
|
271572
|
+
|
|
271573
|
+
return cd;
|
|
271574
|
+
};
|
|
271575
|
+
|
|
271576
|
+
|
|
271577
|
+
/***/ }),
|
|
271578
|
+
|
|
271579
|
+
/***/ 77681:
|
|
271580
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
271581
|
+
|
|
271582
|
+
|
|
271583
|
+
|
|
271584
|
+
var Registry = __webpack_require__(13936);
|
|
271585
|
+
|
|
271586
|
+
function calculateAxisErrors(data, params, scaleFactor, axis) {
|
|
271587
|
+
if(!params || !params.visible) return null;
|
|
271588
|
+
|
|
271589
|
+
var computeError = Registry.getComponentMethod('errorbars', 'makeComputeError')(params);
|
|
271590
|
+
var result = new Array(data.length);
|
|
271591
|
+
|
|
271592
|
+
for(var i = 0; i < data.length; i++) {
|
|
271593
|
+
var errors = computeError(+data[i], i);
|
|
271594
|
+
|
|
271595
|
+
if(axis.type === 'log') {
|
|
271596
|
+
var point = axis.c2l(data[i]);
|
|
271597
|
+
var min = data[i] - errors[0];
|
|
271598
|
+
var max = data[i] + errors[1];
|
|
271599
|
+
|
|
271600
|
+
result[i] = [
|
|
271601
|
+
(axis.c2l(min, true) - point) * scaleFactor,
|
|
271602
|
+
(axis.c2l(max, true) - point) * scaleFactor
|
|
271603
|
+
];
|
|
271604
|
+
|
|
271605
|
+
// Keep track of the lower error bound which isn't negative!
|
|
271606
|
+
if(min > 0) {
|
|
271607
|
+
var lower = axis.c2l(min);
|
|
271608
|
+
if(!axis._lowerLogErrorBound) axis._lowerLogErrorBound = lower;
|
|
271609
|
+
axis._lowerErrorBound = Math.min(axis._lowerLogErrorBound, lower);
|
|
271610
|
+
}
|
|
271611
|
+
} else {
|
|
271612
|
+
result[i] = [
|
|
271613
|
+
-errors[0] * scaleFactor,
|
|
271614
|
+
errors[1] * scaleFactor
|
|
271615
|
+
];
|
|
271616
|
+
}
|
|
271617
|
+
}
|
|
271618
|
+
|
|
271619
|
+
return result;
|
|
271620
|
+
}
|
|
271621
|
+
|
|
271622
|
+
function dataLength(array) {
|
|
271623
|
+
for(var i = 0; i < array.length; i++) {
|
|
271624
|
+
if(array[i]) return array[i].length;
|
|
271625
|
+
}
|
|
271626
|
+
return 0;
|
|
271627
|
+
}
|
|
271628
|
+
|
|
271629
|
+
function calculateErrors(data, scaleFactor, sceneLayout) {
|
|
271630
|
+
var errors = [
|
|
271631
|
+
calculateAxisErrors(data.x, data.error_x, scaleFactor[0], sceneLayout.xaxis),
|
|
271632
|
+
calculateAxisErrors(data.y, data.error_y, scaleFactor[1], sceneLayout.yaxis),
|
|
271633
|
+
calculateAxisErrors(data.z, data.error_z, scaleFactor[2], sceneLayout.zaxis)
|
|
271634
|
+
];
|
|
271635
|
+
|
|
271636
|
+
var n = dataLength(errors);
|
|
271637
|
+
if(n === 0) return null;
|
|
271638
|
+
|
|
271639
|
+
var errorBounds = new Array(n);
|
|
271640
|
+
|
|
271641
|
+
for(var i = 0; i < n; i++) {
|
|
271642
|
+
var bound = [[0, 0, 0], [0, 0, 0]];
|
|
271643
|
+
|
|
271644
|
+
for(var j = 0; j < 3; j++) {
|
|
271645
|
+
if(errors[j]) {
|
|
271646
|
+
for(var k = 0; k < 2; k++) {
|
|
271647
|
+
bound[k][j] = errors[j][i][k];
|
|
271648
|
+
}
|
|
271649
|
+
}
|
|
271650
|
+
}
|
|
271651
|
+
|
|
271652
|
+
errorBounds[i] = bound;
|
|
271653
|
+
}
|
|
271654
|
+
|
|
271655
|
+
return errorBounds;
|
|
271656
|
+
}
|
|
271657
|
+
|
|
271658
|
+
module.exports = calculateErrors;
|
|
271659
|
+
|
|
271660
|
+
|
|
271661
|
+
/***/ }),
|
|
271662
|
+
|
|
271663
|
+
/***/ 93219:
|
|
271664
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
271665
|
+
|
|
271666
|
+
|
|
271667
|
+
|
|
271668
|
+
var createLinePlot = (__webpack_require__(46000).gl_line3d);
|
|
271669
|
+
var createScatterPlot = (__webpack_require__(46000).gl_scatter3d);
|
|
271670
|
+
var createErrorBars = (__webpack_require__(46000).gl_error3d);
|
|
271671
|
+
var createMesh = (__webpack_require__(46000).gl_mesh3d);
|
|
271672
|
+
var triangulate = (__webpack_require__(46000).delaunay_triangulate);
|
|
271673
|
+
|
|
271674
|
+
var Lib = __webpack_require__(30991);
|
|
271675
|
+
var str2RgbaArray = __webpack_require__(44960);
|
|
271676
|
+
var formatColor = (__webpack_require__(592).formatColor);
|
|
271677
|
+
var makeBubbleSizeFn = __webpack_require__(42581);
|
|
271678
|
+
var DASH_PATTERNS = __webpack_require__(68828);
|
|
271679
|
+
var MARKER_SYMBOLS = __webpack_require__(98993);
|
|
271680
|
+
|
|
271681
|
+
var Axes = __webpack_require__(15076);
|
|
271682
|
+
var appendArrayPointValue = (__webpack_require__(2918).appendArrayPointValue);
|
|
271683
|
+
|
|
271684
|
+
var calculateError = __webpack_require__(77681);
|
|
271685
|
+
|
|
271686
|
+
function LineWithMarkers(scene, uid) {
|
|
271687
|
+
this.scene = scene;
|
|
271688
|
+
this.uid = uid;
|
|
271689
|
+
this.linePlot = null;
|
|
271690
|
+
this.scatterPlot = null;
|
|
271691
|
+
this.errorBars = null;
|
|
271692
|
+
this.textMarkers = null;
|
|
271693
|
+
this.delaunayMesh = null;
|
|
271694
|
+
this.color = null;
|
|
271695
|
+
this.mode = '';
|
|
271696
|
+
this.dataPoints = [];
|
|
271697
|
+
this.axesBounds = [
|
|
271698
|
+
[-Infinity, -Infinity, -Infinity],
|
|
271699
|
+
[Infinity, Infinity, Infinity]
|
|
271700
|
+
];
|
|
271701
|
+
this.textLabels = null;
|
|
271702
|
+
this.data = null;
|
|
271703
|
+
}
|
|
271704
|
+
|
|
271705
|
+
var proto = LineWithMarkers.prototype;
|
|
271706
|
+
|
|
271707
|
+
proto.handlePick = function(selection) {
|
|
271708
|
+
if(selection.object &&
|
|
271709
|
+
(selection.object === this.linePlot ||
|
|
271710
|
+
selection.object === this.delaunayMesh ||
|
|
271711
|
+
selection.object === this.textMarkers ||
|
|
271712
|
+
selection.object === this.scatterPlot)
|
|
271713
|
+
) {
|
|
271714
|
+
var ind = selection.index = selection.data.index;
|
|
271715
|
+
|
|
271716
|
+
if(selection.object.highlight) {
|
|
271717
|
+
selection.object.highlight(null);
|
|
271718
|
+
}
|
|
271719
|
+
if(this.scatterPlot) {
|
|
271720
|
+
selection.object = this.scatterPlot;
|
|
271721
|
+
this.scatterPlot.highlight(selection.data);
|
|
271722
|
+
}
|
|
271723
|
+
|
|
271724
|
+
selection.textLabel = '';
|
|
271725
|
+
if(this.textLabels) {
|
|
271726
|
+
if(Lib.isArrayOrTypedArray(this.textLabels)) {
|
|
271727
|
+
if(this.textLabels[ind] || this.textLabels[ind] === 0) {
|
|
271728
|
+
selection.textLabel = this.textLabels[ind];
|
|
271729
|
+
}
|
|
271730
|
+
} else {
|
|
271731
|
+
selection.textLabel = this.textLabels;
|
|
271732
|
+
}
|
|
271733
|
+
}
|
|
271734
|
+
|
|
271735
|
+
selection.traceCoordinate = [
|
|
271736
|
+
this.data.x[ind],
|
|
271737
|
+
this.data.y[ind],
|
|
271738
|
+
this.data.z[ind]
|
|
271739
|
+
];
|
|
271740
|
+
|
|
271741
|
+
return true;
|
|
271742
|
+
}
|
|
271743
|
+
};
|
|
271744
|
+
|
|
271745
|
+
function constructDelaunay(points, color, axis) {
|
|
271746
|
+
var u = (axis + 1) % 3;
|
|
271747
|
+
var v = (axis + 2) % 3;
|
|
271748
|
+
var filteredPoints = [];
|
|
271749
|
+
var filteredIds = [];
|
|
271750
|
+
var i;
|
|
271751
|
+
|
|
271752
|
+
for(i = 0; i < points.length; ++i) {
|
|
271753
|
+
var p = points[i];
|
|
271754
|
+
if(isNaN(p[u]) || !isFinite(p[u]) ||
|
|
271755
|
+
isNaN(p[v]) || !isFinite(p[v])) {
|
|
271756
|
+
continue;
|
|
271757
|
+
}
|
|
271758
|
+
filteredPoints.push([p[u], p[v]]);
|
|
271759
|
+
filteredIds.push(i);
|
|
271760
|
+
}
|
|
271761
|
+
var cells = triangulate(filteredPoints);
|
|
271762
|
+
for(i = 0; i < cells.length; ++i) {
|
|
271763
|
+
var c = cells[i];
|
|
271764
|
+
for(var j = 0; j < c.length; ++j) {
|
|
271765
|
+
c[j] = filteredIds[c[j]];
|
|
271766
|
+
}
|
|
271767
|
+
}
|
|
271768
|
+
return {
|
|
271769
|
+
positions: points,
|
|
271770
|
+
cells: cells,
|
|
271771
|
+
meshColor: color
|
|
271772
|
+
};
|
|
271773
|
+
}
|
|
271774
|
+
|
|
271775
|
+
function calculateErrorParams(errors) {
|
|
271776
|
+
var capSize = [0.0, 0.0, 0.0];
|
|
271777
|
+
var color = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];
|
|
271778
|
+
var lineWidth = [1.0, 1.0, 1.0];
|
|
271779
|
+
|
|
271780
|
+
for(var i = 0; i < 3; i++) {
|
|
271781
|
+
var e = errors[i];
|
|
271782
|
+
|
|
271783
|
+
if(e && e.copy_zstyle !== false && errors[2].visible !== false) e = errors[2];
|
|
271784
|
+
if(!e || !e.visible) continue;
|
|
271785
|
+
|
|
271786
|
+
capSize[i] = e.width / 2; // ballpark rescaling
|
|
271787
|
+
color[i] = str2RgbaArray(e.color);
|
|
271788
|
+
lineWidth[i] = e.thickness;
|
|
271789
|
+
}
|
|
271790
|
+
|
|
271791
|
+
return {capSize: capSize, color: color, lineWidth: lineWidth};
|
|
271792
|
+
}
|
|
271793
|
+
|
|
271794
|
+
function parseAlignmentX(a) {
|
|
271795
|
+
if(a === null || a === undefined) return 0;
|
|
271796
|
+
|
|
271797
|
+
return (a.indexOf('left') > -1) ? -1 :
|
|
271798
|
+
(a.indexOf('right') > -1) ? 1 : 0;
|
|
271799
|
+
}
|
|
271800
|
+
|
|
271801
|
+
function parseAlignmentY(a) {
|
|
271802
|
+
if(a === null || a === undefined) return 0;
|
|
271803
|
+
|
|
271804
|
+
return (a.indexOf('top') > -1) ? -1 :
|
|
271805
|
+
(a.indexOf('bottom') > -1) ? 1 : 0;
|
|
271806
|
+
}
|
|
271807
|
+
|
|
271808
|
+
function calculateTextOffset(tp) {
|
|
271809
|
+
// Read out text properties
|
|
271810
|
+
|
|
271811
|
+
var defaultAlignmentX = 0;
|
|
271812
|
+
var defaultAlignmentY = 0;
|
|
271813
|
+
|
|
271814
|
+
var textOffset = [
|
|
271815
|
+
defaultAlignmentX,
|
|
271816
|
+
defaultAlignmentY
|
|
271817
|
+
];
|
|
271818
|
+
|
|
271819
|
+
if(Array.isArray(tp)) {
|
|
271820
|
+
for(var i = 0; i < tp.length; i++) {
|
|
271821
|
+
textOffset[i] = [
|
|
271822
|
+
defaultAlignmentX,
|
|
271823
|
+
defaultAlignmentY
|
|
271824
|
+
];
|
|
271825
|
+
if(tp[i]) {
|
|
271826
|
+
textOffset[i][0] = parseAlignmentX(tp[i]);
|
|
271827
|
+
textOffset[i][1] = parseAlignmentY(tp[i]);
|
|
271828
|
+
}
|
|
271829
|
+
}
|
|
271830
|
+
} else {
|
|
271831
|
+
textOffset[0] = parseAlignmentX(tp);
|
|
271832
|
+
textOffset[1] = parseAlignmentY(tp);
|
|
271833
|
+
}
|
|
271834
|
+
|
|
271835
|
+
return textOffset;
|
|
271836
|
+
}
|
|
271837
|
+
|
|
271838
|
+
|
|
271839
|
+
function calculateSize(sizeIn, sizeFn) {
|
|
271840
|
+
// rough parity with Plotly 2D markers
|
|
271841
|
+
return sizeFn(sizeIn * 4);
|
|
271842
|
+
}
|
|
271843
|
+
|
|
271844
|
+
function calculateSymbol(symbolIn) {
|
|
271845
|
+
return MARKER_SYMBOLS[symbolIn];
|
|
271846
|
+
}
|
|
271847
|
+
|
|
271848
|
+
function formatParam(paramIn, len, calculate, dflt, extraFn) {
|
|
271849
|
+
var paramOut = null;
|
|
271850
|
+
|
|
271851
|
+
if(Lib.isArrayOrTypedArray(paramIn)) {
|
|
271852
|
+
paramOut = [];
|
|
271853
|
+
|
|
271854
|
+
for(var i = 0; i < len; i++) {
|
|
271855
|
+
if(paramIn[i] === undefined) paramOut[i] = dflt;
|
|
271856
|
+
else paramOut[i] = calculate(paramIn[i], extraFn);
|
|
271857
|
+
}
|
|
271858
|
+
} else paramOut = calculate(paramIn, Lib.identity);
|
|
271859
|
+
|
|
271860
|
+
return paramOut;
|
|
271861
|
+
}
|
|
271862
|
+
|
|
271863
|
+
|
|
271864
|
+
function convertPlotlyOptions(scene, data) {
|
|
271865
|
+
var points = [];
|
|
271866
|
+
var sceneLayout = scene.fullSceneLayout;
|
|
271867
|
+
var scaleFactor = scene.dataScale;
|
|
271868
|
+
var xaxis = sceneLayout.xaxis;
|
|
271869
|
+
var yaxis = sceneLayout.yaxis;
|
|
271870
|
+
var zaxis = sceneLayout.zaxis;
|
|
271871
|
+
var marker = data.marker;
|
|
271872
|
+
var line = data.line;
|
|
271873
|
+
var x = data.x || [];
|
|
271874
|
+
var y = data.y || [];
|
|
271875
|
+
var z = data.z || [];
|
|
271876
|
+
var len = x.length;
|
|
271877
|
+
var xcalendar = data.xcalendar;
|
|
271878
|
+
var ycalendar = data.ycalendar;
|
|
271879
|
+
var zcalendar = data.zcalendar;
|
|
271880
|
+
var xc, yc, zc;
|
|
271881
|
+
var params, i;
|
|
271882
|
+
var text;
|
|
271883
|
+
|
|
271884
|
+
// Convert points
|
|
271885
|
+
for(i = 0; i < len; i++) {
|
|
271886
|
+
// sanitize numbers and apply transforms based on axes.type
|
|
271887
|
+
xc = xaxis.d2l(x[i], 0, xcalendar) * scaleFactor[0];
|
|
271888
|
+
yc = yaxis.d2l(y[i], 0, ycalendar) * scaleFactor[1];
|
|
271889
|
+
zc = zaxis.d2l(z[i], 0, zcalendar) * scaleFactor[2];
|
|
271890
|
+
|
|
271891
|
+
points[i] = [xc, yc, zc];
|
|
271892
|
+
}
|
|
271893
|
+
|
|
271894
|
+
// convert text
|
|
271895
|
+
if(Array.isArray(data.text)) {
|
|
271896
|
+
text = data.text;
|
|
271897
|
+
} else if(Lib.isTypedArray(data.text)) {
|
|
271898
|
+
text = Array.from(data.text);
|
|
271899
|
+
} else if(data.text !== undefined) {
|
|
271900
|
+
text = new Array(len);
|
|
271901
|
+
for(i = 0; i < len; i++) text[i] = data.text;
|
|
271902
|
+
}
|
|
271903
|
+
|
|
271904
|
+
function formatter(axName, val) {
|
|
271905
|
+
var ax = sceneLayout[axName];
|
|
271906
|
+
return Axes.tickText(ax, ax.d2l(val), true).text;
|
|
271907
|
+
}
|
|
271908
|
+
|
|
271909
|
+
// check texttemplate
|
|
271910
|
+
var texttemplate = data.texttemplate;
|
|
271911
|
+
if(texttemplate) {
|
|
271912
|
+
var fullLayout = scene.fullLayout;
|
|
271913
|
+
var d3locale = fullLayout._d3locale;
|
|
271914
|
+
var isArray = Array.isArray(texttemplate);
|
|
271915
|
+
var N = isArray ? Math.min(texttemplate.length, len) : len;
|
|
271916
|
+
var txt = isArray ?
|
|
271917
|
+
function(i) { return texttemplate[i]; } :
|
|
271918
|
+
function() { return texttemplate; };
|
|
271919
|
+
|
|
271920
|
+
text = new Array(N);
|
|
271921
|
+
|
|
271922
|
+
for(i = 0; i < N; i++) {
|
|
271923
|
+
var d = {x: x[i], y: y[i], z: z[i]};
|
|
271924
|
+
var labels = {
|
|
271925
|
+
xLabel: formatter('xaxis', x[i]),
|
|
271926
|
+
yLabel: formatter('yaxis', y[i]),
|
|
271927
|
+
zLabel: formatter('zaxis', z[i])
|
|
271928
|
+
};
|
|
271929
|
+
var pointValues = {};
|
|
271930
|
+
appendArrayPointValue(pointValues, data, i);
|
|
271931
|
+
var meta = data._meta || {};
|
|
271932
|
+
text[i] = Lib.texttemplateString(txt(i), labels, d3locale, pointValues, d, meta);
|
|
271933
|
+
}
|
|
271934
|
+
}
|
|
271935
|
+
|
|
271936
|
+
// Build object parameters
|
|
271937
|
+
params = {
|
|
271938
|
+
position: points,
|
|
271939
|
+
mode: data.mode,
|
|
271940
|
+
text: text
|
|
271941
|
+
};
|
|
271942
|
+
|
|
271943
|
+
if('line' in data) {
|
|
271944
|
+
params.lineColor = formatColor(line, 1, len);
|
|
271945
|
+
params.lineWidth = line.width;
|
|
271946
|
+
params.lineDashes = line.dash;
|
|
271947
|
+
}
|
|
271948
|
+
|
|
271949
|
+
if('marker' in data) {
|
|
271950
|
+
var sizeFn = makeBubbleSizeFn(data);
|
|
271951
|
+
|
|
271952
|
+
params.scatterColor = formatColor(marker, 1, len);
|
|
271953
|
+
params.scatterSize = formatParam(marker.size, len, calculateSize, 20, sizeFn);
|
|
271954
|
+
params.scatterMarker = formatParam(marker.symbol, len, calculateSymbol, '●');
|
|
271955
|
+
params.scatterLineWidth = marker.line.width; // arrayOk === false
|
|
271956
|
+
params.scatterLineColor = formatColor(marker.line, 1, len);
|
|
271957
|
+
params.scatterAngle = 0;
|
|
271958
|
+
}
|
|
271959
|
+
|
|
271960
|
+
if('textposition' in data) {
|
|
271961
|
+
params.textOffset = calculateTextOffset(data.textposition);
|
|
271962
|
+
params.textColor = formatColor(data.textfont, 1, len);
|
|
271963
|
+
params.textSize = formatParam(data.textfont.size, len, Lib.identity, 12);
|
|
271964
|
+
params.textFontFamily = data.textfont.family;
|
|
271965
|
+
params.textFontWeight = data.textfont.weight;
|
|
271966
|
+
params.textFontStyle = data.textfont.style;
|
|
271967
|
+
params.textFontVariant = data.textfont.variant;
|
|
271968
|
+
params.textAngle = 0;
|
|
271969
|
+
}
|
|
271970
|
+
|
|
271971
|
+
var dims = ['x', 'y', 'z'];
|
|
271972
|
+
params.project = [false, false, false];
|
|
271973
|
+
params.projectScale = [1, 1, 1];
|
|
271974
|
+
params.projectOpacity = [1, 1, 1];
|
|
271975
|
+
for(i = 0; i < 3; ++i) {
|
|
271976
|
+
var projection = data.projection[dims[i]];
|
|
271977
|
+
if((params.project[i] = projection.show)) {
|
|
271978
|
+
params.projectOpacity[i] = projection.opacity;
|
|
271979
|
+
params.projectScale[i] = projection.scale;
|
|
271980
|
+
}
|
|
271981
|
+
}
|
|
271982
|
+
|
|
271983
|
+
params.errorBounds = calculateError(data, scaleFactor, sceneLayout);
|
|
271984
|
+
|
|
271985
|
+
var errorParams = calculateErrorParams([data.error_x, data.error_y, data.error_z]);
|
|
271986
|
+
params.errorColor = errorParams.color;
|
|
271987
|
+
params.errorLineWidth = errorParams.lineWidth;
|
|
271988
|
+
params.errorCapSize = errorParams.capSize;
|
|
271989
|
+
|
|
271990
|
+
params.delaunayAxis = data.surfaceaxis;
|
|
271991
|
+
params.delaunayColor = str2RgbaArray(data.surfacecolor);
|
|
271992
|
+
|
|
271993
|
+
return params;
|
|
271994
|
+
}
|
|
271995
|
+
|
|
271996
|
+
function _arrayToColor(color) {
|
|
271997
|
+
if(Lib.isArrayOrTypedArray(color)) {
|
|
271998
|
+
var c = color[0];
|
|
271999
|
+
|
|
272000
|
+
if(Lib.isArrayOrTypedArray(c)) color = c;
|
|
272001
|
+
|
|
272002
|
+
return 'rgb(' + color.slice(0, 3).map(function(x) {
|
|
272003
|
+
return Math.round(x * 255);
|
|
272004
|
+
}) + ')';
|
|
272005
|
+
}
|
|
272006
|
+
|
|
272007
|
+
return null;
|
|
272008
|
+
}
|
|
272009
|
+
|
|
272010
|
+
function arrayToColor(colors) {
|
|
272011
|
+
if(!Lib.isArrayOrTypedArray(colors)) {
|
|
272012
|
+
return null;
|
|
272013
|
+
}
|
|
272014
|
+
|
|
272015
|
+
if((colors.length === 4) && (typeof colors[0] === 'number')) {
|
|
272016
|
+
return _arrayToColor(colors);
|
|
272017
|
+
}
|
|
272018
|
+
|
|
272019
|
+
return colors.map(_arrayToColor);
|
|
272020
|
+
}
|
|
272021
|
+
|
|
272022
|
+
proto.update = function(data) {
|
|
272023
|
+
var gl = this.scene.glplot.gl;
|
|
272024
|
+
var lineOptions;
|
|
272025
|
+
var scatterOptions;
|
|
272026
|
+
var errorOptions;
|
|
272027
|
+
var textOptions;
|
|
272028
|
+
var dashPattern = DASH_PATTERNS.solid;
|
|
272029
|
+
|
|
272030
|
+
// Save data
|
|
272031
|
+
this.data = data;
|
|
272032
|
+
|
|
272033
|
+
// Run data conversion
|
|
272034
|
+
var options = convertPlotlyOptions(this.scene, data);
|
|
272035
|
+
|
|
272036
|
+
if('mode' in options) {
|
|
272037
|
+
this.mode = options.mode;
|
|
272038
|
+
}
|
|
272039
|
+
if('lineDashes' in options) {
|
|
272040
|
+
if(options.lineDashes in DASH_PATTERNS) {
|
|
272041
|
+
dashPattern = DASH_PATTERNS[options.lineDashes];
|
|
272042
|
+
}
|
|
272043
|
+
}
|
|
272044
|
+
|
|
272045
|
+
this.color = arrayToColor(options.scatterColor) ||
|
|
272046
|
+
arrayToColor(options.lineColor);
|
|
272047
|
+
|
|
272048
|
+
// Save data points
|
|
272049
|
+
this.dataPoints = options.position;
|
|
272050
|
+
|
|
272051
|
+
lineOptions = {
|
|
272052
|
+
gl: this.scene.glplot.gl,
|
|
272053
|
+
position: options.position,
|
|
272054
|
+
color: options.lineColor,
|
|
272055
|
+
lineWidth: options.lineWidth || 1,
|
|
272056
|
+
dashes: dashPattern[0],
|
|
272057
|
+
dashScale: dashPattern[1],
|
|
272058
|
+
opacity: data.opacity,
|
|
272059
|
+
connectGaps: data.connectgaps
|
|
272060
|
+
};
|
|
272061
|
+
|
|
272062
|
+
if(this.mode.indexOf('lines') !== -1) {
|
|
272063
|
+
if(this.linePlot) this.linePlot.update(lineOptions);
|
|
272064
|
+
else {
|
|
272065
|
+
this.linePlot = createLinePlot(lineOptions);
|
|
272066
|
+
this.linePlot._trace = this;
|
|
272067
|
+
this.scene.glplot.add(this.linePlot);
|
|
272068
|
+
}
|
|
272069
|
+
} else if(this.linePlot) {
|
|
272070
|
+
this.scene.glplot.remove(this.linePlot);
|
|
272071
|
+
this.linePlot.dispose();
|
|
272072
|
+
this.linePlot = null;
|
|
272073
|
+
}
|
|
272074
|
+
|
|
272075
|
+
// N.B. marker.opacity must be a scalar for performance
|
|
272076
|
+
var scatterOpacity = data.opacity;
|
|
272077
|
+
if(data.marker && data.marker.opacity !== undefined) scatterOpacity *= data.marker.opacity;
|
|
272078
|
+
|
|
272079
|
+
scatterOptions = {
|
|
272080
|
+
gl: this.scene.glplot.gl,
|
|
272081
|
+
position: options.position,
|
|
272082
|
+
color: options.scatterColor,
|
|
272083
|
+
size: options.scatterSize,
|
|
272084
|
+
glyph: options.scatterMarker,
|
|
272085
|
+
opacity: scatterOpacity,
|
|
272086
|
+
orthographic: true,
|
|
272087
|
+
lineWidth: options.scatterLineWidth,
|
|
272088
|
+
lineColor: options.scatterLineColor,
|
|
272089
|
+
project: options.project,
|
|
272090
|
+
projectScale: options.projectScale,
|
|
272091
|
+
projectOpacity: options.projectOpacity
|
|
272092
|
+
};
|
|
272093
|
+
|
|
272094
|
+
if(this.mode.indexOf('markers') !== -1) {
|
|
272095
|
+
if(this.scatterPlot) this.scatterPlot.update(scatterOptions);
|
|
272096
|
+
else {
|
|
272097
|
+
this.scatterPlot = createScatterPlot(scatterOptions);
|
|
272098
|
+
this.scatterPlot._trace = this;
|
|
272099
|
+
this.scatterPlot.highlightScale = 1;
|
|
272100
|
+
this.scene.glplot.add(this.scatterPlot);
|
|
272101
|
+
}
|
|
272102
|
+
} else if(this.scatterPlot) {
|
|
272103
|
+
this.scene.glplot.remove(this.scatterPlot);
|
|
272104
|
+
this.scatterPlot.dispose();
|
|
272105
|
+
this.scatterPlot = null;
|
|
272106
|
+
}
|
|
272107
|
+
|
|
272108
|
+
textOptions = {
|
|
272109
|
+
gl: this.scene.glplot.gl,
|
|
272110
|
+
position: options.position,
|
|
272111
|
+
glyph: options.text,
|
|
272112
|
+
color: options.textColor,
|
|
272113
|
+
size: options.textSize,
|
|
272114
|
+
angle: options.textAngle,
|
|
272115
|
+
alignment: options.textOffset,
|
|
272116
|
+
font: options.textFontFamily,
|
|
272117
|
+
fontWeight: options.textFontWeight,
|
|
272118
|
+
fontStyle: options.textFontStyle,
|
|
272119
|
+
fontVariant: options.textFontVariant,
|
|
272120
|
+
orthographic: true,
|
|
272121
|
+
lineWidth: 0,
|
|
272122
|
+
project: false,
|
|
272123
|
+
opacity: data.opacity
|
|
272124
|
+
};
|
|
272125
|
+
|
|
272126
|
+
this.textLabels = data.hovertext || data.text;
|
|
272127
|
+
|
|
272128
|
+
if(this.mode.indexOf('text') !== -1) {
|
|
272129
|
+
if(this.textMarkers) this.textMarkers.update(textOptions);
|
|
272130
|
+
else {
|
|
272131
|
+
this.textMarkers = createScatterPlot(textOptions);
|
|
272132
|
+
this.textMarkers._trace = this;
|
|
272133
|
+
this.textMarkers.highlightScale = 1;
|
|
272134
|
+
this.scene.glplot.add(this.textMarkers);
|
|
272135
|
+
}
|
|
272136
|
+
} else if(this.textMarkers) {
|
|
272137
|
+
this.scene.glplot.remove(this.textMarkers);
|
|
272138
|
+
this.textMarkers.dispose();
|
|
272139
|
+
this.textMarkers = null;
|
|
272140
|
+
}
|
|
272141
|
+
|
|
272142
|
+
errorOptions = {
|
|
272143
|
+
gl: this.scene.glplot.gl,
|
|
272144
|
+
position: options.position,
|
|
272145
|
+
color: options.errorColor,
|
|
272146
|
+
error: options.errorBounds,
|
|
272147
|
+
lineWidth: options.errorLineWidth,
|
|
272148
|
+
capSize: options.errorCapSize,
|
|
272149
|
+
opacity: data.opacity
|
|
272150
|
+
};
|
|
272151
|
+
if(this.errorBars) {
|
|
272152
|
+
if(options.errorBounds) {
|
|
272153
|
+
this.errorBars.update(errorOptions);
|
|
272154
|
+
} else {
|
|
272155
|
+
this.scene.glplot.remove(this.errorBars);
|
|
272156
|
+
this.errorBars.dispose();
|
|
272157
|
+
this.errorBars = null;
|
|
272158
|
+
}
|
|
272159
|
+
} else if(options.errorBounds) {
|
|
272160
|
+
this.errorBars = createErrorBars(errorOptions);
|
|
272161
|
+
this.errorBars._trace = this;
|
|
272162
|
+
this.scene.glplot.add(this.errorBars);
|
|
272163
|
+
}
|
|
272164
|
+
|
|
272165
|
+
if(options.delaunayAxis >= 0) {
|
|
272166
|
+
var delaunayOptions = constructDelaunay(
|
|
272167
|
+
options.position,
|
|
272168
|
+
options.delaunayColor,
|
|
272169
|
+
options.delaunayAxis
|
|
272170
|
+
);
|
|
272171
|
+
delaunayOptions.opacity = data.opacity;
|
|
272172
|
+
|
|
272173
|
+
if(this.delaunayMesh) {
|
|
272174
|
+
this.delaunayMesh.update(delaunayOptions);
|
|
272175
|
+
} else {
|
|
272176
|
+
delaunayOptions.gl = gl;
|
|
272177
|
+
this.delaunayMesh = createMesh(delaunayOptions);
|
|
272178
|
+
this.delaunayMesh._trace = this;
|
|
272179
|
+
this.scene.glplot.add(this.delaunayMesh);
|
|
272180
|
+
}
|
|
272181
|
+
} else if(this.delaunayMesh) {
|
|
272182
|
+
this.scene.glplot.remove(this.delaunayMesh);
|
|
272183
|
+
this.delaunayMesh.dispose();
|
|
272184
|
+
this.delaunayMesh = null;
|
|
272185
|
+
}
|
|
272186
|
+
};
|
|
272187
|
+
|
|
272188
|
+
proto.dispose = function() {
|
|
272189
|
+
if(this.linePlot) {
|
|
272190
|
+
this.scene.glplot.remove(this.linePlot);
|
|
272191
|
+
this.linePlot.dispose();
|
|
272192
|
+
}
|
|
272193
|
+
if(this.scatterPlot) {
|
|
272194
|
+
this.scene.glplot.remove(this.scatterPlot);
|
|
272195
|
+
this.scatterPlot.dispose();
|
|
272196
|
+
}
|
|
272197
|
+
if(this.errorBars) {
|
|
272198
|
+
this.scene.glplot.remove(this.errorBars);
|
|
272199
|
+
this.errorBars.dispose();
|
|
272200
|
+
}
|
|
272201
|
+
if(this.textMarkers) {
|
|
272202
|
+
this.scene.glplot.remove(this.textMarkers);
|
|
272203
|
+
this.textMarkers.dispose();
|
|
272204
|
+
}
|
|
272205
|
+
if(this.delaunayMesh) {
|
|
272206
|
+
this.scene.glplot.remove(this.delaunayMesh);
|
|
272207
|
+
this.delaunayMesh.dispose();
|
|
272208
|
+
}
|
|
272209
|
+
};
|
|
272210
|
+
|
|
272211
|
+
function createLineWithMarkers(scene, data) {
|
|
272212
|
+
var plot = new LineWithMarkers(scene, data.uid);
|
|
272213
|
+
plot.update(data);
|
|
272214
|
+
return plot;
|
|
272215
|
+
}
|
|
272216
|
+
|
|
272217
|
+
module.exports = createLineWithMarkers;
|
|
272218
|
+
|
|
272219
|
+
|
|
272220
|
+
/***/ }),
|
|
272221
|
+
|
|
272222
|
+
/***/ 13744:
|
|
272223
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
272224
|
+
|
|
272225
|
+
|
|
272226
|
+
|
|
272227
|
+
var Registry = __webpack_require__(13936);
|
|
272228
|
+
var Lib = __webpack_require__(30991);
|
|
272229
|
+
|
|
272230
|
+
var subTypes = __webpack_require__(33068);
|
|
272231
|
+
var handleMarkerDefaults = __webpack_require__(15294);
|
|
272232
|
+
var handleLineDefaults = __webpack_require__(82094);
|
|
272233
|
+
var handleTextDefaults = __webpack_require__(94729);
|
|
272234
|
+
|
|
272235
|
+
var attributes = __webpack_require__(1015);
|
|
272236
|
+
|
|
272237
|
+
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
272238
|
+
function coerce(attr, dflt) {
|
|
272239
|
+
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
|
|
272240
|
+
}
|
|
272241
|
+
|
|
272242
|
+
var len = handleXYZDefaults(traceIn, traceOut, coerce, layout);
|
|
272243
|
+
if(!len) {
|
|
272244
|
+
traceOut.visible = false;
|
|
272245
|
+
return;
|
|
272246
|
+
}
|
|
272247
|
+
|
|
272248
|
+
coerce('text');
|
|
272249
|
+
coerce('hovertext');
|
|
272250
|
+
coerce('hovertemplate');
|
|
272251
|
+
coerce('xhoverformat');
|
|
272252
|
+
coerce('yhoverformat');
|
|
272253
|
+
coerce('zhoverformat');
|
|
272254
|
+
|
|
272255
|
+
coerce('mode');
|
|
272256
|
+
|
|
272257
|
+
if(subTypes.hasMarkers(traceOut)) {
|
|
272258
|
+
handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noSelect: true, noAngle: true});
|
|
272259
|
+
}
|
|
272260
|
+
|
|
272261
|
+
if(subTypes.hasLines(traceOut)) {
|
|
272262
|
+
coerce('connectgaps');
|
|
272263
|
+
handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);
|
|
272264
|
+
}
|
|
272265
|
+
|
|
272266
|
+
if(subTypes.hasText(traceOut)) {
|
|
272267
|
+
coerce('texttemplate');
|
|
272268
|
+
handleTextDefaults(traceIn, traceOut, layout, coerce, {
|
|
272269
|
+
noSelect: true,
|
|
272270
|
+
noFontShadow: true,
|
|
272271
|
+
noFontLineposition: true,
|
|
272272
|
+
noFontTextcase: true,
|
|
272273
|
+
});
|
|
272274
|
+
}
|
|
272275
|
+
|
|
272276
|
+
var lineColor = (traceOut.line || {}).color;
|
|
272277
|
+
var markerColor = (traceOut.marker || {}).color;
|
|
272278
|
+
if(coerce('surfaceaxis') >= 0) coerce('surfacecolor', lineColor || markerColor);
|
|
272279
|
+
|
|
272280
|
+
var dims = ['x', 'y', 'z'];
|
|
272281
|
+
for(var i = 0; i < 3; ++i) {
|
|
272282
|
+
var projection = 'projection.' + dims[i];
|
|
272283
|
+
if(coerce(projection + '.show')) {
|
|
272284
|
+
coerce(projection + '.opacity');
|
|
272285
|
+
coerce(projection + '.scale');
|
|
272286
|
+
}
|
|
272287
|
+
}
|
|
272288
|
+
|
|
272289
|
+
var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');
|
|
272290
|
+
errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'z'});
|
|
272291
|
+
errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'y', inherit: 'z'});
|
|
272292
|
+
errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'x', inherit: 'z'});
|
|
272293
|
+
};
|
|
272294
|
+
|
|
272295
|
+
function handleXYZDefaults(traceIn, traceOut, coerce, layout) {
|
|
272296
|
+
var len = 0;
|
|
272297
|
+
var x = coerce('x');
|
|
272298
|
+
var y = coerce('y');
|
|
272299
|
+
var z = coerce('z');
|
|
272300
|
+
|
|
272301
|
+
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
|
|
272302
|
+
handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);
|
|
272303
|
+
|
|
272304
|
+
if(x && y && z) {
|
|
272305
|
+
// TODO: what happens if one is missing?
|
|
272306
|
+
len = Math.min(x.length, y.length, z.length);
|
|
272307
|
+
traceOut._length = traceOut._xlength = traceOut._ylength = traceOut._zlength = len;
|
|
272308
|
+
}
|
|
272309
|
+
|
|
272310
|
+
return len;
|
|
272311
|
+
}
|
|
272312
|
+
|
|
272313
|
+
|
|
272314
|
+
/***/ }),
|
|
272315
|
+
|
|
272316
|
+
/***/ 68860:
|
|
272317
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
272318
|
+
|
|
272319
|
+
|
|
272320
|
+
|
|
272321
|
+
module.exports = {
|
|
272322
|
+
plot: __webpack_require__(93219),
|
|
272323
|
+
attributes: __webpack_require__(1015),
|
|
272324
|
+
markerSymbols: __webpack_require__(98993),
|
|
272325
|
+
supplyDefaults: __webpack_require__(13744),
|
|
272326
|
+
colorbar: [
|
|
272327
|
+
{
|
|
272328
|
+
container: 'marker',
|
|
272329
|
+
min: 'cmin',
|
|
272330
|
+
max: 'cmax'
|
|
272331
|
+
}, {
|
|
272332
|
+
container: 'line',
|
|
272333
|
+
min: 'cmin',
|
|
272334
|
+
max: 'cmax'
|
|
272335
|
+
}
|
|
272336
|
+
],
|
|
272337
|
+
calc: __webpack_require__(30935),
|
|
272338
|
+
|
|
272339
|
+
moduleType: 'trace',
|
|
272340
|
+
name: 'scatter3d',
|
|
272341
|
+
basePlotModule: __webpack_require__(68137),
|
|
272342
|
+
categories: ['gl3d', 'symbols', 'showLegend', 'scatter-like'],
|
|
272343
|
+
meta: {
|
|
272344
|
+
hrName: 'scatter_3d',
|
|
272345
|
+
description: [
|
|
272346
|
+
'The data visualized as scatter point or lines in 3D dimension',
|
|
272347
|
+
'is set in `x`, `y`, `z`.',
|
|
272348
|
+
'Text (appearing either on the chart or on hover only) is via `text`.',
|
|
272349
|
+
'Bubble charts are achieved by setting `marker.size` and/or `marker.color`',
|
|
272350
|
+
'Projections are achieved via `projection`.',
|
|
272351
|
+
'Surface fills are achieved via `surfaceaxis`.'
|
|
272352
|
+
].join(' ')
|
|
272353
|
+
}
|
|
272354
|
+
};
|
|
272355
|
+
|
|
272356
|
+
|
|
272355
272357
|
/***/ }),
|
|
272356
272358
|
|
|
272357
272359
|
/***/ 44771:
|
|
@@ -368863,26 +368865,6 @@ const TextJamEditor = ({ onLogoutClick = () => { }, onViewProfileClick = () => {
|
|
|
368863
368865
|
exports.TextJamEditor = TextJamEditor;
|
|
368864
368866
|
|
|
368865
368867
|
|
|
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
|
-
|
|
368886
368868
|
/***/ }),
|
|
368887
368869
|
|
|
368888
368870
|
/***/ 91078:
|
|
@@ -368933,6 +368915,26 @@ const AssetPreview = ({ file }) => {
|
|
|
368933
368915
|
exports.AssetPreview = AssetPreview;
|
|
368934
368916
|
|
|
368935
368917
|
|
|
368918
|
+
/***/ }),
|
|
368919
|
+
|
|
368920
|
+
/***/ 66360:
|
|
368921
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
368922
|
+
|
|
368923
|
+
|
|
368924
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
368925
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
368926
|
+
};
|
|
368927
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
368928
|
+
exports.AssetPreviewPanel = void 0;
|
|
368929
|
+
const jsx_runtime_1 = __webpack_require__(74848);
|
|
368930
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(22401));
|
|
368931
|
+
const AssetPreview_1 = __webpack_require__(91078);
|
|
368932
|
+
const AssetPreviewPanel = ({ file, }) => {
|
|
368933
|
+
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 }) }));
|
|
368934
|
+
};
|
|
368935
|
+
exports.AssetPreviewPanel = AssetPreviewPanel;
|
|
368936
|
+
|
|
368937
|
+
|
|
368936
368938
|
/***/ }),
|
|
368937
368939
|
|
|
368938
368940
|
/***/ 46175:
|
|
@@ -369873,234 +369875,234 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
369873
369875
|
exports.consoleOverrideScript = exports.disableLocalStorageScript = void 0;
|
|
369874
369876
|
// insert script to disable access to specific localStorage keys
|
|
369875
369877
|
// localstorage.getItem() is a potential security risk when executing untrusted code
|
|
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>
|
|
369878
|
+
exports.disableLocalStorageScript = `
|
|
369879
|
+
<script>
|
|
369880
|
+
(function() {
|
|
369881
|
+
const originalGetItem = window.localStorage.getItem.bind(window.localStorage);
|
|
369882
|
+
const originalSetItem = window.localStorage.setItem.bind(window.localStorage);
|
|
369883
|
+
const originalRemoveItem = window.localStorage.removeItem.bind(window.localStorage);
|
|
369884
|
+
const originalClear = window.localStorage.clear.bind(window.localStorage);
|
|
369885
|
+
|
|
369886
|
+
const isDisallowedKey = (key) => key === 'authKey' || key.startsWith('oidc.');
|
|
369887
|
+
|
|
369888
|
+
Object.defineProperty(window, 'localStorage', {
|
|
369889
|
+
value: {
|
|
369890
|
+
getItem: function(key) {
|
|
369891
|
+
if (isDisallowedKey(key)) {
|
|
369892
|
+
console.log(\`localStorage.getItem for "\${key}" is disabled\`);
|
|
369893
|
+
return null;
|
|
369894
|
+
}
|
|
369895
|
+
return originalGetItem(key);
|
|
369896
|
+
},
|
|
369897
|
+
setItem: function(key, value) {
|
|
369898
|
+
if (isDisallowedKey(key)) {
|
|
369899
|
+
console.log(\`localStorage.setItem for "\${key}" is disabled\`);
|
|
369900
|
+
return;
|
|
369901
|
+
}
|
|
369902
|
+
return originalSetItem(key, value);
|
|
369903
|
+
},
|
|
369904
|
+
removeItem: function(key) {
|
|
369905
|
+
if (isDisallowedKey(key)) {
|
|
369906
|
+
console.log(\`localStorage.removeItem for "\${key}" is disabled\`);
|
|
369907
|
+
return;
|
|
369908
|
+
}
|
|
369909
|
+
return originalRemoveItem(key);
|
|
369910
|
+
},
|
|
369911
|
+
clear: function() {
|
|
369912
|
+
console.log('localStorage.clear is disabled');
|
|
369913
|
+
return;
|
|
369914
|
+
}
|
|
369915
|
+
},
|
|
369916
|
+
writable: false,
|
|
369917
|
+
configurable: false
|
|
369918
|
+
});
|
|
369919
|
+
})();
|
|
369920
|
+
</script>
|
|
369919
369921
|
`;
|
|
369920
369922
|
const MAX_DEPTH = 5; // Maximum depth for object serialization to prevent infinite recursion
|
|
369921
369923
|
// Override console methods to send logs to parent window and serialize complex objects
|
|
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>
|
|
369924
|
+
exports.consoleOverrideScript = `
|
|
369925
|
+
<script>
|
|
369926
|
+
(function() {
|
|
369927
|
+
const SerializedType = {
|
|
369928
|
+
Null: "null",
|
|
369929
|
+
Undefined: "undefined",
|
|
369930
|
+
Boolean: "boolean",
|
|
369931
|
+
Number: "number",
|
|
369932
|
+
String: "string",
|
|
369933
|
+
Array: "array",
|
|
369934
|
+
Object: "object",
|
|
369935
|
+
};
|
|
369936
|
+
|
|
369937
|
+
const original = {};
|
|
369938
|
+
const methods = ["log", "error", "warn", "info", "debug", "assert"];
|
|
369939
|
+
|
|
369940
|
+
function getTimestamp() {
|
|
369941
|
+
const now = new Date();
|
|
369942
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
369943
|
+
|
|
369944
|
+
return (
|
|
369945
|
+
now.getFullYear() + '-' +
|
|
369946
|
+
pad(now.getMonth() + 1) + '-' +
|
|
369947
|
+
pad(now.getDate()) + ' ' +
|
|
369948
|
+
pad(now.getHours()) + ':' +
|
|
369949
|
+
pad(now.getMinutes()) + ':' +
|
|
369950
|
+
pad(now.getSeconds()) + '.' +
|
|
369951
|
+
pad(Math.floor(now.getMilliseconds() / 10))
|
|
369952
|
+
);
|
|
369953
|
+
}
|
|
369954
|
+
|
|
369955
|
+
function serialize(arg, depth = 0, maxDepth = ${MAX_DEPTH}, visited = new WeakSet()) {
|
|
369956
|
+
if (depth > maxDepth) return { "type": SerializedType.String, "value": "[Max depth reached]" };
|
|
369957
|
+
|
|
369958
|
+
if (arg && typeof arg === "object") {
|
|
369959
|
+
if (visited.has(arg)) {
|
|
369960
|
+
return { "type": SerializedType.String, "value": "[Circular reference]" };
|
|
369961
|
+
}
|
|
369962
|
+
visited.add(arg);
|
|
369963
|
+
}
|
|
369964
|
+
|
|
369965
|
+
const type = typeof arg;
|
|
369966
|
+
if (arg === null) return { "type": SerializedType.Null, "value": "null" };
|
|
369967
|
+
if (arg === undefined) return { "type": SerializedType.Undefined, "value": "undefined" };
|
|
369968
|
+
if (type === "boolean") return { "type": SerializedType.Boolean, "value": String(arg) };
|
|
369969
|
+
if (type === "number") return { "type": SerializedType.Number, "value": String(arg) };
|
|
369970
|
+
if (type === "string") return { "type": SerializedType.String, "value": arg };
|
|
369971
|
+
|
|
369972
|
+
if (Array.isArray(arg)) {
|
|
369973
|
+
return {
|
|
369974
|
+
"type": SerializedType.Array,
|
|
369975
|
+
"value": arg.map(item => serialize(item, depth + 1, maxDepth))
|
|
369976
|
+
};
|
|
369977
|
+
}
|
|
369978
|
+
|
|
369979
|
+
if (type === "object" && arg !== null) {
|
|
369980
|
+
const props = {};
|
|
369981
|
+
try {
|
|
369982
|
+
for (let key in arg) {
|
|
369983
|
+
if (arg.hasOwnProperty(key)) {
|
|
369984
|
+
props[key] = serialize(arg[key], depth + 1, maxDepth, visited);
|
|
369985
|
+
}
|
|
369986
|
+
}
|
|
369987
|
+
} catch (error) {
|
|
369988
|
+
console.error("Error serializing object property:", error);
|
|
369989
|
+
}
|
|
369990
|
+
return { "type": SerializedType.Object, "value": props };
|
|
369991
|
+
}
|
|
369992
|
+
|
|
369993
|
+
return { "type": SerializedType.String, "value": String(arg) };
|
|
369994
|
+
}
|
|
369995
|
+
|
|
369996
|
+
methods.forEach(m => {
|
|
369997
|
+
original[m] = console[m] || function(){};
|
|
369998
|
+
|
|
369999
|
+
console[m] = function(...args) {
|
|
370000
|
+
const timestamp = getTimestamp();
|
|
370001
|
+
|
|
370002
|
+
let level = m;
|
|
370003
|
+
let serializedArgs = args.map(arg => serialize(arg));
|
|
370004
|
+
|
|
370005
|
+
if (m === "assert") {
|
|
370006
|
+
const condition = Boolean(args[0]);
|
|
370007
|
+
const messageArgs = args.slice(1);
|
|
370008
|
+
|
|
370009
|
+
serializedArgs =
|
|
370010
|
+
messageArgs.length > 0
|
|
370011
|
+
? messageArgs.map(arg => serialize(arg))
|
|
370012
|
+
: [
|
|
370013
|
+
{
|
|
370014
|
+
"type": "string",
|
|
370015
|
+
"value": condition ? "Assertion passed" : "Assertion failed",
|
|
370016
|
+
},
|
|
370017
|
+
];
|
|
370018
|
+
|
|
370019
|
+
level = condition ? "log" : "error";
|
|
370020
|
+
}
|
|
370021
|
+
|
|
370022
|
+
window.parent.postMessage({
|
|
370023
|
+
"type": "console",
|
|
370024
|
+
"method": level,
|
|
370025
|
+
"data": serializedArgs,
|
|
370026
|
+
"timestamp": timestamp
|
|
370027
|
+
}, "*");
|
|
370028
|
+
|
|
370029
|
+
original[m](...args);
|
|
370030
|
+
};
|
|
370031
|
+
});
|
|
370032
|
+
|
|
370033
|
+
window.addEventListener("error", function(event) {
|
|
370034
|
+
const timestamp = getTimestamp();
|
|
370035
|
+
const error = event.error;
|
|
370036
|
+
|
|
370037
|
+
let message;
|
|
370038
|
+
if (error && error.name && error.message) {
|
|
370039
|
+
message = error.name + ": " + error.message;
|
|
370040
|
+
} else if (event.message) {
|
|
370041
|
+
message = event.message;
|
|
370042
|
+
} else {
|
|
370043
|
+
message = "Unknown JavaScript error";
|
|
370044
|
+
}
|
|
370045
|
+
|
|
370046
|
+
let displayFilename = event.filename;
|
|
370047
|
+
|
|
370048
|
+
if (
|
|
370049
|
+
typeof displayFilename === "string" &&
|
|
370050
|
+
displayFilename.startsWith("blob:")
|
|
370051
|
+
) {
|
|
370052
|
+
const sourceMap = window.__blobSourceMap__ || {};
|
|
370053
|
+
const mappedFilename = sourceMap[displayFilename];
|
|
370054
|
+
|
|
370055
|
+
if (mappedFilename) {
|
|
370056
|
+
displayFilename = mappedFilename;
|
|
370057
|
+
} else {
|
|
370058
|
+
const meta = document.querySelector("meta[filename]");
|
|
370059
|
+
displayFilename =
|
|
370060
|
+
(meta && meta.getAttribute("filename")) || "preview";
|
|
370061
|
+
}
|
|
370062
|
+
}
|
|
370063
|
+
|
|
370064
|
+
const location =
|
|
370065
|
+
displayFilename || event.lineno || event.colno
|
|
370066
|
+
? " at " +
|
|
370067
|
+
[displayFilename, event.lineno, event.colno]
|
|
370068
|
+
.filter(Boolean)
|
|
370069
|
+
.join(":")
|
|
370070
|
+
: "";
|
|
370071
|
+
|
|
370072
|
+
window.parent.postMessage({
|
|
370073
|
+
"type": "console",
|
|
370074
|
+
"method": "error",
|
|
370075
|
+
"data": [
|
|
370076
|
+
{ "type": "string", "value": message + location }
|
|
370077
|
+
],
|
|
370078
|
+
"timestamp": timestamp
|
|
370079
|
+
}, "*");
|
|
370080
|
+
});
|
|
370081
|
+
|
|
370082
|
+
window.addEventListener("unhandledrejection", function(event) {
|
|
370083
|
+
const timestamp = getTimestamp();
|
|
370084
|
+
const reason = event.reason;
|
|
370085
|
+
|
|
370086
|
+
let message;
|
|
370087
|
+
if (reason && reason.name && reason.message) {
|
|
370088
|
+
message = reason.name + ": " + reason.message;
|
|
370089
|
+
} else if (typeof reason === "string") {
|
|
370090
|
+
message = "UnhandledPromiseRejection: " + reason;
|
|
370091
|
+
} else {
|
|
370092
|
+
message = "UnhandledPromiseRejection: " + String(reason);
|
|
370093
|
+
}
|
|
370094
|
+
|
|
370095
|
+
window.parent.postMessage({
|
|
370096
|
+
"type": "console",
|
|
370097
|
+
"method": "error",
|
|
370098
|
+
"data": [
|
|
370099
|
+
{ "type": "string", "value": message }
|
|
370100
|
+
],
|
|
370101
|
+
"timestamp": timestamp
|
|
370102
|
+
}, "*");
|
|
370103
|
+
});
|
|
370104
|
+
})();
|
|
370105
|
+
</script>
|
|
370104
370106
|
`;
|
|
370105
370107
|
|
|
370106
370108
|
|
|
@@ -370447,19 +370449,19 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
370447
370449
|
const react_1 = __webpack_require__(51649);
|
|
370448
370450
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
370449
370451
|
const styles_module_scss_1 = __importDefault(__webpack_require__(12914));
|
|
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';
|
|
370452
|
+
const IFRAME_ALLOW = `
|
|
370453
|
+
accelerometer 'none';
|
|
370454
|
+
camera 'none';
|
|
370455
|
+
encrypted-media;
|
|
370456
|
+
fullscreen;
|
|
370457
|
+
picture-in-picture;
|
|
370458
|
+
geolocation 'none';
|
|
370459
|
+
gyroscope 'none';
|
|
370460
|
+
magnetometer 'none';
|
|
370461
|
+
microphone 'none';
|
|
370462
|
+
midi 'none';
|
|
370463
|
+
payment 'none';
|
|
370464
|
+
usb 'none';
|
|
370463
370465
|
`;
|
|
370464
370466
|
/**
|
|
370465
370467
|
* Owns the persistent, body-mounted iframe host and keeps it visually glued to
|
|
@@ -374052,11 +374054,14 @@ const projectHelpers_1 = __webpack_require__(2610);
|
|
|
374052
374054
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
374053
374055
|
const file_svg_1 = __importDefault(__webpack_require__(70429));
|
|
374054
374056
|
const Text_1 = __webpack_require__(82803);
|
|
374057
|
+
const Tooltip_1 = __importDefault(__webpack_require__(26982));
|
|
374058
|
+
const useHover_1 = __webpack_require__(78556);
|
|
374055
374059
|
const styles_module_scss_1 = __importDefault(__webpack_require__(29881));
|
|
374056
374060
|
const SharedProjectName = () => {
|
|
374057
374061
|
const project = (0, stores_1.useAppSelector)((state) => state.editor.project);
|
|
374058
374062
|
const authorName = (0, projectHelpers_1.getAuthorName)(project.author);
|
|
374059
|
-
|
|
374063
|
+
const { hovered, hoverProps } = (0, useHover_1.useHover)(useHover_1.TOOLTIP_SHOW_DELAY_MS);
|
|
374064
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.shared, styles_module_scss_1.default.projectName), children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.SvgIcon, { size: 24, SvgElement: file_svg_1.default }), (0, jsx_runtime_1.jsxs)("span", { className: styles_module_scss_1.default.nameWrapper, tabIndex: 0, ...hoverProps, children: [(0, jsx_runtime_1.jsx)(Tooltip_1.default, { message: project.name, visible: hovered && !!project.name, position: "bottom" }), (0, jsx_runtime_1.jsx)(Text_1.Text, { size: 16, weight: "medium", className: styles_module_scss_1.default.nameText, children: project.name })] }), (0, jsx_runtime_1.jsxs)("span", { className: styles_module_scss_1.default.authorInfo, children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { size: 16, children: " by " }), (0, jsx_runtime_1.jsx)(Text_1.Text, { size: 16, weight: "medium", children: authorName })] })] }));
|
|
374060
374065
|
};
|
|
374061
374066
|
exports["default"] = SharedProjectName;
|
|
374062
374067
|
|
|
@@ -374294,7 +374299,7 @@ const WebComponentProject = ({ nameEditable = false, sidebarOptions = [], packag
|
|
|
374294
374299
|
return () => clearTimeout(timeout);
|
|
374295
374300
|
}, [project]);
|
|
374296
374301
|
renderer.link = function (data) {
|
|
374297
|
-
return `<a href="${data.href}" target="_blank" rel="noreferrer"
|
|
374302
|
+
return `<a href="${data.href}" target="_blank" rel="noreferrer"
|
|
374298
374303
|
}">${data.text}</a>`;
|
|
374299
374304
|
};
|
|
374300
374305
|
marked_1.marked.setOptions({
|
|
@@ -374527,10 +374532,10 @@ const WebComponentLoader = (props) => {
|
|
|
374527
374532
|
(0, react_1.useEffect)(() => {
|
|
374528
374533
|
// Create a script element to save the existing Prism object if there is one
|
|
374529
374534
|
const script = document.createElement("script");
|
|
374530
|
-
script.textContent = `
|
|
374531
|
-
if (window.Prism) {
|
|
374532
|
-
window.syntaxHighlight = window.Prism;
|
|
374533
|
-
}
|
|
374535
|
+
script.textContent = `
|
|
374536
|
+
if (window.Prism) {
|
|
374537
|
+
window.syntaxHighlight = window.Prism;
|
|
374538
|
+
}
|
|
374534
374539
|
`;
|
|
374535
374540
|
// Append the script to the document body
|
|
374536
374541
|
document.body.appendChild(script);
|
|
@@ -377443,7 +377448,7 @@ exports.binaryStore = new BinaryStore();
|
|
|
377443
377448
|
|
|
377444
377449
|
|
|
377445
377450
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
377446
|
-
exports.ErrorToMsgMap = exports.validateComponentName = exports.COMPONENT_NAME_LIMIT = exports.NameError = void 0;
|
|
377451
|
+
exports.ErrorToMsgMap = exports.validateComponentName = exports.PROJECT_NAME_LIMIT = exports.COMPONENT_NAME_LIMIT = exports.NameError = void 0;
|
|
377447
377452
|
const ProjectTypes_1 = __webpack_require__(27130);
|
|
377448
377453
|
const projectHelpers_1 = __webpack_require__(2610);
|
|
377449
377454
|
var NameError;
|
|
@@ -377459,6 +377464,7 @@ var NameError;
|
|
|
377459
377464
|
NameError["UNSUPPORTED_EXTENSION"] = "unsupported_extension";
|
|
377460
377465
|
})(NameError || (exports.NameError = NameError = {}));
|
|
377461
377466
|
exports.COMPONENT_NAME_LIMIT = 100;
|
|
377467
|
+
exports.PROJECT_NAME_LIMIT = 255;
|
|
377462
377468
|
const ASCII_SAFE = /^[A-Za-z0-9._\- ()]+$/;
|
|
377463
377469
|
const HAS_PATH_SEP = /[\\/]/;
|
|
377464
377470
|
const WINDOWS_RESERVED = /^(con|prn|aux|nul|com[1-9]|lpt[1-9])(\..*)?$/i;
|
|
@@ -385726,7 +385732,7 @@ module.exports = webpackAsyncContext;
|
|
|
385726
385732
|
/***/ 24427:
|
|
385727
385733
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
385728
385734
|
|
|
385729
|
-
module.exports = __webpack_require__.p + "assets/
|
|
385735
|
+
module.exports = __webpack_require__.p + "assets/PyodideWorkerb1409749c37aedc47dc8.js";
|
|
385730
385736
|
|
|
385731
385737
|
/***/ }),
|
|
385732
385738
|
|