2024-10-04
This commit is contained in:
parent
7b90cf9d33
commit
95d7fb829a
88 changed files with 9822 additions and 616 deletions
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
|
@ -7,6 +7,7 @@
|
||||||
"Crell",
|
"Crell",
|
||||||
"defini",
|
"defini",
|
||||||
"deplie",
|
"deplie",
|
||||||
|
"Ecoute",
|
||||||
"ENTETE",
|
"ENTETE",
|
||||||
"etats",
|
"etats",
|
||||||
"ETATS",
|
"ETATS",
|
||||||
|
|
|
||||||
22
composer.lock
generated
22
composer.lock
generated
|
|
@ -3495,12 +3495,12 @@
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Roave/SecurityAdvisories.git",
|
"url": "https://github.com/Roave/SecurityAdvisories.git",
|
||||||
"reference": "6f63660a573ec1e6d48d54ff7c44dfb1e303f30d"
|
"reference": "5aa91c2f219db1bd35df0db7a24e45083b853276"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/6f63660a573ec1e6d48d54ff7c44dfb1e303f30d",
|
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/5aa91c2f219db1bd35df0db7a24e45083b853276",
|
||||||
"reference": "6f63660a573ec1e6d48d54ff7c44dfb1e303f30d",
|
"reference": "5aa91c2f219db1bd35df0db7a24e45083b853276",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
|
|
@ -3601,7 +3601,7 @@
|
||||||
"concrete5/core": "<8.5.8|>=9,<9.1",
|
"concrete5/core": "<8.5.8|>=9,<9.1",
|
||||||
"contao-components/mediaelement": ">=2.14.2,<2.21.1",
|
"contao-components/mediaelement": ">=2.14.2,<2.21.1",
|
||||||
"contao/comments-bundle": ">=2,<4.13.40|>=5.0.0.0-RC1-dev,<5.3.4",
|
"contao/comments-bundle": ">=2,<4.13.40|>=5.0.0.0-RC1-dev,<5.3.4",
|
||||||
"contao/contao": ">=3,<3.5.37|>=4,<4.4.56|>=4.5,<4.9.40|>=4.10,<4.11.7|>=4.13,<4.13.21|>=5.1,<5.1.4",
|
"contao/contao": "<=5.4.1",
|
||||||
"contao/core": "<3.5.39",
|
"contao/core": "<3.5.39",
|
||||||
"contao/core-bundle": "<4.13.49|>=5,<5.3.15|>=5.4,<5.4.3",
|
"contao/core-bundle": "<4.13.49|>=5,<5.3.15|>=5.4,<5.4.3",
|
||||||
"contao/listing-bundle": ">=3,<=3.5.30|>=4,<4.4.8",
|
"contao/listing-bundle": ">=3,<=3.5.30|>=4,<4.4.8",
|
||||||
|
|
@ -3638,9 +3638,9 @@
|
||||||
"dolibarr/dolibarr": "<19.0.2",
|
"dolibarr/dolibarr": "<19.0.2",
|
||||||
"dompdf/dompdf": "<2.0.4",
|
"dompdf/dompdf": "<2.0.4",
|
||||||
"doublethreedigital/guest-entries": "<3.1.2",
|
"doublethreedigital/guest-entries": "<3.1.2",
|
||||||
"drupal/core": ">=6,<6.38|>=7,<7.96|>=8,<=11.0.4",
|
"drupal/core": ">=6,<6.38|>=7,<7.96|>=8,<10.3.6|>=11,<11.0.5",
|
||||||
"drupal/core-recommended": ">=8,<=11.0.4",
|
"drupal/core-recommended": ">=8,<10.3.6|>=11,<11.0.5",
|
||||||
"drupal/drupal": ">=5,<5.11|>=6,<6.38|>=7,<7.80|>=8,<=11.0.4",
|
"drupal/drupal": ">=5,<5.11|>=6,<6.38|>=7,<7.80|>=8,<10.3.6|>=11,<11.0.5",
|
||||||
"duncanmcclean/guest-entries": "<3.1.2",
|
"duncanmcclean/guest-entries": "<3.1.2",
|
||||||
"dweeves/magmi": "<=0.7.24",
|
"dweeves/magmi": "<=0.7.24",
|
||||||
"ec-cube/ec-cube": "<2.4.4|>=2.11,<=2.17.1|>=3,<=3.0.18.0-patch4|>=4,<=4.1.2",
|
"ec-cube/ec-cube": "<2.4.4|>=2.11,<=2.17.1|>=3,<=3.0.18.0-patch4|>=4,<=4.1.2",
|
||||||
|
|
@ -3904,7 +3904,7 @@
|
||||||
"nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1",
|
"nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1",
|
||||||
"october/backend": "<1.1.2",
|
"october/backend": "<1.1.2",
|
||||||
"october/cms": "<1.0.469|==1.0.469|==1.0.471|==1.1.1",
|
"october/cms": "<1.0.469|==1.0.469|==1.0.471|==1.1.1",
|
||||||
"october/october": "<=3.4.4",
|
"october/october": "<=3.6.4",
|
||||||
"october/rain": "<1.0.472|>=1.1,<1.1.2",
|
"october/rain": "<1.0.472|>=1.1,<1.1.2",
|
||||||
"october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.5.15",
|
"october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.5.15",
|
||||||
"omeka/omeka-s": "<4.0.3",
|
"omeka/omeka-s": "<4.0.3",
|
||||||
|
|
@ -4084,7 +4084,7 @@
|
||||||
"subhh/libconnect": "<7.0.8|>=8,<8.1",
|
"subhh/libconnect": "<7.0.8|>=8,<8.1",
|
||||||
"sukohi/surpass": "<1",
|
"sukohi/surpass": "<1",
|
||||||
"sulu/form-bundle": ">=2,<2.5.3",
|
"sulu/form-bundle": ">=2,<2.5.3",
|
||||||
"sulu/sulu": "<1.6.44|>=2,<2.4.17|>=2.5,<2.5.13",
|
"sulu/sulu": "<1.6.44|>=2,<2.6.5",
|
||||||
"sumocoders/framework-user-bundle": "<1.4",
|
"sumocoders/framework-user-bundle": "<1.4",
|
||||||
"superbig/craft-audit": "<3.0.2",
|
"superbig/craft-audit": "<3.0.2",
|
||||||
"swag/paypal": "<5.4.4",
|
"swag/paypal": "<5.4.4",
|
||||||
|
|
@ -4156,7 +4156,7 @@
|
||||||
"topthink/thinkphp": "<=3.2.3",
|
"topthink/thinkphp": "<=3.2.3",
|
||||||
"torrentpier/torrentpier": "<=2.4.3",
|
"torrentpier/torrentpier": "<=2.4.3",
|
||||||
"tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2",
|
"tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2",
|
||||||
"tribalsystems/zenario": "<9.5.60602",
|
"tribalsystems/zenario": "<=9.7.61188",
|
||||||
"truckersmp/phpwhois": "<=4.3.1",
|
"truckersmp/phpwhois": "<=4.3.1",
|
||||||
"ttskch/pagination-service-provider": "<1",
|
"ttskch/pagination-service-provider": "<1",
|
||||||
"twbs/bootstrap": "<=3.4.1|>=4,<=4.6.2",
|
"twbs/bootstrap": "<=3.4.1|>=4,<=4.6.2",
|
||||||
|
|
@ -4315,7 +4315,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-09-30T18:06:02+00:00"
|
"time": "2024-10-03T19:05:02+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/diff",
|
"name": "sebastian/diff",
|
||||||
|
|
|
||||||
8
justfile
8
justfile
|
|
@ -40,10 +40,14 @@ build-css:
|
||||||
"web/app/themes/haiku-atelier-2024/src/sass":"web/app/themes/haiku-atelier-2024/assets/css"
|
"web/app/themes/haiku-atelier-2024/src/sass":"web/app/themes/haiku-atelier-2024/assets/css"
|
||||||
pnpm lightningcss \
|
pnpm lightningcss \
|
||||||
--bundle \
|
--bundle \
|
||||||
--minify \
|
|
||||||
--output-file "web/app/themes/haiku-atelier-2024/assets/css/main.min.css" \
|
|
||||||
--sourcemap \
|
--sourcemap \
|
||||||
|
--output-file "web/app/themes/haiku-atelier-2024/assets/css/main.min.css" \
|
||||||
-- "web/app/themes/haiku-atelier-2024/assets/css/main.css"
|
-- "web/app/themes/haiku-atelier-2024/assets/css/main.css"
|
||||||
|
pnpm lightningcss \
|
||||||
|
--bundle \
|
||||||
|
--sourcemap \
|
||||||
|
--output-file "web/app/themes/haiku-atelier-2024/assets/css/pages/page-panier.min.css" \
|
||||||
|
-- "web/app/themes/haiku-atelier-2024/assets/css/pages/page-panier.css"
|
||||||
|
|
||||||
# Compile le CSS à chaque changement de fichier
|
# Compile le CSS à chaque changement de fichier
|
||||||
watch-css:
|
watch-css:
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^1.9.3",
|
"@biomejs/biome": "^1.9.3",
|
||||||
"@eslint/js": "^9.11.1",
|
"@eslint/js": "^9.12.0",
|
||||||
"@prettier/plugin-php": "^0.22.2",
|
"@prettier/plugin-php": "^0.22.2",
|
||||||
"@prettier/plugin-xml": "^3.4.1",
|
"@prettier/plugin-xml": "^3.4.1",
|
||||||
"@sentry/types": "^8.33.1",
|
"@sentry/types": "^8.33.1",
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
"better-typescript-lib": "^2.9.0",
|
"better-typescript-lib": "^2.9.0",
|
||||||
"browserslist": "^4.24.0",
|
"browserslist": "^4.24.0",
|
||||||
"configurations-js": "git+https://git.gcch.fr/gcch/configurations-js.git",
|
"configurations-js": "git+https://git.gcch.fr/gcch/configurations-js.git",
|
||||||
"eslint": "^9.11.1",
|
"eslint": "^9.12.0",
|
||||||
"eslint-plugin-oxlint": "^0.9.9",
|
"eslint-plugin-oxlint": "^0.9.9",
|
||||||
"eslint-plugin-perfectionist": "^3.8.0",
|
"eslint-plugin-perfectionist": "^3.8.0",
|
||||||
"fdir": "^6.4.0",
|
"fdir": "^6.4.0",
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
"typescript-eslint": "^8.8.0",
|
"typescript-eslint": "^8.8.0",
|
||||||
"vite": "^5.4.8",
|
"vite": "^5.4.8",
|
||||||
"vite-plugin-manifest-sri": "^0.2.0",
|
"vite-plugin-manifest-sri": "^0.2.0",
|
||||||
"vite-plugin-valibot-env": "^0.7.0",
|
"vite-plugin-valibot-env": "^0.8.0",
|
||||||
"vite-tsconfig-paths": "^5.0.1",
|
"vite-tsconfig-paths": "^5.0.1",
|
||||||
"wp-types": "^4.66.1"
|
"wp-types": "^4.66.1"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
153
pnpm-lock.yaml
generated
153
pnpm-lock.yaml
generated
|
|
@ -31,8 +31,8 @@ importers:
|
||||||
specifier: ^1.9.3
|
specifier: ^1.9.3
|
||||||
version: 1.9.3
|
version: 1.9.3
|
||||||
'@eslint/js':
|
'@eslint/js':
|
||||||
specifier: ^9.11.1
|
specifier: ^9.12.0
|
||||||
version: 9.11.1
|
version: 9.12.0
|
||||||
'@prettier/plugin-php':
|
'@prettier/plugin-php':
|
||||||
specifier: ^0.22.2
|
specifier: ^0.22.2
|
||||||
version: 0.22.2(prettier@3.3.3)
|
version: 0.22.2(prettier@3.3.3)
|
||||||
|
|
@ -58,14 +58,14 @@ importers:
|
||||||
specifier: git+https://git.gcch.fr/gcch/configurations-js.git
|
specifier: git+https://git.gcch.fr/gcch/configurations-js.git
|
||||||
version: git+https://git.gcch.fr/gcch/configurations-js.git#8041a8ac7398dd2255920bbb61ff782670bd13f2
|
version: git+https://git.gcch.fr/gcch/configurations-js.git#8041a8ac7398dd2255920bbb61ff782670bd13f2
|
||||||
eslint:
|
eslint:
|
||||||
specifier: ^9.11.1
|
specifier: ^9.12.0
|
||||||
version: 9.11.1
|
version: 9.12.0
|
||||||
eslint-plugin-oxlint:
|
eslint-plugin-oxlint:
|
||||||
specifier: ^0.9.9
|
specifier: ^0.9.9
|
||||||
version: 0.9.9
|
version: 0.9.9
|
||||||
eslint-plugin-perfectionist:
|
eslint-plugin-perfectionist:
|
||||||
specifier: ^3.8.0
|
specifier: ^3.8.0
|
||||||
version: 3.8.0(eslint@9.11.1)(typescript@5.6.2)
|
version: 3.8.0(eslint@9.12.0)(typescript@5.6.2)
|
||||||
fdir:
|
fdir:
|
||||||
specifier: ^6.4.0
|
specifier: ^6.4.0
|
||||||
version: 6.4.0(picomatch@4.0.2)
|
version: 6.4.0(picomatch@4.0.2)
|
||||||
|
|
@ -113,7 +113,7 @@ importers:
|
||||||
version: 5.6.2
|
version: 5.6.2
|
||||||
typescript-eslint:
|
typescript-eslint:
|
||||||
specifier: ^8.8.0
|
specifier: ^8.8.0
|
||||||
version: 8.8.0(eslint@9.11.1)(typescript@5.6.2)
|
version: 8.8.0(eslint@9.12.0)(typescript@5.6.2)
|
||||||
vite:
|
vite:
|
||||||
specifier: ^5.4.8
|
specifier: ^5.4.8
|
||||||
version: 5.4.8(@types/node@22.7.4)(sass@1.79.4)
|
version: 5.4.8(@types/node@22.7.4)(sass@1.79.4)
|
||||||
|
|
@ -121,8 +121,8 @@ importers:
|
||||||
specifier: ^0.2.0
|
specifier: ^0.2.0
|
||||||
version: 0.2.0
|
version: 0.2.0
|
||||||
vite-plugin-valibot-env:
|
vite-plugin-valibot-env:
|
||||||
specifier: ^0.7.0
|
specifier: ^0.8.0
|
||||||
version: 0.7.0(valibot@1.0.0-beta.0(typescript@5.6.2))(vite@5.4.8(@types/node@22.7.4)(sass@1.79.4))
|
version: 0.8.0(valibot@1.0.0-beta.0(typescript@5.6.2))(vite@5.4.8(@types/node@22.7.4)(sass@1.79.4))
|
||||||
vite-tsconfig-paths:
|
vite-tsconfig-paths:
|
||||||
specifier: ^5.0.1
|
specifier: ^5.0.1
|
||||||
version: 5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.4)(sass@1.79.4))
|
version: 5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.4)(sass@1.79.4))
|
||||||
|
|
@ -463,8 +463,8 @@ packages:
|
||||||
resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==}
|
resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@eslint/js@9.11.1':
|
'@eslint/js@9.12.0':
|
||||||
resolution: {integrity: sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==}
|
resolution: {integrity: sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@eslint/object-schema@2.1.4':
|
'@eslint/object-schema@2.1.4':
|
||||||
|
|
@ -475,12 +475,20 @@ packages:
|
||||||
resolution: {integrity: sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==}
|
resolution: {integrity: sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
|
'@humanfs/core@0.19.0':
|
||||||
|
resolution: {integrity: sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==}
|
||||||
|
engines: {node: '>=18.18.0'}
|
||||||
|
|
||||||
|
'@humanfs/node@0.16.5':
|
||||||
|
resolution: {integrity: sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==}
|
||||||
|
engines: {node: '>=18.18.0'}
|
||||||
|
|
||||||
'@humanwhocodes/module-importer@1.0.1':
|
'@humanwhocodes/module-importer@1.0.1':
|
||||||
resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==}
|
resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==}
|
||||||
engines: {node: '>=12.22'}
|
engines: {node: '>=12.22'}
|
||||||
|
|
||||||
'@humanwhocodes/retry@0.3.0':
|
'@humanwhocodes/retry@0.3.1':
|
||||||
resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==}
|
resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==}
|
||||||
engines: {node: '>=18.18'}
|
engines: {node: '>=18.18'}
|
||||||
|
|
||||||
'@mole-inc/bin-wrapper@8.0.1':
|
'@mole-inc/bin-wrapper@8.0.1':
|
||||||
|
|
@ -765,8 +773,8 @@ packages:
|
||||||
resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==}
|
resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
|
|
||||||
'@stylistic/stylelint-plugin@3.1.0':
|
'@stylistic/stylelint-plugin@3.1.1':
|
||||||
resolution: {integrity: sha512-NU2XR6i1x163KdyDj3zqblA13890fBzHNZYqZ13aor/sB3Yq8kU/0NKCudv5pfl9Kb/UAteo/D7vKMHtaror/A==}
|
resolution: {integrity: sha512-XagAHHIa528EvyGybv8EEYGK5zrVW74cHpsjhtovVATbhDRuJYfE+X4HCaAieW9lCkwbX6L+X0I4CiUG3w/hFw==}
|
||||||
engines: {node: ^18.12 || >=20.9}
|
engines: {node: ^18.12 || >=20.9}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
stylelint: ^16.8.0
|
stylelint: ^16.8.0
|
||||||
|
|
@ -1047,8 +1055,8 @@ packages:
|
||||||
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
|
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
|
|
||||||
caniuse-lite@1.0.30001666:
|
caniuse-lite@1.0.30001667:
|
||||||
resolution: {integrity: sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g==}
|
resolution: {integrity: sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==}
|
||||||
|
|
||||||
chalk@2.4.2:
|
chalk@2.4.2:
|
||||||
resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
|
resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
|
||||||
|
|
@ -1152,8 +1160,8 @@ packages:
|
||||||
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
|
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
|
|
||||||
electron-to-chromium@1.5.31:
|
electron-to-chromium@1.5.32:
|
||||||
resolution: {integrity: sha512-QcDoBbQeYt0+3CWcK/rEbuHvwpbT/8SV9T3OSgs6cX1FlcUAkgrkqbg9zLnDrMM/rLamzQwal4LYFCiWk861Tg==}
|
resolution: {integrity: sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==}
|
||||||
|
|
||||||
emoji-regex@8.0.0:
|
emoji-regex@8.0.0:
|
||||||
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
||||||
|
|
@ -1223,8 +1231,8 @@ packages:
|
||||||
resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==}
|
resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
eslint@9.11.1:
|
eslint@9.12.0:
|
||||||
resolution: {integrity: sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==}
|
resolution: {integrity: sha512-UVIOlTEWxwIopRL1wgSQYdnVDcEvs2wyaO6DGo5mXqe3r16IoCNWkR29iHhyaP4cICWjbgbmFUGAhh0GJRuGZw==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
|
@ -1471,10 +1479,6 @@ packages:
|
||||||
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
|
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
|
||||||
engines: {node: '>=0.12.0'}
|
engines: {node: '>=0.12.0'}
|
||||||
|
|
||||||
is-path-inside@3.0.3:
|
|
||||||
resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==}
|
|
||||||
engines: {node: '>=8'}
|
|
||||||
|
|
||||||
is-plain-obj@1.1.0:
|
is-plain-obj@1.1.0:
|
||||||
resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==}
|
resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
|
@ -1736,8 +1740,8 @@ packages:
|
||||||
postcss-resolve-nested-selector@0.1.6:
|
postcss-resolve-nested-selector@0.1.6:
|
||||||
resolution: {integrity: sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==}
|
resolution: {integrity: sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==}
|
||||||
|
|
||||||
postcss-safe-parser@7.0.0:
|
postcss-safe-parser@7.0.1:
|
||||||
resolution: {integrity: sha512-ovehqRNVCpuFzbXoTb4qLtyzK3xn3t/CUBxOs8LsnQjQrShaB4lKiHoVqY8ANaC0hBMHq5QVWk77rwGklFUDrg==}
|
resolution: {integrity: sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==}
|
||||||
engines: {node: '>=18.0'}
|
engines: {node: '>=18.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
postcss: ^8.4.31
|
postcss: ^8.4.31
|
||||||
|
|
@ -1813,8 +1817,8 @@ packages:
|
||||||
resolution: {integrity: sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==}
|
resolution: {integrity: sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
|
|
||||||
readdirp@4.0.1:
|
readdirp@4.0.2:
|
||||||
resolution: {integrity: sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==}
|
resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==}
|
||||||
engines: {node: '>= 14.16.0'}
|
engines: {node: '>= 14.16.0'}
|
||||||
|
|
||||||
regexp-to-ast@0.5.0:
|
regexp-to-ast@0.5.0:
|
||||||
|
|
@ -2142,8 +2146,8 @@ packages:
|
||||||
vite-plugin-manifest-sri@0.2.0:
|
vite-plugin-manifest-sri@0.2.0:
|
||||||
resolution: {integrity: sha512-Zt5jt19xTIJ91LOuQTCtNG7rTFc5OziAjBz2H5NdCGqaOD1nxrWExLhcKW+W4/q8/jOPCg/n5ncYEQmqCxiGQQ==}
|
resolution: {integrity: sha512-Zt5jt19xTIJ91LOuQTCtNG7rTFc5OziAjBz2H5NdCGqaOD1nxrWExLhcKW+W4/q8/jOPCg/n5ncYEQmqCxiGQQ==}
|
||||||
|
|
||||||
vite-plugin-valibot-env@0.7.0:
|
vite-plugin-valibot-env@0.8.0:
|
||||||
resolution: {integrity: sha512-ZWOotDNSaaS2imljDofr+sIjA/lMgDXP9Sp5u6zRYbN5s4YF6g70xnHq8Dv/jLBdy/qDms/ZaA/KI4gQgwUojw==}
|
resolution: {integrity: sha512-uMxgu7qpR/nJlVrOCTvxXSc6KnWAxT4eqINenPvHau6kHuIdHO3N7eQlffUKKZNMWqbuM9MURv4dTAZVLTPYzQ==}
|
||||||
engines: {node: '>=18.0.0'}
|
engines: {node: '>=18.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
valibot: '>=0.30 <0.43 || 1.0.0-beta.0'
|
valibot: '>=0.30 <0.43 || 1.0.0-beta.0'
|
||||||
|
|
@ -2427,9 +2431,9 @@ snapshots:
|
||||||
'@esbuild/win32-x64@0.21.5':
|
'@esbuild/win32-x64@0.21.5':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@eslint-community/eslint-utils@4.4.0(eslint@9.11.1)':
|
'@eslint-community/eslint-utils@4.4.0(eslint@9.12.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint: 9.11.1
|
eslint: 9.12.0
|
||||||
eslint-visitor-keys: 3.4.3
|
eslint-visitor-keys: 3.4.3
|
||||||
|
|
||||||
'@eslint-community/regexpp@4.11.1': {}
|
'@eslint-community/regexpp@4.11.1': {}
|
||||||
|
|
@ -2458,7 +2462,7 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@eslint/js@9.11.1': {}
|
'@eslint/js@9.12.0': {}
|
||||||
|
|
||||||
'@eslint/object-schema@2.1.4': {}
|
'@eslint/object-schema@2.1.4': {}
|
||||||
|
|
||||||
|
|
@ -2466,9 +2470,16 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
levn: 0.4.1
|
levn: 0.4.1
|
||||||
|
|
||||||
|
'@humanfs/core@0.19.0': {}
|
||||||
|
|
||||||
|
'@humanfs/node@0.16.5':
|
||||||
|
dependencies:
|
||||||
|
'@humanfs/core': 0.19.0
|
||||||
|
'@humanwhocodes/retry': 0.3.1
|
||||||
|
|
||||||
'@humanwhocodes/module-importer@1.0.1': {}
|
'@humanwhocodes/module-importer@1.0.1': {}
|
||||||
|
|
||||||
'@humanwhocodes/retry@0.3.0': {}
|
'@humanwhocodes/retry@0.3.1': {}
|
||||||
|
|
||||||
'@mole-inc/bin-wrapper@8.0.1':
|
'@mole-inc/bin-wrapper@8.0.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -2693,7 +2704,7 @@ snapshots:
|
||||||
|
|
||||||
'@sindresorhus/is@4.6.0': {}
|
'@sindresorhus/is@4.6.0': {}
|
||||||
|
|
||||||
'@stylistic/stylelint-plugin@3.1.0(stylelint@16.9.0(typescript@5.6.2))':
|
'@stylistic/stylelint-plugin@3.1.1(stylelint@16.9.0(typescript@5.6.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1)
|
'@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1)
|
||||||
'@csstools/css-tokenizer': 3.0.1
|
'@csstools/css-tokenizer': 3.0.1
|
||||||
|
|
@ -2809,15 +2820,15 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 22.7.4
|
'@types/node': 22.7.4
|
||||||
|
|
||||||
'@typescript-eslint/eslint-plugin@8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2)':
|
'@typescript-eslint/eslint-plugin@8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/regexpp': 4.11.1
|
'@eslint-community/regexpp': 4.11.1
|
||||||
'@typescript-eslint/parser': 8.8.0(eslint@9.11.1)(typescript@5.6.2)
|
'@typescript-eslint/parser': 8.8.0(eslint@9.12.0)(typescript@5.6.2)
|
||||||
'@typescript-eslint/scope-manager': 8.8.0
|
'@typescript-eslint/scope-manager': 8.8.0
|
||||||
'@typescript-eslint/type-utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2)
|
'@typescript-eslint/type-utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2)
|
||||||
'@typescript-eslint/utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2)
|
'@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2)
|
||||||
'@typescript-eslint/visitor-keys': 8.8.0
|
'@typescript-eslint/visitor-keys': 8.8.0
|
||||||
eslint: 9.11.1
|
eslint: 9.12.0
|
||||||
graphemer: 1.4.0
|
graphemer: 1.4.0
|
||||||
ignore: 5.3.2
|
ignore: 5.3.2
|
||||||
natural-compare: 1.4.0
|
natural-compare: 1.4.0
|
||||||
|
|
@ -2827,14 +2838,14 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2)':
|
'@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/scope-manager': 8.8.0
|
'@typescript-eslint/scope-manager': 8.8.0
|
||||||
'@typescript-eslint/types': 8.8.0
|
'@typescript-eslint/types': 8.8.0
|
||||||
'@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2)
|
'@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2)
|
||||||
'@typescript-eslint/visitor-keys': 8.8.0
|
'@typescript-eslint/visitor-keys': 8.8.0
|
||||||
debug: 4.3.7
|
debug: 4.3.7
|
||||||
eslint: 9.11.1
|
eslint: 9.12.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.6.2
|
typescript: 5.6.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
|
@ -2845,10 +2856,10 @@ snapshots:
|
||||||
'@typescript-eslint/types': 8.8.0
|
'@typescript-eslint/types': 8.8.0
|
||||||
'@typescript-eslint/visitor-keys': 8.8.0
|
'@typescript-eslint/visitor-keys': 8.8.0
|
||||||
|
|
||||||
'@typescript-eslint/type-utils@8.8.0(eslint@9.11.1)(typescript@5.6.2)':
|
'@typescript-eslint/type-utils@8.8.0(eslint@9.12.0)(typescript@5.6.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2)
|
'@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2)
|
||||||
'@typescript-eslint/utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2)
|
'@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2)
|
||||||
debug: 4.3.7
|
debug: 4.3.7
|
||||||
ts-api-utils: 1.3.0(typescript@5.6.2)
|
ts-api-utils: 1.3.0(typescript@5.6.2)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
|
@ -2874,13 +2885,13 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/utils@8.8.0(eslint@9.11.1)(typescript@5.6.2)':
|
'@typescript-eslint/utils@8.8.0(eslint@9.12.0)(typescript@5.6.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1)
|
'@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0)
|
||||||
'@typescript-eslint/scope-manager': 8.8.0
|
'@typescript-eslint/scope-manager': 8.8.0
|
||||||
'@typescript-eslint/types': 8.8.0
|
'@typescript-eslint/types': 8.8.0
|
||||||
'@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2)
|
'@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2)
|
||||||
eslint: 9.11.1
|
eslint: 9.12.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
- typescript
|
- typescript
|
||||||
|
|
@ -2989,8 +3000,8 @@ snapshots:
|
||||||
|
|
||||||
browserslist@4.24.0:
|
browserslist@4.24.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite: 1.0.30001666
|
caniuse-lite: 1.0.30001667
|
||||||
electron-to-chromium: 1.5.31
|
electron-to-chromium: 1.5.32
|
||||||
node-releases: 2.0.18
|
node-releases: 2.0.18
|
||||||
update-browserslist-db: 1.1.1(browserslist@4.24.0)
|
update-browserslist-db: 1.1.1(browserslist@4.24.0)
|
||||||
|
|
||||||
|
|
@ -3008,7 +3019,7 @@ snapshots:
|
||||||
|
|
||||||
callsites@3.1.0: {}
|
callsites@3.1.0: {}
|
||||||
|
|
||||||
caniuse-lite@1.0.30001666: {}
|
caniuse-lite@1.0.30001667: {}
|
||||||
|
|
||||||
chalk@2.4.2:
|
chalk@2.4.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -3027,7 +3038,7 @@ snapshots:
|
||||||
|
|
||||||
chokidar@4.0.1:
|
chokidar@4.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
readdirp: 4.0.1
|
readdirp: 4.0.2
|
||||||
|
|
||||||
clone-response@1.0.3:
|
clone-response@1.0.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -3103,7 +3114,7 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
path-type: 4.0.0
|
path-type: 4.0.0
|
||||||
|
|
||||||
electron-to-chromium@1.5.31: {}
|
electron-to-chromium@1.5.32: {}
|
||||||
|
|
||||||
emoji-regex@8.0.0: {}
|
emoji-regex@8.0.0: {}
|
||||||
|
|
||||||
|
|
@ -3155,11 +3166,11 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
scule: 1.3.0
|
scule: 1.3.0
|
||||||
|
|
||||||
eslint-plugin-perfectionist@3.8.0(eslint@9.11.1)(typescript@5.6.2):
|
eslint-plugin-perfectionist@3.8.0(eslint@9.12.0)(typescript@5.6.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 8.8.0
|
'@typescript-eslint/types': 8.8.0
|
||||||
'@typescript-eslint/utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2)
|
'@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2)
|
||||||
eslint: 9.11.1
|
eslint: 9.12.0
|
||||||
minimatch: 9.0.5
|
minimatch: 9.0.5
|
||||||
natural-compare-lite: 1.4.0
|
natural-compare-lite: 1.4.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
|
@ -3175,18 +3186,18 @@ snapshots:
|
||||||
|
|
||||||
eslint-visitor-keys@4.1.0: {}
|
eslint-visitor-keys@4.1.0: {}
|
||||||
|
|
||||||
eslint@9.11.1:
|
eslint@9.12.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1)
|
'@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0)
|
||||||
'@eslint-community/regexpp': 4.11.1
|
'@eslint-community/regexpp': 4.11.1
|
||||||
'@eslint/config-array': 0.18.0
|
'@eslint/config-array': 0.18.0
|
||||||
'@eslint/core': 0.6.0
|
'@eslint/core': 0.6.0
|
||||||
'@eslint/eslintrc': 3.1.0
|
'@eslint/eslintrc': 3.1.0
|
||||||
'@eslint/js': 9.11.1
|
'@eslint/js': 9.12.0
|
||||||
'@eslint/plugin-kit': 0.2.0
|
'@eslint/plugin-kit': 0.2.0
|
||||||
|
'@humanfs/node': 0.16.5
|
||||||
'@humanwhocodes/module-importer': 1.0.1
|
'@humanwhocodes/module-importer': 1.0.1
|
||||||
'@humanwhocodes/retry': 0.3.0
|
'@humanwhocodes/retry': 0.3.1
|
||||||
'@nodelib/fs.walk': 1.2.8
|
|
||||||
'@types/estree': 1.0.6
|
'@types/estree': 1.0.6
|
||||||
'@types/json-schema': 7.0.15
|
'@types/json-schema': 7.0.15
|
||||||
ajv: 6.12.6
|
ajv: 6.12.6
|
||||||
|
|
@ -3206,13 +3217,11 @@ snapshots:
|
||||||
ignore: 5.3.2
|
ignore: 5.3.2
|
||||||
imurmurhash: 0.1.4
|
imurmurhash: 0.1.4
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
is-path-inside: 3.0.3
|
|
||||||
json-stable-stringify-without-jsonify: 1.0.1
|
json-stable-stringify-without-jsonify: 1.0.1
|
||||||
lodash.merge: 4.6.2
|
lodash.merge: 4.6.2
|
||||||
minimatch: 3.1.2
|
minimatch: 3.1.2
|
||||||
natural-compare: 1.4.0
|
natural-compare: 1.4.0
|
||||||
optionator: 0.9.4
|
optionator: 0.9.4
|
||||||
strip-ansi: 6.0.1
|
|
||||||
text-table: 0.2.0
|
text-table: 0.2.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
@ -3449,8 +3458,6 @@ snapshots:
|
||||||
|
|
||||||
is-number@7.0.0: {}
|
is-number@7.0.0: {}
|
||||||
|
|
||||||
is-path-inside@3.0.3: {}
|
|
||||||
|
|
||||||
is-plain-obj@1.1.0: {}
|
is-plain-obj@1.1.0: {}
|
||||||
|
|
||||||
is-plain-object@5.0.0: {}
|
is-plain-object@5.0.0: {}
|
||||||
|
|
@ -3656,7 +3663,7 @@ snapshots:
|
||||||
|
|
||||||
postcss-resolve-nested-selector@0.1.6: {}
|
postcss-resolve-nested-selector@0.1.6: {}
|
||||||
|
|
||||||
postcss-safe-parser@7.0.0(postcss@8.4.47):
|
postcss-safe-parser@7.0.1(postcss@8.4.47):
|
||||||
dependencies:
|
dependencies:
|
||||||
postcss: 8.4.47
|
postcss: 8.4.47
|
||||||
|
|
||||||
|
|
@ -3722,7 +3729,7 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
readable-stream: 3.6.2
|
readable-stream: 3.6.2
|
||||||
|
|
||||||
readdirp@4.0.1: {}
|
readdirp@4.0.2: {}
|
||||||
|
|
||||||
regexp-to-ast@0.5.0: {}
|
regexp-to-ast@0.5.0: {}
|
||||||
|
|
||||||
|
|
@ -3881,7 +3888,7 @@ snapshots:
|
||||||
|
|
||||||
stylelint-config-sass-guidelines@12.1.0(postcss@8.4.47)(stylelint@16.9.0(typescript@5.6.2)):
|
stylelint-config-sass-guidelines@12.1.0(postcss@8.4.47)(stylelint@16.9.0(typescript@5.6.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@stylistic/stylelint-plugin': 3.1.0(stylelint@16.9.0(typescript@5.6.2))
|
'@stylistic/stylelint-plugin': 3.1.1(stylelint@16.9.0(typescript@5.6.2))
|
||||||
postcss: 8.4.47
|
postcss: 8.4.47
|
||||||
postcss-scss: 4.0.9(postcss@8.4.47)
|
postcss-scss: 4.0.9(postcss@8.4.47)
|
||||||
stylelint: 16.9.0(typescript@5.6.2)
|
stylelint: 16.9.0(typescript@5.6.2)
|
||||||
|
|
@ -3956,7 +3963,7 @@ snapshots:
|
||||||
picocolors: 1.1.0
|
picocolors: 1.1.0
|
||||||
postcss: 8.4.47
|
postcss: 8.4.47
|
||||||
postcss-resolve-nested-selector: 0.1.6
|
postcss-resolve-nested-selector: 0.1.6
|
||||||
postcss-safe-parser: 7.0.0(postcss@8.4.47)
|
postcss-safe-parser: 7.0.1(postcss@8.4.47)
|
||||||
postcss-selector-parser: 6.1.2
|
postcss-selector-parser: 6.1.2
|
||||||
postcss-value-parser: 4.2.0
|
postcss-value-parser: 4.2.0
|
||||||
resolve-from: 5.0.0
|
resolve-from: 5.0.0
|
||||||
|
|
@ -4026,11 +4033,11 @@ snapshots:
|
||||||
|
|
||||||
type-fest@4.26.1: {}
|
type-fest@4.26.1: {}
|
||||||
|
|
||||||
typescript-eslint@8.8.0(eslint@9.11.1)(typescript@5.6.2):
|
typescript-eslint@8.8.0(eslint@9.12.0)(typescript@5.6.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/eslint-plugin': 8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2)
|
'@typescript-eslint/eslint-plugin': 8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)
|
||||||
'@typescript-eslint/parser': 8.8.0(eslint@9.11.1)(typescript@5.6.2)
|
'@typescript-eslint/parser': 8.8.0(eslint@9.12.0)(typescript@5.6.2)
|
||||||
'@typescript-eslint/utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2)
|
'@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.6.2
|
typescript: 5.6.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
|
@ -4059,7 +4066,7 @@ snapshots:
|
||||||
|
|
||||||
vite-plugin-manifest-sri@0.2.0: {}
|
vite-plugin-manifest-sri@0.2.0: {}
|
||||||
|
|
||||||
vite-plugin-valibot-env@0.7.0(valibot@1.0.0-beta.0(typescript@5.6.2))(vite@5.4.8(@types/node@22.7.4)(sass@1.79.4)):
|
vite-plugin-valibot-env@0.8.0(valibot@1.0.0-beta.0(typescript@5.6.2))(vite@5.4.8(@types/node@22.7.4)(sass@1.79.4)):
|
||||||
dependencies:
|
dependencies:
|
||||||
kleur: 4.1.5
|
kleur: 4.1.5
|
||||||
log-symbols: 7.0.0
|
log-symbols: 7.0.0
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ export default defineConfig({
|
||||||
emptyOutDir: true,
|
emptyOutDir: true,
|
||||||
/* Génère un fichier manifeste dans outDir */
|
/* Génère un fichier manifeste dans outDir */
|
||||||
manifest: true,
|
manifest: true,
|
||||||
minify: true,
|
minify: false,
|
||||||
outDir: resolve("./web/app/themes/haiku-atelier-2024/assets/js"),
|
outDir: resolve("./web/app/themes/haiku-atelier-2024/assets/js"),
|
||||||
reportCompressedSize: true,
|
reportCompressedSize: true,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
|
|
@ -35,7 +35,7 @@ export default defineConfig({
|
||||||
output: {
|
output: {
|
||||||
assetFileNames: "[name][extname]",
|
assetFileNames: "[name][extname]",
|
||||||
chunkFileNames: "[name].[hash].js",
|
chunkFileNames: "[name].[hash].js",
|
||||||
compact: true,
|
compact: false,
|
||||||
entryFileNames: "[name].js",
|
entryFileNames: "[name].js",
|
||||||
validate: true,
|
validate: true,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -132,21 +132,21 @@ html {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1. Utilise une couleur d'arrière-plan définie.
|
* 1. Utilise une couleur d'arrière-plan définie.
|
||||||
|
* 2. Utilise la couleur primaire du site.
|
||||||
*/
|
*/
|
||||||
body {
|
body {
|
||||||
|
accent-color: var(--couleur-jaune); /* 2 */
|
||||||
background: var(--couleur-gris); /* 1 */
|
background: var(--couleur-gris); /* 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1. Force l'héritage des styles pour ces éléments.
|
* 1. Force l'héritage des styles pour ces éléments.
|
||||||
* 2. Utilise la couleur primaire du site.
|
|
||||||
*/
|
*/
|
||||||
button,
|
button,
|
||||||
input,
|
input,
|
||||||
select,
|
select,
|
||||||
textarea {
|
textarea {
|
||||||
font: inherit; /* 1 */
|
font: inherit; /* 1 */
|
||||||
accent-color: var(--couleur-jaune); /* 2 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -156,6 +156,16 @@ textarea {
|
||||||
background: var(--couleur-jaune);
|
background: var(--couleur-jaune);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Désactive les animations pour les Utilisateurs n'en souhaitant pas.
|
||||||
|
*/
|
||||||
|
@media (prefers-reduced-motion) {
|
||||||
|
*, *::before, *::after {
|
||||||
|
scroll-behavior: auto !important;
|
||||||
|
transition: none !important;
|
||||||
|
animation-duration: 0s !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 2. Rendu spécifique du texte pour Safari/iOS.
|
* 2. Rendu spécifique du texte pour Safari/iOS.
|
||||||
* 3. Rendu plus précis du texte.
|
* 3. Rendu plus précis du texte.
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"sourceRoot":"","sources":["../../src/sass/base/polices/_lato.scss","../../src/sass/base/polices/_myriad.scss","../../src/sass/abstracts/_variables.scss","../../src/sass/base/_base.scss","../../src/sass/base/_typographie.scss","../../src/sass/base/elements/_boutons.scss","../../src/sass/base/elements/_images.scss","../../src/sass/base/elements/_liens.scss","../../src/sass/base/elements/_listes.scss","../../src/sass/layouts/_en-tete.scss","../../src/sass/layouts/_menu-categories-produits.scss","../../src/sass/layouts/_colonnes-photos.scss","../../src/sass/layouts/_grille-produits.scss","../../src/sass/layouts/_informations-produit.scss","../../src/sass/layouts/_produits-similaires.scss","../../src/sass/layouts/_pied-de-page.scss"],"names":[],"mappings":";AAAA;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AChGJ;EACE;EACA;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA,KACE;;AChBJ;AACE;EACA;EACA;EACA;EACA;EACA;AAEA;EACA;EACA;AAEA;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;EACA;;;ACnBF;AAAA;AAAA;AAGA;EACE;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AAAA;AAAA;EAGE;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAGA;EACE;;;AAGF;AAAA;AAAA;AAAA;AAIA;AAAA;AAAA;AAAA;EAIE;EACA;;;AAGF;AAAA;AAAA;AAGA;EACE;;;ACjDF;AAAA;AAAA;AAAA;AAIA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;ACrBF;AAAA;AAAA;AAGA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;;ACfJ;AAAA;AAAA;AAAA;AAAA;AAKA;AAAA;EAEE;EACA;;;AAGF;EACE;EACA;;;ACbF;AAAA;AAAA;AAAA;AAAA;AAKA;AACE;EACA;EAEA;EACA;EACA;EACA;EACA;EACA,YACE,kHAK4B;EAE9B;AAEA;AAMA;AAAA;AAAA;;AALA;EAEE;;AAMF;AACE;EACA;EACA;AAEA;EACA;EAEA;EACA;AAEA;AAMA;AAKA;;AAVA;EAEE;;AAIF;EACE;;AAIF;EACE;IACE;;;AAMJ;EACE;IACE;;;;AClER;AAAA;AAAA;AAAA;AAAA;AAKA;EACE;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAMA;AACE;EACA;AAEA;EACA;AAEA;EACA;;AAEA;EACE;EACA,qLAEkE;;;AC5BxE;AACE;EACA;EACA;AAEA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAWA;;AATA;EACE;;AAEA;AAAA;EAEE;;AAKJ;EACE;EACA;EACA;EACA;EACA;AAUA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AARA;EACE;EACA;EACA;EACA;EACA;;AAYF;AACE;EACA;EACA;EACA;AAEA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;IACE;;;AAMR;EACE;EACA;EACA;EACA;EACA;AAEA;AAAA;AAAA;;AAGA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;;ACvGR;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AACE;EACA;EACA;AAEA;EACA;EACA;EAEA;EACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAOA;EACE;EACA;EACA;AAEA;AAAA;AAAA;;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAYA;AAAA;AAAA;AAAA;AAAA;;AATE;EACE;;AAIJ;EACE;;AAQF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;;AAGF;EACE;IACE;IACA;;;AAKN;EACE;;AAGF;EACE;;;ACrFR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACE;EACA;AAEA;EACA;EACA;AAAA;AAAA;AAIA;EACA;EAEA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGA;EACE;;AAMF;EACE;EACA;;;AC7CR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EAEI;IACE;IACA;IACA;;;AAMR;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AC3FN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACE;EAEA;EAGA;EACA;EAGA;EAEA;EACA;EACA;EACA;EACA;AAuGA;AAyGA;;AA9MA;EACE;EACA;EACA;EACA;EACA;AAEA;AAAA;AAAA;;AAGA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAKN;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;AAGF;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;AAEA;;AACA;EACE;;AAGF;EACE;;AASN;EACE;;AAMN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;AAEA;AAMA;AAwCA;AAqBA;;AAlEA;EACE;EACA;;AAIF;EACE;AAEA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EAEI;IACE;IACA;;;AAKN;EAEI;IACE;IACA;;;AAOR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;IACE;;;AAKN;EACE;;AAeJ;EACE;;AAKJ;EACE;EACA;EACA;AAEA;;AACA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;AAEA;;AAEE;EACE;IACE;;;;AAQZ;EACE;IACE;;EAGF;IACE;;;AC3QJ;EACE;EACA;EACA;EACA,qBACE;EAEF;EACA;AAEA;;AACA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EAEI;IACE;IACA;IACA;;;AAMR;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;;AC7FZ;AAAA;AAAA;AAGA;AACE;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA","file":"main.css"}
|
{"version":3,"sourceRoot":"","sources":["../../src/sass/base/polices/_lato.scss","../../src/sass/base/polices/_myriad.scss","../../src/sass/abstracts/_variables.scss","../../src/sass/base/_base.scss","../../src/sass/base/_typographie.scss","../../src/sass/base/elements/_boutons.scss","../../src/sass/base/elements/_images.scss","../../src/sass/base/elements/_liens.scss","../../src/sass/base/elements/_listes.scss","../../src/sass/layouts/_en-tete.scss","../../src/sass/layouts/_menu-categories-produits.scss","../../src/sass/layouts/_colonnes-photos.scss","../../src/sass/layouts/_grille-produits.scss","../../src/sass/layouts/_informations-produit.scss","../../src/sass/layouts/_produits-similaires.scss","../../src/sass/layouts/_pied-de-page.scss"],"names":[],"mappings":";AAAA;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA,KACE;;AChGJ;EACE;EACA;EACA;EACA;EACA;EACA,KACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA,KACE;;AChBJ;AACE;EACA;EACA;EACA;EACA;EACA;AAEA;EACA;EACA;AAEA;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;EACA;;;ACnBF;AAAA;AAAA;AAGA;EACE;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AAAA;AAAA;EAGE;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAAA;AAIA;EACE;EACA;;;AAGF;AAAA;AAAA;AAGA;AAAA;AAAA;AAAA;EAIE;;;AAGF;AAAA;AAAA;AAGA;EACE;;;AAGF;AAAA;AAAA;AAGA;EACE;IACE;IACA;IACA;;;AC3DJ;AAAA;AAAA;AAAA;AAIA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;ACrBF;AAAA;AAAA;AAGA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;;ACfJ;AAAA;AAAA;AAAA;AAAA;AAKA;AAAA;EAEE;EACA;;;AAGF;EACE;EACA;;;ACbF;AAAA;AAAA;AAAA;AAAA;AAKA;AACE;EACA;EAEA;EACA;EACA;EACA;EACA;EACA,YACE,kHAK4B;EAE9B;AAEA;AAMA;AAAA;AAAA;;AALA;EAEE;;AAMF;AACE;EACA;EACA;AAEA;EACA;EAEA;EACA;AAEA;AAMA;AAKA;;AAVA;EAEE;;AAIF;EACE;;AAIF;EACE;IACE;;;AAMJ;EACE;IACE;;;;AClER;AAAA;AAAA;AAAA;AAAA;AAKA;EACE;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAMA;AACE;EACA;AAEA;EACA;AAEA;EACA;;AAEA;EACE;EACA,qLAEkE;;;AC5BxE;AACE;EACA;EACA;AAEA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAWA;;AATA;EACE;;AAEA;AAAA;EAEE;;AAKJ;EACE;EACA;EACA;EACA;EACA;AAUA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AARA;EACE;EACA;EACA;EACA;EACA;;AAYF;AACE;EACA;EACA;EACA;AAEA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;IACE;;;AAMR;EACE;EACA;EACA;EACA;EACA;AAEA;AAAA;AAAA;;AAGA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;;ACvGR;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AACE;EACA;EACA;AAEA;EACA;EACA;EAEA;EACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAOA;EACE;EACA;EACA;AAEA;AAAA;AAAA;;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAYA;AAAA;AAAA;AAAA;AAAA;;AATE;EACE;;AAIJ;EACE;;AAQF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;;AAGF;EACE;IACE;IACA;;;AAKN;EACE;;AAGF;EACE;;;ACrFR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACE;EACA;AAEA;EACA;EACA;AAAA;AAAA;AAIA;EACA;EAEA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGA;EACE;;AAMF;EACE;EACA;;;AC7CR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EAEI;IACE;IACA;IACA;;;AAMR;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AC3FN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACE;EAEA;EAGA;EACA;EAGA;EAEA;EACA;EACA;EACA;EACA;AAuGA;AAyGA;;AA9MA;EACE;EACA;EACA;EACA;EACA;AAEA;AAAA;AAAA;;AAGA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAKN;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;AAGF;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;AAEA;;AACA;EACE;;AAGF;EACE;;AASN;EACE;;AAMN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;AAEA;AAMA;AAwCA;AAqBA;;AAlEA;EACE;EACA;;AAIF;EACE;AAEA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EAEI;IACE;IACA;;;AAKN;EAEI;IACE;IACA;;;AAOR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;IACE;;;AAKN;EACE;;AAeJ;EACE;;AAKJ;EACE;EACA;EACA;AAEA;;AACA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;AAEA;;AAEE;EACE;IACE;;;;AAQZ;EACE;IACE;;EAGF;IACE;;;AC3QJ;EACE;EACA;EACA;EACA,qBACE;EAEF;EACA;AAEA;;AACA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EAEI;IACE;IACA;IACA;;;AAMR;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;;AC7FZ;AAAA;AAAA;AAGA;AACE;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA","file":"main.css"}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
341
web/app/themes/haiku-atelier-2024/assets/css/pages/page-panier.min.css
vendored
Normal file
341
web/app/themes/haiku-atelier-2024/assets/css/pages/page-panier.min.css
vendored
Normal file
|
|
@ -0,0 +1,341 @@
|
||||||
|
#panneau-panier {
|
||||||
|
border-right: 1px solid var(--couleur-noir);
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier > div {
|
||||||
|
place-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits {
|
||||||
|
flex-flow: column;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits__produit {
|
||||||
|
border-bottom: 1px solid var(--couleur-noir);
|
||||||
|
grid-template-rows: 1fr;
|
||||||
|
grid-template-columns: max-content auto;
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits__produit__illustratif {
|
||||||
|
padding: var(--espace-l);
|
||||||
|
text-align: center;
|
||||||
|
border-right: 1px solid var(--couleur-noir);
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits__produit__illustratif img {
|
||||||
|
aspect-ratio: 1;
|
||||||
|
width: fit-content;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit {
|
||||||
|
padding: 0 var(--espace-xl);
|
||||||
|
flex-flow: column;
|
||||||
|
place-content: center;
|
||||||
|
width: fit-content;
|
||||||
|
margin: auto;
|
||||||
|
font-style: italic;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit__nom-prix {
|
||||||
|
column-gap: var(--espace-xl);
|
||||||
|
font-size: var(--espace-l);
|
||||||
|
flex-flow: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit__nom-prix span {
|
||||||
|
font-weight: 600;
|
||||||
|
font-style: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit__description {
|
||||||
|
margin-bottom: var(--espace-l);
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit__actions {
|
||||||
|
font-weight: 500;
|
||||||
|
font-style: initial;
|
||||||
|
border: 1px solid var(--couleur-noir);
|
||||||
|
grid-template-rows: 1fr 1fr;
|
||||||
|
grid-template-columns: .25fr auto .25fr;
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit__actions button:disabled {
|
||||||
|
background: repeating-conic-gradient(var(--couleur-noir) 0% 25%, transparent 0% 100%) 1px .5px / 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit__actions button:first-of-type {
|
||||||
|
grid-column: 1;
|
||||||
|
min-width: 3rem;
|
||||||
|
max-width: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit__actions input[type="number"] {
|
||||||
|
text-align: center;
|
||||||
|
appearance: textfield;
|
||||||
|
background: initial;
|
||||||
|
border: initial;
|
||||||
|
border-right: 1px solid var(--couleur-noir);
|
||||||
|
border-left: 1px solid var(--couleur-noir);
|
||||||
|
grid-column: 2;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit__actions input[type="number"]::-webkit-outer-spin-button, #panneau-panier .panneau__grille-produits .detail-produit__actions input[type="number"]::-webkit-inner-spin-button {
|
||||||
|
appearance: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit__actions button:nth-of-type(2) {
|
||||||
|
grid-column: 3;
|
||||||
|
min-width: 3rem;
|
||||||
|
max-width: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit__actions button:last-of-type {
|
||||||
|
padding: var(--espace-xs);
|
||||||
|
text-transform: lowercase;
|
||||||
|
border-top: 1px solid var(--couleur-noir);
|
||||||
|
grid-area: 2 / span 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (hover: hover) {
|
||||||
|
#panneau-panier .panneau__grille-produits .detail-produit__actions button:last-of-type:hover {
|
||||||
|
color: var(--couleur-blanc);
|
||||||
|
background: var(--couleur-noir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__emballages {
|
||||||
|
padding: var(--espace-l) 0;
|
||||||
|
text-align: center;
|
||||||
|
border-bottom: 1px solid var(--couleur-noir);
|
||||||
|
width: 100%;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__emballages__conteneur {
|
||||||
|
width: fit-content;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__emballages__titre-prix p {
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__emballages__titre-prix p span {
|
||||||
|
font-weight: 600;
|
||||||
|
font-style: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__emballages__choix {
|
||||||
|
column-gap: var(--espace-xl);
|
||||||
|
text-transform: lowercase;
|
||||||
|
flex-flow: row;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__emballages__choix__ligne {
|
||||||
|
flex-flow: row;
|
||||||
|
place-items: center;
|
||||||
|
gap: 1ch;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__emballages__choix input, #panneau-panier .panneau__emballages__choix label {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__emballages__choix input[type="radio"] {
|
||||||
|
width: var(--espace-l);
|
||||||
|
height: var(--espace-l);
|
||||||
|
appearance: none;
|
||||||
|
border: 1px solid var(--couleur-noir);
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__emballages__choix input[type="radio"]:checked {
|
||||||
|
background: var(--couleur-jaune);
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__emballages__choix input[type="radio"]:checked:before {
|
||||||
|
content: "x";
|
||||||
|
position: relative;
|
||||||
|
bottom: 25%;
|
||||||
|
left: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__emballages__choix label {
|
||||||
|
padding-top: 1px;
|
||||||
|
font-size: .9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__instructions-code-promo {
|
||||||
|
padding: var(--espace-l) var(--espace-xl);
|
||||||
|
text-align: center;
|
||||||
|
border-bottom: 1px solid var(--couleur-noir);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__instructions-code-promo__instructions {
|
||||||
|
resize: vertical;
|
||||||
|
margin: auto;
|
||||||
|
margin-bottom: var(--espace-s);
|
||||||
|
padding: var(--espace-s);
|
||||||
|
background: initial;
|
||||||
|
border: 1px solid #0000;
|
||||||
|
width: 100%;
|
||||||
|
font-size: .8rem;
|
||||||
|
font-weight: 450;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__instructions-code-promo__code-promo {
|
||||||
|
flex-flow: row;
|
||||||
|
width: fit-content;
|
||||||
|
margin: auto;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__instructions-code-promo__code-promo input {
|
||||||
|
padding: var(--espace-xs);
|
||||||
|
background: var(--couleur-gris);
|
||||||
|
border: 1px solid var(--couleur-noir);
|
||||||
|
width: 30ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__instructions-code-promo__code-promo input::placeholder {
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__instructions-code-promo__code-promo button {
|
||||||
|
padding: var(--espace-xs) var(--espace-xl);
|
||||||
|
color: var(--couleur-blanc);
|
||||||
|
text-transform: lowercase;
|
||||||
|
background: var(--couleur-noir);
|
||||||
|
border: 1px solid var(--couleur-noir);
|
||||||
|
border-left: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__sous-totaux {
|
||||||
|
padding: var(--espace-l) 0;
|
||||||
|
text-align: center;
|
||||||
|
width: fit-content;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__sous-totaux p + p {
|
||||||
|
margin-top: var(--espace-l);
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__sous-totaux__ligne {
|
||||||
|
flex-flow: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-style: italic;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__sous-totaux__ligne strong {
|
||||||
|
text-transform: lowercase;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__sous-totaux__ligne.sous-total strong {
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__sous-totaux__conditions-livraison {
|
||||||
|
color: gray;
|
||||||
|
font-size: .8rem;
|
||||||
|
font-weight: 450;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__pied-de-page {
|
||||||
|
padding: var(--espace-l) 0;
|
||||||
|
color: var(--couleur-blanc);
|
||||||
|
text-align: center;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
background: var(--couleur-noir);
|
||||||
|
align-content: center;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panneau-panier .panneau__pied-de-page span {
|
||||||
|
margin-left: var(--espace-l);
|
||||||
|
font-style: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-panier {
|
||||||
|
--menu-section-hauteur: var(--menu-categories-produits-hauteur);
|
||||||
|
--menu-section-marges-bloc-debut: var(--en-tete-hauteur);
|
||||||
|
min-height: calc(100vh - var(--en-tete-hauteur) - 105px);
|
||||||
|
margin-top: var(--menu-section-marges-bloc-debut);
|
||||||
|
flex-flow: wrap;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-panier[data-contient-articles="false"] .panneau {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-panier[data-contient-articles="false"] .panier-vide {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-panier .panneau {
|
||||||
|
border-top: 1px solid var(--couleur-noir);
|
||||||
|
border-bottom: 1px solid var(--couleur-noir);
|
||||||
|
flex: 30rem;
|
||||||
|
min-width: 30rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-panier .panneau__en-tete {
|
||||||
|
top: var(--menu-section-marges-bloc-debut);
|
||||||
|
min-height: var(--menu-categories-produits-hauteur);
|
||||||
|
max-height: var(--menu-categories-produits-hauteur);
|
||||||
|
color: var(--couleur-gris);
|
||||||
|
text-align: center;
|
||||||
|
background: var(--couleur-noir);
|
||||||
|
align-content: center;
|
||||||
|
display: block;
|
||||||
|
position: sticky;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-panier .panneau__en-tete h2 {
|
||||||
|
color: var(--couleur-gris);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
background: var(--couleur-noir);
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 450;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-panier .panier-vide {
|
||||||
|
min-height: calc(100vh - var(--en-tete-hauteur) - 105px);
|
||||||
|
text-align: center;
|
||||||
|
flex-basis: 100%;
|
||||||
|
align-content: center;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-panier .panier-vide p {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-panier .panier-vide a {
|
||||||
|
margin-top: var(--espace-m);
|
||||||
|
font-size: initial;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=web/app/themes/haiku-atelier-2024/assets/css/pages/page-panier.min.css.map */
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,56 +1,56 @@
|
||||||
{
|
{
|
||||||
"_Either.DDEPhGsy.js": {
|
"_Either.wHNxn7Os.js": {
|
||||||
"file": "Either.DDEPhGsy.js",
|
"file": "Either.wHNxn7Os.js",
|
||||||
"name": "Either",
|
"name": "Either",
|
||||||
"integrity": "sha512-k/7Wk+b5oar670iV1x2NAJ/yh+VTLPUJYVhdjoBAuNyWdc8ZcRqV+iyEaYUZRq7WCxiga+Xkz63qaApLpZ4lFw=="
|
"integrity": "sha512-iA88qYfaqIo+2/H0VzUP5VPULY8gMF4bgybyguKQQj/k1/LKHmurwKDvKCIPz3/kdz+2jUjG9/vlqu9+i6/klg=="
|
||||||
},
|
},
|
||||||
"_chunk-7BKSRZNG.F4GWJRq9.js": {
|
"_chunk-7BKSRZNG.C39W3Wne.js": {
|
||||||
"file": "chunk-7BKSRZNG.F4GWJRq9.js",
|
"file": "chunk-7BKSRZNG.C39W3Wne.js",
|
||||||
"name": "chunk-7BKSRZNG",
|
"name": "chunk-7BKSRZNG",
|
||||||
"integrity": "sha512-CM4zAemmzkH8eePsFpJsdTc4IE2wJMlJwIfivLBSAbYuwQjWAmOH28ZFnpki3QBlU1XqR3G7q+ph5etbxY47XA=="
|
"integrity": "sha512-anrnk3Aeg5QzrGrQSN13d9vtJoAghYnQnliQ2g5EedXKkd7Soljn6qW7LPbuKU5EjwikIGr+seO7qfNLu1iY7w=="
|
||||||
},
|
},
|
||||||
"_exports.CqgMoAXr.js": {
|
"_exports.DNZBdkMD.js": {
|
||||||
"file": "exports.CqgMoAXr.js",
|
"file": "exports.DNZBdkMD.js",
|
||||||
"name": "exports",
|
"name": "exports",
|
||||||
"integrity": "sha512-XxyyAYpiSluIP0+t/brf2yffq17Zbk+/sbhzC2WQvQTWgajgirbQ2pkyk4i58Q8p+ciXXWe99KLdEkOUJji/uQ=="
|
"integrity": "sha512-aYGtBzQ/fess8aZnfmsI/TdNNom1Dd1BfM2g/AXaeZdTjhzD2Ul5kLl1RuXv1nM1/k2HWy0eFaasBtiz5l8YHA=="
|
||||||
},
|
},
|
||||||
"_index.DYThEupQ.js": {
|
"_index.DD7qm8S6.js": {
|
||||||
"file": "index.DYThEupQ.js",
|
"file": "index.DD7qm8S6.js",
|
||||||
"name": "index",
|
"name": "index",
|
||||||
"integrity": "sha512-YB/pxNHmpqtWHQuX88NHi57DdNSq6aOY0IwMn35fe40p8xcrJpNu/ZKNmeXF4A8IvQUuglOKSQBl713X757LXA=="
|
"integrity": "sha512-dZ1dcfuB5XOKbN4ien9D6aGQ6O9ghxM4BXEuBnrAX4/oG2pkzPt+/S1hXGkkJk7HNcq+w6Eul+vn19rj+sjA1w=="
|
||||||
},
|
},
|
||||||
"_index.Dxgx1GXj.js": {
|
"_index.y02cst4L.js": {
|
||||||
"file": "index.Dxgx1GXj.js",
|
"file": "index.y02cst4L.js",
|
||||||
"name": "index",
|
"name": "index",
|
||||||
"integrity": "sha512-GGfzSZw92exTZSoSvThNg+1I+xjW6xmPxRfVzkflEtiHUE2p7t4dviPe6gUT+QJr7VVWIxOcs1ZiL9/Jq7uf5g=="
|
"integrity": "sha512-o9wA9YQlHsY4C1xPeqh8EkKHXWmS+2vT32YYJ1FXthFt862OI7Qwr5Y0HGkf3C81sjgRcARaurFKSqeKNHVoFg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts": {
|
||||||
"file": "api2.js",
|
"file": "api2.js",
|
||||||
"name": "api",
|
"name": "api",
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"integrity": "sha512-fXZJ7+9tXq8x1Kxsj5QAtAkAT4lRi6XIAy7ljUgw43ohufl/v+L7cVazgnFj0HW4E8WssdBS06CsOT2wNDoWxQ=="
|
"integrity": "sha512-OGDTSU0OSXJUESGtD0sMHwLOq6+wq//123su7w7e2Z+ZCcF2qAorEThC2YYPOImLINcYsEZBZNPNgIAKDeIPsQ=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts": {
|
||||||
"file": "cart2.js",
|
"file": "cart2.js",
|
||||||
"name": "cart",
|
"name": "cart",
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"integrity": "sha512-roJIe6Iyb/xNOxK6106j4AaroobRK5AinfgpZbwJaGWgmU0pp0wHRGauEg1Jk4vp8OwVzUwcciYE0qxzKaWOcg=="
|
"integrity": "sha512-NOtuYRf+7+U2vbBC21gMrPFm7NXjW2YXVtCGLo9MsX9o1aEIanUZP5/MqH/Ln/+KbkXq9hQEpOkBJgWBnn4ZIw=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts": {
|
||||||
"file": "dom.js",
|
"file": "dom.js",
|
||||||
"name": "dom",
|
"name": "dom",
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"integrity": "sha512-VjPpL1wOUAMAz7urwl/GzLJzuadoG2FzM1W6YTdso4bRrCPlEUlpcuhKR69J9gzx0QODzq4ysfyg5Y++BiVkoA=="
|
"integrity": "sha512-L8mxbF9f2n5cYtdQQyo4B3gwIRnoPtiC2KFSWpKcot7YgSQW6JR96pSGhOmjHbr579//9UwtjoCi0ZCAZi3VwQ=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts": {
|
||||||
"file": "messages3.js",
|
"file": "messages3.js",
|
||||||
"name": "messages",
|
"name": "messages",
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"integrity": "sha512-QCu+ssDbDBnkSH60hxK6bA8Uc6GMPEZt1OTFNr9IdL1ZTUkj/5dIrvALlI/ZpAd63Rx4V6upFgkRpYizBYvEJg=="
|
"integrity": "sha512-M8me/iGRLfItVHaEf+BhA3xdEIxEwdyNuN+H87daJ1jl1oOENbROB7ub6RPP47NdFsQUChTRphEhQglT+qc6RA=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/gaffe.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/gaffe.ts": {
|
||||||
"file": "gaffe.js",
|
"file": "gaffe.js",
|
||||||
|
|
@ -58,11 +58,11 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/gaffe.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/gaffe.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_chunk-7BKSRZNG.F4GWJRq9.js",
|
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||||
"_exports.CqgMoAXr.js"
|
"_exports.DNZBdkMD.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-ohitJLXJZhKukclzCDCWNZx3di0Cyv/GN2yflb42AKk1F0aD3Cpr4JAOffrMVfepxl9EbQcZ7j/HXzVIo1JJkg=="
|
"integrity": "sha512-eVSR0QcVJwlsN8al1nIL4GG6j7ujSzhzx9xfx+ZxzfjLfQkVz4AFLWHDyJE2MMKCqQwu/NVMPRnuqFGTFSA0bw=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/api.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/api.ts": {
|
||||||
"file": "api.js",
|
"file": "api.js",
|
||||||
|
|
@ -71,9 +71,9 @@
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||||
"_Either.DDEPhGsy.js"
|
"_Either.wHNxn7Os.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-/CWvVmojNPw3K8A73UNdUgl9hlQoy31If2QGEV4LH1YcBMjK9sq+hLG0BwhvtZL7FRftscB9x+pMNkl0b0kOlw=="
|
"integrity": "sha512-EUghr3HdRUL5NtkX8tfwUX8JdvV3Gb2MsC974OXT9dxSnYT9xkNKzRu8bc8jiLlLQ6UqU/9npIEvxQOf4y+qEw=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts": {
|
||||||
"file": "dom2.js",
|
"file": "dom2.js",
|
||||||
|
|
@ -81,12 +81,12 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_chunk-7BKSRZNG.F4GWJRq9.js",
|
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||||
"_Either.DDEPhGsy.js",
|
"_Either.wHNxn7Os.js",
|
||||||
"_exports.CqgMoAXr.js"
|
"_exports.DNZBdkMD.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-eyiNifBgU6+/1dX8+HRIEQsDgrKecsGqnNVys+tRg+ySNZ2/JQ6ojhrBXpLrOMrgyfBRbVOcwyDNrCi8zmoKfg=="
|
"integrity": "sha512-eOG+mc2zoH380efQ6N4Cnh0nERv9qSd82mIK22aD2+ePkWGxBbckpBmU/4s2e6gwCIYMPdv6/rYLDanOh2uyGA=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts": {
|
||||||
"file": "erreurs.js",
|
"file": "erreurs.js",
|
||||||
|
|
@ -94,16 +94,16 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_exports.CqgMoAXr.js"
|
"_exports.DNZBdkMD.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-SOjfas9+qR/lxLAZnwQng9sIPF2fotjXZQcsWJjir0R+PbOBgwAJBDDvqg7u4taogh7sYqDNmaO6y7VJD5OWEg=="
|
"integrity": "sha512-tVMlAurSgVwpsKmwm4ec8QM+faI+bs+YFbP+g3qaIQozCOCuYOuwboygxSz1ajQDrI4V+ECFoqa77jOnQIbptQ=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/gardes.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/gardes.ts": {
|
||||||
"file": "gardes.js",
|
"file": "gardes.js",
|
||||||
"name": "gardes",
|
"name": "gardes",
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/gardes.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/gardes.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"integrity": "sha512-vqaGTRWcx2Y2S6rNQNWQAUaPwBGUWEGkauq3HpF2UFDLtWeYPq0fhSyD9B7iMx+YZwSsgjv4laCOu8ihsUVYzg=="
|
"integrity": "sha512-5Xn9Qd8ESFywu/sjlNFb9fHQ9UqbdxsmuQbukcxQNsRy1ct7fzexad9qz9BMIHHkqFNw0z/euYydcFEdXzXYnQ=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/gestion-panier.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/gestion-panier.ts": {
|
||||||
"file": "gestion-panier.js",
|
"file": "gestion-panier.js",
|
||||||
|
|
@ -112,9 +112,9 @@
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||||
"_Either.DDEPhGsy.js"
|
"_Either.wHNxn7Os.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-uzokkOlud1oP8RUZJukWpDgdnF9oc42Ml9WEmjSLn1Oh5V5Ivmqt0L87xaG7ollvmeZl2zh2vq8NAMVK76Gw6Q=="
|
"integrity": "sha512-ZCvgFy1JsChtCE1WKzJGZ0mtuV5wx6ZyyKrbgXebZjVBkphxMoRWh7cO36fFmbZQHBKE31xFqMaMfjbo4WUmJg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts": {
|
||||||
"file": "messages.js",
|
"file": "messages.js",
|
||||||
|
|
@ -122,14 +122,16 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.DYThEupQ.js",
|
"_index.DD7qm8S6.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
||||||
"_Either.DDEPhGsy.js",
|
"_Either.wHNxn7Os.js",
|
||||||
"_exports.CqgMoAXr.js",
|
"_exports.DNZBdkMD.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts"
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
||||||
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||||
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-EkBKXyL40Fqjvr2uiJZ2fM69xSS62wQl7PeiXNO0YYQfFS4M5RPNHbL3e9LiCDtiS603nEt0xmmdgM9puPm6LQ=="
|
"integrity": "sha512-O8W53Nt7AVJywhODKFp5YKrDFfYwYE0W71UMGRCDZoq4g6JQUhFyu5FwKjjE2RfNNH8LVVeCuoSPxjBBwgLrTg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/reseau.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/reseau.ts": {
|
||||||
"file": "reseau.js",
|
"file": "reseau.js",
|
||||||
|
|
@ -139,7 +141,7 @@
|
||||||
"imports": [
|
"imports": [
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts"
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-HuOriKv5d+WCfiqyqum3vpqL+XkipWqsc3GNfpkDOM3M0wLDO1Xte5bCnHi6+uz+kVmdJ35Uutwmq/XdNqvKJA=="
|
"integrity": "sha512-nMhRswO45OQHAsc0QtgVDlXpv5ytRhb4VjVl7K6mxz5cteVMMqmNu6Jx2jYXRFQxYKXhGxMWjLTLczPzhpDlJQ=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-add-item.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-add-item.ts": {
|
||||||
"file": "cart-add-item.js",
|
"file": "cart-add-item.js",
|
||||||
|
|
@ -147,9 +149,9 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-add-item.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-add-item.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.DYThEupQ.js"
|
"_index.DD7qm8S6.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-365FeQBpvYEubs1gJc79ZXpUC6IxhJlX+DJ6WqiRoPNyql5LerPTJDpysYTm6KBsOmdzelGu+Zg7SinXMocjJw=="
|
"integrity": "sha512-fQrjeEI68TDDvdoXWJjeCjm8uOTuxUFnD0R+kC4qwpz0f9+jSK61FnunzEmX+vCdeChtgxC6+YsQc44A0Jbrdg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-remove-item.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-remove-item.ts": {
|
||||||
"file": "cart-remove-item.js",
|
"file": "cart-remove-item.js",
|
||||||
|
|
@ -157,9 +159,9 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-remove-item.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-remove-item.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.DYThEupQ.js"
|
"_index.DD7qm8S6.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-4JJBzzYFadk5CHLyQhZorkeHBAsxIJ3YaZzy05DRgKAgydL0e2jVT88tDytYLlug2cD/mpm0uLAjFNC6sa+Pfg=="
|
"integrity": "sha512-XEl8qtAgWt8WmIpF+CzytbcnenDO6+odrS7pFqG2a7hQntcfYNCDe6kwDn4pJAigUMy9+vPXkJvfcvZZ3clcag=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-update-item.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-update-item.ts": {
|
||||||
"file": "cart-update-item.js",
|
"file": "cart-update-item.js",
|
||||||
|
|
@ -167,9 +169,9 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-update-item.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-update-item.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.DYThEupQ.js"
|
"_index.DD7qm8S6.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-Qoua2eltUFTq2zRWsJ3ZRVLgag445wi+zln0NBR8TUEDKc65i3V3UtqEDYdLIQrfbbX9I52hqARFMF+p5ZmcWA=="
|
"integrity": "sha512-zaAsrUzoUWFxRX8lzRWGeQ2WST58sfveci+yPSOJx0BFdhmBvyfR9ia2MnopxpS6mY6VBs7ONc4ZZJXdUfef8Q=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts": {
|
||||||
"file": "cart.js",
|
"file": "cart.js",
|
||||||
|
|
@ -177,10 +179,10 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.DYThEupQ.js",
|
"_index.DD7qm8S6.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-FbUsUIeh9rOMEOuoD3qN0pBJ4apA8fjdN1MMdB64zk/JHS4vAA05/wA6bz5KqtKnps+jjloJ4K4/JzthGbsSGQ=="
|
"integrity": "sha512-Plqlr1vvCpeqBp5n4nLaXI37IkKx3XoW0Pni1XGFYfSu7vbfAkeFMcOQbzETBGWsrEil7QF7kpK505UInNQ3Pg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts": {
|
||||||
"file": "erreurs2.js",
|
"file": "erreurs2.js",
|
||||||
|
|
@ -188,9 +190,9 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.DYThEupQ.js"
|
"_index.DD7qm8S6.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-y8NNRe15U9yhgtXjcaes5VIX6c1pEK+iy2xwr7dFN9THegA0KdMng7+yflWcpU3jp26pie/sACB8nUGnB+g1LA=="
|
"integrity": "sha512-1N2MKFm51ZSyhneIyzIQ/ZZAF2zxmR4unSJq7PB/y1Al4nPbs83ARz4j/dWeL1KfFrCLGQeg0cPwby/TIDv3xg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts": {
|
||||||
"file": "messages2.js",
|
"file": "messages2.js",
|
||||||
|
|
@ -198,10 +200,12 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.DYThEupQ.js",
|
"_index.DD7qm8S6.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts"
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
||||||
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||||
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-XV6A0HF58T6U5DT/i7pRM2UnieWXQfeEpGdTVVuYrqoFuk5gwuIpFcdSbQeP+3pZmAW1RmAtu8aPqFUn64U7Rw=="
|
"integrity": "sha512-3VF2Yi9bJU3Gm/NN3L+KkrsEP0fawRw+j1OmEC6/WTy39q6HRP12HEa7Z1F9ny0t12YIWOT/2vfnSXfBhmRvUw=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts": {
|
||||||
"file": "utils.js",
|
"file": "utils.js",
|
||||||
|
|
@ -210,12 +214,12 @@
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
|
||||||
"_chunk-7BKSRZNG.F4GWJRq9.js",
|
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||||
"_exports.CqgMoAXr.js",
|
"_exports.DNZBdkMD.js",
|
||||||
"_Either.DDEPhGsy.js"
|
"_Either.wHNxn7Os.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-7JdNqUHZ73wDUf4iPpqqv8sG0fLn3lfANO7U5vct4AC6Ywg5kYQwwozfWxbfqrwPswZdVbkDI4oimTH9A7CObg=="
|
"integrity": "sha512-i4uspvXHfW//gmEw3Z5PRVKHA8LpzBiaiK2djkgxH71LCo0YHlxROvKEjES66FzivjWCk3DOT9XX7HMgyrqctg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-panier.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-panier.ts": {
|
||||||
"file": "scripts-bouton-panier.js",
|
"file": "scripts-bouton-panier.js",
|
||||||
|
|
@ -223,19 +227,21 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-panier.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-panier.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_chunk-7BKSRZNG.F4GWJRq9.js",
|
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||||
"_exports.CqgMoAXr.js",
|
"_exports.DNZBdkMD.js",
|
||||||
"_Either.DDEPhGsy.js",
|
"_Either.wHNxn7Os.js",
|
||||||
"_index.DYThEupQ.js",
|
"_index.DD7qm8S6.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts"
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
||||||
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||||
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-LuFgM+BdYCb8YV6hv0fhV2aaihNjoUfqER3NeB3ZMKmAtNvlGB2pSvM2hm4FonQqWbMWUfD6bAUSIjjZuCwFRg=="
|
"integrity": "sha512-nPmgcq2Zg6mj3/8wEV7JYjpoGRyD0PDatWRghJaFhlYL3qaZB2T6YuRTyJFfnMxncTCrCveyvPNdW3m8pVKnSQ=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts": {
|
||||||
"file": "scripts-page-panier.js",
|
"file": "scripts-page-panier.js",
|
||||||
|
|
@ -243,9 +249,9 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.Dxgx1GXj.js",
|
"_index.y02cst4L.js",
|
||||||
"_chunk-7BKSRZNG.F4GWJRq9.js",
|
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||||
"_index.DYThEupQ.js",
|
"_index.DD7qm8S6.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
||||||
|
|
@ -259,12 +265,12 @@
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
||||||
"_Either.DDEPhGsy.js",
|
"_Either.wHNxn7Os.js",
|
||||||
"_exports.CqgMoAXr.js",
|
"_exports.DNZBdkMD.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-J8hoZecxicG126OsyOzrGPDEWEXDxxBjpFGMox6IkAoLYk1HViBN/K4ytL1qN4SKEIxCNsrrBuJpmJZWOXqZdg=="
|
"integrity": "sha512-2q6FNf/gPxKEeYnS/ETOUMUiFopYflti5OCPgsjba1riIg+PxS6rW99ja00nISXwsHdDuvLum4gYXkqd6yX3fg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-produit.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-produit.ts": {
|
||||||
"file": "scripts-page-produit.js",
|
"file": "scripts-page-produit.js",
|
||||||
|
|
@ -272,9 +278,9 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-produit.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-produit.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.Dxgx1GXj.js",
|
"_index.y02cst4L.js",
|
||||||
"_chunk-7BKSRZNG.F4GWJRq9.js",
|
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||||
"_index.DYThEupQ.js",
|
"_index.DD7qm8S6.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
||||||
|
|
@ -285,10 +291,10 @@
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
||||||
"_Either.DDEPhGsy.js",
|
"_Either.wHNxn7Os.js",
|
||||||
"_exports.CqgMoAXr.js",
|
"_exports.DNZBdkMD.js",
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-g5gLgWCP/xWo+sMHO9g/uc9IljaUZqkN2rvUakwBKPGUSBGK7Qj+BF3lpjvzXjMMei1iK5rhkK3OfbB97z0KWQ=="
|
"integrity": "sha512-bv6BRll5MJeydJ8deu0p1NjcwGZTRhDeKDgbZSnb3YLSk96UZ3uDHjPEb9CjTLRPywQWTnZoZ85U04QaUdji3g=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because one or more lines are too long
528
web/app/themes/haiku-atelier-2024/assets/js/Either.wHNxn7Os.js
Normal file
528
web/app/themes/haiku-atelier-2024/assets/js/Either.wHNxn7Os.js
Normal file
|
|
@ -0,0 +1,528 @@
|
||||||
|
const Maybe = {
|
||||||
|
of(value) {
|
||||||
|
return just(value);
|
||||||
|
},
|
||||||
|
empty() {
|
||||||
|
return nothing;
|
||||||
|
},
|
||||||
|
zero() {
|
||||||
|
return nothing;
|
||||||
|
},
|
||||||
|
fromNullable(value) {
|
||||||
|
return value == null ? nothing : just(value);
|
||||||
|
},
|
||||||
|
fromFalsy(value) {
|
||||||
|
return value ? just(value) : nothing;
|
||||||
|
},
|
||||||
|
fromPredicate(pred, value) {
|
||||||
|
switch (arguments.length) {
|
||||||
|
case 1:
|
||||||
|
return (value2) => Maybe.fromPredicate(pred, value2);
|
||||||
|
default:
|
||||||
|
return pred(value) ? just(value) : nothing;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mapMaybe(f, list) {
|
||||||
|
switch (arguments.length) {
|
||||||
|
case 1:
|
||||||
|
return (list2) => Maybe.mapMaybe(f, list2);
|
||||||
|
default:
|
||||||
|
return Maybe.catMaybes(list.map(f));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
catMaybes(list) {
|
||||||
|
let res = [];
|
||||||
|
for (const e of list) {
|
||||||
|
if (e.isJust()) {
|
||||||
|
res.push(e.extract());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
},
|
||||||
|
encase(thunk) {
|
||||||
|
try {
|
||||||
|
return just(thunk());
|
||||||
|
} catch {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isMaybe(x) {
|
||||||
|
return x instanceof Just || x instanceof Nothing;
|
||||||
|
},
|
||||||
|
sequence(maybes) {
|
||||||
|
let res = [];
|
||||||
|
for (const m of maybes) {
|
||||||
|
if (m.isJust()) {
|
||||||
|
res.push(m.extract());
|
||||||
|
} else {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return just(res);
|
||||||
|
},
|
||||||
|
"fantasy-land/of"(value) {
|
||||||
|
return this.of(value);
|
||||||
|
},
|
||||||
|
"fantasy-land/empty"() {
|
||||||
|
return this.empty();
|
||||||
|
},
|
||||||
|
"fantasy-land/zero"() {
|
||||||
|
return this.zero();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
class Just {
|
||||||
|
constructor(__value) {
|
||||||
|
this.__value = __value;
|
||||||
|
this["fantasy-land/equals"] = this.equals;
|
||||||
|
this["fantasy-land/map"] = this.map;
|
||||||
|
this["fantasy-land/ap"] = this.ap;
|
||||||
|
this["fantasy-land/alt"] = this.alt;
|
||||||
|
this["fantasy-land/chain"] = this.chain;
|
||||||
|
this["fantasy-land/reduce"] = this.reduce;
|
||||||
|
this["fantasy-land/extend"] = this.extend;
|
||||||
|
this["fantasy-land/filter"] = this.filter;
|
||||||
|
}
|
||||||
|
isJust() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
isNothing() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
inspect() {
|
||||||
|
return `Just(${this.__value})`;
|
||||||
|
}
|
||||||
|
toString() {
|
||||||
|
return this.inspect();
|
||||||
|
}
|
||||||
|
toJSON() {
|
||||||
|
const value = this.__value;
|
||||||
|
return value instanceof Date ? value.toJSON() : value;
|
||||||
|
}
|
||||||
|
equals(other) {
|
||||||
|
return this.extract() === other.extract();
|
||||||
|
}
|
||||||
|
map(f) {
|
||||||
|
return just(f(this.__value));
|
||||||
|
}
|
||||||
|
ap(maybeF) {
|
||||||
|
return maybeF.isJust() ? this.map(maybeF.extract()) : nothing;
|
||||||
|
}
|
||||||
|
alt(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
altLazy(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
chain(f) {
|
||||||
|
return f(this.__value);
|
||||||
|
}
|
||||||
|
chainNullable(f) {
|
||||||
|
return Maybe.fromNullable(f(this.__value));
|
||||||
|
}
|
||||||
|
join() {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
reduce(reducer, initialValue) {
|
||||||
|
return reducer(initialValue, this.__value);
|
||||||
|
}
|
||||||
|
extend(f) {
|
||||||
|
return just(f(this));
|
||||||
|
}
|
||||||
|
unsafeCoerce() {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
caseOf(patterns) {
|
||||||
|
return "_" in patterns ? patterns._() : patterns.Just(this.__value);
|
||||||
|
}
|
||||||
|
orDefault(_) {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
orDefaultLazy(_) {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
toList() {
|
||||||
|
return [this.__value];
|
||||||
|
}
|
||||||
|
mapOrDefault(f, _) {
|
||||||
|
return f(this.__value);
|
||||||
|
}
|
||||||
|
extract() {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
extractNullable() {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
toEither(_) {
|
||||||
|
return right(this.__value);
|
||||||
|
}
|
||||||
|
ifJust(effect) {
|
||||||
|
return effect(this.__value), this;
|
||||||
|
}
|
||||||
|
ifNothing(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
filter(pred) {
|
||||||
|
return pred(this.__value) ? just(this.__value) : nothing;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Just.prototype.constructor = Maybe;
|
||||||
|
class Nothing {
|
||||||
|
constructor() {
|
||||||
|
this["fantasy-land/equals"] = this.equals;
|
||||||
|
this["fantasy-land/map"] = this.map;
|
||||||
|
this["fantasy-land/ap"] = this.ap;
|
||||||
|
this["fantasy-land/alt"] = this.alt;
|
||||||
|
this["fantasy-land/chain"] = this.chain;
|
||||||
|
this["fantasy-land/reduce"] = this.reduce;
|
||||||
|
this["fantasy-land/extend"] = this.extend;
|
||||||
|
this["fantasy-land/filter"] = this.filter;
|
||||||
|
}
|
||||||
|
isJust() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
isNothing() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
inspect() {
|
||||||
|
return "Nothing";
|
||||||
|
}
|
||||||
|
toString() {
|
||||||
|
return this.inspect();
|
||||||
|
}
|
||||||
|
toJSON() {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
equals(other) {
|
||||||
|
return this.extract() === other.extract();
|
||||||
|
}
|
||||||
|
map(_) {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
ap(_) {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
alt(other) {
|
||||||
|
return other;
|
||||||
|
}
|
||||||
|
altLazy(other) {
|
||||||
|
return other();
|
||||||
|
}
|
||||||
|
chain(_) {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
chainNullable(_) {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
join() {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
reduce(_, initialValue) {
|
||||||
|
return initialValue;
|
||||||
|
}
|
||||||
|
extend(_) {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
unsafeCoerce() {
|
||||||
|
throw new Error("Maybe#unsafeCoerce was ran on a Nothing");
|
||||||
|
}
|
||||||
|
caseOf(patterns) {
|
||||||
|
return "_" in patterns ? patterns._() : patterns.Nothing();
|
||||||
|
}
|
||||||
|
orDefault(defaultValue) {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
orDefaultLazy(getDefaultValue) {
|
||||||
|
return getDefaultValue();
|
||||||
|
}
|
||||||
|
toList() {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
mapOrDefault(_, defaultValue) {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
extract() {
|
||||||
|
return void 0;
|
||||||
|
}
|
||||||
|
extractNullable() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
toEither(left$1) {
|
||||||
|
return left(left$1);
|
||||||
|
}
|
||||||
|
ifJust(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
ifNothing(effect) {
|
||||||
|
return effect(), this;
|
||||||
|
}
|
||||||
|
filter(_) {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Nothing.prototype.constructor = Maybe;
|
||||||
|
const just = (value) => new Just(value);
|
||||||
|
const nothing = new Nothing();
|
||||||
|
const Either = {
|
||||||
|
of(value) {
|
||||||
|
return right(value);
|
||||||
|
},
|
||||||
|
lefts(list) {
|
||||||
|
let result = [];
|
||||||
|
for (const x of list) {
|
||||||
|
if (x.isLeft()) {
|
||||||
|
result.push(x.extract());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
rights(list) {
|
||||||
|
let result = [];
|
||||||
|
for (const x of list) {
|
||||||
|
if (x.isRight()) {
|
||||||
|
result.push(x.extract());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
encase(throwsF) {
|
||||||
|
try {
|
||||||
|
return right(throwsF());
|
||||||
|
} catch (e) {
|
||||||
|
return left(e);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sequence(eithers) {
|
||||||
|
let res = [];
|
||||||
|
for (const e of eithers) {
|
||||||
|
if (e.isLeft()) {
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
res.push(e.extract());
|
||||||
|
}
|
||||||
|
return right(res);
|
||||||
|
},
|
||||||
|
isEither(x) {
|
||||||
|
return x instanceof Left || x instanceof Right;
|
||||||
|
},
|
||||||
|
"fantasy-land/of"(value) {
|
||||||
|
return Either.of(value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
class Right {
|
||||||
|
constructor(__value) {
|
||||||
|
this.__value = __value;
|
||||||
|
this._ = "R";
|
||||||
|
this["fantasy-land/bimap"] = this.bimap;
|
||||||
|
this["fantasy-land/map"] = this.map;
|
||||||
|
this["fantasy-land/ap"] = this.ap;
|
||||||
|
this["fantasy-land/equals"] = this.equals;
|
||||||
|
this["fantasy-land/chain"] = this.chain;
|
||||||
|
this["fantasy-land/alt"] = this.alt;
|
||||||
|
this["fantasy-land/reduce"] = this.reduce;
|
||||||
|
this["fantasy-land/extend"] = this.extend;
|
||||||
|
}
|
||||||
|
isLeft() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
isRight() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
toJSON() {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
inspect() {
|
||||||
|
return `Right(${this.__value})`;
|
||||||
|
}
|
||||||
|
toString() {
|
||||||
|
return this.inspect();
|
||||||
|
}
|
||||||
|
bimap(_, g) {
|
||||||
|
return right(g(this.__value));
|
||||||
|
}
|
||||||
|
map(f) {
|
||||||
|
return right(f(this.__value));
|
||||||
|
}
|
||||||
|
mapLeft(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
ap(other) {
|
||||||
|
return other.isRight() ? this.map(other.extract()) : other;
|
||||||
|
}
|
||||||
|
equals(other) {
|
||||||
|
return other.isRight() ? this.__value === other.extract() : false;
|
||||||
|
}
|
||||||
|
chain(f) {
|
||||||
|
return f(this.__value);
|
||||||
|
}
|
||||||
|
chainLeft(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
join() {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
alt(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
altLazy(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
reduce(reducer, initialValue) {
|
||||||
|
return reducer(initialValue, this.__value);
|
||||||
|
}
|
||||||
|
extend(f) {
|
||||||
|
return right(f(this));
|
||||||
|
}
|
||||||
|
unsafeCoerce() {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
caseOf(patterns) {
|
||||||
|
return "_" in patterns ? patterns._() : patterns.Right(this.__value);
|
||||||
|
}
|
||||||
|
leftOrDefault(defaultValue) {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
orDefault(_) {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
orDefaultLazy(_) {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
leftOrDefaultLazy(getDefaultValue) {
|
||||||
|
return getDefaultValue();
|
||||||
|
}
|
||||||
|
ifLeft(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
ifRight(effect) {
|
||||||
|
return effect(this.__value), this;
|
||||||
|
}
|
||||||
|
toMaybe() {
|
||||||
|
return just(this.__value);
|
||||||
|
}
|
||||||
|
leftToMaybe() {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
extract() {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
swap() {
|
||||||
|
return left(this.__value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Right.prototype.constructor = Either;
|
||||||
|
class Left {
|
||||||
|
constructor(__value) {
|
||||||
|
this.__value = __value;
|
||||||
|
this._ = "L";
|
||||||
|
this["fantasy-land/bimap"] = this.bimap;
|
||||||
|
this["fantasy-land/map"] = this.map;
|
||||||
|
this["fantasy-land/ap"] = this.ap;
|
||||||
|
this["fantasy-land/equals"] = this.equals;
|
||||||
|
this["fantasy-land/chain"] = this.chain;
|
||||||
|
this["fantasy-land/alt"] = this.alt;
|
||||||
|
this["fantasy-land/reduce"] = this.reduce;
|
||||||
|
this["fantasy-land/extend"] = this.extend;
|
||||||
|
}
|
||||||
|
isLeft() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
isRight() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
toJSON() {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
inspect() {
|
||||||
|
return `Left(${JSON.stringify(this.__value)})`;
|
||||||
|
}
|
||||||
|
toString() {
|
||||||
|
return this.inspect();
|
||||||
|
}
|
||||||
|
bimap(f, _) {
|
||||||
|
return left(f(this.__value));
|
||||||
|
}
|
||||||
|
map(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
mapLeft(f) {
|
||||||
|
return left(f(this.__value));
|
||||||
|
}
|
||||||
|
ap(other) {
|
||||||
|
return other.isLeft() ? other : this;
|
||||||
|
}
|
||||||
|
equals(other) {
|
||||||
|
return other.isLeft() ? other.extract() === this.__value : false;
|
||||||
|
}
|
||||||
|
chain(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
chainLeft(f) {
|
||||||
|
return f(this.__value);
|
||||||
|
}
|
||||||
|
join() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
alt(other) {
|
||||||
|
return other;
|
||||||
|
}
|
||||||
|
altLazy(other) {
|
||||||
|
return other();
|
||||||
|
}
|
||||||
|
reduce(_, initialValue) {
|
||||||
|
return initialValue;
|
||||||
|
}
|
||||||
|
extend(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
unsafeCoerce() {
|
||||||
|
if (this.__value instanceof Error) {
|
||||||
|
throw this.__value;
|
||||||
|
}
|
||||||
|
throw new Error("Either#unsafeCoerce was ran on a Left");
|
||||||
|
}
|
||||||
|
caseOf(patterns) {
|
||||||
|
return "_" in patterns ? patterns._() : patterns.Left(this.__value);
|
||||||
|
}
|
||||||
|
leftOrDefault(_) {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
orDefault(defaultValue) {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
orDefaultLazy(getDefaultValue) {
|
||||||
|
return getDefaultValue();
|
||||||
|
}
|
||||||
|
leftOrDefaultLazy(_) {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
ifLeft(effect) {
|
||||||
|
return effect(this.__value), this;
|
||||||
|
}
|
||||||
|
ifRight(_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
toMaybe() {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
leftToMaybe() {
|
||||||
|
return just(this.__value);
|
||||||
|
}
|
||||||
|
extract() {
|
||||||
|
return this.__value;
|
||||||
|
}
|
||||||
|
swap() {
|
||||||
|
return right(this.__value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Left.prototype.constructor = Either;
|
||||||
|
const left = (value) => new Left(value);
|
||||||
|
const right = (value) => new Right(value);
|
||||||
|
export {
|
||||||
|
Either as E,
|
||||||
|
Maybe as M,
|
||||||
|
just as j,
|
||||||
|
left as l,
|
||||||
|
nothing as n,
|
||||||
|
right as r
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=Either.wHNxn7Os.js.map
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,3 +1,307 @@
|
||||||
import{e as R}from"./api2.js";import{r as F}from"./Either.DDEPhGsy.js";const H="application/json",S="Content-Type",y=Symbol(),w=Symbol();function C(t={}){var e;return(e=Object.entries(t).find(([o])=>o.toLowerCase()===S.toLowerCase()))===null||e===void 0?void 0:e[1]}function P(t){return/^application\/.*json.*/.test(t)}const u=function(t,e,o=!1){return Object.entries(e).reduce((c,[i,l])=>{const f=t[i];return Array.isArray(f)&&Array.isArray(l)?c[i]=o?[...f,...l]:l:typeof f=="object"&&typeof l=="object"?c[i]=u(f,l,o):c[i]=l,c},{...t})},g={options:{},errorType:"text",polyfills:{},polyfill(t,e=!0,o=!1,...c){const i=this.polyfills[t]||(typeof self<"u"?self[t]:null)||(typeof global<"u"?global[t]:null);if(e&&!i)throw new Error(t+" is not defined");return o&&i?new i(...c):i}};function L(t,e=!1){g.options=e?t:u(g.options,t)}function N(t,e=!1){g.polyfills=e?t:u(g.polyfills,t)}function I(t){g.errorType=t}const J=t=>e=>t.reduceRight((o,c)=>c(o),e)||e;class x extends Error{}const U=t=>{const e=Object.create(null);t=t._addons.reduce((r,s)=>s.beforeRequest&&s.beforeRequest(r,t._options,e)||r,t);const{_url:o,_options:c,_config:i,_catchers:l,_resolvers:f,_middlewares:m,_addons:E}=t,d=new Map(l),D=u(i.options,c);let j=o;const v=J(m)((r,s)=>(j=r,i.polyfill("fetch")(r,s)))(o,D),b=new Error,A=v.catch(r=>{throw{[y]:r}}).then(r=>{var s;if(!r.ok){const n=new x;if(n.cause=b,n.stack=n.stack+`
|
import { e as ROUTE_API_PANIER } from "./api2.js";
|
||||||
CAUSE: `+b.stack,n.response=r,n.status=r.status,n.url=j,r.type==="opaque")throw n;const a=i.errorType==="json"||((s=r.headers.get("Content-Type"))===null||s===void 0?void 0:s.split(";")[0])==="application/json";return(i.errorType?a?r.text():r[i.errorType]():Promise.resolve(r.body)).then(h=>{throw n.message=typeof h=="string"?h:r.statusText,h&&(a&&typeof h=="string"?(n.text=h,n.json=JSON.parse(h)):n[i.errorType]=h),n})}return r}),O=r=>r.catch(s=>{const n=Object.prototype.hasOwnProperty.call(s,y),a=n?s[y]:s,T=a?.status&&d.get(a.status)||d.get(a?.name)||n&&d.has(y)&&d.get(y);if(T)return T(a,t);const h=d.get(w);if(h)return h(a,t);throw a}),_=r=>s=>O(r?A.then(n=>n&&n[r]()).then(n=>s?s(n):n):A.then(n=>s?s(n):n)),M={_wretchReq:t,_fetchReq:v,_sharedState:e,res:_(null),json:_("json"),blob:_("blob"),formData:_("formData"),arrayBuffer:_("arrayBuffer"),text:_("text"),error(r,s){return d.set(r,s),this},badRequest(r){return this.error(400,r)},unauthorized(r){return this.error(401,r)},forbidden(r){return this.error(403,r)},notFound(r){return this.error(404,r)},timeout(r){return this.error(408,r)},internalError(r){return this.error(500,r)},fetchError(r){return this.error(y,r)}},q=E.reduce((r,s)=>({...r,...typeof s.resolver=="function"?s.resolver(r):s.resolver}),M);return f.reduce((r,s)=>s(r,t),q)},k={_url:"",_options:{},_config:g,_catchers:new Map,_resolvers:[],_deferred:[],_middlewares:[],_addons:[],addon(t){return{...this,_addons:[...this._addons,t],...t.wretch}},errorType(t){return{...this,_config:{...this._config,errorType:t}}},polyfills(t,e=!1){return{...this,_config:{...this._config,polyfills:e?t:u(this._config.polyfills,t)}}},url(t,e=!1){if(e)return{...this,_url:t};const o=this._url.split("?");return{...this,_url:o.length>1?o[0]+t+"?"+o[1]:this._url+t}},options(t,e=!1){return{...this,_options:e?t:u(this._options,t)}},headers(t){const e=t?Array.isArray(t)?Object.fromEntries(t):"entries"in t?Object.fromEntries(t.entries()):t:{};return{...this,_options:u(this._options,{headers:e})}},accept(t){return this.headers({Accept:t})},content(t){return this.headers({[S]:t})},auth(t){return this.headers({Authorization:t})},catcher(t,e){const o=new Map(this._catchers);return o.set(t,e),{...this,_catchers:o}},catcherFallback(t){return this.catcher(w,t)},resolve(t,e=!1){return{...this,_resolvers:e?[t]:[...this._resolvers,t]}},defer(t,e=!1){return{...this,_deferred:e?[t]:[...this._deferred,t]}},middlewares(t,e=!1){return{...this,_middlewares:e?t:[...this._middlewares,...t]}},fetch(t=this._options.method,e="",o=null){let c=this.url(e).options({method:t});const i=C(c._options.headers),l=this._config.polyfill("FormData",!1),f=typeof o=="object"&&!(l&&o instanceof l)&&(!c._options.headers||!i||P(i));return c=o?f?c.json(o,i):c.body(o):c,U(c._deferred.reduce((m,E)=>E(m,m._url,m._options),c))},get(t=""){return this.fetch("GET",t)},delete(t=""){return this.fetch("DELETE",t)},put(t,e=""){return this.fetch("PUT",e,t)},post(t,e=""){return this.fetch("POST",e,t)},patch(t,e=""){return this.fetch("PATCH",e,t)},head(t=""){return this.fetch("HEAD",t)},opts(t=""){return this.fetch("OPTIONS",t)},body(t){return{...this,_options:{...this._options,body:t}}},json(t,e){const o=C(this._options.headers);return this.content(e||P(o)&&o||H).body(JSON.stringify(t))}};function p(t="",e={}){return{...k,_url:t,_options:e}}p.default=p;p.options=L;p.errorType=I;p.polyfills=N;p.WretchError=x;fetch(R,{credentials:"same-origin",headers:{"Content-Type":"application/json"},method:"GET",mode:"same-origin",signal:AbortSignal.timeout(5e3)}).then(F);p(R).content("application/json").options({credentials:"same-origin",mode:"same-origin",signal:AbortSignal.timeout(5e3)}).get().json().catch();
|
import { r as right } from "./Either.wHNxn7Os.js";
|
||||||
|
const JSON_MIME = "application/json";
|
||||||
|
const CONTENT_TYPE_HEADER = "Content-Type";
|
||||||
|
const FETCH_ERROR = Symbol();
|
||||||
|
const CATCHER_FALLBACK = Symbol();
|
||||||
|
function extractContentType(headers = {}) {
|
||||||
|
var _a;
|
||||||
|
return (_a = Object.entries(headers).find(([k]) => k.toLowerCase() === CONTENT_TYPE_HEADER.toLowerCase())) === null || _a === void 0 ? void 0 : _a[1];
|
||||||
|
}
|
||||||
|
function isLikelyJsonMime(value) {
|
||||||
|
return /^application\/.*json.*/.test(value);
|
||||||
|
}
|
||||||
|
const mix = function(one, two, mergeArrays = false) {
|
||||||
|
return Object.entries(two).reduce((acc, [key, newValue]) => {
|
||||||
|
const value = one[key];
|
||||||
|
if (Array.isArray(value) && Array.isArray(newValue)) {
|
||||||
|
acc[key] = mergeArrays ? [...value, ...newValue] : newValue;
|
||||||
|
} else if (typeof value === "object" && typeof newValue === "object") {
|
||||||
|
acc[key] = mix(value, newValue, mergeArrays);
|
||||||
|
} else {
|
||||||
|
acc[key] = newValue;
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
}, { ...one });
|
||||||
|
};
|
||||||
|
const config = {
|
||||||
|
// Default options
|
||||||
|
options: {},
|
||||||
|
// Error type
|
||||||
|
errorType: "text",
|
||||||
|
// Polyfills
|
||||||
|
polyfills: {
|
||||||
|
// fetch: null,
|
||||||
|
// FormData: null,
|
||||||
|
// URL: null,
|
||||||
|
// URLSearchParams: null,
|
||||||
|
// performance: null,
|
||||||
|
// PerformanceObserver: null,
|
||||||
|
// AbortController: null,
|
||||||
|
},
|
||||||
|
polyfill(p, doThrow = true, instance = false, ...args) {
|
||||||
|
const res = this.polyfills[p] || (typeof self !== "undefined" ? self[p] : null) || (typeof global !== "undefined" ? global[p] : null);
|
||||||
|
if (doThrow && !res)
|
||||||
|
throw new Error(p + " is not defined");
|
||||||
|
return instance && res ? new res(...args) : res;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function setOptions(options, replace = false) {
|
||||||
|
config.options = replace ? options : mix(config.options, options);
|
||||||
|
}
|
||||||
|
function setPolyfills(polyfills, replace = false) {
|
||||||
|
config.polyfills = replace ? polyfills : mix(config.polyfills, polyfills);
|
||||||
|
}
|
||||||
|
function setErrorType(errorType) {
|
||||||
|
config.errorType = errorType;
|
||||||
|
}
|
||||||
|
const middlewareHelper = (middlewares) => (fetchFunction) => {
|
||||||
|
return middlewares.reduceRight((acc, curr) => curr(acc), fetchFunction) || fetchFunction;
|
||||||
|
};
|
||||||
|
class WretchError extends Error {
|
||||||
|
}
|
||||||
|
const resolver = (wretch) => {
|
||||||
|
const sharedState = /* @__PURE__ */ Object.create(null);
|
||||||
|
wretch = wretch._addons.reduce((w, addon) => addon.beforeRequest && addon.beforeRequest(w, wretch._options, sharedState) || w, wretch);
|
||||||
|
const { _url: url, _options: opts, _config: config2, _catchers, _resolvers: resolvers, _middlewares: middlewares, _addons: addons } = wretch;
|
||||||
|
const catchers = new Map(_catchers);
|
||||||
|
const finalOptions = mix(config2.options, opts);
|
||||||
|
let finalUrl = url;
|
||||||
|
const _fetchReq = middlewareHelper(middlewares)((url2, options) => {
|
||||||
|
finalUrl = url2;
|
||||||
|
return config2.polyfill("fetch")(url2, options);
|
||||||
|
})(url, finalOptions);
|
||||||
|
const referenceError = new Error();
|
||||||
|
const throwingPromise = _fetchReq.catch((error) => {
|
||||||
|
throw { [FETCH_ERROR]: error };
|
||||||
|
}).then((response) => {
|
||||||
|
var _a;
|
||||||
|
if (!response.ok) {
|
||||||
|
const err = new WretchError();
|
||||||
|
err["cause"] = referenceError;
|
||||||
|
err.stack = err.stack + "\nCAUSE: " + referenceError.stack;
|
||||||
|
err.response = response;
|
||||||
|
err.status = response.status;
|
||||||
|
err.url = finalUrl;
|
||||||
|
if (response.type === "opaque") {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
const jsonErrorType = config2.errorType === "json" || ((_a = response.headers.get("Content-Type")) === null || _a === void 0 ? void 0 : _a.split(";")[0]) === "application/json";
|
||||||
|
const bodyPromise = !config2.errorType ? Promise.resolve(response.body) : jsonErrorType ? response.text() : response[config2.errorType]();
|
||||||
|
return bodyPromise.then((body) => {
|
||||||
|
err.message = typeof body === "string" ? body : response.statusText;
|
||||||
|
if (body) {
|
||||||
|
if (jsonErrorType && typeof body === "string") {
|
||||||
|
err.text = body;
|
||||||
|
err.json = JSON.parse(body);
|
||||||
|
} else {
|
||||||
|
err[config2.errorType] = body;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw err;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
});
|
||||||
|
const catchersWrapper = (promise) => {
|
||||||
|
return promise.catch((err) => {
|
||||||
|
const fetchErrorFlag = Object.prototype.hasOwnProperty.call(err, FETCH_ERROR);
|
||||||
|
const error = fetchErrorFlag ? err[FETCH_ERROR] : err;
|
||||||
|
const catcher = (error === null || error === void 0 ? void 0 : error.status) && catchers.get(error.status) || catchers.get(error === null || error === void 0 ? void 0 : error.name) || fetchErrorFlag && catchers.has(FETCH_ERROR) && catchers.get(FETCH_ERROR);
|
||||||
|
if (catcher)
|
||||||
|
return catcher(error, wretch);
|
||||||
|
const catcherFallback = catchers.get(CATCHER_FALLBACK);
|
||||||
|
if (catcherFallback)
|
||||||
|
return catcherFallback(error, wretch);
|
||||||
|
throw error;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const bodyParser = (funName) => (cb) => funName ? (
|
||||||
|
// If a callback is provided, then callback with the body result otherwise return the parsed body itself.
|
||||||
|
catchersWrapper(throwingPromise.then((_) => _ && _[funName]()).then((_) => cb ? cb(_) : _))
|
||||||
|
) : (
|
||||||
|
// No body parsing method - return the response
|
||||||
|
catchersWrapper(throwingPromise.then((_) => cb ? cb(_) : _))
|
||||||
|
);
|
||||||
|
const responseChain = {
|
||||||
|
_wretchReq: wretch,
|
||||||
|
_fetchReq,
|
||||||
|
_sharedState: sharedState,
|
||||||
|
res: bodyParser(null),
|
||||||
|
json: bodyParser("json"),
|
||||||
|
blob: bodyParser("blob"),
|
||||||
|
formData: bodyParser("formData"),
|
||||||
|
arrayBuffer: bodyParser("arrayBuffer"),
|
||||||
|
text: bodyParser("text"),
|
||||||
|
error(errorId, cb) {
|
||||||
|
catchers.set(errorId, cb);
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
badRequest(cb) {
|
||||||
|
return this.error(400, cb);
|
||||||
|
},
|
||||||
|
unauthorized(cb) {
|
||||||
|
return this.error(401, cb);
|
||||||
|
},
|
||||||
|
forbidden(cb) {
|
||||||
|
return this.error(403, cb);
|
||||||
|
},
|
||||||
|
notFound(cb) {
|
||||||
|
return this.error(404, cb);
|
||||||
|
},
|
||||||
|
timeout(cb) {
|
||||||
|
return this.error(408, cb);
|
||||||
|
},
|
||||||
|
internalError(cb) {
|
||||||
|
return this.error(500, cb);
|
||||||
|
},
|
||||||
|
fetchError(cb) {
|
||||||
|
return this.error(FETCH_ERROR, cb);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const enhancedResponseChain = addons.reduce((chain, addon) => ({
|
||||||
|
...chain,
|
||||||
|
...typeof addon.resolver === "function" ? addon.resolver(chain) : addon.resolver
|
||||||
|
}), responseChain);
|
||||||
|
return resolvers.reduce((chain, r) => r(chain, wretch), enhancedResponseChain);
|
||||||
|
};
|
||||||
|
const core = {
|
||||||
|
_url: "",
|
||||||
|
_options: {},
|
||||||
|
_config: config,
|
||||||
|
_catchers: /* @__PURE__ */ new Map(),
|
||||||
|
_resolvers: [],
|
||||||
|
_deferred: [],
|
||||||
|
_middlewares: [],
|
||||||
|
_addons: [],
|
||||||
|
addon(addon) {
|
||||||
|
return { ...this, _addons: [...this._addons, addon], ...addon.wretch };
|
||||||
|
},
|
||||||
|
errorType(errorType) {
|
||||||
|
return {
|
||||||
|
...this,
|
||||||
|
_config: {
|
||||||
|
...this._config,
|
||||||
|
errorType
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
polyfills(polyfills, replace = false) {
|
||||||
|
return {
|
||||||
|
...this,
|
||||||
|
_config: {
|
||||||
|
...this._config,
|
||||||
|
polyfills: replace ? polyfills : mix(this._config.polyfills, polyfills)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
url(_url, replace = false) {
|
||||||
|
if (replace)
|
||||||
|
return { ...this, _url };
|
||||||
|
const split = this._url.split("?");
|
||||||
|
return {
|
||||||
|
...this,
|
||||||
|
_url: split.length > 1 ? split[0] + _url + "?" + split[1] : this._url + _url
|
||||||
|
};
|
||||||
|
},
|
||||||
|
options(options, replace = false) {
|
||||||
|
return { ...this, _options: replace ? options : mix(this._options, options) };
|
||||||
|
},
|
||||||
|
headers(headerValues) {
|
||||||
|
const headers = !headerValues ? {} : Array.isArray(headerValues) ? Object.fromEntries(headerValues) : "entries" in headerValues ? Object.fromEntries(headerValues.entries()) : headerValues;
|
||||||
|
return { ...this, _options: mix(this._options, { headers }) };
|
||||||
|
},
|
||||||
|
accept(headerValue) {
|
||||||
|
return this.headers({ Accept: headerValue });
|
||||||
|
},
|
||||||
|
content(headerValue) {
|
||||||
|
return this.headers({ [CONTENT_TYPE_HEADER]: headerValue });
|
||||||
|
},
|
||||||
|
auth(headerValue) {
|
||||||
|
return this.headers({ Authorization: headerValue });
|
||||||
|
},
|
||||||
|
catcher(errorId, catcher) {
|
||||||
|
const newMap = new Map(this._catchers);
|
||||||
|
newMap.set(errorId, catcher);
|
||||||
|
return { ...this, _catchers: newMap };
|
||||||
|
},
|
||||||
|
catcherFallback(catcher) {
|
||||||
|
return this.catcher(CATCHER_FALLBACK, catcher);
|
||||||
|
},
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
resolve(resolver2, clear = false) {
|
||||||
|
return { ...this, _resolvers: clear ? [resolver2] : [...this._resolvers, resolver2] };
|
||||||
|
},
|
||||||
|
defer(callback, clear = false) {
|
||||||
|
return {
|
||||||
|
...this,
|
||||||
|
_deferred: clear ? [callback] : [...this._deferred, callback]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
middlewares(middlewares, clear = false) {
|
||||||
|
return {
|
||||||
|
...this,
|
||||||
|
_middlewares: clear ? middlewares : [...this._middlewares, ...middlewares]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
fetch(method = this._options.method, url = "", body = null) {
|
||||||
|
let base = this.url(url).options({ method });
|
||||||
|
const contentType = extractContentType(base._options.headers);
|
||||||
|
const formDataClass = this._config.polyfill("FormData", false);
|
||||||
|
const jsonify = typeof body === "object" && !(formDataClass && body instanceof formDataClass) && (!base._options.headers || !contentType || isLikelyJsonMime(contentType));
|
||||||
|
base = !body ? base : jsonify ? base.json(body, contentType) : base.body(body);
|
||||||
|
return resolver(base._deferred.reduce((acc, curr) => curr(acc, acc._url, acc._options), base));
|
||||||
|
},
|
||||||
|
get(url = "") {
|
||||||
|
return this.fetch("GET", url);
|
||||||
|
},
|
||||||
|
delete(url = "") {
|
||||||
|
return this.fetch("DELETE", url);
|
||||||
|
},
|
||||||
|
put(body, url = "") {
|
||||||
|
return this.fetch("PUT", url, body);
|
||||||
|
},
|
||||||
|
post(body, url = "") {
|
||||||
|
return this.fetch("POST", url, body);
|
||||||
|
},
|
||||||
|
patch(body, url = "") {
|
||||||
|
return this.fetch("PATCH", url, body);
|
||||||
|
},
|
||||||
|
head(url = "") {
|
||||||
|
return this.fetch("HEAD", url);
|
||||||
|
},
|
||||||
|
opts(url = "") {
|
||||||
|
return this.fetch("OPTIONS", url);
|
||||||
|
},
|
||||||
|
body(contents) {
|
||||||
|
return { ...this, _options: { ...this._options, body: contents } };
|
||||||
|
},
|
||||||
|
json(jsObject, contentType) {
|
||||||
|
const currentContentType = extractContentType(this._options.headers);
|
||||||
|
return this.content(contentType || isLikelyJsonMime(currentContentType) && currentContentType || JSON_MIME).body(JSON.stringify(jsObject));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function factory(_url = "", _options = {}) {
|
||||||
|
return { ...core, _url, _options };
|
||||||
|
}
|
||||||
|
factory["default"] = factory;
|
||||||
|
factory.options = setOptions;
|
||||||
|
factory.errorType = setErrorType;
|
||||||
|
factory.polyfills = setPolyfills;
|
||||||
|
factory.WretchError = WretchError;
|
||||||
|
fetch(
|
||||||
|
ROUTE_API_PANIER,
|
||||||
|
{
|
||||||
|
credentials: "same-origin",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
method: "GET",
|
||||||
|
mode: "same-origin",
|
||||||
|
signal: AbortSignal.timeout(5e3)
|
||||||
|
}
|
||||||
|
).then(right);
|
||||||
|
factory(ROUTE_API_PANIER).content("application/json").options({
|
||||||
|
credentials: "same-origin",
|
||||||
|
mode: "same-origin",
|
||||||
|
signal: AbortSignal.timeout(5e3)
|
||||||
|
}).get().json().catch();
|
||||||
//# sourceMappingURL=api.js.map
|
//# sourceMappingURL=api.js.map
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,18 @@
|
||||||
const E="wp-json",t=`/${E}/wc/store/cart`,T=`/${E}/wc/store/cart/add-item`,_=`/${E}/wc/store/cart/remove-item`,s=`/${E}/wc/store/cart/update-item`,I="Nonce",R="retry-after",c="x-sentry-rate-limits";export{c as E,_ as R,R as a,s as b,T as c,I as d,t as e};
|
const CHEMIN_API_REST = "wp-json";
|
||||||
|
const ROUTE_API_PANIER = `/${CHEMIN_API_REST}/wc/store/cart`;
|
||||||
|
const ROUTE_API_AJOUTE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/add-item`;
|
||||||
|
const ROUTE_API_RETIRE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/remove-item`;
|
||||||
|
const ROUTE_API_MAJ_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/update-item`;
|
||||||
|
const ENTETE_WC_NONCE = "Nonce";
|
||||||
|
const ENTETE_GLITCHTIP_RETRY_AFTER = "retry-after";
|
||||||
|
const ENTETE_GLITCHTIP_RATE_LIMITS = "x-sentry-rate-limits";
|
||||||
|
export {
|
||||||
|
ENTETE_GLITCHTIP_RATE_LIMITS as E,
|
||||||
|
ROUTE_API_RETIRE_ARTICLE_PANIER as R,
|
||||||
|
ENTETE_GLITCHTIP_RETRY_AFTER as a,
|
||||||
|
ROUTE_API_MAJ_ARTICLE_PANIER as b,
|
||||||
|
ROUTE_API_AJOUTE_ARTICLE_PANIER as c,
|
||||||
|
ENTETE_WC_NONCE as d,
|
||||||
|
ROUTE_API_PANIER as e
|
||||||
|
};
|
||||||
//# sourceMappingURL=api2.js.map
|
//# sourceMappingURL=api2.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"api2.js","sources":["../../src/scripts/constantes/api.ts"],"sourcesContent":["// Chemins et Routes pour l'API WordPress\nexport const CHEMIN_API_REST = \"wp-json\";\nexport const ROUTE_API_PANIER = `/${CHEMIN_API_REST}/wc/store/cart`;\nexport const ROUTE_API_AJOUTE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/add-item`;\nexport const ROUTE_API_RETIRE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/remove-item`;\nexport const ROUTE_API_MAJ_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/update-item`;\n\n// En-têtes\nexport const ENTETE_WC_NONCE = \"Nonce\";\nexport const ENTETE_GLITCHTIP_RETRY_AFTER = \"retry-after\";\nexport const ENTETE_GLITCHTIP_RATE_LIMITS = \"x-sentry-rate-limits\";\n"],"names":["CHEMIN_API_REST","ROUTE_API_PANIER","ROUTE_API_AJOUTE_ARTICLE_PANIER","ROUTE_API_RETIRE_ARTICLE_PANIER","ROUTE_API_MAJ_ARTICLE_PANIER","ENTETE_WC_NONCE","ENTETE_GLITCHTIP_RETRY_AFTER","ENTETE_GLITCHTIP_RATE_LIMITS"],"mappings":"AACO,MAAMA,EAAkB,UAClBC,EAAmB,IAAID,CAAe,iBACtCE,EAAkC,IAAIF,CAAe,0BACrDG,EAAkC,IAAIH,CAAe,6BACrDI,EAA+B,IAAIJ,CAAe,6BAGlDK,EAAkB,QAClBC,EAA+B,cAC/BC,EAA+B"}
|
{"version":3,"file":"api2.js","sources":["../../src/scripts/constantes/api.ts"],"sourcesContent":["// Chemins et Routes pour l'API WordPress\nexport const CHEMIN_API_REST = \"wp-json\";\nexport const ROUTE_API_PANIER = `/${CHEMIN_API_REST}/wc/store/cart`;\nexport const ROUTE_API_AJOUTE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/add-item`;\nexport const ROUTE_API_RETIRE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/remove-item`;\nexport const ROUTE_API_MAJ_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/update-item`;\n\n// En-têtes\nexport const ENTETE_WC_NONCE = \"Nonce\";\nexport const ENTETE_GLITCHTIP_RETRY_AFTER = \"retry-after\";\nexport const ENTETE_GLITCHTIP_RATE_LIMITS = \"x-sentry-rate-limits\";\n"],"names":[],"mappings":"AACO,MAAM,kBAAkB;AAClB,MAAA,mBAAmB,IAAI,eAAe;AACtC,MAAA,kCAAkC,IAAI,eAAe;AACrD,MAAA,kCAAkC,IAAI,eAAe;AACrD,MAAA,+BAA+B,IAAI,eAAe;AAGxD,MAAM,kBAAkB;AACxB,MAAM,+BAA+B;AACrC,MAAM,+BAA+B;"}
|
||||||
|
|
@ -1,2 +1,20 @@
|
||||||
import{o as s,a as t,p as o,n as a,b as m,s as r}from"./index.DYThEupQ.js";const n=s({attribute:r(),value:r()}),i=s({id:t(a()),quantity:t(a()),variation:t(m(n))}),p=e=>o(i,e);export{p};
|
import { o as object, a as optional, p as parse, n as number, b as array, s as string } from "./index.DD7qm8S6.js";
|
||||||
|
const WCStoreCartAddItemArgsItemsSchema = object({
|
||||||
|
/** Variation attribute name. */
|
||||||
|
attribute: string(),
|
||||||
|
/** Variation attribute value. */
|
||||||
|
value: string()
|
||||||
|
});
|
||||||
|
const WCStoreCartAddItemArgsSchema = object({
|
||||||
|
/** The basket item product or variation ID. */
|
||||||
|
id: optional(number()),
|
||||||
|
/** Quantity of this item to add to the basket. */
|
||||||
|
quantity: optional(number()),
|
||||||
|
/** Chosen attributes (for variations). */
|
||||||
|
variation: optional(array(WCStoreCartAddItemArgsItemsSchema))
|
||||||
|
});
|
||||||
|
const parseWCStoreCartAddItemArgs = (args) => parse(WCStoreCartAddItemArgsSchema, args);
|
||||||
|
export {
|
||||||
|
parseWCStoreCartAddItemArgs as p
|
||||||
|
};
|
||||||
//# sourceMappingURL=cart-add-item.js.map
|
//# sourceMappingURL=cart-add-item.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"cart-add-item.js","sources":["../../src/scripts/lib/schemas/cart-add-item.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport type { WCStoreCartAddItemArgs } from \"../types/api/cart-add-item\";\n\nexport const WCStoreCartAddItemArgsItemsSchema = v.object({\n /** Variation attribute name. */\n attribute: v.string(),\n /** Variation attribute value. */\n value: v.string(),\n});\n\nexport const WCStoreCartAddItemArgsSchema = v.object({\n /** The basket item product or variation ID. */\n id: v.optional(v.number()),\n /** Quantity of this item to add to the basket. */\n quantity: v.optional(v.number()),\n /** Chosen attributes (for variations). */\n variation: v.optional(v.array(WCStoreCartAddItemArgsItemsSchema)),\n});\n\nexport const parseWCStoreCartAddItemArgs: (args: unknown) => WCStoreCartAddItemArgs = (args) =>\n v.parse(WCStoreCartAddItemArgsSchema, args);\n"],"names":["WCStoreCartAddItemArgsItemsSchema","v.object","v.string","WCStoreCartAddItemArgsSchema","v.optional","v.number","v.array","parseWCStoreCartAddItemArgs","args","v.parse"],"mappings":"2EAIa,MAAAA,EAAoCC,EAAS,CAExD,UAAWC,EAAS,EAEpB,MAAOA,EAAS,CAClB,CAAC,EAEYC,EAA+BF,EAAS,CAEnD,GAAIG,EAAWC,GAAU,EAEzB,SAAUD,EAAWC,GAAU,EAE/B,UAAWD,EAAWE,EAAQN,CAAiC,CAAC,CAClE,CAAC,EAEYO,EAA0EC,GACrFC,EAAQN,EAA8BK,CAAI"}
|
{"version":3,"file":"cart-add-item.js","sources":["../../src/scripts/lib/schemas/cart-add-item.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport type { WCStoreCartAddItemArgs } from \"../types/api/cart-add-item\";\n\nexport const WCStoreCartAddItemArgsItemsSchema = v.object({\n /** Variation attribute name. */\n attribute: v.string(),\n /** Variation attribute value. */\n value: v.string(),\n});\n\nexport const WCStoreCartAddItemArgsSchema = v.object({\n /** The basket item product or variation ID. */\n id: v.optional(v.number()),\n /** Quantity of this item to add to the basket. */\n quantity: v.optional(v.number()),\n /** Chosen attributes (for variations). */\n variation: v.optional(v.array(WCStoreCartAddItemArgsItemsSchema)),\n});\n\nexport const parseWCStoreCartAddItemArgs: (args: unknown) => WCStoreCartAddItemArgs = (args) =>\n v.parse(WCStoreCartAddItemArgsSchema, args);\n"],"names":["v.object","v.string","v.optional","v.number","v.array","v.parse"],"mappings":";AAIa,MAAA,oCAAoCA,OAAS;AAAA;AAAA,EAExD,WAAWC,OAAS;AAAA;AAAA,EAEpB,OAAOA,OAAS;AAClB,CAAC;AAEY,MAAA,+BAA+BD,OAAS;AAAA;AAAA,EAEnD,IAAIE,SAAWC,QAAU;AAAA;AAAA,EAEzB,UAAUD,SAAWC,QAAU;AAAA;AAAA,EAE/B,WAAWD,SAAWE,MAAQ,iCAAiC,CAAC;AAClE,CAAC;AAEM,MAAM,8BAAyE,CAAC,SACrFC,MAAQ,8BAA8B,IAAI;"}
|
||||||
|
|
@ -1,2 +1,9 @@
|
||||||
import{o as e,s as o}from"./index.DYThEupQ.js";const r=e({key:o()});export{r as W};
|
import { o as object, s as string } from "./index.DD7qm8S6.js";
|
||||||
|
const WCStoreCartRemoveItemArgsSchema = object({
|
||||||
|
/** Unique identifier (key) for the basket item. */
|
||||||
|
key: string()
|
||||||
|
});
|
||||||
|
export {
|
||||||
|
WCStoreCartRemoveItemArgsSchema as W
|
||||||
|
};
|
||||||
//# sourceMappingURL=cart-remove-item.js.map
|
//# sourceMappingURL=cart-remove-item.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"cart-remove-item.js","sources":["../../src/scripts/lib/schemas/cart-remove-item.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport type { WCStoreCartRemoveItemArgs } from \"../types/api/cart-remove-item\";\n\nexport const WCStoreCartRemoveItemArgsSchema = v.object({\n /** Unique identifier (key) for the basket item. */\n key: v.string(),\n});\n\nexport const parseWCStoreCartRemoveItemArgs = (args: WCStoreCartRemoveItemArgs): WCStoreCartRemoveItemArgs =>\n v.parse(WCStoreCartRemoveItemArgsSchema, args);\n"],"names":["WCStoreCartRemoveItemArgsSchema","v.object","v.string"],"mappings":"+CAIa,MAAAA,EAAkCC,EAAS,CAEtD,IAAKC,EAAS,CAChB,CAAC"}
|
{"version":3,"file":"cart-remove-item.js","sources":["../../src/scripts/lib/schemas/cart-remove-item.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport type { WCStoreCartRemoveItemArgs } from \"../types/api/cart-remove-item\";\n\nexport const WCStoreCartRemoveItemArgsSchema = v.object({\n /** Unique identifier (key) for the basket item. */\n key: v.string(),\n});\n\nexport const parseWCStoreCartRemoveItemArgs = (args: WCStoreCartRemoveItemArgs): WCStoreCartRemoveItemArgs =>\n v.parse(WCStoreCartRemoveItemArgsSchema, args);\n"],"names":["v.object","v.string"],"mappings":";AAIa,MAAA,kCAAkCA,OAAS;AAAA;AAAA,EAEtD,KAAKC,OAAS;AAChB,CAAC;"}
|
||||||
|
|
@ -1,2 +1,11 @@
|
||||||
import{o as a,s as t,c as e,m as s,n as r}from"./index.DYThEupQ.js";const o=a({key:t(),quantity:e(r(),s(1))});export{o as W};
|
import { o as object, s as string, c as pipe, m as minValue, n as number } from "./index.DD7qm8S6.js";
|
||||||
|
const WCStoreCartUpdateItemArgsSchema = object({
|
||||||
|
/** Unique identifier (key) for the basket item to update. */
|
||||||
|
key: string(),
|
||||||
|
/** New quantity of the item in the basket. */
|
||||||
|
quantity: pipe(number(), minValue(1))
|
||||||
|
});
|
||||||
|
export {
|
||||||
|
WCStoreCartUpdateItemArgsSchema as W
|
||||||
|
};
|
||||||
//# sourceMappingURL=cart-update-item.js.map
|
//# sourceMappingURL=cart-update-item.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"cart-update-item.js","sources":["../../src/scripts/lib/schemas/cart-update-item.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nexport const WCStoreCartUpdateItemArgsSchema = v.object({\n /** Unique identifier (key) for the basket item to update. */\n key: v.string(),\n /** New quantity of the item in the basket. */\n quantity: v.pipe(v.number(), v.minValue(1)),\n});\n"],"names":["WCStoreCartUpdateItemArgsSchema","v.object","v.string","v.pipe","v.number","v.minValue"],"mappings":"oEAEa,MAAAA,EAAkCC,EAAS,CAEtD,IAAKC,EAAS,EAEd,SAAUC,EAAOC,EAAY,EAAAC,EAAW,CAAC,CAAC,CAC5C,CAAC"}
|
{"version":3,"file":"cart-update-item.js","sources":["../../src/scripts/lib/schemas/cart-update-item.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nexport const WCStoreCartUpdateItemArgsSchema = v.object({\n /** Unique identifier (key) for the basket item to update. */\n key: v.string(),\n /** New quantity of the item in the basket. */\n quantity: v.pipe(v.number(), v.minValue(1)),\n});\n"],"names":["v.object","v.string","v.pipe","v.number","v.minValue"],"mappings":";AAEa,MAAA,kCAAkCA,OAAS;AAAA;AAAA,EAEtD,KAAKC,OAAS;AAAA;AAAA,EAEd,UAAUC,KAAOC,OAAY,GAAAC,SAAW,CAAC,CAAC;AAC5C,CAAC;"}
|
||||||
|
|
@ -1,2 +1,62 @@
|
||||||
import{o as n,d as i,e as r,s as e,u as s,n as t,b as a,f as _,c as o,g as m,h as l,i as p}from"./index.DYThEupQ.js";import{C as d}from"./cart2.js";const c=n({backorders_allowed:i(),catalog_visibility:r(d),description:e(),extensions:s(),id:t(),images:a(s()),item_data:a(s()),key:e(),low_stock_remaining:_([m()]),name:e(),permalink:o(e(),l()),prices:s(),quantity:t(),quantity_limits:s(),short_description:e(),show_backorder_badge:i(),sku:e(),sold_individually:i(),totals:s(),type:e(),variation:a(s())}),h=n({billing_address:s(),coupons:s(),cross_sells:s(),errors:s(),extensions:s(),fees:s(),has_calculated_shipping:s(),items:a(c),items_count:o(t(),p()),items_weight:s(),needs_payment:s(),needs_shipping:s(),payment_methods:s(),payment_requirements:s(),shipping_address:s(),shipping_rates:s(),totals:s()});export{h as W};
|
import { o as object, d as boolean, e as enum_, s as string, u as unknown, n as number, b as array, f as union, c as pipe, g as null_, h as url, j as integer } from "./index.DD7qm8S6.js";
|
||||||
|
import { C as CATALOG_VISIBILITIES } from "./cart2.js";
|
||||||
|
const WCStoreCartItemTotalsSchema = object({
|
||||||
|
"currency_code": string(),
|
||||||
|
"currency_decimal_separator": string(),
|
||||||
|
"currency_minor_unit": number(),
|
||||||
|
"currency_prefix": string(),
|
||||||
|
"currency_suffix": string(),
|
||||||
|
"currency_symbol": string(),
|
||||||
|
"currency_thousand_separator": string(),
|
||||||
|
"line_subtotal": string(),
|
||||||
|
"line_subtotal_tax": string(),
|
||||||
|
"line_total": string(),
|
||||||
|
"line_total_tax": string()
|
||||||
|
});
|
||||||
|
const WCStoreCartItemSchema = object({
|
||||||
|
"backorders_allowed": boolean(),
|
||||||
|
"catalog_visibility": enum_(CATALOG_VISIBILITIES),
|
||||||
|
"description": string(),
|
||||||
|
"extensions": unknown(),
|
||||||
|
"id": number(),
|
||||||
|
"images": array(unknown()),
|
||||||
|
"item_data": array(unknown()),
|
||||||
|
"key": string(),
|
||||||
|
"low_stock_remaining": union([null_()]),
|
||||||
|
"name": string(),
|
||||||
|
"permalink": pipe(string(), url()),
|
||||||
|
"prices": unknown(),
|
||||||
|
"quantity": number(),
|
||||||
|
"quantity_limits": unknown(),
|
||||||
|
"short_description": string(),
|
||||||
|
"show_backorder_badge": boolean(),
|
||||||
|
"sku": string(),
|
||||||
|
"sold_individually": boolean(),
|
||||||
|
"totals": WCStoreCartItemTotalsSchema,
|
||||||
|
"type": string(),
|
||||||
|
"variation": array(unknown())
|
||||||
|
});
|
||||||
|
const WCStoreCartSchema = object({
|
||||||
|
billing_address: unknown(),
|
||||||
|
coupons: unknown(),
|
||||||
|
cross_sells: unknown(),
|
||||||
|
errors: unknown(),
|
||||||
|
extensions: unknown(),
|
||||||
|
fees: unknown(),
|
||||||
|
has_calculated_shipping: unknown(),
|
||||||
|
items: array(WCStoreCartItemSchema),
|
||||||
|
items_count: pipe(number(), integer()),
|
||||||
|
items_weight: unknown(),
|
||||||
|
needs_payment: unknown(),
|
||||||
|
needs_shipping: unknown(),
|
||||||
|
payment_methods: unknown(),
|
||||||
|
payment_requirements: unknown(),
|
||||||
|
shipping_address: unknown(),
|
||||||
|
shipping_rates: unknown(),
|
||||||
|
totals: unknown()
|
||||||
|
});
|
||||||
|
export {
|
||||||
|
WCStoreCartSchema as W,
|
||||||
|
WCStoreCartItemSchema as a
|
||||||
|
};
|
||||||
//# sourceMappingURL=cart.js.map
|
//# sourceMappingURL=cart.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"cart.js","sources":["../../src/scripts/lib/schemas/cart.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport { CATALOG_VISIBILITIES } from \"../../constantes/cart.ts\";\n\nexport const WCStoreCartItemSchema = v.object({\n \"backorders_allowed\": v.boolean(),\n \"catalog_visibility\": v.enum(CATALOG_VISIBILITIES),\n \"description\": v.string(),\n \"extensions\": v.unknown(),\n \"id\": v.number(),\n \"images\": v.array(v.unknown()),\n \"item_data\": v.array(v.unknown()),\n \"key\": v.string(),\n \"low_stock_remaining\": v.union([v.null()]),\n \"name\": v.string(),\n \"permalink\": v.pipe(v.string(), v.url()),\n \"prices\": v.unknown(),\n \"quantity\": v.number(),\n \"quantity_limits\": v.unknown(),\n \"short_description\": v.string(),\n \"show_backorder_badge\": v.boolean(),\n \"sku\": v.string(),\n \"sold_individually\": v.boolean(),\n \"totals\": v.unknown(),\n \"type\": v.string(),\n \"variation\": v.array(v.unknown()),\n});\n\nexport const WCStoreCartSchema = v.object({\n billing_address: v.unknown(),\n coupons: v.unknown(),\n cross_sells: v.unknown(),\n errors: v.unknown(),\n extensions: v.unknown(),\n fees: v.unknown(),\n has_calculated_shipping: v.unknown(),\n items: v.array(WCStoreCartItemSchema),\n items_count: v.pipe(v.number(), v.integer()),\n items_weight: v.unknown(),\n needs_payment: v.unknown(),\n needs_shipping: v.unknown(),\n payment_methods: v.unknown(),\n payment_requirements: v.unknown(),\n shipping_address: v.unknown(),\n shipping_rates: v.unknown(),\n totals: v.unknown(),\n});\n"],"names":["WCStoreCartItemSchema","v.object","v.boolean","v.enum","CATALOG_VISIBILITIES","v.string","v.unknown","v.number","v.array","v.union","v.null","v.pipe","v.url","WCStoreCartSchema","v.integer"],"mappings":"oJAIa,MAAAA,EAAwBC,EAAS,CAC5C,mBAAsBC,EAAU,EAChC,mBAAsBC,EAAOC,CAAoB,EACjD,YAAeC,EAAS,EACxB,WAAcC,EAAU,EACxB,GAAMC,EAAS,EACf,OAAUC,EAAQF,GAAW,EAC7B,UAAaE,EAAQF,GAAW,EAChC,IAAOD,EAAS,EAChB,oBAAuBI,EAAQ,CAACC,EAAE,CAAM,CAAC,EACzC,KAAQL,EAAS,EACjB,UAAaM,EAAON,EAAY,EAAAO,GAAO,EACvC,OAAUN,EAAU,EACpB,SAAYC,EAAS,EACrB,gBAAmBD,EAAU,EAC7B,kBAAqBD,EAAS,EAC9B,qBAAwBH,EAAU,EAClC,IAAOG,EAAS,EAChB,kBAAqBH,EAAU,EAC/B,OAAUI,EAAU,EACpB,KAAQD,EAAS,EACjB,UAAaG,EAAQF,GAAW,CAClC,CAAC,EAEYO,EAAoBZ,EAAS,CACxC,gBAAiBK,EAAU,EAC3B,QAASA,EAAU,EACnB,YAAaA,EAAU,EACvB,OAAQA,EAAU,EAClB,WAAYA,EAAU,EACtB,KAAMA,EAAU,EAChB,wBAAyBA,EAAU,EACnC,MAAOE,EAAQR,CAAqB,EACpC,YAAaW,EAAOJ,EAAY,EAAAO,GAAW,EAC3C,aAAcR,EAAU,EACxB,cAAeA,EAAU,EACzB,eAAgBA,EAAU,EAC1B,gBAAiBA,EAAU,EAC3B,qBAAsBA,EAAU,EAChC,iBAAkBA,EAAU,EAC5B,eAAgBA,EAAU,EAC1B,OAAQA,EAAU,CACpB,CAAC"}
|
{"version":3,"file":"cart.js","sources":["../../src/scripts/lib/schemas/cart.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport { CATALOG_VISIBILITIES } from \"../../constantes/cart.ts\";\n\nexport const WCStoreCartItemTotalsSchema = v.object({\n \"currency_code\": v.string(),\n \"currency_decimal_separator\": v.string(),\n \"currency_minor_unit\": v.number(),\n \"currency_prefix\": v.string(),\n \"currency_suffix\": v.string(),\n \"currency_symbol\": v.string(),\n \"currency_thousand_separator\": v.string(),\n \"line_subtotal\": v.string(),\n \"line_subtotal_tax\": v.string(),\n \"line_total\": v.string(),\n \"line_total_tax\": v.string(),\n});\n\nexport const WCStoreCartItemSchema = v.object({\n \"backorders_allowed\": v.boolean(),\n \"catalog_visibility\": v.enum(CATALOG_VISIBILITIES),\n \"description\": v.string(),\n \"extensions\": v.unknown(),\n \"id\": v.number(),\n \"images\": v.array(v.unknown()),\n \"item_data\": v.array(v.unknown()),\n \"key\": v.string(),\n \"low_stock_remaining\": v.union([v.null()]),\n \"name\": v.string(),\n \"permalink\": v.pipe(v.string(), v.url()),\n \"prices\": v.unknown(),\n \"quantity\": v.number(),\n \"quantity_limits\": v.unknown(),\n \"short_description\": v.string(),\n \"show_backorder_badge\": v.boolean(),\n \"sku\": v.string(),\n \"sold_individually\": v.boolean(),\n \"totals\": WCStoreCartItemTotalsSchema,\n \"type\": v.string(),\n \"variation\": v.array(v.unknown()),\n});\n\nexport const WCStoreCartSchema = v.object({\n billing_address: v.unknown(),\n coupons: v.unknown(),\n cross_sells: v.unknown(),\n errors: v.unknown(),\n extensions: v.unknown(),\n fees: v.unknown(),\n has_calculated_shipping: v.unknown(),\n items: v.array(WCStoreCartItemSchema),\n items_count: v.pipe(v.number(), v.integer()),\n items_weight: v.unknown(),\n needs_payment: v.unknown(),\n needs_shipping: v.unknown(),\n payment_methods: v.unknown(),\n payment_requirements: v.unknown(),\n shipping_address: v.unknown(),\n shipping_rates: v.unknown(),\n totals: v.unknown(),\n});\n"],"names":["v.object","v.string","v.number","v.boolean","v.enum","v.unknown","v.array","v.union","v.null","v.pipe","v.url","v.integer"],"mappings":";;AAIa,MAAA,8BAA8BA,OAAS;AAAA,EAClD,iBAAiBC,OAAS;AAAA,EAC1B,8BAA8BA,OAAS;AAAA,EACvC,uBAAuBC,OAAS;AAAA,EAChC,mBAAmBD,OAAS;AAAA,EAC5B,mBAAmBA,OAAS;AAAA,EAC5B,mBAAmBA,OAAS;AAAA,EAC5B,+BAA+BA,OAAS;AAAA,EACxC,iBAAiBA,OAAS;AAAA,EAC1B,qBAAqBA,OAAS;AAAA,EAC9B,cAAcA,OAAS;AAAA,EACvB,kBAAkBA,OAAS;AAC7B,CAAC;AAEY,MAAA,wBAAwBD,OAAS;AAAA,EAC5C,sBAAsBG,QAAU;AAAA,EAChC,sBAAsBC,MAAO,oBAAoB;AAAA,EACjD,eAAeH,OAAS;AAAA,EACxB,cAAcI,QAAU;AAAA,EACxB,MAAMH,OAAS;AAAA,EACf,UAAUI,MAAQD,SAAW;AAAA,EAC7B,aAAaC,MAAQD,SAAW;AAAA,EAChC,OAAOJ,OAAS;AAAA,EAChB,uBAAuBM,MAAQ,CAACC,MAAE,CAAM,CAAC;AAAA,EACzC,QAAQP,OAAS;AAAA,EACjB,aAAaQ,KAAOR,OAAY,GAAAS,KAAO;AAAA,EACvC,UAAUL,QAAU;AAAA,EACpB,YAAYH,OAAS;AAAA,EACrB,mBAAmBG,QAAU;AAAA,EAC7B,qBAAqBJ,OAAS;AAAA,EAC9B,wBAAwBE,QAAU;AAAA,EAClC,OAAOF,OAAS;AAAA,EAChB,qBAAqBE,QAAU;AAAA,EAC/B,UAAU;AAAA,EACV,QAAQF,OAAS;AAAA,EACjB,aAAaK,MAAQD,SAAW;AAClC,CAAC;AAEY,MAAA,oBAAoBL,OAAS;AAAA,EACxC,iBAAiBK,QAAU;AAAA,EAC3B,SAASA,QAAU;AAAA,EACnB,aAAaA,QAAU;AAAA,EACvB,QAAQA,QAAU;AAAA,EAClB,YAAYA,QAAU;AAAA,EACtB,MAAMA,QAAU;AAAA,EAChB,yBAAyBA,QAAU;AAAA,EACnC,OAAOC,MAAQ,qBAAqB;AAAA,EACpC,aAAaG,KAAOP,OAAY,GAAAS,SAAW;AAAA,EAC3C,cAAcN,QAAU;AAAA,EACxB,eAAeA,QAAU;AAAA,EACzB,gBAAgBA,QAAU;AAAA,EAC1B,iBAAiBA,QAAU;AAAA,EAC3B,sBAAsBA,QAAU;AAAA,EAChC,kBAAkBA,QAAU;AAAA,EAC5B,gBAAgBA,QAAU;AAAA,EAC1B,QAAQA,QAAU;AACpB,CAAC;"}
|
||||||
|
|
@ -1,2 +1,8 @@
|
||||||
const I={INVISIBLE:"invisible",VISIBLE:"visible"};export{I as C};
|
const CATALOG_VISIBILITIES = {
|
||||||
|
INVISIBLE: "invisible",
|
||||||
|
VISIBLE: "visible"
|
||||||
|
};
|
||||||
|
export {
|
||||||
|
CATALOG_VISIBILITIES as C
|
||||||
|
};
|
||||||
//# sourceMappingURL=cart2.js.map
|
//# sourceMappingURL=cart2.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"cart2.js","sources":["../../src/scripts/constantes/cart.ts"],"sourcesContent":["export const CATALOG_VISIBILITIES = {\n INVISIBLE: \"invisible\",\n VISIBLE: \"visible\",\n} as const;\n"],"names":["CATALOG_VISIBILITIES"],"mappings":"AAAO,MAAMA,EAAuB,CAClC,UAAW,YACX,QAAS,SACX"}
|
{"version":3,"file":"cart2.js","sources":["../../src/scripts/constantes/cart.ts"],"sourcesContent":["export const CATALOG_VISIBILITIES = {\n INVISIBLE: \"invisible\",\n VISIBLE: \"visible\",\n} as const;\n"],"names":[],"mappings":"AAAO,MAAM,uBAAuB;AAAA,EAClC,WAAW;AAAA,EACX,SAAS;AACX;"}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
var s = { done: false, hasNext: false };
|
||||||
|
function x(t, ...o) {
|
||||||
|
let n = t, u = o.map((e) => "lazy" in e ? f(e) : void 0), p = 0;
|
||||||
|
for (; p < o.length; ) {
|
||||||
|
if (u[p] === void 0 || !B(n)) {
|
||||||
|
let i = o[p];
|
||||||
|
n = i(n), p += 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
let r = [];
|
||||||
|
for (let i = p; i < o.length; i++) {
|
||||||
|
let l = u[i];
|
||||||
|
if (l === void 0 || (r.push(l), l.isSingle)) break;
|
||||||
|
}
|
||||||
|
let a = [];
|
||||||
|
for (let i of n) if (A(i, a, r)) break;
|
||||||
|
let { isSingle: y } = r.at(-1);
|
||||||
|
n = y ? a[0] : a, p += r.length;
|
||||||
|
}
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
function A(t, o, n) {
|
||||||
|
if (n.length === 0) return o.push(t), false;
|
||||||
|
let u = t, p = s, e = false;
|
||||||
|
for (let [r, a] of n.entries()) {
|
||||||
|
let { index: y, items: i } = a;
|
||||||
|
if (i.push(u), p = a(u, y, i), a.index += 1, p.hasNext) {
|
||||||
|
if (p.hasMany ?? false) {
|
||||||
|
for (let l of p.next) if (A(l, o, n.slice(r + 1))) return true;
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
u = p.next;
|
||||||
|
}
|
||||||
|
if (!p.hasNext) break;
|
||||||
|
p.done && (e = true);
|
||||||
|
}
|
||||||
|
return p.hasNext && o.push(u), e;
|
||||||
|
}
|
||||||
|
function f(t) {
|
||||||
|
let { lazy: o, lazyArgs: n } = t, u = o(...n);
|
||||||
|
return Object.assign(u, { isSingle: o.single ?? false, index: 0, items: [] });
|
||||||
|
}
|
||||||
|
function B(t) {
|
||||||
|
return typeof t == "string" || typeof t == "object" && t !== null && Symbol.iterator in t;
|
||||||
|
}
|
||||||
|
export {
|
||||||
|
x
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-7BKSRZNG.C39W3Wne.js.map
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"chunk-7BKSRZNG.C39W3Wne.js","sources":["../../../../../../node_modules/.pnpm/remeda@2.14.0/node_modules/remeda/dist/chunk-ANXBDSUI.js","../../../../../../node_modules/.pnpm/remeda@2.14.0/node_modules/remeda/dist/chunk-7BKSRZNG.js"],"sourcesContent":["var e={done:!0,hasNext:!1},s={done:!1,hasNext:!1},a=()=>e,o=t=>({hasNext:!0,next:t,done:!1});export{s as a,a as b,o as c};\n","import{a as s}from\"./chunk-ANXBDSUI.js\";function x(t,...o){let n=t,u=o.map(e=>\"lazy\"in e?f(e):void 0),p=0;for(;p<o.length;){if(u[p]===void 0||!B(n)){let i=o[p];n=i(n),p+=1;continue}let r=[];for(let i=p;i<o.length;i++){let l=u[i];if(l===void 0||(r.push(l),l.isSingle))break}let a=[];for(let i of n)if(A(i,a,r))break;let{isSingle:y}=r.at(-1);n=y?a[0]:a,p+=r.length}return n}function A(t,o,n){if(n.length===0)return o.push(t),!1;let u=t,p=s,e=!1;for(let[r,a]of n.entries()){let{index:y,items:i}=a;if(i.push(u),p=a(u,y,i),a.index+=1,p.hasNext){if(p.hasMany??!1){for(let l of p.next)if(A(l,o,n.slice(r+1)))return!0;return e}u=p.next}if(!p.hasNext)break;p.done&&(e=!0)}return p.hasNext&&o.push(u),e}function f(t){let{lazy:o,lazyArgs:n}=t,u=o(...n);return Object.assign(u,{isSingle:o.single??!1,index:0,items:[]})}function B(t){return typeof t==\"string\"||typeof t==\"object\"&&t!==null&&Symbol.iterator in t}export{x as a};\n"],"names":[],"mappings":"AAAG,IAAwB,IAAE,EAAC,MAAK,OAAG,SAAQ,MAAE;ACAR,SAAS,EAAE,MAAK,GAAE;AAAC,MAAI,IAAE,GAAE,IAAE,EAAE,IAAI,OAAG,UAAS,IAAE,EAAE,CAAC,IAAE,MAAM,GAAE,IAAE;AAAE,SAAK,IAAE,EAAE,UAAQ;AAAC,QAAG,EAAE,CAAC,MAAI,UAAQ,CAAC,EAAE,CAAC,GAAE;AAAC,UAAI,IAAE,EAAE,CAAC;AAAE,UAAE,EAAE,CAAC,GAAE,KAAG;AAAE;AAAA,IAAQ;AAAC,QAAI,IAAE,CAAA;AAAG,aAAQ,IAAE,GAAE,IAAE,EAAE,QAAO,KAAI;AAAC,UAAI,IAAE,EAAE,CAAC;AAAE,UAAG,MAAI,WAAS,EAAE,KAAK,CAAC,GAAE,EAAE,UAAU;AAAA,IAAK;AAAC,QAAI,IAAE,CAAA;AAAG,aAAQ,KAAK,EAAE,KAAG,EAAE,GAAE,GAAE,CAAC,EAAE;AAAM,QAAG,EAAC,UAAS,EAAC,IAAE,EAAE,GAAG,EAAE;AAAE,QAAE,IAAE,EAAE,CAAC,IAAE,GAAE,KAAG,EAAE;AAAA,EAAM;AAAC,SAAO;AAAC;AAAC,SAAS,EAAE,GAAE,GAAE,GAAE;AAAC,MAAG,EAAE,WAAS,EAAE,QAAO,EAAE,KAAK,CAAC,GAAE;AAAG,MAAI,IAAE,GAAE,IAAE,GAAE,IAAE;AAAG,WAAO,CAAC,GAAE,CAAC,KAAI,EAAE,QAAO,GAAG;AAAC,QAAG,EAAC,OAAM,GAAE,OAAM,EAAC,IAAE;AAAE,QAAG,EAAE,KAAK,CAAC,GAAE,IAAE,EAAE,GAAE,GAAE,CAAC,GAAE,EAAE,SAAO,GAAE,EAAE,SAAQ;AAAC,UAAG,EAAE,WAAS,OAAG;AAAC,iBAAQ,KAAK,EAAE,KAAK,KAAG,EAAE,GAAE,GAAE,EAAE,MAAM,IAAE,CAAC,CAAC,EAAE,QAAM;AAAG,eAAO;AAAA,MAAC;AAAC,UAAE,EAAE;AAAA,IAAI;AAAC,QAAG,CAAC,EAAE,QAAQ;AAAM,MAAE,SAAO,IAAE;AAAA,EAAG;AAAC,SAAO,EAAE,WAAS,EAAE,KAAK,CAAC,GAAE;AAAC;AAAC,SAAS,EAAE,GAAE;AAAC,MAAG,EAAC,MAAK,GAAE,UAAS,EAAC,IAAE,GAAE,IAAE,EAAE,GAAG,CAAC;AAAE,SAAO,OAAO,OAAO,GAAE,EAAC,UAAS,EAAE,UAAQ,OAAG,OAAM,GAAE,OAAM,CAAE,EAAA,CAAC;AAAC;AAAC,SAAS,EAAE,GAAE;AAAC,SAAO,OAAO,KAAG,YAAU,OAAO,KAAG,YAAU,MAAI,QAAM,OAAO,YAAY;AAAC;","x_google_ignoreList":[0,1]}
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
var g={done:!1,hasNext:!1};function y(i,...n){let t=i,l=n.map(r=>"lazy"in r?x(r):void 0),e=0;for(;e<n.length;){if(l[e]===void 0||!p(t)){let f=n[e];t=f(t),e+=1;continue}let r=[];for(let f=e;f<n.length;f++){let s=l[f];if(s===void 0||(r.push(s),s.isSingle))break}let o=[];for(let f of t)if(a(f,o,r))break;let{isSingle:u}=r.at(-1);t=u?o[0]:o,e+=r.length}return t}function a(i,n,t){if(t.length===0)return n.push(i),!1;let l=i,e=g,r=!1;for(let[o,u]of t.entries()){let{index:f,items:s}=u;if(s.push(l),e=u(l,f,s),u.index+=1,e.hasNext){if(e.hasMany??!1){for(let h of e.next)if(a(h,n,t.slice(o+1)))return!0;return r}l=e.next}if(!e.hasNext)break;e.done&&(r=!0)}return e.hasNext&&n.push(l),r}function x(i){let{lazy:n,lazyArgs:t}=i,l=n(...t);return Object.assign(l,{isSingle:n.single??!1,index:0,items:[]})}function p(i){return typeof i=="string"||typeof i=="object"&&i!==null&&Symbol.iterator in i}export{y as x};
|
|
||||||
//# sourceMappingURL=chunk-7BKSRZNG.F4GWJRq9.js.map
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"chunk-7BKSRZNG.F4GWJRq9.js","sources":["../../../../../../node_modules/.pnpm/remeda@2.14.0/node_modules/remeda/dist/chunk-ANXBDSUI.js","../../../../../../node_modules/.pnpm/remeda@2.14.0/node_modules/remeda/dist/chunk-7BKSRZNG.js"],"sourcesContent":["var e={done:!0,hasNext:!1},s={done:!1,hasNext:!1},a=()=>e,o=t=>({hasNext:!0,next:t,done:!1});export{s as a,a as b,o as c};\n","import{a as s}from\"./chunk-ANXBDSUI.js\";function x(t,...o){let n=t,u=o.map(e=>\"lazy\"in e?f(e):void 0),p=0;for(;p<o.length;){if(u[p]===void 0||!B(n)){let i=o[p];n=i(n),p+=1;continue}let r=[];for(let i=p;i<o.length;i++){let l=u[i];if(l===void 0||(r.push(l),l.isSingle))break}let a=[];for(let i of n)if(A(i,a,r))break;let{isSingle:y}=r.at(-1);n=y?a[0]:a,p+=r.length}return n}function A(t,o,n){if(n.length===0)return o.push(t),!1;let u=t,p=s,e=!1;for(let[r,a]of n.entries()){let{index:y,items:i}=a;if(i.push(u),p=a(u,y,i),a.index+=1,p.hasNext){if(p.hasMany??!1){for(let l of p.next)if(A(l,o,n.slice(r+1)))return!0;return e}u=p.next}if(!p.hasNext)break;p.done&&(e=!0)}return p.hasNext&&o.push(u),e}function f(t){let{lazy:o,lazyArgs:n}=t,u=o(...n);return Object.assign(u,{isSingle:o.single??!1,index:0,items:[]})}function B(t){return typeof t==\"string\"||typeof t==\"object\"&&t!==null&&Symbol.iterator in t}export{x as a};\n"],"names":["s","x","t","o","n","u","e","f","p","B","i","l","a","A","y","r"],"mappings":"AAAG,IAAwBA,EAAE,CAAC,KAAK,GAAG,QAAQ,EAAE,ECAR,SAASC,EAAEC,KAAKC,EAAE,CAAC,IAAIC,EAAEF,EAAEG,EAAEF,EAAE,IAAIG,GAAG,SAASA,EAAEC,EAAED,CAAC,EAAE,MAAM,EAAEE,EAAE,EAAE,KAAKA,EAAEL,EAAE,QAAQ,CAAC,GAAGE,EAAEG,CAAC,IAAI,QAAQ,CAACC,EAAEL,CAAC,EAAE,CAAC,IAAIM,EAAEP,EAAEK,CAAC,EAAEJ,EAAEM,EAAEN,CAAC,EAAEI,GAAG,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAA,EAAG,QAAQE,EAAEF,EAAEE,EAAEP,EAAE,OAAOO,IAAI,CAAC,IAAIC,EAAEN,EAAEK,CAAC,EAAE,GAAGC,IAAI,SAAS,EAAE,KAAKA,CAAC,EAAEA,EAAE,UAAU,KAAK,CAAC,IAAIC,EAAE,GAAG,QAAQF,KAAKN,EAAE,GAAGS,EAAEH,EAAEE,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,SAASE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAEV,EAAEU,EAAEF,EAAE,CAAC,EAAEA,EAAEJ,GAAG,EAAE,MAAM,CAAC,OAAOJ,CAAC,CAAC,SAASS,EAAEX,EAAEC,EAAEC,EAAE,CAAC,GAAGA,EAAE,SAAS,EAAE,OAAOD,EAAE,KAAKD,CAAC,EAAE,GAAG,IAAIG,EAAEH,EAAEM,EAAER,EAAEM,EAAE,GAAG,OAAO,CAACS,EAAEH,CAAC,IAAIR,EAAE,QAAS,EAAC,CAAC,GAAG,CAAC,MAAMU,EAAE,MAAMJ,CAAC,EAAEE,EAAE,GAAGF,EAAE,KAAKL,CAAC,EAAEG,EAAEI,EAAEP,EAAES,EAAEJ,CAAC,EAAEE,EAAE,OAAO,EAAEJ,EAAE,QAAQ,CAAC,GAAGA,EAAE,SAAS,GAAG,CAAC,QAAQG,KAAKH,EAAE,KAAK,GAAGK,EAAEF,EAAER,EAAEC,EAAE,MAAMW,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAOT,CAAC,CAACD,EAAEG,EAAE,IAAI,CAAC,GAAG,CAACA,EAAE,QAAQ,MAAMA,EAAE,OAAOF,EAAE,GAAG,CAAC,OAAOE,EAAE,SAASL,EAAE,KAAKE,CAAC,EAAEC,CAAC,CAAC,SAASC,EAAEL,EAAE,CAAC,GAAG,CAAC,KAAKC,EAAE,SAASC,CAAC,EAAEF,EAAEG,EAAEF,EAAE,GAAGC,CAAC,EAAE,OAAO,OAAO,OAAOC,EAAE,CAAC,SAASF,EAAE,QAAQ,GAAG,MAAM,EAAE,MAAM,CAAE,CAAA,CAAC,CAAC,CAAC,SAASM,EAAEP,EAAE,CAAC,OAAO,OAAOA,GAAG,UAAU,OAAOA,GAAG,UAAUA,IAAI,MAAM,OAAO,YAAYA,CAAC","x_google_ignoreList":[0,1]}
|
|
||||||
|
|
@ -1,2 +1,39 @@
|
||||||
const E="aria-selected",T="hidden",t="data-contient-articles",a="disabled",_="data-cle-panier",s="#page-panier",o=".compte-panier a[rel='cart']",n="#selecteur-variation",U="#bouton-ajout-panier",c="a[role='tab']",e="section[role='tabpanel']",N="article",R="button.detail-produit__actions__suppression",i="button.detail-produit__actions__soustraction",S="button.detail-produit__actions__addition",I="input";export{t as A,o as S,N as a,s as b,_ as c,i as d,I as e,S as f,R as g,U as h,n as i,c as j,e as k,E as l,T as m,a as n};
|
const ATTRIBUT_ARIA_SELECTED = "aria-selected";
|
||||||
|
const ATTRIBUT_HIDDEN = "hidden";
|
||||||
|
const ATTRIBUT_CONTIENT_ARTICLES = "data-contient-articles";
|
||||||
|
const ATTRIBUT_DESACTIVE = "disabled";
|
||||||
|
const ATTRIBUT_CLE_PANIER = "data-cle-panier";
|
||||||
|
const SELECTEUR_CONTENEUR_PANIER = "#page-panier";
|
||||||
|
const SELECTEUR_BOUTON_PANIER = ".compte-panier a[rel='cart']";
|
||||||
|
const SELECTEUR_SELECTEUR_QUANTITE = "#selecteur-variation";
|
||||||
|
const SELECTEUR_BOUTON_AJOUT_PANIER = "#bouton-ajout-panier";
|
||||||
|
const SELECTEUR_LIENS_ONGLETS = "a[role='tab']";
|
||||||
|
const SELECTEUR_SECTIONS_CONTENUS = "section[role='tabpanel']";
|
||||||
|
const SELECTEUR_ENTREES_PANIER = "article";
|
||||||
|
const SELECTEUR_BOUTON_SUPPRESSION_PANIER = "button.detail-produit__actions__suppression";
|
||||||
|
const SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE = "button.detail-produit__actions__soustraction";
|
||||||
|
const SELECTEUR_BOUTON_ADDITION_QUANTITE = "button.detail-produit__actions__addition";
|
||||||
|
const SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER = "input";
|
||||||
|
const SELECTEUR_PRIX_LIGNE_PANIER = ".detail-produit__nom-prix span";
|
||||||
|
const SELECTEUR_TOTAL_PANIER = "#panneau-panier .panneau__pied-de-page p span";
|
||||||
|
export {
|
||||||
|
ATTRIBUT_CONTIENT_ARTICLES as A,
|
||||||
|
SELECTEUR_BOUTON_PANIER as S,
|
||||||
|
SELECTEUR_ENTREES_PANIER as a,
|
||||||
|
SELECTEUR_CONTENEUR_PANIER as b,
|
||||||
|
SELECTEUR_TOTAL_PANIER as c,
|
||||||
|
ATTRIBUT_CLE_PANIER as d,
|
||||||
|
SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE as e,
|
||||||
|
SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER as f,
|
||||||
|
SELECTEUR_BOUTON_ADDITION_QUANTITE as g,
|
||||||
|
SELECTEUR_BOUTON_SUPPRESSION_PANIER as h,
|
||||||
|
SELECTEUR_PRIX_LIGNE_PANIER as i,
|
||||||
|
SELECTEUR_BOUTON_AJOUT_PANIER as j,
|
||||||
|
SELECTEUR_SELECTEUR_QUANTITE as k,
|
||||||
|
SELECTEUR_LIENS_ONGLETS as l,
|
||||||
|
SELECTEUR_SECTIONS_CONTENUS as m,
|
||||||
|
ATTRIBUT_ARIA_SELECTED as n,
|
||||||
|
ATTRIBUT_HIDDEN as o,
|
||||||
|
ATTRIBUT_DESACTIVE as p
|
||||||
|
};
|
||||||
//# sourceMappingURL=dom.js.map
|
//# sourceMappingURL=dom.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"dom.js","sources":["../../src/scripts/constantes/dom.ts"],"sourcesContent":["/** Constantes de valeurs pour la manipulation du DOM : sélecteurs et attributs. */\n\nexport const ATTRIBUT_ARIA_SELECTED = \"aria-selected\";\nexport const ATTRIBUT_ARIA_HIDDEN = \"aria-hidden\";\nexport const ATTRIBUT_HIDDEN = \"hidden\";\nexport const ATTRIBUT_CONTIENT_ARTICLES = \"data-contient-articles\";\nexport const ATTRIBUT_DESACTIVE = \"disabled\";\nexport const ATTRIBUT_CLE_PANIER = \"data-cle-panier\";\n\nexport const SELECTEUR_CONTENEUR_PANIER = \"#page-panier\";\nexport const SELECTEUR_BOUTON_PANIER = \".compte-panier a[rel='cart']\";\nexport const SELECTEUR_SELECTEUR_QUANTITE = \"#selecteur-variation\";\nexport const SELECTEUR_BOUTON_AJOUT_PANIER = \"#bouton-ajout-panier\";\nexport const SELECTEUR_LIENS_ONGLETS = \"a[role='tab']\";\nexport const SELECTEUR_SECTIONS_CONTENUS = \"section[role='tabpanel']\";\n\n// Panier\nexport const SELECTEUR_ENTREES_PANIER = \"article\";\nexport const SELECTEUR_BOUTON_SUPPRESSION_PANIER = \"button.detail-produit__actions__suppression\";\nexport const SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE = \"button.detail-produit__actions__soustraction\";\nexport const SELECTEUR_BOUTON_ADDITION_QUANTITE = \"button.detail-produit__actions__addition\";\nexport const SELECTEUR_CHAMP_QUANTITE = \"input\";\n"],"names":["ATTRIBUT_ARIA_SELECTED","ATTRIBUT_HIDDEN","ATTRIBUT_CONTIENT_ARTICLES","ATTRIBUT_DESACTIVE","ATTRIBUT_CLE_PANIER","SELECTEUR_CONTENEUR_PANIER","SELECTEUR_BOUTON_PANIER","SELECTEUR_SELECTEUR_QUANTITE","SELECTEUR_BOUTON_AJOUT_PANIER","SELECTEUR_LIENS_ONGLETS","SELECTEUR_SECTIONS_CONTENUS","SELECTEUR_ENTREES_PANIER","SELECTEUR_BOUTON_SUPPRESSION_PANIER","SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE","SELECTEUR_BOUTON_ADDITION_QUANTITE","SELECTEUR_CHAMP_QUANTITE"],"mappings":"AAEO,MAAMA,EAAyB,gBAEzBC,EAAkB,SAClBC,EAA6B,yBAC7BC,EAAqB,WACrBC,EAAsB,kBAEtBC,EAA6B,eAC7BC,EAA0B,+BAC1BC,EAA+B,uBAC/BC,EAAgC,uBAChCC,EAA0B,gBAC1BC,EAA8B,2BAG9BC,EAA2B,UAC3BC,EAAsC,8CACtCC,EAAyC,+CACzCC,EAAqC,2CACrCC,EAA2B"}
|
{"version":3,"file":"dom.js","sources":["../../src/scripts/constantes/dom.ts"],"sourcesContent":["/** Constantes de valeurs pour la manipulation du DOM : sélecteurs et attributs. */\n\nexport const ATTRIBUT_ARIA_SELECTED = \"aria-selected\";\nexport const ATTRIBUT_ARIA_HIDDEN = \"aria-hidden\";\nexport const ATTRIBUT_HIDDEN = \"hidden\";\nexport const ATTRIBUT_CONTIENT_ARTICLES = \"data-contient-articles\";\nexport const ATTRIBUT_DESACTIVE = \"disabled\";\nexport const ATTRIBUT_CLE_PANIER = \"data-cle-panier\";\n\nexport const SELECTEUR_CONTENEUR_PANIER = \"#page-panier\";\nexport const SELECTEUR_BOUTON_PANIER = \".compte-panier a[rel='cart']\";\nexport const SELECTEUR_SELECTEUR_QUANTITE = \"#selecteur-variation\";\nexport const SELECTEUR_BOUTON_AJOUT_PANIER = \"#bouton-ajout-panier\";\nexport const SELECTEUR_LIENS_ONGLETS = \"a[role='tab']\";\nexport const SELECTEUR_SECTIONS_CONTENUS = \"section[role='tabpanel']\";\n\n// Panier\nexport const SELECTEUR_ENTREES_PANIER = \"article\";\nexport const SELECTEUR_BOUTON_SUPPRESSION_PANIER = \"button.detail-produit__actions__suppression\";\nexport const SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE = \"button.detail-produit__actions__soustraction\";\nexport const SELECTEUR_BOUTON_ADDITION_QUANTITE = \"button.detail-produit__actions__addition\";\nexport const SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER = \"input\";\nexport const SELECTEUR_PRIX_LIGNE_PANIER = \".detail-produit__nom-prix span\";\nexport const SELECTEUR_TOTAL_PANIER = \"#panneau-panier .panneau__pied-de-page p span\";\n"],"names":[],"mappings":"AAEO,MAAM,yBAAyB;AAE/B,MAAM,kBAAkB;AACxB,MAAM,6BAA6B;AACnC,MAAM,qBAAqB;AAC3B,MAAM,sBAAsB;AAE5B,MAAM,6BAA6B;AACnC,MAAM,0BAA0B;AAChC,MAAM,+BAA+B;AACrC,MAAM,gCAAgC;AACtC,MAAM,0BAA0B;AAChC,MAAM,8BAA8B;AAGpC,MAAM,2BAA2B;AACjC,MAAM,sCAAsC;AAC5C,MAAM,yCAAyC;AAC/C,MAAM,qCAAqC;AAC3C,MAAM,wCAAwC;AAC9C,MAAM,8BAA8B;AACpC,MAAM,yBAAyB;"}
|
||||||
|
|
@ -1,2 +1,28 @@
|
||||||
import{x as m}from"./chunk-7BKSRZNG.F4GWJRq9.js";import{e as n,f as a,g as c,h as o}from"./erreurs.js";import{E as s,r as E,l as i}from"./Either.DDEPhGsy.js";import"./exports.CqgMoAXr.js";function p(e){return e!==null}function l(e){return e===void 0?!0:typeof e=="string"||Array.isArray(e)?e.length===0:Object.keys(e).length===0}const f=e=>e,L=e=>r=>s.encase(()=>e.querySelector(r)).mapLeft(t=>n(c(r))).chain(t=>p(t)?E(t):i(n(o(r)))),R=e=>r=>s.encase(()=>m(e.querySelectorAll(r),Array.from)).mapLeft(t=>n(c(r))).chain(t=>l(t)?i(n(o(r))):E(t)),S=e=>e.caseOf({Left:a,Right:f}),g=e=>e.caseOf({Left:a,Right:f});export{g as a,L as b,R as c,S as r};
|
import { x } from "./chunk-7BKSRZNG.C39W3Wne.js";
|
||||||
|
import { e as creeSyntaxError, f as reporteEtLeveErreur, g as ERREUR_SYNTAXE_INVALIDE, h as ERREUR_SELECTEUR_INEXISTANT } from "./erreurs.js";
|
||||||
|
import { E as Either, r as right, l as left } from "./Either.wHNxn7Os.js";
|
||||||
|
import "./exports.DNZBdkMD.js";
|
||||||
|
function n$1(l) {
|
||||||
|
return l !== null;
|
||||||
|
}
|
||||||
|
function n(e) {
|
||||||
|
return e === void 0 ? true : typeof e == "string" || Array.isArray(e) ? e.length === 0 : Object.keys(e).length === 0;
|
||||||
|
}
|
||||||
|
const identity = (x2) => x2;
|
||||||
|
const recupereElementAvecSelecteur = (parent) => (selecteur) => Either.encase(() => parent.querySelector(selecteur)).mapLeft((_) => creeSyntaxError(ERREUR_SYNTAXE_INVALIDE(selecteur))).chain((e) => n$1(e) ? right(e) : left(creeSyntaxError(ERREUR_SELECTEUR_INEXISTANT(selecteur))));
|
||||||
|
const recupereElementsAvecSelecteur = (parent) => (selecteur) => Either.encase(() => x(parent.querySelectorAll(selecteur), Array.from)).mapLeft((_) => creeSyntaxError(ERREUR_SYNTAXE_INVALIDE(selecteur))).chain((e) => n(e) ? left(creeSyntaxError(ERREUR_SELECTEUR_INEXISTANT(selecteur))) : right(e));
|
||||||
|
const recupereElementOuLeve = (elementOuErreur) => elementOuErreur.caseOf({
|
||||||
|
Left: reporteEtLeveErreur,
|
||||||
|
Right: identity
|
||||||
|
});
|
||||||
|
const recupereElementsOuLeve = (elementsOuErreur) => elementsOuErreur.caseOf({
|
||||||
|
Left: reporteEtLeveErreur,
|
||||||
|
Right: identity
|
||||||
|
});
|
||||||
|
export {
|
||||||
|
recupereElementAvecSelecteur as a,
|
||||||
|
recupereElementsOuLeve as b,
|
||||||
|
recupereElementsAvecSelecteur as c,
|
||||||
|
recupereElementOuLeve as r
|
||||||
|
};
|
||||||
//# sourceMappingURL=dom2.js.map
|
//# sourceMappingURL=dom2.js.map
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,72 @@
|
||||||
import{$ as o}from"./exports.CqgMoAXr.js";const d=r=>`Le selecteur "${r}" est invalide`,h=r=>`La requête "${r}" n'a retourné aucun Élément.`,i=r=>new SyntaxError(r);class s extends Error{constructor(e="400 BadRequestError"){super(e),this.name="BadRequestError"}}class t extends Error{constructor(e="401 UnauthorizedError"){super(e),this.name="UnauthorizedError"}}class n extends Error{constructor(e="404 NotFoundError"){super(e),this.name="NotFoundError"}}class E extends Error{constructor(e="500 ServerError"){super(e),this.name="ServerError"}}class a extends Error{constructor(e){super(JSON.stringify(e)),this.name="UnknownError"}}const l=r=>new a(r),w=r=>{throw r},m=r=>{throw new s(`(${r.code}) ${r.message}`)},p=r=>{throw new t(`(${r.code}) ${r.message}`)},v=r=>{throw new n(`(${r.code}) ${r.message}`)},R=r=>{throw new E(r)},c=r=>(console.error(r),o(r)),S=r=>{throw c(r),r};export{l as E,m as a,p as b,v as c,w as d,i as e,S as f,d as g,h,R as l,c as r};
|
import { $ as captureException } from "./exports.DNZBdkMD.js";
|
||||||
|
const ERREUR_SYNTAXE_INVALIDE = (selecteur) => `Le selecteur "${selecteur}" est invalide`;
|
||||||
|
const ERREUR_SELECTEUR_INEXISTANT = (selecteur) => `La requête "${selecteur}" n'a retourné aucun Élément.`;
|
||||||
|
const creeSyntaxError = (message) => new SyntaxError(message);
|
||||||
|
class BadRequestError extends Error {
|
||||||
|
constructor(message = "400 BadRequestError") {
|
||||||
|
super(message);
|
||||||
|
this.name = "BadRequestError";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class UnauthorizedError extends Error {
|
||||||
|
constructor(message = "401 UnauthorizedError") {
|
||||||
|
super(message);
|
||||||
|
this.name = "UnauthorizedError";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class NotFoundError extends Error {
|
||||||
|
constructor(message = "404 NotFoundError") {
|
||||||
|
super(message);
|
||||||
|
this.name = "NotFoundError";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class ServerError extends Error {
|
||||||
|
constructor(message = "500 ServerError") {
|
||||||
|
super(message);
|
||||||
|
this.name = "ServerError";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class UnknownError extends Error {
|
||||||
|
constructor(message) {
|
||||||
|
super(JSON.stringify(message));
|
||||||
|
this.name = "UnknownError";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const ErreurInconnue = (erreur) => new UnknownError(erreur);
|
||||||
|
const leveErreur = (erreur) => {
|
||||||
|
throw erreur;
|
||||||
|
};
|
||||||
|
const leveBadRequestError = (erreur) => {
|
||||||
|
throw new BadRequestError(`(${erreur.code}) ${erreur.message}`);
|
||||||
|
};
|
||||||
|
const leveUnauthorizedError = (erreur) => {
|
||||||
|
throw new UnauthorizedError(`(${erreur.code}) ${erreur.message}`);
|
||||||
|
};
|
||||||
|
const leveNotFoundError = (erreur) => {
|
||||||
|
throw new NotFoundError(`(${erreur.code}) ${erreur.message}`);
|
||||||
|
};
|
||||||
|
const leveServerError = (message) => {
|
||||||
|
throw new ServerError(message);
|
||||||
|
};
|
||||||
|
const reporteErreur = (erreur) => {
|
||||||
|
console.error(erreur);
|
||||||
|
return captureException(erreur);
|
||||||
|
};
|
||||||
|
const reporteEtLeveErreur = (erreur) => {
|
||||||
|
reporteErreur(erreur);
|
||||||
|
throw erreur;
|
||||||
|
};
|
||||||
|
export {
|
||||||
|
ErreurInconnue as E,
|
||||||
|
leveBadRequestError as a,
|
||||||
|
leveUnauthorizedError as b,
|
||||||
|
leveNotFoundError as c,
|
||||||
|
leveErreur as d,
|
||||||
|
creeSyntaxError as e,
|
||||||
|
reporteEtLeveErreur as f,
|
||||||
|
ERREUR_SYNTAXE_INVALIDE as g,
|
||||||
|
ERREUR_SELECTEUR_INEXISTANT as h,
|
||||||
|
leveServerError as l,
|
||||||
|
reporteErreur as r
|
||||||
|
};
|
||||||
//# sourceMappingURL=erreurs.js.map
|
//# sourceMappingURL=erreurs.js.map
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,17 @@
|
||||||
import{j as a,o as s,n as r,s as o}from"./index.DYThEupQ.js";const e=s({code:o(),data:s({status:r()}),message:o()}),c=s({body:e,status:r()}),n=t=>a(c,t);export{n as e};
|
import { i as is, o as object, n as number, s as string } from "./index.DD7qm8S6.js";
|
||||||
|
const WCErrorBodySchema = object({
|
||||||
|
code: string(),
|
||||||
|
data: object({
|
||||||
|
status: number()
|
||||||
|
}),
|
||||||
|
message: string()
|
||||||
|
});
|
||||||
|
const WCErrorSchema = object({
|
||||||
|
body: WCErrorBodySchema,
|
||||||
|
status: number()
|
||||||
|
});
|
||||||
|
const estWCError = (donnees) => is(WCErrorSchema, donnees);
|
||||||
|
export {
|
||||||
|
estWCError as e
|
||||||
|
};
|
||||||
//# sourceMappingURL=erreurs2.js.map
|
//# sourceMappingURL=erreurs2.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"erreurs2.js","sources":["../../src/scripts/lib/schemas/erreurs.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport type { WCError } from \"../types/api/erreurs\";\n\nexport const WCErrorBodySchema = v.object({\n code: v.string(),\n data: v.object({\n status: v.number(),\n }),\n message: v.string(),\n});\n\nexport const WCErrorSchema = v.object({\n body: WCErrorBodySchema,\n status: v.number(),\n});\n\nexport const estWCError = (donnees: unknown): donnees is WCError => v.is(WCErrorSchema, donnees);\n"],"names":["WCErrorBodySchema","v.object","v.string","v.number","WCErrorSchema","estWCError","donnees","v.is"],"mappings":"6DAIa,MAAAA,EAAoBC,EAAS,CACxC,KAAMC,EAAS,EACf,KAAMD,EAAS,CACb,OAAQE,EAAS,CAAA,CAClB,EACD,QAASD,EAAS,CACpB,CAAC,EAEYE,EAAgBH,EAAS,CACpC,KAAMD,EACN,OAAQG,EAAS,CACnB,CAAC,EAEYE,EAAcC,GAAyCC,EAAKH,EAAeE,CAAO"}
|
{"version":3,"file":"erreurs2.js","sources":["../../src/scripts/lib/schemas/erreurs.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport type { WCError } from \"../types/api/erreurs\";\n\nexport const WCErrorBodySchema = v.object({\n code: v.string(),\n data: v.object({\n status: v.number(),\n }),\n message: v.string(),\n});\n\nexport const WCErrorSchema = v.object({\n body: WCErrorBodySchema,\n status: v.number(),\n});\n\nexport const estWCError = (donnees: unknown): donnees is WCError => v.is(WCErrorSchema, donnees);\n"],"names":["v.object","v.string","v.number","v.is"],"mappings":";AAIa,MAAA,oBAAoBA,OAAS;AAAA,EACxC,MAAMC,OAAS;AAAA,EACf,MAAMD,OAAS;AAAA,IACb,QAAQE,OAAS;AAAA,EAAA,CAClB;AAAA,EACD,SAASD,OAAS;AACpB,CAAC;AAEY,MAAA,gBAAgBD,OAAS;AAAA,EACpC,MAAM;AAAA,EACN,QAAQE,OAAS;AACnB,CAAC;AAEM,MAAM,aAAa,CAAC,YAAyCC,GAAK,eAAe,OAAO;"}
|
||||||
File diff suppressed because one or more lines are too long
2171
web/app/themes/haiku-atelier-2024/assets/js/exports.DNZBdkMD.js
Normal file
2171
web/app/themes/haiku-atelier-2024/assets/js/exports.DNZBdkMD.js
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,10 @@
|
||||||
const s=e=>t=>t instanceof e,n=s(HTMLSelectElement),o=e=>e instanceof Error,c=e=>e.status===500;export{o as a,n as b,c as e};
|
const estElement = (typeElement) => (element) => element instanceof typeElement;
|
||||||
|
const estHTMLSelectElement = estElement(HTMLSelectElement);
|
||||||
|
const estError = (erreur) => erreur instanceof Error;
|
||||||
|
const estReponse500 = (reponse) => reponse.status === 500;
|
||||||
|
export {
|
||||||
|
estError as a,
|
||||||
|
estHTMLSelectElement as b,
|
||||||
|
estReponse500 as e
|
||||||
|
};
|
||||||
//# sourceMappingURL=gardes.js.map
|
//# sourceMappingURL=gardes.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"gardes.js","sources":["../../src/scripts/lib/gardes.ts"],"sourcesContent":["import type { Constructor } from \"./types/classes\";\n\nconst estElement = <T extends HTMLElement>(typeElement: Constructor<T>) => (element: unknown): element is T =>\n element instanceof typeElement;\n\nexport const estHTMLSelectElement = estElement<HTMLSelectElement>(HTMLSelectElement);\n\nexport const estError = (erreur: unknown): erreur is Error => erreur instanceof Error;\n\nexport const estReponse500 = (reponse: Response): boolean => reponse.status === 500;\n"],"names":["estElement","typeElement","element","estHTMLSelectElement","estError","erreur","estReponse500","reponse"],"mappings":"AAEA,MAAMA,EAAqCC,GAAiCC,GAC1EA,aAAmBD,EAERE,EAAuBH,EAA8B,iBAAiB,EAEtEI,EAAYC,GAAqCA,aAAkB,MAEnEC,EAAiBC,GAA+BA,EAAQ,SAAW"}
|
{"version":3,"file":"gardes.js","sources":["../../src/scripts/lib/gardes.ts"],"sourcesContent":["import type { Constructor } from \"./types/classes\";\n\nconst estElement = <T extends HTMLElement>(typeElement: Constructor<T>) => (element: unknown): element is T =>\n element instanceof typeElement;\n\nexport const estHTMLSelectElement = estElement<HTMLSelectElement>(HTMLSelectElement);\n\nexport const estError = (erreur: unknown): erreur is Error => erreur instanceof Error;\n\nexport const estReponse500 = (reponse: Response): boolean => reponse.status === 500;\n"],"names":[],"mappings":"AAEA,MAAM,aAAa,CAAwB,gBAAgC,CAAC,YAC1E,mBAAmB;AAER,MAAA,uBAAuB,WAA8B,iBAAiB;AAEtE,MAAA,WAAW,CAAC,WAAqC,kBAAkB;AAEzE,MAAM,gBAAgB,CAAC,YAA+B,QAAQ,WAAW;"}
|
||||||
|
|
@ -1,2 +1,330 @@
|
||||||
import{e as g,d as M}from"./api2.js";import{E as h,r as o,l as f,M as p,n as u,j as c}from"./Either.DDEPhGsy.js";var l;const y={liftEither(i){if(i.isRight())return Promise.resolve(i.extract());throw i.extract()},fromPromise(i){return i.then(y.liftEither)},throwE(i){throw i}};class m{constructor(t){this.runPromise=t,this[l]="EitherAsync",this["fantasy-land/chain"]=this.chain,this["fantasy-land/alt"]=this.alt,this.then=(r,e)=>this.run().then(r,e)}leftOrDefault(t){return this.run().then(r=>r.leftOrDefault(t))}orDefault(t){return this.run().then(r=>r.orDefault(t))}join(){return n(async t=>{const r=await this;if(r.isRight()){const e=await r.extract();return t.liftEither(e)}return t.liftEither(r)})}ap(t){return n(async r=>{const e=await t;if(e.isRight()){const a=await this.run();return a.isRight()?e.extract()(a.extract()):r.liftEither(a)}return r.liftEither(e)})}alt(t){return n(async r=>{const e=await this.run();if(e.isRight())return e.extract();{const a=await t;return r.liftEither(a)}})}extend(t){return n(async r=>{const e=await this.run();if(e.isRight()){const a=n.liftEither(e);return r.liftEither(o(t(a)))}return r.liftEither(e)})}async run(){try{return o(await this.runPromise(y))}catch(t){return f(t)}}bimap(t,r){return n(async e=>{const a=await this.run();try{return await e.liftEither(a.bimap(t,r))}catch(P){throw await P}})}map(t){return n(r=>this.runPromise(r).then(t))}mapLeft(t){return n(async r=>{try{return await this.runPromise(r)}catch(e){throw await t(e)}})}chain(t){return n(async r=>{const e=await this.runPromise(r);return r.fromPromise(t(e))})}chainLeft(t){return n(async r=>{try{return await this.runPromise(r)}catch(e){return r.fromPromise(t(e))}})}toMaybeAsync(){return s(async({liftMaybe:t})=>{const r=await this.run();return t(r.toMaybe())})}swap(){return n(async t=>{const r=await this.run();return r.isRight()&&t.throwE(r.extract()),t.liftEither(o(r.extract()))})}ifLeft(t){return n(async r=>{const e=await this.run();return e.ifLeft(t),r.liftEither(e)})}ifRight(t){return n(async r=>{const e=await this.run();return e.ifRight(t),r.liftEither(e)})}void(){return this.map(t=>{})}caseOf(t){return this.run().then(r=>r.caseOf(t))}finally(t){return n(({fromPromise:r})=>r(this.run().finally(t)))}}l=Symbol.toStringTag;const n=Object.assign(i=>new m(i),{fromPromise:i=>n(({fromPromise:t})=>t(i())),liftEither:i=>n(({liftEither:t})=>t(i)),lefts:i=>Promise.all(i.map(t=>t.run())).then(h.lefts),rights:i=>Promise.all(i.map(t=>t.run())).then(h.rights),sequence:i=>n(async t=>{let r=[];for await(const e of i){if(e.isLeft())return t.liftEither(e);r.push(e.extract())}return t.liftEither(o(r))}),all:i=>n.fromPromise(async()=>Promise.all(i).then(h.sequence))});m.prototype.constructor=n;var w;const E={liftMaybe(i){if(i.isJust())return Promise.resolve(i.extract());throw u},fromPromise(i){return i.then(E.liftMaybe)}};class b{constructor(t){this.runPromise=t,this[w]="MaybeAsync",this["fantasy-land/chain"]=this.chain,this["fantasy-land/filter"]=this.filter,this["fantasy-land/alt"]=this.alt}orDefault(t){return this.run().then(r=>r.orDefault(t))}join(){return s(async t=>{const r=await this.run();if(r.isJust()){const e=await r.extract();return t.liftMaybe(e)}return t.liftMaybe(u)})}ap(t){return s(async r=>{const e=await t;if(e.isJust()){const a=await this.run();return a.isJust()?e.extract()(a.extract()):r.liftMaybe(u)}return r.liftMaybe(u)})}alt(t){return s(async r=>{const e=await this.run();if(e.isJust())return e.extract();{const a=await t;return r.liftMaybe(a)}})}extend(t){return s(async r=>{const e=await this.run();if(e.isJust()){const a=s.liftMaybe(e);return r.liftMaybe(c(t(a)))}return r.liftMaybe(u)})}filter(t){return s(async r=>{const e=await this.run();return r.liftMaybe(e.filter(t))})}async run(){try{return c(await this.runPromise(E))}catch{return u}}map(t){return s(r=>this.runPromise(r).then(t))}chain(t){return s(async r=>{const e=await this.runPromise(r);return r.fromPromise(t(e))})}toEitherAsync(t){return n(async({liftEither:r})=>{const e=await this.run();return r(e.toEither(t))})}ifJust(t){return s(async r=>{const e=await this.run();return e.ifJust(t),r.liftMaybe(e)})}ifNothing(t){return s(async r=>{const e=await this.run();return e.ifNothing(t),r.liftMaybe(e)})}void(){return this.map(t=>{})}caseOf(t){return this.run().then(r=>r.caseOf(t))}finally(t){return s(({fromPromise:r})=>r(this.run().finally(t)))}then(t,r){return this.run().then(t,r)}}w=Symbol.toStringTag;const s=Object.assign(i=>new b(i),{catMaybes:i=>Promise.all(i).then(p.catMaybes),fromPromise:i=>s(({fromPromise:t})=>t(i())),liftMaybe:i=>s(({liftMaybe:t})=>t(i))});b.prototype.constructor=s;const d=_etats,x=()=>fetch(g,{credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json",[M]:d.nonce},method:"GET",mode:"same-origin",signal:AbortSignal.timeout(5e3)}).then(o).catch(f);n.fromPromise(x).map(i=>i.json()).ifLeft(i=>{console.error(i)});
|
import { e as ROUTE_API_PANIER, d as ENTETE_WC_NONCE } from "./api2.js";
|
||||||
|
import { E as Either, r as right, l as left, M as Maybe, n as nothing, j as just } from "./Either.wHNxn7Os.js";
|
||||||
|
var _a$1;
|
||||||
|
const helpers$1 = {
|
||||||
|
liftEither(either) {
|
||||||
|
if (either.isRight()) {
|
||||||
|
return Promise.resolve(either.extract());
|
||||||
|
}
|
||||||
|
throw either.extract();
|
||||||
|
},
|
||||||
|
fromPromise(promise) {
|
||||||
|
return promise.then(helpers$1.liftEither);
|
||||||
|
},
|
||||||
|
throwE(error) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
class EitherAsyncImpl {
|
||||||
|
constructor(runPromise) {
|
||||||
|
this.runPromise = runPromise;
|
||||||
|
this[_a$1] = "EitherAsync";
|
||||||
|
this["fantasy-land/chain"] = this.chain;
|
||||||
|
this["fantasy-land/alt"] = this.alt;
|
||||||
|
this.then = (onfulfilled, onrejected) => {
|
||||||
|
return this.run().then(onfulfilled, onrejected);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
leftOrDefault(defaultValue) {
|
||||||
|
return this.run().then((x) => x.leftOrDefault(defaultValue));
|
||||||
|
}
|
||||||
|
orDefault(defaultValue) {
|
||||||
|
return this.run().then((x) => x.orDefault(defaultValue));
|
||||||
|
}
|
||||||
|
join() {
|
||||||
|
return EitherAsync(async (helpers2) => {
|
||||||
|
const either = await this;
|
||||||
|
if (either.isRight()) {
|
||||||
|
const nestedEither = await either.extract();
|
||||||
|
return helpers2.liftEither(nestedEither);
|
||||||
|
}
|
||||||
|
return helpers2.liftEither(either);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
ap(eitherF) {
|
||||||
|
return EitherAsync(async (helpers2) => {
|
||||||
|
const otherValue = await eitherF;
|
||||||
|
if (otherValue.isRight()) {
|
||||||
|
const thisValue = await this.run();
|
||||||
|
if (thisValue.isRight()) {
|
||||||
|
return otherValue.extract()(thisValue.extract());
|
||||||
|
} else {
|
||||||
|
return helpers2.liftEither(thisValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return helpers2.liftEither(otherValue);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
alt(other) {
|
||||||
|
return EitherAsync(async (helpers2) => {
|
||||||
|
const thisValue = await this.run();
|
||||||
|
if (thisValue.isRight()) {
|
||||||
|
return thisValue.extract();
|
||||||
|
} else {
|
||||||
|
const otherValue = await other;
|
||||||
|
return helpers2.liftEither(otherValue);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
extend(f) {
|
||||||
|
return EitherAsync(async (helpers2) => {
|
||||||
|
const either = await this.run();
|
||||||
|
if (either.isRight()) {
|
||||||
|
const v = EitherAsync.liftEither(either);
|
||||||
|
return helpers2.liftEither(right(f(v)));
|
||||||
|
}
|
||||||
|
return helpers2.liftEither(either);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async run() {
|
||||||
|
try {
|
||||||
|
return right(await this.runPromise(helpers$1));
|
||||||
|
} catch (e) {
|
||||||
|
return left(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bimap(f, g) {
|
||||||
|
return EitherAsync(async (helpers2) => {
|
||||||
|
const either = await this.run();
|
||||||
|
try {
|
||||||
|
return await helpers2.liftEither(either.bimap(f, g));
|
||||||
|
} catch (e) {
|
||||||
|
throw await e;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
map(f) {
|
||||||
|
return EitherAsync((helpers2) => this.runPromise(helpers2).then(f));
|
||||||
|
}
|
||||||
|
mapLeft(f) {
|
||||||
|
return EitherAsync(async (helpers2) => {
|
||||||
|
try {
|
||||||
|
return await this.runPromise(helpers2);
|
||||||
|
} catch (e) {
|
||||||
|
throw await f(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
chain(f) {
|
||||||
|
return EitherAsync(async (helpers2) => {
|
||||||
|
const value = await this.runPromise(helpers2);
|
||||||
|
return helpers2.fromPromise(f(value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
chainLeft(f) {
|
||||||
|
return EitherAsync(async (helpers2) => {
|
||||||
|
try {
|
||||||
|
return await this.runPromise(helpers2);
|
||||||
|
} catch (e) {
|
||||||
|
return helpers2.fromPromise(f(e));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
toMaybeAsync() {
|
||||||
|
return MaybeAsync(async ({ liftMaybe }) => {
|
||||||
|
const either = await this.run();
|
||||||
|
return liftMaybe(either.toMaybe());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
swap() {
|
||||||
|
return EitherAsync(async (helpers2) => {
|
||||||
|
const either = await this.run();
|
||||||
|
if (either.isRight())
|
||||||
|
helpers2.throwE(either.extract());
|
||||||
|
return helpers2.liftEither(right(either.extract()));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
ifLeft(effect) {
|
||||||
|
return EitherAsync(async (helpers2) => {
|
||||||
|
const either = await this.run();
|
||||||
|
either.ifLeft(effect);
|
||||||
|
return helpers2.liftEither(either);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
ifRight(effect) {
|
||||||
|
return EitherAsync(async (helpers2) => {
|
||||||
|
const either = await this.run();
|
||||||
|
either.ifRight(effect);
|
||||||
|
return helpers2.liftEither(either);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
void() {
|
||||||
|
return this.map((_) => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
caseOf(patterns) {
|
||||||
|
return this.run().then((x) => x.caseOf(patterns));
|
||||||
|
}
|
||||||
|
finally(effect) {
|
||||||
|
return EitherAsync(({ fromPromise }) => fromPromise(this.run().finally(effect)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_a$1 = Symbol.toStringTag;
|
||||||
|
const EitherAsync = Object.assign((runPromise) => new EitherAsyncImpl(runPromise), {
|
||||||
|
fromPromise: (f) => EitherAsync(({ fromPromise: fP }) => fP(f())),
|
||||||
|
liftEither: (either) => EitherAsync(({ liftEither }) => liftEither(either)),
|
||||||
|
lefts: (list) => Promise.all(list.map((x) => x.run())).then(Either.lefts),
|
||||||
|
rights: (list) => Promise.all(list.map((x) => x.run())).then(Either.rights),
|
||||||
|
sequence: (eas) => EitherAsync(async (helpers2) => {
|
||||||
|
let res = [];
|
||||||
|
for await (const e of eas) {
|
||||||
|
if (e.isLeft()) {
|
||||||
|
return helpers2.liftEither(e);
|
||||||
|
}
|
||||||
|
res.push(e.extract());
|
||||||
|
}
|
||||||
|
return helpers2.liftEither(right(res));
|
||||||
|
}),
|
||||||
|
all: (eas) => EitherAsync.fromPromise(async () => Promise.all(eas).then(Either.sequence))
|
||||||
|
});
|
||||||
|
EitherAsyncImpl.prototype.constructor = EitherAsync;
|
||||||
|
var _a;
|
||||||
|
const helpers = {
|
||||||
|
liftMaybe(maybe) {
|
||||||
|
if (maybe.isJust()) {
|
||||||
|
return Promise.resolve(maybe.extract());
|
||||||
|
}
|
||||||
|
throw nothing;
|
||||||
|
},
|
||||||
|
fromPromise(promise) {
|
||||||
|
return promise.then(helpers.liftMaybe);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
class MaybeAsyncImpl {
|
||||||
|
constructor(runPromise) {
|
||||||
|
this.runPromise = runPromise;
|
||||||
|
this[_a] = "MaybeAsync";
|
||||||
|
this["fantasy-land/chain"] = this.chain;
|
||||||
|
this["fantasy-land/filter"] = this.filter;
|
||||||
|
this["fantasy-land/alt"] = this.alt;
|
||||||
|
}
|
||||||
|
orDefault(defaultValue) {
|
||||||
|
return this.run().then((x) => x.orDefault(defaultValue));
|
||||||
|
}
|
||||||
|
join() {
|
||||||
|
return MaybeAsync(async (helpers2) => {
|
||||||
|
const maybe = await this.run();
|
||||||
|
if (maybe.isJust()) {
|
||||||
|
const nestedMaybe = await maybe.extract();
|
||||||
|
return helpers2.liftMaybe(nestedMaybe);
|
||||||
|
}
|
||||||
|
return helpers2.liftMaybe(nothing);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
ap(maybeF) {
|
||||||
|
return MaybeAsync(async (helpers2) => {
|
||||||
|
const otherValue = await maybeF;
|
||||||
|
if (otherValue.isJust()) {
|
||||||
|
const thisValue = await this.run();
|
||||||
|
if (thisValue.isJust()) {
|
||||||
|
return otherValue.extract()(thisValue.extract());
|
||||||
|
} else {
|
||||||
|
return helpers2.liftMaybe(nothing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return helpers2.liftMaybe(nothing);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
alt(other) {
|
||||||
|
return MaybeAsync(async (helpers2) => {
|
||||||
|
const thisValue = await this.run();
|
||||||
|
if (thisValue.isJust()) {
|
||||||
|
return thisValue.extract();
|
||||||
|
} else {
|
||||||
|
const otherValue = await other;
|
||||||
|
return helpers2.liftMaybe(otherValue);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
extend(f) {
|
||||||
|
return MaybeAsync(async (helpers2) => {
|
||||||
|
const maybe = await this.run();
|
||||||
|
if (maybe.isJust()) {
|
||||||
|
const v = MaybeAsync.liftMaybe(maybe);
|
||||||
|
return helpers2.liftMaybe(just(f(v)));
|
||||||
|
}
|
||||||
|
return helpers2.liftMaybe(nothing);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
filter(pred) {
|
||||||
|
return MaybeAsync(async (helpers2) => {
|
||||||
|
const value = await this.run();
|
||||||
|
return helpers2.liftMaybe(value.filter(pred));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async run() {
|
||||||
|
try {
|
||||||
|
return just(await this.runPromise(helpers));
|
||||||
|
} catch {
|
||||||
|
return nothing;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
map(f) {
|
||||||
|
return MaybeAsync((helpers2) => this.runPromise(helpers2).then(f));
|
||||||
|
}
|
||||||
|
chain(f) {
|
||||||
|
return MaybeAsync(async (helpers2) => {
|
||||||
|
const value = await this.runPromise(helpers2);
|
||||||
|
return helpers2.fromPromise(f(value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
toEitherAsync(error) {
|
||||||
|
return EitherAsync(async ({ liftEither }) => {
|
||||||
|
const maybe = await this.run();
|
||||||
|
return liftEither(maybe.toEither(error));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
ifJust(effect) {
|
||||||
|
return MaybeAsync(async (helpers2) => {
|
||||||
|
const maybe = await this.run();
|
||||||
|
maybe.ifJust(effect);
|
||||||
|
return helpers2.liftMaybe(maybe);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
ifNothing(effect) {
|
||||||
|
return MaybeAsync(async (helpers2) => {
|
||||||
|
const maybe = await this.run();
|
||||||
|
maybe.ifNothing(effect);
|
||||||
|
return helpers2.liftMaybe(maybe);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
void() {
|
||||||
|
return this.map((_) => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
caseOf(patterns) {
|
||||||
|
return this.run().then((x) => x.caseOf(patterns));
|
||||||
|
}
|
||||||
|
finally(effect) {
|
||||||
|
return MaybeAsync(({ fromPromise }) => fromPromise(this.run().finally(effect)));
|
||||||
|
}
|
||||||
|
then(onfulfilled, onrejected) {
|
||||||
|
return this.run().then(onfulfilled, onrejected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_a = Symbol.toStringTag;
|
||||||
|
const MaybeAsync = Object.assign((runPromise) => new MaybeAsyncImpl(runPromise), {
|
||||||
|
catMaybes: (list) => Promise.all(list).then(Maybe.catMaybes),
|
||||||
|
fromPromise: (f) => MaybeAsync(({ fromPromise: fP }) => fP(f())),
|
||||||
|
liftMaybe: (maybe) => MaybeAsync(({ liftMaybe }) => liftMaybe(maybe))
|
||||||
|
});
|
||||||
|
MaybeAsyncImpl.prototype.constructor = MaybeAsync;
|
||||||
|
const ETATS = _etats;
|
||||||
|
const requeteRecuperePanier = () => fetch(
|
||||||
|
ROUTE_API_PANIER,
|
||||||
|
{
|
||||||
|
credentials: "same-origin",
|
||||||
|
headers: {
|
||||||
|
"Accept": "application/json",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
[ENTETE_WC_NONCE]: ETATS.nonce
|
||||||
|
},
|
||||||
|
method: "GET",
|
||||||
|
mode: "same-origin",
|
||||||
|
signal: AbortSignal.timeout(5e3)
|
||||||
|
}
|
||||||
|
).then(right).catch(left);
|
||||||
|
EitherAsync.fromPromise(requeteRecuperePanier).map((a) => a.json()).ifLeft((e) => {
|
||||||
|
console.error(e);
|
||||||
|
});
|
||||||
//# sourceMappingURL=gestion-panier.js.map
|
//# sourceMappingURL=gestion-panier.js.map
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
574
web/app/themes/haiku-atelier-2024/assets/js/index.DD7qm8S6.js
Normal file
574
web/app/themes/haiku-atelier-2024/assets/js/index.DD7qm8S6.js
Normal file
|
|
@ -0,0 +1,574 @@
|
||||||
|
var __defProp = Object.defineProperty;
|
||||||
|
var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
|
||||||
|
var __publicField = (obj, key, value2) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value2);
|
||||||
|
var store;
|
||||||
|
function getGlobalConfig(config2) {
|
||||||
|
return {
|
||||||
|
lang: config2?.lang ?? store?.lang,
|
||||||
|
message: config2?.message,
|
||||||
|
abortEarly: config2?.abortEarly ?? store?.abortEarly,
|
||||||
|
abortPipeEarly: config2?.abortPipeEarly ?? store?.abortPipeEarly
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var store2;
|
||||||
|
function getGlobalMessage(lang) {
|
||||||
|
return store2?.get(lang);
|
||||||
|
}
|
||||||
|
var store3;
|
||||||
|
function getSchemaMessage(lang) {
|
||||||
|
return store3?.get(lang);
|
||||||
|
}
|
||||||
|
var store4;
|
||||||
|
function getSpecificMessage(reference, lang) {
|
||||||
|
return store4?.get(reference)?.get(lang);
|
||||||
|
}
|
||||||
|
function _stringify(input) {
|
||||||
|
const type = typeof input;
|
||||||
|
if (type === "string") {
|
||||||
|
return `"${input}"`;
|
||||||
|
}
|
||||||
|
if (type === "number" || type === "bigint" || type === "boolean") {
|
||||||
|
return `${input}`;
|
||||||
|
}
|
||||||
|
if (type === "object" || type === "function") {
|
||||||
|
return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null";
|
||||||
|
}
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
function _addIssue(context, label, dataset, config2, other) {
|
||||||
|
const input = other && "input" in other ? other.input : dataset.value;
|
||||||
|
const expected = other?.expected ?? context.expects ?? null;
|
||||||
|
const received = other?.received ?? _stringify(input);
|
||||||
|
const issue = {
|
||||||
|
kind: context.kind,
|
||||||
|
type: context.type,
|
||||||
|
input,
|
||||||
|
expected,
|
||||||
|
received,
|
||||||
|
message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`,
|
||||||
|
requirement: context.requirement,
|
||||||
|
path: other?.path,
|
||||||
|
issues: other?.issues,
|
||||||
|
lang: config2.lang,
|
||||||
|
abortEarly: config2.abortEarly,
|
||||||
|
abortPipeEarly: config2.abortPipeEarly
|
||||||
|
};
|
||||||
|
const isSchema = context.kind === "schema";
|
||||||
|
const message = other?.message ?? context.message ?? getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? getSchemaMessage(issue.lang) : null) ?? config2.message ?? getGlobalMessage(issue.lang);
|
||||||
|
if (message) {
|
||||||
|
issue.message = typeof message === "function" ? (
|
||||||
|
// @ts-expect-error
|
||||||
|
message(issue)
|
||||||
|
) : message;
|
||||||
|
}
|
||||||
|
if (isSchema) {
|
||||||
|
dataset.typed = false;
|
||||||
|
}
|
||||||
|
if (dataset.issues) {
|
||||||
|
dataset.issues.push(issue);
|
||||||
|
} else {
|
||||||
|
dataset.issues = [issue];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function _joinExpects(values, separator) {
|
||||||
|
const list = [...new Set(values)];
|
||||||
|
if (list.length > 1) {
|
||||||
|
return `(${list.join(` ${separator} `)})`;
|
||||||
|
}
|
||||||
|
return list[0] ?? "never";
|
||||||
|
}
|
||||||
|
var ValiError = class extends Error {
|
||||||
|
/**
|
||||||
|
* Creates a Valibot error with useful information.
|
||||||
|
*
|
||||||
|
* @param issues The error issues.
|
||||||
|
*/
|
||||||
|
constructor(issues) {
|
||||||
|
super(issues[0].message);
|
||||||
|
/**
|
||||||
|
* The error issues.
|
||||||
|
*/
|
||||||
|
__publicField(this, "issues");
|
||||||
|
this.name = "ValiError";
|
||||||
|
this.issues = issues;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function integer(message) {
|
||||||
|
return {
|
||||||
|
kind: "validation",
|
||||||
|
type: "integer",
|
||||||
|
reference: integer,
|
||||||
|
async: false,
|
||||||
|
expects: null,
|
||||||
|
requirement: Number.isInteger,
|
||||||
|
message,
|
||||||
|
"~validate"(dataset, config2) {
|
||||||
|
if (dataset.typed && !this.requirement(dataset.value)) {
|
||||||
|
_addIssue(this, "integer", dataset, config2);
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function minValue(requirement, message) {
|
||||||
|
return {
|
||||||
|
kind: "validation",
|
||||||
|
type: "min_value",
|
||||||
|
reference: minValue,
|
||||||
|
async: false,
|
||||||
|
expects: `>=${requirement instanceof Date ? requirement.toJSON() : _stringify(requirement)}`,
|
||||||
|
requirement,
|
||||||
|
message,
|
||||||
|
"~validate"(dataset, config2) {
|
||||||
|
if (dataset.typed && dataset.value < this.requirement) {
|
||||||
|
_addIssue(this, "value", dataset, config2, {
|
||||||
|
received: dataset.value instanceof Date ? dataset.value.toJSON() : _stringify(dataset.value)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function url(message) {
|
||||||
|
return {
|
||||||
|
kind: "validation",
|
||||||
|
type: "url",
|
||||||
|
reference: url,
|
||||||
|
async: false,
|
||||||
|
expects: null,
|
||||||
|
requirement(input) {
|
||||||
|
try {
|
||||||
|
new URL(input);
|
||||||
|
return true;
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
message,
|
||||||
|
"~validate"(dataset, config2) {
|
||||||
|
if (dataset.typed && !this.requirement(dataset.value)) {
|
||||||
|
_addIssue(this, "URL", dataset, config2);
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function value(requirement, message) {
|
||||||
|
return {
|
||||||
|
kind: "validation",
|
||||||
|
type: "value",
|
||||||
|
reference: value,
|
||||||
|
async: false,
|
||||||
|
expects: requirement instanceof Date ? requirement.toJSON() : _stringify(requirement),
|
||||||
|
requirement,
|
||||||
|
message,
|
||||||
|
"~validate"(dataset, config2) {
|
||||||
|
if (dataset.typed && !(this.requirement <= dataset.value && this.requirement >= dataset.value)) {
|
||||||
|
_addIssue(this, "value", dataset, config2, {
|
||||||
|
received: dataset.value instanceof Date ? dataset.value.toJSON() : _stringify(dataset.value)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function getDefault(schema, dataset, config2) {
|
||||||
|
return typeof schema.default === "function" ? (
|
||||||
|
// @ts-expect-error
|
||||||
|
schema.default(dataset, config2)
|
||||||
|
) : (
|
||||||
|
// @ts-expect-error
|
||||||
|
schema.default
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function is(schema, input) {
|
||||||
|
return !schema["~validate"]({ value: input }, { abortEarly: true }).issues;
|
||||||
|
}
|
||||||
|
function array(item, message) {
|
||||||
|
return {
|
||||||
|
kind: "schema",
|
||||||
|
type: "array",
|
||||||
|
reference: array,
|
||||||
|
expects: "Array",
|
||||||
|
async: false,
|
||||||
|
item,
|
||||||
|
message,
|
||||||
|
"~standard": 1,
|
||||||
|
"~vendor": "valibot",
|
||||||
|
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||||
|
const input = dataset.value;
|
||||||
|
if (Array.isArray(input)) {
|
||||||
|
dataset.typed = true;
|
||||||
|
dataset.value = [];
|
||||||
|
for (let key = 0; key < input.length; key++) {
|
||||||
|
const value2 = input[key];
|
||||||
|
const itemDataset = this.item["~validate"]({ value: value2 }, config2);
|
||||||
|
if (itemDataset.issues) {
|
||||||
|
const pathItem = {
|
||||||
|
type: "array",
|
||||||
|
origin: "value",
|
||||||
|
input,
|
||||||
|
key,
|
||||||
|
value: value2
|
||||||
|
};
|
||||||
|
for (const issue of itemDataset.issues) {
|
||||||
|
if (issue.path) {
|
||||||
|
issue.path.unshift(pathItem);
|
||||||
|
} else {
|
||||||
|
issue.path = [pathItem];
|
||||||
|
}
|
||||||
|
dataset.issues?.push(issue);
|
||||||
|
}
|
||||||
|
if (!dataset.issues) {
|
||||||
|
dataset.issues = itemDataset.issues;
|
||||||
|
}
|
||||||
|
if (config2.abortEarly) {
|
||||||
|
dataset.typed = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!itemDataset.typed) {
|
||||||
|
dataset.typed = false;
|
||||||
|
}
|
||||||
|
dataset.value.push(itemDataset.value);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_addIssue(this, "type", dataset, config2);
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function boolean(message) {
|
||||||
|
return {
|
||||||
|
kind: "schema",
|
||||||
|
type: "boolean",
|
||||||
|
reference: boolean,
|
||||||
|
expects: "boolean",
|
||||||
|
async: false,
|
||||||
|
message,
|
||||||
|
"~standard": 1,
|
||||||
|
"~vendor": "valibot",
|
||||||
|
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||||
|
if (typeof dataset.value === "boolean") {
|
||||||
|
dataset.typed = true;
|
||||||
|
} else {
|
||||||
|
_addIssue(this, "type", dataset, config2);
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function enum_(enum__, message) {
|
||||||
|
const options = Object.entries(enum__).filter(([key]) => isNaN(+key)).map(([, value2]) => value2);
|
||||||
|
return {
|
||||||
|
kind: "schema",
|
||||||
|
type: "enum",
|
||||||
|
reference: enum_,
|
||||||
|
expects: _joinExpects(options.map(_stringify), "|"),
|
||||||
|
async: false,
|
||||||
|
enum: enum__,
|
||||||
|
options,
|
||||||
|
message,
|
||||||
|
"~standard": 1,
|
||||||
|
"~vendor": "valibot",
|
||||||
|
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||||
|
if (this.options.includes(dataset.value)) {
|
||||||
|
dataset.typed = true;
|
||||||
|
} else {
|
||||||
|
_addIssue(this, "type", dataset, config2);
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function null_(message) {
|
||||||
|
return {
|
||||||
|
kind: "schema",
|
||||||
|
type: "null",
|
||||||
|
reference: null_,
|
||||||
|
expects: "null",
|
||||||
|
async: false,
|
||||||
|
message,
|
||||||
|
"~standard": 1,
|
||||||
|
"~vendor": "valibot",
|
||||||
|
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||||
|
if (dataset.value === null) {
|
||||||
|
dataset.typed = true;
|
||||||
|
} else {
|
||||||
|
_addIssue(this, "type", dataset, config2);
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function number(message) {
|
||||||
|
return {
|
||||||
|
kind: "schema",
|
||||||
|
type: "number",
|
||||||
|
reference: number,
|
||||||
|
expects: "number",
|
||||||
|
async: false,
|
||||||
|
message,
|
||||||
|
"~standard": 1,
|
||||||
|
"~vendor": "valibot",
|
||||||
|
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||||
|
if (typeof dataset.value === "number" && !isNaN(dataset.value)) {
|
||||||
|
dataset.typed = true;
|
||||||
|
} else {
|
||||||
|
_addIssue(this, "type", dataset, config2);
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function object(entries, message) {
|
||||||
|
return {
|
||||||
|
kind: "schema",
|
||||||
|
type: "object",
|
||||||
|
reference: object,
|
||||||
|
expects: "Object",
|
||||||
|
async: false,
|
||||||
|
entries,
|
||||||
|
message,
|
||||||
|
"~standard": 1,
|
||||||
|
"~vendor": "valibot",
|
||||||
|
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||||
|
const input = dataset.value;
|
||||||
|
if (input && typeof input === "object") {
|
||||||
|
dataset.typed = true;
|
||||||
|
dataset.value = {};
|
||||||
|
for (const key in this.entries) {
|
||||||
|
const value2 = input[key];
|
||||||
|
const valueDataset = this.entries[key]["~validate"](
|
||||||
|
{ value: value2 },
|
||||||
|
config2
|
||||||
|
);
|
||||||
|
if (valueDataset.issues) {
|
||||||
|
const pathItem = {
|
||||||
|
type: "object",
|
||||||
|
origin: "value",
|
||||||
|
input,
|
||||||
|
key,
|
||||||
|
value: value2
|
||||||
|
};
|
||||||
|
for (const issue of valueDataset.issues) {
|
||||||
|
if (issue.path) {
|
||||||
|
issue.path.unshift(pathItem);
|
||||||
|
} else {
|
||||||
|
issue.path = [pathItem];
|
||||||
|
}
|
||||||
|
dataset.issues?.push(issue);
|
||||||
|
}
|
||||||
|
if (!dataset.issues) {
|
||||||
|
dataset.issues = valueDataset.issues;
|
||||||
|
}
|
||||||
|
if (config2.abortEarly) {
|
||||||
|
dataset.typed = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!valueDataset.typed) {
|
||||||
|
dataset.typed = false;
|
||||||
|
}
|
||||||
|
if (valueDataset.value !== void 0 || key in input) {
|
||||||
|
dataset.value[key] = valueDataset.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_addIssue(this, "type", dataset, config2);
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function optional(wrapped, ...args) {
|
||||||
|
const schema = {
|
||||||
|
kind: "schema",
|
||||||
|
type: "optional",
|
||||||
|
reference: optional,
|
||||||
|
expects: `(${wrapped.expects} | undefined)`,
|
||||||
|
async: false,
|
||||||
|
wrapped,
|
||||||
|
"~standard": 1,
|
||||||
|
"~vendor": "valibot",
|
||||||
|
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||||
|
if (dataset.value === void 0) {
|
||||||
|
if ("default" in this) {
|
||||||
|
dataset.value = getDefault(this, dataset, config2);
|
||||||
|
}
|
||||||
|
if (dataset.value === void 0) {
|
||||||
|
dataset.typed = true;
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.wrapped["~validate"](dataset, config2);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (0 in args) {
|
||||||
|
schema.default = args[0];
|
||||||
|
}
|
||||||
|
return schema;
|
||||||
|
}
|
||||||
|
function string(message) {
|
||||||
|
return {
|
||||||
|
kind: "schema",
|
||||||
|
type: "string",
|
||||||
|
reference: string,
|
||||||
|
expects: "string",
|
||||||
|
async: false,
|
||||||
|
message,
|
||||||
|
"~standard": 1,
|
||||||
|
"~vendor": "valibot",
|
||||||
|
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||||
|
if (typeof dataset.value === "string") {
|
||||||
|
dataset.typed = true;
|
||||||
|
} else {
|
||||||
|
_addIssue(this, "type", dataset, config2);
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function _subIssues(datasets) {
|
||||||
|
let issues;
|
||||||
|
if (datasets) {
|
||||||
|
for (const dataset of datasets) {
|
||||||
|
if (issues) {
|
||||||
|
issues.push(...dataset.issues);
|
||||||
|
} else {
|
||||||
|
issues = dataset.issues;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return issues;
|
||||||
|
}
|
||||||
|
function union(options, message) {
|
||||||
|
return {
|
||||||
|
kind: "schema",
|
||||||
|
type: "union",
|
||||||
|
reference: union,
|
||||||
|
expects: _joinExpects(
|
||||||
|
options.map((option) => option.expects),
|
||||||
|
"|"
|
||||||
|
),
|
||||||
|
async: false,
|
||||||
|
options,
|
||||||
|
message,
|
||||||
|
"~standard": 1,
|
||||||
|
"~vendor": "valibot",
|
||||||
|
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||||
|
let validDataset;
|
||||||
|
let typedDatasets;
|
||||||
|
let untypedDatasets;
|
||||||
|
for (const schema of this.options) {
|
||||||
|
const optionDataset = schema["~validate"](
|
||||||
|
{ value: dataset.value },
|
||||||
|
config2
|
||||||
|
);
|
||||||
|
if (optionDataset.typed) {
|
||||||
|
if (optionDataset.issues) {
|
||||||
|
if (typedDatasets) {
|
||||||
|
typedDatasets.push(optionDataset);
|
||||||
|
} else {
|
||||||
|
typedDatasets = [optionDataset];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
validDataset = optionDataset;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (untypedDatasets) {
|
||||||
|
untypedDatasets.push(optionDataset);
|
||||||
|
} else {
|
||||||
|
untypedDatasets = [optionDataset];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (validDataset) {
|
||||||
|
return validDataset;
|
||||||
|
}
|
||||||
|
if (typedDatasets) {
|
||||||
|
if (typedDatasets.length === 1) {
|
||||||
|
return typedDatasets[0];
|
||||||
|
}
|
||||||
|
_addIssue(this, "type", dataset, config2, {
|
||||||
|
issues: _subIssues(typedDatasets)
|
||||||
|
});
|
||||||
|
dataset.typed = true;
|
||||||
|
} else if (untypedDatasets?.length === 1) {
|
||||||
|
return untypedDatasets[0];
|
||||||
|
} else {
|
||||||
|
_addIssue(this, "type", dataset, config2, {
|
||||||
|
issues: _subIssues(untypedDatasets)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function unknown() {
|
||||||
|
return {
|
||||||
|
kind: "schema",
|
||||||
|
type: "unknown",
|
||||||
|
reference: unknown,
|
||||||
|
expects: "unknown",
|
||||||
|
async: false,
|
||||||
|
"~standard": 1,
|
||||||
|
"~vendor": "valibot",
|
||||||
|
"~validate"(dataset) {
|
||||||
|
dataset.typed = true;
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function parse(schema, input, config2) {
|
||||||
|
const dataset = schema["~validate"](
|
||||||
|
{ value: input },
|
||||||
|
getGlobalConfig(config2)
|
||||||
|
);
|
||||||
|
if (dataset.issues) {
|
||||||
|
throw new ValiError(dataset.issues);
|
||||||
|
}
|
||||||
|
return dataset.value;
|
||||||
|
}
|
||||||
|
function pipe(...pipe2) {
|
||||||
|
return {
|
||||||
|
...pipe2[0],
|
||||||
|
pipe: pipe2,
|
||||||
|
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||||
|
for (const item of pipe2) {
|
||||||
|
if (item.kind !== "metadata") {
|
||||||
|
if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
|
||||||
|
dataset.typed = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!dataset.issues || !config2.abortEarly && !config2.abortPipeEarly) {
|
||||||
|
dataset = item["~validate"](dataset, config2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
export {
|
||||||
|
optional as a,
|
||||||
|
array as b,
|
||||||
|
pipe as c,
|
||||||
|
boolean as d,
|
||||||
|
enum_ as e,
|
||||||
|
union as f,
|
||||||
|
null_ as g,
|
||||||
|
url as h,
|
||||||
|
is as i,
|
||||||
|
integer as j,
|
||||||
|
minValue as m,
|
||||||
|
number as n,
|
||||||
|
object as o,
|
||||||
|
parse as p,
|
||||||
|
string as s,
|
||||||
|
unknown as u,
|
||||||
|
value as v
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=index.DD7qm8S6.js.map
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
265
web/app/themes/haiku-atelier-2024/assets/js/index.y02cst4L.js
Normal file
265
web/app/themes/haiku-atelier-2024/assets/js/index.y02cst4L.js
Normal file
|
|
@ -0,0 +1,265 @@
|
||||||
|
function u$2(t2, n2, a2) {
|
||||||
|
let o2 = (r2) => t2(r2, ...n2);
|
||||||
|
return a2 === void 0 ? o2 : Object.assign(o2, { lazy: a2, lazyArgs: n2 });
|
||||||
|
}
|
||||||
|
function u$1(r2, n2, a2) {
|
||||||
|
let o2 = r2.length - n2.length;
|
||||||
|
if (o2 === 0) return r2(...n2);
|
||||||
|
if (o2 === 1) return u$2(r2, n2, a2);
|
||||||
|
throw new Error("Wrong number of arguments");
|
||||||
|
}
|
||||||
|
function r$1(...n2) {
|
||||||
|
return u$1(e$1, n2);
|
||||||
|
}
|
||||||
|
function e$1(n2, o2) {
|
||||||
|
return o2(n2), n2;
|
||||||
|
}
|
||||||
|
function p$1(...o2) {
|
||||||
|
return u$1(t$1, o2);
|
||||||
|
}
|
||||||
|
var t$1 = (o2, e2) => o2[e2];
|
||||||
|
const t = Symbol.for("@ts-pattern/matcher"), e = Symbol.for("@ts-pattern/isVariadic"), n = "@ts-pattern/anonymous-select-key", r = (t2) => Boolean(t2 && "object" == typeof t2), i = (e2) => e2 && !!e2[t], s = (n2, o2, c2) => {
|
||||||
|
if (i(n2)) {
|
||||||
|
const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(o2);
|
||||||
|
return r2 && i2 && Object.keys(i2).forEach((t2) => c2(t2, i2[t2])), r2;
|
||||||
|
}
|
||||||
|
if (r(n2)) {
|
||||||
|
if (!r(o2)) return false;
|
||||||
|
if (Array.isArray(n2)) {
|
||||||
|
if (!Array.isArray(o2)) return false;
|
||||||
|
let t2 = [], r2 = [], a2 = [];
|
||||||
|
for (const s2 of n2.keys()) {
|
||||||
|
const o3 = n2[s2];
|
||||||
|
i(o3) && o3[e] ? a2.push(o3) : a2.length ? r2.push(o3) : t2.push(o3);
|
||||||
|
}
|
||||||
|
if (a2.length) {
|
||||||
|
if (a2.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
|
||||||
|
if (o2.length < t2.length + r2.length) return false;
|
||||||
|
const e2 = o2.slice(0, t2.length), n3 = 0 === r2.length ? [] : o2.slice(-r2.length), i2 = o2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
|
||||||
|
return t2.every((t3, n4) => s(t3, e2[n4], c2)) && r2.every((t3, e3) => s(t3, n3[e3], c2)) && (0 === a2.length || s(a2[0], i2, c2));
|
||||||
|
}
|
||||||
|
return n2.length === o2.length && n2.every((t3, e2) => s(t3, o2[e2], c2));
|
||||||
|
}
|
||||||
|
return Reflect.ownKeys(n2).every((e2) => {
|
||||||
|
const r2 = n2[e2];
|
||||||
|
return (e2 in o2 || i(a2 = r2) && "optional" === a2[t]().matcherType) && s(r2, o2[e2], c2);
|
||||||
|
var a2;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return Object.is(o2, n2);
|
||||||
|
}, o = (e2) => {
|
||||||
|
var n2, s2, a2;
|
||||||
|
return r(e2) ? i(e2) ? null != (n2 = null == (s2 = (a2 = e2[t]()).getSelectionKeys) ? void 0 : s2.call(a2)) ? n2 : [] : Array.isArray(e2) ? c(e2, o) : c(Object.values(e2), o) : [];
|
||||||
|
}, c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
|
||||||
|
function a(...t2) {
|
||||||
|
if (1 === t2.length) {
|
||||||
|
const [e2] = t2;
|
||||||
|
return (t3) => s(e2, t3, () => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (2 === t2.length) {
|
||||||
|
const [e2, n2] = t2;
|
||||||
|
return s(e2, n2, () => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t2.length}.`);
|
||||||
|
}
|
||||||
|
function u(t2) {
|
||||||
|
return Object.assign(t2, { optional: () => h(t2), and: (e2) => m(t2, e2), or: (e2) => d(t2, e2), select: (e2) => void 0 === e2 ? y(t2) : y(e2, t2) });
|
||||||
|
}
|
||||||
|
function l(t2) {
|
||||||
|
return Object.assign(((t3) => Object.assign(t3, { [Symbol.iterator]() {
|
||||||
|
let n2 = 0;
|
||||||
|
const r2 = [{ value: Object.assign(t3, { [e]: true }), done: false }, { done: true, value: void 0 }];
|
||||||
|
return { next: () => {
|
||||||
|
var t4;
|
||||||
|
return null != (t4 = r2[n2++]) ? t4 : r2.at(-1);
|
||||||
|
} };
|
||||||
|
} }))(t2), { optional: () => l(h(t2)), select: (e2) => l(void 0 === e2 ? y(t2) : y(e2, t2)) });
|
||||||
|
}
|
||||||
|
function h(e2) {
|
||||||
|
return u({ [t]: () => ({ match: (t2) => {
|
||||||
|
let n2 = {};
|
||||||
|
const r2 = (t3, e3) => {
|
||||||
|
n2[t3] = e3;
|
||||||
|
};
|
||||||
|
return void 0 === t2 ? (o(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: s(e2, t2, r2), selections: n2 };
|
||||||
|
}, getSelectionKeys: () => o(e2), matcherType: "optional" }) });
|
||||||
|
}
|
||||||
|
const f = (t2, e2) => {
|
||||||
|
for (const n2 of t2) if (!e2(n2)) return false;
|
||||||
|
return true;
|
||||||
|
}, g = (t2, e2) => {
|
||||||
|
for (const [n2, r2] of t2.entries()) if (!e2(r2, n2)) return false;
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
function m(...e2) {
|
||||||
|
return u({ [t]: () => ({ match: (t2) => {
|
||||||
|
let n2 = {};
|
||||||
|
const r2 = (t3, e3) => {
|
||||||
|
n2[t3] = e3;
|
||||||
|
};
|
||||||
|
return { matched: e2.every((e3) => s(e3, t2, r2)), selections: n2 };
|
||||||
|
}, getSelectionKeys: () => c(e2, o), matcherType: "and" }) });
|
||||||
|
}
|
||||||
|
function d(...e2) {
|
||||||
|
return u({ [t]: () => ({ match: (t2) => {
|
||||||
|
let n2 = {};
|
||||||
|
const r2 = (t3, e3) => {
|
||||||
|
n2[t3] = e3;
|
||||||
|
};
|
||||||
|
return c(e2, o).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => s(e3, t2, r2)), selections: n2 };
|
||||||
|
}, getSelectionKeys: () => c(e2, o), matcherType: "or" }) });
|
||||||
|
}
|
||||||
|
function p(e2) {
|
||||||
|
return { [t]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
|
||||||
|
}
|
||||||
|
function y(...e2) {
|
||||||
|
const r2 = "string" == typeof e2[0] ? e2[0] : void 0, i2 = 2 === e2.length ? e2[1] : "string" == typeof e2[0] ? void 0 : e2[0];
|
||||||
|
return u({ [t]: () => ({ match: (t2) => {
|
||||||
|
let e3 = { [null != r2 ? r2 : n]: t2 };
|
||||||
|
return { matched: void 0 === i2 || s(i2, t2, (t3, n2) => {
|
||||||
|
e3[t3] = n2;
|
||||||
|
}), selections: e3 };
|
||||||
|
}, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : o(i2)) }) });
|
||||||
|
}
|
||||||
|
function v(t2) {
|
||||||
|
return "number" == typeof t2;
|
||||||
|
}
|
||||||
|
function b(t2) {
|
||||||
|
return "string" == typeof t2;
|
||||||
|
}
|
||||||
|
function w(t2) {
|
||||||
|
return "bigint" == typeof t2;
|
||||||
|
}
|
||||||
|
const S = u(p(function(t2) {
|
||||||
|
return true;
|
||||||
|
})), O = S, j = (t2) => Object.assign(u(t2), { startsWith: (e2) => {
|
||||||
|
return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.startsWith(n2)))));
|
||||||
|
var n2;
|
||||||
|
}, endsWith: (e2) => {
|
||||||
|
return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.endsWith(n2)))));
|
||||||
|
var n2;
|
||||||
|
}, minLength: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length >= t3))(e2))), length: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length === t3))(e2))), maxLength: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length <= t3))(e2))), includes: (e2) => {
|
||||||
|
return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.includes(n2)))));
|
||||||
|
var n2;
|
||||||
|
}, regex: (e2) => {
|
||||||
|
return j(m(t2, (n2 = e2, p((t3) => b(t3) && Boolean(t3.match(n2))))));
|
||||||
|
var n2;
|
||||||
|
} }), K = j(p(b)), x = (t2) => Object.assign(u(t2), { between: (e2, n2) => x(m(t2, ((t3, e3) => p((n3) => v(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 < t3))(e2))), gt: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 > t3))(e2))), lte: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 <= t3))(e2))), gte: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 >= t3))(e2))), int: () => x(m(t2, p((t3) => v(t3) && Number.isInteger(t3)))), finite: () => x(m(t2, p((t3) => v(t3) && Number.isFinite(t3)))), positive: () => x(m(t2, p((t3) => v(t3) && t3 > 0))), negative: () => x(m(t2, p((t3) => v(t3) && t3 < 0))) }), E = x(p(v)), A = (t2) => Object.assign(u(t2), { between: (e2, n2) => A(m(t2, ((t3, e3) => p((n3) => w(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 < t3))(e2))), gt: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 > t3))(e2))), lte: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 <= t3))(e2))), gte: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 >= t3))(e2))), positive: () => A(m(t2, p((t3) => w(t3) && t3 > 0))), negative: () => A(m(t2, p((t3) => w(t3) && t3 < 0))) }), P = A(p(w)), T = u(p(function(t2) {
|
||||||
|
return "boolean" == typeof t2;
|
||||||
|
})), B = u(p(function(t2) {
|
||||||
|
return "symbol" == typeof t2;
|
||||||
|
})), _ = u(p(function(t2) {
|
||||||
|
return null == t2;
|
||||||
|
})), k = u(p(function(t2) {
|
||||||
|
return null != t2;
|
||||||
|
}));
|
||||||
|
var N = { __proto__: null, matcher: t, optional: h, array: function(...e2) {
|
||||||
|
return l({ [t]: () => ({ match: (t2) => {
|
||||||
|
if (!Array.isArray(t2)) return { matched: false };
|
||||||
|
if (0 === e2.length) return { matched: true };
|
||||||
|
const n2 = e2[0];
|
||||||
|
let r2 = {};
|
||||||
|
if (0 === t2.length) return o(n2).forEach((t3) => {
|
||||||
|
r2[t3] = [];
|
||||||
|
}), { matched: true, selections: r2 };
|
||||||
|
const i2 = (t3, e3) => {
|
||||||
|
r2[t3] = (r2[t3] || []).concat([e3]);
|
||||||
|
};
|
||||||
|
return { matched: t2.every((t3) => s(n2, t3, i2)), selections: r2 };
|
||||||
|
}, getSelectionKeys: () => 0 === e2.length ? [] : o(e2[0]) }) });
|
||||||
|
}, set: function(...e2) {
|
||||||
|
return u({ [t]: () => ({ match: (t2) => {
|
||||||
|
if (!(t2 instanceof Set)) return { matched: false };
|
||||||
|
let n2 = {};
|
||||||
|
if (0 === t2.size) return { matched: true, selections: n2 };
|
||||||
|
if (0 === e2.length) return { matched: true };
|
||||||
|
const r2 = (t3, e3) => {
|
||||||
|
n2[t3] = (n2[t3] || []).concat([e3]);
|
||||||
|
}, i2 = e2[0];
|
||||||
|
return { matched: f(t2, (t3) => s(i2, t3, r2)), selections: n2 };
|
||||||
|
}, getSelectionKeys: () => 0 === e2.length ? [] : o(e2[0]) }) });
|
||||||
|
}, map: function(...e2) {
|
||||||
|
return u({ [t]: () => ({ match: (t2) => {
|
||||||
|
if (!(t2 instanceof Map)) return { matched: false };
|
||||||
|
let n2 = {};
|
||||||
|
if (0 === t2.size) return { matched: true, selections: n2 };
|
||||||
|
const r2 = (t3, e3) => {
|
||||||
|
n2[t3] = (n2[t3] || []).concat([e3]);
|
||||||
|
};
|
||||||
|
if (0 === e2.length) return { matched: true };
|
||||||
|
var i2;
|
||||||
|
if (1 === e2.length) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${null == (i2 = e2[0]) ? void 0 : i2.toString()}`);
|
||||||
|
const [o2, c2] = e2;
|
||||||
|
return { matched: g(t2, (t3, e3) => {
|
||||||
|
const n3 = s(o2, e3, r2), i3 = s(c2, t3, r2);
|
||||||
|
return n3 && i3;
|
||||||
|
}), selections: n2 };
|
||||||
|
}, getSelectionKeys: () => 0 === e2.length ? [] : [...o(e2[0]), ...o(e2[1])] }) });
|
||||||
|
}, intersection: m, union: d, not: function(e2) {
|
||||||
|
return u({ [t]: () => ({ match: (t2) => ({ matched: !s(e2, t2, () => {
|
||||||
|
}) }), getSelectionKeys: () => [], matcherType: "not" }) });
|
||||||
|
}, when: p, select: y, any: S, _: O, string: K, number: E, bigint: P, boolean: T, symbol: B, nullish: _, nonNullable: k, instanceOf: function(t2) {
|
||||||
|
return u(p(/* @__PURE__ */ function(t3) {
|
||||||
|
return (e2) => e2 instanceof t3;
|
||||||
|
}(t2)));
|
||||||
|
}, shape: function(t2) {
|
||||||
|
return u(p(a(t2)));
|
||||||
|
} };
|
||||||
|
class W extends Error {
|
||||||
|
constructor(t2) {
|
||||||
|
let e2;
|
||||||
|
try {
|
||||||
|
e2 = JSON.stringify(t2);
|
||||||
|
} catch (n2) {
|
||||||
|
e2 = t2;
|
||||||
|
}
|
||||||
|
super(`Pattern matching error: no pattern matches value ${e2}`), this.input = void 0, this.input = t2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const $ = { matched: false, value: void 0 };
|
||||||
|
function z(t2) {
|
||||||
|
return new I(t2, $);
|
||||||
|
}
|
||||||
|
class I {
|
||||||
|
constructor(t2, e2) {
|
||||||
|
this.input = void 0, this.state = void 0, this.input = t2, this.state = e2;
|
||||||
|
}
|
||||||
|
with(...t2) {
|
||||||
|
if (this.state.matched) return this;
|
||||||
|
const e2 = t2[t2.length - 1], r2 = [t2[0]];
|
||||||
|
let i2;
|
||||||
|
3 === t2.length && "function" == typeof t2[1] ? i2 = t2[1] : t2.length > 2 && r2.push(...t2.slice(1, t2.length - 1));
|
||||||
|
let o2 = false, c2 = {};
|
||||||
|
const a2 = (t3, e3) => {
|
||||||
|
o2 = true, c2[t3] = e3;
|
||||||
|
}, u2 = !r2.some((t3) => s(t3, this.input, a2)) || i2 && !Boolean(i2(this.input)) ? $ : { matched: true, value: e2(o2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
|
||||||
|
return new I(this.input, u2);
|
||||||
|
}
|
||||||
|
when(t2, e2) {
|
||||||
|
if (this.state.matched) return this;
|
||||||
|
const n2 = Boolean(t2(this.input));
|
||||||
|
return new I(this.input, n2 ? { matched: true, value: e2(this.input, this.input) } : $);
|
||||||
|
}
|
||||||
|
otherwise(t2) {
|
||||||
|
return this.state.matched ? this.state.value : t2(this.input);
|
||||||
|
}
|
||||||
|
exhaustive() {
|
||||||
|
if (this.state.matched) return this.state.value;
|
||||||
|
throw new W(this.input);
|
||||||
|
}
|
||||||
|
run() {
|
||||||
|
return this.exhaustive();
|
||||||
|
}
|
||||||
|
returnType() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export {
|
||||||
|
N,
|
||||||
|
p$1 as p,
|
||||||
|
r$1 as r,
|
||||||
|
z
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=index.y02cst4L.js.map
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,23 @@
|
||||||
import{p as a}from"./index.DYThEupQ.js";import{r as o}from"./erreurs.js";import{M as i}from"./messages2.js";import{E as s}from"./Either.DDEPhGsy.js";import"./exports.CqgMoAXr.js";import"./messages3.js";const E=r=>s.of(a(i,r.data)).ifLeft(e=>{o(e)});export{E as v};
|
import { p as parse } from "./index.DD7qm8S6.js";
|
||||||
|
import { r as reporteErreur } from "./erreurs.js";
|
||||||
|
import { M as MessageMajBoutonPanierSchema, a as MessageMajContenuPanierSchema } from "./messages2.js";
|
||||||
|
import { E as Either } from "./Either.wHNxn7Os.js";
|
||||||
|
import "./exports.DNZBdkMD.js";
|
||||||
|
import "./messages3.js";
|
||||||
|
import "./cart.js";
|
||||||
|
import "./cart2.js";
|
||||||
|
const valideMessageMajBoutonPanier = (evenementMessage) => Either.of(
|
||||||
|
parse(MessageMajBoutonPanierSchema, evenementMessage.data)
|
||||||
|
).ifLeft((erreur) => {
|
||||||
|
reporteErreur(erreur);
|
||||||
|
});
|
||||||
|
const valideMessageMajContenuPanier = (evenementMessage) => Either.of(
|
||||||
|
parse(MessageMajContenuPanierSchema, evenementMessage.data)
|
||||||
|
).ifLeft((erreur) => {
|
||||||
|
reporteErreur(erreur);
|
||||||
|
});
|
||||||
|
export {
|
||||||
|
valideMessageMajContenuPanier as a,
|
||||||
|
valideMessageMajBoutonPanier as v
|
||||||
|
};
|
||||||
//# sourceMappingURL=messages.js.map
|
//# sourceMappingURL=messages.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"messages.js","sources":["../../src/scripts/lib/messages.ts"],"sourcesContent":["import { Either } from \"purify-ts\";\nimport { parse, type ValiError } from \"valibot\";\n\nimport type { MiseAJourPanierMessage } from \"./types/messages\";\n\nimport { reporteErreur } from \"./erreurs.ts\";\nimport { MiseAJourPanierMessageSchema } from \"./schemas/messages.ts\";\n\nexport const valideMessageMajPanier = (\n evenementMessage: MessageEvent<unknown>,\n): Either<ValiError<typeof MiseAJourPanierMessageSchema>, MiseAJourPanierMessage> =>\n Either\n .of<ValiError<typeof MiseAJourPanierMessageSchema>, MiseAJourPanierMessage>(\n parse(MiseAJourPanierMessageSchema, evenementMessage.data),\n )\n .ifLeft(erreur => {\n reporteErreur(erreur);\n });\n"],"names":["parse","reporteErreur","MiseAJourPanierMessageSchema","Either","valideMessageMajPanier","evenementMessage","erreur"],"mappings":"AAQa,OAAA,KAAAA,MAAA,sBAAA,OAAA,KAAAC,MAAA,eAAA,OAAA,KAAAC,MAAA,iBAAA,OAAA,KAAAC,MAAA,uBAAA,MAAA,wBAAA,MAAA,iBAAA,MAAAC,EACXC,GAEAF,EACG,GACCH,EAAME,EAA8BG,EAAiB,IAAI,CAC3D,EACC,OAAiBC,GAAA,CAChBL,EAAcK,CAAM,CACtB,CAAC"}
|
{"version":3,"file":"messages.js","sources":["../../src/scripts/lib/messages.ts"],"sourcesContent":["import { Either } from \"purify-ts\";\nimport { parse, type ValiError } from \"valibot\";\n\nimport type { MessageMajBoutonPanier, MessageMajContenuPanier } from \"./types/messages\";\n\nimport { reporteErreur } from \"./erreurs.ts\";\nimport { MessageMajBoutonPanierSchema, MessageMajContenuPanierSchema } from \"./schemas/messages.ts\";\n\nexport const valideMessageMajBoutonPanier = (\n evenementMessage: MessageEvent<unknown>,\n): Either<ValiError<typeof MessageMajBoutonPanierSchema>, MessageMajBoutonPanier> =>\n Either\n .of<ValiError<typeof MessageMajBoutonPanierSchema>, MessageMajBoutonPanier>(\n parse(MessageMajBoutonPanierSchema, evenementMessage.data),\n )\n .ifLeft(erreur => {\n reporteErreur(erreur);\n });\n\nexport const valideMessageMajContenuPanier = (\n evenementMessage: MessageEvent<unknown>,\n): Either<ValiError<typeof MessageMajContenuPanierSchema>, MessageMajContenuPanier> =>\n Either\n .of<ValiError<typeof MessageMajContenuPanierSchema>, MessageMajContenuPanier>(\n parse(MessageMajContenuPanierSchema, evenementMessage.data),\n )\n .ifLeft(erreur => {\n reporteErreur(erreur);\n });\n"],"names":[],"mappings":";;;;;;;;AAQa,MAAA,+BAA+B,CAC1C,qBAEA,OACG;AAAA,EACC,MAAM,8BAA8B,iBAAiB,IAAI;AAC3D,EACC,OAAO,CAAU,WAAA;AAChB,gBAAc,MAAM;AACtB,CAAC;AAEQ,MAAA,gCAAgC,CAC3C,qBAEA,OACG;AAAA,EACC,MAAM,+BAA+B,iBAAiB,IAAI;AAC5D,EACC,OAAO,CAAU,WAAA;AAChB,gBAAc,MAAM;AACtB,CAAC;"}
|
||||||
|
|
@ -1,2 +1,22 @@
|
||||||
import{e as s,o as a,n as o,c as r,v as n,s as i}from"./index.DYThEupQ.js";import{T as e}from"./messages3.js";s(e);const p=a({donnees:o(),type:r(i(),n(e.MiseAJourPanier))});export{p as M};
|
import { e as enum_, o as object, n as number, c as pipe, v as value, s as string, b as array } from "./index.DD7qm8S6.js";
|
||||||
|
import { T as TYPES_MESSAGES } from "./messages3.js";
|
||||||
|
import { a as WCStoreCartItemSchema } from "./cart.js";
|
||||||
|
import "./cart2.js";
|
||||||
|
enum_(TYPES_MESSAGES);
|
||||||
|
const MessageMajBoutonPanierSchema = object({
|
||||||
|
donnees: number(),
|
||||||
|
type: pipe(string(), value(TYPES_MESSAGES.MajBoutonPanier))
|
||||||
|
});
|
||||||
|
const MessageMajContenuPanierDonneesSchema = object({
|
||||||
|
produits: array(WCStoreCartItemSchema),
|
||||||
|
totalPanier: number()
|
||||||
|
});
|
||||||
|
const MessageMajContenuPanierSchema = object({
|
||||||
|
donnees: MessageMajContenuPanierDonneesSchema,
|
||||||
|
type: pipe(string(), value(TYPES_MESSAGES.MajContenuPanier))
|
||||||
|
});
|
||||||
|
export {
|
||||||
|
MessageMajBoutonPanierSchema as M,
|
||||||
|
MessageMajContenuPanierSchema as a
|
||||||
|
};
|
||||||
//# sourceMappingURL=messages2.js.map
|
//# sourceMappingURL=messages2.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"messages2.js","sources":["../../src/scripts/lib/schemas/messages.ts"],"sourcesContent":["/**\n * Schémas des Messages passés avec BroadcastChannel.\n */\n\nimport * as v from \"valibot\";\n\nimport { TYPES_MESSAGES } from \"../../constantes/messages.ts\";\n\nexport const TypesMessagesSchema = v.enum(TYPES_MESSAGES);\n\nexport const MiseAJourPanierMessageSchema = v.object({\n donnees: v.number(),\n type: v.pipe(v.string(), v.value(TYPES_MESSAGES.MiseAJourPanier)),\n});\n"],"names":["v.enum","TYPES_MESSAGES","MiseAJourPanierMessageSchema","v.object","v.number","v.pipe","v.string","v.value"],"mappings":"8GAQmCA,EAAOC,CAAc,EAE3C,MAAAC,EAA+BC,EAAS,CACnD,QAASC,EAAS,EAClB,KAAMC,EAAOC,EAAE,EAAUC,EAAQN,EAAe,eAAe,CAAC,CAClE,CAAC"}
|
{"version":3,"file":"messages2.js","sources":["../../src/scripts/lib/schemas/messages.ts"],"sourcesContent":["/**\n * Schémas des Messages passés avec BroadcastChannel.\n */\n\nimport * as v from \"valibot\";\n\nimport { TYPES_MESSAGES } from \"../../constantes/messages.ts\";\nimport { WCStoreCartItemSchema } from \"./cart.ts\";\n\nexport const TypesMessagesSchema = v.enum(TYPES_MESSAGES);\n\nexport const MessageMajBoutonPanierSchema = v.object({\n donnees: v.number(),\n type: v.pipe(v.string(), v.value(TYPES_MESSAGES.MajBoutonPanier)),\n});\n\nexport const MessageMajContenuPanierDonneesSchema = v.object({\n produits: v.array(WCStoreCartItemSchema),\n totalPanier: v.number(),\n});\n\nexport const MessageMajContenuPanierSchema = v.object({\n donnees: MessageMajContenuPanierDonneesSchema,\n type: v.pipe(v.string(), v.value(TYPES_MESSAGES.MajContenuPanier)),\n});\n"],"names":["v.enum","v.object","v.number","v.pipe","v.string","v.value","v.array"],"mappings":";;;;AASmCA,MAAO,cAAc;AAE3C,MAAA,+BAA+BC,OAAS;AAAA,EACnD,SAASC,OAAS;AAAA,EAClB,MAAMC,KAAOC,OAAE,GAAUC,MAAQ,eAAe,eAAe,CAAC;AAClE,CAAC;AAEY,MAAA,uCAAuCJ,OAAS;AAAA,EAC3D,UAAUK,MAAQ,qBAAqB;AAAA,EACvC,aAAaJ,OAAS;AACxB,CAAC;AAEY,MAAA,gCAAgCD,OAAS;AAAA,EACpD,SAAS;AAAA,EACT,MAAME,KAAOC,OAAE,GAAUC,MAAQ,eAAe,gBAAgB,CAAC;AACnE,CAAC;"}
|
||||||
|
|
@ -1,2 +1,12 @@
|
||||||
const a="bouton_panier",n={MiseAJourPanier:"maj_panier"};export{a as N,n as T};
|
const NOM_CANAL_BOUTON_PANIER = "bouton_panier";
|
||||||
|
const NOM_CANAL_CONTENU_PANIER = "contenu_panier";
|
||||||
|
const TYPES_MESSAGES = {
|
||||||
|
MajBoutonPanier: "maj_bouton_panier",
|
||||||
|
MajContenuPanier: "maj_contenu_panier"
|
||||||
|
};
|
||||||
|
export {
|
||||||
|
NOM_CANAL_BOUTON_PANIER as N,
|
||||||
|
TYPES_MESSAGES as T,
|
||||||
|
NOM_CANAL_CONTENU_PANIER as a
|
||||||
|
};
|
||||||
//# sourceMappingURL=messages3.js.map
|
//# sourceMappingURL=messages3.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"messages3.js","sources":["../../src/scripts/constantes/messages.ts"],"sourcesContent":["/**\n * Constantes liées aux Messages passés par BroadcastChannel.\n */\n\nexport const NOM_CANAL_BOUTON_PANIER = \"bouton_panier\";\n\nexport const TYPES_MESSAGES = {\n MiseAJourPanier: \"maj_panier\",\n} as const;\n"],"names":["NOM_CANAL_BOUTON_PANIER","TYPES_MESSAGES"],"mappings":"AAIO,MAAMA,EAA0B,gBAE1BC,EAAiB,CAC5B,gBAAiB,YACnB"}
|
{"version":3,"file":"messages3.js","sources":["../../src/scripts/constantes/messages.ts"],"sourcesContent":["/**\n * Constantes liées aux Messages passés par BroadcastChannel.\n */\n\nexport const NOM_CANAL_BOUTON_PANIER = \"bouton_panier\";\nexport const NOM_CANAL_CONTENU_PANIER = \"contenu_panier\";\n\nexport const TYPES_MESSAGES = {\n MajBoutonPanier: \"maj_bouton_panier\",\n MajContenuPanier: \"maj_contenu_panier\",\n} as const;\n"],"names":[],"mappings":"AAIO,MAAM,0BAA0B;AAChC,MAAM,2BAA2B;AAEjC,MAAM,iBAAiB;AAAA,EAC5B,iBAAiB;AAAA,EACjB,kBAAkB;AACpB;"}
|
||||||
|
|
@ -1,2 +1,20 @@
|
||||||
import{d as e}from"./api2.js";const n=o=>fetch(o.route,{body:o.corps,credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json",[e]:o.nonce},method:"POST",mode:"same-origin",signal:AbortSignal.timeout(5e3)});export{n as p};
|
import { d as ENTETE_WC_NONCE } from "./api2.js";
|
||||||
|
const postBackendWC = (args) => fetch(
|
||||||
|
args.route,
|
||||||
|
{
|
||||||
|
body: args.corps,
|
||||||
|
credentials: "same-origin",
|
||||||
|
headers: {
|
||||||
|
"Accept": "application/json",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
[ENTETE_WC_NONCE]: args.nonce
|
||||||
|
},
|
||||||
|
method: "POST",
|
||||||
|
mode: "same-origin",
|
||||||
|
signal: AbortSignal.timeout(5e3)
|
||||||
|
}
|
||||||
|
);
|
||||||
|
export {
|
||||||
|
postBackendWC as p
|
||||||
|
};
|
||||||
//# sourceMappingURL=reseau.js.map
|
//# sourceMappingURL=reseau.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"reseau.js","sources":["../../src/scripts/lib/reseau.ts"],"sourcesContent":["import { pipe } from \"remeda\";\nimport { match, P } from \"ts-pattern\";\nimport { type GenericSchema, parse } from \"valibot\";\n\nimport { ENTETE_WC_NONCE } from \"../constantes/api.ts\";\nimport {\n ErreurInconnue,\n leveBadRequestError,\n leveErreur,\n leveNotFoundError,\n leveUnauthorizedError,\n type UnknownError,\n} from \"./erreurs.ts\";\nimport { estWCError } from \"./schemas/erreurs.ts\";\n\ntype ArgumentsPostBackendWC = {\n corps: BodyInit;\n nonce: string;\n route: string;\n};\n\nexport const postBackendWC = (args: ArgumentsPostBackendWC) =>\n fetch(\n args.route,\n {\n body: args.corps,\n credentials: \"same-origin\",\n headers: {\n \"Accept\": \"application/json\",\n \"Content-Type\": \"application/json\",\n [ENTETE_WC_NONCE]: args.nonce,\n },\n method: \"POST\",\n mode: \"same-origin\",\n signal: AbortSignal.timeout(5000),\n },\n );\n\nexport const traiteReponseBackendWCSelonCodesHTTP = (corpsReponse: unknown, schemaReponse: GenericSchema) =>\n match(corpsReponse)\n // Réponses problématiques\n .with({ body: P.select(), status: 400 }, estWCError, leveBadRequestError)\n .with({ body: P.select(), status: 401 }, estWCError, leveUnauthorizedError)\n .with({ body: P.select(), status: 404 }, estWCError, leveNotFoundError)\n // Réponse OK (201)\n .with(P._, corpsOkInconnu => parse(schemaReponse, corpsOkInconnu))\n // Réponses inconnues\n .otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>));\n"],"names":["ENTETE_WC_NONCE","postBackendWC","args"],"mappings":"AAqBa,OAAA,KAAAA,MAAA,YAAA,MAAAC,EAAiBC,GAC5B,MACEA,EAAK,MACL,CACE,KAAMA,EAAK,MACX,YAAa,cACb,QAAS,CACP,OAAU,mBACV,eAAgB,mBAChB,CAACF,CAAe,EAAGE,EAAK,KAC1B,EACA,OAAQ,OACR,KAAM,cACN,OAAQ,YAAY,QAAQ,GAAI,CAClC,CACF"}
|
{"version":3,"file":"reseau.js","sources":["../../src/scripts/lib/reseau.ts"],"sourcesContent":["import { pipe } from \"remeda\";\nimport { match, P } from \"ts-pattern\";\nimport { type GenericSchema, parse } from \"valibot\";\n\nimport { ENTETE_WC_NONCE } from \"../constantes/api.ts\";\nimport {\n ErreurInconnue,\n leveBadRequestError,\n leveErreur,\n leveNotFoundError,\n leveUnauthorizedError,\n type UnknownError,\n} from \"./erreurs.ts\";\nimport { estWCError } from \"./schemas/erreurs.ts\";\n\ntype ArgumentsPostBackendWC = {\n corps: BodyInit;\n nonce: string;\n route: string;\n};\n\nexport const postBackendWC = (args: ArgumentsPostBackendWC) =>\n fetch(\n args.route,\n {\n body: args.corps,\n credentials: \"same-origin\",\n headers: {\n \"Accept\": \"application/json\",\n \"Content-Type\": \"application/json\",\n [ENTETE_WC_NONCE]: args.nonce,\n },\n method: \"POST\",\n mode: \"same-origin\",\n signal: AbortSignal.timeout(5000),\n },\n );\n\nexport const traiteReponseBackendWCSelonCodesHTTP = (corpsReponse: unknown, schemaReponse: GenericSchema) =>\n match(corpsReponse)\n // Réponses problématiques\n .with({ body: P.select(), status: 400 }, estWCError, leveBadRequestError)\n .with({ body: P.select(), status: 401 }, estWCError, leveUnauthorizedError)\n .with({ body: P.select(), status: 404 }, estWCError, leveNotFoundError)\n // Réponse OK (201)\n .with(P._, corpsOkInconnu => parse(schemaReponse, corpsOkInconnu))\n // Réponses inconnues\n .otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>));\n"],"names":[],"mappings":";AAqBa,MAAA,gBAAgB,CAAC,SAC5B;AAAA,EACE,KAAK;AAAA,EACL;AAAA,IACE,MAAM,KAAK;AAAA,IACX,aAAa;AAAA,IACb,SAAS;AAAA,MACP,UAAU;AAAA,MACV,gBAAgB;AAAA,MAChB,CAAC,eAAe,GAAG,KAAK;AAAA,IAC1B;AAAA,IACA,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,QAAQ,YAAY,QAAQ,GAAI;AAAA,EAClC;AACF;"}
|
||||||
|
|
@ -1,2 +1,30 @@
|
||||||
import{x as n}from"./chunk-7BKSRZNG.F4GWJRq9.js";import{S as i,A as m}from"./dom.js";import{N as a}from"./messages3.js";import{r as s}from"./dom2.js";import{v as N}from"./messages.js";import{r as p}from"./utils.js";import"./erreurs.js";import"./exports.CqgMoAXr.js";import"./Either.DDEPhGsy.js";import"./index.DYThEupQ.js";import"./messages2.js";const E=()=>{const t=n(p(i),s),r=new BroadcastChannel(a);r.onmessage=o=>{N(o).ifRight(e=>{t.textContent=`cart (${String(e.donnees)})`,t.setAttribute(m,String(e.donnees>0))})}};document.addEventListener("DOMContentLoaded",()=>{E()});
|
import { x } from "./chunk-7BKSRZNG.C39W3Wne.js";
|
||||||
|
import { S as SELECTEUR_BOUTON_PANIER, A as ATTRIBUT_CONTIENT_ARTICLES } from "./dom.js";
|
||||||
|
import { N as NOM_CANAL_BOUTON_PANIER } from "./messages3.js";
|
||||||
|
import { r as recupereElementOuLeve } from "./dom2.js";
|
||||||
|
import { v as valideMessageMajBoutonPanier } from "./messages.js";
|
||||||
|
import { r as recupereElementDocumentEither } from "./utils.js";
|
||||||
|
import "./erreurs.js";
|
||||||
|
import "./exports.DNZBdkMD.js";
|
||||||
|
import "./Either.wHNxn7Os.js";
|
||||||
|
import "./index.DD7qm8S6.js";
|
||||||
|
import "./messages2.js";
|
||||||
|
import "./cart.js";
|
||||||
|
import "./cart2.js";
|
||||||
|
const initialiseBoutonPanier = () => {
|
||||||
|
const BOUTON_PANIER = x(
|
||||||
|
recupereElementDocumentEither(SELECTEUR_BOUTON_PANIER),
|
||||||
|
recupereElementOuLeve
|
||||||
|
);
|
||||||
|
const CANAL_BOUTON_PANIER = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
||||||
|
CANAL_BOUTON_PANIER.onmessage = (evenementMessage) => {
|
||||||
|
valideMessageMajBoutonPanier(evenementMessage).ifRight((message) => {
|
||||||
|
BOUTON_PANIER.textContent = `cart (${String(message.donnees)})`;
|
||||||
|
BOUTON_PANIER.setAttribute(ATTRIBUT_CONTIENT_ARTICLES, String(message.donnees > 0));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
initialiseBoutonPanier();
|
||||||
|
});
|
||||||
//# sourceMappingURL=scripts-bouton-panier.js.map
|
//# sourceMappingURL=scripts-bouton-panier.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"scripts-bouton-panier.js","sources":["../../src/scripts/scripts-bouton-panier.ts"],"sourcesContent":["/**\n * Scripts pour la mise à jour trans-fenêtres/trans-onglets du Bouton du Panier.\n */\n\nimport { pipe } from \"remeda\";\n\nimport type { MiseAJourPanierMessage } from \"./lib/types/messages\";\n\nimport { ATTRIBUT_CONTIENT_ARTICLES, SELECTEUR_BOUTON_PANIER } from \"./constantes/dom.ts\";\nimport { NOM_CANAL_BOUTON_PANIER } from \"./constantes/messages.ts\";\nimport { recupereElementOuLeve } from \"./lib/dom.ts\";\nimport { valideMessageMajPanier } from \"./lib/messages.ts\";\nimport { recupereElementDocumentEither } from \"./lib/utils.ts\";\n\nconst initialiseBoutonPanier = (): void => {\n /** Le « Bouton » vers le Panier dont le texte est un indicateur du nombre de Produits dedans. */\n const BOUTON_PANIER: HTMLAnchorElement = pipe(\n recupereElementDocumentEither<HTMLAnchorElement>(SELECTEUR_BOUTON_PANIER),\n recupereElementOuLeve,\n );\n const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);\n\n CANAL_BOUTON_PANIER.onmessage = (evenementMessage: MessageEvent<unknown>): void => {\n valideMessageMajPanier(evenementMessage)\n // Met à jour le Bouton du Panier\n .ifRight((message: MiseAJourPanierMessage) => {\n BOUTON_PANIER.textContent = `cart (${String(message.donnees)})`;\n BOUTON_PANIER.setAttribute(ATTRIBUT_CONTIENT_ARTICLES, String(message.donnees > 0));\n });\n };\n};\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n initialiseBoutonPanier();\n});\n"],"names":["initialiseBoutonPanier","BOUTON_PANIER","pipe","recupereElementDocumentEither","SELECTEUR_BOUTON_PANIER","recupereElementOuLeve","CANAL_BOUTON_PANIER","NOM_CANAL_BOUTON_PANIER","evenementMessage","valideMessageMajPanier","message","ATTRIBUT_CONTIENT_ARTICLES"],"mappings":"0VAcA,MAAMA,EAAyB,IAAY,CAEzC,MAAMC,EAAmCC,EACvCC,EAAiDC,CAAuB,EACxEC,CAAA,EAEIC,EAAwC,IAAI,iBAAiBC,CAAuB,EAEtED,EAAA,UAAaE,GAAkD,CACjFC,EAAuBD,CAAgB,EAEpC,QAASE,GAAoC,CAC5CT,EAAc,YAAc,SAAS,OAAOS,EAAQ,OAAO,CAAC,IAC5DT,EAAc,aAAaU,EAA4B,OAAOD,EAAQ,QAAU,CAAC,CAAC,CAAA,CACnF,CAAA,CAEP,EAEA,SAAS,iBAAiB,mBAAoB,IAAM,CAC3BV,GACzB,CAAC"}
|
{"version":3,"file":"scripts-bouton-panier.js","sources":["../../src/scripts/scripts-bouton-panier.ts"],"sourcesContent":["/**\n * Scripts pour la mise à jour trans-fenêtres/trans-onglets du Bouton du Panier.\n */\n\nimport { pipe } from \"remeda\";\n\nimport type { MessageMajBoutonPanier } from \"./lib/types/messages\";\n\nimport { ATTRIBUT_CONTIENT_ARTICLES, SELECTEUR_BOUTON_PANIER } from \"./constantes/dom.ts\";\nimport { NOM_CANAL_BOUTON_PANIER } from \"./constantes/messages.ts\";\nimport { recupereElementOuLeve } from \"./lib/dom.ts\";\nimport { valideMessageMajBoutonPanier } from \"./lib/messages.ts\";\nimport { recupereElementDocumentEither } from \"./lib/utils.ts\";\n\nconst initialiseBoutonPanier = (): void => {\n /** Le « Bouton » vers le Panier dont le texte est un indicateur du nombre de Produits dedans. */\n const BOUTON_PANIER: HTMLAnchorElement = pipe(\n recupereElementDocumentEither<HTMLAnchorElement>(SELECTEUR_BOUTON_PANIER),\n recupereElementOuLeve,\n );\n const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);\n\n CANAL_BOUTON_PANIER.onmessage = (evenementMessage: MessageEvent<unknown>): void => {\n valideMessageMajBoutonPanier(evenementMessage)\n // Met à jour le Bouton du Panier\n .ifRight((message: MessageMajBoutonPanier) => {\n BOUTON_PANIER.textContent = `cart (${String(message.donnees)})`;\n BOUTON_PANIER.setAttribute(ATTRIBUT_CONTIENT_ARTICLES, String(message.donnees > 0));\n });\n };\n};\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n initialiseBoutonPanier();\n});\n"],"names":["pipe"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,yBAAyB,MAAY;AAEzC,QAAM,gBAAmCA;AAAAA,IACvC,8BAAiD,uBAAuB;AAAA,IACxE;AAAA,EAAA;AAEI,QAAA,sBAAwC,IAAI,iBAAiB,uBAAuB;AAEtE,sBAAA,YAAY,CAAC,qBAAkD;AACjF,iCAA6B,gBAAgB,EAE1C,QAAQ,CAAC,YAAoC;AAC5C,oBAAc,cAAc,SAAS,OAAO,QAAQ,OAAO,CAAC;AAC5D,oBAAc,aAAa,4BAA4B,OAAO,QAAQ,UAAU,CAAC,CAAC;AAAA,IAAA,CACnF;AAAA,EAAA;AAEP;AAEA,SAAS,iBAAiB,oBAAoB,MAAM;AAC3B;AACzB,CAAC;"}
|
||||||
|
|
@ -1,2 +1,229 @@
|
||||||
import{r as d,p as k,z as p,N as s}from"./index.Dxgx1GXj.js";import{x as i}from"./chunk-7BKSRZNG.F4GWJRq9.js";import{p as A}from"./index.DYThEupQ.js";import{R as D,b as B}from"./api2.js";import{a as W,b as x,c as j,d as q,e as Q,f as z,g as G,A as F}from"./dom.js";import{N as b,T}from"./messages3.js";import{a as H,r as J,b as X}from"./dom2.js";import{l as R,a as f,b as g,c as S,E as O,d as I,r as h}from"./erreurs.js";import{e as P,a as U}from"./gardes.js";import{v as Y}from"./messages.js";import{p as v}from"./reseau.js";import{W as K}from"./cart-remove-item.js";import{W as M}from"./cart-update-item.js";import{W as y}from"./cart.js";import{e as n}from"./erreurs2.js";import{a as V,r as Z}from"./utils.js";import{M as C,E as L}from"./Either.DDEPhGsy.js";import"./exports.CqgMoAXr.js";import"./messages2.js";import"./cart2.js";const w=_etats,$=i(V(W),H),ee=i(Z(x),J),te=E=>u=>i(X(E)(u),J),re=()=>{$.forEach(E=>{const u=te(E),c=C.fromNullable(E.getAttribute(j)).ifNothing(()=>{E.remove()}).orDefault("CLE_PANIER_INEXISTANTE"),m=u(q),_=u(Q),N=u(z),o=u(G);o.addEventListener("click",()=>{o.textContent="C= C= C= C= C=┌(;・ω・)┘",L.encase(()=>A(K,{key:c})).map(l=>{v({corps:JSON.stringify(l),nonce:w.nonce,route:D}).then(async a=>{P(a)&&R("500 Server Error"),i(await a.json(),e=>p(e).with({body:s.select(),status:400},n,f).with({body:s.select(),status:401},n,g).with({body:s.select(),status:404},n,S).with(s._,r=>A(y,r)).otherwise(r=>i(r,O,I)),k("items_count"),d(e=>{console.debug("nombreArticlesPanier",e),new BroadcastChannel(b).postMessage({donnees:e,type:T.MiseAJourPanier}),E.remove()}))}).catch(a=>{U(a)?h(a):console.error("e n'est pas une Erreur ?!",a)})})}),m.addEventListener("click",()=>{C.fromNullable(_.valueAsNumber).filter(l=>l>1).ifJust(l=>{o.textContent="C= C= C= C= C=┌(;・ω・)┘",m.toggleAttribute("disabled"),N.toggleAttribute("disabled"),o.toggleAttribute("disabled"),L.encase(()=>A(M,{key:c,quantity:l-1})).map(a=>{v({corps:JSON.stringify(a),nonce:w.nonce,route:B}).then(async e=>{P(e)&&R("500 Server Error"),i(await e.json(),r=>p(r).with({body:s.select(),status:400},n,f).with({body:s.select(),status:401},n,g).with({body:s.select(),status:404},n,S).with(s._,t=>A(y,t)).otherwise(t=>i(t,O,I)),d(r=>{new BroadcastChannel(b).postMessage({donnees:r.items_count,type:T.MiseAJourPanier})}),d(r=>{C.fromNullable(r.items.find(t=>c===t.key)?.quantity).ifJust(t=>_.setAttribute("value",String(t))),m.toggleAttribute("disabled"),N.toggleAttribute("disabled"),o.toggleAttribute("disabled"),o.textContent="Remove"}))}).catch(e=>{U(e)?h(e):console.error("e n'est pas une Erreur ?!",e)})})})}),N.addEventListener("click",()=>{C.fromNullable(_.valueAsNumber).ifJust(l=>{o.textContent="C= C= C= C= C=┌(;・ω・)┘",m.toggleAttribute("disabled"),N.toggleAttribute("disabled"),o.toggleAttribute("disabled"),L.encase(()=>A(M,{key:c,quantity:l+1})).map(a=>{v({corps:JSON.stringify(a),nonce:w.nonce,route:B}).then(async e=>{P(e)&&R("500 Server Error"),i(await e.json(),r=>p(r).with({body:s.select(),status:400},n,f).with({body:s.select(),status:401},n,g).with({body:s.select(),status:404},n,S).with(s._,t=>A(y,t)).otherwise(t=>i(t,O,I)),d(r=>{new BroadcastChannel(b).postMessage({donnees:r.items_count,type:T.MiseAJourPanier})}),d(r=>{C.fromNullable(r.items.find(t=>c===t.key)?.quantity).ifJust(t=>_.setAttribute("value",String(t))),m.toggleAttribute("disabled"),N.toggleAttribute("disabled"),o.toggleAttribute("disabled"),o.textContent="Remove"}))}).catch(e=>{U(e)?h(e):console.error("e n'est pas une Erreur ?!",e)})})})})})},se=()=>{const E=new BroadcastChannel(b);E.onmessage=u=>{Y(u).ifRight(c=>{ee.setAttribute(F,String(c.donnees!==0))})}};document.addEventListener("DOMContentLoaded",()=>{re(),se()});
|
import { r, z, N, p } from "./index.y02cst4L.js";
|
||||||
|
import { x } from "./chunk-7BKSRZNG.C39W3Wne.js";
|
||||||
|
import { p as parse } from "./index.DD7qm8S6.js";
|
||||||
|
import { R as ROUTE_API_RETIRE_ARTICLE_PANIER, b as ROUTE_API_MAJ_ARTICLE_PANIER } from "./api2.js";
|
||||||
|
import { a as SELECTEUR_ENTREES_PANIER, b as SELECTEUR_CONTENEUR_PANIER, c as SELECTEUR_TOTAL_PANIER, d as ATTRIBUT_CLE_PANIER, e as SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE, f as SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER, g as SELECTEUR_BOUTON_ADDITION_QUANTITE, h as SELECTEUR_BOUTON_SUPPRESSION_PANIER, A as ATTRIBUT_CONTIENT_ARTICLES, i as SELECTEUR_PRIX_LIGNE_PANIER } from "./dom.js";
|
||||||
|
import { N as NOM_CANAL_BOUTON_PANIER, a as NOM_CANAL_CONTENU_PANIER, T as TYPES_MESSAGES } from "./messages3.js";
|
||||||
|
import { r as recupereElementOuLeve, a as recupereElementAvecSelecteur } from "./dom2.js";
|
||||||
|
import { l as leveServerError, a as leveBadRequestError, b as leveUnauthorizedError, c as leveNotFoundError, E as ErreurInconnue, d as leveErreur, r as reporteErreur } from "./erreurs.js";
|
||||||
|
import { e as estReponse500, a as estError } from "./gardes.js";
|
||||||
|
import { v as valideMessageMajBoutonPanier, a as valideMessageMajContenuPanier } from "./messages.js";
|
||||||
|
import { p as postBackendWC } from "./reseau.js";
|
||||||
|
import { W as WCStoreCartRemoveItemArgsSchema } from "./cart-remove-item.js";
|
||||||
|
import { W as WCStoreCartUpdateItemArgsSchema } from "./cart-update-item.js";
|
||||||
|
import { W as WCStoreCartSchema } from "./cart.js";
|
||||||
|
import { e as estWCError } from "./erreurs2.js";
|
||||||
|
import { a as recupereElementsDocumentEither, r as recupereElementDocumentEither } from "./utils.js";
|
||||||
|
import { M as Maybe, E as Either } from "./Either.wHNxn7Os.js";
|
||||||
|
import "./exports.DNZBdkMD.js";
|
||||||
|
import "./messages2.js";
|
||||||
|
import "./cart2.js";
|
||||||
|
const ETATS_PAGE = _etats;
|
||||||
|
const ENTREES_PANIER_EITHER = recupereElementsDocumentEither(
|
||||||
|
SELECTEUR_ENTREES_PANIER
|
||||||
|
);
|
||||||
|
const CONTENEUR_PANIER = x(
|
||||||
|
recupereElementDocumentEither(SELECTEUR_CONTENEUR_PANIER),
|
||||||
|
recupereElementOuLeve
|
||||||
|
);
|
||||||
|
const TOTAL_PANIER = x(
|
||||||
|
recupereElementDocumentEither(SELECTEUR_TOTAL_PANIER),
|
||||||
|
recupereElementOuLeve
|
||||||
|
);
|
||||||
|
const recupereElementDansEntreePanierOuLeve = (
|
||||||
|
/* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters -- Nécessaire pour
|
||||||
|
documenter le type d'Element attendu */
|
||||||
|
(entree) => (selecteur) => x(
|
||||||
|
recupereElementAvecSelecteur(entree)(selecteur),
|
||||||
|
recupereElementOuLeve
|
||||||
|
)
|
||||||
|
);
|
||||||
|
const initialiseScriptsPagePanier = () => {
|
||||||
|
ENTREES_PANIER_EITHER.ifRight(
|
||||||
|
(entrees) => entrees.forEach((entree) => {
|
||||||
|
const recupereElementDansEntree = recupereElementDansEntreePanierOuLeve(entree);
|
||||||
|
const clePanier = Maybe.fromNullable(entree.getAttribute(ATTRIBUT_CLE_PANIER)).ifNothing(() => {
|
||||||
|
entree.remove();
|
||||||
|
return;
|
||||||
|
}).orDefault("CLE_PANIER_INEXISTANTE");
|
||||||
|
const boutonSoustraction = recupereElementDansEntree(SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE);
|
||||||
|
const champQuantite = recupereElementDansEntree(SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER);
|
||||||
|
const boutonAddition = recupereElementDansEntree(SELECTEUR_BOUTON_ADDITION_QUANTITE);
|
||||||
|
const boutonSuppression = recupereElementDansEntree(SELECTEUR_BOUTON_SUPPRESSION_PANIER);
|
||||||
|
boutonSuppression.addEventListener("click", () => {
|
||||||
|
boutonSuppression.textContent = "C= C= C= C= C=┌(;・ω・)┘";
|
||||||
|
Either.encase(() => parse(WCStoreCartRemoveItemArgsSchema, { key: clePanier })).map(
|
||||||
|
(args) => {
|
||||||
|
postBackendWC({
|
||||||
|
corps: JSON.stringify(args),
|
||||||
|
nonce: ETATS_PAGE.nonce,
|
||||||
|
route: ROUTE_API_RETIRE_ARTICLE_PANIER
|
||||||
|
}).then(async (reponse) => {
|
||||||
|
if (estReponse500(reponse)) leveServerError("500 Server Error");
|
||||||
|
x(
|
||||||
|
// Récupère la Réponse
|
||||||
|
await reponse.json(),
|
||||||
|
// Traite tous les codes HTTPs possibles
|
||||||
|
(corpsReponse) => z(corpsReponse).with({ body: N.select(), status: 400 }, estWCError, leveBadRequestError).with({ body: N.select(), status: 401 }, estWCError, leveUnauthorizedError).with({ body: N.select(), status: 404 }, estWCError, leveNotFoundError).with(N._, (corpsOkInconnu) => parse(WCStoreCartSchema, corpsOkInconnu)).otherwise((e) => x(e, ErreurInconnue, leveErreur)),
|
||||||
|
r((panier) => {
|
||||||
|
new BroadcastChannel(NOM_CANAL_CONTENU_PANIER).postMessage({
|
||||||
|
donnees: {
|
||||||
|
produits: panier.items,
|
||||||
|
totalPanier: Number(panier.totals.total_items / 100)
|
||||||
|
},
|
||||||
|
type: TYPES_MESSAGES.MajContenuPanier
|
||||||
|
});
|
||||||
|
new BroadcastChannel(NOM_CANAL_BOUTON_PANIER).postMessage({
|
||||||
|
donnees: panier.items_count,
|
||||||
|
type: TYPES_MESSAGES.MajBoutonPanier
|
||||||
|
});
|
||||||
|
entree.remove();
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}).catch((e) => {
|
||||||
|
if (estError(e)) {
|
||||||
|
reporteErreur(e);
|
||||||
|
} else {
|
||||||
|
console.error("e n'est pas une Erreur ?!", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
boutonSoustraction.addEventListener("click", () => {
|
||||||
|
Maybe.fromNullable(champQuantite.valueAsNumber).filter((valeur) => valeur > 1).ifJust((valeur) => {
|
||||||
|
boutonSuppression.textContent = "C= C= C= C= C=┌(;・ω・)┘";
|
||||||
|
boutonSoustraction.toggleAttribute("disabled");
|
||||||
|
boutonAddition.toggleAttribute("disabled");
|
||||||
|
boutonSuppression.toggleAttribute("disabled");
|
||||||
|
Either.encase(
|
||||||
|
() => parse(WCStoreCartUpdateItemArgsSchema, { key: clePanier, quantity: valeur - 1 })
|
||||||
|
).map(
|
||||||
|
(args) => {
|
||||||
|
postBackendWC({
|
||||||
|
corps: JSON.stringify(args),
|
||||||
|
nonce: ETATS_PAGE.nonce,
|
||||||
|
route: ROUTE_API_MAJ_ARTICLE_PANIER
|
||||||
|
}).then(async (reponse) => {
|
||||||
|
if (estReponse500(reponse)) leveServerError("500 Server Error");
|
||||||
|
x(
|
||||||
|
// Récupère la Réponse
|
||||||
|
await reponse.json(),
|
||||||
|
// Traite tous les codes HTTPs possibles
|
||||||
|
(corpsReponse) => z(corpsReponse).with({ body: N.select(), status: 400 }, estWCError, leveBadRequestError).with({ body: N.select(), status: 401 }, estWCError, leveUnauthorizedError).with({ body: N.select(), status: 404 }, estWCError, leveNotFoundError).with(N._, (corpsOkInconnu) => parse(WCStoreCartSchema, corpsOkInconnu)).otherwise((e) => x(e, ErreurInconnue, leveErreur)),
|
||||||
|
r((panier) => {
|
||||||
|
new BroadcastChannel(NOM_CANAL_BOUTON_PANIER).postMessage({
|
||||||
|
donnees: panier.items_count,
|
||||||
|
type: TYPES_MESSAGES.MajBoutonPanier
|
||||||
|
});
|
||||||
|
new BroadcastChannel(NOM_CANAL_CONTENU_PANIER).postMessage({
|
||||||
|
donnees: {
|
||||||
|
produits: panier.items,
|
||||||
|
totalPanier: Number(panier.totals.total_items / 100)
|
||||||
|
},
|
||||||
|
type: TYPES_MESSAGES.MajContenuPanier
|
||||||
|
});
|
||||||
|
boutonSoustraction.toggleAttribute("disabled");
|
||||||
|
boutonAddition.toggleAttribute("disabled");
|
||||||
|
boutonSuppression.toggleAttribute("disabled");
|
||||||
|
boutonSuppression.textContent = "Remove";
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}).catch((e) => {
|
||||||
|
if (estError(e)) {
|
||||||
|
reporteErreur(e);
|
||||||
|
} else {
|
||||||
|
console.error("e n'est pas une Erreur ?!", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
boutonAddition.addEventListener("click", () => {
|
||||||
|
Maybe.fromNullable(champQuantite.valueAsNumber).ifJust((valeur) => {
|
||||||
|
boutonSuppression.textContent = "C= C= C= C= C=┌(;・ω・)┘";
|
||||||
|
boutonSoustraction.toggleAttribute("disabled");
|
||||||
|
boutonAddition.toggleAttribute("disabled");
|
||||||
|
boutonSuppression.toggleAttribute("disabled");
|
||||||
|
Either.encase(
|
||||||
|
() => parse(WCStoreCartUpdateItemArgsSchema, { key: clePanier, quantity: valeur + 1 })
|
||||||
|
).map(
|
||||||
|
(args) => {
|
||||||
|
postBackendWC({
|
||||||
|
corps: JSON.stringify(args),
|
||||||
|
nonce: ETATS_PAGE.nonce,
|
||||||
|
route: ROUTE_API_MAJ_ARTICLE_PANIER
|
||||||
|
}).then(async (reponse) => {
|
||||||
|
if (estReponse500(reponse)) leveServerError("500 Server Error");
|
||||||
|
x(
|
||||||
|
// Récupère la Réponse
|
||||||
|
await reponse.json(),
|
||||||
|
// Traite tous les codes HTTPs possibles
|
||||||
|
(corpsReponse) => z(corpsReponse).with({ body: N.select(), status: 400 }, estWCError, leveBadRequestError).with({ body: N.select(), status: 401 }, estWCError, leveUnauthorizedError).with({ body: N.select(), status: 404 }, estWCError, leveNotFoundError).with(N._, (corpsOkInconnu) => parse(WCStoreCartSchema, corpsOkInconnu)).otherwise((e) => x(e, ErreurInconnue, leveErreur)),
|
||||||
|
r((panier) => {
|
||||||
|
new BroadcastChannel(NOM_CANAL_BOUTON_PANIER).postMessage({
|
||||||
|
donnees: panier.items_count,
|
||||||
|
type: TYPES_MESSAGES.MajBoutonPanier
|
||||||
|
});
|
||||||
|
new BroadcastChannel(NOM_CANAL_CONTENU_PANIER).postMessage({
|
||||||
|
donnees: {
|
||||||
|
produits: panier.items,
|
||||||
|
totalPanier: Number(panier.totals.total_items / 100)
|
||||||
|
},
|
||||||
|
type: TYPES_MESSAGES.MajContenuPanier
|
||||||
|
});
|
||||||
|
boutonSoustraction.toggleAttribute("disabled");
|
||||||
|
boutonAddition.toggleAttribute("disabled");
|
||||||
|
boutonSuppression.toggleAttribute("disabled");
|
||||||
|
boutonSuppression.textContent = "Remove";
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}).catch((e) => {
|
||||||
|
if (estError(e)) {
|
||||||
|
reporteErreur(e);
|
||||||
|
} else {
|
||||||
|
console.error("e n'est pas une Erreur ?!", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
);
|
||||||
|
};
|
||||||
|
const initialiseMajConteneurPanier = () => {
|
||||||
|
const CANAL_BOUTON_PANIER = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
||||||
|
CANAL_BOUTON_PANIER.onmessage = (evenementMessage) => {
|
||||||
|
valideMessageMajBoutonPanier(evenementMessage).ifRight((message) => {
|
||||||
|
CONTENEUR_PANIER.setAttribute(ATTRIBUT_CONTIENT_ARTICLES, String(message.donnees !== 0));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
const initialiseEcouteCanalMajContenuPanier = () => {
|
||||||
|
new BroadcastChannel(NOM_CANAL_CONTENU_PANIER).onmessage = (evenementMessage) => {
|
||||||
|
valideMessageMajContenuPanier(evenementMessage).map(p("donnees")).ifRight((donnees) => {
|
||||||
|
donnees.produits.forEach((ligne) => {
|
||||||
|
ENTREES_PANIER_EITHER.ifRight((entrees) => {
|
||||||
|
Maybe.fromNullable(entrees.find((entree) => entree.getAttribute(ATTRIBUT_CLE_PANIER) === ligne.key)).ifJust((entree) => {
|
||||||
|
const recupereElementDansEntree = recupereElementDansEntreePanierOuLeve(entree);
|
||||||
|
const prixLigne = recupereElementDansEntree(SELECTEUR_PRIX_LIGNE_PANIER);
|
||||||
|
const champQuantite = recupereElementDansEntree(
|
||||||
|
SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER
|
||||||
|
);
|
||||||
|
prixLigne.textContent = `${String(Number(ligne.totals.line_total) / 100)} €`;
|
||||||
|
champQuantite.setAttribute("value", String(ligne.quantity));
|
||||||
|
TOTAL_PANIER.textContent = `${donnees.totalPanier} €`;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
initialiseScriptsPagePanier();
|
||||||
|
initialiseMajConteneurPanier();
|
||||||
|
initialiseEcouteCanalMajContenuPanier();
|
||||||
|
});
|
||||||
//# sourceMappingURL=scripts-page-panier.js.map
|
//# sourceMappingURL=scripts-page-panier.js.map
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,126 @@
|
||||||
import{r as u,p as C,z as f,N as n}from"./index.Dxgx1GXj.js";import{x as o}from"./chunk-7BKSRZNG.F4GWJRq9.js";import{p as O}from"./index.DYThEupQ.js";import{c as I,d as L}from"./api2.js";import{h,i as U,j as g,k as v,l as m,m as d,n as A}from"./dom.js";import{N as R,T as b}from"./messages3.js";import{r as p,a as T}from"./dom2.js";import{l as P,a as w,b as y,c as B,E as D,d as M,r as J}from"./erreurs.js";import{b as j,e as x,a as W}from"./gardes.js";import{p as G}from"./cart-add-item.js";import{W as k}from"./cart.js";import{e as c}from"./erreurs2.js";import{r as l,a as N}from"./utils.js";import{M as q,E as z}from"./Either.DDEPhGsy.js";import"./exports.CqgMoAXr.js";import"./cart2.js";const H=_etats,V=a=>{a.forEach(e=>{e[0].setAttribute(m,"false"),e[1].setAttribute(d,"true")})},s=o(l(h),p),i=o(l(U),p),F=o(N(g),T),Q=o(N(v),T),Y=()=>{const a=new Map;F.forEach((e,t)=>{const r=e.getAttribute("id"),E=Q[t];if(!r)throw new Error("Le lien ne dispose pas d'ID !");if(!E)throw new Error("Le lien ne dispose pas de section correspondante !");a.set(r,[e,E]),e.addEventListener("click",_=>{_.preventDefault();const S=e.getAttribute(m)==="true";V(o(a.values(),Array.from)),!S&&(e.setAttribute(m,"true"),E.removeAttribute(d))})}),i.addEventListener("change",e=>{o(e.target,q.fromNullable,t=>t.filter(j),t=>t.map(r=>r.validity.valid),t=>t.ifJust(r=>s.toggleAttribute(A,!r)))}),s.addEventListener("click",e=>K())},K=()=>{s.textContent="Adding...",z.encase(()=>G({id:Number(i.value),quantity:1})).map(a=>{fetch(I,{body:JSON.stringify(a),credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json",[L]:H.nonce},method:"POST",mode:"same-origin",signal:AbortSignal.timeout(5e3)}).then(async e=>{x(e)&&P("500 Server Error"),o(await e.json(),t=>f(t).with({body:n.select(),status:400},c,w).with({body:n.select(),status:401},c,y).with({body:n.select(),status:404},c,B).with(n._,r=>O(k,r)).otherwise(r=>o(r,D,M)),u(t=>console.debug("Panier",t)),C("items_count"),u(t=>{s.textContent="Added to cart!",new BroadcastChannel(R).postMessage({donnees:t,type:b.MiseAJourPanier}),setTimeout(()=>{i.value=i.options.item(0)?.value??"--",s.toggleAttribute(A,!0),s.textContent="Add to cart"},3e3)}))}).catch(e=>{W(e)?(J(e),console.error(e)):console.error("e n'est pas une Erreur ?!",e),s.textContent="Add to cart"})})};document.addEventListener("DOMContentLoaded",()=>{Y()});
|
import { r, p, z, N } from "./index.y02cst4L.js";
|
||||||
|
import { x } from "./chunk-7BKSRZNG.C39W3Wne.js";
|
||||||
|
import { p as parse } from "./index.DD7qm8S6.js";
|
||||||
|
import { c as ROUTE_API_AJOUTE_ARTICLE_PANIER, d as ENTETE_WC_NONCE } from "./api2.js";
|
||||||
|
import { j as SELECTEUR_BOUTON_AJOUT_PANIER, k as SELECTEUR_SELECTEUR_QUANTITE, l as SELECTEUR_LIENS_ONGLETS, m as SELECTEUR_SECTIONS_CONTENUS, n as ATTRIBUT_ARIA_SELECTED, o as ATTRIBUT_HIDDEN, p as ATTRIBUT_DESACTIVE } from "./dom.js";
|
||||||
|
import { N as NOM_CANAL_BOUTON_PANIER, T as TYPES_MESSAGES } from "./messages3.js";
|
||||||
|
import { r as recupereElementOuLeve, b as recupereElementsOuLeve } from "./dom2.js";
|
||||||
|
import { l as leveServerError, a as leveBadRequestError, b as leveUnauthorizedError, c as leveNotFoundError, E as ErreurInconnue, d as leveErreur, r as reporteErreur } from "./erreurs.js";
|
||||||
|
import { b as estHTMLSelectElement, e as estReponse500, a as estError } from "./gardes.js";
|
||||||
|
import { p as parseWCStoreCartAddItemArgs } from "./cart-add-item.js";
|
||||||
|
import { W as WCStoreCartSchema } from "./cart.js";
|
||||||
|
import { e as estWCError } from "./erreurs2.js";
|
||||||
|
import { r as recupereElementDocumentEither, a as recupereElementsDocumentEither } from "./utils.js";
|
||||||
|
import { M as Maybe, E as Either } from "./Either.wHNxn7Os.js";
|
||||||
|
import "./exports.DNZBdkMD.js";
|
||||||
|
import "./cart2.js";
|
||||||
|
const ETATS_PAGE = _etats;
|
||||||
|
const deplieToutesSections = (ensembleLiensContenus) => {
|
||||||
|
ensembleLiensContenus.forEach((ensemble) => {
|
||||||
|
ensemble[0].setAttribute(ATTRIBUT_ARIA_SELECTED, "false");
|
||||||
|
ensemble[1].setAttribute(ATTRIBUT_HIDDEN, "true");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const BOUTON_AJOUT_PANIER = x(
|
||||||
|
recupereElementDocumentEither(SELECTEUR_BOUTON_AJOUT_PANIER),
|
||||||
|
recupereElementOuLeve
|
||||||
|
);
|
||||||
|
const SELECTEUR_VARIATION = x(
|
||||||
|
recupereElementDocumentEither(SELECTEUR_SELECTEUR_QUANTITE),
|
||||||
|
recupereElementOuLeve
|
||||||
|
);
|
||||||
|
const LIENS_ONGLETS = x(
|
||||||
|
recupereElementsDocumentEither(SELECTEUR_LIENS_ONGLETS),
|
||||||
|
recupereElementsOuLeve
|
||||||
|
);
|
||||||
|
const SECTIONS_CONTENUS = x(
|
||||||
|
recupereElementsDocumentEither(SELECTEUR_SECTIONS_CONTENUS),
|
||||||
|
recupereElementsOuLeve
|
||||||
|
);
|
||||||
|
const gereBoiteInformationsProduit = () => {
|
||||||
|
const onglets = /* @__PURE__ */ new Map();
|
||||||
|
LIENS_ONGLETS.forEach((lien, index) => {
|
||||||
|
const idOnglet = lien.getAttribute("id");
|
||||||
|
const sectionCorrespondante = SECTIONS_CONTENUS[index];
|
||||||
|
if (!idOnglet) throw new Error("Le lien ne dispose pas d'ID !");
|
||||||
|
if (!sectionCorrespondante) throw new Error("Le lien ne dispose pas de section correspondante !");
|
||||||
|
onglets.set(idOnglet, [lien, sectionCorrespondante]);
|
||||||
|
lien.addEventListener("click", (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
const estAncienOngletCourant = lien.getAttribute(ATTRIBUT_ARIA_SELECTED) === "true";
|
||||||
|
deplieToutesSections(x(onglets.values(), Array.from));
|
||||||
|
if (estAncienOngletCourant) return;
|
||||||
|
lien.setAttribute(ATTRIBUT_ARIA_SELECTED, "true");
|
||||||
|
sectionCorrespondante.removeAttribute(ATTRIBUT_HIDDEN);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
SELECTEUR_VARIATION.addEventListener("change", (evenement) => {
|
||||||
|
x(
|
||||||
|
evenement.target,
|
||||||
|
Maybe.fromNullable,
|
||||||
|
(cibleEvenement) => cibleEvenement.filter(estHTMLSelectElement),
|
||||||
|
(element) => element.map((v) => v.validity.valid),
|
||||||
|
(validite) => validite.ifJust((v) => BOUTON_AJOUT_PANIER.toggleAttribute(ATTRIBUT_DESACTIVE, !v))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
BOUTON_AJOUT_PANIER.addEventListener("click", (_) => ajouteProduitAuPanier());
|
||||||
|
};
|
||||||
|
const ajouteProduitAuPanier = () => {
|
||||||
|
BOUTON_AJOUT_PANIER.textContent = "Adding...";
|
||||||
|
Either.encase(
|
||||||
|
() => parseWCStoreCartAddItemArgs({
|
||||||
|
id: Number(SELECTEUR_VARIATION.value),
|
||||||
|
quantity: 1
|
||||||
|
})
|
||||||
|
).map((args) => {
|
||||||
|
fetch(
|
||||||
|
ROUTE_API_AJOUTE_ARTICLE_PANIER,
|
||||||
|
{
|
||||||
|
body: JSON.stringify(args),
|
||||||
|
credentials: "same-origin",
|
||||||
|
headers: {
|
||||||
|
"Accept": "application/json",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
[ENTETE_WC_NONCE]: ETATS_PAGE.nonce
|
||||||
|
},
|
||||||
|
method: "POST",
|
||||||
|
mode: "same-origin",
|
||||||
|
signal: AbortSignal.timeout(5e3)
|
||||||
|
}
|
||||||
|
).then(async (reponse) => {
|
||||||
|
if (estReponse500(reponse)) leveServerError("500 Server Error");
|
||||||
|
x(
|
||||||
|
// Récupère la Réponse
|
||||||
|
await reponse.json(),
|
||||||
|
// Traite tous les codes HTTPs possibles
|
||||||
|
(corpsReponse) => z(corpsReponse).with({ body: N.select(), status: 400 }, estWCError, leveBadRequestError).with({ body: N.select(), status: 401 }, estWCError, leveUnauthorizedError).with({ body: N.select(), status: 404 }, estWCError, leveNotFoundError).with(N._, (corpsOkInconnu) => parse(WCStoreCartSchema, corpsOkInconnu)).otherwise((e) => x(e, ErreurInconnue, leveErreur)),
|
||||||
|
r((panier) => console.debug("Panier", panier)),
|
||||||
|
// Récupère le nombre de Produits dans la Panier
|
||||||
|
p("items_count"),
|
||||||
|
// Déclenche les effets pour la mise à jour de l'IU
|
||||||
|
r((nombreArticlesPanier) => {
|
||||||
|
BOUTON_AJOUT_PANIER.textContent = "Added to cart!";
|
||||||
|
const CANAL_BOUTON_PANIER = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
||||||
|
CANAL_BOUTON_PANIER.postMessage({ donnees: nombreArticlesPanier, type: TYPES_MESSAGES.MajBoutonPanier });
|
||||||
|
setTimeout(() => {
|
||||||
|
SELECTEUR_VARIATION.value = SELECTEUR_VARIATION.options.item(0)?.value ?? "--";
|
||||||
|
BOUTON_AJOUT_PANIER.toggleAttribute(ATTRIBUT_DESACTIVE, true);
|
||||||
|
BOUTON_AJOUT_PANIER.textContent = "Add to cart";
|
||||||
|
}, 3e3);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}).catch((e) => {
|
||||||
|
if (estError(e)) {
|
||||||
|
reporteErreur(e);
|
||||||
|
console.error(e);
|
||||||
|
} else {
|
||||||
|
console.error("e n'est pas une Erreur ?!", e);
|
||||||
|
}
|
||||||
|
BOUTON_AJOUT_PANIER.textContent = "Add to cart";
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
gereBoiteInformationsProduit();
|
||||||
|
});
|
||||||
//# sourceMappingURL=scripts-page-produit.js.map
|
//# sourceMappingURL=scripts-page-produit.js.map
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,12 @@
|
||||||
import{c as e,b as r}from"./dom2.js";import"./chunk-7BKSRZNG.F4GWJRq9.js";import"./erreurs.js";import"./exports.CqgMoAXr.js";import"./Either.DDEPhGsy.js";const p=e(document),u=r(document);export{p as a,u as r};
|
import { c as recupereElementsAvecSelecteur, a as recupereElementAvecSelecteur } from "./dom2.js";
|
||||||
|
import "./chunk-7BKSRZNG.C39W3Wne.js";
|
||||||
|
import "./erreurs.js";
|
||||||
|
import "./exports.DNZBdkMD.js";
|
||||||
|
import "./Either.wHNxn7Os.js";
|
||||||
|
const recupereElementsDocumentEither = recupereElementsAvecSelecteur(document);
|
||||||
|
const recupereElementDocumentEither = recupereElementAvecSelecteur(document);
|
||||||
|
export {
|
||||||
|
recupereElementsDocumentEither as a,
|
||||||
|
recupereElementDocumentEither as r
|
||||||
|
};
|
||||||
//# sourceMappingURL=utils.js.map
|
//# sourceMappingURL=utils.js.map
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"utils.js","sources":["../../src/scripts/lib/utils.ts"],"sourcesContent":["import type { Either } from \"purify-ts\";\n\nimport { recupereElementAvecSelecteur, recupereElementsAvecSelecteur } from \"./dom.ts\";\n\nexport const recupereElementsDocumentEither: <E extends Element = Element>(\n selecteur: string,\n) => Either<SyntaxError, Array<E>> = recupereElementsAvecSelecteur(document);\n\nexport const recupereElementDocumentEither: <E extends Element = Element>(selecteur: string) => Either<SyntaxError, E> =\n recupereElementAvecSelecteur(document);\n"],"names":["recupereElementsAvecSelecteur","recupereElementAvecSelecteur","recupereElementsDocumentEither","recupereElementDocumentEither"],"mappings":"AAIa,OAAA,KAAAA,EAAA,KAAAC,MAAA,YAAA,MAAA,+BAAA,MAAA,eAAA,MAAA,wBAAA,MAAA,uBAAA,MAAAC,EAEwBF,EAA8B,QAAQ,EAE9DG,EACXF,EAA6B,QAAQ"}
|
{"version":3,"file":"utils.js","sources":["../../src/scripts/lib/utils.ts"],"sourcesContent":["import type { Either } from \"purify-ts\";\n\nimport { recupereElementAvecSelecteur, recupereElementsAvecSelecteur } from \"./dom.ts\";\n\nexport const recupereElementsDocumentEither: <E extends Element = Element>(\n selecteur: string,\n) => Either<SyntaxError, Array<E>> = recupereElementsAvecSelecteur(document);\n\nexport const recupereElementDocumentEither: <E extends Element = Element>(selecteur: string) => Either<SyntaxError, E> =\n recupereElementAvecSelecteur(document);\n"],"names":[],"mappings":";;;;;AAIa,MAAA,iCAEwB,8BAA8B,QAAQ;AAE9D,MAAA,gCACX,6BAA6B,QAAQ;"}
|
||||||
|
|
@ -46,8 +46,8 @@ function charge_styles_haiku_atelier_2024(): void {
|
||||||
handle: "haiku-atelier-2024-styles",
|
handle: "haiku-atelier-2024-styles",
|
||||||
src: get_template_directory_uri() . "/assets/css/main.css",
|
src: get_template_directory_uri() . "/assets/css/main.css",
|
||||||
deps: [],
|
deps: [],
|
||||||
ver: filemtime(get_template_directory() . "/assets/css/main.min.css"),
|
ver: filemtime(get_template_directory() . "/assets/css/main.css"),
|
||||||
media: false,
|
media: "all",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
add_action("wp_enqueue_scripts", "charge_styles_haiku_atelier_2024");
|
add_action("wp_enqueue_scripts", "charge_styles_haiku_atelier_2024");
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,10 @@ $modeles = ["panier.twig"];
|
||||||
|
|
||||||
// Récupère les informations affichés des Produits du Panier
|
// Récupère les informations affichés des Produits du Panier
|
||||||
$panier = [];
|
$panier = [];
|
||||||
$sous_total_panier = WC()->cart->get_subtotal();
|
/** @var int Le sous-total de la Commande dans le Panier. */
|
||||||
$total_panier = WC()->cart->get_total("");
|
$sous_total_panier = pipe(WC()->cart->get_subtotal(), fn($sous_total) => intval($sous_total));
|
||||||
|
/** @var int Le total de la Commande dans le Panier. */
|
||||||
|
$total_panier = pipe(WC()->cart->get_total(""), fn($total) => intval($total));
|
||||||
|
|
||||||
foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) {
|
foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) {
|
||||||
$panier[$cart_item_key] = [
|
$panier[$cart_item_key] = [
|
||||||
|
|
@ -47,7 +49,7 @@ function charge_scripts_styles_page_panier(): void {
|
||||||
src: get_template_directory_uri() . "/assets/css/pages/page-panier.css",
|
src: get_template_directory_uri() . "/assets/css/pages/page-panier.css",
|
||||||
deps: [],
|
deps: [],
|
||||||
ver: filemtime(get_template_directory() . "/assets/css/pages/page-panier.css"),
|
ver: filemtime(get_template_directory() . "/assets/css/pages/page-panier.css"),
|
||||||
media: false,
|
media: "all",
|
||||||
);
|
);
|
||||||
wp_enqueue_script_module(
|
wp_enqueue_script_module(
|
||||||
id: "haiku-atelier-2024-scripts-page-panier",
|
id: "haiku-atelier-2024-scripts-page-panier",
|
||||||
|
|
|
||||||
|
|
@ -28,21 +28,21 @@ html {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1. Utilise une couleur d'arrière-plan définie.
|
* 1. Utilise une couleur d'arrière-plan définie.
|
||||||
|
* 2. Utilise la couleur primaire du site.
|
||||||
*/
|
*/
|
||||||
body {
|
body {
|
||||||
|
accent-color: var(--couleur-jaune); /* 2 */
|
||||||
background: var(--couleur-gris); /* 1 */
|
background: var(--couleur-gris); /* 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1. Force l'héritage des styles pour ces éléments.
|
* 1. Force l'héritage des styles pour ces éléments.
|
||||||
* 2. Utilise la couleur primaire du site.
|
|
||||||
*/
|
*/
|
||||||
button,
|
button,
|
||||||
input,
|
input,
|
||||||
select,
|
select,
|
||||||
textarea {
|
textarea {
|
||||||
font: inherit; /* 1 */
|
font: inherit; /* 1 */
|
||||||
accent-color: var(--couleur-jaune); /* 2 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -51,3 +51,14 @@ textarea {
|
||||||
*::selection {
|
*::selection {
|
||||||
background: var(--couleur-jaune);
|
background: var(--couleur-jaune);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Désactive les animations pour les Utilisateurs n'en souhaitant pas.
|
||||||
|
*/
|
||||||
|
@media (prefers-reduced-motion) {
|
||||||
|
*, *::before, *::after {
|
||||||
|
scroll-behavior: auto !important;
|
||||||
|
transition: none !important;
|
||||||
|
animation-duration: 0s !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,6 @@ export const SELECTEUR_ENTREES_PANIER = "article";
|
||||||
export const SELECTEUR_BOUTON_SUPPRESSION_PANIER = "button.detail-produit__actions__suppression";
|
export const SELECTEUR_BOUTON_SUPPRESSION_PANIER = "button.detail-produit__actions__suppression";
|
||||||
export const SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE = "button.detail-produit__actions__soustraction";
|
export const SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE = "button.detail-produit__actions__soustraction";
|
||||||
export const SELECTEUR_BOUTON_ADDITION_QUANTITE = "button.detail-produit__actions__addition";
|
export const SELECTEUR_BOUTON_ADDITION_QUANTITE = "button.detail-produit__actions__addition";
|
||||||
export const SELECTEUR_CHAMP_QUANTITE = "input";
|
export const SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER = "input";
|
||||||
|
export const SELECTEUR_PRIX_LIGNE_PANIER = ".detail-produit__nom-prix span";
|
||||||
|
export const SELECTEUR_TOTAL_PANIER = "#panneau-panier .panneau__pied-de-page p span";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const NOM_CANAL_BOUTON_PANIER = "bouton_panier";
|
export const NOM_CANAL_BOUTON_PANIER = "bouton_panier";
|
||||||
|
export const NOM_CANAL_CONTENU_PANIER = "contenu_panier";
|
||||||
|
|
||||||
export const TYPES_MESSAGES = {
|
export const TYPES_MESSAGES = {
|
||||||
MiseAJourPanier: "maj_panier",
|
MajBoutonPanier: "maj_bouton_panier",
|
||||||
|
MajContenuPanier: "maj_contenu_panier",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,28 @@
|
||||||
import { Either } from "purify-ts";
|
import { Either } from "purify-ts";
|
||||||
import { parse, type ValiError } from "valibot";
|
import { parse, type ValiError } from "valibot";
|
||||||
|
|
||||||
import type { MiseAJourPanierMessage } from "./types/messages";
|
import type { MessageMajBoutonPanier, MessageMajContenuPanier } from "./types/messages";
|
||||||
|
|
||||||
import { reporteErreur } from "./erreurs.ts";
|
import { reporteErreur } from "./erreurs.ts";
|
||||||
import { MiseAJourPanierMessageSchema } from "./schemas/messages.ts";
|
import { MessageMajBoutonPanierSchema, MessageMajContenuPanierSchema } from "./schemas/messages.ts";
|
||||||
|
|
||||||
export const valideMessageMajPanier = (
|
export const valideMessageMajBoutonPanier = (
|
||||||
evenementMessage: MessageEvent<unknown>,
|
evenementMessage: MessageEvent<unknown>,
|
||||||
): Either<ValiError<typeof MiseAJourPanierMessageSchema>, MiseAJourPanierMessage> =>
|
): Either<ValiError<typeof MessageMajBoutonPanierSchema>, MessageMajBoutonPanier> =>
|
||||||
Either
|
Either
|
||||||
.of<ValiError<typeof MiseAJourPanierMessageSchema>, MiseAJourPanierMessage>(
|
.of<ValiError<typeof MessageMajBoutonPanierSchema>, MessageMajBoutonPanier>(
|
||||||
parse(MiseAJourPanierMessageSchema, evenementMessage.data),
|
parse(MessageMajBoutonPanierSchema, evenementMessage.data),
|
||||||
|
)
|
||||||
|
.ifLeft(erreur => {
|
||||||
|
reporteErreur(erreur);
|
||||||
|
});
|
||||||
|
|
||||||
|
export const valideMessageMajContenuPanier = (
|
||||||
|
evenementMessage: MessageEvent<unknown>,
|
||||||
|
): Either<ValiError<typeof MessageMajContenuPanierSchema>, MessageMajContenuPanier> =>
|
||||||
|
Either
|
||||||
|
.of<ValiError<typeof MessageMajContenuPanierSchema>, MessageMajContenuPanier>(
|
||||||
|
parse(MessageMajContenuPanierSchema, evenementMessage.data),
|
||||||
)
|
)
|
||||||
.ifLeft(erreur => {
|
.ifLeft(erreur => {
|
||||||
reporteErreur(erreur);
|
reporteErreur(erreur);
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,20 @@ import * as v from "valibot";
|
||||||
|
|
||||||
import { CATALOG_VISIBILITIES } from "../../constantes/cart.ts";
|
import { CATALOG_VISIBILITIES } from "../../constantes/cart.ts";
|
||||||
|
|
||||||
|
export const WCStoreCartItemTotalsSchema = v.object({
|
||||||
|
"currency_code": v.string(),
|
||||||
|
"currency_decimal_separator": v.string(),
|
||||||
|
"currency_minor_unit": v.number(),
|
||||||
|
"currency_prefix": v.string(),
|
||||||
|
"currency_suffix": v.string(),
|
||||||
|
"currency_symbol": v.string(),
|
||||||
|
"currency_thousand_separator": v.string(),
|
||||||
|
"line_subtotal": v.string(),
|
||||||
|
"line_subtotal_tax": v.string(),
|
||||||
|
"line_total": v.string(),
|
||||||
|
"line_total_tax": v.string(),
|
||||||
|
});
|
||||||
|
|
||||||
export const WCStoreCartItemSchema = v.object({
|
export const WCStoreCartItemSchema = v.object({
|
||||||
"backorders_allowed": v.boolean(),
|
"backorders_allowed": v.boolean(),
|
||||||
"catalog_visibility": v.enum(CATALOG_VISIBILITIES),
|
"catalog_visibility": v.enum(CATALOG_VISIBILITIES),
|
||||||
|
|
@ -21,7 +35,7 @@ export const WCStoreCartItemSchema = v.object({
|
||||||
"show_backorder_badge": v.boolean(),
|
"show_backorder_badge": v.boolean(),
|
||||||
"sku": v.string(),
|
"sku": v.string(),
|
||||||
"sold_individually": v.boolean(),
|
"sold_individually": v.boolean(),
|
||||||
"totals": v.unknown(),
|
"totals": WCStoreCartItemTotalsSchema,
|
||||||
"type": v.string(),
|
"type": v.string(),
|
||||||
"variation": v.array(v.unknown()),
|
"variation": v.array(v.unknown()),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,21 @@
|
||||||
import * as v from "valibot";
|
import * as v from "valibot";
|
||||||
|
|
||||||
import { TYPES_MESSAGES } from "../../constantes/messages.ts";
|
import { TYPES_MESSAGES } from "../../constantes/messages.ts";
|
||||||
|
import { WCStoreCartItemSchema } from "./cart.ts";
|
||||||
|
|
||||||
export const TypesMessagesSchema = v.enum(TYPES_MESSAGES);
|
export const TypesMessagesSchema = v.enum(TYPES_MESSAGES);
|
||||||
|
|
||||||
export const MiseAJourPanierMessageSchema = v.object({
|
export const MessageMajBoutonPanierSchema = v.object({
|
||||||
donnees: v.number(),
|
donnees: v.number(),
|
||||||
type: v.pipe(v.string(), v.value(TYPES_MESSAGES.MiseAJourPanier)),
|
type: v.pipe(v.string(), v.value(TYPES_MESSAGES.MajBoutonPanier)),
|
||||||
|
});
|
||||||
|
|
||||||
|
export const MessageMajContenuPanierDonneesSchema = v.object({
|
||||||
|
produits: v.array(WCStoreCartItemSchema),
|
||||||
|
totalPanier: v.number(),
|
||||||
|
});
|
||||||
|
|
||||||
|
export const MessageMajContenuPanierSchema = v.object({
|
||||||
|
donnees: MessageMajContenuPanierDonneesSchema,
|
||||||
|
type: v.pipe(v.string(), v.value(TYPES_MESSAGES.MajContenuPanier)),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
import type { InferOutput } from "valibot";
|
import type { InferOutput } from "valibot";
|
||||||
import type { MiseAJourPanierMessageSchema } from "../schemas/messages.ts";
|
|
||||||
|
|
||||||
export type MiseAJourPanierMessage = InferOutput<typeof MiseAJourPanierMessageSchema>;
|
import type {
|
||||||
|
MessageMajBoutonPanierSchema,
|
||||||
|
MessageMajContenuPanierDonneesSchema,
|
||||||
|
MessageMajContenuPanierSchema,
|
||||||
|
} from "../schemas/messages.ts";
|
||||||
|
|
||||||
|
export type MessageMajBoutonPanier = InferOutput<typeof MessageMajBoutonPanierSchema>;
|
||||||
|
export type MessageMajContenuPanierDonnees = InferOutput<typeof MessageMajContenuPanierDonneesSchema>;
|
||||||
|
export type MessageMajContenuPanier = InferOutput<typeof MessageMajContenuPanierSchema>;
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,12 @@
|
||||||
|
|
||||||
import { pipe } from "remeda";
|
import { pipe } from "remeda";
|
||||||
|
|
||||||
import type { MiseAJourPanierMessage } from "./lib/types/messages";
|
import type { MessageMajBoutonPanier } from "./lib/types/messages";
|
||||||
|
|
||||||
import { ATTRIBUT_CONTIENT_ARTICLES, SELECTEUR_BOUTON_PANIER } from "./constantes/dom.ts";
|
import { ATTRIBUT_CONTIENT_ARTICLES, SELECTEUR_BOUTON_PANIER } from "./constantes/dom.ts";
|
||||||
import { NOM_CANAL_BOUTON_PANIER } from "./constantes/messages.ts";
|
import { NOM_CANAL_BOUTON_PANIER } from "./constantes/messages.ts";
|
||||||
import { recupereElementOuLeve } from "./lib/dom.ts";
|
import { recupereElementOuLeve } from "./lib/dom.ts";
|
||||||
import { valideMessageMajPanier } from "./lib/messages.ts";
|
import { valideMessageMajBoutonPanier } from "./lib/messages.ts";
|
||||||
import { recupereElementDocumentEither } from "./lib/utils.ts";
|
import { recupereElementDocumentEither } from "./lib/utils.ts";
|
||||||
|
|
||||||
const initialiseBoutonPanier = (): void => {
|
const initialiseBoutonPanier = (): void => {
|
||||||
|
|
@ -21,9 +21,9 @@ const initialiseBoutonPanier = (): void => {
|
||||||
const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
||||||
|
|
||||||
CANAL_BOUTON_PANIER.onmessage = (evenementMessage: MessageEvent<unknown>): void => {
|
CANAL_BOUTON_PANIER.onmessage = (evenementMessage: MessageEvent<unknown>): void => {
|
||||||
valideMessageMajPanier(evenementMessage)
|
valideMessageMajBoutonPanier(evenementMessage)
|
||||||
// Met à jour le Bouton du Panier
|
// Met à jour le Bouton du Panier
|
||||||
.ifRight((message: MiseAJourPanierMessage) => {
|
.ifRight((message: MessageMajBoutonPanier) => {
|
||||||
BOUTON_PANIER.textContent = `cart (${String(message.donnees)})`;
|
BOUTON_PANIER.textContent = `cart (${String(message.donnees)})`;
|
||||||
BOUTON_PANIER.setAttribute(ATTRIBUT_CONTIENT_ARTICLES, String(message.donnees > 0));
|
BOUTON_PANIER.setAttribute(ATTRIBUT_CONTIENT_ARTICLES, String(message.donnees > 0));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,11 @@ import { parse } from "valibot";
|
||||||
import type { WCStoreCart, WCStoreCartItem } from "./lib/types/api/cart";
|
import type { WCStoreCart, WCStoreCartItem } from "./lib/types/api/cart";
|
||||||
import type { WCStoreCartRemoveItemArgs } from "./lib/types/api/cart-remove-item";
|
import type { WCStoreCartRemoveItemArgs } from "./lib/types/api/cart-remove-item";
|
||||||
import type { WCStoreCartUpdateItemArgs } from "./lib/types/api/cart-update-item";
|
import type { WCStoreCartUpdateItemArgs } from "./lib/types/api/cart-update-item";
|
||||||
import type { MiseAJourPanierMessage } from "./lib/types/messages";
|
import type {
|
||||||
|
MessageMajBoutonPanier,
|
||||||
|
MessageMajContenuPanier,
|
||||||
|
MessageMajContenuPanierDonnees,
|
||||||
|
} from "./lib/types/messages";
|
||||||
|
|
||||||
import { ROUTE_API_MAJ_ARTICLE_PANIER, ROUTE_API_RETIRE_ARTICLE_PANIER } from "./constantes/api.ts";
|
import { ROUTE_API_MAJ_ARTICLE_PANIER, ROUTE_API_RETIRE_ARTICLE_PANIER } from "./constantes/api.ts";
|
||||||
import {
|
import {
|
||||||
|
|
@ -15,12 +19,14 @@ import {
|
||||||
SELECTEUR_BOUTON_ADDITION_QUANTITE,
|
SELECTEUR_BOUTON_ADDITION_QUANTITE,
|
||||||
SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE,
|
SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE,
|
||||||
SELECTEUR_BOUTON_SUPPRESSION_PANIER,
|
SELECTEUR_BOUTON_SUPPRESSION_PANIER,
|
||||||
SELECTEUR_CHAMP_QUANTITE,
|
SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER,
|
||||||
SELECTEUR_CONTENEUR_PANIER,
|
SELECTEUR_CONTENEUR_PANIER,
|
||||||
SELECTEUR_ENTREES_PANIER,
|
SELECTEUR_ENTREES_PANIER,
|
||||||
|
SELECTEUR_PRIX_LIGNE_PANIER,
|
||||||
|
SELECTEUR_TOTAL_PANIER,
|
||||||
} from "./constantes/dom.ts";
|
} from "./constantes/dom.ts";
|
||||||
import { NOM_CANAL_BOUTON_PANIER, TYPES_MESSAGES } from "./constantes/messages.ts";
|
import { NOM_CANAL_BOUTON_PANIER, NOM_CANAL_CONTENU_PANIER, TYPES_MESSAGES } from "./constantes/messages.ts";
|
||||||
import { recupereElementAvecSelecteur, recupereElementOuLeve, recupereElementsOuLeve } from "./lib/dom.ts";
|
import { recupereElementAvecSelecteur, recupereElementOuLeve } from "./lib/dom.ts";
|
||||||
import {
|
import {
|
||||||
DOMElementAbsentError,
|
DOMElementAbsentError,
|
||||||
ErreurInconnue,
|
ErreurInconnue,
|
||||||
|
|
@ -33,7 +39,7 @@ import {
|
||||||
type UnknownError,
|
type UnknownError,
|
||||||
} from "./lib/erreurs.ts";
|
} from "./lib/erreurs.ts";
|
||||||
import { estError, estReponse500 } from "./lib/gardes.ts";
|
import { estError, estReponse500 } from "./lib/gardes.ts";
|
||||||
import { valideMessageMajPanier } from "./lib/messages.ts";
|
import { valideMessageMajBoutonPanier, valideMessageMajContenuPanier } from "./lib/messages.ts";
|
||||||
import { postBackendWC } from "./lib/reseau.ts";
|
import { postBackendWC } from "./lib/reseau.ts";
|
||||||
import { WCStoreCartRemoveItemArgsSchema } from "./lib/schemas/cart-remove-item.ts";
|
import { WCStoreCartRemoveItemArgsSchema } from "./lib/schemas/cart-remove-item.ts";
|
||||||
import { WCStoreCartUpdateItemArgsSchema } from "./lib/schemas/cart-update-item.ts";
|
import { WCStoreCartUpdateItemArgsSchema } from "./lib/schemas/cart-update-item.ts";
|
||||||
|
|
@ -52,15 +58,20 @@ type EtatsPage = {
|
||||||
const ETATS_PAGE: EtatsPage = _etats;
|
const ETATS_PAGE: EtatsPage = _etats;
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
const ENTREES_PANIER: Array<HTMLElement> = pipe(
|
const ENTREES_PANIER_EITHER: Either<SyntaxError, Array<HTMLElement>> = recupereElementsDocumentEither<HTMLElement>(
|
||||||
recupereElementsDocumentEither<HTMLElement>(SELECTEUR_ENTREES_PANIER),
|
SELECTEUR_ENTREES_PANIER,
|
||||||
recupereElementsOuLeve,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const CONTENEUR_PANIER: HTMLElement = pipe(
|
const CONTENEUR_PANIER: HTMLElement = pipe(
|
||||||
recupereElementDocumentEither<HTMLElement>(SELECTEUR_CONTENEUR_PANIER),
|
recupereElementDocumentEither<HTMLElement>(SELECTEUR_CONTENEUR_PANIER),
|
||||||
recupereElementOuLeve,
|
recupereElementOuLeve,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const TOTAL_PANIER: HTMLParagraphElement = pipe(
|
||||||
|
recupereElementDocumentEither<HTMLParagraphElement>(SELECTEUR_TOTAL_PANIER),
|
||||||
|
recupereElementOuLeve,
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fonction utilitaire pour rapidement créer et reporter une Erreur DOMElementAbsent.
|
* Fonction utilitaire pour rapidement créer et reporter une Erreur DOMElementAbsent.
|
||||||
*
|
*
|
||||||
|
|
@ -83,7 +94,8 @@ const recupereElementDansEntreePanierOuLeve =
|
||||||
);
|
);
|
||||||
|
|
||||||
const initialiseScriptsPagePanier = (): void => {
|
const initialiseScriptsPagePanier = (): void => {
|
||||||
ENTREES_PANIER.forEach((entree: HTMLElement) => {
|
ENTREES_PANIER_EITHER.ifRight((entrees: Array<HTMLElement>) =>
|
||||||
|
entrees.forEach((entree: HTMLElement) => {
|
||||||
const recupereElementDansEntree = recupereElementDansEntreePanierOuLeve(entree);
|
const recupereElementDansEntree = recupereElementDansEntreePanierOuLeve(entree);
|
||||||
|
|
||||||
// Retire l'entrée du DOM si la clé Panier n'existe pas et arrête précocement
|
// Retire l'entrée du DOM si la clé Panier n'existe pas et arrête précocement
|
||||||
|
|
@ -97,7 +109,7 @@ const initialiseScriptsPagePanier = (): void => {
|
||||||
|
|
||||||
// Récupère les attributs et éléments utilisés dans le script
|
// Récupère les attributs et éléments utilisés dans le script
|
||||||
const boutonSoustraction = recupereElementDansEntree<HTMLButtonElement>(SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE);
|
const boutonSoustraction = recupereElementDansEntree<HTMLButtonElement>(SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE);
|
||||||
const champQuantite = recupereElementDansEntree<HTMLInputElement>(SELECTEUR_CHAMP_QUANTITE);
|
const champQuantite = recupereElementDansEntree<HTMLInputElement>(SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER);
|
||||||
const boutonAddition = recupereElementDansEntree<HTMLButtonElement>(SELECTEUR_BOUTON_ADDITION_QUANTITE);
|
const boutonAddition = recupereElementDansEntree<HTMLButtonElement>(SELECTEUR_BOUTON_ADDITION_QUANTITE);
|
||||||
const boutonSuppression = recupereElementDansEntree<HTMLButtonElement>(SELECTEUR_BOUTON_SUPPRESSION_PANIER);
|
const boutonSuppression = recupereElementDansEntree<HTMLButtonElement>(SELECTEUR_BOUTON_SUPPRESSION_PANIER);
|
||||||
|
|
||||||
|
|
@ -134,15 +146,21 @@ const initialiseScriptsPagePanier = (): void => {
|
||||||
.with(P._, corpsOkInconnu => parse(WCStoreCartSchema, corpsOkInconnu))
|
.with(P._, corpsOkInconnu => parse(WCStoreCartSchema, corpsOkInconnu))
|
||||||
// Réponses inconnues
|
// Réponses inconnues
|
||||||
.otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>)),
|
.otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>)),
|
||||||
prop("items_count"),
|
tap((panier: WCStoreCart) => {
|
||||||
tap((nombreArticlesPanier: number) => {
|
// Émet un Message avec le nouveau contenu du Panier
|
||||||
console.debug("nombreArticlesPanier", nombreArticlesPanier);
|
// TODO: Valider le Message avant de l'émettre
|
||||||
|
new BroadcastChannel(NOM_CANAL_CONTENU_PANIER).postMessage({
|
||||||
|
donnees: {
|
||||||
|
produits: panier.items,
|
||||||
|
totalPanier: Number(panier.totals.total_items / 100),
|
||||||
|
},
|
||||||
|
type: TYPES_MESSAGES.MajContenuPanier,
|
||||||
|
} as MessageMajContenuPanier);
|
||||||
// Émet un Message avec le nouveau nombre de Produits dans le Panier
|
// Émet un Message avec le nouveau nombre de Produits dans le Panier
|
||||||
const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
// TODO: Valider le Message avant de l'émettre
|
||||||
CANAL_BOUTON_PANIER.postMessage({
|
new BroadcastChannel(NOM_CANAL_BOUTON_PANIER).postMessage({
|
||||||
donnees: nombreArticlesPanier,
|
donnees: panier.items_count,
|
||||||
type: TYPES_MESSAGES.MiseAJourPanier,
|
type: TYPES_MESSAGES.MajBoutonPanier,
|
||||||
});
|
});
|
||||||
// Retire l'entrée du Panier du DOM
|
// Retire l'entrée du Panier du DOM
|
||||||
entree.remove();
|
entree.remove();
|
||||||
|
|
@ -166,8 +184,7 @@ const initialiseScriptsPagePanier = (): void => {
|
||||||
.fromNullable(champQuantite.valueAsNumber)
|
.fromNullable(champQuantite.valueAsNumber)
|
||||||
.filter((valeur) => valeur > 1)
|
.filter((valeur) => valeur > 1)
|
||||||
.ifJust((valeur) => {
|
.ifJust((valeur) => {
|
||||||
// Modifie des éléments du DOM pour signifier le traitement de la requête et empêcher des
|
// Modifie des éléments du DOM pour signaler la requête et empêcher des doubles exécutions
|
||||||
// doubles exécutions
|
|
||||||
boutonSuppression.textContent = "C= C= C= C= C=┌(;・ω・)┘";
|
boutonSuppression.textContent = "C= C= C= C= C=┌(;・ω・)┘";
|
||||||
boutonSoustraction.toggleAttribute("disabled");
|
boutonSoustraction.toggleAttribute("disabled");
|
||||||
boutonAddition.toggleAttribute("disabled");
|
boutonAddition.toggleAttribute("disabled");
|
||||||
|
|
@ -204,24 +221,22 @@ const initialiseScriptsPagePanier = (): void => {
|
||||||
.with(P._, corpsOkInconnu => parse(WCStoreCartSchema, corpsOkInconnu))
|
.with(P._, corpsOkInconnu => parse(WCStoreCartSchema, corpsOkInconnu))
|
||||||
// Réponses inconnues
|
// Réponses inconnues
|
||||||
.otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>)),
|
.otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>)),
|
||||||
tap((reponse: WCStoreCart) => {
|
tap((panier: WCStoreCart) => {
|
||||||
// Émet un message pour la mise à jour du bouton du Panier
|
// Émet un message pour la mise à jour du bouton du Panier
|
||||||
const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
// TODO: Valider le Message avant de l'émettre
|
||||||
CANAL_BOUTON_PANIER.postMessage({
|
new BroadcastChannel(NOM_CANAL_BOUTON_PANIER).postMessage({
|
||||||
donnees: reponse.items_count,
|
donnees: panier.items_count,
|
||||||
type: TYPES_MESSAGES.MiseAJourPanier,
|
type: TYPES_MESSAGES.MajBoutonPanier,
|
||||||
});
|
});
|
||||||
}),
|
// Émet un Message avec le nouveau contenu du Panier
|
||||||
tap((reponse: WCStoreCart) => {
|
// TODO: Valider le Message avant de l'émettre
|
||||||
Maybe
|
new BroadcastChannel(NOM_CANAL_CONTENU_PANIER).postMessage({
|
||||||
.fromNullable(
|
donnees: {
|
||||||
reponse.items
|
produits: panier.items,
|
||||||
.find((ligne: WCStoreCartItem) => clePanier === ligne.key)
|
totalPanier: Number(panier.totals.total_items / 100),
|
||||||
?.quantity,
|
},
|
||||||
)
|
type: TYPES_MESSAGES.MajContenuPanier,
|
||||||
.ifJust((nouvelleQuantite: number) =>
|
} as MessageMajContenuPanier);
|
||||||
champQuantite.setAttribute("value", String(nouvelleQuantite))
|
|
||||||
);
|
|
||||||
|
|
||||||
boutonSoustraction.toggleAttribute("disabled");
|
boutonSoustraction.toggleAttribute("disabled");
|
||||||
boutonAddition.toggleAttribute("disabled");
|
boutonAddition.toggleAttribute("disabled");
|
||||||
|
|
@ -285,24 +300,22 @@ const initialiseScriptsPagePanier = (): void => {
|
||||||
.with(P._, corpsOkInconnu => parse(WCStoreCartSchema, corpsOkInconnu))
|
.with(P._, corpsOkInconnu => parse(WCStoreCartSchema, corpsOkInconnu))
|
||||||
// Réponses inconnues
|
// Réponses inconnues
|
||||||
.otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>)),
|
.otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>)),
|
||||||
tap((reponse: WCStoreCart) => {
|
tap((panier: WCStoreCart) => {
|
||||||
// Émet un message pour la mise à jour du bouton du Panier
|
// Émet un message pour la mise à jour du bouton du Panier
|
||||||
const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
// TODO: Valider le Message avant de l'émettre
|
||||||
CANAL_BOUTON_PANIER.postMessage({
|
new BroadcastChannel(NOM_CANAL_BOUTON_PANIER).postMessage({
|
||||||
donnees: reponse.items_count,
|
donnees: panier.items_count,
|
||||||
type: TYPES_MESSAGES.MiseAJourPanier,
|
type: TYPES_MESSAGES.MajBoutonPanier,
|
||||||
});
|
});
|
||||||
}),
|
// Émet un Message avec le nouveau contenu du Panier
|
||||||
tap((reponse: WCStoreCart) => {
|
// TODO: Valider le Message avant de l'émettre
|
||||||
Maybe
|
new BroadcastChannel(NOM_CANAL_CONTENU_PANIER).postMessage({
|
||||||
.fromNullable(
|
donnees: {
|
||||||
reponse.items
|
produits: panier.items,
|
||||||
.find((ligne: WCStoreCartItem) => clePanier === ligne.key)
|
totalPanier: Number(panier.totals.total_items / 100),
|
||||||
?.quantity,
|
},
|
||||||
)
|
type: TYPES_MESSAGES.MajContenuPanier,
|
||||||
.ifJust((nouvelleQuantite: number) =>
|
} as MessageMajContenuPanier);
|
||||||
champQuantite.setAttribute("value", String(nouvelleQuantite))
|
|
||||||
);
|
|
||||||
|
|
||||||
boutonSoustraction.toggleAttribute("disabled");
|
boutonSoustraction.toggleAttribute("disabled");
|
||||||
boutonAddition.toggleAttribute("disabled");
|
boutonAddition.toggleAttribute("disabled");
|
||||||
|
|
@ -322,21 +335,57 @@ const initialiseScriptsPagePanier = (): void => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const initialiseMajConteneurPanier = (): void => {
|
const initialiseMajConteneurPanier = (): void => {
|
||||||
const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
||||||
CANAL_BOUTON_PANIER.onmessage = (evenementMessage: MessageEvent<unknown>): void => {
|
CANAL_BOUTON_PANIER.onmessage = (evenementMessage: MessageEvent<unknown>): void => {
|
||||||
valideMessageMajPanier(evenementMessage)
|
valideMessageMajBoutonPanier(evenementMessage)
|
||||||
// Met à jour le Bouton du Panier
|
// Met à jour le Bouton du Panier
|
||||||
.ifRight((message: MiseAJourPanierMessage) => {
|
.ifRight((message: MessageMajBoutonPanier) => {
|
||||||
CONTENEUR_PANIER.setAttribute(ATTRIBUT_CONTIENT_ARTICLES, String(message.donnees !== 0));
|
CONTENEUR_PANIER.setAttribute(ATTRIBUT_CONTIENT_ARTICLES, String(message.donnees !== 0));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const initialiseEcouteCanalMajContenuPanier = (): void => {
|
||||||
|
new BroadcastChannel(NOM_CANAL_CONTENU_PANIER).onmessage = (evenementMessage: MessageEvent<unknown>): void => {
|
||||||
|
/**
|
||||||
|
* À la réception d'un Événement (contenu le Panier), mettre à jour :
|
||||||
|
* - les quantités ;
|
||||||
|
* - les prix ;
|
||||||
|
*/
|
||||||
|
valideMessageMajContenuPanier(evenementMessage)
|
||||||
|
// Met à jour le contenu du Panier
|
||||||
|
.map(prop("donnees"))
|
||||||
|
.ifRight((donnees: MessageMajContenuPanierDonnees) => {
|
||||||
|
donnees.produits.forEach((ligne: WCStoreCartItem) => {
|
||||||
|
ENTREES_PANIER_EITHER.ifRight((entrees: Array<HTMLElement>) => {
|
||||||
|
Maybe
|
||||||
|
.fromNullable(entrees.find((entree) => entree.getAttribute(ATTRIBUT_CLE_PANIER) === ligne.key))
|
||||||
|
.ifJust((entree) => {
|
||||||
|
// Fonction utilitaire
|
||||||
|
const recupereElementDansEntree = recupereElementDansEntreePanierOuLeve(entree);
|
||||||
|
|
||||||
|
const prixLigne = recupereElementDansEntree<HTMLSpanElement>(SELECTEUR_PRIX_LIGNE_PANIER);
|
||||||
|
const champQuantite = recupereElementDansEntree<HTMLInputElement>(
|
||||||
|
SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER,
|
||||||
|
);
|
||||||
|
|
||||||
|
prixLigne.textContent = `${String(Number(ligne.totals.line_total) / 100)} €`;
|
||||||
|
champQuantite.setAttribute("value", String(ligne.quantity));
|
||||||
|
TOTAL_PANIER.textContent = `${donnees.totalPanier} €`;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
initialiseScriptsPagePanier();
|
initialiseScriptsPagePanier();
|
||||||
initialiseMajConteneurPanier();
|
initialiseMajConteneurPanier();
|
||||||
|
initialiseEcouteCanalMajContenuPanier();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ const ajouteProduitAuPanier = () => {
|
||||||
*/
|
*/
|
||||||
BOUTON_AJOUT_PANIER.textContent = "Added to cart!";
|
BOUTON_AJOUT_PANIER.textContent = "Added to cart!";
|
||||||
const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);
|
||||||
CANAL_BOUTON_PANIER.postMessage({ donnees: nombreArticlesPanier, type: TYPES_MESSAGES.MiseAJourPanier });
|
CANAL_BOUTON_PANIER.postMessage({ donnees: nombreArticlesPanier, type: TYPES_MESSAGES.MajBoutonPanier });
|
||||||
|
|
||||||
// TODO: Prévoir un cas où ce Timeout est annulé quand l'Utilisateur agit avant sur le Sélecteur
|
// TODO: Prévoir un cas où ce Timeout est annulé quand l'Utilisateur agit avant sur le Sélecteur
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
||||||
|
|
@ -18,125 +18,10 @@
|
||||||
|
|
||||||
{% block contenu %}
|
{% block contenu %}
|
||||||
<main id="page-panier" data-contient-articles="{{ articles_presents }}">
|
<main id="page-panier" data-contient-articles="{{ articles_presents }}">
|
||||||
<section class="panneau" id="panneau-panier">
|
{# « Your Cart » #}
|
||||||
<header class="panneau__en-tete">
|
{% include "parts/pages/panier/panneau-panier.twig" %}
|
||||||
<h2>Your cart</h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="panneau__grille-produits">
|
|
||||||
{% for produit in produits_panier %}
|
|
||||||
<article class="panneau__grille-produits__produit" data-cle-panier="{{ produit.cle }}">
|
|
||||||
<div class="panneau__grille-produits__produit__illustratif">
|
|
||||||
<a href="{{ produit.url }}">{{ produit.image }}</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panneau__grille-produits__produit__textuel detail-produit">
|
|
||||||
<h3 class="detail-produit__nom-prix">
|
|
||||||
<a href="{{ produit.url }}">{{ produit.titre }}.</a>
|
|
||||||
<span>{{ produit.prix }} €</span>
|
|
||||||
</h3>
|
|
||||||
<p class="detail-produit__description">
|
|
||||||
{# Affiche tous les attributs relevants pour la variation choisie #}
|
|
||||||
{% for attribut in produit.attributs %}
|
|
||||||
{% if attribut.valeur %}
|
|
||||||
{{ attribut.nom }} {{ attribut.valeur }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="detail-produit__actions">
|
|
||||||
<button
|
|
||||||
class="detail-produit__actions__soustraction"
|
|
||||||
{{ produit.quantite > 1 ? "" : "disabled" }}
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
-
|
|
||||||
</button>
|
|
||||||
<input min="1" type="number" value="{{ produit.quantite }}" />
|
|
||||||
<button class="detail-produit__actions__addition" type="button">+</button>
|
|
||||||
|
|
||||||
<button class="detail-produit__actions__suppression" type="button">Remove</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panneau__emballages">
|
|
||||||
<div class="panneau__emballages__conteneur">
|
|
||||||
<div class="panneau__emballages__titre-prix">
|
|
||||||
<p>Gift Bag <span>5 €</span></p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form class="panneau__emballages__choix">
|
|
||||||
<div class="panneau__emballages__choix__ligne">
|
|
||||||
<label for="emballages-tous-produits">To all products</label>
|
|
||||||
<input
|
|
||||||
id="emballages-tous-produits"
|
|
||||||
name="emballages"
|
|
||||||
type="radio"
|
|
||||||
value="emballages-tous-produits"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panneau__emballages__choix__ligne">
|
|
||||||
<label for="emballages-produits-specifiques">To specific products</label>
|
|
||||||
<input
|
|
||||||
id="emballages-produits-specifiques"
|
|
||||||
name="emballages"
|
|
||||||
type="radio"
|
|
||||||
value="emballages-produits-specifiques"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panneau__instructions-code-promo">
|
|
||||||
<textarea
|
|
||||||
class="panneau__instructions-code-promo__instructions"
|
|
||||||
id="instructions"
|
|
||||||
maxlength="2000"
|
|
||||||
minlength="10"
|
|
||||||
name="instructions"
|
|
||||||
placeholder="Add special instructions for your order: specify the products you want wrapped and how (i.e. all in one bag or separated), a gift message, etc."
|
|
||||||
resizable="false"
|
|
||||||
rows="3"
|
|
||||||
spellcheck="true"
|
|
||||||
></textarea>
|
|
||||||
|
|
||||||
<div class="panneau__instructions-code-promo__code-promo">
|
|
||||||
<input
|
|
||||||
id="code-promo"
|
|
||||||
name="code-promo"
|
|
||||||
placeholder="Discount code or gift card"
|
|
||||||
type="text"
|
|
||||||
maxlength="20"
|
|
||||||
minlength="3"
|
|
||||||
>
|
|
||||||
<button for="code-promo" type="button">Apply</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panneau__sous-totaux">
|
|
||||||
<p class="panneau__sous-totaux__ligne sous-total">
|
|
||||||
Subtotal: <strong>{{ sous_total_panier }} €</strong>
|
|
||||||
</p>
|
|
||||||
<p class="panneau__sous-totaux__ligne">
|
|
||||||
Shipping: <strong>Enter your shipping address.</strong>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p class="panneau__sous-totaux__conditions-livraison">
|
|
||||||
Belgium and France: free shipping.<br>
|
|
||||||
Worldwide: free shipping on orders above 150 €.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<footer class="panneau__pied-de-page">
|
|
||||||
<p>Total: <span>{{ total_panier }} €</span></p>
|
|
||||||
</footer>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
{# Your Info #}
|
||||||
<section class="panneau" id="panneau-informations-client">
|
<section class="panneau" id="panneau-informations-client">
|
||||||
<header class="panneau__en-tete">
|
<header class="panneau__en-tete">
|
||||||
<h2>Your info</h2>
|
<h2>Your info</h2>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
<section class="panneau" id="panneau-panier">
|
||||||
|
<header class="panneau__en-tete">
|
||||||
|
<h2>Your cart</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="panneau__grille-produits">
|
||||||
|
{% for produit in produits_panier %}
|
||||||
|
<article class="panneau__grille-produits__produit" data-cle-panier="{{ produit.cle }}">
|
||||||
|
<div class="panneau__grille-produits__produit__illustratif">
|
||||||
|
<a href="{{ produit.url }}">{{ produit.image }}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panneau__grille-produits__produit__textuel detail-produit">
|
||||||
|
<h3 class="detail-produit__nom-prix">
|
||||||
|
<a href="{{ produit.url }}">{{ produit.titre }}.</a>
|
||||||
|
<span>{{ produit.prix * produit.quantite }} €</span>
|
||||||
|
</h3>
|
||||||
|
<p class="detail-produit__description">
|
||||||
|
{# Affiche tous les attributs relevants pour la variation choisie #}
|
||||||
|
{% for attribut in produit.attributs %}
|
||||||
|
{% if attribut.valeur %}
|
||||||
|
{{ attribut.nom }} {{ attribut.valeur }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="detail-produit__actions">
|
||||||
|
<button
|
||||||
|
class="detail-produit__actions__soustraction"
|
||||||
|
{{ produit.quantite > 1 ? "" : "disabled" }}
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
-
|
||||||
|
</button>
|
||||||
|
<input min="1" type="number" value="{{ produit.quantite }}" />
|
||||||
|
<button class="detail-produit__actions__addition" type="button">+</button>
|
||||||
|
|
||||||
|
<button class="detail-produit__actions__suppression" type="button">Remove</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panneau__emballages">
|
||||||
|
<div class="panneau__emballages__conteneur">
|
||||||
|
<div class="panneau__emballages__titre-prix">
|
||||||
|
<p>Gift Bag <span>5 €</span></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form class="panneau__emballages__choix">
|
||||||
|
<div class="panneau__emballages__choix__ligne">
|
||||||
|
<label for="emballages-tous-produits">To all products</label>
|
||||||
|
<input
|
||||||
|
id="emballages-tous-produits"
|
||||||
|
name="emballages"
|
||||||
|
type="radio"
|
||||||
|
value="emballages-tous-produits"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panneau__emballages__choix__ligne">
|
||||||
|
<label for="emballages-produits-specifiques">To specific products</label>
|
||||||
|
<input
|
||||||
|
id="emballages-produits-specifiques"
|
||||||
|
name="emballages"
|
||||||
|
type="radio"
|
||||||
|
value="emballages-produits-specifiques"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panneau__instructions-code-promo">
|
||||||
|
<textarea
|
||||||
|
class="panneau__instructions-code-promo__instructions"
|
||||||
|
id="instructions"
|
||||||
|
maxlength="2000"
|
||||||
|
minlength="10"
|
||||||
|
name="instructions"
|
||||||
|
placeholder="Add special instructions for your order: specify the products you want wrapped and how (i.e. all in one bag or separated), a gift message, etc."
|
||||||
|
resizable="false"
|
||||||
|
rows="3"
|
||||||
|
spellcheck="true"
|
||||||
|
></textarea>
|
||||||
|
|
||||||
|
<div class="panneau__instructions-code-promo__code-promo">
|
||||||
|
<input
|
||||||
|
id="code-promo"
|
||||||
|
name="code-promo"
|
||||||
|
placeholder="Discount code or gift card"
|
||||||
|
type="text"
|
||||||
|
maxlength="20"
|
||||||
|
minlength="3"
|
||||||
|
>
|
||||||
|
<button for="code-promo" type="button">Apply</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panneau__sous-totaux">
|
||||||
|
<p class="panneau__sous-totaux__ligne sous-total">
|
||||||
|
Subtotal: <strong>{{ sous_total_panier }} €</strong>
|
||||||
|
</p>
|
||||||
|
<p class="panneau__sous-totaux__ligne">
|
||||||
|
Shipping: <strong>Enter your shipping address.</strong>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="panneau__sous-totaux__conditions-livraison">
|
||||||
|
Belgium and France: free shipping.<br>
|
||||||
|
Worldwide: free shipping on orders above 150 €.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="panneau__pied-de-page">
|
||||||
|
<p>Total: <span>{{ total_panier }} €</span></p>
|
||||||
|
</footer>
|
||||||
|
</section>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue