2024-11-12

This commit is contained in:
gcch 2024-11-12 11:01:34 +01:00
commit 837e363983
42 changed files with 665 additions and 281 deletions

View file

@ -8,6 +8,7 @@
"controle", "controle",
"controles", "controles",
"coordonnee", "coordonnee",
"cout",
"COUT", "COUT",
"couts", "couts",
"Crell", "Crell",
@ -33,6 +34,7 @@
"GLITCHTIP", "GLITCHTIP",
"haikuabout", "haikuabout",
"haikuatelier", "haikuatelier",
"idempotency",
"leve", "leve",
"methode", "methode",
"mobily", "mobily",
@ -54,6 +56,7 @@
"Simplifiee", "Simplifiee",
"souleve", "souleve",
"specifiques", "specifiques",
"succes",
"Surchargement", "Surchargement",
"tabpanel", "tabpanel",
"tete", "tete",

View file

@ -25,6 +25,7 @@
"lstrojny/functional-php": "^1.17", "lstrojny/functional-php": "^1.17",
"mnsami/composer-custom-directory-installer": "^2.0", "mnsami/composer-custom-directory-installer": "^2.0",
"oscarotero/env": "^2.1", "oscarotero/env": "^2.1",
"ramsey/uuid": "^4.7",
"roots/bedrock-autoloader": "^1.0", "roots/bedrock-autoloader": "^1.0",
"roots/bedrock-disallow-indexing": "^2.0", "roots/bedrock-disallow-indexing": "^2.0",
"roots/wordpress": "^6.6.1", "roots/wordpress": "^6.6.1",

291
composer.lock generated
View file

@ -4,8 +4,68 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "0bdfc42e76a3d040e2167ae811127d44", "content-hash": "f7d825bdf01f1aaa226fa4e8ea80960f",
"packages": [ "packages": [
{
"name": "brick/math",
"version": "0.12.1",
"source": {
"type": "git",
"url": "https://github.com/brick/math.git",
"reference": "f510c0a40911935b77b86859eb5223d58d660df1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1",
"reference": "f510c0a40911935b77b86859eb5223d58d660df1",
"shasum": ""
},
"require": {
"php": "^8.1"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.2",
"phpunit/phpunit": "^10.1",
"vimeo/psalm": "5.16.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Brick\\Math\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Arbitrary-precision arithmetic library",
"keywords": [
"Arbitrary-precision",
"BigInteger",
"BigRational",
"arithmetic",
"bigdecimal",
"bignum",
"bignumber",
"brick",
"decimal",
"integer",
"math",
"mathematics",
"rational"
],
"support": {
"issues": "https://github.com/brick/math/issues",
"source": "https://github.com/brick/math/tree/0.12.1"
},
"funding": [
{
"url": "https://github.com/BenMorel",
"type": "github"
}
],
"time": "2023-11-29T23:19:16+00:00"
},
{ {
"name": "composer/installers", "name": "composer/installers",
"version": "v2.3.0", "version": "v2.3.0",
@ -1192,6 +1252,187 @@
}, },
"time": "2023-04-04T09:54:51+00:00" "time": "2023-04-04T09:54:51+00:00"
}, },
{
"name": "ramsey/collection",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/ramsey/collection.git",
"reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
"reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
"shasum": ""
},
"require": {
"php": "^8.1"
},
"require-dev": {
"captainhook/plugin-composer": "^5.3",
"ergebnis/composer-normalize": "^2.28.3",
"fakerphp/faker": "^1.21",
"hamcrest/hamcrest-php": "^2.0",
"jangregor/phpstan-prophecy": "^1.0",
"mockery/mockery": "^1.5",
"php-parallel-lint/php-console-highlighter": "^1.0",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpcsstandards/phpcsutils": "^1.0.0-rc1",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^9.5",
"psalm/plugin-mockery": "^1.1",
"psalm/plugin-phpunit": "^0.18.4",
"ramsey/coding-standard": "^2.0.3",
"ramsey/conventional-commits": "^1.3",
"vimeo/psalm": "^5.4"
},
"type": "library",
"extra": {
"captainhook": {
"force-install": true
},
"ramsey/conventional-commits": {
"configFile": "conventional-commits.json"
}
},
"autoload": {
"psr-4": {
"Ramsey\\Collection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ben Ramsey",
"email": "ben@benramsey.com",
"homepage": "https://benramsey.com"
}
],
"description": "A PHP library for representing and manipulating collections.",
"keywords": [
"array",
"collection",
"hash",
"map",
"queue",
"set"
],
"support": {
"issues": "https://github.com/ramsey/collection/issues",
"source": "https://github.com/ramsey/collection/tree/2.0.0"
},
"funding": [
{
"url": "https://github.com/ramsey",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/ramsey/collection",
"type": "tidelift"
}
],
"time": "2022-12-31T21:50:55+00:00"
},
{
"name": "ramsey/uuid",
"version": "4.7.6",
"source": {
"type": "git",
"url": "https://github.com/ramsey/uuid.git",
"reference": "91039bc1faa45ba123c4328958e620d382ec7088"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088",
"reference": "91039bc1faa45ba123c4328958e620d382ec7088",
"shasum": ""
},
"require": {
"brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12",
"ext-json": "*",
"php": "^8.0",
"ramsey/collection": "^1.2 || ^2.0"
},
"replace": {
"rhumsaa/uuid": "self.version"
},
"require-dev": {
"captainhook/captainhook": "^5.10",
"captainhook/plugin-composer": "^5.3",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"doctrine/annotations": "^1.8",
"ergebnis/composer-normalize": "^2.15",
"mockery/mockery": "^1.3",
"paragonie/random-lib": "^2",
"php-mock/php-mock": "^2.2",
"php-mock/php-mock-mockery": "^1.3",
"php-parallel-lint/php-parallel-lint": "^1.1",
"phpbench/phpbench": "^1.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "^8.5 || ^9",
"ramsey/composer-repl": "^1.4",
"slevomat/coding-standard": "^8.4",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.9"
},
"suggest": {
"ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",
"ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.",
"ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.",
"paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
"ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
},
"type": "library",
"extra": {
"captainhook": {
"force-install": true
}
},
"autoload": {
"files": [
"src/functions.php"
],
"psr-4": {
"Ramsey\\Uuid\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A PHP library for generating and working with universally unique identifiers (UUIDs).",
"keywords": [
"guid",
"identifier",
"uuid"
],
"support": {
"issues": "https://github.com/ramsey/uuid/issues",
"source": "https://github.com/ramsey/uuid/tree/4.7.6"
},
"funding": [
{
"url": "https://github.com/ramsey",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/ramsey/uuid",
"type": "tidelift"
}
],
"time": "2024-04-27T21:32:50+00:00"
},
{ {
"name": "roots/bedrock-autoloader", "name": "roots/bedrock-autoloader",
"version": "1.0.4", "version": "1.0.4",
@ -3325,16 +3566,16 @@
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
"version": "5.5.1", "version": "5.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "0c70d2c566e899666f367ab7b80986beb3581e6f" "reference": "f3558a4c23426d12bffeaab463f8a8d8b681193c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/0c70d2c566e899666f367ab7b80986beb3581e6f", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/f3558a4c23426d12bffeaab463f8a8d8b681193c",
"reference": "0c70d2c566e899666f367ab7b80986beb3581e6f", "reference": "f3558a4c23426d12bffeaab463f8a8d8b681193c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3343,7 +3584,7 @@
"php": "^7.4 || ^8.0", "php": "^7.4 || ^8.0",
"phpdocumentor/reflection-common": "^2.2", "phpdocumentor/reflection-common": "^2.2",
"phpdocumentor/type-resolver": "^1.7", "phpdocumentor/type-resolver": "^1.7",
"phpstan/phpdoc-parser": "^1.7", "phpstan/phpdoc-parser": "^1.7|^2.0",
"webmozart/assert": "^1.9.1" "webmozart/assert": "^1.9.1"
}, },
"require-dev": { "require-dev": {
@ -3383,9 +3624,9 @@
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": { "support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.5.1" "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.0"
}, },
"time": "2024-11-06T11:58:54+00:00" "time": "2024-11-12T11:25:25+00:00"
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
@ -3447,30 +3688,30 @@
}, },
{ {
"name": "phpstan/phpdoc-parser", "name": "phpstan/phpdoc-parser",
"version": "1.33.0", "version": "2.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git", "url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140" "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/82a311fd3690fb2bf7b64d5c98f912b3dd746140", "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/c00d78fb6b29658347f9d37ebe104bffadf36299",
"reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140", "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2 || ^8.0" "php": "^7.4 || ^8.0"
}, },
"require-dev": { "require-dev": {
"doctrine/annotations": "^2.0", "doctrine/annotations": "^2.0",
"nikic/php-parser": "^4.15", "nikic/php-parser": "^5.3.0",
"php-parallel-lint/php-parallel-lint": "^1.2", "php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/extension-installer": "^1.0", "phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.5", "phpstan/phpstan": "^2.0",
"phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-strict-rules": "^1.0", "phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.6",
"symfony/process": "^5.2" "symfony/process": "^5.2"
}, },
"type": "library", "type": "library",
@ -3488,9 +3729,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types", "description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": { "support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues", "issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.33.0" "source": "https://github.com/phpstan/phpdoc-parser/tree/2.0.0"
}, },
"time": "2024-10-13T11:25:22+00:00" "time": "2024-10-13T11:29:49+00:00"
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
@ -4631,16 +4872,16 @@
}, },
{ {
"name": "squizlabs/php_codesniffer", "name": "squizlabs/php_codesniffer",
"version": "3.10.3", "version": "3.11.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
"reference": "62d32998e820bddc40f99f8251958aed187a5c9c" "reference": "70c08f8d20c0eb4fe56f26644dd94dae76a7f450"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/70c08f8d20c0eb4fe56f26644dd94dae76a7f450",
"reference": "62d32998e820bddc40f99f8251958aed187a5c9c", "reference": "70c08f8d20c0eb4fe56f26644dd94dae76a7f450",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4707,7 +4948,7 @@
"type": "open_collective" "type": "open_collective"
} }
], ],
"time": "2024-09-18T10:38:58+00:00" "time": "2024-11-12T09:53:29+00:00"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",

View file

