feat: 氧化铝数字孪生系统监控大屏完成

This commit is contained in:
2026-04-08 21:44:08 +08:00
commit a48babc68d
67606 changed files with 3337335 additions and 0 deletions

1282
node_modules/@mui/utils/CHANGELOG.md generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
declare const ClassNameGenerator: {
configure(generator: (componentName: string) => string): void;
generate(componentName: string): string;
reset(): void;
};
export default ClassNameGenerator;

View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
const defaultGenerator = componentName => componentName;
const createClassNameGenerator = () => {
let generate = defaultGenerator;
return {
configure(generator) {
generate = generator;
},
generate(componentName) {
return generate(componentName);
},
reset() {
generate = defaultGenerator;
}
};
};
const ClassNameGenerator = createClassNameGenerator();
var _default = exports.default = ClassNameGenerator;

View File

@@ -0,0 +1 @@
export { default } from "./ClassNameGenerator.js";

13
node_modules/@mui/utils/ClassNameGenerator/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _ClassNameGenerator.default;
}
});
var _ClassNameGenerator = _interopRequireDefault(require("./ClassNameGenerator"));

View File

@@ -0,0 +1,3 @@
export default function HTMLElementType(props: {
[key: string]: unknown;
}, propName: string, componentName: string, location: string, propFullName: string): Error | null;

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = HTMLElementType;
function HTMLElementType(props, propName, componentName, location, propFullName) {
if (process.env.NODE_ENV === 'production') {
return null;
}
const propValue = props[propName];
const safePropName = propFullName || propName;
if (propValue == null) {
return null;
}
if (propValue && propValue.nodeType !== 1) {
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an HTMLElement.`);
}
return null;
}

1
node_modules/@mui/utils/HTMLElementType/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./HTMLElementType.js";

13
node_modules/@mui/utils/HTMLElementType/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _HTMLElementType.default;
}
});
var _HTMLElementType = _interopRequireDefault(require("./HTMLElementType"));

21
node_modules/@mui/utils/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 Call-Em-All
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

3
node_modules/@mui/utils/README.md generated vendored Normal file
View File

@@ -0,0 +1,3 @@
# @mui/utils
Shared utilities used by MUI packages.

View File

@@ -0,0 +1,20 @@
import * as React from 'react';
import { Simplify } from '@mui/types';
/**
* Type of the ownerState based on the type of an element it applies to.
* This resolves to the provided OwnerState for React components and `undefined` for host components.
* Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
*/
type OwnerStateWhenApplicable<ElementType extends React.ElementType, OwnerState> = ElementType extends React.ComponentType<any> ? OwnerState : ElementType extends keyof React.JSX.IntrinsicElements ? undefined : OwnerState | undefined;
export type AppendOwnerStateReturnType<ElementType extends React.ElementType, OtherProps, OwnerState> = Simplify<OtherProps & {
ownerState: OwnerStateWhenApplicable<ElementType, OwnerState>;
}>;
/**
* Appends the ownerState object to the props, merging with the existing one if necessary.
*
* @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.
* @param otherProps Props of the element.
* @param ownerState
*/
declare function appendOwnerState<ElementType extends React.ElementType, OtherProps extends Record<string, any>, OwnerState>(elementType: ElementType | undefined, otherProps: OtherProps, ownerState: OwnerState): AppendOwnerStateReturnType<ElementType, OtherProps, OwnerState>;
export default appendOwnerState;

View File

@@ -0,0 +1,34 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _isHostComponent = _interopRequireDefault(require("../isHostComponent"));
/**
* Type of the ownerState based on the type of an element it applies to.
* This resolves to the provided OwnerState for React components and `undefined` for host components.
* Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
*/
/**
* Appends the ownerState object to the props, merging with the existing one if necessary.
*
* @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.
* @param otherProps Props of the element.
* @param ownerState
*/
function appendOwnerState(elementType, otherProps, ownerState) {
if (elementType === undefined || (0, _isHostComponent.default)(elementType)) {
return otherProps;
}
return {
...otherProps,
ownerState: {
...otherProps.ownerState,
...ownerState
}
};
}
var _default = exports.default = appendOwnerState;

2
node_modules/@mui/utils/appendOwnerState/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { default } from "./appendOwnerState.js";
export type { AppendOwnerStateReturnType } from "./appendOwnerState.js";

13
node_modules/@mui/utils/appendOwnerState/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _appendOwnerState.default;
}
});
var _appendOwnerState = _interopRequireDefault(require("./appendOwnerState"));

1
node_modules/@mui/utils/capitalize/capitalize.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export default function capitalize(string: string): string;

18
node_modules/@mui/utils/capitalize/capitalize.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = capitalize;
var _formatMuiErrorMessage = _interopRequireDefault(require("@mui/utils/formatMuiErrorMessage"));
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
//
// A strict capitalization should uppercase the first letter of each word in the sentence.
// We only handle the first word.
function capitalize(string) {
if (typeof string !== 'string') {
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' : (0, _formatMuiErrorMessage.default)(7));
}
return string.charAt(0).toUpperCase() + string.slice(1);
}

1
node_modules/@mui/utils/capitalize/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./capitalize.js";

13
node_modules/@mui/utils/capitalize/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _capitalize.default;
}
});
var _capitalize = _interopRequireDefault(require("./capitalize"));

View File

@@ -0,0 +1,2 @@
import PropTypes from 'prop-types';
export default function chainPropTypes<A, B>(propType1: PropTypes.Validator<A>, propType2: PropTypes.Validator<B>): PropTypes.Validator<A & B>;

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = chainPropTypes;
function chainPropTypes(propType1, propType2) {
if (process.env.NODE_ENV === 'production') {
return () => null;
}
return function validate(...args) {
return propType1(...args) || propType2(...args);
};
}

1
node_modules/@mui/utils/chainPropTypes/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./chainPropTypes.js";

13
node_modules/@mui/utils/chainPropTypes/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _chainPropTypes.default;
}
});
var _chainPropTypes = _interopRequireDefault(require("./chainPropTypes"));

2
node_modules/@mui/utils/clamp/clamp.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
declare function clamp(val: number, min?: number, max?: number): number;
export default clamp;

10
node_modules/@mui/utils/clamp/clamp.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
return Math.max(min, Math.min(val, max));
}
var _default = exports.default = clamp;

1
node_modules/@mui/utils/clamp/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./clamp.js";

13
node_modules/@mui/utils/clamp/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _clamp.default;
}
});
var _clamp = _interopRequireDefault(require("./clamp"));

View File

@@ -0,0 +1,29 @@
/**
* Compose classes from multiple sources.
*
* @example
* ```tsx
* const slots = {
* root: ['root', 'primary'],
* label: ['label'],
* };
*
* const getUtilityClass = (slot) => `MuiButton-${slot}`;
*
* const classes = {
* root: 'my-root-class',
* };
*
* const output = composeClasses(slots, getUtilityClass, classes);
* // {
* // root: 'MuiButton-root MuiButton-primary my-root-class',
* // label: 'MuiButton-label',
* // }
* ```
*
* @param slots a list of classes for each possible slot
* @param getUtilityClass a function to resolve the class based on the slot name
* @param classes the input classes from props
* @returns the resolved classes for all slots
*/
export default function composeClasses<ClassKey extends string>(slots: Record<ClassKey, ReadonlyArray<string | false | undefined | null>>, getUtilityClass: (slot: string) => string, classes?: Record<string, string> | undefined): Record<ClassKey, string>;

View File

@@ -0,0 +1,59 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = composeClasses;
/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0
---
These rules are preventing the performance optimizations below.
*/
/**
* Compose classes from multiple sources.
*
* @example
* ```tsx
* const slots = {
* root: ['root', 'primary'],
* label: ['label'],
* };
*
* const getUtilityClass = (slot) => `MuiButton-${slot}`;
*
* const classes = {
* root: 'my-root-class',
* };
*
* const output = composeClasses(slots, getUtilityClass, classes);
* // {
* // root: 'MuiButton-root MuiButton-primary my-root-class',
* // label: 'MuiButton-label',
* // }
* ```
*
* @param slots a list of classes for each possible slot
* @param getUtilityClass a function to resolve the class based on the slot name
* @param classes the input classes from props
* @returns the resolved classes for all slots
*/
function composeClasses(slots, getUtilityClass, classes = undefined) {
const output = {};
for (const slotName in slots) {
const slot = slots[slotName];
let buffer = '';
let start = true;
for (let i = 0; i < slot.length; i += 1) {
const value = slot[i];
if (value) {
buffer += (start === true ? '' : ' ') + getUtilityClass(value);
start = false;
if (classes && classes[value]) {
buffer += ' ' + classes[value];
}
}
}
output[slotName] = buffer;
}
return output;
}

1
node_modules/@mui/utils/composeClasses/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./composeClasses.js";

13
node_modules/@mui/utils/composeClasses/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _composeClasses.default;
}
});
var _composeClasses = _interopRequireDefault(require("./composeClasses"));

View File

@@ -0,0 +1,7 @@
/**
* Safe chained function.
*
* Will only create a new function if needed,
* otherwise will pass back existing functions or null.
*/
export default function createChainedFunction<Args extends any[], This>(...funcs: Array<(this: This, ...args: Args) => any>): (this: This, ...args: Args) => void;

View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createChainedFunction;
/**
* Safe chained function.
*
* Will only create a new function if needed,
* otherwise will pass back existing functions or null.
*/
function createChainedFunction(...funcs) {
return funcs.reduce((acc, func) => {
if (func == null) {
return acc;
}
return function chainedFunction(...args) {
acc.apply(this, args);
func.apply(this, args);
};
}, () => {});
}

View File

@@ -0,0 +1 @@
export { default } from "./createChainedFunction.js";

13
node_modules/@mui/utils/createChainedFunction/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _createChainedFunction.default;
}
});
var _createChainedFunction = _interopRequireDefault(require("./createChainedFunction"));

4
node_modules/@mui/utils/debounce/debounce.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export interface Cancelable {
clear(): void;
}
export default function debounce<T extends (...args: any[]) => any>(func: T, wait?: number): T & Cancelable;

23
node_modules/@mui/utils/debounce/debounce.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = debounce;
// Corresponds to 10 frames at 60 Hz.
// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
function debounce(func, wait = 166) {
let timeout;
function debounced(...args) {
const later = () => {
// @ts-ignore
func.apply(this, args);
};
clearTimeout(timeout);
timeout = setTimeout(later, wait);
}
debounced.clear = () => {
clearTimeout(timeout);
};
return debounced;
}

2
node_modules/@mui/utils/debounce/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { default } from "./debounce.js";
export * from "./debounce.js";

25
node_modules/@mui/utils/debounce/index.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {};
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _debounce.default;
}
});
var _debounce = _interopRequireWildcard(require("./debounce"));
Object.keys(_debounce).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _debounce[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _debounce[key];
}
});
});

23
node_modules/@mui/utils/deepmerge/deepmerge.d.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
export declare function isPlainObject(item: unknown): item is Record<keyof any, unknown>;
export interface DeepmergeOptions {
clone?: boolean | undefined;
}
/**
* Merge objects deeply.
* It will shallow copy React elements.
*
* If `options.clone` is set to `false` the source object will be merged directly into the target object.
*
* @example
* ```ts
* deepmerge({ a: { b: 1 }, d: 2 }, { a: { c: 2 }, d: 4 });
* // => { a: { b: 1, c: 2 }, d: 4 }
* ````
*
* @param target The target object.
* @param source The source object.
* @param options The merge options.
* @param options.clone Set to `false` to merge the source object directly into the target object.
* @returns The merged object.
*/
export default function deepmerge<T>(target: T, source: unknown, options?: DeepmergeOptions): T;

71
node_modules/@mui/utils/deepmerge/deepmerge.js generated vendored Normal file
View File

@@ -0,0 +1,71 @@
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = deepmerge;
exports.isPlainObject = isPlainObject;
var React = _interopRequireWildcard(require("react"));
var _reactIs = require("react-is");
// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
function isPlainObject(item) {
if (typeof item !== 'object' || item === null) {
return false;
}
const prototype = Object.getPrototypeOf(item);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
}
function deepClone(source) {
if (/*#__PURE__*/React.isValidElement(source) || (0, _reactIs.isValidElementType)(source) || !isPlainObject(source)) {
return source;
}
const output = {};
Object.keys(source).forEach(key => {
output[key] = deepClone(source[key]);
});
return output;
}
/**
* Merge objects deeply.
* It will shallow copy React elements.
*
* If `options.clone` is set to `false` the source object will be merged directly into the target object.
*
* @example
* ```ts
* deepmerge({ a: { b: 1 }, d: 2 }, { a: { c: 2 }, d: 4 });
* // => { a: { b: 1, c: 2 }, d: 4 }
* ````
*
* @param target The target object.
* @param source The source object.
* @param options The merge options.
* @param options.clone Set to `false` to merge the source object directly into the target object.
* @returns The merged object.
*/
function deepmerge(target, source, options = {
clone: true
}) {
const output = options.clone ? {
...target
} : target;
if (isPlainObject(target) && isPlainObject(source)) {
Object.keys(source).forEach(key => {
if (/*#__PURE__*/React.isValidElement(source[key]) || (0, _reactIs.isValidElementType)(source[key])) {
output[key] = source[key];
} else if (isPlainObject(source[key]) &&
// Avoid prototype pollution
Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
output[key] = deepmerge(target[key], source[key], options);
} else if (options.clone) {
output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
} else {
output[key] = source[key];
}
});
}
return output;
}

2
node_modules/@mui/utils/deepmerge/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { default } from "./deepmerge.js";
export * from "./deepmerge.js";

25
node_modules/@mui/utils/deepmerge/index.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {};
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _deepmerge.default;
}
});
var _deepmerge = _interopRequireWildcard(require("./deepmerge"));
Object.keys(_deepmerge).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _deepmerge[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _deepmerge[key];
}
});
});

View File

@@ -0,0 +1,2 @@
import { Validator } from 'prop-types';
export default function deprecatedPropType<T>(validator: Validator<T>, reason: string): Validator<T>;

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = deprecatedPropType;
function deprecatedPropType(validator, reason) {
if (process.env.NODE_ENV === 'production') {
return () => null;
}
return (props, propName, componentName, location, propFullName) => {
const componentNameSafe = componentName || '<<anonymous>>';
const propFullNameSafe = propFullName || propName;
if (typeof props[propName] !== 'undefined') {
return new Error(`The ${location} \`${propFullNameSafe}\` of ` + `\`${componentNameSafe}\` is deprecated. ${reason}`);
}
return null;
};
}

View File

@@ -0,0 +1 @@
export { default } from "./deprecatedPropType.js";

13
node_modules/@mui/utils/deprecatedPropType/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _deprecatedPropType.default;
}
});
var _deprecatedPropType = _interopRequireDefault(require("./deprecatedPropType"));

View File

@@ -0,0 +1,3 @@
import PropTypes from 'prop-types';
declare const elementAcceptingRef: PropTypes.Requireable<unknown>;
export default elementAcceptingRef;

View File

@@ -0,0 +1,49 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _chainPropTypes = _interopRequireDefault(require("../chainPropTypes"));
function isClassComponent(elementType) {
// elementType.prototype?.isReactComponent
const {
prototype = {}
} = elementType;
return Boolean(prototype.isReactComponent);
}
function acceptingRef(props, propName, componentName, location, propFullName) {
const element = props[propName];
const safePropName = propFullName || propName;
if (element == null ||
// When server-side rendering React doesn't warn either.
// This is not an accurate check for SSR.
// This is only in place for Emotion compat.
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
typeof window === 'undefined') {
return null;
}
let warningHint;
const elementType = element.type;
/**
* Blacklisting instead of whitelisting
*
* Blacklisting will miss some components, such as React.Fragment. Those will at least
* trigger a warning in React.
* We can't whitelist because there is no safe way to detect React.forwardRef
* or class components. "Safe" means there's no public API.
*
*/
if (typeof elementType === 'function' && !isClassComponent(elementType)) {
warningHint = 'Did you accidentally use a plain function component for an element instead?';
}
if (warningHint !== undefined) {
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');
}
return null;
}
const elementAcceptingRef = (0, _chainPropTypes.default)(_propTypes.default.element, acceptingRef);
elementAcceptingRef.isRequired = (0, _chainPropTypes.default)(_propTypes.default.element.isRequired, acceptingRef);
var _default = exports.default = elementAcceptingRef;

View File

@@ -0,0 +1 @@
export { default } from "./elementAcceptingRef.js";

13
node_modules/@mui/utils/elementAcceptingRef/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _elementAcceptingRef.default;
}
});
var _elementAcceptingRef = _interopRequireDefault(require("./elementAcceptingRef"));

View File

@@ -0,0 +1,3 @@
import PropTypes from 'prop-types';
declare const _default: PropTypes.Validator<PropTypes.ReactComponentLike | null | undefined>;
export default _default;

View File

@@ -0,0 +1,52 @@
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var React = _interopRequireWildcard(require("react"));
var _chainPropTypes = _interopRequireDefault(require("../chainPropTypes"));
function isClassComponent(elementType) {
// elementType.prototype?.isReactComponent
const {
prototype = {}
} = elementType;
return Boolean(prototype.isReactComponent);
}
function elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {
const propValue = props[propName];
const safePropName = propFullName || propName;
if (propValue == null ||
// When server-side rendering React doesn't warn either.
// This is not an accurate check for SSR.
// This is only in place for emotion compat.
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
typeof window === 'undefined') {
return null;
}
let warningHint;
/**
* Blacklisting instead of whitelisting
*
* Blacklisting will miss some components, such as React.Fragment. Those will at least
* trigger a warning in React.
* We can't whitelist because there is no safe way to detect React.forwardRef
* or class components. "Safe" means there's no public API.
*
*/
if (typeof propValue === 'function' && !isClassComponent(propValue)) {
warningHint = 'Did you accidentally provide a plain function component instead?';
}
if (propValue === React.Fragment) {
warningHint = 'Did you accidentally provide a React.Fragment instead?';
}
if (warningHint !== undefined) {
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');
}
return null;
}
var _default = exports.default = (0, _chainPropTypes.default)(_propTypes.default.elementType, elementTypeAcceptingRef);

View File

@@ -0,0 +1 @@
export { default } from "./elementTypeAcceptingRef.js";

View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _elementTypeAcceptingRef.default;
}
});
var _elementTypeAcceptingRef = _interopRequireDefault(require("./elementTypeAcceptingRef"));

View File

@@ -0,0 +1,6 @@
declare const ClassNameGenerator: {
configure(generator: (componentName: string) => string): void;
generate(componentName: string): string;
reset(): void;
};
export default ClassNameGenerator;

View File

@@ -0,0 +1,17 @@
const defaultGenerator = componentName => componentName;
const createClassNameGenerator = () => {
let generate = defaultGenerator;
return {
configure(generator) {
generate = generator;
},
generate(componentName) {
return generate(componentName);
},
reset() {
generate = defaultGenerator;
}
};
};
const ClassNameGenerator = createClassNameGenerator();
export default ClassNameGenerator;

View File

@@ -0,0 +1 @@
export { default } from "./ClassNameGenerator.js";

View File

@@ -0,0 +1 @@
export { default } from "./ClassNameGenerator.js";

View File

@@ -0,0 +1,3 @@
export default function HTMLElementType(props: {
[key: string]: unknown;
}, propName: string, componentName: string, location: string, propFullName: string): Error | null;

View File

@@ -0,0 +1,14 @@
export default function HTMLElementType(props, propName, componentName, location, propFullName) {
if (process.env.NODE_ENV === 'production') {
return null;
}
const propValue = props[propName];
const safePropName = propFullName || propName;
if (propValue == null) {
return null;
}
if (propValue && propValue.nodeType !== 1) {
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an HTMLElement.`);
}
return null;
}

View File

@@ -0,0 +1 @@
export { default } from "./HTMLElementType.js";

1
node_modules/@mui/utils/esm/HTMLElementType/index.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./HTMLElementType.js";

View File

@@ -0,0 +1,20 @@
import * as React from 'react';
import { Simplify } from '@mui/types';
/**
* Type of the ownerState based on the type of an element it applies to.
* This resolves to the provided OwnerState for React components and `undefined` for host components.
* Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
*/
type OwnerStateWhenApplicable<ElementType extends React.ElementType, OwnerState> = ElementType extends React.ComponentType<any> ? OwnerState : ElementType extends keyof React.JSX.IntrinsicElements ? undefined : OwnerState | undefined;
export type AppendOwnerStateReturnType<ElementType extends React.ElementType, OtherProps, OwnerState> = Simplify<OtherProps & {
ownerState: OwnerStateWhenApplicable<ElementType, OwnerState>;
}>;
/**
* Appends the ownerState object to the props, merging with the existing one if necessary.
*
* @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.
* @param otherProps Props of the element.
* @param ownerState
*/
declare function appendOwnerState<ElementType extends React.ElementType, OtherProps extends Record<string, any>, OwnerState>(elementType: ElementType | undefined, otherProps: OtherProps, ownerState: OwnerState): AppendOwnerStateReturnType<ElementType, OtherProps, OwnerState>;
export default appendOwnerState;

View File

@@ -0,0 +1,28 @@
import isHostComponent from "../isHostComponent/index.js";
/**
* Type of the ownerState based on the type of an element it applies to.
* This resolves to the provided OwnerState for React components and `undefined` for host components.
* Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
*/
/**
* Appends the ownerState object to the props, merging with the existing one if necessary.
*
* @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.
* @param otherProps Props of the element.
* @param ownerState
*/
function appendOwnerState(elementType, otherProps, ownerState) {
if (elementType === undefined || isHostComponent(elementType)) {
return otherProps;
}
return {
...otherProps,
ownerState: {
...otherProps.ownerState,
...ownerState
}
};
}
export default appendOwnerState;

View File

@@ -0,0 +1,2 @@
export { default } from "./appendOwnerState.js";
export type { AppendOwnerStateReturnType } from "./appendOwnerState.js";

View File

@@ -0,0 +1 @@
export { default } from "./appendOwnerState.js";

View File

@@ -0,0 +1 @@
export default function capitalize(string: string): string;

11
node_modules/@mui/utils/esm/capitalize/capitalize.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
import _formatErrorMessage from "@mui/utils/formatMuiErrorMessage";
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
//
// A strict capitalization should uppercase the first letter of each word in the sentence.
// We only handle the first word.
export default function capitalize(string) {
if (typeof string !== 'string') {
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' : _formatErrorMessage(7));
}
return string.charAt(0).toUpperCase() + string.slice(1);
}

1
node_modules/@mui/utils/esm/capitalize/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./capitalize.js";

1
node_modules/@mui/utils/esm/capitalize/index.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./capitalize.js";

View File

@@ -0,0 +1,2 @@
import PropTypes from 'prop-types';
export default function chainPropTypes<A, B>(propType1: PropTypes.Validator<A>, propType2: PropTypes.Validator<B>): PropTypes.Validator<A & B>;

View File

@@ -0,0 +1,8 @@
export default function chainPropTypes(propType1, propType2) {
if (process.env.NODE_ENV === 'production') {
return () => null;
}
return function validate(...args) {
return propType1(...args) || propType2(...args);
};
}

View File

@@ -0,0 +1 @@
export { default } from "./chainPropTypes.js";

1
node_modules/@mui/utils/esm/chainPropTypes/index.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./chainPropTypes.js";

2
node_modules/@mui/utils/esm/clamp/clamp.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
declare function clamp(val: number, min?: number, max?: number): number;
export default clamp;

4
node_modules/@mui/utils/esm/clamp/clamp.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
return Math.max(min, Math.min(val, max));
}
export default clamp;

1
node_modules/@mui/utils/esm/clamp/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./clamp.js";

1
node_modules/@mui/utils/esm/clamp/index.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./clamp.js";

View File

@@ -0,0 +1,29 @@
/**
* Compose classes from multiple sources.
*
* @example
* ```tsx
* const slots = {
* root: ['root', 'primary'],
* label: ['label'],
* };
*
* const getUtilityClass = (slot) => `MuiButton-${slot}`;
*
* const classes = {
* root: 'my-root-class',
* };
*
* const output = composeClasses(slots, getUtilityClass, classes);
* // {
* // root: 'MuiButton-root MuiButton-primary my-root-class',
* // label: 'MuiButton-label',
* // }
* ```
*
* @param slots a list of classes for each possible slot
* @param getUtilityClass a function to resolve the class based on the slot name
* @param classes the input classes from props
* @returns the resolved classes for all slots
*/
export default function composeClasses<ClassKey extends string>(slots: Record<ClassKey, ReadonlyArray<string | false | undefined | null>>, getUtilityClass: (slot: string) => string, classes?: Record<string, string> | undefined): Record<ClassKey, string>;

View File

@@ -0,0 +1,53 @@
/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0
---
These rules are preventing the performance optimizations below.
*/
/**
* Compose classes from multiple sources.
*
* @example
* ```tsx
* const slots = {
* root: ['root', 'primary'],
* label: ['label'],
* };
*
* const getUtilityClass = (slot) => `MuiButton-${slot}`;
*
* const classes = {
* root: 'my-root-class',
* };
*
* const output = composeClasses(slots, getUtilityClass, classes);
* // {
* // root: 'MuiButton-root MuiButton-primary my-root-class',
* // label: 'MuiButton-label',
* // }
* ```
*
* @param slots a list of classes for each possible slot
* @param getUtilityClass a function to resolve the class based on the slot name
* @param classes the input classes from props
* @returns the resolved classes for all slots
*/
export default function composeClasses(slots, getUtilityClass, classes = undefined) {
const output = {};
for (const slotName in slots) {
const slot = slots[slotName];
let buffer = '';
let start = true;
for (let i = 0; i < slot.length; i += 1) {
const value = slot[i];
if (value) {
buffer += (start === true ? '' : ' ') + getUtilityClass(value);
start = false;
if (classes && classes[value]) {
buffer += ' ' + classes[value];
}
}
}
output[slotName] = buffer;
}
return output;
}

View File

@@ -0,0 +1 @@
export { default } from "./composeClasses.js";

1
node_modules/@mui/utils/esm/composeClasses/index.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from "./composeClasses.js";

View File

@@ -0,0 +1,7 @@
/**
* Safe chained function.
*
* Will only create a new function if needed,
* otherwise will pass back existing functions or null.
*/
export default function createChainedFunction<Args extends any[], This>(...funcs: Array<(this: This, ...args: Args) => any>): (this: This, ...args: Args) => void;

View File

@@ -0,0 +1,17 @@
/**
* Safe chained function.
*
* Will only create a new function if needed,
* otherwise will pass back existing functions or null.
*/
export default function createChainedFunction(...funcs) {
return funcs.reduce((acc, func) => {
if (func == null) {
return acc;
}
return function chainedFunction(...args) {
acc.apply(this, args);
func.apply(this, args);
};
}, () => {});
}

View File

@@ -0,0 +1 @@
export { default } from "./createChainedFunction.js";

View File

@@ -0,0 +1 @@
export { default } from "./createChainedFunction.js";

4
node_modules/@mui/utils/esm/debounce/debounce.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export interface Cancelable {
clear(): void;
}
export default function debounce<T extends (...args: any[]) => any>(func: T, wait?: number): T & Cancelable;

17
node_modules/@mui/utils/esm/debounce/debounce.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
// Corresponds to 10 frames at 60 Hz.
// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
export default function debounce(func, wait = 166) {
let timeout;
function debounced(...args) {
const later = () => {
// @ts-ignore
func.apply(this, args);
};
clearTimeout(timeout);
timeout = setTimeout(later, wait);
}
debounced.clear = () => {
clearTimeout(timeout);
};
return debounced;
}

2
node_modules/@mui/utils/esm/debounce/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { default } from "./debounce.js";
export * from "./debounce.js";

2
node_modules/@mui/utils/esm/debounce/index.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { default } from "./debounce.js";
export * from "./debounce.js";

23
node_modules/@mui/utils/esm/deepmerge/deepmerge.d.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
export declare function isPlainObject(item: unknown): item is Record<keyof any, unknown>;
export interface DeepmergeOptions {
clone?: boolean | undefined;
}
/**
* Merge objects deeply.
* It will shallow copy React elements.
*
* If `options.clone` is set to `false` the source object will be merged directly into the target object.
*
* @example
* ```ts
* deepmerge({ a: { b: 1 }, d: 2 }, { a: { c: 2 }, d: 4 });
* // => { a: { b: 1, c: 2 }, d: 4 }
* ````
*
* @param target The target object.
* @param source The source object.
* @param options The merge options.
* @param options.clone Set to `false` to merge the source object directly into the target object.
* @returns The merged object.
*/
export default function deepmerge<T>(target: T, source: unknown, options?: DeepmergeOptions): T;

64
node_modules/@mui/utils/esm/deepmerge/deepmerge.js generated vendored Normal file
View File

@@ -0,0 +1,64 @@
import * as React from 'react';
import { isValidElementType } from 'react-is';
// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
export function isPlainObject(item) {
if (typeof item !== 'object' || item === null) {
return false;
}
const prototype = Object.getPrototypeOf(item);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
}
function deepClone(source) {
if (/*#__PURE__*/React.isValidElement(source) || isValidElementType(source) || !isPlainObject(source)) {
return source;
}
const output = {};
Object.keys(source).forEach(key => {
output[key] = deepClone(source[key]);
});
return output;
}
/**
* Merge objects deeply.
* It will shallow copy React elements.
*
* If `options.clone` is set to `false` the source object will be merged directly into the target object.
*
* @example
* ```ts
* deepmerge({ a: { b: 1 }, d: 2 }, { a: { c: 2 }, d: 4 });
* // => { a: { b: 1, c: 2 }, d: 4 }
* ````
*
* @param target The target object.
* @param source The source object.
* @param options The merge options.
* @param options.clone Set to `false` to merge the source object directly into the target object.
* @returns The merged object.
*/
export default function deepmerge(target, source, options = {
clone: true
}) {
const output = options.clone ? {
...target
} : target;
if (isPlainObject(target) && isPlainObject(source)) {
Object.keys(source).forEach(key => {
if (/*#__PURE__*/React.isValidElement(source[key]) || isValidElementType(source[key])) {
output[key] = source[key];
} else if (isPlainObject(source[key]) &&
// Avoid prototype pollution
Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
output[key] = deepmerge(target[key], source[key], options);
} else if (options.clone) {
output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
} else {
output[key] = source[key];
}
});
}
return output;
}

2
node_modules/@mui/utils/esm/deepmerge/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { default } from "./deepmerge.js";
export * from "./deepmerge.js";

2
node_modules/@mui/utils/esm/deepmerge/index.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { default } from "./deepmerge.js";
export * from "./deepmerge.js";

View File

@@ -0,0 +1,2 @@
import { Validator } from 'prop-types';
export default function deprecatedPropType<T>(validator: Validator<T>, reason: string): Validator<T>;

View File

@@ -0,0 +1,13 @@
export default function deprecatedPropType(validator, reason) {
if (process.env.NODE_ENV === 'production') {
return () => null;
}
return (props, propName, componentName, location, propFullName) => {
const componentNameSafe = componentName || '<<anonymous>>';
const propFullNameSafe = propFullName || propName;
if (typeof props[propName] !== 'undefined') {
return new Error(`The ${location} \`${propFullNameSafe}\` of ` + `\`${componentNameSafe}\` is deprecated. ${reason}`);
}
return null;
};
}

View File

@@ -0,0 +1 @@
export { default } from "./deprecatedPropType.js";

View File

@@ -0,0 +1 @@
export { default } from "./deprecatedPropType.js";

View File

@@ -0,0 +1,3 @@
import PropTypes from 'prop-types';
declare const elementAcceptingRef: PropTypes.Requireable<unknown>;
export default elementAcceptingRef;

Some files were not shown because too many files have changed in this diff Show More