@opengeoweb/theme 8.4.1 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -1,10 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { SvgIcon, createTheme as createTheme$1, ThemeProvider as ThemeProvider$1, CssBaseline, StyledEngineProvider } from '@mui/material';
3
- import { jsx, jsxs } from 'react/jsx-runtime';
4
- import { styled, useTheme, useThemeProps } from '@mui/material/styles';
5
- import IconButton from '@mui/material/IconButton';
6
- import Typography from '@mui/material/Typography';
7
- import { createSvgIcon } from '@mui/material/utils';
8
3
 
9
4
  /******************************************************************************
10
5
  Copyright (c) Microsoft Corporation.
@@ -122,6 +117,11 @@ var Location = function Location(props) {
122
117
  d: "M11.58 11.758a2.177 2.177 0 1 1 0-4.354 2.177 2.177 0 0 1 0 4.354m0-8.758A6.58 6.58 0 0 0 5 9.58C5 15.15 11.58 21 11.58 21s6.582-5.85 6.582-11.42A6.58 6.58 0 0 0 11.58 3"
123
118
  }));
124
119
  };
120
+ var MyLocation = function MyLocation(props) {
121
+ return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("path", {
122
+ d: "M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"
123
+ }));
124
+ };
125
125
  var ThumbsUp = function ThumbsUp(props) {
126
126
  return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({
127
127
  viewBox: "0 0 58 69"
@@ -157,9 +157,9 @@ var ListItem = function ListItem(props) {
157
157
  d: "M3 3h4v4H3V3zm0 7h4v4H3v-4zm0 7h4v4H3v-4zm7-14h11v4H10V3zm0 7h11v4H10v-4zm0 7h11v4H10v-4z"
158
158
  }));
159
159
  };
160
- var TimeSeriesManager = function TimeSeriesManager(props) {
160
+ var TimeSeriesSelect = function TimeSeriesSelect(props) {
161
161
  return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("path", {
162
- d: "M4,3 L4,19 L22,19 L22,21 L2,21 L2,3 L4,3 Z M21.205593,3.52920887 L22.0247451,4.1027853 L15.9984337,15.1373978 L10.8379459,10.3032107 L5.81915204,17.4707911 L5,16.8972147 L10.7357644,8.70569425 L15.8962522,13.5398814 L21.205593,3.52920887 Z"
162
+ d: "M7 11a6 6 0 1 1 0 12 6 6 0 0 1 0-12zm15 8v2h-9.255c.421-.604.75-1.277.965-2H22zM7 13c-.3 0-.545.244-.545.545v2.91h-2.91a.545.545 0 1 0 0 1.09h2.91v2.91a.544.544 0 1 0 1.09 0v-2.91h2.91a.545.545 0 1 0 0-1.09h-2.91v-2.91C7.545 13.244 7.3 13 7 13zM4 3v7.674a7.018 7.018 0 0 0-2 1.428V3h2zm14.363-.995 1.751.967-4.632 8.348-4.764-2.643-1.03 1.858a6.957 6.957 0 0 0-2.003-.502l2.258-4.07 4.76 2.644 3.66-6.602z"
163
163
  }));
164
164
  };
165
165
  var Close = function Close(props) {
@@ -181,14 +181,14 @@ var KeyCommand = function KeyCommand(props) {
181
181
  d: "M9.04.63c1.04 0 2.15.81 2.15 2.17 0 1-.79 2.13-2.15 2.13H7.9v2.02H9c1.4 0 2.19 1.15 2.19 2.05 0 1.6-1.19 2.26-2.19 2.26S6.89 10.5 6.89 9V7.97H4.86V9c0 1.5-1.11 2.26-2.15 2.26C1.7 11.26.56 10.5.56 9c0-1 .99-2.05 2.15-2.05h1.14V4.93H2.71C1.55 4.93.525 4 .561 2.72.598 1.442 1.7.63 2.71.63c1.04 0 2.15.75 2.15 2.17v1.12h2.03V2.8C6.89 1.38 8 .63 9.04.63zM3.85 7.96H2.71A1.14 1.14 0 1 0 3.85 9.1V7.96zm5.19 0H7.9V9.1a1.14 1.14 0 1 0 1.14-1.14zM6.89 4.93H4.86v2.02h2.03V4.93zM2.71 1.64a1.14 1.14 0 0 0 0 2.28h1.14V2.78c0-.63-.51-1.14-1.14-1.14zm6.33 0c-.63 0-1.14.51-1.14 1.14v1.14h1.14a1.14 1.14 0 0 0 0-2.28z"
182
182
  }));
183
183
  };
184
- var ArrowLeft$1 = function ArrowLeft(props) {
184
+ var ArrowLeft = function ArrowLeft(props) {
185
185
  return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({
186
186
  viewBox: "0 0 12 6"
187
187
  }, props), /*#__PURE__*/React.createElement("path", {
188
188
  d: "M3.355 0 .395 2.96l2.96 2.96V3.47h8.01V2.45h-8.01z"
189
189
  }));
190
190
  };
191
- var ArrowRight$1 = function ArrowRight(props) {
191
+ var ArrowRight = function ArrowRight(props) {
192
192
  return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({
193
193
  viewBox: "0 0 12 6"
194
194
  }, props), /*#__PURE__*/React.createElement("path", {
@@ -325,7 +325,7 @@ var MapAdd = function MapAdd(props) {
325
325
  id: "Combined-Shape"
326
326
  }));
327
327
  };
328
- var Clock$1 = function Clock(props) {
328
+ var Clock = function Clock(props) {
329
329
  return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("path", {
330
330
  d: "M8.485 3.717a9 9 0 1 1 7.033 16.569 9 9 0 0 1-7.033-16.57zm.74 1.744a7.105 7.105 0 1 0 5.552 13.08 7.105 7.105 0 0 0-5.552-13.08zm1.825 1.522h1.894v4.734l3.049 1.76-.947 1.641-2.606-1.504h-1.39V6.983z"
331
331
  }));
@@ -524,12 +524,12 @@ var PresetWorkspace = function PresetWorkspace(props) {
524
524
  return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({
525
525
  viewBox: "0 0 24 24"
526
526
  }, props), /*#__PURE__*/React.createElement("path", {
527
- d: "M22,2 L22,22 L2,22 L2,2 L22,2 Z M9,12 L4.5,12 L4.5,19.5 L9,19.5 L9,12 Z M19.5,12 L11,12 L11,19.5 L19.5,19.5 L19.5,12 Z M19.5,6 L4.5,6 L4.5,10 L19.5,10 L19.5,6 Z"
527
+ d: "M10 10h12v12H10V10zm4.32 6.25h-2.318V20h2.318v-3.75zm5.682 0h-4.29V20h4.29v-3.75zM18 6l-.001 3h-2L16 8H8v8h1v2H6V6h12zm2 6h-7.998v2.75H20V12zM14 2l-.001 3h-2L12 4H4v8h1v2H2V2h12z"
528
528
  }));
529
529
  };
530
530
  var Preset = function Preset(props) {
531
531
  return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("path", {
532
- d: "M22,2 L22,22 L2,22 L2,2 L22,2 Z M19.5,6 L4.5,6 L4.5,19.5 L19.5,19.5 L19.5,6 Z"
532
+ d: "M10 10h12v12H10V10zm10 2h-8v8h8v-8zm-2-6-.001 3h-2L16 8H8v8h1v2H6V6h12zm-4-4-.001 3h-2L12 4H4v8h1v2H2V2h12z"
533
533
  }));
534
534
  };
535
535
  var PresetTiles = function PresetTiles(props) {
@@ -795,6 +795,44 @@ var TemperatureLow = function TemperatureLow(props) {
795
795
  id: "Combined-Shape"
796
796
  }));
797
797
  };
798
+ var LockUnlocked = function LockUnlocked(props) {
799
+ return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("g", {
800
+ id: "Icons-/-lock-locked",
801
+ transform: "translate(1.5, 2)"
802
+ }, /*#__PURE__*/React.createElement("path", {
803
+ d: "M16,0 C20,0 21,3 21,4 L21,8 L19,8 L19,5 C19,4 19,2 16,2 C13.1666667,2 13.0092593,3.78395062 13.0005144,4.82458848 L13,8.999 L14,9 C15.0682439,9.01270555 15.9194271,9.80098299 15.9946003,10.8486278 L16,11 L16,18 C16,19.1313993 15.1313993,20 14,20 L2,20 C0.868600683,20 0,19.1313993 0,18 L0,11 C0,9.8778157 0.880887372,9.01331058 2,9 L11,8.999 L11,4 C11,3.02325581 11.9540292,0.138453218 15.7257726,0.0048046084 Z",
804
+ id: "Icons-/-Security-(Lock)"
805
+ })));
806
+ };
807
+ var LockLocked = function LockLocked(props) {
808
+ return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("g", {
809
+ id: "Icons-/-Lock-unloked",
810
+ transform: "translate(4, 3)"
811
+ }, /*#__PURE__*/React.createElement("path", {
812
+ d: "M5,5 C5,4 5,2 8,2 C11,2 11,4 11,5 L11,7 L5,7 L5,5 Z M13,7 L13,4 C13,2 11,0 7.97167235,0 C4.94334471,0 3,2 3,4 L3,7 L2,7 C0.880887372,7.01331058 0,7.8778157 0,9 L0,16 C0,17.1313993 0.868600683,18 2,18 L14,18 C15.1313993,18 16,17.1313993 16,16 L16,9 C16,7.8778157 15.1191126,7.01331058 14,7 L13,7 Z",
813
+ id: "Icons-/-Security-(Lock)"
814
+ })));
815
+ };
816
+ var ArrowDropDownDown = function ArrowDropDownDown(props) {
817
+ return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("path", {
818
+ d: "m7 9 5.33 5.653L17.665 9z"
819
+ }));
820
+ };
821
+ var ArrowDropDownUp = function ArrowDropDownUp(props) {
822
+ return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("path", {
823
+ d: "M7 14.653 12.33 9l5.335 5.653z"
824
+ }));
825
+ };
826
+ var WorldMapProjection = function WorldMapProjection(props) {
827
+ return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("path", {
828
+ d: "M8.2,1.3 L15.8,4.2 L23,1.633405 L23,20 L15.8,22.799793 L8.2,19.899793 L1,22.199793 L1,3.65 L8.2,1.3 Z M8.2,2.85567808 L2,4.87070155 L2,20.2350052 L8.2,18.23 L15.8,21.1309136 L22,18.8020706 L22,3.54797847 L15.8,5.76104474 L8.2,2.85567808 Z M20.8258474,16.0044129 C20.8258474,16.0044129 20.9285364,16.0468655 21.1339144,16.1317707 L21.187425,16.6596289 C21.187425,16.6596289 21.1419984,16.8929477 21.0511452,17.3595853 C21.0511452,17.3595853 20.8645947,17.4797235 20.4914938,17.72 L20.4577489,17.719495 C20.4015072,17.7186533 20.2749636,17.7167596 20.0781179,17.7138137 C20.0781179,17.7138137 20.0294176,17.6221094 19.9320172,17.4387006 C19.9320172,17.4387006 19.9732353,17.2768353 20.0556715,16.9531048 C20.0556715,16.9531048 20.0609868,16.9437253 20.0716173,16.9249661 L20.1553326,16.777238 C20.2217734,16.6599935 20.3214346,16.4841267 20.4543161,16.2496377 C20.4543161,16.2496377 20.5781599,16.1678961 20.8258474,16.0044129 Z M18.0727922,14.4098204 C18.8695393,14.4294807 19.2679129,14.4393109 19.2679129,14.4393109 C19.8263186,15.3447651 20.1055214,15.7974922 20.1055214,15.7974922 C20.0263785,16.3322798 19.9868071,16.5996736 19.9868071,16.5996736 C19.7524158,17.0370275 19.6352202,17.2557044 19.6352202,17.2557044 C19.3594656,17.3743208 19.2208101,17.433629 19.2192537,17.433629 C18.6856184,17.2215363 18.4188007,17.1154899 18.4188007,17.1154899 C18.1361692,17.4197044 17.9948535,17.5718116 17.9948535,17.5718116 C17.4234853,17.3877573 17.1378012,17.2957301 17.1378012,17.2957301 C16.9157115,16.8990906 16.8046666,16.7007708 16.8046666,16.7007708 L16.6870827,15.3635926 C17.610889,14.7277445 18.0727922,14.4098204 18.0727922,14.4098204 Z M9.73432249,5.19220536 C10.0236351,5.44042301 10.1578737,5.68978755 10.0813263,6.22384512 C10.0302947,6.5798835 9.82106833,6.88874461 9.45364708,7.15042845 C9.46480684,7.58053754 9.4178639,7.88131827 9.31281825,8.05277064 C9.20777261,8.22422302 9.00375635,8.2807038 8.70076948,8.22221298 L8.66356735,9.10063795 L7.73625437,9.87358989 L7.51350573,10.8045771 C7.83532976,10.8626165 7.99761819,10.9853296 8.00037101,11.1727166 C8.00312382,11.3601036 7.98927705,11.4866625 7.9588307,11.5523932 C8.00443425,11.6588365 8.07896092,11.7294914 8.18241072,11.764358 C8.28586051,11.7992246 8.44373247,11.8068969 8.65602659,11.7873751 C9.07752919,11.9473622 9.31508841,12.2824085 9.36870427,12.7925137 C9.44912805,13.5576716 9.0968778,14.6036703 9.0968778,14.6036703 C9.0968778,14.6036703 8.80764729,14.9199505 8.55768824,15.3656958 C8.30772919,15.811441 8.35210207,16.1925436 8.20459739,16.471182 C7.79322352,17.2482731 7.25488917,17.4813278 6.83103526,17.2264684 C6.47015795,16.8972624 6.92162107,15.8533653 6.78107356,15.0272537 C6.68737522,14.4765126 6.46759331,14.0854242 6.12172782,13.8539885 C5.9050305,13.4104151 5.9113649,12.9417009 6.14073102,12.447846 C6.24292539,12.2278083 6.35157036,12.060581 6.46666592,11.9461639 L5.4702197,11.457223 C5.09522325,10.9354206 4.90772503,10.6745194 4.90772503,10.6745194 C4.90772503,10.6745194 4.40466825,10.6065503 4.2255869,10.2094237 C4.08488012,9.89739561 4.14103378,9.3112745 4.17156067,9.07440755 L4.18433293,8.98359082 C4.1855923,8.97547637 4.18630557,8.97118499 4.18630557,8.97118499 L3.7772718,8.4552774 C3.35826546,8.75596398 3.01916955,8.75596398 2.75998405,8.4552774 C2.50156994,8.15522087 2.43579607,7.79896504 2.56266244,7.3865099 L3.44057043,6.42512423 L4.90772503,6.4735384 C4.80362522,6.22954672 4.85088759,6.02531727 5.04951213,5.86085005 C5.24813667,5.69638283 5.4898893,5.66129898 5.77477003,5.7555985 C5.83096332,5.53326201 5.89628094,5.37497486 5.97072291,5.28073704 C6.04516488,5.18649922 6.15609794,5.12166651 6.30352209,5.08623893 L7.48912376,5.20188225 C7.89075809,4.83343434 8.21962924,4.62048705 8.4757372,4.56304038 C9.07549046,4.46499287 9.44500984,4.94398771 9.73432249,5.19220536 Z M14.6974209,6.18616965 C14.6974209,6.18616965 14.8089236,6.33046155 15.0319291,6.61904537 L15.0118095,6.85473901 C15.0118095,6.85230919 15.2548443,6.69393913 15.7409139,6.37962885 C15.7409139,6.37962885 15.8590759,6.44139598 16.0953999,6.56493024 L16.28693,6.35470093 C16.28693,6.35470093 16.4469387,6.34010837 16.7669559,6.31092324 L17.6022321,6.90677592 L19.1748498,7.00496294 C19.1748498,7.00496294 19.3898754,7.06233786 19.8199268,7.17708771 C19.8199268,7.17708771 20.3730406,7.46764964 20.3272757,7.81999536 C20.3115077,7.94139396 20.2598841,8.46246989 20.1146474,8.77063098 C20.078222,8.84791781 19.9638922,8.94012644 19.7716579,9.04725687 L19.5086624,9.57352648 C19.5086624,9.57352648 19.2252071,9.70930971 18.9008098,9.60111589 C18.8348453,9.57911525 18.7612272,9.47778799 18.6799555,9.2971341 L18.4830372,9.23145743 C18.4830372,9.23145743 18.4736551,9.55491944 18.3963021,9.77226071 C18.341923,9.92505124 18.2075827,10.2034778 17.9932811,10.6075404 L17.9578535,10.6157688 C17.9106167,10.6267398 17.8161431,10.648682 17.6744327,10.6815953 L17.6555381,10.7387842 C17.6079517,10.8828155 17.4819877,11.2640749 17.4120077,11.4758857 L17.3634105,11.6229765 C17.3634105,11.6229765 17.23463,11.8148944 16.977069,12.1987301 C16.977069,12.1987301 17.0521621,12.407751 16.9967294,12.8262167 C16.9816803,12.9398232 16.9731986,13.2069581 16.7702954,13.293331 C16.6350266,13.3509129 16.407233,13.3243064 16.0869147,13.2135115 C16.0869147,13.2135115 15.9715811,13.0147346 15.7409139,12.6171809 C15.7409139,12.6171809 15.3543775,13.3461554 15.0107931,13.3025625 C14.7817367,13.2735006 14.5645596,12.9866069 14.3592616,12.4418814 C14.3592616,12.4418814 14.215554,12.5670627 13.9281388,12.8174255 C13.8400076,12.9065408 13.6699983,13.1461054 13.4181111,13.5361194 C13.4181111,13.5361194 13.4485589,14.987989 13.4485589,14.987989 C13.4485589,14.987989 13.2039428,15.2587646 12.7147106,15.8003159 L12.1849738,15.8003159 L11.3809895,14.9582608 C11.3809895,14.9582608 11.3171783,14.6787418 11.1895558,14.119704 C11.1895558,14.119704 11.1835631,13.8807572 11.1715777,13.4028637 C11.1715777,13.4028637 10.9150854,13.3163321 10.4021008,13.1432687 L10.3827367,13.1193602 C10.3310989,13.0556042 10.1761856,12.8643362 9.91799674,12.5455561 L9.91722754,12.4740653 C9.916031,12.3628573 9.91343851,12.1219067 9.90945005,11.7512134 C9.90945005,11.7512134 10.0232813,11.5595095 10.2509437,11.1761019 C10.2509437,11.1761019 10.2553435,10.9377801 10.2641432,10.4611365 L10.4866593,10.0807864 L10.1671692,9.4634836 C10.1671692,9.4634836 10.1715371,9.31617048 10.3213699,8.93602977 C10.3570932,8.84539622 10.4437762,8.6708834 10.5814188,8.41249133 L11.1658316,8.41714479 L11.890895,7.33482938 L12.6366861,7.36826103 L12.8270697,7.52783186 L13.3616803,7.564867 C13.3616803,7.564867 13.372058,7.32103791 13.4825235,7.07633232 C13.5412137,6.94632075 13.6792802,6.71408626 13.8967232,6.37962885 L13.9287511,6.37189048 C14.0141588,6.35125484 14.2703821,6.28934789 14.6974209,6.18616965 Z M14.206957,13.8098913 L14.3012564,13.8182759 C14.5095517,13.8626581 14.6644114,14.0350369 14.7658354,14.3354123 C14.7658354,14.3354123 14.6885672,14.6973047 14.431281,15.1230966 C14.3633525,15.2355137 14.2241586,15.3878642 14.0136993,15.5801481 C14.0136993,15.5801481 13.9044997,15.4950109 13.6861007,15.3247367 C13.6861007,15.3247367 13.6723926,14.9153534 13.6449763,14.0965869 C13.6449763,14.0965869 13.8650321,13.8758609 14.1130252,13.8216561 L14.206957,13.8098913 Z M18.604122,12.5829913 C18.8908472,12.7001885 19.0932925,12.9196987 19.2114579,13.241522 C19.2114579,13.241522 19.1345367,13.3917968 18.9806942,13.6923465 C18.9806942,13.6923465 18.3704419,13.8241023 17.9696044,13.7236167 C17.7023793,13.6566264 17.5273931,13.4789829 17.4446458,13.1906862 C17.4446458,13.1906862 17.4669472,12.992583 17.51155,12.5963767 L17.5553318,12.5849616 C17.7098908,12.5468056 18.2402016,12.4342409 18.604122,12.5829913 Z M19.0740638,9.91679794 C19.224262,10.0545572 19.351907,10.4048655 19.4569991,10.9677229 L18.8349414,11.9975084 C18.5507772,12.258063 18.3228866,12.3336921 18.1512695,12.2243956 C17.8938438,12.0604508 17.731246,11.474499 17.731246,11.474499 C17.7599779,11.2242085 17.8142946,11.0637898 17.8941958,10.9932428 C17.9842365,10.9137435 18.1028921,10.8627834 18.2129492,10.8302469 C18.604716,10.0254087 18.8917542,9.72092572 19.0740638,9.91679794 Z M12.078718,5.79636044 C12.266165,5.74115749 12.4002456,5.73970115 12.4809597,5.79199142 C12.6621681,5.90938644 12.8013395,6.25195185 12.8013395,6.25195185 C12.8013395,6.25195185 12.6998206,6.53262243 12.4967829,7.09396358 C12.1993224,7.01131264 11.9793285,6.97299598 11.8368012,6.97901361 C11.6942739,6.98503123 11.5557311,7.03848562 11.4211729,7.13937677 L11.0883652,6.97901361 C11.0252286,6.25610228 11.1087911,5.81388165 11.3390528,5.65235173 C11.4904173,5.5461686 11.7899516,5.64820811 12.078718,5.79636044 Z"
829
+ }));
830
+ };
831
+ var FunnelCloud = function FunnelCloud(props) {
832
+ return /*#__PURE__*/React.createElement(SvgIcon, Object.assign({}, props), /*#__PURE__*/React.createElement("path", {
833
+ d: "M6.93585736,6.09885776 C9.08619487,4.25081115 12.8090686,4.59742387 13.182613,4.62970415 C13.3046504,4.64023315 13.3401826,4.69984851 13.325074,4.73929657 C11.4037444,4.98732485 9.14004574,5.68594506 8.2103924,6.77206297 C8.95152778,7.02452386 9.9358849,7.20455475 11.1679048,7.22815469 C15.7664717,7.31617651 17.7212663,4.98237126 18.0133265,4.59546176 C18.0669967,4.59509203 18.080513,4.69419326 18.0534762,4.80230675 C17.9306994,5.29338032 17.4498986,6.81128836 15.0779772,7.6709864 C11.9816214,8.7932668 6.91369855,8.65501581 5.36280438,6.36457444 C4.407589,4.95389337 5.57009053,3.05291602 7.44226226,2.16900461 C4.48423311,2.67510281 1.47275643,5.64146778 3.86846266,8.38434134 C6.62791962,11.5436401 11.6995356,10.8177226 13.7093659,10.5083059 C13.7485913,10.5428424 13.7446755,10.6328557 13.5781315,10.7373139 C12.68567,11.2970865 8.83033916,12.2794521 5.55779689,10.8585025 C5.99294402,11.5348127 6.63538152,12.9707953 6.84935648,14.3016559 C6.33483004,14.5316597 6.15247571,14.8875451 6.15668563,15.1306619 C6.17851672,16.3824079 9.33227365,16.8192188 10.6202494,16.7983499 C10.6339547,16.8382055 10.6051071,16.8868128 10.4756037,16.9299918 C10.2602632,17.001758 8.83583895,17.2871336 7.00829575,16.9532977 C7.15707575,17.9940224 7.66066984,19.0301296 9.42472388,20.1699219 C10.6493575,20.9611394 12.3794674,21.6920399 13.9216813,21.9921502 C14.2764197,22.0611854 14.5333132,21.6602764 14.3287959,21.3623425 C14.0430926,20.9462156 13.6654894,20.3706705 13.3347963,19.7510935 C12.0262793,19.9830552 11.1244737,19.7700045 10.8004651,19.6734914 C10.7259638,19.6512906 10.6358412,19.6049731 10.6627645,19.5528574 C11.5577763,19.5453577 13.3473882,19.3749357 13.5367633,18.5160863 C13.588921,18.2796164 13.3671144,17.8586536 12.6007152,17.6756691 C12.4523428,16.028703 14.0037874,14.9315014 15.0427768,14.1338556 C12.4554435,14.5479153 10.2286846,13.8902978 9.91176818,13.8048263 C9.79327694,13.7728779 9.76516877,13.7098635 9.78644107,13.6759909 C11.4908798,13.7016622 13.6643046,13.7066115 15.4152835,13.2245881 C18.8475802,12.3867169 19.2328637,11.157949 17.9850713,10.6493341 C18.5212062,9.50278574 18.6471971,8.66539776 18.6471971,8.66539776 C18.6471971,8.66539776 20.7391377,7.03627131 20.643175,5.42905157 C20.4785847,2.67202729 14.1391981,1.18957167 9.81898183,2.45956067 C6.38265594,3.46971092 5.8651002,5.17488487 6.93585736,6.09885776 Z"
834
+ }));
835
+ };
798
836
 