@ -8,13 +8,10 @@
"packageManager": "pnpm@9.12.3", "packageManager": "pnpm@9.12.3",
"main": "index.js", "main": "index.js",
"keywords": [], "keywords": [],
"scripts": { "scripts": { "knip": "knip", "test": "echo \"Error: no test specified\" && exit 1" },
"knip": "knip",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": { "dependencies": {
"@mobily/ts-belt": "4.0.0-rc.5", "@mobily/ts-belt": "4.0.0-rc.5",
"@sentry/browser": "8.37.1", "@sentry/browser": "8.38.0",
"@swan-io/boxed": "^3.1.2", "@swan-io/boxed": "^3.1.2",
"a11y-dialog": "^8.1.1", "a11y-dialog": "^8.1.1",
"purify-ts": "^2.1.0", "purify-ts": "^2.1.0",
@ -26,7 +23,7 @@
"@eslint/js": "^9.14.0", "@eslint/js": "^9.14.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.37.1", "@sentry/types": "8.38.0",
"@swc/cli": "0.5.0", "@swc/cli": "0.5.0",
"@types/eslint__js": "^8.42.3", "@types/eslint__js": "^8.42.3",
"@types/node": "^22.9.0", "@types/node": "^22.9.0",
@ -69,15 +66,8 @@
"ios >0 and last 3 years" "ios >0 and last 3 years"
], ],
"knip": { "knip": {
"entry": [ "entry": ["web/app/themes/haiku-atelier-2024/src/scripts/*.ts"],
"web/app/themes/haiku-atelier-2024/src/scripts/*.ts" "project": ["web/app/themes/haiku-atelier-2024/src/scripts/**/*.{js,ts,d.ts}"]
],
"project": [
"web/app/themes/haiku-atelier-2024/src/scripts/**/*.{js,ts,d.ts}"
]
}, },
"trustedDependencies": [ "trustedDependencies": ["@biomejs/biome", "@parcel/watcher"]
"@biomejs/biome",
"@parcel/watcher"
]
} }

104
pnpm-lock.yaml generated
View file

