stone-kit 0.0.875 → 0.0.877
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js +1 -1
- package/dist/Router.js +9 -9
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/bind.js +4 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/index3.js +4 -0
- package/dist/_virtual/react-is.development.js +4 -0
- package/dist/_virtual/react-is.production.min.js +4 -0
- package/dist/components/Button/ui/Button.js +44 -73
- package/dist/components/CheckBox/CheckBox.js +35 -46
- package/dist/components/CheckBoxNew/CheckBoxNew.js +19 -23
- package/dist/components/CheckboxSelect/ui/CheckboxSelect.js +24 -31
- package/dist/components/DestinationTab/ui/DestinationTab.js +35 -48
- package/dist/components/FieldInput/ui/FieldInput.js +7 -10
- package/dist/components/FilterWithSave/hooks/useFilterWithSave.js +61 -5
- package/dist/components/FilterWithSave/ui/FilterWithSave.js +266 -7
- package/dist/components/Flex/ui/Flex.js +26 -61
- package/dist/components/FormModal/ui/ModalForm.js +289 -14
- package/dist/components/GroupedInput/ui/GroupedInputs.js +5 -6
- package/dist/components/Input/ui/Input.js +74 -3307
- package/dist/components/Logo/ui/Logo.js +19 -31
- package/dist/components/Logo/ui/Logo.types.js +18 -10
- package/dist/components/LotCard/hooks/useLotCard.js +125 -11
- package/dist/components/LotCard/index.js +2 -2
- package/dist/components/LotCard/ui/LotCard.js +150 -9
- package/dist/components/LotCardSkeleton/ui/LotCardSkeleton.js +31 -58
- package/dist/components/MetroLabel/ui/MetroLabel.js +19 -24
- package/dist/components/MetroTag/ui/MetroTag.js +59 -72
- package/dist/components/Modal/ui/Modal.js +33 -38
- package/dist/components/ModalSuccess/ModalSuccess.js +26 -35
- package/dist/components/NewIcon/icons/PinTrans.js +3 -3
- package/dist/components/NewIcon/icons/SmallFilter.js +1 -1
- package/dist/components/NewIcon/ui/NewIcon.js +141 -301
- package/dist/components/ProjectCardSkeleton/ui/ProjectCardSkeleton.js +5 -15
- package/dist/components/RoundButton/ui/RoundButton.js +42 -60
- package/dist/components/Select/ui/Category.js +30 -29
- package/dist/components/Select/ui/Option.js +52 -5
- package/dist/components/Select/ui/Select.js +24 -23
- package/dist/components/SliderNavigation/ui/SliderNavigation.js +27 -28
- package/dist/components/SortSelect/hooks/useSortSelect.js +59 -4
- package/dist/components/SortSelect/index.js +1 -1
- package/dist/components/SortSelect/ui/SortSelect.js +114 -9
- package/dist/components/SummarySelect/ui/SummarySelect.js +59 -69
- package/dist/components/Switcher/ui/Switcher.js +13 -24
- package/dist/components/TabSelect/ui/TabSelect.js +28 -34
- package/dist/components/TabSwitcher/index.js +2 -2
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +84 -7
- package/dist/components/Tag/ui/Tag.js +19 -67
- package/dist/components/Text/ui/Text.js +12 -13
- package/dist/components/TextArea/TextArea.js +11 -14
- package/dist/components/ZoomControls/ui/ZoomControls.js +8 -11
- package/dist/components/mobileButton/ui/MobileButton.js +34 -39
- package/dist/layout/Layout.js +7 -8
- package/dist/layout/components/Header/Header.js +41 -44
- package/dist/layout/components/Menu.js +111 -6
- package/dist/main.js +46 -42
- package/dist/node_modules/@remix-run/router/dist/router.js +431 -0
- package/dist/node_modules/classnames/bind.js +42 -0
- package/dist/{index-rKuIKazb.js → node_modules/classnames/index.js} +12 -15
- package/dist/node_modules/imask/esm/controls/html-contenteditable-mask-element.js +35 -0
- package/dist/node_modules/imask/esm/controls/html-input-mask-element.js +31 -0
- package/dist/node_modules/imask/esm/controls/html-mask-element.js +48 -0
- package/dist/node_modules/imask/esm/controls/input-history.js +30 -0
- package/dist/node_modules/imask/esm/controls/input.js +224 -0
- package/dist/node_modules/imask/esm/controls/mask-element.js +43 -0
- package/dist/node_modules/imask/esm/core/action-details.js +51 -0
- package/dist/node_modules/imask/esm/core/change-details.js +36 -0
- package/dist/node_modules/imask/esm/core/continuous-tail-details.js +44 -0
- package/dist/node_modules/imask/esm/core/holder.js +6 -0
- package/dist/node_modules/imask/esm/core/utils.js +80 -0
- package/dist/node_modules/imask/esm/index.js +50 -0
- package/dist/node_modules/imask/esm/masked/base.js +257 -0
- package/dist/node_modules/imask/esm/masked/date.js +118 -0
- package/dist/node_modules/imask/esm/masked/dynamic.js +224 -0
- package/dist/node_modules/imask/esm/masked/enum.js +70 -0
- package/dist/node_modules/imask/esm/masked/factory.js +51 -0
- package/dist/node_modules/imask/esm/masked/function.js +23 -0
- package/dist/node_modules/imask/esm/masked/number.js +215 -0
- package/dist/node_modules/imask/esm/masked/pattern/chunk-tail-details.js +110 -0
- package/dist/node_modules/imask/esm/masked/pattern/cursor.js +102 -0
- package/dist/node_modules/imask/esm/masked/pattern/fixed-definition.js +103 -0
- package/dist/node_modules/imask/esm/masked/pattern/input-definition.js +134 -0
- package/dist/node_modules/imask/esm/masked/pattern.js +339 -0
- package/dist/node_modules/imask/esm/masked/pipe.js +23 -0
- package/dist/node_modules/imask/esm/masked/range.js +82 -0
- package/dist/node_modules/imask/esm/masked/regexp.js +21 -0
- package/dist/node_modules/imask/esm/masked/repeat.js +106 -0
- package/dist/node_modules/object-assign/index.js +55 -0
- package/dist/node_modules/prop-types/checkPropTypes.js +55 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +53 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +330 -0
- package/dist/node_modules/prop-types/index.js +15 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +11 -0
- package/dist/node_modules/prop-types/lib/has.js +7 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +95 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +79 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +10 -0
- package/dist/node_modules/react-hook-form/dist/index.esm.js +1062 -0
- package/dist/node_modules/react-imask/esm/input.js +25 -0
- package/dist/node_modules/react-imask/esm/mixin.js +131 -0
- package/dist/node_modules/react-router/dist/index.js +486 -0
- package/dist/node_modules/react-router-dom/dist/index.js +424 -0
- package/dist/pages/ButtonsPage/ButtonState/ButtonState.js +1 -1
- package/dist/pages/ButtonsPage/Buttons.js +54 -62
- package/dist/pages/CheckboxPage/CheckboxPage.js +47 -51
- package/dist/pages/FormsPage/FormsPage.js +31 -32
- package/dist/pages/HomePage/HomePage.js +3 -4
- package/dist/pages/IconsPage/IconsPage.js +12 -10
- package/dist/pages/InputPage/InputPage.js +17 -12
- package/dist/pages/LogoPage/LogoPage.js +17 -14
- package/dist/pages/LotsPage/LotsPage.js +15 -15
- package/dist/pages/ModalsPage/ModalPage.js +19 -14
- package/dist/pages/SelectPage/SelectPage.js +42 -41
- package/dist/pages/TabsPage/TabsPage.js +49 -51
- package/dist/pages/TagsPage/TagsPage.js +10 -7
- package/dist/src/components/Button/ui/Button.module.scss.js +49 -0
- package/dist/src/components/CheckBox/s.module.scss.js +24 -0
- package/dist/src/components/CheckBoxNew/s.module.scss.js +13 -0
- package/dist/src/components/CheckboxSelect/ui/s.module.scss.js +19 -0
- package/dist/src/components/DestinationTab/ui/DestinationTab.module.scss.js +23 -0
- package/dist/src/components/FieldInput/ui/FieldInput.module.scss.js +11 -0
- package/dist/src/components/FilterWithSave/ui/s.module.scss.js +39 -0
- package/dist/src/components/Flex/ui/Flex.module.scss.js +41 -0
- package/dist/src/components/FormModal/ui/ModalForm.module.scss.js +31 -0
- package/dist/src/components/GroupedInput/ui/GroupedInputs.module.scss.js +7 -0
- package/dist/src/components/Input/ui/Input.module.scss.js +43 -0
- package/dist/src/components/Logo/assets/LogoBlack.svg.js +4 -0
- package/dist/src/components/Logo/assets/LogoDom.svg.js +4 -0
- package/dist/src/components/Logo/assets/LogoNewDom.svg.js +4 -0
- package/dist/src/components/Logo/assets/LogoNewOffice.svg.js +4 -0
- package/dist/src/components/Logo/assets/LogoOffice.svg.js +4 -0
- package/dist/src/components/Logo/assets/LogoRealty.svg.js +4 -0
- package/dist/src/components/Logo/assets/LogoValue.svg.js +4 -0
- package/dist/src/components/Logo/assets/LogoWhite.svg.js +4 -0
- package/dist/src/components/Logo/ui/Logo.module.scss.js +29 -0
- package/dist/src/components/LotCard/assets/testLot.webp.js +4 -0
- package/dist/src/components/LotCard/ui/LotCard.module.scss.js +71 -0
- package/dist/src/components/LotCardSkeleton/ui/LotCardSkeleton.module.scss.js +59 -0
- package/dist/src/components/MetroLabel/ui/MetroLabel.module.scss.js +15 -0
- package/dist/src/components/MetroTag/ui/MetroTag.module.scss.js +31 -0
- package/dist/src/components/Modal/ui/Modal.module.scss.js +15 -0
- package/dist/src/components/ModalSuccess/styles.module.scss.js +23 -0
- package/dist/src/components/NewIcon/assets/ArrowLong.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/ArrowShort.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Auto.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Building.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Burger.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/BurgerClose.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Call.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Callback.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Case.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Check.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Circle.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Close.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/DirectionDown.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Download.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Filter.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Food.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Fullscreen.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Heart.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Layers.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/LayersFilled.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Loader.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Lock.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Metro.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Minus.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/MinusCheck.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Moon.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Park.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Pedestrian.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Phone.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/PhoneFilled.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Pin.svg.js +10 -0
- package/dist/{PinTrans-D6OZq76b.js → src/components/NewIcon/assets/PinTrans.svg.js} +4 -4
- package/dist/src/components/NewIcon/assets/Play.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Play2.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Plus.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Redo.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Ruble.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Search.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/SelectChecked.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/SelectUnchecked.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Share.svg.js +10 -0
- package/dist/{SmallFilter-C-VKnbkP.js → src/components/NewIcon/assets/SmallFilter.svg.js} +3 -3
- package/dist/src/components/NewIcon/assets/Sport.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/SquareMeter.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Star.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/StarFilled.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Sun.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Telegram.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/Timer.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/TwoArrows.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/User.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/WhatsApp.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/WithoutDecor.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/arrowRight.svg.js +10 -0
- package/dist/src/components/NewIcon/assets/mail.svg.js +10 -0
- package/dist/src/components/NewIcon/ui/NewIcon.module.scss.js +4 -0
- package/dist/src/components/ProjectCardSkeleton/ui/ProjectCardSkeleton.module.scss.js +25 -0
- package/dist/src/components/RoundButton/ui/RoundButton.module.scss.js +29 -0
- package/dist/src/components/Select/ui/Select.module.scss.js +52 -0
- package/dist/src/components/SliderNavigation/ui/SliderNavigation.module.scss.js +7 -0
- package/dist/src/components/SortSelect/ui/SortSelect.module.scss.js +41 -0
- package/dist/src/components/SummarySelect/ui/SummarySelect.module.scss.js +25 -0
- package/dist/src/components/Switcher/ui/Switcher.module.scss.js +27 -0
- package/dist/src/components/TabSelect/ui/TabSelect.module.scss.js +17 -0
- package/dist/src/components/TabSwitcher/ui/TabSwitcher.module.scss.js +57 -0
- package/dist/src/components/Tag/ui/Tag.module.scss.js +70 -0
- package/dist/src/components/Text/ui/Text.module.scss.js +7 -0
- package/dist/src/components/TextArea/styles.module.scss.js +9 -0
- package/dist/src/components/ZoomControls/ui/ZoomControls.module.scss.js +11 -0
- package/dist/src/components/mobileButton/ui/MobileButton.module.scss.js +12 -0
- package/dist/src/layout/components/Header/s.module.scss.js +19 -0
- package/dist/src/layout/components/Menu.module.scss.js +9 -0
- package/dist/src/layout/style.module.scss.js +7 -0
- package/dist/src/pages/ButtonsPage/ButtonState/ButtonState.js +18 -0
- package/dist/{ButtonState.module-DtW3aevR.js → src/pages/ButtonsPage/ButtonState/ButtonState.module.scss.js} +4 -1
- package/dist/src/pages/ButtonsPage/ButtonsPage.module.scss.js +9 -0
- package/dist/src/pages/CheckboxPage/CheckboxPage.module.scss.js +13 -0
- package/dist/src/pages/FormsPage/FormsPage.module.scss.js +15 -0
- package/dist/src/pages/HomePage/HomePage.module.scss.js +7 -0
- package/dist/src/pages/IconsPage/IconsPage.module.scss.js +9 -0
- package/dist/src/pages/InputPage/InputPage.module.scss.js +4 -0
- package/dist/src/pages/LogoPage/LogoPage.module.scss.js +7 -0
- package/dist/src/pages/LotsPage/LotsPage.module.scss.js +13 -0
- package/dist/src/pages/ModalsPage/ModalPage.module.scss.js +4 -0
- package/dist/src/pages/SelectPage/SelectPage.module.scss.js +11 -0
- package/dist/src/pages/TabsPage/TabsPage.module.scss.js +17 -0
- package/dist/src/pages/TagsPage/TagsPage.module.scss.js +7 -0
- package/dist/src/stories/button.css.js +1 -0
- package/dist/src/stories/header.css.js +1 -0
- package/dist/src/stories/page.css.js +1 -0
- package/dist/stories/Button.js +24 -0
- package/dist/stories/Header.js +45 -0
- package/dist/stories/Page.js +59 -0
- package/dist/style.css +1 -1
- package/package.json +11 -6
- package/dist/FilterWithSave-Bp6rH8Pe.js +0 -2230
- package/dist/Menu-CgCfinVZ.js +0 -513
- package/dist/Option-BVIm7wOW.js +0 -83
- package/dist/index-DmANy9jd.js +0 -890
- package/dist/useSortSelect-CjZXLFOG.js +0 -80
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import p from "./mixin.js";
|
|
3
|
+
import "../../imask/esm/controls/input.js";
|
|
4
|
+
import "../../imask/esm/masked/factory.js";
|
|
5
|
+
import "../../imask/esm/controls/mask-element.js";
|
|
6
|
+
import "../../imask/esm/controls/html-input-mask-element.js";
|
|
7
|
+
import "../../imask/esm/controls/html-mask-element.js";
|
|
8
|
+
import "../../imask/esm/controls/html-contenteditable-mask-element.js";
|
|
9
|
+
import "../../imask/esm/controls/input-history.js";
|
|
10
|
+
const i = p((t) => {
|
|
11
|
+
let {
|
|
12
|
+
inputRef: r,
|
|
13
|
+
...o
|
|
14
|
+
} = t;
|
|
15
|
+
return e.createElement("input", {
|
|
16
|
+
...o,
|
|
17
|
+
ref: r
|
|
18
|
+
});
|
|
19
|
+
}), m = (t, r) => e.createElement(i, {
|
|
20
|
+
...t,
|
|
21
|
+
ref: r
|
|
22
|
+
}), k = e.forwardRef(m);
|
|
23
|
+
export {
|
|
24
|
+
k as default
|
|
25
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import o from "react";
|
|
2
|
+
import e from "../../prop-types/index.js";
|
|
3
|
+
import "../../imask/esm/controls/input.js";
|
|
4
|
+
import p from "../../imask/esm/core/holder.js";
|
|
5
|
+
import "../../imask/esm/masked/factory.js";
|
|
6
|
+
import "../../imask/esm/controls/mask-element.js";
|
|
7
|
+
import "../../imask/esm/controls/html-input-mask-element.js";
|
|
8
|
+
import "../../imask/esm/controls/html-mask-element.js";
|
|
9
|
+
import "../../imask/esm/controls/html-contenteditable-mask-element.js";
|
|
10
|
+
import "../../imask/esm/controls/input-history.js";
|
|
11
|
+
const m = {
|
|
12
|
+
// common
|
|
13
|
+
mask: e.oneOfType([e.array, e.func, e.string, e.instanceOf(RegExp), e.oneOf([Date, Number, p.Masked]), e.instanceOf(p.Masked)]),
|
|
14
|
+
value: e.any,
|
|
15
|
+
unmask: e.oneOfType([e.bool, e.oneOf(["typed"])]),
|
|
16
|
+
prepare: e.func,
|
|
17
|
+
prepareChar: e.func,
|
|
18
|
+
validate: e.func,
|
|
19
|
+
commit: e.func,
|
|
20
|
+
overwrite: e.oneOfType([e.bool, e.oneOf(["shift"])]),
|
|
21
|
+
eager: e.oneOfType([e.bool, e.oneOf(["append", "remove"])]),
|
|
22
|
+
skipInvalid: e.bool,
|
|
23
|
+
// events
|
|
24
|
+
onAccept: e.func,
|
|
25
|
+
onComplete: e.func,
|
|
26
|
+
// pattern
|
|
27
|
+
placeholderChar: e.string,
|
|
28
|
+
displayChar: e.string,
|
|
29
|
+
lazy: e.bool,
|
|
30
|
+
definitions: e.object,
|
|
31
|
+
blocks: e.object,
|
|
32
|
+
// enum
|
|
33
|
+
enum: e.arrayOf(e.string),
|
|
34
|
+
// range
|
|
35
|
+
maxLength: e.number,
|
|
36
|
+
from: e.number,
|
|
37
|
+
to: e.number,
|
|
38
|
+
// date
|
|
39
|
+
pattern: e.string,
|
|
40
|
+
format: e.func,
|
|
41
|
+
parse: e.func,
|
|
42
|
+
autofix: e.oneOfType([e.bool, e.oneOf(["pad"])]),
|
|
43
|
+
// number
|
|
44
|
+
radix: e.string,
|
|
45
|
+
thousandsSeparator: e.string,
|
|
46
|
+
mapToRadix: e.arrayOf(e.string),
|
|
47
|
+
scale: e.number,
|
|
48
|
+
normalizeZeros: e.bool,
|
|
49
|
+
padFractionalZeros: e.bool,
|
|
50
|
+
min: e.oneOfType([e.number, e.instanceOf(Date)]),
|
|
51
|
+
max: e.oneOfType([e.number, e.instanceOf(Date)]),
|
|
52
|
+
// dynamic
|
|
53
|
+
dispatch: e.func,
|
|
54
|
+
// ref
|
|
55
|
+
inputRef: e.oneOfType([e.func, e.shape({
|
|
56
|
+
current: e.object
|
|
57
|
+
})])
|
|
58
|
+
}, u = Object.keys(m).filter((i) => i !== "value"), h = ["value", "unmask", "onAccept", "onComplete", "inputRef"], c = u.filter((i) => h.indexOf(i) < 0);
|
|
59
|
+
function T(i) {
|
|
60
|
+
var a;
|
|
61
|
+
const r = (a = class extends o.Component {
|
|
62
|
+
constructor(t) {
|
|
63
|
+
super(t), this._inputRef = this._inputRef.bind(this);
|
|
64
|
+
}
|
|
65
|
+
componentDidMount() {
|
|
66
|
+
this.props.mask && this.initMask();
|
|
67
|
+
}
|
|
68
|
+
componentDidUpdate() {
|
|
69
|
+
const t = this.props, s = this._extractMaskOptionsFromProps(t);
|
|
70
|
+
if (s.mask)
|
|
71
|
+
this.maskRef ? (this.maskRef.updateOptions(s), "value" in t && t.value !== void 0 && (this.maskValue = t.value)) : this.initMask(s);
|
|
72
|
+
else if (this.destroyMask(), "value" in t && t.value !== void 0) {
|
|
73
|
+
var n;
|
|
74
|
+
(n = this.element) != null && n.isContentEditable && this.element.tagName !== "INPUT" && this.element.tagName !== "TEXTAREA" ? this.element.textContent = t.value : this.element.value = t.value;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
componentWillUnmount() {
|
|
78
|
+
this.destroyMask();
|
|
79
|
+
}
|
|
80
|
+
_inputRef(t) {
|
|
81
|
+
this.element = t, this.props.inputRef && (Object.prototype.hasOwnProperty.call(this.props.inputRef, "current") ? this.props.inputRef.current = t : this.props.inputRef(t));
|
|
82
|
+
}
|
|
83
|
+
initMask(t) {
|
|
84
|
+
t === void 0 && (t = this._extractMaskOptionsFromProps(this.props)), this.maskRef = p(this.element, t).on("accept", this._onAccept.bind(this)).on("complete", this._onComplete.bind(this)), "value" in this.props && this.props.value !== void 0 && (this.maskValue = this.props.value);
|
|
85
|
+
}
|
|
86
|
+
destroyMask() {
|
|
87
|
+
this.maskRef && (this.maskRef.destroy(), delete this.maskRef);
|
|
88
|
+
}
|
|
89
|
+
_extractMaskOptionsFromProps(t) {
|
|
90
|
+
const {
|
|
91
|
+
...s
|
|
92
|
+
} = t;
|
|
93
|
+
return Object.keys(s).filter((n) => c.indexOf(n) < 0).forEach((n) => {
|
|
94
|
+
delete s[n];
|
|
95
|
+
}), s;
|
|
96
|
+
}
|
|
97
|
+
_extractNonMaskProps(t) {
|
|
98
|
+
const {
|
|
99
|
+
...s
|
|
100
|
+
} = t;
|
|
101
|
+
return u.forEach((n) => {
|
|
102
|
+
n !== "maxLength" && delete s[n];
|
|
103
|
+
}), "defaultValue" in s || (s.defaultValue = t.mask ? "" : s.value), delete s.value, s;
|
|
104
|
+
}
|
|
105
|
+
get maskValue() {
|
|
106
|
+
return this.maskRef ? this.props.unmask === "typed" ? this.maskRef.typedValue : this.props.unmask ? this.maskRef.unmaskedValue : this.maskRef.value : "";
|
|
107
|
+
}
|
|
108
|
+
set maskValue(t) {
|
|
109
|
+
this.maskRef && (t = t == null && this.props.unmask !== "typed" ? "" : t, this.props.unmask === "typed" ? this.maskRef.typedValue = t : this.props.unmask ? this.maskRef.unmaskedValue = t : this.maskRef.value = t);
|
|
110
|
+
}
|
|
111
|
+
_onAccept(t) {
|
|
112
|
+
this.props.onAccept && this.maskRef && this.props.onAccept(this.maskValue, this.maskRef, t);
|
|
113
|
+
}
|
|
114
|
+
_onComplete(t) {
|
|
115
|
+
this.props.onComplete && this.maskRef && this.props.onComplete(this.maskValue, this.maskRef, t);
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
return o.createElement(i, {
|
|
119
|
+
...this._extractNonMaskProps(this.props),
|
|
120
|
+
inputRef: this._inputRef
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}, a.displayName = void 0, a.propTypes = void 0, a), l = i.displayName || i.name || "Component";
|
|
124
|
+
return r.displayName = "IMask(" + l + ")", r.propTypes = m, o.forwardRef((f, t) => o.createElement(r, {
|
|
125
|
+
...f,
|
|
126
|
+
ref: t
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
export {
|
|
130
|
+
T as default
|
|
131
|
+
};
|
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { UNSAFE_invariant as u, parsePath as S, matchRoutes as q, UNSAFE_warning as b, joinPaths as U, Action as j, stripBasename as X, UNSAFE_getResolveToMatches as M, resolveTo as T, isRouteErrorResponse as G } from "../../@remix-run/router/dist/router.js";
|
|
3
|
+
import { createPath as ge, matchPath as ye, resolvePath as Re } from "../../@remix-run/router/dist/router.js";
|
|
4
|
+
/**
|
|
5
|
+
* React Router v6.26.0
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Remix Software Inc.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
11
|
+
*
|
|
12
|
+
* @license MIT
|
|
13
|
+
*/
|
|
14
|
+
function D() {
|
|
15
|
+
return D = Object.assign ? Object.assign.bind() : function(e) {
|
|
16
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
17
|
+
var r = arguments[t];
|
|
18
|
+
for (var n in r)
|
|
19
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
20
|
+
}
|
|
21
|
+
return e;
|
|
22
|
+
}, D.apply(this, arguments);
|
|
23
|
+
}
|
|
24
|
+
const V = /* @__PURE__ */ o.createContext(null);
|
|
25
|
+
process.env.NODE_ENV !== "production" && (V.displayName = "DataRouter");
|
|
26
|
+
const k = /* @__PURE__ */ o.createContext(null);
|
|
27
|
+
process.env.NODE_ENV !== "production" && (k.displayName = "DataRouterState");
|
|
28
|
+
const K = /* @__PURE__ */ o.createContext(null);
|
|
29
|
+
process.env.NODE_ENV !== "production" && (K.displayName = "Await");
|
|
30
|
+
const C = /* @__PURE__ */ o.createContext(null);
|
|
31
|
+
process.env.NODE_ENV !== "production" && (C.displayName = "Navigation");
|
|
32
|
+
const O = /* @__PURE__ */ o.createContext(null);
|
|
33
|
+
process.env.NODE_ENV !== "production" && (O.displayName = "Location");
|
|
34
|
+
const y = /* @__PURE__ */ o.createContext({
|
|
35
|
+
outlet: null,
|
|
36
|
+
matches: [],
|
|
37
|
+
isDataRoute: !1
|
|
38
|
+
});
|
|
39
|
+
process.env.NODE_ENV !== "production" && (y.displayName = "Route");
|
|
40
|
+
const w = /* @__PURE__ */ o.createContext(null);
|
|
41
|
+
process.env.NODE_ENV !== "production" && (w.displayName = "RouteError");
|
|
42
|
+
function pe(e, t) {
|
|
43
|
+
let {
|
|
44
|
+
relative: r
|
|
45
|
+
} = t === void 0 ? {} : t;
|
|
46
|
+
P() || (process.env.NODE_ENV !== "production" ? u(
|
|
47
|
+
!1,
|
|
48
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
49
|
+
// router loaded. We can help them understand how to avoid that.
|
|
50
|
+
"useHref() may be used only in the context of a <Router> component."
|
|
51
|
+
) : u(!1));
|
|
52
|
+
let {
|
|
53
|
+
basename: n,
|
|
54
|
+
navigator: l
|
|
55
|
+
} = o.useContext(C), {
|
|
56
|
+
hash: s,
|
|
57
|
+
pathname: a,
|
|
58
|
+
search: f
|
|
59
|
+
} = Z(e, {
|
|
60
|
+
relative: r
|
|
61
|
+
}), m = a;
|
|
62
|
+
return n !== "/" && (m = a === "/" ? n : U([n, a])), l.createHref({
|
|
63
|
+
pathname: m,
|
|
64
|
+
search: f,
|
|
65
|
+
hash: s
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function P() {
|
|
69
|
+
return o.useContext(O) != null;
|
|
70
|
+
}
|
|
71
|
+
function B() {
|
|
72
|
+
return P() || (process.env.NODE_ENV !== "production" ? u(
|
|
73
|
+
!1,
|
|
74
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
75
|
+
// router loaded. We can help them understand how to avoid that.
|
|
76
|
+
"useLocation() may be used only in the context of a <Router> component."
|
|
77
|
+
) : u(!1)), o.useContext(O).location;
|
|
78
|
+
}
|
|
79
|
+
const J = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
80
|
+
function z(e) {
|
|
81
|
+
o.useContext(C).static || o.useLayoutEffect(e);
|
|
82
|
+
}
|
|
83
|
+
function he() {
|
|
84
|
+
let {
|
|
85
|
+
isDataRoute: e
|
|
86
|
+
} = o.useContext(y);
|
|
87
|
+
return e ? ue() : Q();
|
|
88
|
+
}
|
|
89
|
+
function Q() {
|
|
90
|
+
P() || (process.env.NODE_ENV !== "production" ? u(
|
|
91
|
+
!1,
|
|
92
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
93
|
+
// router loaded. We can help them understand how to avoid that.
|
|
94
|
+
"useNavigate() may be used only in the context of a <Router> component."
|
|
95
|
+
) : u(!1));
|
|
96
|
+
let e = o.useContext(V), {
|
|
97
|
+
basename: t,
|
|
98
|
+
future: r,
|
|
99
|
+
navigator: n
|
|
100
|
+
} = o.useContext(C), {
|
|
101
|
+
matches: l
|
|
102
|
+
} = o.useContext(y), {
|
|
103
|
+
pathname: s
|
|
104
|
+
} = B(), a = JSON.stringify(M(l, r.v7_relativeSplatPath)), f = o.useRef(!1);
|
|
105
|
+
return z(() => {
|
|
106
|
+
f.current = !0;
|
|
107
|
+
}), o.useCallback(function(h, c) {
|
|
108
|
+
if (c === void 0 && (c = {}), process.env.NODE_ENV !== "production" && b(f.current, J), !f.current)
|
|
109
|
+
return;
|
|
110
|
+
if (typeof h == "number") {
|
|
111
|
+
n.go(h);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
let i = T(h, JSON.parse(a), s, c.relative === "path");
|
|
115
|
+
e == null && t !== "/" && (i.pathname = i.pathname === "/" ? t : U([t, i.pathname])), (c.replace ? n.replace : n.push)(i, c.state, c);
|
|
116
|
+
}, [t, n, a, s, e]);
|
|
117
|
+
}
|
|
118
|
+
function Z(e, t) {
|
|
119
|
+
let {
|
|
120
|
+
relative: r
|
|
121
|
+
} = t === void 0 ? {} : t, {
|
|
122
|
+
future: n
|
|
123
|
+
} = o.useContext(C), {
|
|
124
|
+
matches: l
|
|
125
|
+
} = o.useContext(y), {
|
|
126
|
+
pathname: s
|
|
127
|
+
} = B(), a = JSON.stringify(M(l, n.v7_relativeSplatPath));
|
|
128
|
+
return o.useMemo(() => T(e, JSON.parse(a), s, r === "path"), [e, a, s, r]);
|
|
129
|
+
}
|
|
130
|
+
function $(e, t) {
|
|
131
|
+
return H(e, t);
|
|
132
|
+
}
|
|
133
|
+
function H(e, t, r, n) {
|
|
134
|
+
P() || (process.env.NODE_ENV !== "production" ? u(
|
|
135
|
+
!1,
|
|
136
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
137
|
+
// router loaded. We can help them understand how to avoid that.
|
|
138
|
+
"useRoutes() may be used only in the context of a <Router> component."
|
|
139
|
+
) : u(!1));
|
|
140
|
+
let {
|
|
141
|
+
navigator: l
|
|
142
|
+
} = o.useContext(C), {
|
|
143
|
+
matches: s
|
|
144
|
+
} = o.useContext(y), a = s[s.length - 1], f = a ? a.params : {}, m = a ? a.pathname : "/", h = a ? a.pathnameBase : "/", c = a && a.route;
|
|
145
|
+
if (process.env.NODE_ENV !== "production") {
|
|
146
|
+
let d = c && c.path || "";
|
|
147
|
+
Y(m, !c || d.endsWith("*"), "You rendered descendant <Routes> (or called `useRoutes()`) at " + ('"' + m + '" (under <Route path="' + d + '">) but the ') + `parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
148
|
+
|
|
149
|
+
` + ('Please change the parent <Route path="' + d + '"> to <Route ') + ('path="' + (d === "/" ? "*" : d + "/*") + '">.'));
|
|
150
|
+
}
|
|
151
|
+
let i = B(), p;
|
|
152
|
+
if (t) {
|
|
153
|
+
var E;
|
|
154
|
+
let d = typeof t == "string" ? S(t) : t;
|
|
155
|
+
h === "/" || (E = d.pathname) != null && E.startsWith(h) || (process.env.NODE_ENV !== "production" ? u(!1, "When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was " + ('matched by all parent routes. The current pathname base is "' + h + '" ') + ('but pathname "' + d.pathname + '" was given in the `location` prop.')) : u(!1)), p = d;
|
|
156
|
+
} else
|
|
157
|
+
p = i;
|
|
158
|
+
let N = p.pathname || "/", g = N;
|
|
159
|
+
if (h !== "/") {
|
|
160
|
+
let d = h.replace(/^\//, "").split("/");
|
|
161
|
+
g = "/" + N.replace(/^\//, "").split("/").slice(d.length).join("/");
|
|
162
|
+
}
|
|
163
|
+
let v = q(e, {
|
|
164
|
+
pathname: g
|
|
165
|
+
});
|
|
166
|
+
process.env.NODE_ENV !== "production" && (process.env.NODE_ENV !== "production" && b(c || v != null, 'No routes matched location "' + p.pathname + p.search + p.hash + '" '), process.env.NODE_ENV !== "production" && b(v == null || v[v.length - 1].route.element !== void 0 || v[v.length - 1].route.Component !== void 0 || v[v.length - 1].route.lazy !== void 0, 'Matched leaf route at location "' + p.pathname + p.search + p.hash + '" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));
|
|
167
|
+
let x = oe(v && v.map((d) => Object.assign({}, d, {
|
|
168
|
+
params: Object.assign({}, f, d.params),
|
|
169
|
+
pathname: U([
|
|
170
|
+
h,
|
|
171
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
172
|
+
l.encodeLocation ? l.encodeLocation(d.pathname).pathname : d.pathname
|
|
173
|
+
]),
|
|
174
|
+
pathnameBase: d.pathnameBase === "/" ? h : U([
|
|
175
|
+
h,
|
|
176
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
177
|
+
l.encodeLocation ? l.encodeLocation(d.pathnameBase).pathname : d.pathnameBase
|
|
178
|
+
])
|
|
179
|
+
})), s, r, n);
|
|
180
|
+
return t && x ? /* @__PURE__ */ o.createElement(O.Provider, {
|
|
181
|
+
value: {
|
|
182
|
+
location: D({
|
|
183
|
+
pathname: "/",
|
|
184
|
+
search: "",
|
|
185
|
+
hash: "",
|
|
186
|
+
state: null,
|
|
187
|
+
key: "default"
|
|
188
|
+
}, p),
|
|
189
|
+
navigationType: j.Pop
|
|
190
|
+
}
|
|
191
|
+
}, x) : x;
|
|
192
|
+
}
|
|
193
|
+
function ee() {
|
|
194
|
+
let e = se(), t = G(e) ? e.status + " " + e.statusText : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, n = "rgba(200,200,200, 0.5)", l = {
|
|
195
|
+
padding: "0.5rem",
|
|
196
|
+
backgroundColor: n
|
|
197
|
+
}, s = {
|
|
198
|
+
padding: "2px 4px",
|
|
199
|
+
backgroundColor: n
|
|
200
|
+
}, a = null;
|
|
201
|
+
return process.env.NODE_ENV !== "production" && (console.error("Error handled by React Router default ErrorBoundary:", e), a = /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ o.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ o.createElement("code", {
|
|
202
|
+
style: s
|
|
203
|
+
}, "ErrorBoundary"), " or", " ", /* @__PURE__ */ o.createElement("code", {
|
|
204
|
+
style: s
|
|
205
|
+
}, "errorElement"), " prop on your route."))), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ o.createElement("h3", {
|
|
206
|
+
style: {
|
|
207
|
+
fontStyle: "italic"
|
|
208
|
+
}
|
|
209
|
+
}, t), r ? /* @__PURE__ */ o.createElement("pre", {
|
|
210
|
+
style: l
|
|
211
|
+
}, r) : null, a);
|
|
212
|
+
}
|
|
213
|
+
const te = /* @__PURE__ */ o.createElement(ee, null);
|
|
214
|
+
class re extends o.Component {
|
|
215
|
+
constructor(t) {
|
|
216
|
+
super(t), this.state = {
|
|
217
|
+
location: t.location,
|
|
218
|
+
revalidation: t.revalidation,
|
|
219
|
+
error: t.error
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
static getDerivedStateFromError(t) {
|
|
223
|
+
return {
|
|
224
|
+
error: t
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
static getDerivedStateFromProps(t, r) {
|
|
228
|
+
return r.location !== t.location || r.revalidation !== "idle" && t.revalidation === "idle" ? {
|
|
229
|
+
error: t.error,
|
|
230
|
+
location: t.location,
|
|
231
|
+
revalidation: t.revalidation
|
|
232
|
+
} : {
|
|
233
|
+
error: t.error !== void 0 ? t.error : r.error,
|
|
234
|
+
location: r.location,
|
|
235
|
+
revalidation: t.revalidation || r.revalidation
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
componentDidCatch(t, r) {
|
|
239
|
+
console.error("React Router caught the following error during render", t, r);
|
|
240
|
+
}
|
|
241
|
+
render() {
|
|
242
|
+
return this.state.error !== void 0 ? /* @__PURE__ */ o.createElement(y.Provider, {
|
|
243
|
+
value: this.props.routeContext
|
|
244
|
+
}, /* @__PURE__ */ o.createElement(w.Provider, {
|
|
245
|
+
value: this.state.error,
|
|
246
|
+
children: this.props.component
|
|
247
|
+
})) : this.props.children;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function ne(e) {
|
|
251
|
+
let {
|
|
252
|
+
routeContext: t,
|
|
253
|
+
match: r,
|
|
254
|
+
children: n
|
|
255
|
+
} = e, l = o.useContext(V);
|
|
256
|
+
return l && l.static && l.staticContext && (r.route.errorElement || r.route.ErrorBoundary) && (l.staticContext._deepestRenderedBoundaryId = r.route.id), /* @__PURE__ */ o.createElement(y.Provider, {
|
|
257
|
+
value: t
|
|
258
|
+
}, n);
|
|
259
|
+
}
|
|
260
|
+
function oe(e, t, r, n) {
|
|
261
|
+
var l;
|
|
262
|
+
if (t === void 0 && (t = []), r === void 0 && (r = null), n === void 0 && (n = null), e == null) {
|
|
263
|
+
var s;
|
|
264
|
+
if (!r)
|
|
265
|
+
return null;
|
|
266
|
+
if (r.errors)
|
|
267
|
+
e = r.matches;
|
|
268
|
+
else if ((s = n) != null && s.v7_partialHydration && t.length === 0 && !r.initialized && r.matches.length > 0)
|
|
269
|
+
e = r.matches;
|
|
270
|
+
else
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
let a = e, f = (l = r) == null ? void 0 : l.errors;
|
|
274
|
+
if (f != null) {
|
|
275
|
+
let c = a.findIndex((i) => i.route.id && (f == null ? void 0 : f[i.route.id]) !== void 0);
|
|
276
|
+
c >= 0 || (process.env.NODE_ENV !== "production" ? u(!1, "Could not find a matching route for errors on route IDs: " + Object.keys(f).join(",")) : u(!1)), a = a.slice(0, Math.min(a.length, c + 1));
|
|
277
|
+
}
|
|
278
|
+
let m = !1, h = -1;
|
|
279
|
+
if (r && n && n.v7_partialHydration)
|
|
280
|
+
for (let c = 0; c < a.length; c++) {
|
|
281
|
+
let i = a[c];
|
|
282
|
+
if ((i.route.HydrateFallback || i.route.hydrateFallbackElement) && (h = c), i.route.id) {
|
|
283
|
+
let {
|
|
284
|
+
loaderData: p,
|
|
285
|
+
errors: E
|
|
286
|
+
} = r, N = i.route.loader && p[i.route.id] === void 0 && (!E || E[i.route.id] === void 0);
|
|
287
|
+
if (i.route.lazy || N) {
|
|
288
|
+
m = !0, h >= 0 ? a = a.slice(0, h + 1) : a = [a[0]];
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return a.reduceRight((c, i, p) => {
|
|
294
|
+
let E, N = !1, g = null, v = null;
|
|
295
|
+
r && (E = f && i.route.id ? f[i.route.id] : void 0, g = i.route.errorElement || te, m && (h < 0 && p === 0 ? (Y("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), N = !0, v = null) : h === p && (N = !0, v = i.route.hydrateFallbackElement || null)));
|
|
296
|
+
let x = t.concat(a.slice(0, p + 1)), d = () => {
|
|
297
|
+
let R;
|
|
298
|
+
return E ? R = g : N ? R = v : i.route.Component ? R = /* @__PURE__ */ o.createElement(i.route.Component, null) : i.route.element ? R = i.route.element : R = c, /* @__PURE__ */ o.createElement(ne, {
|
|
299
|
+
match: i,
|
|
300
|
+
routeContext: {
|
|
301
|
+
outlet: c,
|
|
302
|
+
matches: x,
|
|
303
|
+
isDataRoute: r != null
|
|
304
|
+
},
|
|
305
|
+
children: R
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
return r && (i.route.ErrorBoundary || i.route.errorElement || p === 0) ? /* @__PURE__ */ o.createElement(re, {
|
|
309
|
+
location: r.location,
|
|
310
|
+
revalidation: r.revalidation,
|
|
311
|
+
component: g,
|
|
312
|
+
error: E,
|
|
313
|
+
children: d(),
|
|
314
|
+
routeContext: {
|
|
315
|
+
outlet: null,
|
|
316
|
+
matches: x,
|
|
317
|
+
isDataRoute: !0
|
|
318
|
+
}
|
|
319
|
+
}) : d();
|
|
320
|
+
}, null);
|
|
321
|
+
}
|
|
322
|
+
var W = /* @__PURE__ */ function(e) {
|
|
323
|
+
return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
|
|
324
|
+
}(W || {}), _ = /* @__PURE__ */ function(e) {
|
|
325
|
+
return e.UseBlocker = "useBlocker", e.UseLoaderData = "useLoaderData", e.UseActionData = "useActionData", e.UseRouteError = "useRouteError", e.UseNavigation = "useNavigation", e.UseRouteLoaderData = "useRouteLoaderData", e.UseMatches = "useMatches", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e.UseRouteId = "useRouteId", e;
|
|
326
|
+
}(_ || {});
|
|
327
|
+
function I(e) {
|
|
328
|
+
return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
|
|
329
|
+
}
|
|
330
|
+
function ae(e) {
|
|
331
|
+
let t = o.useContext(V);
|
|
332
|
+
return t || (process.env.NODE_ENV !== "production" ? u(!1, I(e)) : u(!1)), t;
|
|
333
|
+
}
|
|
334
|
+
function ie(e) {
|
|
335
|
+
let t = o.useContext(k);
|
|
336
|
+
return t || (process.env.NODE_ENV !== "production" ? u(!1, I(e)) : u(!1)), t;
|
|
337
|
+
}
|
|
338
|
+
function le(e) {
|
|
339
|
+
let t = o.useContext(y);
|
|
340
|
+
return t || (process.env.NODE_ENV !== "production" ? u(!1, I(e)) : u(!1)), t;
|
|
341
|
+
}
|
|
342
|
+
function L(e) {
|
|
343
|
+
let t = le(e), r = t.matches[t.matches.length - 1];
|
|
344
|
+
return r.route.id || (process.env.NODE_ENV !== "production" ? u(!1, e + ' can only be used on routes that contain a unique "id"') : u(!1)), r.route.id;
|
|
345
|
+
}
|
|
346
|
+
function fe() {
|
|
347
|
+
return L(_.UseRouteId);
|
|
348
|
+
}
|
|
349
|
+
function se() {
|
|
350
|
+
var e;
|
|
351
|
+
let t = o.useContext(w), r = ie(_.UseRouteError), n = L(_.UseRouteError);
|
|
352
|
+
return t !== void 0 ? t : (e = r.errors) == null ? void 0 : e[n];
|
|
353
|
+
}
|
|
354
|
+
function ue() {
|
|
355
|
+
let {
|
|
356
|
+
router: e
|
|
357
|
+
} = ae(W.UseNavigateStable), t = L(_.UseNavigateStable), r = o.useRef(!1);
|
|
358
|
+
return z(() => {
|
|
359
|
+
r.current = !0;
|
|
360
|
+
}), o.useCallback(function(l, s) {
|
|
361
|
+
s === void 0 && (s = {}), process.env.NODE_ENV !== "production" && b(r.current, J), r.current && (typeof l == "number" ? e.navigate(l) : e.navigate(l, D({
|
|
362
|
+
fromRouteId: t
|
|
363
|
+
}, s)));
|
|
364
|
+
}, [e, t]);
|
|
365
|
+
}
|
|
366
|
+
const A = {};
|
|
367
|
+
function Y(e, t, r) {
|
|
368
|
+
!t && !A[e] && (A[e] = !0, process.env.NODE_ENV !== "production" && b(!1, r));
|
|
369
|
+
}
|
|
370
|
+
function ce(e) {
|
|
371
|
+
process.env.NODE_ENV !== "production" ? u(!1, "A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.") : u(!1);
|
|
372
|
+
}
|
|
373
|
+
function ve(e) {
|
|
374
|
+
let {
|
|
375
|
+
basename: t = "/",
|
|
376
|
+
children: r = null,
|
|
377
|
+
location: n,
|
|
378
|
+
navigationType: l = j.Pop,
|
|
379
|
+
navigator: s,
|
|
380
|
+
static: a = !1,
|
|
381
|
+
future: f
|
|
382
|
+
} = e;
|
|
383
|
+
P() && (process.env.NODE_ENV !== "production" ? u(!1, "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.") : u(!1));
|
|
384
|
+
let m = t.replace(/^\/*/, "/"), h = o.useMemo(() => ({
|
|
385
|
+
basename: m,
|
|
386
|
+
navigator: s,
|
|
387
|
+
static: a,
|
|
388
|
+
future: D({
|
|
389
|
+
v7_relativeSplatPath: !1
|
|
390
|
+
}, f)
|
|
391
|
+
}), [m, f, s, a]);
|
|
392
|
+
typeof n == "string" && (n = S(n));
|
|
393
|
+
let {
|
|
394
|
+
pathname: c = "/",
|
|
395
|
+
search: i = "",
|
|
396
|
+
hash: p = "",
|
|
397
|
+
state: E = null,
|
|
398
|
+
key: N = "default"
|
|
399
|
+
} = n, g = o.useMemo(() => {
|
|
400
|
+
let v = X(c, m);
|
|
401
|
+
return v == null ? null : {
|
|
402
|
+
location: {
|
|
403
|
+
pathname: v,
|
|
404
|
+
search: i,
|
|
405
|
+
hash: p,
|
|
406
|
+
state: E,
|
|
407
|
+
key: N
|
|
408
|
+
},
|
|
409
|
+
navigationType: l
|
|
410
|
+
};
|
|
411
|
+
}, [m, c, i, p, E, N, l]);
|
|
412
|
+
return process.env.NODE_ENV !== "production" && b(g != null, '<Router basename="' + m + '"> is not able to match the URL ' + ('"' + c + i + p + '" because it does not start with the ') + "basename, so the <Router> won't render anything."), g == null ? null : /* @__PURE__ */ o.createElement(C.Provider, {
|
|
413
|
+
value: h
|
|
414
|
+
}, /* @__PURE__ */ o.createElement(O.Provider, {
|
|
415
|
+
children: r,
|
|
416
|
+
value: g
|
|
417
|
+
}));
|
|
418
|
+
}
|
|
419
|
+
function me(e) {
|
|
420
|
+
let {
|
|
421
|
+
children: t,
|
|
422
|
+
location: r
|
|
423
|
+
} = e;
|
|
424
|
+
return $(F(t), r);
|
|
425
|
+
}
|
|
426
|
+
new Promise(() => {
|
|
427
|
+
});
|
|
428
|
+
function F(e, t) {
|
|
429
|
+
t === void 0 && (t = []);
|
|
430
|
+
let r = [];
|
|
431
|
+
return o.Children.forEach(e, (n, l) => {
|
|
432
|
+
if (!/* @__PURE__ */ o.isValidElement(n))
|
|
433
|
+
return;
|
|
434
|
+
let s = [...t, l];
|
|
435
|
+
if (n.type === o.Fragment) {
|
|
436
|
+
r.push.apply(r, F(n.props.children, s));
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
n.type !== ce && (process.env.NODE_ENV !== "production" ? u(!1, "[" + (typeof n.type == "string" ? n.type : n.type.name) + "] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>") : u(!1)), !n.props.index || !n.props.children || (process.env.NODE_ENV !== "production" ? u(!1, "An index route cannot have child routes.") : u(!1));
|
|
440
|
+
let a = {
|
|
441
|
+
id: n.props.id || s.join("-"),
|
|
442
|
+
caseSensitive: n.props.caseSensitive,
|
|
443
|
+
element: n.props.element,
|
|
444
|
+
Component: n.props.Component,
|
|
445
|
+
index: n.props.index,
|
|
446
|
+
path: n.props.path,
|
|
447
|
+
loader: n.props.loader,
|
|
448
|
+
action: n.props.action,
|
|
449
|
+
errorElement: n.props.errorElement,
|
|
450
|
+
ErrorBoundary: n.props.ErrorBoundary,
|
|
451
|
+
hasErrorBoundary: n.props.ErrorBoundary != null || n.props.errorElement != null,
|
|
452
|
+
shouldRevalidate: n.props.shouldRevalidate,
|
|
453
|
+
handle: n.props.handle,
|
|
454
|
+
lazy: n.props.lazy
|
|
455
|
+
};
|
|
456
|
+
n.props.children && (a.children = F(n.props.children, s)), r.push(a);
|
|
457
|
+
}), r;
|
|
458
|
+
}
|
|
459
|
+
export {
|
|
460
|
+
j as NavigationType,
|
|
461
|
+
ce as Route,
|
|
462
|
+
ve as Router,
|
|
463
|
+
me as Routes,
|
|
464
|
+
V as UNSAFE_DataRouterContext,
|
|
465
|
+
k as UNSAFE_DataRouterStateContext,
|
|
466
|
+
O as UNSAFE_LocationContext,
|
|
467
|
+
C as UNSAFE_NavigationContext,
|
|
468
|
+
y as UNSAFE_RouteContext,
|
|
469
|
+
fe as UNSAFE_useRouteId,
|
|
470
|
+
H as UNSAFE_useRoutesImpl,
|
|
471
|
+
ge as createPath,
|
|
472
|
+
F as createRoutesFromChildren,
|
|
473
|
+
F as createRoutesFromElements,
|
|
474
|
+
G as isRouteErrorResponse,
|
|
475
|
+
ye as matchPath,
|
|
476
|
+
q as matchRoutes,
|
|
477
|
+
S as parsePath,
|
|
478
|
+
Re as resolvePath,
|
|
479
|
+
pe as useHref,
|
|
480
|
+
P as useInRouterContext,
|
|
481
|
+
B as useLocation,
|
|
482
|
+
he as useNavigate,
|
|
483
|
+
Z as useResolvedPath,
|
|
484
|
+
se as useRouteError,
|
|
485
|
+
$ as useRoutes
|
|
486
|
+
};
|