@undrr/undrr-mangrove 1.3.3 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -29
- package/components/BarChart.js +2 -2
- package/components/BookCard.js +6 -0
- package/components/BookCard.js.LICENSE.txt +11 -0
- package/components/Breadcrumbs.js +6 -0
- package/components/Breadcrumbs.js.LICENSE.txt +9 -0
- package/components/Checkbox.js +6 -0
- package/components/Checkbox.js.LICENSE.txt +9 -0
- package/components/Chips.js +6 -0
- package/components/Chips.js.LICENSE.txt +9 -0
- package/components/CtaButton.js +6 -0
- package/components/CtaButton.js.LICENSE.txt +9 -0
- package/components/EmbedContainer.js +6 -0
- package/components/EmbedContainer.js.LICENSE.txt +9 -0
- package/components/Fetcher.js +2 -2
- package/components/Footer.js +6 -0
- package/components/Footer.js.LICENSE.txt +9 -0
- package/components/FormErrorSummary.js +6 -0
- package/components/FormErrorSummary.js.LICENSE.txt +9 -0
- package/components/FormGroup.js +6 -0
- package/components/FormGroup.js.LICENSE.txt +9 -0
- package/components/FullWidth.js +6 -0
- package/components/FullWidth.js.LICENSE.txt +9 -0
- package/components/Gallery.js +1 -1
- package/components/Hero.js +6 -0
- package/components/Hero.js.LICENSE.txt +9 -0
- package/components/HighlightBox.js +6 -0
- package/components/HighlightBox.js.LICENSE.txt +9 -0
- package/components/HorizontalBookCard.js +6 -0
- package/components/HorizontalBookCard.js.LICENSE.txt +11 -0
- package/components/HorizontalCard.js +6 -0
- package/components/HorizontalCard.js.LICENSE.txt +11 -0
- package/components/IconCard.js +2 -2
- package/components/Loader.js +6 -0
- package/components/Loader.js.LICENSE.txt +9 -0
- package/components/MapComponent.js +2 -2
- package/components/MegaMenu.js +2 -2
- package/components/PageHeader.js +6 -0
- package/components/PageHeader.js.LICENSE.txt +9 -0
- package/components/Pager.js +2 -2
- package/components/QuoteHighlight.js +1 -1
- package/components/Radio.js +6 -0
- package/components/Radio.js.LICENSE.txt +9 -0
- package/components/ScrollContainer.js +1 -1
- package/components/Select.js +6 -0
- package/components/Select.js.LICENSE.txt +9 -0
- package/components/ShareButtons.js +1 -1
- package/components/ShowMore.js +6 -0
- package/components/ShowMore.js.LICENSE.txt +9 -0
- package/components/StatsCard.js +2 -2
- package/components/SyndicationSearchWidget.js +2 -2
- package/components/Tab.js +6 -0
- package/components/Tab.js.LICENSE.txt +9 -0
- package/components/TextCta.js +6 -0
- package/components/TextCta.js.LICENSE.txt +11 -0
- package/components/TextInput.js +6 -0
- package/components/TextInput.js.LICENSE.txt +9 -0
- package/components/Textarea.js +6 -0
- package/components/Textarea.js.LICENSE.txt +9 -0
- package/components/VerticalCard.js +6 -0
- package/components/VerticalCard.js.LICENSE.txt +11 -0
- package/components/hydrate.js +1 -1
- package/css/style-delta.css +467 -0
- package/css/style-delta.css.map +1 -0
- package/css/style-gutenberg.css +21 -18
- package/css/style-gutenberg.css.map +1 -1
- package/css/style-irp-legacy.css +472 -0
- package/css/style-irp-legacy.css.map +1 -0
- package/css/style-irp.css +99 -103
- package/css/style-irp.css.map +1 -1
- package/css/style-legacy.css +465 -0
- package/css/style-legacy.css.map +1 -0
- package/css/style-mcr-legacy.css +472 -0
- package/css/style-mcr-legacy.css.map +1 -0
- package/css/style-mcr.css +99 -103
- package/css/style-mcr.css.map +1 -1
- package/css/style-preventionweb-legacy.css +472 -0
- package/css/style-preventionweb-legacy.css.map +1 -0
- package/css/style-preventionweb.css +99 -103
- package/css/style-preventionweb.css.map +1 -1
- package/css/style.css +99 -103
- package/css/style.css.map +1 -1
- package/error-pages/401.html +10 -11
- package/error-pages/403.html +11 -12
- package/error-pages/404.html +13 -14
- package/error-pages/429.html +12 -13
- package/error-pages/500.html +10 -11
- package/error-pages/502.html +12 -13
- package/error-pages/503.html +12 -13
- package/error-pages/504.html +10 -11
- package/error-pages/5xx.html +10 -11
- package/error-pages/challenge.html +12 -13
- package/error-pages/managed-challenge.html +12 -13
- package/js/README.md +57 -0
- package/js/__tests__/show-more.test.js +76 -0
- package/js/__tests__/table-of-contents.test.js +198 -0
- package/js/on-this-page-nav.js +531 -0
- package/js/show-more.js +24 -3
- package/js/table-of-contents.js +168 -0
- package/js/tabs.js +445 -83
- package/package.json +1 -1
- package/scss/Atom/BaseTypography/Blockquote/blockquote.scss +1 -8
- package/scss/Atom/BaseTypography/Cite/cite.scss +2 -2
- package/scss/Atom/Images/AuthorImage/author-image.scss +4 -4
- package/scss/Atom/Images/ImageCaptionCredit/image-caption-credit.scss +24 -28
- package/scss/Atom/Images/ImageCredit/image-credit.scss +1 -1
- package/scss/Atom/Layout/Container/container.scss +2 -2
- package/scss/Atom/Layout/Grid/grid.scss +1 -1
- package/scss/Atom/ReachElement/Details/details.scss +6 -6
- package/scss/Atom/ReachElement/Figcaption/figcaption.scss +1 -1
- package/scss/Atom/Table/table.scss +0 -8
- package/scss/Components/Boilerplate/boilerplate.scss +2 -2
- package/scss/Components/Breadcrumbs/breadcrumbs.scss +2 -9
- package/scss/Components/Buttons/Chips/chips.scss +5 -19
- package/scss/Components/Buttons/CtaButton/buttons.scss +3 -124
- package/scss/Components/Buttons/CtaButton/cta-button.scss +99 -0
- package/scss/Components/Buttons/ShareButtons/share-buttons.scss +2 -2
- package/scss/Components/Cards/Card/card.scss +45 -6
- package/scss/Components/Cards/StatsCard/stats-card.scss +2 -2
- package/scss/Components/ErrorPages/error-pages.scss +12 -12
- package/scss/Components/Footer/footer.scss +72 -4
- package/scss/Components/Forms/Select/select.scss +2 -2
- package/scss/Components/Forms/_form-base.scss +5 -5
- package/scss/Components/Forms/_form-legacy.scss +1 -1
- package/scss/Components/Gallery/gallery.scss +7 -7
- package/scss/Components/Hero/hero.scss +43 -23
- package/scss/Components/HighlightBox/highlight-box.scss +5 -5
- package/scss/Components/MegaMenu/mega-menu.scss +750 -0
- package/scss/Components/MegaMenu/megamenu.scss +3 -733
- package/scss/Components/OnThisPageNav/on-this-page-nav.scss +206 -0
- package/scss/Components/PageHeader/page-header.scss +5 -5
- package/scss/Components/Pagination/pagination.scss +2 -2
- package/scss/Components/ScrollContainer/scroll-container.scss +1 -1
- package/scss/Components/Snackbar/snackbar.scss +1 -1
- package/scss/Components/SyndicationSearchWidget/SyndicationSearchWidget.scss +3 -1480
- package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +1515 -0
- package/scss/Components/Tab/tab.scss +68 -9
- package/scss/Components/TableOfContents/TableOfContents.scss +3 -17
- package/scss/Components/TableOfContents/table-of-contents.scss +17 -0
- package/scss/Components/TextCta/text-cta.scss +139 -0
- package/scss/Components/TextCta/textcta.scss +3 -27
- package/scss/Molecules/ImageCaption/image-caption.scss +6 -16
- package/scss/Molecules/SectionHeader/section-header.scss +8 -0
- package/scss/Molecules/SectionHeader/sectionheader.scss +3 -8
- package/scss/Utilities/FullWidth/FullWidth.scss +3 -23
- package/scss/Utilities/FullWidth/full-width.scss +23 -0
- package/scss/Utilities/Loader/loader.scss +1 -1
- package/scss/Utilities/ShowMore/ShowMore.scss +3 -26
- package/scss/Utilities/ShowMore/show-more.scss +26 -0
- package/scss/assets/scss/_components.scss +15 -9
- package/scss/assets/scss/_foundational.scss +13 -7
- package/scss/assets/scss/_mixins.scss +9 -314
- package/scss/assets/scss/_utility.scss +19 -71
- package/scss/assets/scss/_variables-delta.scss +110 -0
- package/scss/assets/scss/_variables-irp.scss +1 -1
- package/scss/assets/scss/_variables-mcr.scss +1 -1
- package/scss/assets/scss/_variables-preventionweb.scss +1 -1
- package/scss/assets/scss/_variables.scss +101 -34
- package/scss/assets/scss/style-delta.scss +8 -0
- package/scss/assets/scss/style-gutenberg.scss +2 -2
- package/scss/assets/scss/style-irp-legacy.scss +20 -0
- package/scss/assets/scss/style-legacy.scss +20 -0
- package/scss/assets/scss/style-mcr-legacy.scss +20 -0
- package/scss/assets/scss/style-preventionweb-legacy.scss +20 -0
- package/scss/Components/BlockquoteComponent/blockquotecomp.scss +0 -31
- package/scss/Components/Buttons/CtaLink/cta-link.scss +0 -61
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ If there is a Component or Pattern that you need, or you have any other feedback
|
|
|
15
15
|
|
|
16
16
|
## Getting started
|
|
17
17
|
|
|
18
|
-
**[→ View the complete getting started guide](https://unisdr.github.io/undrr-mangrove/?path=/docs/getting-started-
|
|
18
|
+
**[→ View the complete getting started guide](https://unisdr.github.io/undrr-mangrove/?path=/docs/getting-started-getting-started-guide--docs)** for detailed integration instructions, code examples, and best practices.
|
|
19
19
|
|
|
20
20
|
### Installation
|
|
21
21
|
|
|
@@ -55,8 +55,7 @@ The project uses the following branching strategy:
|
|
|
55
55
|
|
|
56
56
|
For production use:
|
|
57
57
|
|
|
58
|
-
- Stable releases
|
|
59
|
-
- Note: tagged releases are not yet available as we are still in an alpha phase
|
|
58
|
+
- Stable releases are published as [tagged releases on GitHub](https://github.com/unisdr/undrr-mangrove/releases) and on [npm](https://www.npmjs.com/package/@undrr/undrr-mangrove)
|
|
60
59
|
- The `dev` branch is not used
|
|
61
60
|
|
|
62
61
|
When creating a new feature or fix:
|
|
@@ -79,10 +78,10 @@ yarn docker-install
|
|
|
79
78
|
# Build the project for release inside the Docker container
|
|
80
79
|
yarn docker-build
|
|
81
80
|
|
|
82
|
-
# Watch for component changes
|
|
81
|
+
# Watch for component changes and rebuild (inside Docker)
|
|
83
82
|
yarn docker-watch
|
|
84
83
|
|
|
85
|
-
# Watch for component changes
|
|
84
|
+
# Watch for component changes and rebuild (direct)
|
|
86
85
|
yarn watch
|
|
87
86
|
|
|
88
87
|
# Lint the codebase inside the Docker container
|
|
@@ -106,7 +105,7 @@ make run
|
|
|
106
105
|
# Lint the codebase
|
|
107
106
|
make lint
|
|
108
107
|
|
|
109
|
-
# Watch for component changes
|
|
108
|
+
# Watch for component changes and rebuild
|
|
110
109
|
make watch
|
|
111
110
|
|
|
112
111
|
# Build for release (default mode is production, you can override it with --mode=development)
|
|
@@ -132,7 +131,7 @@ docker exec -it undrr-mangrove-client-1 bash -c "yarn install"
|
|
|
132
131
|
# Run Storybook locally
|
|
133
132
|
docker exec -it undrr-mangrove-client-1 bash -c "yarn run storybook --ci"
|
|
134
133
|
|
|
135
|
-
# Watch for component changes
|
|
134
|
+
# Watch for component changes and rebuild
|
|
136
135
|
docker exec -it undrr-mangrove-client-1 bash -c "yarn run watch"
|
|
137
136
|
|
|
138
137
|
# Build the project for release (default mode is production)
|
|
@@ -219,25 +218,33 @@ yarn test:coverage
|
|
|
219
218
|
|
|
220
219
|
## Compiled assets
|
|
221
220
|
|
|
222
|
-
|
|
223
|
-
<https://gitlab.com/undrr/web-backlog/-/issues/545>
|
|
221
|
+
Compiled assets are available via npm (`@undrr/undrr-mangrove`) and the [UNDRR CDN](https://assets.undrr.org/static/mangrove/). The `dist` directory contains:
|
|
224
222
|
|
|
225
|
-
|
|
223
|
+
- `dist/components/`: compiled React component ES modules (e.g., `ShareButtons.js`)
|
|
224
|
+
- `dist/css/`: compiled theme stylesheets
|
|
225
|
+
- `dist/js/`: vanilla JS utilities
|
|
226
226
|
|
|
227
|
-
|
|
228
|
-
- example: `dist/components/ShareButtons.js`
|
|
229
|
-
- `dist/assets`: the compiled static assets ... jpg, css, web fonts, etc.
|
|
230
|
-
- example: `dist/assets/css/style-preventionweb.css`
|
|
231
|
-
- `dist/assets/fonts/mangrove-icon-set/font/mangrove-icon-set.woff2`
|
|
227
|
+
## AI and agent integration
|
|
232
228
|
|
|
233
|
-
|
|
229
|
+
The build generates static JSON files with component metadata so AI coding agents can look up Mangrove components without parsing the Storybook SPA. After deploy, these are available at:
|
|
230
|
+
|
|
231
|
+
- [`llms.txt`](https://unisdr.github.io/undrr-mangrove/llms.txt) -- project summary and conventions
|
|
232
|
+
- [`ai-components/index.json`](https://unisdr.github.io/undrr-mangrove/ai-components/index.json) -- all components with names, imports, and links to detail files
|
|
233
|
+
- `ai-components/{id}.json` -- per-component props, types, defaults, and code examples
|
|
234
|
+
|
|
235
|
+
See the [AI and MCP integration guide](https://unisdr.github.io/undrr-mangrove/?path=/docs/getting-started-ai-and-mcp-integration--docs) for details on directing agents to Mangrove and configuring Claude Code, Cursor, or Copilot.
|
|
236
|
+
|
|
237
|
+
## Developer resources
|
|
234
238
|
|
|
235
239
|
For contributing to this library:
|
|
236
240
|
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
-
|
|
240
|
-
-
|
|
241
|
+
- [All documentation](./docs/README.md) - Complete guide index
|
|
242
|
+
- [Component guide](./docs/COMPONENT-GUIDE.md) - Step-by-step tutorial for building a component
|
|
243
|
+
- [Development guide](./docs/DEVELOPMENT.md) - Setup, workflow, and coding standards
|
|
244
|
+
- [Storybook developer docs](https://unisdr.github.io/undrr-mangrove/?path=/docs/getting-started-getting-started-guide--docs) - Interactive component documentation and usage examples
|
|
245
|
+
- [Testing guide](./docs/TESTING.md) - Unit, visual, and accessibility testing
|
|
246
|
+
- [Accessibility](./docs/ACCESSIBILITY.md) - WCAG 2.2 AA requirements and testing
|
|
247
|
+
- [Release process](./docs/RELEASES.md) - Versioning and publishing
|
|
241
248
|
|
|
242
249
|
## Package Contents
|
|
243
250
|
|
|
@@ -255,17 +262,14 @@ For CDN and static asset hosting in the [UNDRR Static assets repo](https://gitla
|
|
|
255
262
|
|
|
256
263
|
### Production CDN
|
|
257
264
|
|
|
258
|
-
|
|
265
|
+
Production sites should pin to a specific version:
|
|
259
266
|
|
|
260
267
|
```
|
|
261
268
|
https://assets.undrr.org/static/sitemap.html#mangrove-1-2-10
|
|
262
269
|
https://assets.undrr.org/static/mangrove/README.md
|
|
263
|
-
https://assets.undrr.org/static/mangrove/
|
|
264
|
-
https://assets.undrr.org/static/mangrove/
|
|
265
|
-
https://assets.undrr.org/static/mangrove/
|
|
266
|
-
https://assets.undrr.org/static/mangrove/1.3.3/css/style.css
|
|
267
|
-
https://assets.undrr.org/static/mangrove/1.3.3/components/MegaMenu.js
|
|
268
|
-
https://assets.undrr.org/static/mangrove/1.3.3/js/tabs.js
|
|
270
|
+
https://assets.undrr.org/static/mangrove/1.4.1/css/style.css
|
|
271
|
+
https://assets.undrr.org/static/mangrove/1.4.1/components/MegaMenu.js
|
|
272
|
+
https://assets.undrr.org/static/mangrove/1.4.1/js/tabs.js
|
|
269
273
|
```
|
|
270
274
|
|
|
271
275
|
#### Bleeding edge test rep
|
|
@@ -273,7 +277,7 @@ https://assets.undrr.org/static/mangrove/1.3.3/js/tabs.js
|
|
|
273
277
|
```
|
|
274
278
|
https://assets.undrr.org/testing/static/sitemap.html#mangrove-1-2-4
|
|
275
279
|
https://assets.undrr.org/testing/static/mangrove/latest/css/style.css
|
|
276
|
-
https://assets.undrr.org/static/mangrove/1.
|
|
280
|
+
https://assets.undrr.org/static/mangrove/1.4.1/css/style.css
|
|
277
281
|
... etc
|
|
278
282
|
```
|
|
279
283
|
|
|
@@ -300,7 +304,7 @@ npm outdated
|
|
|
300
304
|
npm update
|
|
301
305
|
```
|
|
302
306
|
|
|
303
|
-
**Note**:
|
|
307
|
+
**Note**: Production sites should use versioned CDN paths (e.g., `/static/mangrove/1.4.0/`) for stability. A `latest` alias is available for testing but may change without notice.
|
|
304
308
|
|
|
305
309
|
## Assorted technical notes
|
|
306
310
|
|
package/components/BarChart.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
-
* Compiled on: 2026-
|
|
3
|
+
* Compiled on: 2026-04-03T08:59:34.689Z
|
|
4
4
|
*/
|
|
5
5
|
/*! For license information please see BarChart.js.LICENSE.txt */
|
|
6
|
-
import{useEffect as t,useRef as n,useState as e}from"react";var r={9698(t,n){var e=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),n.jsx=function(t,n,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==n.key&&(i=""+n.key),"key"in n)for(var o in r={},n)"key"!==o&&(r[o]=n[o]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:i,ref:void 0!==n?n:null,props:r}}},4848(t,n,e){t.exports=e(9698)}},i={};function o(t){var n=i[t];if(void 0!==n)return n.exports;var e=i[t]={exports:{}};return r[t](e,e.exports,o),e.exports}function a(){}function u(t){return null==t?a:function(){return this.querySelector(t)}}function l(){return[]}function s(t){return function(n){return n.matches(t)}}o.d=(t,n)=>{for(var e in n)o.o(n,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},o.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n);var c=Array.prototype.find;function h(){return this.firstElementChild}var f=Array.prototype.filter;function p(){return Array.from(this.children)}function d(t){return new Array(t.length)}function g(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function m(t,n,e,r,i,o){for(var a,u=0,l=n.length,s=o.length;u<s;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new g(t,o[u]);for(;u<l;++u)(a=n[u])&&(i[u]=a)}function y(t,n,e,r,i,o,a){var u,l,s,c=new Map,h=n.length,f=o.length,p=new Array(h);for(u=0;u<h;++u)(l=n[u])&&(p[u]=s=a.call(l,l.__data__,u,n)+"",c.has(s)?i[u]=l:c.set(s,l));for(u=0;u<f;++u)s=a.call(t,o[u],u,o)+"",(l=c.get(s))?(r[u]=l,l.__data__=o[u],c.delete(s)):e[u]=new g(t,o[u]);for(u=0;u<h;++u)(l=n[u])&&c.get(p[u])===l&&(i[u]=l)}function v(t){return t.__data__}function w(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function b(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}g.prototype={constructor:g,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var x="http://www.w3.org/1999/xhtml";const _={svg:"http://www.w3.org/2000/svg",xhtml:x,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function M(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),_.hasOwnProperty(n)?{space:_[n],local:t}:t}function k(t){return function(){this.removeAttribute(t)}}function A(t){return function(){this.removeAttributeNS(t.space,t.local)}}function N(t,n){return function(){this.setAttribute(t,n)}}function $(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function S(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function E(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function C(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function j(t){return function(){this.style.removeProperty(t)}}function O(t,n,e){return function(){this.style.setProperty(t,n,e)}}function R(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function L(t){return function(){delete this[t]}}function q(t,n){return function(){this[t]=n}}function I(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function P(t){return t.trim().split(/^|\s+/)}function D(t){return t.classList||new H(t)}function H(t){this._node=t,this._names=P(t.getAttribute("class")||"")}function z(t,n){for(var e=D(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function B(t,n){for(var e=D(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function F(t){return function(){z(this,t)}}function T(t){return function(){B(this,t)}}function V(t,n){return function(){(n.apply(this,arguments)?z:B)(this,t)}}function Y(){this.textContent=""}function U(t){return function(){this.textContent=t}}function X(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function G(){this.innerHTML=""}function Z(t){return function(){this.innerHTML=t}}function J(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function K(){this.nextSibling&&this.parentNode.appendChild(this)}function Q(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function W(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===x&&n.documentElement.namespaceURI===x?n.createElement(t):n.createElementNS(e,t)}}function tt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function nt(t){var n=M(t);return(n.local?tt:W)(n)}function et(){return null}function rt(){var t=this.parentNode;t&&t.removeChild(this)}function it(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ot(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function at(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function ut(t,n,e){return function(){var r,i=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(i)for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=e),void(r.value=n);this.addEventListener(t.type,o,e),r={type:t.type,name:t.name,value:n,listener:o,options:e},i?i.push(r):this.__on=[r]}}function lt(t,n,e){var r=C(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function st(t,n){return function(){return lt(this,t,n)}}function ct(t,n){return function(){return lt(this,t,n.apply(this,arguments))}}H.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ht=[null];function ft(t,n){this._groups=t,this._parents=n}function pt(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}ft.prototype=function(){return new ft([[document.documentElement]],ht)}.prototype={constructor:ft,select:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,l=n[i],s=l.length,c=r[i]=new Array(s),h=0;h<s;++h)(o=l[h])&&(a=t.call(o,o.__data__,h,l))&&("__data__"in o&&(a.__data__=o.__data__),c[h]=a);return new ft(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return null==(n=t.apply(this,arguments))?[]:Array.isArray(n)?n:Array.from(n);var n}}(t):function(t){return null==t?l:function(){return this.querySelectorAll(t)}}(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],s=u.length,c=0;c<s;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),i.push(a));return new ft(r,i)},selectChild:function(t){return this.select(null==t?h:function(t){return function(){return c.call(this.children,t)}}("function"==typeof t?t:s(t)))},selectChildren:function(t){return this.selectAll(null==t?p:function(t){return function(){return f.call(this.children,t)}}("function"==typeof t?t:s(t)))},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,l=r[i]=[],s=0;s<u;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&l.push(o);return new ft(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,v);var e,r=n?y:m,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var a=o.length,u=new Array(a),l=new Array(a),s=new Array(a),c=0;c<a;++c){var h=i[c],f=o[c],p=f.length,d=w(t.call(h,h&&h.__data__,c,i)),g=d.length,b=l[c]=new Array(g),x=u[c]=new Array(g);r(h,f,b,x,s[c]=new Array(p),d,n);for(var _,M,k=0,A=0;k<g;++k)if(_=b[k]){for(k>=A&&(A=k+1);!(M=x[A])&&++A<g;);_._next=M||null}}return(u=new ft(u,i))._enter=l,u._exit=s,u},enter:function(){return new ft(this._enter||this._groups.map(d),this._parents)},exit:function(){return new ft(this._exit||this._groups.map(d),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=n&&(i=n(i))&&(i=i.selection()),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,a=Math.min(i,o),u=new Array(i),l=0;l<a;++l)for(var s,c=e[l],h=r[l],f=c.length,p=u[l]=new Array(f),d=0;d<f;++d)(s=c[d]||h[d])&&(p[d]=s);for(;l<i;++l)u[l]=e[l];return new ft(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=b);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],l=u.length,s=i[o]=new Array(l),c=0;c<l;++c)(a=u[c])&&(s[c]=a);s.sort(n)}return new ft(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var e=M(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?A:k:"function"==typeof n?e.local?E:S:e.local?$:N)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?j:"function"==typeof n?R:O)(t,n,null==e?"":e)):function(t,n){return t.style.getPropertyValue(n)||C(t).getComputedStyle(t,null).getPropertyValue(n)}(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?L:"function"==typeof n?I:q)(t,n)):this.node()[t]},classed:function(t,n){var e=P(t+"");if(arguments.length<2){for(var r=D(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?V:n?F:T)(e,n))},text:function(t){return arguments.length?this.each(null==t?Y:("function"==typeof t?X:U)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?G:("function"==typeof t?J:Z)(t)):this.node().innerHTML},raise:function(){return this.each(K)},lower:function(){return this.each(Q)},append:function(t){var n="function"==typeof t?t:nt(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:nt(t),r=null==n?et:"function"==typeof n?n:u(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(rt)},clone:function(t){return this.select(t?ot:it)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?ut:at,r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var l,s=0,c=u.length;s<c;++s)for(r=0,l=u[s];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,n){return this.each(("function"==typeof n?ct:st)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};class dt extends Map{constructor(t,n=mt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(gt(this,t))}has(t){return super.has(gt(this,t))}set(t,n){return super.set(function({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}(this,t),n)}delete(t){return super.delete(function({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}(this,t))}}function gt({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function mt(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const yt=Symbol("implicit");function vt(){var t=new dt,n=[],e=[],r=yt;function i(i){let o=t.get(i);if(void 0===o){if(r!==yt)return r;t.set(i,o=n.push(i)-1)}return e[o%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new dt;for(const r of e)t.has(r)||t.set(r,n.push(r)-1);return i},i.range=function(t){return arguments.length?(e=Array.from(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return vt(n,e).unknown(r)},pt.apply(i,arguments),i}function wt(){var t,n,e=vt().unknown(void 0),r=e.domain,i=e.range,o=0,a=1,u=!1,l=0,s=0,c=.5;function h(){var e=r().length,h=a<o,f=h?a:o,p=h?o:a;t=(p-f)/Math.max(1,e-l+2*s),u&&(t=Math.floor(t)),f+=(p-f-t*(e-l))*c,n=t*(1-l),u&&(f=Math.round(f),n=Math.round(n));var d=function(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o}(e).map(function(n){return f+t*n});return i(h?d.reverse():d)}return delete e.unknown,e.domain=function(t){return arguments.length?(r(t),h()):r()},e.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,h()):[o,a]},e.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,u=!0,h()},e.bandwidth=function(){return n},e.step=function(){return t},e.round=function(t){return arguments.length?(u=!!t,h()):u},e.padding=function(t){return arguments.length?(l=Math.min(1,s=+t),h()):l},e.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},e.paddingOuter=function(t){return arguments.length?(s=+t,h()):s},e.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),h()):c},e.copy=function(){return wt(r(),[o,a]).round(u).paddingInner(l).paddingOuter(s).align(c)},pt.apply(h(),arguments)}const bt=Math.sqrt(50),xt=Math.sqrt(10),_t=Math.sqrt(2);function Mt(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=bt?10:o>=xt?5:o>=_t?2:1;let u,l,s;return i<0?(s=Math.pow(10,-i)/a,u=Math.round(t*s),l=Math.round(n*s),u/s<t&&++u,l/s>n&&--l,s=-s):(s=Math.pow(10,i)*a,u=Math.round(t/s),l=Math.round(n/s),u*s<t&&++u,l*s>n&&--l),l<u&&.5<=e&&e<2?Mt(t,n,2*e):[u,l,s]}function kt(t,n,e){return Mt(t=+t,n=+n,e=+e)[2]}function At(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function Nt(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function $t(t){let n,e,r;function i(t,r,i=0,o=t.length){if(i<o){if(0!==n(r,r))return o;do{const n=i+o>>>1;e(t[n],r)<0?i=n+1:o=n}while(i<o)}return i}return 2!==t.length?(n=At,e=(n,e)=>At(t(n),e),r=(n,e)=>t(n)-e):(n=t===At||t===Nt?t:St,e=t,r=t),{left:i,center:function(t,n,e=0,o=t.length){const a=i(t,n,e,o-1);return a>e&&r(t[a-1],n)>-r(t[a],n)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==n(r,r))return o;do{const n=i+o>>>1;e(t[n],r)<=0?i=n+1:o=n}while(i<o)}return i}}}function St(){return 0}const Et=$t(At),Ct=Et.right,jt=(Et.left,$t(function(t){return null===t?NaN:+t}).center,Ct);function Ot(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Rt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Lt(){}var qt=.7,It=1/qt,Pt="\\s*([+-]?\\d+)\\s*",Dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zt=/^#([0-9a-f]{3,8})$/,Bt=new RegExp(`^rgb\\(${Pt},${Pt},${Pt}\\)$`),Ft=new RegExp(`^rgb\\(${Ht},${Ht},${Ht}\\)$`),Tt=new RegExp(`^rgba\\(${Pt},${Pt},${Pt},${Dt}\\)$`),Vt=new RegExp(`^rgba\\(${Ht},${Ht},${Ht},${Dt}\\)$`),Yt=new RegExp(`^hsl\\(${Dt},${Ht},${Ht}\\)$`),Ut=new RegExp(`^hsla\\(${Dt},${Ht},${Ht},${Dt}\\)$`),Xt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Gt(){return this.rgb().formatHex()}function Zt(){return this.rgb().formatRgb()}function Jt(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=zt.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?Kt(n):3===e?new tn(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?Qt(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?Qt(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Bt.exec(t))?new tn(n[1],n[2],n[3],1):(n=Ft.exec(t))?new tn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Tt.exec(t))?Qt(n[1],n[2],n[3],n[4]):(n=Vt.exec(t))?Qt(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Yt.exec(t))?un(n[1],n[2]/100,n[3]/100,1):(n=Ut.exec(t))?un(n[1],n[2]/100,n[3]/100,n[4]):Xt.hasOwnProperty(t)?Kt(Xt[t]):"transparent"===t?new tn(NaN,NaN,NaN,0):null}function Kt(t){return new tn(t>>16&255,t>>8&255,255&t,1)}function Qt(t,n,e,r){return r<=0&&(t=n=e=NaN),new tn(t,n,e,r)}function Wt(t,n,e,r){return 1===arguments.length?((i=t)instanceof Lt||(i=Jt(i)),i?new tn((i=i.rgb()).r,i.g,i.b,i.opacity):new tn):new tn(t,n,e,null==r?1:r);var i}function tn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function nn(){return`#${an(this.r)}${an(this.g)}${an(this.b)}`}function en(){const t=rn(this.opacity);return`${1===t?"rgb(":"rgba("}${on(this.r)}, ${on(this.g)}, ${on(this.b)}${1===t?")":`, ${t})`}`}function rn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function on(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function an(t){return((t=on(t))<16?"0":"")+t.toString(16)}function un(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new sn(t,n,e,r)}function ln(t){if(t instanceof sn)return new sn(t.h,t.s,t.l,t.opacity);if(t instanceof Lt||(t=Jt(t)),!t)return new sn;if(t instanceof sn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new sn(a,u,l,t.opacity)}function sn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function cn(t){return(t=(t||0)%360)<0?t+360:t}function hn(t){return Math.max(0,Math.min(1,t||0))}function fn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function pn(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}Ot(Lt,Jt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Gt,formatHex:Gt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ln(this).formatHsl()},formatRgb:Zt,toString:Zt}),Ot(tn,Wt,Rt(Lt,{brighter(t){return t=null==t?It:Math.pow(It,t),new tn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?qt:Math.pow(qt,t),new tn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new tn(on(this.r),on(this.g),on(this.b),rn(this.opacity))},displayable(){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:nn,formatHex:nn,formatHex8:function(){return`#${an(this.r)}${an(this.g)}${an(this.b)}${an(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:en,toString:en})),Ot(sn,function(t,n,e,r){return 1===arguments.length?ln(t):new sn(t,n,e,null==r?1:r)},Rt(Lt,{brighter(t){return t=null==t?It:Math.pow(It,t),new sn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?qt:Math.pow(qt,t),new sn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new tn(fn(t>=240?t-240:t+120,i,r),fn(t,i,r),fn(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new sn(cn(this.h),hn(this.s),hn(this.l),rn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=rn(this.opacity);return`${1===t?"hsl(":"hsla("}${cn(this.h)}, ${100*hn(this.s)}%, ${100*hn(this.l)}%${1===t?")":`, ${t})`}`}}));const dn=t=>()=>t;function gn(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):dn(isNaN(t)?n:t)}const mn=function t(n){var e=function(t){return 1===(t=+t)?gn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):dn(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=Wt(t)).r,(n=Wt(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=gn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function yn(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;e<i;++e)r=Wt(n[e]),o[e]=r.r||0,a[e]=r.g||0,u[e]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}function vn(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(e=0;e<i;++e)o[e]=Nn(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}}function wn(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}}function bn(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function xn(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=Nn(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}yn(function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<n-1?t[r+2]:2*o-i;return pn((e-r/n)*n,a,i,o,u)}}),yn(function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return pn((e-r/n)*n,i,o,a,u)}});var _n=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mn=new RegExp(_n.source,"g");function kn(t,n){var e,r,i,o=_n.lastIndex=Mn.lastIndex=0,a=-1,u=[],l=[];for(t+="",n+="";(e=_n.exec(t))&&(r=Mn.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:bn(e,r)})),o=Mn.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?l[0]?function(t){return function(n){return t(n)+""}}(l[0].x):function(t){return function(){return t}}(n):(n=l.length,function(t){for(var e,r=0;r<n;++r)u[(e=l[r]).i]=e.x(t);return u.join("")})}function An(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;e<r;++e)i[e]=t[e]*(1-o)+n[e]*o;return i}}function Nn(t,n){var e,r,i=typeof n;return null==n||"boolean"===i?dn(n):("number"===i?bn:"string"===i?(e=Jt(n))?(n=e,mn):kn:n instanceof Jt?mn:n instanceof Date?wn:(r=n,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(n)?vn:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?xn:bn:An))(t,n)}function $n(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function Sn(t){return+t}var En=[0,1];function Cn(t){return t}function jn(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:(e=isNaN(n)?NaN:.5,function(){return e});var e}function On(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i<r?(r=jn(i,r),o=e(a,o)):(r=jn(r,i),o=e(o,a)),function(t){return o(r(t))}}function Rn(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<r;)i[a]=jn(t[a],t[a+1]),o[a]=e(n[a],n[a+1]);return function(n){var e=jt(t,n,1,r)-1;return o[e](i[e](n))}}var Ln,qn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function In(t){if(!(n=qn.exec(t)))throw new Error("invalid format: "+t);var n;return new Pn({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Pn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Dn(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Hn(t){return(t=Dn(Math.abs(t)))?t[1]:NaN}function zn(t,n){var e=Dn(t,n);if(!e)return t+"";var r=e[0],i=e[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")}In.prototype=Pn.prototype,Pn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Bn={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>zn(100*t,n),r:zn,s:function(t,n){var e=Dn(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Ln=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Dn(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Fn(t){return t}var Tn,Vn,Yn,Un=Array.prototype.map,Xn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Gn(t){var n=t.domain;return t.ticks=function(t){var e=n();return function(t,n,e){if(!((e=+e)>0))return[];if((t=+t)===(n=+n))return[t];const r=n<t,[i,o,a]=r?Mt(n,t,e):Mt(t,n,e);if(!(o>=i))return[];const u=o-i+1,l=new Array(u);if(r)if(a<0)for(let t=0;t<u;++t)l[t]=(o-t)/-a;else for(let t=0;t<u;++t)l[t]=(o-t)*a;else if(a<0)for(let t=0;t<u;++t)l[t]=(i+t)/-a;else for(let t=0;t<u;++t)l[t]=(i+t)*a;return l}(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return function(t,n,e,r){var i,o=function(t,n,e){e=+e;const r=(n=+n)<(t=+t),i=r?kt(n,t,e):kt(t,n,e);return(r?-1:1)*(i<0?1/-i:i)}(t,n,e);switch((r=In(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Hn(n)/3)))-Hn(Math.abs(t)))}(o,a))||(r.precision=i),Yn(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Hn(n)-Hn(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Hn(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Vn(r)}(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,o=n(),a=0,u=o.length-1,l=o[a],s=o[u],c=10;for(s<l&&(i=l,l=s,s=i,i=a,a=u,u=i);c-- >0;){if((i=kt(l,s,e))===r)return o[a]=l,o[u]=s,n(o);if(i>0)l=Math.floor(l/i)*i,s=Math.ceil(s/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,s=Math.floor(s*i)/i}r=i}return t},t}function Zn(){var t=function(){var t,n,e,r,i,o,a=En,u=En,l=Nn,s=Cn;function c(){var t,n,e,l=Math.min(a.length,u.length);return s!==Cn&&(t=a[0],n=a[l-1],t>n&&(e=t,t=n,n=e),s=function(e){return Math.max(t,Math.min(n,e))}),r=l>2?Rn:On,i=o=null,h}function h(n){return null==n||isNaN(n=+n)?e:(i||(i=r(a.map(t),u,l)))(t(s(n)))}return h.invert=function(e){return s(n((o||(o=r(u,a.map(t),bn)))(e)))},h.domain=function(t){return arguments.length?(a=Array.from(t,Sn),c()):a.slice()},h.range=function(t){return arguments.length?(u=Array.from(t),c()):u.slice()},h.rangeRound=function(t){return u=Array.from(t),l=$n,c()},h.clamp=function(t){return arguments.length?(s=!!t||Cn,c()):s!==Cn},h.interpolate=function(t){return arguments.length?(l=t,c()):l},h.unknown=function(t){return arguments.length?(e=t,h):e},function(e,r){return t=e,n=r,c()}}()(Cn,Cn);return t.copy=function(){return n=t,Zn().domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown());var n},pt.apply(t,arguments),Gn(t)}function Jn(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e<n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e<i||void 0===e&&i>=i)&&(e=i)}return e}function Kn(t){return t}Tn=function(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Fn:(n=Un.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],l=0;i>0&&u>0&&(l+u+1>r&&(u=Math.max(1,r-l)),o.push(t.substring(i-=u,i+u)),!((l+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?Fn:function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}}(Un.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var n=(t=In(t)).fill,e=t.align,h=t.sign,f=t.symbol,p=t.zero,d=t.width,g=t.comma,m=t.precision,y=t.trim,v=t.type;"n"===v?(g=!0,v="g"):Bn[v]||(void 0===m&&(m=12),y=!0,v="g"),(p||"0"===n&&"="===e)&&(p=!0,n="0",e="=");var w="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===f?o:/[%p]/.test(v)?l:"",x=Bn[v],_=/[defgprs%]/.test(v);function M(t){var i,o,l,f=w,M=b;if("c"===v)M=x(t)+M,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:x(Math.abs(t),m),y&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),k&&0===+t&&"+"!==h&&(k=!1),f=(k?"("===h?h:s:"-"===h||"("===h?"":h)+f,M=("s"===v?Xn[8+Ln/3]:"")+M+(k&&"("===h?")":""),_)for(i=-1,o=t.length;++i<o;)if(48>(l=t.charCodeAt(i))||l>57){M=(46===l?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!p&&(t=r(t,1/0));var A=f.length+t.length+M.length,N=A<d?new Array(d-A+1).join(n):"";switch(g&&p&&(t=r(N+t,N.length?d-M.length:1/0),N=""),e){case"<":t=f+t+M+N;break;case"=":t=f+N+t+M;break;case"^":t=N.slice(0,A=N.length>>1)+f+t+M+N.slice(A);break;default:t=N+f+t+M}return u(t)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),M.toString=function(){return t+""},M}return{format:h,formatPrefix:function(t,n){var e=h(((t=In(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Hn(n)/3))),i=Math.pow(10,-r),o=Xn[8+r/3];return function(t){return e(i*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),Vn=Tn.format,Yn=Tn.formatPrefix;var Qn=1e-6;function Wn(t){return"translate("+t+",0)"}function te(t){return"translate(0,"+t+")"}function ne(t){return n=>+t(n)}function ee(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function re(){return!this.__axis}function ie(t,n){var e=[],r=null,i=null,o=6,a=6,u=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,s=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",h=1===t||3===t?Wn:te;function f(f){var p=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,d=null==i?n.tickFormat?n.tickFormat.apply(n,e):Kn:i,g=Math.max(o,0)+u,m=n.range(),y=+m[0]+l,v=+m[m.length-1]+l,w=(n.bandwidth?ee:ne)(n.copy(),l),b=f.selection?f.selection():f,x=b.selectAll(".domain").data([null]),_=b.selectAll(".tick").data(p,n).order(),M=_.exit(),k=_.enter().append("g").attr("class","tick"),A=_.select("line"),N=_.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(k),A=A.merge(k.append("line").attr("stroke","currentColor").attr(c+"2",s*o)),N=N.merge(k.append("text").attr("fill","currentColor").attr(c,s*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==b&&(x=x.transition(f),_=_.transition(f),A=A.transition(f),N=N.transition(f),M=M.transition(f).attr("opacity",Qn).attr("transform",function(t){return isFinite(t=w(t))?h(t+l):this.getAttribute("transform")}),k.attr("opacity",Qn).attr("transform",function(t){var n=this.parentNode.__axis;return h((n&&isFinite(n=n(t))?n:w(t))+l)})),M.remove(),x.attr("d",4===t||2===t?a?"M"+s*a+","+y+"H"+l+"V"+v+"H"+s*a:"M"+l+","+y+"V"+v:a?"M"+y+","+s*a+"V"+l+"H"+v+"V"+s*a:"M"+y+","+l+"H"+v),_.attr("opacity",1).attr("transform",function(t){return h(w(t)+l)}),A.attr(c+"2",s*o),N.attr(c,s*g).text(d),b.filter(re).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each(function(){this.__axis=w})}return f.scale=function(t){return arguments.length?(n=t,f):n},f.ticks=function(){return e=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(e=null==t?[]:Array.from(t),f):e.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(u=+t,f):u},f.offset=function(t){return arguments.length?(l=+t,f):l},f}var oe=o(4848);function ae({data:r=[],cumulative:i="false",startYear:o=2015,endYear:a=2030,width:u=600,height:l=400,labelColor:s="#6B7280",backgroundColor:c="#FFFFFF",axisColor:h="#6B7280",tickColor:f="#6B7280",color:p="#4065A3",title:d="",xAxisLabel:g="",yAxisLabel:m="",dataSource:y="",ariaLabel:v="Bar chart showing data",ariaDescription:w="",apiData:b="false",type:x="",margin:_={top:40,right:30,bottom:70,left:70}}){const[M,k]=e(r),A=n();t(()=>{N()},[r,x]);const N=()=>{k(((t,n={})=>{const{startYear:e=2015,endYear:r=2030,defaultColor:i="#007bc8",cumulative:o=!1,graphType:a="COMMITMENTS",apiData:u=!1}=n;if("true"!=u)return t;const l={},s=new Set,c=new Set,h=new Set;let f;if("COMMITMENTS"===a)f=function(t){return 1};else if("ORGANIZATIONS"===a)f=function(t){let n=0;return t.organizations.forEach(t=>{c.has(t)||(c.add(t),n+=1)}),t.partners.split(", ").forEach(t=>{c.has(t)||(c.add(t),n+=1)}),n};else{if("DELIVERABLES"!==a)return console.error("Invalid graphType passed to mg-bar-chart",a),!1;f=function(t){return h.has(t.deliverable_id)?0:(h.add(t.deliverable_id),1)}}t.forEach(t=>{if(!s.has(t.node_id)||"DELIVERABLES"===a){s.add(t.node_id);const n=new Date(t.created_on).getFullYear();l[n]=(l[n]||0)+f(t)}});const p=Array.from({length:r-e+1},(t,n)=>e+n);t.length=0;let d=0;return p.map(t=>{const n=l[t]||0;return o?(d+=n,{label:t.toString(),value:d,color:i}):{label:t.toString(),value:n,color:i}})})(r,{graphType:x,defaultColor:p,apiData:b,startYear:o,endYear:a,cumulative:i}))};return t(()=>{const t=function(t){return"string"==typeof t?new ft([[document.querySelector(t)]],[document.documentElement]):new ft([[t]],ht)}(A.current);t.selectAll("*").remove(),t.attr("width",u).attr("height",l).attr("role","img").attr("aria-label",v).attr("aria-describedby",w).style("background-color",c).style("overflow","visible");const n=u-_.left-_.right,e=l-_.top-_.bottom,r=t.append("g").attr("transform",`translate(${_.left},${_.top})`),i=wt().domain(M.map(t=>t.label)).range([0,n]).padding(.2),o=Zn().domain([0,Jn(M,t=>t.value)]).range([e,0]);var a;r.append("g").attr("class","x-axis").attr("transform",`translate(0, ${e})`).call((a=i,ie(3,a))).selectAll("line, path").attr("stroke",f),"none"!=f&&r.append("g").attr("class","y-axis").call(function(t){return ie(4,t)}(o).ticks(5)).selectAll("line, path").attr("stroke",f);const h=r.selectAll().data(M).enter().append("g").attr("key",t=>t.label);h.append("rect").attr("class","bar").attr("x",t=>i(t.label)).attr("y",t=>o(t.value)).attr("height",t=>e-o(t.value)).attr("width",i.bandwidth()).attr("fill",p).attr("tabindex",0).attr("role","listitem").attr("aria-label",t=>`Bar for ${t.label} with value ${t.value}`),h.append("text").attr("class","value").attr("x",t=>i(t.label)+i.bandwidth()/2).attr("y",t=>o(t.value)-5).attr("text-anchor","middle").style("fill",s).text(t=>0!==t.value?`${t.value}`:""),g&&r.append("text").attr("class","label").attr("x",n/2).attr("y",e+_.bottom-10).attr("text-anchor","middle").style("fill",s).text(g),m&&r.append("text").attr("class","label").attr("x",-e/2).attr("y",-_.left/2.4).attr("transform","rotate(-90)").attr("text-anchor","middle").style("fill",s).text(m),d&&t.append("text").attr("class","title").attr("x",n/2+_.left).attr("y",5).attr("text-anchor","middle").style("fill",s).style("font-size","22px").style("font-weight","600").text(d),y&&r.append("text").attr("class","source").attr("x",n).attr("y",e+_.bottom-5).attr("text-anchor","end").style("fill",s).style("font-size","10px").text(y)},[M,u,l,_,s,c,h,f,d,g,m,y,v,w]),(0,oe.jsx)("div",{children:(0,oe.jsx)("svg",{ref:A})})}export{ae as default};
|
|
6
|
+
import{useEffect as t,useRef as n,useState as e}from"react";var r={2694(t,n,e){var r=e(6925);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,n,e,i,o,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function n(){return t}t.isRequired=t;var e={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:o,resetWarningCache:i};return e.PropTypes=e,e}},5556(t,n,e){t.exports=e(2694)()},6925(t){t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(t,n){var e=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),n.jsx=function(t,n,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==n.key&&(i=""+n.key),"key"in n)for(var o in r={},n)"key"!==o&&(r[o]=n[o]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:i,ref:void 0!==n?n:null,props:r}}},4848(t,n,e){t.exports=e(9698)}},i={};function o(t){var n=i[t];if(void 0!==n)return n.exports;var e=i[t]={exports:{}};return r[t](e,e.exports,o),e.exports}o.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},o.d=(t,n)=>{for(var e in n)o.o(n,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},o.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n);var a=o(5556),u=o.n(a);function l(){}function s(t){return null==t?l:function(){return this.querySelector(t)}}function c(){return[]}function h(t){return function(n){return n.matches(t)}}var f=Array.prototype.find;function p(){return this.firstElementChild}var d=Array.prototype.filter;function g(){return Array.from(this.children)}function m(t){return new Array(t.length)}function y(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function v(t,n,e,r,i,o){for(var a,u=0,l=n.length,s=o.length;u<s;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new y(t,o[u]);for(;u<l;++u)(a=n[u])&&(i[u]=a)}function b(t,n,e,r,i,o,a){var u,l,s,c=new Map,h=n.length,f=o.length,p=new Array(h);for(u=0;u<h;++u)(l=n[u])&&(p[u]=s=a.call(l,l.__data__,u,n)+"",c.has(s)?i[u]=l:c.set(s,l));for(u=0;u<f;++u)s=a.call(t,o[u],u,o)+"",(l=c.get(s))?(r[u]=l,l.__data__=o[u],c.delete(s)):e[u]=new y(t,o[u]);for(u=0;u<h;++u)(l=n[u])&&c.get(p[u])===l&&(i[u]=l)}function w(t){return t.__data__}function _(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function x(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}y.prototype={constructor:y,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var M="http://www.w3.org/1999/xhtml";const k={svg:"http://www.w3.org/2000/svg",xhtml:M,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function A(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),k.hasOwnProperty(n)?{space:k[n],local:t}:t}function N(t){return function(){this.removeAttribute(t)}}function $(t){return function(){this.removeAttributeNS(t.space,t.local)}}function S(t,n){return function(){this.setAttribute(t,n)}}function E(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function C(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function O(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function R(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function j(t){return function(){this.style.removeProperty(t)}}function L(t,n,e){return function(){this.style.setProperty(t,n,e)}}function T(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function P(t){return function(){delete this[t]}}function I(t,n){return function(){this[t]=n}}function D(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function q(t){return t.trim().split(/^|\s+/)}function H(t){return t.classList||new B(t)}function B(t){this._node=t,this._names=q(t.getAttribute("class")||"")}function z(t,n){for(var e=H(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function F(t,n){for(var e=H(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function V(t){return function(){z(this,t)}}function Y(t){return function(){F(this,t)}}function U(t,n){return function(){(n.apply(this,arguments)?z:F)(this,t)}}function W(){this.textContent=""}function X(t){return function(){this.textContent=t}}function G(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Z(){this.innerHTML=""}function J(t){return function(){this.innerHTML=t}}function K(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Q(){this.nextSibling&&this.parentNode.appendChild(this)}function tt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function nt(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===M&&n.documentElement.namespaceURI===M?n.createElement(t):n.createElementNS(e,t)}}function et(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function rt(t){var n=A(t);return(n.local?et:nt)(n)}function it(){return null}function ot(){var t=this.parentNode;t&&t.removeChild(this)}function at(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ut(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function lt(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function st(t,n,e){return function(){var r,i=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(i)for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=e),void(r.value=n);this.addEventListener(t.type,o,e),r={type:t.type,name:t.name,value:n,listener:o,options:e},i?i.push(r):this.__on=[r]}}function ct(t,n,e){var r=R(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function ht(t,n){return function(){return ct(this,t,n)}}function ft(t,n){return function(){return ct(this,t,n.apply(this,arguments))}}B.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var pt=[null];function dt(t,n){this._groups=t,this._parents=n}function gt(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}dt.prototype=function(){return new dt([[document.documentElement]],pt)}.prototype={constructor:dt,select:function(t){"function"!=typeof t&&(t=s(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,u=n[i],l=u.length,c=r[i]=new Array(l),h=0;h<l;++h)(o=u[h])&&(a=t.call(o,o.__data__,h,u))&&("__data__"in o&&(a.__data__=o.__data__),c[h]=a);return new dt(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return null==(n=t.apply(this,arguments))?[]:Array.isArray(n)?n:Array.from(n);var n}}(t):function(t){return null==t?c:function(){return this.querySelectorAll(t)}}(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],l=u.length,s=0;s<l;++s)(a=u[s])&&(r.push(t.call(a,a.__data__,s,u)),i.push(a));return new dt(r,i)},selectChild:function(t){return this.select(null==t?p:function(t){return function(){return f.call(this.children,t)}}("function"==typeof t?t:h(t)))},selectChildren:function(t){return this.selectAll(null==t?g:function(t){return function(){return d.call(this.children,t)}}("function"==typeof t?t:h(t)))},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,l=r[i]=[],s=0;s<u;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&l.push(o);return new dt(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,w);var e,r=n?b:v,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var a=o.length,u=new Array(a),l=new Array(a),s=new Array(a),c=0;c<a;++c){var h=i[c],f=o[c],p=f.length,d=_(t.call(h,h&&h.__data__,c,i)),g=d.length,m=l[c]=new Array(g),y=u[c]=new Array(g);r(h,f,m,y,s[c]=new Array(p),d,n);for(var x,M,k=0,A=0;k<g;++k)if(x=m[k]){for(k>=A&&(A=k+1);!(M=y[A])&&++A<g;);x._next=M||null}}return(u=new dt(u,i))._enter=l,u._exit=s,u},enter:function(){return new dt(this._enter||this._groups.map(m),this._parents)},exit:function(){return new dt(this._exit||this._groups.map(m),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=n&&(i=n(i))&&(i=i.selection()),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,a=Math.min(i,o),u=new Array(i),l=0;l<a;++l)for(var s,c=e[l],h=r[l],f=c.length,p=u[l]=new Array(f),d=0;d<f;++d)(s=c[d]||h[d])&&(p[d]=s);for(;l<i;++l)u[l]=e[l];return new dt(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=x);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],l=u.length,s=i[o]=new Array(l),c=0;c<l;++c)(a=u[c])&&(s[c]=a);s.sort(n)}return new dt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var e=A(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?$:N:"function"==typeof n?e.local?O:C:e.local?E:S)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?j:"function"==typeof n?T:L)(t,n,null==e?"":e)):function(t,n){return t.style.getPropertyValue(n)||R(t).getComputedStyle(t,null).getPropertyValue(n)}(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?P:"function"==typeof n?D:I)(t,n)):this.node()[t]},classed:function(t,n){var e=q(t+"");if(arguments.length<2){for(var r=H(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?U:n?V:Y)(e,n))},text:function(t){return arguments.length?this.each(null==t?W:("function"==typeof t?G:X)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Z:("function"==typeof t?K:J)(t)):this.node().innerHTML},raise:function(){return this.each(Q)},lower:function(){return this.each(tt)},append:function(t){var n="function"==typeof t?t:rt(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:rt(t),r=null==n?it:"function"==typeof n?n:s(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(ot)},clone:function(t){return this.select(t?ut:at)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?st:lt,r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var l,s=0,c=u.length;s<c;++s)for(r=0,l=u[s];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,n){return this.each(("function"==typeof n?ft:ht)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};class mt extends Map{constructor(t,n=vt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(yt(this,t))}has(t){return super.has(yt(this,t))}set(t,n){return super.set(function({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}(this,t),n)}delete(t){return super.delete(function({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}(this,t))}}function yt({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function vt(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const bt=Symbol("implicit");function wt(){var t=new mt,n=[],e=[],r=bt;function i(i){let o=t.get(i);if(void 0===o){if(r!==bt)return r;t.set(i,o=n.push(i)-1)}return e[o%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new mt;for(const r of e)t.has(r)||t.set(r,n.push(r)-1);return i},i.range=function(t){return arguments.length?(e=Array.from(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return wt(n,e).unknown(r)},gt.apply(i,arguments),i}function _t(){var t,n,e=wt().unknown(void 0),r=e.domain,i=e.range,o=0,a=1,u=!1,l=0,s=0,c=.5;function h(){var e=r().length,h=a<o,f=h?a:o,p=h?o:a;t=(p-f)/Math.max(1,e-l+2*s),u&&(t=Math.floor(t)),f+=(p-f-t*(e-l))*c,n=t*(1-l),u&&(f=Math.round(f),n=Math.round(n));var d=function(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o}(e).map(function(n){return f+t*n});return i(h?d.reverse():d)}return delete e.unknown,e.domain=function(t){return arguments.length?(r(t),h()):r()},e.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,h()):[o,a]},e.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,u=!0,h()},e.bandwidth=function(){return n},e.step=function(){return t},e.round=function(t){return arguments.length?(u=!!t,h()):u},e.padding=function(t){return arguments.length?(l=Math.min(1,s=+t),h()):l},e.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},e.paddingOuter=function(t){return arguments.length?(s=+t,h()):s},e.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),h()):c},e.copy=function(){return _t(r(),[o,a]).round(u).paddingInner(l).paddingOuter(s).align(c)},gt.apply(h(),arguments)}const xt=Math.sqrt(50),Mt=Math.sqrt(10),kt=Math.sqrt(2);function At(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=xt?10:o>=Mt?5:o>=kt?2:1;let u,l,s;return i<0?(s=Math.pow(10,-i)/a,u=Math.round(t*s),l=Math.round(n*s),u/s<t&&++u,l/s>n&&--l,s=-s):(s=Math.pow(10,i)*a,u=Math.round(t/s),l=Math.round(n/s),u*s<t&&++u,l*s>n&&--l),l<u&&.5<=e&&e<2?At(t,n,2*e):[u,l,s]}function Nt(t,n,e){return At(t=+t,n=+n,e=+e)[2]}function $t(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function St(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function Et(t){let n,e,r;function i(t,r,i=0,o=t.length){if(i<o){if(0!==n(r,r))return o;do{const n=i+o>>>1;e(t[n],r)<0?i=n+1:o=n}while(i<o)}return i}return 2!==t.length?(n=$t,e=(n,e)=>$t(t(n),e),r=(n,e)=>t(n)-e):(n=t===$t||t===St?t:Ct,e=t,r=t),{left:i,center:function(t,n,e=0,o=t.length){const a=i(t,n,e,o-1);return a>e&&r(t[a-1],n)>-r(t[a],n)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==n(r,r))return o;do{const n=i+o>>>1;e(t[n],r)<=0?i=n+1:o=n}while(i<o)}return i}}}function Ct(){return 0}const Ot=Et($t),Rt=Ot.right,jt=(Ot.left,Et(function(t){return null===t?NaN:+t}).center,Rt);function Lt(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Tt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Pt(){}var It=.7,Dt=1/It,qt="\\s*([+-]?\\d+)\\s*",Ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zt=/^#([0-9a-f]{3,8})$/,Ft=new RegExp(`^rgb\\(${qt},${qt},${qt}\\)$`),Vt=new RegExp(`^rgb\\(${Bt},${Bt},${Bt}\\)$`),Yt=new RegExp(`^rgba\\(${qt},${qt},${qt},${Ht}\\)$`),Ut=new RegExp(`^rgba\\(${Bt},${Bt},${Bt},${Ht}\\)$`),Wt=new RegExp(`^hsl\\(${Ht},${Bt},${Bt}\\)$`),Xt=new RegExp(`^hsla\\(${Ht},${Bt},${Bt},${Ht}\\)$`),Gt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Zt(){return this.rgb().formatHex()}function Jt(){return this.rgb().formatRgb()}function Kt(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=zt.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?Qt(n):3===e?new en(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?tn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?tn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Ft.exec(t))?new en(n[1],n[2],n[3],1):(n=Vt.exec(t))?new en(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Yt.exec(t))?tn(n[1],n[2],n[3],n[4]):(n=Ut.exec(t))?tn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Wt.exec(t))?sn(n[1],n[2]/100,n[3]/100,1):(n=Xt.exec(t))?sn(n[1],n[2]/100,n[3]/100,n[4]):Gt.hasOwnProperty(t)?Qt(Gt[t]):"transparent"===t?new en(NaN,NaN,NaN,0):null}function Qt(t){return new en(t>>16&255,t>>8&255,255&t,1)}function tn(t,n,e,r){return r<=0&&(t=n=e=NaN),new en(t,n,e,r)}function nn(t,n,e,r){return 1===arguments.length?((i=t)instanceof Pt||(i=Kt(i)),i?new en((i=i.rgb()).r,i.g,i.b,i.opacity):new en):new en(t,n,e,null==r?1:r);var i}function en(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function rn(){return`#${ln(this.r)}${ln(this.g)}${ln(this.b)}`}function on(){const t=an(this.opacity);return`${1===t?"rgb(":"rgba("}${un(this.r)}, ${un(this.g)}, ${un(this.b)}${1===t?")":`, ${t})`}`}function an(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function un(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ln(t){return((t=un(t))<16?"0":"")+t.toString(16)}function sn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new hn(t,n,e,r)}function cn(t){if(t instanceof hn)return new hn(t.h,t.s,t.l,t.opacity);if(t instanceof Pt||(t=Kt(t)),!t)return new hn;if(t instanceof hn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new hn(a,u,l,t.opacity)}function hn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function fn(t){return(t=(t||0)%360)<0?t+360:t}function pn(t){return Math.max(0,Math.min(1,t||0))}function dn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function gn(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}Lt(Pt,Kt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Zt,formatHex:Zt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return cn(this).formatHsl()},formatRgb:Jt,toString:Jt}),Lt(en,nn,Tt(Pt,{brighter(t){return t=null==t?Dt:Math.pow(Dt,t),new en(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?It:Math.pow(It,t),new en(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new en(un(this.r),un(this.g),un(this.b),an(this.opacity))},displayable(){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:rn,formatHex:rn,formatHex8:function(){return`#${ln(this.r)}${ln(this.g)}${ln(this.b)}${ln(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:on,toString:on})),Lt(hn,function(t,n,e,r){return 1===arguments.length?cn(t):new hn(t,n,e,null==r?1:r)},Tt(Pt,{brighter(t){return t=null==t?Dt:Math.pow(Dt,t),new hn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?It:Math.pow(It,t),new hn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new en(dn(t>=240?t-240:t+120,i,r),dn(t,i,r),dn(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new hn(fn(this.h),pn(this.s),pn(this.l),an(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=an(this.opacity);return`${1===t?"hsl(":"hsla("}${fn(this.h)}, ${100*pn(this.s)}%, ${100*pn(this.l)}%${1===t?")":`, ${t})`}`}}));const mn=t=>()=>t;function yn(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):mn(isNaN(t)?n:t)}const vn=function t(n){var e=function(t){return 1===(t=+t)?yn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):mn(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=nn(t)).r,(n=nn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=yn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function bn(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;e<i;++e)r=nn(n[e]),o[e]=r.r||0,a[e]=r.g||0,u[e]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}function wn(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(e=0;e<i;++e)o[e]=Sn(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}}function _n(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}}function xn(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function Mn(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=Sn(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}bn(function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<n-1?t[r+2]:2*o-i;return gn((e-r/n)*n,a,i,o,u)}}),bn(function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return gn((e-r/n)*n,i,o,a,u)}});var kn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,An=new RegExp(kn.source,"g");function Nn(t,n){var e,r,i,o=kn.lastIndex=An.lastIndex=0,a=-1,u=[],l=[];for(t+="",n+="";(e=kn.exec(t))&&(r=An.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:xn(e,r)})),o=An.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?l[0]?function(t){return function(n){return t(n)+""}}(l[0].x):function(t){return function(){return t}}(n):(n=l.length,function(t){for(var e,r=0;r<n;++r)u[(e=l[r]).i]=e.x(t);return u.join("")})}function $n(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;e<r;++e)i[e]=t[e]*(1-o)+n[e]*o;return i}}function Sn(t,n){var e,r,i=typeof n;return null==n||"boolean"===i?mn(n):("number"===i?xn:"string"===i?(e=Kt(n))?(n=e,vn):Nn:n instanceof Kt?vn:n instanceof Date?_n:(r=n,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(n)?wn:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?Mn:xn:$n))(t,n)}function En(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function Cn(t){return+t}var On=[0,1];function Rn(t){return t}function jn(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:(e=isNaN(n)?NaN:.5,function(){return e});var e}function Ln(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i<r?(r=jn(i,r),o=e(a,o)):(r=jn(r,i),o=e(o,a)),function(t){return o(r(t))}}function Tn(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<r;)i[a]=jn(t[a],t[a+1]),o[a]=e(n[a],n[a+1]);return function(n){var e=jt(t,n,1,r)-1;return o[e](i[e](n))}}var Pn,In=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Dn(t){if(!(n=In.exec(t)))throw new Error("invalid format: "+t);var n;return new qn({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function qn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Hn(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Bn(t){return(t=Hn(Math.abs(t)))?t[1]:NaN}function zn(t,n){var e=Hn(t,n);if(!e)return t+"";var r=e[0],i=e[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")}Dn.prototype=qn.prototype,qn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Fn={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>zn(100*t,n),r:zn,s:function(t,n){var e=Hn(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Pn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Hn(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Vn(t){return t}var Yn,Un,Wn,Xn=Array.prototype.map,Gn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Zn(t){var n=t.domain;return t.ticks=function(t){var e=n();return function(t,n,e){if(!((e=+e)>0))return[];if((t=+t)===(n=+n))return[t];const r=n<t,[i,o,a]=r?At(n,t,e):At(t,n,e);if(!(o>=i))return[];const u=o-i+1,l=new Array(u);if(r)if(a<0)for(let t=0;t<u;++t)l[t]=(o-t)/-a;else for(let t=0;t<u;++t)l[t]=(o-t)*a;else if(a<0)for(let t=0;t<u;++t)l[t]=(i+t)/-a;else for(let t=0;t<u;++t)l[t]=(i+t)*a;return l}(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return function(t,n,e,r){var i,o=function(t,n,e){e=+e;const r=(n=+n)<(t=+t),i=r?Nt(n,t,e):Nt(t,n,e);return(r?-1:1)*(i<0?1/-i:i)}(t,n,e);switch((r=Dn(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Bn(n)/3)))-Bn(Math.abs(t)))}(o,a))||(r.precision=i),Wn(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Bn(n)-Bn(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Bn(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Un(r)}(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,o=n(),a=0,u=o.length-1,l=o[a],s=o[u],c=10;for(s<l&&(i=l,l=s,s=i,i=a,a=u,u=i);c-- >0;){if((i=Nt(l,s,e))===r)return o[a]=l,o[u]=s,n(o);if(i>0)l=Math.floor(l/i)*i,s=Math.ceil(s/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,s=Math.floor(s*i)/i}r=i}return t},t}function Jn(){var t=function(){var t,n,e,r,i,o,a=On,u=On,l=Sn,s=Rn;function c(){var t,n,e,l=Math.min(a.length,u.length);return s!==Rn&&(t=a[0],n=a[l-1],t>n&&(e=t,t=n,n=e),s=function(e){return Math.max(t,Math.min(n,e))}),r=l>2?Tn:Ln,i=o=null,h}function h(n){return null==n||isNaN(n=+n)?e:(i||(i=r(a.map(t),u,l)))(t(s(n)))}return h.invert=function(e){return s(n((o||(o=r(u,a.map(t),xn)))(e)))},h.domain=function(t){return arguments.length?(a=Array.from(t,Cn),c()):a.slice()},h.range=function(t){return arguments.length?(u=Array.from(t),c()):u.slice()},h.rangeRound=function(t){return u=Array.from(t),l=En,c()},h.clamp=function(t){return arguments.length?(s=!!t||Rn,c()):s!==Rn},h.interpolate=function(t){return arguments.length?(l=t,c()):l},h.unknown=function(t){return arguments.length?(e=t,h):e},function(e,r){return t=e,n=r,c()}}()(Rn,Rn);return t.copy=function(){return n=t,Jn().domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown());var n},gt.apply(t,arguments),Zn(t)}function Kn(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e<n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e<i||void 0===e&&i>=i)&&(e=i)}return e}function Qn(t){return t}Yn=function(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Vn:(n=Xn.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],l=0;i>0&&u>0&&(l+u+1>r&&(u=Math.max(1,r-l)),o.push(t.substring(i-=u,i+u)),!((l+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?Vn:function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}}(Xn.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var n=(t=Dn(t)).fill,e=t.align,h=t.sign,f=t.symbol,p=t.zero,d=t.width,g=t.comma,m=t.precision,y=t.trim,v=t.type;"n"===v?(g=!0,v="g"):Fn[v]||(void 0===m&&(m=12),y=!0,v="g"),(p||"0"===n&&"="===e)&&(p=!0,n="0",e="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",w="$"===f?o:/[%p]/.test(v)?l:"",_=Fn[v],x=/[defgprs%]/.test(v);function M(t){var i,o,l,f=b,M=w;if("c"===v)M=_(t)+M,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:_(Math.abs(t),m),y&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),k&&0===+t&&"+"!==h&&(k=!1),f=(k?"("===h?h:s:"-"===h||"("===h?"":h)+f,M=("s"===v?Gn[8+Pn/3]:"")+M+(k&&"("===h?")":""),x)for(i=-1,o=t.length;++i<o;)if(48>(l=t.charCodeAt(i))||l>57){M=(46===l?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!p&&(t=r(t,1/0));var A=f.length+t.length+M.length,N=A<d?new Array(d-A+1).join(n):"";switch(g&&p&&(t=r(N+t,N.length?d-M.length:1/0),N=""),e){case"<":t=f+t+M+N;break;case"=":t=f+N+t+M;break;case"^":t=N.slice(0,A=N.length>>1)+f+t+M+N.slice(A);break;default:t=N+f+t+M}return u(t)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),M.toString=function(){return t+""},M}return{format:h,formatPrefix:function(t,n){var e=h(((t=Dn(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Bn(n)/3))),i=Math.pow(10,-r),o=Gn[8+r/3];return function(t){return e(i*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),Un=Yn.format,Wn=Yn.formatPrefix;var te=1e-6;function ne(t){return"translate("+t+",0)"}function ee(t){return"translate(0,"+t+")"}function re(t){return n=>+t(n)}function ie(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function oe(){return!this.__axis}function ae(t,n){var e=[],r=null,i=null,o=6,a=6,u=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,s=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",h=1===t||3===t?ne:ee;function f(f){var p=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,d=null==i?n.tickFormat?n.tickFormat.apply(n,e):Qn:i,g=Math.max(o,0)+u,m=n.range(),y=+m[0]+l,v=+m[m.length-1]+l,b=(n.bandwidth?ie:re)(n.copy(),l),w=f.selection?f.selection():f,_=w.selectAll(".domain").data([null]),x=w.selectAll(".tick").data(p,n).order(),M=x.exit(),k=x.enter().append("g").attr("class","tick"),A=x.select("line"),N=x.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(k),A=A.merge(k.append("line").attr("stroke","currentColor").attr(c+"2",s*o)),N=N.merge(k.append("text").attr("fill","currentColor").attr(c,s*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==w&&(_=_.transition(f),x=x.transition(f),A=A.transition(f),N=N.transition(f),M=M.transition(f).attr("opacity",te).attr("transform",function(t){return isFinite(t=b(t))?h(t+l):this.getAttribute("transform")}),k.attr("opacity",te).attr("transform",function(t){var n=this.parentNode.__axis;return h((n&&isFinite(n=n(t))?n:b(t))+l)})),M.remove(),_.attr("d",4===t||2===t?a?"M"+s*a+","+y+"H"+l+"V"+v+"H"+s*a:"M"+l+","+y+"V"+v:a?"M"+y+","+s*a+"V"+l+"H"+v+"V"+s*a:"M"+y+","+l+"H"+v),x.attr("opacity",1).attr("transform",function(t){return h(b(t)+l)}),A.attr(c+"2",s*o),N.attr(c,s*g).text(d),w.filter(oe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),w.each(function(){this.__axis=b})}return f.scale=function(t){return arguments.length?(n=t,f):n},f.ticks=function(){return e=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(e=null==t?[]:Array.from(t),f):e.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(u=+t,f):u},f.offset=function(t){return arguments.length?(l=+t,f):l},f}var ue=o(4848);function le({data:r=[],cumulative:i="false",startYear:o=2015,endYear:a=2030,width:u=600,height:l=400,labelColor:s="#6B7280",backgroundColor:c="#FFFFFF",axisColor:h="#6B7280",tickColor:f="#6B7280",color:p="#4065A3",title:d="",xAxisLabel:g="",yAxisLabel:m="",dataSource:y="",ariaLabel:v="Bar chart showing data",ariaDescription:b="",apiData:w="false",type:_="",margin:x={top:40,right:30,bottom:70,left:70}}){const[M,k]=e(r),A=n();t(()=>{N()},[r,_]);const N=()=>{k(((t,n={})=>{const{startYear:e=2015,endYear:r=2030,defaultColor:i="#007bc8",cumulative:o=!1,graphType:a="COMMITMENTS",apiData:u=!1}=n;if("true"!=u)return t;const l={},s=new Set,c=new Set,h=new Set;let f;if("COMMITMENTS"===a)f=function(t){return 1};else if("ORGANIZATIONS"===a)f=function(t){let n=0;return t.organizations.forEach(t=>{c.has(t)||(c.add(t),n+=1)}),t.partners.split(", ").forEach(t=>{c.has(t)||(c.add(t),n+=1)}),n};else{if("DELIVERABLES"!==a)return console.error("Invalid graphType passed to mg-bar-chart",a),!1;f=function(t){return h.has(t.deliverable_id)?0:(h.add(t.deliverable_id),1)}}t.forEach(t=>{if(!s.has(t.node_id)||"DELIVERABLES"===a){s.add(t.node_id);const n=new Date(t.created_on).getFullYear();l[n]=(l[n]||0)+f(t)}});const p=Array.from({length:r-e+1},(t,n)=>e+n);t.length=0;let d=0;return p.map(t=>{const n=l[t]||0;return o?(d+=n,{label:t.toString(),value:d,color:i}):{label:t.toString(),value:n,color:i}})})(r,{graphType:_,defaultColor:p,apiData:w,startYear:o,endYear:a,cumulative:i}))};return t(()=>{const t=function(t){return"string"==typeof t?new dt([[document.querySelector(t)]],[document.documentElement]):new dt([[t]],pt)}(A.current);t.selectAll("*").remove(),t.attr("width",u).attr("height",l).attr("role","img").attr("aria-label",v).attr("aria-describedby",b).style("background-color",c).style("overflow","visible");const n=u-x.left-x.right,e=l-x.top-x.bottom,r=t.append("g").attr("transform",`translate(${x.left},${x.top})`),i=_t().domain(M.map(t=>t.label)).range([0,n]).padding(.2),o=Jn().domain([0,Kn(M,t=>t.value)]).range([e,0]);var a;r.append("g").attr("class","x-axis").attr("transform",`translate(0, ${e})`).call((a=i,ae(3,a))).selectAll("line, path").attr("stroke",f),"none"!=f&&r.append("g").attr("class","y-axis").call(function(t){return ae(4,t)}(o).ticks(5)).selectAll("line, path").attr("stroke",f);const h=r.selectAll().data(M).enter().append("g").attr("key",t=>t.label);h.append("rect").attr("class","bar").attr("x",t=>i(t.label)).attr("y",t=>o(t.value)).attr("height",t=>e-o(t.value)).attr("width",i.bandwidth()).attr("fill",p).attr("tabindex",0).attr("role","listitem").attr("aria-label",t=>`Bar for ${t.label} with value ${t.value}`),h.append("text").attr("class","value").attr("x",t=>i(t.label)+i.bandwidth()/2).attr("y",t=>o(t.value)-5).attr("text-anchor","middle").style("fill",s).text(t=>0!==t.value?`${t.value}`:""),g&&r.append("text").attr("class","label").attr("x",n/2).attr("y",e+x.bottom-10).attr("text-anchor","middle").style("fill",s).text(g),m&&r.append("text").attr("class","label").attr("x",-e/2).attr("y",-x.left/2.4).attr("transform","rotate(-90)").attr("text-anchor","middle").style("fill",s).text(m),d&&t.append("text").attr("class","title").attr("x",n/2+x.left).attr("y",5).attr("text-anchor","middle").style("fill",s).style("font-size","22px").style("font-weight","600").text(d),y&&r.append("text").attr("class","source").attr("x",n).attr("y",e+x.bottom-5).attr("text-anchor","end").style("fill",s).style("font-size","10px").text(y)},[M,u,l,x,s,c,h,f,d,g,m,y,v,b]),(0,ue.jsx)("div",{children:(0,ue.jsx)("svg",{ref:A})})}le.propTypes={data:u().arrayOf(u().shape({label:u().string,value:u().number})),cumulative:u().string,startYear:u().number,endYear:u().number,width:u().number,height:u().number,labelColor:u().string,backgroundColor:u().string,axisColor:u().string,tickColor:u().string,color:u().string,title:u().string,xAxisLabel:u().string,yAxisLabel:u().string,dataSource:u().string,ariaLabel:u().string,ariaDescription:u().string,apiData:u().string,type:u().string,margin:u().shape({top:u().number,right:u().number,bottom:u().number,left:u().number})};export{le as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
+
* Compiled on: 2026-04-03T08:59:34.689Z
|
|
4
|
+
*/
|
|
5
|
+
/*! For license information please see BookCard.js.LICENSE.txt */
|
|
6
|
+
import*as e from"react";var t={6145(e,t,n){n(1649);var r=n(5556),o=n.n(r);n(4848),o().string.isRequired,o().oneOf(["Primary","Secondary"]),o().oneOf(["Default","Disabled"])},2694(e,t,n){var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o},4848(e,t,n){e.exports=n(9698)},1649(e,t,n){var r;e.exports=(r={},n.d(r,{}),r)}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r(1649);var o=r(5556),a=r.n(o);const{entries:i,setPrototypeOf:l,isFrozen:c,getPrototypeOf:s,getOwnPropertyDescriptor:u}=Object;let{freeze:m,seal:p,create:f}=Object,{apply:d,construct:h}="undefined"!=typeof Reflect&&Reflect;m||(m=function(e){return e}),p||(p=function(e){return e}),d||(d=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),h||(h=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const g=C(Array.prototype.forEach),y=C(Array.prototype.lastIndexOf),T=C(Array.prototype.pop),_=C(Array.prototype.push),E=C(Array.prototype.splice),A=C(String.prototype.toLowerCase),b=C(String.prototype.toString),S=C(String.prototype.match),N=C(String.prototype.replace),v=C(String.prototype.indexOf),R=C(String.prototype.trim),D=C(Object.prototype.hasOwnProperty),O=C(RegExp.prototype.test),x=(w=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h(w,t)});var w;function C(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return d(e,t,r)}}function k(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A;l&&l(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(c(t)||(t[r]=e),o=e)}e[o]=!0}return e}function L(e){for(let t=0;t<e.length;t++)D(e,t)||(e[t]=null);return e}function I(e){const t=f(null);for(const[n,r]of i(e))D(e,n)&&(Array.isArray(r)?t[n]=L(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=I(r):t[n]=r);return t}function M(e,t){for(;null!==e;){const n=u(e,t);if(n){if(n.get)return C(n.get);if("function"==typeof n.value)return C(n.value)}e=s(e)}return function(){return null}}const P=m(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),U=m(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),z=m(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),F=m(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),H=m(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),B=m(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),j=m(["#text"]),W=m(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),G=m(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Y=m(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),q=m(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),X=p(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$=p(/<%[\w\W]*|[\w\W]*%>/gm),K=p(/\$\{[\w\W]*/gm),V=p(/^data-[\-\w.\u00B7-\uFFFF]+$/),Z=p(/^aria-[\-\w]+$/),J=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Q=p(/^(?:\w+script|data):/i),ee=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),te=p(/^html$/i),ne=p(/^[a-z][.\w]*(-[.\w]+)+$/i);var re=Object.freeze({__proto__:null,ARIA_ATTR:Z,ATTR_WHITESPACE:ee,CUSTOM_ELEMENT:ne,DATA_ATTR:V,DOCTYPE_NAME:te,ERB_EXPR:$,IS_ALLOWED_URI:J,IS_SCRIPT_OR_DATA:Q,MUSTACHE_EXPR:X,TMPLIT_EXPR:K});const oe=function(){return"undefined"==typeof window?null:window};(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const n=t=>e(t);if(n.version="3.3.3",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:s,Element:u,NodeFilter:p,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:w,trustedTypes:C}=t,L=u.prototype,X=M(L,"cloneNode"),$=M(L,"remove"),K=M(L,"nextSibling"),V=M(L,"childNodes"),Z=M(L,"parentNode");if("function"==typeof c){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Q,ee="";const{implementation:ne,createNodeIterator:ae,createDocumentFragment:ie,getElementsByTagName:le}=r,{importNode:ce}=o;let se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof i&&"function"==typeof Z&&ne&&void 0!==ne.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:fe,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:ye}=re;let{IS_ALLOWED_URI:Te}=re,_e=null;const Ee=k({},[...P,...U,...z,...H,...j]);let Ae=null;const be=k({},[...W,...G,...Y,...q]);let Se=Object.seal(f(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}})),Ne=null,ve=null;const Re=Object.seal(f(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let De=!0,Oe=!0,xe=!1,we=!0,Ce=!1,ke=!0,Le=!1,Ie=!1,Me=!1,Pe=!1,Ue=!1,ze=!1,Fe=!0,He=!1,Be=!0,je=!1,We={},Ge=null;const Ye=k({},["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"]);let qe=null;const Xe=k({},["audio","video","img","source","image","track"]);let $e=null;const Ke=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let Qe=Je,et=!1,tt=null;const nt=k({},[Ve,Ze,Je],b);let rt=k({},["mi","mo","mn","ms","mtext"]),ot=k({},["annotation-xml"]);const at=k({},["title","style","font","a","script"]);let it=null;const lt=["application/xhtml+xml","text/html"];let ct=null,st=null;const ut=r.createElement("form"),mt=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!st||st!==e){if(e&&"object"==typeof e||(e={}),e=I(e),it=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ct="application/xhtml+xml"===it?b:A,_e=D(e,"ALLOWED_TAGS")?k({},e.ALLOWED_TAGS,ct):Ee,Ae=D(e,"ALLOWED_ATTR")?k({},e.ALLOWED_ATTR,ct):be,tt=D(e,"ALLOWED_NAMESPACES")?k({},e.ALLOWED_NAMESPACES,b):nt,$e=D(e,"ADD_URI_SAFE_ATTR")?k(I(Ke),e.ADD_URI_SAFE_ATTR,ct):Ke,qe=D(e,"ADD_DATA_URI_TAGS")?k(I(Xe),e.ADD_DATA_URI_TAGS,ct):Xe,Ge=D(e,"FORBID_CONTENTS")?k({},e.FORBID_CONTENTS,ct):Ye,Ne=D(e,"FORBID_TAGS")?k({},e.FORBID_TAGS,ct):I({}),ve=D(e,"FORBID_ATTR")?k({},e.FORBID_ATTR,ct):I({}),We=!!D(e,"USE_PROFILES")&&e.USE_PROFILES,De=!1!==e.ALLOW_ARIA_ATTR,Oe=!1!==e.ALLOW_DATA_ATTR,xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,we=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ce=e.SAFE_FOR_TEMPLATES||!1,ke=!1!==e.SAFE_FOR_XML,Le=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Ue=e.RETURN_DOM_FRAGMENT||!1,ze=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,He=e.SANITIZE_NAMED_PROPS||!1,Be=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,Te=e.ALLOWED_URI_REGEXP||J,Qe=e.NAMESPACE||Je,rt=e.MATHML_TEXT_INTEGRATION_POINTS||rt,ot=e.HTML_INTEGRATION_POINTS||ot,Se=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&mt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&mt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(Oe=!1),Ue&&(Pe=!0),We&&(_e=k({},j),Ae=f(null),!0===We.html&&(k(_e,P),k(Ae,W)),!0===We.svg&&(k(_e,U),k(Ae,G),k(Ae,q)),!0===We.svgFilters&&(k(_e,z),k(Ae,G),k(Ae,q)),!0===We.mathMl&&(k(_e,H),k(Ae,Y),k(Ae,q))),D(e,"ADD_TAGS")||(Re.tagCheck=null),D(e,"ADD_ATTR")||(Re.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Re.tagCheck=e.ADD_TAGS:(_e===Ee&&(_e=I(_e)),k(_e,e.ADD_TAGS,ct))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Re.attributeCheck=e.ADD_ATTR:(Ae===be&&(Ae=I(Ae)),k(Ae,e.ADD_ATTR,ct))),e.ADD_URI_SAFE_ATTR&&k($e,e.ADD_URI_SAFE_ATTR,ct),e.FORBID_CONTENTS&&(Ge===Ye&&(Ge=I(Ge)),k(Ge,e.FORBID_CONTENTS,ct)),e.ADD_FORBID_CONTENTS&&(Ge===Ye&&(Ge=I(Ge)),k(Ge,e.ADD_FORBID_CONTENTS,ct)),Be&&(_e["#text"]=!0),Le&&k(_e,["html","head","body"]),_e.table&&(k(_e,["tbody"]),delete Ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,ee=Q.createHTML("")}else void 0===Q&&(Q=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(C,a)),null!==Q&&"string"==typeof ee&&(ee=Q.createHTML(""));m&&m(e),st=e}},ft=k({},[...U,...z,...F]),dt=k({},[...H,...B]),ht=function(e){_(n.removed,{element:e});try{Z(e).removeChild(e)}catch(t){$(e)}},gt=function(e,t){try{_(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||Ue)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},yt=function(e){let t=null,n=null;if(Me)e="<remove></remove>"+e;else{const t=S(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&Qe===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Q?Q.createHTML(e):e;if(Qe===Je)try{t=(new w).parseFromString(o,it)}catch(e){}if(!t||!t.documentElement){t=ne.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?ee:o}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Qe===Je?le.call(t,Le?"html":"body")[0]:Le?t.documentElement:a},Tt=function(e){return ae.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},_t=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Et=function(e){return"function"==typeof s&&e instanceof s};function At(e,t,r){g(e,e=>{e.call(n,t,r,st)})}const bt=function(e){let t=null;if(At(se.beforeSanitizeElements,e,null),_t(e))return ht(e),!0;const r=ct(e.nodeName);if(At(se.uponSanitizeElement,e,{tagName:r,allowedTags:_e}),ke&&e.hasChildNodes()&&!Et(e.firstElementChild)&&O(/<[/\w!]/g,e.innerHTML)&&O(/<[/\w!]/g,e.textContent))return ht(e),!0;if(7===e.nodeType)return ht(e),!0;if(ke&&8===e.nodeType&&O(/<[/\w]/g,e.data))return ht(e),!0;if(!(Re.tagCheck instanceof Function&&Re.tagCheck(r))&&(!_e[r]||Ne[r])){if(!Ne[r]&&Nt(r)){if(Se.tagNameCheck instanceof RegExp&&O(Se.tagNameCheck,r))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(r))return!1}if(Be&&!Ge[r]){const t=Z(e)||e.parentNode,n=V(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=X(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,K(e))}}return ht(e),!0}return e instanceof u&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=A(e.tagName),r=A(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(ft[n]):e.namespaceURI===Ve?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&ot[r]:Boolean(dt[n]):e.namespaceURI===Je?!(t.namespaceURI===Ze&&!ot[r])&&!(t.namespaceURI===Ve&&!rt[r])&&!dt[n]&&(at[n]||!ft[n]):!("application/xhtml+xml"!==it||!tt[e.namespaceURI]))}(e)?(ht(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!O(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ce&&3===e.nodeType&&(t=e.textContent,g([ue,me,pe],e=>{t=N(t,e," ")}),e.textContent!==t&&(_(n.removed,{element:e.cloneNode()}),e.textContent=t)),At(se.afterSanitizeElements,e,null),!1):(ht(e),!0)},St=function(e,t,n){if(ve[t])return!1;if(Fe&&("id"===t||"name"===t)&&(n in r||n in ut))return!1;if(Oe&&!ve[t]&&O(fe,t));else if(De&&O(de,t));else if(Re.attributeCheck instanceof Function&&Re.attributeCheck(t,e));else if(!Ae[t]||ve[t]){if(!(Nt(e)&&(Se.tagNameCheck instanceof RegExp&&O(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&O(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t,e))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&O(Se.tagNameCheck,n)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))))return!1}else if($e[t]);else if(O(Te,N(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!qe[e])if(xe&&!O(he,N(n,ge,"")));else if(n)return!1;return!0},Nt=function(e){return"annotation-xml"!==e&&S(e,ye)},vt=function(e){At(se.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae,forceKeepAttr:void 0};let o=t.length;for(;o--;){const a=t[o],{name:i,namespaceURI:l,value:c}=a,s=ct(i),u=c;let m="value"===i?u:R(u);if(r.attrName=s,r.attrValue=m,r.keepAttr=!0,r.forceKeepAttr=void 0,At(se.uponSanitizeAttribute,e,r),m=r.attrValue,!He||"id"!==s&&"name"!==s||(gt(i,e),m="user-content-"+m),ke&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,m)){gt(i,e);continue}if("attributename"===s&&S(m,"href")){gt(i,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){gt(i,e);continue}if(!we&&O(/\/>/i,m)){gt(i,e);continue}Ce&&g([ue,me,pe],e=>{m=N(m,e," ")});const p=ct(e.nodeName);if(St(p,s,m)){if(Q&&"object"==typeof C&&"function"==typeof C.getAttributeType)if(l);else switch(C.getAttributeType(p,s)){case"TrustedHTML":m=Q.createHTML(m);break;case"TrustedScriptURL":m=Q.createScriptURL(m)}if(m!==u)try{l?e.setAttributeNS(l,i,m):e.setAttribute(i,m),_t(e)?ht(e):T(n.removed)}catch(t){gt(i,e)}}else gt(i,e)}At(se.afterSanitizeAttributes,e,null)},Rt=function e(t){let n=null;const r=Tt(t);for(At(se.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)At(se.uponSanitizeShadowNode,n,null),bt(n),vt(n),n.content instanceof l&&e(n.content);At(se.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,i=null,c=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Et(e)){if("function"!=typeof e.toString)throw x("toString is not a function");if("string"!=typeof(e=e.toString()))throw x("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ie||pt(t),n.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){const t=ct(e.nodeName);if(!_e[t]||Ne[t])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)r=yt("\x3c!----\x3e"),a=r.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!Pe&&!Ce&&!Le&&-1===e.indexOf("<"))return Q&&ze?Q.createHTML(e):e;if(r=yt(e),!r)return Pe?null:ze?ee:""}r&&Me&&ht(r.firstChild);const u=Tt(je?e:r);for(;i=u.nextNode();)bt(i),vt(i),i.content instanceof l&&Rt(i.content);if(je)return e;if(Pe){if(Ue)for(c=ie.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(Ae.shadowroot||Ae.shadowrootmode)&&(c=ce.call(o,c,!0)),c}let m=Le?r.outerHTML:r.innerHTML;return Le&&_e["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&O(te,r.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+m),Ce&&g([ue,me,pe],e=>{m=N(m,e," ")}),Q&&ze?Q.createHTML(m):m},n.setConfig=function(){pt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ie=!0},n.clearConfig=function(){st=null,Ie=!1},n.isValidAttribute=function(e,t,n){st||pt({});const r=ct(e),o=ct(t);return St(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&_(se[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=y(se[e],t);return-1===n?void 0:E(se[e],n,1)[0]}return T(se[e])},n.removeHooks=function(e){se[e]=[]},n.removeAllHooks=function(){se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n})(),r(6145);var ae=r(4848);const ie=(...e)=>e.filter(Boolean).length>0?e.filter(Boolean).join(" "):null;function le({data:e,variant:t="primary",className:n}){const r=t&&"primary"!==t?`mg-card--${t}`:null;return(0,ae.jsx)(ae.Fragment,{children:e.map((e,t)=>(0,ae.jsxs)("article",{className:ie("mg-card","mg-card__vc","mg-card__book",r,n),children:[(0,ae.jsx)("div",{className:"mg-card__visual",children:(0,ae.jsx)("img",{src:e.imgback,alt:e.imgalt,className:"mg-card__image"})}),(0,ae.jsx)("div",{className:"mg-card__content",children:(0,ae.jsx)("header",{className:"mg-card__title",children:(0,ae.jsx)("a",{href:e.link,children:e.title?.trim()})})})]},t))})}le.propTypes={data:a().array.isRequired,variant:a().oneOf(["primary","secondary","tertiary","quaternary"]),className:a().string};export{le as BookCard};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* react-jsx-runtime.production.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
+
* Compiled on: 2026-04-03T08:59:34.689Z
|
|
4
|
+
*/
|
|
5
|
+
/*! For license information please see Breadcrumbs.js.LICENSE.txt */
|
|
6
|
+
import"react";var e={2694(e,r,t){var n=t(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,r,t,a,o,i){if(i!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:o,resetWarningCache:a};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,n){var a=null;if(void 0!==n&&(a=""+n),void 0!==r.key&&(a=""+r.key),"key"in r)for(var o in n={},r)"key"!==o&&(n[o]=r[o]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:a,ref:void 0!==r?r:null,props:n}}},4848(e,r,t){e.exports=t(9698)}},r={};function t(n){var a=r[n];if(void 0!==a)return a.exports;var o=r[n]={exports:{}};return e[n](o,o.exports,t),o.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n=t(5556),a=t.n(n),o=t(4848);function i({data:e,Color:r,...t}){const n=e.length-1;let a="";return"White"==r&&(a="mg-breadcrumb--white"),(0,o.jsx)("nav",{"aria-label":"breadcrumbs",className:["mg-breadcrumb",`${a}`].join(" ").trim(),children:(0,o.jsx)("ul",{children:e.map((e,r)=>r===n?(0,o.jsx)("li",{"aria-current":e.text,children:e.text},r):(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"#","aria-label":e.text,children:e.text})},r))})})}i.propTypes={data:a().arrayOf(a().shape({text:a().string.isRequired})).isRequired,Color:a().string};export{i as Breadcrumbcomponent};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
+
* Compiled on: 2026-04-03T08:59:34.689Z
|
|
4
|
+
*/
|
|
5
|
+
/*! For license information please see Checkbox.js.LICENSE.txt */
|
|
6
|
+
import{useId as e}from"react";var r={2694(e,r,o){var a=o(6925);function t(){}function n(){}n.resetWarningCache=t,e.exports=function(){function e(e,r,o,t,n,i){if(i!==a){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function r(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}},5556(e,r,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,r){var o=Symbol.for("react.transitional.element");function a(e,r,a){var t=null;if(void 0!==a&&(t=""+a),void 0!==r.key&&(t=""+r.key),"key"in r)for(var n in a={},r)"key"!==n&&(a[n]=r[n]);else a=r;return r=a.ref,{$$typeof:o,type:e,key:t,ref:void 0!==r?r:null,props:a}}Symbol.for("react.fragment"),r.jsx=a,r.jsxs=a},4848(e,r,o){e.exports=o(9698)}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,a),n.exports}a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.d=(e,r)=>{for(var o in r)a.o(r,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var t=a(5556),n=a.n(t),i=a(4848);function l({id:r,name:o,label:a,value:t,checked:n,defaultChecked:l,onChange:s,disabled:c=!1,error:p=!1,errorText:f,labelPosition:d="after",className:m,...u}){const b=e(),h=r||b,y=p&&f?`${h}-error`:void 0,v=["mg-form-check__input","mg-form-check__input--checkbox",c&&"mg-form-check__input--disabled",p&&"mg-form-check__input--error"].filter(Boolean).join(" "),g=a&&(0,i.jsx)("label",{className:"mg-form-check__label",htmlFor:h,children:a});return(0,i.jsxs)("div",{className:["mg-form-check",m].filter(Boolean).join(" "),children:["before"===d&&g,(0,i.jsx)("input",{className:v,type:"checkbox",id:h,name:o,value:t,checked:n,defaultChecked:l,onChange:s,disabled:c,"aria-invalid":p||void 0,"aria-describedby":y,...a?{}:{"aria-label":t},...u}),"after"===d&&g,p&&f&&(0,i.jsx)("p",{className:"mg-form-error",id:y,role:"alert",children:f})]})}l.propTypes={id:n().string,name:n().string,label:n().string,value:n().string,checked:n().bool,defaultChecked:n().bool,onChange:n().func,disabled:n().bool,error:n().bool,errorText:n().string,labelPosition:n().oneOf(["before","after"]),className:n().string};const s=l;export{l as Checkbox,s as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
+
* Compiled on: 2026-04-03T08:59:34.689Z
|
|
4
|
+
*/
|
|
5
|
+
/*! For license information please see Chips.js.LICENSE.txt */
|
|
6
|
+
import"react";var e={2694(e,r,t){var o=t(6925);function n(){}function a(){}a.resetWarningCache=n,e.exports=function(){function e(e,r,t,n,a,p){if(p!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:n};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,o){var n=null;if(void 0!==o&&(n=""+o),void 0!==r.key&&(n=""+r.key),"key"in r)for(var a in o={},r)"key"!==a&&(o[a]=r[a]);else o=r;return r=o.ref,{$$typeof:t,type:e,key:n,ref:void 0!==r?r:null,props:o}}},4848(e,r,t){e.exports=t(9698)}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var a=r[o]={exports:{}};return e[o](a,a.exports,t),a.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var o=t(5556),n=t.n(o),a=t(4848);function p({label:e,Type:r="Default"}){return"With X"===r?(0,a.jsx)("button",{type:"button",className:"mg-chip mg-chip__cross","aria-label":`Remove filter: ${e}`,children:e}):(0,a.jsx)("a",{className:"mg-chip",href:"#",children:e})}p.propTypes={label:n().string.isRequired,Type:n().oneOf(["Default","With X"])};export{p as Chips};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
+
* Compiled on: 2026-04-03T08:59:34.689Z
|
|
4
|
+
*/
|
|
5
|
+
/*! For license information please see CtaButton.js.LICENSE.txt */
|
|
6
|
+
import*as e from"react";var r={2694(e,r,t){var o=t(6925);function a(){}function n(){}n.resetWarningCache=a,e.exports=function(){function e(e,r,t,a,n,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:a};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,o){var a=null;if(void 0!==o&&(a=""+o),void 0!==r.key&&(a=""+r.key),"key"in r)for(var n in o={},r)"key"!==n&&(o[n]=r[n]);else o=r;return r=o.ref,{$$typeof:t,type:e,key:a,ref:void 0!==r?r:null,props:o}}},4848(e,r,t){e.exports=t(9698)},1649(e,r,t){var o;e.exports=(o={},t.d(o,{}),o)}},t={};function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports}o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var a={};o.d(a,{F:()=>p}),o(1649);var n=o(5556),i=o.n(n),s=o(4848);function p({label:e,Type:r="Primary",State:t="Default",...o}){const a="Disabled"===t,n=["mg-button","mg-button-"+("Secondary"===r?"secondary":"primary"),a&&"disabled"].filter(Boolean).join(" ");return(0,s.jsx)("a",{className:n,...a?{"aria-disabled":"true"}:{href:"#"},...o,children:e})}p.propTypes={label:i().string.isRequired,Type:i().oneOf(["Primary","Secondary"]),State:i().oneOf(["Default","Disabled"])};const l=a.F;export{l as CtaButton};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
+
* Compiled on: 2026-04-03T08:59:34.689Z
|
|
4
|
+
*/
|
|
5
|
+
/*! For license information please see EmbedContainer.js.LICENSE.txt */
|
|
6
|
+
import"react";var e={2694(e,r,t){var n=t(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,a,s){if(s!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:o};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var a in n={},r)"key"!==a&&(n[a]=r[a]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}},4848(e,r,t){e.exports=t(9698)}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n=t(5556),o=t.n(n),a=t(4848);function s({children:e,aspectRatio:r="16x9",className:t="",as:n="div"}){const o=["mg-embed-container","16x9"!==r&&`mg-embed-container--${r}`,t].filter(Boolean).join(" ");return(0,a.jsx)(n,{className:o,children:e})}s.propTypes={children:o().node,aspectRatio:o().oneOf(["16x9","4x3","1x1","21x9"]),className:o().string,as:o().string};const i=s;export{s as EmbedContainer,i as default};
|
package/components/Fetcher.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
-
* Compiled on: 2026-
|
|
3
|
+
* Compiled on: 2026-04-03T08:59:34.689Z
|
|
4
4
|
*/
|
|
5
5
|
/*! For license information please see Fetcher.js.LICENSE.txt */
|
|
6
|
-
import{useEffect as
|
|
6
|
+
import{useEffect as e,useState as r}from"react";var t={2694(e,r,t){var o=t(6925);function n(){}function a(){}a.resetWarningCache=n,e.exports=function(){function e(e,r,t,n,a,s){if(s!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:n};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,o){var n=null;if(void 0!==o&&(n=""+o),void 0!==r.key&&(n=""+r.key),"key"in r)for(var a in o={},r)"key"!==a&&(o[a]=r[a]);else o=r;return r=o.ref,{$$typeof:t,type:e,key:n,ref:void 0!==r?r:null,props:o}}},4848(e,r,t){e.exports=t(9698)}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var a=n(5556),s=n.n(a),i=n(4848);const c={isLoading:!1,data:[]||0},p=e=>{const r=new URLSearchParams;for(const t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&null!==e[t]&&r.append(t,e[t]);return r.toString()},u=({api:t,render:o,queryParams:n={},username:a,password:s})=>{const[u,f]=r(c);e(()=>(d().catch(e=>console.error(e)),()=>f(c)),[t,JSON.stringify(n)]);const d=async()=>{f(e=>({...e,isLoading:!0}));const e=p(n),r=e?`${t}?${e}`:t;try{const e=await fetch(r,{method:"GET"});if(!e.ok)throw new Error("Network response was not ok");const t=await e.json();f(e=>({...e,isLoading:!1,data:t.results}))}catch(e){console.error("Fetch error: ",e),f(e=>({...e,isLoading:!1,data:[]}))}};return(0,i.jsx)("div",{children:o(u)})};u.propTypes={api:s().string.isRequired,render:s().func.isRequired,queryParams:s().object,username:s().string,password:s().string};const f=u;export{f as default,p as generateQueryParams};
|