@ -12,8 +12,8 @@ importers:
specifier: 4.0.0-rc.5 specifier: 4.0.0-rc.5
version: 4.0.0-rc.5 version: 4.0.0-rc.5
'@sentry/browser': '@sentry/browser':
specifier: 8.37.1 specifier: 8.38.0
version: 8.37.1 version: 8.38.0
'@swan-io/boxed': '@swan-io/boxed':
specifier: ^3.1.2 specifier: ^3.1.2
version: 3.1.2(typescript@5.7.0-dev.20241105) version: 3.1.2(typescript@5.7.0-dev.20241105)
@ -43,8 +43,8 @@ importers:
specifier: ^3.4.1 specifier: ^3.4.1
version: 3.4.1(prettier@3.3.3) version: 3.4.1(prettier@3.3.3)
'@sentry/types': '@sentry/types':
specifier: 8.37.1 specifier: 8.38.0
version: 8.37.1 version: 8.38.0
'@swc/cli': '@swc/cli':
specifier: 0.5.0 specifier: 0.5.0
version: 0.5.0(@swc/core@1.9.1) version: 0.5.0(@swc/core@1.9.1)
@ -863,36 +863,36 @@ packages:
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
'@sentry-internal/browser-utils@8.37.1': '@sentry-internal/browser-utils@8.38.0':
resolution: {integrity: sha512-OSR/V5GCsSCG7iapWtXCT/y22uo3HlawdEgfM1NIKk1mkP15UyGQtGEzZDdih2H+SNuX1mp9jQLTjr5FFp1A5w==} resolution: {integrity: sha512-5QMVcssrAcmjKT0NdFYcX0b0wwZovGAZ9L2GajErXtHkBenjI2sgR2+5J7n+QZGuk2SC1qhGmT1O9i3p3UEwew==}
engines: {node: '>=14.18'} engines: {node: '>=14.18'}
'@sentry-internal/feedback@8.37.1': '@sentry-internal/feedback@8.38.0':
resolution: {integrity: sha512-Se25NXbSapgS2S+JssR5YZ48b3OY4UGmAuBOafgnMW91LXMxRNWRbehZuNUmjjHwuywABMxjgu+Yp5uJDATX+g==} resolution: {integrity: sha512-AW5HCCAlc3T1jcSuNhbFVNO1CHyJ5g5tsGKEP4VKgu+D1Gg2kZ5S2eFatLBUP/BD5JYb1A7p6XPuzYp1XfMq0A==}
engines: {node: '>=14.18'} engines: {node: '>=14.18'}
'@sentry-internal/replay-canvas@8.37.1': '@sentry-internal/replay-canvas@8.38.0':
resolution: {integrity: sha512-1JLAaPtn1VL5vblB0BMELFV0D+KUm/iMGsrl4/JpRm0Ws5ESzQl33DhXVv1IX/ZAbx9i14EjR7MG9+Hj70tieQ==} resolution: {integrity: sha512-OxmlWzK9J8mRM+KxdSnQ5xuxq+p7TiBzTz70FT3HltxmeugvDkyp6803UcFqHOPHR35OYeVLOalym+FmvNn9kw==}
engines: {node: '>=14.18'} engines: {node: '>=14.18'}
'@sentry-internal/replay@8.37.1': '@sentry-internal/replay@8.38.0':
resolution: {integrity: sha512-E/Plhisk/pXJjOdOU12sg8m/APTXTA21iEniidP6jW3/+O0tD/H/UovEqa4odNTqxPMa798xHQSQNt5loYiaLA==} resolution: {integrity: sha512-mQPShKnIab7oKwkwrRxP/D8fZYHSkDY+cvqORzgi+wAwgnunytJQjz9g6Ww2lJu98rHEkr5SH4V4rs6PZYZmnQ==}
engines: {node: '>=14.18'} engines: {node: '>=14.18'}
'@sentry/browser@8.37.1': '@sentry/browser@8.38.0':
resolution: {integrity: sha512-5ym+iGiIpjIKKpMWi9S3/tXh9xneS+jqxwRTJqed3cb8i4ydfMAAP8sM3U8xMCWWABpWyIUW+fpewC0tkhE1aQ==} resolution: {integrity: sha512-AZR+b0EteNZEGv6JSdBD22S9VhQ7nrljKsSnzxobBULf3BpwmhmCzTbDrqWszKDAIDYmL+yQJIR2glxbknneWQ==}
engines: {node: '>=14.18'} engines: {node: '>=14.18'}
'@sentry/core@8.37.1': '@sentry/core@8.38.0':
resolution: {integrity: sha512-82csXby589iDupM3VgCHJeWZagUyEEaDnbFcoZ/Z91QX2Sjq8FcF5OsforoXjw09i0XTFqlkFAnQVpDBmMXcpQ==} resolution: {integrity: sha512-sGD+5TEHU9G7X7zpyaoJxpOtwjTjvOd1f/MKBrWW2vf9UbYK+GUJrOzLhMoSWp/pHSYgvObkJkDb/HwieQjvhQ==}
engines: {node: '>=14.18'} engines: {node: '>=14.18'}
'@sentry/types@8.37.1': '@sentry/types@8.38.0':
resolution: {integrity: sha512-ryMOTROLSLINKFEbHWvi7GigNrsQhsaScw2NddybJGztJQ5UhxIGESnxGxWCufBmWFDwd7+5u0jDPCVUJybp7w==} resolution: {integrity: sha512-fP5H9ZX01W4Z/EYctk3mkSHi7d06cLcX2/UWqwdWbyPWI+pL2QpUPICeO/C+8SnmYx//wFj3qWDhyPCh1PdFAA==}
engines: {node: '>=14.18'} engines: {node: '>=14.18'}
'@sentry/utils@8.37.1': '@sentry/utils@8.38.0':
resolution: {integrity: sha512-Qtn2IfpII12K17txG/ZtTci35XYjYi4CxbQ3j7nXY7toGv/+MqPXwV5q2i9g94XaSXlE5Wy9/hoCZoZpZs/djA==} resolution: {integrity: sha512-3X7MgIKIx+2q5Al7QkhaRB4wV6DvzYsaeIwdqKUzGLuRjXmNgJrLoU87TAwQRmZ6Wr3IoEpThZZMNrzYPXxArw==}
engines: {node: '>=14.18'} engines: {node: '>=14.18'}
'@sindresorhus/is@4.6.0': '@sindresorhus/is@4.6.0':
@ -3307,52 +3307,52 @@ snapshots:
'@rollup/rollup-win32-x64-msvc@4.25.0': '@rollup/rollup-win32-x64-msvc@4.25.0':
optional: true optional: true
'@sentry-internal/browser-utils@8.37.1': '@sentry-internal/browser-utils@8.38.0':
dependencies: dependencies:
'@sentry/core': 8.37.1 '@sentry/core': 8.38.0
'@sentry/types': 8.37.1 '@sentry/types': 8.38.0
'@sentry/utils': 8.37.1 '@sentry/utils': 8.38.0
'@sentry-internal/feedback@8.37.1': '@sentry-internal/feedback@8.38.0':
dependencies: dependencies:
'@sentry/core': 8.37.1 '@sentry/core': 8.38.0
'@sentry/types': 8.37.1 '@sentry/types': 8.38.0
'@sentry/utils': 8.37.1 '@sentry/utils': 8.38.0
'@sentry-internal/replay-canvas@8.37.1': '@sentry-internal/replay-canvas@8.38.0':
dependencies: dependencies:
'@sentry-internal/replay': 8.37.1 '@sentry-internal/replay': 8.38.0
'@sentry/core': 8.37.1 '@sentry/core': 8.38.0
'@sentry/types': 8.37.1 '@sentry/types': 8.38.0
'@sentry/utils': 8.37.1 '@sentry/utils': 8.38.0
'@sentry-internal/replay@8.37.1': '@sentry-internal/replay@8.38.0':
dependencies: dependencies:
'@sentry-internal/browser-utils': 8.37.1 '@sentry-internal/browser-utils': 8.38.0
'@sentry/core': 8.37.1 '@sentry/core': 8.38.0
'@sentry/types': 8.37.1 '@sentry/types': 8.38.0
'@sentry/utils': 8.37.1 '@sentry/utils': 8.38.0
'@sentry/browser@8.37.1': '@sentry/browser@8.38.0':
dependencies: dependencies:
'@sentry-internal/browser-utils': 8.37.1 '@sentry-internal/browser-utils': 8.38.0
'@sentry-internal/feedback': 8.37.1 '@sentry-internal/feedback': 8.38.0
'@sentry-internal/replay': 8.37.1 '@sentry-internal/replay': 8.38.0
'@sentry-internal/replay-canvas': 8.37.1 '@sentry-internal/replay-canvas': 8.38.0
'@sentry/core': 8.37.1 '@sentry/core': 8.38.0
'@sentry/types': 8.37.1 '@sentry/types': 8.38.0
'@sentry/utils': 8.37.1 '@sentry/utils': 8.38.0
'@sentry/core@8.37.1': '@sentry/core@8.38.0':
dependencies: dependencies:
'@sentry/types': 8.37.1 '@sentry/types': 8.38.0
'@sentry/utils': 8.37.1 '@sentry/utils': 8.38.0
'@sentry/types@8.37.1': {} '@sentry/types@8.38.0': {}
'@sentry/utils@8.37.1': '@sentry/utils@8.38.0':
dependencies: dependencies:
'@sentry/types': 8.37.1 '@sentry/types': 8.38.0
'@sindresorhus/is@4.6.0': {} '@sindresorhus/is@4.6.0': {}

View file

@ -20,10 +20,10 @@
], ],
"integrity": "sha512-jq2VqkmFq7qCXj0sEA6g969jMAwRb8i2zXXVrNjRWFEn6hj7sc2kc30RK+UOtV5zpVHicKVw4wNzTuF5nIgLMg==" "integrity": "sha512-jq2VqkmFq7qCXj0sEA6g969jMAwRb8i2zXXVrNjRWFEn6hj7sc2kc30RK+UOtV5zpVHicKVw4wNzTuF5nIgLMg=="
}, },
"_exports.CC-TXtMY.js": { "_exports.DtgtFHVi.js": {
"file": "exports.CC-TXtMY.js", "file": "exports.DtgtFHVi.js",
"name": "exports", "name": "exports",
"integrity": "sha512-bSrqVHn9BIkA0TFVrSaiCGDRayEtV7f4ZV2OaYJAdlQh1CeZ/XfXYWq85NYMFKgCIHYBKPre90UTT/Izj6+MpA==" "integrity": "sha512-4cRVLOnpaeyA6k5R693OlrBhMVC+rhYTAHtn0u4057IvKs0PfWmjhBN1wkaEYJqrmLuI4lbosNuCqW6umZGNbw=="
}, },
"_index-0eef19ec.DjnU1cik.js": { "_index-0eef19ec.DjnU1cik.js": {
"file": "index-0eef19ec.DjnU1cik.js", "file": "index-0eef19ec.DjnU1cik.js",
@ -98,10 +98,10 @@
"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",
"_exports.CC-TXtMY.js", "_exports.DtgtFHVi.js",
"_pipe.XPB0wEfw.js" "_pipe.XPB0wEfw.js"
], ],
"integrity": "sha512-pYDBYBYTf6LEtCD0h4GkoWYDWMVyHJekoz/ZqMpGDa8dVqLthzxhOK0VuHAKVmZ5hZJvxvR0JDtBVUrFvBhkWg==" "integrity": "sha512-879kPDiJLnXB+lzNRxL4ShyFPUmbSM13BV6whvCU+Iz0FdNICq8HXYUoGXnvrYBALbphqpGgy0qgZq+7cJpvfw=="
}, },
"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",
@ -112,9 +112,9 @@
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
"_pipe.XPB0wEfw.js", "_pipe.XPB0wEfw.js",
"_Either.wHNxn7Os.js", "_Either.wHNxn7Os.js",
"_exports.CC-TXtMY.js" "_exports.DtgtFHVi.js"
], ],
"integrity": "sha512-FhtYjHwl+tHgopysAJ/f1rDIRjfNOV3DPX07qSuk3xh6Y3BBHzCGr8ZKRGDqYSzWjUws+6wcrxo7ZaZrYV3qXA==" "integrity": "sha512-MkD15qSuTmRpn0Wx1vE9hEAZnI+sjDf3VUqaOoiLWWzY0ZVpxNXwgSb+WmvsEi/Qqh699j5U7cm80F/u0BfSfA=="
}, },
"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",
@ -122,9 +122,9 @@
"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.CC-TXtMY.js" "_exports.DtgtFHVi.js"
], ],
"integrity": "sha512-K3/MQL854WKYe1FJGCJ51Y7gTE18zxwVCTgseqEBNR19iP3+UR79eiNB0zLJoi1BUi371Oeu8hePPdvYXpv9ng==" "integrity": "sha512-b8Bd2KjSABlP1YIg9Ye5YaSyPmlazvDe1MKBS89/Hy5Ao31Yrh7HXPu+qqnHXAvEvhL4H1wIZSEKBdp1nufxEg=="
}, },
"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",
@ -156,13 +156,13 @@
"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.wHNxn7Os.js", "_Either.wHNxn7Os.js",
"_exports.CC-TXtMY.js", "_exports.DtgtFHVi.js",
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart.ts",
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts", "web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts",
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts",
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts" "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts"
], ],
"integrity": "sha512-28cjov0z8XVvwAsU5x7h0J2f15YJbIinn1Oflw0A6408y0JN5l0V+jRneEvzOnT5V3pSl9rSix08qS/AXd/xLQ==" "integrity": "sha512-QAXhm7cuT2COvlqofJVbZ4t+7eExXtBJxAnub6i0uZLAPWDiNsKlzLjj/xeaDFcwvGCGX+Lwezerw5YJ3qGW3w=="
}, },
"web/app/themes/haiku-atelier-2024/src/scripts/lib/nombres.ts": { "web/app/themes/haiku-atelier-2024/src/scripts/lib/nombres.ts": {
"file": "nombres.js", "file": "nombres.js",
@ -183,9 +183,9 @@
"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/api/erreurs.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/erreurs.ts",
"_pipe.XPB0wEfw.js", "_pipe.XPB0wEfw.js",
"_exports.CC-TXtMY.js" "_exports.DtgtFHVi.js"
], ],
"integrity": "sha512-Mhpyz8V2btd3UhEEweV3WxO0/IVyPlxq2PWMgWMafZgpJvrl1QUbVwqh6AqLLd+6uKA2iD/zEJbaPwOj6CS3ng==" "integrity": "sha512-Kleti69vNizn9p7F18Vp1FJkVEsO7QPWUn+mXM5KBtWe6k0TJsJ7Sk1FVX1sLrQc3d1Kg7uADDh+tGRRDs8oog=="
}, },
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts": { "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts": {
"file": "adresses.js", "file": "adresses.js",
@ -345,9 +345,9 @@
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
"_pipe.XPB0wEfw.js", "_pipe.XPB0wEfw.js",
"_Either.wHNxn7Os.js", "_Either.wHNxn7Os.js",
"_exports.CC-TXtMY.js" "_exports.DtgtFHVi.js"
], ],
"integrity": "sha512-o5h1EX5TlSm1gV42TNFEMz7022mH7HcdY/NEsGepRMDbYB8VWu5Sz9048ORxJ/H095+WIfcRJ7e/9TB30v6VoQ==" "integrity": "sha512-h9Qawq0Y7PDPsiOQHoVjkrZU5r8lm8xsFo7s/Nxgbz9/ndkiN9P5ikp/sBdIkBf+pfoVJp9x8txTY4ncAkssTw=="
}, },
"web/app/themes/haiku-atelier-2024/src/scripts/lib/validation.ts": { "web/app/themes/haiku-atelier-2024/src/scripts/lib/validation.ts": {
"file": "validation.js", "file": "validation.js",
@ -373,7 +373,7 @@
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
"_pipe.XPB0wEfw.js", "_pipe.XPB0wEfw.js",
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
"_exports.CC-TXtMY.js", "_exports.DtgtFHVi.js",
"_Either.wHNxn7Os.js", "_Either.wHNxn7Os.js",
"_index.BulDzU6h.js", "_index.BulDzU6h.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",
@ -382,7 +382,7 @@
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts",
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts" "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts"
], ],
"integrity": "sha512-TlWb9/HtwkxtVePTieDoT1qm8a8rS0R2UBn7LESrqru3JiY2Ce5JV+3KpNORS7QqMVV7aUu+VmFx3oUKfyCEQA==" "integrity": "sha512-iVzK9QmdXDUkfvUfJAq8Z1BKC6x1uDEwZiuPmHr9KHkbfXtukW7xKL5kOh8KSKrkg8M/k3Izj/uf/5Tashp6hw=="
}, },
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-categories.ts": { "web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-categories.ts": {
"file": "scripts-menu-categories.js", "file": "scripts-menu-categories.js",
@ -395,11 +395,11 @@
"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/dom.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
"_exports.CC-TXtMY.js", "_exports.DtgtFHVi.js",
"_pipe.XPB0wEfw.js", "_pipe.XPB0wEfw.js",
"_Either.wHNxn7Os.js" "_Either.wHNxn7Os.js"
], ],
"integrity": "sha512-D8nIe3wUn3uHQayGooZfigrXoFTycse4zeOZqa1q7h5YE1W0sKLAtvejdhrE0af1eQH1Nsm+o1J5CyV0cse1xg==" "integrity": "sha512-RAN+4IVXl0wdb8e7p/F6UW3U8BHX7KXRZO1YypbdHRTNh9HgJ3dz8fytDdz2jA3XdhczDnRCOTDqF3vL2BEb8g=="
}, },
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-mobile.ts": { "web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-mobile.ts": {
"file": "scripts-menu-mobile.js", "file": "scripts-menu-mobile.js",
@ -411,11 +411,11 @@
"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/dom.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
"_exports.CC-TXtMY.js", "_exports.DtgtFHVi.js",
"_pipe.XPB0wEfw.js", "_pipe.XPB0wEfw.js",
"_Either.wHNxn7Os.js" "_Either.wHNxn7Os.js"
], ],
"integrity": "sha512-LrK0O2wQ84HB+YNhLw9UnwvQHPEKb4isq9EaZMT09Wij+gefVUz1kGF+RbN6IluKOecodJo/hmit2GWUQf9cpQ==" "integrity": "sha512-x0vjlFuSXzr3AkvtWyF9Z1LwW+pGeoOwj8n9qYm+vqajMMTlxTwYpbvVe2mSE/6Xmj14lWKnLu4wrKiJOqLPVA=="
}, },
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-a-propos.ts": { "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-a-propos.ts": {
"file": "scripts-page-a-propos.js", "file": "scripts-page-a-propos.js",
@ -429,10 +429,10 @@
"_pipe.XPB0wEfw.js", "_pipe.XPB0wEfw.js",
"_belt_Option-91f3b350.D8kNxoqg.js", "_belt_Option-91f3b350.D8kNxoqg.js",
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
"_exports.CC-TXtMY.js", "_exports.DtgtFHVi.js",
"_Either.wHNxn7Os.js" "_Either.wHNxn7Os.js"
], ],
"integrity": "sha512-6L+sjNDtJGBwNIh0DZFPOJKtzdJ3Pj3cAQTKDyp2WRViXgTyphWLx2sVXBQWNlnq4xJI5V/83pORfkeA2AKh3Q==" "integrity": "sha512-Ot2NrjxvJ3ovohcl4cUxwsglsSVLEPYxcCEmqQjWSrKW+4Hh16ZYq0S6aGLAk4BPIJwlyJN1TcNt0Vnfr8d0DQ=="
}, },
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-accueil.ts": { "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-accueil.ts": {
"file": "scripts-page-accueil.js", "file": "scripts-page-accueil.js",
@ -445,11 +445,11 @@
"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/dom.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
"_exports.CC-TXtMY.js", "_exports.DtgtFHVi.js",
"_pipe.XPB0wEfw.js", "_pipe.XPB0wEfw.js",
"_Either.wHNxn7Os.js" "_Either.wHNxn7Os.js"
], ],
"integrity": "sha512-JTLZdoTTMhjEstTmmsFjN73lDgyVA9pvCb+9XwLKb1iHzm6PaGF9YHUvp9t4+lgh3gpQDEiRFi9VFRClyTCNqA==" "integrity": "sha512-U+g0gq1deXRSXexG36LTOEvslcFj5v5s+nolLMfJipuSkTHifUpNU+fSTpFTEEZBynQTybTnNuGImWW4cgGrCg=="
}, },
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-boutique.ts": { "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-boutique.ts": {
"file": "scripts-page-boutique.js", "file": "scripts-page-boutique.js",
@ -471,12 +471,12 @@
"_pipe.XPB0wEfw.js", "_pipe.XPB0wEfw.js",
"_index-0eef19ec.DjnU1cik.js", "_index-0eef19ec.DjnU1cik.js",
"_Either.wHNxn7Os.js", "_Either.wHNxn7Os.js",
"_exports.CC-TXtMY.js", "_exports.DtgtFHVi.js",
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/erreurs.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/erreurs.ts",
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/products.ts", "web/app/themes/haiku-atelier-2024/src/scripts/constantes/products.ts",
"_belt_Option-91f3b350.D8kNxoqg.js" "_belt_Option-91f3b350.D8kNxoqg.js"
], ],
"integrity": "sha512-IUuSY/ktzVZNLq12AsQX50FUZvBfBIBtIa4DDQ4Im8rFnHshDKQQOUFBjt0UUh1kkPIgpAs78QWsCt9RKpSe9w==" "integrity": "sha512-bJw/FzsilZIfynZiM/W28WEuC0YgZpgucFWIlA9t/V6G2/RZM36Q3zyQ3OdB/YCNW+eYX6zwzyzViQjuc/xSBw=="
}, },
"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",
@ -505,7 +505,7 @@
"_pipe.XPB0wEfw.js", "_pipe.XPB0wEfw.js",
"_index-0eef19ec.DjnU1cik.js", "_index-0eef19ec.DjnU1cik.js",
"_Either.wHNxn7Os.js", "_Either.wHNxn7Os.js",
"_exports.CC-TXtMY.js", "_exports.DtgtFHVi.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/api/erreurs.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/erreurs.ts",
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts", "web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts",
@ -513,7 +513,7 @@
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/orders.ts", "web/app/themes/haiku-atelier-2024/src/scripts/constantes/orders.ts",
"_belt_Option-91f3b350.D8kNxoqg.js" "_belt_Option-91f3b350.D8kNxoqg.js"
], ],
"integrity": "sha512-gnMp8KBNko1qUjH0T3YzqDDBOweR+ZuyzgtjqilxyAbkJkn4AUqI02Q9UamHlBX8ok4xFUMYq4HsBw+dcm1BBg==" "integrity": "sha512-bdh3hOkICfduk3ISqD6YxxdK3Ewons0zTpRzr8tQ9gCZi/ZKkpT1XFCHbOgo2+B9r8sd/tvSChTd1TE3zwlSfA=="
}, },
"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",
@ -536,7 +536,7 @@
"_pipe.XPB0wEfw.js", "_pipe.XPB0wEfw.js",
"_index-0eef19ec.DjnU1cik.js", "_index-0eef19ec.DjnU1cik.js",
"_Either.wHNxn7Os.js", "_Either.wHNxn7Os.js",
"_exports.CC-TXtMY.js", "_exports.DtgtFHVi.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/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",
@ -544,6 +544,6 @@
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts", "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts",
"_belt_Option-91f3b350.D8kNxoqg.js" "_belt_Option-91f3b350.D8kNxoqg.js"
], ],
"integrity": "sha512-nLujlBQnjXSqSwLuLR/5lXVo9FTJ8STli+143KePsbKvoLihTMmv1DqFZGE8A1Ib6egh5fjzzp6qaUs1u+V5bg==" "integrity": "sha512-+lzTczsVRFSM6Gq6iaA6O/Xj1vaR+nL6PZAoNkR0AZiCaPEZjQG9fE7G/OJTia+ZWEKMiwIMoYmKm/X87nTtiw=="
} }
} }

