@vitessce/layer-controller 3.9.2 → 3.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{deflate-phr9wiNk.js → deflate-Cyfyz4ow.js} +1 -1
- package/dist/{index-BRGiAso5.js → index-CJNHlEBq.js} +1315 -641
- package/dist/index.js +1 -1
- package/dist/{jpeg-CsRFjvjp.js → jpeg-C62PTFeB.js} +1 -1
- package/dist/{lerc-CyQkkL3x.js → lerc-B1_R8fp1.js} +1 -1
- package/dist/{lzw-D-jYFTkN.js → lzw-qRrO_FZw.js} +1 -1
- package/dist/{packbits-DGzSq1LG.js → packbits-CdzxG41_.js} +1 -1
- package/dist/{raw-D9IbY0yO.js → raw-DhefG3KB.js} +1 -1
- package/dist/{webimage-yeUEpC5w.js → webimage-BVdRA3Av.js} +1 -1
- package/package.json +7 -7
|
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
var _a2, _b;
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import React__default, { useContext, forwardRef, useRef, useMemo, createContext, createElement, isValidElement, cloneElement, Children,
|
|
6
|
+
import React__default, { useContext, forwardRef, useRef, useMemo, createContext, createElement, isValidElement, cloneElement, Children, PureComponent, useEffect, useState, useCallback } from "react";
|
|
7
7
|
import * as ReactDOM from "react-dom";
|
|
8
8
|
import ReactDOM__default from "react-dom";
|
|
9
9
|
import { PopperMenu, TitleInfo, useLoaders, useCoordination, useAuxiliaryCoordination, useComponentLayout, useClosestVitessceContainerSize, useWindowDimensions, useObsLocationsData, useObsSegmentationsData, useImageData, useReady } from "@vitessce/vit-s";
|
|
@@ -419,9 +419,9 @@ function parse$4(value, root2, parent, rule, rules, rulesets, pseudo, points, de
|
|
|
419
419
|
function ruleset(value, root2, parent, index2, offset2, rules, points, type, props, children, length2) {
|
|
420
420
|
var post = offset2 - 1;
|
|
421
421
|
var rule = offset2 === 0 ? rules : [""];
|
|
422
|
-
var
|
|
422
|
+
var size2 = sizeof(rule);
|
|
423
423
|
for (var i2 = 0, j = 0, k = 0; i2 < index2; ++i2)
|
|
424
|
-
for (var x = 0, y = substr(value, post + 1, post = abs$1(j = points[i2])), z = value; x <
|
|
424
|
+
for (var x = 0, y = substr(value, post + 1, post = abs$1(j = points[i2])), z = value; x < size2; ++x)
|
|
425
425
|
if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
|
|
426
426
|
props[k++] = z;
|
|
427
427
|
return node$1(value, root2, parent, offset2 === 0 ? RULESET : type, props, children, length2);
|
|
@@ -6673,9 +6673,9 @@ const generateGridStyles = ({
|
|
|
6673
6673
|
}
|
|
6674
6674
|
};
|
|
6675
6675
|
};
|
|
6676
|
-
const generateSizeClassNames = (
|
|
6676
|
+
const generateSizeClassNames = (size2) => {
|
|
6677
6677
|
const classNames = [];
|
|
6678
|
-
Object.entries(
|
|
6678
|
+
Object.entries(size2).forEach(([key, value]) => {
|
|
6679
6679
|
if (value !== false && value !== void 0) {
|
|
6680
6680
|
classNames.push(`grid-${key}-${String(value)}`);
|
|
6681
6681
|
}
|
|
@@ -6771,10 +6771,10 @@ function createGrid(options = {}) {
|
|
|
6771
6771
|
direction,
|
|
6772
6772
|
spacing,
|
|
6773
6773
|
wrap,
|
|
6774
|
-
size
|
|
6774
|
+
size: size2
|
|
6775
6775
|
} = ownerState;
|
|
6776
6776
|
const slots = {
|
|
6777
|
-
root: ["root", container && "container", wrap !== "wrap" && `wrap-xs-${String(wrap)}`, ...generateDirectionClasses(direction), ...generateSizeClassNames(
|
|
6777
|
+
root: ["root", container && "container", wrap !== "wrap" && `wrap-xs-${String(wrap)}`, ...generateDirectionClasses(direction), ...generateSizeClassNames(size2), ...container ? generateSpacingClassNames(spacing, theme.breakpoints.keys[0]) : []]
|
|
6778
6778
|
};
|
|
6779
6779
|
return composeClasses(slots, (slot) => generateUtilityClass(componentName, slot), {});
|
|
6780
6780
|
};
|
|
@@ -6823,7 +6823,7 @@ function createGrid(options = {}) {
|
|
|
6823
6823
|
unstable_level: level = 0,
|
|
6824
6824
|
...other
|
|
6825
6825
|
} = props;
|
|
6826
|
-
const
|
|
6826
|
+
const size2 = parseResponsiveProp(sizeProp, theme.breakpoints, (val) => val !== false);
|
|
6827
6827
|
const offset2 = parseResponsiveProp(offsetProp, theme.breakpoints);
|
|
6828
6828
|
const columns = inProps.columns ?? (level ? void 0 : columnsProp);
|
|
6829
6829
|
const spacing = inProps.spacing ?? (level ? void 0 : spacingProp);
|
|
@@ -6839,7 +6839,7 @@ function createGrid(options = {}) {
|
|
|
6839
6839
|
spacing,
|
|
6840
6840
|
rowSpacing,
|
|
6841
6841
|
columnSpacing,
|
|
6842
|
-
size,
|
|
6842
|
+
size: size2,
|
|
6843
6843
|
offset: offset2
|
|
6844
6844
|
};
|
|
6845
6845
|
const classes = useUtilityClasses2(ownerState, theme);
|
|
@@ -7304,17 +7304,17 @@ function createTypography(palette, typography) {
|
|
|
7304
7304
|
}
|
|
7305
7305
|
}
|
|
7306
7306
|
const coef = fontSize / 14;
|
|
7307
|
-
const pxToRem = pxToRem2 || ((
|
|
7308
|
-
const buildVariant = (fontWeight,
|
|
7307
|
+
const pxToRem = pxToRem2 || ((size2) => `${size2 / htmlFontSize * coef}rem`);
|
|
7308
|
+
const buildVariant = (fontWeight, size2, lineHeight, letterSpacing, casing) => ({
|
|
7309
7309
|
fontFamily,
|
|
7310
7310
|
fontWeight,
|
|
7311
|
-
fontSize: pxToRem(
|
|
7311
|
+
fontSize: pxToRem(size2),
|
|
7312
7312
|
// Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/
|
|
7313
7313
|
lineHeight,
|
|
7314
7314
|
// The letter spacing was designed for the Roboto font-family. Using the same letter-spacing
|
|
7315
7315
|
// across font-families can cause issues with the kerning.
|
|
7316
7316
|
...fontFamily === defaultFontFamily ? {
|
|
7317
|
-
letterSpacing: `${round$1(letterSpacing /
|
|
7317
|
+
letterSpacing: `${round$1(letterSpacing / size2)}em`
|
|
7318
7318
|
} : {},
|
|
7319
7319
|
...casing,
|
|
7320
7320
|
...allVariants
|
|
@@ -9585,7 +9585,7 @@ const Collapse = /* @__PURE__ */ React.forwardRef(function Collapse2(inProps, re
|
|
|
9585
9585
|
const autoTransitionDuration = React.useRef();
|
|
9586
9586
|
const collapsedSize = typeof collapsedSizeProp === "number" ? `${collapsedSizeProp}px` : collapsedSizeProp;
|
|
9587
9587
|
const isHorizontal = orientation === "horizontal";
|
|
9588
|
-
const
|
|
9588
|
+
const size2 = isHorizontal ? "width" : "height";
|
|
9589
9589
|
const nodeRef = React.useRef(null);
|
|
9590
9590
|
const handleRef = useForkRef$1(ref, nodeRef);
|
|
9591
9591
|
const normalizedTransitionCallback = (callback) => (maybeIsAppearing) => {
|
|
@@ -9603,7 +9603,7 @@ const Collapse = /* @__PURE__ */ React.forwardRef(function Collapse2(inProps, re
|
|
|
9603
9603
|
if (wrapperRef.current && isHorizontal) {
|
|
9604
9604
|
wrapperRef.current.style.position = "absolute";
|
|
9605
9605
|
}
|
|
9606
|
-
node2.style[
|
|
9606
|
+
node2.style[size2] = collapsedSize;
|
|
9607
9607
|
if (onEnter) {
|
|
9608
9608
|
onEnter(node2, isAppearing);
|
|
9609
9609
|
}
|
|
@@ -9630,20 +9630,20 @@ const Collapse = /* @__PURE__ */ React.forwardRef(function Collapse2(inProps, re
|
|
|
9630
9630
|
} else {
|
|
9631
9631
|
node2.style.transitionDuration = typeof transitionDuration === "string" ? transitionDuration : `${transitionDuration}ms`;
|
|
9632
9632
|
}
|
|
9633
|
-
node2.style[
|
|
9633
|
+
node2.style[size2] = `${wrapperSize}px`;
|
|
9634
9634
|
node2.style.transitionTimingFunction = transitionTimingFunction;
|
|
9635
9635
|
if (onEntering) {
|
|
9636
9636
|
onEntering(node2, isAppearing);
|
|
9637
9637
|
}
|
|
9638
9638
|
});
|
|
9639
9639
|
const handleEntered = normalizedTransitionCallback((node2, isAppearing) => {
|
|
9640
|
-
node2.style[
|
|
9640
|
+
node2.style[size2] = "auto";
|
|
9641
9641
|
if (onEntered) {
|
|
9642
9642
|
onEntered(node2, isAppearing);
|
|
9643
9643
|
}
|
|
9644
9644
|
});
|
|
9645
9645
|
const handleExit = normalizedTransitionCallback((node2) => {
|
|
9646
|
-
node2.style[
|
|
9646
|
+
node2.style[size2] = `${getWrapperSize()}px`;
|
|
9647
9647
|
if (onExit) {
|
|
9648
9648
|
onExit(node2);
|
|
9649
9649
|
}
|
|
@@ -9668,7 +9668,7 @@ const Collapse = /* @__PURE__ */ React.forwardRef(function Collapse2(inProps, re
|
|
|
9668
9668
|
} else {
|
|
9669
9669
|
node2.style.transitionDuration = typeof transitionDuration === "string" ? transitionDuration : `${transitionDuration}ms`;
|
|
9670
9670
|
}
|
|
9671
|
-
node2.style[
|
|
9671
|
+
node2.style[size2] = collapsedSize;
|
|
9672
9672
|
node2.style.transitionTimingFunction = transitionTimingFunction;
|
|
9673
9673
|
if (onExiting) {
|
|
9674
9674
|
onExiting(node2);
|
|
@@ -11825,7 +11825,7 @@ const CircularProgress = /* @__PURE__ */ React.forwardRef(function CircularProgr
|
|
|
11825
11825
|
className,
|
|
11826
11826
|
color: color2 = "primary",
|
|
11827
11827
|
disableShrink = false,
|
|
11828
|
-
size = 40,
|
|
11828
|
+
size: size2 = 40,
|
|
11829
11829
|
style: style2,
|
|
11830
11830
|
thickness = 3.6,
|
|
11831
11831
|
value = 0,
|
|
@@ -11836,7 +11836,7 @@ const CircularProgress = /* @__PURE__ */ React.forwardRef(function CircularProgr
|
|
|
11836
11836
|
...props,
|
|
11837
11837
|
color: color2,
|
|
11838
11838
|
disableShrink,
|
|
11839
|
-
size,
|
|
11839
|
+
size: size2,
|
|
11840
11840
|
thickness,
|
|
11841
11841
|
value,
|
|
11842
11842
|
variant
|
|
@@ -11855,8 +11855,8 @@ const CircularProgress = /* @__PURE__ */ React.forwardRef(function CircularProgr
|
|
|
11855
11855
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressRoot, {
|
|
11856
11856
|
className: clsx(classes.root, className),
|
|
11857
11857
|
style: {
|
|
11858
|
-
width:
|
|
11859
|
-
height:
|
|
11858
|
+
width: size2,
|
|
11859
|
+
height: size2,
|
|
11860
11860
|
...rootStyle,
|
|
11861
11861
|
...style2
|
|
11862
11862
|
},
|
|
@@ -11956,11 +11956,11 @@ const useUtilityClasses$g = (ownerState) => {
|
|
|
11956
11956
|
disabled,
|
|
11957
11957
|
color: color2,
|
|
11958
11958
|
edge,
|
|
11959
|
-
size,
|
|
11959
|
+
size: size2,
|
|
11960
11960
|
loading
|
|
11961
11961
|
} = ownerState;
|
|
11962
11962
|
const slots = {
|
|
11963
|
-
root: ["root", loading && "loading", disabled && "disabled", color2 !== "default" && `color${capitalize$1(color2)}`, edge && `edge${capitalize$1(edge)}`, `size${capitalize$1(
|
|
11963
|
+
root: ["root", loading && "loading", disabled && "disabled", color2 !== "default" && `color${capitalize$1(color2)}`, edge && `edge${capitalize$1(edge)}`, `size${capitalize$1(size2)}`],
|
|
11964
11964
|
loadingIndicator: ["loadingIndicator"],
|
|
11965
11965
|
loadingWrapper: ["loadingWrapper"]
|
|
11966
11966
|
};
|
|
@@ -12113,7 +12113,7 @@ const IconButton = /* @__PURE__ */ React.forwardRef(function IconButton2(inProps
|
|
|
12113
12113
|
color: color2 = "default",
|
|
12114
12114
|
disabled = false,
|
|
12115
12115
|
disableFocusRipple = false,
|
|
12116
|
-
size = "medium",
|
|
12116
|
+
size: size2 = "medium",
|
|
12117
12117
|
id: idProp,
|
|
12118
12118
|
loading = null,
|
|
12119
12119
|
loadingIndicator: loadingIndicatorProp,
|
|
@@ -12133,7 +12133,7 @@ const IconButton = /* @__PURE__ */ React.forwardRef(function IconButton2(inProps
|
|
|
12133
12133
|
disableFocusRipple,
|
|
12134
12134
|
loading,
|
|
12135
12135
|
loadingIndicator,
|
|
12136
|
-
size
|
|
12136
|
+
size: size2
|
|
12137
12137
|
};
|
|
12138
12138
|
const classes = useUtilityClasses$g(ownerState);
|
|
12139
12139
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconButtonRoot, {
|
|
@@ -12627,13 +12627,13 @@ const useUtilityClasses$f = (ownerState) => {
|
|
|
12627
12627
|
hiddenLabel,
|
|
12628
12628
|
multiline,
|
|
12629
12629
|
readOnly,
|
|
12630
|
-
size,
|
|
12630
|
+
size: size2,
|
|
12631
12631
|
startAdornment,
|
|
12632
12632
|
type
|
|
12633
12633
|
} = ownerState;
|
|
12634
12634
|
const slots = {
|
|
12635
|
-
root: ["root", `color${capitalize$1(color2)}`, disabled && "disabled", error2 && "error", fullWidth && "fullWidth", focused && "focused", formControl && "formControl",
|
|
12636
|
-
input: ["input", disabled && "disabled", type === "search" && "inputTypeSearch", multiline && "inputMultiline",
|
|
12635
|
+
root: ["root", `color${capitalize$1(color2)}`, disabled && "disabled", error2 && "error", fullWidth && "fullWidth", focused && "focused", formControl && "formControl", size2 && size2 !== "medium" && `size${capitalize$1(size2)}`, multiline && "multiline", startAdornment && "adornedStart", endAdornment && "adornedEnd", hiddenLabel && "hiddenLabel", readOnly && "readOnly"],
|
|
12636
|
+
input: ["input", disabled && "disabled", type === "search" && "inputTypeSearch", multiline && "inputMultiline", size2 === "small" && "inputSizeSmall", hiddenLabel && "inputHiddenLabel", startAdornment && "inputAdornedStart", endAdornment && "inputAdornedEnd", readOnly && "readOnly"]
|
|
12637
12637
|
};
|
|
12638
12638
|
return composeClasses(slots, getInputBaseUtilityClass, classes);
|
|
12639
12639
|
};
|
|
@@ -12668,8 +12668,8 @@ const InputBaseRoot = styled("div", {
|
|
|
12668
12668
|
}, {
|
|
12669
12669
|
props: ({
|
|
12670
12670
|
ownerState,
|
|
12671
|
-
size
|
|
12672
|
-
}) => ownerState.multiline &&
|
|
12671
|
+
size: size2
|
|
12672
|
+
}) => ownerState.multiline && size2 === "small",
|
|
12673
12673
|
style: {
|
|
12674
12674
|
paddingTop: 1
|
|
12675
12675
|
}
|
|
@@ -12851,7 +12851,7 @@ const InputBase = /* @__PURE__ */ React.forwardRef(function InputBase2(inProps,
|
|
|
12851
12851
|
readOnly,
|
|
12852
12852
|
renderSuffix,
|
|
12853
12853
|
rows,
|
|
12854
|
-
size,
|
|
12854
|
+
size: size2,
|
|
12855
12855
|
slotProps = {},
|
|
12856
12856
|
slots = {},
|
|
12857
12857
|
startAdornment,
|
|
@@ -13364,16 +13364,16 @@ const useUtilityClasses$e = (ownerState) => {
|
|
|
13364
13364
|
color: color2,
|
|
13365
13365
|
disableElevation,
|
|
13366
13366
|
fullWidth,
|
|
13367
|
-
size,
|
|
13367
|
+
size: size2,
|
|
13368
13368
|
variant,
|
|
13369
13369
|
loading,
|
|
13370
13370
|
loadingPosition,
|
|
13371
13371
|
classes
|
|
13372
13372
|
} = ownerState;
|
|
13373
13373
|
const slots = {
|
|
13374
|
-
root: ["root", loading && "loading", variant, `${variant}${capitalize$1(color2)}`, `size${capitalize$1(
|
|
13375
|
-
startIcon: ["icon", "startIcon", `iconSize${capitalize$1(
|
|
13376
|
-
endIcon: ["icon", "endIcon", `iconSize${capitalize$1(
|
|
13374
|
+
root: ["root", loading && "loading", variant, `${variant}${capitalize$1(color2)}`, `size${capitalize$1(size2)}`, `${variant}Size${capitalize$1(size2)}`, `color${capitalize$1(color2)}`, disableElevation && "disableElevation", fullWidth && "fullWidth", loading && `loadingPosition${capitalize$1(loadingPosition)}`],
|
|
13375
|
+
startIcon: ["icon", "startIcon", `iconSize${capitalize$1(size2)}`],
|
|
13376
|
+
endIcon: ["icon", "endIcon", `iconSize${capitalize$1(size2)}`],
|
|
13377
13377
|
loadingIndicator: ["loadingIndicator"],
|
|
13378
13378
|
loadingWrapper: ["loadingWrapper"]
|
|
13379
13379
|
};
|
|
@@ -13832,7 +13832,7 @@ const Button = /* @__PURE__ */ React.forwardRef(function Button2(inProps, ref) {
|
|
|
13832
13832
|
loading = null,
|
|
13833
13833
|
loadingIndicator: loadingIndicatorProp,
|
|
13834
13834
|
loadingPosition = "center",
|
|
13835
|
-
size = "medium",
|
|
13835
|
+
size: size2 = "medium",
|
|
13836
13836
|
startIcon: startIconProp,
|
|
13837
13837
|
type,
|
|
13838
13838
|
variant = "text",
|
|
@@ -13855,7 +13855,7 @@ const Button = /* @__PURE__ */ React.forwardRef(function Button2(inProps, ref) {
|
|
|
13855
13855
|
loading,
|
|
13856
13856
|
loadingIndicator,
|
|
13857
13857
|
loadingPosition,
|
|
13858
|
-
size,
|
|
13858
|
+
size: size2,
|
|
13859
13859
|
type,
|
|
13860
13860
|
variant
|
|
13861
13861
|
};
|
|
@@ -14377,10 +14377,10 @@ const useUtilityClasses$c = (ownerState) => {
|
|
|
14377
14377
|
classes,
|
|
14378
14378
|
indeterminate,
|
|
14379
14379
|
color: color2,
|
|
14380
|
-
size
|
|
14380
|
+
size: size2
|
|
14381
14381
|
} = ownerState;
|
|
14382
14382
|
const slots = {
|
|
14383
|
-
root: ["root", indeterminate && "indeterminate", `color${capitalize$1(color2)}`, `size${capitalize$1(
|
|
14383
|
+
root: ["root", indeterminate && "indeterminate", `color${capitalize$1(color2)}`, `size${capitalize$1(size2)}`]
|
|
14384
14384
|
};
|
|
14385
14385
|
const composedClasses = composeClasses(slots, getCheckboxUtilityClass, classes);
|
|
14386
14386
|
return {
|
|
@@ -14465,7 +14465,7 @@ const Checkbox = /* @__PURE__ */ React.forwardRef(function Checkbox2(inProps, re
|
|
|
14465
14465
|
indeterminate = false,
|
|
14466
14466
|
indeterminateIcon: indeterminateIconProp = defaultIndeterminateIcon,
|
|
14467
14467
|
inputProps,
|
|
14468
|
-
size = "medium",
|
|
14468
|
+
size: size2 = "medium",
|
|
14469
14469
|
disableRipple = false,
|
|
14470
14470
|
className,
|
|
14471
14471
|
slots = {},
|
|
@@ -14479,7 +14479,7 @@ const Checkbox = /* @__PURE__ */ React.forwardRef(function Checkbox2(inProps, re
|
|
|
14479
14479
|
disableRipple,
|
|
14480
14480
|
color: color2,
|
|
14481
14481
|
indeterminate,
|
|
14482
|
-
size
|
|
14482
|
+
size: size2
|
|
14483
14483
|
};
|
|
14484
14484
|
const classes = useUtilityClasses$c(ownerState);
|
|
14485
14485
|
const externalInputProps = slotProps.input ?? inputProps;
|
|
@@ -14497,10 +14497,10 @@ const Checkbox = /* @__PURE__ */ React.forwardRef(function Checkbox2(inProps, re
|
|
|
14497
14497
|
additionalProps: {
|
|
14498
14498
|
type: "checkbox",
|
|
14499
14499
|
icon: /* @__PURE__ */ React.cloneElement(icon, {
|
|
14500
|
-
fontSize: icon.props.fontSize ??
|
|
14500
|
+
fontSize: icon.props.fontSize ?? size2
|
|
14501
14501
|
}),
|
|
14502
14502
|
checkedIcon: /* @__PURE__ */ React.cloneElement(indeterminateIcon, {
|
|
14503
|
-
fontSize: indeterminateIcon.props.fontSize ??
|
|
14503
|
+
fontSize: indeterminateIcon.props.fontSize ?? size2
|
|
14504
14504
|
}),
|
|
14505
14505
|
disableRipple,
|
|
14506
14506
|
slots,
|
|
@@ -14630,11 +14630,271 @@ Checkbox.propTypes = {
|
|
|
14630
14630
|
*/
|
|
14631
14631
|
value: PropTypes.any
|
|
14632
14632
|
};
|
|
14633
|
+
function getTypographyUtilityClass(slot) {
|
|
14634
|
+
return generateUtilityClass("MuiTypography", slot);
|
|
14635
|
+
}
|
|
14636
|
+
generateUtilityClasses("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
|
|
14637
|
+
const v6Colors = {
|
|
14638
|
+
primary: true,
|
|
14639
|
+
secondary: true,
|
|
14640
|
+
error: true,
|
|
14641
|
+
info: true,
|
|
14642
|
+
success: true,
|
|
14643
|
+
warning: true,
|
|
14644
|
+
textPrimary: true,
|
|
14645
|
+
textSecondary: true,
|
|
14646
|
+
textDisabled: true
|
|
14647
|
+
};
|
|
14648
|
+
const extendSxProp = internal_createExtendSxProp();
|
|
14649
|
+
const useUtilityClasses$b = (ownerState) => {
|
|
14650
|
+
const {
|
|
14651
|
+
align,
|
|
14652
|
+
gutterBottom,
|
|
14653
|
+
noWrap,
|
|
14654
|
+
paragraph,
|
|
14655
|
+
variant,
|
|
14656
|
+
classes
|
|
14657
|
+
} = ownerState;
|
|
14658
|
+
const slots = {
|
|
14659
|
+
root: ["root", variant, ownerState.align !== "inherit" && `align${capitalize$1(align)}`, gutterBottom && "gutterBottom", noWrap && "noWrap", paragraph && "paragraph"]
|
|
14660
|
+
};
|
|
14661
|
+
return composeClasses(slots, getTypographyUtilityClass, classes);
|
|
14662
|
+
};
|
|
14663
|
+
const TypographyRoot = styled("span", {
|
|
14664
|
+
name: "MuiTypography",
|
|
14665
|
+
slot: "Root",
|
|
14666
|
+
overridesResolver: (props, styles2) => {
|
|
14667
|
+
const {
|
|
14668
|
+
ownerState
|
|
14669
|
+
} = props;
|
|
14670
|
+
return [styles2.root, ownerState.variant && styles2[ownerState.variant], ownerState.align !== "inherit" && styles2[`align${capitalize$1(ownerState.align)}`], ownerState.noWrap && styles2.noWrap, ownerState.gutterBottom && styles2.gutterBottom, ownerState.paragraph && styles2.paragraph];
|
|
14671
|
+
}
|
|
14672
|
+
})(memoTheme(({
|
|
14673
|
+
theme
|
|
14674
|
+
}) => {
|
|
14675
|
+
var _a3;
|
|
14676
|
+
return {
|
|
14677
|
+
margin: 0,
|
|
14678
|
+
variants: [{
|
|
14679
|
+
props: {
|
|
14680
|
+
variant: "inherit"
|
|
14681
|
+
},
|
|
14682
|
+
style: {
|
|
14683
|
+
// Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.
|
|
14684
|
+
font: "inherit",
|
|
14685
|
+
lineHeight: "inherit",
|
|
14686
|
+
letterSpacing: "inherit"
|
|
14687
|
+
}
|
|
14688
|
+
}, ...Object.entries(theme.typography).filter(([variant, value]) => variant !== "inherit" && value && typeof value === "object").map(([variant, value]) => ({
|
|
14689
|
+
props: {
|
|
14690
|
+
variant
|
|
14691
|
+
},
|
|
14692
|
+
style: value
|
|
14693
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
14694
|
+
props: {
|
|
14695
|
+
color: color2
|
|
14696
|
+
},
|
|
14697
|
+
style: {
|
|
14698
|
+
color: (theme.vars || theme).palette[color2].main
|
|
14699
|
+
}
|
|
14700
|
+
})), ...Object.entries(((_a3 = theme.palette) == null ? void 0 : _a3.text) || {}).filter(([, value]) => typeof value === "string").map(([color2]) => ({
|
|
14701
|
+
props: {
|
|
14702
|
+
color: `text${capitalize$1(color2)}`
|
|
14703
|
+
},
|
|
14704
|
+
style: {
|
|
14705
|
+
color: (theme.vars || theme).palette.text[color2]
|
|
14706
|
+
}
|
|
14707
|
+
})), {
|
|
14708
|
+
props: ({
|
|
14709
|
+
ownerState
|
|
14710
|
+
}) => ownerState.align !== "inherit",
|
|
14711
|
+
style: {
|
|
14712
|
+
textAlign: "var(--Typography-textAlign)"
|
|
14713
|
+
}
|
|
14714
|
+
}, {
|
|
14715
|
+
props: ({
|
|
14716
|
+
ownerState
|
|
14717
|
+
}) => ownerState.noWrap,
|
|
14718
|
+
style: {
|
|
14719
|
+
overflow: "hidden",
|
|
14720
|
+
textOverflow: "ellipsis",
|
|
14721
|
+
whiteSpace: "nowrap"
|
|
14722
|
+
}
|
|
14723
|
+
}, {
|
|
14724
|
+
props: ({
|
|
14725
|
+
ownerState
|
|
14726
|
+
}) => ownerState.gutterBottom,
|
|
14727
|
+
style: {
|
|
14728
|
+
marginBottom: "0.35em"
|
|
14729
|
+
}
|
|
14730
|
+
}, {
|
|
14731
|
+
props: ({
|
|
14732
|
+
ownerState
|
|
14733
|
+
}) => ownerState.paragraph,
|
|
14734
|
+
style: {
|
|
14735
|
+
marginBottom: 16
|
|
14736
|
+
}
|
|
14737
|
+
}]
|
|
14738
|
+
};
|
|
14739
|
+
}));
|
|
14740
|
+
const defaultVariantMapping = {
|
|
14741
|
+
h1: "h1",
|
|
14742
|
+
h2: "h2",
|
|
14743
|
+
h3: "h3",
|
|
14744
|
+
h4: "h4",
|
|
14745
|
+
h5: "h5",
|
|
14746
|
+
h6: "h6",
|
|
14747
|
+
subtitle1: "h6",
|
|
14748
|
+
subtitle2: "h6",
|
|
14749
|
+
body1: "p",
|
|
14750
|
+
body2: "p",
|
|
14751
|
+
inherit: "p"
|
|
14752
|
+
};
|
|
14753
|
+
const Typography = /* @__PURE__ */ React.forwardRef(function Typography2(inProps, ref) {
|
|
14754
|
+
const {
|
|
14755
|
+
color: color2,
|
|
14756
|
+
...themeProps
|
|
14757
|
+
} = useDefaultProps({
|
|
14758
|
+
props: inProps,
|
|
14759
|
+
name: "MuiTypography"
|
|
14760
|
+
});
|
|
14761
|
+
const isSxColor = !v6Colors[color2];
|
|
14762
|
+
const props = extendSxProp({
|
|
14763
|
+
...themeProps,
|
|
14764
|
+
...isSxColor && {
|
|
14765
|
+
color: color2
|
|
14766
|
+
}
|
|
14767
|
+
});
|
|
14768
|
+
const {
|
|
14769
|
+
align = "inherit",
|
|
14770
|
+
className,
|
|
14771
|
+
component,
|
|
14772
|
+
gutterBottom = false,
|
|
14773
|
+
noWrap = false,
|
|
14774
|
+
paragraph = false,
|
|
14775
|
+
variant = "body1",
|
|
14776
|
+
variantMapping = defaultVariantMapping,
|
|
14777
|
+
...other
|
|
14778
|
+
} = props;
|
|
14779
|
+
const ownerState = {
|
|
14780
|
+
...props,
|
|
14781
|
+
align,
|
|
14782
|
+
color: color2,
|
|
14783
|
+
className,
|
|
14784
|
+
component,
|
|
14785
|
+
gutterBottom,
|
|
14786
|
+
noWrap,
|
|
14787
|
+
paragraph,
|
|
14788
|
+
variant,
|
|
14789
|
+
variantMapping
|
|
14790
|
+
};
|
|
14791
|
+
const Component2 = component || (paragraph ? "p" : variantMapping[variant] || defaultVariantMapping[variant]) || "span";
|
|
14792
|
+
const classes = useUtilityClasses$b(ownerState);
|
|
14793
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyRoot, {
|
|
14794
|
+
as: Component2,
|
|
14795
|
+
ref,
|
|
14796
|
+
className: clsx(classes.root, className),
|
|
14797
|
+
...other,
|
|
14798
|
+
ownerState,
|
|
14799
|
+
style: {
|
|
14800
|
+
...align !== "inherit" && {
|
|
14801
|
+
"--Typography-textAlign": align
|
|
14802
|
+
},
|
|
14803
|
+
...other.style
|
|
14804
|
+
}
|
|
14805
|
+
});
|
|
14806
|
+
});
|
|
14807
|
+
Typography.propTypes = {
|
|
14808
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
14809
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
14810
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
14811
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
14812
|
+
/**
|
|
14813
|
+
* Set the text-align on the component.
|
|
14814
|
+
* @default 'inherit'
|
|
14815
|
+
*/
|
|
14816
|
+
align: PropTypes.oneOf(["center", "inherit", "justify", "left", "right"]),
|
|
14817
|
+
/**
|
|
14818
|
+
* The content of the component.
|
|
14819
|
+
*/
|
|
14820
|
+
children: PropTypes.node,
|
|
14821
|
+
/**
|
|
14822
|
+
* Override or extend the styles applied to the component.
|
|
14823
|
+
*/
|
|
14824
|
+
classes: PropTypes.object,
|
|
14825
|
+
/**
|
|
14826
|
+
* @ignore
|
|
14827
|
+
*/
|
|
14828
|
+
className: PropTypes.string,
|
|
14829
|
+
/**
|
|
14830
|
+
* The color of the component.
|
|
14831
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
14832
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
14833
|
+
*/
|
|
14834
|
+
color: PropTypes.oneOfType([PropTypes.oneOf(["primary", "secondary", "success", "error", "info", "warning", "textPrimary", "textSecondary", "textDisabled"]), PropTypes.string]),
|
|
14835
|
+
/**
|
|
14836
|
+
* The component used for the root node.
|
|
14837
|
+
* Either a string to use a HTML element or a component.
|
|
14838
|
+
*/
|
|
14839
|
+
component: PropTypes.elementType,
|
|
14840
|
+
/**
|
|
14841
|
+
* If `true`, the text will have a bottom margin.
|
|
14842
|
+
* @default false
|
|
14843
|
+
*/
|
|
14844
|
+
gutterBottom: PropTypes.bool,
|
|
14845
|
+
/**
|
|
14846
|
+
* If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
|
|
14847
|
+
*
|
|
14848
|
+
* Note that text overflow can only happen with block or inline-block level elements
|
|
14849
|
+
* (the element needs to have a width in order to overflow).
|
|
14850
|
+
* @default false
|
|
14851
|
+
*/
|
|
14852
|
+
noWrap: PropTypes.bool,
|
|
14853
|
+
/**
|
|
14854
|
+
* If `true`, the element will be a paragraph element.
|
|
14855
|
+
* @default false
|
|
14856
|
+
* @deprecated Use the `component` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
14857
|
+
*/
|
|
14858
|
+
paragraph: PropTypes.bool,
|
|
14859
|
+
/**
|
|
14860
|
+
* @ignore
|
|
14861
|
+
*/
|
|
14862
|
+
style: PropTypes.object,
|
|
14863
|
+
/**
|
|
14864
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
14865
|
+
*/
|
|
14866
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
14867
|
+
/**
|
|
14868
|
+
* Applies the theme typography styles.
|
|
14869
|
+
* @default 'body1'
|
|
14870
|
+
*/
|
|
14871
|
+
variant: PropTypes.oneOfType([PropTypes.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), PropTypes.string]),
|
|
14872
|
+
/**
|
|
14873
|
+
* The component maps the variant prop to a range of different HTML element types.
|
|
14874
|
+
* For instance, subtitle1 to `<h6>`.
|
|
14875
|
+
* If you wish to change that mapping, you can provide your own.
|
|
14876
|
+
* Alternatively, you can use the `component` prop.
|
|
14877
|
+
* @default {
|
|
14878
|
+
* h1: 'h1',
|
|
14879
|
+
* h2: 'h2',
|
|
14880
|
+
* h3: 'h3',
|
|
14881
|
+
* h4: 'h4',
|
|
14882
|
+
* h5: 'h5',
|
|
14883
|
+
* h6: 'h6',
|
|
14884
|
+
* subtitle1: 'h6',
|
|
14885
|
+
* subtitle2: 'h6',
|
|
14886
|
+
* body1: 'p',
|
|
14887
|
+
* body2: 'p',
|
|
14888
|
+
* inherit: 'p',
|
|
14889
|
+
* }
|
|
14890
|
+
*/
|
|
14891
|
+
variantMapping: PropTypes.object
|
|
14892
|
+
};
|
|
14633
14893
|
function getFormControlUtilityClasses(slot) {
|
|
14634
14894
|
return generateUtilityClass("MuiFormControl", slot);
|
|
14635
14895
|
}
|
|
14636
14896
|
generateUtilityClasses("MuiFormControl", ["root", "marginNone", "marginNormal", "marginDense", "fullWidth", "disabled"]);
|
|
14637
|
-
const useUtilityClasses$
|
|
14897
|
+
const useUtilityClasses$a = (ownerState) => {
|
|
14638
14898
|
const {
|
|
14639
14899
|
classes,
|
|
14640
14900
|
margin: margin2,
|
|
@@ -14707,7 +14967,7 @@ const FormControl = /* @__PURE__ */ React.forwardRef(function FormControl2(inPro
|
|
|
14707
14967
|
hiddenLabel = false,
|
|
14708
14968
|
margin: margin2 = "none",
|
|
14709
14969
|
required = false,
|
|
14710
|
-
size = "medium",
|
|
14970
|
+
size: size2 = "medium",
|
|
14711
14971
|
variant = "outlined",
|
|
14712
14972
|
...other
|
|
14713
14973
|
} = props;
|
|
@@ -14721,10 +14981,10 @@ const FormControl = /* @__PURE__ */ React.forwardRef(function FormControl2(inPro
|
|
|
14721
14981
|
hiddenLabel,
|
|
14722
14982
|
margin: margin2,
|
|
14723
14983
|
required,
|
|
14724
|
-
size,
|
|
14984
|
+
size: size2,
|
|
14725
14985
|
variant
|
|
14726
14986
|
};
|
|
14727
|
-
const classes = useUtilityClasses$
|
|
14987
|
+
const classes = useUtilityClasses$a(ownerState);
|
|
14728
14988
|
const [adornedStart, setAdornedStart] = React.useState(() => {
|
|
14729
14989
|
let initialAdornedStart = false;
|
|
14730
14990
|
if (children) {
|
|
@@ -14789,7 +15049,7 @@ const FormControl = /* @__PURE__ */ React.forwardRef(function FormControl2(inPro
|
|
|
14789
15049
|
focused,
|
|
14790
15050
|
fullWidth,
|
|
14791
15051
|
hiddenLabel,
|
|
14792
|
-
size,
|
|
15052
|
+
size: size2,
|
|
14793
15053
|
onBlur: () => {
|
|
14794
15054
|
setFocused(false);
|
|
14795
15055
|
},
|
|
@@ -14802,7 +15062,7 @@ const FormControl = /* @__PURE__ */ React.forwardRef(function FormControl2(inPro
|
|
|
14802
15062
|
required,
|
|
14803
15063
|
variant
|
|
14804
15064
|
};
|
|
14805
|
-
}, [adornedStart, color2, disabled, error2, filled, focused, fullWidth, hiddenLabel, registerEffect, onEmpty, onFilled, required,
|
|
15065
|
+
}, [adornedStart, color2, disabled, error2, filled, focused, fullWidth, hiddenLabel, registerEffect, onEmpty, onFilled, required, size2, variant]);
|
|
14806
15066
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlContext.Provider, {
|
|
14807
15067
|
value: childContext,
|
|
14808
15068
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlRoot, {
|
|
@@ -14895,266 +15155,6 @@ FormControl.propTypes = {
|
|
|
14895
15155
|
*/
|
|
14896
15156
|
variant: PropTypes.oneOf(["filled", "outlined", "standard"])
|
|
14897
15157
|
};
|
|
14898
|
-
function getTypographyUtilityClass(slot) {
|
|
14899
|
-
return generateUtilityClass("MuiTypography", slot);
|
|
14900
|
-
}
|
|
14901
|
-
generateUtilityClasses("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
|
|
14902
|
-
const v6Colors = {
|
|
14903
|
-
primary: true,
|
|
14904
|
-
secondary: true,
|
|
14905
|
-
error: true,
|
|
14906
|
-
info: true,
|
|
14907
|
-
success: true,
|
|
14908
|
-
warning: true,
|
|
14909
|
-
textPrimary: true,
|
|
14910
|
-
textSecondary: true,
|
|
14911
|
-
textDisabled: true
|
|
14912
|
-
};
|
|
14913
|
-
const extendSxProp = internal_createExtendSxProp();
|
|
14914
|
-
const useUtilityClasses$a = (ownerState) => {
|
|
14915
|
-
const {
|
|
14916
|
-
align,
|
|
14917
|
-
gutterBottom,
|
|
14918
|
-
noWrap,
|
|
14919
|
-
paragraph,
|
|
14920
|
-
variant,
|
|
14921
|
-
classes
|
|
14922
|
-
} = ownerState;
|
|
14923
|
-
const slots = {
|
|
14924
|
-
root: ["root", variant, ownerState.align !== "inherit" && `align${capitalize$1(align)}`, gutterBottom && "gutterBottom", noWrap && "noWrap", paragraph && "paragraph"]
|
|
14925
|
-
};
|
|
14926
|
-
return composeClasses(slots, getTypographyUtilityClass, classes);
|
|
14927
|
-
};
|
|
14928
|
-
const TypographyRoot = styled("span", {
|
|
14929
|
-
name: "MuiTypography",
|
|
14930
|
-
slot: "Root",
|
|
14931
|
-
overridesResolver: (props, styles2) => {
|
|
14932
|
-
const {
|
|
14933
|
-
ownerState
|
|
14934
|
-
} = props;
|
|
14935
|
-
return [styles2.root, ownerState.variant && styles2[ownerState.variant], ownerState.align !== "inherit" && styles2[`align${capitalize$1(ownerState.align)}`], ownerState.noWrap && styles2.noWrap, ownerState.gutterBottom && styles2.gutterBottom, ownerState.paragraph && styles2.paragraph];
|
|
14936
|
-
}
|
|
14937
|
-
})(memoTheme(({
|
|
14938
|
-
theme
|
|
14939
|
-
}) => {
|
|
14940
|
-
var _a3;
|
|
14941
|
-
return {
|
|
14942
|
-
margin: 0,
|
|
14943
|
-
variants: [{
|
|
14944
|
-
props: {
|
|
14945
|
-
variant: "inherit"
|
|
14946
|
-
},
|
|
14947
|
-
style: {
|
|
14948
|
-
// Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.
|
|
14949
|
-
font: "inherit",
|
|
14950
|
-
lineHeight: "inherit",
|
|
14951
|
-
letterSpacing: "inherit"
|
|
14952
|
-
}
|
|
14953
|
-
}, ...Object.entries(theme.typography).filter(([variant, value]) => variant !== "inherit" && value && typeof value === "object").map(([variant, value]) => ({
|
|
14954
|
-
props: {
|
|
14955
|
-
variant
|
|
14956
|
-
},
|
|
14957
|
-
style: value
|
|
14958
|
-
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
14959
|
-
props: {
|
|
14960
|
-
color: color2
|
|
14961
|
-
},
|
|
14962
|
-
style: {
|
|
14963
|
-
color: (theme.vars || theme).palette[color2].main
|
|
14964
|
-
}
|
|
14965
|
-
})), ...Object.entries(((_a3 = theme.palette) == null ? void 0 : _a3.text) || {}).filter(([, value]) => typeof value === "string").map(([color2]) => ({
|
|
14966
|
-
props: {
|
|
14967
|
-
color: `text${capitalize$1(color2)}`
|
|
14968
|
-
},
|
|
14969
|
-
style: {
|
|
14970
|
-
color: (theme.vars || theme).palette.text[color2]
|
|
14971
|
-
}
|
|
14972
|
-
})), {
|
|
14973
|
-
props: ({
|
|
14974
|
-
ownerState
|
|
14975
|
-
}) => ownerState.align !== "inherit",
|
|
14976
|
-
style: {
|
|
14977
|
-
textAlign: "var(--Typography-textAlign)"
|
|
14978
|
-
}
|
|
14979
|
-
}, {
|
|
14980
|
-
props: ({
|
|
14981
|
-
ownerState
|
|
14982
|
-
}) => ownerState.noWrap,
|
|
14983
|
-
style: {
|
|
14984
|
-
overflow: "hidden",
|
|
14985
|
-
textOverflow: "ellipsis",
|
|
14986
|
-
whiteSpace: "nowrap"
|
|
14987
|
-
}
|
|
14988
|
-
}, {
|
|
14989
|
-
props: ({
|
|
14990
|
-
ownerState
|
|
14991
|
-
}) => ownerState.gutterBottom,
|
|
14992
|
-
style: {
|
|
14993
|
-
marginBottom: "0.35em"
|
|
14994
|
-
}
|
|
14995
|
-
}, {
|
|
14996
|
-
props: ({
|
|
14997
|
-
ownerState
|
|
14998
|
-
}) => ownerState.paragraph,
|
|
14999
|
-
style: {
|
|
15000
|
-
marginBottom: 16
|
|
15001
|
-
}
|
|
15002
|
-
}]
|
|
15003
|
-
};
|
|
15004
|
-
}));
|
|
15005
|
-
const defaultVariantMapping = {
|
|
15006
|
-
h1: "h1",
|
|
15007
|
-
h2: "h2",
|
|
15008
|
-
h3: "h3",
|
|
15009
|
-
h4: "h4",
|
|
15010
|
-
h5: "h5",
|
|
15011
|
-
h6: "h6",
|
|
15012
|
-
subtitle1: "h6",
|
|
15013
|
-
subtitle2: "h6",
|
|
15014
|
-
body1: "p",
|
|
15015
|
-
body2: "p",
|
|
15016
|
-
inherit: "p"
|
|
15017
|
-
};
|
|
15018
|
-
const Typography = /* @__PURE__ */ React.forwardRef(function Typography2(inProps, ref) {
|
|
15019
|
-
const {
|
|
15020
|
-
color: color2,
|
|
15021
|
-
...themeProps
|
|
15022
|
-
} = useDefaultProps({
|
|
15023
|
-
props: inProps,
|
|
15024
|
-
name: "MuiTypography"
|
|
15025
|
-
});
|
|
15026
|
-
const isSxColor = !v6Colors[color2];
|
|
15027
|
-
const props = extendSxProp({
|
|
15028
|
-
...themeProps,
|
|
15029
|
-
...isSxColor && {
|
|
15030
|
-
color: color2
|
|
15031
|
-
}
|
|
15032
|
-
});
|
|
15033
|
-
const {
|
|
15034
|
-
align = "inherit",
|
|
15035
|
-
className,
|
|
15036
|
-
component,
|
|
15037
|
-
gutterBottom = false,
|
|
15038
|
-
noWrap = false,
|
|
15039
|
-
paragraph = false,
|
|
15040
|
-
variant = "body1",
|
|
15041
|
-
variantMapping = defaultVariantMapping,
|
|
15042
|
-
...other
|
|
15043
|
-
} = props;
|
|
15044
|
-
const ownerState = {
|
|
15045
|
-
...props,
|
|
15046
|
-
align,
|
|
15047
|
-
color: color2,
|
|
15048
|
-
className,
|
|
15049
|
-
component,
|
|
15050
|
-
gutterBottom,
|
|
15051
|
-
noWrap,
|
|
15052
|
-
paragraph,
|
|
15053
|
-
variant,
|
|
15054
|
-
variantMapping
|
|
15055
|
-
};
|
|
15056
|
-
const Component2 = component || (paragraph ? "p" : variantMapping[variant] || defaultVariantMapping[variant]) || "span";
|
|
15057
|
-
const classes = useUtilityClasses$a(ownerState);
|
|
15058
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyRoot, {
|
|
15059
|
-
as: Component2,
|
|
15060
|
-
ref,
|
|
15061
|
-
className: clsx(classes.root, className),
|
|
15062
|
-
...other,
|
|
15063
|
-
ownerState,
|
|
15064
|
-
style: {
|
|
15065
|
-
...align !== "inherit" && {
|
|
15066
|
-
"--Typography-textAlign": align
|
|
15067
|
-
},
|
|
15068
|
-
...other.style
|
|
15069
|
-
}
|
|
15070
|
-
});
|
|
15071
|
-
});
|
|
15072
|
-
Typography.propTypes = {
|
|
15073
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
15074
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
15075
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
15076
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
15077
|
-
/**
|
|
15078
|
-
* Set the text-align on the component.
|
|
15079
|
-
* @default 'inherit'
|
|
15080
|
-
*/
|
|
15081
|
-
align: PropTypes.oneOf(["center", "inherit", "justify", "left", "right"]),
|
|
15082
|
-
/**
|
|
15083
|
-
* The content of the component.
|
|
15084
|
-
*/
|
|
15085
|
-
children: PropTypes.node,
|
|
15086
|
-
/**
|
|
15087
|
-
* Override or extend the styles applied to the component.
|
|
15088
|
-
*/
|
|
15089
|
-
classes: PropTypes.object,
|
|
15090
|
-
/**
|
|
15091
|
-
* @ignore
|
|
15092
|
-
*/
|
|
15093
|
-
className: PropTypes.string,
|
|
15094
|
-
/**
|
|
15095
|
-
* The color of the component.
|
|
15096
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
|
15097
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
15098
|
-
*/
|
|
15099
|
-
color: PropTypes.oneOfType([PropTypes.oneOf(["primary", "secondary", "success", "error", "info", "warning", "textPrimary", "textSecondary", "textDisabled"]), PropTypes.string]),
|
|
15100
|
-
/**
|
|
15101
|
-
* The component used for the root node.
|
|
15102
|
-
* Either a string to use a HTML element or a component.
|
|
15103
|
-
*/
|
|
15104
|
-
component: PropTypes.elementType,
|
|
15105
|
-
/**
|
|
15106
|
-
* If `true`, the text will have a bottom margin.
|
|
15107
|
-
* @default false
|
|
15108
|
-
*/
|
|
15109
|
-
gutterBottom: PropTypes.bool,
|
|
15110
|
-
/**
|
|
15111
|
-
* If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
|
|
15112
|
-
*
|
|
15113
|
-
* Note that text overflow can only happen with block or inline-block level elements
|
|
15114
|
-
* (the element needs to have a width in order to overflow).
|
|
15115
|
-
* @default false
|
|
15116
|
-
*/
|
|
15117
|
-
noWrap: PropTypes.bool,
|
|
15118
|
-
/**
|
|
15119
|
-
* If `true`, the element will be a paragraph element.
|
|
15120
|
-
* @default false
|
|
15121
|
-
* @deprecated Use the `component` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
15122
|
-
*/
|
|
15123
|
-
paragraph: PropTypes.bool,
|
|
15124
|
-
/**
|
|
15125
|
-
* @ignore
|
|
15126
|
-
*/
|
|
15127
|
-
style: PropTypes.object,
|
|
15128
|
-
/**
|
|
15129
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
15130
|
-
*/
|
|
15131
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
15132
|
-
/**
|
|
15133
|
-
* Applies the theme typography styles.
|
|
15134
|
-
* @default 'body1'
|
|
15135
|
-
*/
|
|
15136
|
-
variant: PropTypes.oneOfType([PropTypes.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), PropTypes.string]),
|
|
15137
|
-
/**
|
|
15138
|
-
* The component maps the variant prop to a range of different HTML element types.
|
|
15139
|
-
* For instance, subtitle1 to `<h6>`.
|
|
15140
|
-
* If you wish to change that mapping, you can provide your own.
|
|
15141
|
-
* Alternatively, you can use the `component` prop.
|
|
15142
|
-
* @default {
|
|
15143
|
-
* h1: 'h1',
|
|
15144
|
-
* h2: 'h2',
|
|
15145
|
-
* h3: 'h3',
|
|
15146
|
-
* h4: 'h4',
|
|
15147
|
-
* h5: 'h5',
|
|
15148
|
-
* h6: 'h6',
|
|
15149
|
-
* subtitle1: 'h6',
|
|
15150
|
-
* subtitle2: 'h6',
|
|
15151
|
-
* body1: 'p',
|
|
15152
|
-
* body2: 'p',
|
|
15153
|
-
* inherit: 'p',
|
|
15154
|
-
* }
|
|
15155
|
-
*/
|
|
15156
|
-
variantMapping: PropTypes.object
|
|
15157
|
-
};
|
|
15158
15158
|
function getFormLabelUtilityClasses(slot) {
|
|
15159
15159
|
return generateUtilityClass("MuiFormLabel", slot);
|
|
15160
15160
|
}
|
|
@@ -15450,14 +15450,14 @@ const useUtilityClasses$8 = (ownerState) => {
|
|
|
15450
15450
|
const {
|
|
15451
15451
|
classes,
|
|
15452
15452
|
formControl,
|
|
15453
|
-
size,
|
|
15453
|
+
size: size2,
|
|
15454
15454
|
shrink,
|
|
15455
15455
|
disableAnimation,
|
|
15456
15456
|
variant,
|
|
15457
15457
|
required
|
|
15458
15458
|
} = ownerState;
|
|
15459
15459
|
const slots = {
|
|
15460
|
-
root: ["root", formControl && "formControl", !disableAnimation && "animated", shrink && "shrink",
|
|
15460
|
+
root: ["root", formControl && "formControl", !disableAnimation && "animated", shrink && "shrink", size2 && size2 !== "medium" && `size${capitalize$1(size2)}`, variant],
|
|
15461
15461
|
asterisk: [required && "asterisk"]
|
|
15462
15462
|
};
|
|
15463
15463
|
const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);
|
|
@@ -15563,8 +15563,8 @@ const InputLabelRoot = styled(FormLabel, {
|
|
|
15563
15563
|
props: ({
|
|
15564
15564
|
variant,
|
|
15565
15565
|
ownerState,
|
|
15566
|
-
size
|
|
15567
|
-
}) => variant === "filled" && ownerState.shrink &&
|
|
15566
|
+
size: size2
|
|
15567
|
+
}) => variant === "filled" && ownerState.shrink && size2 === "small",
|
|
15568
15568
|
style: {
|
|
15569
15569
|
transform: "translate(12px, 4px) scale(0.75)"
|
|
15570
15570
|
}
|
|
@@ -17894,10 +17894,10 @@ const useUtilityClasses$3 = (ownerState) => {
|
|
|
17894
17894
|
track,
|
|
17895
17895
|
classes,
|
|
17896
17896
|
color: color2,
|
|
17897
|
-
size
|
|
17897
|
+
size: size2
|
|
17898
17898
|
} = ownerState;
|
|
17899
17899
|
const slots = {
|
|
17900
|
-
root: ["root", disabled && "disabled", dragging && "dragging", marked && "marked", orientation === "vertical" && "vertical", track === "inverted" && "trackInverted", track === false && "trackFalse", color2 && `color${capitalize$1(color2)}`,
|
|
17900
|
+
root: ["root", disabled && "disabled", dragging && "dragging", marked && "marked", orientation === "vertical" && "vertical", track === "inverted" && "trackInverted", track === false && "trackFalse", color2 && `color${capitalize$1(color2)}`, size2 && `size${capitalize$1(size2)}`],
|
|
17901
17901
|
rail: ["rail"],
|
|
17902
17902
|
track: ["track"],
|
|
17903
17903
|
mark: ["mark"],
|
|
@@ -17905,7 +17905,7 @@ const useUtilityClasses$3 = (ownerState) => {
|
|
|
17905
17905
|
markLabel: ["markLabel"],
|
|
17906
17906
|
markLabelActive: ["markLabelActive"],
|
|
17907
17907
|
valueLabel: ["valueLabel"],
|
|
17908
|
-
thumb: ["thumb", disabled && "disabled",
|
|
17908
|
+
thumb: ["thumb", disabled && "disabled", size2 && `thumbSize${capitalize$1(size2)}`, color2 && `thumbColor${capitalize$1(color2)}`],
|
|
17909
17909
|
active: ["active"],
|
|
17910
17910
|
disabled: ["disabled"],
|
|
17911
17911
|
focusVisible: ["focusVisible"]
|
|
@@ -17944,7 +17944,7 @@ const Slider = /* @__PURE__ */ React.forwardRef(function Slider2(inputProps, ref
|
|
|
17944
17944
|
onChangeCommitted,
|
|
17945
17945
|
orientation = "horizontal",
|
|
17946
17946
|
shiftStep = 10,
|
|
17947
|
-
size = "medium",
|
|
17947
|
+
size: size2 = "medium",
|
|
17948
17948
|
step = 1,
|
|
17949
17949
|
scale: scale2 = Identity,
|
|
17950
17950
|
slotProps,
|
|
@@ -17967,7 +17967,7 @@ const Slider = /* @__PURE__ */ React.forwardRef(function Slider2(inputProps, ref
|
|
|
17967
17967
|
orientation,
|
|
17968
17968
|
marks: marksProp,
|
|
17969
17969
|
color: color2,
|
|
17970
|
-
size,
|
|
17970
|
+
size: size2,
|
|
17971
17971
|
step,
|
|
17972
17972
|
shiftStep,
|
|
17973
17973
|
scale: scale2,
|
|
@@ -19300,7 +19300,7 @@ const Tabs = /* @__PURE__ */ React.forwardRef(function Tabs2(inProps, ref) {
|
|
|
19300
19300
|
const start = vertical ? "top" : "left";
|
|
19301
19301
|
const end = vertical ? "bottom" : "right";
|
|
19302
19302
|
const clientSize = vertical ? "clientHeight" : "clientWidth";
|
|
19303
|
-
const
|
|
19303
|
+
const size2 = vertical ? "height" : "width";
|
|
19304
19304
|
const ownerState = {
|
|
19305
19305
|
...props,
|
|
19306
19306
|
component,
|
|
@@ -19418,13 +19418,13 @@ const Tabs = /* @__PURE__ */ React.forwardRef(function Tabs2(inProps, ref) {
|
|
|
19418
19418
|
const newIndicatorStyle = {
|
|
19419
19419
|
[startIndicator]: startValue,
|
|
19420
19420
|
// May be wrong until the font is loaded.
|
|
19421
|
-
[
|
|
19421
|
+
[size2]: tabMeta ? tabMeta[size2] : 0
|
|
19422
19422
|
};
|
|
19423
|
-
if (typeof indicatorStyle[startIndicator] !== "number" || typeof indicatorStyle[
|
|
19423
|
+
if (typeof indicatorStyle[startIndicator] !== "number" || typeof indicatorStyle[size2] !== "number") {
|
|
19424
19424
|
setIndicatorStyle(newIndicatorStyle);
|
|
19425
19425
|
} else {
|
|
19426
19426
|
const dStart = Math.abs(indicatorStyle[startIndicator] - newIndicatorStyle[startIndicator]);
|
|
19427
|
-
const dSize = Math.abs(indicatorStyle[
|
|
19427
|
+
const dSize = Math.abs(indicatorStyle[size2] - newIndicatorStyle[size2]);
|
|
19428
19428
|
if (dStart >= 1 || dSize >= 1) {
|
|
19429
19429
|
setIndicatorStyle(newIndicatorStyle);
|
|
19430
19430
|
}
|
|
@@ -20893,13 +20893,13 @@ function toValue(str, measurement, popperOffsets, referenceOffsets) {
|
|
|
20893
20893
|
var rect = getClientRect(element);
|
|
20894
20894
|
return rect[measurement] / 100 * value;
|
|
20895
20895
|
} else if (unit === "vh" || unit === "vw") {
|
|
20896
|
-
var
|
|
20896
|
+
var size2 = void 0;
|
|
20897
20897
|
if (unit === "vh") {
|
|
20898
|
-
|
|
20898
|
+
size2 = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
|
20899
20899
|
} else {
|
|
20900
|
-
|
|
20900
|
+
size2 = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
|
|
20901
20901
|
}
|
|
20902
|
-
return
|
|
20902
|
+
return size2 / 100 * value;
|
|
20903
20903
|
} else {
|
|
20904
20904
|
return value;
|
|
20905
20905
|
}
|
|
@@ -21673,6 +21673,668 @@ React.forwardRef((props, ref) => {
|
|
|
21673
21673
|
...style2
|
|
21674
21674
|
}, children: typeof children === "function" ? children(childProps) : children }) });
|
|
21675
21675
|
});
|
|
21676
|
+
var safeIsNaN = Number.isNaN || function ponyfill(value) {
|
|
21677
|
+
return typeof value === "number" && value !== value;
|
|
21678
|
+
};
|
|
21679
|
+
function isEqual$2(first, second) {
|
|
21680
|
+
if (first === second) {
|
|
21681
|
+
return true;
|
|
21682
|
+
}
|
|
21683
|
+
if (safeIsNaN(first) && safeIsNaN(second)) {
|
|
21684
|
+
return true;
|
|
21685
|
+
}
|
|
21686
|
+
return false;
|
|
21687
|
+
}
|
|
21688
|
+
function areInputsEqual(newInputs, lastInputs) {
|
|
21689
|
+
if (newInputs.length !== lastInputs.length) {
|
|
21690
|
+
return false;
|
|
21691
|
+
}
|
|
21692
|
+
for (var i2 = 0; i2 < newInputs.length; i2++) {
|
|
21693
|
+
if (!isEqual$2(newInputs[i2], lastInputs[i2])) {
|
|
21694
|
+
return false;
|
|
21695
|
+
}
|
|
21696
|
+
}
|
|
21697
|
+
return true;
|
|
21698
|
+
}
|
|
21699
|
+
function memoizeOne(resultFn, isEqual2) {
|
|
21700
|
+
if (isEqual2 === void 0) {
|
|
21701
|
+
isEqual2 = areInputsEqual;
|
|
21702
|
+
}
|
|
21703
|
+
var lastThis;
|
|
21704
|
+
var lastArgs = [];
|
|
21705
|
+
var lastResult;
|
|
21706
|
+
var calledOnce = false;
|
|
21707
|
+
function memoized() {
|
|
21708
|
+
var newArgs = [];
|
|
21709
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
21710
|
+
newArgs[_i] = arguments[_i];
|
|
21711
|
+
}
|
|
21712
|
+
if (calledOnce && lastThis === this && isEqual2(newArgs, lastArgs)) {
|
|
21713
|
+
return lastResult;
|
|
21714
|
+
}
|
|
21715
|
+
lastResult = resultFn.apply(this, newArgs);
|
|
21716
|
+
calledOnce = true;
|
|
21717
|
+
lastThis = this;
|
|
21718
|
+
lastArgs = newArgs;
|
|
21719
|
+
return lastResult;
|
|
21720
|
+
}
|
|
21721
|
+
return memoized;
|
|
21722
|
+
}
|
|
21723
|
+
var hasNativePerformanceNow = typeof performance === "object" && typeof performance.now === "function";
|
|
21724
|
+
var now$1 = hasNativePerformanceNow ? function() {
|
|
21725
|
+
return performance.now();
|
|
21726
|
+
} : function() {
|
|
21727
|
+
return Date.now();
|
|
21728
|
+
};
|
|
21729
|
+
function cancelTimeout(timeoutID) {
|
|
21730
|
+
cancelAnimationFrame(timeoutID.id);
|
|
21731
|
+
}
|
|
21732
|
+
function requestTimeout(callback, delay) {
|
|
21733
|
+
var start = now$1();
|
|
21734
|
+
function tick() {
|
|
21735
|
+
if (now$1() - start >= delay) {
|
|
21736
|
+
callback.call(null);
|
|
21737
|
+
} else {
|
|
21738
|
+
timeoutID.id = requestAnimationFrame(tick);
|
|
21739
|
+
}
|
|
21740
|
+
}
|
|
21741
|
+
var timeoutID = {
|
|
21742
|
+
id: requestAnimationFrame(tick)
|
|
21743
|
+
};
|
|
21744
|
+
return timeoutID;
|
|
21745
|
+
}
|
|
21746
|
+
var size = -1;
|
|
21747
|
+
function getScrollbarSize(recalculate) {
|
|
21748
|
+
if (recalculate === void 0) {
|
|
21749
|
+
recalculate = false;
|
|
21750
|
+
}
|
|
21751
|
+
if (size === -1 || recalculate) {
|
|
21752
|
+
var div = document.createElement("div");
|
|
21753
|
+
var style2 = div.style;
|
|
21754
|
+
style2.width = "50px";
|
|
21755
|
+
style2.height = "50px";
|
|
21756
|
+
style2.overflow = "scroll";
|
|
21757
|
+
document.body.appendChild(div);
|
|
21758
|
+
size = div.offsetWidth - div.clientWidth;
|
|
21759
|
+
document.body.removeChild(div);
|
|
21760
|
+
}
|
|
21761
|
+
return size;
|
|
21762
|
+
}
|
|
21763
|
+
var cachedRTLResult = null;
|
|
21764
|
+
function getRTLOffsetType(recalculate) {
|
|
21765
|
+
if (recalculate === void 0) {
|
|
21766
|
+
recalculate = false;
|
|
21767
|
+
}
|
|
21768
|
+
if (cachedRTLResult === null || recalculate) {
|
|
21769
|
+
var outerDiv = document.createElement("div");
|
|
21770
|
+
var outerStyle = outerDiv.style;
|
|
21771
|
+
outerStyle.width = "50px";
|
|
21772
|
+
outerStyle.height = "50px";
|
|
21773
|
+
outerStyle.overflow = "scroll";
|
|
21774
|
+
outerStyle.direction = "rtl";
|
|
21775
|
+
var innerDiv = document.createElement("div");
|
|
21776
|
+
var innerStyle = innerDiv.style;
|
|
21777
|
+
innerStyle.width = "100px";
|
|
21778
|
+
innerStyle.height = "100px";
|
|
21779
|
+
outerDiv.appendChild(innerDiv);
|
|
21780
|
+
document.body.appendChild(outerDiv);
|
|
21781
|
+
if (outerDiv.scrollLeft > 0) {
|
|
21782
|
+
cachedRTLResult = "positive-descending";
|
|
21783
|
+
} else {
|
|
21784
|
+
outerDiv.scrollLeft = 1;
|
|
21785
|
+
if (outerDiv.scrollLeft === 0) {
|
|
21786
|
+
cachedRTLResult = "negative";
|
|
21787
|
+
} else {
|
|
21788
|
+
cachedRTLResult = "positive-ascending";
|
|
21789
|
+
}
|
|
21790
|
+
}
|
|
21791
|
+
document.body.removeChild(outerDiv);
|
|
21792
|
+
return cachedRTLResult;
|
|
21793
|
+
}
|
|
21794
|
+
return cachedRTLResult;
|
|
21795
|
+
}
|
|
21796
|
+
var IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;
|
|
21797
|
+
var defaultItemKey$1 = function defaultItemKey3(index2, data) {
|
|
21798
|
+
return index2;
|
|
21799
|
+
};
|
|
21800
|
+
var devWarningsDirection = null;
|
|
21801
|
+
var devWarningsTagName$1 = null;
|
|
21802
|
+
{
|
|
21803
|
+
if (typeof window !== "undefined" && typeof window.WeakSet !== "undefined") {
|
|
21804
|
+
devWarningsDirection = /* @__PURE__ */ new WeakSet();
|
|
21805
|
+
devWarningsTagName$1 = /* @__PURE__ */ new WeakSet();
|
|
21806
|
+
}
|
|
21807
|
+
}
|
|
21808
|
+
function createListComponent(_ref) {
|
|
21809
|
+
var _class;
|
|
21810
|
+
var getItemOffset3 = _ref.getItemOffset, getEstimatedTotalSize4 = _ref.getEstimatedTotalSize, getItemSize3 = _ref.getItemSize, getOffsetForIndexAndAlignment5 = _ref.getOffsetForIndexAndAlignment, getStartIndexForOffset3 = _ref.getStartIndexForOffset, getStopIndexForStartIndex3 = _ref.getStopIndexForStartIndex, initInstanceProps5 = _ref.initInstanceProps, shouldResetStyleCacheOnItemSizeChange = _ref.shouldResetStyleCacheOnItemSizeChange, validateProps5 = _ref.validateProps;
|
|
21811
|
+
return _class = /* @__PURE__ */ function(_PureComponent) {
|
|
21812
|
+
_inheritsLoose(List2, _PureComponent);
|
|
21813
|
+
function List2(props) {
|
|
21814
|
+
var _this;
|
|
21815
|
+
_this = _PureComponent.call(this, props) || this;
|
|
21816
|
+
_this._instanceProps = initInstanceProps5(_this.props, _assertThisInitialized(_this));
|
|
21817
|
+
_this._outerRef = void 0;
|
|
21818
|
+
_this._resetIsScrollingTimeoutId = null;
|
|
21819
|
+
_this.state = {
|
|
21820
|
+
instance: _assertThisInitialized(_this),
|
|
21821
|
+
isScrolling: false,
|
|
21822
|
+
scrollDirection: "forward",
|
|
21823
|
+
scrollOffset: typeof _this.props.initialScrollOffset === "number" ? _this.props.initialScrollOffset : 0,
|
|
21824
|
+
scrollUpdateWasRequested: false
|
|
21825
|
+
};
|
|
21826
|
+
_this._callOnItemsRendered = void 0;
|
|
21827
|
+
_this._callOnItemsRendered = memoizeOne(function(overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {
|
|
21828
|
+
return _this.props.onItemsRendered({
|
|
21829
|
+
overscanStartIndex,
|
|
21830
|
+
overscanStopIndex,
|
|
21831
|
+
visibleStartIndex,
|
|
21832
|
+
visibleStopIndex
|
|
21833
|
+
});
|
|
21834
|
+
});
|
|
21835
|
+
_this._callOnScroll = void 0;
|
|
21836
|
+
_this._callOnScroll = memoizeOne(function(scrollDirection, scrollOffset, scrollUpdateWasRequested) {
|
|
21837
|
+
return _this.props.onScroll({
|
|
21838
|
+
scrollDirection,
|
|
21839
|
+
scrollOffset,
|
|
21840
|
+
scrollUpdateWasRequested
|
|
21841
|
+
});
|
|
21842
|
+
});
|
|
21843
|
+
_this._getItemStyle = void 0;
|
|
21844
|
+
_this._getItemStyle = function(index2) {
|
|
21845
|
+
var _this$props = _this.props, direction = _this$props.direction, itemSize = _this$props.itemSize, layout = _this$props.layout;
|
|
21846
|
+
var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && layout, shouldResetStyleCacheOnItemSizeChange && direction);
|
|
21847
|
+
var style2;
|
|
21848
|
+
if (itemStyleCache.hasOwnProperty(index2)) {
|
|
21849
|
+
style2 = itemStyleCache[index2];
|
|
21850
|
+
} else {
|
|
21851
|
+
var _offset = getItemOffset3(_this.props, index2, _this._instanceProps);
|
|
21852
|
+
var size2 = getItemSize3(_this.props, index2, _this._instanceProps);
|
|
21853
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
21854
|
+
var isRtl = direction === "rtl";
|
|
21855
|
+
var offsetHorizontal = isHorizontal ? _offset : 0;
|
|
21856
|
+
itemStyleCache[index2] = style2 = {
|
|
21857
|
+
position: "absolute",
|
|
21858
|
+
left: isRtl ? void 0 : offsetHorizontal,
|
|
21859
|
+
right: isRtl ? offsetHorizontal : void 0,
|
|
21860
|
+
top: !isHorizontal ? _offset : 0,
|
|
21861
|
+
height: !isHorizontal ? size2 : "100%",
|
|
21862
|
+
width: isHorizontal ? size2 : "100%"
|
|
21863
|
+
};
|
|
21864
|
+
}
|
|
21865
|
+
return style2;
|
|
21866
|
+
};
|
|
21867
|
+
_this._getItemStyleCache = void 0;
|
|
21868
|
+
_this._getItemStyleCache = memoizeOne(function(_, __, ___) {
|
|
21869
|
+
return {};
|
|
21870
|
+
});
|
|
21871
|
+
_this._onScrollHorizontal = function(event) {
|
|
21872
|
+
var _event$currentTarget = event.currentTarget, clientWidth = _event$currentTarget.clientWidth, scrollLeft = _event$currentTarget.scrollLeft, scrollWidth = _event$currentTarget.scrollWidth;
|
|
21873
|
+
_this.setState(function(prevState) {
|
|
21874
|
+
if (prevState.scrollOffset === scrollLeft) {
|
|
21875
|
+
return null;
|
|
21876
|
+
}
|
|
21877
|
+
var direction = _this.props.direction;
|
|
21878
|
+
var scrollOffset = scrollLeft;
|
|
21879
|
+
if (direction === "rtl") {
|
|
21880
|
+
switch (getRTLOffsetType()) {
|
|
21881
|
+
case "negative":
|
|
21882
|
+
scrollOffset = -scrollLeft;
|
|
21883
|
+
break;
|
|
21884
|
+
case "positive-descending":
|
|
21885
|
+
scrollOffset = scrollWidth - clientWidth - scrollLeft;
|
|
21886
|
+
break;
|
|
21887
|
+
}
|
|
21888
|
+
}
|
|
21889
|
+
scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
|
|
21890
|
+
return {
|
|
21891
|
+
isScrolling: true,
|
|
21892
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
21893
|
+
scrollOffset,
|
|
21894
|
+
scrollUpdateWasRequested: false
|
|
21895
|
+
};
|
|
21896
|
+
}, _this._resetIsScrollingDebounced);
|
|
21897
|
+
};
|
|
21898
|
+
_this._onScrollVertical = function(event) {
|
|
21899
|
+
var _event$currentTarget2 = event.currentTarget, clientHeight = _event$currentTarget2.clientHeight, scrollHeight = _event$currentTarget2.scrollHeight, scrollTop = _event$currentTarget2.scrollTop;
|
|
21900
|
+
_this.setState(function(prevState) {
|
|
21901
|
+
if (prevState.scrollOffset === scrollTop) {
|
|
21902
|
+
return null;
|
|
21903
|
+
}
|
|
21904
|
+
var scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
|
|
21905
|
+
return {
|
|
21906
|
+
isScrolling: true,
|
|
21907
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
21908
|
+
scrollOffset,
|
|
21909
|
+
scrollUpdateWasRequested: false
|
|
21910
|
+
};
|
|
21911
|
+
}, _this._resetIsScrollingDebounced);
|
|
21912
|
+
};
|
|
21913
|
+
_this._outerRefSetter = function(ref) {
|
|
21914
|
+
var outerRef = _this.props.outerRef;
|
|
21915
|
+
_this._outerRef = ref;
|
|
21916
|
+
if (typeof outerRef === "function") {
|
|
21917
|
+
outerRef(ref);
|
|
21918
|
+
} else if (outerRef != null && typeof outerRef === "object" && outerRef.hasOwnProperty("current")) {
|
|
21919
|
+
outerRef.current = ref;
|
|
21920
|
+
}
|
|
21921
|
+
};
|
|
21922
|
+
_this._resetIsScrollingDebounced = function() {
|
|
21923
|
+
if (_this._resetIsScrollingTimeoutId !== null) {
|
|
21924
|
+
cancelTimeout(_this._resetIsScrollingTimeoutId);
|
|
21925
|
+
}
|
|
21926
|
+
_this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);
|
|
21927
|
+
};
|
|
21928
|
+
_this._resetIsScrolling = function() {
|
|
21929
|
+
_this._resetIsScrollingTimeoutId = null;
|
|
21930
|
+
_this.setState({
|
|
21931
|
+
isScrolling: false
|
|
21932
|
+
}, function() {
|
|
21933
|
+
_this._getItemStyleCache(-1, null);
|
|
21934
|
+
});
|
|
21935
|
+
};
|
|
21936
|
+
return _this;
|
|
21937
|
+
}
|
|
21938
|
+
List2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
|
|
21939
|
+
validateSharedProps$1(nextProps, prevState);
|
|
21940
|
+
validateProps5(nextProps);
|
|
21941
|
+
return null;
|
|
21942
|
+
};
|
|
21943
|
+
var _proto = List2.prototype;
|
|
21944
|
+
_proto.scrollTo = function scrollTo(scrollOffset) {
|
|
21945
|
+
scrollOffset = Math.max(0, scrollOffset);
|
|
21946
|
+
this.setState(function(prevState) {
|
|
21947
|
+
if (prevState.scrollOffset === scrollOffset) {
|
|
21948
|
+
return null;
|
|
21949
|
+
}
|
|
21950
|
+
return {
|
|
21951
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
21952
|
+
scrollOffset,
|
|
21953
|
+
scrollUpdateWasRequested: true
|
|
21954
|
+
};
|
|
21955
|
+
}, this._resetIsScrollingDebounced);
|
|
21956
|
+
};
|
|
21957
|
+
_proto.scrollToItem = function scrollToItem(index2, align) {
|
|
21958
|
+
if (align === void 0) {
|
|
21959
|
+
align = "auto";
|
|
21960
|
+
}
|
|
21961
|
+
var _this$props2 = this.props, itemCount = _this$props2.itemCount, layout = _this$props2.layout;
|
|
21962
|
+
var scrollOffset = this.state.scrollOffset;
|
|
21963
|
+
index2 = Math.max(0, Math.min(index2, itemCount - 1));
|
|
21964
|
+
var scrollbarSize = 0;
|
|
21965
|
+
if (this._outerRef) {
|
|
21966
|
+
var outerRef = this._outerRef;
|
|
21967
|
+
if (layout === "vertical") {
|
|
21968
|
+
scrollbarSize = outerRef.scrollWidth > outerRef.clientWidth ? getScrollbarSize() : 0;
|
|
21969
|
+
} else {
|
|
21970
|
+
scrollbarSize = outerRef.scrollHeight > outerRef.clientHeight ? getScrollbarSize() : 0;
|
|
21971
|
+
}
|
|
21972
|
+
}
|
|
21973
|
+
this.scrollTo(getOffsetForIndexAndAlignment5(this.props, index2, align, scrollOffset, this._instanceProps, scrollbarSize));
|
|
21974
|
+
};
|
|
21975
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
21976
|
+
var _this$props3 = this.props, direction = _this$props3.direction, initialScrollOffset = _this$props3.initialScrollOffset, layout = _this$props3.layout;
|
|
21977
|
+
if (typeof initialScrollOffset === "number" && this._outerRef != null) {
|
|
21978
|
+
var outerRef = this._outerRef;
|
|
21979
|
+
if (direction === "horizontal" || layout === "horizontal") {
|
|
21980
|
+
outerRef.scrollLeft = initialScrollOffset;
|
|
21981
|
+
} else {
|
|
21982
|
+
outerRef.scrollTop = initialScrollOffset;
|
|
21983
|
+
}
|
|
21984
|
+
}
|
|
21985
|
+
this._callPropsCallbacks();
|
|
21986
|
+
};
|
|
21987
|
+
_proto.componentDidUpdate = function componentDidUpdate() {
|
|
21988
|
+
var _this$props4 = this.props, direction = _this$props4.direction, layout = _this$props4.layout;
|
|
21989
|
+
var _this$state = this.state, scrollOffset = _this$state.scrollOffset, scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;
|
|
21990
|
+
if (scrollUpdateWasRequested && this._outerRef != null) {
|
|
21991
|
+
var outerRef = this._outerRef;
|
|
21992
|
+
if (direction === "horizontal" || layout === "horizontal") {
|
|
21993
|
+
if (direction === "rtl") {
|
|
21994
|
+
switch (getRTLOffsetType()) {
|
|
21995
|
+
case "negative":
|
|
21996
|
+
outerRef.scrollLeft = -scrollOffset;
|
|
21997
|
+
break;
|
|
21998
|
+
case "positive-ascending":
|
|
21999
|
+
outerRef.scrollLeft = scrollOffset;
|
|
22000
|
+
break;
|
|
22001
|
+
default:
|
|
22002
|
+
var clientWidth = outerRef.clientWidth, scrollWidth = outerRef.scrollWidth;
|
|
22003
|
+
outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;
|
|
22004
|
+
break;
|
|
22005
|
+
}
|
|
22006
|
+
} else {
|
|
22007
|
+
outerRef.scrollLeft = scrollOffset;
|
|
22008
|
+
}
|
|
22009
|
+
} else {
|
|
22010
|
+
outerRef.scrollTop = scrollOffset;
|
|
22011
|
+
}
|
|
22012
|
+
}
|
|
22013
|
+
this._callPropsCallbacks();
|
|
22014
|
+
};
|
|
22015
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
22016
|
+
if (this._resetIsScrollingTimeoutId !== null) {
|
|
22017
|
+
cancelTimeout(this._resetIsScrollingTimeoutId);
|
|
22018
|
+
}
|
|
22019
|
+
};
|
|
22020
|
+
_proto.render = function render() {
|
|
22021
|
+
var _this$props5 = this.props, children = _this$props5.children, className = _this$props5.className, direction = _this$props5.direction, height2 = _this$props5.height, innerRef = _this$props5.innerRef, innerElementType = _this$props5.innerElementType, innerTagName = _this$props5.innerTagName, itemCount = _this$props5.itemCount, itemData = _this$props5.itemData, _this$props5$itemKey = _this$props5.itemKey, itemKey = _this$props5$itemKey === void 0 ? defaultItemKey$1 : _this$props5$itemKey, layout = _this$props5.layout, outerElementType = _this$props5.outerElementType, outerTagName = _this$props5.outerTagName, style2 = _this$props5.style, useIsScrolling = _this$props5.useIsScrolling, width2 = _this$props5.width;
|
|
22022
|
+
var isScrolling = this.state.isScrolling;
|
|
22023
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
22024
|
+
var onScroll = isHorizontal ? this._onScrollHorizontal : this._onScrollVertical;
|
|
22025
|
+
var _this$_getRangeToRend = this._getRangeToRender(), startIndex = _this$_getRangeToRend[0], stopIndex = _this$_getRangeToRend[1];
|
|
22026
|
+
var items = [];
|
|
22027
|
+
if (itemCount > 0) {
|
|
22028
|
+
for (var _index = startIndex; _index <= stopIndex; _index++) {
|
|
22029
|
+
items.push(createElement(children, {
|
|
22030
|
+
data: itemData,
|
|
22031
|
+
key: itemKey(_index, itemData),
|
|
22032
|
+
index: _index,
|
|
22033
|
+
isScrolling: useIsScrolling ? isScrolling : void 0,
|
|
22034
|
+
style: this._getItemStyle(_index)
|
|
22035
|
+
}));
|
|
22036
|
+
}
|
|
22037
|
+
}
|
|
22038
|
+
var estimatedTotalSize = getEstimatedTotalSize4(this.props, this._instanceProps);
|
|
22039
|
+
return createElement(outerElementType || outerTagName || "div", {
|
|
22040
|
+
className,
|
|
22041
|
+
onScroll,
|
|
22042
|
+
ref: this._outerRefSetter,
|
|
22043
|
+
style: _extends$1({
|
|
22044
|
+
position: "relative",
|
|
22045
|
+
height: height2,
|
|
22046
|
+
width: width2,
|
|
22047
|
+
overflow: "auto",
|
|
22048
|
+
WebkitOverflowScrolling: "touch",
|
|
22049
|
+
willChange: "transform",
|
|
22050
|
+
direction
|
|
22051
|
+
}, style2)
|
|
22052
|
+
}, createElement(innerElementType || innerTagName || "div", {
|
|
22053
|
+
children: items,
|
|
22054
|
+
ref: innerRef,
|
|
22055
|
+
style: {
|
|
22056
|
+
height: isHorizontal ? "100%" : estimatedTotalSize,
|
|
22057
|
+
pointerEvents: isScrolling ? "none" : void 0,
|
|
22058
|
+
width: isHorizontal ? estimatedTotalSize : "100%"
|
|
22059
|
+
}
|
|
22060
|
+
}));
|
|
22061
|
+
};
|
|
22062
|
+
_proto._callPropsCallbacks = function _callPropsCallbacks() {
|
|
22063
|
+
if (typeof this.props.onItemsRendered === "function") {
|
|
22064
|
+
var itemCount = this.props.itemCount;
|
|
22065
|
+
if (itemCount > 0) {
|
|
22066
|
+
var _this$_getRangeToRend2 = this._getRangeToRender(), _overscanStartIndex = _this$_getRangeToRend2[0], _overscanStopIndex = _this$_getRangeToRend2[1], _visibleStartIndex = _this$_getRangeToRend2[2], _visibleStopIndex = _this$_getRangeToRend2[3];
|
|
22067
|
+
this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);
|
|
22068
|
+
}
|
|
22069
|
+
}
|
|
22070
|
+
if (typeof this.props.onScroll === "function") {
|
|
22071
|
+
var _this$state2 = this.state, _scrollDirection = _this$state2.scrollDirection, _scrollOffset = _this$state2.scrollOffset, _scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;
|
|
22072
|
+
this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);
|
|
22073
|
+
}
|
|
22074
|
+
};
|
|
22075
|
+
_proto._getRangeToRender = function _getRangeToRender() {
|
|
22076
|
+
var _this$props6 = this.props, itemCount = _this$props6.itemCount, overscanCount = _this$props6.overscanCount;
|
|
22077
|
+
var _this$state3 = this.state, isScrolling = _this$state3.isScrolling, scrollDirection = _this$state3.scrollDirection, scrollOffset = _this$state3.scrollOffset;
|
|
22078
|
+
if (itemCount === 0) {
|
|
22079
|
+
return [0, 0, 0, 0];
|
|
22080
|
+
}
|
|
22081
|
+
var startIndex = getStartIndexForOffset3(this.props, scrollOffset, this._instanceProps);
|
|
22082
|
+
var stopIndex = getStopIndexForStartIndex3(this.props, startIndex, scrollOffset, this._instanceProps);
|
|
22083
|
+
var overscanBackward = !isScrolling || scrollDirection === "backward" ? Math.max(1, overscanCount) : 1;
|
|
22084
|
+
var overscanForward = !isScrolling || scrollDirection === "forward" ? Math.max(1, overscanCount) : 1;
|
|
22085
|
+
return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
|
|
22086
|
+
};
|
|
22087
|
+
return List2;
|
|
22088
|
+
}(PureComponent), _class.defaultProps = {
|
|
22089
|
+
direction: "ltr",
|
|
22090
|
+
itemData: void 0,
|
|
22091
|
+
layout: "vertical",
|
|
22092
|
+
overscanCount: 2,
|
|
22093
|
+
useIsScrolling: false
|
|
22094
|
+
}, _class;
|
|
22095
|
+
}
|
|
22096
|
+
var validateSharedProps$1 = function validateSharedProps3(_ref2, _ref3) {
|
|
22097
|
+
var children = _ref2.children, direction = _ref2.direction, height2 = _ref2.height, layout = _ref2.layout, innerTagName = _ref2.innerTagName, outerTagName = _ref2.outerTagName, width2 = _ref2.width;
|
|
22098
|
+
var instance = _ref3.instance;
|
|
22099
|
+
{
|
|
22100
|
+
if (innerTagName != null || outerTagName != null) {
|
|
22101
|
+
if (devWarningsTagName$1 && !devWarningsTagName$1.has(instance)) {
|
|
22102
|
+
devWarningsTagName$1.add(instance);
|
|
22103
|
+
console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.");
|
|
22104
|
+
}
|
|
22105
|
+
}
|
|
22106
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
22107
|
+
switch (direction) {
|
|
22108
|
+
case "horizontal":
|
|
22109
|
+
case "vertical":
|
|
22110
|
+
if (devWarningsDirection && !devWarningsDirection.has(instance)) {
|
|
22111
|
+
devWarningsDirection.add(instance);
|
|
22112
|
+
console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.');
|
|
22113
|
+
}
|
|
22114
|
+
break;
|
|
22115
|
+
case "ltr":
|
|
22116
|
+
case "rtl":
|
|
22117
|
+
break;
|
|
22118
|
+
default:
|
|
22119
|
+
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + direction + '" was specified.'));
|
|
22120
|
+
}
|
|
22121
|
+
switch (layout) {
|
|
22122
|
+
case "horizontal":
|
|
22123
|
+
case "vertical":
|
|
22124
|
+
break;
|
|
22125
|
+
default:
|
|
22126
|
+
throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". ' + ('"' + layout + '" was specified.'));
|
|
22127
|
+
}
|
|
22128
|
+
if (children == null) {
|
|
22129
|
+
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (children === null ? "null" : typeof children) + '" was specified.'));
|
|
22130
|
+
}
|
|
22131
|
+
if (isHorizontal && typeof width2 !== "number") {
|
|
22132
|
+
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (width2 === null ? "null" : typeof width2) + '" was specified.'));
|
|
22133
|
+
} else if (!isHorizontal && typeof height2 !== "number") {
|
|
22134
|
+
throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (height2 === null ? "null" : typeof height2) + '" was specified.'));
|
|
22135
|
+
}
|
|
22136
|
+
}
|
|
22137
|
+
};
|
|
22138
|
+
var DEFAULT_ESTIMATED_ITEM_SIZE$1 = 50;
|
|
22139
|
+
var getItemMetadata$1 = function getItemMetadata3(props, index2, instanceProps) {
|
|
22140
|
+
var _ref = props, itemSize = _ref.itemSize;
|
|
22141
|
+
var itemMetadataMap = instanceProps.itemMetadataMap, lastMeasuredIndex = instanceProps.lastMeasuredIndex;
|
|
22142
|
+
if (index2 > lastMeasuredIndex) {
|
|
22143
|
+
var offset2 = 0;
|
|
22144
|
+
if (lastMeasuredIndex >= 0) {
|
|
22145
|
+
var itemMetadata = itemMetadataMap[lastMeasuredIndex];
|
|
22146
|
+
offset2 = itemMetadata.offset + itemMetadata.size;
|
|
22147
|
+
}
|
|
22148
|
+
for (var i2 = lastMeasuredIndex + 1; i2 <= index2; i2++) {
|
|
22149
|
+
var size2 = itemSize(i2);
|
|
22150
|
+
itemMetadataMap[i2] = {
|
|
22151
|
+
offset: offset2,
|
|
22152
|
+
size: size2
|
|
22153
|
+
};
|
|
22154
|
+
offset2 += size2;
|
|
22155
|
+
}
|
|
22156
|
+
instanceProps.lastMeasuredIndex = index2;
|
|
22157
|
+
}
|
|
22158
|
+
return itemMetadataMap[index2];
|
|
22159
|
+
};
|
|
22160
|
+
var findNearestItem$1 = function findNearestItem3(props, instanceProps, offset2) {
|
|
22161
|
+
var itemMetadataMap = instanceProps.itemMetadataMap, lastMeasuredIndex = instanceProps.lastMeasuredIndex;
|
|
22162
|
+
var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;
|
|
22163
|
+
if (lastMeasuredItemOffset >= offset2) {
|
|
22164
|
+
return findNearestItemBinarySearch$1(props, instanceProps, lastMeasuredIndex, 0, offset2);
|
|
22165
|
+
} else {
|
|
22166
|
+
return findNearestItemExponentialSearch$1(props, instanceProps, Math.max(0, lastMeasuredIndex), offset2);
|
|
22167
|
+
}
|
|
22168
|
+
};
|
|
22169
|
+
var findNearestItemBinarySearch$1 = function findNearestItemBinarySearch3(props, instanceProps, high, low, offset2) {
|
|
22170
|
+
while (low <= high) {
|
|
22171
|
+
var middle = low + Math.floor((high - low) / 2);
|
|
22172
|
+
var currentOffset = getItemMetadata$1(props, middle, instanceProps).offset;
|
|
22173
|
+
if (currentOffset === offset2) {
|
|
22174
|
+
return middle;
|
|
22175
|
+
} else if (currentOffset < offset2) {
|
|
22176
|
+
low = middle + 1;
|
|
22177
|
+
} else if (currentOffset > offset2) {
|
|
22178
|
+
high = middle - 1;
|
|
22179
|
+
}
|
|
22180
|
+
}
|
|
22181
|
+
if (low > 0) {
|
|
22182
|
+
return low - 1;
|
|
22183
|
+
} else {
|
|
22184
|
+
return 0;
|
|
22185
|
+
}
|
|
22186
|
+
};
|
|
22187
|
+
var findNearestItemExponentialSearch$1 = function findNearestItemExponentialSearch3(props, instanceProps, index2, offset2) {
|
|
22188
|
+
var itemCount = props.itemCount;
|
|
22189
|
+
var interval = 1;
|
|
22190
|
+
while (index2 < itemCount && getItemMetadata$1(props, index2, instanceProps).offset < offset2) {
|
|
22191
|
+
index2 += interval;
|
|
22192
|
+
interval *= 2;
|
|
22193
|
+
}
|
|
22194
|
+
return findNearestItemBinarySearch$1(props, instanceProps, Math.min(index2, itemCount - 1), Math.floor(index2 / 2), offset2);
|
|
22195
|
+
};
|
|
22196
|
+
var getEstimatedTotalSize = function getEstimatedTotalSize2(_ref2, _ref3) {
|
|
22197
|
+
var itemCount = _ref2.itemCount;
|
|
22198
|
+
var itemMetadataMap = _ref3.itemMetadataMap, estimatedItemSize = _ref3.estimatedItemSize, lastMeasuredIndex = _ref3.lastMeasuredIndex;
|
|
22199
|
+
var totalSizeOfMeasuredItems = 0;
|
|
22200
|
+
if (lastMeasuredIndex >= itemCount) {
|
|
22201
|
+
lastMeasuredIndex = itemCount - 1;
|
|
22202
|
+
}
|
|
22203
|
+
if (lastMeasuredIndex >= 0) {
|
|
22204
|
+
var itemMetadata = itemMetadataMap[lastMeasuredIndex];
|
|
22205
|
+
totalSizeOfMeasuredItems = itemMetadata.offset + itemMetadata.size;
|
|
22206
|
+
}
|
|
22207
|
+
var numUnmeasuredItems = itemCount - lastMeasuredIndex - 1;
|
|
22208
|
+
var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;
|
|
22209
|
+
return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;
|
|
22210
|
+
};
|
|
22211
|
+
var VariableSizeList$1 = /* @__PURE__ */ createListComponent({
|
|
22212
|
+
getItemOffset: function getItemOffset(props, index2, instanceProps) {
|
|
22213
|
+
return getItemMetadata$1(props, index2, instanceProps).offset;
|
|
22214
|
+
},
|
|
22215
|
+
getItemSize: function getItemSize(props, index2, instanceProps) {
|
|
22216
|
+
return instanceProps.itemMetadataMap[index2].size;
|
|
22217
|
+
},
|
|
22218
|
+
getEstimatedTotalSize,
|
|
22219
|
+
getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment3(props, index2, align, scrollOffset, instanceProps, scrollbarSize) {
|
|
22220
|
+
var direction = props.direction, height2 = props.height, layout = props.layout, width2 = props.width;
|
|
22221
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
22222
|
+
var size2 = isHorizontal ? width2 : height2;
|
|
22223
|
+
var itemMetadata = getItemMetadata$1(props, index2, instanceProps);
|
|
22224
|
+
var estimatedTotalSize = getEstimatedTotalSize(props, instanceProps);
|
|
22225
|
+
var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size2, itemMetadata.offset));
|
|
22226
|
+
var minOffset = Math.max(0, itemMetadata.offset - size2 + itemMetadata.size + scrollbarSize);
|
|
22227
|
+
if (align === "smart") {
|
|
22228
|
+
if (scrollOffset >= minOffset - size2 && scrollOffset <= maxOffset + size2) {
|
|
22229
|
+
align = "auto";
|
|
22230
|
+
} else {
|
|
22231
|
+
align = "center";
|
|
22232
|
+
}
|
|
22233
|
+
}
|
|
22234
|
+
switch (align) {
|
|
22235
|
+
case "start":
|
|
22236
|
+
return maxOffset;
|
|
22237
|
+
case "end":
|
|
22238
|
+
return minOffset;
|
|
22239
|
+
case "center":
|
|
22240
|
+
return Math.round(minOffset + (maxOffset - minOffset) / 2);
|
|
22241
|
+
case "auto":
|
|
22242
|
+
default:
|
|
22243
|
+
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
|
|
22244
|
+
return scrollOffset;
|
|
22245
|
+
} else if (scrollOffset < minOffset) {
|
|
22246
|
+
return minOffset;
|
|
22247
|
+
} else {
|
|
22248
|
+
return maxOffset;
|
|
22249
|
+
}
|
|
22250
|
+
}
|
|
22251
|
+
},
|
|
22252
|
+
getStartIndexForOffset: function getStartIndexForOffset(props, offset2, instanceProps) {
|
|
22253
|
+
return findNearestItem$1(props, instanceProps, offset2);
|
|
22254
|
+
},
|
|
22255
|
+
getStopIndexForStartIndex: function getStopIndexForStartIndex(props, startIndex, scrollOffset, instanceProps) {
|
|
22256
|
+
var direction = props.direction, height2 = props.height, itemCount = props.itemCount, layout = props.layout, width2 = props.width;
|
|
22257
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
22258
|
+
var size2 = isHorizontal ? width2 : height2;
|
|
22259
|
+
var itemMetadata = getItemMetadata$1(props, startIndex, instanceProps);
|
|
22260
|
+
var maxOffset = scrollOffset + size2;
|
|
22261
|
+
var offset2 = itemMetadata.offset + itemMetadata.size;
|
|
22262
|
+
var stopIndex = startIndex;
|
|
22263
|
+
while (stopIndex < itemCount - 1 && offset2 < maxOffset) {
|
|
22264
|
+
stopIndex++;
|
|
22265
|
+
offset2 += getItemMetadata$1(props, stopIndex, instanceProps).size;
|
|
22266
|
+
}
|
|
22267
|
+
return stopIndex;
|
|
22268
|
+
},
|
|
22269
|
+
initInstanceProps: function initInstanceProps2(props, instance) {
|
|
22270
|
+
var _ref4 = props, estimatedItemSize = _ref4.estimatedItemSize;
|
|
22271
|
+
var instanceProps = {
|
|
22272
|
+
itemMetadataMap: {},
|
|
22273
|
+
estimatedItemSize: estimatedItemSize || DEFAULT_ESTIMATED_ITEM_SIZE$1,
|
|
22274
|
+
lastMeasuredIndex: -1
|
|
22275
|
+
};
|
|
22276
|
+
instance.resetAfterIndex = function(index2, shouldForceUpdate) {
|
|
22277
|
+
if (shouldForceUpdate === void 0) {
|
|
22278
|
+
shouldForceUpdate = true;
|
|
22279
|
+
}
|
|
22280
|
+
instanceProps.lastMeasuredIndex = Math.min(instanceProps.lastMeasuredIndex, index2 - 1);
|
|
22281
|
+
instance._getItemStyleCache(-1);
|
|
22282
|
+
if (shouldForceUpdate) {
|
|
22283
|
+
instance.forceUpdate();
|
|
22284
|
+
}
|
|
22285
|
+
};
|
|
22286
|
+
return instanceProps;
|
|
22287
|
+
},
|
|
22288
|
+
shouldResetStyleCacheOnItemSizeChange: false,
|
|
22289
|
+
validateProps: function validateProps2(_ref5) {
|
|
22290
|
+
var itemSize = _ref5.itemSize;
|
|
22291
|
+
{
|
|
22292
|
+
if (typeof itemSize !== "function") {
|
|
22293
|
+
throw Error('An invalid "itemSize" prop has been specified. Value should be a function. ' + ('"' + (itemSize === null ? "null" : typeof itemSize) + '" was specified.'));
|
|
22294
|
+
}
|
|
22295
|
+
}
|
|
22296
|
+
}
|
|
22297
|
+
});
|
|
22298
|
+
const VariableSizeList = VariableSizeList$1;
|
|
22299
|
+
const LIST_ROW_HEIGHT = 48;
|
|
22300
|
+
makeStyles()(() => ({
|
|
22301
|
+
searchInput: {
|
|
22302
|
+
lineHeight: "initial",
|
|
22303
|
+
height: "auto !important"
|
|
22304
|
+
}
|
|
22305
|
+
}));
|
|
22306
|
+
const OuterElementContext = React__default.createContext({});
|
|
22307
|
+
const OuterElementType = React__default.forwardRef((props, ref) => {
|
|
22308
|
+
const outerProps = React__default.useContext(OuterElementContext);
|
|
22309
|
+
return jsxRuntimeExports.jsx("div", { ref, ...props, ...outerProps });
|
|
22310
|
+
});
|
|
22311
|
+
function ListRow(props) {
|
|
22312
|
+
const { data, index: index2, style: style2 } = props;
|
|
22313
|
+
const dataSet = data[index2];
|
|
22314
|
+
const inlineStyle = {
|
|
22315
|
+
...style2,
|
|
22316
|
+
top: style2.top + 8
|
|
22317
|
+
};
|
|
22318
|
+
const [props0, option, getItemLabel] = dataSet;
|
|
22319
|
+
const { key, ...optionProps } = props0;
|
|
22320
|
+
return jsxRuntimeExports.jsx(Typography, { component: "li", ...optionProps, noWrap: true, style: inlineStyle, children: getItemLabel(option) }, key);
|
|
22321
|
+
}
|
|
22322
|
+
function useResetCache(itemCount) {
|
|
22323
|
+
const ref = useRef(null);
|
|
22324
|
+
useEffect(() => {
|
|
22325
|
+
if (ref.current != null) {
|
|
22326
|
+
ref.current.resetAfterIndex(0, true);
|
|
22327
|
+
}
|
|
22328
|
+
}, [itemCount]);
|
|
22329
|
+
return ref;
|
|
22330
|
+
}
|
|
22331
|
+
React__default.forwardRef((props, ref) => {
|
|
22332
|
+
const { children, ...other } = props;
|
|
22333
|
+
const items = children;
|
|
22334
|
+
const itemCount = items.length;
|
|
22335
|
+
const gridRef = useResetCache(itemCount);
|
|
22336
|
+
return jsxRuntimeExports.jsx("div", { ref, children: jsxRuntimeExports.jsx(OuterElementContext.Provider, { value: other, children: jsxRuntimeExports.jsx(VariableSizeList, { height: Math.min(8, itemCount) * LIST_ROW_HEIGHT, itemSize: () => LIST_ROW_HEIGHT, width: "100%", innerElementType: "ul", outerElementType: OuterElementType, overscanCount: 5, ref: gridRef, itemCount, itemData: items, children: ListRow }) }) });
|
|
22337
|
+
});
|
|
21676
22338
|
const ViewType = {
|
|
21677
22339
|
DESCRIPTION: "description",
|
|
21678
22340
|
STATUS: "status",
|
|
@@ -21696,6 +22358,7 @@ const ViewType = {
|
|
|
21696
22358
|
OBS_SET_COMPOSITION_BAR_PLOT: "obsSetCompositionBarPlot",
|
|
21697
22359
|
FEATURE_SET_ENRICHMENT_BAR_PLOT: "featureSetEnrichmentBarPlot",
|
|
21698
22360
|
BIOMARKER_SELECT: "biomarkerSelect",
|
|
22361
|
+
BIOMARKER_SELECT_ALT: "biomarkerSelectAlt",
|
|
21699
22362
|
COMPARATIVE_HEADING: "comparativeHeading",
|
|
21700
22363
|
LINK_CONTROLLER: "linkController",
|
|
21701
22364
|
NEUROGLANCER: "neuroglancer",
|
|
@@ -22456,6 +23119,17 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
22456
23119
|
CoordinationType.OBS_SET_FILTER
|
|
22457
23120
|
// TODO: create coordination types for internal state of the biomarker selection view?
|
|
22458
23121
|
],
|
|
23122
|
+
[ViewType.BIOMARKER_SELECT_ALT]: [
|
|
23123
|
+
CoordinationType.DATASET,
|
|
23124
|
+
CoordinationType.OBS_TYPE,
|
|
23125
|
+
CoordinationType.SAMPLE_TYPE,
|
|
23126
|
+
CoordinationType.FEATURE_SELECTION,
|
|
23127
|
+
CoordinationType.SAMPLE_SET_SELECTION,
|
|
23128
|
+
CoordinationType.SAMPLE_SET_FILTER,
|
|
23129
|
+
CoordinationType.OBS_SET_SELECTION,
|
|
23130
|
+
CoordinationType.OBS_SET_FILTER
|
|
23131
|
+
// TODO: create coordination types for internal state of the biomarker selection view?
|
|
23132
|
+
],
|
|
22459
23133
|
[ViewType.COMPARATIVE_HEADING]: [
|
|
22460
23134
|
CoordinationType.DATASET,
|
|
22461
23135
|
CoordinationType.OBS_TYPE,
|
|
@@ -23601,9 +24275,9 @@ function mapCacheHas(key) {
|
|
|
23601
24275
|
return getMapData(this, key).has(key);
|
|
23602
24276
|
}
|
|
23603
24277
|
function mapCacheSet(key, value) {
|
|
23604
|
-
var data = getMapData(this, key),
|
|
24278
|
+
var data = getMapData(this, key), size2 = data.size;
|
|
23605
24279
|
data.set(key, value);
|
|
23606
|
-
this.size += data.size ==
|
|
24280
|
+
this.size += data.size == size2 ? 0 : 1;
|
|
23607
24281
|
return this;
|
|
23608
24282
|
}
|
|
23609
24283
|
function MapCache(entries) {
|
|
@@ -30777,12 +31451,12 @@ const OESVertexArrayObject = function OESVertexArrayObject2(gl) {
|
|
|
30777
31451
|
return original.getVertexAttrib.apply(this, arguments);
|
|
30778
31452
|
}
|
|
30779
31453
|
};
|
|
30780
|
-
gl.vertexAttribPointer = function vertexAttribPointer(indx,
|
|
31454
|
+
gl.vertexAttribPointer = function vertexAttribPointer(indx, size2, type, normalized, stride, offset2) {
|
|
30781
31455
|
const vao = self2.currentVertexArrayObject;
|
|
30782
31456
|
vao.maxAttrib = Math.max(vao.maxAttrib, indx);
|
|
30783
31457
|
const attrib = vao.attribs[indx];
|
|
30784
31458
|
attrib.buffer = self2.currentArrayBuffer;
|
|
30785
|
-
attrib.size =
|
|
31459
|
+
attrib.size = size2;
|
|
30786
31460
|
attrib.type = type;
|
|
30787
31461
|
attrib.normalized = normalized;
|
|
30788
31462
|
attrib.stride = stride;
|
|
@@ -32674,7 +33348,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
32674
33348
|
sourceBuffer,
|
|
32675
33349
|
readOffset = 0,
|
|
32676
33350
|
writeOffset = 0,
|
|
32677
|
-
size
|
|
33351
|
+
size: size2
|
|
32678
33352
|
} = _ref;
|
|
32679
33353
|
const {
|
|
32680
33354
|
gl
|
|
@@ -32682,7 +33356,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
32682
33356
|
assertWebGL2Context(gl);
|
|
32683
33357
|
gl.bindBuffer(36662, sourceBuffer.handle);
|
|
32684
33358
|
gl.bindBuffer(36663, this.handle);
|
|
32685
|
-
gl.copyBufferSubData(36662, 36663, readOffset, writeOffset,
|
|
33359
|
+
gl.copyBufferSubData(36662, 36663, readOffset, writeOffset, size2);
|
|
32686
33360
|
gl.bindBuffer(36662, null);
|
|
32687
33361
|
gl.bindBuffer(36663, null);
|
|
32688
33362
|
this.debugData = null;
|
|
@@ -32724,11 +33398,11 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
32724
33398
|
target = this.target,
|
|
32725
33399
|
index: index2 = this.accessor && this.accessor.index,
|
|
32726
33400
|
offset: offset2 = 0,
|
|
32727
|
-
size
|
|
33401
|
+
size: size2
|
|
32728
33402
|
} = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
32729
33403
|
if (target === 35345 || target === 35982) {
|
|
32730
|
-
if (
|
|
32731
|
-
this.gl.bindBufferRange(target, index2, this.handle, offset2,
|
|
33404
|
+
if (size2 !== void 0) {
|
|
33405
|
+
this.gl.bindBufferRange(target, index2, this.handle, offset2, size2);
|
|
32732
33406
|
} else {
|
|
32733
33407
|
assert$7(offset2 === 0);
|
|
32734
33408
|
this.gl.bindBufferBase(target, index2, this.handle);
|
|
@@ -33408,47 +34082,47 @@ class Texture extends Resource$1 {
|
|
|
33408
34082
|
};
|
|
33409
34083
|
}
|
|
33410
34084
|
_deduceImageSize(data, width2, height2) {
|
|
33411
|
-
let
|
|
34085
|
+
let size2;
|
|
33412
34086
|
if (typeof ImageData !== "undefined" && data instanceof ImageData) {
|
|
33413
|
-
|
|
34087
|
+
size2 = {
|
|
33414
34088
|
width: data.width,
|
|
33415
34089
|
height: data.height
|
|
33416
34090
|
};
|
|
33417
34091
|
} else if (typeof HTMLImageElement !== "undefined" && data instanceof HTMLImageElement) {
|
|
33418
|
-
|
|
34092
|
+
size2 = {
|
|
33419
34093
|
width: data.naturalWidth,
|
|
33420
34094
|
height: data.naturalHeight
|
|
33421
34095
|
};
|
|
33422
34096
|
} else if (typeof HTMLCanvasElement !== "undefined" && data instanceof HTMLCanvasElement) {
|
|
33423
|
-
|
|
34097
|
+
size2 = {
|
|
33424
34098
|
width: data.width,
|
|
33425
34099
|
height: data.height
|
|
33426
34100
|
};
|
|
33427
34101
|
} else if (typeof ImageBitmap !== "undefined" && data instanceof ImageBitmap) {
|
|
33428
|
-
|
|
34102
|
+
size2 = {
|
|
33429
34103
|
width: data.width,
|
|
33430
34104
|
height: data.height
|
|
33431
34105
|
};
|
|
33432
34106
|
} else if (typeof HTMLVideoElement !== "undefined" && data instanceof HTMLVideoElement) {
|
|
33433
|
-
|
|
34107
|
+
size2 = {
|
|
33434
34108
|
width: data.videoWidth,
|
|
33435
34109
|
height: data.videoHeight
|
|
33436
34110
|
};
|
|
33437
34111
|
} else if (!data) {
|
|
33438
|
-
|
|
34112
|
+
size2 = {
|
|
33439
34113
|
width: width2 >= 0 ? width2 : 1,
|
|
33440
34114
|
height: height2 >= 0 ? height2 : 1
|
|
33441
34115
|
};
|
|
33442
34116
|
} else {
|
|
33443
|
-
|
|
34117
|
+
size2 = {
|
|
33444
34118
|
width: width2,
|
|
33445
34119
|
height: height2
|
|
33446
34120
|
};
|
|
33447
34121
|
}
|
|
33448
|
-
assert$7(
|
|
33449
|
-
assert$7(width2 === void 0 ||
|
|
33450
|
-
assert$7(height2 === void 0 ||
|
|
33451
|
-
return
|
|
34122
|
+
assert$7(size2, "Could not deduced texture size");
|
|
34123
|
+
assert$7(width2 === void 0 || size2.width === width2, "Deduced texture width does not match supplied width");
|
|
34124
|
+
assert$7(height2 === void 0 || size2.height === height2, "Deduced texture height does not match supplied height");
|
|
34125
|
+
return size2;
|
|
33452
34126
|
}
|
|
33453
34127
|
_createHandle() {
|
|
33454
34128
|
return this.gl.createTexture();
|
|
@@ -35407,11 +36081,11 @@ function getSamplerSetter() {
|
|
|
35407
36081
|
return update2;
|
|
35408
36082
|
};
|
|
35409
36083
|
}
|
|
35410
|
-
function getArraySetter(functionName, toArray,
|
|
36084
|
+
function getArraySetter(functionName, toArray, size2, uniformSetter) {
|
|
35411
36085
|
let cache2 = null;
|
|
35412
36086
|
let cacheLength = null;
|
|
35413
36087
|
return (gl, location, value) => {
|
|
35414
|
-
const arrayValue = toArray(value,
|
|
36088
|
+
const arrayValue = toArray(value, size2);
|
|
35415
36089
|
const length2 = arrayValue.length;
|
|
35416
36090
|
let update2 = false;
|
|
35417
36091
|
if (cache2 === null) {
|
|
@@ -35606,11 +36280,11 @@ class ProgramConfiguration {
|
|
|
35606
36280
|
const {
|
|
35607
36281
|
name: name2,
|
|
35608
36282
|
type,
|
|
35609
|
-
size
|
|
36283
|
+
size: size2
|
|
35610
36284
|
} = gl.getActiveAttrib(program.handle, index2);
|
|
35611
36285
|
const location = gl.getAttribLocation(program.handle, name2);
|
|
35612
36286
|
if (location >= 0) {
|
|
35613
|
-
this._addAttribute(location, name2, type,
|
|
36287
|
+
this._addAttribute(location, name2, type, size2);
|
|
35614
36288
|
}
|
|
35615
36289
|
}
|
|
35616
36290
|
this.attributeInfos.sort((a2, b) => a2.location - b.location);
|
|
@@ -35627,20 +36301,20 @@ class ProgramConfiguration {
|
|
|
35627
36301
|
const {
|
|
35628
36302
|
name: name2,
|
|
35629
36303
|
type,
|
|
35630
|
-
size
|
|
36304
|
+
size: size2
|
|
35631
36305
|
} = gl.getTransformFeedbackVarying(program.handle, location);
|
|
35632
|
-
this._addVarying(location, name2, type,
|
|
36306
|
+
this._addVarying(location, name2, type, size2);
|
|
35633
36307
|
}
|
|
35634
36308
|
this.varyingInfos.sort((a2, b) => a2.location - b.location);
|
|
35635
36309
|
}
|
|
35636
|
-
_addAttribute(location, name2, compositeType,
|
|
36310
|
+
_addAttribute(location, name2, compositeType, size2) {
|
|
35637
36311
|
const {
|
|
35638
36312
|
type,
|
|
35639
36313
|
components
|
|
35640
36314
|
} = decomposeCompositeGLType(compositeType);
|
|
35641
36315
|
const accessor = {
|
|
35642
36316
|
type,
|
|
35643
|
-
size:
|
|
36317
|
+
size: size2 * components
|
|
35644
36318
|
};
|
|
35645
36319
|
this._inferProperties(location, name2, accessor);
|
|
35646
36320
|
const attributeInfo = {
|
|
@@ -35657,14 +36331,14 @@ class ProgramConfiguration {
|
|
|
35657
36331
|
accessor.divisor = 1;
|
|
35658
36332
|
}
|
|
35659
36333
|
}
|
|
35660
|
-
_addVarying(location, name2, compositeType,
|
|
36334
|
+
_addVarying(location, name2, compositeType, size2) {
|
|
35661
36335
|
const {
|
|
35662
36336
|
type,
|
|
35663
36337
|
components
|
|
35664
36338
|
} = decomposeCompositeGLType(compositeType);
|
|
35665
36339
|
const accessor = new Accessor({
|
|
35666
36340
|
type,
|
|
35667
|
-
size:
|
|
36341
|
+
size: size2 * components
|
|
35668
36342
|
});
|
|
35669
36343
|
const varying = {
|
|
35670
36344
|
location,
|
|
@@ -36340,7 +37014,7 @@ class VertexArrayObject extends Resource$1 {
|
|
|
36340
37014
|
return this.setElementBuffer(buffer, accessor);
|
|
36341
37015
|
}
|
|
36342
37016
|
const {
|
|
36343
|
-
size,
|
|
37017
|
+
size: size2,
|
|
36344
37018
|
type,
|
|
36345
37019
|
stride,
|
|
36346
37020
|
offset: offset2,
|
|
@@ -36357,9 +37031,9 @@ class VertexArrayObject extends Resource$1 {
|
|
|
36357
37031
|
gl.bindBuffer(34962, buffer.handle);
|
|
36358
37032
|
if (integer) {
|
|
36359
37033
|
assert$7(isWebGL2$1(gl));
|
|
36360
|
-
gl2.vertexAttribIPointer(location,
|
|
37034
|
+
gl2.vertexAttribIPointer(location, size2, type, stride, offset2);
|
|
36361
37035
|
} else {
|
|
36362
|
-
gl.vertexAttribPointer(location,
|
|
37036
|
+
gl.vertexAttribPointer(location, size2, type, normalized, stride, offset2);
|
|
36363
37037
|
}
|
|
36364
37038
|
gl.enableVertexAttribArray(location);
|
|
36365
37039
|
gl2.vertexAttribDivisor(location, divisor || 0);
|
|
@@ -36687,10 +37361,10 @@ class VertexArray {
|
|
|
36687
37361
|
const currentAccessor = this.accessors[location] || {};
|
|
36688
37362
|
const accessor = Accessor.resolve(accessInfo.accessor, currentAccessor, valueAccessor, appAccessor);
|
|
36689
37363
|
const {
|
|
36690
|
-
size,
|
|
37364
|
+
size: size2,
|
|
36691
37365
|
type
|
|
36692
37366
|
} = accessor;
|
|
36693
|
-
assert$7(Number.isFinite(
|
|
37367
|
+
assert$7(Number.isFinite(size2) && Number.isFinite(type));
|
|
36694
37368
|
return {
|
|
36695
37369
|
location,
|
|
36696
37370
|
accessor
|
|
@@ -36822,12 +37496,12 @@ class VertexArray {
|
|
|
36822
37496
|
function formatArrayValue(v, opts) {
|
|
36823
37497
|
const {
|
|
36824
37498
|
maxElts = 16,
|
|
36825
|
-
size = 1
|
|
37499
|
+
size: size2 = 1
|
|
36826
37500
|
} = opts;
|
|
36827
37501
|
let string = "[";
|
|
36828
37502
|
for (let i2 = 0; i2 < v.length && i2 < maxElts; ++i2) {
|
|
36829
37503
|
if (i2 > 0) {
|
|
36830
|
-
string += ",".concat(i2 %
|
|
37504
|
+
string += ",".concat(i2 % size2 === 0 ? " " : "");
|
|
36831
37505
|
}
|
|
36832
37506
|
string += formatValue(v[i2], opts);
|
|
36833
37507
|
}
|
|
@@ -36992,7 +37666,7 @@ function getDebugTableRow(vertexArray, attribute, accessor, header) {
|
|
|
36992
37666
|
};
|
|
36993
37667
|
}
|
|
36994
37668
|
let type = "NOT PROVIDED";
|
|
36995
|
-
let
|
|
37669
|
+
let size2 = 1;
|
|
36996
37670
|
let verts = 0;
|
|
36997
37671
|
let bytes = 0;
|
|
36998
37672
|
let isInteger;
|
|
@@ -37000,7 +37674,7 @@ function getDebugTableRow(vertexArray, attribute, accessor, header) {
|
|
|
37000
37674
|
let value;
|
|
37001
37675
|
if (accessor) {
|
|
37002
37676
|
type = accessor.type;
|
|
37003
|
-
|
|
37677
|
+
size2 = accessor.size;
|
|
37004
37678
|
type = String(type).replace("Array", "");
|
|
37005
37679
|
isInteger = type.indexOf("nt") !== -1;
|
|
37006
37680
|
}
|
|
@@ -37013,41 +37687,41 @@ function getDebugTableRow(vertexArray, attribute, accessor, header) {
|
|
|
37013
37687
|
marker2 = changed ? "*" : "";
|
|
37014
37688
|
value = data;
|
|
37015
37689
|
bytes = buffer.byteLength;
|
|
37016
|
-
verts = bytes / data.BYTES_PER_ELEMENT /
|
|
37690
|
+
verts = bytes / data.BYTES_PER_ELEMENT / size2;
|
|
37017
37691
|
let format;
|
|
37018
37692
|
if (accessor) {
|
|
37019
37693
|
const instanced = accessor.divisor > 0;
|
|
37020
|
-
format = "".concat(instanced ? "I " : "P ", " ").concat(verts, " (x").concat(
|
|
37694
|
+
format = "".concat(instanced ? "I " : "P ", " ").concat(verts, " (x").concat(size2, "=").concat(bytes, " bytes ").concat(getKey(gl, type), ")");
|
|
37021
37695
|
} else {
|
|
37022
37696
|
isInteger = true;
|
|
37023
37697
|
format = "".concat(bytes, " bytes");
|
|
37024
37698
|
}
|
|
37025
37699
|
return {
|
|
37026
37700
|
[header]: "".concat(marker2).concat(formatValue(value, {
|
|
37027
|
-
size,
|
|
37701
|
+
size: size2,
|
|
37028
37702
|
isInteger
|
|
37029
37703
|
})),
|
|
37030
37704
|
"Format ": format
|
|
37031
37705
|
};
|
|
37032
37706
|
}
|
|
37033
37707
|
value = attribute;
|
|
37034
|
-
|
|
37708
|
+
size2 = attribute.length;
|
|
37035
37709
|
type = String(attribute.constructor.name).replace("Array", "");
|
|
37036
37710
|
isInteger = type.indexOf("nt") !== -1;
|
|
37037
37711
|
return {
|
|
37038
37712
|
[header]: "".concat(formatValue(value, {
|
|
37039
|
-
size,
|
|
37713
|
+
size: size2,
|
|
37040
37714
|
isInteger
|
|
37041
37715
|
}), " (constant)"),
|
|
37042
|
-
"Format ": "".concat(
|
|
37716
|
+
"Format ": "".concat(size2, "x").concat(type, " (constant)")
|
|
37043
37717
|
};
|
|
37044
37718
|
}
|
|
37045
37719
|
function getGLSLDeclaration$1(name2, accessor) {
|
|
37046
37720
|
const {
|
|
37047
37721
|
type,
|
|
37048
|
-
size
|
|
37722
|
+
size: size2
|
|
37049
37723
|
} = accessor;
|
|
37050
|
-
const typeAndName = getCompositeGLType(type,
|
|
37724
|
+
const typeAndName = getCompositeGLType(type, size2);
|
|
37051
37725
|
return typeAndName ? "".concat(name2, " (").concat(typeAndName.name, ")") : name2;
|
|
37052
37726
|
}
|
|
37053
37727
|
function getDebugTableForProgramConfiguration(config2) {
|
|
@@ -37074,9 +37748,9 @@ function getDebugTableForProgramConfiguration(config2) {
|
|
|
37074
37748
|
function getGLSLDeclaration(attributeInfo) {
|
|
37075
37749
|
const {
|
|
37076
37750
|
type,
|
|
37077
|
-
size
|
|
37751
|
+
size: size2
|
|
37078
37752
|
} = attributeInfo.accessor;
|
|
37079
|
-
const typeAndName = getCompositeGLType(type,
|
|
37753
|
+
const typeAndName = getCompositeGLType(type, size2);
|
|
37080
37754
|
if (typeAndName) {
|
|
37081
37755
|
return "".concat(typeAndName.name, " ").concat(attributeInfo.name);
|
|
37082
37756
|
}
|
|
@@ -40101,11 +40775,11 @@ class Geometry {
|
|
|
40101
40775
|
const attribute = attributes[attributeName];
|
|
40102
40776
|
const {
|
|
40103
40777
|
value,
|
|
40104
|
-
size,
|
|
40778
|
+
size: size2,
|
|
40105
40779
|
constant: constant2
|
|
40106
40780
|
} = attribute;
|
|
40107
|
-
if (!constant2 && value &&
|
|
40108
|
-
vertexCount = Math.min(vertexCount, value.length /
|
|
40781
|
+
if (!constant2 && value && size2 >= 1) {
|
|
40782
|
+
vertexCount = Math.min(vertexCount, value.length / size2);
|
|
40109
40783
|
}
|
|
40110
40784
|
}
|
|
40111
40785
|
assert$7(Number.isFinite(vertexCount));
|
|
@@ -40483,20 +41157,20 @@ function unpackIndexedGeometry(geometry2) {
|
|
|
40483
41157
|
const {
|
|
40484
41158
|
constant: constant2,
|
|
40485
41159
|
value,
|
|
40486
|
-
size
|
|
41160
|
+
size: size2
|
|
40487
41161
|
} = attribute;
|
|
40488
|
-
if (constant2 || !
|
|
41162
|
+
if (constant2 || !size2) {
|
|
40489
41163
|
continue;
|
|
40490
41164
|
}
|
|
40491
|
-
const unpackedValue = new value.constructor(vertexCount *
|
|
41165
|
+
const unpackedValue = new value.constructor(vertexCount * size2);
|
|
40492
41166
|
for (let x = 0; x < vertexCount; ++x) {
|
|
40493
41167
|
const index2 = indices.value[x];
|
|
40494
|
-
for (let i2 = 0; i2 <
|
|
40495
|
-
unpackedValue[x *
|
|
41168
|
+
for (let i2 = 0; i2 < size2; i2++) {
|
|
41169
|
+
unpackedValue[x * size2 + i2] = value[index2 * size2 + i2];
|
|
40496
41170
|
}
|
|
40497
41171
|
}
|
|
40498
41172
|
unpackedAttributes[attributeName] = {
|
|
40499
|
-
size,
|
|
41173
|
+
size: size2,
|
|
40500
41174
|
value: unpackedValue
|
|
40501
41175
|
};
|
|
40502
41176
|
}
|
|
@@ -41417,11 +42091,11 @@ function fitBounds(options) {
|
|
|
41417
42091
|
const padding2 = getPaddingObject(options.padding);
|
|
41418
42092
|
const nw = lngLatToWorld([west, clamp$1(north, -85.051129, MAX_LATITUDE)]);
|
|
41419
42093
|
const se = lngLatToWorld([east, clamp$1(south, -85.051129, MAX_LATITUDE)]);
|
|
41420
|
-
const
|
|
42094
|
+
const size2 = [Math.max(Math.abs(se[0] - nw[0]), minExtent), Math.max(Math.abs(se[1] - nw[1]), minExtent)];
|
|
41421
42095
|
const targetSize = [width2 - padding2.left - padding2.right - Math.abs(offset2[0]) * 2, height2 - padding2.top - padding2.bottom - Math.abs(offset2[1]) * 2];
|
|
41422
42096
|
assert$5(targetSize[0] > 0 && targetSize[1] > 0);
|
|
41423
|
-
const scaleX2 = targetSize[0] /
|
|
41424
|
-
const scaleY2 = targetSize[1] /
|
|
42097
|
+
const scaleX2 = targetSize[0] / size2[0];
|
|
42098
|
+
const scaleY2 = targetSize[1] / size2[1];
|
|
41425
42099
|
const offsetX = (padding2.right - padding2.left) / 2 / scaleX2;
|
|
41426
42100
|
const offsetY = (padding2.top - padding2.bottom) / 2 / scaleY2;
|
|
41427
42101
|
const center = [(se[0] + nw[0]) / 2 + offsetX, (se[1] + nw[1]) / 2 + offsetY];
|
|
@@ -42540,7 +43214,7 @@ class TypedArrayManager {
|
|
|
42540
43214
|
Object.assign(this.opts, options);
|
|
42541
43215
|
}
|
|
42542
43216
|
allocate(typedArray, count2, {
|
|
42543
|
-
size = 1,
|
|
43217
|
+
size: size2 = 1,
|
|
42544
43218
|
type,
|
|
42545
43219
|
padding: padding2 = 0,
|
|
42546
43220
|
copy: copy2 = false,
|
|
@@ -42548,7 +43222,7 @@ class TypedArrayManager {
|
|
|
42548
43222
|
maxCount
|
|
42549
43223
|
}) {
|
|
42550
43224
|
const Type2 = type || typedArray && typedArray.constructor || Float32Array;
|
|
42551
|
-
const newSize = count2 *
|
|
43225
|
+
const newSize = count2 * size2 + padding2;
|
|
42552
43226
|
if (ArrayBuffer.isView(typedArray)) {
|
|
42553
43227
|
if (newSize <= typedArray.length) {
|
|
42554
43228
|
return typedArray;
|
|
@@ -42559,7 +43233,7 @@ class TypedArrayManager {
|
|
|
42559
43233
|
}
|
|
42560
43234
|
let maxSize = Infinity;
|
|
42561
43235
|
if (maxCount) {
|
|
42562
|
-
maxSize = maxCount *
|
|
43236
|
+
maxSize = maxCount * size2 + padding2;
|
|
42563
43237
|
}
|
|
42564
43238
|
const newArray = this._allocate(Type2, newSize, initialize, maxSize);
|
|
42565
43239
|
if (typedArray && copy2) {
|
|
@@ -42573,8 +43247,8 @@ class TypedArrayManager {
|
|
|
42573
43247
|
release(typedArray) {
|
|
42574
43248
|
this._release(typedArray);
|
|
42575
43249
|
}
|
|
42576
|
-
_allocate(Type2,
|
|
42577
|
-
let sizeToAllocate = Math.max(Math.ceil(
|
|
43250
|
+
_allocate(Type2, size2, initialize, maxSize) {
|
|
43251
|
+
let sizeToAllocate = Math.max(Math.ceil(size2 * this.opts.overAlloc), 1);
|
|
42578
43252
|
if (sizeToAllocate > maxSize) {
|
|
42579
43253
|
sizeToAllocate = maxSize;
|
|
42580
43254
|
}
|
|
@@ -42648,26 +43322,26 @@ function fp64LowPart(x) {
|
|
|
42648
43322
|
let scratchArray;
|
|
42649
43323
|
function toDoublePrecisionArray(typedArray, options) {
|
|
42650
43324
|
const {
|
|
42651
|
-
size = 1,
|
|
43325
|
+
size: size2 = 1,
|
|
42652
43326
|
startIndex = 0
|
|
42653
43327
|
} = options;
|
|
42654
43328
|
const endIndex = options.endIndex !== void 0 ? options.endIndex : typedArray.length;
|
|
42655
|
-
const count2 = (endIndex - startIndex) /
|
|
43329
|
+
const count2 = (endIndex - startIndex) / size2;
|
|
42656
43330
|
scratchArray = defaultTypedArrayManager.allocate(scratchArray, count2, {
|
|
42657
43331
|
type: Float32Array,
|
|
42658
|
-
size:
|
|
43332
|
+
size: size2 * 2
|
|
42659
43333
|
});
|
|
42660
43334
|
let sourceIndex = startIndex;
|
|
42661
43335
|
let targetIndex = 0;
|
|
42662
43336
|
while (sourceIndex < endIndex) {
|
|
42663
|
-
for (let j = 0; j <
|
|
43337
|
+
for (let j = 0; j < size2; j++) {
|
|
42664
43338
|
const value = typedArray[sourceIndex++];
|
|
42665
43339
|
scratchArray[targetIndex + j] = value;
|
|
42666
|
-
scratchArray[targetIndex + j +
|
|
43340
|
+
scratchArray[targetIndex + j + size2] = fp64LowPart(value);
|
|
42667
43341
|
}
|
|
42668
|
-
targetIndex +=
|
|
43342
|
+
targetIndex += size2 * 2;
|
|
42669
43343
|
}
|
|
42670
|
-
return scratchArray.subarray(0, count2 *
|
|
43344
|
+
return scratchArray.subarray(0, count2 * size2 * 2);
|
|
42671
43345
|
}
|
|
42672
43346
|
const DEGREES_TO_RADIANS$4 = Math.PI / 180;
|
|
42673
43347
|
const IDENTITY = createMat4();
|
|
@@ -46326,15 +47000,15 @@ function getMaskViewport({
|
|
|
46326
47000
|
});
|
|
46327
47001
|
}
|
|
46328
47002
|
function _doubleBounds(bounds2) {
|
|
46329
|
-
const
|
|
47003
|
+
const size2 = {
|
|
46330
47004
|
x: bounds2[2] - bounds2[0],
|
|
46331
47005
|
y: bounds2[3] - bounds2[1]
|
|
46332
47006
|
};
|
|
46333
47007
|
const center = {
|
|
46334
|
-
x: bounds2[0] + 0.5 *
|
|
46335
|
-
y: bounds2[1] + 0.5 *
|
|
47008
|
+
x: bounds2[0] + 0.5 * size2.x,
|
|
47009
|
+
y: bounds2[1] + 0.5 * size2.y
|
|
46336
47010
|
};
|
|
46337
|
-
return [center.x -
|
|
47011
|
+
return [center.x - size2.x, center.y - size2.y, center.x + size2.x, center.y + size2.y];
|
|
46338
47012
|
}
|
|
46339
47013
|
class MaskEffect {
|
|
46340
47014
|
constructor() {
|
|
@@ -50718,13 +51392,13 @@ class ShaderAttribute {
|
|
|
50718
51392
|
value
|
|
50719
51393
|
} = this.source;
|
|
50720
51394
|
const {
|
|
50721
|
-
size
|
|
51395
|
+
size: size2
|
|
50722
51396
|
} = accessor;
|
|
50723
51397
|
let constantValue = value;
|
|
50724
|
-
if (value && value.length !==
|
|
50725
|
-
constantValue = new Float32Array(
|
|
51398
|
+
if (value && value.length !== size2) {
|
|
51399
|
+
constantValue = new Float32Array(size2);
|
|
50726
51400
|
const index2 = accessor.elementOffset || 0;
|
|
50727
|
-
for (let i2 = 0; i2 <
|
|
51401
|
+
for (let i2 = 0; i2 < size2; ++i2) {
|
|
50728
51402
|
constantValue[i2] = value[index2 + i2];
|
|
50729
51403
|
}
|
|
50730
51404
|
}
|
|
@@ -50927,14 +51601,14 @@ class DataColumn {
|
|
|
50927
51601
|
const {
|
|
50928
51602
|
value,
|
|
50929
51603
|
numInstances,
|
|
50930
|
-
size
|
|
51604
|
+
size: size2
|
|
50931
51605
|
} = this;
|
|
50932
|
-
const len2 = numInstances *
|
|
51606
|
+
const len2 = numInstances * size2;
|
|
50933
51607
|
if (value && len2 && value.length >= len2) {
|
|
50934
|
-
const min = new Array(
|
|
50935
|
-
const max2 = new Array(
|
|
51608
|
+
const min = new Array(size2).fill(Infinity);
|
|
51609
|
+
const max2 = new Array(size2).fill(-Infinity);
|
|
50936
51610
|
for (let i2 = 0; i2 < len2; ) {
|
|
50937
|
-
for (let j = 0; j <
|
|
51611
|
+
for (let j = 0; j < size2; j++) {
|
|
50938
51612
|
const v = value[i2++];
|
|
50939
51613
|
if (v < min[j]) min[j] = v;
|
|
50940
51614
|
if (v > max2[j]) max2[j] = v;
|
|
@@ -51100,7 +51774,7 @@ class DataColumn {
|
|
|
51100
51774
|
_normalizeValue(value, out, start) {
|
|
51101
51775
|
const {
|
|
51102
51776
|
defaultValue: defaultValue2,
|
|
51103
|
-
size
|
|
51777
|
+
size: size2
|
|
51104
51778
|
} = this.settings;
|
|
51105
51779
|
if (Number.isFinite(value)) {
|
|
51106
51780
|
out[start] = value;
|
|
@@ -51110,7 +51784,7 @@ class DataColumn {
|
|
|
51110
51784
|
out[start] = defaultValue2[0];
|
|
51111
51785
|
return out;
|
|
51112
51786
|
}
|
|
51113
|
-
switch (
|
|
51787
|
+
switch (size2) {
|
|
51114
51788
|
case 4:
|
|
51115
51789
|
out[start + 3] = Number.isFinite(value[3]) ? value[3] : defaultValue2[3];
|
|
51116
51790
|
case 3:
|
|
@@ -51121,7 +51795,7 @@ class DataColumn {
|
|
|
51121
51795
|
out[start + 0] = Number.isFinite(value[0]) ? value[0] : defaultValue2[0];
|
|
51122
51796
|
break;
|
|
51123
51797
|
default:
|
|
51124
|
-
let i2 =
|
|
51798
|
+
let i2 = size2;
|
|
51125
51799
|
while (--i2 >= 0) {
|
|
51126
51800
|
out[start + i2] = Number.isFinite(value[i2]) ? value[i2] : defaultValue2[i2];
|
|
51127
51801
|
}
|
|
@@ -51133,9 +51807,9 @@ class DataColumn {
|
|
|
51133
51807
|
return false;
|
|
51134
51808
|
}
|
|
51135
51809
|
const {
|
|
51136
|
-
size
|
|
51810
|
+
size: size2
|
|
51137
51811
|
} = this;
|
|
51138
|
-
for (let i2 = 0; i2 <
|
|
51812
|
+
for (let i2 = 0; i2 < size2; i2++) {
|
|
51139
51813
|
if (value1[i2] !== value2[i2]) {
|
|
51140
51814
|
return false;
|
|
51141
51815
|
}
|
|
@@ -51174,14 +51848,14 @@ function isAsyncIterable(data) {
|
|
|
51174
51848
|
}
|
|
51175
51849
|
function getAccessorFromBuffer(typedArray, options) {
|
|
51176
51850
|
const {
|
|
51177
|
-
size,
|
|
51851
|
+
size: size2,
|
|
51178
51852
|
stride,
|
|
51179
51853
|
offset: offset2,
|
|
51180
51854
|
startIndices,
|
|
51181
51855
|
nested
|
|
51182
51856
|
} = options;
|
|
51183
51857
|
const bytesPerElement = typedArray.BYTES_PER_ELEMENT;
|
|
51184
|
-
const elementStride = stride ? stride / bytesPerElement :
|
|
51858
|
+
const elementStride = stride ? stride / bytesPerElement : size2;
|
|
51185
51859
|
const elementOffset = offset2 ? offset2 / bytesPerElement : 0;
|
|
51186
51860
|
const vertexCount = Math.floor((typedArray.length - elementOffset) / elementStride);
|
|
51187
51861
|
return (_, {
|
|
@@ -51190,7 +51864,7 @@ function getAccessorFromBuffer(typedArray, options) {
|
|
|
51190
51864
|
}) => {
|
|
51191
51865
|
if (!startIndices) {
|
|
51192
51866
|
const sourceIndex = index2 * elementStride + elementOffset;
|
|
51193
|
-
for (let j = 0; j <
|
|
51867
|
+
for (let j = 0; j < size2; j++) {
|
|
51194
51868
|
target[j] = typedArray[sourceIndex + j];
|
|
51195
51869
|
}
|
|
51196
51870
|
return target;
|
|
@@ -51202,20 +51876,20 @@ function getAccessorFromBuffer(typedArray, options) {
|
|
|
51202
51876
|
result = new Array(endIndex - startIndex);
|
|
51203
51877
|
for (let i2 = startIndex; i2 < endIndex; i2++) {
|
|
51204
51878
|
const sourceIndex = i2 * elementStride + elementOffset;
|
|
51205
|
-
target = new Array(
|
|
51206
|
-
for (let j = 0; j <
|
|
51879
|
+
target = new Array(size2);
|
|
51880
|
+
for (let j = 0; j < size2; j++) {
|
|
51207
51881
|
target[j] = typedArray[sourceIndex + j];
|
|
51208
51882
|
}
|
|
51209
51883
|
result[i2 - startIndex] = target;
|
|
51210
51884
|
}
|
|
51211
|
-
} else if (elementStride ===
|
|
51212
|
-
result = typedArray.subarray(startIndex *
|
|
51885
|
+
} else if (elementStride === size2) {
|
|
51886
|
+
result = typedArray.subarray(startIndex * size2 + elementOffset, endIndex * size2 + elementOffset);
|
|
51213
51887
|
} else {
|
|
51214
|
-
result = new typedArray.constructor((endIndex - startIndex) *
|
|
51888
|
+
result = new typedArray.constructor((endIndex - startIndex) * size2);
|
|
51215
51889
|
let targetIndex = 0;
|
|
51216
51890
|
for (let i2 = startIndex; i2 < endIndex; i2++) {
|
|
51217
51891
|
const sourceIndex = i2 * elementStride + elementOffset;
|
|
51218
|
-
for (let j = 0; j <
|
|
51892
|
+
for (let j = 0; j < size2; j++) {
|
|
51219
51893
|
result[targetIndex++] = typedArray[sourceIndex + j];
|
|
51220
51894
|
}
|
|
51221
51895
|
}
|
|
@@ -51257,7 +51931,7 @@ function padArrayChunk(options) {
|
|
|
51257
51931
|
source,
|
|
51258
51932
|
target,
|
|
51259
51933
|
start = 0,
|
|
51260
|
-
size,
|
|
51934
|
+
size: size2,
|
|
51261
51935
|
getData
|
|
51262
51936
|
} = options;
|
|
51263
51937
|
const end = options.end || target.length;
|
|
@@ -51274,7 +51948,7 @@ function padArrayChunk(options) {
|
|
|
51274
51948
|
let i2 = sourceLength;
|
|
51275
51949
|
while (i2 < targetLength) {
|
|
51276
51950
|
const datum = getData(i2, source);
|
|
51277
|
-
for (let j = 0; j <
|
|
51951
|
+
for (let j = 0; j < size2; j++) {
|
|
51278
51952
|
target[start + i2] = datum[j] || 0;
|
|
51279
51953
|
i2++;
|
|
51280
51954
|
}
|
|
@@ -51283,7 +51957,7 @@ function padArrayChunk(options) {
|
|
|
51283
51957
|
function padArray({
|
|
51284
51958
|
source,
|
|
51285
51959
|
target,
|
|
51286
|
-
size,
|
|
51960
|
+
size: size2,
|
|
51287
51961
|
getData,
|
|
51288
51962
|
sourceStartIndices,
|
|
51289
51963
|
targetStartIndices
|
|
@@ -51292,7 +51966,7 @@ function padArray({
|
|
|
51292
51966
|
padArrayChunk({
|
|
51293
51967
|
source,
|
|
51294
51968
|
target,
|
|
51295
|
-
size,
|
|
51969
|
+
size: size2,
|
|
51296
51970
|
getData
|
|
51297
51971
|
});
|
|
51298
51972
|
return target;
|
|
@@ -51302,14 +51976,14 @@ function padArray({
|
|
|
51302
51976
|
const getChunkData = getData && ((i2, chunk) => getData(i2 + targetIndex, chunk));
|
|
51303
51977
|
const n2 = Math.min(sourceStartIndices.length, targetStartIndices.length);
|
|
51304
51978
|
for (let i2 = 1; i2 < n2; i2++) {
|
|
51305
|
-
const nextSourceIndex = sourceStartIndices[i2] *
|
|
51306
|
-
const nextTargetIndex = targetStartIndices[i2] *
|
|
51979
|
+
const nextSourceIndex = sourceStartIndices[i2] * size2;
|
|
51980
|
+
const nextTargetIndex = targetStartIndices[i2] * size2;
|
|
51307
51981
|
padArrayChunk({
|
|
51308
51982
|
source: source.subarray(sourceIndex, nextSourceIndex),
|
|
51309
51983
|
target,
|
|
51310
51984
|
start: targetIndex,
|
|
51311
51985
|
end: nextTargetIndex,
|
|
51312
|
-
size,
|
|
51986
|
+
size: size2,
|
|
51313
51987
|
getData: getChunkData
|
|
51314
51988
|
});
|
|
51315
51989
|
sourceIndex = nextSourceIndex;
|
|
@@ -51320,7 +51994,7 @@ function padArray({
|
|
|
51320
51994
|
source: [],
|
|
51321
51995
|
target,
|
|
51322
51996
|
start: targetIndex,
|
|
51323
|
-
size,
|
|
51997
|
+
size: size2,
|
|
51324
51998
|
getData: getChunkData
|
|
51325
51999
|
});
|
|
51326
52000
|
}
|
|
@@ -51365,8 +52039,8 @@ function getSourceBufferAttribute(gl, attribute) {
|
|
|
51365
52039
|
}
|
|
51366
52040
|
return attribute.value;
|
|
51367
52041
|
}
|
|
51368
|
-
function getAttributeTypeFromSize(
|
|
51369
|
-
switch (
|
|
52042
|
+
function getAttributeTypeFromSize(size2) {
|
|
52043
|
+
switch (size2) {
|
|
51370
52044
|
case 1:
|
|
51371
52045
|
return "float";
|
|
51372
52046
|
case 2:
|
|
@@ -51376,7 +52050,7 @@ function getAttributeTypeFromSize(size) {
|
|
|
51376
52050
|
case 4:
|
|
51377
52051
|
return "vec4";
|
|
51378
52052
|
default:
|
|
51379
|
-
throw new Error('No defined attribute type for size "'.concat(
|
|
52053
|
+
throw new Error('No defined attribute type for size "'.concat(size2, '"'));
|
|
51380
52054
|
}
|
|
51381
52055
|
}
|
|
51382
52056
|
function cycleBuffers(buffers) {
|
|
@@ -51387,10 +52061,10 @@ function getAttributeBufferLength(attribute, numInstances) {
|
|
|
51387
52061
|
doublePrecision,
|
|
51388
52062
|
settings,
|
|
51389
52063
|
value,
|
|
51390
|
-
size
|
|
52064
|
+
size: size2
|
|
51391
52065
|
} = attribute;
|
|
51392
52066
|
const multiplier = doublePrecision && value instanceof Float64Array ? 2 : 1;
|
|
51393
|
-
return (settings.noAlloc ? value.length : numInstances *
|
|
52067
|
+
return (settings.noAlloc ? value.length : numInstances * size2) * multiplier;
|
|
51394
52068
|
}
|
|
51395
52069
|
function padBuffer({
|
|
51396
52070
|
buffer,
|
|
@@ -51401,7 +52075,7 @@ function padBuffer({
|
|
|
51401
52075
|
getData = (x) => x
|
|
51402
52076
|
}) {
|
|
51403
52077
|
const precisionMultiplier = attribute.doublePrecision && attribute.value instanceof Float64Array ? 2 : 1;
|
|
51404
|
-
const
|
|
52078
|
+
const size2 = attribute.size * precisionMultiplier;
|
|
51405
52079
|
const byteOffset = attribute.byteOffset;
|
|
51406
52080
|
const toStartIndices = attribute.startIndices;
|
|
51407
52081
|
const hasStartIndices = fromStartIndices && toStartIndices;
|
|
@@ -51417,7 +52091,7 @@ function padBuffer({
|
|
|
51417
52091
|
const getter = getData;
|
|
51418
52092
|
getData = (value, chunk) => attribute.normalizeConstant(getter(value, chunk));
|
|
51419
52093
|
}
|
|
51420
|
-
const getMissingData = isConstant ? (i2, chunk) => getData(toData, chunk) : (i2, chunk) => getData(toData.subarray(i2, i2 +
|
|
52094
|
+
const getMissingData = isConstant ? (i2, chunk) => getData(toData, chunk) : (i2, chunk) => getData(toData.subarray(i2, i2 + size2), chunk);
|
|
51421
52095
|
const source = buffer.getData({
|
|
51422
52096
|
length: fromLength
|
|
51423
52097
|
});
|
|
@@ -51427,7 +52101,7 @@ function padBuffer({
|
|
|
51427
52101
|
target: data,
|
|
51428
52102
|
sourceStartIndices: fromStartIndices,
|
|
51429
52103
|
targetStartIndices: toStartIndices,
|
|
51430
|
-
size,
|
|
52104
|
+
size: size2,
|
|
51431
52105
|
getData: getMissingData
|
|
51432
52106
|
});
|
|
51433
52107
|
if (buffer.byteLength < data.byteLength + byteOffset) {
|
|
@@ -51683,7 +52357,7 @@ class Attribute extends DataColumn {
|
|
|
51683
52357
|
settings,
|
|
51684
52358
|
state,
|
|
51685
52359
|
value,
|
|
51686
|
-
size,
|
|
52360
|
+
size: size2,
|
|
51687
52361
|
startIndices
|
|
51688
52362
|
} = attribute;
|
|
51689
52363
|
const {
|
|
@@ -51709,9 +52383,9 @@ class Attribute extends DataColumn {
|
|
|
51709
52383
|
let startIndex = i2;
|
|
51710
52384
|
for (const item of objectValue) {
|
|
51711
52385
|
attribute._normalizeValue(item, value, startIndex);
|
|
51712
|
-
startIndex +=
|
|
52386
|
+
startIndex += size2;
|
|
51713
52387
|
}
|
|
51714
|
-
} else if (objectValue && objectValue.length >
|
|
52388
|
+
} else if (objectValue && objectValue.length > size2) {
|
|
51715
52389
|
value.set(objectValue, i2);
|
|
51716
52390
|
} else {
|
|
51717
52391
|
attribute._normalizeValue(objectValue, objectInfo.target, 0);
|
|
@@ -51722,10 +52396,10 @@ class Attribute extends DataColumn {
|
|
|
51722
52396
|
count: numVertices
|
|
51723
52397
|
});
|
|
51724
52398
|
}
|
|
51725
|
-
i2 += numVertices *
|
|
52399
|
+
i2 += numVertices * size2;
|
|
51726
52400
|
} else {
|
|
51727
52401
|
attribute._normalizeValue(objectValue, value, i2);
|
|
51728
|
-
i2 +=
|
|
52402
|
+
i2 += size2;
|
|
51729
52403
|
}
|
|
51730
52404
|
}
|
|
51731
52405
|
}
|
|
@@ -56923,14 +57597,14 @@ function reversePolygon(points, options) {
|
|
|
56923
57597
|
const {
|
|
56924
57598
|
start = 0,
|
|
56925
57599
|
end = points.length,
|
|
56926
|
-
size = 2
|
|
57600
|
+
size: size2 = 2
|
|
56927
57601
|
} = options;
|
|
56928
|
-
const numPoints = (end - start) /
|
|
57602
|
+
const numPoints = (end - start) / size2;
|
|
56929
57603
|
const numSwaps = Math.floor(numPoints / 2);
|
|
56930
57604
|
for (let i2 = 0; i2 < numSwaps; ++i2) {
|
|
56931
|
-
const b1 = start + i2 *
|
|
56932
|
-
const b2 = start + (numPoints - 1 - i2) *
|
|
56933
|
-
for (let j = 0; j <
|
|
57605
|
+
const b1 = start + i2 * size2;
|
|
57606
|
+
const b2 = start + (numPoints - 1 - i2) * size2;
|
|
57607
|
+
for (let j = 0; j < size2; ++j) {
|
|
56934
57608
|
const tmp = points[b1 + j];
|
|
56935
57609
|
points[b1 + j] = points[b2 + j];
|
|
56936
57610
|
points[b2 + j] = tmp;
|
|
@@ -56938,12 +57612,12 @@ function reversePolygon(points, options) {
|
|
|
56938
57612
|
}
|
|
56939
57613
|
}
|
|
56940
57614
|
function push(target, source) {
|
|
56941
|
-
const
|
|
57615
|
+
const size2 = source.length;
|
|
56942
57616
|
const startIndex = target.length;
|
|
56943
57617
|
if (startIndex > 0) {
|
|
56944
57618
|
let isDuplicate = true;
|
|
56945
|
-
for (let i2 = 0; i2 <
|
|
56946
|
-
if (target[startIndex -
|
|
57619
|
+
for (let i2 = 0; i2 < size2; i2++) {
|
|
57620
|
+
if (target[startIndex - size2 + i2] !== source[i2]) {
|
|
56947
57621
|
isDuplicate = false;
|
|
56948
57622
|
break;
|
|
56949
57623
|
}
|
|
@@ -56952,20 +57626,20 @@ function push(target, source) {
|
|
|
56952
57626
|
return false;
|
|
56953
57627
|
}
|
|
56954
57628
|
}
|
|
56955
|
-
for (let i2 = 0; i2 <
|
|
57629
|
+
for (let i2 = 0; i2 < size2; i2++) {
|
|
56956
57630
|
target[startIndex + i2] = source[i2];
|
|
56957
57631
|
}
|
|
56958
57632
|
return true;
|
|
56959
57633
|
}
|
|
56960
57634
|
function copy(target, source) {
|
|
56961
|
-
const
|
|
56962
|
-
for (let i2 = 0; i2 <
|
|
57635
|
+
const size2 = source.length;
|
|
57636
|
+
for (let i2 = 0; i2 < size2; i2++) {
|
|
56963
57637
|
target[i2] = source[i2];
|
|
56964
57638
|
}
|
|
56965
57639
|
}
|
|
56966
|
-
function getPointAtIndex(positions, index2,
|
|
56967
|
-
const startI = offset2 + index2 *
|
|
56968
|
-
for (let i2 = 0; i2 <
|
|
57640
|
+
function getPointAtIndex(positions, index2, size2, offset2, out = []) {
|
|
57641
|
+
const startI = offset2 + index2 * size2;
|
|
57642
|
+
for (let i2 = 0; i2 < size2; i2++) {
|
|
56969
57643
|
out[i2] = positions[startI + i2];
|
|
56970
57644
|
}
|
|
56971
57645
|
return out;
|
|
@@ -57003,24 +57677,24 @@ function bitCode(p, bbox2) {
|
|
|
57003
57677
|
}
|
|
57004
57678
|
function cutPolylineByGrid(positions, options) {
|
|
57005
57679
|
const {
|
|
57006
|
-
size = 2,
|
|
57680
|
+
size: size2 = 2,
|
|
57007
57681
|
broken = false,
|
|
57008
57682
|
gridResolution = 10,
|
|
57009
57683
|
gridOffset = [0, 0],
|
|
57010
57684
|
startIndex = 0,
|
|
57011
57685
|
endIndex = positions.length
|
|
57012
57686
|
} = options || {};
|
|
57013
|
-
const numPoints = (endIndex - startIndex) /
|
|
57687
|
+
const numPoints = (endIndex - startIndex) / size2;
|
|
57014
57688
|
let part = [];
|
|
57015
57689
|
const result = [part];
|
|
57016
|
-
const a2 = getPointAtIndex(positions, 0,
|
|
57690
|
+
const a2 = getPointAtIndex(positions, 0, size2, startIndex);
|
|
57017
57691
|
let b;
|
|
57018
57692
|
let codeB;
|
|
57019
57693
|
const cell = getGridCell(a2, gridResolution, gridOffset, []);
|
|
57020
57694
|
const scratchPoint = [];
|
|
57021
57695
|
push(part, a2);
|
|
57022
57696
|
for (let i2 = 1; i2 < numPoints; i2++) {
|
|
57023
|
-
b = getPointAtIndex(positions, i2,
|
|
57697
|
+
b = getPointAtIndex(positions, i2, size2, startIndex, b);
|
|
57024
57698
|
codeB = bitCode(b, cell);
|
|
57025
57699
|
while (codeB) {
|
|
57026
57700
|
intersect(a2, b, codeB, cell, scratchPoint);
|
|
@@ -57032,7 +57706,7 @@ function cutPolylineByGrid(positions, options) {
|
|
|
57032
57706
|
push(part, scratchPoint);
|
|
57033
57707
|
copy(a2, scratchPoint);
|
|
57034
57708
|
moveToNeighborCell(cell, gridResolution, codeB);
|
|
57035
|
-
if (broken && part.length >
|
|
57709
|
+
if (broken && part.length > size2) {
|
|
57036
57710
|
part = [];
|
|
57037
57711
|
result.push(part);
|
|
57038
57712
|
push(part, a2);
|
|
@@ -57057,7 +57731,7 @@ function cutPolygonByGrid(positions, holeIndices = null, options) {
|
|
|
57057
57731
|
return [];
|
|
57058
57732
|
}
|
|
57059
57733
|
const {
|
|
57060
|
-
size = 2,
|
|
57734
|
+
size: size2 = 2,
|
|
57061
57735
|
gridResolution = 10,
|
|
57062
57736
|
gridOffset = [0, 0],
|
|
57063
57737
|
edgeTypes = false
|
|
@@ -57065,7 +57739,7 @@ function cutPolygonByGrid(positions, holeIndices = null, options) {
|
|
|
57065
57739
|
const result = [];
|
|
57066
57740
|
const queue = [{
|
|
57067
57741
|
pos: positions,
|
|
57068
|
-
types: edgeTypes ? new Array(positions.length /
|
|
57742
|
+
types: edgeTypes ? new Array(positions.length / size2).fill(TYPE_BORDER) : null,
|
|
57069
57743
|
holes: holeIndices || []
|
|
57070
57744
|
}];
|
|
57071
57745
|
const bbox2 = [[], []];
|
|
@@ -57076,11 +57750,11 @@ function cutPolygonByGrid(positions, holeIndices = null, options) {
|
|
|
57076
57750
|
types,
|
|
57077
57751
|
holes
|
|
57078
57752
|
} = queue.shift();
|
|
57079
|
-
getBoundingBox$2(pos,
|
|
57753
|
+
getBoundingBox$2(pos, size2, holes[0] || pos.length, bbox2);
|
|
57080
57754
|
cell = getGridCell(bbox2[0], gridResolution, gridOffset, cell);
|
|
57081
57755
|
const code = bitCode(bbox2[1], cell);
|
|
57082
57756
|
if (code) {
|
|
57083
|
-
let parts = bisectPolygon(pos, types,
|
|
57757
|
+
let parts = bisectPolygon(pos, types, size2, 0, holes[0] || pos.length, cell, code);
|
|
57084
57758
|
const polygonLow = {
|
|
57085
57759
|
pos: parts[0].pos,
|
|
57086
57760
|
types: parts[0].types,
|
|
@@ -57093,7 +57767,7 @@ function cutPolygonByGrid(positions, holeIndices = null, options) {
|
|
|
57093
57767
|
};
|
|
57094
57768
|
queue.push(polygonLow, polygonHigh);
|
|
57095
57769
|
for (let i2 = 0; i2 < holes.length; i2++) {
|
|
57096
|
-
parts = bisectPolygon(pos, types,
|
|
57770
|
+
parts = bisectPolygon(pos, types, size2, holes[i2], holes[i2 + 1] || pos.length, cell, code);
|
|
57097
57771
|
if (parts[0]) {
|
|
57098
57772
|
polygonLow.holes.push(polygonLow.pos.length);
|
|
57099
57773
|
polygonLow.pos = concatInPlace(polygonLow.pos, parts[0].pos);
|
|
@@ -57124,8 +57798,8 @@ function cutPolygonByGrid(positions, holeIndices = null, options) {
|
|
|
57124
57798
|
}
|
|
57125
57799
|
return result;
|
|
57126
57800
|
}
|
|
57127
|
-
function bisectPolygon(positions, edgeTypes,
|
|
57128
|
-
const numPoints = (endIndex - startIndex) /
|
|
57801
|
+
function bisectPolygon(positions, edgeTypes, size2, startIndex, endIndex, bbox2, edge) {
|
|
57802
|
+
const numPoints = (endIndex - startIndex) / size2;
|
|
57129
57803
|
const resultLow = [];
|
|
57130
57804
|
const resultHigh = [];
|
|
57131
57805
|
const typesLow = [];
|
|
@@ -57134,15 +57808,15 @@ function bisectPolygon(positions, edgeTypes, size, startIndex, endIndex, bbox2,
|
|
|
57134
57808
|
let p;
|
|
57135
57809
|
let side;
|
|
57136
57810
|
let type;
|
|
57137
|
-
const prev2 = getPointAtIndex(positions, numPoints - 1,
|
|
57811
|
+
const prev2 = getPointAtIndex(positions, numPoints - 1, size2, startIndex);
|
|
57138
57812
|
let prevSide = Math.sign(edge & 8 ? prev2[1] - bbox2[3] : prev2[0] - bbox2[2]);
|
|
57139
57813
|
let prevType = edgeTypes && edgeTypes[numPoints - 1];
|
|
57140
57814
|
let lowPointCount = 0;
|
|
57141
57815
|
let highPointCount = 0;
|
|
57142
57816
|
for (let i2 = 0; i2 < numPoints; i2++) {
|
|
57143
|
-
p = getPointAtIndex(positions, i2,
|
|
57817
|
+
p = getPointAtIndex(positions, i2, size2, startIndex, p);
|
|
57144
57818
|
side = Math.sign(edge & 8 ? p[1] - bbox2[3] : p[0] - bbox2[2]);
|
|
57145
|
-
type = edgeTypes && edgeTypes[startIndex /
|
|
57819
|
+
type = edgeTypes && edgeTypes[startIndex / size2 + i2];
|
|
57146
57820
|
if (side && prevSide && prevSide !== side) {
|
|
57147
57821
|
intersect(prev2, p, edge, bbox2, scratchPoint);
|
|
57148
57822
|
push(resultLow, scratchPoint) && typesLow.push(prevType);
|
|
@@ -57196,12 +57870,12 @@ function moveToNeighborCell(cell, gridResolution, edge) {
|
|
|
57196
57870
|
cell[2] -= gridResolution;
|
|
57197
57871
|
}
|
|
57198
57872
|
}
|
|
57199
|
-
function getBoundingBox$2(positions,
|
|
57873
|
+
function getBoundingBox$2(positions, size2, endIndex, out) {
|
|
57200
57874
|
let minX = Infinity;
|
|
57201
57875
|
let maxX = -Infinity;
|
|
57202
57876
|
let minY = Infinity;
|
|
57203
57877
|
let maxY = -Infinity;
|
|
57204
|
-
for (let i2 = 0; i2 < endIndex; i2 +=
|
|
57878
|
+
for (let i2 = 0; i2 < endIndex; i2 += size2) {
|
|
57205
57879
|
const x = positions[i2];
|
|
57206
57880
|
const y = positions[i2 + 1];
|
|
57207
57881
|
minX = x < minX ? x : minX;
|
|
@@ -57218,29 +57892,29 @@ function getBoundingBox$2(positions, size, endIndex, out) {
|
|
|
57218
57892
|
const DEFAULT_MAX_LATITUDE = 85.051129;
|
|
57219
57893
|
function cutPolylineByMercatorBounds(positions, options) {
|
|
57220
57894
|
const {
|
|
57221
|
-
size = 2,
|
|
57895
|
+
size: size2 = 2,
|
|
57222
57896
|
startIndex = 0,
|
|
57223
57897
|
endIndex = positions.length,
|
|
57224
57898
|
normalize: normalize2 = true
|
|
57225
57899
|
} = options || {};
|
|
57226
57900
|
const newPositions = positions.slice(startIndex, endIndex);
|
|
57227
|
-
wrapLongitudesForShortestPath(newPositions,
|
|
57901
|
+
wrapLongitudesForShortestPath(newPositions, size2, 0, endIndex - startIndex);
|
|
57228
57902
|
const parts = cutPolylineByGrid(newPositions, {
|
|
57229
|
-
size,
|
|
57903
|
+
size: size2,
|
|
57230
57904
|
broken: true,
|
|
57231
57905
|
gridResolution: 360,
|
|
57232
57906
|
gridOffset: [-180, -180]
|
|
57233
57907
|
});
|
|
57234
57908
|
if (normalize2) {
|
|
57235
57909
|
for (const part of parts) {
|
|
57236
|
-
shiftLongitudesIntoRange(part,
|
|
57910
|
+
shiftLongitudesIntoRange(part, size2);
|
|
57237
57911
|
}
|
|
57238
57912
|
}
|
|
57239
57913
|
return parts;
|
|
57240
57914
|
}
|
|
57241
57915
|
function cutPolygonByMercatorBounds(positions, holeIndices = null, options) {
|
|
57242
57916
|
const {
|
|
57243
|
-
size = 2,
|
|
57917
|
+
size: size2 = 2,
|
|
57244
57918
|
normalize: normalize2 = true,
|
|
57245
57919
|
edgeTypes = false
|
|
57246
57920
|
} = options || {};
|
|
@@ -57252,36 +57926,36 @@ function cutPolygonByMercatorBounds(positions, holeIndices = null, options) {
|
|
|
57252
57926
|
for (let ringIndex = 0; ringIndex <= holeIndices.length; ringIndex++) {
|
|
57253
57927
|
const srcEndIndex = holeIndices[ringIndex] || positions.length;
|
|
57254
57928
|
const targetStartIndex = targetIndex;
|
|
57255
|
-
const splitIndex = findSplitIndex(positions,
|
|
57929
|
+
const splitIndex = findSplitIndex(positions, size2, srcStartIndex, srcEndIndex);
|
|
57256
57930
|
for (let i2 = splitIndex; i2 < srcEndIndex; i2++) {
|
|
57257
57931
|
newPositions[targetIndex++] = positions[i2];
|
|
57258
57932
|
}
|
|
57259
57933
|
for (let i2 = srcStartIndex; i2 < splitIndex; i2++) {
|
|
57260
57934
|
newPositions[targetIndex++] = positions[i2];
|
|
57261
57935
|
}
|
|
57262
|
-
wrapLongitudesForShortestPath(newPositions,
|
|
57263
|
-
insertPoleVertices(newPositions,
|
|
57936
|
+
wrapLongitudesForShortestPath(newPositions, size2, targetStartIndex, targetIndex);
|
|
57937
|
+
insertPoleVertices(newPositions, size2, targetStartIndex, targetIndex, options === null || options === void 0 ? void 0 : options.maxLatitude);
|
|
57264
57938
|
srcStartIndex = srcEndIndex;
|
|
57265
57939
|
newHoleIndices[ringIndex] = targetIndex;
|
|
57266
57940
|
}
|
|
57267
57941
|
newHoleIndices.pop();
|
|
57268
57942
|
const parts = cutPolygonByGrid(newPositions, newHoleIndices, {
|
|
57269
|
-
size,
|
|
57943
|
+
size: size2,
|
|
57270
57944
|
gridResolution: 360,
|
|
57271
57945
|
gridOffset: [-180, -180],
|
|
57272
57946
|
edgeTypes
|
|
57273
57947
|
});
|
|
57274
57948
|
if (normalize2) {
|
|
57275
57949
|
for (const part of parts) {
|
|
57276
|
-
shiftLongitudesIntoRange(part.positions,
|
|
57950
|
+
shiftLongitudesIntoRange(part.positions, size2);
|
|
57277
57951
|
}
|
|
57278
57952
|
}
|
|
57279
57953
|
return parts;
|
|
57280
57954
|
}
|
|
57281
|
-
function findSplitIndex(positions,
|
|
57955
|
+
function findSplitIndex(positions, size2, startIndex, endIndex) {
|
|
57282
57956
|
let maxLat = -1;
|
|
57283
57957
|
let pointIndex = -1;
|
|
57284
|
-
for (let i2 = startIndex + 1; i2 < endIndex; i2 +=
|
|
57958
|
+
for (let i2 = startIndex + 1; i2 < endIndex; i2 += size2) {
|
|
57285
57959
|
const lat = Math.abs(positions[i2]);
|
|
57286
57960
|
if (lat > maxLat) {
|
|
57287
57961
|
maxLat = lat;
|
|
@@ -57290,11 +57964,11 @@ function findSplitIndex(positions, size, startIndex, endIndex) {
|
|
|
57290
57964
|
}
|
|
57291
57965
|
return pointIndex;
|
|
57292
57966
|
}
|
|
57293
|
-
function insertPoleVertices(positions,
|
|
57967
|
+
function insertPoleVertices(positions, size2, startIndex, endIndex, maxLatitude = DEFAULT_MAX_LATITUDE) {
|
|
57294
57968
|
const firstLng = positions[startIndex];
|
|
57295
|
-
const lastLng = positions[endIndex -
|
|
57969
|
+
const lastLng = positions[endIndex - size2];
|
|
57296
57970
|
if (Math.abs(firstLng - lastLng) > 180) {
|
|
57297
|
-
const p = getPointAtIndex(positions, 0,
|
|
57971
|
+
const p = getPointAtIndex(positions, 0, size2, startIndex);
|
|
57298
57972
|
p[0] += Math.round((lastLng - firstLng) / 360) * 360;
|
|
57299
57973
|
push(positions, p);
|
|
57300
57974
|
p[1] = Math.sign(p[1]) * maxLatitude;
|
|
@@ -57303,10 +57977,10 @@ function insertPoleVertices(positions, size, startIndex, endIndex, maxLatitude =
|
|
|
57303
57977
|
push(positions, p);
|
|
57304
57978
|
}
|
|
57305
57979
|
}
|
|
57306
|
-
function wrapLongitudesForShortestPath(positions,
|
|
57980
|
+
function wrapLongitudesForShortestPath(positions, size2, startIndex, endIndex) {
|
|
57307
57981
|
let prevLng = positions[0];
|
|
57308
57982
|
let lng;
|
|
57309
|
-
for (let i2 = startIndex; i2 < endIndex; i2 +=
|
|
57983
|
+
for (let i2 = startIndex; i2 < endIndex; i2 += size2) {
|
|
57310
57984
|
lng = positions[i2];
|
|
57311
57985
|
const delta = lng - prevLng;
|
|
57312
57986
|
if (delta > 180 || delta < -180) {
|
|
@@ -57315,11 +57989,11 @@ function wrapLongitudesForShortestPath(positions, size, startIndex, endIndex) {
|
|
|
57315
57989
|
positions[i2] = prevLng = lng;
|
|
57316
57990
|
}
|
|
57317
57991
|
}
|
|
57318
|
-
function shiftLongitudesIntoRange(positions,
|
|
57992
|
+
function shiftLongitudesIntoRange(positions, size2) {
|
|
57319
57993
|
let refLng;
|
|
57320
|
-
const pointCount = positions.length /
|
|
57994
|
+
const pointCount = positions.length / size2;
|
|
57321
57995
|
for (let i2 = 0; i2 < pointCount; i2++) {
|
|
57322
|
-
refLng = positions[i2 *
|
|
57996
|
+
refLng = positions[i2 * size2];
|
|
57323
57997
|
if ((refLng + 180) % 360 !== 0) {
|
|
57324
57998
|
break;
|
|
57325
57999
|
}
|
|
@@ -57329,7 +58003,7 @@ function shiftLongitudesIntoRange(positions, size) {
|
|
|
57329
58003
|
return;
|
|
57330
58004
|
}
|
|
57331
58005
|
for (let i2 = 0; i2 < pointCount; i2++) {
|
|
57332
|
-
positions[i2 *
|
|
58006
|
+
positions[i2 * size2] += delta;
|
|
57333
58007
|
}
|
|
57334
58008
|
}
|
|
57335
58009
|
class ColumnGeometry extends Geometry {
|
|
@@ -57728,14 +58402,14 @@ class GridCellLayer extends ColumnLayer {
|
|
|
57728
58402
|
}
|
|
57729
58403
|
_defineProperty(GridCellLayer, "layerName", "GridCellLayer");
|
|
57730
58404
|
_defineProperty(GridCellLayer, "defaultProps", defaultProps$E);
|
|
57731
|
-
function normalizePath(path,
|
|
58405
|
+
function normalizePath(path, size2, gridResolution, wrapLongitude) {
|
|
57732
58406
|
let flatPath;
|
|
57733
58407
|
if (Array.isArray(path[0])) {
|
|
57734
|
-
const length2 = path.length *
|
|
58408
|
+
const length2 = path.length * size2;
|
|
57735
58409
|
flatPath = new Array(length2);
|
|
57736
58410
|
for (let i2 = 0; i2 < path.length; i2++) {
|
|
57737
|
-
for (let j = 0; j <
|
|
57738
|
-
flatPath[i2 *
|
|
58411
|
+
for (let j = 0; j < size2; j++) {
|
|
58412
|
+
flatPath[i2 * size2 + j] = path[i2][j] || 0;
|
|
57739
58413
|
}
|
|
57740
58414
|
}
|
|
57741
58415
|
} else {
|
|
@@ -57743,13 +58417,13 @@ function normalizePath(path, size, gridResolution, wrapLongitude) {
|
|
|
57743
58417
|
}
|
|
57744
58418
|
if (gridResolution) {
|
|
57745
58419
|
return cutPolylineByGrid(flatPath, {
|
|
57746
|
-
size,
|
|
58420
|
+
size: size2,
|
|
57747
58421
|
gridResolution
|
|
57748
58422
|
});
|
|
57749
58423
|
}
|
|
57750
58424
|
if (wrapLongitude) {
|
|
57751
58425
|
return cutPolylineByMercatorBounds(flatPath, {
|
|
57752
|
-
size
|
|
58426
|
+
size: size2
|
|
57753
58427
|
});
|
|
57754
58428
|
}
|
|
57755
58429
|
return flatPath;
|
|
@@ -57792,11 +58466,11 @@ class PathTesselator extends Tesselator {
|
|
|
57792
58466
|
}
|
|
57793
58467
|
getGeometrySize(path) {
|
|
57794
58468
|
if (isCut$1(path)) {
|
|
57795
|
-
let
|
|
58469
|
+
let size2 = 0;
|
|
57796
58470
|
for (const subPath of path) {
|
|
57797
|
-
|
|
58471
|
+
size2 += this.getGeometrySize(subPath);
|
|
57798
58472
|
}
|
|
57799
|
-
return
|
|
58473
|
+
return size2;
|
|
57800
58474
|
}
|
|
57801
58475
|
const numPoints = this.getPathLength(path);
|
|
57802
58476
|
if (numPoints < 2) {
|
|
@@ -58604,34 +59278,34 @@ function isNestedRingClosed(simplePolygon) {
|
|
|
58604
59278
|
const p1 = simplePolygon[simplePolygon.length - 1];
|
|
58605
59279
|
return p02[0] === p1[0] && p02[1] === p1[1] && p02[2] === p1[2];
|
|
58606
59280
|
}
|
|
58607
|
-
function isFlatRingClosed(positions,
|
|
58608
|
-
for (let i2 = 0; i2 <
|
|
58609
|
-
if (positions[startIndex + i2] !== positions[endIndex -
|
|
59281
|
+
function isFlatRingClosed(positions, size2, startIndex, endIndex) {
|
|
59282
|
+
for (let i2 = 0; i2 < size2; i2++) {
|
|
59283
|
+
if (positions[startIndex + i2] !== positions[endIndex - size2 + i2]) {
|
|
58610
59284
|
return false;
|
|
58611
59285
|
}
|
|
58612
59286
|
}
|
|
58613
59287
|
return true;
|
|
58614
59288
|
}
|
|
58615
|
-
function copyNestedRing(target, targetStartIndex, simplePolygon,
|
|
59289
|
+
function copyNestedRing(target, targetStartIndex, simplePolygon, size2, windingDirection) {
|
|
58616
59290
|
let targetIndex = targetStartIndex;
|
|
58617
59291
|
const len2 = simplePolygon.length;
|
|
58618
59292
|
for (let i2 = 0; i2 < len2; i2++) {
|
|
58619
|
-
for (let j = 0; j <
|
|
59293
|
+
for (let j = 0; j < size2; j++) {
|
|
58620
59294
|
target[targetIndex++] = simplePolygon[i2][j] || 0;
|
|
58621
59295
|
}
|
|
58622
59296
|
}
|
|
58623
59297
|
if (!isNestedRingClosed(simplePolygon)) {
|
|
58624
|
-
for (let j = 0; j <
|
|
59298
|
+
for (let j = 0; j < size2; j++) {
|
|
58625
59299
|
target[targetIndex++] = simplePolygon[0][j] || 0;
|
|
58626
59300
|
}
|
|
58627
59301
|
}
|
|
58628
59302
|
windingOptions.start = targetStartIndex;
|
|
58629
59303
|
windingOptions.end = targetIndex;
|
|
58630
|
-
windingOptions.size =
|
|
59304
|
+
windingOptions.size = size2;
|
|
58631
59305
|
modifyPolygonWindingDirection(target, windingDirection, windingOptions);
|
|
58632
59306
|
return targetIndex;
|
|
58633
59307
|
}
|
|
58634
|
-
function copyFlatRing(target, targetStartIndex, positions,
|
|
59308
|
+
function copyFlatRing(target, targetStartIndex, positions, size2, srcStartIndex = 0, srcEndIndex, windingDirection) {
|
|
58635
59309
|
srcEndIndex = srcEndIndex || positions.length;
|
|
58636
59310
|
const srcLength = srcEndIndex - srcStartIndex;
|
|
58637
59311
|
if (srcLength <= 0) {
|
|
@@ -58641,14 +59315,14 @@ function copyFlatRing(target, targetStartIndex, positions, size, srcStartIndex =
|
|
|
58641
59315
|
for (let i2 = 0; i2 < srcLength; i2++) {
|
|
58642
59316
|
target[targetIndex++] = positions[srcStartIndex + i2];
|
|
58643
59317
|
}
|
|
58644
|
-
if (!isFlatRingClosed(positions,
|
|
58645
|
-
for (let i2 = 0; i2 <
|
|
59318
|
+
if (!isFlatRingClosed(positions, size2, srcStartIndex, srcEndIndex)) {
|
|
59319
|
+
for (let i2 = 0; i2 < size2; i2++) {
|
|
58646
59320
|
target[targetIndex++] = positions[srcStartIndex + i2];
|
|
58647
59321
|
}
|
|
58648
59322
|
}
|
|
58649
59323
|
windingOptions.start = targetStartIndex;
|
|
58650
59324
|
windingOptions.end = targetIndex;
|
|
58651
|
-
windingOptions.size =
|
|
59325
|
+
windingOptions.size = size2;
|
|
58652
59326
|
modifyPolygonWindingDirection(target, windingDirection, windingOptions);
|
|
58653
59327
|
return targetIndex;
|
|
58654
59328
|
}
|
|
@@ -58779,11 +59453,11 @@ class PolygonTesselator extends Tesselator {
|
|
|
58779
59453
|
}
|
|
58780
59454
|
getGeometrySize(polygon2) {
|
|
58781
59455
|
if (isCut(polygon2)) {
|
|
58782
|
-
let
|
|
59456
|
+
let size2 = 0;
|
|
58783
59457
|
for (const subPolygon of polygon2) {
|
|
58784
|
-
|
|
59458
|
+
size2 += this.getGeometrySize(subPolygon);
|
|
58785
59459
|
}
|
|
58786
|
-
return
|
|
59460
|
+
return size2;
|
|
58787
59461
|
}
|
|
58788
59462
|
return getPositions(polygon2).length / this.positionSize;
|
|
58789
59463
|
}
|
|
@@ -59654,10 +60328,10 @@ function requireTinySdf() {
|
|
|
59654
60328
|
this.fontFamily = fontFamily || "sans-serif";
|
|
59655
60329
|
this.fontWeight = fontWeight || "normal";
|
|
59656
60330
|
this.radius = radius || 8;
|
|
59657
|
-
var
|
|
59658
|
-
var gridSize =
|
|
60331
|
+
var size2 = this.size = this.fontSize + this.buffer * 2;
|
|
60332
|
+
var gridSize = size2 + this.buffer * 2;
|
|
59659
60333
|
this.canvas = document.createElement("canvas");
|
|
59660
|
-
this.canvas.width = this.canvas.height =
|
|
60334
|
+
this.canvas.width = this.canvas.height = size2;
|
|
59661
60335
|
this.ctx = this.canvas.getContext("2d");
|
|
59662
60336
|
this.ctx.font = this.fontWeight + " " + this.fontSize + "px " + this.fontFamily;
|
|
59663
60337
|
this.ctx.textAlign = "left";
|
|
@@ -59668,7 +60342,7 @@ function requireTinySdf() {
|
|
|
59668
60342
|
this.z = new Float64Array(gridSize + 1);
|
|
59669
60343
|
this.v = new Uint16Array(gridSize);
|
|
59670
60344
|
this.useMetrics = this.ctx.measureText("A").actualBoundingBoxLeft !== void 0;
|
|
59671
|
-
this.middle = Math.round(
|
|
60345
|
+
this.middle = Math.round(size2 / 2 * (navigator.userAgent.indexOf("Gecko/") >= 0 ? 1.2 : 1));
|
|
59672
60346
|
}
|
|
59673
60347
|
function prepareGrids(imgData, width2, height2, glyphWidth, glyphHeight, gridOuter, gridInner) {
|
|
59674
60348
|
gridOuter.fill(INF, 0, width2 * height2);
|
|
@@ -59925,7 +60599,7 @@ function transformParagraph(paragraph, lineHeight, wordBreak, maxWidth2, iconMap
|
|
|
59925
60599
|
const y = new Array(numCharacters);
|
|
59926
60600
|
const rowWidth = new Array(numCharacters);
|
|
59927
60601
|
const autoWrappingEnabled = (wordBreak === "break-word" || wordBreak === "break-all") && isFinite(maxWidth2) && maxWidth2 > 0;
|
|
59928
|
-
const
|
|
60602
|
+
const size2 = [0, 0];
|
|
59929
60603
|
const rowSize = [0, 0];
|
|
59930
60604
|
let rowOffsetTop = 0;
|
|
59931
60605
|
let lineStartIndex = 0;
|
|
@@ -59946,7 +60620,7 @@ function transformParagraph(paragraph, lineHeight, wordBreak, maxWidth2, iconMap
|
|
|
59946
60620
|
rowWidth[j] = rowSize[0];
|
|
59947
60621
|
}
|
|
59948
60622
|
rowOffsetTop = rowOffsetTop + rowSize[1] * lineHeight;
|
|
59949
|
-
|
|
60623
|
+
size2[0] = Math.max(size2[0], rowSize[0]);
|
|
59950
60624
|
}
|
|
59951
60625
|
lineStartIndex = lineEndIndex;
|
|
59952
60626
|
}
|
|
@@ -59957,12 +60631,12 @@ function transformParagraph(paragraph, lineHeight, wordBreak, maxWidth2, iconMap
|
|
|
59957
60631
|
lineStartIndex++;
|
|
59958
60632
|
}
|
|
59959
60633
|
}
|
|
59960
|
-
|
|
60634
|
+
size2[1] = rowOffsetTop;
|
|
59961
60635
|
return {
|
|
59962
60636
|
x,
|
|
59963
60637
|
y,
|
|
59964
60638
|
rowWidth,
|
|
59965
|
-
size
|
|
60639
|
+
size: size2
|
|
59966
60640
|
};
|
|
59967
60641
|
}
|
|
59968
60642
|
function getTextFromBuffer({
|
|
@@ -61623,14 +62297,14 @@ class GPUGridAggregator {
|
|
|
61623
62297
|
}
|
|
61624
62298
|
static getCellData({
|
|
61625
62299
|
countsData,
|
|
61626
|
-
size = 1
|
|
62300
|
+
size: size2 = 1
|
|
61627
62301
|
}) {
|
|
61628
62302
|
const numCells = countsData.length / 4;
|
|
61629
|
-
const cellWeights = new Float32Array(numCells *
|
|
62303
|
+
const cellWeights = new Float32Array(numCells * size2);
|
|
61630
62304
|
const cellCounts = new Uint32Array(numCells);
|
|
61631
62305
|
for (let i2 = 0; i2 < numCells; i2++) {
|
|
61632
|
-
for (let sizeIndex = 0; sizeIndex <
|
|
61633
|
-
cellWeights[i2 *
|
|
62306
|
+
for (let sizeIndex = 0; sizeIndex < size2; sizeIndex++) {
|
|
62307
|
+
cellWeights[i2 * size2 + sizeIndex] = countsData[i2 * 4 + sizeIndex];
|
|
61634
62308
|
}
|
|
61635
62309
|
cellCounts[i2] = countsData[i2 * 4 + 3];
|
|
61636
62310
|
}
|
|
@@ -62611,7 +63285,7 @@ function pointsToGridHashing(props, aggregationParams) {
|
|
|
62611
63285
|
} = aggregationParams;
|
|
62612
63286
|
const positions = attributes.positions.value;
|
|
62613
63287
|
const {
|
|
62614
|
-
size
|
|
63288
|
+
size: size2
|
|
62615
63289
|
} = attributes.positions.getAccessor();
|
|
62616
63290
|
const boundingBox = aggregationParams.boundingBox || getPositionBoundingBox(attributes.positions, numInstances);
|
|
62617
63291
|
const offsets = aggregationParams.posOffset || [180, 90];
|
|
@@ -62636,9 +63310,9 @@ function pointsToGridHashing(props, aggregationParams) {
|
|
|
62636
63310
|
const position2 = new Array(3);
|
|
62637
63311
|
for (const pt of iterable) {
|
|
62638
63312
|
objectInfo.index++;
|
|
62639
|
-
position2[0] = positions[objectInfo.index *
|
|
62640
|
-
position2[1] = positions[objectInfo.index *
|
|
62641
|
-
position2[2] =
|
|
63313
|
+
position2[0] = positions[objectInfo.index * size2];
|
|
63314
|
+
position2[1] = positions[objectInfo.index * size2 + 1];
|
|
63315
|
+
position2[2] = size2 >= 3 ? positions[objectInfo.index * size2 + 2] : 0;
|
|
62642
63316
|
const [x, y] = projectPoints ? viewport.project(position2) : position2;
|
|
62643
63317
|
if (Number.isFinite(x) && Number.isFinite(y)) {
|
|
62644
63318
|
const yIndex = Math.floor((y + offsets[1]) / gridOffset.yOffset);
|
|
@@ -62688,7 +63362,7 @@ function getGridLayerDataFromGridHash({
|
|
|
62688
63362
|
function getPositionBoundingBox(positionAttribute, numInstance) {
|
|
62689
63363
|
const positions = positionAttribute.value;
|
|
62690
63364
|
const {
|
|
62691
|
-
size
|
|
63365
|
+
size: size2
|
|
62692
63366
|
} = positionAttribute.getAccessor();
|
|
62693
63367
|
let yMin = Infinity;
|
|
62694
63368
|
let yMax = -Infinity;
|
|
@@ -62697,8 +63371,8 @@ function getPositionBoundingBox(positionAttribute, numInstance) {
|
|
|
62697
63371
|
let y;
|
|
62698
63372
|
let x;
|
|
62699
63373
|
for (let i2 = 0; i2 < numInstance; i2++) {
|
|
62700
|
-
x = positions[i2 *
|
|
62701
|
-
y = positions[i2 *
|
|
63374
|
+
x = positions[i2 * size2];
|
|
63375
|
+
y = positions[i2 * size2 + 1];
|
|
62702
63376
|
if (Number.isFinite(x) && Number.isFinite(y)) {
|
|
62703
63377
|
yMin = y < yMin ? y : yMin;
|
|
62704
63378
|
yMax = y > yMax ? y : yMax;
|
|
@@ -63791,9 +64465,9 @@ function requireLong() {
|
|
|
63791
64465
|
var radixToPower = fromNumber(pow_dbl(radix, 8));
|
|
63792
64466
|
var result = ZERO2;
|
|
63793
64467
|
for (var i2 = 0; i2 < str.length; i2 += 8) {
|
|
63794
|
-
var
|
|
63795
|
-
if (
|
|
63796
|
-
var power = fromNumber(pow_dbl(radix,
|
|
64468
|
+
var size2 = Math.min(8, str.length - i2), value = parseInt(str.substring(i2, i2 + size2), radix);
|
|
64469
|
+
if (size2 < 8) {
|
|
64470
|
+
var power = fromNumber(pow_dbl(radix, size2));
|
|
63797
64471
|
result = result.mul(power).add(fromNumber(value));
|
|
63798
64472
|
} else {
|
|
63799
64473
|
result = result.mul(radixToPower);
|
|
@@ -66711,10 +67385,10 @@ var libh3 = function(libh32) {
|
|
|
66711
67385
|
function abortOnCannotGrowMemory(requestedSize) {
|
|
66712
67386
|
abort("OOM");
|
|
66713
67387
|
}
|
|
66714
|
-
function emscripten_realloc_buffer(
|
|
67388
|
+
function emscripten_realloc_buffer(size2) {
|
|
66715
67389
|
try {
|
|
66716
|
-
var newBuffer = new ArrayBuffer(
|
|
66717
|
-
if (newBuffer.byteLength !=
|
|
67390
|
+
var newBuffer = new ArrayBuffer(size2);
|
|
67391
|
+
if (newBuffer.byteLength != size2) {
|
|
66718
67392
|
return;
|
|
66719
67393
|
}
|
|
66720
67394
|
new Int8Array(newBuffer).set(HEAP8);
|
|
@@ -79648,8 +80322,8 @@ const ATTRIBUTE_COMPONENT_TYPE_TO_ARRAY = {
|
|
|
79648
80322
|
5125: Uint32Array,
|
|
79649
80323
|
5126: Float32Array
|
|
79650
80324
|
};
|
|
79651
|
-
function getAccessorTypeFromSize(
|
|
79652
|
-
const type = TYPES[
|
|
80325
|
+
function getAccessorTypeFromSize(size2) {
|
|
80326
|
+
const type = TYPES[size2 - 1];
|
|
79653
80327
|
return type || TYPES[0];
|
|
79654
80328
|
}
|
|
79655
80329
|
function getComponentTypeFromArray(typedArray) {
|
|
@@ -80066,23 +80740,23 @@ class GLTFScenegraph {
|
|
|
80066
80740
|
return attributeName;
|
|
80067
80741
|
}
|
|
80068
80742
|
}
|
|
80069
|
-
_getAccessorMinMax(buffer,
|
|
80743
|
+
_getAccessorMinMax(buffer, size2) {
|
|
80070
80744
|
const result = {
|
|
80071
80745
|
min: null,
|
|
80072
80746
|
max: null
|
|
80073
80747
|
};
|
|
80074
|
-
if (buffer.length <
|
|
80748
|
+
if (buffer.length < size2) {
|
|
80075
80749
|
return result;
|
|
80076
80750
|
}
|
|
80077
80751
|
result.min = [];
|
|
80078
80752
|
result.max = [];
|
|
80079
|
-
const initValues = buffer.subarray(0,
|
|
80753
|
+
const initValues = buffer.subarray(0, size2);
|
|
80080
80754
|
for (const value of initValues) {
|
|
80081
80755
|
result.min.push(value);
|
|
80082
80756
|
result.max.push(value);
|
|
80083
80757
|
}
|
|
80084
|
-
for (let index2 =
|
|
80085
|
-
for (let componentIndex = 0; componentIndex <
|
|
80758
|
+
for (let index2 = size2; index2 < buffer.length; index2 += size2) {
|
|
80759
|
+
for (let componentIndex = 0; componentIndex < size2; componentIndex++) {
|
|
80086
80760
|
result.min[0 + componentIndex] = Math.min(result.min[0 + componentIndex], buffer[index2 + componentIndex]);
|
|
80087
80761
|
result.max[0 + componentIndex] = Math.max(result.max[0 + componentIndex], buffer[index2 + componentIndex]);
|
|
80088
80762
|
}
|
|
@@ -80112,9 +80786,9 @@ const DECODERS = {
|
|
|
80112
80786
|
TRIANGLES: "meshopt_decodeIndexBuffer",
|
|
80113
80787
|
INDICES: "meshopt_decodeIndexSequence"
|
|
80114
80788
|
};
|
|
80115
|
-
async function meshoptDecodeGltfBuffer(target, count2,
|
|
80789
|
+
async function meshoptDecodeGltfBuffer(target, count2, size2, source, mode, filter = "NONE") {
|
|
80116
80790
|
const instance = await loadWasmInstance();
|
|
80117
|
-
decode$5(instance, instance.exports[DECODERS[mode]], target, count2,
|
|
80791
|
+
decode$5(instance, instance.exports[DECODERS[mode]], target, count2, size2, source, instance.exports[FILTERS[filter || "NONE"]]);
|
|
80118
80792
|
}
|
|
80119
80793
|
let wasmPromise;
|
|
80120
80794
|
async function loadWasmInstance() {
|
|
@@ -80145,18 +80819,18 @@ function unpack(data) {
|
|
|
80145
80819
|
}
|
|
80146
80820
|
return result.buffer.slice(0, write);
|
|
80147
80821
|
}
|
|
80148
|
-
function decode$5(instance, fun, target, count2,
|
|
80822
|
+
function decode$5(instance, fun, target, count2, size2, source, filter) {
|
|
80149
80823
|
const sbrk = instance.exports.sbrk;
|
|
80150
80824
|
const count4 = count2 + 3 & -4;
|
|
80151
|
-
const tp = sbrk(count4 *
|
|
80825
|
+
const tp = sbrk(count4 * size2);
|
|
80152
80826
|
const sp = sbrk(source.length);
|
|
80153
80827
|
const heap = new Uint8Array(instance.exports.memory.buffer);
|
|
80154
80828
|
heap.set(source, sp);
|
|
80155
|
-
const res = fun(tp, count2,
|
|
80829
|
+
const res = fun(tp, count2, size2, sp, source.length);
|
|
80156
80830
|
if (res === 0 && filter) {
|
|
80157
|
-
filter(tp, count4,
|
|
80831
|
+
filter(tp, count4, size2);
|
|
80158
80832
|
}
|
|
80159
|
-
target.set(heap.subarray(tp, tp + count2 *
|
|
80833
|
+
target.set(heap.subarray(tp, tp + count2 * size2));
|
|
80160
80834
|
sbrk(tp - sbrk(0));
|
|
80161
80835
|
if (res !== 0) {
|
|
80162
80836
|
throw new Error("Malformed buffer data: ".concat(res));
|
|
@@ -80838,11 +81512,11 @@ class DracoParser {
|
|
|
80838
81512
|
loaderAttribute.name = attributeName;
|
|
80839
81513
|
const {
|
|
80840
81514
|
value,
|
|
80841
|
-
size
|
|
81515
|
+
size: size2
|
|
80842
81516
|
} = this._getAttributeValues(dracoGeometry, loaderAttribute);
|
|
80843
81517
|
attributes[attributeName] = {
|
|
80844
81518
|
value,
|
|
80845
|
-
size,
|
|
81519
|
+
size: size2,
|
|
80846
81520
|
byteOffset: loaderAttribute.byte_offset,
|
|
80847
81521
|
byteStride: loaderAttribute.byte_stride,
|
|
80848
81522
|
normalized: loaderAttribute.normalized
|
|
@@ -81111,36 +81785,36 @@ function getGLTFAccessors(attributes) {
|
|
|
81111
81785
|
function getGLTFAccessor(attribute) {
|
|
81112
81786
|
const {
|
|
81113
81787
|
buffer,
|
|
81114
|
-
size,
|
|
81788
|
+
size: size2,
|
|
81115
81789
|
count: count2
|
|
81116
81790
|
} = getAccessorData(attribute);
|
|
81117
81791
|
const glTFAccessor = {
|
|
81118
81792
|
value: buffer,
|
|
81119
|
-
size,
|
|
81793
|
+
size: size2,
|
|
81120
81794
|
byteOffset: 0,
|
|
81121
81795
|
count: count2,
|
|
81122
|
-
type: getAccessorTypeFromSize(
|
|
81796
|
+
type: getAccessorTypeFromSize(size2),
|
|
81123
81797
|
componentType: getComponentTypeFromArray(buffer)
|
|
81124
81798
|
};
|
|
81125
81799
|
return glTFAccessor;
|
|
81126
81800
|
}
|
|
81127
81801
|
function getAccessorData(attribute) {
|
|
81128
81802
|
let buffer = attribute;
|
|
81129
|
-
let
|
|
81803
|
+
let size2 = 1;
|
|
81130
81804
|
let count2 = 0;
|
|
81131
81805
|
if (attribute && attribute.value) {
|
|
81132
81806
|
buffer = attribute.value;
|
|
81133
|
-
|
|
81807
|
+
size2 = attribute.size || 1;
|
|
81134
81808
|
}
|
|
81135
81809
|
if (buffer) {
|
|
81136
81810
|
if (!ArrayBuffer.isView(buffer)) {
|
|
81137
81811
|
buffer = toTypedArray(buffer, Float32Array);
|
|
81138
81812
|
}
|
|
81139
|
-
count2 = buffer.length /
|
|
81813
|
+
count2 = buffer.length / size2;
|
|
81140
81814
|
}
|
|
81141
81815
|
return {
|
|
81142
81816
|
buffer,
|
|
81143
|
-
size,
|
|
81817
|
+
size: size2,
|
|
81144
81818
|
count: count2
|
|
81145
81819
|
};
|
|
81146
81820
|
}
|
|
@@ -83383,8 +84057,8 @@ function getObbSize(halfAxes) {
|
|
|
83383
84057
|
const axeY = halfAxes.getColumn(1);
|
|
83384
84058
|
const axeZ = halfAxes.getColumn(2);
|
|
83385
84059
|
const farthestVertex = scratchVector$1.add(axeY).add(axeZ);
|
|
83386
|
-
const
|
|
83387
|
-
return
|
|
84060
|
+
const size2 = farthestVertex.len();
|
|
84061
|
+
return size2;
|
|
83388
84062
|
}
|
|
83389
84063
|
const TILE_CONTENT_STATE = {
|
|
83390
84064
|
UNLOADED: 0,
|
|
@@ -85385,15 +86059,15 @@ function createTypedArrayFromAccessor(tile3DAccessor, buffer, byteOffset, length
|
|
|
85385
86059
|
} = tile3DAccessor;
|
|
85386
86060
|
assert$b(tile3DAccessor.componentType);
|
|
85387
86061
|
const type = typeof componentType === "string" ? GLType.fromName(componentType) : componentType;
|
|
85388
|
-
const
|
|
86062
|
+
const size2 = COMPONENTS_PER_ATTRIBUTE[tile3DAccessor.type];
|
|
85389
86063
|
const unpacker = UNPACKER[tile3DAccessor.type];
|
|
85390
86064
|
const packer = PACKER[tile3DAccessor.type];
|
|
85391
86065
|
byteOffset += tile3DAccessor.byteOffset;
|
|
85392
|
-
const values2 = GLType.createTypedArray(type, buffer, byteOffset,
|
|
86066
|
+
const values2 = GLType.createTypedArray(type, buffer, byteOffset, size2 * length2);
|
|
85393
86067
|
return {
|
|
85394
86068
|
values: values2,
|
|
85395
86069
|
type,
|
|
85396
|
-
size,
|
|
86070
|
+
size: size2,
|
|
85397
86071
|
unpacker,
|
|
85398
86072
|
packer
|
|
85399
86073
|
};
|
|
@@ -103807,8 +104481,8 @@ function fitExtent(projection2, extent2, object2) {
|
|
|
103807
104481
|
if (clip2 != null) projection2.clipExtent(clip2);
|
|
103808
104482
|
return projection2.scale(k * 150).translate([x, y]);
|
|
103809
104483
|
}
|
|
103810
|
-
function fitSize(projection2,
|
|
103811
|
-
return fitExtent(projection2, [[0, 0],
|
|
104484
|
+
function fitSize(projection2, size2, object2) {
|
|
104485
|
+
return fitExtent(projection2, [[0, 0], size2], object2);
|
|
103812
104486
|
}
|
|
103813
104487
|
var maxDepth = 16, cosMinDistance = cos(30 * radians);
|
|
103814
104488
|
function resample(project2, delta2) {
|
|
@@ -103934,8 +104608,8 @@ function projectionMutator(projectAt) {
|
|
|
103934
104608
|
projection2.fitExtent = function(extent2, object2) {
|
|
103935
104609
|
return fitExtent(projection2, extent2, object2);
|
|
103936
104610
|
};
|
|
103937
|
-
projection2.fitSize = function(
|
|
103938
|
-
return fitSize(projection2,
|
|
104611
|
+
projection2.fitSize = function(size2, object2) {
|
|
104612
|
+
return fitSize(projection2, size2, object2);
|
|
103939
104613
|
};
|
|
103940
104614
|
function recenter() {
|
|
103941
104615
|
projectRotate = compose(rotate2 = rotateRadians(deltaLambda, deltaPhi, deltaGamma), project2);
|
|
@@ -104056,8 +104730,8 @@ function albersUsa() {
|
|
|
104056
104730
|
albersUsa2.fitExtent = function(extent2, object2) {
|
|
104057
104731
|
return fitExtent(albersUsa2, extent2, object2);
|
|
104058
104732
|
};
|
|
104059
|
-
albersUsa2.fitSize = function(
|
|
104060
|
-
return fitSize(albersUsa2,
|
|
104733
|
+
albersUsa2.fitSize = function(size2, object2) {
|
|
104734
|
+
return fitSize(albersUsa2, size2, object2);
|
|
104061
104735
|
};
|
|
104062
104736
|
function reset() {
|
|
104063
104737
|
cache2 = cacheStream = null;
|
|
@@ -104220,8 +104894,8 @@ function identity() {
|
|
|
104220
104894
|
fitExtent: function(extent2, object2) {
|
|
104221
104895
|
return fitExtent(projection2, extent2, object2);
|
|
104222
104896
|
},
|
|
104223
|
-
fitSize: function(
|
|
104224
|
-
return fitSize(projection2,
|
|
104897
|
+
fitSize: function(size2, object2) {
|
|
104898
|
+
return fitSize(projection2, size2, object2);
|
|
104225
104899
|
}
|
|
104226
104900
|
};
|
|
104227
104901
|
}
|
|
@@ -104839,18 +105513,18 @@ function requirePolygonClipping_umd() {
|
|
|
104839
105513
|
if (presort === void 0) {
|
|
104840
105514
|
presort = false;
|
|
104841
105515
|
}
|
|
104842
|
-
var
|
|
105516
|
+
var size2 = keys2.length;
|
|
104843
105517
|
var comparator = this._comparator;
|
|
104844
|
-
if (presort) sort(keys2, values2, 0,
|
|
105518
|
+
if (presort) sort(keys2, values2, 0, size2 - 1, comparator);
|
|
104845
105519
|
if (this._root === null) {
|
|
104846
|
-
this._root = loadRecursive(keys2, values2, 0,
|
|
104847
|
-
this._size =
|
|
105520
|
+
this._root = loadRecursive(keys2, values2, 0, size2);
|
|
105521
|
+
this._size = size2;
|
|
104848
105522
|
} else {
|
|
104849
105523
|
var mergedList = mergeLists(this.toList(), createList(keys2, values2), comparator);
|
|
104850
|
-
|
|
105524
|
+
size2 = this._size + size2;
|
|
104851
105525
|
this._root = sortedListToBST({
|
|
104852
105526
|
head: mergedList
|
|
104853
|
-
}, 0,
|
|
105527
|
+
}, 0, size2);
|
|
104854
105528
|
}
|
|
104855
105529
|
return this;
|
|
104856
105530
|
};
|
|
@@ -104900,9 +105574,9 @@ function requirePolygonClipping_umd() {
|
|
|
104900
105574
|
}()
|
|
104901
105575
|
);
|
|
104902
105576
|
function loadRecursive(keys2, values2, start, end) {
|
|
104903
|
-
var
|
|
104904
|
-
if (
|
|
104905
|
-
var middle = start + Math.floor(
|
|
105577
|
+
var size2 = end - start;
|
|
105578
|
+
if (size2 > 0) {
|
|
105579
|
+
var middle = start + Math.floor(size2 / 2);
|
|
104906
105580
|
var key = keys2[middle];
|
|
104907
105581
|
var data = values2[middle];
|
|
104908
105582
|
var node2 = new Node2(key, data);
|
|
@@ -104942,9 +105616,9 @@ function requirePolygonClipping_umd() {
|
|
|
104942
105616
|
return head.next;
|
|
104943
105617
|
}
|
|
104944
105618
|
function sortedListToBST(list, start, end) {
|
|
104945
|
-
var
|
|
104946
|
-
if (
|
|
104947
|
-
var middle = start + Math.floor(
|
|
105619
|
+
var size2 = end - start;
|
|
105620
|
+
if (size2 > 0) {
|
|
105621
|
+
var middle = start + Math.floor(size2 / 2);
|
|
104948
105622
|
var left = sortedListToBST(list, start, middle);
|
|
104949
105623
|
var root2 = list.head;
|
|
104950
105624
|
root2.left = left;
|
|
@@ -116006,19 +116680,19 @@ function requireExtrudeMode() {
|
|
|
116006
116680
|
if (editHandle) {
|
|
116007
116681
|
var featureIndex = editHandle.properties.featureIndex;
|
|
116008
116682
|
var positionIndexes = editHandle.properties.positionIndexes;
|
|
116009
|
-
var
|
|
116010
|
-
positionIndexes = this.isPointAdded ? this.nextPositionIndexes(positionIndexes,
|
|
116011
|
-
var p1 = this.getPointForPositionIndexes(this.prevPositionIndexes(positionIndexes,
|
|
116683
|
+
var size2 = this.coordinatesSize(positionIndexes, featureIndex, props.data);
|
|
116684
|
+
positionIndexes = this.isPointAdded ? this.nextPositionIndexes(positionIndexes, size2) : positionIndexes;
|
|
116685
|
+
var p1 = this.getPointForPositionIndexes(this.prevPositionIndexes(positionIndexes, size2), featureIndex, props.data);
|
|
116012
116686
|
var p2 = this.getPointForPositionIndexes(positionIndexes, featureIndex, props.data);
|
|
116013
116687
|
if (p1 && p2) {
|
|
116014
116688
|
var _generatePointsParall = (0, _utils.generatePointsParallelToLinePoints)(p1, p2, event.mapCoords), _generatePointsParall2 = _slicedToArray(_generatePointsParall, 2), p3 = _generatePointsParall2[0], p4 = _generatePointsParall2[1];
|
|
116015
|
-
var updatedData = new _immutableFeatureCollection.ImmutableFeatureCollection(props.data).replacePosition(featureIndex, this.prevPositionIndexes(positionIndexes,
|
|
116689
|
+
var updatedData = new _immutableFeatureCollection.ImmutableFeatureCollection(props.data).replacePosition(featureIndex, this.prevPositionIndexes(positionIndexes, size2), p4).replacePosition(featureIndex, positionIndexes, p3).getObject();
|
|
116016
116690
|
props.onEdit({
|
|
116017
116691
|
updatedData,
|
|
116018
116692
|
editType: "extruding",
|
|
116019
116693
|
editContext: {
|
|
116020
116694
|
featureIndexes: [featureIndex],
|
|
116021
|
-
positionIndexes: this.nextPositionIndexes(positionIndexes,
|
|
116695
|
+
positionIndexes: this.nextPositionIndexes(positionIndexes, size2),
|
|
116022
116696
|
position: p3
|
|
116023
116697
|
}
|
|
116024
116698
|
});
|
|
@@ -116033,15 +116707,15 @@ function requireExtrudeMode() {
|
|
|
116033
116707
|
var editHandle = (0, _utils.getPickedIntermediateEditHandle)(event.picks);
|
|
116034
116708
|
if (selectedFeatureIndexes.length && editHandle) {
|
|
116035
116709
|
var _editHandle$propertie = editHandle.properties, positionIndexes = _editHandle$propertie.positionIndexes, featureIndex = _editHandle$propertie.featureIndex;
|
|
116036
|
-
var
|
|
116037
|
-
var p1 = this.getPointForPositionIndexes(this.prevPositionIndexes(positionIndexes,
|
|
116710
|
+
var size2 = this.coordinatesSize(positionIndexes, featureIndex, props.data);
|
|
116711
|
+
var p1 = this.getPointForPositionIndexes(this.prevPositionIndexes(positionIndexes, size2), featureIndex, props.data);
|
|
116038
116712
|
var p2 = this.getPointForPositionIndexes(positionIndexes, featureIndex, props.data);
|
|
116039
116713
|
if (p1 && p2) {
|
|
116040
116714
|
var updatedData = new _immutableFeatureCollection.ImmutableFeatureCollection(props.data);
|
|
116041
|
-
if (!this.isOrthogonal(positionIndexes, featureIndex,
|
|
116715
|
+
if (!this.isOrthogonal(positionIndexes, featureIndex, size2, props.data)) {
|
|
116042
116716
|
updatedData = updatedData.addPosition(featureIndex, positionIndexes, p2);
|
|
116043
116717
|
}
|
|
116044
|
-
if (!this.isOrthogonal(this.prevPositionIndexes(positionIndexes,
|
|
116718
|
+
if (!this.isOrthogonal(this.prevPositionIndexes(positionIndexes, size2), featureIndex, size2, props.data)) {
|
|
116045
116719
|
updatedData = updatedData.addPosition(featureIndex, positionIndexes, p1);
|
|
116046
116720
|
this.isPointAdded = true;
|
|
116047
116721
|
}
|
|
@@ -116065,13 +116739,13 @@ function requireExtrudeMode() {
|
|
|
116065
116739
|
if (selectedFeatureIndexes.length && editHandle) {
|
|
116066
116740
|
var featureIndex = editHandle.properties.featureIndex;
|
|
116067
116741
|
var positionIndexes = editHandle.properties.positionIndexes;
|
|
116068
|
-
var
|
|
116069
|
-
positionIndexes = this.isPointAdded ? this.nextPositionIndexes(positionIndexes,
|
|
116070
|
-
var p1 = this.getPointForPositionIndexes(this.prevPositionIndexes(positionIndexes,
|
|
116742
|
+
var size2 = this.coordinatesSize(positionIndexes, featureIndex, props.data);
|
|
116743
|
+
positionIndexes = this.isPointAdded ? this.nextPositionIndexes(positionIndexes, size2) : positionIndexes;
|
|
116744
|
+
var p1 = this.getPointForPositionIndexes(this.prevPositionIndexes(positionIndexes, size2), featureIndex, props.data);
|
|
116071
116745
|
var p2 = this.getPointForPositionIndexes(positionIndexes, featureIndex, props.data);
|
|
116072
116746
|
if (p1 && p2) {
|
|
116073
116747
|
var _generatePointsParall3 = (0, _utils.generatePointsParallelToLinePoints)(p1, p2, event.mapCoords), _generatePointsParall4 = _slicedToArray(_generatePointsParall3, 2), p3 = _generatePointsParall4[0], p4 = _generatePointsParall4[1];
|
|
116074
|
-
var updatedData = new _immutableFeatureCollection.ImmutableFeatureCollection(props.data).replacePosition(featureIndex, this.prevPositionIndexes(positionIndexes,
|
|
116748
|
+
var updatedData = new _immutableFeatureCollection.ImmutableFeatureCollection(props.data).replacePosition(featureIndex, this.prevPositionIndexes(positionIndexes, size2), p4).replacePosition(featureIndex, positionIndexes, p3).getObject();
|
|
116075
116749
|
props.onEdit({
|
|
116076
116750
|
updatedData,
|
|
116077
116751
|
editType: "extruded",
|
|
@@ -116089,23 +116763,23 @@ function requireExtrudeMode() {
|
|
|
116089
116763
|
key: "coordinatesSize",
|
|
116090
116764
|
value: function coordinatesSize(positionIndexes, featureIndex, _ref) {
|
|
116091
116765
|
var features = _ref.features;
|
|
116092
|
-
var
|
|
116766
|
+
var size2 = 0;
|
|
116093
116767
|
if (Array.isArray(positionIndexes)) {
|
|
116094
116768
|
var feature2 = features[featureIndex];
|
|
116095
116769
|
var coordinates2 = feature2.geometry.coordinates;
|
|
116096
116770
|
if (positionIndexes.length === 3) {
|
|
116097
116771
|
var _positionIndexes = _slicedToArray(positionIndexes, 2), a2 = _positionIndexes[0], b = _positionIndexes[1];
|
|
116098
116772
|
if (coordinates2.length && coordinates2[a2].length) {
|
|
116099
|
-
|
|
116773
|
+
size2 = coordinates2[a2][b].length;
|
|
116100
116774
|
}
|
|
116101
116775
|
} else {
|
|
116102
116776
|
var _positionIndexes2 = _slicedToArray(positionIndexes, 1), _b2 = _positionIndexes2[0];
|
|
116103
116777
|
if (coordinates2.length && coordinates2[_b2].length) {
|
|
116104
|
-
|
|
116778
|
+
size2 = coordinates2[_b2].length;
|
|
116105
116779
|
}
|
|
116106
116780
|
}
|
|
116107
116781
|
}
|
|
116108
|
-
return
|
|
116782
|
+
return size2;
|
|
116109
116783
|
}
|
|
116110
116784
|
}, {
|
|
116111
116785
|
key: "getBearing",
|
|
@@ -116118,15 +116792,15 @@ function requireExtrudeMode() {
|
|
|
116118
116792
|
}
|
|
116119
116793
|
}, {
|
|
116120
116794
|
key: "isOrthogonal",
|
|
116121
|
-
value: function isOrthogonal(positionIndexes, featureIndex,
|
|
116795
|
+
value: function isOrthogonal(positionIndexes, featureIndex, size2, features) {
|
|
116122
116796
|
if (!Array.isArray(positionIndexes)) {
|
|
116123
116797
|
return false;
|
|
116124
116798
|
}
|
|
116125
|
-
if (positionIndexes[positionIndexes.length - 1] ===
|
|
116799
|
+
if (positionIndexes[positionIndexes.length - 1] === size2 - 1) {
|
|
116126
116800
|
positionIndexes[positionIndexes.length - 1] = 0;
|
|
116127
116801
|
}
|
|
116128
|
-
var prevPoint = this.getPointForPositionIndexes(this.prevPositionIndexes(positionIndexes,
|
|
116129
|
-
var nextPoint = this.getPointForPositionIndexes(this.nextPositionIndexes(positionIndexes,
|
|
116802
|
+
var prevPoint = this.getPointForPositionIndexes(this.prevPositionIndexes(positionIndexes, size2), featureIndex, features);
|
|
116803
|
+
var nextPoint = this.getPointForPositionIndexes(this.nextPositionIndexes(positionIndexes, size2), featureIndex, features);
|
|
116130
116804
|
var currentPoint = this.getPointForPositionIndexes(positionIndexes, featureIndex, features);
|
|
116131
116805
|
var prevAngle = this.getBearing(currentPoint, prevPoint);
|
|
116132
116806
|
var nextAngle = this.getBearing(currentPoint, nextPoint);
|
|
@@ -116134,25 +116808,25 @@ function requireExtrudeMode() {
|
|
|
116134
116808
|
}
|
|
116135
116809
|
}, {
|
|
116136
116810
|
key: "nextPositionIndexes",
|
|
116137
|
-
value: function nextPositionIndexes(positionIndexes,
|
|
116811
|
+
value: function nextPositionIndexes(positionIndexes, size2) {
|
|
116138
116812
|
if (!Array.isArray(positionIndexes)) {
|
|
116139
116813
|
return [];
|
|
116140
116814
|
}
|
|
116141
116815
|
var next2 = _toConsumableArray(positionIndexes);
|
|
116142
116816
|
if (next2.length) {
|
|
116143
|
-
next2[next2.length - 1] = next2[next2.length - 1] ===
|
|
116817
|
+
next2[next2.length - 1] = next2[next2.length - 1] === size2 - 1 ? 0 : next2[next2.length - 1] + 1;
|
|
116144
116818
|
}
|
|
116145
116819
|
return next2;
|
|
116146
116820
|
}
|
|
116147
116821
|
}, {
|
|
116148
116822
|
key: "prevPositionIndexes",
|
|
116149
|
-
value: function prevPositionIndexes(positionIndexes,
|
|
116823
|
+
value: function prevPositionIndexes(positionIndexes, size2) {
|
|
116150
116824
|
if (!Array.isArray(positionIndexes)) {
|
|
116151
116825
|
return [];
|
|
116152
116826
|
}
|
|
116153
116827
|
var prev2 = _toConsumableArray(positionIndexes);
|
|
116154
116828
|
if (prev2.length) {
|
|
116155
|
-
prev2[prev2.length - 1] = prev2[prev2.length - 1] === 0 ?
|
|
116829
|
+
prev2[prev2.length - 1] = prev2[prev2.length - 1] === 0 ? size2 - 2 : prev2[prev2.length - 1] - 1;
|
|
116156
116830
|
}
|
|
116157
116831
|
return prev2;
|
|
116158
116832
|
}
|
|
@@ -128079,22 +128753,22 @@ function addDecoder(cases, importFn) {
|
|
|
128079
128753
|
}
|
|
128080
128754
|
cases.forEach((c) => registry$1.set(c, importFn));
|
|
128081
128755
|
}
|
|
128082
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
128083
|
-
addDecoder(5, () => import("./lzw-
|
|
128756
|
+
addDecoder([void 0, 1], () => import("./raw-DhefG3KB.js").then((m) => m.default));
|
|
128757
|
+
addDecoder(5, () => import("./lzw-qRrO_FZw.js").then((m) => m.default));
|
|
128084
128758
|
addDecoder(6, () => {
|
|
128085
128759
|
throw new Error("old style JPEG compression is not supported.");
|
|
128086
128760
|
});
|
|
128087
|
-
addDecoder(7, () => import("./jpeg-
|
|
128088
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
128089
|
-
addDecoder(32773, () => import("./packbits-
|
|
128761
|
+
addDecoder(7, () => import("./jpeg-C62PTFeB.js").then((m) => m.default));
|
|
128762
|
+
addDecoder([8, 32946], () => import("./deflate-Cyfyz4ow.js").then((m) => m.default));
|
|
128763
|
+
addDecoder(32773, () => import("./packbits-CdzxG41_.js").then((m) => m.default));
|
|
128090
128764
|
addDecoder(
|
|
128091
128765
|
34887,
|
|
128092
|
-
() => import("./lerc-
|
|
128766
|
+
() => import("./lerc-B1_R8fp1.js").then(async (m) => {
|
|
128093
128767
|
await m.zstd.init();
|
|
128094
128768
|
return m;
|
|
128095
128769
|
}).then((m) => m.default)
|
|
128096
128770
|
);
|
|
128097
|
-
addDecoder(50001, () => import("./webimage-
|
|
128771
|
+
addDecoder(50001, () => import("./webimage-BVdRA3Av.js").then((m) => m.default));
|
|
128098
128772
|
function decodeRowAcc(row, stride) {
|
|
128099
128773
|
let length2 = row.length - stride;
|
|
128100
128774
|
let offset2 = 0;
|
|
@@ -131116,8 +131790,8 @@ class ZodSet extends ZodType {
|
|
|
131116
131790
|
maxSize: { value: maxSize, message: errorUtil.toString(message) }
|
|
131117
131791
|
});
|
|
131118
131792
|
}
|
|
131119
|
-
size(
|
|
131120
|
-
return this.min(
|
|
131793
|
+
size(size2, message) {
|
|
131794
|
+
return this.min(size2, message).max(size2, message);
|
|
131121
131795
|
}
|
|
131122
131796
|
nonempty(message) {
|
|
131123
131797
|
return this.min(1, message);
|
|
@@ -132910,10 +133584,10 @@ const putShortMSB = (s2, b) => {
|
|
|
132910
133584
|
s2.pending_buf[s2.pending++] = b >>> 8 & 255;
|
|
132911
133585
|
s2.pending_buf[s2.pending++] = b & 255;
|
|
132912
133586
|
};
|
|
132913
|
-
const read_buf = (strm, buf, start,
|
|
133587
|
+
const read_buf = (strm, buf, start, size2) => {
|
|
132914
133588
|
let len2 = strm.avail_in;
|
|
132915
|
-
if (len2 >
|
|
132916
|
-
len2 =
|
|
133589
|
+
if (len2 > size2) {
|
|
133590
|
+
len2 = size2;
|
|
132917
133591
|
}
|
|
132918
133592
|
if (len2 === 0) {
|
|
132919
133593
|
return 0;
|
|
@@ -139494,9 +140168,9 @@ const SI_PREFIXES = [
|
|
|
139494
140168
|
{ symbol: "z", exponent: -21 },
|
|
139495
140169
|
{ symbol: "y", exponent: -24 }
|
|
139496
140170
|
];
|
|
139497
|
-
function sizeToMeters(
|
|
140171
|
+
function sizeToMeters(size2, unit) {
|
|
139498
140172
|
if (!unit || unit === "m") {
|
|
139499
|
-
return
|
|
140173
|
+
return size2;
|
|
139500
140174
|
}
|
|
139501
140175
|
if (unit.length > 1) {
|
|
139502
140176
|
let unitPrefix = unit.substring(0, unit.length - 1);
|
|
@@ -139505,7 +140179,7 @@ function sizeToMeters(size, unit) {
|
|
|
139505
140179
|
}
|
|
139506
140180
|
const unitObj = SI_PREFIXES.find((p) => p.symbol === unitPrefix);
|
|
139507
140181
|
if (unitObj) {
|
|
139508
|
-
return
|
|
140182
|
+
return size2 * 10 ** unitObj.exponent;
|
|
139509
140183
|
}
|
|
139510
140184
|
}
|
|
139511
140185
|
throw new Error("Received unknown unit");
|
|
@@ -140409,7 +141083,7 @@ const defaultProps$2$1 = {
|
|
|
140409
141083
|
};
|
|
140410
141084
|
const ScaleBarLayer = class extends CompositeLayer {
|
|
140411
141085
|
renderLayers() {
|
|
140412
|
-
const { id, unit, size, position: position2, viewState, length: length2, snap } = this.props;
|
|
141086
|
+
const { id, unit, size: size2, position: position2, viewState, length: length2, snap } = this.props;
|
|
140413
141087
|
const boundingBox = makeBoundingBox(viewState);
|
|
140414
141088
|
const { zoom } = viewState;
|
|
140415
141089
|
const viewLength = boundingBox[2][0] - boundingBox[0][0];
|
|
@@ -140419,10 +141093,10 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
140419
141093
|
(boundingBox[2][1] - boundingBox[0][1]) * 7e-3
|
|
140420
141094
|
);
|
|
140421
141095
|
let adjustedBarLength = barLength;
|
|
140422
|
-
let displayNumber = (barLength *
|
|
141096
|
+
let displayNumber = (barLength * size2).toPrecision(5);
|
|
140423
141097
|
let displayUnit = unit;
|
|
140424
141098
|
if (snap) {
|
|
140425
|
-
const meterSize = sizeToMeters(
|
|
141099
|
+
const meterSize = sizeToMeters(size2, unit);
|
|
140426
141100
|
const numUnits = barLength * meterSize;
|
|
140427
141101
|
const [snappedOrigUnits, snappedNewUnits, snappedUnitPrefix] = snapValue(numUnits);
|
|
140428
141102
|
adjustedBarLength = snappedOrigUnits / meterSize;
|