Compare commits
2 Commits
303928a95c
...
336bbcc5da
Author | SHA1 | Date | |
---|---|---|---|
336bbcc5da | |||
873ff90204 |
20
data.json
20
data.json
@ -1,4 +1,24 @@
|
||||
{
|
||||
"users": [
|
||||
{
|
||||
"handle": "admin",
|
||||
"email": "admin@mail.com",
|
||||
"password": "admin",
|
||||
"id": 1
|
||||
},
|
||||
{
|
||||
"email": "milana@mail.com",
|
||||
"handle": "milana",
|
||||
"password": "milana",
|
||||
"id": 2
|
||||
},
|
||||
{
|
||||
"handle": "milana",
|
||||
"email": "milana@mail.com",
|
||||
"password": "milana",
|
||||
"id": 3
|
||||
}
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"id": 1,
|
||||
|
253
node_modules/.package-lock.json
generated
vendored
253
node_modules/.package-lock.json
generated
vendored
@ -519,8 +519,7 @@
|
||||
"node_modules/@jridgewell/sourcemap-codec": {
|
||||
"version": "1.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
|
||||
},
|
||||
"node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.20",
|
||||
@ -686,6 +685,11 @@
|
||||
"@babel/types": "^7.20.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/js-cookie": {
|
||||
"version": "2.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-2.2.7.tgz",
|
||||
"integrity": "sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA=="
|
||||
},
|
||||
"node_modules/@types/json5": {
|
||||
"version": "0.0.29",
|
||||
"resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
|
||||
@ -759,6 +763,11 @@
|
||||
"vite": "^4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@xobotyi/scrollbar-width": {
|
||||
"version": "1.9.5",
|
||||
"resolved": "https://registry.npmjs.org/@xobotyi/scrollbar-width/-/scrollbar-width-1.9.5.tgz",
|
||||
"integrity": "sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ=="
|
||||
},
|
||||
"node_modules/accepts": {
|
||||
"version": "1.3.8",
|
||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
||||
@ -1372,6 +1381,14 @@
|
||||
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/copy-to-clipboard": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz",
|
||||
"integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==",
|
||||
"dependencies": {
|
||||
"toggle-selection": "^1.0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/cors": {
|
||||
"version": "2.8.5",
|
||||
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
|
||||
@ -1399,6 +1416,26 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/css-in-js-utils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/css-in-js-utils/-/css-in-js-utils-3.1.0.tgz",
|
||||
"integrity": "sha512-fJAcud6B3rRu+KHYk+Bwf+WFL2MDCJJ1XG9x137tJQ0xYxor7XziQtuGFbWNdqrvF4Tk26O3H73nfVqXt/fW1A==",
|
||||
"dependencies": {
|
||||
"hyphenate-style-name": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/css-tree": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
|
||||
"integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
|
||||
"dependencies": {
|
||||
"mdn-data": "2.0.14",
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/csstype": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
|
||||
@ -1565,6 +1602,14 @@
|
||||
"is-arrayish": "^0.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/error-stack-parser": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz",
|
||||
"integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==",
|
||||
"dependencies": {
|
||||
"stackframe": "^1.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/errorhandler": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.5.1.tgz",
|
||||
@ -2343,8 +2388,7 @@
|
||||
"node_modules/fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||
"dev": true
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||
},
|
||||
"node_modules/fast-json-stable-stringify": {
|
||||
"version": "2.1.0",
|
||||
@ -2358,6 +2402,21 @@
|
||||
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fast-loops": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-loops/-/fast-loops-1.1.3.tgz",
|
||||
"integrity": "sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g=="
|
||||
},
|
||||
"node_modules/fast-shallow-equal": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-shallow-equal/-/fast-shallow-equal-1.0.0.tgz",
|
||||
"integrity": "sha512-HPtaa38cPgWvaCFmRNhlc6NG7pv6NUHqjPgVAkWGoB9mQMwYB27/K0CvOM5Czy+qpT3e8XJ6Q4aPAnzpNpzNaw=="
|
||||
},
|
||||
"node_modules/fastest-stable-stringify": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/fastest-stable-stringify/-/fastest-stable-stringify-2.0.2.tgz",
|
||||
"integrity": "sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q=="
|
||||
},
|
||||
"node_modules/fastq": {
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
|
||||
@ -2789,6 +2848,11 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/hyphenate-style-name": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz",
|
||||
"integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ=="
|
||||
},
|
||||
"node_modules/iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
@ -2851,6 +2915,15 @@
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/inline-style-prefixer": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-7.0.0.tgz",
|
||||
"integrity": "sha512-I7GEdScunP1dQ6IM2mQWh6v0mOYdYmH3Bp31UecKdrcUgcURTcctSe1IECdUznSHKSmsHtjrT3CwCPI1pyxfUQ==",
|
||||
"dependencies": {
|
||||
"css-in-js-utils": "^3.1.0",
|
||||
"fast-loops": "^1.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/install": {
|
||||
"version": "0.13.0",
|
||||
"resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz",
|
||||
@ -3247,6 +3320,11 @@
|
||||
"integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/js-cookie": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz",
|
||||
"integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ=="
|
||||
},
|
||||
"node_modules/js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
@ -3563,6 +3641,11 @@
|
||||
"yallist": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/mdn-data": {
|
||||
"version": "2.0.14",
|
||||
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
|
||||
"integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="
|
||||
},
|
||||
"node_modules/media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
@ -3727,6 +3810,25 @@
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/nano-css": {
|
||||
"version": "5.6.1",
|
||||
"resolved": "https://registry.npmjs.org/nano-css/-/nano-css-5.6.1.tgz",
|
||||
"integrity": "sha512-T2Mhc//CepkTa3X4pUhKgbEheJHYAxD0VptuqFhDbGMUWVV2m+lkNiW/Ieuj35wrfC8Zm0l7HvssQh7zcEttSw==",
|
||||
"dependencies": {
|
||||
"@jridgewell/sourcemap-codec": "^1.4.15",
|
||||
"css-tree": "^1.1.2",
|
||||
"csstype": "^3.1.2",
|
||||
"fastest-stable-stringify": "^2.0.2",
|
||||
"inline-style-prefixer": "^7.0.0",
|
||||
"rtl-css-js": "^1.16.1",
|
||||
"stacktrace-js": "^2.0.2",
|
||||
"stylis": "^4.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-dom": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
||||
@ -7293,6 +7395,40 @@
|
||||
"react-dom": ">=16.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-universal-interface": {
|
||||
"version": "0.6.2",
|
||||
"resolved": "https://registry.npmjs.org/react-universal-interface/-/react-universal-interface-0.6.2.tgz",
|
||||
"integrity": "sha512-dg8yXdcQmvgR13RIlZbTRQOoUrDciFVoSBZILwjE2LFISxZZ8loVJKAkuzswl5js8BHda79bIb2b84ehU8IjXw==",
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"tslib": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-use": {
|
||||
"version": "17.4.2",
|
||||
"resolved": "https://registry.npmjs.org/react-use/-/react-use-17.4.2.tgz",
|
||||
"integrity": "sha512-1jPtmWLD8OJJNYCdYLJEH/HM+bPDfJuyGwCYeJFgPmWY8ttwpgZnW5QnzgM55CYUByUiTjHxsGOnEpLl6yQaoQ==",
|
||||
"dependencies": {
|
||||
"@types/js-cookie": "^2.2.6",
|
||||
"@xobotyi/scrollbar-width": "^1.9.5",
|
||||
"copy-to-clipboard": "^3.3.1",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fast-shallow-equal": "^1.0.0",
|
||||
"js-cookie": "^2.2.1",
|
||||
"nano-css": "^5.6.1",
|
||||
"react-universal-interface": "^0.6.2",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
"screenfull": "^5.1.0",
|
||||
"set-harmonic-interval": "^1.0.1",
|
||||
"throttle-debounce": "^3.0.1",
|
||||
"ts-easing": "^0.2.0",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-dom": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/read-pkg": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
|
||||
@ -7358,6 +7494,11 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/resize-observer-polyfill": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
|
||||
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "2.0.0-next.5",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz",
|
||||
@ -7425,6 +7566,14 @@
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/rtl-css-js": {
|
||||
"version": "1.16.1",
|
||||
"resolved": "https://registry.npmjs.org/rtl-css-js/-/rtl-css-js-1.16.1.tgz",
|
||||
"integrity": "sha512-lRQgou1mu19e+Ya0LsTvKrVJ5TYUbqCVPAiImX3UfLTenarvPUl1QFdvu5Z3PYmHT9RCcwIfbjRQBntExyj3Zg==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/run-parallel": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
|
||||
@ -7500,6 +7649,17 @@
|
||||
"loose-envify": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/screenfull": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/screenfull/-/screenfull-5.2.0.tgz",
|
||||
"integrity": "sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
@ -7610,6 +7770,14 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/set-harmonic-interval": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/set-harmonic-interval/-/set-harmonic-interval-1.0.1.tgz",
|
||||
"integrity": "sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g==",
|
||||
"engines": {
|
||||
"node": ">=6.9"
|
||||
}
|
||||
},
|
||||
"node_modules/setprototypeof": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
||||
@ -7660,6 +7828,14 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
@ -7701,6 +7877,46 @@
|
||||
"integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/stack-generator": {
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://registry.npmjs.org/stack-generator/-/stack-generator-2.0.10.tgz",
|
||||
"integrity": "sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ==",
|
||||
"dependencies": {
|
||||
"stackframe": "^1.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/stackframe": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz",
|
||||
"integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw=="
|
||||
},
|
||||
"node_modules/stacktrace-gps": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/stacktrace-gps/-/stacktrace-gps-3.1.2.tgz",
|
||||
"integrity": "sha512-GcUgbO4Jsqqg6RxfyTHFiPxdPqF+3LFmQhm7MgCuYQOYuWyqxo5pwRPz5d/u6/WYJdEnWfK4r+jGbyD8TSggXQ==",
|
||||
"dependencies": {
|
||||
"source-map": "0.5.6",
|
||||
"stackframe": "^1.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/stacktrace-gps/node_modules/source-map": {
|
||||
"version": "0.5.6",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
|
||||
"integrity": "sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/stacktrace-js": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/stacktrace-js/-/stacktrace-js-2.0.2.tgz",
|
||||
"integrity": "sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg==",
|
||||
"dependencies": {
|
||||
"error-stack-parser": "^2.0.6",
|
||||
"stack-generator": "^2.0.5",
|
||||
"stacktrace-gps": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/statuses": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
||||
@ -7848,6 +8064,11 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/stylis": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.0.tgz",
|
||||
"integrity": "sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ=="
|
||||
},
|
||||
"node_modules/supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
@ -7878,6 +8099,14 @@
|
||||
"integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/throttle-debounce": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-3.0.1.tgz",
|
||||
"integrity": "sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/to-fast-properties": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
||||
@ -7887,6 +8116,11 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/toggle-selection": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
|
||||
"integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ=="
|
||||
},
|
||||
"node_modules/toidentifier": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
||||
@ -7896,6 +8130,11 @@
|
||||
"node": ">=0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-easing": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-easing/-/ts-easing-0.2.0.tgz",
|
||||
"integrity": "sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ=="
|
||||
},
|
||||
"node_modules/tsconfig-paths": {
|
||||
"version": "3.14.2",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz",
|
||||
@ -8133,9 +8372,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz",
|
||||
"integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==",
|
||||
"version": "4.5.1",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz",
|
||||
"integrity": "sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.18.10",
|
||||
|
61
node_modules/.vite/deps/_metadata.json
generated
vendored
61
node_modules/.vite/deps/_metadata.json
generated
vendored
@ -1,98 +1,95 @@
|
||||
{
|
||||
"hash": "6801aba0",
|
||||
"browserHash": "e4e3c25e",
|
||||
"hash": "5a59aa2d",
|
||||
"browserHash": "8e5c0d36",
|
||||
"optimized": {
|
||||
"react": {
|
||||
"src": "../../react/index.js",
|
||||
"file": "react.js",
|
||||
"fileHash": "8e331b40",
|
||||
"fileHash": "280e75a0",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-dev-runtime": {
|
||||
"src": "../../react/jsx-dev-runtime.js",
|
||||
"file": "react_jsx-dev-runtime.js",
|
||||
"fileHash": "2b9a0b78",
|
||||
"fileHash": "ac619266",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-runtime": {
|
||||
"src": "../../react/jsx-runtime.js",
|
||||
"file": "react_jsx-runtime.js",
|
||||
"fileHash": "a5cda4c3",
|
||||
"fileHash": "f59d5796",
|
||||
"needsInterop": true
|
||||
},
|
||||
"axios": {
|
||||
"src": "../../axios/index.js",
|
||||
"file": "axios.js",
|
||||
"fileHash": "580f79f2",
|
||||
"fileHash": "19fccd05",
|
||||
"needsInterop": false
|
||||
},
|
||||
"prop-types": {
|
||||
"src": "../../prop-types/index.js",
|
||||
"file": "prop-types.js",
|
||||
"fileHash": "b7bd6296",
|
||||
"fileHash": "096cb4d2",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-bootstrap": {
|
||||
"src": "../../react-bootstrap/esm/index.js",
|
||||
"file": "react-bootstrap.js",
|
||||
"fileHash": "ceb7c5a2",
|
||||
"fileHash": "664324ca",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-bootstrap-icons": {
|
||||
"src": "../../react-bootstrap-icons/dist/index.js",
|
||||
"file": "react-bootstrap-icons.js",
|
||||
"fileHash": "fd7a753f",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-datepicker": {
|
||||
"src": "../../react-datepicker/dist/es/index.js",
|
||||
"file": "react-datepicker.js",
|
||||
"fileHash": "27e8d453",
|
||||
"fileHash": "887b9d76",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-dom": {
|
||||
"src": "../../react-dom/index.js",
|
||||
"file": "react-dom.js",
|
||||
"fileHash": "a1f51e08",
|
||||
"fileHash": "a2d49d29",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-dom/client": {
|
||||
"src": "../../react-dom/client.js",
|
||||
"file": "react-dom_client.js",
|
||||
"fileHash": "807f9a4d",
|
||||
"fileHash": "78b99996",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-hot-toast": {
|
||||
"src": "../../react-hot-toast/dist/index.mjs",
|
||||
"file": "react-hot-toast.js",
|
||||
"fileHash": "1332f4e7",
|
||||
"fileHash": "e05147e9",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-router-dom": {
|
||||
"src": "../../react-router-dom/dist/index.js",
|
||||
"file": "react-router-dom.js",
|
||||
"fileHash": "c70a2c6c",
|
||||
"fileHash": "c9ccb906",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-use": {
|
||||
"src": "../../react-use/esm/index.js",
|
||||
"file": "react-use.js",
|
||||
"fileHash": "cdff94d5",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-UFCMWVQY": {
|
||||
"file": "chunk-UFCMWVQY.js"
|
||||
"chunk-U73TBONF": {
|
||||
"file": "chunk-U73TBONF.js"
|
||||
},
|
||||
"chunk-7FSKZ4FL": {
|
||||
"file": "chunk-7FSKZ4FL.js"
|
||||
"chunk-SZQQTH7P": {
|
||||
"file": "chunk-SZQQTH7P.js"
|
||||
},
|
||||
"chunk-ZT4DMYUS": {
|
||||
"file": "chunk-ZT4DMYUS.js"
|
||||
"chunk-HOONJUPS": {
|
||||
"file": "chunk-HOONJUPS.js"
|
||||
},
|
||||
"chunk-2VGUONL3": {
|
||||
"file": "chunk-2VGUONL3.js"
|
||||
"chunk-ZGRSIX2Q": {
|
||||
"file": "chunk-ZGRSIX2Q.js"
|
||||
},
|
||||
"chunk-RDZYK52F": {
|
||||
"file": "chunk-RDZYK52F.js"
|
||||
},
|
||||
"chunk-5WWUZCGV": {
|
||||
"file": "chunk-5WWUZCGV.js"
|
||||
"chunk-ROME4SDB": {
|
||||
"file": "chunk-ROME4SDB.js"
|
||||
}
|
||||
}
|
||||
}
|
7646
node_modules/vite/dist/node/chunks/dep-73522cdf.js
generated
vendored
7646
node_modules/vite/dist/node/chunks/dep-73522cdf.js
generated
vendored
File diff suppressed because it is too large
Load Diff
66291
node_modules/vite/dist/node/chunks/dep-df561101.js
generated
vendored
66291
node_modules/vite/dist/node/chunks/dep-df561101.js
generated
vendored
File diff suppressed because one or more lines are too long
914
node_modules/vite/dist/node/chunks/dep-e0331088.js
generated
vendored
914
node_modules/vite/dist/node/chunks/dep-e0331088.js
generated
vendored
@ -1,914 +0,0 @@
|
||||
import { E as getDefaultExportFromCjs } from './dep-df561101.js';
|
||||
import require$$0 from 'path';
|
||||
import require$$0__default from 'fs';
|
||||
import { l as lib } from './dep-c423598f.js';
|
||||
|
||||
import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
|
||||
import { dirname as __cjs_dirname } from 'node:path';
|
||||
import { createRequire as __cjs_createRequire } from 'node:module';
|
||||
|
||||
const __filename = __cjs_fileURLToPath(import.meta.url);
|
||||
const __dirname = __cjs_dirname(__filename);
|
||||
const require = __cjs_createRequire(import.meta.url);
|
||||
const __require = require;
|
||||
function _mergeNamespaces(n, m) {
|
||||
for (var i = 0; i < m.length; i++) {
|
||||
var e = m[i];
|
||||
if (typeof e !== 'string' && !Array.isArray(e)) { for (var k in e) {
|
||||
if (k !== 'default' && !(k in n)) {
|
||||
n[k] = e[k];
|
||||
}
|
||||
} }
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
const startsWithKeywordRegexp = /^(all|not|only|print|screen)/i;
|
||||
|
||||
var joinMedia$1 = function (parentMedia, childMedia) {
|
||||
if (!parentMedia.length && childMedia.length) return childMedia
|
||||
if (parentMedia.length && !childMedia.length) return parentMedia
|
||||
if (!parentMedia.length && !childMedia.length) return []
|
||||
|
||||
const media = [];
|
||||
|
||||
parentMedia.forEach(parentItem => {
|
||||
const parentItemStartsWithKeyword = startsWithKeywordRegexp.test(parentItem);
|
||||
|
||||
childMedia.forEach(childItem => {
|
||||
const childItemStartsWithKeyword = startsWithKeywordRegexp.test(childItem);
|
||||
if (parentItem !== childItem) {
|
||||
if (childItemStartsWithKeyword && !parentItemStartsWithKeyword) {
|
||||
media.push(`${childItem} and ${parentItem}`);
|
||||
} else {
|
||||
media.push(`${parentItem} and ${childItem}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return media
|
||||
};
|
||||
|
||||
var joinLayer$1 = function (parentLayer, childLayer) {
|
||||
if (!parentLayer.length && childLayer.length) return childLayer
|
||||
if (parentLayer.length && !childLayer.length) return parentLayer
|
||||
if (!parentLayer.length && !childLayer.length) return []
|
||||
|
||||
return parentLayer.concat(childLayer)
|
||||
};
|
||||
|
||||
var readCache$1 = {exports: {}};
|
||||
|
||||
var pify$2 = {exports: {}};
|
||||
|
||||
var processFn = function (fn, P, opts) {
|
||||
return function () {
|
||||
var that = this;
|
||||
var args = new Array(arguments.length);
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
args[i] = arguments[i];
|
||||
}
|
||||
|
||||
return new P(function (resolve, reject) {
|
||||
args.push(function (err, result) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else if (opts.multiArgs) {
|
||||
var results = new Array(arguments.length - 1);
|
||||
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
results[i - 1] = arguments[i];
|
||||
}
|
||||
|
||||
resolve(results);
|
||||
} else {
|
||||
resolve(result);
|
||||
}
|
||||
});
|
||||
|
||||
fn.apply(that, args);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var pify$1 = pify$2.exports = function (obj, P, opts) {
|
||||
if (typeof P !== 'function') {
|
||||
opts = P;
|
||||
P = Promise;
|
||||
}
|
||||
|
||||
opts = opts || {};
|
||||
opts.exclude = opts.exclude || [/.+Sync$/];
|
||||
|
||||
var filter = function (key) {
|
||||
var match = function (pattern) {
|
||||
return typeof pattern === 'string' ? key === pattern : pattern.test(key);
|
||||
};
|
||||
|
||||
return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
|
||||
};
|
||||
|
||||
var ret = typeof obj === 'function' ? function () {
|
||||
if (opts.excludeMain) {
|
||||
return obj.apply(this, arguments);
|
||||
}
|
||||
|
||||
return processFn(obj, P, opts).apply(this, arguments);
|
||||
} : {};
|
||||
|
||||
return Object.keys(obj).reduce(function (ret, key) {
|
||||
var x = obj[key];
|
||||
|
||||
ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x;
|
||||
|
||||
return ret;
|
||||
}, ret);
|
||||
};
|
||||
|
||||
pify$1.all = pify$1;
|
||||
|
||||
var pifyExports = pify$2.exports;
|
||||
|
||||
var fs = require$$0__default;
|
||||
var path$2 = require$$0;
|
||||
var pify = pifyExports;
|
||||
|
||||
var stat = pify(fs.stat);
|
||||
var readFile = pify(fs.readFile);
|
||||
var resolve = path$2.resolve;
|
||||
|
||||
var cache = Object.create(null);
|
||||
|
||||
function convert(content, encoding) {
|
||||
if (Buffer.isEncoding(encoding)) {
|
||||
return content.toString(encoding);
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
readCache$1.exports = function (path, encoding) {
|
||||
path = resolve(path);
|
||||
|
||||
return stat(path).then(function (stats) {
|
||||
var item = cache[path];
|
||||
|
||||
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
|
||||
return convert(item.content, encoding);
|
||||
}
|
||||
|
||||
return readFile(path).then(function (data) {
|
||||
cache[path] = {
|
||||
mtime: stats.mtime,
|
||||
content: data
|
||||
};
|
||||
|
||||
return convert(data, encoding);
|
||||
});
|
||||
}).catch(function (err) {
|
||||
cache[path] = null;
|
||||
return Promise.reject(err);
|
||||
});
|
||||
};
|
||||
|
||||
readCache$1.exports.sync = function (path, encoding) {
|
||||
path = resolve(path);
|
||||
|
||||
try {
|
||||
var stats = fs.statSync(path);
|
||||
var item = cache[path];
|
||||
|
||||
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
|
||||
return convert(item.content, encoding);
|
||||
}
|
||||
|
||||
var data = fs.readFileSync(path);
|
||||
|
||||
cache[path] = {
|
||||
mtime: stats.mtime,
|
||||
content: data
|
||||
};
|
||||
|
||||
return convert(data, encoding);
|
||||
} catch (err) {
|
||||
cache[path] = null;
|
||||
throw err;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
readCache$1.exports.get = function (path, encoding) {
|
||||
path = resolve(path);
|
||||
if (cache[path]) {
|
||||
return convert(cache[path].content, encoding);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
readCache$1.exports.clear = function () {
|
||||
cache = Object.create(null);
|
||||
};
|
||||
|
||||
var readCacheExports = readCache$1.exports;
|
||||
|
||||
const dataURLRegexp = /^data:text\/css;base64,/i;
|
||||
|
||||
function isValid(url) {
|
||||
return dataURLRegexp.test(url)
|
||||
}
|
||||
|
||||
function contents(url) {
|
||||
// "data:text/css;base64,".length === 21
|
||||
return Buffer.from(url.slice(21), "base64").toString()
|
||||
}
|
||||
|
||||
var dataUrl = {
|
||||
isValid,
|
||||
contents,
|
||||
};
|
||||
|
||||
const readCache = readCacheExports;
|
||||
const dataURL$1 = dataUrl;
|
||||
|
||||
var loadContent$1 = filename => {
|
||||
if (dataURL$1.isValid(filename)) {
|
||||
return dataURL$1.contents(filename)
|
||||
}
|
||||
|
||||
return readCache(filename, "utf-8")
|
||||
};
|
||||
|
||||
// builtin tooling
|
||||
const path$1 = require$$0;
|
||||
|
||||
// placeholder tooling
|
||||
let sugarss;
|
||||
|
||||
var processContent$1 = function processContent(
|
||||
result,
|
||||
content,
|
||||
filename,
|
||||
options,
|
||||
postcss
|
||||
) {
|
||||
const { plugins } = options;
|
||||
const ext = path$1.extname(filename);
|
||||
|
||||
const parserList = [];
|
||||
|
||||
// SugarSS support:
|
||||
if (ext === ".sss") {
|
||||
if (!sugarss) {
|
||||
try {
|
||||
sugarss = __require('sugarss');
|
||||
} catch {} // Ignore
|
||||
}
|
||||
if (sugarss)
|
||||
return runPostcss(postcss, content, filename, plugins, [sugarss])
|
||||
}
|
||||
|
||||
// Syntax support:
|
||||
if (result.opts.syntax?.parse) {
|
||||
parserList.push(result.opts.syntax.parse);
|
||||
}
|
||||
|
||||
// Parser support:
|
||||
if (result.opts.parser) parserList.push(result.opts.parser);
|
||||
// Try the default as a last resort:
|
||||
parserList.push(null);
|
||||
|
||||
return runPostcss(postcss, content, filename, plugins, parserList)
|
||||
};
|
||||
|
||||
function runPostcss(postcss, content, filename, plugins, parsers, index) {
|
||||
if (!index) index = 0;
|
||||
return postcss(plugins)
|
||||
.process(content, {
|
||||
from: filename,
|
||||
parser: parsers[index],
|
||||
})
|
||||
.catch(err => {
|
||||
// If there's an error, try the next parser
|
||||
index++;
|
||||
// If there are no parsers left, throw it
|
||||
if (index === parsers.length) throw err
|
||||
return runPostcss(postcss, content, filename, plugins, parsers, index)
|
||||
})
|
||||
}
|
||||
|
||||
// external tooling
|
||||
const valueParser = lib;
|
||||
|
||||
// extended tooling
|
||||
const { stringify } = valueParser;
|
||||
|
||||
function split(params, start) {
|
||||
const list = [];
|
||||
const last = params.reduce((item, node, index) => {
|
||||
if (index < start) return ""
|
||||
if (node.type === "div" && node.value === ",") {
|
||||
list.push(item);
|
||||
return ""
|
||||
}
|
||||
return item + stringify(node)
|
||||
}, "");
|
||||
list.push(last);
|
||||
return list
|
||||
}
|
||||
|
||||
var parseStatements$1 = function (result, styles) {
|
||||
const statements = [];
|
||||
let nodes = [];
|
||||
|
||||
styles.each(node => {
|
||||
let stmt;
|
||||
if (node.type === "atrule") {
|
||||
if (node.name === "import") stmt = parseImport(result, node);
|
||||
else if (node.name === "media") stmt = parseMedia(result, node);
|
||||
else if (node.name === "charset") stmt = parseCharset(result, node);
|
||||
}
|
||||
|
||||
if (stmt) {
|
||||
if (nodes.length) {
|
||||
statements.push({
|
||||
type: "nodes",
|
||||
nodes,
|
||||
media: [],
|
||||
layer: [],
|
||||
});
|
||||
nodes = [];
|
||||
}
|
||||
statements.push(stmt);
|
||||
} else nodes.push(node);
|
||||
});
|
||||
|
||||
if (nodes.length) {
|
||||
statements.push({
|
||||
type: "nodes",
|
||||
nodes,
|
||||
media: [],
|
||||
layer: [],
|
||||
});
|
||||
}
|
||||
|
||||
return statements
|
||||
};
|
||||
|
||||
function parseMedia(result, atRule) {
|
||||
const params = valueParser(atRule.params).nodes;
|
||||
return {
|
||||
type: "media",
|
||||
node: atRule,
|
||||
media: split(params, 0),
|
||||
layer: [],
|
||||
}
|
||||
}
|
||||
|
||||
function parseCharset(result, atRule) {
|
||||
if (atRule.prev()) {
|
||||
return result.warn("@charset must precede all other statements", {
|
||||
node: atRule,
|
||||
})
|
||||
}
|
||||
return {
|
||||
type: "charset",
|
||||
node: atRule,
|
||||
media: [],
|
||||
layer: [],
|
||||
}
|
||||
}
|
||||
|
||||
function parseImport(result, atRule) {
|
||||
let prev = atRule.prev();
|
||||
if (prev) {
|
||||
do {
|
||||
if (
|
||||
prev.type !== "comment" &&
|
||||
(prev.type !== "atrule" ||
|
||||
(prev.name !== "import" &&
|
||||
prev.name !== "charset" &&
|
||||
!(prev.name === "layer" && !prev.nodes)))
|
||||
) {
|
||||
return result.warn(
|
||||
"@import must precede all other statements (besides @charset or empty @layer)",
|
||||
{ node: atRule }
|
||||
)
|
||||
}
|
||||
prev = prev.prev();
|
||||
} while (prev)
|
||||
}
|
||||
|
||||
if (atRule.nodes) {
|
||||
return result.warn(
|
||||
"It looks like you didn't end your @import statement correctly. " +
|
||||
"Child nodes are attached to it.",
|
||||
{ node: atRule }
|
||||
)
|
||||
}
|
||||
|
||||
const params = valueParser(atRule.params).nodes;
|
||||
const stmt = {
|
||||
type: "import",
|
||||
node: atRule,
|
||||
media: [],
|
||||
layer: [],
|
||||
};
|
||||
|
||||
// prettier-ignore
|
||||
if (
|
||||
!params.length ||
|
||||
(
|
||||
params[0].type !== "string" ||
|
||||
!params[0].value
|
||||
) &&
|
||||
(
|
||||
params[0].type !== "function" ||
|
||||
params[0].value !== "url" ||
|
||||
!params[0].nodes.length ||
|
||||
!params[0].nodes[0].value
|
||||
)
|
||||
) {
|
||||
return result.warn(`Unable to find uri in '${ atRule.toString() }'`, {
|
||||
node: atRule,
|
||||
})
|
||||
}
|
||||
|
||||
if (params[0].type === "string") stmt.uri = params[0].value;
|
||||
else stmt.uri = params[0].nodes[0].value;
|
||||
stmt.fullUri = stringify(params[0]);
|
||||
|
||||
let remainder = params;
|
||||
if (remainder.length > 2) {
|
||||
if (
|
||||
(remainder[2].type === "word" || remainder[2].type === "function") &&
|
||||
remainder[2].value === "layer"
|
||||
) {
|
||||
if (remainder[1].type !== "space") {
|
||||
return result.warn("Invalid import layer statement", { node: atRule })
|
||||
}
|
||||
|
||||
if (remainder[2].nodes) {
|
||||
stmt.layer = [stringify(remainder[2].nodes)];
|
||||
} else {
|
||||
stmt.layer = [""];
|
||||
}
|
||||
remainder = remainder.slice(2);
|
||||
}
|
||||
}
|
||||
|
||||
if (remainder.length > 2) {
|
||||
if (remainder[1].type !== "space") {
|
||||
return result.warn("Invalid import media statement", { node: atRule })
|
||||
}
|
||||
|
||||
stmt.media = split(remainder, 2);
|
||||
}
|
||||
|
||||
return stmt
|
||||
}
|
||||
|
||||
var assignLayerNames$1 = function (layer, node, state, options) {
|
||||
layer.forEach((layerPart, i) => {
|
||||
if (layerPart.trim() === "") {
|
||||
if (options.nameLayer) {
|
||||
layer[i] = options
|
||||
.nameLayer(state.anonymousLayerCounter++, state.rootFilename)
|
||||
.toString();
|
||||
} else {
|
||||
throw node.error(
|
||||
`When using anonymous layers in @import you must also set the "nameLayer" plugin option`
|
||||
)
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// builtin tooling
|
||||
const path = require$$0;
|
||||
|
||||
// internal tooling
|
||||
const joinMedia = joinMedia$1;
|
||||
const joinLayer = joinLayer$1;
|
||||
const resolveId = (id) => id;
|
||||
const loadContent = loadContent$1;
|
||||
const processContent = processContent$1;
|
||||
const parseStatements = parseStatements$1;
|
||||
const assignLayerNames = assignLayerNames$1;
|
||||
const dataURL = dataUrl;
|
||||
|
||||
function AtImport(options) {
|
||||
options = {
|
||||
root: process.cwd(),
|
||||
path: [],
|
||||
skipDuplicates: true,
|
||||
resolve: resolveId,
|
||||
load: loadContent,
|
||||
plugins: [],
|
||||
addModulesDirectories: [],
|
||||
nameLayer: null,
|
||||
...options,
|
||||
};
|
||||
|
||||
options.root = path.resolve(options.root);
|
||||
|
||||
// convert string to an array of a single element
|
||||
if (typeof options.path === "string") options.path = [options.path];
|
||||
|
||||
if (!Array.isArray(options.path)) options.path = [];
|
||||
|
||||
options.path = options.path.map(p => path.resolve(options.root, p));
|
||||
|
||||
return {
|
||||
postcssPlugin: "postcss-import",
|
||||
Once(styles, { result, atRule, postcss }) {
|
||||
const state = {
|
||||
importedFiles: {},
|
||||
hashFiles: {},
|
||||
rootFilename: null,
|
||||
anonymousLayerCounter: 0,
|
||||
};
|
||||
|
||||
if (styles.source?.input?.file) {
|
||||
state.rootFilename = styles.source.input.file;
|
||||
state.importedFiles[styles.source.input.file] = {};
|
||||
}
|
||||
|
||||
if (options.plugins && !Array.isArray(options.plugins)) {
|
||||
throw new Error("plugins option must be an array")
|
||||
}
|
||||
|
||||
if (options.nameLayer && typeof options.nameLayer !== "function") {
|
||||
throw new Error("nameLayer option must be a function")
|
||||
}
|
||||
|
||||
return parseStyles(result, styles, options, state, [], []).then(
|
||||
bundle => {
|
||||
applyRaws(bundle);
|
||||
applyMedia(bundle);
|
||||
applyStyles(bundle, styles);
|
||||
}
|
||||
)
|
||||
|
||||
function applyRaws(bundle) {
|
||||
bundle.forEach((stmt, index) => {
|
||||
if (index === 0) return
|
||||
|
||||
if (stmt.parent) {
|
||||
const { before } = stmt.parent.node.raws;
|
||||
if (stmt.type === "nodes") stmt.nodes[0].raws.before = before;
|
||||
else stmt.node.raws.before = before;
|
||||
} else if (stmt.type === "nodes") {
|
||||
stmt.nodes[0].raws.before = stmt.nodes[0].raws.before || "\n";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function applyMedia(bundle) {
|
||||
bundle.forEach(stmt => {
|
||||
if (
|
||||
(!stmt.media.length && !stmt.layer.length) ||
|
||||
stmt.type === "charset"
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
if (stmt.layer.length > 1) {
|
||||
assignLayerNames(stmt.layer, stmt.node, state, options);
|
||||
}
|
||||
|
||||
if (stmt.type === "import") {
|
||||
const parts = [stmt.fullUri];
|
||||
|
||||
const media = stmt.media.join(", ");
|
||||
|
||||
if (stmt.layer.length) {
|
||||
const layerName = stmt.layer.join(".");
|
||||
|
||||
let layerParams = "layer";
|
||||
if (layerName) {
|
||||
layerParams = `layer(${layerName})`;
|
||||
}
|
||||
|
||||
parts.push(layerParams);
|
||||
}
|
||||
|
||||
if (media) {
|
||||
parts.push(media);
|
||||
}
|
||||
|
||||
stmt.node.params = parts.join(" ");
|
||||
} else if (stmt.type === "media") {
|
||||
if (stmt.layer.length) {
|
||||
const layerNode = atRule({
|
||||
name: "layer",
|
||||
params: stmt.layer.join("."),
|
||||
source: stmt.node.source,
|
||||
});
|
||||
|
||||
if (stmt.parentMedia?.length) {
|
||||
const mediaNode = atRule({
|
||||
name: "media",
|
||||
params: stmt.parentMedia.join(", "),
|
||||
source: stmt.node.source,
|
||||
});
|
||||
|
||||
mediaNode.append(layerNode);
|
||||
layerNode.append(stmt.node);
|
||||
stmt.node = mediaNode;
|
||||
} else {
|
||||
layerNode.append(stmt.node);
|
||||
stmt.node = layerNode;
|
||||
}
|
||||
} else {
|
||||
stmt.node.params = stmt.media.join(", ");
|
||||
}
|
||||
} else {
|
||||
const { nodes } = stmt;
|
||||
const { parent } = nodes[0];
|
||||
|
||||
let outerAtRule;
|
||||
let innerAtRule;
|
||||
if (stmt.media.length && stmt.layer.length) {
|
||||
const mediaNode = atRule({
|
||||
name: "media",
|
||||
params: stmt.media.join(", "),
|
||||
source: parent.source,
|
||||
});
|
||||
|
||||
const layerNode = atRule({
|
||||
name: "layer",
|
||||
params: stmt.layer.join("."),
|
||||
source: parent.source,
|
||||
});
|
||||
|
||||
mediaNode.append(layerNode);
|
||||
innerAtRule = layerNode;
|
||||
outerAtRule = mediaNode;
|
||||
} else if (stmt.media.length) {
|
||||
const mediaNode = atRule({
|
||||
name: "media",
|
||||
params: stmt.media.join(", "),
|
||||
source: parent.source,
|
||||
});
|
||||
|
||||
innerAtRule = mediaNode;
|
||||
outerAtRule = mediaNode;
|
||||
} else if (stmt.layer.length) {
|
||||
const layerNode = atRule({
|
||||
name: "layer",
|
||||
params: stmt.layer.join("."),
|
||||
source: parent.source,
|
||||
});
|
||||
|
||||
innerAtRule = layerNode;
|
||||
outerAtRule = layerNode;
|
||||
}
|
||||
|
||||
parent.insertBefore(nodes[0], outerAtRule);
|
||||
|
||||
// remove nodes
|
||||
nodes.forEach(node => {
|
||||
node.parent = undefined;
|
||||
});
|
||||
|
||||
// better output
|
||||
nodes[0].raws.before = nodes[0].raws.before || "\n";
|
||||
|
||||
// wrap new rules with media query and/or layer at rule
|
||||
innerAtRule.append(nodes);
|
||||
|
||||
stmt.type = "media";
|
||||
stmt.node = outerAtRule;
|
||||
delete stmt.nodes;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function applyStyles(bundle, styles) {
|
||||
styles.nodes = [];
|
||||
|
||||
// Strip additional statements.
|
||||
bundle.forEach(stmt => {
|
||||
if (["charset", "import", "media"].includes(stmt.type)) {
|
||||
stmt.node.parent = undefined;
|
||||
styles.append(stmt.node);
|
||||
} else if (stmt.type === "nodes") {
|
||||
stmt.nodes.forEach(node => {
|
||||
node.parent = undefined;
|
||||
styles.append(node);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function parseStyles(result, styles, options, state, media, layer) {
|
||||
const statements = parseStatements(result, styles);
|
||||
|
||||
return Promise.resolve(statements)
|
||||
.then(stmts => {
|
||||
// process each statement in series
|
||||
return stmts.reduce((promise, stmt) => {
|
||||
return promise.then(() => {
|
||||
stmt.media = joinMedia(media, stmt.media || []);
|
||||
stmt.parentMedia = media;
|
||||
stmt.layer = joinLayer(layer, stmt.layer || []);
|
||||
|
||||
// skip protocol base uri (protocol://url) or protocol-relative
|
||||
if (
|
||||
stmt.type !== "import" ||
|
||||
/^(?:[a-z]+:)?\/\//i.test(stmt.uri)
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
if (options.filter && !options.filter(stmt.uri)) {
|
||||
// rejected by filter
|
||||
return
|
||||
}
|
||||
|
||||
return resolveImportId(result, stmt, options, state)
|
||||
})
|
||||
}, Promise.resolve())
|
||||
})
|
||||
.then(() => {
|
||||
let charset;
|
||||
const imports = [];
|
||||
const bundle = [];
|
||||
|
||||
function handleCharset(stmt) {
|
||||
if (!charset) charset = stmt;
|
||||
// charsets aren't case-sensitive, so convert to lower case to compare
|
||||
else if (
|
||||
stmt.node.params.toLowerCase() !==
|
||||
charset.node.params.toLowerCase()
|
||||
) {
|
||||
throw new Error(
|
||||
`Incompatable @charset statements:
|
||||
${stmt.node.params} specified in ${stmt.node.source.input.file}
|
||||
${charset.node.params} specified in ${charset.node.source.input.file}`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// squash statements and their children
|
||||
statements.forEach(stmt => {
|
||||
if (stmt.type === "charset") handleCharset(stmt);
|
||||
else if (stmt.type === "import") {
|
||||
if (stmt.children) {
|
||||
stmt.children.forEach((child, index) => {
|
||||
if (child.type === "import") imports.push(child);
|
||||
else if (child.type === "charset") handleCharset(child);
|
||||
else bundle.push(child);
|
||||
// For better output
|
||||
if (index === 0) child.parent = stmt;
|
||||
});
|
||||
} else imports.push(stmt);
|
||||
} else if (stmt.type === "media" || stmt.type === "nodes") {
|
||||
bundle.push(stmt);
|
||||
}
|
||||
});
|
||||
|
||||
return charset
|
||||
? [charset, ...imports.concat(bundle)]
|
||||
: imports.concat(bundle)
|
||||
})
|
||||
}
|
||||
|
||||
function resolveImportId(result, stmt, options, state) {
|
||||
if (dataURL.isValid(stmt.uri)) {
|
||||
return loadImportContent(result, stmt, stmt.uri, options, state).then(
|
||||
result => {
|
||||
stmt.children = result;
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
const atRule = stmt.node;
|
||||
let sourceFile;
|
||||
if (atRule.source?.input?.file) {
|
||||
sourceFile = atRule.source.input.file;
|
||||
}
|
||||
const base = sourceFile
|
||||
? path.dirname(atRule.source.input.file)
|
||||
: options.root;
|
||||
|
||||
return Promise.resolve(options.resolve(stmt.uri, base, options))
|
||||
.then(paths => {
|
||||
if (!Array.isArray(paths)) paths = [paths];
|
||||
// Ensure that each path is absolute:
|
||||
return Promise.all(
|
||||
paths.map(file => {
|
||||
return !path.isAbsolute(file)
|
||||
? resolveId(file)
|
||||
: file
|
||||
})
|
||||
)
|
||||
})
|
||||
.then(resolved => {
|
||||
// Add dependency messages:
|
||||
resolved.forEach(file => {
|
||||
result.messages.push({
|
||||
type: "dependency",
|
||||
plugin: "postcss-import",
|
||||
file,
|
||||
parent: sourceFile,
|
||||
});
|
||||
});
|
||||
|
||||
return Promise.all(
|
||||
resolved.map(file => {
|
||||
return loadImportContent(result, stmt, file, options, state)
|
||||
})
|
||||
)
|
||||
})
|
||||
.then(result => {
|
||||
// Merge loaded statements
|
||||
stmt.children = result.reduce((result, statements) => {
|
||||
return statements ? result.concat(statements) : result
|
||||
}, []);
|
||||
})
|
||||
}
|
||||
|
||||
function loadImportContent(result, stmt, filename, options, state) {
|
||||
const atRule = stmt.node;
|
||||
const { media, layer } = stmt;
|
||||
|
||||
assignLayerNames(layer, atRule, state, options);
|
||||
|
||||
if (options.skipDuplicates) {
|
||||
// skip files already imported at the same scope
|
||||
if (state.importedFiles[filename]?.[media]?.[layer]) {
|
||||
return
|
||||
}
|
||||
|
||||
// save imported files to skip them next time
|
||||
if (!state.importedFiles[filename]) {
|
||||
state.importedFiles[filename] = {};
|
||||
}
|
||||
if (!state.importedFiles[filename][media]) {
|
||||
state.importedFiles[filename][media] = {};
|
||||
}
|
||||
state.importedFiles[filename][media][layer] = true;
|
||||
}
|
||||
|
||||
return Promise.resolve(options.load(filename, options)).then(
|
||||
content => {
|
||||
if (content.trim() === "") {
|
||||
result.warn(`${filename} is empty`, { node: atRule });
|
||||
return
|
||||
}
|
||||
|
||||
// skip previous imported files not containing @import rules
|
||||
if (state.hashFiles[content]?.[media]?.[layer]) {
|
||||
return
|
||||
}
|
||||
|
||||
return processContent(
|
||||
result,
|
||||
content,
|
||||
filename,
|
||||
options,
|
||||
postcss
|
||||
).then(importedResult => {
|
||||
const styles = importedResult.root;
|
||||
result.messages = result.messages.concat(importedResult.messages);
|
||||
|
||||
if (options.skipDuplicates) {
|
||||
const hasImport = styles.some(child => {
|
||||
return child.type === "atrule" && child.name === "import"
|
||||
});
|
||||
if (!hasImport) {
|
||||
// save hash files to skip them next time
|
||||
if (!state.hashFiles[content]) {
|
||||
state.hashFiles[content] = {};
|
||||
}
|
||||
if (!state.hashFiles[content][media]) {
|
||||
state.hashFiles[content][media] = {};
|
||||
}
|
||||
state.hashFiles[content][media][layer] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// recursion: import @import from imported file
|
||||
return parseStyles(result, styles, options, state, media, layer)
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
AtImport.postcss = true;
|
||||
|
||||
var postcssImport = AtImport;
|
||||
|
||||
var index = /*@__PURE__*/getDefaultExportFromCjs(postcssImport);
|
||||
|
||||
var index$1 = /*#__PURE__*/_mergeNamespaces({
|
||||
__proto__: null,
|
||||
default: index
|
||||
}, [postcssImport]);
|
||||
|
||||
export { index$1 as i };
|
10
node_modules/vite/dist/node/cli.js
generated
vendored
10
node_modules/vite/dist/node/cli.js
generated
vendored
@ -2,7 +2,7 @@ import path from 'node:path';
|
||||
import fs from 'node:fs';
|
||||
import { performance } from 'node:perf_hooks';
|
||||
import { EventEmitter } from 'events';
|
||||
import { C as colors, D as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-bb8a8339.js';
|
||||
import { C as colors, D as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-68d1a114.js';
|
||||
import { VERSION } from './constants.js';
|
||||
import 'node:fs/promises';
|
||||
import 'node:url';
|
||||
@ -758,7 +758,7 @@ cli
|
||||
filterDuplicateOptions(options);
|
||||
// output structure is preserved even after bundling so require()
|
||||
// is ok here
|
||||
const { createServer } = await import('./chunks/dep-bb8a8339.js').then(function (n) { return n.I; });
|
||||
const { createServer } = await import('./chunks/dep-68d1a114.js').then(function (n) { return n.I; });
|
||||
try {
|
||||
const server = await createServer({
|
||||
root,
|
||||
@ -836,7 +836,7 @@ cli
|
||||
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
||||
.action(async (root, options) => {
|
||||
filterDuplicateOptions(options);
|
||||
const { build } = await import('./chunks/dep-bb8a8339.js').then(function (n) { return n.H; });
|
||||
const { build } = await import('./chunks/dep-68d1a114.js').then(function (n) { return n.H; });
|
||||
const buildOptions = cleanOptions(options);
|
||||
try {
|
||||
await build({
|
||||
@ -864,7 +864,7 @@ cli
|
||||
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
||||
.action(async (root, options) => {
|
||||
filterDuplicateOptions(options);
|
||||
const { optimizeDeps } = await import('./chunks/dep-bb8a8339.js').then(function (n) { return n.G; });
|
||||
const { optimizeDeps } = await import('./chunks/dep-68d1a114.js').then(function (n) { return n.G; });
|
||||
try {
|
||||
const config = await resolveConfig({
|
||||
root,
|
||||
@ -891,7 +891,7 @@ cli
|
||||
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
||||
.action(async (root, options) => {
|
||||
filterDuplicateOptions(options);
|
||||
const { preview } = await import('./chunks/dep-bb8a8339.js').then(function (n) { return n.J; });
|
||||
const { preview } = await import('./chunks/dep-68d1a114.js').then(function (n) { return n.J; });
|
||||
try {
|
||||
const server = await preview({
|
||||
root,
|
||||
|
4
node_modules/vite/dist/node/index.js
generated
vendored
4
node_modules/vite/dist/node/index.js
generated
vendored
@ -1,5 +1,5 @@
|
||||
import { i as isInNodeModules } from './chunks/dep-bb8a8339.js';
|
||||
export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, z as isFileServingAllowed, l as loadConfigFromFile, A as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, B as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-bb8a8339.js';
|
||||
import { i as isInNodeModules } from './chunks/dep-68d1a114.js';
|
||||
export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, z as isFileServingAllowed, l as loadConfigFromFile, A as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, B as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-68d1a114.js';
|
||||
export { VERSION as version } from './constants.js';
|
||||
export { version as esbuildVersion } from 'esbuild';
|
||||
export { VERSION as rollupVersion } from 'rollup';
|
||||
|
2
node_modules/vite/package.json
generated
vendored
2
node_modules/vite/package.json
generated
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vite",
|
||||
"version": "4.5.0",
|
||||
"version": "4.5.1",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"author": "Evan You",
|
||||
|
256
package-lock.json
generated
256
package-lock.json
generated
@ -20,7 +20,8 @@
|
||||
"react-datepicker": "^4.25.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-hot-toast": "^2.4.1",
|
||||
"react-router-dom": "^6.21.0"
|
||||
"react-router-dom": "^6.21.0",
|
||||
"react-use": "^17.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.15",
|
||||
@ -888,8 +889,7 @@
|
||||
"node_modules/@jridgewell/sourcemap-codec": {
|
||||
"version": "1.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
|
||||
},
|
||||
"node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.20",
|
||||
@ -1055,6 +1055,11 @@
|
||||
"@babel/types": "^7.20.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/js-cookie": {
|
||||
"version": "2.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-2.2.7.tgz",
|
||||
"integrity": "sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA=="
|
||||
},
|
||||
"node_modules/@types/json5": {
|
||||
"version": "0.0.29",
|
||||
"resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
|
||||
@ -1128,6 +1133,11 @@
|
||||
"vite": "^4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@xobotyi/scrollbar-width": {
|
||||
"version": "1.9.5",
|
||||
"resolved": "https://registry.npmjs.org/@xobotyi/scrollbar-width/-/scrollbar-width-1.9.5.tgz",
|
||||
"integrity": "sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ=="
|
||||
},
|
||||
"node_modules/accepts": {
|
||||
"version": "1.3.8",
|
||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
||||
@ -1741,6 +1751,14 @@
|
||||
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/copy-to-clipboard": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz",
|
||||
"integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==",
|
||||
"dependencies": {
|
||||
"toggle-selection": "^1.0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/cors": {
|
||||
"version": "2.8.5",
|
||||
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
|
||||
@ -1768,6 +1786,26 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/css-in-js-utils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/css-in-js-utils/-/css-in-js-utils-3.1.0.tgz",
|
||||
"integrity": "sha512-fJAcud6B3rRu+KHYk+Bwf+WFL2MDCJJ1XG9x137tJQ0xYxor7XziQtuGFbWNdqrvF4Tk26O3H73nfVqXt/fW1A==",
|
||||
"dependencies": {
|
||||
"hyphenate-style-name": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/css-tree": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
|
||||
"integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
|
||||
"dependencies": {
|
||||
"mdn-data": "2.0.14",
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/csstype": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
|
||||
@ -1934,6 +1972,14 @@
|
||||
"is-arrayish": "^0.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/error-stack-parser": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz",
|
||||
"integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==",
|
||||
"dependencies": {
|
||||
"stackframe": "^1.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/errorhandler": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.5.1.tgz",
|
||||
@ -2712,8 +2758,7 @@
|
||||
"node_modules/fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||
"dev": true
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||
},
|
||||
"node_modules/fast-json-stable-stringify": {
|
||||
"version": "2.1.0",
|
||||
@ -2727,6 +2772,21 @@
|
||||
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fast-loops": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-loops/-/fast-loops-1.1.3.tgz",
|
||||
"integrity": "sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g=="
|
||||
},
|
||||
"node_modules/fast-shallow-equal": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-shallow-equal/-/fast-shallow-equal-1.0.0.tgz",
|
||||
"integrity": "sha512-HPtaa38cPgWvaCFmRNhlc6NG7pv6NUHqjPgVAkWGoB9mQMwYB27/K0CvOM5Czy+qpT3e8XJ6Q4aPAnzpNpzNaw=="
|
||||
},
|
||||
"node_modules/fastest-stable-stringify": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/fastest-stable-stringify/-/fastest-stable-stringify-2.0.2.tgz",
|
||||
"integrity": "sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q=="
|
||||
},
|
||||
"node_modules/fastq": {
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
|
||||
@ -3172,6 +3232,11 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/hyphenate-style-name": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz",
|
||||
"integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ=="
|
||||
},
|
||||
"node_modules/iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
@ -3234,6 +3299,15 @@
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/inline-style-prefixer": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-7.0.0.tgz",
|
||||
"integrity": "sha512-I7GEdScunP1dQ6IM2mQWh6v0mOYdYmH3Bp31UecKdrcUgcURTcctSe1IECdUznSHKSmsHtjrT3CwCPI1pyxfUQ==",
|
||||
"dependencies": {
|
||||
"css-in-js-utils": "^3.1.0",
|
||||
"fast-loops": "^1.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/install": {
|
||||
"version": "0.13.0",
|
||||
"resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz",
|
||||
@ -3630,6 +3704,11 @@
|
||||
"integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/js-cookie": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz",
|
||||
"integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ=="
|
||||
},
|
||||
"node_modules/js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
@ -3946,6 +4025,11 @@
|
||||
"yallist": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/mdn-data": {
|
||||
"version": "2.0.14",
|
||||
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
|
||||
"integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="
|
||||
},
|
||||
"node_modules/media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
@ -4110,6 +4194,25 @@
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/nano-css": {
|
||||
"version": "5.6.1",
|
||||
"resolved": "https://registry.npmjs.org/nano-css/-/nano-css-5.6.1.tgz",
|
||||
"integrity": "sha512-T2Mhc//CepkTa3X4pUhKgbEheJHYAxD0VptuqFhDbGMUWVV2m+lkNiW/Ieuj35wrfC8Zm0l7HvssQh7zcEttSw==",
|
||||
"dependencies": {
|
||||
"@jridgewell/sourcemap-codec": "^1.4.15",
|
||||
"css-tree": "^1.1.2",
|
||||
"csstype": "^3.1.2",
|
||||
"fastest-stable-stringify": "^2.0.2",
|
||||
"inline-style-prefixer": "^7.0.0",
|
||||
"rtl-css-js": "^1.16.1",
|
||||
"stacktrace-js": "^2.0.2",
|
||||
"stylis": "^4.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-dom": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
||||
@ -7676,6 +7779,40 @@
|
||||
"react-dom": ">=16.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-universal-interface": {
|
||||
"version": "0.6.2",
|
||||
"resolved": "https://registry.npmjs.org/react-universal-interface/-/react-universal-interface-0.6.2.tgz",
|
||||
"integrity": "sha512-dg8yXdcQmvgR13RIlZbTRQOoUrDciFVoSBZILwjE2LFISxZZ8loVJKAkuzswl5js8BHda79bIb2b84ehU8IjXw==",
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"tslib": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-use": {
|
||||
"version": "17.4.2",
|
||||
"resolved": "https://registry.npmjs.org/react-use/-/react-use-17.4.2.tgz",
|
||||
"integrity": "sha512-1jPtmWLD8OJJNYCdYLJEH/HM+bPDfJuyGwCYeJFgPmWY8ttwpgZnW5QnzgM55CYUByUiTjHxsGOnEpLl6yQaoQ==",
|
||||
"dependencies": {
|
||||
"@types/js-cookie": "^2.2.6",
|
||||
"@xobotyi/scrollbar-width": "^1.9.5",
|
||||
"copy-to-clipboard": "^3.3.1",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fast-shallow-equal": "^1.0.0",
|
||||
"js-cookie": "^2.2.1",
|
||||
"nano-css": "^5.6.1",
|
||||
"react-universal-interface": "^0.6.2",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
"screenfull": "^5.1.0",
|
||||
"set-harmonic-interval": "^1.0.1",
|
||||
"throttle-debounce": "^3.0.1",
|
||||
"ts-easing": "^0.2.0",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-dom": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/read-pkg": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
|
||||
@ -7741,6 +7878,11 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/resize-observer-polyfill": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
|
||||
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "2.0.0-next.5",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz",
|
||||
@ -7808,6 +7950,14 @@
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/rtl-css-js": {
|
||||
"version": "1.16.1",
|
||||
"resolved": "https://registry.npmjs.org/rtl-css-js/-/rtl-css-js-1.16.1.tgz",
|
||||
"integrity": "sha512-lRQgou1mu19e+Ya0LsTvKrVJ5TYUbqCVPAiImX3UfLTenarvPUl1QFdvu5Z3PYmHT9RCcwIfbjRQBntExyj3Zg==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/run-parallel": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
|
||||
@ -7883,6 +8033,17 @@
|
||||
"loose-envify": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/screenfull": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/screenfull/-/screenfull-5.2.0.tgz",
|
||||
"integrity": "sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
@ -7993,6 +8154,14 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/set-harmonic-interval": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/set-harmonic-interval/-/set-harmonic-interval-1.0.1.tgz",
|
||||
"integrity": "sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g==",
|
||||
"engines": {
|
||||
"node": ">=6.9"
|
||||
}
|
||||
},
|
||||
"node_modules/setprototypeof": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
||||
@ -8043,6 +8212,14 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
@ -8084,6 +8261,46 @@
|
||||
"integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/stack-generator": {
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://registry.npmjs.org/stack-generator/-/stack-generator-2.0.10.tgz",
|
||||
"integrity": "sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ==",
|
||||
"dependencies": {
|
||||
"stackframe": "^1.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/stackframe": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz",
|
||||
"integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw=="
|
||||
},
|
||||
"node_modules/stacktrace-gps": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/stacktrace-gps/-/stacktrace-gps-3.1.2.tgz",
|
||||
"integrity": "sha512-GcUgbO4Jsqqg6RxfyTHFiPxdPqF+3LFmQhm7MgCuYQOYuWyqxo5pwRPz5d/u6/WYJdEnWfK4r+jGbyD8TSggXQ==",
|
||||
"dependencies": {
|
||||
"source-map": "0.5.6",
|
||||
"stackframe": "^1.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/stacktrace-gps/node_modules/source-map": {
|
||||
"version": "0.5.6",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
|
||||
"integrity": "sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/stacktrace-js": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/stacktrace-js/-/stacktrace-js-2.0.2.tgz",
|
||||
"integrity": "sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg==",
|
||||
"dependencies": {
|
||||
"error-stack-parser": "^2.0.6",
|
||||
"stack-generator": "^2.0.5",
|
||||
"stacktrace-gps": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/statuses": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
||||
@ -8231,6 +8448,11 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/stylis": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.0.tgz",
|
||||
"integrity": "sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ=="
|
||||
},
|
||||
"node_modules/supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
@ -8261,6 +8483,14 @@
|
||||
"integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/throttle-debounce": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-3.0.1.tgz",
|
||||
"integrity": "sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/to-fast-properties": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
||||
@ -8270,6 +8500,11 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/toggle-selection": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
|
||||
"integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ=="
|
||||
},
|
||||
"node_modules/toidentifier": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
||||
@ -8279,6 +8514,11 @@
|
||||
"node": ">=0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-easing": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-easing/-/ts-easing-0.2.0.tgz",
|
||||
"integrity": "sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ=="
|
||||
},
|
||||
"node_modules/tsconfig-paths": {
|
||||
"version": "3.14.2",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz",
|
||||
@ -8516,9 +8756,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz",
|
||||
"integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==",
|
||||
"version": "4.5.1",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz",
|
||||
"integrity": "sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.18.10",
|
||||
|
@ -23,7 +23,8 @@
|
||||
"react-datepicker": "^4.25.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-hot-toast": "^2.4.1",
|
||||
"react-router-dom": "^6.21.0"
|
||||
"react-router-dom": "^6.21.0",
|
||||
"react-use": "^17.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.15",
|
||||
|
@ -3,10 +3,12 @@ import { Outlet } from 'react-router-dom';
|
||||
import Footer from './components/footer/Footer.jsx';
|
||||
import Navigation from './components/navigation/Navigation.jsx';
|
||||
import { CartProvider } from './components/cart/CartContext.jsx';
|
||||
import { UserProvider } from './components/users/UserContext.jsx';
|
||||
|
||||
export const App = ({ routes }) => {
|
||||
return (
|
||||
<>
|
||||
<UserProvider>
|
||||
<CartProvider>
|
||||
<Navigation routes={routes}></Navigation>
|
||||
<main className='w-100 flex-fill d-flex justify-content-center p-0 m-0'>
|
||||
@ -14,6 +16,7 @@ export const App = ({ routes }) => {
|
||||
</main>
|
||||
<Footer />
|
||||
</CartProvider>
|
||||
</UserProvider>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
29
src/components/Busers/CartContext.jsx
Normal file
29
src/components/Busers/CartContext.jsx
Normal file
@ -0,0 +1,29 @@
|
||||
import { createContext, useEffect, useReducer } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { cartReducer, loadCart, saveCart } from './UsersReducer';
|
||||
|
||||
// Компонент контекста корзины
|
||||
const CartContext = createContext(null);
|
||||
// Провайдер контекста корзины
|
||||
export const CartProvider = ({ children }) => {
|
||||
|
||||
const [cart, dispatch] = useReducer(cartReducer, [], loadCart);
|
||||
|
||||
useEffect(() => {
|
||||
saveCart(cart || []);
|
||||
}, [cart]);
|
||||
|
||||
const cartContextValue = { cart, dispatch };
|
||||
|
||||
return (
|
||||
<CartContext.Provider value={cartContextValue}>
|
||||
{children}
|
||||
</CartContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
CartProvider.propTypes = {
|
||||
children: PropTypes.node,
|
||||
};
|
||||
|
||||
export default CartContext;
|
27
src/components/Busers/CartHook.js
Normal file
27
src/components/Busers/CartHook.js
Normal file
@ -0,0 +1,27 @@
|
||||
import { useContext } from 'react';
|
||||
import CartContext from './CartContext.jsx';
|
||||
import { cartAdd, cartClear, cartRemove } from './UsersReducer.js';
|
||||
|
||||
const useCart = () => {
|
||||
|
||||
const { cart, dispatch } = useContext(CartContext);
|
||||
|
||||
const cartSum = () => {
|
||||
return parseFloat(
|
||||
cart?.reduce((sum, cartItem) => {
|
||||
return sum + (cartItem.price * cartItem.count);
|
||||
}, 0)
|
||||
?? 0,
|
||||
).toFixed(2);
|
||||
};
|
||||
|
||||
return {
|
||||
cart,
|
||||
getCartSum: () => cartSum(),
|
||||
addToCart: (item) => dispatch(cartAdd(item)),
|
||||
removeFromCart: (item) => dispatch(cartRemove(item)),
|
||||
clearCart: () => dispatch(cartClear()),
|
||||
};
|
||||
};
|
||||
|
||||
export default useCart;
|
70
src/components/Busers/UsersReducer.js
Normal file
70
src/components/Busers/UsersReducer.js
Normal file
@ -0,0 +1,70 @@
|
||||
const addToUsersList = (usersList, item) => {
|
||||
const existsItem = usersList.find((usersItem) => usersItem.id === item.id);
|
||||
if (existsItem !== undefined) {
|
||||
throw new Error('Пользователь уже существует!');
|
||||
}
|
||||
return [...usersList, { ...item, count: 1 }];
|
||||
};
|
||||
|
||||
const removeFromUsersList = (usersList, item) => {
|
||||
const updatedList = usersList.filter((usersItem) => usersItem.id !== item.id);
|
||||
return updatedList;
|
||||
};
|
||||
|
||||
const USERSLIST_KEY = 'localUsersList';
|
||||
const USERSLIST_ADD = 'usersList/add';
|
||||
const USERSLIST_REMOVE = 'usersList/remove';
|
||||
const USER_LOGIN = 'user/login';
|
||||
const USER_LOGOUT = 'user/logout';
|
||||
|
||||
export const saveUsersList = (usersList) => {
|
||||
localStorage.setItem(USERSLIST_KEY, JSON.stringify(usersList));
|
||||
};
|
||||
|
||||
// Функция для загрузки данных пользователей из LocalStorage
|
||||
export const loadUsersList = (initialValue = []) => {
|
||||
const listData = localStorage.getItem(USERSLIST_KEY);
|
||||
if (listData) {
|
||||
return JSON.parse(listData);
|
||||
}
|
||||
return initialValue;
|
||||
};
|
||||
|
||||
// Редюсер для обработки действий с массивом пользователей
|
||||
export const cartReducer = (usersList, action) => {
|
||||
const { item } = action;
|
||||
switch (action.type) {
|
||||
case USER_LOGOUT: {
|
||||
return null;
|
||||
}
|
||||
case USER_LOGIN: {
|
||||
return action.user;
|
||||
}
|
||||
case USERSLIST_ADD: {
|
||||
return addToUsersList(usersList, item);
|
||||
}
|
||||
case USERSLIST_REMOVE: {
|
||||
return removeFromUsersList(usersList, item);
|
||||
}
|
||||
default: {
|
||||
throw Error(`Unknown action: ${action.type}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const userLogout = () => ({
|
||||
type: USER_LOGOUT,
|
||||
});
|
||||
|
||||
export const userLogin = (user) => ({
|
||||
type: USER_LOGIN,
|
||||
user,
|
||||
});
|
||||
|
||||
export const usersAdd = (item) => ({
|
||||
type: USERSLIST_ADD, item,
|
||||
});
|
||||
|
||||
export const usersRemove = (item) => ({
|
||||
type: USERSLIST_REMOVE, item,
|
||||
});
|
@ -24,6 +24,18 @@ class ApiService {
|
||||
async delete(id) {
|
||||
return ApiClient.delete(`${this.url}/${id}`);
|
||||
}
|
||||
|
||||
async getByHandle(handle) {
|
||||
return ApiClient.get(`${this.url}?handle=${handle}`);
|
||||
}
|
||||
|
||||
async getByEmail(email) {
|
||||
return ApiClient.get(`${this.url}?email=${email}`);
|
||||
}
|
||||
|
||||
async getAllForUser(userId) {
|
||||
return ApiClient.get(`${this.url}?userId=${userId}`);
|
||||
}
|
||||
}
|
||||
|
||||
export default ApiService;
|
||||
|
@ -1,10 +1,62 @@
|
||||
import { Button, ButtonGroup, Card } from 'react-bootstrap';
|
||||
import { DashLg, PlusLg, XLg } from 'react-bootstrap-icons';
|
||||
import { Card, Button, ButtonGroup } from 'react-bootstrap';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { DashLg, PlusLg, XLg } from 'react-bootstrap-icons';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Form, } from 'react-bootstrap';
|
||||
import './Cart.css';
|
||||
import useCart from './CartHook';
|
||||
|
||||
const Cart = () => {
|
||||
|
||||
const [validated, setValidated] = useState(false);
|
||||
const [name, setName] = useState('');
|
||||
const [surname, setSurname] = useState('');
|
||||
const [email, setEmail] = useState('');
|
||||
const [birthdate, setBirthdate] = useState('');
|
||||
const [phoneNumber, setPhoneNumber] = useState('');
|
||||
|
||||
useEffect(() => {
|
||||
const storedUserData = localStorage.getItem('user');
|
||||
const storedUser = storedUserData ? JSON.parse(storedUserData) : {};
|
||||
|
||||
if (storedUser) {
|
||||
setName(storedUser.handle || '');
|
||||
setSurname(storedUser.surname || '');
|
||||
setEmail(storedUser.email || '');
|
||||
setBirthdate(storedUser.birthdate || '');
|
||||
setPhoneNumber(storedUser.phoneNumber || '');
|
||||
}
|
||||
}, []);
|
||||
|
||||
const handleSubmit = (event) => {
|
||||
const form = event.currentTarget;
|
||||
if (form.checkValidity() === false) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
const storedUserData = localStorage.getItem('user');
|
||||
const storedUser = storedUserData ? JSON.parse(storedUserData) : {};
|
||||
|
||||
const newUserData = {
|
||||
...storedUser,
|
||||
handle: name,
|
||||
surname: surname,
|
||||
email: email,
|
||||
birthdate: birthdate,
|
||||
phoneNumber: phoneNumber,
|
||||
};
|
||||
|
||||
localStorage.setItem('user', JSON.stringify(newUserData));
|
||||
}
|
||||
|
||||
setValidated(true);
|
||||
};
|
||||
|
||||
const handleLogout = () => {
|
||||
localStorage.removeItem('user');
|
||||
history.push('/');
|
||||
};
|
||||
|
||||
const {
|
||||
cart,
|
||||
getCartSum,
|
||||
@ -14,10 +66,11 @@ const Cart = () => {
|
||||
} = useCart();
|
||||
|
||||
return (
|
||||
<main className="container-fluid ml-2 mr-2">
|
||||
<div className='d-flex flex-column align-items-center'>
|
||||
<div className='mb-2 mt-2 col-12 col-md-8 col-lg-6 d-flex align-items-center'>
|
||||
<strong className='flex-fill'>Корзина</strong>
|
||||
<main className="container-fluid justify-content-center px-lg-3">
|
||||
<div className='row'>
|
||||
<div className='col-lg-8'>
|
||||
<div className='mb-2 mt-2 d-flex align-items-center'>
|
||||
<strong className='flex-fill' style={{color: 'white'}}>Корзина</strong>
|
||||
<div className='button-overlayAdd'>
|
||||
<Button onClick={() => clearCart()}>
|
||||
<XLg /> Очистить
|
||||
@ -26,7 +79,7 @@ const Cart = () => {
|
||||
</div>
|
||||
{
|
||||
cart.map((cartItem) =>
|
||||
<Card key={cartItem.id} className='mb-2 col-12 col-md-8 col-lg-6'>
|
||||
<Card key={cartItem.id} className='mb-2 '>
|
||||
<Card.Body className='p-2 d-flex flex-column flex-sm-row align-items-center'>
|
||||
<div className='cart-item flex-fill'>
|
||||
<Link to={`/detailpage/${cartItem.ItName}`} style={{ color: 'black', outline: 'none' }}>
|
||||
@ -45,7 +98,7 @@ const Cart = () => {
|
||||
{parseFloat(cartItem.price * cartItem.count).toFixed(2)}
|
||||
</div>
|
||||
<ButtonGroup className='mt-2 mt-sm-1' aria-label="Cart counter">
|
||||
<Button style={{backgroundColor: '#5233ff', color: 'aqua;'}} onClick={() => addToCart(cartItem)}>
|
||||
<Button style={{backgroundColor: '#5233ff', color: 'aqua'}} onClick={() => addToCart(cartItem)}>
|
||||
<PlusLg />
|
||||
</Button>
|
||||
<Button style={{backgroundColor: '#ff5500'}} onClick={() => removeFromCart(cartItem)}>
|
||||
@ -56,10 +109,52 @@ const Cart = () => {
|
||||
</Card.Body>
|
||||
</Card>)
|
||||
}
|
||||
<div className='mb-2 col-12 col-md-8 col-lg-6 d-flex justify-content-end' style={{color: 'white'}}>
|
||||
<div className='mb-2 d-flex justify-content-end' style={{color: 'white'}}>
|
||||
<strong>Итого: {getCartSum()} ₽</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div className='text-button-overlay col-lg-4'>
|
||||
<Form noValidate validated={validated} onSubmit={handleSubmit}>
|
||||
<h2 className="text-uppercase text-center mt-3" style={{ color: 'white'}}>Личный кабинет</h2>
|
||||
<Form.Group className="mb-1">
|
||||
<Form.Label>Ваше имя</Form.Label>
|
||||
<Form.Control type="text" value={name} onChange={(e) => setName(e.target.value)} readOnly />
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group className="mb-1">
|
||||
<Form.Label>Ваша фамилия</Form.Label>
|
||||
<Form.Control type="text" value={surname} onChange={(e) => setSurname(e.target.value)} />
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group className="mb-1">
|
||||
<Form.Label>Ваш адрес электронной почты</Form.Label>
|
||||
<Form.Control type="email" value={email} onChange={(e) => setEmail(e.target.value)} />
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group className="mb-1">
|
||||
<Form.Label>Дата рождения</Form.Label>
|
||||
<Form.Control type="date" value={birthdate} onChange={(e) => setBirthdate(e.target.value)} />
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group className="mb-1">
|
||||
<Form.Label>Номер телефона</Form.Label>
|
||||
<Form.Control type="tel"value={phoneNumber} onChange={(e) => setPhoneNumber(e.target.value)} />
|
||||
</Form.Group>
|
||||
|
||||
<div className="d-flex justify-content-center mt-2 button-overlayAdd">
|
||||
<Button variant="warning" type="submit" id="saveButton">
|
||||
Сохранить
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="d-flex justify-content-center mt-2">
|
||||
<Link className="btn btn-outline-danger" style={{ color: 'white'}} type="button" onClick={handleLogout} to="/">
|
||||
Выйти
|
||||
</Link>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
@ -5,6 +5,13 @@ import './Navigation.css';
|
||||
import Menu from '../menuWrapper/menuWrapper';
|
||||
|
||||
const Navigation = ({ routes }) => {
|
||||
const storedUserData = localStorage.getItem('user');
|
||||
const storedUser = storedUserData ? JSON.parse(storedUserData) : {};
|
||||
const userName = storedUser && storedUser.handle ? storedUser.handle : '';
|
||||
const isAdmin = userName.toLowerCase() === 'admin';
|
||||
|
||||
console.log(localStorage);
|
||||
|
||||
const location = useLocation();
|
||||
const pages = routes.filter((route) => Object.prototype.hasOwnProperty.call(route, 'title'));
|
||||
|
||||
@ -24,6 +31,24 @@ const Navigation = ({ routes }) => {
|
||||
))
|
||||
}
|
||||
</Nav>
|
||||
<Nav>
|
||||
{userName ? (
|
||||
<>
|
||||
<Nav.Link className="custom-btn" as={Link} to="/myTickets">
|
||||
{userName}
|
||||
</Nav.Link>
|
||||
{isAdmin && (
|
||||
<Nav.Link className="custom-btn" as={Link} to="/admin">
|
||||
Панель
|
||||
</Nav.Link>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<Nav.Link className="custom-btn" as={Link} to="/into">
|
||||
Профиль
|
||||
</Nav.Link>
|
||||
)}
|
||||
</Nav>
|
||||
</Navbar.Collapse>
|
||||
</Container>
|
||||
</Navbar >
|
||||
|
23
src/components/users/UserContext.jsx
Normal file
23
src/components/users/UserContext.jsx
Normal file
@ -0,0 +1,23 @@
|
||||
import { createContext, useReducer, useEffect } from 'react';
|
||||
import { loadUser, saveUser, userReducer } from './userReducer';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export const UserContext = createContext(null);
|
||||
|
||||
export const UserProvider = ({ children }) => {
|
||||
const [user, dispatch] = useReducer(userReducer, null, loadUser);
|
||||
|
||||
useEffect(() => {
|
||||
saveUser(user || null);
|
||||
}, [user]);
|
||||
|
||||
return <UserContext.Provider value = {{ user, dispatch }}>
|
||||
{children}
|
||||
</UserContext.Provider>;
|
||||
};
|
||||
|
||||
UserProvider.propTypes = {
|
||||
children: PropTypes.node,
|
||||
};
|
||||
|
||||
export default UserContext;
|
20
src/components/users/loginHook.js
Normal file
20
src/components/users/loginHook.js
Normal file
@ -0,0 +1,20 @@
|
||||
import UsersApiService from "./service/UsersApiService";
|
||||
import useUser from "./userHook";
|
||||
|
||||
const useSubmit = () => {
|
||||
const { userLogin } = useUser();
|
||||
const onSubmit = async (data) => {
|
||||
const res1 = await UsersApiService.getByHandle(data.handle);
|
||||
if (res1.length === 0) {
|
||||
return 1;
|
||||
}
|
||||
if (res1[0].password !== data.password) {
|
||||
return 2;
|
||||
}
|
||||
userLogin(res1[0]);
|
||||
return 3;
|
||||
};
|
||||
return { onSubmit };
|
||||
};
|
||||
|
||||
export default useSubmit;
|
34
src/components/users/regHook.js
Normal file
34
src/components/users/regHook.js
Normal file
@ -0,0 +1,34 @@
|
||||
import UsersApiService from "./service/UsersApiService";
|
||||
import useUser from "./userHook";
|
||||
|
||||
const useSubmit = () => {
|
||||
const { userLogin } = useUser();
|
||||
const getNewUser = (formData) => {
|
||||
console.log("formdsta"+ formData);
|
||||
const emailt = formData.email;
|
||||
const handlet = formData.handle;
|
||||
const passwordt = formData.password;
|
||||
return {
|
||||
email: emailt,
|
||||
handle: handlet,
|
||||
password: passwordt,
|
||||
};
|
||||
};
|
||||
const onSubmit = async (data) => {
|
||||
const res1 = await UsersApiService.getByHandle(data.handle);
|
||||
if (res1.length !== 0) {
|
||||
return 1;
|
||||
}
|
||||
const res2 = await UsersApiService.getByEmail(data.email);
|
||||
if (res2.length !== 0) {
|
||||
return 2;
|
||||
}
|
||||
const newUser = getNewUser(data);
|
||||
const curUser = await UsersApiService.create(newUser);
|
||||
userLogin(curUser);
|
||||
return 3;
|
||||
};
|
||||
return { onSubmit };
|
||||
};
|
||||
|
||||
export default useSubmit;
|
5
src/components/users/service/UsersApiService.js
Normal file
5
src/components/users/service/UsersApiService.js
Normal file
@ -0,0 +1,5 @@
|
||||
import ApiService from "../../api/ApiService";
|
||||
|
||||
const UsersApiService = new ApiService('users');
|
||||
|
||||
export default UsersApiService;
|
20
src/components/users/userHook.js
Normal file
20
src/components/users/userHook.js
Normal file
@ -0,0 +1,20 @@
|
||||
import { useContext } from 'react';
|
||||
import { userLogin, userLogout } from './userReducer.js';
|
||||
import UserContext from './UserContext.jsx';
|
||||
|
||||
const useUser = () => {
|
||||
const context = useContext(UserContext);
|
||||
|
||||
if (!context) {
|
||||
throw new Error('useUser должен использоваться внутри UserProvider');
|
||||
}
|
||||
|
||||
const { dispatch } = useContext(UserContext);
|
||||
|
||||
return {
|
||||
userLogout: () => dispatch(userLogout()),
|
||||
userLogin: (user) => dispatch(userLogin(user)),
|
||||
};
|
||||
};
|
||||
|
||||
export default useUser;
|
39
src/components/users/userReducer.js
Normal file
39
src/components/users/userReducer.js
Normal file
@ -0,0 +1,39 @@
|
||||
const USER_KEY = 'user';
|
||||
const USER_LOGIN = 'user/login';
|
||||
const USER_LOGOUT = 'user/logout';
|
||||
|
||||
export const saveUser = (user) => {
|
||||
localStorage.setItem(USER_KEY, JSON.stringify(user));
|
||||
};
|
||||
|
||||
export const loadUser = (initialValue = []) => {
|
||||
const userData = localStorage.getItem(USER_KEY);
|
||||
if (userData) {
|
||||
return JSON.parse(userData);
|
||||
}
|
||||
return initialValue;
|
||||
};
|
||||
|
||||
export const userReducer = (state, action) => {
|
||||
console.log(action);
|
||||
switch (action.type) {
|
||||
case USER_LOGOUT: {
|
||||
return null;
|
||||
}
|
||||
case USER_LOGIN: {
|
||||
return action.user;
|
||||
}
|
||||
default: {
|
||||
throw new Error(`Unknown action: ${action.type}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const userLogout = () => ({
|
||||
type: USER_LOGOUT,
|
||||
});
|
||||
|
||||
export const userLogin = (user) => ({
|
||||
type: USER_LOGIN,
|
||||
user,
|
||||
});
|
@ -30,22 +30,18 @@ const routes = [
|
||||
{
|
||||
path: '/into',
|
||||
element: <Into />,
|
||||
title: 'Вход',
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
element: <Login />,
|
||||
//title: 'Регистрация',
|
||||
},
|
||||
{
|
||||
path: '/detailpage/:name',
|
||||
element: <DetailPage />,
|
||||
// title: 'Детальная страница',
|
||||
},
|
||||
{
|
||||
path: '/admin',
|
||||
element: <Admin />,
|
||||
title: 'Админ',
|
||||
},
|
||||
{
|
||||
path: '/myTickets',
|
||||
|
@ -3,6 +3,10 @@ import { Link } from 'react-router-dom';
|
||||
import '../pagescss/Index.css';
|
||||
import RandomVideo from '../components/videos/vids';
|
||||
|
||||
function clearLocalStorage() {
|
||||
localStorage.clear();
|
||||
}
|
||||
console.log(localStorage);
|
||||
const Index = () => {
|
||||
return (
|
||||
<>
|
||||
@ -20,6 +24,9 @@ const Index = () => {
|
||||
<button>Начать покупку</button>
|
||||
</div>
|
||||
</Link>
|
||||
<div>
|
||||
<button onClick={clearLocalStorage} style={{backgroundColor: 'transparent', fontSize: '10px'}}>Очистить LocalStorage</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
@ -1,38 +1,83 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { Form, Button } from 'react-bootstrap';
|
||||
import { useState } from 'react';
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import useUser from '../components/users/userHook';
|
||||
import useSubmit from '../components/users/loginHook';
|
||||
import '../pagescss/Index.css';
|
||||
import RandomVideo from '../components/videos/vids';
|
||||
|
||||
const Into = () => {
|
||||
const PersonalAccountLogin = () => {
|
||||
const [validated, setValidated] = useState(false);
|
||||
const { userLogin } = useUser();
|
||||
const { onSubmit } = useSubmit();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleSubmit = async (event) => {
|
||||
const form = event.currentTarget;
|
||||
if (form.checkValidity() === false) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
event.preventDefault();
|
||||
setValidated(true);
|
||||
|
||||
const formData = {
|
||||
handle: form.elements.formHandle.value,
|
||||
password: form.elements.formPassword.value,
|
||||
};
|
||||
|
||||
const result = await onSubmit(formData);
|
||||
|
||||
if (result === 1) {
|
||||
alert('Пользователь с таким хэндлом не существует');
|
||||
} else if (result === 2) {
|
||||
alert('Введен неверный пароль');
|
||||
} else if (result === 3) {
|
||||
userLogin(formData);
|
||||
navigate('/myTickets');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div id="video-container">
|
||||
<RandomVideo />
|
||||
<div className="text-button-overlay">
|
||||
<div className="container mt-3">
|
||||
<form>
|
||||
<div className="mb-1">
|
||||
<label htmlFor="name" className="form-label">Логин</label>
|
||||
<input type="text" className="form-control" id="name" placeholder="Логин"/>
|
||||
</div>
|
||||
<div className="mb-1">
|
||||
<label htmlFor="password" className="form-label">Пароль</label>
|
||||
<input type="password" className="form-control" id="password" placeholder="Пароль"/>
|
||||
</div>
|
||||
<Link to="/myTickets">
|
||||
<div className="button-overlay">
|
||||
<button style={{ fontSize: '24px' }}>Вход</button>
|
||||
|
||||
<Form noValidate validated={validated} onSubmit={handleSubmit}>
|
||||
<h2 className="text-uppercase text-center mb-3">Вход</h2>
|
||||
<Form.Group className="mb-1">
|
||||
<Form.Control type="text" id="formHandle" required />
|
||||
<Form.Control.Feedback>Имя заполнено</Form.Control.Feedback>
|
||||
<Form.Control.Feedback type="invalid">Имя не заполнено</Form.Control.Feedback>
|
||||
<Form.Label htmlFor="formHandle">Имя</Form.Label>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group className="mb-1">
|
||||
<Form.Control type="password" id="formPassword" size="lg" required />
|
||||
<Form.Control.Feedback>Пароль заполнен</Form.Control.Feedback>
|
||||
<Form.Control.Feedback type="invalid">Пароль не заполнен</Form.Control.Feedback>
|
||||
<Form.Label htmlFor="formPassword">Пароль</Form.Label>
|
||||
</Form.Group>
|
||||
|
||||
<div className="button-overlay mt-0">
|
||||
<Button to='/myTickets' type="submit" style={{ fontSize: '24px'}}>
|
||||
Вход
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<p className="text-center mb-0" style={{ color: 'white', textDecoration: 'none' }}>
|
||||
У вас нет аккаунта?{' '}
|
||||
<Link to='/login' className="fw-bold " style={{ color: 'white', textDecoration: 'none' }}>
|
||||
<u>Регистрация</u>
|
||||
</Link>
|
||||
<Link to="/login">
|
||||
<p>Регистрация</p>
|
||||
</Link>
|
||||
</form>
|
||||
</p>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Into;
|
||||
export default PersonalAccountLogin;
|
@ -1,39 +1,112 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import {Form, Button } from 'react-bootstrap';
|
||||
import { useState } from 'react';
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import UsersApiService from '../components/users/service/UsersApiService';
|
||||
import useSubmit from '../components/users/regHook';
|
||||
import useUser from '../components/users/userHook';
|
||||
import '../pagescss/Index.css';
|
||||
import RandomVideo from '../components/videos/vids';
|
||||
|
||||
const Login = () => {
|
||||
const PersonalAccountRegister = () => {
|
||||
const [validated, setValidated] = useState(false);
|
||||
const { userLogin } = useUser();
|
||||
const { onSubmit } = useSubmit();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [name, setName] = useState('');
|
||||
const [email, setEmail] = useState('');
|
||||
const [password, setPassword] = useState('');
|
||||
|
||||
|
||||
const handleSubmit = async (event) => {
|
||||
const form = event.currentTarget;
|
||||
if (form.checkValidity() === false) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
event.preventDefault();
|
||||
setValidated(true);
|
||||
|
||||
const formData = {
|
||||
handle: name,
|
||||
email: email,
|
||||
password: password,
|
||||
};
|
||||
|
||||
const result = await onSubmit(formData);
|
||||
|
||||
if (result === 1) {
|
||||
alert('Пользователь с таким хэндлом уже существует');
|
||||
} else if (result === 2) {
|
||||
alert('Пользователь с таким email уже существует');
|
||||
} else if (result === 3) {
|
||||
await UsersApiService.create(formData);
|
||||
userLogin(formData);
|
||||
navigate('/myTickets');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<div id="video-container">
|
||||
<RandomVideo />
|
||||
<div className="text-button-overlay">
|
||||
<div className="container mt-3">
|
||||
<form>
|
||||
<div className="mb-1">
|
||||
<label htmlFor="name" className="form-label">Логин</label>
|
||||
<input type="text" className="form-control" id="name" placeholder="Логин"/>
|
||||
</div>
|
||||
<div className="mb-1">
|
||||
<label htmlFor="email" className="form-label">E-mail</label>
|
||||
<input type="text" className="form-control" id="email" placeholder="example@mail.com"/>
|
||||
</div>
|
||||
<div className="mb-1">
|
||||
<label htmlFor="password" className="form-label">Пароль</label>
|
||||
<input type="password" id="password" className="form-control" placeholder="Введите пароль"/>
|
||||
</div>
|
||||
<Link to="/myTickets">
|
||||
<div className="button-overlay">
|
||||
<button style={{ fontSize: '15px' }}>Зарегистрироваться</button>
|
||||
<Form noValidate validated={validated} onSubmit={handleSubmit}>
|
||||
<h2 className="text-uppercase text-center mb-3">Создать учетную запись</h2>
|
||||
<Form.Group className="mb-1">
|
||||
<Form.Control
|
||||
type="text"
|
||||
id="formHandle"
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
required
|
||||
/>
|
||||
<Form.Control.Feedback>Имя заполнено</Form.Control.Feedback>
|
||||
<Form.Control.Feedback type="invalid">Имя не заполнено</Form.Control.Feedback>
|
||||
<Form.Label>Ваше имя</Form.Label>
|
||||
</Form.Group>
|
||||
<Form.Group className="mb-1">
|
||||
<Form.Control
|
||||
type="email"
|
||||
id="formEmail"
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
required
|
||||
/>
|
||||
<Form.Control.Feedback>Email заполнен</Form.Control.Feedback>
|
||||
<Form.Control.Feedback type="invalid">Email не заполнен</Form.Control.Feedback>
|
||||
<Form.Label>Ваш адрес электронной почты</Form.Label>
|
||||
</Form.Group>
|
||||
<Form.Group className="mb-1">
|
||||
<Form.Control
|
||||
type="password"
|
||||
id="formPassword"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
required
|
||||
/>
|
||||
<Form.Control.Feedback>Пароль заполнен</Form.Control.Feedback>
|
||||
<Form.Control.Feedback type="invalid">Пароль не заполнен</Form.Control.Feedback>
|
||||
<Form.Label htmlFor="form3Example4cg">Пароль</Form.Label>
|
||||
</Form.Group>
|
||||
<div className="button-overlay mt-0">
|
||||
<Button to='/myTickets' type="submit" style={{ fontSize: '24px'}}>
|
||||
Вход
|
||||
</Button>
|
||||
</div>
|
||||
<p className="text-center mb-0" style={{ color: 'white', textDecoration: 'none' }}>
|
||||
У вас уже есть учетная запись?{' '}
|
||||
<Link to='/into' className="fw-bold" style={{ color: 'white', textDecoration: 'none' }}>
|
||||
<u>Войдите здесь</u>
|
||||
</Link>
|
||||
</form>
|
||||
</p>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Login;
|
||||
export default PersonalAccountRegister;
|
||||
|
@ -8,38 +8,3 @@ const MyTickets = () => {
|
||||
};
|
||||
|
||||
export default MyTickets;
|
||||
/**<main className="container-fluid p-2">
|
||||
<div className="container">
|
||||
<div className="row">
|
||||
<div className="col-md">
|
||||
<div className="info">
|
||||
<h1 style={{color: 'white'}}>Текущие заказы</h1>
|
||||
<div className="info-text container" style={{ maxHeight: '25vh', overflowY: 'auto' }}>
|
||||
<table className="table" style={{ color: 'aliceblue' }}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Дата покупки</th>
|
||||
<th>Название</th>
|
||||
<th>Дата проведения</th>
|
||||
<th>Стоимость</th>
|
||||
<th>Место проведения</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Ячейка 1</td>
|
||||
<td>Ячейка 2</td>
|
||||
<td>Ячейка 3</td>
|
||||
<td>Ячейка 4</td>
|
||||
<td>Ячейка 5</td>
|
||||
<td><button className="btn btn-primary">отменить</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main> */
|
Loading…
Reference in New Issue
Block a user