View file

@ -1,7 +1,7 @@
import { e as creeSyntaxError, f as reporteEtLeveErreur, g as ERREUR_SYNTAXE_INVALIDE, h as ERREUR_SELECTEUR_INEXISTANT } from "./erreurs.js"; import { e as creeSyntaxError, f as reporteEtLeveErreur, g as ErreurEntreeInexistante, h as ERREUR_SYNTAXE_INVALIDE, i as ERREUR_SELECTEUR_INEXISTANT } from "./erreurs.js";
import { p as pipe } from "./pipe.XPB0wEfw.js"; import { p as pipe } from "./pipe.XPB0wEfw.js";
import { E as Either, r as right, l as left, M as Maybe } from "./Either.wHNxn7Os.js"; import { E as Either, r as right, l as left, M as Maybe } from "./Either.wHNxn7Os.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
function int_compare(e, r) { function int_compare(e, r) {
if (e < r) { if (e < r) {
return -1; return -1;
@ -2033,7 +2033,7 @@ const html = (strings, ...args) => pipe(
(template) => majElementInnerHtml(template)(args.reduce((prev, value, i2) => prev + value + strings[i2 + 1], strings[0])), (template) => majElementInnerHtml(template)(args.reduce((prev, value, i2) => prev + value + strings[i2 + 1], strings[0])),
(template) => template.content (template) => template.content
); );
const eitherSessionStorageGet = (cle) => Maybe.fromNullable(sessionStorage.getItem(cle)).toEither(new Error("Clé absente dans le stockage de session.")); const eitherSessionStorageGet = (cle) => Maybe.fromNullable(sessionStorage.getItem(cle)).toEither(ErreurEntreeInexistante(`Clé ${cle} absente dans le stockage de session.`));
const eitherJsonParse = (chaine) => Either.encase(() => JSON.parse(chaine)); const eitherJsonParse = (chaine) => Either.encase(() => JSON.parse(chaine));
export { export {
Ra as R, Ra as R,

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
import { c as captureException } from "./exports.CC-TXtMY.js"; import { c as captureException } from "./exports.DtgtFHVi.js";
const ERREUR_SYNTAXE_INVALIDE = (selecteur) => `Le selecteur "${selecteur}" est invalide`; 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 ERREUR_SELECTEUR_INEXISTANT = (selecteur) => `La requête "${selecteur}" n'a retourné aucun Élément.`;
const creeSyntaxError = (message) => new SyntaxError(message); const creeSyntaxError = (message) => new SyntaxError(message);
@ -38,7 +38,14 @@ class CleNonTrouveError extends Error {
this.name = "CleNonTrouveError"; this.name = "CleNonTrouveError";
} }
} }
class NonExistingKeyError extends Error {
constructor(message) {
super(JSON.stringify(message));
this.name = "NonExistingKeyError";
}
}
const ErreurInconnue = (erreur) => new UnknownError(erreur); const ErreurInconnue = (erreur) => new UnknownError(erreur);
const ErreurEntreeInexistante = (message) => new NonExistingKeyError(message);
const leveErreur = (erreur) => { const leveErreur = (erreur) => {
throw erreur; throw erreur;
}; };
@ -65,14 +72,15 @@ const reporteEtLeveErreur = (erreur) => {
export { export {
CleNonTrouveError as C, CleNonTrouveError as C,
ErreurInconnue as E, ErreurInconnue as E,
leveBadRequestError as a, leveErreur as a,
leveUnauthorizedError as b, leveBadRequestError as b,
leveNotFoundError as c, leveUnauthorizedError as c,
leveErreur as d, leveNotFoundError as d,
creeSyntaxError as e, creeSyntaxError as e,
reporteEtLeveErreur as f, reporteEtLeveErreur as f,
ERREUR_SYNTAXE_INVALIDE as g, ErreurEntreeInexistante as g,
ERREUR_SELECTEUR_INEXISTANT as h, ERREUR_SYNTAXE_INVALIDE as h,
ERREUR_SELECTEUR_INEXISTANT as i,
leveServerError as l, leveServerError as l,
reporteErreur as r reporteErreur as r
}; };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -81,7 +81,7 @@ function safeJoin(input, delimiter) {
} }
return output.join(delimiter); return output.join(delimiter);
} }
const SDK_VERSION = "8.37.1"; const SDK_VERSION = "8.38.0";
const GLOBAL_OBJ = globalThis; const GLOBAL_OBJ = globalThis;
function getGlobalSingleton(name, creator, obj) { function getGlobalSingleton(name, creator, obj) {
const gbl = GLOBAL_OBJ; const gbl = GLOBAL_OBJ;
@ -946,6 +946,40 @@ function generatePropagationContext() {
spanId: uuid4().substring(16) spanId: uuid4().substring(16)
}; };
} }
const debugIdStackParserCache = /* @__PURE__ */ new WeakMap();
function getFilenameToDebugIdMap(stackParser) {
const debugIdMap = GLOBAL_OBJ._sentryDebugIds;
if (!debugIdMap) {
return {};
}
let debugIdStackFramesCache;
const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);
if (cachedDebugIdStackFrameCache) {
debugIdStackFramesCache = cachedDebugIdStackFrameCache;
} else {
debugIdStackFramesCache = /* @__PURE__ */ new Map();
debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);
}
return Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {
let parsedStack;
const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);
if (cachedParsedStack) {
parsedStack = cachedParsedStack;
} else {
parsedStack = stackParser(debugIdStackTrace);
debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);
}
for (let i = parsedStack.length - 1; i >= 0; i--) {
const stackFrame = parsedStack[i];
const file = stackFrame && stackFrame.filename;
if (stackFrame && file) {
acc[file] = debugIdMap[debugIdStackTrace];
break;
}
}
return acc;
}, {});
}
const DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; const DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
function getMainCarrier() { function getMainCarrier() {
getSentryCarrier(GLOBAL_OBJ); getSentryCarrier(GLOBAL_OBJ);
@ -1970,41 +2004,8 @@ function applyClientOptions(event, options) {
request.url = truncate(request.url, maxValueLength); request.url = truncate(request.url, maxValueLength);
} }
} }
const debugIdStackParserCache = /* @__PURE__ */ new WeakMap();
function applyDebugIds(event, stackParser) { function applyDebugIds(event, stackParser) {
const debugIdMap = GLOBAL_OBJ._sentryDebugIds; const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);
if (!debugIdMap) {
return;
}
let debugIdStackFramesCache;
const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);
if (cachedDebugIdStackFrameCache) {
debugIdStackFramesCache = cachedDebugIdStackFrameCache;
} else {
debugIdStackFramesCache = /* @__PURE__ */ new Map();
debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);
}
const filenameDebugIdMap = Object.entries(debugIdMap).reduce(
(acc, [debugIdStackTrace, debugIdValue]) => {
let parsedStack;
const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);
if (cachedParsedStack) {
parsedStack = cachedParsedStack;
} else {
parsedStack = stackParser(debugIdStackTrace);
debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);
}
for (let i = parsedStack.length - 1; i >= 0; i--) {
const stackFrame = parsedStack[i];
if (stackFrame.filename) {
acc[stackFrame.filename] = debugIdValue;
break;
}
}
return acc;
},
{}
);
try { try {
event.exception.values.forEach((exception) => { event.exception.values.forEach((exception) => {
exception.stacktrace.frames.forEach((frame) => { exception.stacktrace.frames.forEach((frame) => {
@ -2170,4 +2171,4 @@ export {
getIsolationScope as y, getIsolationScope as y,
isThenable as z isThenable as z
}; };
//# sourceMappingURL=exports.CC-TXtMY.js.map //# sourceMappingURL=exports.DtgtFHVi.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
import { g as ENTETE_GLITCHTIP_RATE_LIMITS, h as ENTETE_GLITCHTIP_RETRY_AFTER } from "./api.js"; import { g as ENTETE_GLITCHTIP_RATE_LIMITS, h as ENTETE_GLITCHTIP_RETRY_AFTER } from "./api.js";
import { i as isInstanceOf, t as truncate, a as consoleSandbox, D as DEBUG_BUILD$1, l as logger, g as getFunctionName, G as GLOBAL_OBJ, C as CONSOLE_LEVELS, f as fill, o as originalConsoleMethods, b as timestampInSeconds, d as isError, e as addNonEnumerableProperty, r as rejectedSyncPromise, S as SyncPromise, h as resolvedSyncPromise, j as dropUndefinedKeys, n as normalize, k as dateTimestampInSeconds, m as DEBUG_BUILD$2, u as urlEncode, p as uuid4, q as checkOrSetAlreadyCaught, s as isPrimitive, v as updateSession, w as prepareEvent, x as getDynamicSamplingContextFromClient, y as getIsolationScope, z as isThenable, A as isPlainObject, B as isParameterizedString, E as SDK_VERSION, F as getClient, H as getOriginalFunction, I as getFramesFromEvent, J as addExceptionMechanism, K as isErrorEvent$1, L as isDOMError, M as isDOMException, N as addExceptionTypeValue, O as isEvent, P as normalizeToSize, Q as extractExceptionKeysForMessage, R as isString, T as createStackParser, U as UNKNOWN_FUNCTION, V as getEventDescription, W as htmlTreeAsString, X as safeJoin, Y as getComponentName, Z as captureEvent, _ as getLocationHref, $ as getCurrentScope } from "./exports.CC-TXtMY.js"; import { i as isInstanceOf, t as truncate, a as consoleSandbox, D as DEBUG_BUILD$1, l as logger, g as getFunctionName, G as GLOBAL_OBJ, C as CONSOLE_LEVELS, f as fill, o as originalConsoleMethods, b as timestampInSeconds, d as isError, e as addNonEnumerableProperty, r as rejectedSyncPromise, S as SyncPromise, h as resolvedSyncPromise, j as dropUndefinedKeys, n as normalize, k as dateTimestampInSeconds, m as DEBUG_BUILD$2, u as urlEncode, p as uuid4, q as checkOrSetAlreadyCaught, s as isPrimitive, v as updateSession, w as prepareEvent, x as getDynamicSamplingContextFromClient, y as getIsolationScope, z as isThenable, A as isPlainObject, B as isParameterizedString, E as SDK_VERSION, F as getClient, H as getOriginalFunction, I as getFramesFromEvent, J as addExceptionMechanism, K as isErrorEvent$1, L as isDOMError, M as isDOMException, N as addExceptionTypeValue, O as isEvent, P as normalizeToSize, Q as extractExceptionKeysForMessage, R as isString, T as createStackParser, U as UNKNOWN_FUNCTION, V as getEventDescription, W as htmlTreeAsString, X as safeJoin, Y as getComponentName, Z as captureEvent, _ as getLocationHref, $ as getCurrentScope } from "./exports.DtgtFHVi.js";
import { p as pipe } from "./pipe.XPB0wEfw.js"; import { p as pipe } from "./pipe.XPB0wEfw.js";
function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, maxValueLimit = 250, key, limit, event, hint) { function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, maxValueLimit = 250, key, limit, event, hint) {
if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) { if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {

File diff suppressed because one or more lines are too long

View file

@ -3,7 +3,7 @@ import { N as NOM_CANAL_BOUTON_PANIER, T as TYPES_MESSAGES, a as NOM_CANAL_CONTE
import { r as reporteErreur } from "./erreurs.js"; import { r as reporteErreur } from "./erreurs.js";
import { M as MessageMajBoutonPanierSchema, a as MessageMajContenuPanierSchema } from "./messages2.js"; import { M as MessageMajBoutonPanierSchema, a as MessageMajContenuPanierSchema } from "./messages2.js";
import { E as Either } from "./Either.wHNxn7Os.js"; import { E as Either } from "./Either.wHNxn7Os.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
import "./cart.js"; import "./cart.js";
import "./cart2.js"; import "./cart2.js";
import "./adresses.js"; import "./adresses.js";

View file

@ -1,10 +1,10 @@
import { z, N } from "./index.CeK6pfoJ.js"; import { z, N } from "./index.CeK6pfoJ.js";
import { p as parse } from "./index.BulDzU6h.js"; import { p as parse } from "./index.BulDzU6h.js";
import { E as ENTETE_WC_NONCE } from "./api.js"; import { E as ENTETE_WC_NONCE } from "./api.js";
import { a as leveBadRequestError, b as leveUnauthorizedError, c as leveNotFoundError, E as ErreurInconnue, d as leveErreur } from "./erreurs.js"; import { b as leveBadRequestError, c as leveUnauthorizedError, d as leveNotFoundError, E as ErreurInconnue, a as leveErreur } from "./erreurs.js";
import { e as estWCError } from "./erreurs2.js"; import { e as estWCError } from "./erreurs2.js";
import { p as pipe } from "./pipe.XPB0wEfw.js"; import { p as pipe } from "./pipe.XPB0wEfw.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
const getBackend = (args) => fetch( const getBackend = (args) => fetch(
`${args.route}?${args.searchParams}`, `${args.route}?${args.searchParams}`,
{ {

File diff suppressed because one or more lines are too long

View file

@ -5,7 +5,7 @@ import { v as valideMessageMajBoutonPanier } from "./messages.js";
import { r as recupereElementDocumentEither } from "./utils.js"; import { r as recupereElementDocumentEither } from "./utils.js";
import { p as pipe } from "./pipe.XPB0wEfw.js"; import { p as pipe } from "./pipe.XPB0wEfw.js";
import "./erreurs.js"; import "./erreurs.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
import "./Either.wHNxn7Os.js"; import "./Either.wHNxn7Os.js";
import "./index.BulDzU6h.js"; import "./index.BulDzU6h.js";
import "./messages2.js"; import "./messages2.js";

View file

@ -3,7 +3,7 @@ import { a as SELECTEUR_MENU_CATEGORIES_PRODUITS, b as SELECTEUR_ENTREE_MENU_CAT
import { a as recupereElementDansDocumentOuLeve, b as recupereElementsDansDocumentOuLeve } from "./utils.js"; import { a as recupereElementDansDocumentOuLeve, b as recupereElementsDansDocumentOuLeve } from "./utils.js";
import { R as Ra } from "./dom2.js"; import { R as Ra } from "./dom2.js";
import "./erreurs.js"; import "./erreurs.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
import "./pipe.XPB0wEfw.js"; import "./pipe.XPB0wEfw.js";
import "./Either.wHNxn7Os.js"; import "./Either.wHNxn7Os.js";
document.addEventListener("DOMContentLoaded", () => { document.addEventListener("DOMContentLoaded", () => {

View file

@ -5,7 +5,7 @@ import { R as SELECTEUR_BOUTON_MENU_MOBILE, T as SELECTEUR_MENU_MOBILE, U as ATT
import { a as recupereElementDansDocumentOuLeve } from "./utils.js"; import { a as recupereElementDansDocumentOuLeve } from "./utils.js";
import "./dom2.js"; import "./dom2.js";
import "./erreurs.js"; import "./erreurs.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
import "./pipe.XPB0wEfw.js"; import "./pipe.XPB0wEfw.js";
import "./Either.wHNxn7Os.js"; import "./Either.wHNxn7Os.js";
const not = { const not = {

View file

@ -4,7 +4,7 @@ import { i as some, o as reduceU, q as nullable_to_opt, v as valFromOption, f as
import { p as pipe } from "./pipe.XPB0wEfw.js"; import { p as pipe } from "./pipe.XPB0wEfw.js";
import { _ as _1, i as is_extension, c as create, g as getExn, b as getWithDefault$1, d as isNone, a as isSome, f as flatMap$1, e as mapU, h as flatMapU, m as mapWithDefaultU } from "./belt_Option-91f3b350.D8kNxoqg.js"; import { _ as _1, i as is_extension, c as create, g as getExn, b as getWithDefault$1, d as isNone, a as isSome, f as flatMap$1, e as mapU, h as flatMapU, m as mapWithDefaultU } from "./belt_Option-91f3b350.D8kNxoqg.js";
import "./erreurs.js"; import "./erreurs.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
import "./Either.wHNxn7Os.js"; import "./Either.wHNxn7Os.js";
var t = create("Promise.JsError"); var t = create("Promise.JsError");
function $$catch(r, s) { function $$catch(r, s) {

View file

@ -3,7 +3,7 @@ import { e as estEntreDeuxNombres } from "./nombres.js";
import { a as recupereElementDansDocumentOuLeve, b as recupereElementsDansDocumentOuLeve } from "./utils.js"; import { a as recupereElementDansDocumentOuLeve, b as recupereElementsDansDocumentOuLeve } from "./utils.js";
import "./dom2.js"; import "./dom2.js";
import "./erreurs.js"; import "./erreurs.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
import "./pipe.XPB0wEfw.js"; import "./pipe.XPB0wEfw.js";
import "./Either.wHNxn7Os.js"; import "./Either.wHNxn7Os.js";
const initialiseScrollStorytelling = () => { const initialiseScrollStorytelling = () => {

View file

@ -12,7 +12,7 @@ import { E as EitherAsync } from "./MaybeAsync.AE1jnxuc.js";
import { p as pipe } from "./pipe.XPB0wEfw.js"; import { p as pipe } from "./pipe.XPB0wEfw.js";
import { t as tap } from "./index-0eef19ec.DjnU1cik.js"; import { t as tap } from "./index-0eef19ec.DjnU1cik.js";
import { E as Either } from "./Either.wHNxn7Os.js"; import { E as Either } from "./Either.wHNxn7Os.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
import "./erreurs2.js"; import "./erreurs2.js";
import "./products2.js"; import "./products2.js";
import "./belt_Option-91f3b350.D8kNxoqg.js"; import "./belt_Option-91f3b350.D8kNxoqg.js";

View file

@ -4,7 +4,7 @@ import { a as ROUTE_API_RETIRE_ARTICLE_PANIER, b as ROUTE_API_MAJ_ARTICLE_PANIER
import { l as SELECTEUR_ENTREES_PANIER, m as SELECTEUR_CONTENEUR_PANIER, n as SELECTEUR_SOUS_TOTAL_PRODUITS, o as SELECTEUR_SOUS_TOTAL_LIVRAISON_COUT, p as SELECTEUR_SOUS_TOTAL_LIVRAISON_PRESTATAIRE, q as SELECTEUR_TOTAL_PANIER, r as SELECTEUR_BOUTON_SEPARATION_ADRESSES, s as SELECTEUR_FORMULAIRE_PANIER, t as SELECTEUR_FORMULAIRE_FACTURATION, u as SELECTEUR_BOUTON_ACTIONS_FORMULAIRE, v as ATTRIBUT_CLE_PANIER, w as SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE, x as SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER, y as SELECTEUR_BOUTON_ADDITION_QUANTITE, z as SELECTEUR_BOUTON_SUPPRESSION_PANIER, A as ATTRIBUT_CONTIENT_ARTICLES, B as SELECTEUR_PRIX_LIGNE_PANIER, k as ATTRIBUT_HIDDEN, C as ATTRIBUT_DESACTIVE } from "./dom.js"; import { l as SELECTEUR_ENTREES_PANIER, m as SELECTEUR_CONTENEUR_PANIER, n as SELECTEUR_SOUS_TOTAL_PRODUITS, o as SELECTEUR_SOUS_TOTAL_LIVRAISON_COUT, p as SELECTEUR_SOUS_TOTAL_LIVRAISON_PRESTATAIRE, q as SELECTEUR_TOTAL_PANIER, r as SELECTEUR_BOUTON_SEPARATION_ADRESSES, s as SELECTEUR_FORMULAIRE_PANIER, t as SELECTEUR_FORMULAIRE_FACTURATION, u as SELECTEUR_BOUTON_ACTIONS_FORMULAIRE, v as ATTRIBUT_CLE_PANIER, w as SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE, x as SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER, y as SELECTEUR_BOUTON_ADDITION_QUANTITE, z as SELECTEUR_BOUTON_SUPPRESSION_PANIER, A as ATTRIBUT_CONTIENT_ARTICLES, B as SELECTEUR_PRIX_LIGNE_PANIER, k as ATTRIBUT_HIDDEN, C as ATTRIBUT_DESACTIVE } from "./dom.js";
import { N as NOM_CANAL_BOUTON_PANIER, a as NOM_CANAL_CONTENU_PANIER } from "./messages3.js"; import { N as NOM_CANAL_BOUTON_PANIER, a as NOM_CANAL_CONTENU_PANIER } from "./messages3.js";
import { r as recupereElementOuLeve, a as recupereElementsAvecSelecteur, e as eitherSessionStorageGet, b as eitherJsonParse, c as recupereElementAvecSelecteur } from "./dom2.js"; import { r as recupereElementOuLeve, a as recupereElementsAvecSelecteur, e as eitherSessionStorageGet, b as eitherJsonParse, c as recupereElementAvecSelecteur } from "./dom2.js";
import { l as leveServerError, r as reporteErreur } from "./erreurs.js"; import { l as leveServerError, r as reporteErreur, a as leveErreur } from "./erreurs.js";
import { e as estReponse500, a as estError } from "./gardes.js"; import { e as estReponse500, a as estError } from "./gardes.js";
import { e as emetMessageMajBoutonPanier, a as emetMessageMajContenuPanier, v as valideMessageMajBoutonPanier, b as valideMessageMajContenuPanier } from "./messages.js"; import { e as emetMessageMajBoutonPanier, a as emetMessageMajContenuPanier, v as valideMessageMajBoutonPanier, b as valideMessageMajContenuPanier } from "./messages.js";
import { p as postBackend, t as traiteReponseBackendWCSelonCodesHTTP } from "./reseau.js"; import { p as postBackend, t as traiteReponseBackendWCSelonCodesHTTP } from "./reseau.js";
@ -19,7 +19,7 @@ import { e as eitherParse } from "./validation.js";
import { p as pipe } from "./pipe.XPB0wEfw.js"; import { p as pipe } from "./pipe.XPB0wEfw.js";
import { l } from "./index-0eef19ec.DjnU1cik.js"; import { l } from "./index-0eef19ec.DjnU1cik.js";
import { M as Maybe, E as Either } from "./Either.wHNxn7Os.js"; import { M as Maybe, E as Either } from "./Either.wHNxn7Os.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
import "./messages2.js"; import "./messages2.js";
import "./erreurs2.js"; import "./erreurs2.js";
import "./cart2.js"; import "./cart2.js";
@ -365,20 +365,17 @@ const initialiseBoutonCreationCommande = () => {
BOUTON_ACTIONS_FORMULAIRE.textContent = "Submitting..."; BOUTON_ACTIONS_FORMULAIRE.textContent = "Submitting...";
}).ifJust(() => { }).ifJust(() => {
const donneesFormulaire = Object.fromEntries(new FormData(FORMULAIRE_PANIER)); const donneesFormulaire = Object.fromEntries(new FormData(FORMULAIRE_PANIER));
const methodeLivraison = pipe( const methodeLivraison = eitherSessionStorageGet("shipping_rates").chain(eitherJsonParse).chain(
eitherSessionStorageGet("shipping_rates"), (json) => eitherParse(
(chaine) => chaine.chain(eitherJsonParse), json,
(inconnu) => inconnu.chain(
(a) => eitherParse(
a,
WCStoreShippingRateShippingRateSchema WCStoreShippingRateShippingRateSchema
) )
).ifLeft((e) => { ).ifLeft((e) => {
if (e instanceof ValiError) console.error(e.issues); if (e instanceof ValiError) console.error(e.issues);
console.error(e); console.error("methodeLivraison", e);
throw e; BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
}).unsafeCoerce() leveErreur(e);
); }).unsafeCoerce();
const articlesPanier = ENTREES_PANIER_EITHER.orDefault([]).map((entree) => ({ const articlesPanier = ENTREES_PANIER_EITHER.orDefault([]).map((entree) => ({
product_id: Number(entree.getAttribute("data-id-produit")), product_id: Number(entree.getAttribute("data-id-produit")),
quantity: Number(entree.getAttribute("data-quantite")), quantity: Number(entree.getAttribute("data-quantite")),
@ -444,8 +441,11 @@ const initialiseBoutonCreationCommande = () => {
) )
); );
}, },
(reponse2) => reponse2.ifRight(() => { (reponse2) => reponse2.ifRight((r) => {
window.location = "/checkout"; const url = new URL(`https://${window.location.host}/checkout`);
url.searchParams.append("order_key", r.order_key);
url.searchParams.append("order_id", String(r.id));
window.location = url;
}), }),
(reponse2) => reponse2.ifLeft((a) => console.error(a.issues)) (reponse2) => reponse2.ifLeft((a) => console.error(a.issues))
); );

File diff suppressed because one or more lines are too long

View file

@ -3,7 +3,7 @@ import { p as parse } from "./index.BulDzU6h.js";
import { e as ROUTE_API_AJOUTE_ARTICLE_PANIER, E as ENTETE_WC_NONCE } from "./api.js"; import { e as ROUTE_API_AJOUTE_ARTICLE_PANIER, E as ENTETE_WC_NONCE } from "./api.js";
import { D as SELECTEUR_BOUTON_AJOUT_PANIER, E as SELECTEUR_SELECTEUR_QUANTITE, F as SELECTEUR_LIENS_ONGLETS, G as SELECTEUR_SECTIONS_CONTENUS, H as SELECTEUR_PRIX_PRODUIT, I as SELECTEUR_CONTENEUR_FLECHES_DEFILEMENT, J as SELECTEUR_FLECHE_DEFILEMENT_GAUCHE, K as SELECTEUR_FLECHE_DEFILEMENT_DROITE, L as SELECTEUR_PHOTOS_PRODUIT, M as SELECTEUR_IMAGE_COLONNE_GAUCHE, N as SELECTEUR_IMAGES_COLONNE_DROITE, O as ATTRIBUT_INDEX_IMAGE_ACTIVE, P as ATTRIBUT_ARIA_SELECTED, k as ATTRIBUT_HIDDEN, C as ATTRIBUT_DESACTIVE, Q as ATTRIBUT_PRIX } from "./dom.js"; import { D as SELECTEUR_BOUTON_AJOUT_PANIER, E as SELECTEUR_SELECTEUR_QUANTITE, F as SELECTEUR_LIENS_ONGLETS, G as SELECTEUR_SECTIONS_CONTENUS, H as SELECTEUR_PRIX_PRODUIT, I as SELECTEUR_CONTENEUR_FLECHES_DEFILEMENT, J as SELECTEUR_FLECHE_DEFILEMENT_GAUCHE, K as SELECTEUR_FLECHE_DEFILEMENT_DROITE, L as SELECTEUR_PHOTOS_PRODUIT, M as SELECTEUR_IMAGE_COLONNE_GAUCHE, N as SELECTEUR_IMAGES_COLONNE_DROITE, O as ATTRIBUT_INDEX_IMAGE_ACTIVE, P as ATTRIBUT_ARIA_SELECTED, k as ATTRIBUT_HIDDEN, C as ATTRIBUT_DESACTIVE, Q as ATTRIBUT_PRIX } from "./dom.js";
import { r as recupereElementOuLeve, d as recupereElementsOuLeve, R as Ra } from "./dom2.js"; import { r as recupereElementOuLeve, d as recupereElementsOuLeve, R as Ra } 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 { l as leveServerError, b as leveBadRequestError, c as leveUnauthorizedError, d as leveNotFoundError, E as ErreurInconnue, a as leveErreur, r as reporteErreur } from "./erreurs.js";
import { b as estHTMLSelectElement, e as estReponse500, a as estError } from "./gardes.js"; import { b as estHTMLSelectElement, e as estReponse500, a as estError } from "./gardes.js";
import { e as emetMessageMajBoutonPanier } from "./messages.js"; import { e as emetMessageMajBoutonPanier } from "./messages.js";
import { W as WCStoreCartSchema } from "./cart.js"; import { W as WCStoreCartSchema } from "./cart.js";
@ -13,7 +13,7 @@ import { r as recupereElementDocumentEither, a as recupereElementDansDocumentOuL
import { p as pipe } from "./pipe.XPB0wEfw.js"; import { p as pipe } from "./pipe.XPB0wEfw.js";
import { l } from "./index-0eef19ec.DjnU1cik.js"; import { l } from "./index-0eef19ec.DjnU1cik.js";
import { M as Maybe, E as Either } from "./Either.wHNxn7Os.js"; import { M as Maybe, E as Either } from "./Either.wHNxn7Os.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
import "./messages3.js"; import "./messages3.js";
import "./messages2.js"; import "./messages2.js";
import "./cart2.js"; import "./cart2.js";

View file

@ -2,7 +2,7 @@ import { j as values, k as fromArray, f as equal, l as get$1, u as unsafeDeleteK
import { C as CleNonTrouveError } from "./erreurs.js"; import { C as CleNonTrouveError } from "./erreurs.js";
import { p as pipe } from "./pipe.XPB0wEfw.js"; import { p as pipe } from "./pipe.XPB0wEfw.js";
import { M as Maybe } from "./Either.wHNxn7Os.js"; import { M as Maybe } from "./Either.wHNxn7Os.js";
import "./exports.CC-TXtMY.js"; import "./exports.DtgtFHVi.js";
function placeholder(e) { function placeholder(e) {
} }
function makeEmpty(e) { function makeEmpty(e) {

View file

@ -1 +1 @@
{"version":3,"file":"validation.js","sources":["../../src/scripts/lib/validation.ts"],"sourcesContent":["/**\n * Fonctions utilitaires de validation via Valibot.\n */\n\nimport { Either } from \"purify-ts\";\nimport { type GenericSchema, parse, type ValiError } from \"valibot\";\n\nexport const eitherParse = <Valeur, Schema extends GenericSchema<Valeur>>(\n valeur: unknown,\n schema: Schema,\n): Either<ValiError<Schema>, Valeur> => Either.encase(() => parse(schema, valeur));\n"],"names":[],"mappings":";;AAOa,MAAA,cAAc,CACzB,QACA,WACsC,OAAO,OAAO,MAAM,MAAM,QAAQ,MAAM,CAAC;"} {"version":3,"file":"validation.js","sources":["../../src/scripts/lib/validation.ts"],"sourcesContent":["/**\n * Fonctions utilitaires de validation via Valibot.\n */\n\nimport { Either } from \"purify-ts\";\nimport { type GenericSchema, InferOutput, parse, type ValiError } from \"valibot\";\n\nexport const eitherParse = <Schema extends GenericSchema>(\n valeur: unknown,\n schema: Schema,\n): Either<ValiError<Schema>, InferOutput<Schema>> => Either.encase(() => parse(schema, valeur));\n"],"names":[],"mappings":";;AAOa,MAAA,cAAc,CACzB,QACA,WACmD,OAAO,OAAO,MAAM,MAAM,QAAQ,MAAM,CAAC;"}

View file

@ -7,7 +7,7 @@ declare(strict_types=1);
use Timber\Timber; use Timber\Timber;
/* Contexte et modèles */ // Contexte et modèles
$contexte = Timber::context(); $contexte = Timber::context();
$modeles = ["accueil.twig"]; $modeles = ["accueil.twig"];
@ -29,5 +29,5 @@ function charge_scripts_styles_page_accueil(): void {
} }
add_action("wp_enqueue_scripts", "charge_scripts_styles_page_accueil"); add_action("wp_enqueue_scripts", "charge_scripts_styles_page_accueil");
/* Rendu */ // Rendu
Timber::render(filenames: $modeles, data: $contexte); Timber::render(filenames: $modeles, data: $contexte);

View file

@ -5,6 +5,7 @@
declare(strict_types=1); declare(strict_types=1);
use Ramsey\Uuid\Uuid;
use Roots\WPConfig\Config; use Roots\WPConfig\Config;
header("Content-Type: application/json; charset=utf-8"); header("Content-Type: application/json; charset=utf-8");
@ -16,6 +17,10 @@ $session_wc = WC()->session;
$possede_session_wc = $session_wc->has_session(); $possede_session_wc = $session_wc->has_session();
/** @var string */ /** @var string */
$url_accueil = get_page_link(get_page_by_path("home")->ID); $url_accueil = get_page_link(get_page_by_path("home")->ID);
/** @var string */
$url_succes_commande = get_page_link(get_page_by_path("successful-order"));
/** @var string */
$url_echec_commande = get_page_link(get_page_by_path("failed-order"));
// Retourne une 403 si l'Utilisateur n'a pas de session WooCommerce // Retourne une 403 si l'Utilisateur n'a pas de session WooCommerce
if (!$possede_session_wc) { if (!$possede_session_wc) {
@ -61,16 +66,60 @@ foreach ($panier->get_cart() as $cle_panier => $article_panier) {
]); ]);
} }
$order_id = $_GET["order_id"];
if (!$order_id) {
$reponse = ["succes" => false, "status" => "order_key is missing"];
echo json_encode($reponse);
http_response_code(400);
return;
}
$order_key = $_GET["order_key"];
if (!$order_key) {
$reponse = ["succes" => false, "status" => "order_key is missing"];
echo json_encode($reponse);
http_response_code(400);
return;
}
/** @var WC_Order */
$order = wc_get_order($order_id);
$methode_livraison = [
"nom" => $order->get_shipping_method(),
"cout" => $order->get_shipping_total(),
];
// Sélectionne la clé API Stripe // Sélectionne la clé API Stripe
\Stripe\Stripe::setApiKey(Config::get("STRIPE_API_SECRET")); \Stripe\Stripe::setApiKey(Config::get("STRIPE_API_SECRET"));
$session_checkout_stripe = \Stripe\Checkout\Session::create([ $session_checkout_stripe = \Stripe\Checkout\Session::create(
"cancel_url" => $url_accueil, [
"cancel_url" => "$url_accueil",
"customer_email" => $email_client, "customer_email" => $email_client,
"line_items" => $articles, "line_items" => $articles,
"mode" => "payment", "mode" => "payment",
"success_url" => $url_accueil, "success_url" => "$url_succes_commande?session_id={CHECKOUT_SESSION_ID}",
]); "metadata" => [
"order_id" => $order_id,
"order_key" => $order_key,
],
"shipping_options" => [
[
"shipping_rate_data" => [
"display_name" => $methode_livraison["nom"],
"fixed_amount" => [
"amount" => $methode_livraison["cout"],
"currency" => "EUR",
],
"tax_behavior" => "inclusive",
"type" => "fixed_amount",
],
],
],
],
[
"idempotency_key" => Uuid::uuid4(),
],
);
// echo json_encode($session_checkout_stripe);
header("HTTP/1.1 303 See Other"); header("HTTP/1.1 303 See Other");
header("Location: " . $session_checkout_stripe->url); header("Location: " . $session_checkout_stripe->url);

View file

@ -1,6 +0,0 @@
<?php
/**
* Route pour la préparation du paiement via Stripe (« Checkout »)
*/
declare(strict_types=1);

View file

@ -0,0 +1,47 @@
<?php
/**
* Route pour la préparation du paiement via Stripe (« Checkout »)
*/
declare(strict_types=1);
use Roots\WPConfig\Config;
use Timber\Timber;
/** @var string */
$url_accueil = get_page_link(get_page_by_path("home")->ID);
/** @var string */
$session_id = $_GET["session_id"];
// Redirige à l'Accueil si le paramètre d'ID de Session Stripe n'est pas présent
if (!$session_id) {
header("Location: $url_accueil");
return;
}
// Instancie un Client Stripe
$client_stripe = new \Stripe\StripeClient(Config::get("STRIPE_API_SECRET"));
try {
$session = $client_stripe->checkout->sessions->retrieve($session_id);
$order_id = $session->metadata["order_id"];
$commande = wc_get_order("$order_id");
// Contexte et modèles
$contexte = Timber::context();
$modeles = ["succes-commande.twig"];
echo "<pre>";
print_r($session);
print_r($commande);
echo "</pre>";
http_response_code(200);
// Rendu
Timber::render(filenames: $modeles, data: $contexte);
} catch (Error $e) {
http_response_code(500);
echo json_encode(["error" => $e->getMessage()]);
}

View file

@ -73,10 +73,12 @@ class StarterSite extends Site {
"about" => $recupere_informations_page("about"), "about" => $recupere_informations_page("about"),
"account" => $recupere_informations_page("account"), "account" => $recupere_informations_page("account"),
"cart" => $recupere_informations_page("cart"), "cart" => $recupere_informations_page("cart"),
"contact" => $recupere_informations_page("contact"),
"checkout" => $recupere_informations_page("checkout"), "checkout" => $recupere_informations_page("checkout"),
"contact" => $recupere_informations_page("contact"),
"failed_order" => $recupere_informations_page("failed_order"),
"home" => $recupere_informations_page("home"), "home" => $recupere_informations_page("home"),
"shop" => $recupere_informations_page("shop"), "shop" => $recupere_informations_page("shop"),
"successful_order" => $recupere_informations_page("successful_order"),
]; ];
// Récupère la Page courante // Récupère la Page courante

View file

@ -3,7 +3,14 @@ import { Either, identity, Left, Maybe, Right } from "purify-ts";
import type { ElementParent } from "./types/dom.d.ts"; import type { ElementParent } from "./types/dom.d.ts";
import { creeSyntaxError, ERREUR_SELECTEUR_INEXISTANT, ERREUR_SYNTAXE_INVALIDE, reporteEtLeveErreur } from "./erreurs"; import {
creeSyntaxError,
ERREUR_SELECTEUR_INEXISTANT,
ERREUR_SYNTAXE_INVALIDE,
ErreurEntreeInexistante,
type NonExistingKeyError,
reporteEtLeveErreur,
} from "./erreurs";
/** /**
* @param parent L'Élément parent dans lequel l'Élément souhaité sera recherché. * @param parent L'Élément parent dans lequel l'Élément souhaité sera recherché.
@ -102,14 +109,15 @@ export const html = (strings: TemplateStringsArray, ...args: Array<string>) =>
/** /**
* Récupère une entrée dans le Stockage de Session (`storageSession`) sous forme d'`Either`. * Récupère une entrée dans le Stockage de Session (`storageSession`) sous forme d'`Either`.
*
* @param cle La clé de l'entrée. * @param cle La clé de l'entrée.
* @returns Un `Either` avec une erreur si la clé est absente (`Left`), la valeur de l'entrée sinon * @returns Un `Either` avec une `NonExistingKeyError` si la clé est absente (`Left`), la
* (`Right`). * valeur de l'entrée sinon (`Right`).
*/ */
export const eitherSessionStorageGet = (cle: string): Either<Error, string> => export const eitherSessionStorageGet = (cle: string): Either<NonExistingKeyError, string> =>
Maybe Maybe
.fromNullable(sessionStorage.getItem(cle)) .fromNullable(sessionStorage.getItem(cle))
.toEither(new Error("Clé absente dans le stockage de session.")); .toEither(ErreurEntreeInexistante(`Clé ${cle} absente dans le stockage de session.`));
/** /**
* Convertis une chaîne JSON en un objet JavaScript sous forme d'`Either`. * Convertis une chaîne JSON en un objet JavaScript sous forme d'`Either`.

View file

@ -2,7 +2,6 @@
* Fonctions pour la création d'Erreurs. * Fonctions pour la création d'Erreurs.
*/ */
import { pipe } from "@mobily/ts-belt";
import { captureException } from "@sentry/browser"; import { captureException } from "@sentry/browser";
import type { WCErrorBody } from "./types/api/erreurs"; import type { WCErrorBody } from "./types/api/erreurs";
@ -58,10 +57,17 @@ export class CleNonTrouveError extends Error {
this.name = "CleNonTrouveError"; this.name = "CleNonTrouveError";
} }
} }
export class NonExistingKeyError extends Error {
constructor(message: unknown) {
super(JSON.stringify(message));
this.name = "NonExistingKeyError";
}
}
/* Fonction utilitaire pour créer ou lever des Erreurs */ /* Fonction utilitaire pour créer ou lever des Erreurs */
export const Erreur = (message: string): Error => new Error(message); export const Erreur = (message: string): Error => new Error(message);
export const ErreurInconnue = (erreur: unknown): UnknownError => new UnknownError(erreur); export const ErreurInconnue = (erreur: unknown): UnknownError => new UnknownError(erreur);
export const ErreurEntreeInexistante = (message: string): NonExistingKeyError => new NonExistingKeyError(message);
export const leveErreur = <E extends Error = Error>(erreur: E): never => { export const leveErreur = <E extends Error = Error>(erreur: E): never => {
throw erreur; throw erreur;
@ -81,6 +87,9 @@ export const leveServerError = (message: string): never => {
export const leveUnknownError = (erreur: unknown): never => { export const leveUnknownError = (erreur: unknown): never => {
throw new UnknownError(erreur); throw new UnknownError(erreur);
}; };
export const leveNonExistingKeyError = (message: string): never => {
throw new NonExistingKeyError(message);
};
/** /**
* Reporte une Erreur, sous forme d'erreur console et au service GlitchTip. * Reporte une Erreur, sous forme d'erreur console et au service GlitchTip.
@ -88,7 +97,6 @@ export const leveUnknownError = (erreur: unknown): never => {
* @param erreur * @param erreur
* @returns L'ID Sentry de l'évènement capturé. * @returns L'ID Sentry de l'évènement capturé.
*/ */
export const reporteErreur = <E extends Error>(erreur: E): string => { export const reporteErreur = <E extends Error>(erreur: E): string => {
console.error(erreur); console.error(erreur);
return captureException(erreur); return captureException(erreur);
@ -101,19 +109,7 @@ export const reporteErreur = <E extends Error>(erreur: E): string => {
* @param erreur * @param erreur
* @returns never Lève une Erreur et ne retourne donc rien. * @returns never Lève une Erreur et ne retourne donc rien.
*/ */
export const reporteEtLeveErreur = <E extends Error>(erreur: E): never => { export const reporteEtLeveErreur = <E extends Error>(erreur: E): never => {
reporteErreur<E>(erreur); reporteErreur<E>(erreur);
throw erreur; throw erreur;
}; };
/**
* Fonction utilitaire pour rapidement créer et reporter une Erreur DOMElementAbsent.
*
* @param message
* @returns L'ID Sentry de l'évènement capturé.
*/
export const reporteErreurDOMElementAbsent = (message: string): string =>
pipe(
new DOMElementAbsentError(message),
reporteErreur,
);

View file

@ -1,14 +1,18 @@
import { pipe } from "@mobily/ts-belt"; import { pipe } from "@mobily/ts-belt";
import { Either } from "purify-ts";
import { match, P } from "ts-pattern"; import { match, P } from "ts-pattern";
import { type GenericSchema, parse } from "valibot"; import { type GenericSchema, parse, type ValiError } from "valibot";
import { ENTETE_WC_NONCE } from "../constantes/api.ts"; import { ENTETE_WC_NONCE } from "../constantes/api.ts";
import { import {
type BadRequestError,
ErreurInconnue, ErreurInconnue,
leveBadRequestError, leveBadRequestError,
leveErreur, leveErreur,
leveNotFoundError, leveNotFoundError,
leveUnauthorizedError, leveUnauthorizedError,
type NotFoundError,
type UnauthorizedError,
type UnknownError, type UnknownError,
} from "./erreurs.ts"; } from "./erreurs.ts";
import { estWCError } from "./schemas/api/erreurs.ts"; import { estWCError } from "./schemas/api/erreurs.ts";
@ -70,6 +74,8 @@ export const postBackend = (args: ArgumentsPostBackendWC) =>
}, },
); );
// TODO: Ne traite pas du tout les Erreurs
// TODO: Utiliser un Either
export const traiteReponseBackendWCSelonCodesHTTP = <R, S extends GenericSchema<R>>( export const traiteReponseBackendWCSelonCodesHTTP = <R, S extends GenericSchema<R>>(
corpsReponse: unknown, corpsReponse: unknown,
schemaReponse: S, schemaReponse: S,
@ -83,3 +89,23 @@ export const traiteReponseBackendWCSelonCodesHTTP = <R, S extends GenericSchema<
.with(P._, corpsOkInconnu => parse<S>(schemaReponse, corpsOkInconnu)) .with(P._, corpsOkInconnu => parse<S>(schemaReponse, corpsOkInconnu))
// Réponses inconnues // Réponses inconnues
.otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>)); .otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>));
type TraitementReponseBackend<R, S extends GenericSchema<R>> = Either<
BadRequestError | NotFoundError | UnauthorizedError | UnknownError | ValiError<S>,
R
>;
export const eitherTraiteReponseBackend = <R, S extends GenericSchema<R>>(
corpsReponse: unknown,
schemaReponse: S,
): TraitementReponseBackend<R, S> =>
Either.encase(() =>
match(corpsReponse)
.with({ body: P.select(), status: 400 }, estWCError, leveBadRequestError)
.with({ body: P.select(), status: 401 }, estWCError, leveUnauthorizedError)
.with({ body: P.select(), status: 404 }, estWCError, leveNotFoundError)
// Réponse OK (201)
.with(P._, corpsOkInconnu => parse<S>(schemaReponse, corpsOkInconnu))
// Réponses inconnues
.otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>))
);

View file

@ -3,9 +3,9 @@
*/ */
import { Either } from "purify-ts"; import { Either } from "purify-ts";
import { type GenericSchema, parse, type ValiError } from "valibot"; import { type GenericSchema, InferOutput, parse, type ValiError } from "valibot";
export const eitherParse = <Valeur, Schema extends GenericSchema<Valeur>>( export const eitherParse = <Schema extends GenericSchema>(
valeur: unknown, valeur: unknown,
schema: Schema, schema: Schema,
): Either<ValiError<Schema>, Valeur> => Either.encase(() => parse(schema, valeur)); ): Either<ValiError<Schema>, InferOutput<Schema>> => Either.encase(() => parse(schema, valeur));

View file

@ -46,7 +46,7 @@ import {
recupereElementOuLeve, recupereElementOuLeve,
recupereElementsAvecSelecteur, recupereElementsAvecSelecteur,
} from "./lib/dom.ts"; } from "./lib/dom.ts";
import { type CleNonTrouveError, leveServerError, reporteErreur } from "./lib/erreurs.ts"; import { type CleNonTrouveError, leveErreur, leveServerError, reporteErreur } from "./lib/erreurs.ts";
import { estError, estReponse500 } from "./lib/gardes.ts"; import { estError, estReponse500 } from "./lib/gardes.ts";
import { import {
emetMessageMajBoutonPanier, emetMessageMajBoutonPanier,
@ -562,7 +562,9 @@ const initialiseBoutonActions = (): void => {
const initialiseBoutonCreationCommande = (): void => { const initialiseBoutonCreationCommande = (): void => {
// Permet de supprimer tout Écouteur d'Évènement assigné au Bouton // Permet de supprimer tout Écouteur d'Évènement assigné au Bouton
BOUTON_ACTIONS_FORMULAIRE.outerHTML = BOUTON_ACTIONS_FORMULAIRE.outerHTML; BOUTON_ACTIONS_FORMULAIRE.outerHTML = BOUTON_ACTIONS_FORMULAIRE.outerHTML;
// Réassigne le Bouton
BOUTON_ACTIONS_FORMULAIRE = recupereElementDansDocumentOuLeve<HTMLButtonElement>(SELECTEUR_BOUTON_ACTIONS_FORMULAIRE); BOUTON_ACTIONS_FORMULAIRE = recupereElementDansDocumentOuLeve<HTMLButtonElement>(SELECTEUR_BOUTON_ACTIONS_FORMULAIRE);
// Créé la Commande au clic sur le Bouton
BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement: Event) => { BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement: Event) => {
Maybe Maybe
// Ne fais rien si le Formulaire n'est pas valide // Ne fais rien si le Formulaire n'est pas valide
@ -572,32 +574,28 @@ const initialiseBoutonCreationCommande = (): void => {
BOUTON_ACTIONS_FORMULAIRE.textContent = "Submitting..."; BOUTON_ACTIONS_FORMULAIRE.textContent = "Submitting...";
}) })
.ifJust(() => { .ifJust(() => {
// Récupère les données du Formulaire // Récupère les données du Formulaire sous forme d'Objet
const donneesFormulaire: Record<string, string> = Object.fromEntries(new FormData(FORMULAIRE_PANIER)) as Record< const donneesFormulaire = Object.fromEntries(new FormData(FORMULAIRE_PANIER)) as Record<string, string>;
string,
string
>;
const methodeLivraison = pipe( const methodeLivraison: WCStoreShippingRateShippingRate = eitherSessionStorageGet("shipping_rates")
eitherSessionStorageGet("shipping_rates"), .chain(eitherJsonParse)
chaine => chaine.chain(eitherJsonParse), .chain((json: JSONValue) =>
inconnu => eitherParse<typeof WCStoreShippingRateShippingRateSchema>(
inconnu json,
.chain(a =>
eitherParse<WCStoreShippingRateShippingRate, typeof WCStoreShippingRateShippingRateSchema>(
a,
WCStoreShippingRateShippingRateSchema, WCStoreShippingRateShippingRateSchema,
) )
) )
.ifLeft(e => { .ifLeft(e => {
if (e instanceof ValiError) console.error(e.issues); if (e instanceof ValiError) console.error(e.issues);
console.error(e); console.error("methodeLivraison", e);
throw e; BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
leveErreur(e);
}) })
.unsafeCoerce(), .unsafeCoerce();
);
const articlesPanier = ENTREES_PANIER_EITHER.orDefault([]).map(entree => ({ const articlesPanier = ENTREES_PANIER_EITHER
.orDefault([])
.map((entree: HTMLElement) => ({
product_id: Number(entree.getAttribute("data-id-produit")), product_id: Number(entree.getAttribute("data-id-produit")),
quantity: Number(entree.getAttribute("data-quantite")), quantity: Number(entree.getAttribute("data-quantite")),
...(entree.getAttribute("data-id-variation") && { ...(entree.getAttribute("data-id-variation") && {
@ -643,7 +641,7 @@ const initialiseBoutonCreationCommande = (): void => {
}; };
console.debug(argumentsFormulaire); console.debug(argumentsFormulaire);
eitherParse<WCV3OrdersArgs, typeof WCV3OrdersArgsSchema>(argumentsFormulaire, WCV3OrdersArgsSchema) eitherParse<typeof WCV3OrdersArgsSchema>(argumentsFormulaire, WCV3OrdersArgsSchema)
.map(async (args: WCV3OrdersArgs) => { .map(async (args: WCV3OrdersArgs) => {
await postBackend({ await postBackend({
authString: ETATS_PAGE.authString, authString: ETATS_PAGE.authString,
@ -668,8 +666,11 @@ const initialiseBoutonCreationCommande = (): void => {
); );
}, },
reponse => reponse =>
reponse.ifRight(() => { reponse.ifRight(r => {
window.location = "/checkout"; const url = new URL(`https://${window.location.host}/checkout`);
url.searchParams.append("order_key", r.order_key);
url.searchParams.append("order_id", String(r.id));
window.location = url;
}), }),
reponse => reponse.ifLeft(a => console.error(a.issues)), reponse => reponse.ifLeft(a => console.error(a.issues)),
); );

View file

@ -0,0 +1,17 @@
{% extends "base.twig" %}
{% block contenu %}
<main id="page-success-commande">
<div class="contenu">
<header class="contenu__en-tete">
<h2>Successful order!</h2>
</header>
<div class="contenu__textuel">
<p>
<h1>Thanks for your order, {{ session.name }}!</h1>
</p>
</div>
</div>
</main>
{% endblock contenu %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB