From 683159da02708ce520e9aad9707f2b96b598ec8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Demenech?= Date: Tue, 6 Jun 2023 21:21:31 -0300 Subject: [PATCH] @portaljs/components improvements (#933) * [#912,@portaljs/components][s]: create LoadingSpinner component and add that to when using the URL parameter * [#912,@portaljs/components][m]: refactor LineChart and add more params * [#912,@portaljs/components][m]: possibly fixes 'loading...' size on FlatUiTable on Firefox * [@portaljs/components][xs]: add storybook-static to .gitignore * Add changeset --- .changeset/funny-dolls-bathe.md | 5 + packages/components/.gitignore | 1 + packages/components/.storybook/preview.ts | 1 + .../components/src/components/FlatUiTable.tsx | 51 +- .../components/src/components/LineChart.tsx | 69 ++- .../src/components/LoadingSpinner.tsx | 23 + packages/components/src/components/Table.tsx | 12 +- packages/components/src/index.css | 9 +- .../components/stories/LineChart.stories.ts | 9 + .../assets/Catalog.stories-ea9731da.js | 157 ------ .../assets/Catalog.stories-ea9731da.js.map | 1 - .../assets/Color-3YIJY6X7-f33052fb.js | 2 - .../assets/Color-3YIJY6X7-f33052fb.js.map | 1 - .../assets/DebouncedInput-c720676c.js | 2 - .../assets/DebouncedInput-c720676c.js.map | 1 - .../assets/DocsRenderer-EYKKDMVH-b61c696a.js | 2 - .../DocsRenderer-EYKKDMVH-b61c696a.js.map | 1 - .../assets/FlatUiTable.stories-36abe253.js | 456 ----------------- .../FlatUiTable.stories-36abe253.js.map | 1 - ...lobalScrollAreaStyles-XIHNDKUY-7079b195.js | 2 - ...lScrollAreaStyles-XIHNDKUY-7079b195.js.map | 1 - .../assets/Introduction-7f71f7c8.js | 6 - .../assets/Introduction-7f71f7c8.js.map | 1 - .../assets/LineChart.stories-de9527a1.js | 21 - .../assets/LineChart.stories-de9527a1.js.map | 1 - .../OverlayScrollbars-VAV6LJAB-bda71a90.js | 7 - ...OverlayScrollbars-VAV6LJAB-bda71a90.js.map | 1 - .../assets/Table.stories-29b0d488.js | 94 ---- .../assets/Table.stories-29b0d488.js.map | 1 - .../storybook-static/assets/Vega-d925c94f.js | 206 -------- .../assets/Vega-d925c94f.js.map | 1 - .../assets/Vega.stories-751bd69b.js | 32 -- .../assets/Vega.stories-751bd69b.js.map | 1 - .../assets/VegaLite-30eeb950.js | 2 - .../assets/VegaLite-30eeb950.js.map | 1 - .../assets/VegaLite.stories-a09b0c5c.js | 32 -- .../assets/VegaLite.stories-a09b0c5c.js.map | 1 - .../assets/WithTooltip-FBT32F6Q-518acee3.js | 2 - .../WithTooltip-FBT32F6Q-518acee3.js.map | 1 - .../assets/_commonjsHelpers-042e6b4d.js | 2 - .../assets/_commonjsHelpers-042e6b4d.js.map | 1 - .../assets/config-d9112794.js | 55 --- .../assets/config-d9112794.js.map | 1 - .../assets/formatter-S4K5WUZV-c8a53dad.js | 157 ------ .../assets/formatter-S4K5WUZV-c8a53dad.js.map | 1 - .../assets/iframe-1eda5ccb.js | 2 - .../assets/iframe-1eda5ccb.js.map | 1 - .../storybook-static/assets/index-186b3228.js | 2 - .../assets/index-186b3228.js.map | 1 - .../storybook-static/assets/index-1d576ef5.js | 2 - .../assets/index-1d576ef5.js.map | 1 - .../storybook-static/assets/index-1fc0ca9a.js | 2 - .../assets/index-1fc0ca9a.js.map | 1 - .../storybook-static/assets/index-356e4a49.js | 7 - .../assets/index-356e4a49.js.map | 1 - .../storybook-static/assets/index-6e6be2d5.js | 4 - .../assets/index-6e6be2d5.js.map | 1 - .../storybook-static/assets/index-89936ab1.js | 355 -------------- .../assets/index-89936ab1.js.map | 1 - .../storybook-static/assets/index-8ce4a492.js | 25 - .../assets/index-8ce4a492.js.map | 1 - .../storybook-static/assets/index-8db94870.js | 10 - .../assets/index-8db94870.js.map | 1 - .../storybook-static/assets/index-d37d4223.js | 2 - .../assets/index-d37d4223.js.map | 1 - .../storybook-static/assets/index-d475d2ea.js | 2 - .../assets/index-d475d2ea.js.map | 1 - .../isNativeReflectConstruct-099dc9ad.js | 2 - .../isNativeReflectConstruct-099dc9ad.js.map | 1 - .../assets/jsx-runtime-94f6e698.js | 10 - .../assets/jsx-runtime-94f6e698.js.map | 1 - .../assets/papaparse.min-839a1868.js | 16 - .../assets/papaparse.min-839a1868.js.map | 1 - .../assets/preview-0b573777.js | 2 - .../assets/preview-0b573777.js.map | 1 - .../assets/preview-3c530997.css | 1 - .../assets/preview-5ef354f3.js | 2 - .../assets/preview-5ef354f3.js.map | 1 - .../assets/preview-61b9f71b.js | 2 - .../assets/preview-61b9f71b.js.map | 1 - .../assets/preview-62235626.js | 397 --------------- .../assets/preview-62235626.js.map | 1 - .../assets/preview-770cc08b.js | 21 - .../assets/preview-770cc08b.js.map | 1 - .../assets/preview-a60aa466.js | 2 - .../assets/preview-a60aa466.js.map | 1 - .../assets/preview-b1164a2e.js | 8 - .../assets/preview-b1164a2e.js.map | 1 - .../assets/preview-d1ecd888.js | 2 - .../assets/preview-d1ecd888.js.map | 1 - .../assets/preview-e6f1f377.js | 2 - .../assets/preview-e6f1f377.js.map | 1 - .../assets/react-18-ff2c0a32.js | 2 - .../assets/react-18-ff2c0a32.js.map | 1 - .../syntaxhighlighter-QTQ2UBB4-207f06a0.js | 2 - ...syntaxhighlighter-QTQ2UBB4-207f06a0.js.map | 1 - .../storybook-static/components/Catalog.d.ts | 5 - .../components/DebouncedInput.d.ts | 8 - .../components/FlatUiTable.d.ts | 11 - .../components/LineChart.d.ts | 12 - .../storybook-static/components/Table.d.ts | 13 - .../storybook-static/components/Vega.d.ts | 2 - .../storybook-static/components/VegaLite.d.ts | 2 - .../components/storybook-static/favicon.svg | 7 - .../components/storybook-static/iframe.html | 459 ------------------ .../components/storybook-static/index.html | 130 ----- .../components/storybook-static/index.json | 1 - .../lib/applyFullWidthDirective.d.ts | 5 - .../storybook-static/lib/loadData.d.ts | 1 - .../storybook-static/lib/parseCsv.d.ts | 5 - .../components/storybook-static/project.json | 1 - .../essentials-actions-2/manager-bundle.js | 4 - .../manager-bundle.js.LEGAL.txt | 0 .../manager-bundle.js.map | 7 - .../manager-bundle.js | 13 - .../manager-bundle.js.LEGAL.txt | 0 .../manager-bundle.js.map | 7 - .../essentials-controls-1/manager-bundle.js | 117 ----- .../manager-bundle.js.LEGAL.txt | 18 - .../manager-bundle.js.map | 7 - .../essentials-measure-6/manager-bundle.js | 4 - .../manager-bundle.js.LEGAL.txt | 0 .../manager-bundle.js.map | 7 - .../essentials-outline-7/manager-bundle.js | 4 - .../manager-bundle.js.LEGAL.txt | 0 .../manager-bundle.js.map | 7 - .../essentials-toolbars-5/manager-bundle.js | 4 - .../manager-bundle.js.LEGAL.txt | 0 .../manager-bundle.js.map | 7 - .../essentials-viewport-4/manager-bundle.js | 4 - .../manager-bundle.js.LEGAL.txt | 0 .../manager-bundle.js.map | 7 - .../interactions-8/manager-bundle.js | 31 -- .../manager-bundle.js.LEGAL.txt | 18 - .../interactions-8/manager-bundle.js.map | 7 - .../sb-addons/links-0/manager-bundle.js | 4 - .../links-0/manager-bundle.js.LEGAL.txt | 0 .../sb-addons/links-0/manager-bundle.js.map | 7 - .../sb-common-assets/fonts.css | 31 -- .../nunito-sans-bold-italic.woff2 | Bin 49460 -> 0 bytes .../sb-common-assets/nunito-sans-bold.woff2 | Bin 47144 -> 0 bytes .../sb-common-assets/nunito-sans-italic.woff2 | Bin 49620 -> 0 bytes .../nunito-sans-regular.woff2 | Bin 47072 -> 0 bytes ...lobalScrollAreaStyles-XIHNDKUY-F4JIPIHL.js | 1 - .../OverlayScrollbars-VAV6LJAB-K3TMPSMY.js | 6 - .../WithTooltip-FBT32F6Q-7QJ37TCY.js | 1 - .../sb-manager/chunk-3FAXWWKG.js | 15 - .../sb-manager/chunk-54KM6K5Z.js | 7 - .../sb-manager/chunk-AS2AMEUR.js | 1 - .../sb-manager/chunk-F3MVQVF6.js | 207 -------- .../sb-manager/chunk-FENICTK6.js | 1 - .../sb-manager/chunk-KDEVPN6N.js | 406 ---------------- .../sb-manager/chunk-PUVLCKJJ.js | 140 ------ .../sb-manager/chunk-QPL63VNK.js | 1 - .../sb-manager/formatter-S4K5WUZV-4LPR5OBX.js | 156 ------ .../storybook-static/sb-manager/globals.js | 1 - .../storybook-static/sb-manager/index.js | 1 - .../storybook-static/sb-manager/runtime.js | 1 - .../syntaxhighlighter-QTQ2UBB4-F5YUFYAB.js | 1 - .../storybook-static/sb-preview/globals.js | 1 - .../storybook-static/sb-preview/runtime.js | 105 ---- .../components/storybook-static/stories.json | 1 - 162 files changed, 127 insertions(+), 4247 deletions(-) create mode 100644 .changeset/funny-dolls-bathe.md create mode 100644 packages/components/src/components/LoadingSpinner.tsx delete mode 100644 packages/components/storybook-static/assets/Catalog.stories-ea9731da.js delete mode 100644 packages/components/storybook-static/assets/Catalog.stories-ea9731da.js.map delete mode 100644 packages/components/storybook-static/assets/Color-3YIJY6X7-f33052fb.js delete mode 100644 packages/components/storybook-static/assets/Color-3YIJY6X7-f33052fb.js.map delete mode 100644 packages/components/storybook-static/assets/DebouncedInput-c720676c.js delete mode 100644 packages/components/storybook-static/assets/DebouncedInput-c720676c.js.map delete mode 100644 packages/components/storybook-static/assets/DocsRenderer-EYKKDMVH-b61c696a.js delete mode 100644 packages/components/storybook-static/assets/DocsRenderer-EYKKDMVH-b61c696a.js.map delete mode 100644 packages/components/storybook-static/assets/FlatUiTable.stories-36abe253.js delete mode 100644 packages/components/storybook-static/assets/FlatUiTable.stories-36abe253.js.map delete mode 100644 packages/components/storybook-static/assets/GlobalScrollAreaStyles-XIHNDKUY-7079b195.js delete mode 100644 packages/components/storybook-static/assets/GlobalScrollAreaStyles-XIHNDKUY-7079b195.js.map delete mode 100644 packages/components/storybook-static/assets/Introduction-7f71f7c8.js delete mode 100644 packages/components/storybook-static/assets/Introduction-7f71f7c8.js.map delete mode 100644 packages/components/storybook-static/assets/LineChart.stories-de9527a1.js delete mode 100644 packages/components/storybook-static/assets/LineChart.stories-de9527a1.js.map delete mode 100644 packages/components/storybook-static/assets/OverlayScrollbars-VAV6LJAB-bda71a90.js delete mode 100644 packages/components/storybook-static/assets/OverlayScrollbars-VAV6LJAB-bda71a90.js.map delete mode 100644 packages/components/storybook-static/assets/Table.stories-29b0d488.js delete mode 100644 packages/components/storybook-static/assets/Table.stories-29b0d488.js.map delete mode 100644 packages/components/storybook-static/assets/Vega-d925c94f.js delete mode 100644 packages/components/storybook-static/assets/Vega-d925c94f.js.map delete mode 100644 packages/components/storybook-static/assets/Vega.stories-751bd69b.js delete mode 100644 packages/components/storybook-static/assets/Vega.stories-751bd69b.js.map delete mode 100644 packages/components/storybook-static/assets/VegaLite-30eeb950.js delete mode 100644 packages/components/storybook-static/assets/VegaLite-30eeb950.js.map delete mode 100644 packages/components/storybook-static/assets/VegaLite.stories-a09b0c5c.js delete mode 100644 packages/components/storybook-static/assets/VegaLite.stories-a09b0c5c.js.map delete mode 100644 packages/components/storybook-static/assets/WithTooltip-FBT32F6Q-518acee3.js delete mode 100644 packages/components/storybook-static/assets/WithTooltip-FBT32F6Q-518acee3.js.map delete mode 100644 packages/components/storybook-static/assets/_commonjsHelpers-042e6b4d.js delete mode 100644 packages/components/storybook-static/assets/_commonjsHelpers-042e6b4d.js.map delete mode 100644 packages/components/storybook-static/assets/config-d9112794.js delete mode 100644 packages/components/storybook-static/assets/config-d9112794.js.map delete mode 100644 packages/components/storybook-static/assets/formatter-S4K5WUZV-c8a53dad.js delete mode 100644 packages/components/storybook-static/assets/formatter-S4K5WUZV-c8a53dad.js.map delete mode 100644 packages/components/storybook-static/assets/iframe-1eda5ccb.js delete mode 100644 packages/components/storybook-static/assets/iframe-1eda5ccb.js.map delete mode 100644 packages/components/storybook-static/assets/index-186b3228.js delete mode 100644 packages/components/storybook-static/assets/index-186b3228.js.map delete mode 100644 packages/components/storybook-static/assets/index-1d576ef5.js delete mode 100644 packages/components/storybook-static/assets/index-1d576ef5.js.map delete mode 100644 packages/components/storybook-static/assets/index-1fc0ca9a.js delete mode 100644 packages/components/storybook-static/assets/index-1fc0ca9a.js.map delete mode 100644 packages/components/storybook-static/assets/index-356e4a49.js delete mode 100644 packages/components/storybook-static/assets/index-356e4a49.js.map delete mode 100644 packages/components/storybook-static/assets/index-6e6be2d5.js delete mode 100644 packages/components/storybook-static/assets/index-6e6be2d5.js.map delete mode 100644 packages/components/storybook-static/assets/index-89936ab1.js delete mode 100644 packages/components/storybook-static/assets/index-89936ab1.js.map delete mode 100644 packages/components/storybook-static/assets/index-8ce4a492.js delete mode 100644 packages/components/storybook-static/assets/index-8ce4a492.js.map delete mode 100644 packages/components/storybook-static/assets/index-8db94870.js delete mode 100644 packages/components/storybook-static/assets/index-8db94870.js.map delete mode 100644 packages/components/storybook-static/assets/index-d37d4223.js delete mode 100644 packages/components/storybook-static/assets/index-d37d4223.js.map delete mode 100644 packages/components/storybook-static/assets/index-d475d2ea.js delete mode 100644 packages/components/storybook-static/assets/index-d475d2ea.js.map delete mode 100644 packages/components/storybook-static/assets/isNativeReflectConstruct-099dc9ad.js delete mode 100644 packages/components/storybook-static/assets/isNativeReflectConstruct-099dc9ad.js.map delete mode 100644 packages/components/storybook-static/assets/jsx-runtime-94f6e698.js delete mode 100644 packages/components/storybook-static/assets/jsx-runtime-94f6e698.js.map delete mode 100644 packages/components/storybook-static/assets/papaparse.min-839a1868.js delete mode 100644 packages/components/storybook-static/assets/papaparse.min-839a1868.js.map delete mode 100644 packages/components/storybook-static/assets/preview-0b573777.js delete mode 100644 packages/components/storybook-static/assets/preview-0b573777.js.map delete mode 100644 packages/components/storybook-static/assets/preview-3c530997.css delete mode 100644 packages/components/storybook-static/assets/preview-5ef354f3.js delete mode 100644 packages/components/storybook-static/assets/preview-5ef354f3.js.map delete mode 100644 packages/components/storybook-static/assets/preview-61b9f71b.js delete mode 100644 packages/components/storybook-static/assets/preview-61b9f71b.js.map delete mode 100644 packages/components/storybook-static/assets/preview-62235626.js delete mode 100644 packages/components/storybook-static/assets/preview-62235626.js.map delete mode 100644 packages/components/storybook-static/assets/preview-770cc08b.js delete mode 100644 packages/components/storybook-static/assets/preview-770cc08b.js.map delete mode 100644 packages/components/storybook-static/assets/preview-a60aa466.js delete mode 100644 packages/components/storybook-static/assets/preview-a60aa466.js.map delete mode 100644 packages/components/storybook-static/assets/preview-b1164a2e.js delete mode 100644 packages/components/storybook-static/assets/preview-b1164a2e.js.map delete mode 100644 packages/components/storybook-static/assets/preview-d1ecd888.js delete mode 100644 packages/components/storybook-static/assets/preview-d1ecd888.js.map delete mode 100644 packages/components/storybook-static/assets/preview-e6f1f377.js delete mode 100644 packages/components/storybook-static/assets/preview-e6f1f377.js.map delete mode 100644 packages/components/storybook-static/assets/react-18-ff2c0a32.js delete mode 100644 packages/components/storybook-static/assets/react-18-ff2c0a32.js.map delete mode 100644 packages/components/storybook-static/assets/syntaxhighlighter-QTQ2UBB4-207f06a0.js delete mode 100644 packages/components/storybook-static/assets/syntaxhighlighter-QTQ2UBB4-207f06a0.js.map delete mode 100644 packages/components/storybook-static/components/Catalog.d.ts delete mode 100644 packages/components/storybook-static/components/DebouncedInput.d.ts delete mode 100644 packages/components/storybook-static/components/FlatUiTable.d.ts delete mode 100644 packages/components/storybook-static/components/LineChart.d.ts delete mode 100644 packages/components/storybook-static/components/Table.d.ts delete mode 100644 packages/components/storybook-static/components/Vega.d.ts delete mode 100644 packages/components/storybook-static/components/VegaLite.d.ts delete mode 100644 packages/components/storybook-static/favicon.svg delete mode 100644 packages/components/storybook-static/iframe.html delete mode 100644 packages/components/storybook-static/index.html delete mode 100644 packages/components/storybook-static/index.json delete mode 100644 packages/components/storybook-static/lib/applyFullWidthDirective.d.ts delete mode 100644 packages/components/storybook-static/lib/loadData.d.ts delete mode 100644 packages/components/storybook-static/lib/parseCsv.d.ts delete mode 100644 packages/components/storybook-static/project.json delete mode 100644 packages/components/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js delete mode 100644 packages/components/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt delete mode 100644 packages/components/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.map delete mode 100644 packages/components/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js delete mode 100644 packages/components/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt delete mode 100644 packages/components/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.map delete mode 100644 packages/components/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js delete mode 100644 packages/components/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt delete mode 100644 packages/components/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.map delete mode 100644 packages/components/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js delete mode 100644 packages/components/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt delete mode 100644 packages/components/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js.map delete mode 100644 packages/components/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js delete mode 100644 packages/components/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt delete mode 100644 packages/components/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js.map delete mode 100644 packages/components/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js delete mode 100644 packages/components/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt delete mode 100644 packages/components/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js.map delete mode 100644 packages/components/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js delete mode 100644 packages/components/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt delete mode 100644 packages/components/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js.map delete mode 100644 packages/components/storybook-static/sb-addons/interactions-8/manager-bundle.js delete mode 100644 packages/components/storybook-static/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt delete mode 100644 packages/components/storybook-static/sb-addons/interactions-8/manager-bundle.js.map delete mode 100644 packages/components/storybook-static/sb-addons/links-0/manager-bundle.js delete mode 100644 packages/components/storybook-static/sb-addons/links-0/manager-bundle.js.LEGAL.txt delete mode 100644 packages/components/storybook-static/sb-addons/links-0/manager-bundle.js.map delete mode 100644 packages/components/storybook-static/sb-common-assets/fonts.css delete mode 100644 packages/components/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 delete mode 100644 packages/components/storybook-static/sb-common-assets/nunito-sans-bold.woff2 delete mode 100644 packages/components/storybook-static/sb-common-assets/nunito-sans-italic.woff2 delete mode 100644 packages/components/storybook-static/sb-common-assets/nunito-sans-regular.woff2 delete mode 100644 packages/components/storybook-static/sb-manager/GlobalScrollAreaStyles-XIHNDKUY-F4JIPIHL.js delete mode 100644 packages/components/storybook-static/sb-manager/OverlayScrollbars-VAV6LJAB-K3TMPSMY.js delete mode 100644 packages/components/storybook-static/sb-manager/WithTooltip-FBT32F6Q-7QJ37TCY.js delete mode 100644 packages/components/storybook-static/sb-manager/chunk-3FAXWWKG.js delete mode 100644 packages/components/storybook-static/sb-manager/chunk-54KM6K5Z.js delete mode 100644 packages/components/storybook-static/sb-manager/chunk-AS2AMEUR.js delete mode 100644 packages/components/storybook-static/sb-manager/chunk-F3MVQVF6.js delete mode 100644 packages/components/storybook-static/sb-manager/chunk-FENICTK6.js delete mode 100644 packages/components/storybook-static/sb-manager/chunk-KDEVPN6N.js delete mode 100644 packages/components/storybook-static/sb-manager/chunk-PUVLCKJJ.js delete mode 100644 packages/components/storybook-static/sb-manager/chunk-QPL63VNK.js delete mode 100644 packages/components/storybook-static/sb-manager/formatter-S4K5WUZV-4LPR5OBX.js delete mode 100644 packages/components/storybook-static/sb-manager/globals.js delete mode 100644 packages/components/storybook-static/sb-manager/index.js delete mode 100644 packages/components/storybook-static/sb-manager/runtime.js delete mode 100644 packages/components/storybook-static/sb-manager/syntaxhighlighter-QTQ2UBB4-F5YUFYAB.js delete mode 100644 packages/components/storybook-static/sb-preview/globals.js delete mode 100644 packages/components/storybook-static/sb-preview/runtime.js delete mode 100644 packages/components/storybook-static/stories.json diff --git a/.changeset/funny-dolls-bathe.md b/.changeset/funny-dolls-bathe.md new file mode 100644 index 000000000..279d6694d --- /dev/null +++ b/.changeset/funny-dolls-bathe.md @@ -0,0 +1,5 @@ +--- +'@portaljs/components': patch +--- + +More params added to , loading spinners added to
and , minor fixes diff --git a/packages/components/.gitignore b/packages/components/.gitignore index a547bf36d..1ce6039f0 100644 --- a/packages/components/.gitignore +++ b/packages/components/.gitignore @@ -9,6 +9,7 @@ lerna-debug.log* node_modules dist +storybook-static dist-ssr *.local diff --git a/packages/components/.storybook/preview.ts b/packages/components/.storybook/preview.ts index ef07fc885..45152b916 100644 --- a/packages/components/.storybook/preview.ts +++ b/packages/components/.storybook/preview.ts @@ -1,4 +1,5 @@ import 'tailwindcss/tailwind.css' +import '../src/index.css' import type { Preview } from '@storybook/react'; diff --git a/packages/components/src/components/FlatUiTable.tsx b/packages/components/src/components/FlatUiTable.tsx index 0e29d71d7..a0e442918 100644 --- a/packages/components/src/components/FlatUiTable.tsx +++ b/packages/components/src/components/FlatUiTable.tsx @@ -1,12 +1,13 @@ import { QueryClient, QueryClientProvider, useQuery } from 'react-query'; import Papa from 'papaparse'; import { Grid } from '@githubocto/flat-ui'; +import LoadingSpinner from './LoadingSpinner'; const queryClient = new QueryClient(); export async function getCsv(url: string, corsProxy?: string) { if (corsProxy) { - url = corsProxy + url + url = corsProxy + url; } const response = await fetch(url, { headers: { @@ -36,30 +37,6 @@ export async function parseCsv(file: string): Promise { }); } -const Spinning = () => { - return ( -
- - Loading... -
- ); -}; - export interface FlatUiTableProps { url?: string; data?: { [key: string]: number | string }[]; @@ -80,10 +57,15 @@ export const FlatUiTable: React.FC = ({ ); }; -const TableInner: React.FC = ({ url, data, rawCsv, corsProxy }) => { +const TableInner: React.FC = ({ + url, + data, + rawCsv, + corsProxy, +}) => { if (data) { return ( -
+
); @@ -95,19 +77,22 @@ const TableInner: React.FC = ({ url, data, rawCsv, corsProxy } ); const { data: parsedData, isLoading: isParsing } = useQuery( ['dataPreview', csvString], - () => parseCsv(rawCsv ? rawCsv as string : csvString as string), + () => parseCsv(rawCsv ? (rawCsv as string) : (csvString as string)), { enabled: rawCsv ? true : !!csvString } ); if (isParsing || isDownloadingCSV) -
- +
+
; if (parsedData) return ( -
+
); - return + return ( +
+ +
+ ); }; - diff --git a/packages/components/src/components/LineChart.tsx b/packages/components/src/components/LineChart.tsx index 278a1e3bb..275ed57f6 100644 --- a/packages/components/src/components/LineChart.tsx +++ b/packages/components/src/components/LineChart.tsx @@ -1,10 +1,19 @@ +import { useEffect, useState } from 'react'; +import LoadingSpinner from './LoadingSpinner'; import { VegaLite } from './VegaLite'; +import loadData from '../lib/loadData'; + +type AxisType = 'quantitative' | 'temporal'; +type TimeUnit = 'year' | undefined; // or ... export type LineChartProps = { data: Array> | string | { x: string; y: number }[]; title?: string; xAxis?: string; + xAxisType?: AxisType; + xAxisTimeUnit: TimeUnit; yAxis?: string; + yAxisType?: AxisType; fullWidth?: boolean; }; @@ -13,15 +22,16 @@ export function LineChart({ fullWidth = false, title = '', xAxis = 'x', + xAxisType = 'temporal', + xAxisTimeUnit = 'year', // TODO: defaults to undefined would probably work better... keeping it as it's for compatibility purposes yAxis = 'y', + yAxisType = 'quantitative', }: LineChartProps) { - var tmp = data; - if (Array.isArray(data)) { - tmp = data.map((r) => { - return { x: r[0], y: r[1] }; - }); - } - const vegaData = { table: tmp }; + const [isLoading, setIsLoading] = useState(false); + + // By default, assumes data is an Array... + const [specData, setSpecData] = useState({ name: 'table' }); + const spec = { $schema: 'https://vega.github.io/schema/vega-lite/v5.json', title, @@ -33,9 +43,7 @@ export function LineChart({ strokeWidth: 1, tooltip: true, }, - data: { - name: 'table', - }, + data: specData, selection: { grid: { type: 'interval', @@ -45,19 +53,44 @@ export function LineChart({ encoding: { x: { field: xAxis, - timeUnit: 'year', - type: 'temporal', + timeUnit: xAxisTimeUnit, + type: xAxisType, }, y: { field: yAxis, - type: 'quantitative', + type: yAxisType, }, }, - }; - if (typeof data === 'string') { - spec.data = { url: data } as any; - return ; + } as any; + + useEffect(() => { + // If data is string, assume it's a URL + if (typeof data === 'string') { + setIsLoading(true); + + // Manualy loading the data allows us to do other kinds + // of stuff later e.g. load a file partially + loadData(data).then((res: any) => { + setSpecData({ values: res, format: { type: 'csv' } }); + setIsLoading(false); + }); + } + }, []); + + var vegaData = {}; + if (Array.isArray(data)) { + var dataObj; + dataObj = data.map((r) => { + return { x: r[0], y: r[1] }; + }); + vegaData = { table: dataObj }; } - return ; + return isLoading ? ( +
+ +
+ ) : ( + + ); } diff --git a/packages/components/src/components/LoadingSpinner.tsx b/packages/components/src/components/LoadingSpinner.tsx new file mode 100644 index 000000000..e2654a126 --- /dev/null +++ b/packages/components/src/components/LoadingSpinner.tsx @@ -0,0 +1,23 @@ +export default function LoadingSpinner() { + return ( +
+ + Loading... +
+ ); +} diff --git a/packages/components/src/components/Table.tsx b/packages/components/src/components/Table.tsx index 5e261e790..c069273c3 100644 --- a/packages/components/src/components/Table.tsx +++ b/packages/components/src/components/Table.tsx @@ -23,6 +23,7 @@ import React, { useEffect, useMemo, useState } from 'react'; import parseCsv from '../lib/parseCsv'; import DebouncedInput from './DebouncedInput'; import loadData from '../lib/loadData'; +import LoadingSpinner from './LoadingSpinner'; export type TableProps = { data?: Array<{ [key: string]: number | string }>; @@ -39,6 +40,8 @@ export const Table = ({ url = '', fullWidth = false, }: TableProps) => { + const [isLoading, setIsLoading] = useState(false); + if (csv) { const out = parseCsv(csv); ogData = out.rows; @@ -77,15 +80,22 @@ export const Table = ({ useEffect(() => { if (url) { + setIsLoading(true); + // TODO: exception handling. What if the file doesn't exist? What if fetching was not possible? loadData(url).then((data) => { const { rows, fields } = parseCsv(data); setData(rows); setCols(fields); + setIsLoading(false); }); } }, [url]); - return ( + return isLoading ? ( +
+ +
+ ) : (
=this.B&&(z||!j[k])){var o=L(w,n,H),f="";switch(this.G){case"full":if(3o;g--)if(g-o>=this.B){var m=L(w,n,H,r,o);f=k.substring(o,g),M(this,j,f,m,e,s)}break}case"reverse":if(2=this.B&&M(this,j,f,L(w,n,H,r,g),e,s);f=""}case"forward":if(1=this.B&&M(this,j,f,o,e,s);break}default:if(this.C&&(o=Math.min(o/this.C(i,k,H)|0,w-1)),M(this,j,k,o,e,s),z&&1=this.B&&!r[k]){r[k]=1;const X=this.l&&k>o;M(this,A,X?o:k,L(f+(n/2>f?0:1),n,H,g-1,m-1),e,s,X?k:o)}}}}}this.m||(this.register[e]=1)}}return this};function L(e,i,s,n,r){return s&&1=this.B&&!s[w])if(this.s||o||this.map[w])m[z++]=w,s[w]=1;else return n;e=m,r=e.length}if(!r)return n;i||(i=100),g=this.depth&&1=n))));w++);if(j){if(o)return ta(m,n,0);i[i.length]=m;return}}return!s&&m}function ta(e,i,s){return e=e.length===1?e[0]:[].concat.apply([],e),s||e.length>i?e.slice(s,s+i):e}function ua(e,i,s,n){return s?(n=n&&i>s,e=(e=e[n?i:s])&&e[n?s:i]):e=e[i],e}t.contain=function(e){return!!this.register[e]},t.update=function(e,i){return this.remove(e).add(e,i)},t.remove=function(e,i){const s=this.register[e];if(s){if(this.m)for(let n=0,r;ni||s)&&(r=r.slice(s,s+i)),n&&(r=za.call(this,r)),{tag:e,result:r}}function za(e){const i=Array(e.length);for(let s=0,n;se.type==="checkbox",isDateObject=e=>e instanceof Date,isNullOrUndefined=e=>e==null;const isObjectType=e=>typeof e=="object";var isObject=e=>!isNullOrUndefined(e)&&!Array.isArray(e)&&isObjectType(e)&&!isDateObject(e),getEventValue=e=>isObject(e)&&e.target?isCheckBoxInput(e.target)?e.target.checked:e.target.value:e,getNodeParentName=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,isNameInFieldArray=(e,i)=>e.has(getNodeParentName(i)),isPlainObject=e=>{const i=e.constructor&&e.constructor.prototype;return isObject(i)&&i.hasOwnProperty("isPrototypeOf")},isWeb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function cloneObject(e){let i;const s=Array.isArray(e);if(e instanceof Date)i=new Date(e);else if(e instanceof Set)i=new Set(e);else if(!(isWeb&&(e instanceof Blob||e instanceof FileList))&&(s||isObject(e)))if(i=s?[]:{},!Array.isArray(e)&&!isPlainObject(e))i=e;else for(const n in e)i[n]=cloneObject(e[n]);else return e;return i}var compact=e=>Array.isArray(e)?e.filter(Boolean):[],isUndefined=e=>e===void 0,get=(e,i,s)=>{if(!i||!isObject(e))return s;const n=compact(i.split(/[,[\].]+?/)).reduce((r,o)=>isNullOrUndefined(r)?r:r[o],e);return isUndefined(n)||n===e?isUndefined(e[i])?s:e[i]:n};const EVENTS={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},VALIDATION_MODE={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},INPUT_VALIDATION_RULES={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};React.createContext(null);var getProxyFormState=(e,i,s,n=!0)=>{const r={defaultValues:i._defaultValues};for(const o in e)Object.defineProperty(r,o,{get:()=>{const f=o;return i._proxyFormState[f]!==VALIDATION_MODE.all&&(i._proxyFormState[f]=!n||VALIDATION_MODE.all),s&&(s[f]=!0),e[f]}});return r},isEmptyObject=e=>isObject(e)&&!Object.keys(e).length,shouldRenderFormState=(e,i,s,n)=>{s(e);const{name:r,...o}=e;return isEmptyObject(o)||Object.keys(o).length>=Object.keys(i).length||Object.keys(o).find(f=>i[f]===(!n||VALIDATION_MODE.all))},convertToArrayPayload=e=>Array.isArray(e)?e:[e];function useSubscribe(e){const i=React.useRef(e);i.current=e,React.useEffect(()=>{const s=!e.disabled&&i.current.subject&&i.current.subject.subscribe({next:i.current.next});return()=>{s&&s.unsubscribe()}},[e.disabled])}var isString=e=>typeof e=="string",generateWatchOutput=(e,i,s,n,r)=>isString(e)?(n&&i.watch.add(e),get(s,e,r)):Array.isArray(e)?e.map(o=>(n&&i.watch.add(o),get(s,o))):(n&&(i.watchAll=!0),s),isKey=e=>/^\w*$/.test(e),stringToPath=e=>compact(e.replace(/["|']|\]/g,"").split(/\.|\[/));function set(e,i,s){let n=-1;const r=isKey(i)?[i]:stringToPath(i),o=r.length,f=o-1;for(;++ni?{...s[e],types:{...s[e]&&s[e].types?s[e].types:{},[n]:r||!0}}:{};const focusFieldBy=(e,i,s)=>{for(const n of s||Object.keys(e)){const r=get(e,n);if(r){const{_f:o,...f}=r;if(o&&i(o.name)){if(o.ref.focus){o.ref.focus();break}else if(o.refs&&o.refs[0].focus){o.refs[0].focus();break}}else isObject(f)&&focusFieldBy(f,i)}}};var getValidationModes=e=>({isOnSubmit:!e||e===VALIDATION_MODE.onSubmit,isOnBlur:e===VALIDATION_MODE.onBlur,isOnChange:e===VALIDATION_MODE.onChange,isOnAll:e===VALIDATION_MODE.all,isOnTouch:e===VALIDATION_MODE.onTouched}),isWatched=(e,i,s)=>!s&&(i.watchAll||i.watch.has(e)||[...i.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length)))),updateFieldArrayRootError=(e,i,s)=>{const n=compact(get(e,s));return set(n,"root",i[s]),set(e,s,n),e},isBoolean=e=>typeof e=="boolean",isFileInput=e=>e.type==="file",isFunction=e=>typeof e=="function",isHTMLElement=e=>{if(!isWeb)return!1;const i=e?e.ownerDocument:0;return e instanceof(i&&i.defaultView?i.defaultView.HTMLElement:HTMLElement)},isMessage=e=>isString(e),isRadioInput=e=>e.type==="radio",isRegex=e=>e instanceof RegExp;const defaultResult={value:!1,isValid:!1},validResult={value:!0,isValid:!0};var getCheckboxValue=e=>{if(Array.isArray(e)){if(e.length>1){const i=e.filter(s=>s&&s.checked&&!s.disabled).map(s=>s.value);return{value:i,isValid:!!i.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!isUndefined(e[0].attributes.value)?isUndefined(e[0].value)||e[0].value===""?validResult:{value:e[0].value,isValid:!0}:validResult:defaultResult}return defaultResult};const defaultReturn={isValid:!1,value:null};var getRadioValue=e=>Array.isArray(e)?e.reduce((i,s)=>s&&s.checked&&!s.disabled?{isValid:!0,value:s.value}:i,defaultReturn):defaultReturn;function getValidateError(e,i,s="validate"){if(isMessage(e)||Array.isArray(e)&&e.every(isMessage)||isBoolean(e)&&!e)return{type:s,message:isMessage(e)?e:"",ref:i}}var getValueAndMessage=e=>isObject(e)&&!isRegex(e)?e:{value:e,message:""},validateField=async(e,i,s,n,r)=>{const{ref:o,refs:f,required:g,maxLength:m,minLength:A,min:j,max:z,pattern:w,validate:H,name:k,valueAsNumber:X,mount:ae,disabled:ue}=e._f,q=get(i,k);if(!ae||ue)return{};const te=f?f[0]:o,oe=ee=>{n&&te.reportValidity&&(te.setCustomValidity(isBoolean(ee)?"":ee||""),te.reportValidity())},ie={},pe=isRadioInput(o),fe=isCheckBoxInput(o),xe=pe||fe,de=(X||isFileInput(o))&&isUndefined(o.value)&&isUndefined(q)||isHTMLElement(o)&&o.value===""||q===""||Array.isArray(q)&&!q.length,me=appendErrors.bind(null,k,s,ie),ge=(ee,$,ne,le=INPUT_VALIDATION_RULES.maxLength,ce=INPUT_VALIDATION_RULES.minLength)=>{const he=ee?$:ne;ie[k]={type:ee?le:ce,message:he,ref:o,...me(ee?le:ce,he)}};if(r?!Array.isArray(q)||!q.length:g&&(!xe&&(de||isNullOrUndefined(q))||isBoolean(q)&&!q||fe&&!getCheckboxValue(f).isValid||pe&&!getRadioValue(f).isValid)){const{value:ee,message:$}=isMessage(g)?{value:!!g,message:g}:getValueAndMessage(g);if(ee&&(ie[k]={type:INPUT_VALIDATION_RULES.required,message:$,ref:te,...me(INPUT_VALIDATION_RULES.required,$)},!s))return oe($),ie}if(!de&&(!isNullOrUndefined(j)||!isNullOrUndefined(z))){let ee,$;const ne=getValueAndMessage(z),le=getValueAndMessage(j);if(!isNullOrUndefined(q)&&!isNaN(q)){const ce=o.valueAsNumber||q&&+q;isNullOrUndefined(ne.value)||(ee=ce>ne.value),isNullOrUndefined(le.value)||($=cenew Date(new Date().toDateString()+" "+Ae),ve=o.type=="time",be=o.type=="week";isString(ne.value)&&q&&(ee=ve?he(q)>he(ne.value):be?q>ne.value:ce>new Date(ne.value)),isString(le.value)&&q&&($=ve?he(q)+ee.value,le=!isNullOrUndefined($.value)&&q.length<+$.value;if((ne||le)&&(ge(ne,ee.message,$.message),!s))return oe(ie[k].message),ie}if(w&&!de&&isString(q)){const{value:ee,message:$}=getValueAndMessage(w);if(isRegex(ee)&&!q.match(ee)&&(ie[k]={type:INPUT_VALIDATION_RULES.pattern,message:$,ref:o,...me(INPUT_VALIDATION_RULES.pattern,$)},!s))return oe($),ie}if(H){if(isFunction(H)){const ee=await H(q,i),$=getValidateError(ee,te);if($&&(ie[k]={...$,...me(INPUT_VALIDATION_RULES.validate,$.message)},!s))return oe($.message),ie}else if(isObject(H)){let ee={};for(const $ in H){if(!isEmptyObject(ee)&&!s)break;const ne=getValidateError(await H[$](q,i),te,$);ne&&(ee={...ne,...me($,ne.message)},oe(ne.message),s&&(ie[k]=ee))}if(!isEmptyObject(ee)&&(ie[k]={ref:te,...ee},!s))return ie}}return oe(!0),ie};function baseGet(e,i){const s=i.slice(0,-1).length;let n=0;for(;n{for(const o of e)o.next&&o.next(r)},subscribe:r=>(e.push(r),{unsubscribe:()=>{e=e.filter(o=>o!==r)}}),unsubscribe:()=>{e=[]}}}var isPrimitive=e=>isNullOrUndefined(e)||!isObjectType(e);function deepEqual(e,i){if(isPrimitive(e)||isPrimitive(i))return e===i;if(isDateObject(e)&&isDateObject(i))return e.getTime()===i.getTime();const s=Object.keys(e),n=Object.keys(i);if(s.length!==n.length)return!1;for(const r of s){const o=e[r];if(!n.includes(r))return!1;if(r!=="ref"){const f=i[r];if(isDateObject(o)&&isDateObject(f)||isObject(o)&&isObject(f)||Array.isArray(o)&&Array.isArray(f)?!deepEqual(o,f):o!==f)return!1}}return!0}var isMultipleSelect=e=>e.type==="select-multiple",isRadioOrCheckbox=e=>isRadioInput(e)||isCheckBoxInput(e),live=e=>isHTMLElement(e)&&e.isConnected,objectHasFunction=e=>{for(const i in e)if(isFunction(e[i]))return!0;return!1};function markFieldsDirty(e,i={}){const s=Array.isArray(e);if(isObject(e)||s)for(const n in e)Array.isArray(e[n])||isObject(e[n])&&!objectHasFunction(e[n])?(i[n]=Array.isArray(e[n])?[]:{},markFieldsDirty(e[n],i[n])):isNullOrUndefined(e[n])||(i[n]=!0);return i}function getDirtyFieldsFromDefaultValues(e,i,s){const n=Array.isArray(e);if(isObject(e)||n)for(const r in e)Array.isArray(e[r])||isObject(e[r])&&!objectHasFunction(e[r])?isUndefined(i)||isPrimitive(s[r])?s[r]=Array.isArray(e[r])?markFieldsDirty(e[r],[]):{...markFieldsDirty(e[r])}:getDirtyFieldsFromDefaultValues(e[r],isNullOrUndefined(i)?{}:i[r],s[r]):s[r]=!deepEqual(e[r],i[r]);return s}var getDirtyFields=(e,i)=>getDirtyFieldsFromDefaultValues(e,i,markFieldsDirty(i)),getFieldValueAs=(e,{valueAsNumber:i,valueAsDate:s,setValueAs:n})=>isUndefined(e)?e:i?e===""?NaN:e&&+e:s&&isString(e)?new Date(e):n?n(e):e;function getFieldValue(e){const i=e.ref;if(!(e.refs?e.refs.every(s=>s.disabled):i.disabled))return isFileInput(i)?i.files:isRadioInput(i)?getRadioValue(e.refs).value:isMultipleSelect(i)?[...i.selectedOptions].map(({value:s})=>s):isCheckBoxInput(i)?getCheckboxValue(e.refs).value:getFieldValueAs(isUndefined(i.value)?e.ref.value:i.value,e)}var getResolverOptions=(e,i,s,n)=>{const r={};for(const o of e){const f=get(i,o);f&&set(r,o,f._f)}return{criteriaMode:s,names:[...e],fields:r,shouldUseNativeValidation:n}},getRuleValue=e=>isUndefined(e)?e:isRegex(e)?e.source:isObject(e)?isRegex(e.value)?e.value.source:e.value:e,hasValidation=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function schemaErrorLookup(e,i,s){const n=get(e,s);if(n||isKey(s))return{error:n,name:s};const r=s.split(".");for(;r.length;){const o=r.join("."),f=get(i,o),g=get(e,o);if(f&&!Array.isArray(f)&&s!==o)return{name:s};if(g&&g.type)return{name:o,error:g};r.pop()}return{name:s}}var skipValidation=(e,i,s,n,r)=>r.isOnAll?!1:!s&&r.isOnTouch?!(i||e):(s?n.isOnBlur:r.isOnBlur)?!e:(s?n.isOnChange:r.isOnChange)?e:!0,unsetEmptyArray=(e,i)=>!compact(get(e,i)).length&&unset(e,i);const defaultOptions={mode:VALIDATION_MODE.onSubmit,reValidateMode:VALIDATION_MODE.onChange,shouldFocusError:!0};function createFormControl(e={},i){let s={...defaultOptions,...e},n={submitCount:0,isDirty:!1,isLoading:isFunction(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},r={},o=isObject(s.defaultValues)||isObject(s.values)?cloneObject(s.defaultValues||s.values)||{}:{},f=s.shouldUnregister?{}:cloneObject(o),g={action:!1,mount:!1,watch:!1},m={mount:new Set,unMount:new Set,array:new Set,watch:new Set},A,j=0;const z={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},w={values:createSubject(),array:createSubject(),state:createSubject()},H=e.resetOptions&&e.resetOptions.keepDirtyValues,k=getValidationModes(s.mode),X=getValidationModes(s.reValidateMode),ae=s.criteriaMode===VALIDATION_MODE.all,ue=l=>h=>{clearTimeout(j),j=setTimeout(l,h)},q=async l=>{if(z.isValid||l){const h=s.resolver?isEmptyObject((await de()).errors):await ge(r,!0);h!==n.isValid&&w.state.next({isValid:h})}},te=l=>z.isValidating&&w.state.next({isValidating:l}),oe=(l,h=[],p,R,_=!0,y=!0)=>{if(R&&p){if(g.action=!0,y&&Array.isArray(get(r,l))){const B=p(get(r,l),R.argA,R.argB);_&&set(r,l,B)}if(y&&Array.isArray(get(n.errors,l))){const B=p(get(n.errors,l),R.argA,R.argB);_&&set(n.errors,l,B),unsetEmptyArray(n.errors,l)}if(z.touchedFields&&y&&Array.isArray(get(n.touchedFields,l))){const B=p(get(n.touchedFields,l),R.argA,R.argB);_&&set(n.touchedFields,l,B)}z.dirtyFields&&(n.dirtyFields=getDirtyFields(o,f)),w.state.next({name:l,isDirty:$(l,h),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else set(f,l,h)},ie=(l,h)=>{set(n.errors,l,h),w.state.next({errors:n.errors})},pe=(l,h,p,R)=>{const _=get(r,l);if(_){const y=get(f,l,isUndefined(p)?get(o,l):p);isUndefined(y)||R&&R.defaultChecked||h?set(f,l,h?y:getFieldValue(_._f)):ce(l,y),g.mount&&q()}},fe=(l,h,p,R,_)=>{let y=!1,B=!1;const se={name:l};if(!p||R){z.isDirty&&(B=n.isDirty,n.isDirty=se.isDirty=$(),y=B!==se.isDirty);const re=deepEqual(get(o,l),h);B=get(n.dirtyFields,l),re?unset(n.dirtyFields,l):set(n.dirtyFields,l,!0),se.dirtyFields=n.dirtyFields,y=y||z.dirtyFields&&B!==!re}if(p){const re=get(n.touchedFields,l);re||(set(n.touchedFields,l,p),se.touchedFields=n.touchedFields,y=y||z.touchedFields&&re!==p)}return y&&_&&w.state.next(se),y?se:{}},xe=(l,h,p,R)=>{const _=get(n.errors,l),y=z.isValid&&isBoolean(h)&&n.isValid!==h;if(e.delayError&&p?(A=ue(()=>ie(l,p)),A(e.delayError)):(clearTimeout(j),A=null,p?set(n.errors,l,p):unset(n.errors,l)),(p?!deepEqual(_,p):_)||!isEmptyObject(R)||y){const B={...R,...y&&isBoolean(h)?{isValid:h}:{},errors:n.errors,name:l};n={...n,...B},w.state.next(B)}te(!1)},de=async l=>s.resolver(f,s.context,getResolverOptions(l||m.mount,r,s.criteriaMode,s.shouldUseNativeValidation)),me=async l=>{const{errors:h}=await de();if(l)for(const p of l){const R=get(h,p);R?set(n.errors,p,R):unset(n.errors,p)}else n.errors=h;return h},ge=async(l,h,p={valid:!0})=>{for(const R in l){const _=l[R];if(_){const{_f:y,...B}=_;if(y){const se=m.array.has(y.name),re=await validateField(_,f,ae,s.shouldUseNativeValidation&&!h,se);if(re[y.name]&&(p.valid=!1,h))break;!h&&(get(re,y.name)?se?updateFieldArrayRootError(n.errors,re,y.name):set(n.errors,y.name,re[y.name]):unset(n.errors,y.name))}B&&await ge(B,h,p)}}return p.valid},ee=()=>{for(const l of m.unMount){const h=get(r,l);h&&(h._f.refs?h._f.refs.every(p=>!live(p)):!live(h._f.ref))&&ke(l)}m.unMount=new Set},$=(l,h)=>(l&&h&&set(f,l,h),!deepEqual(we(),o)),ne=(l,h,p)=>generateWatchOutput(l,m,{...g.mount?f:isUndefined(h)?o:isString(l)?{[l]:h}:h},p,h),le=l=>compact(get(g.mount?f:o,l,e.shouldUnregister?get(o,l,[]):[])),ce=(l,h,p={})=>{const R=get(r,l);let _=h;if(R){const y=R._f;y&&(!y.disabled&&set(f,l,getFieldValueAs(h,y)),_=isHTMLElement(y.ref)&&isNullOrUndefined(h)?"":h,isMultipleSelect(y.ref)?[...y.ref.options].forEach(B=>B.selected=_.includes(B.value)):y.refs?isCheckBoxInput(y.ref)?y.refs.length>1?y.refs.forEach(B=>(!B.defaultChecked||!B.disabled)&&(B.checked=Array.isArray(_)?!!_.find(se=>se===B.value):_===B.value)):y.refs[0]&&(y.refs[0].checked=!!_):y.refs.forEach(B=>B.checked=B.value===_):isFileInput(y.ref)?y.ref.value="":(y.ref.value=_,y.ref.type||w.values.next({name:l,values:{...f}})))}(p.shouldDirty||p.shouldTouch)&&fe(l,_,p.shouldTouch,p.shouldDirty,!0),p.shouldValidate&&Ae(l)},he=(l,h,p)=>{for(const R in h){const _=h[R],y=`${l}.${R}`,B=get(r,y);(m.array.has(l)||!isPrimitive(_)||B&&!B._f)&&!isDateObject(_)?he(y,_,p):ce(y,_,p)}},ve=(l,h,p={})=>{const R=get(r,l),_=m.array.has(l),y=cloneObject(h);set(f,l,y),_?(w.array.next({name:l,values:{...f}}),(z.isDirty||z.dirtyFields)&&p.shouldDirty&&w.state.next({name:l,dirtyFields:getDirtyFields(o,f),isDirty:$(l,y)})):R&&!R._f&&!isNullOrUndefined(y)?he(l,y,p):ce(l,y,p),isWatched(l,m)&&w.state.next({...n}),w.values.next({name:l,values:{...f}}),!g.mount&&i()},be=async l=>{const h=l.target;let p=h.name,R=!0;const _=get(r,p),y=()=>h.type?getFieldValue(_._f):getEventValue(l);if(_){let B,se;const re=y(),ye=l.type===EVENTS.BLUR||l.type===EVENTS.FOCUS_OUT,ze=!hasValidation(_._f)&&!s.resolver&&!get(n.errors,p)&&!_._f.deps||skipValidation(ye,get(n.touchedFields,p),n.isSubmitted,X,k),_e=isWatched(p,m,ye);set(f,p,re),ye?(_._f.onBlur&&_._f.onBlur(l),A&&A(0)):_._f.onChange&&_._f.onChange(l);const Oe=fe(p,re,ye,!1),qe=!isEmptyObject(Oe)||_e;if(!ye&&w.values.next({name:p,type:l.type,values:{...f}}),ze)return z.isValid&&q(),qe&&w.state.next({name:p,..._e?{}:Oe});if(!ye&&_e&&w.state.next({...n}),te(!0),s.resolver){const{errors:Ve}=await de([p]),Ke=schemaErrorLookup(n.errors,r,p),Ie=schemaErrorLookup(Ve,r,Ke.name||p);B=Ie.error,p=Ie.name,se=isEmptyObject(Ve)}else B=(await validateField(_,f,ae,s.shouldUseNativeValidation))[p],R=isNaN(re)||re===get(f,p,re),R&&(B?se=!1:z.isValid&&(se=await ge(r,!0)));R&&(_._f.deps&&Ae(_._f.deps),xe(p,se,B,Oe))}},Ae=async(l,h={})=>{let p,R;const _=convertToArrayPayload(l);if(te(!0),s.resolver){const y=await me(isUndefined(l)?l:_);p=isEmptyObject(y),R=l?!_.some(B=>get(y,B)):p}else l?(R=(await Promise.all(_.map(async y=>{const B=get(r,y);return await ge(B&&B._f?{[y]:B}:B)}))).every(Boolean),!(!R&&!n.isValid)&&q()):R=p=await ge(r);return w.state.next({...!isString(l)||z.isValid&&p!==n.isValid?{}:{name:l},...s.resolver||!l?{isValid:p}:{},errors:n.errors,isValidating:!1}),h.shouldFocus&&!R&&focusFieldBy(r,y=>y&&get(n.errors,y),l?_:m.mount),R},we=l=>{const h={...o,...g.mount?f:{}};return isUndefined(l)?h:isString(l)?get(h,l):l.map(p=>get(h,p))},Fe=(l,h)=>({invalid:!!get((h||n).errors,l),isDirty:!!get((h||n).dirtyFields,l),isTouched:!!get((h||n).touchedFields,l),error:get((h||n).errors,l)}),je=l=>{l&&convertToArrayPayload(l).forEach(h=>unset(n.errors,h)),w.state.next({errors:l?n.errors:{}})},Ue=(l,h,p)=>{const R=(get(r,l,{_f:{}})._f||{}).ref;set(n.errors,l,{...h,ref:R}),w.state.next({name:l,errors:n.errors,isValid:!1}),p&&p.shouldFocus&&R&&R.focus&&R.focus()},Be=(l,h)=>isFunction(l)?w.values.subscribe({next:p=>l(ne(void 0,h),p)}):ne(l,h,!0),ke=(l,h={})=>{for(const p of l?convertToArrayPayload(l):m.mount)m.mount.delete(p),m.array.delete(p),h.keepValue||(unset(r,p),unset(f,p)),!h.keepError&&unset(n.errors,p),!h.keepDirty&&unset(n.dirtyFields,p),!h.keepTouched&&unset(n.touchedFields,p),!s.shouldUnregister&&!h.keepDefaultValue&&unset(o,p);w.values.next({values:{...f}}),w.state.next({...n,...h.keepDirty?{isDirty:$()}:{}}),!h.keepIsValid&&q()},Ce=(l,h={})=>{let p=get(r,l);const R=isBoolean(h.disabled);return set(r,l,{...p||{},_f:{...p&&p._f?p._f:{ref:{name:l}},name:l,mount:!0,...h}}),m.mount.add(l),p?R&&set(f,l,h.disabled?void 0:get(f,l,getFieldValue(p._f))):pe(l,!0,h.value),{...R?{disabled:h.disabled}:{},...s.shouldUseNativeValidation?{required:!!h.required,min:getRuleValue(h.min),max:getRuleValue(h.max),minLength:getRuleValue(h.minLength),maxLength:getRuleValue(h.maxLength),pattern:getRuleValue(h.pattern)}:{},name:l,onChange:be,onBlur:be,ref:_=>{if(_){Ce(l,h),p=get(r,l);const y=isUndefined(_.value)&&_.querySelectorAll&&_.querySelectorAll("input,select,textarea")[0]||_,B=isRadioOrCheckbox(y),se=p._f.refs||[];if(B?se.find(re=>re===y):y===p._f.ref)return;set(r,l,{_f:{...p._f,...B?{refs:[...se.filter(live),y,...Array.isArray(get(o,l))?[{}]:[]],ref:{type:y.type,name:l}}:{ref:y}}}),pe(l,!1,void 0,y)}else p=get(r,l,{}),p._f&&(p._f.mount=!1),(s.shouldUnregister||h.shouldUnregister)&&!(isNameInFieldArray(m.array,l)&&g.action)&&m.unMount.add(l)}}},De=()=>s.shouldFocusError&&focusFieldBy(r,l=>l&&get(n.errors,l),m.mount),We=(l,h)=>async p=>{p&&(p.preventDefault&&p.preventDefault(),p.persist&&p.persist());let R=cloneObject(f);if(w.state.next({isSubmitting:!0}),s.resolver){const{errors:_,values:y}=await de();n.errors=_,R=y}else await ge(r);unset(n.errors,"root"),isEmptyObject(n.errors)?(w.state.next({errors:{}}),await l(R,p)):(h&&await h({...n.errors},p),De(),setTimeout(De)),w.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Je=(l,h={})=>{get(r,l)&&(isUndefined(h.defaultValue)?ve(l,get(o,l)):(ve(l,h.defaultValue),set(o,l,h.defaultValue)),h.keepTouched||unset(n.touchedFields,l),h.keepDirty||(unset(n.dirtyFields,l),n.isDirty=h.defaultValue?$(l,get(o,l)):$()),h.keepError||(unset(n.errors,l),z.isValid&&q()),w.state.next({...n}))},Le=(l,h={})=>{const p=l||o,R=cloneObject(p),_=l&&!isEmptyObject(l)?R:o;if(h.keepDefaultValues||(o=p),!h.keepValues){if(h.keepDirtyValues||H)for(const y of m.mount)get(n.dirtyFields,y)?set(_,y,get(f,y)):ve(y,get(_,y));else{if(isWeb&&isUndefined(l))for(const y of m.mount){const B=get(r,y);if(B&&B._f){const se=Array.isArray(B._f.refs)?B._f.refs[0]:B._f.ref;if(isHTMLElement(se)){const re=se.closest("form");if(re){re.reset();break}}}}r={}}f=e.shouldUnregister?h.keepDefaultValues?cloneObject(o):{}:R,w.array.next({values:{..._}}),w.values.next({values:{..._}})}m={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!g.mount&&i(),g.mount=!z.isValid||!!h.keepIsValid,g.watch=!!e.shouldUnregister,w.state.next({submitCount:h.keepSubmitCount?n.submitCount:0,isDirty:h.keepDirty?n.isDirty:!!(h.keepDefaultValues&&!deepEqual(l,o)),isSubmitted:h.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:h.keepDirtyValues?n.dirtyFields:h.keepDefaultValues&&l?getDirtyFields(o,l):{},touchedFields:h.keepTouched?n.touchedFields:{},errors:h.keepErrors?n.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},Ee=(l,h)=>Le(isFunction(l)?l(f):l,h);return{control:{register:Ce,unregister:ke,getFieldState:Fe,_executeSchema:de,_getWatch:ne,_getDirty:$,_updateValid:q,_removeUnmounted:ee,_updateFieldArray:oe,_getFieldArray:le,_reset:Le,_resetDefaultValues:()=>isFunction(s.defaultValues)&&s.defaultValues().then(l=>{Ee(l,s.resetOptions),w.state.next({isLoading:!1})}),_updateFormState:l=>{n={...n,...l}},_subjects:w,_proxyFormState:z,get _fields(){return r},get _formValues(){return f},get _state(){return g},set _state(l){g=l},get _defaultValues(){return o},get _names(){return m},set _names(l){m=l},get _formState(){return n},set _formState(l){n=l},get _options(){return s},set _options(l){s={...s,...l}}},trigger:Ae,register:Ce,handleSubmit:We,watch:Be,setValue:ve,getValues:we,reset:Ee,resetField:Je,clearErrors:je,unregister:ke,setError:Ue,setFocus:(l,h={})=>{const p=get(r,l),R=p&&p._f;if(R){const _=R.refs?R.refs[0]:R.ref;_.focus&&(_.focus(),h.shouldSelect&&_.select())}},getFieldState:Fe}}function useForm(e={}){const i=React.useRef(),[s,n]=React.useState({isDirty:!1,isValidating:!1,isLoading:isFunction(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:isFunction(e.defaultValues)?void 0:e.defaultValues});i.current||(i.current={...createFormControl(e,()=>n(o=>({...o}))),formState:s});const r=i.current.control;return r._options=e,useSubscribe({subject:r._subjects.state,next:o=>{shouldRenderFormState(o,r._proxyFormState,r._updateFormState,!0)&&n({...r._formState})}}),React.useEffect(()=>{e.values&&!deepEqual(e.values,r._defaultValues)?r._reset(e.values,r._options.resetOptions):r._resetDefaultValues()},[e.values,r]),React.useEffect(()=>{r._state.mount||(r._updateValid(),r._state.mount=!0),r._state.watch&&(r._state.watch=!1,r._subjects.state.next({...r._formState})),r._removeUnmounted()}),i.current.formState=getProxyFormState(s,r),i.current}function Catalog({datasets:e,facets:i}){const[s,n]=reactExports.useState(""),r=new flexsearch_bundleExports.Index({tokenize:"full"});e.forEach(A=>r.add(A._id,Object.entries(A.metadata).reduce((j,z)=>j+" "+z[1].toString(),"")+" "+A.url_path));const o=i?i.reduce((A,j)=>{const z=e.reduce((w,H)=>{const k=H.metadata[j];return k?Array.isArray(k)?w.concat(k):w.concat([k]):w},[]);return A[j]={possibleValues:[...new Set(z)],selectedValue:null},A},{}):[],{register:f,watch:g}=useForm(o),m=e.filter(A=>s!==""?r.search(s).includes(A._id):!0).filter(A=>!g()||Object.keys(g()).length===0?!0:Object.entries(A.metadata).filter(z=>i.includes(z[0])).every(z=>g()[z[0]].selectedValue?z[1].includes(g()[z[0]].selectedValue):!0));return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DebouncedInput,{value:s??"",onChange:A=>n(String(A)),className:"p-2 text-sm shadow border border-block mr-1",placeholder:"Search all datasets..."}),Object.entries(o).map(A=>jsxRuntimeExports.jsxs("select",{defaultValue:"",className:"p-2 ml-1 text-sm shadow border border-block",...f(A[0]+".selectedValue"),children:[jsxRuntimeExports.jsxs("option",{value:"",children:["Filter by ",A[0]]}),A[1].possibleValues.map(j=>jsxRuntimeExports.jsx("option",{className:"dark:bg-white dark:text-black",value:j,children:j},j))]},A[0])),jsxRuntimeExports.jsx("ul",{className:"mb-5 pl-6 mt-5 list-disc",children:m.map(A=>jsxRuntimeExports.jsx("li",{className:"py-2",children:jsxRuntimeExports.jsx("a",{className:"font-medium underline",href:A.url_path,children:A.metadata.title?A.metadata.title:A.url_path})},A._id))})]})}try{Catalog.displayName="Catalog",Catalog.__docgenInfo={description:"",displayName:"Catalog",props:{datasets:{defaultValue:null,description:"",name:"datasets",required:!0,type:{name:"any[]"}},facets:{defaultValue:null,description:"",name:"facets",required:!0,type:{name:"string[]"}}}}}catch(e){}const meta={title:"Components/Catalog",component:Catalog,tags:["autodocs"],argTypes:{datasets:{description:"Lists of datasets to be displayed in the list, will usually be automatically available"},facets:{description:"List of frontmatter fields that should be used as filters, needs to match exactly with the field name"}}},WithoutFacets={name:"Catalog without facets",args:{datasets:[{_id:"07026b22d49916754df1dc8ffb9ccd1c31878aae",url_path:"dataset-4",file_path:"content/dataset-4/index.md",metadata:{title:"Detecting Abusive Albanian","link-to-publication":"https://arxiv.org/abs/2107.13592","link-to-data":"https://doi.org/10.6084/m9.figshare.19333298.v1","task-description":"Hierarchical (offensive/not; untargeted/targeted; person/group/other)","details-of-task":"Detect and categorise abusive language in social media data","size-of-dataset":11874,"percentage-abusive":13.2,language:"Albanian","level-of-annotation":["Posts"],platform:["Instagram","Youtube"],medium:["Text"],reference:"Nurce, E., Keci, J., Derczynski, L., 2021. Detecting Abusive Albanian. arXiv:2107.13592"}},{_id:"42c86cf3c4fbbab11d91c2a7d6dcb8f750bc4e19",url_path:"dataset-1",file_path:"content/dataset-1/index.md",metadata:{title:"AbuseEval v1.0","link-to-publication":"http://www.lrec-conf.org/proceedings/lrec2020/pdf/2020.lrec-1.760.pdf","link-to-data":"https://github.com/tommasoc80/AbuseEval","task-description":"Explicitness annotation of offensive and abusive content","details-of-task":"Enriched versions of the OffensEval/OLID dataset with the distinction of explicit/implicit offensive messages and the new dimension for abusive messages. Labels for offensive language: EXPLICIT, IMPLICT, NOT; Labels for abusive language: EXPLICIT, IMPLICT, NOTABU","size-of-dataset":14100,"percentage-abusive":20.75,language:"English","level-of-annotation":["Tweets"],platform:["Twitter"],medium:["Text"],reference:'Caselli, T., Basile, V., Jelena, M., Inga, K., and Michael, G. 2020. "I feel offended, don’t be abusive! implicit/explicit messages in offensive and abusive language". The 12th Language Resources and Evaluation Conference (pp. 6193-6202). European Language Resources Association.'}},{_id:"80001dd32a752421fdcc64e91fbd237dc31d6bb3",url_path:"dataset-2",file_path:"content/dataset-2/index.md",metadata:{title:"Abusive Language Detection on Arabic Social Media (Al Jazeera)","link-to-publication":"https://www.aclweb.org/anthology/W17-3008","link-to-data":"http://alt.qcri.org/~hmubarak/offensive/AJCommentsClassification-CF.xlsx","task-description":"Ternary (Obscene, Offensive but not obscene, Clean)","details-of-task":"Incivility","size-of-dataset":32e3,"percentage-abusive":.81,language:"Arabic","level-of-annotation":["Posts"],platform:["AlJazeera"],medium:["Text"],reference:"Mubarak, H., Darwish, K. and Magdy, W., 2017. Abusive Language Detection on Arabic Social Media. In: Proceedings of the First Workshop on Abusive Language Online. Vancouver, Canada: Association for Computational Linguistics, pp.52-56."}},{_id:"96649d05d8193f4333b10015af76c6562971bd8c",url_path:"dataset-3",file_path:"content/dataset-3/index.md",metadata:{title:"CoRAL: a Context-aware Croatian Abusive Language Dataset","link-to-publication":"https://aclanthology.org/2022.findings-aacl.21/","link-to-data":"https://github.com/shekharRavi/CoRAL-dataset-Findings-of-the-ACL-AACL-IJCNLP-2022","task-description":"Multi-class based on context dependency categories (CDC)","details-of-task":"Detectioning CDC from abusive comments","size-of-dataset":2240,"percentage-abusive":100,language:"Croatian","level-of-annotation":["Posts"],platform:["Posts"],medium:["Newspaper Comments"],reference:"Ravi Shekhar, Mladen Karan and Matthew Purver (2022). CoRAL: a Context-aware Croatian Abusive Language Dataset. Findings of the ACL: AACL-IJCNLP."}}]}},WithFacets={name:"Catalog with facets",args:{datasets:[{_id:"07026b22d49916754df1dc8ffb9ccd1c31878aae",url_path:"dataset-4",file_path:"content/dataset-4/index.md",metadata:{title:"Detecting Abusive Albanian","link-to-publication":"https://arxiv.org/abs/2107.13592","link-to-data":"https://doi.org/10.6084/m9.figshare.19333298.v1","task-description":"Hierarchical (offensive/not; untargeted/targeted; person/group/other)","details-of-task":"Detect and categorise abusive language in social media data","size-of-dataset":11874,"percentage-abusive":13.2,language:"Albanian","level-of-annotation":["Posts"],platform:["Instagram","Youtube"],medium:["Text"],reference:"Nurce, E., Keci, J., Derczynski, L., 2021. Detecting Abusive Albanian. arXiv:2107.13592"}},{_id:"42c86cf3c4fbbab11d91c2a7d6dcb8f750bc4e19",url_path:"dataset-1",file_path:"content/dataset-1/index.md",metadata:{title:"AbuseEval v1.0","link-to-publication":"http://www.lrec-conf.org/proceedings/lrec2020/pdf/2020.lrec-1.760.pdf","link-to-data":"https://github.com/tommasoc80/AbuseEval","task-description":"Explicitness annotation of offensive and abusive content","details-of-task":"Enriched versions of the OffensEval/OLID dataset with the distinction of explicit/implicit offensive messages and the new dimension for abusive messages. Labels for offensive language: EXPLICIT, IMPLICT, NOT; Labels for abusive language: EXPLICIT, IMPLICT, NOTABU","size-of-dataset":14100,"percentage-abusive":20.75,language:"English","level-of-annotation":["Tweets"],platform:["Twitter"],medium:["Text"],reference:'Caselli, T., Basile, V., Jelena, M., Inga, K., and Michael, G. 2020. "I feel offended, don’t be abusive! implicit/explicit messages in offensive and abusive language". The 12th Language Resources and Evaluation Conference (pp. 6193-6202). European Language Resources Association.'}},{_id:"80001dd32a752421fdcc64e91fbd237dc31d6bb3",url_path:"dataset-2",file_path:"content/dataset-2/index.md",metadata:{title:"Abusive Language Detection on Arabic Social Media (Al Jazeera)","link-to-publication":"https://www.aclweb.org/anthology/W17-3008","link-to-data":"http://alt.qcri.org/~hmubarak/offensive/AJCommentsClassification-CF.xlsx","task-description":"Ternary (Obscene, Offensive but not obscene, Clean)","details-of-task":"Incivility","size-of-dataset":32e3,"percentage-abusive":.81,language:"Arabic","level-of-annotation":["Posts"],platform:["AlJazeera"],medium:["Text"],reference:"Mubarak, H., Darwish, K. and Magdy, W., 2017. Abusive Language Detection on Arabic Social Media. In: Proceedings of the First Workshop on Abusive Language Online. Vancouver, Canada: Association for Computational Linguistics, pp.52-56."}},{_id:"96649d05d8193f4333b10015af76c6562971bd8c",url_path:"dataset-3",file_path:"content/dataset-3/index.md",metadata:{title:"CoRAL: a Context-aware Croatian Abusive Language Dataset","link-to-publication":"https://aclanthology.org/2022.findings-aacl.21/","link-to-data":"https://github.com/shekharRavi/CoRAL-dataset-Findings-of-the-ACL-AACL-IJCNLP-2022","task-description":"Multi-class based on context dependency categories (CDC)","details-of-task":"Detectioning CDC from abusive comments","size-of-dataset":2240,"percentage-abusive":100,language:"Croatian","level-of-annotation":["Posts"],platform:["Posts"],medium:["Newspaper Comments"],reference:"Ravi Shekhar, Mladen Karan and Matthew Purver (2022). CoRAL: a Context-aware Croatian Abusive Language Dataset. Findings of the ACL: AACL-IJCNLP."}}],facets:["language","platform"]}};var Te,Ne,Se;WithoutFacets.parameters={...WithoutFacets.parameters,docs:{...(Te=WithoutFacets.parameters)==null?void 0:Te.docs,source:{originalSource:`{ - name: 'Catalog without facets', - args: { - datasets: [{ - _id: '07026b22d49916754df1dc8ffb9ccd1c31878aae', - url_path: 'dataset-4', - file_path: 'content/dataset-4/index.md', - metadata: { - title: 'Detecting Abusive Albanian', - 'link-to-publication': 'https://arxiv.org/abs/2107.13592', - 'link-to-data': 'https://doi.org/10.6084/m9.figshare.19333298.v1', - 'task-description': 'Hierarchical (offensive/not; untargeted/targeted; person/group/other)', - 'details-of-task': 'Detect and categorise abusive language in social media data', - 'size-of-dataset': 11874, - 'percentage-abusive': 13.2, - language: 'Albanian', - 'level-of-annotation': ['Posts'], - platform: ['Instagram', 'Youtube'], - medium: ['Text'], - reference: 'Nurce, E., Keci, J., Derczynski, L., 2021. Detecting Abusive Albanian. arXiv:2107.13592' - } - }, { - _id: '42c86cf3c4fbbab11d91c2a7d6dcb8f750bc4e19', - url_path: 'dataset-1', - file_path: 'content/dataset-1/index.md', - metadata: { - title: 'AbuseEval v1.0', - 'link-to-publication': 'http://www.lrec-conf.org/proceedings/lrec2020/pdf/2020.lrec-1.760.pdf', - 'link-to-data': 'https://github.com/tommasoc80/AbuseEval', - 'task-description': 'Explicitness annotation of offensive and abusive content', - 'details-of-task': 'Enriched versions of the OffensEval/OLID dataset with the distinction of explicit/implicit offensive messages and the new dimension for abusive messages. Labels for offensive language: EXPLICIT, IMPLICT, NOT; Labels for abusive language: EXPLICIT, IMPLICT, NOTABU', - 'size-of-dataset': 14100, - 'percentage-abusive': 20.75, - language: 'English', - 'level-of-annotation': ['Tweets'], - platform: ['Twitter'], - medium: ['Text'], - reference: 'Caselli, T., Basile, V., Jelena, M., Inga, K., and Michael, G. 2020. "I feel offended, don’t be abusive! implicit/explicit messages in offensive and abusive language". The 12th Language Resources and Evaluation Conference (pp. 6193-6202). European Language Resources Association.' - } - }, { - _id: '80001dd32a752421fdcc64e91fbd237dc31d6bb3', - url_path: 'dataset-2', - file_path: 'content/dataset-2/index.md', - metadata: { - title: 'Abusive Language Detection on Arabic Social Media (Al Jazeera)', - 'link-to-publication': 'https://www.aclweb.org/anthology/W17-3008', - 'link-to-data': 'http://alt.qcri.org/~hmubarak/offensive/AJCommentsClassification-CF.xlsx', - 'task-description': 'Ternary (Obscene, Offensive but not obscene, Clean)', - 'details-of-task': 'Incivility', - 'size-of-dataset': 32000, - 'percentage-abusive': 0.81, - language: 'Arabic', - 'level-of-annotation': ['Posts'], - platform: ['AlJazeera'], - medium: ['Text'], - reference: 'Mubarak, H., Darwish, K. and Magdy, W., 2017. Abusive Language Detection on Arabic Social Media. In: Proceedings of the First Workshop on Abusive Language Online. Vancouver, Canada: Association for Computational Linguistics, pp.52-56.' - } - }, { - _id: '96649d05d8193f4333b10015af76c6562971bd8c', - url_path: 'dataset-3', - file_path: 'content/dataset-3/index.md', - metadata: { - title: 'CoRAL: a Context-aware Croatian Abusive Language Dataset', - 'link-to-publication': 'https://aclanthology.org/2022.findings-aacl.21/', - 'link-to-data': 'https://github.com/shekharRavi/CoRAL-dataset-Findings-of-the-ACL-AACL-IJCNLP-2022', - 'task-description': 'Multi-class based on context dependency categories (CDC)', - 'details-of-task': 'Detectioning CDC from abusive comments', - 'size-of-dataset': 2240, - 'percentage-abusive': 100, - language: 'Croatian', - 'level-of-annotation': ['Posts'], - platform: ['Posts'], - medium: ['Newspaper Comments'], - reference: 'Ravi Shekhar, Mladen Karan and Matthew Purver (2022). CoRAL: a Context-aware Croatian Abusive Language Dataset. Findings of the ACL: AACL-IJCNLP.' - } - }] - } -}`,...(Se=(Ne=WithoutFacets.parameters)==null?void 0:Ne.docs)==null?void 0:Se.source}}};var Me,Re,Pe;WithFacets.parameters={...WithFacets.parameters,docs:{...(Me=WithFacets.parameters)==null?void 0:Me.docs,source:{originalSource:`{ - name: 'Catalog with facets', - args: { - datasets: [{ - _id: '07026b22d49916754df1dc8ffb9ccd1c31878aae', - url_path: 'dataset-4', - file_path: 'content/dataset-4/index.md', - metadata: { - title: 'Detecting Abusive Albanian', - 'link-to-publication': 'https://arxiv.org/abs/2107.13592', - 'link-to-data': 'https://doi.org/10.6084/m9.figshare.19333298.v1', - 'task-description': 'Hierarchical (offensive/not; untargeted/targeted; person/group/other)', - 'details-of-task': 'Detect and categorise abusive language in social media data', - 'size-of-dataset': 11874, - 'percentage-abusive': 13.2, - language: 'Albanian', - 'level-of-annotation': ['Posts'], - platform: ['Instagram', 'Youtube'], - medium: ['Text'], - reference: 'Nurce, E., Keci, J., Derczynski, L., 2021. Detecting Abusive Albanian. arXiv:2107.13592' - } - }, { - _id: '42c86cf3c4fbbab11d91c2a7d6dcb8f750bc4e19', - url_path: 'dataset-1', - file_path: 'content/dataset-1/index.md', - metadata: { - title: 'AbuseEval v1.0', - 'link-to-publication': 'http://www.lrec-conf.org/proceedings/lrec2020/pdf/2020.lrec-1.760.pdf', - 'link-to-data': 'https://github.com/tommasoc80/AbuseEval', - 'task-description': 'Explicitness annotation of offensive and abusive content', - 'details-of-task': 'Enriched versions of the OffensEval/OLID dataset with the distinction of explicit/implicit offensive messages and the new dimension for abusive messages. Labels for offensive language: EXPLICIT, IMPLICT, NOT; Labels for abusive language: EXPLICIT, IMPLICT, NOTABU', - 'size-of-dataset': 14100, - 'percentage-abusive': 20.75, - language: 'English', - 'level-of-annotation': ['Tweets'], - platform: ['Twitter'], - medium: ['Text'], - reference: 'Caselli, T., Basile, V., Jelena, M., Inga, K., and Michael, G. 2020. "I feel offended, don’t be abusive! implicit/explicit messages in offensive and abusive language". The 12th Language Resources and Evaluation Conference (pp. 6193-6202). European Language Resources Association.' - } - }, { - _id: '80001dd32a752421fdcc64e91fbd237dc31d6bb3', - url_path: 'dataset-2', - file_path: 'content/dataset-2/index.md', - metadata: { - title: 'Abusive Language Detection on Arabic Social Media (Al Jazeera)', - 'link-to-publication': 'https://www.aclweb.org/anthology/W17-3008', - 'link-to-data': 'http://alt.qcri.org/~hmubarak/offensive/AJCommentsClassification-CF.xlsx', - 'task-description': 'Ternary (Obscene, Offensive but not obscene, Clean)', - 'details-of-task': 'Incivility', - 'size-of-dataset': 32000, - 'percentage-abusive': 0.81, - language: 'Arabic', - 'level-of-annotation': ['Posts'], - platform: ['AlJazeera'], - medium: ['Text'], - reference: 'Mubarak, H., Darwish, K. and Magdy, W., 2017. Abusive Language Detection on Arabic Social Media. In: Proceedings of the First Workshop on Abusive Language Online. Vancouver, Canada: Association for Computational Linguistics, pp.52-56.' - } - }, { - _id: '96649d05d8193f4333b10015af76c6562971bd8c', - url_path: 'dataset-3', - file_path: 'content/dataset-3/index.md', - metadata: { - title: 'CoRAL: a Context-aware Croatian Abusive Language Dataset', - 'link-to-publication': 'https://aclanthology.org/2022.findings-aacl.21/', - 'link-to-data': 'https://github.com/shekharRavi/CoRAL-dataset-Findings-of-the-ACL-AACL-IJCNLP-2022', - 'task-description': 'Multi-class based on context dependency categories (CDC)', - 'details-of-task': 'Detectioning CDC from abusive comments', - 'size-of-dataset': 2240, - 'percentage-abusive': 100, - language: 'Croatian', - 'level-of-annotation': ['Posts'], - platform: ['Posts'], - medium: ['Newspaper Comments'], - reference: 'Ravi Shekhar, Mladen Karan and Matthew Purver (2022). CoRAL: a Context-aware Croatian Abusive Language Dataset. Findings of the ACL: AACL-IJCNLP.' - } - }], - facets: ['language', 'platform'] - } -}`,...(Pe=(Re=WithFacets.parameters)==null?void 0:Re.docs)==null?void 0:Pe.source}}};const __namedExportsOrder=["WithoutFacets","WithFacets"];export{WithFacets,WithoutFacets,__namedExportsOrder,meta as default}; -//# sourceMappingURL=Catalog.stories-ea9731da.js.map diff --git a/packages/components/storybook-static/assets/Catalog.stories-ea9731da.js.map b/packages/components/storybook-static/assets/Catalog.stories-ea9731da.js.map deleted file mode 100644 index 3a927e294..000000000 --- a/packages/components/storybook-static/assets/Catalog.stories-ea9731da.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Catalog.stories-ea9731da.js","sources":["../../node_modules/flexsearch/dist/flexsearch.bundle.js","../../node_modules/react-hook-form/dist/index.esm.mjs","../../src/components/Catalog.tsx"],"sourcesContent":["/**!\r\n * FlexSearch.js v0.7.21 (Bundle)\r\n * Copyright 2018-2021 Nextapps GmbH\r\n * Author: Thomas Wilkerling\r\n * Licence: Apache-2.0\r\n * https://github.com/nextapps-de/flexsearch\r\n */\n(function _f(self){'use strict';try{if(module)self=module}catch(e){}self._factory=_f;var t;function u(a){return\"undefined\"!==typeof a?a:!0}function aa(a){const b=Array(a);for(let c=0;c=this.B&&(w||!n[l])){var f=L(q,d,r),g=\"\";switch(this.G){case \"full\":if(3f;h--)if(h-f>=this.B){var k=L(q,d,r,e,f);g=l.substring(f,h);M(this,n,g,k,a,c)}break}case \"reverse\":if(2=this.B&&M(this,n,\ng,L(q,d,r,e,h),a,c);g=\"\"}case \"forward\":if(1=this.B&&M(this,n,g,f,a,c);break}default:if(this.C&&(f=Math.min(f/this.C(b,l,r)|0,q-1)),M(this,n,l,f,a,c),w&&1=this.B&&!e[l]){e[l]=1;const p=this.l&&l>f;M(this,m,p?f:l,L(g+(d/2>g?0:1),d,r,h-1,k-1),a,c,p?l:f)}}}}this.m||(this.register[a]=1)}}return this};\nfunction L(a,b,c,d,e){return c&&1=this.B&&!c[q])if(this.s||f||this.map[q])k[w++]=q,c[q]=1;else return d;a=k;e=a.length}if(!e)return d;b||(b=100);h=this.depth&&1=d)))break;if(n){if(f)return ta(k,d,0);b[b.length]=k;return}}return!c&&k}function ta(a,b,c){a=1===a.length?a[0]:[].concat.apply([],a);return c||a.length>b?a.slice(c,c+b):a}\nfunction ua(a,b,c,d){c?(d=d&&b>c,a=(a=a[d?b:c])&&a[d?c:b]):a=a[b];return a}t.contain=function(a){return!!this.register[a]};t.update=function(a,b){return this.remove(a).add(a,b)};\nt.remove=function(a,b){const c=this.register[a];if(c){if(this.m)for(let d=0,e;db||c)e=e.slice(c,c+b);d&&(e=za.call(this,e));return{tag:a,result:e}}}function za(a){const b=Array(a.length);for(let c=0,d;c element.type === 'checkbox';\n\nvar isDateObject = (value) => value instanceof Date;\n\nvar isNullOrUndefined = (value) => value == null;\n\nconst isObjectType = (value) => typeof value === 'object';\nvar isObject = (value) => !isNullOrUndefined(value) &&\n !Array.isArray(value) &&\n isObjectType(value) &&\n !isDateObject(value);\n\nvar getEventValue = (event) => isObject(event) && event.target\n ? isCheckBoxInput(event.target)\n ? event.target.checked\n : event.target.value\n : event;\n\nvar getNodeParentName = (name) => name.substring(0, name.search(/\\.\\d+(\\.|$)/)) || name;\n\nvar isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));\n\nvar isPlainObject = (tempObject) => {\n const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;\n return (isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));\n};\n\nvar isWeb = typeof window !== 'undefined' &&\n typeof window.HTMLElement !== 'undefined' &&\n typeof document !== 'undefined';\n\nfunction cloneObject(data) {\n let copy;\n const isArray = Array.isArray(data);\n if (data instanceof Date) {\n copy = new Date(data);\n }\n else if (data instanceof Set) {\n copy = new Set(data);\n }\n else if (!(isWeb && (data instanceof Blob || data instanceof FileList)) &&\n (isArray || isObject(data))) {\n copy = isArray ? [] : {};\n if (!Array.isArray(data) && !isPlainObject(data)) {\n copy = data;\n }\n else {\n for (const key in data) {\n copy[key] = cloneObject(data[key]);\n }\n }\n }\n else {\n return data;\n }\n return copy;\n}\n\nvar compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];\n\nvar isUndefined = (val) => val === undefined;\n\nvar get = (obj, path, defaultValue) => {\n if (!path || !isObject(obj)) {\n return defaultValue;\n }\n const result = compact(path.split(/[,[\\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], obj);\n return isUndefined(result) || result === obj\n ? isUndefined(obj[path])\n ? defaultValue\n : obj[path]\n : result;\n};\n\nconst EVENTS = {\n BLUR: 'blur',\n FOCUS_OUT: 'focusout',\n CHANGE: 'change',\n};\nconst VALIDATION_MODE = {\n onBlur: 'onBlur',\n onChange: 'onChange',\n onSubmit: 'onSubmit',\n onTouched: 'onTouched',\n all: 'all',\n};\nconst INPUT_VALIDATION_RULES = {\n max: 'max',\n min: 'min',\n maxLength: 'maxLength',\n minLength: 'minLength',\n pattern: 'pattern',\n required: 'required',\n validate: 'validate',\n};\n\nconst HookFormContext = React.createContext(null);\n/**\n * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @returns return all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * \n *
\n * \n * \n * \n *
\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return ;\n * }\n * ```\n */\nconst useFormContext = () => React.useContext(HookFormContext);\n/**\n * A provider component that propagates the `useForm` methods to all children components via [React Context](https://reactjs.org/docs/context.html) API. To be used with {@link useFormContext}.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @param props - all useFrom methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * \n *
\n * \n * \n * \n *
\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return ;\n * }\n * ```\n */\nconst FormProvider = (props) => {\n const { children, ...data } = props;\n return (React.createElement(HookFormContext.Provider, { value: data }, children));\n};\n\nvar getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {\n const result = {\n defaultValues: control._defaultValues,\n };\n for (const key in formState) {\n Object.defineProperty(result, key, {\n get: () => {\n const _key = key;\n if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {\n control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;\n }\n localProxyFormState && (localProxyFormState[_key] = true);\n return formState[_key];\n },\n });\n }\n return result;\n};\n\nvar isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;\n\nvar shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {\n updateFormState(formStateData);\n const { name, ...formState } = formStateData;\n return (isEmptyObject(formState) ||\n Object.keys(formState).length >= Object.keys(_proxyFormState).length ||\n Object.keys(formState).find((key) => _proxyFormState[key] ===\n (!isRoot || VALIDATION_MODE.all)));\n};\n\nvar convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);\n\nvar shouldSubscribeByName = (name, signalName, exact) => exact && signalName\n ? name === signalName\n : !name ||\n !signalName ||\n name === signalName ||\n convertToArrayPayload(name).some((currentName) => currentName &&\n (currentName.startsWith(signalName) ||\n signalName.startsWith(currentName)));\n\nfunction useSubscribe(props) {\n const _props = React.useRef(props);\n _props.current = props;\n React.useEffect(() => {\n const subscription = !props.disabled &&\n _props.current.subject &&\n _props.current.subject.subscribe({\n next: _props.current.next,\n });\n return () => {\n subscription && subscription.unsubscribe();\n };\n }, [props.disabled]);\n}\n\n/**\n * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)\n *\n * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, control } = useForm({\n * defaultValues: {\n * firstName: \"firstName\"\n * }});\n * const { dirtyFields } = useFormState({\n * control\n * });\n * const onSubmit = (data) => console.log(data);\n *\n * return (\n *
\n * \n * {dirtyFields.firstName &&

Field is dirty.

}\n * \n * \n * );\n * }\n * ```\n */\nfunction useFormState(props) {\n const methods = useFormContext();\n const { control = methods.control, disabled, name, exact } = props || {};\n const [formState, updateFormState] = React.useState(control._formState);\n const _mounted = React.useRef(true);\n const _localProxyFormState = React.useRef({\n isDirty: false,\n isLoading: false,\n dirtyFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n });\n const _name = React.useRef(name);\n _name.current = name;\n useSubscribe({\n disabled,\n next: (value) => _mounted.current &&\n shouldSubscribeByName(_name.current, value.name, exact) &&\n shouldRenderFormState(value, _localProxyFormState.current, control._updateFormState) &&\n updateFormState({\n ...control._formState,\n ...value,\n }),\n subject: control._subjects.state,\n });\n React.useEffect(() => {\n _mounted.current = true;\n _localProxyFormState.current.isValid && control._updateValid(true);\n return () => {\n _mounted.current = false;\n };\n }, [control]);\n return getProxyFormState(formState, control, _localProxyFormState.current, false);\n}\n\nvar isString = (value) => typeof value === 'string';\n\nvar generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {\n if (isString(names)) {\n isGlobal && _names.watch.add(names);\n return get(formValues, names, defaultValue);\n }\n if (Array.isArray(names)) {\n return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)));\n }\n isGlobal && (_names.watchAll = true);\n return formValues;\n};\n\n/**\n * Custom hook to subscribe to field change and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/api/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @example\n * ```tsx\n * const { watch } = useForm();\n * const values = useWatch({\n * name: \"fieldName\"\n * control,\n * })\n * ```\n */\nfunction useWatch(props) {\n const methods = useFormContext();\n const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};\n const _name = React.useRef(name);\n _name.current = name;\n useSubscribe({\n disabled,\n subject: control._subjects.values,\n next: (formState) => {\n if (shouldSubscribeByName(_name.current, formState.name, exact)) {\n updateValue(cloneObject(generateWatchOutput(_name.current, control._names, formState.values || control._formValues, false, defaultValue)));\n }\n },\n });\n const [value, updateValue] = React.useState(control._getWatch(name, defaultValue));\n React.useEffect(() => control._removeUnmounted());\n return value;\n}\n\nvar isKey = (value) => /^\\w*$/.test(value);\n\nvar stringToPath = (input) => compact(input.replace(/[\"|']|\\]/g, '').split(/\\.|\\[/));\n\nfunction set(object, path, value) {\n let index = -1;\n const tempPath = isKey(path) ? [path] : stringToPath(path);\n const length = tempPath.length;\n const lastIndex = length - 1;\n while (++index < length) {\n const key = tempPath[index];\n let newValue = value;\n if (index !== lastIndex) {\n const objValue = object[key];\n newValue =\n isObject(objValue) || Array.isArray(objValue)\n ? objValue\n : !isNaN(+tempPath[index + 1])\n ? []\n : {};\n }\n object[key] = newValue;\n object = object[key];\n }\n return object;\n}\n\n/**\n * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns field properties, field and form state. {@link UseControllerReturn}\n *\n * @example\n * ```tsx\n * function Input(props) {\n * const { field, fieldState, formState } = useController(props);\n * return (\n *
\n * \n *

{fieldState.isTouched && \"Touched\"}

\n *

{formState.isSubmitted ? \"submitted\" : \"\"}

\n *
\n * );\n * }\n * ```\n */\nfunction useController(props) {\n const methods = useFormContext();\n const { name, control = methods.control, shouldUnregister } = props;\n const isArrayField = isNameInFieldArray(control._names.array, name);\n const value = useWatch({\n control,\n name,\n defaultValue: get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)),\n exact: true,\n });\n const formState = useFormState({\n control,\n name,\n });\n const _registerProps = React.useRef(control.register(name, {\n ...props.rules,\n value,\n }));\n React.useEffect(() => {\n const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;\n const updateMounted = (name, value) => {\n const field = get(control._fields, name);\n if (field) {\n field._f.mount = value;\n }\n };\n updateMounted(name, true);\n if (_shouldUnregisterField) {\n const value = cloneObject(get(control._options.defaultValues, name));\n set(control._defaultValues, name, value);\n if (isUndefined(get(control._formValues, name))) {\n set(control._formValues, name, value);\n }\n }\n return () => {\n (isArrayField\n ? _shouldUnregisterField && !control._state.action\n : _shouldUnregisterField)\n ? control.unregister(name)\n : updateMounted(name, false);\n };\n }, [name, control, isArrayField, shouldUnregister]);\n return {\n field: {\n name,\n value,\n onChange: React.useCallback((event) => _registerProps.current.onChange({\n target: {\n value: getEventValue(event),\n name: name,\n },\n type: EVENTS.CHANGE,\n }), [name]),\n onBlur: React.useCallback(() => _registerProps.current.onBlur({\n target: {\n value: get(control._formValues, name),\n name: name,\n },\n type: EVENTS.BLUR,\n }), [name, control]),\n ref: (elm) => {\n const field = get(control._fields, name);\n if (field && elm) {\n field._f.ref = {\n focus: () => elm.focus(),\n select: () => elm.select(),\n setCustomValidity: (message) => elm.setCustomValidity(message),\n reportValidity: () => elm.reportValidity(),\n };\n }\n },\n },\n formState,\n fieldState: Object.defineProperties({}, {\n invalid: {\n enumerable: true,\n get: () => !!get(formState.errors, name),\n },\n isDirty: {\n enumerable: true,\n get: () => !!get(formState.dirtyFields, name),\n },\n isTouched: {\n enumerable: true,\n get: () => !!get(formState.touchedFields, name),\n },\n error: {\n enumerable: true,\n get: () => get(formState.errors, name),\n },\n }),\n };\n}\n\n/**\n * Component based on `useController` hook to work with controlled component.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns provide field handler functions, field and form state.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control } = useForm({\n * defaultValues: {\n * test: \"\"\n * }\n * });\n *\n * return (\n *
\n * (\n * <>\n * \n *

{formState.isSubmitted ? \"submitted\" : \"\"}

\n *

{fieldState.isTouched ? \"touched\" : \"\"}

\n * \n * )}\n * />\n * \n * );\n * }\n * ```\n */\nconst Controller = (props) => props.render(useController(props));\n\nvar appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria\n ? {\n ...errors[name],\n types: {\n ...(errors[name] && errors[name].types ? errors[name].types : {}),\n [type]: message || true,\n },\n }\n : {};\n\nconst focusFieldBy = (fields, callback, fieldsNames) => {\n for (const key of fieldsNames || Object.keys(fields)) {\n const field = get(fields, key);\n if (field) {\n const { _f, ...currentField } = field;\n if (_f && callback(_f.name)) {\n if (_f.ref.focus) {\n _f.ref.focus();\n break;\n }\n else if (_f.refs && _f.refs[0].focus) {\n _f.refs[0].focus();\n break;\n }\n }\n else if (isObject(currentField)) {\n focusFieldBy(currentField, callback);\n }\n }\n }\n};\n\nvar generateId = () => {\n const d = typeof performance === 'undefined' ? Date.now() : performance.now() * 1000;\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16 + d) % 16 | 0;\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n\nvar getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus)\n ? options.focusName ||\n `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.`\n : '';\n\nvar getValidationModes = (mode) => ({\n isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,\n isOnBlur: mode === VALIDATION_MODE.onBlur,\n isOnChange: mode === VALIDATION_MODE.onChange,\n isOnAll: mode === VALIDATION_MODE.all,\n isOnTouch: mode === VALIDATION_MODE.onTouched,\n});\n\nvar isWatched = (name, _names, isBlurEvent) => !isBlurEvent &&\n (_names.watchAll ||\n _names.watch.has(name) ||\n [..._names.watch].some((watchName) => name.startsWith(watchName) &&\n /^\\.\\w+/.test(name.slice(watchName.length))));\n\nvar updateFieldArrayRootError = (errors, error, name) => {\n const fieldArrayErrors = compact(get(errors, name));\n set(fieldArrayErrors, 'root', error[name]);\n set(errors, name, fieldArrayErrors);\n return errors;\n};\n\nvar isBoolean = (value) => typeof value === 'boolean';\n\nvar isFileInput = (element) => element.type === 'file';\n\nvar isFunction = (value) => typeof value === 'function';\n\nvar isHTMLElement = (value) => {\n if (!isWeb) {\n return false;\n }\n const owner = value ? value.ownerDocument : 0;\n return (value instanceof\n (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement));\n};\n\nvar isMessage = (value) => isString(value);\n\nvar isRadioInput = (element) => element.type === 'radio';\n\nvar isRegex = (value) => value instanceof RegExp;\n\nconst defaultResult = {\n value: false,\n isValid: false,\n};\nconst validResult = { value: true, isValid: true };\nvar getCheckboxValue = (options) => {\n if (Array.isArray(options)) {\n if (options.length > 1) {\n const values = options\n .filter((option) => option && option.checked && !option.disabled)\n .map((option) => option.value);\n return { value: values, isValid: !!values.length };\n }\n return options[0].checked && !options[0].disabled\n ? // @ts-expect-error expected to work in the browser\n options[0].attributes && !isUndefined(options[0].attributes.value)\n ? isUndefined(options[0].value) || options[0].value === ''\n ? validResult\n : { value: options[0].value, isValid: true }\n : validResult\n : defaultResult;\n }\n return defaultResult;\n};\n\nconst defaultReturn = {\n isValid: false,\n value: null,\n};\nvar getRadioValue = (options) => Array.isArray(options)\n ? options.reduce((previous, option) => option && option.checked && !option.disabled\n ? {\n isValid: true,\n value: option.value,\n }\n : previous, defaultReturn)\n : defaultReturn;\n\nfunction getValidateError(result, ref, type = 'validate') {\n if (isMessage(result) ||\n (Array.isArray(result) && result.every(isMessage)) ||\n (isBoolean(result) && !result)) {\n return {\n type,\n message: isMessage(result) ? result : '',\n ref,\n };\n }\n}\n\nvar getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData)\n ? validationData\n : {\n value: validationData,\n message: '',\n };\n\nvar validateField = async (field, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {\n const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount, disabled, } = field._f;\n const inputValue = get(formValues, name);\n if (!mount || disabled) {\n return {};\n }\n const inputRef = refs ? refs[0] : ref;\n const setCustomValidity = (message) => {\n if (shouldUseNativeValidation && inputRef.reportValidity) {\n inputRef.setCustomValidity(isBoolean(message) ? '' : message || '');\n inputRef.reportValidity();\n }\n };\n const error = {};\n const isRadio = isRadioInput(ref);\n const isCheckBox = isCheckBoxInput(ref);\n const isRadioOrCheckbox = isRadio || isCheckBox;\n const isEmpty = ((valueAsNumber || isFileInput(ref)) &&\n isUndefined(ref.value) &&\n isUndefined(inputValue)) ||\n (isHTMLElement(ref) && ref.value === '') ||\n inputValue === '' ||\n (Array.isArray(inputValue) && !inputValue.length);\n const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);\n const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {\n const message = exceedMax ? maxLengthMessage : minLengthMessage;\n error[name] = {\n type: exceedMax ? maxType : minType,\n message,\n ref,\n ...appendErrorsCurry(exceedMax ? maxType : minType, message),\n };\n };\n if (isFieldArray\n ? !Array.isArray(inputValue) || !inputValue.length\n : required &&\n ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||\n (isBoolean(inputValue) && !inputValue) ||\n (isCheckBox && !getCheckboxValue(refs).isValid) ||\n (isRadio && !getRadioValue(refs).isValid))) {\n const { value, message } = isMessage(required)\n ? { value: !!required, message: required }\n : getValueAndMessage(required);\n if (value) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.required,\n message,\n ref: inputRef,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {\n let exceedMax;\n let exceedMin;\n const maxOutput = getValueAndMessage(max);\n const minOutput = getValueAndMessage(min);\n if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {\n const valueNumber = ref.valueAsNumber ||\n (inputValue ? +inputValue : inputValue);\n if (!isNullOrUndefined(maxOutput.value)) {\n exceedMax = valueNumber > maxOutput.value;\n }\n if (!isNullOrUndefined(minOutput.value)) {\n exceedMin = valueNumber < minOutput.value;\n }\n }\n else {\n const valueDate = ref.valueAsDate || new Date(inputValue);\n const convertTimeToDate = (time) => new Date(new Date().toDateString() + ' ' + time);\n const isTime = ref.type == 'time';\n const isWeek = ref.type == 'week';\n if (isString(maxOutput.value) && inputValue) {\n exceedMax = isTime\n ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value)\n : isWeek\n ? inputValue > maxOutput.value\n : valueDate > new Date(maxOutput.value);\n }\n if (isString(minOutput.value) && inputValue) {\n exceedMin = isTime\n ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value)\n : isWeek\n ? inputValue < minOutput.value\n : valueDate < new Date(minOutput.value);\n }\n }\n if (exceedMax || exceedMin) {\n getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if ((maxLength || minLength) &&\n !isEmpty &&\n (isString(inputValue) || (isFieldArray && Array.isArray(inputValue)))) {\n const maxLengthOutput = getValueAndMessage(maxLength);\n const minLengthOutput = getValueAndMessage(minLength);\n const exceedMax = !isNullOrUndefined(maxLengthOutput.value) &&\n inputValue.length > +maxLengthOutput.value;\n const exceedMin = !isNullOrUndefined(minLengthOutput.value) &&\n inputValue.length < +minLengthOutput.value;\n if (exceedMax || exceedMin) {\n getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if (pattern && !isEmpty && isString(inputValue)) {\n const { value: patternValue, message } = getValueAndMessage(pattern);\n if (isRegex(patternValue) && !inputValue.match(patternValue)) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.pattern,\n message,\n ref,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (validate) {\n if (isFunction(validate)) {\n const result = await validate(inputValue, formValues);\n const validateError = getValidateError(result, inputRef);\n if (validateError) {\n error[name] = {\n ...validateError,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(validateError.message);\n return error;\n }\n }\n }\n else if (isObject(validate)) {\n let validationResult = {};\n for (const key in validate) {\n if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {\n break;\n }\n const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key);\n if (validateError) {\n validationResult = {\n ...validateError,\n ...appendErrorsCurry(key, validateError.message),\n };\n setCustomValidity(validateError.message);\n if (validateAllFieldCriteria) {\n error[name] = validationResult;\n }\n }\n }\n if (!isEmptyObject(validationResult)) {\n error[name] = {\n ref: inputRef,\n ...validationResult,\n };\n if (!validateAllFieldCriteria) {\n return error;\n }\n }\n }\n }\n setCustomValidity(true);\n return error;\n};\n\nfunction append(data, value) {\n return [...data, ...convertToArrayPayload(value)];\n}\n\nvar fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => undefined) : undefined;\n\nfunction insert(data, index, value) {\n return [\n ...data.slice(0, index),\n ...convertToArrayPayload(value),\n ...data.slice(index),\n ];\n}\n\nvar moveArrayAt = (data, from, to) => {\n if (!Array.isArray(data)) {\n return [];\n }\n if (isUndefined(data[to])) {\n data[to] = undefined;\n }\n data.splice(to, 0, data.splice(from, 1)[0]);\n return data;\n};\n\nfunction prepend(data, value) {\n return [...convertToArrayPayload(value), ...convertToArrayPayload(data)];\n}\n\nfunction removeAtIndexes(data, indexes) {\n let i = 0;\n const temp = [...data];\n for (const index of indexes) {\n temp.splice(index - i, 1);\n i++;\n }\n return compact(temp).length ? temp : [];\n}\nvar removeArrayAt = (data, index) => isUndefined(index)\n ? []\n : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));\n\nvar swapArrayAt = (data, indexA, indexB) => {\n data[indexA] = [data[indexB], (data[indexB] = data[indexA])][0];\n};\n\nfunction baseGet(object, updatePath) {\n const length = updatePath.slice(0, -1).length;\n let index = 0;\n while (index < length) {\n object = isUndefined(object) ? index++ : object[updatePath[index++]];\n }\n return object;\n}\nfunction isEmptyArray(obj) {\n for (const key in obj) {\n if (!isUndefined(obj[key])) {\n return false;\n }\n }\n return true;\n}\nfunction unset(object, path) {\n const paths = Array.isArray(path)\n ? path\n : isKey(path)\n ? [path]\n : stringToPath(path);\n const childObject = paths.length === 1 ? object : baseGet(object, paths);\n const index = paths.length - 1;\n const key = paths[index];\n if (childObject) {\n delete childObject[key];\n }\n if (index !== 0 &&\n ((isObject(childObject) && isEmptyObject(childObject)) ||\n (Array.isArray(childObject) && isEmptyArray(childObject)))) {\n unset(object, paths.slice(0, -1));\n }\n return object;\n}\n\nvar updateAt = (fieldValues, index, value) => {\n fieldValues[index] = value;\n return fieldValues;\n};\n\n/**\n * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)\n *\n * @remarks\n * [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)\n *\n * @param props - useFieldArray props\n *\n * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, control, handleSubmit, reset, trigger, setError } = useForm({\n * defaultValues: {\n * test: []\n * }\n * });\n * const { fields, append } = useFieldArray({\n * control,\n * name: \"test\"\n * });\n *\n * return (\n *
console.log(data))}>\n * {fields.map((item, index) => (\n * \n * ))}\n * \n * \n * \n * );\n * }\n * ```\n */\nfunction useFieldArray(props) {\n const methods = useFormContext();\n const { control = methods.control, name, keyName = 'id', shouldUnregister, } = props;\n const [fields, setFields] = React.useState(control._getFieldArray(name));\n const ids = React.useRef(control._getFieldArray(name).map(generateId));\n const _fieldIds = React.useRef(fields);\n const _name = React.useRef(name);\n const _actioned = React.useRef(false);\n _name.current = name;\n _fieldIds.current = fields;\n control._names.array.add(name);\n props.rules &&\n control.register(name, props.rules);\n useSubscribe({\n next: ({ values, name: fieldArrayName, }) => {\n if (fieldArrayName === _name.current || !fieldArrayName) {\n const fieldValues = get(values, _name.current);\n if (Array.isArray(fieldValues)) {\n setFields(fieldValues);\n ids.current = fieldValues.map(generateId);\n }\n }\n },\n subject: control._subjects.array,\n });\n const updateValues = React.useCallback((updatedFieldArrayValues) => {\n _actioned.current = true;\n control._updateFieldArray(name, updatedFieldArrayValues);\n }, [control, name]);\n const append$1 = (value, options) => {\n const appendValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = append(control._getFieldArray(name), appendValue);\n control._names.focus = getFocusFieldName(name, updatedFieldArrayValues.length - 1, options);\n ids.current = append(ids.current, appendValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, append, {\n argA: fillEmptyArray(value),\n });\n };\n const prepend$1 = (value, options) => {\n const prependValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = prepend(control._getFieldArray(name), prependValue);\n control._names.focus = getFocusFieldName(name, 0, options);\n ids.current = prepend(ids.current, prependValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, prepend, {\n argA: fillEmptyArray(value),\n });\n };\n const remove = (index) => {\n const updatedFieldArrayValues = removeArrayAt(control._getFieldArray(name), index);\n ids.current = removeArrayAt(ids.current, index);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, removeArrayAt, {\n argA: index,\n });\n };\n const insert$1 = (index, value, options) => {\n const insertValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = insert(control._getFieldArray(name), index, insertValue);\n control._names.focus = getFocusFieldName(name, index, options);\n ids.current = insert(ids.current, index, insertValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, insert, {\n argA: index,\n argB: fillEmptyArray(value),\n });\n };\n const swap = (indexA, indexB) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n swapArrayAt(updatedFieldArrayValues, indexA, indexB);\n swapArrayAt(ids.current, indexA, indexB);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, swapArrayAt, {\n argA: indexA,\n argB: indexB,\n }, false);\n };\n const move = (from, to) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n moveArrayAt(updatedFieldArrayValues, from, to);\n moveArrayAt(ids.current, from, to);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, moveArrayAt, {\n argA: from,\n argB: to,\n }, false);\n };\n const update = (index, value) => {\n const updateValue = cloneObject(value);\n const updatedFieldArrayValues = updateAt(control._getFieldArray(name), index, updateValue);\n ids.current = [...updatedFieldArrayValues].map((item, i) => !item || i === index ? generateId() : ids.current[i]);\n updateValues(updatedFieldArrayValues);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(name, updatedFieldArrayValues, updateAt, {\n argA: index,\n argB: updateValue,\n }, true, false);\n };\n const replace = (value) => {\n const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));\n ids.current = updatedFieldArrayValues.map(generateId);\n updateValues([...updatedFieldArrayValues]);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);\n };\n React.useEffect(() => {\n control._state.action = false;\n isWatched(name, control._names) &&\n control._subjects.state.next({\n ...control._formState,\n });\n if (_actioned.current &&\n (!getValidationModes(control._options.mode).isOnSubmit ||\n control._formState.isSubmitted)) {\n if (control._options.resolver) {\n control._executeSchema([name]).then((result) => {\n const error = get(result.errors, name);\n const existingError = get(control._formState.errors, name);\n if (existingError ? !error && existingError.type : error && error.type) {\n error\n ? set(control._formState.errors, name, error)\n : unset(control._formState.errors, name);\n control._subjects.state.next({\n errors: control._formState.errors,\n });\n }\n });\n }\n else {\n const field = get(control._fields, name);\n if (field && field._f) {\n validateField(field, control._formValues, control._options.criteriaMode === VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error) => !isEmptyObject(error) &&\n control._subjects.state.next({\n errors: updateFieldArrayRootError(control._formState.errors, error, name),\n }));\n }\n }\n }\n control._subjects.values.next({\n name,\n values: { ...control._formValues },\n });\n control._names.focus &&\n focusFieldBy(control._fields, (key) => !!key && key.startsWith(control._names.focus || ''));\n control._names.focus = '';\n control._updateValid();\n }, [fields, name, control]);\n React.useEffect(() => {\n !get(control._formValues, name) && control._updateFieldArray(name);\n return () => {\n (control._options.shouldUnregister || shouldUnregister) &&\n control.unregister(name);\n };\n }, [name, control, keyName, shouldUnregister]);\n return {\n swap: React.useCallback(swap, [updateValues, name, control]),\n move: React.useCallback(move, [updateValues, name, control]),\n prepend: React.useCallback(prepend$1, [updateValues, name, control]),\n append: React.useCallback(append$1, [updateValues, name, control]),\n remove: React.useCallback(remove, [updateValues, name, control]),\n insert: React.useCallback(insert$1, [updateValues, name, control]),\n update: React.useCallback(update, [updateValues, name, control]),\n replace: React.useCallback(replace, [updateValues, name, control]),\n fields: React.useMemo(() => fields.map((field, index) => ({\n ...field,\n [keyName]: ids.current[index] || generateId(),\n })), [fields, keyName]),\n };\n}\n\nfunction createSubject() {\n let _observers = [];\n const next = (value) => {\n for (const observer of _observers) {\n observer.next && observer.next(value);\n }\n };\n const subscribe = (observer) => {\n _observers.push(observer);\n return {\n unsubscribe: () => {\n _observers = _observers.filter((o) => o !== observer);\n },\n };\n };\n const unsubscribe = () => {\n _observers = [];\n };\n return {\n get observers() {\n return _observers;\n },\n next,\n subscribe,\n unsubscribe,\n };\n}\n\nvar isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);\n\nfunction deepEqual(object1, object2) {\n if (isPrimitive(object1) || isPrimitive(object2)) {\n return object1 === object2;\n }\n if (isDateObject(object1) && isDateObject(object2)) {\n return object1.getTime() === object2.getTime();\n }\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n if (keys1.length !== keys2.length) {\n return false;\n }\n for (const key of keys1) {\n const val1 = object1[key];\n if (!keys2.includes(key)) {\n return false;\n }\n if (key !== 'ref') {\n const val2 = object2[key];\n if ((isDateObject(val1) && isDateObject(val2)) ||\n (isObject(val1) && isObject(val2)) ||\n (Array.isArray(val1) && Array.isArray(val2))\n ? !deepEqual(val1, val2)\n : val1 !== val2) {\n return false;\n }\n }\n }\n return true;\n}\n\nvar isMultipleSelect = (element) => element.type === `select-multiple`;\n\nvar isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);\n\nvar live = (ref) => isHTMLElement(ref) && ref.isConnected;\n\nvar objectHasFunction = (data) => {\n for (const key in data) {\n if (isFunction(data[key])) {\n return true;\n }\n }\n return false;\n};\n\nfunction markFieldsDirty(data, fields = {}) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n fields[key] = Array.isArray(data[key]) ? [] : {};\n markFieldsDirty(data[key], fields[key]);\n }\n else if (!isNullOrUndefined(data[key])) {\n fields[key] = true;\n }\n }\n }\n return fields;\n}\nfunction getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n if (isUndefined(formValues) ||\n isPrimitive(dirtyFieldsFromValues[key])) {\n dirtyFieldsFromValues[key] = Array.isArray(data[key])\n ? markFieldsDirty(data[key], [])\n : { ...markFieldsDirty(data[key]) };\n }\n else {\n getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);\n }\n }\n else {\n dirtyFieldsFromValues[key] = !deepEqual(data[key], formValues[key]);\n }\n }\n }\n return dirtyFieldsFromValues;\n}\nvar getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues));\n\nvar getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value)\n ? value\n : valueAsNumber\n ? value === ''\n ? NaN\n : value\n ? +value\n : value\n : valueAsDate && isString(value)\n ? new Date(value)\n : setValueAs\n ? setValueAs(value)\n : value;\n\nfunction getFieldValue(_f) {\n const ref = _f.ref;\n if (_f.refs ? _f.refs.every((ref) => ref.disabled) : ref.disabled) {\n return;\n }\n if (isFileInput(ref)) {\n return ref.files;\n }\n if (isRadioInput(ref)) {\n return getRadioValue(_f.refs).value;\n }\n if (isMultipleSelect(ref)) {\n return [...ref.selectedOptions].map(({ value }) => value);\n }\n if (isCheckBoxInput(ref)) {\n return getCheckboxValue(_f.refs).value;\n }\n return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);\n}\n\nvar getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {\n const fields = {};\n for (const name of fieldsNames) {\n const field = get(_fields, name);\n field && set(fields, name, field._f);\n }\n return {\n criteriaMode,\n names: [...fieldsNames],\n fields,\n shouldUseNativeValidation,\n };\n};\n\nvar getRuleValue = (rule) => isUndefined(rule)\n ? rule\n : isRegex(rule)\n ? rule.source\n : isObject(rule)\n ? isRegex(rule.value)\n ? rule.value.source\n : rule.value\n : rule;\n\nvar hasValidation = (options) => options.mount &&\n (options.required ||\n options.min ||\n options.max ||\n options.maxLength ||\n options.minLength ||\n options.pattern ||\n options.validate);\n\nfunction schemaErrorLookup(errors, _fields, name) {\n const error = get(errors, name);\n if (error || isKey(name)) {\n return {\n error,\n name,\n };\n }\n const names = name.split('.');\n while (names.length) {\n const fieldName = names.join('.');\n const field = get(_fields, fieldName);\n const foundError = get(errors, fieldName);\n if (field && !Array.isArray(field) && name !== fieldName) {\n return { name };\n }\n if (foundError && foundError.type) {\n return {\n name: fieldName,\n error: foundError,\n };\n }\n names.pop();\n }\n return {\n name,\n };\n}\n\nvar skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {\n if (mode.isOnAll) {\n return false;\n }\n else if (!isSubmitted && mode.isOnTouch) {\n return !(isTouched || isBlurEvent);\n }\n else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {\n return !isBlurEvent;\n }\n else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {\n return isBlurEvent;\n }\n return true;\n};\n\nvar unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name);\n\nconst defaultOptions = {\n mode: VALIDATION_MODE.onSubmit,\n reValidateMode: VALIDATION_MODE.onChange,\n shouldFocusError: true,\n};\nfunction createFormControl(props = {}, flushRootRender) {\n let _options = {\n ...defaultOptions,\n ...props,\n };\n let _formState = {\n submitCount: 0,\n isDirty: false,\n isLoading: isFunction(_options.defaultValues),\n isValidating: false,\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n touchedFields: {},\n dirtyFields: {},\n errors: {},\n };\n let _fields = {};\n let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)\n ? cloneObject(_options.defaultValues || _options.values) || {}\n : {};\n let _formValues = _options.shouldUnregister\n ? {}\n : cloneObject(_defaultValues);\n let _state = {\n action: false,\n mount: false,\n watch: false,\n };\n let _names = {\n mount: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n };\n let delayErrorCallback;\n let timer = 0;\n const _proxyFormState = {\n isDirty: false,\n dirtyFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n };\n const _subjects = {\n values: createSubject(),\n array: createSubject(),\n state: createSubject(),\n };\n const shouldCaptureDirtyFields = props.resetOptions && props.resetOptions.keepDirtyValues;\n const validationModeBeforeSubmit = getValidationModes(_options.mode);\n const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);\n const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;\n const debounce = (callback) => (wait) => {\n clearTimeout(timer);\n timer = setTimeout(callback, wait);\n };\n const _updateValid = async (shouldUpdateValid) => {\n if (_proxyFormState.isValid || shouldUpdateValid) {\n const isValid = _options.resolver\n ? isEmptyObject((await _executeSchema()).errors)\n : await executeBuiltInValidation(_fields, true);\n if (isValid !== _formState.isValid) {\n _subjects.state.next({\n isValid,\n });\n }\n }\n };\n const _updateIsValidating = (value) => _proxyFormState.isValidating &&\n _subjects.state.next({\n isValidating: value,\n });\n const _updateFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {\n if (args && method) {\n _state.action = true;\n if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {\n const fieldValues = method(get(_fields, name), args.argA, args.argB);\n shouldSetValues && set(_fields, name, fieldValues);\n }\n if (shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.errors, name))) {\n const errors = method(get(_formState.errors, name), args.argA, args.argB);\n shouldSetValues && set(_formState.errors, name, errors);\n unsetEmptyArray(_formState.errors, name);\n }\n if (_proxyFormState.touchedFields &&\n shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.touchedFields, name))) {\n const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);\n shouldSetValues && set(_formState.touchedFields, name, touchedFields);\n }\n if (_proxyFormState.dirtyFields) {\n _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues);\n }\n _subjects.state.next({\n name,\n isDirty: _getDirty(name, values),\n dirtyFields: _formState.dirtyFields,\n errors: _formState.errors,\n isValid: _formState.isValid,\n });\n }\n else {\n set(_formValues, name, values);\n }\n };\n const updateErrors = (name, error) => {\n set(_formState.errors, name, error);\n _subjects.state.next({\n errors: _formState.errors,\n });\n };\n const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {\n const field = get(_fields, name);\n if (field) {\n const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);\n isUndefined(defaultValue) ||\n (ref && ref.defaultChecked) ||\n shouldSkipSetValueAs\n ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f))\n : setFieldValue(name, defaultValue);\n _state.mount && _updateValid();\n }\n };\n const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {\n let shouldUpdateField = false;\n let isPreviousDirty = false;\n const output = {\n name,\n };\n if (!isBlurEvent || shouldDirty) {\n if (_proxyFormState.isDirty) {\n isPreviousDirty = _formState.isDirty;\n _formState.isDirty = output.isDirty = _getDirty();\n shouldUpdateField = isPreviousDirty !== output.isDirty;\n }\n const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);\n isPreviousDirty = get(_formState.dirtyFields, name);\n isCurrentFieldPristine\n ? unset(_formState.dirtyFields, name)\n : set(_formState.dirtyFields, name, true);\n output.dirtyFields = _formState.dirtyFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.dirtyFields &&\n isPreviousDirty !== !isCurrentFieldPristine);\n }\n if (isBlurEvent) {\n const isPreviousFieldTouched = get(_formState.touchedFields, name);\n if (!isPreviousFieldTouched) {\n set(_formState.touchedFields, name, isBlurEvent);\n output.touchedFields = _formState.touchedFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.touchedFields &&\n isPreviousFieldTouched !== isBlurEvent);\n }\n }\n shouldUpdateField && shouldRender && _subjects.state.next(output);\n return shouldUpdateField ? output : {};\n };\n const shouldRenderByError = (name, isValid, error, fieldState) => {\n const previousFieldError = get(_formState.errors, name);\n const shouldUpdateValid = _proxyFormState.isValid &&\n isBoolean(isValid) &&\n _formState.isValid !== isValid;\n if (props.delayError && error) {\n delayErrorCallback = debounce(() => updateErrors(name, error));\n delayErrorCallback(props.delayError);\n }\n else {\n clearTimeout(timer);\n delayErrorCallback = null;\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) ||\n !isEmptyObject(fieldState) ||\n shouldUpdateValid) {\n const updatedFormState = {\n ...fieldState,\n ...(shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}),\n errors: _formState.errors,\n name,\n };\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n _subjects.state.next(updatedFormState);\n }\n _updateIsValidating(false);\n };\n const _executeSchema = async (name) => _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));\n const executeSchemaAndUpdateState = async (names) => {\n const { errors } = await _executeSchema();\n if (names) {\n for (const name of names) {\n const error = get(errors, name);\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n }\n else {\n _formState.errors = errors;\n }\n return errors;\n };\n const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = {\n valid: true,\n }) => {\n for (const name in fields) {\n const field = fields[name];\n if (field) {\n const { _f, ...fieldValue } = field;\n if (_f) {\n const isFieldArrayRoot = _names.array.has(_f.name);\n const fieldError = await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);\n if (fieldError[_f.name]) {\n context.valid = false;\n if (shouldOnlyCheckValid) {\n break;\n }\n }\n !shouldOnlyCheckValid &&\n (get(fieldError, _f.name)\n ? isFieldArrayRoot\n ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name)\n : set(_formState.errors, _f.name, fieldError[_f.name])\n : unset(_formState.errors, _f.name));\n }\n fieldValue &&\n (await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context));\n }\n }\n return context.valid;\n };\n const _removeUnmounted = () => {\n for (const name of _names.unMount) {\n const field = get(_fields, name);\n field &&\n (field._f.refs\n ? field._f.refs.every((ref) => !live(ref))\n : !live(field._f.ref)) &&\n unregister(name);\n }\n _names.unMount = new Set();\n };\n const _getDirty = (name, data) => (name && data && set(_formValues, name, data),\n !deepEqual(getValues(), _defaultValues));\n const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {\n ...(_state.mount\n ? _formValues\n : isUndefined(defaultValue)\n ? _defaultValues\n : isString(names)\n ? { [names]: defaultValue }\n : defaultValue),\n }, isGlobal, defaultValue);\n const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, props.shouldUnregister ? get(_defaultValues, name, []) : []));\n const setFieldValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n let fieldValue = value;\n if (field) {\n const fieldReference = field._f;\n if (fieldReference) {\n !fieldReference.disabled &&\n set(_formValues, name, getFieldValueAs(value, fieldReference));\n fieldValue =\n isHTMLElement(fieldReference.ref) && isNullOrUndefined(value)\n ? ''\n : value;\n if (isMultipleSelect(fieldReference.ref)) {\n [...fieldReference.ref.options].forEach((optionRef) => (optionRef.selected = fieldValue.includes(optionRef.value)));\n }\n else if (fieldReference.refs) {\n if (isCheckBoxInput(fieldReference.ref)) {\n fieldReference.refs.length > 1\n ? fieldReference.refs.forEach((checkboxRef) => (!checkboxRef.defaultChecked || !checkboxRef.disabled) &&\n (checkboxRef.checked = Array.isArray(fieldValue)\n ? !!fieldValue.find((data) => data === checkboxRef.value)\n : fieldValue === checkboxRef.value))\n : fieldReference.refs[0] &&\n (fieldReference.refs[0].checked = !!fieldValue);\n }\n else {\n fieldReference.refs.forEach((radioRef) => (radioRef.checked = radioRef.value === fieldValue));\n }\n }\n else if (isFileInput(fieldReference.ref)) {\n fieldReference.ref.value = '';\n }\n else {\n fieldReference.ref.value = fieldValue;\n if (!fieldReference.ref.type) {\n _subjects.values.next({\n name,\n values: { ..._formValues },\n });\n }\n }\n }\n }\n (options.shouldDirty || options.shouldTouch) &&\n updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true);\n options.shouldValidate && trigger(name);\n };\n const setValues = (name, value, options) => {\n for (const fieldKey in value) {\n const fieldValue = value[fieldKey];\n const fieldName = `${name}.${fieldKey}`;\n const field = get(_fields, fieldName);\n (_names.array.has(name) ||\n !isPrimitive(fieldValue) ||\n (field && !field._f)) &&\n !isDateObject(fieldValue)\n ? setValues(fieldName, fieldValue, options)\n : setFieldValue(fieldName, fieldValue, options);\n }\n };\n const setValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n const isFieldArray = _names.array.has(name);\n const cloneValue = cloneObject(value);\n set(_formValues, name, cloneValue);\n if (isFieldArray) {\n _subjects.array.next({\n name,\n values: { ..._formValues },\n });\n if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields) &&\n options.shouldDirty) {\n _subjects.state.next({\n name,\n dirtyFields: getDirtyFields(_defaultValues, _formValues),\n isDirty: _getDirty(name, cloneValue),\n });\n }\n }\n else {\n field && !field._f && !isNullOrUndefined(cloneValue)\n ? setValues(name, cloneValue, options)\n : setFieldValue(name, cloneValue, options);\n }\n isWatched(name, _names) && _subjects.state.next({ ..._formState });\n _subjects.values.next({\n name,\n values: { ..._formValues },\n });\n !_state.mount && flushRootRender();\n };\n const onChange = async (event) => {\n const target = event.target;\n let name = target.name;\n let isFieldValueUpdated = true;\n const field = get(_fields, name);\n const getCurrentFieldValue = () => target.type ? getFieldValue(field._f) : getEventValue(event);\n if (field) {\n let error;\n let isValid;\n const fieldValue = getCurrentFieldValue();\n const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;\n const shouldSkipValidation = (!hasValidation(field._f) &&\n !_options.resolver &&\n !get(_formState.errors, name) &&\n !field._f.deps) ||\n skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit);\n const watched = isWatched(name, _names, isBlurEvent);\n set(_formValues, name, fieldValue);\n if (isBlurEvent) {\n field._f.onBlur && field._f.onBlur(event);\n delayErrorCallback && delayErrorCallback(0);\n }\n else if (field._f.onChange) {\n field._f.onChange(event);\n }\n const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent, false);\n const shouldRender = !isEmptyObject(fieldState) || watched;\n !isBlurEvent &&\n _subjects.values.next({\n name,\n type: event.type,\n values: { ..._formValues },\n });\n if (shouldSkipValidation) {\n _proxyFormState.isValid && _updateValid();\n return (shouldRender &&\n _subjects.state.next({ name, ...(watched ? {} : fieldState) }));\n }\n !isBlurEvent && watched && _subjects.state.next({ ..._formState });\n _updateIsValidating(true);\n if (_options.resolver) {\n const { errors } = await _executeSchema([name]);\n const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);\n const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);\n error = errorLookupResult.error;\n name = errorLookupResult.name;\n isValid = isEmptyObject(errors);\n }\n else {\n error = (await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];\n isFieldValueUpdated =\n isNaN(fieldValue) ||\n fieldValue === get(_formValues, name, fieldValue);\n if (isFieldValueUpdated) {\n if (error) {\n isValid = false;\n }\n else if (_proxyFormState.isValid) {\n isValid = await executeBuiltInValidation(_fields, true);\n }\n }\n }\n if (isFieldValueUpdated) {\n field._f.deps &&\n trigger(field._f.deps);\n shouldRenderByError(name, isValid, error, fieldState);\n }\n }\n };\n const trigger = async (name, options = {}) => {\n let isValid;\n let validationResult;\n const fieldNames = convertToArrayPayload(name);\n _updateIsValidating(true);\n if (_options.resolver) {\n const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);\n isValid = isEmptyObject(errors);\n validationResult = name\n ? !fieldNames.some((name) => get(errors, name))\n : isValid;\n }\n else if (name) {\n validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {\n const field = get(_fields, fieldName);\n return await executeBuiltInValidation(field && field._f ? { [fieldName]: field } : field);\n }))).every(Boolean);\n !(!validationResult && !_formState.isValid) && _updateValid();\n }\n else {\n validationResult = isValid = await executeBuiltInValidation(_fields);\n }\n _subjects.state.next({\n ...(!isString(name) ||\n (_proxyFormState.isValid && isValid !== _formState.isValid)\n ? {}\n : { name }),\n ...(_options.resolver || !name ? { isValid } : {}),\n errors: _formState.errors,\n isValidating: false,\n });\n options.shouldFocus &&\n !validationResult &&\n focusFieldBy(_fields, (key) => key && get(_formState.errors, key), name ? fieldNames : _names.mount);\n return validationResult;\n };\n const getValues = (fieldNames) => {\n const values = {\n ..._defaultValues,\n ...(_state.mount ? _formValues : {}),\n };\n return isUndefined(fieldNames)\n ? values\n : isString(fieldNames)\n ? get(values, fieldNames)\n : fieldNames.map((name) => get(values, name));\n };\n const getFieldState = (name, formState) => ({\n invalid: !!get((formState || _formState).errors, name),\n isDirty: !!get((formState || _formState).dirtyFields, name),\n isTouched: !!get((formState || _formState).touchedFields, name),\n error: get((formState || _formState).errors, name),\n });\n const clearErrors = (name) => {\n name &&\n convertToArrayPayload(name).forEach((inputName) => unset(_formState.errors, inputName));\n _subjects.state.next({\n errors: name ? _formState.errors : {},\n });\n };\n const setError = (name, error, options) => {\n const ref = (get(_fields, name, { _f: {} })._f || {}).ref;\n set(_formState.errors, name, {\n ...error,\n ref,\n });\n _subjects.state.next({\n name,\n errors: _formState.errors,\n isValid: false,\n });\n options && options.shouldFocus && ref && ref.focus && ref.focus();\n };\n const watch = (name, defaultValue) => isFunction(name)\n ? _subjects.values.subscribe({\n next: (payload) => name(_getWatch(undefined, defaultValue), payload),\n })\n : _getWatch(name, defaultValue, true);\n const unregister = (name, options = {}) => {\n for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {\n _names.mount.delete(fieldName);\n _names.array.delete(fieldName);\n if (!options.keepValue) {\n unset(_fields, fieldName);\n unset(_formValues, fieldName);\n }\n !options.keepError && unset(_formState.errors, fieldName);\n !options.keepDirty && unset(_formState.dirtyFields, fieldName);\n !options.keepTouched && unset(_formState.touchedFields, fieldName);\n !_options.shouldUnregister &&\n !options.keepDefaultValue &&\n unset(_defaultValues, fieldName);\n }\n _subjects.values.next({\n values: { ..._formValues },\n });\n _subjects.state.next({\n ..._formState,\n ...(!options.keepDirty ? {} : { isDirty: _getDirty() }),\n });\n !options.keepIsValid && _updateValid();\n };\n const register = (name, options = {}) => {\n let field = get(_fields, name);\n const disabledIsDefined = isBoolean(options.disabled);\n set(_fields, name, {\n ...(field || {}),\n _f: {\n ...(field && field._f ? field._f : { ref: { name } }),\n name,\n mount: true,\n ...options,\n },\n });\n _names.mount.add(name);\n field\n ? disabledIsDefined &&\n set(_formValues, name, options.disabled\n ? undefined\n : get(_formValues, name, getFieldValue(field._f)))\n : updateValidAndValue(name, true, options.value);\n return {\n ...(disabledIsDefined ? { disabled: options.disabled } : {}),\n ...(_options.shouldUseNativeValidation\n ? {\n required: !!options.required,\n min: getRuleValue(options.min),\n max: getRuleValue(options.max),\n minLength: getRuleValue(options.minLength),\n maxLength: getRuleValue(options.maxLength),\n pattern: getRuleValue(options.pattern),\n }\n : {}),\n name,\n onChange,\n onBlur: onChange,\n ref: (ref) => {\n if (ref) {\n register(name, options);\n field = get(_fields, name);\n const fieldRef = isUndefined(ref.value)\n ? ref.querySelectorAll\n ? ref.querySelectorAll('input,select,textarea')[0] || ref\n : ref\n : ref;\n const radioOrCheckbox = isRadioOrCheckbox(fieldRef);\n const refs = field._f.refs || [];\n if (radioOrCheckbox\n ? refs.find((option) => option === fieldRef)\n : fieldRef === field._f.ref) {\n return;\n }\n set(_fields, name, {\n _f: {\n ...field._f,\n ...(radioOrCheckbox\n ? {\n refs: [\n ...refs.filter(live),\n fieldRef,\n ...(Array.isArray(get(_defaultValues, name)) ? [{}] : []),\n ],\n ref: { type: fieldRef.type, name },\n }\n : { ref: fieldRef }),\n },\n });\n updateValidAndValue(name, false, undefined, fieldRef);\n }\n else {\n field = get(_fields, name, {});\n if (field._f) {\n field._f.mount = false;\n }\n (_options.shouldUnregister || options.shouldUnregister) &&\n !(isNameInFieldArray(_names.array, name) && _state.action) &&\n _names.unMount.add(name);\n }\n },\n };\n };\n const _focusError = () => _options.shouldFocusError &&\n focusFieldBy(_fields, (key) => key && get(_formState.errors, key), _names.mount);\n const handleSubmit = (onValid, onInvalid) => async (e) => {\n if (e) {\n e.preventDefault && e.preventDefault();\n e.persist && e.persist();\n }\n let fieldValues = cloneObject(_formValues);\n _subjects.state.next({\n isSubmitting: true,\n });\n if (_options.resolver) {\n const { errors, values } = await _executeSchema();\n _formState.errors = errors;\n fieldValues = values;\n }\n else {\n await executeBuiltInValidation(_fields);\n }\n unset(_formState.errors, 'root');\n if (isEmptyObject(_formState.errors)) {\n _subjects.state.next({\n errors: {},\n });\n await onValid(fieldValues, e);\n }\n else {\n if (onInvalid) {\n await onInvalid({ ..._formState.errors }, e);\n }\n _focusError();\n setTimeout(_focusError);\n }\n _subjects.state.next({\n isSubmitted: true,\n isSubmitting: false,\n isSubmitSuccessful: isEmptyObject(_formState.errors),\n submitCount: _formState.submitCount + 1,\n errors: _formState.errors,\n });\n };\n const resetField = (name, options = {}) => {\n if (get(_fields, name)) {\n if (isUndefined(options.defaultValue)) {\n setValue(name, get(_defaultValues, name));\n }\n else {\n setValue(name, options.defaultValue);\n set(_defaultValues, name, options.defaultValue);\n }\n if (!options.keepTouched) {\n unset(_formState.touchedFields, name);\n }\n if (!options.keepDirty) {\n unset(_formState.dirtyFields, name);\n _formState.isDirty = options.defaultValue\n ? _getDirty(name, get(_defaultValues, name))\n : _getDirty();\n }\n if (!options.keepError) {\n unset(_formState.errors, name);\n _proxyFormState.isValid && _updateValid();\n }\n _subjects.state.next({ ..._formState });\n }\n };\n const _reset = (formValues, keepStateOptions = {}) => {\n const updatedValues = formValues || _defaultValues;\n const cloneUpdatedValues = cloneObject(updatedValues);\n const values = formValues && !isEmptyObject(formValues)\n ? cloneUpdatedValues\n : _defaultValues;\n if (!keepStateOptions.keepDefaultValues) {\n _defaultValues = updatedValues;\n }\n if (!keepStateOptions.keepValues) {\n if (keepStateOptions.keepDirtyValues || shouldCaptureDirtyFields) {\n for (const fieldName of _names.mount) {\n get(_formState.dirtyFields, fieldName)\n ? set(values, fieldName, get(_formValues, fieldName))\n : setValue(fieldName, get(values, fieldName));\n }\n }\n else {\n if (isWeb && isUndefined(formValues)) {\n for (const name of _names.mount) {\n const field = get(_fields, name);\n if (field && field._f) {\n const fieldReference = Array.isArray(field._f.refs)\n ? field._f.refs[0]\n : field._f.ref;\n if (isHTMLElement(fieldReference)) {\n const form = fieldReference.closest('form');\n if (form) {\n form.reset();\n break;\n }\n }\n }\n }\n }\n _fields = {};\n }\n _formValues = props.shouldUnregister\n ? keepStateOptions.keepDefaultValues\n ? cloneObject(_defaultValues)\n : {}\n : cloneUpdatedValues;\n _subjects.array.next({\n values: { ...values },\n });\n _subjects.values.next({\n values: { ...values },\n });\n }\n _names = {\n mount: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n watchAll: false,\n focus: '',\n };\n !_state.mount && flushRootRender();\n _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid;\n _state.watch = !!props.shouldUnregister;\n _subjects.state.next({\n submitCount: keepStateOptions.keepSubmitCount\n ? _formState.submitCount\n : 0,\n isDirty: keepStateOptions.keepDirty\n ? _formState.isDirty\n : !!(keepStateOptions.keepDefaultValues &&\n !deepEqual(formValues, _defaultValues)),\n isSubmitted: keepStateOptions.keepIsSubmitted\n ? _formState.isSubmitted\n : false,\n dirtyFields: keepStateOptions.keepDirtyValues\n ? _formState.dirtyFields\n : keepStateOptions.keepDefaultValues && formValues\n ? getDirtyFields(_defaultValues, formValues)\n : {},\n touchedFields: keepStateOptions.keepTouched\n ? _formState.touchedFields\n : {},\n errors: keepStateOptions.keepErrors ? _formState.errors : {},\n isSubmitting: false,\n isSubmitSuccessful: false,\n });\n };\n const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)\n ? formValues(_formValues)\n : formValues, keepStateOptions);\n const setFocus = (name, options = {}) => {\n const field = get(_fields, name);\n const fieldReference = field && field._f;\n if (fieldReference) {\n const fieldRef = fieldReference.refs\n ? fieldReference.refs[0]\n : fieldReference.ref;\n if (fieldRef.focus) {\n fieldRef.focus();\n options.shouldSelect && fieldRef.select();\n }\n }\n };\n const _updateFormState = (updatedFormState) => {\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n };\n const _resetDefaultValues = () => isFunction(_options.defaultValues) &&\n _options.defaultValues().then((values) => {\n reset(values, _options.resetOptions);\n _subjects.state.next({\n isLoading: false,\n });\n });\n return {\n control: {\n register,\n unregister,\n getFieldState,\n _executeSchema,\n _getWatch,\n _getDirty,\n _updateValid,\n _removeUnmounted,\n _updateFieldArray,\n _getFieldArray,\n _reset,\n _resetDefaultValues,\n _updateFormState,\n _subjects,\n _proxyFormState,\n get _fields() {\n return _fields;\n },\n get _formValues() {\n return _formValues;\n },\n get _state() {\n return _state;\n },\n set _state(value) {\n _state = value;\n },\n get _defaultValues() {\n return _defaultValues;\n },\n get _names() {\n return _names;\n },\n set _names(value) {\n _names = value;\n },\n get _formState() {\n return _formState;\n },\n set _formState(value) {\n _formState = value;\n },\n get _options() {\n return _options;\n },\n set _options(value) {\n _options = {\n ..._options,\n ...value,\n };\n },\n },\n trigger,\n register,\n handleSubmit,\n watch,\n setValue,\n getValues,\n reset,\n resetField,\n clearErrors,\n unregister,\n setError,\n setFocus,\n getFieldState,\n };\n}\n\n/**\n * Custom hook to manage the entire form.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)\n *\n * @param props - form configuration and validation parameters.\n *\n * @returns methods - individual functions to manage the form state. {@link UseFormReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, watch, formState: { errors } } = useForm();\n * const onSubmit = data => console.log(data);\n *\n * console.log(watch(\"example\"));\n *\n * return (\n *
\n * \n * \n * {errors.exampleRequired && This field is required}\n * \n * \n * );\n * }\n * ```\n */\nfunction useForm(props = {}) {\n const _formControl = React.useRef();\n const [formState, updateFormState] = React.useState({\n isDirty: false,\n isValidating: false,\n isLoading: isFunction(props.defaultValues),\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n submitCount: 0,\n dirtyFields: {},\n touchedFields: {},\n errors: {},\n defaultValues: isFunction(props.defaultValues)\n ? undefined\n : props.defaultValues,\n });\n if (!_formControl.current) {\n _formControl.current = {\n ...createFormControl(props, () => updateFormState((formState) => ({ ...formState }))),\n formState,\n };\n }\n const control = _formControl.current.control;\n control._options = props;\n useSubscribe({\n subject: control._subjects.state,\n next: (value) => {\n if (shouldRenderFormState(value, control._proxyFormState, control._updateFormState, true)) {\n updateFormState({ ...control._formState });\n }\n },\n });\n React.useEffect(() => {\n if (props.values && !deepEqual(props.values, control._defaultValues)) {\n control._reset(props.values, control._options.resetOptions);\n }\n else {\n control._resetDefaultValues();\n }\n }, [props.values, control]);\n React.useEffect(() => {\n if (!control._state.mount) {\n control._updateValid();\n control._state.mount = true;\n }\n if (control._state.watch) {\n control._state.watch = false;\n control._subjects.state.next({ ...control._formState });\n }\n control._removeUnmounted();\n });\n _formControl.current.formState = getProxyFormState(formState, control);\n return _formControl.current;\n}\n\nexport { Controller, FormProvider, appendErrors, get, set, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };\n//# sourceMappingURL=index.esm.mjs.map\n","import { Index } from 'flexsearch';\nimport { useState } from 'react';\nimport DebouncedInput from './DebouncedInput';\nimport { useForm } from 'react-hook-form';\n\nexport function Catalog({\n datasets,\n facets,\n}: {\n datasets: any[];\n facets: string[];\n}) {\n const [indexFilter, setIndexFilter] = useState('');\n const index = new Index({ tokenize: 'full' });\n datasets.forEach((dataset) =>\n index.add(\n dataset._id,\n //This will join every metadata value + the url_path into one big string and index that\n Object.entries(dataset.metadata).reduce(\n (acc, curr) => acc + ' ' + curr[1].toString(),\n ''\n ) +\n ' ' +\n dataset.url_path\n )\n );\n\n const facetValues = facets\n ? facets.reduce((acc, facet) => {\n const possibleValues = datasets.reduce((acc, curr) => {\n const facetValue = curr.metadata[facet];\n if (facetValue) {\n return Array.isArray(facetValue)\n ? acc.concat(facetValue)\n : acc.concat([facetValue]);\n }\n return acc;\n }, []);\n acc[facet] = {\n possibleValues: [...new Set(possibleValues)],\n selectedValue: null,\n };\n return acc;\n }, {})\n : [];\n\n const { register, watch } = useForm(facetValues);\n\n const filteredDatasets = datasets\n // First filter by flex search\n .filter((dataset) =>\n indexFilter !== ''\n ? index.search(indexFilter).includes(dataset._id)\n : true\n )\n //Then check if the selectedValue for the given facet is included in the dataset metadata\n .filter((dataset) => {\n //Avoids a server rendering breakage\n if (!watch() || Object.keys(watch()).length === 0) return true\n //This will filter only the key pairs of the metadata values that were selected as facets\n const datasetFacets = Object.entries(dataset.metadata).filter((entry) =>\n facets.includes(entry[0])\n );\n //Check if the value present is included in the selected value in the form\n return datasetFacets.every((elem) =>\n watch()[elem[0]].selectedValue\n ? (elem[1] as string | string[]).includes(\n watch()[elem[0]].selectedValue\n )\n : true\n );\n });\n\n return (\n <>\n setIndexFilter(String(value))}\n className=\"p-2 text-sm shadow border border-block mr-1\"\n placeholder=\"Search all datasets...\"\n />\n {Object.entries(facetValues).map((elem) => (\n \n \n {(elem[1] as { possibleValues: string[] }).possibleValues.map(\n (val) => (\n \n {val}\n \n )\n )}\n \n ))}\n \n \n );\n}\n\n"],"names":["a","b","c","d","e","f","g","h","k","m","n","w","q","r","l","p","z","B","A","y","H","X","pa","R","this","element","value","event","name","names","tempObject","prototypeCopy","data","copy","isArray","key","val","obj","path","defaultValue","result","formState","control","localProxyFormState","isRoot","_key","formStateData","_proxyFormState","updateFormState","props","_props","subscription","_names","formValues","isGlobal","fieldName","input","object","index","tempPath","length","lastIndex","newValue","objValue","validateAllFieldCriteria","errors","type","message","fields","callback","fieldsNames","field","_f","currentField","mode","isBlurEvent","watchName","error","fieldArrayErrors","owner","options","values","option","previous","ref","validationData","shouldUseNativeValidation","isFieldArray","refs","required","maxLength","minLength","min","max","pattern","validate","valueAsNumber","mount","disabled","inputValue","inputRef","setCustomValidity","isRadio","isCheckBox","isRadioOrCheckbox","isEmpty","appendErrorsCurry","getMinMaxMessage","exceedMax","maxLengthMessage","minLengthMessage","maxType","minType","exceedMin","maxOutput","minOutput","valueNumber","valueDate","convertTimeToDate","time","isTime","isWeek","maxLengthOutput","minLengthOutput","patternValue","validateError","validationResult","updatePath","paths","childObject","_observers","observer","object1","object2","keys1","keys2","val1","val2","isParentNodeArray","dirtyFieldsFromValues","defaultValues","valueAsDate","setValueAs","_fields","criteriaMode","rule","foundError","isTouched","isSubmitted","reValidateMode","flushRootRender","_options","_formState","_defaultValues","_formValues","_state","delayErrorCallback","timer","_subjects","shouldCaptureDirtyFields","validationModeBeforeSubmit","validationModeAfterSubmit","shouldDisplayAllAssociatedErrors","debounce","wait","_updateValid","shouldUpdateValid","isValid","_executeSchema","executeBuiltInValidation","_updateIsValidating","_updateFieldArray","method","args","shouldSetValues","shouldUpdateFieldsAndState","fieldValues","touchedFields","_getDirty","updateErrors","updateValidAndValue","shouldSkipSetValueAs","setFieldValue","updateTouchAndDirty","fieldValue","shouldDirty","shouldRender","shouldUpdateField","isPreviousDirty","output","isCurrentFieldPristine","isPreviousFieldTouched","shouldRenderByError","fieldState","previousFieldError","updatedFormState","executeSchemaAndUpdateState","shouldOnlyCheckValid","context","isFieldArrayRoot","fieldError","_removeUnmounted","unregister","getValues","_getWatch","_getFieldArray","fieldReference","optionRef","checkboxRef","radioRef","trigger","setValues","fieldKey","setValue","cloneValue","onChange","target","isFieldValueUpdated","getCurrentFieldValue","shouldSkipValidation","watched","previousErrorLookupResult","errorLookupResult","fieldNames","getFieldState","clearErrors","inputName","setError","watch","payload","register","disabledIsDefined","fieldRef","radioOrCheckbox","_focusError","handleSubmit","onValid","onInvalid","resetField","_reset","keepStateOptions","updatedValues","cloneUpdatedValues","form","reset","_formControl","datasets","facets","indexFilter","setIndexFilter","useState","Index","dataset","acc","curr","facetValues","facet","possibleValues","acc2","facetValue","filteredDatasets","entry","elem","jsxs","Fragment","jsx"],"mappings":"0UAOC,SAAS,GAAG,KAAK,CAAc,GAAG,CAAI,SAAO,KAAK,OAAM,OAAO,EAAN,CAAQ,CAAE,KAAK,SAAS,GAAG,IAAI,EAAE,SAAS,EAAEA,EAAE,CAAC,OAAoB,OAAOA,EAArB,IAAuBA,EAAE,EAAE,CAAC,SAAS,GAAGA,EAAE,CAAC,MAAMC,EAAE,MAAMD,CAAC,EAAE,QAAQE,EAAE,EAAEA,EAAEF,EAAEE,IAAID,EAAEC,CAAC,EAAE,EAAC,EAAG,OAAOD,CAAC,CAAC,SAAS,GAAG,CAAC,OAAO,OAAO,OAAO,IAAI,CAAC,CAAC,SAAS,GAAGD,EAAEC,EAAE,CAAC,OAAOA,EAAE,OAAOD,EAAE,MAAM,CAAC,SAAS,EAAEA,EAAE,CAAC,OAAiB,OAAOA,GAAlB,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AAjB,GAAA,GACuB,SAAA9N,GAAA+N,EAAA,OAAA/N,CAAA,CAAA,EAC2B,UAAA,8CACvC,YAAA,wBACE,CAAA,EACd,OAAA,QAAAqO,CAAA,EAAA,IAAAO,GAAAC,kBAAA,KAEE,SAAC,CAAA,aAAA,GAEc,UAAA,8CACH,GAAAjC,EAAAgC,EAAA,CAAA,EAAA,gBAAA,EAC6B,SAAA,CAEvCC,kBAAAA,KAAA,SAAA,CAAA,MAAA,GAAA,SAAA,CAAiB,aAAAD,EAAA,CAAA,CACE,EAAA,EACnBA,EAAA,CAAA,EAAA,eAAA,IAC0DlO,GAAAqO,kBAAA,IAEtD,SAAC,CAAA,UAAA,gCAEW,MAAArO,EACH,SAAAA,CAEN,EAAAA,CAJI,CAKP,CAEJ,CAAA,EAAAkO,EAAA,CAAA,CAlBW,CAAA,EAoBdG,kBAAA,IAAA,KAAA,CAAA,UAAA,2BAAA,SAAAL,EAAA,IAAAR,GAAAa,kBAAA,IAAA,KAAA,CAAA,UAAA,OAAA,SAAAA,kBAAAA,IAAA,IAAA,CAAA,UAAA,wBAAA,KAAAb,EAAA,SAAA,SAAAA,EAAA,SAAA,MAAAA,EAAA,SAAA,MAAAA,EAAA,QAAA,CAAA,CAAA,EAAAA,EAAA,GAAA,CAAA,EAAA,CAWD,CAAA,CAAA,CAGN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/packages/components/storybook-static/assets/Color-3YIJY6X7-f33052fb.js b/packages/components/storybook-static/assets/Color-3YIJY6X7-f33052fb.js deleted file mode 100644 index 0e0603f11..000000000 --- a/packages/components/storybook-static/assets/Color-3YIJY6X7-f33052fb.js +++ /dev/null @@ -1,2 +0,0 @@ -import{e as M,W as ue,T as Me,F as Ce,I as $e,g as Ne}from"./index-89936ab1.js";import{R as h,r as b}from"./index-8db94870.js";import{g as fe}from"./_commonjsHelpers-042e6b4d.js";import{J as Oe,r as J,V as Ie}from"./index-6e6be2d5.js";import"./iframe-1eda5ccb.js";import"../sb-preview/runtime.js";import"./index-d475d2ea.js";import"./isNativeReflectConstruct-099dc9ad.js";import"./index-8ce4a492.js";import"./index-d37d4223.js";import"./index-356e4a49.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=0/0,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:k}):null)},gn=tn;export{tn as ColorControl,gn as default}; -//# sourceMappingURL=Color-3YIJY6X7-f33052fb.js.map diff --git a/packages/components/storybook-static/assets/Color-3YIJY6X7-f33052fb.js.map b/packages/components/storybook-static/assets/Color-3YIJY6X7-f33052fb.js.map deleted file mode 100644 index daa0f099c..000000000 --- a/packages/components/storybook-static/assets/Color-3YIJY6X7-f33052fb.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Color-3YIJY6X7-f33052fb.js","sources":["../../node_modules/react-colorful/dist/index.mjs","../../node_modules/color-name/index.js","../../node_modules/color-convert/conversions.js","../../node_modules/color-convert/route.js","../../node_modules/color-convert/index.js","../../node_modules/lodash/now.js","../../node_modules/lodash/_trimmedEndIndex.js","../../node_modules/lodash/_baseTrim.js","../../node_modules/lodash/toNumber.js","../../node_modules/lodash/debounce.js","../../node_modules/lodash/throttle.js","../../node_modules/@storybook/blocks/dist/Color-3YIJY6X7.mjs"],"sourcesContent":["import e,{useRef as r,useMemo as t,useEffect as n,useState as o,useCallback as a,useLayoutEffect as l}from\"react\";function u(){return(u=Object.assign||function(e){for(var r=1;r=0||(o[t]=e[t]);return o}function i(e){var t=r(e),n=r(function(e){t.current&&t.current(e)});return t.current=e,n.current}var s=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=1),e>t?t:e0:e.buttons>0)&&m.current?g(d(m.current,e,b.current)):t(!1)},r=function(){return t(!1)};function t(t){var n=_.current,o=v(m.current),a=t?o.addEventListener:o.removeEventListener;a(n?\"touchmove\":\"mousemove\",e),a(n?\"touchend\":\"mouseup\",r)}return[function(e){var r=e.nativeEvent,n=m.current;if(n&&(h(r),!function(e,r){return r&&!f(e)}(r,_.current)&&n)){if(f(r)){_.current=!0;var o=r.changedTouches||[];o.length&&(b.current=o[0].identifier)}n.focus(),g(d(n,r,b.current)),t(!0)}},function(e){var r=e.which||e.keyCode;r<37||r>40||(e.preventDefault(),p({left:39===r?.05:37===r?-.05:0,top:40===r?.05:38===r?-.05:0}))},t]},[p,g]),C=x[0],E=x[1],H=x[2];return n(function(){return H},[H]),e.createElement(\"div\",u({},s,{onTouchStart:C,onMouseDown:C,className:\"react-colorful__interactive\",ref:m,onKeyDown:E,tabIndex:0,role:\"slider\"}))}),g=function(e){return e.filter(Boolean).join(\" \")},p=function(r){var t=r.color,n=r.left,o=r.top,a=void 0===o?.5:o,l=g([\"react-colorful__pointer\",r.className]);return e.createElement(\"div\",{className:l,style:{top:100*a+\"%\",left:100*n+\"%\"}},e.createElement(\"div\",{className:\"react-colorful__pointer-fill\",style:{backgroundColor:t}}))},b=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=Math.pow(10,r)),Math.round(t*e)/t},_={grad:.9,turn:360,rad:360/(2*Math.PI)},x=function(e){return L(C(e))},C=function(e){return\"#\"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?b(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?b(parseInt(e.substring(6,8),16)/255,2):1}},E=function(e,r){return void 0===r&&(r=\"deg\"),Number(e)*(_[r]||1)},H=function(e){var r=/hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?N({h:E(r[1],r[2]),s:Number(r[3]),l:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},M=H,N=function(e){var r=e.s,t=e.l;return{h:e.h,s:(r*=(t<50?t:100-t)/100)>0?2*r/(t+r)*100:0,v:t+r,a:e.a}},w=function(e){return K(I(e))},y=function(e){var r=e.s,t=e.v,n=e.a,o=(200-r)*t/100;return{h:b(e.h),s:b(o>0&&o<200?r*t/100/(o<=100?o:200-o)*100:0),l:b(o/2),a:b(n,2)}},q=function(e){var r=y(e);return\"hsl(\"+r.h+\", \"+r.s+\"%, \"+r.l+\"%)\"},k=function(e){var r=y(e);return\"hsla(\"+r.h+\", \"+r.s+\"%, \"+r.l+\"%, \"+r.a+\")\"},I=function(e){var r=e.h,t=e.s,n=e.v,o=e.a;r=r/360*6,t/=100,n/=100;var a=Math.floor(r),l=n*(1-t),u=n*(1-(r-a)*t),c=n*(1-(1-r+a)*t),i=a%6;return{r:b(255*[n,u,l,l,c,n][i]),g:b(255*[c,n,n,u,l,l][i]),b:b(255*[l,l,c,n,n,u][i]),a:b(o,2)}},O=function(e){var r=/hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?A({h:E(r[1],r[2]),s:Number(r[3]),v:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},j=O,z=function(e){var r=/rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?L({r:Number(r[1])/(r[2]?100/255:1),g:Number(r[3])/(r[4]?100/255:1),b:Number(r[5])/(r[6]?100/255:1),a:void 0===r[7]?1:Number(r[7])/(r[8]?100:1)}):{h:0,s:0,v:0,a:1}},B=z,D=function(e){var r=e.toString(16);return r.length<2?\"0\"+r:r},K=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=o<1?D(b(255*o)):\"\";return\"#\"+D(r)+D(t)+D(n)+a},L=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=Math.max(r,t,n),l=a-Math.min(r,t,n),u=l?a===r?(t-n)/l:a===t?2+(n-r)/l:4+(r-t)/l:0;return{h:b(60*(u<0?u+6:u)),s:b(a?l/a*100:0),v:b(a/255*100),a:o}},A=function(e){return{h:b(e.h),s:b(e.s),v:b(e.v),a:b(e.a,2)}},S=e.memo(function(r){var t=r.hue,n=r.onChange,o=g([\"react-colorful__hue\",r.className]);return e.createElement(\"div\",{className:o},e.createElement(m,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:s(t+360*e.left,0,360)})},\"aria-label\":\"Hue\",\"aria-valuenow\":b(t),\"aria-valuemax\":\"360\",\"aria-valuemin\":\"0\"},e.createElement(p,{className:\"react-colorful__hue-pointer\",left:t/360,color:q({h:t,s:100,v:100,a:1})})))}),T=e.memo(function(r){var t=r.hsva,n=r.onChange,o={backgroundColor:q({h:t.h,s:100,v:100,a:1})};return e.createElement(\"div\",{className:\"react-colorful__saturation\",style:o},e.createElement(m,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:s(t.s+100*e.left,0,100),v:s(t.v-100*e.top,0,100)})},\"aria-label\":\"Color\",\"aria-valuetext\":\"Saturation \"+b(t.s)+\"%, Brightness \"+b(t.v)+\"%\"},e.createElement(p,{className:\"react-colorful__saturation-pointer\",top:1-t.v/100,left:t.s/100,color:q(t)})))}),F=function(e,r){if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},P=function(e,r){return e.replace(/\\s/g,\"\")===r.replace(/\\s/g,\"\")},X=function(e,r){return e.toLowerCase()===r.toLowerCase()||F(C(e),C(r))};function Y(e,t,l){var u=i(l),c=o(function(){return e.toHsva(t)}),s=c[0],f=c[1],v=r({color:t,hsva:s});n(function(){if(!e.equal(t,v.current.color)){var r=e.toHsva(t);v.current={hsva:r,color:t},f(r)}},[t,e]),n(function(){var r;F(s,v.current.hsva)||e.equal(r=e.fromHsva(s),v.current.color)||(v.current={hsva:s,color:r},u(r))},[s,e,u]);var d=a(function(e){f(function(r){return Object.assign({},r,e)})},[]);return[s,d]}var R,V=\"undefined\"!=typeof window?l:n,$=function(){return R||(\"undefined\"!=typeof __webpack_nonce__?__webpack_nonce__:void 0)},G=function(e){R=e},J=new Map,Q=function(e){V(function(){var r=e.current?e.current.ownerDocument:document;if(void 0!==r&&!J.has(r)){var t=r.createElement(\"style\");t.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\\'data:image/svg+xml;charset=utf-8,\\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',J.set(r,t);var n=$();n&&t.setAttribute(\"nonce\",n),r.head.appendChild(t)}},[])},U=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,[\"className\",\"colorModel\",\"color\",\"onChange\"]),f=r(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g([\"react-colorful\",n]);return e.createElement(\"div\",u({},s,{ref:f,className:m}),e.createElement(T,{hsva:d,onChange:h}),e.createElement(S,{hue:d.h,onChange:h,className:\"react-colorful__last-control\"}))},W={defaultColor:\"000\",toHsva:x,fromHsva:function(e){return w({h:e.h,s:e.s,v:e.v,a:1})},equal:X},Z=function(r){return e.createElement(U,u({},r,{colorModel:W}))},ee=function(r){var t=r.className,n=r.hsva,o=r.onChange,a={backgroundImage:\"linear-gradient(90deg, \"+k(Object.assign({},n,{a:0}))+\", \"+k(Object.assign({},n,{a:1}))+\")\"},l=g([\"react-colorful__alpha\",t]),u=b(100*n.a);return e.createElement(\"div\",{className:l},e.createElement(\"div\",{className:\"react-colorful__alpha-gradient\",style:a}),e.createElement(m,{onMove:function(e){o({a:e.left})},onKey:function(e){o({a:s(n.a+e.left)})},\"aria-label\":\"Alpha\",\"aria-valuetext\":u+\"%\",\"aria-valuenow\":u,\"aria-valuemin\":\"0\",\"aria-valuemax\":\"100\"},e.createElement(p,{className:\"react-colorful__alpha-pointer\",left:n.a,color:k(n)})))},re=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,[\"className\",\"colorModel\",\"color\",\"onChange\"]),f=r(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g([\"react-colorful\",n]);return e.createElement(\"div\",u({},s,{ref:f,className:m}),e.createElement(T,{hsva:d,onChange:h}),e.createElement(S,{hue:d.h,onChange:h}),e.createElement(ee,{hsva:d,onChange:h,className:\"react-colorful__last-control\"}))},te={defaultColor:\"0001\",toHsva:x,fromHsva:w,equal:X},ne=function(r){return e.createElement(re,u({},r,{colorModel:te}))},oe={defaultColor:{h:0,s:0,l:0,a:1},toHsva:N,fromHsva:y,equal:F},ae=function(r){return e.createElement(re,u({},r,{colorModel:oe}))},le={defaultColor:\"hsla(0, 0%, 0%, 1)\",toHsva:H,fromHsva:k,equal:P},ue=function(r){return e.createElement(re,u({},r,{colorModel:le}))},ce={defaultColor:{h:0,s:0,l:0},toHsva:function(e){return N({h:e.h,s:e.s,l:e.l,a:1})},fromHsva:function(e){return{h:(r=y(e)).h,s:r.s,l:r.l};var r},equal:F},ie=function(r){return e.createElement(U,u({},r,{colorModel:ce}))},se={defaultColor:\"hsl(0, 0%, 0%)\",toHsva:M,fromHsva:q,equal:P},fe=function(r){return e.createElement(U,u({},r,{colorModel:se}))},ve={defaultColor:{h:0,s:0,v:0,a:1},toHsva:function(e){return e},fromHsva:A,equal:F},de=function(r){return e.createElement(re,u({},r,{colorModel:ve}))},he={defaultColor:\"hsva(0, 0%, 0%, 1)\",toHsva:O,fromHsva:function(e){var r=A(e);return\"hsva(\"+r.h+\", \"+r.s+\"%, \"+r.v+\"%, \"+r.a+\")\"},equal:P},me=function(r){return e.createElement(re,u({},r,{colorModel:he}))},ge={defaultColor:{h:0,s:0,v:0},toHsva:function(e){return{h:e.h,s:e.s,v:e.v,a:1}},fromHsva:function(e){var r=A(e);return{h:r.h,s:r.s,v:r.v}},equal:F},pe=function(r){return e.createElement(U,u({},r,{colorModel:ge}))},be={defaultColor:\"hsv(0, 0%, 0%)\",toHsva:j,fromHsva:function(e){var r=A(e);return\"hsv(\"+r.h+\", \"+r.s+\"%, \"+r.v+\"%)\"},equal:P},_e=function(r){return e.createElement(U,u({},r,{colorModel:be}))},xe={defaultColor:{r:0,g:0,b:0,a:1},toHsva:L,fromHsva:I,equal:F},Ce=function(r){return e.createElement(re,u({},r,{colorModel:xe}))},Ee={defaultColor:\"rgba(0, 0, 0, 1)\",toHsva:z,fromHsva:function(e){var r=I(e);return\"rgba(\"+r.r+\", \"+r.g+\", \"+r.b+\", \"+r.a+\")\"},equal:P},He=function(r){return e.createElement(re,u({},r,{colorModel:Ee}))},Me={defaultColor:{r:0,g:0,b:0},toHsva:function(e){return L({r:e.r,g:e.g,b:e.b,a:1})},fromHsva:function(e){return{r:(r=I(e)).r,g:r.g,b:r.b};var r},equal:F},Ne=function(r){return e.createElement(U,u({},r,{colorModel:Me}))},we={defaultColor:\"rgb(0, 0, 0)\",toHsva:B,fromHsva:function(e){var r=I(e);return\"rgb(\"+r.r+\", \"+r.g+\", \"+r.b+\")\"},equal:P},ye=function(r){return e.createElement(U,u({},r,{colorModel:we}))},qe=/^#?([0-9A-F]{3,8})$/i,ke=function(r){var t=r.color,l=void 0===t?\"\":t,s=r.onChange,f=r.onBlur,v=r.escape,d=r.validate,h=r.format,m=r.process,g=c(r,[\"color\",\"onChange\",\"onBlur\",\"escape\",\"validate\",\"format\",\"process\"]),p=o(function(){return v(l)}),b=p[0],_=p[1],x=i(s),C=i(f),E=a(function(e){var r=v(e.target.value);_(r),d(r)&&x(m?m(r):r)},[v,m,d,x]),H=a(function(e){d(e.target.value)||_(v(l)),C(e)},[l,v,d,C]);return n(function(){_(v(l))},[l,v]),e.createElement(\"input\",u({},g,{value:h?h(b):b,spellCheck:\"false\",onChange:E,onBlur:H}))},Ie=function(e){return\"#\"+e},Oe=function(r){var t=r.prefixed,n=r.alpha,o=c(r,[\"prefixed\",\"alpha\"]),l=a(function(e){return e.replace(/([^0-9A-F]+)/gi,\"\").substring(0,n?8:6)},[n]),i=a(function(e){return function(e,r){var t=qe.exec(e),n=t?t[1].length:0;return 3===n||6===n||!!r&&4===n||!!r&&8===n}(e,n)},[n]);return e.createElement(ke,u({},o,{escape:l,format:t?Ie:void 0,process:Ie,validate:i}))};export{ne as HexAlphaColorPicker,Oe as HexColorInput,Z as HexColorPicker,ie as HslColorPicker,fe as HslStringColorPicker,ae as HslaColorPicker,ue as HslaStringColorPicker,pe as HsvColorPicker,_e as HsvStringColorPicker,de as HsvaColorPicker,me as HsvaStringColorPicker,Ne as RgbColorPicker,ye as RgbStringColorPicker,Ce as RgbaColorPicker,He as RgbaStringColorPicker,G as setNonce};\n//# sourceMappingURL=index.module.js.map\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","import { getControlId } from './chunk-GWAJ4KRU.mjs';\nimport React, { useCallback, useState, useEffect, useMemo } from 'react';\nimport { HexColorPicker, RgbaStringColorPicker, HslaStringColorPicker } from 'react-colorful';\nimport convert from 'color-convert';\nimport throttle from 'lodash/throttle.js';\nimport { styled } from '@storybook/theming';\nimport { WithTooltip, TooltipNote, Form, Icons } from '@storybook/components';\n\nvar Wrapper=styled.div({position:\"relative\",maxWidth:250}),PickerTooltip=styled(WithTooltip)({position:\"absolute\",zIndex:1,top:4,left:4}),TooltipContent=styled.div({width:200,margin:5,\".react-colorful__saturation\":{borderRadius:\"4px 4px 0 0\"},\".react-colorful__hue\":{boxShadow:\"inset 0 0 0 1px rgb(0 0 0 / 5%)\"},\".react-colorful__last-control\":{borderRadius:\"0 0 4px 4px\"}}),Note=styled(TooltipNote)(({theme})=>({fontFamily:theme.typography.fonts.base})),Swatches=styled.div({display:\"grid\",gridTemplateColumns:\"repeat(9, 16px)\",gap:6,padding:3,marginTop:5,width:200}),SwatchColor=styled.div(({theme,active})=>({width:16,height:16,boxShadow:active?`${theme.appBorderColor} 0 0 0 1px inset, ${theme.textMutedColor}50 0 0 0 4px`:`${theme.appBorderColor} 0 0 0 1px inset`,borderRadius:theme.appBorderRadius})),swatchBackground=`url('data:image/svg+xml;charset=utf-8,')`,Swatch=({value,active,onClick,style,...props})=>{let backgroundImage=`linear-gradient(${value}, ${value}), ${swatchBackground}, linear-gradient(#fff, #fff)`;return React.createElement(SwatchColor,{...props,active,onClick,style:{...style,backgroundImage}})},Input=styled(Form.Input)(({theme})=>({width:\"100%\",paddingLeft:30,paddingRight:30,boxSizing:\"border-box\",fontFamily:theme.typography.fonts.base})),ToggleIcon=styled(Icons)(({theme})=>({position:\"absolute\",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:\"border-box\",cursor:\"pointer\",color:theme.input.color})),ColorSpace=(ColorSpace2=>(ColorSpace2.RGB=\"rgb\",ColorSpace2.HSL=\"hsl\",ColorSpace2.HEX=\"hex\",ColorSpace2))(ColorSpace||{}),COLOR_SPACES=Object.values(ColorSpace),COLOR_REGEXP=/\\(([0-9]+),\\s*([0-9]+)%?,\\s*([0-9]+)%?,?\\s*([0-9.]+)?\\)/,RGB_REGEXP=/^\\s*rgba?\\(([0-9]+),\\s*([0-9]+),\\s*([0-9]+),?\\s*([0-9.]+)?\\)\\s*$/i,HSL_REGEXP=/^\\s*hsla?\\(([0-9]+),\\s*([0-9]+)%,\\s*([0-9]+)%,?\\s*([0-9.]+)?\\)\\s*$/i,HEX_REGEXP=/^\\s*#?([0-9a-f]{3}|[0-9a-f]{6})\\s*$/i,SHORTHEX_REGEXP=/^\\s*#?([0-9a-f]{3})\\s*$/i,ColorPicker={[\"hex\"]:HexColorPicker,[\"rgb\"]:RgbaStringColorPicker,[\"hsl\"]:HslaStringColorPicker},fallbackColor={[\"hex\"]:\"transparent\",[\"rgb\"]:\"rgba(0, 0, 0, 0)\",[\"hsl\"]:\"hsla(0, 0%, 0%, 0)\"},stringToArgs=value=>{let match=value?.match(COLOR_REGEXP);if(!match)return [0,0,0,1];let[,x,y,z,a=1]=match;return [x,y,z,a].map(Number)},parseValue=value=>{if(!value)return;let valid=!0;if(RGB_REGEXP.test(value)){let[r,g,b,a]=stringToArgs(value),[h,s,l]=convert.rgb.hsl([r,g,b])||[0,0,0];return {valid,value,keyword:convert.rgb.keyword([r,g,b]),colorSpace:\"rgb\",[\"rgb\"]:value,[\"hsl\"]:`hsla(${h}, ${s}%, ${l}%, ${a})`,[\"hex\"]:`#${convert.rgb.hex([r,g,b]).toLowerCase()}`}}if(HSL_REGEXP.test(value)){let[h,s,l,a]=stringToArgs(value),[r,g,b]=convert.hsl.rgb([h,s,l])||[0,0,0];return {valid,value,keyword:convert.hsl.keyword([h,s,l]),colorSpace:\"hsl\",[\"rgb\"]:`rgba(${r}, ${g}, ${b}, ${a})`,[\"hsl\"]:value,[\"hex\"]:`#${convert.hsl.hex([h,s,l]).toLowerCase()}`}}let plain=value.replace(\"#\",\"\"),rgb=convert.keyword.rgb(plain)||convert.hex.rgb(plain),hsl=convert.rgb.hsl(rgb),mapped=value;if(/[^#a-f0-9]/i.test(value)?mapped=plain:HEX_REGEXP.test(value)&&(mapped=`#${plain}`),mapped.startsWith(\"#\"))valid=HEX_REGEXP.test(mapped);else try{convert.keyword.hex(mapped);}catch{valid=!1;}return {valid,value:mapped,keyword:convert.rgb.keyword(rgb),colorSpace:\"hex\",[\"rgb\"]:`rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, 1)`,[\"hsl\"]:`hsla(${hsl[0]}, ${hsl[1]}%, ${hsl[2]}%, 1)`,[\"hex\"]:mapped}},getRealValue=(value,color,colorSpace)=>{if(!value||!color?.valid)return fallbackColor[colorSpace];if(colorSpace!==\"hex\")return color?.[colorSpace]||fallbackColor[colorSpace];if(!color.hex.startsWith(\"#\"))try{return `#${convert.keyword.hex(color.hex)}`}catch{return fallbackColor.hex}let short=color.hex.match(SHORTHEX_REGEXP);if(!short)return HEX_REGEXP.test(color.hex)?color.hex:fallbackColor.hex;let[r,g,b]=short[1].split(\"\");return `#${r}${r}${g}${g}${b}${b}`},useColorInput=(initialValue,onChange)=>{let[value,setValue]=useState(initialValue||\"\"),[color,setColor]=useState(()=>parseValue(value)),[colorSpace,setColorSpace]=useState(color?.colorSpace||\"hex\");useEffect(()=>{let nextValue=initialValue||\"\",nextColor=parseValue(nextValue);setValue(nextValue),setColor(nextColor),setColorSpace(nextColor?.colorSpace||\"hex\");},[initialValue]);let realValue=useMemo(()=>getRealValue(value,color,colorSpace).toLowerCase(),[value,color,colorSpace]),updateValue=useCallback(update=>{let parsed=parseValue(update),v=parsed?.value||update||\"\";setValue(v),v===\"\"&&(setColor(void 0),onChange(void 0)),parsed&&(setColor(parsed),setColorSpace(parsed.colorSpace),onChange(parsed.value));},[onChange]),cycleColorSpace=useCallback(()=>{let next=COLOR_SPACES.indexOf(colorSpace)+1;next>=COLOR_SPACES.length&&(next=0),setColorSpace(COLOR_SPACES[next]);let update=color?.[COLOR_SPACES[next]]||\"\";setValue(update),onChange(update);},[color,colorSpace,onChange]);return {value,realValue,updateValue,color,colorSpace,cycleColorSpace}},id=value=>value.replace(/\\s*/,\"\").toLowerCase(),usePresets=(presetColors,currentColor,colorSpace)=>{let[selectedColors,setSelectedColors]=useState(currentColor?.valid?[currentColor]:[]);useEffect(()=>{currentColor===void 0&&setSelectedColors([]);},[currentColor]);let presets=useMemo(()=>(presetColors||[]).map(preset=>typeof preset==\"string\"?parseValue(preset):preset.title?{...parseValue(preset.color),keyword:preset.title}:parseValue(preset.color)).concat(selectedColors).filter(Boolean).slice(-27),[presetColors,selectedColors]),addPreset=useCallback(color=>{color?.valid&&(presets.some(preset=>id(preset[colorSpace])===id(color[colorSpace]))||setSelectedColors(arr=>arr.concat(color)));},[colorSpace,presets]);return {presets,addPreset}},ColorControl=({name,value:initialValue,onChange,onFocus,onBlur,presetColors,startOpen=!1})=>{let throttledOnChange=useCallback(throttle(onChange,200),[onChange]),{value,realValue,updateValue,color,colorSpace,cycleColorSpace}=useColorInput(initialValue,throttledOnChange),{presets,addPreset}=usePresets(presetColors,color,colorSpace),Picker=ColorPicker[colorSpace];return React.createElement(Wrapper,null,React.createElement(PickerTooltip,{startOpen,closeOnOutsideClick:!0,onVisibleChange:()=>addPreset(color),tooltip:React.createElement(TooltipContent,null,React.createElement(Picker,{color:realValue===\"transparent\"?\"#000000\":realValue,onChange:updateValue,onFocus,onBlur}),presets.length>0&&React.createElement(Swatches,null,presets.map((preset,index)=>React.createElement(WithTooltip,{key:`${preset.value}-${index}`,hasChrome:!1,tooltip:React.createElement(Note,{note:preset.keyword||preset.value})},React.createElement(Swatch,{value:preset[colorSpace],active:color&&id(preset[colorSpace])===id(color[colorSpace]),onClick:()=>updateValue(preset.value)})))))},React.createElement(Swatch,{value:realValue,style:{margin:4}})),React.createElement(Input,{id:getControlId(name),value,onChange:e=>updateValue(e.target.value),onFocus:e=>e.target.select(),placeholder:\"Choose color...\"}),value?React.createElement(ToggleIcon,{icon:\"markup\",onClick:cycleColorSpace}):null)},Color_default=ColorControl;\n\nexport { ColorControl, Color_default as default };\n"],"names":["u","r","t","n","c","i","e","s","f","v","d","h","m","o","a","l","g","p","b","_","x","C","E","H","L","N","w","K","I","y","q","k","z","D","S","T","F","P","X","Y","V","$","J","Q","U","W","Z","ee","re","le","ue","Ee","He","colorName","cssKeywords","require$$0","reverseKeywords","key","convert","conversions","model","channels","labels","rgb","min","max","delta","rdif","gdif","bdif","diff","diffc","comparativeDistance","reversed","currentClosestDistance","currentClosestKeyword","keyword","value","distance","xyz","hsl","t2","t3","val","t1","smin","lmin","sv","hsv","hi","vmin","sl","hwb","wh","bl","ratio","cmyk","lab","y2","x2","z2","lch","hr","args","saturation","ansi","color","mult","rem","string","match","colorString","char","integer","chroma","grayscale","hue","hcg","pure","mg","apple","gray","buildGraph","graph","models","len","deriveBFS","fromModel","queue","current","adjacents","adjacent","node","link","from","to","wrapConversion","toModel","path","fn","cur","route","conversion","require$$1","wrapRaw","wrappedFn","arg0","wrapRounded","result","routes","colorConvert","root","now","now_1","reWhitespace","trimmedEndIndex","index","_trimmedEndIndex","reTrimStart","baseTrim","_baseTrim","isObject","isSymbol","require$$2","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","other","isBinary","toNumber_1","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","debounce_1","throttle","throttle_1","Wrapper","styled","PickerTooltip","WithTooltip","TooltipContent","Note","TooltipNote","theme","Swatches","SwatchColor","active","swatchBackground","Swatch","onClick","style","props","backgroundImage","React","Input","Form","ToggleIcon","Icons","ColorSpace","ColorSpace2","COLOR_SPACES","COLOR_REGEXP","RGB_REGEXP","HSL_REGEXP","HEX_REGEXP","SHORTHEX_REGEXP","ColorPicker","HexColorPicker","RgbaStringColorPicker","HslaStringColorPicker","fallbackColor","stringToArgs","parseValue","valid","plain","mapped","getRealValue","colorSpace","short","useColorInput","initialValue","onChange","setValue","useState","setColor","setColorSpace","useEffect","nextValue","nextColor","realValue","useMemo","updateValue","useCallback","update","parsed","cycleColorSpace","next","id","usePresets","presetColors","currentColor","selectedColors","setSelectedColors","presets","preset","addPreset","arr","ColorControl","name","onFocus","onBlur","startOpen","throttledOnChange","Picker","getControlId","Color_default"],"mappings":"wcAAkH,SAASA,GAAG,CAAC,OAAOA,EAAE,OAAO,QAAQ,SAAS,EAAE,CAAC,QAAQC,EAAE,EAAEA,EAAE,UAAU,OAAOA,IAAI,CAAC,IAAIC,EAAE,UAAUD,CAAC,EAAE,QAAQE,KAAKD,EAAE,OAAO,UAAU,eAAe,KAAKA,EAAEC,CAAC,IAAI,EAAEA,CAAC,EAAED,EAAEC,CAAC,GAAG,OAAO,CAAC,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,SAASC,EAAE,EAAEH,EAAE,CAAC,GAAS,GAAN,KAAQ,MAAM,CAAE,EAAC,IAAIC,EAAEC,EAAE,EAAE,CAAA,EAAG,EAAE,OAAO,KAAK,CAAC,EAAE,IAAIA,EAAE,EAAEA,EAAE,EAAE,OAAOA,IAAIF,EAAE,QAAQC,EAAE,EAAEC,CAAC,CAAC,GAAG,IAAI,EAAED,CAAC,EAAE,EAAEA,CAAC,GAAG,OAAO,CAAC,CAAC,SAASG,EAAE,EAAE,CAAC,IAAI,EAAEJ,EAAAA,OAAE,CAAC,EAAE,EAAEA,EA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AAM,cAAcb,GAAe,KAAKa,EAAM,cAAc4D,EAAO,CAAC,MAAMxB,IAAY,cAAc,UAAUA,EAAU,SAASE,EAAY,QAAAkB,EAAQ,OAAAC,CAAM,CAAC,EAAEP,EAAQ,OAAO,GAAGlD,EAAM,cAAcT,GAAS,KAAK2D,EAAQ,IAAI,CAACC,EAAOvH,IAAQoE,EAAM,cAAcd,GAAY,CAAC,IAAI,GAAGiE,EAAO,SAASvH,IAAQ,UAAU,GAAG,QAAQoE,EAAM,cAAcZ,GAAK,CAAC,KAAK+D,EAAO,SAASA,EAAO,KAAK,CAAC,CAAC,EAAEnD,EAAM,cAAcL,GAAO,CAAC,MAAMwD,EAAO3B,CAAU,EAAE,OAAO9I,GAAOkK,EAAGO,EAAO3B,CAAU,CAAC,IAAIoB,EAAGlK,EAAM8I,CAAU,CAAC,EAAE,QAAQ,IAAIc,EAAYa,EAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAEnD,EAAM,cAAcL,GAAO,CAAC,MAAMyC,EAAU,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAEpC,EAAM,cAAcC,GAAM,CAAC,GAAG4D,GAAaN,CAAI,EAAE,MAAA1M,EAAM,SAASvE,GAAGgQ,EAAYhQ,EAAE,OAAO,KAAK,EAAE,QAAQA,GAAGA,EAAE,OAAO,OAAQ,EAAC,YAAY,iBAAiB,CAAC,EAAEuE,EAAMmJ,EAAM,cAAcG,GAAW,CAAC,KAAK,SAAS,QAAQuC,CAAe,CAAC,EAAE,IAAI,CAAC,EAAEoB,GAAcR","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11]} \ No newline at end of file diff --git a/packages/components/storybook-static/assets/DebouncedInput-c720676c.js b/packages/components/storybook-static/assets/DebouncedInput-c720676c.js deleted file mode 100644 index ecf377b86..000000000 --- a/packages/components/storybook-static/assets/DebouncedInput-c720676c.js +++ /dev/null @@ -1,2 +0,0 @@ -import{j as p}from"./jsx-runtime-94f6e698.js";import{r as u}from"./index-8db94870.js";const a=({value:e,onChange:o,debounce:s=500,...c})=>{const[t,r]=u.useState(e);return u.useEffect(()=>{r(e)},[e]),u.useEffect(()=>{const n=setTimeout(()=>{o(t)},s);return()=>clearTimeout(n)},[t]),p.jsx("input",{...c,value:t,onChange:n=>r(n.target.value)})};try{a.displayName="DebouncedInput",a.__docgenInfo={description:"",displayName:"DebouncedInput",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"any"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"any"}},debounce:{defaultValue:{value:"500"},description:"",name:"debounce",required:!1,type:{name:"number"}}}}}catch{}export{a as D}; -//# sourceMappingURL=DebouncedInput-c720676c.js.map diff --git a/packages/components/storybook-static/assets/DebouncedInput-c720676c.js.map b/packages/components/storybook-static/assets/DebouncedInput-c720676c.js.map deleted file mode 100644 index 9027671c4..000000000 --- a/packages/components/storybook-static/assets/DebouncedInput-c720676c.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DebouncedInput-c720676c.js","sources":["../../src/components/DebouncedInput.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nconst DebouncedInput = ({\n value: initialValue,\n onChange,\n debounce = 500,\n ...props\n}) => {\n const [value, setValue] = useState(initialValue);\n\n useEffect(() => {\n setValue(initialValue);\n }, [initialValue]);\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n onChange(value);\n }, debounce);\n\n return () => clearTimeout(timeout);\n }, [value]);\n\n return (\n setValue(e.target.value)}\n />\n );\n};\n\nexport default DebouncedInput;\n"],"names":["DebouncedInput","initialValue","onChange","debounce","props","value","setValue","useState","useEffect","timeout","jsx","e"],"mappings":"sFAEA,MAAAA,EAAA,CAAA,CAAwB,MAAAC,EACf,SAAAC,EACP,SAAAC,EAAA,IACW,GAAAC,CAEb,IAAA,CACE,KAAA,CAAAC,EAAAC,CAAA,EAAAC,EAAA,SAAAN,CAAA,EAEAO,OAAAA,EAAAA,UAAA,IAAA,CACEF,EAAAL,CAAA,CAAqB,EAAA,CAAAA,CAAA,CAAA,EAGvBO,EAAAA,UAAA,IAAA,CACE,MAAAC,EAAA,WAAA,IAAA,CACEP,EAAAG,CAAA,CAAc,EAAAF,CAAA,EAGhB,MAAA,IAAA,aAAAM,CAAA,CAAiC,EAAA,CAAAJ,CAAA,CAAA,EAGnCK,EAAA,IACE,QAAC,CAAA,GAAAN,EACK,MAAAC,EACJ,SAAAM,GAAAL,EAAAK,EAAA,OAAA,KAAA,CACwC,CAAA,CAG9C"} \ No newline at end of file diff --git a/packages/components/storybook-static/assets/DocsRenderer-EYKKDMVH-b61c696a.js b/packages/components/storybook-static/assets/DocsRenderer-EYKKDMVH-b61c696a.js deleted file mode 100644 index cba019a96..000000000 --- a/packages/components/storybook-static/assets/DocsRenderer-EYKKDMVH-b61c696a.js +++ /dev/null @@ -1,2 +0,0 @@ -import{_ as p}from"./iframe-1eda5ccb.js";import{R as e,r as a}from"./index-8db94870.js";import{r as c,u}from"./react-18-ff2c0a32.js";import{C as h,A as l,H as E,D as d}from"./index-89936ab1.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-042e6b4d.js";import"./index-8ce4a492.js";import"./index-d475d2ea.js";import"./isNativeReflectConstruct-099dc9ad.js";import"./index-d37d4223.js";import"./index-6e6be2d5.js";import"./index-356e4a49.js";var x={code:h,a:l,...E},_=class extends a.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:r}},S=class{constructor(){this.render=async(t,r,o)=>{let n={...x,...r==null?void 0:r.components};return new Promise((s,m)=>{p(()=>import("./index-186b3228.js"),["./index-186b3228.js","./index-1d576ef5.js","./index-8db94870.js","./_commonjsHelpers-042e6b4d.js"],import.meta.url).then(({MDXProvider:i})=>c(e.createElement(_,{showException:m,key:Math.random()},e.createElement(i,{components:n},e.createElement(d,{context:t,docsParameter:r}))),o)).then(s)})},this.unmount=t=>{u(t)}}};export{S as DocsRenderer,x as defaultComponents}; -//# sourceMappingURL=DocsRenderer-EYKKDMVH-b61c696a.js.map diff --git a/packages/components/storybook-static/assets/DocsRenderer-EYKKDMVH-b61c696a.js.map b/packages/components/storybook-static/assets/DocsRenderer-EYKKDMVH-b61c696a.js.map deleted file mode 100644 index 6d4efe3e9..000000000 --- a/packages/components/storybook-static/assets/DocsRenderer-EYKKDMVH-b61c696a.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"mappings":"qcAIG,IAACA,EAAkB,CAAC,KAAKC,EAAgB,EAAEC,EAAU,GAAGC,CAAU,EAAEC,EAAc,cAAcC,WAAS,CAAC,aAAa,CAAC,MAAM,GAAG,SAAS,EAAE,KAAK,MAAM,CAAC,SAAS,EAAE,CAAE,CAAC,OAAO,0BAA0B,CAAC,MAAO,CAAC,SAAS,EAAE,CAAC,CAAC,kBAAkBC,EAAI,CAAC,GAAG,CAAC,cAAAC,CAAa,EAAE,KAAK,MAAMA,EAAcD,CAAG,CAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAAE,CAAQ,EAAE,KAAK,MAAM,CAAC,SAAAC,CAAQ,EAAE,KAAK,MAAM,OAAOD,EAAS,KAAKC,CAAQ,CAAC,EAAEC,EAAa,KAAK,CAAC,aAAa,CAAC,KAAK,OAAO,MAAMC,EAAQC,EAAcC,IAAU,CAAC,IAAIC,EAAW,CAAC,GAAGd,EAAkB,GAAGY,GAAA,YAAAA,EAAe,UAAU,EAAE,OAAO,IAAI,QAAQ,CAACG,EAAQC,IAAS,CAAAC,EAAA,IAAC,OAAO,qBAAe,EAAC,sHAAC,KAAK,CAAC,CAAC,YAAAC,CAAW,IAAIC,EAAcC,EAAM,cAAchB,EAAc,CAAC,cAAcY,EAAO,IAAI,KAAK,OAAM,CAAE,EAAEI,EAAM,cAAcF,EAAY,CAAC,WAAAJ,CAAU,EAAEM,EAAM,cAAcC,EAAK,CAAC,QAAAV,EAAQ,cAAAC,CAAa,CAAC,CAAC,CAAC,EAAEC,CAAO,CAAC,EAAE,KAAKE,CAAO,CAAE,CAAC,CAAC,EAAE,KAAK,QAAQF,GAAS,CAACS,EAAeT,CAAO,CAAE,CAAE,CAAC","names":["defaultComponents","CodeOrSourceMdx","AnchorMdx","HeadersMdx","ErrorBoundary","Component","err","showException","hasError","children","DocsRenderer","context","docsParameter","element","components","resolve","reject","__vitePreload","MDXProvider","renderElement","React","Docs","unmountElement"],"sources":["../../node_modules/@storybook/addon-docs/dist/chunk-PCJTTTQV.mjs"],"sourcesContent":["import React, { Component } from 'react';\nimport { renderElement, unmountElement } from '@storybook/react-dom-shim';\nimport { CodeOrSourceMdx, AnchorMdx, HeadersMdx, Docs } from '@storybook/blocks';\n\nvar defaultComponents={code:CodeOrSourceMdx,a:AnchorMdx,...HeadersMdx},ErrorBoundary=class extends Component{constructor(){super(...arguments);this.state={hasError:!1};}static getDerivedStateFromError(){return {hasError:!0}}componentDidCatch(err){let{showException}=this.props;showException(err);}render(){let{hasError}=this.state,{children}=this.props;return hasError?null:children}},DocsRenderer=class{constructor(){this.render=async(context,docsParameter,element)=>{let components={...defaultComponents,...docsParameter?.components};return new Promise((resolve,reject)=>{import('@mdx-js/react').then(({MDXProvider})=>renderElement(React.createElement(ErrorBoundary,{showException:reject,key:Math.random()},React.createElement(MDXProvider,{components},React.createElement(Docs,{context,docsParameter}))),element)).then(resolve);})},this.unmount=element=>{unmountElement(element);};}};\n\nexport { DocsRenderer, defaultComponents };\n"],"file":"assets/DocsRenderer-EYKKDMVH-b61c696a.js"} \ No newline at end of file diff --git a/packages/components/storybook-static/assets/FlatUiTable.stories-36abe253.js b/packages/components/storybook-static/assets/FlatUiTable.stories-36abe253.js deleted file mode 100644 index 901a2a7c2..000000000 --- a/packages/components/storybook-static/assets/FlatUiTable.stories-36abe253.js +++ /dev/null @@ -1,456 +0,0 @@ -import{j as Sn}from"./jsx-runtime-94f6e698.js";import{R as Uh}from"./index-8ce4a492.js";import{_ as me,a as Un,b as Wh,c as V,d as Bh,e as yu,u as Vh}from"./isNativeReflectConstruct-099dc9ad.js";import{R as z,r as J}from"./index-8db94870.js";import{p as jh}from"./papaparse.min-839a1868.js";import{g as nf,c as nt}from"./_commonjsHelpers-042e6b4d.js";import{P as $}from"./index-1fc0ca9a.js";var Fr=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(r){var i=this,a=r||function(){};return this.listeners.push(a),this.onSubscribe(),function(){i.listeners=i.listeners.filter(function(o){return o!==a}),i.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}(),Ai=typeof window>"u";function Xe(){}function qh(e,t){return typeof e=="function"?e(t):e}function Do(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ii(e){return Array.isArray(e)?e:[e]}function rf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gi(e,t,n){return oa(e)?typeof t=="function"?me({},n,{queryKey:e,queryFn:t}):me({},t,{queryKey:e}):e}function en(e,t,n){return oa(e)?[me({},t,{queryKey:e}),n]:[e||{},t]}function Yh(e,t){if(e===!0&&t===!0||e==null&&t==null)return"all";if(e===!1&&t===!1)return"none";var n=e??!t;return n?"active":"inactive"}function wu(e,t){var n=e.active,r=e.exact,i=e.fetching,a=e.inactive,o=e.predicate,s=e.queryKey,u=e.stale;if(oa(s)){if(r){if(t.queryHash!==vs(s,t.options))return!1}else if(!Oi(t.queryKey,s))return!1}var l=Yh(n,a);if(l==="none")return!1;if(l!=="all"){var f=t.isActive();if(l==="active"&&!f||l==="inactive"&&f)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||typeof i=="boolean"&&t.isFetching()!==i||o&&!o(t))}function bu(e,t){var n=e.exact,r=e.fetching,i=e.predicate,a=e.mutationKey;if(oa(a)){if(!t.options.mutationKey)return!1;if(n){if(fn(t.options.mutationKey)!==fn(a))return!1}else if(!Oi(t.options.mutationKey,a))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function vs(e,t){var n=(t==null?void 0:t.queryKeyHashFn)||fn;return n(e)}function fn(e){var t=Ii(e);return Qh(t)}function Qh(e){return JSON.stringify(e,function(t,n){return Eo(n)?Object.keys(n).sort().reduce(function(r,i){return r[i]=n[i],r},{}):n})}function Oi(e,t){return af(Ii(e),Ii(t))}function af(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(function(n){return!af(e[n],t[n])}):!1}function Ri(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||Eo(e)&&Eo(t)){for(var r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),a=i.length,o=n?[]:{},s=0,u=0;u"u")return!0;var n=t.prototype;return!(!_u(n)||!n.hasOwnProperty("isPrototypeOf"))}function _u(e){return Object.prototype.toString.call(e)==="[object Object]"}function oa(e){return typeof e=="string"||Array.isArray(e)}function Gh(e){return new Promise(function(t){setTimeout(t,e)})}function xu(e){Promise.resolve().then(e).catch(function(t){return setTimeout(function(){throw t})})}function of(){if(typeof AbortController=="function")return new AbortController}var Xh=function(e){Un(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(i){var a;if(!Ai&&((a=window)!=null&&a.addEventListener)){var o=function(){return i()};return window.addEventListener("visibilitychange",o,!1),window.addEventListener("focus",o,!1),function(){window.removeEventListener("visibilitychange",o),window.removeEventListener("focus",o)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var a,o=this;this.setup=i,(a=this.cleanup)==null||a.call(this),this.cleanup=i(function(s){typeof s=="boolean"?o.setFocused(s):o.onFocus()})},n.setFocused=function(i){this.focused=i,i&&this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(i){i()})},n.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},t}(Fr),dr=new Xh,Zh=function(e){Un(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(i){var a;if(!Ai&&((a=window)!=null&&a.addEventListener)){var o=function(){return i()};return window.addEventListener("online",o,!1),window.addEventListener("offline",o,!1),function(){window.removeEventListener("online",o),window.removeEventListener("offline",o)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var a,o=this;this.setup=i,(a=this.cleanup)==null||a.call(this),this.cleanup=i(function(s){typeof s=="boolean"?o.setOnline(s):o.onOnline()})},n.setOnline=function(i){this.online=i,i&&this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(i){i()})},n.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},t}(Fr),vi=new Zh;function Jh(e){return Math.min(1e3*Math.pow(2,e),3e4)}function ki(e){return typeof(e==null?void 0:e.cancel)=="function"}var sf=function(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent};function yi(e){return e instanceof sf}var uf=function(t){var n=this,r=!1,i,a,o,s;this.abort=t.abort,this.cancel=function(d){return i==null?void 0:i(d)},this.cancelRetry=function(){r=!0},this.continueRetry=function(){r=!1},this.continue=function(){return a==null?void 0:a()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(d,h){o=d,s=h});var u=function(h){n.isResolved||(n.isResolved=!0,t.onSuccess==null||t.onSuccess(h),a==null||a(),o(h))},l=function(h){n.isResolved||(n.isResolved=!0,t.onError==null||t.onError(h),a==null||a(),s(h))},f=function(){return new Promise(function(h){a=h,n.isPaused=!0,t.onPause==null||t.onPause()}).then(function(){a=void 0,n.isPaused=!1,t.onContinue==null||t.onContinue()})},c=function d(){if(!n.isResolved){var h;try{h=t.fn()}catch(p){h=Promise.reject(p)}i=function(m){if(!n.isResolved&&(l(new sf(m)),n.abort==null||n.abort(),ki(h)))try{h.cancel()}catch{}},n.isTransportCancelable=ki(h),Promise.resolve(h).then(u).catch(function(p){var m,C;if(!n.isResolved){var y=(m=t.retry)!=null?m:3,v=(C=t.retryDelay)!=null?C:Jh,w=typeof v=="function"?v(n.failureCount,p):v,D=y===!0||typeof y=="number"&&n.failureCount"u"&&(s.exact=!0),this.queries.find(function(u){return wu(s,u)})},n.findAll=function(i,a){var o=en(i,a),s=o[0];return Object.keys(s).length>0?this.queries.filter(function(u){return wu(s,u)}):this.queries},n.notify=function(i){var a=this;Ae.batch(function(){a.listeners.forEach(function(o){o(i)})})},n.onFocus=function(){var i=this;Ae.batch(function(){i.queries.forEach(function(a){a.onFocus()})})},n.onOnline=function(){var i=this;Ae.batch(function(){i.queries.forEach(function(a){a.onOnline()})})},t}(Fr),ip=function(){function e(n){this.options=me({},n.defaultOptions,n.options),this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.observers=[],this.state=n.state||ap(),this.meta=n.meta}var t=e.prototype;return t.setState=function(r){this.dispatch({type:"setState",state:r})},t.addObserver=function(r){this.observers.indexOf(r)===-1&&this.observers.push(r)},t.removeObserver=function(r){this.observers=this.observers.filter(function(i){return i!==r})},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(Xe).catch(Xe)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var r=this,i,a=this.state.status==="loading",o=Promise.resolve();return a||(this.dispatch({type:"loading",variables:this.options.variables}),o=o.then(function(){r.mutationCache.config.onMutate==null||r.mutationCache.config.onMutate(r.state.variables,r)}).then(function(){return r.options.onMutate==null?void 0:r.options.onMutate(r.state.variables)}).then(function(s){s!==r.state.context&&r.dispatch({type:"loading",context:s,variables:r.state.variables})})),o.then(function(){return r.executeMutation()}).then(function(s){i=s,r.mutationCache.config.onSuccess==null||r.mutationCache.config.onSuccess(i,r.state.variables,r.state.context,r)}).then(function(){return r.options.onSuccess==null?void 0:r.options.onSuccess(i,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(i,null,r.state.variables,r.state.context)}).then(function(){return r.dispatch({type:"success",data:i}),i}).catch(function(s){return r.mutationCache.config.onError==null||r.mutationCache.config.onError(s,r.state.variables,r.state.context,r),Fi().error(s),Promise.resolve().then(function(){return r.options.onError==null?void 0:r.options.onError(s,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(void 0,s,r.state.variables,r.state.context)}).then(function(){throw r.dispatch({type:"error",error:s}),s})})},t.executeMutation=function(){var r=this,i;return this.retryer=new uf({fn:function(){return r.options.mutationFn?r.options.mutationFn(r.state.variables):Promise.reject("No mutationFn found")},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:(i=this.options.retry)!=null?i:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(r){var i=this;this.state=op(this.state,r),Ae.batch(function(){i.observers.forEach(function(a){a.onMutationUpdate(r)}),i.mutationCache.notify(i)})},e}();function ap(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function op(e,t){switch(t.type){case"failed":return me({},e,{failureCount:e.failureCount+1});case"pause":return me({},e,{isPaused:!0});case"continue":return me({},e,{isPaused:!1});case"loading":return me({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return me({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return me({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return me({},e,t.state);default:return e}}var sp=function(e){Un(t,e);function t(r){var i;return i=e.call(this)||this,i.config=r||{},i.mutations=[],i.mutationId=0,i}var n=t.prototype;return n.build=function(i,a,o){var s=new ip({mutationCache:this,mutationId:++this.mutationId,options:i.defaultMutationOptions(a),state:o,defaultOptions:a.mutationKey?i.getMutationDefaults(a.mutationKey):void 0,meta:a.meta});return this.add(s),s},n.add=function(i){this.mutations.push(i),this.notify(i)},n.remove=function(i){this.mutations=this.mutations.filter(function(a){return a!==i}),i.cancel(),this.notify(i)},n.clear=function(){var i=this;Ae.batch(function(){i.mutations.forEach(function(a){i.remove(a)})})},n.getAll=function(){return this.mutations},n.find=function(i){return typeof i.exact>"u"&&(i.exact=!0),this.mutations.find(function(a){return bu(i,a)})},n.findAll=function(i){return this.mutations.filter(function(a){return bu(i,a)})},n.notify=function(i){var a=this;Ae.batch(function(){a.listeners.forEach(function(o){o(i)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var i=this.mutations.filter(function(a){return a.state.isPaused});return Ae.batch(function(){return i.reduce(function(a,o){return a.then(function(){return o.continue().catch(Xe)})},Promise.resolve())})},t}(Fr);function up(){return{onFetch:function(t){t.fetchFn=function(){var n,r,i,a,o,s,u=(n=t.fetchOptions)==null||(r=n.meta)==null?void 0:r.refetchPage,l=(i=t.fetchOptions)==null||(a=i.meta)==null?void 0:a.fetchMore,f=l==null?void 0:l.pageParam,c=(l==null?void 0:l.direction)==="forward",d=(l==null?void 0:l.direction)==="backward",h=((o=t.state.data)==null?void 0:o.pages)||[],p=((s=t.state.data)==null?void 0:s.pageParams)||[],m=of(),C=m==null?void 0:m.signal,y=p,v=!1,w=t.options.queryFn||function(){return Promise.reject("Missing queryFn")},D=function(I,N,A,H){return y=H?[N].concat(y):[].concat(y,[N]),H?[A].concat(I):[].concat(I,[A])},g=function(I,N,A,H){if(v)return Promise.reject("Cancelled");if(typeof A>"u"&&!N&&I.length)return Promise.resolve(I);var U={queryKey:t.queryKey,signal:C,pageParam:A,meta:t.meta},K=w(U),X=Promise.resolve(K).then(function(j){return D(I,A,j,H)});if(ki(K)){var ne=X;ne.cancel=K.cancel}return X},_;if(!h.length)_=g([]);else if(c){var S=typeof f<"u",F=S?f:Cu(t.options,h);_=g(h,S,F)}else if(d){var P=typeof f<"u",k=P?f:lp(t.options,h);_=g(h,P,k,!0)}else(function(){y=[];var x=typeof t.options.getNextPageParam>"u",I=u&&h[0]?u(h[0],0,h):!0;_=I?g([],x,p[0]):Promise.resolve(D([],p[0],h[0]));for(var N=function(U){_=_.then(function(K){var X=u&&h[U]?u(h[U],U,h):!0;if(X){var ne=x?p[U]:Cu(t.options,K);return g(K,x,ne)}return Promise.resolve(D(K,p[U],h[U]))})},A=1;A"u"&&(f.revert=!0);var c=Ae.batch(function(){return o.queryCache.findAll(u).map(function(d){return d.cancel(f)})});return Promise.all(c).then(Xe).catch(Xe)},t.invalidateQueries=function(r,i,a){var o,s,u,l=this,f=en(r,i,a),c=f[0],d=f[1],h=me({},c,{active:(o=(s=c.refetchActive)!=null?s:c.active)!=null?o:!0,inactive:(u=c.refetchInactive)!=null?u:!1});return Ae.batch(function(){return l.queryCache.findAll(c).forEach(function(p){p.invalidate()}),l.refetchQueries(h,d)})},t.refetchQueries=function(r,i,a){var o=this,s=en(r,i,a),u=s[0],l=s[1],f=Ae.batch(function(){return o.queryCache.findAll(u).map(function(d){return d.fetch(void 0,me({},l,{meta:{refetchPage:u==null?void 0:u.refetchPage}}))})}),c=Promise.all(f).then(Xe);return l!=null&&l.throwOnError||(c=c.catch(Xe)),c},t.fetchQuery=function(r,i,a){var o=gi(r,i,a),s=this.defaultQueryOptions(o);typeof s.retry>"u"&&(s.retry=!1);var u=this.queryCache.build(this,s);return u.isStaleByTime(s.staleTime)?u.fetch(s):Promise.resolve(u.state.data)},t.prefetchQuery=function(r,i,a){return this.fetchQuery(r,i,a).then(Xe).catch(Xe)},t.fetchInfiniteQuery=function(r,i,a){var o=gi(r,i,a);return o.behavior=up(),this.fetchQuery(o)},t.prefetchInfiniteQuery=function(r,i,a){return this.fetchInfiniteQuery(r,i,a).then(Xe).catch(Xe)},t.cancelMutations=function(){var r=this,i=Ae.batch(function(){return r.mutationCache.getAll().map(function(a){return a.cancel()})});return Promise.all(i).then(Xe).catch(Xe)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(r){return this.mutationCache.build(this,r).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(r){this.defaultOptions=r},t.setQueryDefaults=function(r,i){var a=this.queryDefaults.find(function(o){return fn(r)===fn(o.queryKey)});a?a.defaultOptions=i:this.queryDefaults.push({queryKey:r,defaultOptions:i})},t.getQueryDefaults=function(r){var i;return r?(i=this.queryDefaults.find(function(a){return Oi(r,a.queryKey)}))==null?void 0:i.defaultOptions:void 0},t.setMutationDefaults=function(r,i){var a=this.mutationDefaults.find(function(o){return fn(r)===fn(o.mutationKey)});a?a.defaultOptions=i:this.mutationDefaults.push({mutationKey:r,defaultOptions:i})},t.getMutationDefaults=function(r){var i;return r?(i=this.mutationDefaults.find(function(a){return Oi(r,a.mutationKey)}))==null?void 0:i.defaultOptions:void 0},t.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var i=me({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!i.queryHash&&i.queryKey&&(i.queryHash=vs(i.queryKey,i)),i},t.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},t.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:me({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),fp=function(e){Un(t,e);function t(r,i){var a;return a=e.call(this)||this,a.client=r,a.options=i,a.trackedProps=[],a.selectError=null,a.bindMethods(),a.setOptions(i),a}var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),Tu(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return Mo(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return Mo(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(i,a){var o=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(i),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=o.queryKey),this.updateQuery();var u=this.hasListeners();u&&Su(this.currentQuery,s,this.options,o)&&this.executeFetch(),this.updateResult(a),u&&(this.currentQuery!==s||this.options.enabled!==o.enabled||this.options.staleTime!==o.staleTime)&&this.updateStaleTimeout();var l=this.computeRefetchInterval();u&&(this.currentQuery!==s||this.options.enabled!==o.enabled||l!==this.currentRefetchInterval)&&this.updateRefetchInterval(l)},n.getOptimisticResult=function(i){var a=this.client.defaultQueryObserverOptions(i),o=this.client.getQueryCache().build(this.client,a);return this.createResult(o,a)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(i,a){var o=this,s={},u=function(f){o.trackedProps.includes(f)||o.trackedProps.push(f)};return Object.keys(i).forEach(function(l){Object.defineProperty(s,l,{configurable:!1,enumerable:!0,get:function(){return u(l),i[l]}})}),(a.useErrorBoundary||a.suspense)&&u("error"),s},n.getNextResult=function(i){var a=this;return new Promise(function(o,s){var u=a.subscribe(function(l){l.isFetching||(u(),l.isError&&(i!=null&&i.throwOnError)?s(l.error):o(l))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(i){return this.fetch(me({},i,{meta:{refetchPage:i==null?void 0:i.refetchPage}}))},n.fetchOptimistic=function(i){var a=this,o=this.client.defaultQueryObserverOptions(i),s=this.client.getQueryCache().build(this.client,o);return s.fetch().then(function(){return a.createResult(s,o)})},n.fetch=function(i){var a=this;return this.executeFetch(i).then(function(){return a.updateResult(),a.currentResult})},n.executeFetch=function(i){this.updateQuery();var a=this.currentQuery.fetch(this.options,i);return i!=null&&i.throwOnError||(a=a.catch(Xe)),a},n.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(Ai||this.currentResult.isStale||!Do(this.options.staleTime))){var a=rf(this.currentResult.dataUpdatedAt,this.options.staleTime),o=a+1;this.staleTimeoutId=setTimeout(function(){i.currentResult.isStale||i.updateResult()},o)}},n.computeRefetchInterval=function(){var i;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(i=this.options.refetchInterval)!=null?i:!1},n.updateRefetchInterval=function(i){var a=this;this.clearRefetchInterval(),this.currentRefetchInterval=i,!(Ai||this.options.enabled===!1||!Do(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(a.options.refetchIntervalInBackground||dr.isFocused())&&a.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(i,a){var o=this.currentQuery,s=this.options,u=this.currentResult,l=this.currentResultState,f=this.currentResultOptions,c=i!==o,d=c?i.state:this.currentQueryInitialState,h=c?this.currentResult:this.previousQueryResult,p=i.state,m=p.dataUpdatedAt,C=p.error,y=p.errorUpdatedAt,v=p.isFetching,w=p.status,D=!1,g=!1,_;if(a.optimisticResults){var S=this.hasListeners(),F=!S&&Tu(i,a),P=S&&Su(i,o,a,s);(F||P)&&(v=!0,m||(w="loading"))}if(a.keepPreviousData&&!p.dataUpdateCount&&(h!=null&&h.isSuccess)&&w!=="error")_=h.data,m=h.dataUpdatedAt,w=h.status,D=!0;else if(a.select&&typeof p.data<"u")if(u&&p.data===(l==null?void 0:l.data)&&a.select===this.selectFn)_=this.selectResult;else try{this.selectFn=a.select,_=a.select(p.data),a.structuralSharing!==!1&&(_=Ri(u==null?void 0:u.data,_)),this.selectResult=_,this.selectError=null}catch(M){Fi().error(M),this.selectError=M}else _=p.data;if(typeof a.placeholderData<"u"&&typeof _>"u"&&(w==="loading"||w==="idle")){var k;if(u!=null&&u.isPlaceholderData&&a.placeholderData===(f==null?void 0:f.placeholderData))k=u.data;else if(k=typeof a.placeholderData=="function"?a.placeholderData():a.placeholderData,a.select&&typeof k<"u")try{k=a.select(k),a.structuralSharing!==!1&&(k=Ri(u==null?void 0:u.data,k)),this.selectError=null}catch(M){Fi().error(M),this.selectError=M}typeof k<"u"&&(w="success",_=k,g=!0)}this.selectError&&(C=this.selectError,_=this.selectResult,y=Date.now(),w="error");var b={status:w,isLoading:w==="loading",isSuccess:w==="success",isError:w==="error",isIdle:w==="idle",data:_,dataUpdatedAt:m,error:C,errorUpdatedAt:y,failureCount:p.fetchFailureCount,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:v,isRefetching:v&&w!=="loading",isLoadingError:w==="error"&&p.dataUpdatedAt===0,isPlaceholderData:g,isPreviousData:D,isRefetchError:w==="error"&&p.dataUpdatedAt!==0,isStale:ys(i,a),refetch:this.refetch,remove:this.remove};return b},n.shouldNotifyListeners=function(i,a){if(!a)return!0;var o=this.options,s=o.notifyOnChangeProps,u=o.notifyOnChangePropsExclusions;if(!s&&!u||s==="tracked"&&!this.trackedProps.length)return!0;var l=s==="tracked"?this.trackedProps:s;return Object.keys(i).some(function(f){var c=f,d=i[c]!==a[c],h=l==null?void 0:l.some(function(m){return m===f}),p=u==null?void 0:u.some(function(m){return m===f});return d&&!p&&(!l||h)})},n.updateResult=function(i){var a=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!Kh(this.currentResult,a)){var o={cache:!0};(i==null?void 0:i.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,a)&&(o.listeners=!0),this.notify(me({},o,i))}},n.updateQuery=function(){var i=this.client.getQueryCache().build(this.client,this.options);if(i!==this.currentQuery){var a=this.currentQuery;this.currentQuery=i,this.currentQueryInitialState=i.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(a==null||a.removeObserver(this),i.addObserver(this))}},n.onQueryUpdate=function(i){var a={};i.type==="success"?a.onSuccess=!0:i.type==="error"&&!yi(i.error)&&(a.onError=!0),this.updateResult(a),this.hasListeners()&&this.updateTimers()},n.notify=function(i){var a=this;Ae.batch(function(){i.onSuccess?(a.options.onSuccess==null||a.options.onSuccess(a.currentResult.data),a.options.onSettled==null||a.options.onSettled(a.currentResult.data,null)):i.onError&&(a.options.onError==null||a.options.onError(a.currentResult.error),a.options.onSettled==null||a.options.onSettled(void 0,a.currentResult.error)),i.listeners&&a.listeners.forEach(function(o){o(a.currentResult)}),i.cache&&a.client.getQueryCache().notify({query:a.currentQuery,type:"observerResultsUpdated"})})},t}(Fr);function dp(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Tu(e,t){return dp(e,t)||e.state.dataUpdatedAt>0&&Mo(e,t,t.refetchOnMount)}function Mo(e,t,n){if(t.enabled!==!1){var r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ys(e,t)}return!1}function Su(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&ys(e,n)}function ys(e,t){return e.isStaleByTime(t.staleTime)}var hp=Uh.unstable_batchedUpdates;Ae.setBatchNotifyFunction(hp);var pp=console;tp(pp);var Du=z.createContext(void 0),cf=z.createContext(!1);function ff(e){return e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Du),window.ReactQueryClientContext):Du}var mp=function(){var t=z.useContext(ff(z.useContext(cf)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},gp=function(t){var n=t.client,r=t.contextSharing,i=r===void 0?!1:r,a=t.children;z.useEffect(function(){return n.mount(),function(){n.unmount()}},[n]);var o=ff(i);return z.createElement(cf.Provider,{value:i},z.createElement(o.Provider,{value:n},a))};function vp(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var yp=z.createContext(vp()),wp=function(){return z.useContext(yp)};function bp(e,t,n){return typeof t=="function"?t.apply(void 0,n):typeof t=="boolean"?t:!!e}function _p(e,t){var n=z.useRef(!1),r=z.useState(0),i=r[1],a=mp(),o=wp(),s=a.defaultQueryObserverOptions(e);s.optimisticResults=!0,s.onError&&(s.onError=Ae.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=Ae.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=Ae.batchCalls(s.onSettled)),s.suspense&&(typeof s.staleTime!="number"&&(s.staleTime=1e3),s.cacheTime===0&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(o.isReset()||(s.retryOnMount=!1));var u=z.useState(function(){return new t(a,s)}),l=u[0],f=l.getOptimisticResult(s);if(z.useEffect(function(){n.current=!0,o.clearReset();var c=l.subscribe(Ae.batchCalls(function(){n.current&&i(function(d){return d+1})}));return l.updateResult(),function(){n.current=!1,c()}},[o,l]),z.useEffect(function(){l.setOptions(s,{listeners:!1})},[s,l]),s.suspense&&f.isLoading)throw l.fetchOptimistic(s).then(function(c){var d=c.data;s.onSuccess==null||s.onSuccess(d),s.onSettled==null||s.onSettled(d,null)}).catch(function(c){o.clearReset(),s.onError==null||s.onError(c),s.onSettled==null||s.onSettled(void 0,c)});if(f.isError&&!o.isReset()&&!f.isFetching&&bp(s.suspense,s.useErrorBoundary,[f.error,l.getCurrentQuery()]))throw f.error;return s.notifyOnChangeProps==="tracked"&&(f=l.trackResult(f,s)),f}function Eu(e,t,n){var r=gi(e,t,n);return _p(r,fp)}function xp(e){let t;const n=new Set,r=(l,f)=>{const c=typeof l=="function"?l(t):l;if(c!==t){const d=t;t=f?c:Object.assign({},t,c),n.forEach(h=>h(t,d))}},i=()=>t,a=(l,f=i,c=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=f(t);function h(){const p=f(t);if(!c(d,p)){const m=d;l(d=p,m)}}return n.add(h),()=>n.delete(h)},u={setState:r,getState:i,subscribe:(l,f,c)=>f||c?a(l,f,c):(n.add(l),()=>n.delete(l)),destroy:()=>n.clear()};return t=e(r,i,u),u}const Cp=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Mu=Cp?J.useEffect:J.useLayoutEffect;function Tp(e){const t=typeof e=="function"?xp(e):e,n=(r=t.getState,i=Object.is)=>{const[,a]=J.useReducer(C=>C+1,0),o=t.getState(),s=J.useRef(o),u=J.useRef(r),l=J.useRef(i),f=J.useRef(!1),c=J.useRef();c.current===void 0&&(c.current=r(o));let d,h=!1;(s.current!==o||u.current!==r||l.current!==i||f.current)&&(d=r(o),h=!i(c.current,d)),Mu(()=>{h&&(c.current=d),s.current=o,u.current=r,l.current=i,f.current=!1});const p=J.useRef(o);Mu(()=>{const C=()=>{try{const v=t.getState(),w=u.current(v);l.current(c.current,w)||(s.current=v,c.current=w,a())}catch{f.current=!0,a()}},y=t.subscribe(C);return t.getState()!==p.current&&C(),y},[]);const m=h?d:c.current;return J.useDebugValue(m),m};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,t];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}function xt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:ws(e)?2:bs(e)?3:0}function Ao(e,t){return Wn(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Sp(e,t){return Wn(e)===2?e.get(t):e[t]}function df(e,t,n){var r=Wn(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Dp(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ws(e){return Ip&&e instanceof Map}function bs(e){return Op&&e instanceof Set}function ln(e){return e.o||e.t}function _s(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=kp(e);delete t[lt];for(var n=Ss(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Ep),Object.freeze(e),t&&gr(e,function(n,r){return xs(r,!0)},!0)),e}function Ep(){xt(2)}function Cs(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ft(e){var t=Fp[e];return t||xt(18,e),t}function Au(){return vr}function La(e,t){t&&(Ft("Patches"),e.u=[],e.s=[],e.v=t)}function Ni(e){Io(e),e.p.forEach(Mp),e.p=null}function Io(e){e===vr&&(vr=e.l)}function Iu(e){return vr={p:[],l:vr,h:e,m:!0,_:0}}function Mp(e){var t=e[lt];t.i===0||t.i===1?t.j():t.g=!0}function $a(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||Ft("ES5").S(t,e,r),r?(n[lt].P&&(Ni(t),xt(4)),hn(e)&&(e=Pi(t,e),t.l||Li(t,e)),t.u&&Ft("Patches").M(n[lt].t,e,t.u,t.s)):e=Pi(t,n,[]),Ni(t),t.u&&t.v(t.u,t.s),e!==hf?e:void 0}function Pi(e,t,n){if(Cs(t))return t;var r=t[lt];if(!r)return gr(t,function(s,u){return Ou(e,r,t,s,u,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Li(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=_s(r.k):r.o,a=i,o=!1;r.i===3&&(a=new Set(i),i.clear(),o=!0),gr(a,function(s,u){return Ou(e,r,i,s,u,n,o)}),Li(e,i,!1),n&&e.u&&Ft("Patches").N(r,n,e.u,e.s)}return r.o}function Ou(e,t,n,r,i,a,o){if(On(i)){var s=Pi(e,i,a&&t&&t.i!==3&&!Ao(t.R,r)?a.concat(r):void 0);if(df(n,r,s),!On(s))return;e.m=!1}else o&&n.add(i);if(hn(i)&&!Cs(i)){if(!e.h.D&&e._<1)return;Pi(e,i),t&&t.A.l||Li(e,i)}}function Li(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&xs(t,n)}function za(e,t){var n=e[lt];return(n?ln(n):e)[t]}function Ru(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Oo(e){e.P||(e.P=!0,e.l&&Oo(e.l))}function Ha(e){e.o||(e.o=_s(e.t))}function Ro(e,t,n){var r=ws(t)?Ft("MapSet").F(t,n):bs(t)?Ft("MapSet").T(t,n):e.O?function(i,a){var o=Array.isArray(i),s={i:o?1:0,A:a?a.A:Au(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=s,l=ko;o&&(u=[s],l=ur);var f=Proxy.revocable(u,l),c=f.revoke,d=f.proxy;return s.k=d,s.j=c,d}(t,n):Ft("ES5").J(t,n);return(n?n.A:Au()).p.push(r),r}function Ap(e){return On(e)||xt(22,e),function t(n){if(!hn(n))return n;var r,i=n[lt],a=Wn(n);if(i){if(!i.P&&(i.i<4||!Ft("ES5").K(i)))return i.t;i.I=!0,r=ku(n,a),i.I=!1}else r=ku(n,a);return gr(r,function(o,s){i&&Sp(i.t,o)===s||df(r,o,t(s))}),a===3?new Set(r):r}(e)}function ku(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return _s(e)}var Fu,vr,Ts=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ip=typeof Map<"u",Op=typeof Set<"u",Nu=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",hf=Ts?Symbol.for("immer-nothing"):((Fu={})["immer-nothing"]=!0,Fu),Pu=Ts?Symbol.for("immer-draftable"):"__$immer_draftable",lt=Ts?Symbol.for("immer-state"):"__$immer_state",Rp=""+Object.prototype.constructor,Ss=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,kp=Object.getOwnPropertyDescriptors||function(e){var t={};return Ss(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Fp={},ko={get:function(e,t){if(t===lt)return e;var n=ln(e);if(!Ao(n,t))return function(i,a,o){var s,u=Ru(a,o);return u?"value"in u?u.value:(s=u.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!hn(r)?r:r===za(e.t,t)?(Ha(e),e.o[t]=Ro(e.A.h,r,e)):r},has:function(e,t){return t in ln(e)},ownKeys:function(e){return Reflect.ownKeys(ln(e))},set:function(e,t,n){var r=Ru(ln(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=za(ln(e),t),a=i==null?void 0:i[lt];if(a&&a.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Dp(n,i)&&(n!==void 0||Ao(e.t,t)))return!0;Ha(e),Oo(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return za(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Ha(e),Oo(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=ln(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){xt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){xt(12)}},ur={};gr(ko,function(e,t){ur[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ur.deleteProperty=function(e,t){return ur.set.call(this,e,t,void 0)},ur.set=function(e,t,n){return ko.set.call(this,e[0],t,n,e[0])};var Np=function(){function e(n){var r=this;this.O=Nu,this.D=!0,this.produce=function(i,a,o){if(typeof i=="function"&&typeof a!="function"){var s=a;a=i;var u=r;return function(m){var C=this;m===void 0&&(m=s);for(var y=arguments.length,v=Array(y>1?y-1:0),w=1;w1?f-1:0),d=1;d=0;i--){var a=r[i];if(a.path.length===0&&a.op==="replace"){n=a.value;break}}i>-1&&(r=r.slice(i+1));var o=Ft("Patches").$;return On(n)?o(n,r):this.produce(n,function(s){return o(s,r)})},e}(),ct=new Np,Pp=ct.produce;ct.produceWithPatches.bind(ct);ct.setAutoFreeze.bind(ct);ct.setUseProxies.bind(ct);ct.applyPatches.bind(ct);ct.createDraft.bind(ct);ct.finishDraft.bind(ct);const Lp=Pp;function Ds(e,t){return et?1:e>=t?0:NaN}function pf(e){let t=e,n=e;e.length===1&&(t=(o,s)=>e(o)-s,n=$p(e));function r(o,s,u,l){for(u==null&&(u=0),l==null&&(l=o.length);u>>1;n(o[f],s)<0?u=f+1:l=f}return u}function i(o,s,u,l){for(u==null&&(u=0),l==null&&(l=o.length);u>>1;n(o[f],s)>0?l=f:u=f+1}return u}function a(o,s,u,l){u==null&&(u=0),l==null&&(l=o.length);const f=r(o,s,u,l-1);return f>u&&t(o[f-1],s)>-t(o[f],s)?f-1:f}return{left:r,center:a,right:i}}function $p(e){return(t,n)=>Ds(e(t),n)}function zp(e){return e===null?NaN:+e}const mf=pf(Ds),gf=mf.right,Hp=mf.left;pf(zp).center;function Up(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&++n}return n}function Fo(e,t){return te?1:t>=e?0:NaN}function En(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r=a&&(n=r=a):(n>a&&(n=a),r0)return[e];if((r=t0){let u=Math.round(e/s),l=Math.round(t/s);for(u*st&&--l,o=new Array(a=l-u+1);++it&&--l,o=new Array(a=l-u+1);++i=0?(a>=No?10:a>=Po?5:a>=Lo?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=No?10:a>=Po?5:a>=Lo?2:1)}function jp(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=No?i*=10:a>=Po?i*=5:a>=Lo&&(i*=2),t0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function Yp(e){return Math.ceil(Math.log(Up(e))/Math.LN2)+1}function Ua(){var e=Wp,t=En,n=Yp;function r(i){Array.isArray(i)||(i=Array.from(i));var a,o=i.length,s,u=new Array(o);for(a=0;a=c)if(C>=c&&t===En){const v=sa(f,c,y);isFinite(v)&&(v>0?c=(Math.floor(c/v)+1)*v:v<0&&(c=(Math.ceil(c*-v)+1)/-v))}else d.pop()}for(var h=d.length;d[0]<=f;)d.shift(),--h;for(;d[h-1]>c;)d.pop(),--h;var p=new Array(h+1),m;for(a=0;a<=h;++a)m=p[a]=[],m.x0=a>0?d[a-1]:f,m.x1=a=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function yf(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}var zo="http://www.w3.org/1999/xhtml";const Lu={svg:"http://www.w3.org/2000/svg",xhtml:zo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ua(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Lu.hasOwnProperty(t)?{space:Lu[t],local:e}:e}function Qp(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===zo&&t.documentElement.namespaceURI===zo?t.createElement(e):t.createElementNS(n,e)}}function Kp(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function wf(e){var t=ua(e);return(t.local?Kp:Qp)(t)}function Gp(){}function Es(e){return e==null?Gp:function(){return this.querySelector(e)}}function Xp(e){typeof e!="function"&&(e=Es(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=w&&(w=v+1);!(g=C[w])&&++w=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function bm(e){e||(e=_m);function t(c,d){return c&&d?e(c.__data__,d.__data__):!c-!d}for(var n=this._groups,r=n.length,i=new Array(r),a=0;at?1:e>=t?0:NaN}function xm(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Cm(){return Array.from(this)}function Tm(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?Nm:typeof t=="function"?Lm:Pm)(e,t,n??"")):Rn(this.node(),e)}function Rn(e,t){return e.style.getPropertyValue(t)||Sf(e).getComputedStyle(e,null).getPropertyValue(t)}function zm(e){return function(){delete this[e]}}function Hm(e,t){return function(){this[e]=t}}function Um(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Wm(e,t){return arguments.length>1?this.each((t==null?zm:typeof t=="function"?Um:Hm)(e,t)):this.node()[e]}function Df(e){return e.trim().split(/^|\s+/)}function Ms(e){return e.classList||new Ef(e)}function Ef(e){this._node=e,this._names=Df(e.getAttribute("class")||"")}Ef.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Mf(e,t){for(var n=Ms(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function g0(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n{}};function Of(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}wi.prototype=Of.prototype={constructor:wi,on:function(e,t){var n=this._,r=D0(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a0)for(var n=new Array(i),r=0,i,a;r=0&&e._call.call(null,t),e=e._next;--kn}function zu(){pn=(Hi=yr.now())+la,kn=lr=0;try{A0()}finally{kn=0,O0(),pn=0}}function I0(){var e=yr.now(),t=e-Hi;t>Rf&&(la-=t,Hi=e)}function O0(){for(var e,t=zi,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:zi=n);cr=e,Ho(r)}function Ho(e){if(!kn){lr&&(lr=clearTimeout(lr));var t=e-pn;t>24?(e<1/0&&(lr=setTimeout(zu,e-yr.now()-la)),Gn&&(Gn=clearInterval(Gn))):(Gn||(Hi=yr.now(),Gn=setInterval(I0,Rf)),kn=1,kf(zu))}}function Hu(e,t,n){var r=new Ui;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var R0=Of("start","end","cancel","interrupt"),k0=[],Nf=0,Uu=1,Uo=2,bi=3,Wu=4,Wo=5,_i=6;function ca(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;F0(e,n,{name:t,index:r,group:i,on:R0,tween:k0,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Nf})}function Is(e,t){var n=Tt(e,t);if(n.state>Nf)throw new Error("too late; already scheduled");return n}function $t(e,t){var n=Tt(e,t);if(n.state>bi)throw new Error("too late; already running");return n}function Tt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function F0(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Ff(a,0,n.time);function a(l){n.state=Uu,n.timer.restart(o,n.delay,n.time),n.delay<=l&&o(l-n.delay)}function o(l){var f,c,d,h;if(n.state!==Uu)return u();for(f in r)if(h=r[f],h.name===n.name){if(h.state===bi)return Hu(o);h.state===Wu?(h.state=_i,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[f]):+fUo&&r.state>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ei(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ei(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$0.exec(e))?new ot(t[1],t[2],t[3],1):(t=z0.exec(e))?new ot(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=H0.exec(e))?ei(t[1],t[2],t[3],t[4]):(t=U0.exec(e))?ei(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=W0.exec(e))?Ku(t[1],t[2]/100,t[3]/100,1):(t=B0.exec(e))?Ku(t[1],t[2]/100,t[3]/100,t[4]):Bu.hasOwnProperty(e)?qu(Bu[e]):e==="transparent"?new ot(NaN,NaN,NaN,0):null}function qu(e){return new ot(e>>16&255,e>>8&255,e&255,1)}function ei(e,t,n,r){return r<=0&&(e=t=n=NaN),new ot(e,t,n,r)}function j0(e){return e instanceof Pr||(e=_r(e)),e?(e=e.rgb(),new ot(e.r,e.g,e.b,e.opacity)):new ot}function Bo(e,t,n,r){return arguments.length===1?j0(e):new ot(e,t,n,r??1)}function ot(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Os(ot,Bo,Pf(Pr,{brighter:function(e){return e=e==null?Wi:Math.pow(Wi,e),new ot(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?wr:Math.pow(wr,e),new ot(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yu,formatHex:Yu,formatRgb:Qu,toString:Qu}));function Yu(){return"#"+Wa(this.r)+Wa(this.g)+Wa(this.b)}function Qu(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function Wa(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function Ku(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new At(e,t,n,r)}function Lf(e){if(e instanceof At)return new At(e.h,e.s,e.l,e.opacity);if(e instanceof Pr||(e=_r(e)),!e)return new At;if(e instanceof At)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(t===a?o=(n-r)/s+(n0&&u<1?0:o,new At(o,s,u,e.opacity)}function q0(e,t,n,r){return arguments.length===1?Lf(e):new At(e,t,n,r??1)}function At(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Os(At,q0,Pf(Pr,{brighter:function(e){return e=e==null?Wi:Math.pow(Wi,e),new At(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?wr:Math.pow(wr,e),new At(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ot(Ba(e>=240?e-240:e+120,i,r),Ba(e,i,r),Ba(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function Ba(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const $f=e=>()=>e;function Y0(e,t){return function(n){return e+n*t}}function Q0(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function K0(e){return(e=+e)==1?zf:function(t,n){return n-t?Q0(t,n,e):$f(isNaN(t)?n:t)}}function zf(e,t){var n=t-e;return n?Y0(e,n):$f(isNaN(e)?t:e)}const Gu=function e(t){var n=K0(t);function r(i,a){var o=n((i=Bo(i)).r,(a=Bo(a)).r),s=n(i.g,a.g),u=n(i.b,a.b),l=zf(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=u(f),i.opacity=l(f),i+""}}return r.gamma=e,r}(1);function tn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Vo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Va=new RegExp(Vo.source,"g");function G0(e){return function(){return e}}function X0(e){return function(t){return e(t)+""}}function Z0(e,t){var n=Vo.lastIndex=Va.lastIndex=0,r,i,a,o=-1,s=[],u=[];for(e=e+"",t=t+"";(r=Vo.exec(e))&&(i=Va.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:tn(r,i)})),n=Va.lastIndex;return n180?f+=360:f-l>180&&(l+=360),d.push({i:c.push(i(c)+"rotate(",null,r)-2,x:tn(l,f)})):f&&c.push(i(c)+"rotate("+f+r)}function s(l,f,c,d){l!==f?d.push({i:c.push(i(c)+"skewX(",null,r)-2,x:tn(l,f)}):f&&c.push(i(c)+"skewX("+f+r)}function u(l,f,c,d,h,p){if(l!==c||f!==d){var m=h.push(i(h)+"scale(",null,",",null,")");p.push({i:m-4,x:tn(l,c)},{i:m-2,x:tn(f,d)})}else(c!==1||d!==1)&&h.push(i(h)+"scale("+c+","+d+")")}return function(l,f){var c=[],d=[];return l=e(l),f=e(f),a(l.translateX,l.translateY,f.translateX,f.translateY,c,d),o(l.rotate,f.rotate,c,d),s(l.skewX,f.skewX,c,d),u(l.scaleX,l.scaleY,f.scaleX,f.scaleY,c,d),l=f=null,function(h){for(var p=-1,m=d.length,C;++p=0&&(t=t.slice(0,n)),!t||t==="start"})}function Og(e,t,n){var r,i,a=Ig(t)?Is:$t;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Rg(e,t){var n=this._id;return arguments.length<2?Tt(this.node(),n).on.on(e):this.each(Og(n,e,t))}function kg(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Fg(){return this.on("end.remove",kg(this._id))}function Ng(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Es(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ni(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ni(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=sv.exec(e))?new st(t[1],t[2],t[3],1):(t=uv.exec(e))?new st(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=lv.exec(e))?ni(t[1],t[2],t[3],t[4]):(t=cv.exec(e))?ni(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fv.exec(e))?il(t[1],t[2]/100,t[3]/100,1):(t=dv.exec(e))?il(t[1],t[2]/100,t[3]/100,t[4]):Zu.hasOwnProperty(e)?tl(Zu[e]):e==="transparent"?new st(NaN,NaN,NaN,0):null}function tl(e){return new st(e>>16&255,e>>8&255,e&255,1)}function ni(e,t,n,r){return r<=0&&(e=t=n=NaN),new st(e,t,n,r)}function pv(e){return e instanceof Lr||(e=Tr(e)),e?(e=e.rgb(),new st(e.r,e.g,e.b,e.opacity)):new st}function Vi(e,t,n,r){return arguments.length===1?pv(e):new st(e,t,n,r??1)}function st(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ks(st,Vi,jf(Lr,{brighter:function(e){return e=e==null?Bi:Math.pow(Bi,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?xr:Math.pow(xr,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nl,formatHex:nl,formatRgb:rl,toString:rl}));function nl(){return"#"+ja(this.r)+ja(this.g)+ja(this.b)}function rl(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function ja(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function il(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new It(e,t,n,r)}function qf(e){if(e instanceof It)return new It(e.h,e.s,e.l,e.opacity);if(e instanceof Lr||(e=Tr(e)),!e)return new It;if(e instanceof It)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(t===a?o=(n-r)/s+(n0&&u<1?0:o,new It(o,s,u,e.opacity)}function mv(e,t,n,r){return arguments.length===1?qf(e):new It(e,t,n,r??1)}function It(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ks(It,mv,jf(Lr,{brighter:function(e){return e=e==null?Bi:Math.pow(Bi,e),new It(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?xr:Math.pow(xr,e),new It(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new st(qa(e>=240?e-240:e+120,i,r),qa(e,i,r),qa(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function qa(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function gv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ji(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Fn(e){return e=ji(Math.abs(e)),e?e[1]:NaN}function vv(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function yv(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var wv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function qi(e){if(!(t=wv.exec(e)))throw new Error("invalid format: "+e);var t;return new Fs({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}qi.prototype=Fs.prototype;function Fs(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Fs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function bv(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Yf;function _v(e,t){var n=ji(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(Yf=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ji(e,Math.max(0,t+a-1))[0]}function al(e,t){var n=ji(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const ol={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:gv,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>al(e*100,t),r:al,s:_v,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function sl(e){return e}var ul=Array.prototype.map,ll=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function xv(e){var t=e.grouping===void 0||e.thousands===void 0?sl:vv(ul.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?sl:yv(ul.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(c){c=qi(c);var d=c.fill,h=c.align,p=c.sign,m=c.symbol,C=c.zero,y=c.width,v=c.comma,w=c.precision,D=c.trim,g=c.type;g==="n"?(v=!0,g="g"):ol[g]||(w===void 0&&(w=12),D=!0,g="g"),(C||d==="0"&&h==="=")&&(C=!0,d="0",h="=");var _=m==="$"?n:m==="#"&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",S=m==="$"?r:/[%p]/.test(g)?o:"",F=ol[g],P=/[defgprs%]/.test(g);w=w===void 0?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function k(b){var M=_,x=S,I,N,A;if(g==="c")x=F(b)+x,b="";else{b=+b;var H=b<0||1/b<0;if(b=isNaN(b)?u:F(Math.abs(b),w),D&&(b=bv(b)),H&&+b==0&&p!=="+"&&(H=!1),M=(H?p==="("?p:s:p==="-"||p==="("?"":p)+M,x=(g==="s"?ll[8+Yf/3]:"")+x+(H&&p==="("?")":""),P){for(I=-1,N=b.length;++IA||A>57){x=(A===46?i+b.slice(I+1):b.slice(I))+x,b=b.slice(0,I);break}}}v&&!C&&(b=t(b,1/0));var U=M.length+b.length+x.length,K=U>1)+M+b+x+K.slice(U);break;default:b=K+M+b+x;break}return a(b)}return k.toString=function(){return c+""},k}function f(c,d){var h=l((c=qi(c),c.type="f",c)),p=Math.max(-8,Math.min(8,Math.floor(Fn(d)/3)))*3,m=Math.pow(10,-p),C=ll[8+p/3];return function(y){return h(m*y)+C}}return{format:l,formatPrefix:f}}var ri,dn,Qf;Cv({thousands:",",grouping:[3],currency:["$",""]});function Cv(e){return ri=xv(e),dn=ri.format,Qf=ri.formatPrefix,ri}function Tv(e){return Math.max(0,-Fn(Math.abs(e)))}function Sv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Fn(t)/3)))*3-Fn(Math.abs(e)))}function Dv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Fn(t)-Fn(e))+1}const Ns=e=>()=>e;function Ev(e,t){return function(n){return e+n*t}}function Mv(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Av(e){return(e=+e)==1?Kf:function(t,n){return n-t?Mv(t,n,e):Ns(isNaN(t)?n:t)}}function Kf(e,t){var n=t-e;return n?Ev(e,n):Ns(isNaN(e)?t:e)}const cl=function e(t){var n=Av(t);function r(i,a){var o=n((i=Vi(i)).r,(a=Vi(a)).r),s=n(i.g,a.g),u=n(i.b,a.b),l=Kf(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=u(f),i.opacity=l(f),i+""}}return r.gamma=e,r}(1);function Iv(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;in&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:Yi(r,i)})),n=Ya.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Bv(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i2?Vv:Bv,u=l=null,c}function c(d){return d==null||isNaN(d=+d)?a:(u||(u=s(e.map(r),t,n)))(r(o(d)))}return c.invert=function(d){return o(i((l||(l=s(t,e.map(r),Yi)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,Uv),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),n=$v,f()},c.clamp=function(d){return arguments.length?(o=d?!0:Dn,f()):o!==Dn},c.interpolate=function(d){return arguments.length?(n=d,f()):n},c.unknown=function(d){return arguments.length?(a=d,c):a},function(d,h){return r=d,i=h,f()}}function Yv(){return qv()(Dn,Dn)}function Qv(e,t,n,r){var i=jp(e,t,n),a;switch(r=qi(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Sv(i,o))&&(r.precision=a),Qf(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Dv(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Tv(i))&&(r.precision=a-(r.type==="%")*2);break}}return dn(r)}function Kv(e){var t=e.domain;return e.ticks=function(n){var r=t();return vf(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Qv(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],u,l,f=10;for(s0;){if(l=sa(o,s,n),l===u)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Qi(){var e=Yv();return e.copy=function(){return jv(e,Qi())},zv.apply(e,arguments),Kv(e)}var Qa=new Date,Ka=new Date;function Kt(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=function(a){return e(a=new Date(+a)),a},i.ceil=function(a){return e(a=new Date(a-1)),t(a,1),e(a),a},i.round=function(a){var o=i(a),s=i.ceil(a);return a-o0))return u;do u.push(l=new Date(+a)),t(a,s),e(a);while(l=o)for(;e(o),!a(o);)o.setTime(o-1)},function(o,s){if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););})},n&&(i.count=function(a,o){return Qa.setTime(+a),Ka.setTime(+o),e(Qa),e(Ka),Math.floor(n(Qa,Ka))},i.every=function(a){return a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?function(o){return r(o)%a===0}:function(o){return i.count(0,o)%a===0}):i}),i}const Gv=1e3,Ls=Gv*60,Xv=Ls*60,$s=Xv*24,Gf=$s*7;var Xf=Kt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ls)/$s,e=>e.getDate()-1);const Zf=Xf;Xf.range;function vn(e){return Kt(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ls)/Gf})}var Jf=vn(0),Ki=vn(1),Zv=vn(2),Jv=vn(3),Nn=vn(4),ey=vn(5),ty=vn(6);Jf.range;Ki.range;Zv.range;Jv.range;Nn.range;ey.range;ty.range;var zs=Kt(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});zs.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Kt(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};const Sr=zs;zs.range;var ed=Kt(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/$s},function(e){return e.getUTCDate()-1});const td=ed;ed.range;function yn(e){return Kt(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/Gf})}var nd=yn(0),Gi=yn(1),ny=yn(2),ry=yn(3),Pn=yn(4),iy=yn(5),ay=yn(6);nd.range;Gi.range;ny.range;ry.range;Pn.range;iy.range;ay.range;var Hs=Kt(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});Hs.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Kt(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};const Dr=Hs;Hs.range;function Ga(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Xa(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Xn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function oy(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,u=e.shortMonths,l=Zn(i),f=Jn(i),c=Zn(a),d=Jn(a),h=Zn(o),p=Jn(o),m=Zn(s),C=Jn(s),y=Zn(u),v=Jn(u),w={a:H,A:U,b:K,B:X,c:null,d:vl,e:vl,f:Ay,g:zy,G:Uy,H:Dy,I:Ey,j:My,L:rd,m:Iy,M:Oy,p:ne,q:j,Q:bl,s:_l,S:Ry,u:ky,U:Fy,V:Ny,w:Py,W:Ly,x:null,X:null,y:$y,Y:Hy,Z:Wy,"%":wl},D={a:oe,A:Q,b:se,B:ee,c:null,d:yl,e:yl,f:qy,g:n1,G:i1,H:By,I:Vy,j:jy,L:ad,m:Yy,M:Qy,p:fe,q:re,Q:bl,s:_l,S:Ky,u:Gy,U:Xy,V:Zy,w:Jy,W:e1,x:null,X:null,y:t1,Y:r1,Z:a1,"%":wl},g={a:k,A:b,b:M,B:x,c:I,d:ml,e:ml,f:xy,g:pl,G:hl,H:gl,I:gl,j:yy,L:_y,m:vy,M:wy,p:P,q:gy,Q:Ty,s:Sy,S:by,u:fy,U:dy,V:hy,w:cy,W:py,x:N,X:A,y:pl,Y:hl,Z:my,"%":Cy};w.x=_(n,w),w.X=_(r,w),w.c=_(t,w),D.x=_(n,D),D.X=_(r,D),D.c=_(t,D);function _(O,Y){return function(G){var R=[],ae=-1,q=0,Ce=O.length,Me,Ne,Ht;for(G instanceof Date||(G=new Date(+G));++ae53)return null;"w"in R||(R.w=1),"Z"in R?(q=Xa(Xn(R.y,0,1)),Ce=q.getUTCDay(),q=Ce>4||Ce===0?Gi.ceil(q):Gi(q),q=td.offset(q,(R.V-1)*7),R.y=q.getUTCFullYear(),R.m=q.getUTCMonth(),R.d=q.getUTCDate()+(R.w+6)%7):(q=Ga(Xn(R.y,0,1)),Ce=q.getDay(),q=Ce>4||Ce===0?Ki.ceil(q):Ki(q),q=Zf.offset(q,(R.V-1)*7),R.y=q.getFullYear(),R.m=q.getMonth(),R.d=q.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),Ce="Z"in R?Xa(Xn(R.y,0,1)).getUTCDay():Ga(Xn(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(Ce+5)%7:R.w+R.U*7-(Ce+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,Xa(R)):Ga(R)}}function F(O,Y,G,R){for(var ae=0,q=Y.length,Ce=G.length,Me,Ne;ae=Ce)return-1;if(Me=Y.charCodeAt(ae++),Me===37){if(Me=Y.charAt(ae++),Ne=g[Me in dl?Y.charAt(ae++):Me],!Ne||(R=Ne(O,G,R))<0)return-1}else if(Me!=G.charCodeAt(R++))return-1}return R}function P(O,Y,G){var R=l.exec(Y.slice(G));return R?(O.p=f.get(R[0].toLowerCase()),G+R[0].length):-1}function k(O,Y,G){var R=h.exec(Y.slice(G));return R?(O.w=p.get(R[0].toLowerCase()),G+R[0].length):-1}function b(O,Y,G){var R=c.exec(Y.slice(G));return R?(O.w=d.get(R[0].toLowerCase()),G+R[0].length):-1}function M(O,Y,G){var R=y.exec(Y.slice(G));return R?(O.m=v.get(R[0].toLowerCase()),G+R[0].length):-1}function x(O,Y,G){var R=m.exec(Y.slice(G));return R?(O.m=C.get(R[0].toLowerCase()),G+R[0].length):-1}function I(O,Y,G){return F(O,t,Y,G)}function N(O,Y,G){return F(O,n,Y,G)}function A(O,Y,G){return F(O,r,Y,G)}function H(O){return o[O.getDay()]}function U(O){return a[O.getDay()]}function K(O){return u[O.getMonth()]}function X(O){return s[O.getMonth()]}function ne(O){return i[+(O.getHours()>=12)]}function j(O){return 1+~~(O.getMonth()/3)}function oe(O){return o[O.getUTCDay()]}function Q(O){return a[O.getUTCDay()]}function se(O){return u[O.getUTCMonth()]}function ee(O){return s[O.getUTCMonth()]}function fe(O){return i[+(O.getUTCHours()>=12)]}function re(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var Y=_(O+="",w);return Y.toString=function(){return O},Y},parse:function(O){var Y=S(O+="",!1);return Y.toString=function(){return O},Y},utcFormat:function(O){var Y=_(O+="",D);return Y.toString=function(){return O},Y},utcParse:function(O){var Y=S(O+="",!0);return Y.toString=function(){return O},Y}}}var dl={"-":"",_:" ",0:"0"},Ue=/^\s*\d+/,sy=/^%/,uy=/[\\^$*+?|[\]().{}]/g;function ge(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a[t.toLowerCase(),n]))}function cy(e,t,n){var r=Ue.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function fy(e,t,n){var r=Ue.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function dy(e,t,n){var r=Ue.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function hy(e,t,n){var r=Ue.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function py(e,t,n){var r=Ue.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function hl(e,t,n){var r=Ue.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function pl(e,t,n){var r=Ue.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function my(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function gy(e,t,n){var r=Ue.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function vy(e,t,n){var r=Ue.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ml(e,t,n){var r=Ue.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function yy(e,t,n){var r=Ue.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function gl(e,t,n){var r=Ue.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function wy(e,t,n){var r=Ue.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function by(e,t,n){var r=Ue.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _y(e,t,n){var r=Ue.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function xy(e,t,n){var r=Ue.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Cy(e,t,n){var r=sy.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ty(e,t,n){var r=Ue.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Sy(e,t,n){var r=Ue.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function vl(e,t){return ge(e.getDate(),t,2)}function Dy(e,t){return ge(e.getHours(),t,2)}function Ey(e,t){return ge(e.getHours()%12||12,t,2)}function My(e,t){return ge(1+Zf.count(Sr(e),e),t,3)}function rd(e,t){return ge(e.getMilliseconds(),t,3)}function Ay(e,t){return rd(e,t)+"000"}function Iy(e,t){return ge(e.getMonth()+1,t,2)}function Oy(e,t){return ge(e.getMinutes(),t,2)}function Ry(e,t){return ge(e.getSeconds(),t,2)}function ky(e){var t=e.getDay();return t===0?7:t}function Fy(e,t){return ge(Jf.count(Sr(e)-1,e),t,2)}function id(e){var t=e.getDay();return t>=4||t===0?Nn(e):Nn.ceil(e)}function Ny(e,t){return e=id(e),ge(Nn.count(Sr(e),e)+(Sr(e).getDay()===4),t,2)}function Py(e){return e.getDay()}function Ly(e,t){return ge(Ki.count(Sr(e)-1,e),t,2)}function $y(e,t){return ge(e.getFullYear()%100,t,2)}function zy(e,t){return e=id(e),ge(e.getFullYear()%100,t,2)}function Hy(e,t){return ge(e.getFullYear()%1e4,t,4)}function Uy(e,t){var n=e.getDay();return e=n>=4||n===0?Nn(e):Nn.ceil(e),ge(e.getFullYear()%1e4,t,4)}function Wy(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ge(t/60|0,"0",2)+ge(t%60,"0",2)}function yl(e,t){return ge(e.getUTCDate(),t,2)}function By(e,t){return ge(e.getUTCHours(),t,2)}function Vy(e,t){return ge(e.getUTCHours()%12||12,t,2)}function jy(e,t){return ge(1+td.count(Dr(e),e),t,3)}function ad(e,t){return ge(e.getUTCMilliseconds(),t,3)}function qy(e,t){return ad(e,t)+"000"}function Yy(e,t){return ge(e.getUTCMonth()+1,t,2)}function Qy(e,t){return ge(e.getUTCMinutes(),t,2)}function Ky(e,t){return ge(e.getUTCSeconds(),t,2)}function Gy(e){var t=e.getUTCDay();return t===0?7:t}function Xy(e,t){return ge(nd.count(Dr(e)-1,e),t,2)}function od(e){var t=e.getUTCDay();return t>=4||t===0?Pn(e):Pn.ceil(e)}function Zy(e,t){return e=od(e),ge(Pn.count(Dr(e),e)+(Dr(e).getUTCDay()===4),t,2)}function Jy(e){return e.getUTCDay()}function e1(e,t){return ge(Gi.count(Dr(e)-1,e),t,2)}function t1(e,t){return ge(e.getUTCFullYear()%100,t,2)}function n1(e,t){return e=od(e),ge(e.getUTCFullYear()%100,t,2)}function r1(e,t){return ge(e.getUTCFullYear()%1e4,t,4)}function i1(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Pn(e):Pn.ceil(e),ge(e.getUTCFullYear()%1e4,t,4)}function a1(){return"+0000"}function wl(){return"%"}function bl(e){return+e}function _l(e){return Math.floor(+e/1e3)}var Cn,jt;o1({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function o1(e){return Cn=oy(e),jt=Cn.format,Cn.parse,Cn.utcFormat,Cn.utcParse,Cn}function fr(e,t,n){this.k=e,this.x=t,this.y=n}fr.prototype={constructor:fr,scale:function(e){return e===1?this:new fr(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new fr(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};fr.prototype;function fa(e){for(var t=-1,n=e==null?0:e.length,r={};++t-1}function h1(e,t){var n=this.__data__,r=da(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Gt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var c=-1,d=!0,h=n&bw?new Xi:void 0;for(a.set(e,t),a.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=ob}var sb="[object Arguments]",ub="[object Array]",lb="[object Boolean]",cb="[object Date]",fb="[object Error]",db="[object Function]",hb="[object Map]",pb="[object Number]",mb="[object Object]",gb="[object RegExp]",vb="[object Set]",yb="[object String]",wb="[object WeakMap]",bb="[object ArrayBuffer]",_b="[object DataView]",xb="[object Float32Array]",Cb="[object Float64Array]",Tb="[object Int8Array]",Sb="[object Int16Array]",Db="[object Int32Array]",Eb="[object Uint8Array]",Mb="[object Uint8ClampedArray]",Ab="[object Uint16Array]",Ib="[object Uint32Array]",Se={};Se[xb]=Se[Cb]=Se[Tb]=Se[Sb]=Se[Db]=Se[Eb]=Se[Mb]=Se[Ab]=Se[Ib]=!0;Se[sb]=Se[ub]=Se[bb]=Se[lb]=Se[_b]=Se[cb]=Se[fb]=Se[db]=Se[hb]=Se[pb]=Se[mb]=Se[gb]=Se[vb]=Se[yb]=Se[wb]=!1;function Ob(e){return $n(e)&&pd(e.length)&&!!Se[Bn(e)]}function Rb(e){return function(t){return e(t)}}var md=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hr=md&&typeof module=="object"&&module&&!module.nodeType&&module,kb=hr&&hr.exports===md,eo=kb&&ud.process,Fb=function(){try{var e=hr&&hr.require&&hr.require("util").types;return e||eo&&eo.binding&&eo.binding("util")}catch{}}();const Il=Fb;var Ol=Il&&Il.isTypedArray,Nb=Ol?Rb(Ol):Ob;const gd=Nb;var Pb=Object.prototype,Lb=Pb.hasOwnProperty;function $b(e,t){var n=Zi(e),r=!n&&Zw(e),i=!n&&!r&&Qo(e),a=!n&&!r&&!i&&gd(e),o=n||r||i||a,s=o?Yw(e.length,String):[],u=s.length;for(var l in e)(t||Lb.call(e,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||ab(l,u)))&&s.push(l);return s}var zb=Object.prototype;function Hb(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||zb;return e===n}function Ub(e,t){return function(n){return e(t(n))}}var Wb=Ub(Object.keys,Object);const Bb=Wb;var Vb=Object.prototype,jb=Vb.hasOwnProperty;function qb(e){if(!Hb(e))return Bb(e);var t=[];for(var n in Object(e))jb.call(e,n)&&n!="constructor"&&t.push(n);return t}function Yb(e){return e!=null&&pd(e.length)&&!cd(e)}function Qb(e){return Yb(e)?$b(e):qb(e)}function Rl(e){return Hw(e,Qb,qw)}var Kb=1,Gb=Object.prototype,Xb=Gb.hasOwnProperty;function Zb(e,t,n,r,i,a){var o=n&Kb,s=Rl(e),u=s.length,l=Rl(t),f=l.length;if(u!=f&&!o)return!1;for(var c=u;c--;){var d=s[c];if(!(o?d in t:Xb.call(t,d)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var C=o;++c1?"s":"")+" required, but only "+t.length+" present")}function h_(e){return Le(1,arguments),e instanceof Date||Qt(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function rt(e){Le(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Qt(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function pr(e){if(Le(1,arguments),!h_(e)&&typeof e!="number")return!1;var t=rt(e);return!isNaN(Number(t))}function Wl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}var m_={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},g_=function(t,n,r){var i,a=m_[t];return typeof a=="string"?i=a:n===1?i=a.one:i=a.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const v_=g_;function to(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var y_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},w_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},b_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},__={date:to({formats:y_,defaultWidth:"full"}),time:to({formats:w_,defaultWidth:"full"}),dateTime:to({formats:b_,defaultWidth:"full"})};const x_=__;var C_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},T_=function(t,n,r,i){return C_[t]};const S_=T_;function tr(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,u=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[u]||e.values[s]}var l=e.argumentCallback?e.argumentCallback(t):t;return i[l]}}var D_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},E_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},M_={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},A_={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},I_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},O_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},R_=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},k_={ordinalNumber:R_,era:tr({values:D_,defaultWidth:"wide"}),quarter:tr({values:E_,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:tr({values:M_,defaultWidth:"wide"}),day:tr({values:A_,defaultWidth:"wide"}),dayPeriod:tr({values:I_,defaultWidth:"wide",formattingValues:O_,defaultFormattingWidth:"wide"})};const F_=k_;function nr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?P_(s,function(c){return c.test(o)}):N_(s,function(c){return c.test(o)}),l;l=e.valueCallback?e.valueCallback(u):u,l=n.valueCallback?n.valueCallback(l):l;var f=t.slice(o.length);return{value:l,rest:f}}}function N_(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function P_(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var $_=/^(\d+)(th|st|nd|rd)?/i,z_=/\d+/i,H_={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},U_={any:[/^b/i,/^(a|c)/i]},W_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},B_={any:[/1/i,/2/i,/3/i,/4/i]},V_={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},j_={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},q_={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Y_={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Q_={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},K_={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},G_={ordinalNumber:L_({matchPattern:$_,parsePattern:z_,valueCallback:function(t){return parseInt(t,10)}}),era:nr({matchPatterns:H_,defaultMatchWidth:"wide",parsePatterns:U_,defaultParseWidth:"any"}),quarter:nr({matchPatterns:W_,defaultMatchWidth:"wide",parsePatterns:B_,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:nr({matchPatterns:V_,defaultMatchWidth:"wide",parsePatterns:j_,defaultParseWidth:"any"}),day:nr({matchPatterns:q_,defaultMatchWidth:"wide",parsePatterns:Y_,defaultParseWidth:"any"}),dayPeriod:nr({matchPatterns:Q_,defaultMatchWidth:"any",parsePatterns:K_,defaultParseWidth:"any"})};const X_=G_;var Z_={code:"en-US",formatDistance:v_,formatLong:x_,formatRelative:S_,localize:F_,match:X_,options:{weekStartsOn:0,firstWeekContainsDate:1}};const J_=Z_;function ft(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ex(e,t){Le(2,arguments);var n=rt(e).getTime(),r=ft(t);return new Date(n+r)}function tx(e,t){Le(2,arguments);var n=ft(t);return ex(e,-n)}function nx(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}var Vl=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},yd=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},rx=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return Vl(t,n);var o;switch(i){case"P":o=n.dateTime({width:"short"});break;case"PP":o=n.dateTime({width:"medium"});break;case"PPP":o=n.dateTime({width:"long"});break;case"PPPP":default:o=n.dateTime({width:"full"});break}return o.replace("{{date}}",Vl(i,n)).replace("{{time}}",yd(a,n))},ix={p:yd,P:rx};const jl=ix;function ax(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var ox=["D","DD"],sx=["YY","YYYY"];function ux(e){return ox.indexOf(e)!==-1}function lx(e){return sx.indexOf(e)!==-1}function ql(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}function he(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wh(e,t)}function cx(e,t){if(t&&(Qt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V(e)}function pe(e){var t=Bh();return function(){var r=yu(e),i;if(t){var a=yu(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return cx(this,i)}}function le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fx(e,t){if(Qt(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Qt(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wd(e){var t=fx(e,"string");return Qt(t)==="symbol"?t:String(t)}function Yl(e,t){for(var n=0;n0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var a=r+50,o=Math.floor(a/100)*100,s=e>=a%100;i=e+o-(s?100:0)}return n?i:1-i}function Cd(e){return e%400===0||e%4===0&&e%100!==0}var vx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o0}},{key:"set",value:function(i,a,o){var s=i.getUTCFullYear();if(o.isTwoDigitYear){var u=xd(o.year,s);return i.setUTCFullYear(u,0,1),i.setUTCHours(0,0,0,0),i}var l=!("era"in a)||a.era===1?o.year:1-o.year;return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(be),yx={};function $r(){return yx}function gn(e,t){var n,r,i,a,o,s,u,l;Le(1,arguments);var f=$r(),c=ft((n=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(u=f.locale)===null||u===void 0||(l=u.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&n!==void 0?n:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=rt(e),h=d.getUTCDay(),p=(h=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(c+1,0,h),p.setUTCHours(0,0,0,0);var m=gn(p,t),C=new Date(0);C.setUTCFullYear(c,0,h),C.setUTCHours(0,0,0,0);var y=gn(C,t);return f.getTime()>=m.getTime()?c+1:f.getTime()>=y.getTime()?c:c-1}var wx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o0}},{key:"set",value:function(i,a,o,s){var u=Td(i,s);if(o.isTwoDigitYear){var l=xd(o.year,u);return i.setUTCFullYear(l,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),gn(i,s)}var f=!("era"in a)||a.era===1?o.year:1-o.year;return i.setUTCFullYear(f,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),gn(i,s)}}]),n}(be);function zn(e){Le(1,arguments);var t=1,n=rt(e),r=n.getUTCDay(),i=(r=1&&a<=4}},{key:"set",value:function(i,a,o){return i.setUTCMonth((o-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(be),Cx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=1&&a<=4}},{key:"set",value:function(i,a,o){return i.setUTCMonth((o-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(be),Tx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=0&&a<=11}},{key:"set",value:function(i,a,o){return i.setUTCMonth(o,1),i.setUTCHours(0,0,0,0),i}}]),n}(be),Sx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=0&&a<=11}},{key:"set",value:function(i,a,o){return i.setUTCMonth(o,1),i.setUTCHours(0,0,0,0),i}}]),n}(be);function Dx(e,t){var n,r,i,a,o,s,u,l;Le(1,arguments);var f=$r(),c=ft((n=(r=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(u=f.locale)===null||u===void 0||(l=u.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&n!==void 0?n:1),d=Td(e,t),h=new Date(0);h.setUTCFullYear(d,0,c),h.setUTCHours(0,0,0,0);var p=gn(h,t);return p}var Ex=6048e5;function Mx(e,t){Le(1,arguments);var n=rt(e),r=gn(n,t).getTime()-Dx(n,t).getTime();return Math.round(r/Ex)+1}function Ax(e,t,n){Le(2,arguments);var r=rt(e),i=ft(t),a=Mx(r,n)-i;return r.setUTCDate(r.getUTCDate()-a*7),r}var Ix=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=1&&a<=53}},{key:"set",value:function(i,a,o,s){return gn(Ax(i,o,s),s)}}]),n}(be);function Ox(e){Le(1,arguments);var t=rt(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=zn(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=zn(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Rx(e){Le(1,arguments);var t=Ox(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=zn(n);return r}var kx=6048e5;function Fx(e){Le(1,arguments);var t=rt(e),n=zn(t).getTime()-Rx(t).getTime();return Math.round(n/kx)+1}function Nx(e,t){Le(2,arguments);var n=rt(e),r=ft(t),i=Fx(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var Px=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=1&&a<=53}},{key:"set",value:function(i,a,o){return zn(Nx(i,o))}}]),n}(be),Lx=[31,28,31,30,31,30,31,31,30,31,30,31],$x=[31,29,31,30,31,30,31,31,30,31,30,31],zx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=1&&a<=$x[u]:a>=1&&a<=Lx[u]}},{key:"set",value:function(i,a,o){return i.setUTCDate(o),i.setUTCHours(0,0,0,0),i}}]),n}(be),Hx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(i,a,o){return i.setUTCMonth(0,o),i.setUTCHours(0,0,0,0),i}}]),n}(be);function Vs(e,t,n){var r,i,a,o,s,u,l,f;Le(2,arguments);var c=$r(),d=ft((r=(i=(a=(o=n==null?void 0:n.weekStartsOn)!==null&&o!==void 0?o:n==null||(s=n.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&i!==void 0?i:(l=c.locale)===null||l===void 0||(f=l.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=rt(e),p=ft(t),m=h.getUTCDay(),C=p%7,y=(C+7)%7,v=(y=0&&a<=6}},{key:"set",value:function(i,a,o,s){return i=Vs(i,o,s),i.setUTCHours(0,0,0,0),i}}]),n}(be),Wx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=0&&a<=6}},{key:"set",value:function(i,a,o,s){return i=Vs(i,o,s),i.setUTCHours(0,0,0,0),i}}]),n}(be),Bx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=0&&a<=6}},{key:"set",value:function(i,a,o,s){return i=Vs(i,o,s),i.setUTCHours(0,0,0,0),i}}]),n}(be);function Vx(e,t){Le(2,arguments);var n=ft(t);n%7===0&&(n=n-7);var r=1,i=rt(e),a=i.getUTCDay(),o=n%7,s=(o+7)%7,u=(s=1&&a<=7}},{key:"set",value:function(i,a,o){return i=Vx(i,o),i.setUTCHours(0,0,0,0),i}}]),n}(be),qx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=1&&a<=12}},{key:"set",value:function(i,a,o){var s=i.getUTCHours()>=12;return s&&o<12?i.setUTCHours(o+12,0,0,0):!s&&o===12?i.setUTCHours(0,0,0,0):i.setUTCHours(o,0,0,0),i}}]),n}(be),Gx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=0&&a<=23}},{key:"set",value:function(i,a,o){return i.setUTCHours(o,0,0,0),i}}]),n}(be),Xx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=0&&a<=11}},{key:"set",value:function(i,a,o){var s=i.getUTCHours()>=12;return s&&o<12?i.setUTCHours(o+12,0,0,0):i.setUTCHours(o,0,0,0),i}}]),n}(be),Zx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=1&&a<=24}},{key:"set",value:function(i,a,o){var s=o<=24?o%24:o;return i.setUTCHours(s,0,0,0),i}}]),n}(be),Jx=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=0&&a<=59}},{key:"set",value:function(i,a,o){return i.setUTCMinutes(o,0,0),i}}]),n}(be),eC=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=0&&a<=59}},{key:"set",value:function(i,a,o){return i.setUTCSeconds(o,0),i}}]),n}(be),tC=function(e){he(n,e);var t=pe(n);function n(){var r;le(this,n);for(var i=arguments.length,a=new Array(i),o=0;o=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=ft((p=(m=(C=(y=r==null?void 0:r.weekStartsOn)!==null&&y!==void 0?y:r==null||(v=r.locale)===null||v===void 0||(w=v.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&C!==void 0?C:F.weekStartsOn)!==null&&m!==void 0?m:(D=F.locale)===null||D===void 0||(g=D.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&p!==void 0?p:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(S==="")return _===""?rt(n):new Date(NaN);var M={firstWeekContainsDate:k,weekStartsOn:b,locale:P},x=[new px],I=S.match(uC).map(function(re){var O=re[0];if(O in jl){var Y=jl[O];return Y(re,P.formatLong)}return re}).join("").match(sC),N=[],A=Bl(I),H;try{var U=function(){var O=H.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&lx(O)&&ql(O,S,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&ux(O)&&ql(O,S,e);var Y=O[0],G=oC[Y];if(G){var R=G.incompatibleTokens;if(Array.isArray(R)){var ae=N.find(function(Ce){return R.includes(Ce.token)||Ce.token===Y});if(ae)throw new RangeError("The format string mustn't contain `".concat(ae.fullToken,"` and `").concat(O,"` at the same time"))}else if(G.incompatibleTokens==="*"&&N.length>0)throw new RangeError("The format string mustn't contain `".concat(O,"` and any other token at the same time"));N.push({token:Y,fullToken:O});var q=G.run(_,O,P.match,M);if(!q)return{v:new Date(NaN)};x.push(q.setter),_=q.rest}else{if(Y.match(dC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");if(O==="''"?O="'":Y==="'"&&(O=hC(O)),_.indexOf(O)===0)_=_.slice(O.length);else return{v:new Date(NaN)}}};for(A.s();!(H=A.n()).done;){var K=U();if(Qt(K)==="object")return K.v}}catch(re){A.e(re)}finally{A.f()}if(_.length>0&&fC.test(_))return new Date(NaN);var X=x.map(function(re){return re.priority}).sort(function(re,O){return O-re}).filter(function(re,O,Y){return Y.indexOf(re)===O}).map(function(re){return x.filter(function(O){return O.priority===re}).sort(function(O,Y){return Y.subPriority-O.subPriority})}).map(function(re){return re[0]}),ne=rt(n);if(isNaN(ne.getTime()))return new Date(NaN);var j=tx(ne,ax(ne)),oe={},Q=Bl(X),se;try{for(Q.s();!(se=Q.n()).done;){var ee=se.value;if(!ee.validate(j,M))return new Date(NaN);var fe=ee.set(j,oe,M);Array.isArray(fe)?(j=fe[0],nx(oe,fe[1])):j=fe}}catch(re){Q.e(re)}finally{Q.f()}return j}function hC(e){return e.match(lC)[1].replace(cC,"'")}function pC(e,t){var n;Le(1,arguments);var r=ft((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=yC(e),a;if(i.date){var o=wC(i.date,r);a=bC(o.restDateString,o.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var s=a.getTime(),u=0,l;if(i.time&&(u=_C(i.time),isNaN(u)))return new Date(NaN);if(i.timezone){if(l=xC(i.timezone),isNaN(l))return new Date(NaN)}else{var f=new Date(s+u),c=new Date(0);return c.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),c.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),c}return new Date(s+u+l)}var ai={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},mC=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,gC=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,vC=/^([+-])(\d{2})(?::?(\d{2}))?$/;function yC(e){var t={},n=e.split(ai.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],ai.timeZoneDelimiter.test(t.date)&&(t.date=e.split(ai.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=ai.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function wC(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function bC(e,t){if(t===null)return new Date(NaN);var n=e.match(mC);if(!n)return new Date(NaN);var r=!!n[4],i=rr(n[1]),a=rr(n[2])-1,o=rr(n[3]),s=rr(n[4]),u=rr(n[5])-1;if(r)return EC(t,s,u)?CC(t,s,u):new Date(NaN);var l=new Date(0);return!SC(t,a,o)||!DC(t,i)?new Date(NaN):(l.setUTCFullYear(t,a,Math.max(i,o)),l)}function rr(e){return e?parseInt(e):1}function _C(e){var t=e.match(gC);if(!t)return NaN;var n=no(t[1]),r=no(t[2]),i=no(t[3]);return MC(n,r,i)?n*Ws+r*Us+i*1e3:NaN}function no(e){return e&&parseFloat(e.replace(",","."))||0}function xC(e){if(e==="Z")return 0;var t=e.match(vC);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return AC(r,i)?n*(r*Ws+i*Us):NaN}function CC(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var TC=[31,null,31,30,31,30,31,31,30,31,30,31];function Sd(e){return e%400===0||e%4===0&&e%100!==0}function SC(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(TC[t]||(Sd(e)?29:28))}function DC(e,t){return t>=1&&t<=(Sd(e)?366:365)}function EC(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function MC(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function AC(e,t){return t>=0&&t<=59}var pa={exports:{}},Dd={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ: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C=nf(kC);var Je={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};js.rankings=Je;var NC=function(t,n){return String(t.rankedValue).localeCompare(String(n.rankedValue))};function js(e,t,n){n===void 0&&(n={});var r=n,i=r.keys,a=r.threshold,o=a===void 0?Je.MATCHES:a,s=r.baseSort,u=s===void 0?NC:s,l=r.sorter,f=l===void 0?function(h){return h.sort(function(p,m){return zC(p,m,u)})}:l,c=e.reduce(d,[]);return f(c).map(function(h){var p=h.item;return p});function d(h,p,m){var C=PC(p,i,t,n),y=C.rank,v=C.keyThreshold,w=v===void 0?o:v;return y>=w&&h.push(me({},C,{item:p,index:m})),h}}function PC(e,t,n,r){if(!t){var i=e;return{rankedValue:i,rank:Ql(i,n,r),keyIndex:-1,keyThreshold:r.threshold}}var a=WC(e,t);return a.reduce(function(o,s,u){var l=o.rank,f=o.rankedValue,c=o.keyIndex,d=o.keyThreshold,h=s.itemValue,p=s.attributes,m=Ql(h,n,r),C=f,y=p.minRanking,v=p.maxRanking,w=p.threshold;return m=Je.MATCHES?m=y:m>v&&(m=v),m>l&&(l=m,c=u,d=w,C=h),{rankedValue:C,rank:l,keyIndex:c,keyThreshold:d}},{rankedValue:e,rank:Je.NO_MATCH,keyIndex:-1,keyThreshold:r.threshold})}function Ql(e,t,n){return e=Kl(e,n),t=Kl(t,n),t.length>e.length?Je.NO_MATCH:e===t?Je.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Je.EQUAL:e.startsWith(t)?Je.STARTS_WITH:e.includes(" "+t)?Je.WORD_STARTS_WITH:e.includes(t)?Je.CONTAINS:t.length===1?Je.NO_MATCH:LC(e).includes(t)?Je.ACRONYM:$C(e,t))}function LC(e){var t="",n=e.split(" ");return n.forEach(function(r){var i=r.split("-");i.forEach(function(a){t+=a.substr(0,1)})}),t}function $C(e,t){var n=0,r=0;function i(d,h,p){for(var m=p,C=h.length;m-1;if(!f)return Je.NO_MATCH}var c=r-o;return a(c)}function zC(e,t,n){var r=-1,i=1,a=e.rank,o=e.keyIndex,s=t.rank,u=t.keyIndex,l=a===s;return l?o===u?n(e,t):os?r:i}function Kl(e,t){var n=t.keepDiacritics;return e=""+e,n||(e=FC(e)),e}function HC(e,t){typeof t=="object"&&(t=t.key);var n;if(typeof t=="function")n=t(e);else if(e==null)n=null;else if(Object.hasOwnProperty.call(e,t))n=e[t];else{if(t.includes("."))return UC(t,e);n=null}return n==null?[]:Array.isArray(n)?n:[String(n)]}function UC(e,t){for(var n=e.split("."),r=[t],i=0,a=n.length;i0?qe(jn,--it):0,Hn--,Fe===10&&(Hn=1,ga--),Fe}function ut(){return Fe=it2||Or(Fe)>3?"":" "}function r5(e,t){for(;--t&&ut()&&!(Fe<48||Fe>102||Fe>57&&Fe<65||Fe>70&&Fe<97););return zr(e,xi()+(t<6&&Lt()==32&&ut()==32))}function ts(e){for(;ut();)switch(Fe){case e:return it;case 34:case 39:e!==34&&e!==39&&ts(Fe);break;case 40:e===41&&ts(e);break;case 92:ut();break}return it}function i5(e,t){for(;ut()&&e+Fe!==47+10;)if(e+Fe===42+42&&Lt()===47)break;return"/*"+zr(t,it-1)+"*"+ma(e===47?e:ut())}function a5(e){for(;!Or(Lt());)ut();return zr(e,it)}function o5(e){return Fd(Ti("",null,null,null,[""],e=kd(e),0,[0],e))}function Ti(e,t,n,r,i,a,o,s,u){for(var l=0,f=0,c=o,d=0,h=0,p=0,m=1,C=1,y=1,v=0,w="",D=i,g=a,_=r,S=w;C;)switch(p=v,v=ut()){case 40:if(p!=108&&qe(S,c-1)==58){es(S+=we(Ci(v),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:S+=Ci(v);break;case 9:case 10:case 13:case 32:S+=n5(p);break;case 92:S+=r5(xi()-1,7);continue;case 47:switch(Lt()){case 42:case 47:oi(s5(i5(ut(),xi()),t,n),u);break;default:S+="/"}break;case 123*m:s[l++]=Et(S)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:C=0;case 59+f:y==-1&&(S=we(S,/\f/g,"")),h>0&&Et(S)-c&&oi(h>32?Zl(S+";",r,n,c-1):Zl(we(S," ","")+";",r,n,c-2),u);break;case 59:S+=";";default:if(oi(_=Xl(S,t,n,l,f,i,s,w,D=[],g=[],c),a),v===123)if(f===0)Ti(S,t,_,_,D,a,c,s,g);else switch(d===99&&qe(S,3)===110?100:d){case 100:case 108:case 109:case 115:Ti(e,_,_,r&&oi(Xl(e,_,_,0,0,i,s,w,i,D=[],c),g),i,g,c,s,r?D:g);break;default:Ti(S,_,_,_,[""],g,0,s,g)}}l=f=h=0,m=y=1,w=S="",c=o;break;case 58:c=1+Et(S),h=p;default:if(m<1){if(v==123)--m;else if(v==125&&m++==0&&t5()==125)continue}switch(S+=ma(v),v*m){case 38:y=f>0?1:(S+="\f",-1);break;case 44:s[l++]=(Et(S)-1)*y,y=1;break;case 64:Lt()===45&&(S+=Ci(ut())),d=Lt(),f=c=Et(w=S+=a5(xi())),v++;break;case 45:p===45&&Et(S)==2&&(m=0)}}return a}function Xl(e,t,n,r,i,a,o,s,u,l,f){for(var c=i-1,d=i===0?a:[""],h=Qs(d),p=0,m=0,C=0;p0?d[y]+" "+v:we(v,/&\f/g,d[y])))&&(u[C++]=w);return va(e,t,n,i===0?qs:s,u,l,f)}function s5(e,t,n){return va(e,t,n,Ad,ma(e5()),Ir(e,2,-2),0)}function Zl(e,t,n,r){return va(e,t,n,Ys,Ir(e,0,r),Ir(e,r+1,-1),r)}function In(e,t){for(var n="",r=Qs(e),i=0;i6)switch(qe(e,t+1)){case 109:if(qe(e,t+4)!==45)break;case 102:return we(e,/(.+:)(.+)-([^]+)/,"$1"+ye+"$2-$3$1"+ea+(qe(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~es(e,"stretch")?Nd(we(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(qe(e,t+1)!==115)break;case 6444:switch(qe(e,Et(e)-3-(~es(e,"!important")&&10))){case 107:return we(e,":",":"+ye)+e;case 101:return we(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ye+(qe(e,14)===45?"inline-":"")+"box$3$1"+ye+"$2$3$1"+Ge+"$2box$3")+e}break;case 5936:switch(qe(e,t+11)){case 114:return ye+e+Ge+we(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ye+e+Ge+we(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ye+e+Ge+we(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ye+e+Ge+e+e}return e}var v5=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Ys:t.return=Nd(t.value,t.length);break;case Id:return In([ir(t,{value:we(t.value,"@","@"+ye)})],i);case qs:if(t.length)return JC(t.props,function(a){switch(ZC(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return In([ir(t,{props:[we(a,/:(read-\w+)/,":"+ea+"$1")]})],i);case"::placeholder":return In([ir(t,{props:[we(a,/:(plac\w+)/,":"+ye+"input-$1")]}),ir(t,{props:[we(a,/:(plac\w+)/,":"+ea+"$1")]}),ir(t,{props:[we(a,/:(plac\w+)/,Ge+"input-$1")]})],i)}return""})}},y5=[v5],w5=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var C=m.getAttribute("data-emotion");C.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||y5,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var C=m.getAttribute("data-emotion").split(" "),y=1;y=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var R5={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},k5=/[A-Z]|^ms/g,F5=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ud=function(t){return t.charCodeAt(1)===45},ec=function(t){return t!=null&&typeof t!="boolean"},ro=f5(function(e){return Ud(e)?e:e.replace(k5,"-$&").toLowerCase()}),tc=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(F5,function(r,i,a){return Mt={name:i,styles:a,next:Mt},i})}return R5[t]!==1&&!Ud(t)&&typeof n=="number"&&n!==0?n+"px":n};function Rr(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Mt={name:n.name,styles:n.styles,next:Mt},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Mt={name:r.name,styles:r.styles,next:Mt},r=r.next;var i=n.styles+";";return i}return N5(e,t,n)}case"function":{if(e!==void 0){var a=Mt,o=n(e);return Mt=a,Rr(e,t,o)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function N5(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Si(e,t,n){return B5()?Si=Reflect.construct:Si=function(i,a,o){var s=[null];s.push.apply(s,a);var u=Function.bind.apply(i,s),l=new u;return o&&rs(l,o.prototype),l},Si.apply(null,arguments)}function _t(e){return V5(e)||j5(e)||q5(e)||Y5()}function V5(e){if(Array.isArray(e))return is(e)}function j5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function q5(e,t){if(e){if(typeof e=="string")return is(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return is(e,t)}}function is(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),i=1;i/gm),u2=Ct(/\${[\w\W]*}/gm),l2=Ct(/^data-[\-\w.\u00B7-\uFFFF]/),c2=Ct(/^aria-[\-\w]+$/),f2=Ct(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),d2=Ct(/^(?:\w+script|data):/i),h2=Ct(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),p2=Ct(/^html$/i),m2=function(){return typeof window>"u"?null:window},g2=function(t,n){if(nn(t)!=="object"||typeof t.createPolicy!="function")return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:function(s){return s},createScriptURL:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function Vd(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m2(),t=function(T){return Vd(T)};if(t.version="2.4.5",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;var n=e.document,r=e.document,i=e.DocumentFragment,a=e.HTMLTemplateElement,o=e.Node,s=e.Element,u=e.NodeFilter,l=e.NamedNodeMap,f=l===void 0?e.NamedNodeMap||e.MozNamedAttrMap:l,c=e.HTMLFormElement,d=e.DOMParser,h=e.trustedTypes,p=s.prototype,m=si(p,"cloneNode"),C=si(p,"nextSibling"),y=si(p,"childNodes"),v=si(p,"parentNode");if(typeof a=="function"){var w=r.createElement("template");w.content&&w.content.ownerDocument&&(r=w.content.ownerDocument)}var D=g2(h,n),g=D?D.createHTML(""):"",_=r,S=_.implementation,F=_.createNodeIterator,P=_.createDocumentFragment,k=_.getElementsByTagName,b=n.importNode,M={};try{M=un(r).documentMode?r.documentMode:{}}catch{}var x={};t.isSupported=typeof v=="function"&&S&&typeof S.createHTMLDocument<"u"&&M!==9;var I=o2,N=s2,A=u2,H=l2,U=c2,K=d2,X=h2,ne=f2,j=null,oe=ie({},[].concat(_t(ac),_t(oo),_t(so),_t(uo),_t(oc))),Q=null,se=ie({},[].concat(_t(sc),_t(lo),_t(uc),_t(ui))),ee=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),fe=null,re=null,O=!0,Y=!0,G=!1,R=!0,ae=!1,q=!1,Ce=!1,Me=!1,Ne=!1,Ht=!1,te=!1,xe=!0,ue=!1,Ye="user-content-",ke=!0,Be=!1,Qe={},$e=null,Ut=ie({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),at=null,Kr=ie({},["audio","video","img","source","image","track"]),qn=null,Gr=ie({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_n="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",wt="http://www.w3.org/1999/xhtml",an=wt,Yn=!1,Qn=null,Ra=ie({},[_n,Xt,wt],io),on,Fh=["application/xhtml+xml","text/html"],Nh="text/html",ze,xn=null,Ph=r.createElement("form"),uu=function(T){return T instanceof RegExp||T instanceof Function},ka=function(T){xn&&xn===T||((!T||nn(T)!=="object")&&(T={}),T=un(T),on=Fh.indexOf(T.PARSER_MEDIA_TYPE)===-1?on=Nh:on=T.PARSER_MEDIA_TYPE,ze=on==="application/xhtml+xml"?io:Di,j="ALLOWED_TAGS"in T?ie({},T.ALLOWED_TAGS,ze):oe,Q="ALLOWED_ATTR"in T?ie({},T.ALLOWED_ATTR,ze):se,Qn="ALLOWED_NAMESPACES"in T?ie({},T.ALLOWED_NAMESPACES,io):Ra,qn="ADD_URI_SAFE_ATTR"in T?ie(un(Gr),T.ADD_URI_SAFE_ATTR,ze):Gr,at="ADD_DATA_URI_TAGS"in T?ie(un(Kr),T.ADD_DATA_URI_TAGS,ze):Kr,$e="FORBID_CONTENTS"in T?ie({},T.FORBID_CONTENTS,ze):Ut,fe="FORBID_TAGS"in T?ie({},T.FORBID_TAGS,ze):{},re="FORBID_ATTR"in T?ie({},T.FORBID_ATTR,ze):{},Qe="USE_PROFILES"in T?T.USE_PROFILES:!1,O=T.ALLOW_ARIA_ATTR!==!1,Y=T.ALLOW_DATA_ATTR!==!1,G=T.ALLOW_UNKNOWN_PROTOCOLS||!1,R=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=T.SAFE_FOR_TEMPLATES||!1,q=T.WHOLE_DOCUMENT||!1,Ne=T.RETURN_DOM||!1,Ht=T.RETURN_DOM_FRAGMENT||!1,te=T.RETURN_TRUSTED_TYPE||!1,Me=T.FORCE_BODY||!1,xe=T.SANITIZE_DOM!==!1,ue=T.SANITIZE_NAMED_PROPS||!1,ke=T.KEEP_CONTENT!==!1,Be=T.IN_PLACE||!1,ne=T.ALLOWED_URI_REGEXP||ne,an=T.NAMESPACE||wt,ee=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&uu(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ee.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&uu(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ee.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ee.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ae&&(Y=!1),Ht&&(Ne=!0),Qe&&(j=ie({},_t(oc)),Q=[],Qe.html===!0&&(ie(j,ac),ie(Q,sc)),Qe.svg===!0&&(ie(j,oo),ie(Q,lo),ie(Q,ui)),Qe.svgFilters===!0&&(ie(j,so),ie(Q,lo),ie(Q,ui)),Qe.mathMl===!0&&(ie(j,uo),ie(Q,uc),ie(Q,ui))),T.ADD_TAGS&&(j===oe&&(j=un(j)),ie(j,T.ADD_TAGS,ze)),T.ADD_ATTR&&(Q===se&&(Q=un(Q)),ie(Q,T.ADD_ATTR,ze)),T.ADD_URI_SAFE_ATTR&&ie(qn,T.ADD_URI_SAFE_ATTR,ze),T.FORBID_CONTENTS&&($e===Ut&&($e=un($e)),ie($e,T.FORBID_CONTENTS,ze)),ke&&(j["#text"]=!0),q&&ie(j,["html","head","body"]),j.table&&(ie(j,["tbody"]),delete fe.tbody),et&&et(T),xn=T)},lu=ie({},["mi","mo","mn","ms","mtext"]),cu=ie({},["foreignobject","desc","title","annotation-xml"]),Lh=ie({},["title","style","font","a","script"]),Xr=ie({},oo);ie(Xr,so),ie(Xr,i2);var Fa=ie({},uo);ie(Fa,a2);var $h=function(T){var L=v(T);(!L||!L.tagName)&&(L={namespaceURI:an,tagName:"template"});var W=Di(T.tagName),ve=Di(L.tagName);return Qn[T.namespaceURI]?T.namespaceURI===Xt?L.namespaceURI===wt?W==="svg":L.namespaceURI===_n?W==="svg"&&(ve==="annotation-xml"||lu[ve]):!!Xr[W]:T.namespaceURI===_n?L.namespaceURI===wt?W==="math":L.namespaceURI===Xt?W==="math"&&cu[ve]:!!Fa[W]:T.namespaceURI===wt?L.namespaceURI===Xt&&!cu[ve]||L.namespaceURI===_n&&!lu[ve]?!1:!Fa[W]&&(Lh[W]||!Xr[W]):!!(on==="application/xhtml+xml"&&Qn[T.namespaceURI]):!1},Wt=function(T){ar(t.removed,{element:T});try{T.parentNode.removeChild(T)}catch{try{T.outerHTML=g}catch{T.remove()}}},Na=function(T,L){try{ar(t.removed,{attribute:L.getAttributeNode(T),from:L})}catch{ar(t.removed,{attribute:null,from:L})}if(L.removeAttribute(T),T==="is"&&!Q[T])if(Ne||Ht)try{Wt(L)}catch{}else try{L.setAttribute(T,"")}catch{}},fu=function(T){var L,W;if(Me)T=""+T;else{var ve=e2(T,/^[\r\n\t ]+/);W=ve&&ve[0]}on==="application/xhtml+xml"&&an===wt&&(T=''+T+"");var tt=D?D.createHTML(T):T;if(an===wt)try{L=new d().parseFromString(tt,on)}catch{}if(!L||!L.documentElement){L=S.createDocument(an,"template",null);try{L.documentElement.innerHTML=Yn?g:tt}catch{}}var Ke=L.body||L.documentElement;return T&&W&&Ke.insertBefore(r.createTextNode(W),Ke.childNodes[0]||null),an===wt?k.call(L,q?"html":"body")[0]:q?L.documentElement:Ke},du=function(T){return F.call(T.ownerDocument||T,T,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},zh=function(T){return T instanceof c&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof f)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},Kn=function(T){return nn(o)==="object"?T instanceof o:T&&nn(T)==="object"&&typeof T.nodeType=="number"&&typeof T.nodeName=="string"},Bt=function(T,L,W){x[T]&&J5(x[T],function(ve){ve.call(t,L,W,xn)})},hu=function(T){var L;if(Bt("beforeSanitizeElements",T,null),zh(T)||Ze(/[\u0080-\uFFFF]/,T.nodeName))return Wt(T),!0;var W=ze(T.nodeName);if(Bt("uponSanitizeElement",T,{tagName:W,allowedTags:j}),T.hasChildNodes()&&!Kn(T.firstElementChild)&&(!Kn(T.content)||!Kn(T.content.firstElementChild))&&Ze(/<[/\w]/g,T.innerHTML)&&Ze(/<[/\w]/g,T.textContent)||W==="select"&&Ze(/