799
837
  /* *
800
838
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -825,16 +863,17 @@ var index = /*#__PURE__*/Object.freeze({
825
863
  DrawFIRLand: DrawFIRLand,
826
864
  Polygons: Polygons,
827
865
  Location: Location,
866
+ MyLocation: MyLocation,
828
867
  ThumbsUp: ThumbsUp,
829
868
  Edit: Edit,
830
869
  Export: Export,
831
870
  ListItem: ListItem,
832
- TimeSeriesManager: TimeSeriesManager,
871
+ TimeSeriesSelect: TimeSeriesSelect,
833
872
  Close: Close,
834
873
  KeyOption: KeyOption,
835
874
  KeyCommand: KeyCommand,
836
- ArrowLeft: ArrowLeft$1,
837
- ArrowRight: ArrowRight$1,
875
+ ArrowLeft: ArrowLeft,
876
+ ArrowRight: ArrowRight,
838
877
  ArrowDown: ArrowDown,
839
878
  ArrowUp: ArrowUp,
840
879
  Exclamation: Exclamation,
@@ -845,7 +884,7 @@ var index = /*#__PURE__*/Object.freeze({
845
884
  Add: Add,
846
885
  LayersAdd: LayersAdd,
847
886
  MapAdd: MapAdd,
848
- Clock: Clock$1,
887
+ Clock: Clock,
849
888
  Animation: Animation,
850
889
  Success: Success,
851
890
  Cancel: Cancel,
@@ -870,3268 +909,132 @@ var index = /*#__PURE__*/Object.freeze({
870
909
  Copy: Copy,
871
910
  Filter: Filter,
872
911
  Clear: Clear,
873
- Search: Search,
874
- Resize: Resize,
875
- PresetWorkspace: PresetWorkspace,
876
- Preset: Preset,
877
- PresetTiles: PresetTiles,
878
- List: List,
879
- Home: Home,
880
- Minus: Minus,
881
- Equalizer: Equalizer,
882
- Link: Link,
883
- LinkOff: LinkOff,
884
- Cached: Cached,
885
- CalendarToday: CalendarToday,
886
- WebAssetOff: WebAssetOff,
887
- Notifications: Notifications,
888
- Update: Update,
889
- SubdirectoryArrowRight: SubdirectoryArrowRight,
890
- Speed: Speed,
891
- DimensionsElevation: DimensionsElevation,
892
- DimensionsTime: DimensionsTime,
893
- DimensionsRefTime: DimensionsRefTime,
894
- DimensionsOther: DimensionsOther,
895
- Picture: Picture,
896
- CollapseWindow: CollapseWindow,
897
- ExpandWindow: ExpandWindow,
898
- CollapseLarge: CollapseLarge,
899
- CollapseMedium: CollapseMedium,
900
- CollapseSmall: CollapseSmall,
901
- ExitDomain: ExitDomain,
902
- Menu: Menu,
903
- None: None,
904
- Both: Both,
905
- Share: Share,
906
- Snow: Snow,
907
- Wind: Wind,
908
- Rain: Rain,
909
- Lightning: Lightning,
910
- Fog: Fog,
911
- CoastalEvent: CoastalEvent,
912
- TemperatureHigh: TemperatureHigh,
913
- TemperatureLow: TemperatureLow
914
- });
915
-
916
- function _iterableToArrayLimit(r, l) {
917
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
918
- if (null != t) {
919
- var e,
920
- n,
921
- i,
922
- u,
923
- a = [],
924
- f = !0,
925
- o = !1;
926
- try {
927
- if (i = (t = t.call(r)).next, 0 === l) {
928
- if (Object(t) !== t) return;
929
- f = !1;
930
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
931
- } catch (r) {
932
- o = !0, n = r;
933
- } finally {
934
- try {
935
- if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
936
- } finally {
937
- if (o) throw n;
938
- }
939
- }
940
- return a;
941
- }
942
- }
943
- function _defineProperty(obj, key, value) {
944
- key = _toPropertyKey(key);
945
- if (key in obj) {
946
- Object.defineProperty(obj, key, {
947
- value: value,
948
- enumerable: true,
949
- configurable: true,
950
- writable: true
951
- });
952
- } else {
953
- obj[key] = value;
954
- }
955
- return obj;
956
- }
957
- function _slicedToArray(arr, i) {
958
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
959
- }
960
- function _arrayWithHoles(arr) {
961
- if (Array.isArray(arr)) return arr;
962
- }
963
- function _unsupportedIterableToArray(o, minLen) {
964
- if (!o) return;
965
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
966
- var n = Object.prototype.toString.call(o).slice(8, -1);
967
- if (n === "Object" && o.constructor) n = o.constructor.name;
968
- if (n === "Map" || n === "Set") return Array.from(o);
969
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
970
- }
971
- function _arrayLikeToArray(arr, len) {
972
- if (len == null || len > arr.length) len = arr.length;
973
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
974
- return arr2;
975
- }
976
- function _nonIterableRest() {
977
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
978
- }
979
- function _toPrimitive(input, hint) {
980
- if (typeof input !== "object" || input === null) return input;
981
- var prim = input[Symbol.toPrimitive];
982
- if (prim !== undefined) {
983
- var res = prim.call(input, hint || "default");
984
- if (typeof res !== "object") return res;
985
- throw new TypeError("@@toPrimitive must return a primitive value.");
986
- }
987
- return (hint === "string" ? String : Number)(input);
988
- }
989
- function _toPropertyKey(arg) {
990
- var key = _toPrimitive(arg, "string");
991
- return typeof key === "symbol" ? key : String(key);
992
- }
993
-
994
- function _extends() {
995
- _extends = Object.assign ? Object.assign.bind() : function (target) {
996
- for (var i = 1; i < arguments.length; i++) {
997
- var source = arguments[i];
998
- for (var key in source) {
999
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1000
- target[key] = source[key];
1001
- }
1002
- }
1003
- }
1004
- return target;
1005
- };
1006
- return _extends.apply(this, arguments);
1007
- }
1008
-
1009
- function _objectWithoutPropertiesLoose(source, excluded) {
1010
- if (source == null) return {};
1011
- var target = {};
1012
- var sourceKeys = Object.keys(source);
1013
- var key, i;
1014
- for (i = 0; i < sourceKeys.length; i++) {
1015
- key = sourceKeys[i];
1016
- if (excluded.indexOf(key) >= 0) continue;
1017
- target[key] = source[key];
1018
- }
1019
- return target;
1020
- }
1021
-
1022
- function r$1(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r$1(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r$1(e))&&(n&&(n+=" "),n+=t);return n}
1023
-
1024
- var propTypes = {exports: {}};
1025
-
1026
- var reactIs = {exports: {}};
1027
-
1028
- var reactIs_production_min = {};
1029
-
1030
- /** @license React v16.13.1
1031
- * react-is.production.min.js
1032
- *
1033
- * Copyright (c) Facebook, Inc. and its affiliates.
1034
- *
1035
- * This source code is licensed under the MIT license found in the
1036
- * LICENSE file in the root directory of this source tree.
1037
- */
1038
- var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
1039
- Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
1040
- function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
1041
- reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
1042
- reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
1043
- reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
1044
-
1045
- var reactIs_development = {};
1046
-
1047
- /** @license React v16.13.1
1048
- * react-is.development.js
1049
- *
1050
- * Copyright (c) Facebook, Inc. and its affiliates.
1051
- *
1052
- * This source code is licensed under the MIT license found in the
1053
- * LICENSE file in the root directory of this source tree.
1054
- */
1055
-
1056
-
1057
-
1058
- if (process.env.NODE_ENV !== "production") {
1059
- (function() {
1060
-
1061
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1062
- // nor polyfill, then a plain number is used for performance.
1063
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
1064
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
1065
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
1066
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
1067
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
1068
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
1069
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
1070
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
1071
- // (unstable) APIs that have been removed. Can we remove the symbols?
1072
-
1073
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
1074
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
1075
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
1076
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
1077
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
1078
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
1079
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
1080
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
1081
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
1082
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
1083
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
1084
-
1085
- function isValidElementType(type) {
1086
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1087
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
1088
- }
1089
-
1090
- function typeOf(object) {
1091
- if (typeof object === 'object' && object !== null) {
1092
- var $$typeof = object.$$typeof;
1093
-
1094
- switch ($$typeof) {
1095
- case REACT_ELEMENT_TYPE:
1096
- var type = object.type;
1097
-
1098
- switch (type) {
1099
- case REACT_ASYNC_MODE_TYPE:
1100
- case REACT_CONCURRENT_MODE_TYPE:
1101
- case REACT_FRAGMENT_TYPE:
1102
- case REACT_PROFILER_TYPE:
1103
- case REACT_STRICT_MODE_TYPE:
1104
- case REACT_SUSPENSE_TYPE:
1105
- return type;
1106
-
1107
- default:
1108
- var $$typeofType = type && type.$$typeof;
1109
-
1110
- switch ($$typeofType) {
1111
- case REACT_CONTEXT_TYPE:
1112
- case REACT_FORWARD_REF_TYPE:
1113
- case REACT_LAZY_TYPE:
1114
- case REACT_MEMO_TYPE:
1115
- case REACT_PROVIDER_TYPE:
1116
- return $$typeofType;
1117
-
1118
- default:
1119
- return $$typeof;
1120
- }
1121
-
1122
- }
1123
-
1124
- case REACT_PORTAL_TYPE:
1125
- return $$typeof;
1126
- }
1127
- }
1128
-
1129
- return undefined;
1130
- } // AsyncMode is deprecated along with isAsyncMode
1131
-
1132
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
1133
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
1134
- var ContextConsumer = REACT_CONTEXT_TYPE;
1135
- var ContextProvider = REACT_PROVIDER_TYPE;
1136
- var Element = REACT_ELEMENT_TYPE;
1137
- var ForwardRef = REACT_FORWARD_REF_TYPE;
1138
- var Fragment = REACT_FRAGMENT_TYPE;
1139
- var Lazy = REACT_LAZY_TYPE;
1140
- var Memo = REACT_MEMO_TYPE;
1141
- var Portal = REACT_PORTAL_TYPE;
1142
- var Profiler = REACT_PROFILER_TYPE;
1143
- var StrictMode = REACT_STRICT_MODE_TYPE;
1144
- var Suspense = REACT_SUSPENSE_TYPE;
1145
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
1146
-
1147
- function isAsyncMode(object) {
1148
- {
1149
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
1150
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
1151
-
1152
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
1153
- }
1154
- }
1155
-
1156
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
1157
- }
1158
- function isConcurrentMode(object) {
1159
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
1160
- }
1161
- function isContextConsumer(object) {
1162
- return typeOf(object) === REACT_CONTEXT_TYPE;
1163
- }
1164
- function isContextProvider(object) {
1165
- return typeOf(object) === REACT_PROVIDER_TYPE;
1166
- }
1167
- function isElement(object) {
1168
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1169
- }
1170
- function isForwardRef(object) {
1171
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
1172
- }
1173
- function isFragment(object) {
1174
- return typeOf(object) === REACT_FRAGMENT_TYPE;
1175
- }
1176
- function isLazy(object) {
1177
- return typeOf(object) === REACT_LAZY_TYPE;
1178
- }
1179
- function isMemo(object) {
1180
- return typeOf(object) === REACT_MEMO_TYPE;
1181
- }
1182
- function isPortal(object) {
1183
- return typeOf(object) === REACT_PORTAL_TYPE;
1184
- }
1185
- function isProfiler(object) {
1186
- return typeOf(object) === REACT_PROFILER_TYPE;
1187
- }
1188
- function isStrictMode(object) {
1189
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
1190
- }
1191
- function isSuspense(object) {
1192
- return typeOf(object) === REACT_SUSPENSE_TYPE;
1193
- }
1194
-
1195
- reactIs_development.AsyncMode = AsyncMode;
1196
- reactIs_development.ConcurrentMode = ConcurrentMode;
1197
- reactIs_development.ContextConsumer = ContextConsumer;
1198
- reactIs_development.ContextProvider = ContextProvider;
1199
- reactIs_development.Element = Element;
1200
- reactIs_development.ForwardRef = ForwardRef;
1201
- reactIs_development.Fragment = Fragment;
1202
- reactIs_development.Lazy = Lazy;
1203
- reactIs_development.Memo = Memo;
1204
- reactIs_development.Portal = Portal;
1205
- reactIs_development.Profiler = Profiler;
1206
- reactIs_development.StrictMode = StrictMode;
1207
- reactIs_development.Suspense = Suspense;
1208
- reactIs_development.isAsyncMode = isAsyncMode;
1209
- reactIs_development.isConcurrentMode = isConcurrentMode;
1210
- reactIs_development.isContextConsumer = isContextConsumer;
1211
- reactIs_development.isContextProvider = isContextProvider;
1212
- reactIs_development.isElement = isElement;
1213
- reactIs_development.isForwardRef = isForwardRef;
1214
- reactIs_development.isFragment = isFragment;
1215
- reactIs_development.isLazy = isLazy;
1216
- reactIs_development.isMemo = isMemo;
1217
- reactIs_development.isPortal = isPortal;
1218
- reactIs_development.isProfiler = isProfiler;
1219
- reactIs_development.isStrictMode = isStrictMode;
1220
- reactIs_development.isSuspense = isSuspense;
1221
- reactIs_development.isValidElementType = isValidElementType;
1222
- reactIs_development.typeOf = typeOf;
1223
- })();
1224
- }
1225
-
1226
- if (process.env.NODE_ENV === 'production') {
1227
- reactIs.exports = reactIs_production_min;
1228
- } else {
1229
- reactIs.exports = reactIs_development;
1230
- }
1231
-
1232
- /*
1233
- object-assign
1234
- (c) Sindre Sorhus
1235
- @license MIT
1236
- */
1237
- /* eslint-disable no-unused-vars */
1238
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1239
- var hasOwnProperty = Object.prototype.hasOwnProperty;
1240
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
1241
-
1242
- function toObject(val) {
1243
- if (val === null || val === undefined) {
1244
- throw new TypeError('Object.assign cannot be called with null or undefined');
1245
- }
1246
-
1247
- return Object(val);
1248
- }
1249
-
1250
- function shouldUseNative() {
1251
- try {
1252
- if (!Object.assign) {
1253
- return false;
1254
- }
1255
-
1256
- // Detect buggy property enumeration order in older V8 versions.
1257
-
1258
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
1259
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
1260
- test1[5] = 'de';
1261
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
1262
- return false;
1263
- }
1264
-
1265
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1266
- var test2 = {};
1267
- for (var i = 0; i < 10; i++) {
1268
- test2['_' + String.fromCharCode(i)] = i;
1269
- }
1270
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
1271
- return test2[n];
1272
- });
1273
- if (order2.join('') !== '0123456789') {
1274
- return false;
1275
- }
1276
-
1277
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1278
- var test3 = {};
1279
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
1280
- test3[letter] = letter;
1281
- });
1282
- if (Object.keys(Object.assign({}, test3)).join('') !==
1283
- 'abcdefghijklmnopqrst') {
1284
- return false;
1285
- }
1286
-
1287
- return true;
1288
- } catch (err) {
1289
- // We don't expect any of the above to throw, but better to be safe.
1290
- return false;
1291
- }
1292
- }
1293
-
1294
- var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
1295
- var from;
1296
- var to = toObject(target);
1297
- var symbols;
1298
-
1299
- for (var s = 1; s < arguments.length; s++) {
1300
- from = Object(arguments[s]);
1301
-
1302
- for (var key in from) {
1303
- if (hasOwnProperty.call(from, key)) {
1304
- to[key] = from[key];
1305
- }
1306
- }
1307
-
1308
- if (getOwnPropertySymbols) {
1309
- symbols = getOwnPropertySymbols(from);
1310
- for (var i = 0; i < symbols.length; i++) {
1311
- if (propIsEnumerable.call(from, symbols[i])) {
1312
- to[symbols[i]] = from[symbols[i]];
1313
- }
1314
- }
1315
- }
1316
- }
1317
-
1318
- return to;
1319
- };
1320
-
1321
- /**
1322
- * Copyright (c) 2013-present, Facebook, Inc.
1323
- *
1324
- * This source code is licensed under the MIT license found in the
1325
- * LICENSE file in the root directory of this source tree.
1326
- */
1327
-
1328
- var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1329
-
1330
- var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
1331
-
1332
- var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
1333
-
1334
- /**
1335
- * Copyright (c) 2013-present, Facebook, Inc.
1336
- *
1337
- * This source code is licensed under the MIT license found in the
1338
- * LICENSE file in the root directory of this source tree.
1339
- */
1340
-
1341
- var printWarning$1 = function() {};
1342
-
1343
- if (process.env.NODE_ENV !== 'production') {
1344
- var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
1345
- var loggedTypeFailures = {};
1346
- var has$1 = has$2;
1347
-
1348
- printWarning$1 = function(text) {
1349
- var message = 'Warning: ' + text;
1350
- if (typeof console !== 'undefined') {
1351
- console.error(message);
1352
- }
1353
- try {
1354
- // --- Welcome to debugging React ---
1355
- // This error was thrown as a convenience so that you can use this stack
1356
- // to find the callsite that caused this warning to fire.
1357
- throw new Error(message);
1358
- } catch (x) { /**/ }
1359
- };
1360
- }
1361
-
1362
- /**
1363
- * Assert that the values match with the type specs.
1364
- * Error messages are memorized and will only be shown once.
1365
- *
1366
- * @param {object} typeSpecs Map of name to a ReactPropType
1367
- * @param {object} values Runtime values that need to be type-checked
1368
- * @param {string} location e.g. "prop", "context", "child context"
1369
- * @param {string} componentName Name of the component for error messages.
1370
- * @param {?Function} getStack Returns the component stack.
1371
- * @private
1372
- */
1373
- function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
1374
- if (process.env.NODE_ENV !== 'production') {
1375
- for (var typeSpecName in typeSpecs) {
1376
- if (has$1(typeSpecs, typeSpecName)) {
1377
- var error;
1378
- // Prop type validation may throw. In case they do, we don't want to
1379
- // fail the render phase where it didn't fail before. So we log it.
1380
- // After these have been cleaned up, we'll let them throw.
1381
- try {
1382
- // This is intentionally an invariant that gets caught. It's the same
1383
- // behavior as without this statement except with a better message.
1384
- if (typeof typeSpecs[typeSpecName] !== 'function') {
1385
- var err = Error(
1386
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
1387
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
1388
- 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
1389
- );
1390
- err.name = 'Invariant Violation';
1391
- throw err;
1392
- }
1393
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
1394
- } catch (ex) {
1395
- error = ex;
1396
- }
1397
- if (error && !(error instanceof Error)) {
1398
- printWarning$1(
1399
- (componentName || 'React class') + ': type specification of ' +
1400
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
1401
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
1402
- 'You may have forgotten to pass an argument to the type checker ' +
1403
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
1404
- 'shape all require an argument).'
1405
- );
1406
- }
1407
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1408
- // Only monitor this failure once because there tends to be a lot of the
1409
- // same error.
1410
- loggedTypeFailures[error.message] = true;
1411
-
1412
- var stack = getStack ? getStack() : '';
1413
-
1414
- printWarning$1(
1415
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
1416
- );
1417
- }
1418
- }
1419
- }
1420
- }
1421
- }
1422
-
1423
- /**
1424
- * Resets warning cache when testing.
1425
- *
1426
- * @private
1427
- */
1428
- checkPropTypes$1.resetWarningCache = function() {
1429
- if (process.env.NODE_ENV !== 'production') {
1430
- loggedTypeFailures = {};
1431
- }
1432
- };
1433
-
1434
- var checkPropTypes_1 = checkPropTypes$1;
1435
-
1436
- /**
1437
- * Copyright (c) 2013-present, Facebook, Inc.
1438
- *
1439
- * This source code is licensed under the MIT license found in the
1440
- * LICENSE file in the root directory of this source tree.
1441
- */
1442
-
1443
- var ReactIs$1 = reactIs.exports;
1444
- var assign = objectAssign;
1445
-
1446
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
1447
- var has = has$2;
1448
- var checkPropTypes = checkPropTypes_1;
1449
-
1450
- var printWarning = function() {};
1451
-
1452
- if (process.env.NODE_ENV !== 'production') {
1453
- printWarning = function(text) {
1454
- var message = 'Warning: ' + text;
1455
- if (typeof console !== 'undefined') {
1456
- console.error(message);
1457
- }
1458
- try {
1459
- // --- Welcome to debugging React ---
1460
- // This error was thrown as a convenience so that you can use this stack
1461
- // to find the callsite that caused this warning to fire.
1462
- throw new Error(message);
1463
- } catch (x) {}
1464
- };
1465
- }
1466
-
1467
- function emptyFunctionThatReturnsNull() {
1468
- return null;
1469
- }
1470
-
1471
- var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
1472
- /* global Symbol */
1473
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
1474
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
1475
-
1476
- /**
1477
- * Returns the iterator method function contained on the iterable object.
1478
- *
1479
- * Be sure to invoke the function with the iterable as context:
1480
- *
1481
- * var iteratorFn = getIteratorFn(myIterable);
1482
- * if (iteratorFn) {
1483
- * var iterator = iteratorFn.call(myIterable);
1484
- * ...
1485
- * }
1486
- *
1487
- * @param {?object} maybeIterable
1488
- * @return {?function}
1489
- */
1490
- function getIteratorFn(maybeIterable) {
1491
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
1492
- if (typeof iteratorFn === 'function') {
1493
- return iteratorFn;
1494
- }
1495
- }
1496
-
1497
- /**
1498
- * Collection of methods that allow declaration and validation of props that are
1499
- * supplied to React components. Example usage:
1500
- *
1501
- * var Props = require('ReactPropTypes');
1502
- * var MyArticle = React.createClass({
1503
- * propTypes: {
1504
- * // An optional string prop named "description".
1505
- * description: Props.string,
1506
- *
1507
- * // A required enum prop named "category".
1508
- * category: Props.oneOf(['News','Photos']).isRequired,
1509
- *
1510
- * // A prop named "dialog" that requires an instance of Dialog.
1511
- * dialog: Props.instanceOf(Dialog).isRequired
1512
- * },
1513
- * render: function() { ... }
1514
- * });
1515
- *
1516
- * A more formal specification of how these methods are used:
1517
- *
1518
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
1519
- * decl := ReactPropTypes.{type}(.isRequired)?
1520
- *
1521
- * Each and every declaration produces a function with the same signature. This
1522
- * allows the creation of custom validation functions. For example:
1523
- *
1524
- * var MyLink = React.createClass({
1525
- * propTypes: {
1526
- * // An optional string or URI prop named "href".
1527
- * href: function(props, propName, componentName) {
1528
- * var propValue = props[propName];
1529
- * if (propValue != null && typeof propValue !== 'string' &&
1530
- * !(propValue instanceof URI)) {
1531
- * return new Error(
1532
- * 'Expected a string or an URI for ' + propName + ' in ' +
1533
- * componentName
1534
- * );
1535
- * }
1536
- * }
1537
- * },
1538
- * render: function() {...}
1539
- * });
1540
- *
1541
- * @internal
1542
- */
1543
-
1544
- var ANONYMOUS = '<<anonymous>>';
1545
-
1546
- // Important!
1547
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
1548
- var ReactPropTypes = {
1549
- array: createPrimitiveTypeChecker('array'),
1550
- bigint: createPrimitiveTypeChecker('bigint'),
1551
- bool: createPrimitiveTypeChecker('boolean'),
1552
- func: createPrimitiveTypeChecker('function'),
1553
- number: createPrimitiveTypeChecker('number'),
1554
- object: createPrimitiveTypeChecker('object'),
1555
- string: createPrimitiveTypeChecker('string'),
1556
- symbol: createPrimitiveTypeChecker('symbol'),
1557
-
1558
- any: createAnyTypeChecker(),
1559
- arrayOf: createArrayOfTypeChecker,
1560
- element: createElementTypeChecker(),
1561
- elementType: createElementTypeTypeChecker(),
1562
- instanceOf: createInstanceTypeChecker,
1563
- node: createNodeChecker(),
1564
- objectOf: createObjectOfTypeChecker,
1565
- oneOf: createEnumTypeChecker,
1566
- oneOfType: createUnionTypeChecker,
1567
- shape: createShapeTypeChecker,
1568
- exact: createStrictShapeTypeChecker,
1569
- };
1570
-
1571
- /**
1572
- * inlined Object.is polyfill to avoid requiring consumers ship their own
1573
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1574
- */
1575
- /*eslint-disable no-self-compare*/
1576
- function is(x, y) {
1577
- // SameValue algorithm
1578
- if (x === y) {
1579
- // Steps 1-5, 7-10
1580
- // Steps 6.b-6.e: +0 != -0
1581
- return x !== 0 || 1 / x === 1 / y;
1582
- } else {
1583
- // Step 6.a: NaN == NaN
1584
- return x !== x && y !== y;
1585
- }
1586
- }
1587
- /*eslint-enable no-self-compare*/
1588
-
1589
- /**
1590
- * We use an Error-like object for backward compatibility as people may call
1591
- * PropTypes directly and inspect their output. However, we don't use real
1592
- * Errors anymore. We don't inspect their stack anyway, and creating them
1593
- * is prohibitively expensive if they are created too often, such as what
1594
- * happens in oneOfType() for any type before the one that matched.
1595
- */
1596
- function PropTypeError(message, data) {
1597
- this.message = message;
1598
- this.data = data && typeof data === 'object' ? data: {};
1599
- this.stack = '';
1600
- }
1601
- // Make `instanceof Error` still work for returned errors.
1602
- PropTypeError.prototype = Error.prototype;
1603
-
1604
- function createChainableTypeChecker(validate) {
1605
- if (process.env.NODE_ENV !== 'production') {
1606
- var manualPropTypeCallCache = {};
1607
- var manualPropTypeWarningCount = 0;
1608
- }
1609
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
1610
- componentName = componentName || ANONYMOUS;
1611
- propFullName = propFullName || propName;
1612
-
1613
- if (secret !== ReactPropTypesSecret$1) {
1614
- if (throwOnDirectAccess) {
1615
- // New behavior only for users of `prop-types` package
1616
- var err = new Error(
1617
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1618
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
1619
- 'Read more at http://fb.me/use-check-prop-types'
1620
- );
1621
- err.name = 'Invariant Violation';
1622
- throw err;
1623
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
1624
- // Old behavior for people using React.PropTypes
1625
- var cacheKey = componentName + ':' + propName;
1626
- if (
1627
- !manualPropTypeCallCache[cacheKey] &&
1628
- // Avoid spamming the console because they are often not actionable except for lib authors
1629
- manualPropTypeWarningCount < 3
1630
- ) {
1631
- printWarning(
1632
- 'You are manually calling a React.PropTypes validation ' +
1633
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
1634
- 'and will throw in the standalone `prop-types` package. ' +
1635
- 'You may be seeing this warning due to a third-party PropTypes ' +
1636
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
1637
- );
1638
- manualPropTypeCallCache[cacheKey] = true;
1639
- manualPropTypeWarningCount++;
1640
- }
1641
- }
1642
- }
1643
- if (props[propName] == null) {
1644
- if (isRequired) {
1645
- if (props[propName] === null) {
1646
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
1647
- }
1648
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
1649
- }
1650
- return null;
1651
- } else {
1652
- return validate(props, propName, componentName, location, propFullName);
1653
- }
1654
- }
1655
-
1656
- var chainedCheckType = checkType.bind(null, false);
1657
- chainedCheckType.isRequired = checkType.bind(null, true);
1658
-
1659
- return chainedCheckType;
1660
- }
1661
-
1662
- function createPrimitiveTypeChecker(expectedType) {
1663
- function validate(props, propName, componentName, location, propFullName, secret) {
1664
- var propValue = props[propName];
1665
- var propType = getPropType(propValue);
1666
- if (propType !== expectedType) {
1667
- // `propValue` being instance of, say, date/regexp, pass the 'object'
1668
- // check, but we can offer a more precise error message here rather than
1669
- // 'of type `object`'.
1670
- var preciseType = getPreciseType(propValue);
1671
-
1672
- return new PropTypeError(
1673
- 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
1674
- {expectedType: expectedType}
1675
- );
1676
- }
1677
- return null;
1678
- }
1679
- return createChainableTypeChecker(validate);
1680
- }
1681
-
1682
- function createAnyTypeChecker() {
1683
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
1684
- }
1685
-
1686
- function createArrayOfTypeChecker(typeChecker) {
1687
- function validate(props, propName, componentName, location, propFullName) {
1688
- if (typeof typeChecker !== 'function') {
1689
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1690
- }
1691
- var propValue = props[propName];
1692
- if (!Array.isArray(propValue)) {
1693
- var propType = getPropType(propValue);
1694
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1695
- }
1696
- for (var i = 0; i < propValue.length; i++) {
1697
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret$1);
1698
- if (error instanceof Error) {
1699
- return error;
1700
- }
1701
- }
1702
- return null;
1703
- }
1704
- return createChainableTypeChecker(validate);
1705
- }
1706
-
1707
- function createElementTypeChecker() {
1708
- function validate(props, propName, componentName, location, propFullName) {
1709
- var propValue = props[propName];
1710
- if (!isValidElement(propValue)) {
1711
- var propType = getPropType(propValue);
1712
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1713
- }
1714
- return null;
1715
- }
1716
- return createChainableTypeChecker(validate);
1717
- }
1718
-
1719
- function createElementTypeTypeChecker() {
1720
- function validate(props, propName, componentName, location, propFullName) {
1721
- var propValue = props[propName];
1722
- if (!ReactIs$1.isValidElementType(propValue)) {
1723
- var propType = getPropType(propValue);
1724
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
1725
- }
1726
- return null;
1727
- }
1728
- return createChainableTypeChecker(validate);
1729
- }
1730
-
1731
- function createInstanceTypeChecker(expectedClass) {
1732
- function validate(props, propName, componentName, location, propFullName) {
1733
- if (!(props[propName] instanceof expectedClass)) {
1734
- var expectedClassName = expectedClass.name || ANONYMOUS;
1735
- var actualClassName = getClassName(props[propName]);
1736
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1737
- }
1738
- return null;
1739
- }
1740
- return createChainableTypeChecker(validate);
1741
- }
1742
-
1743
- function createEnumTypeChecker(expectedValues) {
1744
- if (!Array.isArray(expectedValues)) {
1745
- if (process.env.NODE_ENV !== 'production') {
1746
- if (arguments.length > 1) {
1747
- printWarning(
1748
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
1749
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
1750
- );
1751
- } else {
1752
- printWarning('Invalid argument supplied to oneOf, expected an array.');
1753
- }
1754
- }
1755
- return emptyFunctionThatReturnsNull;
1756
- }
1757
-
1758
- function validate(props, propName, componentName, location, propFullName) {
1759
- var propValue = props[propName];
1760
- for (var i = 0; i < expectedValues.length; i++) {
1761
- if (is(propValue, expectedValues[i])) {
1762
- return null;
1763
- }
1764
- }
1765
-
1766
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
1767
- var type = getPreciseType(value);
1768
- if (type === 'symbol') {
1769
- return String(value);
1770
- }
1771
- return value;
1772
- });
1773
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1774
- }
1775
- return createChainableTypeChecker(validate);
1776
- }
1777
-
1778
- function createObjectOfTypeChecker(typeChecker) {
1779
- function validate(props, propName, componentName, location, propFullName) {
1780
- if (typeof typeChecker !== 'function') {
1781
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1782
- }
1783
- var propValue = props[propName];
1784
- var propType = getPropType(propValue);
1785
- if (propType !== 'object') {
1786
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1787
- }
1788
- for (var key in propValue) {
1789
- if (has(propValue, key)) {
1790
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
1791
- if (error instanceof Error) {
1792
- return error;
1793
- }
1794
- }
1795
- }
1796
- return null;
1797
- }
1798
- return createChainableTypeChecker(validate);
1799
- }
1800
-
1801
- function createUnionTypeChecker(arrayOfTypeCheckers) {
1802
- if (!Array.isArray(arrayOfTypeCheckers)) {
1803
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
1804
- return emptyFunctionThatReturnsNull;
1805
- }
1806
-
1807
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1808
- var checker = arrayOfTypeCheckers[i];
1809
- if (typeof checker !== 'function') {
1810
- printWarning(
1811
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
1812
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
1813
- );
1814
- return emptyFunctionThatReturnsNull;
1815
- }
1816
- }
1817
-
1818
- function validate(props, propName, componentName, location, propFullName) {
1819
- var expectedTypes = [];
1820
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1821
- var checker = arrayOfTypeCheckers[i];
1822
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1);
1823
- if (checkerResult == null) {
1824
- return null;
1825
- }
1826
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
1827
- expectedTypes.push(checkerResult.data.expectedType);
1828
- }
1829
- }
1830
- var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
1831
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1832
- }
1833
- return createChainableTypeChecker(validate);
1834
- }
1835
-
1836
- function createNodeChecker() {
1837
- function validate(props, propName, componentName, location, propFullName) {
1838
- if (!isNode(props[propName])) {
1839
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1840
- }
1841
- return null;
1842
- }
1843
- return createChainableTypeChecker(validate);
1844
- }
1845
-
1846
- function invalidValidatorError(componentName, location, propFullName, key, type) {
1847
- return new PropTypeError(
1848
- (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
1849
- 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
1850
- );
1851
- }
1852
-
1853
- function createShapeTypeChecker(shapeTypes) {
1854
- function validate(props, propName, componentName, location, propFullName) {
1855
- var propValue = props[propName];
1856
- var propType = getPropType(propValue);
1857
- if (propType !== 'object') {
1858
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1859
- }
1860
- for (var key in shapeTypes) {
1861
- var checker = shapeTypes[key];
1862
- if (typeof checker !== 'function') {
1863
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1864
- }
1865
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
1866
- if (error) {
1867
- return error;
1868
- }
1869
- }
1870
- return null;
1871
- }
1872
- return createChainableTypeChecker(validate);
1873
- }
1874
-
1875
- function createStrictShapeTypeChecker(shapeTypes) {
1876
- function validate(props, propName, componentName, location, propFullName) {
1877
- var propValue = props[propName];
1878
- var propType = getPropType(propValue);
1879
- if (propType !== 'object') {
1880
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1881
- }
1882
- // We need to check all keys in case some are required but missing from props.
1883
- var allKeys = assign({}, props[propName], shapeTypes);
1884
- for (var key in allKeys) {
1885
- var checker = shapeTypes[key];
1886
- if (has(shapeTypes, key) && typeof checker !== 'function') {
1887
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1888
- }
1889
- if (!checker) {
1890
- return new PropTypeError(
1891
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1892
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1893
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1894
- );
1895
- }
1896
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
1897
- if (error) {
1898
- return error;
1899
- }
1900
- }
1901
- return null;
1902
- }
1903
-
1904
- return createChainableTypeChecker(validate);
1905
- }
1906
-
1907
- function isNode(propValue) {
1908
- switch (typeof propValue) {
1909
- case 'number':
1910
- case 'string':
1911
- case 'undefined':
1912
- return true;
1913
- case 'boolean':
1914
- return !propValue;
1915
- case 'object':
1916
- if (Array.isArray(propValue)) {
1917
- return propValue.every(isNode);
1918
- }
1919
- if (propValue === null || isValidElement(propValue)) {
1920
- return true;
1921
- }
1922
-
1923
- var iteratorFn = getIteratorFn(propValue);
1924
- if (iteratorFn) {
1925
- var iterator = iteratorFn.call(propValue);
1926
- var step;
1927
- if (iteratorFn !== propValue.entries) {
1928
- while (!(step = iterator.next()).done) {
1929
- if (!isNode(step.value)) {
1930
- return false;
1931
- }
1932
- }
1933
- } else {
1934
- // Iterator will provide entry [k,v] tuples rather than values.
1935
- while (!(step = iterator.next()).done) {
1936
- var entry = step.value;
1937
- if (entry) {
1938
- if (!isNode(entry[1])) {
1939
- return false;
1940
- }
1941
- }
1942
- }
1943
- }
1944
- } else {
1945
- return false;
1946
- }
1947
-
1948
- return true;
1949
- default:
1950
- return false;
1951
- }
1952
- }
1953
-
1954
- function isSymbol(propType, propValue) {
1955
- // Native Symbol.
1956
- if (propType === 'symbol') {
1957
- return true;
1958
- }
1959
-
1960
- // falsy value can't be a Symbol
1961
- if (!propValue) {
1962
- return false;
1963
- }
1964
-
1965
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1966
- if (propValue['@@toStringTag'] === 'Symbol') {
1967
- return true;
1968
- }
1969
-
1970
- // Fallback for non-spec compliant Symbols which are polyfilled.
1971
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1972
- return true;
1973
- }
1974
-
1975
- return false;
1976
- }
1977
-
1978
- // Equivalent of `typeof` but with special handling for array and regexp.
1979
- function getPropType(propValue) {
1980
- var propType = typeof propValue;
1981
- if (Array.isArray(propValue)) {
1982
- return 'array';
1983
- }
1984
- if (propValue instanceof RegExp) {
1985
- // Old webkits (at least until Android 4.0) return 'function' rather than
1986
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1987
- // passes PropTypes.object.
1988
- return 'object';
1989
- }
1990
- if (isSymbol(propType, propValue)) {
1991
- return 'symbol';
1992
- }
1993
- return propType;
1994
- }
1995
-
1996
- // This handles more types than `getPropType`. Only used for error messages.
1997
- // See `createPrimitiveTypeChecker`.
1998
- function getPreciseType(propValue) {
1999
- if (typeof propValue === 'undefined' || propValue === null) {
2000
- return '' + propValue;
2001
- }
2002
- var propType = getPropType(propValue);
2003
- if (propType === 'object') {
2004
- if (propValue instanceof Date) {
2005
- return 'date';
2006
- } else if (propValue instanceof RegExp) {
2007
- return 'regexp';
2008
- }
2009
- }
2010
- return propType;
2011
- }
2012
-
2013
- // Returns a string that is postfixed to a warning about an invalid type.
2014
- // For example, "undefined" or "of type array"
2015
- function getPostfixForTypeWarning(value) {
2016
- var type = getPreciseType(value);
2017
- switch (type) {
2018
- case 'array':
2019
- case 'object':
2020
- return 'an ' + type;
2021
- case 'boolean':
2022
- case 'date':
2023
- case 'regexp':
2024
- return 'a ' + type;
2025
- default:
2026
- return type;
2027
- }
2028
- }
2029
-
2030
- // Returns class name of the object, if any.
2031
- function getClassName(propValue) {
2032
- if (!propValue.constructor || !propValue.constructor.name) {
2033
- return ANONYMOUS;
2034
- }
2035
- return propValue.constructor.name;
2036
- }
2037
-
2038
- ReactPropTypes.checkPropTypes = checkPropTypes;
2039
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
2040
- ReactPropTypes.PropTypes = ReactPropTypes;
2041
-
2042
- return ReactPropTypes;
2043
- };
2044
-
2045
- /**
2046
- * Copyright (c) 2013-present, Facebook, Inc.
2047
- *
2048
- * This source code is licensed under the MIT license found in the
2049
- * LICENSE file in the root directory of this source tree.
2050
- */
2051
-
2052
- var ReactPropTypesSecret = ReactPropTypesSecret_1;
2053
-
2054
- function emptyFunction() {}
2055
- function emptyFunctionWithReset() {}
2056
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
2057
-
2058
- var factoryWithThrowingShims = function() {
2059
- function shim(props, propName, componentName, location, propFullName, secret) {
2060
- if (secret === ReactPropTypesSecret) {
2061
- // It is still safe when called from React.
2062
- return;
2063
- }
2064
- var err = new Error(
2065
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
2066
- 'Use PropTypes.checkPropTypes() to call them. ' +
2067
- 'Read more at http://fb.me/use-check-prop-types'
2068
- );
2069
- err.name = 'Invariant Violation';
2070
- throw err;
2071
- } shim.isRequired = shim;
2072
- function getShim() {
2073
- return shim;
2074
- } // Important!
2075
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
2076
- var ReactPropTypes = {
2077
- array: shim,
2078
- bigint: shim,
2079
- bool: shim,
2080
- func: shim,
2081
- number: shim,
2082
- object: shim,
2083
- string: shim,
2084
- symbol: shim,
2085
-
2086
- any: shim,
2087
- arrayOf: getShim,
2088
- element: shim,
2089
- elementType: shim,
2090
- instanceOf: getShim,
2091
- node: shim,
2092
- objectOf: getShim,
2093
- oneOf: getShim,
2094
- oneOfType: getShim,
2095
- shape: getShim,
2096
- exact: getShim,
2097
-
2098
- checkPropTypes: emptyFunctionWithReset,
2099
- resetWarningCache: emptyFunction
2100
- };
2101
-
2102
- ReactPropTypes.PropTypes = ReactPropTypes;
2103
-
2104
- return ReactPropTypes;
2105
- };
2106
-
2107
- /**
2108
- * Copyright (c) 2013-present, Facebook, Inc.
2109
- *
2110
- * This source code is licensed under the MIT license found in the
2111
- * LICENSE file in the root directory of this source tree.
2112
- */
2113
-
2114
- if (process.env.NODE_ENV !== 'production') {
2115
- var ReactIs = reactIs.exports;
2116
-
2117
- // By explicitly using `prop-types` you are opting into new development behavior.
2118
- // http://fb.me/prop-types-in-prod
2119
- var throwOnDirectAccess = true;
2120
- propTypes.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
2121
- } else {
2122
- // By explicitly using `prop-types` you are opting into new production behavior.
2123
- // http://fb.me/prop-types-in-prod
2124
- propTypes.exports = factoryWithThrowingShims();
2125
- }
2126
-
2127
- var PropTypes = propTypes.exports;
2128
-
2129
- /**
2130
- * TODO v5: consider making it private
2131
- *
2132
- * passes {value} to {ref}
2133
- *
2134
- * WARNING: Be sure to only call this inside a callback that is passed as a ref.
2135
- * Otherwise, make sure to cleanup the previous {ref} if it changes. See
2136
- * https://github.com/mui/material-ui/issues/13539
2137
- *
2138
- * Useful if you want to expose the ref of an inner component to the public API
2139
- * while still using it inside the component.
2140
- * @param ref A ref callback or ref object. If anything falsy, this is a no-op.
2141
- */
2142
- function setRef(ref, value) {
2143
- if (typeof ref === 'function') {
2144
- ref(value);
2145
- } else if (ref) {
2146
- ref.current = value;
2147
- }
2148
- }
2149
-
2150
- /**
2151
- * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
2152
- * This is useful for effects that are only needed for client-side rendering but not for SSR.
2153
- *
2154
- * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
2155
- * and confirm it doesn't apply to your use-case.
2156
- */
2157
- const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
2158
- var useEnhancedEffect$1 = useEnhancedEffect;
2159
-
2160
- let globalId = 0;
2161
- function useGlobalId(idOverride) {
2162
- const [defaultId, setDefaultId] = React.useState(idOverride);
2163
- const id = idOverride || defaultId;
2164
- React.useEffect(() => {
2165
- if (defaultId == null) {
2166
- // Fallback to this default id when possible.
2167
- // Use the incrementing value for client-side rendering only.
2168
- // We can't use it server-side.
2169
- // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
2170
- globalId += 1;
2171
- setDefaultId(`mui-${globalId}`);
2172
- }
2173
- }, [defaultId]);
2174
- return id;
2175
- }
2176
-
2177
- // downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814
2178
- const maybeReactUseId = React['useId'.toString()];
2179
- /**
2180
- *
2181
- * @example <div id={useId()} />
2182
- * @param idOverride
2183
- * @returns {string}
2184
- */
2185
- function useId(idOverride) {
2186
- if (maybeReactUseId !== undefined) {
2187
- const reactId = maybeReactUseId();
2188
- return idOverride != null ? idOverride : reactId;
2189
- }
2190
- // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
2191
- return useGlobalId(idOverride);
2192
- }
2193
-
2194
- function useControlled({
2195
- controlled,
2196
- default: defaultProp,
2197
- name,
2198
- state = 'value'
2199
- }) {
2200
- // isControlled is ignored in the hook dependency lists as it should never change.
2201
- const {
2202
- current: isControlled
2203
- } = React.useRef(controlled !== undefined);
2204
- const [valueState, setValue] = React.useState(defaultProp);
2205
- const value = isControlled ? controlled : valueState;
2206
- if (process.env.NODE_ENV !== 'production') {
2207
- React.useEffect(() => {
2208
- if (isControlled !== (controlled !== undefined)) {
2209
- console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n'));
2210
- }
2211
- }, [state, name, controlled]);
2212
- const {
2213
- current: defaultValue
2214
- } = React.useRef(defaultProp);
2215
- React.useEffect(() => {
2216
- if (!isControlled && defaultValue !== defaultProp) {
2217
- console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\n'));
2218
- }
2219
- }, [JSON.stringify(defaultProp)]);
2220
- }
2221
- const setValueIfUncontrolled = React.useCallback(newValue => {
2222
- if (!isControlled) {
2223
- setValue(newValue);
2224
- }
2225
- }, []);
2226
- return [value, setValueIfUncontrolled];
2227
- }
2228
-
2229
- /**
2230
- * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892
2231
- * See RFC in https://github.com/reactjs/rfcs/pull/220
2232
- */
2233
-
2234
- function useEventCallback(fn) {
2235
- const ref = React.useRef(fn);
2236
- useEnhancedEffect$1(() => {
2237
- ref.current = fn;
2238
- });
2239
- return React.useCallback((...args) =>
2240
- // @ts-expect-error hide `this`
2241
- // tslint:disable-next-line:ban-comma-operator
2242
- (0, ref.current)(...args), []);
2243
- }
2244
-
2245
- function useForkRef(...refs) {
2246
- /**
2247
- * This will create a new function if the refs passed to this hook change and are all defined.
2248
- * This means react will call the old forkRef with `null` and the new forkRef
2249
- * with the ref. Cleanup naturally emerges from this behavior.
2250
- */
2251
- return React.useMemo(() => {
2252
- if (refs.every(ref => ref == null)) {
2253
- return null;
2254
- }
2255
- return instance => {
2256
- refs.forEach(ref => {
2257
- setRef(ref, instance);
2258
- });
2259
- };
2260
- // eslint-disable-next-line react-hooks/exhaustive-deps
2261
- }, refs);
2262
- }
2263
-
2264
- function composeClasses(slots, getUtilityClass, classes = undefined) {
2265
- const output = {};
2266
- Object.keys(slots).forEach(
2267
- // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
2268
- // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
2269
- slot => {
2270
- output[slot] = slots[slot].reduce((acc, key) => {
2271
- if (key) {
2272
- const utilityClass = getUtilityClass(key);
2273
- if (utilityClass !== '') {
2274
- acc.push(utilityClass);
2275
- }
2276
- if (classes && classes[key]) {
2277
- acc.push(classes[key]);
2278
- }
2279
- }
2280
- return acc;
2281
- }, []).join(' ');
2282
- });
2283
- return output;
2284
- }
2285
-
2286
- const defaultGenerator = componentName => componentName;
2287
- const createClassNameGenerator = () => {
2288
- let generate = defaultGenerator;
2289
- return {
2290
- configure(generator) {
2291
- generate = generator;
2292
- },
2293
- generate(componentName) {
2294
- return generate(componentName);
2295
- },
2296
- reset() {
2297
- generate = defaultGenerator;
2298
- }
2299
- };
2300
- };
2301
- const ClassNameGenerator = createClassNameGenerator();
2302
- var ClassNameGenerator$1 = ClassNameGenerator;
2303
-
2304
- // If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
2305
- // \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
2306
- const globalStateClassesMapping = {
2307
- active: 'active',
2308
- checked: 'checked',
2309
- completed: 'completed',
2310
- disabled: 'disabled',
2311
- error: 'error',
2312
- expanded: 'expanded',
2313
- focused: 'focused',
2314
- focusVisible: 'focusVisible',
2315
- open: 'open',
2316
- readOnly: 'readOnly',
2317
- required: 'required',
2318
- selected: 'selected'
2319
- };
2320
- function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
2321
- const globalStateClass = globalStateClassesMapping[slot];
2322
- return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator$1.generate(componentName)}-${slot}`;
2323
- }
2324
-
2325
- function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
2326
- const result = {};
2327
- slots.forEach(slot => {
2328
- result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
2329
- });
2330
- return result;
2331
- }
2332
-
2333
- const MuiPickersAdapterContext = /*#__PURE__*/React.createContext(null);
2334
- if (process.env.NODE_ENV !== 'production') {
2335
- MuiPickersAdapterContext.displayName = 'MuiPickersAdapterContext';
2336
- }
2337
- process.env.NODE_ENV !== "production" ? {
2338
- // ----------------------------- Warning --------------------------------
2339
- // | These PropTypes are generated from the TypeScript type definitions |
2340
- // | To update them edit the TypeScript types and run "yarn proptypes" |
2341
- // ----------------------------------------------------------------------
2342
- /**
2343
- * Locale for the date library you are using
2344
- */
2345
- adapterLocale: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
2346
- children: PropTypes.node,
2347
- /**
2348
- * Date library adapter class function.
2349
- * @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#setup-your-date-library-adapter date adapter setup section} for more details.
2350
- */
2351
- dateAdapter: PropTypes.func,
2352
- /**
2353
- * Formats that are used for any child pickers
2354
- */
2355
- dateFormats: PropTypes.shape({
2356
- dayOfMonth: PropTypes.string,
2357
- fullDate: PropTypes.string,
2358
- fullDateTime: PropTypes.string,
2359
- fullDateTime12h: PropTypes.string,
2360
- fullDateTime24h: PropTypes.string,
2361
- fullDateWithWeekday: PropTypes.string,
2362
- fullTime: PropTypes.string,
2363
- fullTime12h: PropTypes.string,
2364
- fullTime24h: PropTypes.string,
2365
- hours12h: PropTypes.string,
2366
- hours24h: PropTypes.string,
2367
- keyboardDate: PropTypes.string,
2368
- keyboardDateTime: PropTypes.string,
2369
- keyboardDateTime12h: PropTypes.string,
2370
- keyboardDateTime24h: PropTypes.string,
2371
- minutes: PropTypes.string,
2372
- month: PropTypes.string,
2373
- monthAndDate: PropTypes.string,
2374
- monthAndYear: PropTypes.string,
2375
- monthShort: PropTypes.string,
2376
- normalDate: PropTypes.string,
2377
- normalDateWithWeekday: PropTypes.string,
2378
- seconds: PropTypes.string,
2379
- shortDate: PropTypes.string,
2380
- weekday: PropTypes.string,
2381
- weekdayShort: PropTypes.string,
2382
- year: PropTypes.string
2383
- }),
2384
- /**
2385
- * Date library instance you are using, if it has some global overrides
2386
- * ```jsx
2387
- * dateLibInstance={momentTimeZone}
2388
- * ```
2389
- */
2390
- dateLibInstance: PropTypes.any,
2391
- /**
2392
- * Locale for components texts
2393
- */
2394
- localeText: PropTypes.object
2395
- } : void 0;
2396
-
2397
- const getPickersLocalization = pickersTranslations => {
2398
- return {
2399
- components: {
2400
- MuiLocalizationProvider: {
2401
- defaultProps: {
2402
- localeText: _extends({}, pickersTranslations)
2403
- }
2404
- }
2405
- }
2406
- };
2407
- };
2408
-
2409
- // This object is not Partial<PickersLocaleText> because it is the default values
2410
-
2411
- const enUSPickers = {
2412
- // Calendar navigation
2413
- previousMonth: 'Previous month',
2414
- nextMonth: 'Next month',
2415
- // View navigation
2416
- openPreviousView: 'open previous view',
2417
- openNextView: 'open next view',
2418
- calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',
2419
- // DateRange placeholders
2420
- start: 'Start',
2421
- end: 'End',
2422
- // Action bar
2423
- cancelButtonLabel: 'Cancel',
2424
- clearButtonLabel: 'Clear',
2425
- okButtonLabel: 'OK',
2426
- todayButtonLabel: 'Today',
2427
- // Toolbar titles
2428
- datePickerToolbarTitle: 'Select date',
2429
- dateTimePickerToolbarTitle: 'Select date & time',
2430
- timePickerToolbarTitle: 'Select time',
2431
- dateRangePickerToolbarTitle: 'Select date range',
2432
- // Clock labels
2433
- clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,
2434
- hoursClockNumberText: hours => `${hours} hours`,
2435
- minutesClockNumberText: minutes => `${minutes} minutes`,
2436
- secondsClockNumberText: seconds => `${seconds} seconds`,
2437
- // Calendar labels
2438
- calendarWeekNumberHeaderLabel: 'Week number',
2439
- calendarWeekNumberHeaderText: '#',
2440
- calendarWeekNumberAriaLabelText: weekNumber => `Week ${weekNumber}`,
2441
- calendarWeekNumberText: weekNumber => `${weekNumber}`,
2442
- // Open picker labels
2443
- openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Choose date, selected date is ${utils.format(value, 'fullDate')}` : 'Choose date',
2444
- openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Choose time, selected time is ${utils.format(value, 'fullTime')}` : 'Choose time',
2445
- // Table labels
2446
- timeTableLabel: 'pick time',
2447
- dateTableLabel: 'pick date',
2448
- // Field section placeholders
2449
- fieldYearPlaceholder: params => 'Y'.repeat(params.digitAmount),
2450
- fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',
2451
- fieldDayPlaceholder: () => 'DD',
2452
- fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
2453
- fieldHoursPlaceholder: () => 'hh',
2454
- fieldMinutesPlaceholder: () => 'mm',
2455
- fieldSecondsPlaceholder: () => 'ss',
2456
- fieldMeridiemPlaceholder: () => 'aa'
2457
- };
2458
- const DEFAULT_LOCALE = enUSPickers;
2459
- getPickersLocalization(enUSPickers);
2460
-
2461
- const useLocalizationContext = () => {
2462
- const localization = React.useContext(MuiPickersAdapterContext);
2463
- if (localization === null) {
2464
- throw new Error(['MUI: Can not find the date and time pickers localization context.', 'It looks like you forgot to wrap your component in LocalizationProvider.', 'This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package'].join('\n'));
2465
- }
2466
- if (localization.utils === null) {
2467
- throw new Error(['MUI: Can not find the date and time pickers adapter from its localization context.', 'It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider.'].join('\n'));
2468
- }
2469
- const localeText = React.useMemo(() => _extends({}, DEFAULT_LOCALE, localization.localeText), [localization.localeText]);
2470
- return React.useMemo(() => _extends({}, localization, {
2471
- localeText
2472
- }), [localization, localeText]);
2473
- };
2474
- const useUtils = () => useLocalizationContext().utils;
2475
- const useLocaleText = () => useLocalizationContext().localeText;
2476
- const useNow = () => {
2477
- const utils = useUtils();
2478
- const now = React.useRef(utils.date());
2479
- return now.current;
2480
- };
2481
-
2482
- /**
2483
- * Determines if a given element is a DOM element name (i.e. not a React component).
2484
- */
2485
- function isHostComponent(element) {
2486
- return typeof element === 'string';
2487
- }
2488
-
2489
- /**
2490
- * Type of the ownerState based on the type of an element it applies to.
2491
- * This resolves to the provided OwnerState for React components and `undefined` for host components.
2492
- * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
2493
- */
2494
-
2495
- /**
2496
- * Appends the ownerState object to the props, merging with the existing one if necessary.
2497
- *
2498
- * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.
2499
- * @param otherProps Props of the element.
2500
- * @param ownerState
2501
- */
2502
- function appendOwnerState(elementType, otherProps, ownerState) {
2503
- if (elementType === undefined || isHostComponent(elementType)) {
2504
- return otherProps;
2505
- }
2506
- return _extends({}, otherProps, {
2507
- ownerState: _extends({}, otherProps.ownerState, ownerState)
2508
- });
2509
- }
2510
-
2511
- /**
2512
- * Extracts event handlers from a given object.
2513
- * A prop is considered an event handler if it is a function and its name starts with `on`.
2514
- *
2515
- * @param object An object to extract event handlers from.
2516
- * @param excludeKeys An array of keys to exclude from the returned object.
2517
- */
2518
- function extractEventHandlers(object, excludeKeys = []) {
2519
- if (object === undefined) {
2520
- return {};
2521
- }
2522
- const result = {};
2523
- Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {
2524
- result[prop] = object[prop];
2525
- });
2526
- return result;
2527
- }
2528
-
2529
- /**
2530
- * If `componentProps` is a function, calls it with the provided `ownerState`.
2531
- * Otherwise, just returns `componentProps`.
2532
- */
2533
- function resolveComponentProps(componentProps, ownerState) {
2534
- if (typeof componentProps === 'function') {
2535
- return componentProps(ownerState);
2536
- }
2537
- return componentProps;
2538
- }
2539
-
2540
- /**
2541
- * Removes event handlers from the given object.
2542
- * A field is considered an event handler if it is a function with a name beginning with `on`.
2543
- *
2544
- * @param object Object to remove event handlers from.
2545
- * @returns Object with event handlers removed.
2546
- */
2547
- function omitEventHandlers(object) {
2548
- if (object === undefined) {
2549
- return {};
2550
- }
2551
- const result = {};
2552
- Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {
2553
- result[prop] = object[prop];
2554
- });
2555
- return result;
2556
- }
2557
-
2558
- /**
2559
- * Merges the slot component internal props (usually coming from a hook)
2560
- * with the externally provided ones.
2561
- *
2562
- * The merge order is (the latter overrides the former):
2563
- * 1. The internal props (specified as a getter function to work with get*Props hook result)
2564
- * 2. Additional props (specified internally on an unstyled component)
2565
- * 3. External props specified on the owner component. These should only be used on a root slot.
2566
- * 4. External props specified in the `slotProps.*` prop.
2567
- * 5. The `className` prop - combined from all the above.
2568
- * @param parameters
2569
- * @returns
2570
- */
2571
- function mergeSlotProps(parameters) {
2572
- const {
2573
- getSlotProps,
2574
- additionalProps,
2575
- externalSlotProps,
2576
- externalForwardedProps,
2577
- className
2578
- } = parameters;
2579
- if (!getSlotProps) {
2580
- // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,
2581
- // so we can simply merge all the props without having to worry about extracting event handlers.
2582
- const joinedClasses = clsx(externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className, className, additionalProps == null ? void 0 : additionalProps.className);
2583
- const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
2584
- const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);
2585
- if (joinedClasses.length > 0) {
2586
- props.className = joinedClasses;
2587
- }
2588
- if (Object.keys(mergedStyle).length > 0) {
2589
- props.style = mergedStyle;
2590
- }
2591
- return {
2592
- props,
2593
- internalRef: undefined
2594
- };
2595
- }
2596
-
2597
- // In this case, getSlotProps is responsible for calling the external event handlers.
2598
- // We don't need to include them in the merged props because of this.
2599
-
2600
- const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps));
2601
- const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);
2602
- const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);
2603
- const internalSlotProps = getSlotProps(eventHandlers);
2604
-
2605
- // The order of classes is important here.
2606
- // Emotion (that we use in libraries consuming Base UI) depends on this order
2607
- // to properly override style. It requires the most important classes to be last
2608
- // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.
2609
- const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);
2610
- const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
2611
- const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);
2612
- if (joinedClasses.length > 0) {
2613
- props.className = joinedClasses;
2614
- }
2615
- if (Object.keys(mergedStyle).length > 0) {
2616
- props.style = mergedStyle;
2617
- }
2618
- return {
2619
- props,
2620
- internalRef: internalSlotProps.ref
2621
- };
2622
- }
2623
-
2624
- const _excluded$4 = ["elementType", "externalSlotProps", "ownerState"];
2625
- /**
2626
- * @ignore - do not document.
2627
- * Builds the props to be passed into the slot of an unstyled component.
2628
- * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.
2629
- * If the slot component is not a host component, it also merges in the `ownerState`.
2630
- *
2631
- * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.
2632
- */
2633
- function useSlotProps(parameters) {
2634
- var _parameters$additiona;
2635
- const {
2636
- elementType,
2637
- externalSlotProps,
2638
- ownerState
2639
- } = parameters,
2640
- rest = _objectWithoutPropertiesLoose(parameters, _excluded$4);
2641
- const resolvedComponentsProps = resolveComponentProps(externalSlotProps, ownerState);
2642
- const {
2643
- props: mergedProps,
2644
- internalRef
2645
- } = mergeSlotProps(_extends({}, rest, {
2646
- externalSlotProps: resolvedComponentsProps
2647
- }));
2648
- const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref);
2649
- const props = appendOwnerState(elementType, _extends({}, mergedProps, {
2650
- ref
2651
- }), ownerState);
2652
- return props;
2653
- }
2654
-
2655
- createSvgIcon( /*#__PURE__*/jsx("path", {
2656
- d: "M7 10l5 5 5-5z"
2657
- }), 'ArrowDropDown');
2658
-
2659
- /**
2660
- * @ignore - internal component.
2661
- */
2662
- const ArrowLeft = createSvgIcon( /*#__PURE__*/jsx("path", {
2663
- d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"
2664
- }), 'ArrowLeft');
2665
-
2666
- /**
2667
- * @ignore - internal component.
2668
- */
2669
- const ArrowRight = createSvgIcon( /*#__PURE__*/jsx("path", {
2670
- d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
2671
- }), 'ArrowRight');
2672
-
2673
- /**
2674
- * @ignore - internal component.
2675
- */
2676
- createSvgIcon( /*#__PURE__*/jsx("path", {
2677
- d: "M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"
2678
- }), 'Calendar');
2679
-
2680
- /**
2681
- * @ignore - internal component.
2682
- */
2683
- createSvgIcon( /*#__PURE__*/jsxs(React.Fragment, {
2684
- children: [/*#__PURE__*/jsx("path", {
2685
- d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
2686
- }), /*#__PURE__*/jsx("path", {
2687
- d: "M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"
2688
- })]
2689
- }), 'Clock');
2690
-
2691
- /**
2692
- * @ignore - internal component.
2693
- */
2694
- createSvgIcon( /*#__PURE__*/jsx("path", {
2695
- d: "M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"
2696
- }), 'DateRange');
2697
-
2698
- /**
2699
- * @ignore - internal component.
2700
- */
2701
- createSvgIcon( /*#__PURE__*/jsxs(React.Fragment, {
2702
- children: [/*#__PURE__*/jsx("path", {
2703
- d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
2704
- }), /*#__PURE__*/jsx("path", {
2705
- d: "M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"
2706
- })]
2707
- }), 'Time');
2708
-
2709
- function getPickersArrowSwitcherUtilityClass(slot) {
2710
- return generateUtilityClass('MuiPickersArrowSwitcher', slot);
2711
- }
2712
- generateUtilityClasses('MuiPickersArrowSwitcher', ['root', 'spacer', 'button']);
2713
-
2714
- const _excluded$3 = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel"],
2715
- _excluded2 = ["ownerState"],
2716
- _excluded3 = ["ownerState"];
2717
- const PickersArrowSwitcherRoot = styled('div', {
2718
- name: 'MuiPickersArrowSwitcher',
2719
- slot: 'Root',
2720
- overridesResolver: (props, styles) => styles.root
2721
- })({
2722
- display: 'flex'
2723
- });
2724
- const PickersArrowSwitcherSpacer = styled('div', {
2725
- name: 'MuiPickersArrowSwitcher',
2726
- slot: 'Spacer',
2727
- overridesResolver: (props, styles) => styles.spacer
2728
- })(({
2729
- theme
2730
- }) => ({
2731
- width: theme.spacing(3)
2732
- }));
2733
- const PickersArrowSwitcherButton = styled(IconButton, {
2734
- name: 'MuiPickersArrowSwitcher',
2735
- slot: 'Button',
2736
- overridesResolver: (props, styles) => styles.button
2737
- })(({
2738
- ownerState
2739
- }) => _extends({}, ownerState.hidden && {
2740
- visibility: 'hidden'
2741
- }));
2742
- const useUtilityClasses$4 = ownerState => {
2743
- const {
2744
- classes
2745
- } = ownerState;
2746
- const slots = {
2747
- root: ['root'],
2748
- spacer: ['spacer'],
2749
- button: ['button']
2750
- };
2751
- return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes);
2752
- };
2753
- const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function PickersArrowSwitcher(inProps, ref) {
2754
- var _slots$previousIconBu, _slots$nextIconButton, _slots$leftArrowIcon, _slots$rightArrowIcon;
2755
- const theme = useTheme();
2756
- const isRTL = theme.direction === 'rtl';
2757
- const props = useThemeProps({
2758
- props: inProps,
2759
- name: 'MuiPickersArrowSwitcher'
2760
- });
2761
- const {
2762
- children,
2763
- className,
2764
- slots,
2765
- slotProps,
2766
- isNextDisabled,
2767
- isNextHidden,
2768
- onGoToNext,
2769
- nextLabel,
2770
- isPreviousDisabled,
2771
- isPreviousHidden,
2772
- onGoToPrevious,
2773
- previousLabel
2774
- } = props,
2775
- other = _objectWithoutPropertiesLoose(props, _excluded$3);
2776
- const ownerState = props;
2777
- const classes = useUtilityClasses$4(ownerState);
2778
- const nextProps = {
2779
- isDisabled: isNextDisabled,
2780
- isHidden: isNextHidden,
2781
- goTo: onGoToNext,
2782
- label: nextLabel
2783
- };
2784
- const previousProps = {
2785
- isDisabled: isPreviousDisabled,
2786
- isHidden: isPreviousHidden,
2787
- goTo: onGoToPrevious,
2788
- label: previousLabel
2789
- };
2790
- const [leftProps, rightProps] = isRTL ? [nextProps, previousProps] : [previousProps, nextProps];
2791
- const PreviousIconButton = (_slots$previousIconBu = slots == null ? void 0 : slots.previousIconButton) != null ? _slots$previousIconBu : PickersArrowSwitcherButton;
2792
- const previousIconButtonProps = useSlotProps({
2793
- elementType: PreviousIconButton,
2794
- externalSlotProps: slotProps == null ? void 0 : slotProps.previousIconButton,
2795
- additionalProps: {
2796
- size: 'medium',
2797
- title: leftProps.label,
2798
- 'aria-label': leftProps.label,
2799
- disabled: leftProps.isDisabled,
2800
- edge: 'end',
2801
- onClick: leftProps.goTo
2802
- },
2803
- ownerState: _extends({}, ownerState, {
2804
- hidden: leftProps.isHidden
2805
- }),
2806
- className: classes.button
2807
- });
2808
- const NextIconButton = (_slots$nextIconButton = slots == null ? void 0 : slots.nextIconButton) != null ? _slots$nextIconButton : PickersArrowSwitcherButton;
2809
- const nextIconButtonProps = useSlotProps({
2810
- elementType: NextIconButton,
2811
- externalSlotProps: slotProps == null ? void 0 : slotProps.nextIconButton,
2812
- additionalProps: {
2813
- size: 'medium',
2814
- title: rightProps.label,
2815
- 'aria-label': rightProps.label,
2816
- disabled: rightProps.isDisabled,
2817
- edge: 'start',
2818
- onClick: rightProps.goTo
2819
- },
2820
- ownerState: _extends({}, ownerState, {
2821
- hidden: rightProps.isHidden
2822
- }),
2823
- className: classes.button
2824
- });
2825
- const LeftArrowIcon = (_slots$leftArrowIcon = slots == null ? void 0 : slots.leftArrowIcon) != null ? _slots$leftArrowIcon : ArrowLeft;
2826
- // The spread is here to avoid this bug mui/material-ui#34056
2827
- const _useSlotProps = useSlotProps({
2828
- elementType: LeftArrowIcon,
2829
- externalSlotProps: slotProps == null ? void 0 : slotProps.leftArrowIcon,
2830
- additionalProps: {
2831
- fontSize: 'inherit'
2832
- },
2833
- ownerState: undefined
2834
- }),
2835
- leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
2836
- const RightArrowIcon = (_slots$rightArrowIcon = slots == null ? void 0 : slots.rightArrowIcon) != null ? _slots$rightArrowIcon : ArrowRight;
2837
- // The spread is here to avoid this bug mui/material-ui#34056
2838
- const _useSlotProps2 = useSlotProps({
2839
- elementType: RightArrowIcon,
2840
- externalSlotProps: slotProps == null ? void 0 : slotProps.rightArrowIcon,
2841
- additionalProps: {
2842
- fontSize: 'inherit'
2843
- },
2844
- ownerState: undefined
2845
- }),
2846
- rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);
2847
- return /*#__PURE__*/jsxs(PickersArrowSwitcherRoot, _extends({
2848
- ref: ref,
2849
- className: clsx(classes.root, className),
2850
- ownerState: ownerState
2851
- }, other, {
2852
- children: [/*#__PURE__*/jsx(PreviousIconButton, _extends({}, previousIconButtonProps, {
2853
- children: isRTL ? /*#__PURE__*/jsx(RightArrowIcon, _extends({}, rightArrowIconProps)) : /*#__PURE__*/jsx(LeftArrowIcon, _extends({}, leftArrowIconProps))
2854
- })), children ? /*#__PURE__*/jsx(Typography, {
2855
- variant: "subtitle1",
2856
- component: "span",
2857
- children: children
2858
- }) : /*#__PURE__*/jsx(PickersArrowSwitcherSpacer, {
2859
- className: classes.spacer,
2860
- ownerState: ownerState
2861
- }), /*#__PURE__*/jsx(NextIconButton, _extends({}, nextIconButtonProps, {
2862
- children: isRTL ? /*#__PURE__*/jsx(LeftArrowIcon, _extends({}, leftArrowIconProps)) : /*#__PURE__*/jsx(RightArrowIcon, _extends({}, rightArrowIconProps))
2863
- }))]
2864
- }));
912
+ Search: Search,
913
+ Resize: Resize,
914
+ PresetWorkspace: PresetWorkspace,
915
+ Preset: Preset,
916
+ PresetTiles: PresetTiles,
917
+ List: List,
918
+ Home: Home,
919
+ Minus: Minus,
920
+ Equalizer: Equalizer,
921
+ Link: Link,
922
+ LinkOff: LinkOff,
923
+ Cached: Cached,
924
+ CalendarToday: CalendarToday,
925
+ WebAssetOff: WebAssetOff,
926
+ Notifications: Notifications,
927
+ Update: Update,
928
+ SubdirectoryArrowRight: SubdirectoryArrowRight,
929
+ Speed: Speed,
930
+ DimensionsElevation: DimensionsElevation,
931
+ DimensionsTime: DimensionsTime,
932
+ DimensionsRefTime: DimensionsRefTime,
933
+ DimensionsOther: DimensionsOther,
934
+ Picture: Picture,
935
+ CollapseWindow: CollapseWindow,
936
+ ExpandWindow: ExpandWindow,
937
+ CollapseLarge: CollapseLarge,
938
+ CollapseMedium: CollapseMedium,
939
+ CollapseSmall: CollapseSmall,
940
+ ExitDomain: ExitDomain,
941
+ Menu: Menu,
942
+ None: None,
943
+ Both: Both,
944
+ Share: Share,
945
+ Snow: Snow,
946
+ Wind: Wind,
947
+ Rain: Rain,
948
+ Lightning: Lightning,
949
+ Fog: Fog,
950
+ CoastalEvent: CoastalEvent,
951
+ TemperatureHigh: TemperatureHigh,
952
+ TemperatureLow: TemperatureLow,
953
+ LockUnlocked: LockUnlocked,
954
+ LockLocked: LockLocked,
955
+ ArrowDropDownDown: ArrowDropDownDown,
956
+ ArrowDropDownUp: ArrowDropDownUp,
957
+ WorldMapProjection: WorldMapProjection,
958
+ FunnelCloud: FunnelCloud
2865
959
  });
2866
960
 
2867
- const getMeridiem = (date, utils) => {
2868
- if (!date) {
2869
- return null;
2870
- }
2871
- return utils.getHours(date) >= 12 ? 'pm' : 'am';
2872
- };
2873
- const convertValueToMeridiem = (value, meridiem, ampm) => {
2874
- if (ampm) {
2875
- const currentMeridiem = value >= 12 ? 'pm' : 'am';
2876
- if (currentMeridiem !== meridiem) {
2877
- return meridiem === 'am' ? value - 12 : value + 12;
2878
- }
2879
- }
2880
- return value;
2881
- };
2882
- const convertToMeridiem = (time, meridiem, ampm, utils) => {
2883
- const newHoursAmount = convertValueToMeridiem(utils.getHours(time), meridiem, ampm);
2884
- return utils.setHours(time, newHoursAmount);
2885
- };
2886
- const getSecondsInDay = (date, utils) => {
2887
- return utils.getHours(date) * 3600 + utils.getMinutes(date) * 60 + utils.getSeconds(date);
2888
- };
2889
- const createIsAfterIgnoreDatePart = (disableIgnoringDatePartForTimeValidation, utils) => (dateLeft, dateRight) => {
2890
- if (disableIgnoringDatePartForTimeValidation) {
2891
- return utils.isAfter(dateLeft, dateRight);
2892
- }
2893
- return getSecondsInDay(dateLeft, utils) > getSecondsInDay(dateRight, utils);
2894
- };
2895
-
2896
- let warnedOnceNotValidView = false;
2897
- function useViews({
2898
- onChange,
2899
- onViewChange,
2900
- openTo,
2901
- view: inView,
2902
- views,
2903
- autoFocus,
2904
- focusedView: inFocusedView,
2905
- onFocusedViewChange
2906
- }) {
2907
- var _views, _views2;
2908
- if (process.env.NODE_ENV !== 'production') {
2909
- if (!warnedOnceNotValidView) {
2910
- if (inView != null && !views.includes(inView)) {
2911
- console.warn(`MUI: \`view="${inView}"\` is not a valid prop.`, `It must be an element of \`views=["${views.join('", "')}"]\`.`);
2912
- warnedOnceNotValidView = true;
2913
- }
2914
- if (inView == null && openTo != null && !views.includes(openTo)) {
2915
- console.warn(`MUI: \`openTo="${openTo}"\` is not a valid prop.`, `It must be an element of \`views=["${views.join('", "')}"]\`.`);
2916
- warnedOnceNotValidView = true;
961
+ function _iterableToArrayLimit(r, l) {
962
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
963
+ if (null != t) {
964
+ var e,
965
+ n,
966
+ i,
967
+ u,
968
+ a = [],
969
+ f = !0,
970
+ o = !1;
971
+ try {
972
+ if (i = (t = t.call(r)).next, 0 === l) {
973
+ if (Object(t) !== t) return;
974
+ f = !1;
975
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
976
+ } catch (r) {
977
+ o = !0, n = r;
978
+ } finally {
979
+ try {
980
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
981
+ } finally {
982
+ if (o) throw n;
2917
983
  }
2918
984
  }
985
+ return a;
2919
986
  }
2920
- const previousOpenTo = React.useRef(openTo);
2921
- const previousViews = React.useRef(views);
2922
- const defaultView = React.useRef(views.includes(openTo) ? openTo : views[0]);
2923
- const [view, setView] = useControlled({
2924
- name: 'useViews',
2925
- state: 'view',
2926
- controlled: inView,
2927
- default: defaultView.current
2928
- });
2929
- const defaultFocusedView = React.useRef(autoFocus ? view : null);
2930
- const [focusedView, setFocusedView] = useControlled({
2931
- name: 'useViews',
2932
- state: 'focusedView',
2933
- controlled: inFocusedView,
2934
- default: defaultFocusedView.current
2935
- });
2936
- React.useEffect(() => {
2937
- // Update the current view when `openTo` or `views` props change
2938
- if (previousOpenTo.current && previousOpenTo.current !== openTo || previousViews.current && previousViews.current.some(previousView => !views.includes(previousView))) {
2939
- setView(views.includes(openTo) ? openTo : views[0]);
2940
- }
2941
- }, [openTo, setView, view, views]);
2942
- const viewIndex = views.indexOf(view);
2943
- const previousView = (_views = views[viewIndex - 1]) != null ? _views : null;
2944
- const nextView = (_views2 = views[viewIndex + 1]) != null ? _views2 : null;
2945
- const handleChangeView = useEventCallback(newView => {
2946
- setView(newView);
2947
- if (onViewChange) {
2948
- onViewChange(newView);
2949
- }
2950
- });
2951
- const goToNextView = useEventCallback(() => {
2952
- if (nextView) {
2953
- handleChangeView(nextView);
2954
- }
2955
- });
2956
- const setValueAndGoToNextView = useEventCallback((value, currentViewSelectionState) => {
2957
- const isSelectionFinishedOnCurrentView = currentViewSelectionState === 'finish';
2958
- const globalSelectionState = isSelectionFinishedOnCurrentView && Boolean(nextView) ? 'partial' : currentViewSelectionState;
2959
- onChange(value, globalSelectionState);
2960
- if (isSelectionFinishedOnCurrentView) {
2961
- goToNextView();
2962
- }
2963
- });
2964
- const handleFocusedViewChange = useEventCallback((viewToFocus, hasFocus) => {
2965
- if (hasFocus) {
2966
- // Focus event
2967
- setFocusedView(viewToFocus);
2968
- } else {
2969
- // Blur event
2970
- setFocusedView(prevFocusedView => viewToFocus === prevFocusedView ? null : prevFocusedView // If false the blur is due to view switching
2971
- );
2972
- }
2973
-
2974
- onFocusedViewChange == null ? void 0 : onFocusedViewChange(viewToFocus, hasFocus);
2975
- });
2976
- return {
2977
- view,
2978
- setView: handleChangeView,
2979
- focusedView,
2980
- setFocusedView: handleFocusedViewChange,
2981
- nextView,
2982
- previousView,
2983
- defaultView: defaultView.current,
2984
- goToNextView,
2985
- setValueAndGoToNextView
2986
- };
2987
- }
2988
-
2989
- function useMeridiemMode(date, ampm, onChange) {
2990
- const utils = useUtils();
2991
- const meridiemMode = getMeridiem(date, utils);
2992
- const handleMeridiemChange = React.useCallback(mode => {
2993
- const timeWithMeridiem = date == null ? null : convertToMeridiem(date, mode, Boolean(ampm), utils);
2994
- onChange(timeWithMeridiem, 'partial');
2995
- }, [ampm, date, onChange, utils]);
2996
- return {
2997
- meridiemMode,
2998
- handleMeridiemChange
2999
- };
3000
- }
3001
-
3002
- const DIALOG_WIDTH = 320;
3003
- const VIEW_HEIGHT = 358;
3004
-
3005
- const PickerViewRoot = styled('div')({
3006
- overflow: 'hidden',
3007
- width: DIALOG_WIDTH,
3008
- maxHeight: VIEW_HEIGHT,
3009
- display: 'flex',
3010
- flexDirection: 'column',
3011
- margin: '0 auto'
3012
- });
3013
-
3014
- function getTimeClockUtilityClass(slot) {
3015
- return generateUtilityClass('MuiTimeClock', slot);
3016
987
  }
3017
- generateUtilityClasses('MuiTimeClock', ['root', 'arrowSwitcher']);
3018
-
3019
- const CLOCK_WIDTH = 220;
3020
- const CLOCK_HOUR_WIDTH = 36;
3021
- const clockCenter = {
3022
- x: CLOCK_WIDTH / 2,
3023
- y: CLOCK_WIDTH / 2
3024
- };
3025
- const baseClockPoint = {
3026
- x: clockCenter.x,
3027
- y: 0
3028
- };
3029
- const cx = baseClockPoint.x - clockCenter.x;
3030
- const cy = baseClockPoint.y - clockCenter.y;
3031
- const rad2deg = rad => rad * (180 / Math.PI);
3032
- const getAngleValue = (step, offsetX, offsetY) => {
3033
- const x = offsetX - clockCenter.x;
3034
- const y = offsetY - clockCenter.y;
3035
- const atan = Math.atan2(cx, cy) - Math.atan2(x, y);
3036
- let deg = rad2deg(atan);
3037
- deg = Math.round(deg / step) * step;
3038
- deg %= 360;
3039
- const value = Math.floor(deg / step) || 0;
3040
- const delta = x ** 2 + y ** 2;
3041
- const distance = Math.sqrt(delta);
3042
- return {
3043
- value,
3044
- distance
3045
- };
3046
- };
3047
- const getMinutes = (offsetX, offsetY, step = 1) => {
3048
- const angleStep = step * 6;
3049
- let {
3050
- value
3051
- } = getAngleValue(angleStep, offsetX, offsetY);
3052
- value = value * step % 60;
3053
- return value;
3054
- };
3055
- const getHours = (offsetX, offsetY, ampm) => {
3056
- const {
3057
- value,
3058
- distance
3059
- } = getAngleValue(30, offsetX, offsetY);
3060
- let hour = value || 12;
3061
- if (!ampm) {
3062
- if (distance < CLOCK_WIDTH / 2 - CLOCK_HOUR_WIDTH) {
3063
- hour += 12;
3064
- hour %= 24;
3065
- }
988
+ function _defineProperty(obj, key, value) {
989
+ key = _toPropertyKey(key);
990
+ if (key in obj) {
991
+ Object.defineProperty(obj, key, {
992
+ value: value,
993
+ enumerable: true,
994
+ configurable: true,
995
+ writable: true
996
+ });
3066
997
  } else {
3067
- hour %= 12;
998
+ obj[key] = value;
3068
999
  }
3069
- return hour;
3070
- };
3071
-
3072
- function getClockPointerUtilityClass(slot) {
3073
- return generateUtilityClass('MuiClockPointer', slot);
1000
+ return obj;
3074
1001
  }
3075
- generateUtilityClasses('MuiClockPointer', ['root', 'thumb']);
3076
-
3077
- const _excluded$2 = ["className", "hasSelected", "isInner", "type", "viewValue"];
3078
- const useUtilityClasses$3 = ownerState => {
3079
- const {
3080
- classes
3081
- } = ownerState;
3082
- const slots = {
3083
- root: ['root'],
3084
- thumb: ['thumb']
3085
- };
3086
- return composeClasses(slots, getClockPointerUtilityClass, classes);
3087
- };
3088
- const ClockPointerRoot = styled('div', {
3089
- name: 'MuiClockPointer',
3090
- slot: 'Root',
3091
- overridesResolver: (_, styles) => styles.root
3092
- })(({
3093
- theme,
3094
- ownerState
3095
- }) => _extends({
3096
- width: 2,
3097
- backgroundColor: (theme.vars || theme).palette.primary.main,
3098
- position: 'absolute',
3099
- left: 'calc(50% - 1px)',
3100
- bottom: '50%',
3101
- transformOrigin: 'center bottom 0px'
3102
- }, ownerState.shouldAnimate && {
3103
- transition: theme.transitions.create(['transform', 'height'])
3104
- }));
3105
- const ClockPointerThumb = styled('div', {
3106
- name: 'MuiClockPointer',
3107
- slot: 'Thumb',
3108
- overridesResolver: (_, styles) => styles.thumb
3109
- })(({
3110
- theme,
3111
- ownerState
3112
- }) => _extends({
3113
- width: 4,
3114
- height: 4,
3115
- backgroundColor: (theme.vars || theme).palette.primary.contrastText,
3116
- borderRadius: '50%',
3117
- position: 'absolute',
3118
- top: -21,
3119
- left: `calc(50% - ${CLOCK_HOUR_WIDTH / 2}px)`,
3120
- border: `${(CLOCK_HOUR_WIDTH - 4) / 2}px solid ${(theme.vars || theme).palette.primary.main}`,
3121
- boxSizing: 'content-box'
3122
- }, ownerState.hasSelected && {
3123
- backgroundColor: (theme.vars || theme).palette.primary.main
3124
- }));
3125
-
3126
- /**
3127
- * @ignore - internal component.
3128
- */
3129
- function ClockPointer(inProps) {
3130
- const props = useThemeProps({
3131
- props: inProps,
3132
- name: 'MuiClockPointer'
3133
- });
3134
- const {
3135
- className,
3136
- isInner,
3137
- type,
3138
- viewValue
3139
- } = props,
3140
- other = _objectWithoutPropertiesLoose(props, _excluded$2);
3141
- const previousType = React.useRef(type);
3142
- React.useEffect(() => {
3143
- previousType.current = type;
3144
- }, [type]);
3145
- const ownerState = _extends({}, props, {
3146
- shouldAnimate: previousType.current !== type
3147
- });
3148
- const classes = useUtilityClasses$3(ownerState);
3149
- const getAngleStyle = () => {
3150
- const max = type === 'hours' ? 12 : 60;
3151
- let angle = 360 / max * viewValue;
3152
- if (type === 'hours' && viewValue > 12) {
3153
- angle -= 360; // round up angle to max 360 degrees
3154
- }
3155
-
3156
- return {
3157
- height: Math.round((isInner ? 0.26 : 0.4) * CLOCK_WIDTH),
3158
- transform: `rotateZ(${angle}deg)`
3159
- };
3160
- };
3161
- return /*#__PURE__*/jsx(ClockPointerRoot, _extends({
3162
- style: getAngleStyle(),
3163
- className: clsx(className, classes.root),
3164
- ownerState: ownerState
3165
- }, other, {
3166
- children: /*#__PURE__*/jsx(ClockPointerThumb, {
3167
- ownerState: ownerState,
3168
- className: classes.thumb
3169
- })
3170
- }));
1002
+ function _slicedToArray(arr, i) {
1003
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
3171
1004
  }
3172
-
3173
- function getClockUtilityClass(slot) {
3174
- return generateUtilityClass('MuiClock', slot);
1005
+ function _arrayWithHoles(arr) {
1006
+ if (Array.isArray(arr)) return arr;
3175
1007
  }
3176
- generateUtilityClasses('MuiClock', ['root', 'clock', 'wrapper', 'squareMask', 'pin', 'amButton', 'pmButton']);
3177
-
3178
- const useUtilityClasses$2 = ownerState => {
3179
- const {
3180
- classes
3181
- } = ownerState;
3182
- const slots = {
3183
- root: ['root'],
3184
- clock: ['clock'],
3185
- wrapper: ['wrapper'],
3186
- squareMask: ['squareMask'],
3187
- pin: ['pin'],
3188
- amButton: ['amButton'],
3189
- pmButton: ['pmButton']
3190
- };
3191
- return composeClasses(slots, getClockUtilityClass, classes);
3192
- };
3193
- const ClockRoot = styled('div', {
3194
- name: 'MuiClock',
3195
- slot: 'Root',
3196
- overridesResolver: (_, styles) => styles.root
3197
- })(({
3198
- theme
3199
- }) => ({
3200
- display: 'flex',
3201
- justifyContent: 'center',
3202
- alignItems: 'center',
3203
- margin: theme.spacing(2)
3204
- }));
3205
- const ClockClock = styled('div', {
3206
- name: 'MuiClock',
3207
- slot: 'Clock',
3208
- overridesResolver: (_, styles) => styles.clock
3209
- })({
3210
- backgroundColor: 'rgba(0,0,0,.07)',
3211
- borderRadius: '50%',
3212
- height: 220,
3213
- width: 220,
3214
- flexShrink: 0,
3215
- position: 'relative',
3216
- pointerEvents: 'none'
3217
- });
3218
- const ClockWrapper = styled('div', {
3219
- name: 'MuiClock',
3220
- slot: 'Wrapper',
3221
- overridesResolver: (_, styles) => styles.wrapper
3222
- })({
3223
- '&:focus': {
3224
- outline: 'none'
3225
- }
3226
- });
3227
- const ClockSquareMask = styled('div', {
3228
- name: 'MuiClock',
3229
- slot: 'SquareMask',
3230
- overridesResolver: (_, styles) => styles.squareMask
3231
- })(({
3232
- ownerState
3233
- }) => _extends({
3234
- width: '100%',
3235
- height: '100%',
3236
- position: 'absolute',
3237
- pointerEvents: 'auto',
3238
- outline: 0,
3239
- // Disable scroll capabilities.
3240
- touchAction: 'none',
3241
- userSelect: 'none'
3242
- }, ownerState.disabled ? {} : {
3243
- '@media (pointer: fine)': {
3244
- cursor: 'pointer',
3245
- borderRadius: '50%'
3246
- },
3247
- '&:active': {
3248
- cursor: 'move'
3249
- }
3250
- }));
3251
- const ClockPin = styled('div', {
3252
- name: 'MuiClock',
3253
- slot: 'Pin',
3254
- overridesResolver: (_, styles) => styles.pin
3255
- })(({
3256
- theme
3257
- }) => ({
3258
- width: 6,
3259
- height: 6,
3260
- borderRadius: '50%',
3261
- backgroundColor: (theme.vars || theme).palette.primary.main,
3262
- position: 'absolute',
3263
- top: '50%',
3264
- left: '50%',
3265
- transform: 'translate(-50%, -50%)'
3266
- }));
3267
- const ClockAmButton = styled(IconButton, {
3268
- name: 'MuiClock',
3269
- slot: 'AmButton',
3270
- overridesResolver: (_, styles) => styles.amButton
3271
- })(({
3272
- theme,
3273
- ownerState
3274
- }) => _extends({
3275
- zIndex: 1,
3276
- position: 'absolute',
3277
- bottom: 8,
3278
- left: 8
3279
- }, ownerState.meridiemMode === 'am' && {
3280
- backgroundColor: (theme.vars || theme).palette.primary.main,
3281
- color: (theme.vars || theme).palette.primary.contrastText,
3282
- '&:hover': {
3283
- backgroundColor: (theme.vars || theme).palette.primary.light
3284
- }
3285
- }));
3286
- const ClockPmButton = styled(IconButton, {
3287
- name: 'MuiClock',
3288
- slot: 'PmButton',
3289
- overridesResolver: (_, styles) => styles.pmButton
3290
- })(({
3291
- theme,
3292
- ownerState
3293
- }) => _extends({
3294
- zIndex: 1,
3295
- position: 'absolute',
3296
- bottom: 8,
3297
- right: 8
3298
- }, ownerState.meridiemMode === 'pm' && {
3299
- backgroundColor: (theme.vars || theme).palette.primary.main,
3300
- color: (theme.vars || theme).palette.primary.contrastText,
3301
- '&:hover': {
3302
- backgroundColor: (theme.vars || theme).palette.primary.light
3303
- }
3304
- }));
3305
-
3306
- /**
3307
- * @ignore - internal component.
3308
- */
3309
- function Clock(inProps) {
3310
- const props = useThemeProps({
3311
- props: inProps,
3312
- name: 'MuiClock'
3313
- });
3314
- const {
3315
- ampm,
3316
- ampmInClock,
3317
- autoFocus,
3318
- children,
3319
- value,
3320
- handleMeridiemChange,
3321
- isTimeDisabled,
3322
- meridiemMode,
3323
- minutesStep = 1,
3324
- onChange,
3325
- selectedId,
3326
- type,
3327
- viewValue,
3328
- disabled,
3329
- readOnly,
3330
- className
3331
- } = props;
3332
- const ownerState = props;
3333
- const utils = useUtils();
3334
- const localeText = useLocaleText();
3335
- const isMoving = React.useRef(false);
3336
- const classes = useUtilityClasses$2(ownerState);
3337
- const isSelectedTimeDisabled = isTimeDisabled(viewValue, type);
3338
- const isPointerInner = !ampm && type === 'hours' && (viewValue < 1 || viewValue > 12);
3339
- const handleValueChange = (newValue, isFinish) => {
3340
- if (disabled || readOnly) {
3341
- return;
3342
- }
3343
- if (isTimeDisabled(newValue, type)) {
3344
- return;
3345
- }
3346
- onChange(newValue, isFinish);
3347
- };
3348
- const setTime = (event, isFinish) => {
3349
- let {
3350
- offsetX,
3351
- offsetY
3352
- } = event;
3353
- if (offsetX === undefined) {
3354
- const rect = event.target.getBoundingClientRect();
3355
- offsetX = event.changedTouches[0].clientX - rect.left;
3356
- offsetY = event.changedTouches[0].clientY - rect.top;
3357
- }
3358
- const newSelectedValue = type === 'seconds' || type === 'minutes' ? getMinutes(offsetX, offsetY, minutesStep) : getHours(offsetX, offsetY, Boolean(ampm));
3359
- handleValueChange(newSelectedValue, isFinish);
3360
- };
3361
- const handleTouchMove = event => {
3362
- isMoving.current = true;
3363
- setTime(event, 'shallow');
3364
- };
3365
- const handleTouchEnd = event => {
3366
- if (isMoving.current) {
3367
- setTime(event, 'finish');
3368
- isMoving.current = false;
3369
- }
3370
- };
3371
- const handleMouseMove = event => {
3372
- // event.buttons & PRIMARY_MOUSE_BUTTON
3373
- if (event.buttons > 0) {
3374
- setTime(event.nativeEvent, 'shallow');
3375
- }
3376
- };
3377
- const handleMouseUp = event => {
3378
- if (isMoving.current) {
3379
- isMoving.current = false;
3380
- }
3381
- setTime(event.nativeEvent, 'finish');
3382
- };
3383
- const hasSelected = React.useMemo(() => {
3384
- if (type === 'hours') {
3385
- return true;
3386
- }
3387
- return viewValue % 5 === 0;
3388
- }, [type, viewValue]);
3389
- const keyboardControlStep = type === 'minutes' ? minutesStep : 1;
3390
- const listboxRef = React.useRef(null);
3391
- // Since this is rendered when a Popper is opened we can't use passive effects.
3392
- // Focusing in passive effects in Popper causes scroll jump.
3393
- useEnhancedEffect$1(() => {
3394
- if (autoFocus) {
3395
- // The ref not being resolved would be a bug in MUI.
3396
- listboxRef.current.focus();
3397
- }
3398
- }, [autoFocus]);
3399
- const handleKeyDown = event => {
3400
- // TODO: Why this early exit?
3401
- if (isMoving.current) {
3402
- return;
3403
- }
3404
- switch (event.key) {
3405
- case 'Home':
3406
- // annulate both hours and minutes
3407
- handleValueChange(0, 'partial');
3408
- event.preventDefault();
3409
- break;
3410
- case 'End':
3411
- handleValueChange(type === 'minutes' ? 59 : 23, 'partial');
3412
- event.preventDefault();
3413
- break;
3414
- case 'ArrowUp':
3415
- handleValueChange(viewValue + keyboardControlStep, 'partial');
3416
- event.preventDefault();
3417
- break;
3418
- case 'ArrowDown':
3419
- handleValueChange(viewValue - keyboardControlStep, 'partial');
3420
- event.preventDefault();
3421
- break;
3422
- // do nothing
3423
- }
3424
- };
3425
-
3426
- return /*#__PURE__*/jsxs(ClockRoot, {
3427
- className: clsx(className, classes.root),
3428
- children: [/*#__PURE__*/jsxs(ClockClock, {
3429
- className: classes.clock,
3430
- children: [/*#__PURE__*/jsx(ClockSquareMask, {
3431
- onTouchMove: handleTouchMove,
3432
- onTouchEnd: handleTouchEnd,
3433
- onMouseUp: handleMouseUp,
3434
- onMouseMove: handleMouseMove,
3435
- ownerState: {
3436
- disabled
3437
- },
3438
- className: classes.squareMask
3439
- }), !isSelectedTimeDisabled && /*#__PURE__*/jsxs(React.Fragment, {
3440
- children: [/*#__PURE__*/jsx(ClockPin, {
3441
- className: classes.pin
3442
- }), value != null && /*#__PURE__*/jsx(ClockPointer, {
3443
- type: type,
3444
- viewValue: viewValue,
3445
- isInner: isPointerInner,
3446
- hasSelected: hasSelected
3447
- })]
3448
- }), /*#__PURE__*/jsx(ClockWrapper, {
3449
- "aria-activedescendant": selectedId,
3450
- "aria-label": localeText.clockLabelText(type, value, utils),
3451
- ref: listboxRef,
3452
- role: "listbox",
3453
- onKeyDown: handleKeyDown,
3454
- tabIndex: 0,
3455
- className: classes.wrapper,
3456
- children: children
3457
- })]
3458
- }), ampm && ampmInClock && /*#__PURE__*/jsxs(React.Fragment, {
3459
- children: [/*#__PURE__*/jsx(ClockAmButton, {
3460
- onClick: readOnly ? undefined : () => handleMeridiemChange('am'),
3461
- disabled: disabled || meridiemMode === null,
3462
- ownerState: ownerState,
3463
- className: classes.amButton,
3464
- children: /*#__PURE__*/jsx(Typography, {
3465
- variant: "caption",
3466
- children: "AM"
3467
- })
3468
- }), /*#__PURE__*/jsx(ClockPmButton, {
3469
- disabled: disabled || meridiemMode === null,
3470
- onClick: readOnly ? undefined : () => handleMeridiemChange('pm'),
3471
- ownerState: ownerState,
3472
- className: classes.pmButton,
3473
- children: /*#__PURE__*/jsx(Typography, {
3474
- variant: "caption",
3475
- children: "PM"
3476
- })
3477
- })]
3478
- })]
3479
- });
1008
+ function _unsupportedIterableToArray(o, minLen) {
1009
+ if (!o) return;
1010
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1011
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1012
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1013
+ if (n === "Map" || n === "Set") return Array.from(o);
1014
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
3480
1015
  }
3481
-
3482
- function getClockNumberUtilityClass(slot) {
3483
- return generateUtilityClass('MuiClockNumber', slot);
1016
+ function _arrayLikeToArray(arr, len) {
1017
+ if (len == null || len > arr.length) len = arr.length;
1018
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1019
+ return arr2;
3484
1020
  }
3485
- const clockNumberClasses = generateUtilityClasses('MuiClockNumber', ['root', 'selected', 'disabled']);
3486
-
3487
- const _excluded$1 = ["className", "disabled", "index", "inner", "label", "selected"];
3488
- const useUtilityClasses$1 = ownerState => {
3489
- const {
3490
- classes,
3491
- selected,
3492
- disabled
3493
- } = ownerState;
3494
- const slots = {
3495
- root: ['root', selected && 'selected', disabled && 'disabled']
3496
- };
3497
- return composeClasses(slots, getClockNumberUtilityClass, classes);
3498
- };
3499
- const ClockNumberRoot = styled('span', {
3500
- name: 'MuiClockNumber',
3501
- slot: 'Root',
3502
- overridesResolver: (_, styles) => [styles.root, {
3503
- [`&.${clockNumberClasses.disabled}`]: styles.disabled
3504
- }, {
3505
- [`&.${clockNumberClasses.selected}`]: styles.selected
3506
- }]
3507
- })(({
3508
- theme,
3509
- ownerState
3510
- }) => _extends({
3511
- height: CLOCK_HOUR_WIDTH,
3512
- width: CLOCK_HOUR_WIDTH,
3513
- position: 'absolute',
3514
- left: `calc((100% - ${CLOCK_HOUR_WIDTH}px) / 2)`,
3515
- display: 'inline-flex',
3516
- justifyContent: 'center',
3517
- alignItems: 'center',
3518
- borderRadius: '50%',
3519
- color: (theme.vars || theme).palette.text.primary,
3520
- fontFamily: theme.typography.fontFamily,
3521
- '&:focused': {
3522
- backgroundColor: (theme.vars || theme).palette.background.paper
3523
- },
3524
- [`&.${clockNumberClasses.selected}`]: {
3525
- color: (theme.vars || theme).palette.primary.contrastText
3526
- },
3527
- [`&.${clockNumberClasses.disabled}`]: {
3528
- pointerEvents: 'none',
3529
- color: (theme.vars || theme).palette.text.disabled
3530
- }
3531
- }, ownerState.inner && _extends({}, theme.typography.body2, {
3532
- color: (theme.vars || theme).palette.text.secondary
3533
- })));
3534
-
3535
- /**
3536
- * @ignore - internal component.
3537
- */
3538
- function ClockNumber(inProps) {
3539
- const props = useThemeProps({
3540
- props: inProps,
3541
- name: 'MuiClockNumber'
3542
- });
3543
- const {
3544
- className,
3545
- disabled,
3546
- index,
3547
- inner,
3548
- label,
3549
- selected
3550
- } = props,
3551
- other = _objectWithoutPropertiesLoose(props, _excluded$1);
3552
- const ownerState = props;
3553
- const classes = useUtilityClasses$1(ownerState);
3554
- const angle = index % 12 / 12 * Math.PI * 2 - Math.PI / 2;
3555
- const length = (CLOCK_WIDTH - CLOCK_HOUR_WIDTH - 2) / 2 * (inner ? 0.65 : 1);
3556
- const x = Math.round(Math.cos(angle) * length);
3557
- const y = Math.round(Math.sin(angle) * length);
3558
- return /*#__PURE__*/jsx(ClockNumberRoot, _extends({
3559
- className: clsx(className, classes.root),
3560
- "aria-disabled": disabled ? true : undefined,
3561
- "aria-selected": selected ? true : undefined,
3562
- role: "option",
3563
- style: {
3564
- transform: `translate(${x}px, ${y + (CLOCK_WIDTH - CLOCK_HOUR_WIDTH) / 2}px`
3565
- },
3566
- ownerState: ownerState
3567
- }, other, {
3568
- children: label
3569
- }));
1021
+ function _nonIterableRest() {
1022
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3570
1023
  }
3571
-
3572
- /**
3573
- * @ignore - internal component.
3574
- */
3575
- const getHourNumbers = ({
3576
- ampm,
3577
- value,
3578
- getClockNumberText,
3579
- isDisabled,
3580
- selectedId,
3581
- utils
3582
- }) => {
3583
- const currentHours = value ? utils.getHours(value) : null;
3584
- const hourNumbers = [];
3585
- const startHour = ampm ? 1 : 0;
3586
- const endHour = ampm ? 12 : 23;
3587
- const isSelected = hour => {
3588
- if (currentHours === null) {
3589
- return false;
3590
- }
3591
- if (ampm) {
3592
- if (hour === 12) {
3593
- return currentHours === 12 || currentHours === 0;
3594
- }
3595
- return currentHours === hour || currentHours - 12 === hour;
3596
- }
3597
- return currentHours === hour;
3598
- };
3599
- for (let hour = startHour; hour <= endHour; hour += 1) {
3600
- let label = hour.toString();
3601
- if (hour === 0) {
3602
- label = '00';
3603
- }
3604
- const inner = !ampm && (hour === 0 || hour > 12);
3605
- label = utils.formatNumber(label);
3606
- const selected = isSelected(hour);
3607
- hourNumbers.push( /*#__PURE__*/jsx(ClockNumber, {
3608
- id: selected ? selectedId : undefined,
3609
- index: hour,
3610
- inner: inner,
3611
- selected: selected,
3612
- disabled: isDisabled(hour),
3613
- label: label,
3614
- "aria-label": getClockNumberText(label)
3615
- }, hour));
3616
- }
3617
- return hourNumbers;
3618
- };
3619
- const getMinutesNumbers = ({
3620
- utils,
3621
- value,
3622
- isDisabled,
3623
- getClockNumberText,
3624
- selectedId
3625
- }) => {
3626
- const f = utils.formatNumber;
3627
- return [[5, f('05')], [10, f('10')], [15, f('15')], [20, f('20')], [25, f('25')], [30, f('30')], [35, f('35')], [40, f('40')], [45, f('45')], [50, f('50')], [55, f('55')], [0, f('00')]].map(([numberValue, label], index) => {
3628
- const selected = numberValue === value;
3629
- return /*#__PURE__*/jsx(ClockNumber, {
3630
- label: label,
3631
- id: selected ? selectedId : undefined,
3632
- index: index + 1,
3633
- inner: false,
3634
- disabled: isDisabled(numberValue),
3635
- selected: selected,
3636
- "aria-label": getClockNumberText(label)
3637
- }, numberValue);
3638
- });
3639
- };
3640
-
3641
- // TODO v7: This file exist only to simplify typing between
3642
- // components/componentsProps and slots/slotProps
3643
- // Should be deleted when components/componentsProps are removed
3644
-
3645
- const uncapitalizeObjectKeys = capitalizedObject => {
3646
- if (capitalizedObject === undefined) {
3647
- return undefined;
1024
+ function _toPrimitive(input, hint) {
1025
+ if (typeof input !== "object" || input === null) return input;
1026
+ var prim = input[Symbol.toPrimitive];
1027
+ if (prim !== undefined) {
1028
+ var res = prim.call(input, hint || "default");
1029
+ if (typeof res !== "object") return res;
1030
+ throw new TypeError("@@toPrimitive must return a primitive value.");
3648
1031
  }
3649
- return Object.keys(capitalizedObject).reduce((acc, key) => _extends({}, acc, {
3650
- [`${key.slice(0, 1).toLowerCase()}${key.slice(1)}`]: capitalizedObject[key]
3651
- }), {});
3652
- };
3653
-
3654
- const _excluded = ["ampm", "ampmInClock", "autoFocus", "components", "componentsProps", "slots", "slotProps", "value", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableClock", "shouldDisableTime", "showViewSwitcher", "onChange", "defaultValue", "view", "views", "openTo", "onViewChange", "className", "disabled", "readOnly"];
3655
- const useUtilityClasses = ownerState => {
3656
- const {
3657
- classes
3658
- } = ownerState;
3659
- const slots = {
3660
- root: ['root'],
3661
- arrowSwitcher: ['arrowSwitcher']
3662
- };
3663
- return composeClasses(slots, getTimeClockUtilityClass, classes);
3664
- };
3665
- const TimeClockRoot = styled(PickerViewRoot, {
3666
- name: 'MuiTimeClock',
3667
- slot: 'Root',
3668
- overridesResolver: (props, styles) => styles.root
3669
- })({
3670
- display: 'flex',
3671
- flexDirection: 'column',
3672
- position: 'relative'
3673
- });
3674
- const TimeClockArrowSwitcher = styled(PickersArrowSwitcher, {
3675
- name: 'MuiTimeClock',
3676
- slot: 'ArrowSwitcher',
3677
- overridesResolver: (props, styles) => styles.arrowSwitcher
3678
- })({
3679
- position: 'absolute',
3680
- right: 12,
3681
- top: 15
3682
- });
3683
- /**
3684
- *
3685
- * API:
3686
- *
3687
- * - [TimeClock API](https://mui.com/x/api/date-pickers/time-clock/)
3688
- */
3689
- const TimeClock = /*#__PURE__*/React.forwardRef(function TimeClock(inProps, ref) {
3690
- const localeText = useLocaleText();
3691
- const now = useNow();
3692
- const utils = useUtils();
3693
- const props = useThemeProps({
3694
- props: inProps,
3695
- name: 'MuiTimeClock'
3696
- });
3697
- const {
3698
- ampm = utils.is12HourCycleInCurrentLocale(),
3699
- ampmInClock = false,
3700
- autoFocus,
3701
- components,
3702
- componentsProps,
3703
- slots: innerSlots,
3704
- slotProps: innerSlotProps,
3705
- value: valueProp,
3706
- disableIgnoringDatePartForTimeValidation = false,
3707
- maxTime,
3708
- minTime,
3709
- disableFuture,
3710
- disablePast,
3711
- minutesStep = 1,
3712
- shouldDisableClock,
3713
- shouldDisableTime,
3714
- showViewSwitcher,
3715
- onChange,
3716
- defaultValue,
3717
- view: inView,
3718
- views = ['hours', 'minutes'],
3719
- openTo,
3720
- onViewChange,
3721
- className,
3722
- disabled,
3723
- readOnly
3724
- } = props,
3725
- other = _objectWithoutPropertiesLoose(props, _excluded);
3726
- const slots = innerSlots != null ? innerSlots : uncapitalizeObjectKeys(components);
3727
- const slotProps = innerSlotProps != null ? innerSlotProps : componentsProps;
3728
- const [value, setValue] = useControlled({
3729
- name: 'DateCalendar',
3730
- state: 'value',
3731
- controlled: valueProp,
3732
- default: defaultValue != null ? defaultValue : null
3733
- });
3734
- const handleValueChange = useEventCallback((newValue, selectionState) => {
3735
- setValue(newValue);
3736
- onChange == null ? void 0 : onChange(newValue, selectionState);
3737
- });
3738
- const {
3739
- view,
3740
- setView,
3741
- previousView,
3742
- nextView,
3743
- setValueAndGoToNextView
3744
- } = useViews({
3745
- view: inView,
3746
- views,
3747
- openTo,
3748
- onViewChange,
3749
- onChange: handleValueChange
3750
- });
3751
- const selectedTimeOrMidnight = React.useMemo(() => value || utils.setSeconds(utils.setMinutes(utils.setHours(now, 0), 0), 0), [value, now, utils]);
3752
- const {
3753
- meridiemMode,
3754
- handleMeridiemChange
3755
- } = useMeridiemMode(selectedTimeOrMidnight, ampm, setValueAndGoToNextView);
3756
- const isTimeDisabled = React.useCallback((rawValue, viewType) => {
3757
- const isAfter = createIsAfterIgnoreDatePart(disableIgnoringDatePartForTimeValidation, utils);
3758
- const shouldCheckPastEnd = viewType === 'hours' || viewType === 'minutes' && views.includes('seconds');
3759
- const containsValidTime = ({
3760
- start,
3761
- end
3762
- }) => {
3763
- if (minTime && isAfter(minTime, end)) {
3764
- return false;
3765
- }
3766
- if (maxTime && isAfter(start, maxTime)) {
3767
- return false;
3768
- }
3769
- if (disableFuture && isAfter(start, now)) {
3770
- return false;
3771
- }
3772
- if (disablePast && isAfter(now, shouldCheckPastEnd ? end : start)) {
3773
- return false;
3774
- }
3775
- return true;
3776
- };
3777
- const isValidValue = (timeValue, step = 1) => {
3778
- if (timeValue % step !== 0) {
3779
- return false;
3780
- }
3781
- if (shouldDisableClock != null && shouldDisableClock(timeValue, viewType)) {
3782
- return false;
3783
- }
3784
- if (shouldDisableTime) {
3785
- switch (viewType) {
3786
- case 'hours':
3787
- return !shouldDisableTime(utils.setHours(selectedTimeOrMidnight, timeValue), 'hours');
3788
- case 'minutes':
3789
- return !shouldDisableTime(utils.setMinutes(selectedTimeOrMidnight, timeValue), 'minutes');
3790
- case 'seconds':
3791
- return !shouldDisableTime(utils.setSeconds(selectedTimeOrMidnight, timeValue), 'seconds');
3792
- default:
3793
- return false;
3794
- }
3795
- }
3796
- return true;
3797
- };
3798
- switch (viewType) {
3799
- case 'hours':
3800
- {
3801
- const valueWithMeridiem = convertValueToMeridiem(rawValue, meridiemMode, ampm);
3802
- const dateWithNewHours = utils.setHours(selectedTimeOrMidnight, valueWithMeridiem);
3803
- const start = utils.setSeconds(utils.setMinutes(dateWithNewHours, 0), 0);
3804
- const end = utils.setSeconds(utils.setMinutes(dateWithNewHours, 59), 59);
3805
- return !containsValidTime({
3806
- start,
3807
- end
3808
- }) || !isValidValue(valueWithMeridiem);
3809
- }
3810
- case 'minutes':
3811
- {
3812
- const dateWithNewMinutes = utils.setMinutes(selectedTimeOrMidnight, rawValue);
3813
- const start = utils.setSeconds(dateWithNewMinutes, 0);
3814
- const end = utils.setSeconds(dateWithNewMinutes, 59);
3815
- return !containsValidTime({
3816
- start,
3817
- end
3818
- }) || !isValidValue(rawValue, minutesStep);
3819
- }
3820
- case 'seconds':
3821
- {
3822
- const dateWithNewSeconds = utils.setSeconds(selectedTimeOrMidnight, rawValue);
3823
- const start = dateWithNewSeconds;
3824
- const end = dateWithNewSeconds;
3825
- return !containsValidTime({
3826
- start,
3827
- end
3828
- }) || !isValidValue(rawValue);
3829
- }
3830
- default:
3831
- throw new Error('not supported');
3832
- }
3833
- }, [ampm, selectedTimeOrMidnight, disableIgnoringDatePartForTimeValidation, maxTime, meridiemMode, minTime, minutesStep, shouldDisableClock, shouldDisableTime, utils, disableFuture, disablePast, now, views]);
3834
- const selectedId = useId();
3835
- const viewProps = React.useMemo(() => {
3836
- switch (view) {
3837
- case 'hours':
3838
- {
3839
- const handleHoursChange = (hourValue, isFinish) => {
3840
- const valueWithMeridiem = convertValueToMeridiem(hourValue, meridiemMode, ampm);
3841
- setValueAndGoToNextView(utils.setHours(selectedTimeOrMidnight, valueWithMeridiem), isFinish);
3842
- };
3843
- return {
3844
- onChange: handleHoursChange,
3845
- viewValue: utils.getHours(selectedTimeOrMidnight),
3846
- children: getHourNumbers({
3847
- value,
3848
- utils,
3849
- ampm,
3850
- onChange: handleHoursChange,
3851
- getClockNumberText: localeText.hoursClockNumberText,
3852
- isDisabled: hourValue => disabled || isTimeDisabled(hourValue, 'hours'),
3853
- selectedId
3854
- })
3855
- };
3856
- }
3857
- case 'minutes':
3858
- {
3859
- const minutesValue = utils.getMinutes(selectedTimeOrMidnight);
3860
- const handleMinutesChange = (minuteValue, isFinish) => {
3861
- setValueAndGoToNextView(utils.setMinutes(selectedTimeOrMidnight, minuteValue), isFinish);
3862
- };
3863
- return {
3864
- viewValue: minutesValue,
3865
- onChange: handleMinutesChange,
3866
- children: getMinutesNumbers({
3867
- utils,
3868
- value: minutesValue,
3869
- onChange: handleMinutesChange,
3870
- getClockNumberText: localeText.minutesClockNumberText,
3871
- isDisabled: minuteValue => disabled || isTimeDisabled(minuteValue, 'minutes'),
3872
- selectedId
3873
- })
3874
- };
3875
- }
3876
- case 'seconds':
3877
- {
3878
- const secondsValue = utils.getSeconds(selectedTimeOrMidnight);
3879
- const handleSecondsChange = (secondValue, isFinish) => {
3880
- setValueAndGoToNextView(utils.setSeconds(selectedTimeOrMidnight, secondValue), isFinish);
3881
- };
3882
- return {
3883
- viewValue: secondsValue,
3884
- onChange: handleSecondsChange,
3885
- children: getMinutesNumbers({
3886
- utils,
3887
- value: secondsValue,
3888
- onChange: handleSecondsChange,
3889
- getClockNumberText: localeText.secondsClockNumberText,
3890
- isDisabled: secondValue => disabled || isTimeDisabled(secondValue, 'seconds'),
3891
- selectedId
3892
- })
3893
- };
3894
- }
3895
- default:
3896
- throw new Error('You must provide the type for ClockView');
3897
- }
3898
- }, [view, utils, value, ampm, localeText.hoursClockNumberText, localeText.minutesClockNumberText, localeText.secondsClockNumberText, meridiemMode, setValueAndGoToNextView, selectedTimeOrMidnight, isTimeDisabled, selectedId, disabled]);
3899
- const ownerState = props;
3900
- const classes = useUtilityClasses(ownerState);
3901
- return /*#__PURE__*/jsxs(TimeClockRoot, _extends({
3902
- ref: ref,
3903
- className: clsx(classes.root, className),
3904
- ownerState: ownerState
3905
- }, other, {
3906
- children: [/*#__PURE__*/jsx(Clock, _extends({
3907
- autoFocus: autoFocus,
3908
- ampmInClock: ampmInClock && views.includes('hours'),
3909
- value: value,
3910
- type: view,
3911
- ampm: ampm,
3912
- minutesStep: minutesStep,
3913
- isTimeDisabled: isTimeDisabled,
3914
- meridiemMode: meridiemMode,
3915
- handleMeridiemChange: handleMeridiemChange,
3916
- selectedId: selectedId,
3917
- disabled: disabled,
3918
- readOnly: readOnly
3919
- }, viewProps)), showViewSwitcher && /*#__PURE__*/jsx(TimeClockArrowSwitcher, {
3920
- className: classes.arrowSwitcher,
3921
- slots: slots,
3922
- slotProps: slotProps,
3923
- onGoToPrevious: () => setView(previousView),
3924
- isPreviousDisabled: !previousView,
3925
- previousLabel: localeText.openPreviousView,
3926
- onGoToNext: () => setView(nextView),
3927
- isNextDisabled: !nextView,
3928
- nextLabel: localeText.openNextView,
3929
- ownerState: ownerState
3930
- })]
3931
- }));
3932
- });
3933
- process.env.NODE_ENV !== "production" ? TimeClock.propTypes = {
3934
- // ----------------------------- Warning --------------------------------
3935
- // | These PropTypes are generated from the TypeScript type definitions |
3936
- // | To update them edit the TypeScript types and run "yarn proptypes" |
3937
- // ----------------------------------------------------------------------
3938
- /**
3939
- * 12h/24h view for hour selection clock.
3940
- * @default `utils.is12HourCycleInCurrentLocale()`
3941
- */
3942
- ampm: PropTypes.bool,
3943
- /**
3944
- * Display ampm controls under the clock (instead of in the toolbar).
3945
- * @default false
3946
- */
3947
- ampmInClock: PropTypes.bool,
3948
- /**
3949
- * Set to `true` if focus should be moved to clock picker.
3950
- */
3951
- autoFocus: PropTypes.bool,
3952
- /**
3953
- * Override or extend the styles applied to the component.
3954
- */
3955
- classes: PropTypes.object,
3956
- className: PropTypes.string,
3957
- /**
3958
- * Overridable components.
3959
- * @default {}
3960
- * @deprecated Please use `slots`.
3961
- */
3962
- components: PropTypes.object,
3963
- /**
3964
- * The props used for each component slot.
3965
- * @default {}
3966
- * @deprecated Please use `slotProps`.
3967
- */
3968
- componentsProps: PropTypes.object,
3969
- /**
3970
- * The default selected value.
3971
- * Used when the component is not controlled.
3972
- */
3973
- defaultValue: PropTypes.any,
3974
- /**
3975
- * If `true`, the picker and text field are disabled.
3976
- * @default false
3977
- */
3978
- disabled: PropTypes.bool,
3979
- /**
3980
- * If `true`, disable values after the current date for date components, time for time components and both for date time components.
3981
- * @default false
3982
- */
3983
- disableFuture: PropTypes.bool,
3984
- /**
3985
- * Do not ignore date part when validating min/max time.
3986
- * @default false
3987
- */
3988
- disableIgnoringDatePartForTimeValidation: PropTypes.bool,
3989
- /**
3990
- * If `true`, disable values before the current date for date components, time for time components and both for date time components.
3991
- * @default false
3992
- */
3993
- disablePast: PropTypes.bool,
3994
- /**
3995
- * Maximal selectable time.
3996
- * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
3997
- */
3998
- maxTime: PropTypes.any,
3999
- /**
4000
- * Minimal selectable time.
4001
- * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
4002
- */
4003
- minTime: PropTypes.any,
4004
- /**
4005
- * Step over minutes.
4006
- * @default 1
4007
- */
4008
- minutesStep: PropTypes.number,
4009
- /**
4010
- * Callback fired when the value changes.
4011
- * @template TDate
4012
- * @param {TDate | null} value The new value.
4013
- * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.
4014
- */
4015
- onChange: PropTypes.func,
4016
- /**
4017
- * Callback fired on view change.
4018
- * @param {TimeView} view The new view.
4019
- */
4020
- onViewChange: PropTypes.func,
4021
- /**
4022
- * Initially open view.
4023
- * @default 'hours'
4024
- */
4025
- openTo: PropTypes.oneOf(['hours', 'minutes', 'seconds']),
4026
- /**
4027
- * Make picker read only.
4028
- * @default false
4029
- */
4030
- readOnly: PropTypes.bool,
4031
- /**
4032
- * Disable specific clock time.
4033
- * @param {number} clockValue The value to check.
4034
- * @param {TimeView} view The clock type of the timeValue.
4035
- * @returns {boolean} If `true` the time will be disabled.
4036
- * @deprecated Consider using `shouldDisableTime`.
4037
- */
4038
- shouldDisableClock: PropTypes.func,
4039
- /**
4040
- * Disable specific time.
4041
- * @param {TDate} value The value to check.
4042
- * @param {TimeView} view The clock type of the timeValue.
4043
- * @returns {boolean} If `true` the time will be disabled.
4044
- */
4045
- shouldDisableTime: PropTypes.func,
4046
- showViewSwitcher: PropTypes.bool,
4047
- /**
4048
- * The props used for each component slot.
4049
- * @default {}
4050
- */
4051
- slotProps: PropTypes.object,
4052
- /**
4053
- * Overridable component slots.
4054
- * @default {}
4055
- */
4056
- slots: PropTypes.object,
4057
- /**
4058
- * The system prop that allows defining system overrides as well as additional CSS styles.
4059
- */
4060
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
4061
- /**
4062
- * The selected value.
4063
- * Used when the component is controlled.
4064
- */
4065
- value: PropTypes.any,
4066
- /**
4067
- * Controlled open view.
4068
- */
4069
- view: PropTypes.oneOf(['hours', 'minutes', 'seconds']),
4070
- /**
4071
- * Views for calendar picker.
4072
- * @default ['hours', 'minutes']
4073
- */
4074
- views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds']).isRequired)
4075
- } : void 0;
4076
-
4077
- const isTimePickerView = view => view === 'hours' || view === 'minutes' || view === 'seconds';
4078
- const renderTimeViewClock = ({
4079
- view,
4080
- onViewChange,
4081
- views,
4082
- value,
4083
- defaultValue,
4084
- onChange,
4085
- className,
4086
- classes,
4087
- disableFuture,
4088
- disablePast,
4089
- minTime,
4090
- maxTime,
4091
- shouldDisableTime,
4092
- shouldDisableClock,
4093
- minutesStep,
4094
- ampm,
4095
- ampmInClock,
4096
- components,
4097
- componentsProps,
4098
- slots,
4099
- slotProps,
4100
- readOnly,
4101
- disabled,
4102
- sx,
4103
- autoFocus,
4104
- showViewSwitcher,
4105
- disableIgnoringDatePartForTimeValidation
4106
- }) => /*#__PURE__*/jsx(TimeClock, {
4107
- view: view,
4108
- onViewChange: onViewChange,
4109
- views: views.filter(isTimePickerView),
4110
- value: value,
4111
- defaultValue: defaultValue,
4112
- onChange: onChange,
4113
- className: className,
4114
- classes: classes,
4115
- disableFuture: disableFuture,
4116
- disablePast: disablePast,
4117
- minTime: minTime,
4118
- maxTime: maxTime,
4119
- shouldDisableTime: shouldDisableTime,
4120
- shouldDisableClock: shouldDisableClock,
4121
- minutesStep: minutesStep,
4122
- ampm: ampm,
4123
- ampmInClock: ampmInClock,
4124
- components: components,
4125
- componentsProps: componentsProps,
4126
- slots: slots,
4127
- slotProps: slotProps,
4128
- readOnly: readOnly,
4129
- disabled: disabled,
4130
- sx: sx,
4131
- autoFocus: autoFocus,
4132
- showViewSwitcher: showViewSwitcher,
4133
- disableIgnoringDatePartForTimeValidation: disableIgnoringDatePartForTimeValidation
4134
- });
1032
+ return (hint === "string" ? String : Number)(input);
1033
+ }
1034
+ function _toPropertyKey(arg) {
1035
+ var key = _toPrimitive(arg, "string");
1036
+ return typeof key === "symbol" ? key : String(key);
1037
+ }
4135
1038
 
4136
1039
  var BORDER_RADIUS = 3;
4137
1040
  var defaultButtonStyle = function defaultButtonStyle(button) {
@@ -4823,9 +1726,9 @@ var colors$1 = {
4823
1726
  fontSize: 12
4824
1727
  },
4825
1728
  tableRowDisabledCardContainer: {
4826
- fill: '#F5F5F5',
4827
- border: '1px solid #EEEEEE',
4828
- borderColor: '#EEEEEE'
1729
+ fill: '#EBEBEB',
1730
+ border: '1px solid #E3E2E2',
1731
+ borderColor: '#E3E2E2'
4829
1732
  },
4830
1733
  dragHandleHover: {
4831
1734
  backgroundColor: 'transparent'
@@ -5487,15 +2390,6 @@ var createTheme = function createTheme(_ref) {
5487
2390
  paddingRight: '5px'
5488
2391
  }
5489
2392
  }
5490
- },
5491
- MuiDesktopDateTimePicker: {
5492
- defaultProps: {
5493
- viewRenderers: {
5494
- hours: renderTimeViewClock,
5495
- minutes: renderTimeViewClock,
5496
- seconds: renderTimeViewClock
5497
- }
5498
- }
5499
2393
  }
5500
2394
  }
5501
2395
  });
@@ -6029,9 +2923,9 @@ var colors = {
6029
2923
  fontSize: 12
6030
2924
  },
6031
2925
  tableRowDisabledCardContainer: {
6032
- fill: '#2B2B2B',
6033
- border: '1px solid #404040',
6034
- borderColor: '#404040'
2926
+ fill: '#252525',
2927
+ border: '1px solid #363636',
2928
+ borderColor: '#363636'
6035
2929
  },
6036
2930
  dragHandleHover: {
6037
2931
  backgroundColor: 'transparent'
@@ -6570,4 +3464,4 @@ var ThemeWrapperOldTheme = function ThemeWrapperOldTheme(_a) {
6570
3464
  }, props), children);
6571
3465
  };
6572
3466
 
6573
- export { Add, Animation, ArrowDown, ArrowLeft$1 as ArrowLeft, ArrowRight$1 as ArrowRight, ArrowUp, AutoUpdateActive, AutoUpdateInActive, Both, Cached, CalendarToday, Cancel, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clear, Clock$1 as Clock, Close, CoastalEvent, CollapseLarge, CollapseMedium, CollapseSmall, CollapseWindow, Copy, Delete, DimensionsElevation, DimensionsOther, DimensionsRefTime, DimensionsTime, DragHandle, DrawFIRLand, DrawPolygon, DrawRegion, Edit, Equalizer, Exclamation, ExitDomain, Expand, ExpandWindow, Export, FastForward, Filter, Fog, GWTheme, GeoWebLogo, HamburgerMenu, Home, index as Icons, Info, KeyCommand, KeyOption, Layers, LayersAdd, Lightning, Link, LinkOff, List, ListItem, Location, MapAdd, Menu, Minus, None, Notifications, Now, Options, Pause, Picture, Play, Polygons, Preset, PresetTiles, PresetWorkspace, Rain, Resize, Search, Share, SliderThumb, Snow, Speed, SplitHorizontal, SplitVertical, StepBackward, StepForward, SubdirectoryArrowRight, Success, TemperatureHigh, TemperatureLow, TextIcon, ThemeContext, ThemeProvider, ThemeTypes, ThemeWrapper, ThemeWrapperOldTheme, ThumbsUp, TimeSeriesManager, UnExpand, Update, Visibility, VisibilityOff, WebAssetOff, Wind, breakpoints, colors$1 as colorsLight, createShadows, createTheme, darkTheme, dragHandlePath, elevations$1 as elevationsLight, lightTheme, parseColors, useThemeContext };
3467
+ export { Add, Animation, ArrowDown, ArrowDropDownDown, ArrowDropDownUp, ArrowLeft, ArrowRight, ArrowUp, AutoUpdateActive, AutoUpdateInActive, Both, Cached, CalendarToday, Cancel, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clear, Clock, Close, CoastalEvent, CollapseLarge, CollapseMedium, CollapseSmall, CollapseWindow, Copy, Delete, DimensionsElevation, DimensionsOther, DimensionsRefTime, DimensionsTime, DragHandle, DrawFIRLand, DrawPolygon, DrawRegion, Edit, Equalizer, Exclamation, ExitDomain, Expand, ExpandWindow, Export, FastForward, Filter, Fog, FunnelCloud, GWTheme, GeoWebLogo, HamburgerMenu, Home, index as Icons, Info, KeyCommand, KeyOption, Layers, LayersAdd, Lightning, Link, LinkOff, List, ListItem, Location, LockLocked, LockUnlocked, MapAdd, Menu, Minus, MyLocation, None, Notifications, Now, Options, Pause, Picture, Play, Polygons, Preset, PresetTiles, PresetWorkspace, Rain, Resize, Search, Share, SliderThumb, Snow, Speed, SplitHorizontal, SplitVertical, StepBackward, StepForward, SubdirectoryArrowRight, Success, TemperatureHigh, TemperatureLow, TextIcon, ThemeContext, ThemeProvider, ThemeTypes, ThemeWrapper, ThemeWrapperOldTheme, ThumbsUp, TimeSeriesSelect, UnExpand, Update, Visibility, VisibilityOff, WebAssetOff, Wind, WorldMapProjection, breakpoints, colors$1 as colorsLight, createShadows, createTheme, darkTheme, dragHandlePath, elevations$1 as elevationsLight, lightTheme, parseColors, useThemeContext };